全局修改物理删除为逻辑删除,同时修改查询语句过滤删除标识
This commit is contained in:
@@ -2,8 +2,11 @@ package com.jsh.erp.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jsh.erp.constants.ExceptionConstants;
|
||||
import com.jsh.erp.datasource.entities.Role;
|
||||
import com.jsh.erp.exception.BusinessRunTimeException;
|
||||
import com.jsh.erp.service.role.RoleService;
|
||||
import com.jsh.erp.service.user.UserService;
|
||||
import com.jsh.erp.service.userBusiness.UserBusinessService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -77,4 +80,26 @@ public class RoleController {
|
||||
return roleService.getRole();
|
||||
}
|
||||
|
||||
/**
|
||||
* create by: qiankunpingtai
|
||||
* website:http://39.105.146.63/symphony/
|
||||
* description:
|
||||
* 逻辑删除角色信息
|
||||
* create time: 2019/3/28 15:39
|
||||
* @Param: ids
|
||||
* @return java.lang.Object
|
||||
*/
|
||||
@RequestMapping(value = "/batchDeleteRoleByIds")
|
||||
public Object batchDeleteRoleByIds(@RequestParam("ids") String ids) throws Exception {
|
||||
JSONObject result = ExceptionConstants.standardSuccess();
|
||||
int i= roleService.batchDeleteRoleByIds(ids);
|
||||
if(i<1){
|
||||
logger.error("异常码[{}],异常提示[{}],参数,ids[{}]",
|
||||
ExceptionConstants.ROLE_DELETE_FAILED_CODE,ExceptionConstants.ROLE_DELETE_FAILED_MSG,ids);
|
||||
throw new BusinessRunTimeException(ExceptionConstants.ROLE_DELETE_FAILED_CODE,
|
||||
ExceptionConstants.ROLE_DELETE_FAILED_MSG);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user