|
|
@@ -17,6 +17,7 @@ import com.cyksj.common.annotation.Log;
|
|
|
import com.cyksj.common.annotation.NoSubmit;
|
|
|
import com.cyksj.common.constant.Constant;
|
|
|
import com.cyksj.common.exception.BusinessRuntimeException;
|
|
|
+import com.cyksj.common.task.GlobalThreadPoolTaskExecutor;
|
|
|
import com.cyksj.dto.RedisKey;
|
|
|
import com.cyksj.dto.Result;
|
|
|
import com.cyksj.enums.BusinessType;
|
|
|
@@ -106,6 +107,8 @@ public class CmsAccountController {
|
|
|
|
|
|
private final SysEmailMapper sysEmailMapper;
|
|
|
|
|
|
+ private static final GlobalThreadPoolTaskExecutor TASK_EXECUTOR = GlobalThreadPoolTaskExecutor.getInstance();
|
|
|
+
|
|
|
@GetMapping("/get")
|
|
|
@SaCheckPermission("account:view")
|
|
|
public Result<SearchResult<AccountView>> get(Long userId, String showId, String nickName, String submitAccount, String expiryStartTime, String expiryEndTime, Boolean expiredAll, Boolean existsExpired, Boolean existsExpiredToday, Integer noChangeMonths) {
|
|
|
@@ -926,6 +929,7 @@ public class CmsAccountController {
|
|
|
@PostMapping("/replace/banned")
|
|
|
public Result<List<String>> replaceBannedAccount(Long goodsId, MultipartFile file) throws IOException {
|
|
|
List<String> repeat = new ArrayList<>();
|
|
|
+ List<Long> sendMsgList = new ArrayList<>();
|
|
|
EasyExcel.read(file.getInputStream(), ExcelBannedAccountData.class, new AnalysisEventListener<ExcelBannedAccountData>() {
|
|
|
@Override
|
|
|
public void invoke(ExcelBannedAccountData data, AnalysisContext analysisContext) {
|
|
|
@@ -953,6 +957,8 @@ public class CmsAccountController {
|
|
|
dbAccount.setStartTime(DateTime.now());
|
|
|
dbAccount.setExpiryTime(DateUtil.offsetMonth(DateTime.now(), 1));
|
|
|
accountService.updateById(dbAccount);
|
|
|
+
|
|
|
+ sendMsgList.add(dbAccount.getId());
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -960,6 +966,18 @@ public class CmsAccountController {
|
|
|
|
|
|
}
|
|
|
}).sheet().doRead();
|
|
|
+
|
|
|
+ if (CollUtil.isNotEmpty(sendMsgList)) {
|
|
|
+ TASK_EXECUTOR.execute(() -> {
|
|
|
+ sendMsgList.forEach(accountId -> {
|
|
|
+ GroupsTrips groupsTrips = groupsMapper.selectOne(Wrappers.lambdaQuery(GroupsTrips.class)
|
|
|
+ .eq(GroupsTrips::getAccountId, accountId).last("limit 1"));
|
|
|
+ if (groupsTrips != null) {
|
|
|
+ cmsGroupService.sendChangeAccountMsg(groupsTrips.getId(), goodsId);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(repeat);
|
|
|
}
|
|
|
|