|
|
@@ -88,15 +88,18 @@ public class CmsOrderController {
|
|
|
relation.setOperator(fcorpFollow.getName());
|
|
|
}
|
|
|
relation.setSendTime(DateTime.now());
|
|
|
- relation.setStartTime(DateTime.now());
|
|
|
- GoodsDonSku sku = skuMapper.selectById(orderDon.getSkuId());
|
|
|
- DateTime expiryTime;
|
|
|
- if (sku.getDays() != null && sku.getDays() > 0) {
|
|
|
- expiryTime = DateUtil.offsetDay(relation.getStartTime(), sku.getDays());
|
|
|
- } else {
|
|
|
- expiryTime = DateUtil.offsetMonth(relation.getStartTime(), sku.getMonths());
|
|
|
+
|
|
|
+ if (relation.getStartTime() == null) {
|
|
|
+ relation.setStartTime(DateTime.now());
|
|
|
+ GoodsDonSku sku = skuMapper.selectById(orderDon.getSkuId());
|
|
|
+ DateTime expiryTime;
|
|
|
+ if (sku.getDays() != null && sku.getDays() > 0) {
|
|
|
+ expiryTime = DateUtil.offsetDay(relation.getStartTime(), sku.getDays());
|
|
|
+ } else {
|
|
|
+ expiryTime = DateUtil.offsetMonth(relation.getStartTime(), sku.getMonths());
|
|
|
+ }
|
|
|
+ relation.setExpiryTime(expiryTime);
|
|
|
}
|
|
|
- relation.setExpiryTime(expiryTime);
|
|
|
relationMapper.updateById(relation);
|
|
|
|
|
|
//GPT代充
|
|
|
@@ -112,7 +115,7 @@ public class CmsOrderController {
|
|
|
throw BusinessRuntimeException.getInstance("更新用户代充剩余次数失败,请重试");
|
|
|
}
|
|
|
//记录gpt代充记录
|
|
|
- gptUserRechargeRecordService.recordGptUserRechargeNum(relation.getUserId(), relation.getId(), relation.getAccount(), 1, fcorpFollow != null ? fcorpFollow.getName() : null);
|
|
|
+ gptUserRechargeRecordService.recordGptUserRechargeNum(relation.getUserId(), relation.getId(), relation.getAccount(), 1, fcorpFollow != null ? fcorpFollow.getName() : null, "客服手动充值");
|
|
|
}
|
|
|
}
|
|
|
}
|