| | |
| | | package com.xiaopeng.operation.controller; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.xiaopeng.api.model.account.SysUser; |
| | | import com.xiaopeng.api.model.operation.XpTargetedService; |
| | | import com.xiaopeng.api.model.operation.XpWhitelist; |
| | |
| | | /** |
| | | * 批量删除 |
| | | */ |
| | | @GetMapping("/api/v1/targetedService/deleteByIds") |
| | | @PostMapping("/api/v1/targetedService/deleteByIds") |
| | | @ApiOperation(value = "定向服务-批量删除", tags = {"管理后台-定向服务批量删除"}) |
| | | public R deleteByIds(String ids) { |
| | | public R deleteByIds(@RequestBody XpTargetedServiceQuery query ) { |
| | | if(CollUtil.isEmpty(query.getIds())){ |
| | | return R.fail("ID列表不能为空"); |
| | | } |
| | | SysUser sysUser = tokenService.getLoginUser().getSysUser(); |
| | | List<Long> whiteIds = Arrays.stream(ids.split(",")).map(Long::parseLong).collect(Collectors.toList()); |
| | | return xpTargetedServiceService.deleteByIds(whiteIds, sysUser); |
| | | return xpTargetedServiceService.deleteByIds(query.getIds(), sysUser); |
| | | } |
| | | |
| | | } |