Merge remote-tracking branch 'origin/fix-bug-202303' into fix-bug-202303
This commit is contained in:
+94
-92
@@ -17,6 +17,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 消息
|
* @Description: 消息
|
||||||
@@ -28,109 +29,110 @@ import java.util.Arrays;
|
|||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/sys/message/sysMessage")
|
@RequestMapping("/sys/message/sysMessage")
|
||||||
public class SysMessageController extends JeroController<SysMessage, ISysMessageService> {
|
public class SysMessageController extends JeroController<SysMessage, ISysMessageService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysMessageService sysMessageService;
|
private ISysMessageService sysMessageService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
* @param sysMessage
|
* @param sysMessage
|
||||||
* @param pageNo
|
* @param pageNo
|
||||||
* @param pageSize
|
* @param pageSize
|
||||||
* @param req
|
* @param req
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/page")
|
@GetMapping(value = "/page")
|
||||||
public Result<IPage<SysMessage>> queryPageList(SysMessage sysMessage, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
public Result<IPage<SysMessage>> queryPageList(SysMessage sysMessage, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
|
||||||
QueryWrapper<SysMessage> queryWrapper = QueryGenerator.initQueryWrapper(sysMessage, req.getParameterMap());
|
QueryWrapper<SysMessage> queryWrapper = QueryGenerator.initQueryWrapper(sysMessage, req.getParameterMap());
|
||||||
Page<SysMessage> page = new Page<>(pageNo, pageSize);
|
Page<SysMessage> page = new Page<>(pageNo, pageSize);
|
||||||
IPage<SysMessage> pageList = sysMessageService.page(page, queryWrapper);
|
IPage<SysMessage> pageList = sysMessageService.page(page, queryWrapper);
|
||||||
return Result.OK(pageList);
|
return Result.OK(pageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加
|
* 添加
|
||||||
*
|
*
|
||||||
* @param sysMessage
|
* @param sysMessage
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<T> add(@RequestBody SysMessage sysMessage) {
|
public Result<T> add(@RequestBody SysMessage sysMessage) {
|
||||||
sysMessageService.save(sysMessage);
|
sysMessageService.save(sysMessage);
|
||||||
return Result.OK("操作成功!");
|
return Result.OK("操作成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑
|
* 编辑
|
||||||
*
|
*
|
||||||
* @param sysMessage
|
* @param sysMessage
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/edit")
|
@PostMapping(value = "/edit")
|
||||||
public Result<T> edit(@RequestBody SysMessage sysMessage) {
|
public Result<T> edit(@RequestBody SysMessage sysMessage) {
|
||||||
sysMessageService.updateById(sysMessage);
|
sysMessageService.updateById(sysMessage);
|
||||||
return Result.OK("操作成功!");
|
return Result.OK("操作成功!");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
*
|
*
|
||||||
* @param id
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
public Result<T> delete(@RequestParam(name = "id", required = true) String id) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
sysMessageService.removeById(id);
|
String id = map.get("id");
|
||||||
|
sysMessageService.removeById(id);
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
*
|
*
|
||||||
* @param ids
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/deleteBatch")
|
@PostMapping(value = "/deleteBatch")
|
||||||
public Result<T> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
|
String ids = map.get("ids");
|
||||||
|
this.sysMessageService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
this.sysMessageService.removeByIds(Arrays.asList(ids.split(",")));
|
/**
|
||||||
return Result.OK("批量删除成功!");
|
* 通过id查询
|
||||||
}
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<SysMessage> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||||
|
SysMessage sysMessage = sysMessageService.getById(id);
|
||||||
|
return Result.OK(sysMessage);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id查询
|
* 导出excel
|
||||||
*
|
*
|
||||||
* @param id
|
* @param request
|
||||||
* @return
|
*/
|
||||||
*/
|
@GetMapping(value = "/exportXls")
|
||||||
@GetMapping(value = "/queryById")
|
public ModelAndView exportXls(HttpServletRequest request, SysMessage sysMessage) {
|
||||||
public Result<SysMessage> queryById(@RequestParam(name = "id", required = true) String id) {
|
return super.exportXls(request, sysMessage, SysMessage.class, "推送消息模板");
|
||||||
SysMessage sysMessage = sysMessageService.getById(id);
|
}
|
||||||
return Result.OK(sysMessage);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出excel
|
* excel导入
|
||||||
*
|
*
|
||||||
* @param request
|
* @param request
|
||||||
*/
|
* @param response
|
||||||
@GetMapping(value = "/exportXls")
|
* @return
|
||||||
public ModelAndView exportXls(HttpServletRequest request, SysMessage sysMessage) {
|
*/
|
||||||
return super.exportXls(request,sysMessage,SysMessage.class, "推送消息模板");
|
@PostMapping(value = "/importExcel")
|
||||||
}
|
public Result<SysMessage> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, SysMessage.class);
|
||||||
/**
|
}
|
||||||
* excel导入
|
|
||||||
*
|
|
||||||
* @param request
|
|
||||||
* @param response
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@PostMapping(value = "/importExcel")
|
|
||||||
public Result<SysMessage> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
|
||||||
return super.importExcel(request, response, SysMessage.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-4
@@ -82,11 +82,12 @@ public class SysMessageTemplateController extends JeroController<SysMessageTempl
|
|||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
*
|
*
|
||||||
* @param id
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
public Result<T> delete(@RequestParam(name = "id", required = true) String id) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
|
String id = map.get("id");
|
||||||
sysMessageTemplateService.removeById(id);
|
sysMessageTemplateService.removeById(id);
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
}
|
}
|
||||||
@@ -94,11 +95,12 @@ public class SysMessageTemplateController extends JeroController<SysMessageTempl
|
|||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
*
|
*
|
||||||
* @param ids
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/deleteBatch")
|
@PostMapping(value = "/deleteBatch")
|
||||||
public Result<T> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
|
String ids = map.get("ids");
|
||||||
this.sysMessageTemplateService.removeByIds(Arrays.asList(ids.split(",")));
|
this.sysMessageTemplateService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
return Result.OK("批量删除成功!");
|
return Result.OK("批量删除成功!");
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Controller
|
@Controller
|
||||||
@@ -54,7 +55,8 @@ public class OSSFileController {
|
|||||||
|
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
public Result<T> delete(@RequestParam(name = "id") String id) {
|
public Result<T> delete(@RequestBody Map<String,String> map) {
|
||||||
|
String id = map.get("id");
|
||||||
OSSFile file = ossFileService.getById(id);
|
OSSFile file = ossFileService.getById(id);
|
||||||
if (file == null) {
|
if (file == null) {
|
||||||
return Result.error("未找到对应实体");
|
return Result.error("未找到对应实体");
|
||||||
|
|||||||
+4
-2
@@ -111,7 +111,8 @@ public class QuartzJobController {
|
|||||||
*/
|
*/
|
||||||
//@RequiresRoles("admin")
|
//@RequiresRoles("admin")
|
||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
public Result<T> delete(@RequestParam(name = "id", required = true) String id) {
|
public Result<T> delete(@RequestBody Map<String,String> map) {
|
||||||
|
String id = map.get("id");
|
||||||
QuartzJob quartzJob = quartzJobService.getById(id);
|
QuartzJob quartzJob = quartzJobService.getById(id);
|
||||||
if (quartzJob == null) {
|
if (quartzJob == null) {
|
||||||
return Result.error("未找到对应实体");
|
return Result.error("未找到对应实体");
|
||||||
@@ -130,7 +131,8 @@ public class QuartzJobController {
|
|||||||
//@RequiresRoles("admin")
|
//@RequiresRoles("admin")
|
||||||
// @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
|
// @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
|
||||||
@PostMapping("/deleteBatch")
|
@PostMapping("/deleteBatch")
|
||||||
public Result<T> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
public Result<T> deleteBatch(@RequestBody Map<String,String> map) {
|
||||||
|
String ids = map.get("ids");
|
||||||
if (ids == null || "".equals(ids.trim())) {
|
if (ids == null || "".equals(ids.trim())) {
|
||||||
return Result.error("参数不识别!");
|
return Result.error("参数不识别!");
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-4
@@ -159,12 +159,13 @@ public class SysAnnouncementController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
* @param id
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
// @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
|
// @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
|
||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
public Result<Object> delete(@RequestParam(name="id",required=true) String id) {
|
public Result<Object> delete(@RequestBody Map<String, String> map) {
|
||||||
|
String id = map.get("id");
|
||||||
SysAnnouncement sysAnnouncement = sysAnnouncementService.getById(id);
|
SysAnnouncement sysAnnouncement = sysAnnouncementService.getById(id);
|
||||||
if(sysAnnouncement==null) {
|
if(sysAnnouncement==null) {
|
||||||
return Result.error(ERROR_TEXT);
|
return Result.error(ERROR_TEXT);
|
||||||
@@ -181,12 +182,13 @@ public class SysAnnouncementController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
* @param ids
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
// @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
|
// @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
|
||||||
@PostMapping("/deleteBatch")
|
@PostMapping("/deleteBatch")
|
||||||
public Result<Object> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
|
String ids = map.get("ids");
|
||||||
if(ids==null || "".equals(ids.trim())) {
|
if(ids==null || "".equals(ids.trim())) {
|
||||||
return Result.error("参数不识别!");
|
return Result.error("参数不识别!");
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
+9
-5
@@ -13,6 +13,7 @@ import com.jero.modules.system.entity.SysAnnouncementSend;
|
|||||||
import com.jero.modules.system.model.AnnouncementSendModel;
|
import com.jero.modules.system.model.AnnouncementSendModel;
|
||||||
import com.jero.modules.system.service.ISysAnnouncementSendService;
|
import com.jero.modules.system.service.ISysAnnouncementSendService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -20,8 +21,9 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Title: Controller
|
* @Title: Controller
|
||||||
* @Description: 用户通告阅读标记表
|
* @Description: 用户通告阅读标记表
|
||||||
* @Author: jero-boot
|
* @Author: jero-boot
|
||||||
@@ -106,11 +108,12 @@ public class SysAnnouncementSendController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
* @param id
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
public Result<Object> delete(@RequestParam(name="id",required=true) String id) {
|
public Result<Object> delete(@RequestBody Map<String, String> map) {
|
||||||
|
String id = map.get("id");
|
||||||
SysAnnouncementSend sysAnnouncementSend = sysAnnouncementSendService.getById(id);
|
SysAnnouncementSend sysAnnouncementSend = sysAnnouncementSendService.getById(id);
|
||||||
if(sysAnnouncementSend==null) {
|
if(sysAnnouncementSend==null) {
|
||||||
return Result.error(ERROE_MSG);
|
return Result.error(ERROE_MSG);
|
||||||
@@ -126,11 +129,12 @@ public class SysAnnouncementSendController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
* @param ids
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/deleteBatch")
|
@PostMapping(value = "/deleteBatch")
|
||||||
public Result<Object> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
public Result<Object> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
|
String ids = map.get("ids");
|
||||||
if(ids == null || "".equals(ids.trim())) {
|
if(ids == null || "".equals(ids.trim())) {
|
||||||
return Result.error("参数不识别!");
|
return Result.error("参数不识别!");
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
+6
-4
@@ -127,12 +127,13 @@ public class SysCategoryController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
* @param id
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("sys:category:del")
|
@RequiresPermissions("sys:category:del")
|
||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
public Result<Object> delete(@RequestParam(name="id",required=true) String id) {
|
public Result<Object> delete(@RequestBody Map<String, String> map) {
|
||||||
|
String id = map.get("id");
|
||||||
SysCategory sysCategory = sysCategoryService.getById(id);
|
SysCategory sysCategory = sysCategoryService.getById(id);
|
||||||
if(sysCategory==null) {
|
if(sysCategory==null) {
|
||||||
return Result.error(ERROE_MSG);
|
return Result.error(ERROE_MSG);
|
||||||
@@ -144,12 +145,13 @@ public class SysCategoryController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
* @param ids
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("sys:category:del")
|
@RequiresPermissions("sys:category:del")
|
||||||
@PostMapping(value = "/deleteBatch")
|
@PostMapping(value = "/deleteBatch")
|
||||||
public Result<Object> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
|
String ids = map.get("ids");
|
||||||
if(ids==null || "".equals(ids.trim())) {
|
if(ids==null || "".equals(ids.trim())) {
|
||||||
return Result.error("参数不识别!");
|
return Result.error("参数不识别!");
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
+6
-3
@@ -23,6 +23,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 编码校验规则
|
* @Description: 编码校验规则
|
||||||
@@ -128,7 +129,8 @@ public class SysCheckRuleController extends JeroController<SysCheckRule, ISysChe
|
|||||||
@AutoLog(value = "编码校验规则-通过id删除")
|
@AutoLog(value = "编码校验规则-通过id删除")
|
||||||
@ApiOperation(value = "编码校验规则-通过id删除", notes = "编码校验规则-通过id删除")
|
@ApiOperation(value = "编码校验规则-通过id删除", notes = "编码校验规则-通过id删除")
|
||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
public Result<T> delete(@RequestParam(name = "id", required = true) String id) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
|
String id = map.get("id");
|
||||||
sysCheckRuleService.removeById(id);
|
sysCheckRuleService.removeById(id);
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
}
|
}
|
||||||
@@ -136,13 +138,14 @@ public class SysCheckRuleController extends JeroController<SysCheckRule, ISysChe
|
|||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
*
|
*
|
||||||
* @param ids
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "编码校验规则-批量删除")
|
@AutoLog(value = "编码校验规则-批量删除")
|
||||||
@ApiOperation(value = "编码校验规则-批量删除", notes = "编码校验规则-批量删除")
|
@ApiOperation(value = "编码校验规则-批量删除", notes = "编码校验规则-批量删除")
|
||||||
@PostMapping(value = "/deleteBatch")
|
@PostMapping(value = "/deleteBatch")
|
||||||
public Result<T> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
|
String ids = map.get("ids");
|
||||||
this.sysCheckRuleService.removeByIds(Arrays.asList(ids.split(",")));
|
this.sysCheckRuleService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
return Result.OK("批量删除成功!");
|
return Result.OK("批量删除成功!");
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-4
@@ -26,6 +26,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 多数据源管理
|
* @Description: 多数据源管理
|
||||||
@@ -145,13 +146,14 @@ public class SysDataSourceController extends JeroController<SysDataSource, ISysD
|
|||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
*
|
*
|
||||||
* @param id
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "多数据源管理-通过id删除")
|
@AutoLog(value = "多数据源管理-通过id删除")
|
||||||
@ApiOperation(value = "多数据源管理-通过id删除", notes = "多数据源管理-通过id删除")
|
@ApiOperation(value = "多数据源管理-通过id删除", notes = "多数据源管理-通过id删除")
|
||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
public Result<T> delete(@RequestParam(name = "id") String id) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
|
String id = map.get("id");
|
||||||
SysDataSource sysDataSource = sysDataSourceService.getById(id);
|
SysDataSource sysDataSource = sysDataSourceService.getById(id);
|
||||||
DataSourceCachePool.removeCache(sysDataSource.getCode());
|
DataSourceCachePool.removeCache(sysDataSource.getCode());
|
||||||
sysDataSourceService.removeById(id);
|
sysDataSourceService.removeById(id);
|
||||||
@@ -161,13 +163,14 @@ public class SysDataSourceController extends JeroController<SysDataSource, ISysD
|
|||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
*
|
*
|
||||||
* @param ids
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "多数据源管理-批量删除")
|
@AutoLog(value = "多数据源管理-批量删除")
|
||||||
@ApiOperation(value = "多数据源管理-批量删除", notes = "多数据源管理-批量删除")
|
@ApiOperation(value = "多数据源管理-批量删除", notes = "多数据源管理-批量删除")
|
||||||
@PostMapping(value = "/deleteBatch")
|
@PostMapping(value = "/deleteBatch")
|
||||||
public Result<T> deleteBatch(@RequestParam(name = "ids") String ids) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
|
String ids = map.get("ids");
|
||||||
List<String> idList = Arrays.asList(ids.split(","));
|
List<String> idList = Arrays.asList(ids.split(","));
|
||||||
idList.forEach(item->{
|
idList.forEach(item->{
|
||||||
SysDataSource sysDataSource = sysDataSourceService.getById(item);
|
SysDataSource sysDataSource = sysDataSourceService.getById(item);
|
||||||
|
|||||||
+6
-3
@@ -215,7 +215,7 @@ public class SysDepartController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
* @param id
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@RequiresRoles({"admin"})
|
//@RequiresRoles({"admin"})
|
||||||
@@ -223,7 +223,8 @@ public class SysDepartController {
|
|||||||
// @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
|
// @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
|
||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
@CacheEvict(value= {CacheConstant.SYS_DEPARTS_CACHE,CacheConstant.SYS_DEPART_IDS_CACHE}, allEntries=true)
|
@CacheEvict(value= {CacheConstant.SYS_DEPARTS_CACHE,CacheConstant.SYS_DEPART_IDS_CACHE}, allEntries=true)
|
||||||
public Result<Object> delete(@RequestParam(name="id",required=true) String id) {
|
public Result<Object> delete(@RequestBody Map<String,String> map) {
|
||||||
|
String id = map.get("id");
|
||||||
SysDepart sysDepart = sysDepartService.getById(id);
|
SysDepart sysDepart = sysDepartService.getById(id);
|
||||||
if(sysDepart==null) {
|
if(sysDepart==null) {
|
||||||
return Result.error("未找到对应实体");
|
return Result.error("未找到对应实体");
|
||||||
@@ -248,7 +249,9 @@ public class SysDepartController {
|
|||||||
// @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
|
// @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
|
||||||
@PostMapping("/deleteBatch")
|
@PostMapping("/deleteBatch")
|
||||||
@CacheEvict(value= {CacheConstant.SYS_DEPARTS_CACHE,CacheConstant.SYS_DEPART_IDS_CACHE}, allEntries=true)
|
@CacheEvict(value= {CacheConstant.SYS_DEPARTS_CACHE,CacheConstant.SYS_DEPART_IDS_CACHE}, allEntries=true)
|
||||||
public Result<Object> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
// public Result<Object> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||||
|
public Result<Object> deleteBatch(@RequestBody Map<String,String> map) {
|
||||||
|
String ids = map.get("ids");
|
||||||
if (ids == null || "".equals(ids.trim())) {
|
if (ids == null || "".equals(ids.trim())) {
|
||||||
return Result.error("参数不识别!");
|
return Result.error("参数不识别!");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+6
-4
@@ -101,12 +101,13 @@ public class SysDepartPermissionController extends JeroController<SysDepartPermi
|
|||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
*
|
*
|
||||||
* @param id
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value="部门权限表-通过id删除", notes="部门权限表-通过id删除")
|
@ApiOperation(value="部门权限表-通过id删除", notes="部门权限表-通过id删除")
|
||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
public Result<T> delete(@RequestParam(name="id",required=true) String id) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
|
String id = map.get("id");
|
||||||
sysDepartPermissionService.removeById(id);
|
sysDepartPermissionService.removeById(id);
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
}
|
}
|
||||||
@@ -114,12 +115,13 @@ public class SysDepartPermissionController extends JeroController<SysDepartPermi
|
|||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
*
|
*
|
||||||
* @param ids
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value="部门权限表-批量删除", notes="部门权限表-批量删除")
|
@ApiOperation(value="部门权限表-批量删除", notes="部门权限表-批量删除")
|
||||||
@PostMapping(value = "/deleteBatch")
|
@PostMapping(value = "/deleteBatch")
|
||||||
public Result<T> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
|
String ids = map.get("ids");
|
||||||
this.sysDepartPermissionService.removeByIds(Arrays.asList(ids.split(",")));
|
this.sysDepartPermissionService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
return Result.OK("批量删除成功!");
|
return Result.OK("批量删除成功!");
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-2
@@ -385,13 +385,15 @@ public class SysDictController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @功能:删除
|
* @功能:删除
|
||||||
* @param id
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "字典控制器-删除字典", notes = "字典控制器-删除字典")
|
@ApiOperation(value = "字典控制器-删除字典", notes = "字典控制器-删除字典")
|
||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
@CacheEvict(value={CacheConstant.SYS_DICT_CACHE, CacheConstant.SYS_ENABLE_DICT_CACHE}, allEntries=true)
|
@CacheEvict(value={CacheConstant.SYS_DICT_CACHE, CacheConstant.SYS_ENABLE_DICT_CACHE}, allEntries=true)
|
||||||
public Result<Object> delete(@RequestParam(name="id",required=true) String id) {
|
// public Result<Object> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
public Result<Object> delete(@RequestBody Map<String,String> map) {
|
||||||
|
String id = map.get("id");
|
||||||
boolean ok = sysDictService.removeById(id);
|
boolean ok = sysDictService.removeById(id);
|
||||||
if(ok) {
|
if(ok) {
|
||||||
return Result.OK(DEL_SUCCESS);
|
return Result.OK(DEL_SUCCESS);
|
||||||
|
|||||||
+8
-4
@@ -3,12 +3,14 @@ package com.jero.modules.system.controller;
|
|||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.apache.shiro.authz.annotation.RequiresRoles;
|
import org.apache.shiro.authz.annotation.RequiresRoles;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
@@ -112,7 +114,7 @@ public class SysDictItemController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @功能:删除字典数据
|
* @功能:删除字典数据
|
||||||
* @param id
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@RequiresRoles({"admin"})
|
//@RequiresRoles({"admin"})
|
||||||
@@ -120,7 +122,8 @@ public class SysDictItemController {
|
|||||||
// @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
|
// @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
|
||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
@CacheEvict(value={CacheConstant.SYS_DICT_CACHE, CacheConstant.SYS_ENABLE_DICT_CACHE}, allEntries=true)
|
@CacheEvict(value={CacheConstant.SYS_DICT_CACHE, CacheConstant.SYS_ENABLE_DICT_CACHE}, allEntries=true)
|
||||||
public Result<Object> delete(@RequestParam(name="id",required=true) String id) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
|
String id = map.get("id");
|
||||||
SysDictItem joinSystem = sysDictItemService.getById(id);
|
SysDictItem joinSystem = sysDictItemService.getById(id);
|
||||||
if(joinSystem==null) {
|
if(joinSystem==null) {
|
||||||
return Result.error("未找到对应实体");
|
return Result.error("未找到对应实体");
|
||||||
@@ -135,7 +138,7 @@ public class SysDictItemController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @功能:批量删除字典数据
|
* @功能:批量删除字典数据
|
||||||
* @param ids
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@RequiresRoles({"admin"})
|
//@RequiresRoles({"admin"})
|
||||||
@@ -143,7 +146,8 @@ public class SysDictItemController {
|
|||||||
// @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
|
// @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
|
||||||
@PostMapping("/deleteBatch")
|
@PostMapping("/deleteBatch")
|
||||||
@CacheEvict(value={CacheConstant.SYS_DICT_CACHE, CacheConstant.SYS_ENABLE_DICT_CACHE}, allEntries=true)
|
@CacheEvict(value={CacheConstant.SYS_DICT_CACHE, CacheConstant.SYS_ENABLE_DICT_CACHE}, allEntries=true)
|
||||||
public Result<Object> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
public Result<Object> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
|
String ids = map.get("ids");
|
||||||
if(ids==null || "".equals(ids.trim())) {
|
if(ids==null || "".equals(ids.trim())) {
|
||||||
return Result.error("参数不识别!");
|
return Result.error("参数不识别!");
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
+7
-4
@@ -23,6 +23,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 填值规则
|
* @Description: 填值规则
|
||||||
@@ -103,13 +104,14 @@ public class SysFillRuleController extends JeroController<SysFillRule, ISysFillR
|
|||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
*
|
*
|
||||||
* @param id
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "填值规则-通过id删除")
|
@AutoLog(value = "填值规则-通过id删除")
|
||||||
@ApiOperation(value = "填值规则-通过id删除", notes = "填值规则-通过id删除")
|
@ApiOperation(value = "填值规则-通过id删除", notes = "填值规则-通过id删除")
|
||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
public Result<T> delete(@RequestParam(name = "id", required = true) String id) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
|
String id = map.get("id");
|
||||||
sysFillRuleService.removeById(id);
|
sysFillRuleService.removeById(id);
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
}
|
}
|
||||||
@@ -117,13 +119,14 @@ public class SysFillRuleController extends JeroController<SysFillRule, ISysFillR
|
|||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
*
|
*
|
||||||
* @param ids
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "填值规则-批量删除")
|
@AutoLog(value = "填值规则-批量删除")
|
||||||
@ApiOperation(value = "填值规则-批量删除", notes = "填值规则-批量删除")
|
@ApiOperation(value = "填值规则-批量删除", notes = "填值规则-批量删除")
|
||||||
@PostMapping(value = "/deleteBatch")
|
@PostMapping(value = "/deleteBatch")
|
||||||
public Result<T> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
|
String ids = map.get("ids");
|
||||||
this.sysFillRuleService.removeByIds(Arrays.asList(ids.split(",")));
|
this.sysFillRuleService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
return Result.OK("批量删除成功!");
|
return Result.OK("批量删除成功!");
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-2
@@ -16,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: gateway路由管理
|
* @Description: gateway路由管理
|
||||||
@@ -65,13 +66,14 @@ public class SysGatewayRouteController extends JeroController<SysGatewayRoute, I
|
|||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
*
|
*
|
||||||
* @param id
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@RequiresRoles({"admin"})
|
//@RequiresRoles({"admin"})
|
||||||
// @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
|
// @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
|
||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
public Result<T> delete(@RequestParam(name = "id", required = true) String id) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
|
String id = map.get("id");
|
||||||
sysGatewayRouteService.deleteById(id);
|
sysGatewayRouteService.deleteById(id);
|
||||||
return Result.OK("删除路由成功");
|
return Result.OK("删除路由成功");
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-4
@@ -10,11 +10,13 @@ import com.jero.common.util.oConvertUtils;
|
|||||||
import com.jero.modules.system.entity.SysLog;
|
import com.jero.modules.system.entity.SysLog;
|
||||||
import com.jero.modules.system.service.ISysLogService;
|
import com.jero.modules.system.service.ISysLogService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -65,12 +67,13 @@ public class SysLogController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @功能:删除单个日志记录
|
* @功能:删除单个日志记录
|
||||||
* @param id
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
// @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
|
// @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
|
||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
public Result<Object> delete(@RequestParam(name="id",required=true) String id) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
|
String id = map.get("id");
|
||||||
SysLog sysLog = sysLogService.getById(id);
|
SysLog sysLog = sysLogService.getById(id);
|
||||||
if(sysLog==null) {
|
if(sysLog==null) {
|
||||||
return Result.error("未找到对应实体");
|
return Result.error("未找到对应实体");
|
||||||
@@ -85,12 +88,13 @@ public class SysLogController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @功能:批量,全部清空日志记录
|
* @功能:批量,全部清空日志记录
|
||||||
* @param ids
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
// @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
|
// @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
|
||||||
@PostMapping("/deleteBatch")
|
@PostMapping("/deleteBatch")
|
||||||
public Result<Object> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
|
String ids = map.get("ids");
|
||||||
if(ids==null || "".equals(ids.trim())) {
|
if(ids==null || "".equals(ids.trim())) {
|
||||||
return Result.error("参数不识别!");
|
return Result.error("参数不识别!");
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
+7
-4
@@ -21,6 +21,7 @@ import com.jero.modules.system.service.ISysPermissionService;
|
|||||||
import com.jero.modules.system.service.ISysRolePermissionService;
|
import com.jero.modules.system.service.ISysRolePermissionService;
|
||||||
import com.jero.modules.system.util.PermissionDataUtil;
|
import com.jero.modules.system.util.PermissionDataUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -264,13 +265,14 @@ public class SysPermissionController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除菜单
|
* 删除菜单
|
||||||
* @param id
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@RequiresRoles({ "admin" })
|
//@RequiresRoles({ "admin" })
|
||||||
// @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
|
// @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
|
||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
public Result<Object> delete(@RequestParam(name = "id", required = true) String id) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
|
String id = map.get("id");
|
||||||
try {
|
try {
|
||||||
sysPermissionService.deletePermission(id);
|
sysPermissionService.deletePermission(id);
|
||||||
return Result.OK(DEL_SUCCESS);
|
return Result.OK(DEL_SUCCESS);
|
||||||
@@ -282,13 +284,14 @@ public class SysPermissionController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除菜单
|
* 批量删除菜单
|
||||||
* @param ids
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@RequiresRoles({ "admin" })
|
//@RequiresRoles({ "admin" })
|
||||||
// @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
|
// @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
|
||||||
@PostMapping("/deleteBatch")
|
@PostMapping("/deleteBatch")
|
||||||
public Result<Object> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
|
String ids = map.get("ids");
|
||||||
try {
|
try {
|
||||||
String[] arr = ids.split(",");
|
String[] arr = ids.split(",");
|
||||||
for (String id : arr) {
|
for (String id : arr) {
|
||||||
|
|||||||
+6
-4
@@ -149,28 +149,30 @@ public class SysRoleController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
* @param id
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@RequiresRoles({"admin"})
|
//@RequiresRoles({"admin"})
|
||||||
@RequiresPermissions("sys:role:del")
|
@RequiresPermissions("sys:role:del")
|
||||||
// @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
|
// @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
|
||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
public Result<T> delete(@RequestParam(name="id",required=true) String id) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
|
String id = map.get("id");
|
||||||
sysRoleService.deleteRole(id);
|
sysRoleService.deleteRole(id);
|
||||||
return Result.OK("删除角色成功");
|
return Result.OK("删除角色成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
* @param ids
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@RequiresRoles({"admin"})
|
//@RequiresRoles({"admin"})
|
||||||
@RequiresPermissions("sys:role:del")
|
@RequiresPermissions("sys:role:del")
|
||||||
// @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
|
// @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
|
||||||
@PostMapping("/deleteBatch")
|
@PostMapping("/deleteBatch")
|
||||||
public Result<Object> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
|
String ids = map.get("ids");
|
||||||
if(oConvertUtils.isEmpty(ids)) {
|
if(oConvertUtils.isEmpty(ids)) {
|
||||||
return Result.error("未选中角色!");
|
return Result.error("未选中角色!");
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
+6
-3
@@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 租户配置信息
|
* 租户配置信息
|
||||||
@@ -101,19 +102,21 @@ public class SysTenantController {
|
|||||||
*/
|
*/
|
||||||
// @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
|
// @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
|
||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
public Result<T> delete(@RequestParam(name="id",required=true) String id) {
|
public Result<T> delete(@RequestBody Map<String,String> map) {
|
||||||
|
String id = map.get("id");
|
||||||
sysTenantService.removeTenantById(id);
|
sysTenantService.removeTenantById(id);
|
||||||
return Result.OK("删除成功");
|
return Result.OK("删除成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
* @param ids
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
// @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
|
// @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
|
||||||
@PostMapping("/deleteBatch")
|
@PostMapping("/deleteBatch")
|
||||||
public Result<T> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
|
String ids = map.get("ids");
|
||||||
if(oConvertUtils.isEmpty(ids)) {
|
if(oConvertUtils.isEmpty(ids)) {
|
||||||
return Result.error("未选中租户!");
|
return Result.error("未选中租户!");
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
+3
-2
@@ -129,11 +129,12 @@ public class SysUserAgentController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
* @param ids
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/deleteBatch")
|
@PostMapping(value = "/deleteBatch")
|
||||||
public Result<Object> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
|
String ids = map.get("ids");
|
||||||
if(ids==null || "".equals(ids.trim())) {
|
if(ids==null || "".equals(ids.trim())) {
|
||||||
return Result.error("参数不识别!");
|
return Result.error("参数不识别!");
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
+4
-2
@@ -261,7 +261,8 @@ public class SysUserController {
|
|||||||
|
|
||||||
// @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
|
// @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
|
||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
public Result<T> delete(@RequestParam(name="id",required=true) String id) {
|
public Result<T> delete(@RequestBody Map<String,String> map) {
|
||||||
|
String id = map.get("id");
|
||||||
baseCommonService.addLog("删除用户,id: " +id ,CommonConstant.LOG_TYPE_2, 3);
|
baseCommonService.addLog("删除用户,id: " +id ,CommonConstant.LOG_TYPE_2, 3);
|
||||||
this.sysUserService.deleteUser(id);
|
this.sysUserService.deleteUser(id);
|
||||||
return Result.OK("删除用户成功");
|
return Result.OK("删除用户成功");
|
||||||
@@ -269,7 +270,8 @@ public class SysUserController {
|
|||||||
|
|
||||||
// @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
|
// @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
|
||||||
@PostMapping("/deleteBatch")
|
@PostMapping("/deleteBatch")
|
||||||
public Result<T> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
|
String ids = map.get("ids");
|
||||||
baseCommonService.addLog("批量删除用户, ids: " +ids ,CommonConstant.LOG_TYPE_2, 3);
|
baseCommonService.addLog("批量删除用户, ids: " +ids ,CommonConstant.LOG_TYPE_2, 3);
|
||||||
this.sysUserService.deleteBatchUsers(ids);
|
this.sysUserService.deleteBatchUsers(ids);
|
||||||
return Result.OK("批量删除用户成功");
|
return Result.OK("批量删除用户成功");
|
||||||
|
|||||||
Reference in New Issue
Block a user