|
@@ -15,6 +15,7 @@ import com.fdkankan.ucenter.constant.LoginConstant;
|
|
|
import com.fdkankan.ucenter.constant.OrderConstant;
|
|
|
import com.fdkankan.ucenter.entity.*;
|
|
|
import com.fdkankan.ucenter.httpClient.client.PayClient;
|
|
|
+import com.fdkankan.ucenter.httpClient.param.PayAutoPayVo;
|
|
|
import com.fdkankan.ucenter.httpClient.param.PayGoods;
|
|
|
import com.fdkankan.ucenter.httpClient.service.PayService;
|
|
|
import com.fdkankan.ucenter.httpClient.vo.PayOrderVo;
|
|
@@ -171,8 +172,18 @@ public class IncrementOrderServiceImpl extends ServiceImpl<IIncrementOrderMapper
|
|
|
}
|
|
|
|
|
|
IncrementOrder incrementOrderEntity = new IncrementOrder();
|
|
|
+ PayAutoPayVo autoPayVo = null;
|
|
|
+ if(incrementType.getValidTimeType() == 0){
|
|
|
+ incrementOrderEntity.setMemberLevels("PR");
|
|
|
+ autoPayVo =new PayAutoPayVo(param.getAutoPay(),"YEAR");
|
|
|
+ }
|
|
|
+ if(incrementType.getValidTimeType() == 1){
|
|
|
+ incrementOrderEntity.setMemberLevels("SE");
|
|
|
+ autoPayVo = new PayAutoPayVo(param.getAutoPay(), "MONTH");
|
|
|
+ }
|
|
|
+
|
|
|
PayGoods payGoods = new PayGoods(incrementType.getName(),param.getCount(),incrementType.getValidTimeType(),param.getMonthQy());
|
|
|
- PayOrderVo payOrderVo = payService.downOrder(total, "incrementOrder",user.getUserName(),user.getNickName(), Arrays.asList(payGoods),param.getAutoPay());
|
|
|
+ PayOrderVo payOrderVo = payService.downOrder(total, "incrementOrder",user.getUserName(),user.getNickName(), Arrays.asList(payGoods),autoPayVo);
|
|
|
if(payOrderVo == null){
|
|
|
throw new BusinessException(OrderConstant.FAILURE_CODE_8005,OrderConstant.FAILURE_MSG_8005);
|
|
|
}
|
|
@@ -192,12 +203,6 @@ public class IncrementOrderServiceImpl extends ServiceImpl<IIncrementOrderMapper
|
|
|
incrementOrderEntity.setMonthQy(param.getMonthQy());
|
|
|
incrementOrderEntity.setTimeZoneOff(param.getTimeZoneOff());
|
|
|
incrementOrderEntity.setAutoPay(param.getAutoPay());
|
|
|
- if(incrementType.getValidTimeType() == 0){
|
|
|
- incrementOrderEntity.setMemberLevels("PR");
|
|
|
- }
|
|
|
- if(incrementType.getValidTimeType() == 1){
|
|
|
- incrementOrderEntity.setMemberLevels("SE");
|
|
|
- }
|
|
|
this.save(incrementOrderEntity);
|
|
|
return incrementOrderEntity;
|
|
|
}
|