|
@@ -602,6 +602,12 @@ public class CmsAccountController {
|
|
|
@GetMapping("/read/account/expired")
|
|
@GetMapping("/read/account/expired")
|
|
|
@Transactional(rollbackFor = Throwable.class)
|
|
@Transactional(rollbackFor = Throwable.class)
|
|
|
public Result<String> readAccountExpired(MultipartFile file) throws IOException {
|
|
public Result<String> readAccountExpired(MultipartFile file) throws IOException {
|
|
|
|
|
+ Long ori_months = 161l;
|
|
|
|
|
+ List<Long> member_months = List.of(178l, 188l);
|
|
|
|
|
+ Long spec_indenpece_months = 177l;
|
|
|
|
|
+ String msg1 = "由于GPT自身风控问题,给平台也造成了二十几万的损失,但是我们全部承担,但因涉及账号太多,每日注册数有限,我们决定5月16日到期前用户采用发放无门槛优惠券形式,我们已经再车票页中补偿给您一张10元优惠券,感谢谅解!";
|
|
|
|
|
+ String msg2 = "由于GPT自身风控问题,给平台也造成了二十几万的损失,但是我们全部承担,但因涉及账号太多,每日注册数有限,我们决定5月16日到期前用户采用发放无门槛优惠券形式,我们已经再车票页中补偿给您一张30元优惠券,感谢谅解!";
|
|
|
|
|
+ String msg3 = "由于GPT自身风控问题,给平台也造成了二十几万的损失,但是我们全部承担,但因涉及账号太多,每日注册数有限,我们决定5月16日到期前用户采用发放无门槛优惠券形式,我们已经再车票页中补偿给您一张100元优惠券,感谢谅解!";
|
|
|
EasyExcel.read(file.getInputStream(), ExcelExpiredAccountData.class, new AnalysisEventListener<ExcelExpiredAccountData>() {
|
|
EasyExcel.read(file.getInputStream(), ExcelExpiredAccountData.class, new AnalysisEventListener<ExcelExpiredAccountData>() {
|
|
|
@Override
|
|
@Override
|
|
|
public void invoke(ExcelExpiredAccountData data, AnalysisContext analysisContext) {
|
|
public void invoke(ExcelExpiredAccountData data, AnalysisContext analysisContext) {
|
|
@@ -654,26 +660,51 @@ public class CmsAccountController {
|
|
|
accountDeletedRecord.setRelationId(relationId);
|
|
accountDeletedRecord.setRelationId(relationId);
|
|
|
accountDeletedRecord.setUserId(userId);
|
|
accountDeletedRecord.setUserId(userId);
|
|
|
accountDeletedRecord.setRelationStartTime(startTime);
|
|
accountDeletedRecord.setRelationStartTime(startTime);
|
|
|
- accountDeletedRecord.setRelationExpireTime(expiryTime);
|
|
|
|
|
|
|
+ accountDeletedRecord.setRelationExpiryTime(expiryTime);
|
|
|
|
|
+ Long couponId = 0l;
|
|
|
|
|
+ String msg = msg1;
|
|
|
if (userId != 0) {
|
|
if (userId != 0) {
|
|
|
- //发送5元优惠券
|
|
|
|
|
- couponCommonService.sendCouponToUser(userId, 89l, 0l, 0l, 0l, CouponUser.Channel.manual);
|
|
|
|
|
|
|
+ if (ori_months.equals(skuId)) {
|
|
|
|
|
+ //发送10元优惠券
|
|
|
|
|
+ couponId = 94l;
|
|
|
|
|
+ msg = msg1;
|
|
|
|
|
+ } else if (member_months.contains(skuId)) {
|
|
|
|
|
+ //银河会员 4人月付 4人季付
|
|
|
|
|
+ //30
|
|
|
|
|
+ couponId = 92l;
|
|
|
|
|
+ msg = msg2;
|
|
|
|
|
+ } else if (spec_indenpece_months.equals(skuId)) {
|
|
|
|
|
+ //独立会员月付
|
|
|
|
|
+ //100
|
|
|
|
|
+ couponId = 90l;
|
|
|
|
|
+ msg = msg3;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (couponId == 0) {
|
|
|
|
|
+ log.error("用户:{}未发送优惠券", userId);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (couponId != 0) {
|
|
|
|
|
+ couponCommonService.sendCouponToUser(userId, couponId, 0l, 0l, 0l, CouponUser.Channel.manual);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
//发送短信通知
|
|
//发送短信通知
|
|
|
User user = userMapper.selectById(userId);
|
|
User user = userMapper.selectById(userId);
|
|
|
String phone = null;
|
|
String phone = null;
|
|
|
if (user != null) {
|
|
if (user != null) {
|
|
|
phone = user.getLoginPhone();
|
|
phone = user.getLoginPhone();
|
|
|
if (StrUtil.isEmpty(phone)) {
|
|
if (StrUtil.isEmpty(phone)) {
|
|
|
- UserBindDetail userBindDetail = userBindDetailMapper.selectById(userId);
|
|
|
|
|
|
|
+ UserBindDetail userBindDetail = userBindDetailMapper.selectOne(Wrappers.lambdaQuery(UserBindDetail.class)
|
|
|
|
|
+ .eq(UserBindDetail::getUserId, userId).last("limit 1"));
|
|
|
if (userBindDetail != null) {
|
|
if (userBindDetail != null) {
|
|
|
phone = userBindDetail.getPhone();
|
|
phone = userBindDetail.getPhone();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (StrUtil.isNotBlank(phone)) {
|
|
if (StrUtil.isNotBlank(phone)) {
|
|
|
- String msg = goodsDon != null ? goodsDon.getTitle() : "车票";
|
|
|
|
|
- SmsUtil.sendLuoKey2Msg(phone, "xx");
|
|
|
|
|
-
|
|
|
|
|
|
|
+ if (couponId != 0) {
|
|
|
|
|
+ log.info("发送短息至用户:{}", userId);
|
|
|
|
|
+ SmsUtil.sendLuoKey2Msg(phone, msg);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
accountDeletedRecordMapper.insert(accountDeletedRecord);
|
|
accountDeletedRecordMapper.insert(accountDeletedRecord);
|