|
@@ -185,22 +185,17 @@ public class UserIncrementServiceImpl extends ServiceImpl<IUserIncrementMapper,
|
|
|
|
|
|
for (int i = 0 ; i<param.getCount() ;i++) {
|
|
|
UserIncrement userIncrement = new UserIncrement();
|
|
|
- if(param.getId() != null){ //续费
|
|
|
- userIncrement = this.getById(param.getId());
|
|
|
- }
|
|
|
String date = DateUtil.date2String(new Date(), DateUtil.DEFAULT_DATE_FORMAT);
|
|
|
userIncrement.setId(param.getId());
|
|
|
userIncrement.setUserId(param.getUserId());
|
|
|
userIncrement.setKeyWord(UUID.randomUUID().toString().replace("-", ""));
|
|
|
userIncrement.setIsExpired(0);
|
|
|
- userIncrement.setCreateTime(date);
|
|
|
userIncrement.setUpdateTime(date);
|
|
|
- userIncrement.setIncrementStartTime(date);
|
|
|
userIncrement.setIncrementEndTime(param.getIncrementEndTime());
|
|
|
userIncrement.setIncrementTypeId(param.getIncrementTypeId());
|
|
|
- if(userIncrement.getId()!= null){
|
|
|
- userIncrement.setOrderSn(userIncrement.getOrderSn() +","+incrementOrderMg.getOrderSn());
|
|
|
- }else {
|
|
|
+ if(userIncrement.getId()== null){
|
|
|
+ userIncrement.setIncrementStartTime(date);
|
|
|
+ userIncrement.setCreateTime(date);
|
|
|
userIncrement.setOrderSn(incrementOrderMg.getOrderSn());
|
|
|
}
|
|
|
if(incrementType.getValidTimeType() == 0){
|