Commit e5a546a4 by 吕明尚

Merge branch 'dev' into test

parents 33eeba1b 4dd01792
...@@ -5,6 +5,7 @@ public enum DurationTypeEnum { ...@@ -5,6 +5,7 @@ public enum DurationTypeEnum {
ORDER(1,"订单消费"), ORDER(1,"订单消费"),
SHARE(2, "分享赠送"), SHARE(2, "分享赠送"),
ORDER_REFUND(3,"订单消费退款"), ORDER_REFUND(3,"订单消费退款"),
GIVE(4, "赠送"),
; ;
......
...@@ -485,6 +485,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper, ...@@ -485,6 +485,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
durationLog.setVariableDuration(consumerWallet.getRemainingDuration()); durationLog.setVariableDuration(consumerWallet.getRemainingDuration());
durationLog.setOperationType(YesNoEnum.yes.getIndex()); durationLog.setOperationType(YesNoEnum.yes.getIndex());
durationLog.setOperationTime(new Date()); durationLog.setOperationTime(new Date());
durationLog.setDurationType(DurationTypeEnum.GIVE.getCode());
durationLog.setCreateTime(new Date()); durationLog.setCreateTime(new Date());
oldConsumerWallet.setRemainingDuration(oldConsumerWallet.getRemainingDuration().add(consumerWallet.getRemainingDuration())); oldConsumerWallet.setRemainingDuration(oldConsumerWallet.getRemainingDuration().add(consumerWallet.getRemainingDuration()));
durationLogService.save(durationLog); durationLogService.save(durationLog);
...@@ -505,6 +506,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper, ...@@ -505,6 +506,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
durationLog.setOperationType(YesNoEnum.yes.getIndex()); durationLog.setOperationType(YesNoEnum.yes.getIndex());
durationLog.setOperationTime(new Date()); durationLog.setOperationTime(new Date());
durationLog.setCreateTime(new Date()); durationLog.setCreateTime(new Date());
durationLog.setDurationType(DurationTypeEnum.GIVE.getCode());
newConsumerWallet.setRemainingDuration(newConsumerWallet.getRemainingDuration().add(consumerWallet.getRemainingDuration())); newConsumerWallet.setRemainingDuration(newConsumerWallet.getRemainingDuration().add(consumerWallet.getRemainingDuration()));
newConsumerWallet.setRemainingIntegral(BigDecimal.ZERO); newConsumerWallet.setRemainingIntegral(BigDecimal.ZERO);
......
...@@ -471,7 +471,7 @@ public class OrderPayServiceImpl implements OrderPayService { ...@@ -471,7 +471,7 @@ public class OrderPayServiceImpl implements OrderPayService {
vo.setAttach(JSONObject.toJSONString(attachVo)); vo.setAttach(JSONObject.toJSONString(attachVo));
vo.setTerminal_trace(BaseUtil.getOrderNo("WXNO")); vo.setTerminal_trace(BaseUtil.getOrderNo("WXNO"));
vo.setTerminal_time(DateUtil.nowDate(Constants.DATE_TIME_FORMAT_NUM)); 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类型 // 订单中使用的是BigDecimal,这里要转为Integer类型
vo.setTotal_fee(String.valueOf(secondaryCardOrder.getSecondaryCardAmount().multiply(BigDecimal.TEN).multiply(BigDecimal.TEN).intValue())); vo.setTotal_fee(String.valueOf(secondaryCardOrder.getSecondaryCardAmount().multiply(BigDecimal.TEN).multiply(BigDecimal.TEN).intValue()));
vo.setNotify_url(apiDomain + PayConstants.SAOBEI_PAY_NOTIFY_API_URI); vo.setNotify_url(apiDomain + PayConstants.SAOBEI_PAY_NOTIFY_API_URI);
...@@ -544,7 +544,7 @@ public class OrderPayServiceImpl implements OrderPayService { ...@@ -544,7 +544,7 @@ public class OrderPayServiceImpl implements OrderPayService {
vo.setAttach(JSONObject.toJSONString(attachVo)); vo.setAttach(JSONObject.toJSONString(attachVo));
vo.setTerminal_trace(BaseUtil.getOrderNo("WXNO")); vo.setTerminal_trace(BaseUtil.getOrderNo("WXNO"));
vo.setTerminal_time(DateUtil.nowDate(Constants.DATE_TIME_FORMAT_NUM)); 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类型 // 订单中使用的是BigDecimal,这里要转为Integer类型
vo.setTotal_fee(String.valueOf(monthlyCardOrder.getMonthlyCardAmount().multiply(BigDecimal.TEN).multiply(BigDecimal.TEN).intValue())); vo.setTotal_fee(String.valueOf(monthlyCardOrder.getMonthlyCardAmount().multiply(BigDecimal.TEN).multiply(BigDecimal.TEN).intValue()));
vo.setNotify_url(apiDomain + PayConstants.SAOBEI_PAY_NOTIFY_API_URI); 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