Commit 4dd01792 by 吕明尚

赠送时长,时长日志增加类型

parent 153116a2
......@@ -5,6 +5,7 @@ public enum DurationTypeEnum {
ORDER(1,"订单消费"),
SHARE(2, "分享赠送"),
ORDER_REFUND(3,"订单消费退款"),
GIVE(4, "赠送"),
;
......
......@@ -485,6 +485,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
durationLog.setVariableDuration(consumerWallet.getRemainingDuration());
durationLog.setOperationType(YesNoEnum.yes.getIndex());
durationLog.setOperationTime(new Date());
durationLog.setDurationType(DurationTypeEnum.GIVE.getCode());
durationLog.setCreateTime(new Date());
oldConsumerWallet.setRemainingDuration(oldConsumerWallet.getRemainingDuration().add(consumerWallet.getRemainingDuration()));
durationLogService.save(durationLog);
......@@ -505,6 +506,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
durationLog.setOperationType(YesNoEnum.yes.getIndex());
durationLog.setOperationTime(new Date());
durationLog.setCreateTime(new Date());
durationLog.setDurationType(DurationTypeEnum.GIVE.getCode());
newConsumerWallet.setRemainingDuration(newConsumerWallet.getRemainingDuration().add(consumerWallet.getRemainingDuration()));
newConsumerWallet.setRemainingIntegral(BigDecimal.ZERO);
......
......@@ -471,7 +471,7 @@ public class OrderPayServiceImpl implements OrderPayService {
vo.setAttach(JSONObject.toJSONString(attachVo));
vo.setTerminal_trace(BaseUtil.getOrderNo("WXNO"));
vo.setTerminal_time(DateUtil.nowDate(Constants.DATE_TIME_FORMAT_NUM));
vo.setOrder_body(StrUtil.concat(true, "购买" + byId.getSecondaryCardAmount() + "元" + byId.getName() + "次卡"));
vo.setOrder_body(StrUtil.concat(true, "购买" + byId.getSecondaryCardAmount() + "元" + byId.getName()));
// 订单中使用的是BigDecimal,这里要转为Integer类型
vo.setTotal_fee(String.valueOf(secondaryCardOrder.getSecondaryCardAmount().multiply(BigDecimal.TEN).multiply(BigDecimal.TEN).intValue()));
vo.setNotify_url(apiDomain + PayConstants.SAOBEI_PAY_NOTIFY_API_URI);
......@@ -544,7 +544,7 @@ public class OrderPayServiceImpl implements OrderPayService {
vo.setAttach(JSONObject.toJSONString(attachVo));
vo.setTerminal_trace(BaseUtil.getOrderNo("WXNO"));
vo.setTerminal_time(DateUtil.nowDate(Constants.DATE_TIME_FORMAT_NUM));
vo.setOrder_body(StrUtil.concat(true, "购买" + byId.getMonthlyCardAmount() + "元" + byId.getName() + "月卡"));
vo.setOrder_body(StrUtil.concat(true, "购买" + byId.getMonthlyCardAmount() + "元" + byId.getMonthlyCardDays() + "天月卡"));
// 订单中使用的是BigDecimal,这里要转为Integer类型
vo.setTotal_fee(String.valueOf(monthlyCardOrder.getMonthlyCardAmount().multiply(BigDecimal.TEN).multiply(BigDecimal.TEN).intValue()));
vo.setNotify_url(apiDomain + PayConstants.SAOBEI_PAY_NOTIFY_API_URI);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment