| | |
| | | * @author mitao |
| | | * @since 2026-02-03 |
| | | */ |
| | | @RequestMapping("/api/v1/whitelist") |
| | | @RequestMapping("") |
| | | @RestController |
| | | @Api(tags = "白名单管理") |
| | | @Slf4j |
| | |
| | | * 获取所有白名单手机号 |
| | | * @return |
| | | */ |
| | | @PostMapping("/inner/getAllWhiteList") |
| | | @PostMapping("/api/v1/whitelist/inner/getAllWhiteList") |
| | | public R<List<String>> getAllWhiteList(){ |
| | | return R.ok(xpWhitelistService.getAllWhiteList()); |
| | | } |
| | | |
| | | @ApiOperation(value = "白名单管理分页列表", response = XpWhitelist.class) |
| | | @PostMapping("/pageList") |
| | | @PostMapping("/api/v1/whitelist/pageList") |
| | | public R<PageInfo<XpWhitelist>> pageList(@RequestBody WhitelistPageListQuery query) { |
| | | PageInfo<XpWhitelist> pageList = xpWhitelistService.pageList(query); |
| | | return R.ok(pageList); |
| | |
| | | /** |
| | | * 新增白名单 |
| | | */ |
| | | @PostMapping("/add") |
| | | @PostMapping("/api/v1/whitelist/add") |
| | | @ResponseBody |
| | | @ApiOperation(value = "新增白名单") |
| | | @Transactional |
| | |
| | | /** |
| | | * 编辑白名单 |
| | | */ |
| | | @PostMapping("/edit") |
| | | @PostMapping("/api/v1/whitelist/edit") |
| | | @ResponseBody |
| | | @ApiOperation(value = "编辑白名单") |
| | | @Transactional |
| | |
| | | /** |
| | | * 冻结解冻 |
| | | */ |
| | | @GetMapping("/freezeUnfreeze") |
| | | @GetMapping("/api/v1/whitelist/freezeUnfreeze") |
| | | @ResponseBody |
| | | @ApiOperation(value = "冻结解冻") |
| | | @Transactional |
| | |
| | | /** |
| | | * 批量删除 |
| | | */ |
| | | @GetMapping("/deleteByIds") |
| | | @GetMapping("/api/v1/whitelist/deleteByIds") |
| | | @ResponseBody |
| | | @ApiOperation(value = "批量删除") |
| | | public R deleteByIds(String ids) { |
| | |
| | | /** |
| | | * 批量冻结 |
| | | */ |
| | | @GetMapping("/freezeByIds") |
| | | @GetMapping("/api/v1/whitelist/freezeByIds") |
| | | @ResponseBody |
| | | @ApiOperation(value = "批量冻结") |
| | | public R freezeByIds(String ids) { |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "白名单导入模板下载") |
| | | @GetMapping("/import-template") |
| | | @GetMapping("/api/v1/whitelist/import-template") |
| | | public void importTemplate() { |
| | | List<WhitelistImportExcel> whitelistImportExcels = new ArrayList<>(); |
| | | WhitelistImportExcel whitelistImportExcel = new WhitelistImportExcel(); |
| | |
| | | @Log(title = "白名单导入", businessType = BusinessType.IMPORT) |
| | | @ApiOperation(value = "白名单导入") |
| | | @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRES_NEW) |
| | | @PostMapping("/importExcel") |
| | | @PostMapping("/base/v1/whitelist/importExcel") |
| | | public AjaxResult<String> importExcel(@RequestPart("file") MultipartFile file) { |
| | | |
| | | ImportParams params = new ImportParams(); |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "白名单导出") |
| | | @PostMapping(value = "/exportExcel") |
| | | @PostMapping(value = "/api/v1/whitelist/exportExcel") |
| | | public void exportExcel(@RequestBody WhitelistPageListQuery query) { |
| | | List<XpWhitelist> exportList = xpWhitelistService.exportList(query); |
| | | List<XpWhitelistExportExcel> xpWhitelistExportExcels = new ArrayList<>(); |