|
@@ -158,6 +158,7 @@ public class MemberPriceSettingsServiceImpl extends ServiceImpl<MemberPriceSetti
|
|
|
|
|
|
VipCardRecordWrapper.AddVipCardRecord addVipCardRecord = new VipCardRecordWrapper.AddVipCardRecord();
|
|
|
|
|
|
+ UserPaymentOrderWrapper.VipDays vipDays = JSON.parseObject(orderDetailVo.getBizJson(), UserPaymentOrderWrapper.VipDays.class);
|
|
|
addVipCardRecord.setUserId(orderDetailVo.getUserId());
|
|
|
addVipCardRecord.setClientType(orderDetailVo.getOrderClient());
|
|
|
addVipCardRecord.setStatus(EVipRecordStatus.ADD);
|
|
@@ -170,6 +171,9 @@ public class MemberPriceSettingsServiceImpl extends ServiceImpl<MemberPriceSetti
|
|
|
addVipCardRecord.setOrderNo(orderDetailVo.getOrderNo());
|
|
|
addVipCardRecord.setSubOrderNo(orderDetailVo.getSubOrderNo());
|
|
|
addVipCardRecord.setVipCardId(orderDetailVo.getBizId());
|
|
|
+ if (vipDays != null && vipDays.getVipEndDays() !=null && vipDays.getVipEndDays() >0) {
|
|
|
+ addVipCardRecord.setVipDays(vipDays.getVipEndDays());
|
|
|
+ }
|
|
|
addVipCardRecord.setReason("会员购买");
|
|
|
vipCardRecordService.add(addVipCardRecord);
|
|
|
|
|
@@ -361,9 +365,11 @@ public class MemberPriceSettingsServiceImpl extends ServiceImpl<MemberPriceSetti
|
|
|
}
|
|
|
|
|
|
// 判断会员剩余天数是否改变
|
|
|
- VipCardRecordWrapper.UserVip userVip = vipCardRecordService.UserVipInfo(orderGoodsInfo.getUserId(), orderGoodsInfo.getPaymentClient());
|
|
|
- if (!userVip.getVipEndDays().equals(orderGoodsInfo.getVipEndDays())) {
|
|
|
- throw new BizException(998,"您当前VIP天数更新,请刷新后尝试");
|
|
|
+ if (detail.getVipType() == EVipType.SVIP) {
|
|
|
+ VipCardRecordWrapper.UserVip userVip = vipCardRecordService.UserVipInfo(orderGoodsInfo.getUserId(), orderGoodsInfo.getPaymentClient());
|
|
|
+ if (!userVip.getVipEndDays().equals(orderGoodsInfo.getVipEndDays())) {
|
|
|
+ throw new BizException(998, "您当前VIP天数更新,请刷新后尝试");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
BigDecimal couponAmount = BigDecimal.ZERO;
|
|
@@ -457,14 +463,23 @@ public class MemberPriceSettingsServiceImpl extends ServiceImpl<MemberPriceSetti
|
|
|
// 判断是否是机构学生 机构学生推送走另一个
|
|
|
|
|
|
try {
|
|
|
- sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.NEW_VIP_BUY_SUCCESS,
|
|
|
+ MessageTypeEnum messageTypeEnum = MessageTypeEnum.NEW_VIP_BUY_SUCCESS;
|
|
|
+ if (clientEnum == ClientEnum.TEACHER) {
|
|
|
+ messageTypeEnum= MessageTypeEnum.NEW_TEACHER_VIP_BUY_SUCCESS;
|
|
|
+ }
|
|
|
+ sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, messageTypeEnum,
|
|
|
receivers, null, 0, null, clientEnum.getCode(), param1);
|
|
|
} catch (Exception e) {
|
|
|
log.error("会员购买极光消息推送异常,userId={}", userId);
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
- sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.AWSMS, MessageTypeEnum.SMS_NEW_VIP_BUY_SUCCESS,
|
|
|
+
|
|
|
+ MessageTypeEnum messageTypeEnum = MessageTypeEnum.SMS_NEW_VIP_BUY_SUCCESS;
|
|
|
+ if (clientEnum == ClientEnum.TEACHER) {
|
|
|
+ messageTypeEnum= MessageTypeEnum.SMS_TEACHER_NEW_VIP_BUY_SUCCESS;
|
|
|
+ }
|
|
|
+ sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.AWSMS, messageTypeEnum,
|
|
|
receivers, null, 0, null, clientEnum.getCode(), param1);
|
|
|
} catch (Exception e) {
|
|
|
log.error("会员购买短信消息推送异常,userId={}", userId);
|