|
|
@@ -117,16 +117,26 @@ public class CmsAccountController {
|
|
|
|
|
|
private final MidjourneyAccountMapper midjourneyAccountMapper;
|
|
|
|
|
|
+ private final GoodsDonMapper goodsDonMapper;
|
|
|
+
|
|
|
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, Boolean isMjMirror) {
|
|
|
+ public Result<SearchResult<AccountView>> get(String title, Long userId, String showId, String nickName, String submitAccount, String expiryStartTime, String expiryEndTime, Boolean expiredAll, Boolean existsExpired, Boolean existsExpiredToday, Integer noChangeMonths, Boolean isMjMirror) {
|
|
|
MapBuilder mapBuilder = MapUtils.flatBuilder(request.getParameterMap());
|
|
|
if (StrUtil.isNotEmpty(expiryStartTime) || StrUtil.isNotEmpty(expiryEndTime)) {
|
|
|
mapBuilder.field(AccountView::getExpiryTime, expiryStartTime, expiryEndTime)
|
|
|
.op(Operator.Between);
|
|
|
}
|
|
|
+ if (StrUtil.isNotBlank(title)) {
|
|
|
+ GoodsDon goodsDon = goodsDonMapper.selectOne(Wrappers.lambdaQuery(GoodsDon.class).eq(GoodsDon::getTitle, title)
|
|
|
+ .last("limit 1"));
|
|
|
+ if (goodsDon != null) {
|
|
|
+ mapBuilder.field(AccountView::getGoodsId, goodsDon.getId());
|
|
|
+ title = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
if (StrUtil.isNotEmpty(showId)) {
|
|
|
userId = userMapper.getUserIdByShowId(showId);
|
|
|
}
|
|
|
@@ -223,7 +233,7 @@ public class CmsAccountController {
|
|
|
@GetMapping("/export/account")
|
|
|
@SaCheckPermission("account:export")
|
|
|
@Log(module = "平台管理/导出账号", businessType = BusinessType.EXPORT, isSaveRequestData = true)
|
|
|
- public void exportAccount(Long userId, String showId, String nickName, String submitAccount, String expiryStartTime, String expiryEndTime, Boolean expiredAll, Boolean existsExpired, Boolean existsExpiredToday, Integer noChangeMonths, HttpServletResponse response) {
|
|
|
+ public void exportAccount(String title, Long userId, String showId, String nickName, String submitAccount, String expiryStartTime, String expiryEndTime, Boolean expiredAll, Boolean existsExpired, Boolean existsExpiredToday, Integer noChangeMonths, HttpServletResponse response) {
|
|
|
MapBuilder mapBuilder = MapUtils.flatBuilder(request.getParameterMap());
|
|
|
if (StrUtil.isNotEmpty(expiryStartTime) || StrUtil.isNotEmpty(expiryEndTime)) {
|
|
|
mapBuilder.field(ExcelManageAccountData::getExpiryTime, expiryStartTime, expiryEndTime)
|
|
|
@@ -233,6 +243,15 @@ public class CmsAccountController {
|
|
|
userId = userMapper.getUserIdByShowId(showId);
|
|
|
}
|
|
|
|
|
|
+ if (StrUtil.isNotBlank(title)) {
|
|
|
+ GoodsDon goodsDon = goodsDonMapper.selectOne(Wrappers.lambdaQuery(GoodsDon.class).eq(GoodsDon::getTitle, title)
|
|
|
+ .last("limit 1"));
|
|
|
+ if (goodsDon != null) {
|
|
|
+ mapBuilder.field(ExcelManageAccountData::getGoodsId, goodsDon.getId());
|
|
|
+ title = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (userId != null || StringUtils.isNotBlank(nickName) || StringUtils.isNotBlank(submitAccount)) {
|
|
|
List<Long> accountIds = homeGroupMapper.getAccountIdsByUserIdOrNickNameOrSubmitAccount(userId, nickName, submitAccount);
|
|
|
if (accountIds.isEmpty()) {
|