|
@@ -3,11 +3,13 @@ package com.xjrsoft.module.base.controller;
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
import com.alibaba.excel.EasyExcel;
|
|
import com.alibaba.excel.EasyExcel;
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.xjrsoft.common.model.result.RT;
|
|
import com.xjrsoft.common.model.result.RT;
|
|
import com.xjrsoft.common.page.ConventPage;
|
|
import com.xjrsoft.common.page.ConventPage;
|
|
import com.xjrsoft.common.page.PageOutput;
|
|
import com.xjrsoft.common.page.PageOutput;
|
|
import com.xjrsoft.module.base.dto.AddWhitelistManagementDto;
|
|
import com.xjrsoft.module.base.dto.AddWhitelistManagementDto;
|
|
|
|
+import com.xjrsoft.module.base.dto.SetWhitelistEndTimeDto;
|
|
import com.xjrsoft.module.base.dto.UpdateWhitelistManagementDto;
|
|
import com.xjrsoft.module.base.dto.UpdateWhitelistManagementDto;
|
|
import com.xjrsoft.module.base.dto.WhitelistManagementPageDto;
|
|
import com.xjrsoft.module.base.dto.WhitelistManagementPageDto;
|
|
import com.xjrsoft.module.base.entity.TreeNode;
|
|
import com.xjrsoft.module.base.entity.TreeNode;
|
|
@@ -87,6 +89,19 @@ public class WhitelistManagementController {
|
|
return RT.ok(isSuccess);
|
|
return RT.ok(isSuccess);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @PostMapping("/set-endtime-batch")
|
|
|
|
+ @ApiOperation(value = "批量设置结束时间")
|
|
|
|
+ @SaCheckPermission("whitelistmanagement:add")
|
|
|
|
+ public RT<Boolean> setEndtimeBatch(@Valid @RequestBody SetWhitelistEndTimeDto dto){
|
|
|
|
+ List<WhitelistManagement> list = whitelistManagementService.listByIds(dto.getIds());
|
|
|
|
+ for (WhitelistManagement whitelistManagement : list) {
|
|
|
|
+ whitelistManagement.setIsTemporary(1);
|
|
|
|
+ whitelistManagement.setEndTime(dto.getEndTime());
|
|
|
|
+ }
|
|
|
|
+ boolean updated = whitelistManagementService.updateBatchById(list);
|
|
|
|
+ return RT.ok(updated);
|
|
|
|
+ }
|
|
|
|
+
|
|
@PutMapping
|
|
@PutMapping
|
|
@ApiOperation(value = "修改白名单管理")
|
|
@ApiOperation(value = "修改白名单管理")
|
|
@SaCheckPermission("whitelistmanagement:edit")
|
|
@SaCheckPermission("whitelistmanagement:edit")
|