Преглед изворни кода

fix 导出账号增加条件

zoujiajian пре 3 година
родитељ
комит
0b51773dc9

+ 6 - 3
netflix-web/src/main/java/com/cyksj/web/controller/manage/account/CmsAccountController.java

@@ -186,12 +186,15 @@ public class CmsAccountController {
     @GetMapping("/export/account")
     @SaCheckPermission("account:export")
     @Log(module = "平台管理/导出账号", businessType = BusinessType.EXPORT, isSaveRequestData = true)
-    public void exportAccount(Long userId, String nickName, String submitAccount, String expiryStartTime, String expiryEndTime, Boolean expiredAll, Boolean existsExpired, Boolean existsExpiredToday, Boolean pwdNotChangedThePastPwd, HttpServletResponse response) {
+    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) {
         MapBuilder mapBuilder = MapUtils.flatBuilder(request.getParameterMap());
         if (StrUtil.isNotEmpty(expiryStartTime) || StrUtil.isNotEmpty(expiryEndTime)) {
             mapBuilder.field(ExcelManageAccountData::getExpiryTime, expiryStartTime, expiryEndTime)
                     .op(Operator.Between);
         }
+	    if (StrUtil.isNotEmpty(showId)) {
+		    userId = userMapper.getUserIdByShowId(showId);
+	    }
 
         if (userId != null || StringUtils.isNotBlank(nickName) || StringUtils.isNotBlank(submitAccount)) {
             List<Long> accountIds = homeGroupMapper.getAccountIdsByUserIdOrNickNameOrSubmitAccount(userId, nickName, submitAccount);
@@ -206,8 +209,8 @@ public class CmsAccountController {
 		    extra_sql += "(if((select count(ur.id) from user_ticket_cleared_record ur where ur.account_id = a.id and deleted is true and source = 'self')>=4,true,false)) = 1";
 	    }
 
-	    if (pwdNotChangedThePastPwd != null && pwdNotChangedThePastPwd) {
-		    DateTime pastMonth = DateUtil.offsetMonth(DateTime.now(), -1);
+	    if (noChangeMonths != null) {
+		    DateTime pastMonth = DateUtil.offsetMonth(DateTime.now(), -noChangeMonths);
 		    List<Long> accountIds = accountUpdatePasswordRecordMapper.selectPasswordNotChangedThePastMonthAccountId(pastMonth);
 		    mapBuilder.field(AccountView::getId, accountIds).op(Operator.InList);
 	    }