|
|
@@ -22,6 +22,7 @@ import com.cyksj.model.views.ExpiredAccountDataView;
|
|
|
import com.cyksj.redis.RedisService;
|
|
|
import com.cyksj.service.mange.CmsAccountService;
|
|
|
import com.cyksj.service.mange.CmsGroupService;
|
|
|
+import com.cyksj.service.sys.SysConfigService;
|
|
|
import com.ejlchina.searcher.BeanSearcher;
|
|
|
import com.ejlchina.searcher.param.Operator;
|
|
|
import com.ejlchina.searcher.util.MapUtils;
|
|
|
@@ -31,10 +32,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.Optional;
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
|
* @author chan
|
|
|
@@ -58,6 +56,8 @@ public class CmsAccountServiceImpl extends ServiceImpl<AccountMapper, Account> i
|
|
|
|
|
|
private final RedisService redisService;
|
|
|
|
|
|
+ private final SysConfigService sysConfigService;
|
|
|
+
|
|
|
@Override
|
|
|
public IPage<ExpiredAccountDataView> getExpiredAccountView(Boolean isCorpWx, String customerService, Long goodsId, Long skuId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer userId, String startTime, String endTime, String now, Long offset, Long limit) {
|
|
|
return accountMapper.getExpiredAccountView(isCorpWx, customerService, goodsId, skuId, account, renewStatus, handleStatus, cnAccount, usAccount, userId, startTime, endTime, now, new Page<>(offset, limit));
|
|
|
@@ -200,6 +200,15 @@ public class CmsAccountServiceImpl extends ServiceImpl<AccountMapper, Account> i
|
|
|
if (!redisService.setNx(cache, goodsId, RedisService.key.IMPORT_ACCOUNT_CACHE_KEY.getTimeout())) {
|
|
|
throw BusinessRuntimeException.getInstance("后台程序正在导入账号中...");
|
|
|
}
|
|
|
+ List<Long> special_email_goods_ids = new ArrayList<>();
|
|
|
+ SysConfig sysConfig = sysConfigService.getOne(Wrappers.lambdaQuery(SysConfig.class)
|
|
|
+ .eq(SysConfig::getSysKey, Constant.SPECIAL_GOODS_ACCOUNT_IMPORT_KEY).last("limit 1"));
|
|
|
+ if (sysConfig != null) {
|
|
|
+ try {
|
|
|
+ special_email_goods_ids.addAll(Jsons.parseList(sysConfig.getSysValue(), Long.class));
|
|
|
+ } catch (Exception e) {
|
|
|
+ }
|
|
|
+ }
|
|
|
String regex;
|
|
|
if (goodsId == 29l) {
|
|
|
regex = "\\|";
|
|
|
@@ -223,8 +232,9 @@ public class CmsAccountServiceImpl extends ServiceImpl<AccountMapper, Account> i
|
|
|
insert.setAccount(account);
|
|
|
insert.setPassword(password);
|
|
|
if (part.length > 2) {
|
|
|
- //google辅助邮箱
|
|
|
- if (goodsId.equals(36l)) {
|
|
|
+ //google36、辅助邮箱
|
|
|
+ //46 Google Bard
|
|
|
+ if (special_email_goods_ids.contains(goodsId)) {
|
|
|
String email = part[2];
|
|
|
insert.setEmail(email);
|
|
|
} else {
|