|
@@ -1,32 +1,21 @@
|
|
|
package com.yonge.cooleshow.biz.dal.service.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
-import com.alipay.api.domain.NextUrl;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
-import com.google.common.collect.Lists;
|
|
|
import com.yonge.cooleshow.biz.dal.dao.StudentDao;
|
|
|
import com.yonge.cooleshow.biz.dal.dto.search.StudentSearch;
|
|
|
-import com.yonge.cooleshow.biz.dal.entity.Student;
|
|
|
-import com.yonge.cooleshow.biz.dal.entity.SysUser;
|
|
|
-import com.yonge.cooleshow.biz.dal.entity.TenantActivationCode;
|
|
|
-import com.yonge.cooleshow.biz.dal.entity.TenantAlbumPurchase;
|
|
|
-import com.yonge.cooleshow.biz.dal.entity.TenantInfo;
|
|
|
-import com.yonge.cooleshow.biz.dal.entity.UserTenantAlbumRecord;
|
|
|
+import com.yonge.cooleshow.biz.dal.entity.*;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.MessageTypeEnum;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.SourceTypeEnum;
|
|
|
-import com.yonge.cooleshow.biz.dal.enums.im.EImSendStatus;
|
|
|
import com.yonge.cooleshow.biz.dal.mapper.SysUserMapper;
|
|
|
import com.yonge.cooleshow.biz.dal.mapper.TenantActivationCodeMapper;
|
|
|
import com.yonge.cooleshow.biz.dal.mapper.TenantAlbumPurchaseMapper;
|
|
|
import com.yonge.cooleshow.biz.dal.mapper.UserTenantAlbumRecordMapper;
|
|
|
-import com.yonge.cooleshow.biz.dal.service.SysMessageService;
|
|
|
-import com.yonge.cooleshow.biz.dal.service.TenantActivationCodeService;
|
|
|
-import com.yonge.cooleshow.biz.dal.service.TenantAlbumService;
|
|
|
+import com.yonge.cooleshow.biz.dal.service.*;
|
|
|
import com.yonge.cooleshow.biz.dal.vo.StudentVo;
|
|
|
import com.yonge.cooleshow.biz.dal.vo.UserOrderDetailVo;
|
|
|
import com.yonge.cooleshow.biz.dal.wrapper.TenantActivationCodeWrapper;
|
|
@@ -49,7 +38,6 @@ import java.util.*;
|
|
|
import java.util.function.Function;
|
|
|
import java.util.regex.Pattern;
|
|
|
import java.util.stream.Collectors;
|
|
|
-import java.util.stream.Stream;
|
|
|
|
|
|
/**
|
|
|
* 机构激活码
|
|
@@ -72,7 +60,7 @@ public class TenantActivationCodeServiceImpl extends ServiceImpl<TenantActivatio
|
|
|
private UserTenantAlbumRecordMapper userTenantAlbumRecordMapper;
|
|
|
|
|
|
@Autowired
|
|
|
- private TenantAlbumService tenantAlbumService;
|
|
|
+ private TenantInfoService tenantInfoService;
|
|
|
|
|
|
@Autowired
|
|
|
private SysMessageService sysMessageService;
|
|
@@ -194,11 +182,8 @@ public class TenantActivationCodeServiceImpl extends ServiceImpl<TenantActivatio
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- private void sendCancelActivationCodeMessage(Long userId,String phone,String tenantName) {
|
|
|
-
|
|
|
- Map<Long, String> receivers = new HashMap<>();
|
|
|
- receivers.put(userId, phone);
|
|
|
+ @Override
|
|
|
+ public void sendCancelActivationCodeMessage(Map<Long, String> receivers, String tenantName) {
|
|
|
try {
|
|
|
sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.TENANT_CODE_SENDCANCEL,
|
|
|
receivers, null, 0, null, ClientEnum.TENANT_STUDENT.getCode(),tenantName);
|
|
@@ -339,6 +324,11 @@ public class TenantActivationCodeServiceImpl extends ServiceImpl<TenantActivatio
|
|
|
}
|
|
|
one.setActivationPhone(sysUser.getPhone());
|
|
|
this.updateById(one);
|
|
|
+ TenantInfo tenantInfo = tenantInfoService.getById(tenantId);
|
|
|
+ Map<Long, String> receivers = new HashMap<>(1);
|
|
|
+ receivers.put(userId, sysUser.getPhone());
|
|
|
+ this.sendCancelActivationCodeMessage(receivers,tenantInfo.getName());
|
|
|
+ this.sendActivationCodeMessage(userId,sysUser.getPhone());
|
|
|
}
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@@ -364,7 +354,9 @@ public class TenantActivationCodeServiceImpl extends ServiceImpl<TenantActivatio
|
|
|
.eq(TenantActivationCode::getSendStatus, EActivationCode.SEND)
|
|
|
.eq(TenantActivationCode::getTenantId,tenantInfo.getId())
|
|
|
.update();
|
|
|
-
|
|
|
+ //获取优惠券关联的学员编号和手机号map
|
|
|
+ Map<Long, String> receivers = sysUserMapper.selectBatchIds(idList).stream().collect(Collectors.toMap(SysUser::getId, SysUser::getPhone));
|
|
|
+ this.sendCancelActivationCodeMessage(receivers,tenantInfo.getName());
|
|
|
}
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|