|
|
@@ -96,11 +96,13 @@ public class CmsAccountController {
|
|
|
|
|
|
private final AccountDoubleVerifyRecordMapper doubleVerifyRecordMapper;
|
|
|
|
|
|
+ private final AccountUpdatePasswordRecordMapper accountUpdatePasswordRecordMapper;
|
|
|
+
|
|
|
private final RedisService redisService;
|
|
|
|
|
|
@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) {
|
|
|
+ public Result<SearchResult<AccountView>> get(Long userId, String showId, String nickName, String submitAccount, String expiryStartTime, String expiryEndTime, Boolean expiredAll, Boolean existsExpired, Boolean existsExpiredToday, Boolean pwdNotChangedThePastPwd) {
|
|
|
MapBuilder mapBuilder = MapUtils.flatBuilder(request.getParameterMap());
|
|
|
if (StrUtil.isNotEmpty(expiryStartTime) || StrUtil.isNotEmpty(expiryEndTime)) {
|
|
|
mapBuilder.field(AccountView::getExpiryTime, expiryStartTime, expiryEndTime)
|
|
|
@@ -123,6 +125,12 @@ 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);
|
|
|
+ List<Long> accountIds = accountUpdatePasswordRecordMapper.selectPasswordNotChangedThePastMonthAccountId(pastMonth);
|
|
|
+ mapBuilder.field(AccountView::getId, accountIds).op(Operator.InList);
|
|
|
+ }
|
|
|
+
|
|
|
if (existsExpired != null && existsExpired) {
|
|
|
if (StrUtil.isNotEmpty(extra_sql)) {
|
|
|
extra_sql += " and";
|
|
|
@@ -178,7 +186,7 @@ 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, HttpServletResponse response) {
|
|
|
+ public void exportAccount(Long userId, String nickName, String submitAccount, String expiryStartTime, String expiryEndTime, Boolean expiredAll, Boolean existsExpired, Boolean existsExpiredToday, Boolean pwdNotChangedThePastPwd, HttpServletResponse response) {
|
|
|
MapBuilder mapBuilder = MapUtils.flatBuilder(request.getParameterMap());
|
|
|
if (StrUtil.isNotEmpty(expiryStartTime) || StrUtil.isNotEmpty(expiryEndTime)) {
|
|
|
mapBuilder.field(ExcelManageAccountData::getExpiryTime, expiryStartTime, expiryEndTime)
|
|
|
@@ -198,6 +206,12 @@ 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);
|
|
|
+ List<Long> accountIds = accountUpdatePasswordRecordMapper.selectPasswordNotChangedThePastMonthAccountId(pastMonth);
|
|
|
+ mapBuilder.field(AccountView::getId, accountIds).op(Operator.InList);
|
|
|
+ }
|
|
|
+
|
|
|
if (existsExpired != null && existsExpired) {
|
|
|
if (StrUtil.isNotEmpty(extra_sql)) {
|
|
|
extra_sql += " and";
|
|
|
@@ -511,10 +525,24 @@ public class CmsAccountController {
|
|
|
*/
|
|
|
@GetMapping("/get/expired/ticket")
|
|
|
public Result<SearchResult<UserTicketClearedRecordView>> getUserHadExpiredTicket() {
|
|
|
- SearchResult<UserTicketClearedRecordView> search = beanSearcher.search(UserTicketClearedRecordView.class, MapUtils.flatBuilder(request.getParameterMap()).build());
|
|
|
+ SearchResult<UserTicketClearedRecordView> search = beanSearcher.search(UserTicketClearedRecordView.class, MapUtils.flatBuilder(request.getParameterMap())
|
|
|
+ .field(UserTicketClearedRecordView::getSource, UserTicketClearedRecord.Source.self.name())
|
|
|
+ .build());
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 移除账号过期用户车票记录
|
|
|
+ */
|
|
|
+ @DeleteMapping("/clear/expired/ticket/{recordId}")
|
|
|
+ public Result<String> clearExpiredTicket(@PathVariable Long recordId) {
|
|
|
+ userTicketClearedRecordMapper.update(null, Wrappers.lambdaUpdate(UserTicketClearedRecord.class)
|
|
|
+ .set(UserTicketClearedRecord::getDeleted, false)
|
|
|
+ .eq(UserTicketClearedRecord::getId, recordId));
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 账号未过期车票列表
|
|
|
*/
|