!41 全局修改物理删除为逻辑删除,同时修改查询语句过滤删除标识

Merge pull request !41 from 乾坤平台/master
This commit is contained in:
乾坤平台
2019-04-01 21:05:18 +08:00
committed by 季圣华
85 changed files with 1632 additions and 224 deletions

View File

@@ -2,8 +2,10 @@ 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.Account;
import com.jsh.erp.datasource.vo.AccountVo4InOutList;
import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.service.account.AccountService;
import com.jsh.erp.utils.BaseResponseInfo;
import com.jsh.erp.utils.ErpInfo;
@@ -138,5 +140,27 @@ public class AccountController {
return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code);
}
}
/**
* create by: qiankunpingtai
* websitehttp://39.105.146.63/symphony/
* description:
* 批量删除账户信息
* create time: 2019/3/29 10:49
* @Param: ids
* @return java.lang.Object
*/
@RequestMapping(value = "/batchDeleteAccountByIds")
public Object batchDeleteAccountByIds(@RequestParam("ids") String ids) throws Exception {
JSONObject result = ExceptionConstants.standardSuccess();
int i= accountService.batchDeleteAccountByIds(ids);
if(i<1){
logger.error("异常码[{}],异常提示[{}],参数,ids[{}]",
ExceptionConstants.ACCOUNT_DELETE_FAILED_CODE,ExceptionConstants.ACCOUNT_DELETE_FAILED_MSG,ids);
throw new BusinessRunTimeException(ExceptionConstants.ACCOUNT_DELETE_FAILED_CODE,
ExceptionConstants.ACCOUNT_DELETE_FAILED_MSG);
}
return result;
}
}

View File

@@ -1,8 +1,10 @@
package com.jsh.erp.controller;
import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.constants.ExceptionConstants;
import com.jsh.erp.datasource.entities.AccountHead;
import com.jsh.erp.datasource.entities.AccountHeadVo4ListEx;
import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.service.accountHead.AccountHeadService;
import com.jsh.erp.utils.BaseResponseInfo;
import com.jsh.erp.utils.ErpInfo;
@@ -146,5 +148,27 @@ public class AccountHeadController {
}
return allMoney;
}
/**
* create by: qiankunpingtai
* websitehttp://39.105.146.63/symphony/
* description:
* 批量删除账户信息
* create time: 2019/3/29 10:49
* @Param: ids
* @return java.lang.Object
*/
@RequestMapping(value = "/batchDeleteAccountHeadByIds")
public Object batchDeleteAccountHeadByIds(@RequestParam("ids") String ids) throws Exception {
JSONObject result = ExceptionConstants.standardSuccess();
int i= accountHeadService.batchDeleteAccountHeadByIds(ids);
if(i<1){
logger.error("异常码[{}],异常提示[{}],参数,ids[{}]",
ExceptionConstants.ACCOUNT_HEAD_DELETE_FAILED_CODE,ExceptionConstants.ACCOUNT_HEAD_DELETE_FAILED_MSG,ids);
throw new BusinessRunTimeException(ExceptionConstants.ACCOUNT_HEAD_DELETE_FAILED_CODE,
ExceptionConstants.ACCOUNT_HEAD_DELETE_FAILED_MSG);
}
return result;
}
}

View File

@@ -2,8 +2,10 @@ 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.AccountItem;
import com.jsh.erp.datasource.vo.AccountItemVo4List;
import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.service.accountItem.AccountItemService;
import com.jsh.erp.service.log.LogService;
import com.jsh.erp.utils.*;
@@ -104,5 +106,27 @@ public class AccountItemController {
}
return res;
}
/**
* create by: qiankunpingtai
* websitehttp://39.105.146.63/symphony/
* description:
* 批量删除财务明细信息
* create time: 2019/3/29 10:56
* @Param: ids
* @return java.lang.Object
*/
@RequestMapping(value = "/batchDeleteAccountItemByIds")
public Object batchDeleteAccountItemByIds(@RequestParam("ids") String ids) throws Exception {
JSONObject result = ExceptionConstants.standardSuccess();
int i= accountItemService.batchDeleteAccountItemByIds(ids);
if(i<1){
logger.error("异常码[{}],异常提示[{}],参数,ids[{}]",
ExceptionConstants.ACCOUNT_ITEM_DELETE_FAILED_CODE,ExceptionConstants.ACCOUNT_ITEM_DELETE_FAILED_MSG,ids);
throw new BusinessRunTimeException(ExceptionConstants.ACCOUNT_ITEM_DELETE_FAILED_CODE,
ExceptionConstants.ACCOUNT_ITEM_DELETE_FAILED_MSG);
}
return result;
}
}

View File

@@ -2,8 +2,10 @@ 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.App;
import com.jsh.erp.datasource.entities.UserBusiness;
import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.service.app.AppService;
import com.jsh.erp.service.userBusiness.UserBusinessService;
import com.jsh.erp.utils.BaseResponseInfo;
@@ -225,4 +227,26 @@ public class AppController {
}
return res;
}
/**
* create by: qiankunpingtai
* websitehttp://39.105.146.63/symphony/
* description:
* 批量删除应用信息
* create time: 2019/3/29 11:15
* @Param: ids
* @return java.lang.Object
*/
@RequestMapping(value = "/batchDeleteAppByIds")
public Object batchDeleteAppByIds(@RequestParam("ids") String ids) throws Exception {
JSONObject result = ExceptionConstants.standardSuccess();
int i= appService.batchDeleteAppByIds(ids);
if(i<1){
logger.error("异常码[{}],异常提示[{}],参数,ids[{}]",
ExceptionConstants.APP_DELETE_FAILED_CODE,ExceptionConstants.APP_DELETE_FAILED_MSG,ids);
throw new BusinessRunTimeException(ExceptionConstants.APP_DELETE_FAILED_CODE,
ExceptionConstants.APP_DELETE_FAILED_MSG);
}
return result;
}
}

View File

@@ -7,8 +7,10 @@ import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.jsh.erp.constants.BusinessConstants;
import com.jsh.erp.constants.ExceptionConstants;
import com.jsh.erp.datasource.entities.Depot;
import com.jsh.erp.datasource.entities.DepotEx;
import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.service.depot.DepotService;
import com.jsh.erp.service.userBusiness.UserBusinessService;
import com.jsh.erp.utils.*;
@@ -173,5 +175,26 @@ public class DepotController {
queryInfo.setTotal(pageInfo.getTotal());
return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code);
}
/**
* create by: qiankunpingtai
* websitehttp://39.105.146.63/symphony/
* description:
* 批量删除仓库信息
* create time: 2019/3/29 11:15
* @Param: ids
* @return java.lang.Object
*/
@RequestMapping(value = "/batchDeleteDepotByIds")
public Object batchDeleteDepotByIds(@RequestParam("ids") String ids) throws Exception {
JSONObject result = ExceptionConstants.standardSuccess();
int i= depotService.batchDeleteDepotByIds(ids);
if(i<1){
logger.error("异常码[{}],异常提示[{}],参数,ids[{}]",
ExceptionConstants.DEPOT_DELETE_FAILED_CODE,ExceptionConstants.DEPOT_DELETE_FAILED_MSG,ids);
throw new BusinessRunTimeException(ExceptionConstants.DEPOT_DELETE_FAILED_CODE,
ExceptionConstants.DEPOT_DELETE_FAILED_MSG);
}
return result;
}
}

View File

@@ -3,7 +3,9 @@ package com.jsh.erp.controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.constants.BusinessConstants;
import com.jsh.erp.constants.ExceptionConstants;
import com.jsh.erp.datasource.entities.*;
import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.service.depotItem.DepotItemService;
import com.jsh.erp.service.material.MaterialService;
import com.jsh.erp.utils.*;
@@ -782,4 +784,25 @@ public class DepotItemController {
}
return sumPrice;
}
/**
* create by: qiankunpingtai
* websitehttp://39.105.146.63/symphony/
* description:
* 批量删除单据明细信息
* create time: 2019/3/29 11:15
* @Param: ids
* @return java.lang.Object
*/
@RequestMapping(value = "/batchDeleteDepotItemByIds")
public Object batchDeleteDepotItemByIds(@RequestParam("ids") String ids) throws Exception {
JSONObject result = ExceptionConstants.standardSuccess();
int i= depotItemService.batchDeleteDepotItemByIds(ids);
if(i<1){
logger.error("异常码[{}],异常提示[{}],参数,ids[{}]",
ExceptionConstants.DEPOT_ITEM_DELETE_FAILED_CODE,ExceptionConstants.DEPOT_ITEM_DELETE_FAILED_MSG,ids);
throw new BusinessRunTimeException(ExceptionConstants.DEPOT_ITEM_DELETE_FAILED_CODE,
ExceptionConstants.DEPOT_ITEM_DELETE_FAILED_MSG);
}
return result;
}
}

View File

@@ -2,7 +2,9 @@ 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.Functions;
import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.service.functions.FunctionsService;
import com.jsh.erp.service.userBusiness.UserBusinessService;
import com.jsh.erp.utils.BaseResponseInfo;
@@ -275,4 +277,25 @@ public class FunctionsController {
}
return res;
}
/**
* create by: qiankunpingtai
* websitehttp://39.105.146.63/symphony/
* description:
* 批量删除功能模块信息
* create time: 2019/3/29 11:15
* @Param: ids
* @return java.lang.Object
*/
@RequestMapping(value = "/batchDeleteFunctionsByIds")
public Object batchDeleteFunctionsByIds(@RequestParam("ids") String ids) throws Exception {
JSONObject result = ExceptionConstants.standardSuccess();
int i= functionsService.batchDeleteFunctionsByIds(ids);
if(i<1){
logger.error("异常码[{}],异常提示[{}],参数,ids[{}]",
ExceptionConstants.FUNCTIONS_DELETE_FAILED_CODE,ExceptionConstants.FUNCTIONS_DELETE_FAILED_MSG,ids);
throw new BusinessRunTimeException(ExceptionConstants.FUNCTIONS_DELETE_FAILED_CODE,
ExceptionConstants.FUNCTIONS_DELETE_FAILED_MSG);
}
return result;
}
}

View File

@@ -2,7 +2,9 @@ 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.InOutItem;
import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.service.inOutItem.InOutItemService;
import com.jsh.erp.utils.BaseResponseInfo;
import org.slf4j.Logger;
@@ -54,5 +56,26 @@ public class InOutItemController {
}
return res;
}
/**
* create by: qiankunpingtai
* websitehttp://39.105.146.63/symphony/
* description:
* 批量删除收支项目信息
* create time: 2019/3/29 11:15
* @Param: ids
* @return java.lang.Object
*/
@RequestMapping(value = "/batchDeleteInOutItemByIds")
public Object batchDeleteInOutItemByIds(@RequestParam("ids") String ids) throws Exception {
JSONObject result = ExceptionConstants.standardSuccess();
int i= inOutItemService.batchDeleteInOutItemByIds(ids);
if(i<1){
logger.error("异常码[{}],异常提示[{}],参数,ids[{}]",
ExceptionConstants.IN_OUT_ITEM_DELETE_FAILED_CODE,ExceptionConstants.IN_OUT_ITEM_DELETE_FAILED_MSG,ids);
throw new BusinessRunTimeException(ExceptionConstants.IN_OUT_ITEM_DELETE_FAILED_CODE,
ExceptionConstants.IN_OUT_ITEM_DELETE_FAILED_MSG);
}
return result;
}
}

View File

@@ -6,9 +6,11 @@ import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.jsh.erp.constants.BusinessConstants;
import com.jsh.erp.constants.ExceptionConstants;
import com.jsh.erp.datasource.entities.DepotEx;
import com.jsh.erp.datasource.entities.Material;
import com.jsh.erp.datasource.entities.MaterialVo4Unit;
import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.service.material.MaterialService;
import com.jsh.erp.utils.*;
import jxl.Sheet;
@@ -341,4 +343,25 @@ public class MaterialController {
queryInfo.setTotal(pageInfo.getTotal());
return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code);
}
/**
* create by: qiankunpingtai
* websitehttp://39.105.146.63/symphony/
* description:
* 批量删除商品信息
* create time: 2019/3/29 11:15
* @Param: ids
* @return java.lang.Object
*/
@RequestMapping(value = "/batchDeleteMaterialByIds")
public Object batchDeleteMaterialByIds(@RequestParam("ids") String ids) throws Exception {
JSONObject result = ExceptionConstants.standardSuccess();
int i= materialService.batchDeleteMaterialByIds(ids);
if(i<1){
logger.error("异常码[{}],异常提示[{}],参数,ids[{}]",
ExceptionConstants.MATERIAL_DELETE_FAILED_CODE,ExceptionConstants.MATERIAL_DELETE_FAILED_MSG,ids);
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_DELETE_FAILED_CODE,
ExceptionConstants.MATERIAL_DELETE_FAILED_MSG);
}
return result;
}
}

View File

@@ -0,0 +1,49 @@
package com.jsh.erp.controller;
import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.constants.ExceptionConstants;
import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.service.material.MaterialService;
import com.jsh.erp.service.materialProperty.MaterialPropertyService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* Description
*
* @Author: qiankunpingtai
* @Date: 2019/3/29 15:24
*/
@RestController
@RequestMapping(value = "/materialProperty")
public class MaterialPropertyController {
private Logger logger = LoggerFactory.getLogger(MaterialPropertyController.class);
@Resource
private MaterialPropertyService materialPropertyService;
/**
* create by: qiankunpingtai
* websitehttp://39.105.146.63/symphony/
* description:
* 批量删除商品扩展信息
* create time: 2019/3/29 11:15
* @Param: ids
* @return java.lang.Object
*/
@RequestMapping(value = "/batchDeleteMaterialPropertyByIds")
public Object batchDeleteMaterialPropertyByIds(@RequestParam("ids") String ids) throws Exception {
JSONObject result = ExceptionConstants.standardSuccess();
int i= materialPropertyService.batchDeleteMaterialPropertyByIds(ids);
if(i<1){
logger.error("异常码[{}],异常提示[{}],参数,ids[{}]",
ExceptionConstants.MATERIAL_PROPERTY_DELETE_FAILED_CODE,ExceptionConstants.MATERIAL_PROPERTY_DELETE_FAILED_MSG,ids);
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_PROPERTY_DELETE_FAILED_CODE,
ExceptionConstants.MATERIAL_PROPERTY_DELETE_FAILED_MSG);
}
return result;
}
}

View File

@@ -2,7 +2,9 @@ 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.Person;
import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.service.person.PersonService;
import com.jsh.erp.utils.BaseResponseInfo;
import org.slf4j.Logger;
@@ -121,4 +123,25 @@ public class PersonController {
}
return dataArray;
}
/**
* create by: qiankunpingtai
* websitehttp://39.105.146.63/symphony/
* description:
* 批量删除经手人信息
* create time: 2019/3/29 11:15
* @Param: ids
* @return java.lang.Object
*/
@RequestMapping(value = "/batchDeletePersonByIds")
public Object batchDeletePersonByIds(@RequestParam("ids") String ids) throws Exception {
JSONObject result = ExceptionConstants.standardSuccess();
int i= personService.batchDeletePersonByIds(ids);
if(i<1){
logger.error("异常码[{}],异常提示[{}],参数,ids[{}]",
ExceptionConstants.PERSON_DELETE_FAILED_CODE,ExceptionConstants.PERSON_DELETE_FAILED_MSG,ids);
throw new BusinessRunTimeException(ExceptionConstants.PERSON_DELETE_FAILED_CODE,
ExceptionConstants.PERSON_DELETE_FAILED_MSG);
}
return result;
}
}

View File

@@ -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
* websitehttp://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;
}
}

View File

@@ -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.Supplier;
import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.service.supplier.SupplierService;
import com.jsh.erp.service.user.UserService;
import com.jsh.erp.service.userBusiness.UserBusinessService;
import com.jsh.erp.utils.*;
import jxl.Sheet;
@@ -40,6 +43,8 @@ public class SupplierController {
@Resource
private UserBusinessService userBusinessService;
@Resource
private UserService userService;
/**
* 更新供应商-只更新预付款,其余用原来的值
@@ -437,5 +442,26 @@ public class SupplierController {
return null;
}
}
/**
* create by: qiankunpingtai
* websitehttp://39.105.146.63/symphony/
* description:
* 批量删除供应商信息
* create time: 2019/3/29 11:15
* @Param: ids
* @return java.lang.Object
*/
@RequestMapping(value = "/batchDeleteSupplierByIds")
public Object batchDeleteSupplierByIds(@RequestParam("ids") String ids) throws Exception {
JSONObject result = ExceptionConstants.standardSuccess();
int i= supplierService.batchDeleteSupplierByIds(ids);
if(i<1){
logger.error("异常码[{}],异常提示[{}],参数,ids[{}]",
ExceptionConstants.SUPPLIER_DELETE_FAILED_CODE,ExceptionConstants.SUPPLIER_DELETE_FAILED_MSG,ids);
throw new BusinessRunTimeException(ExceptionConstants.SUPPLIER_DELETE_FAILED_CODE,
ExceptionConstants.SUPPLIER_DELETE_FAILED_MSG);
}
return result;
}
}

View File

@@ -0,0 +1,49 @@
package com.jsh.erp.controller;
import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.constants.ExceptionConstants;
import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.service.systemConfig.SystemConfigService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* Description
*
* @Author: qiankunpingtai
* @Date: 2019/4/1 15:28
*/
@RestController
@RequestMapping(value = "/systemConfig")
public class SystemConfigController {
private Logger logger = LoggerFactory.getLogger(SystemConfigController.class);
@Resource
private SystemConfigService systemConfigService;
/**
* create by: qiankunpingtai
* websitehttp://39.105.146.63/symphony/
* description:
* 批量删除系统配置信息
* create time: 2019/3/29 11:15
* @Param: ids
* @return java.lang.Object
*/
@RequestMapping(value = "/batchDeleteSystemConfigByIds")
public Object batchDeleteSystemConfigByIds(@RequestParam("ids") String ids) throws Exception {
JSONObject result = ExceptionConstants.standardSuccess();
int i= systemConfigService.batchDeleteSystemConfigByIds(ids);
if(i<1){
logger.error("异常码[{}],异常提示[{}],参数,ids[{}]",
ExceptionConstants.SYSTEM_CONFIG_DELETE_FAILED_CODE,ExceptionConstants.SYSTEM_CONFIG_DELETE_FAILED_MSG,ids);
throw new BusinessRunTimeException(ExceptionConstants.SYSTEM_CONFIG_DELETE_FAILED_CODE,
ExceptionConstants.SYSTEM_CONFIG_DELETE_FAILED_MSG);
}
return result;
}
}

View File

@@ -0,0 +1,48 @@
package com.jsh.erp.controller;
import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.constants.ExceptionConstants;
import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.service.unit.UnitService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* Description
*
* @Author: qiankunpingtai
* @Date: 2019/4/1 15:38
*/
@RestController
@RequestMapping(value = "/unit")
public class UnitController {
private Logger logger = LoggerFactory.getLogger(UnitController.class);
@Resource
private UnitService unitService;
/**
* create by: qiankunpingtai
* websitehttp://39.105.146.63/symphony/
* description:
* 批量删除系统配置信息
* create time: 2019/3/29 11:15
* @Param: ids
* @return java.lang.Object
*/
@RequestMapping(value = "/batchDeleteUnitByIds")
public Object batchDeleteUnitByIds(@RequestParam("ids") String ids) throws Exception {
JSONObject result = ExceptionConstants.standardSuccess();
int i= unitService.batchDeleteUnitByIds(ids);
if(i<1){
logger.error("异常码[{}],异常提示[{}],参数,ids[{}]",
ExceptionConstants.UNIT_DELETE_FAILED_CODE,ExceptionConstants.UNIT_DELETE_FAILED_MSG,ids);
throw new BusinessRunTimeException(ExceptionConstants.UNIT_DELETE_FAILED_CODE,
ExceptionConstants.UNIT_DELETE_FAILED_MSG);
}
return result;
}
}

View File

@@ -1,7 +1,10 @@
package com.jsh.erp.controller;
import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.constants.ExceptionConstants;
import com.jsh.erp.datasource.entities.UserBusiness;
import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.service.user.UserService;
import com.jsh.erp.service.userBusiness.UserBusinessService;
import com.jsh.erp.utils.BaseResponseInfo;
import com.jsh.erp.utils.ErpInfo;
@@ -27,6 +30,8 @@ public class UserBusinessController {
@Resource
private UserBusinessService userBusinessService;
@Resource
private UserService userService;
@GetMapping(value = "/getBasicData")
public BaseResponseInfo getBasicData(@RequestParam(value = "KeyId") String keyId,
@@ -86,4 +91,26 @@ public class UserBusinessController {
}
return res;
}
/**
* create by: qiankunpingtai
* websitehttp://39.105.146.63/symphony/
* description:
* 批量删除用户角色模块关系信息
* create time: 2019/3/28 15:47
* @Param: ids
* @return java.lang.Object
*/
@RequestMapping(value = "/batchDeleteUserBusinessByIds")
public Object batchDeleteUserBusinessByIds(@RequestParam("ids") String ids) throws Exception {
JSONObject result = ExceptionConstants.standardSuccess();
int i= userBusinessService.batchDeleteUserBusinessByIds(ids);
if(i<1){
logger.error("异常码[{}],异常提示[{}],参数,ids[{}]",
ExceptionConstants.USER_BUSINESS_DELETE_FAILED_CODE,ExceptionConstants.USER_BUSINESS_DELETE_FAILED_MSG,ids);
throw new BusinessRunTimeException(ExceptionConstants.USER_BUSINESS_DELETE_FAILED_CODE,
ExceptionConstants.USER_BUSINESS_DELETE_FAILED_MSG);
}
return result;
}
}