去除外键之产品表jsh_material相关修改

This commit is contained in:
qiankunpingtai
2019-04-10 18:14:51 +08:00
parent 9fa082f25c
commit bce05cf062
6 changed files with 127 additions and 5 deletions

View File

@@ -353,9 +353,20 @@ public class MaterialController {
* @return java.lang.Object
*/
@RequestMapping(value = "/batchDeleteMaterialByIds")
public Object batchDeleteMaterialByIds(@RequestParam("ids") String ids) throws Exception {
public Object batchDeleteMaterialByIds(@RequestParam("ids") String ids,@RequestParam(value="deleteType",
required =false,defaultValue= BusinessConstants.DELETE_TYPE_NORMAL)String deleteType) throws Exception {
JSONObject result = ExceptionConstants.standardSuccess();
int i= materialService.batchDeleteMaterialByIds(ids);
int i=0;
if(BusinessConstants.DELETE_TYPE_NORMAL.equals(deleteType)){
i= materialService.batchDeleteMaterialByIdsNormal(ids);
}else if(BusinessConstants.DELETE_TYPE_FORCE.equals(deleteType)){
i= materialService.batchDeleteMaterialByIds(ids);
}else{
logger.error("异常码[{}],异常提示[{}],参数,ids[{}],deleteType[{}]",
ExceptionConstants.DELETE_REFUSED_CODE,ExceptionConstants.DELETE_REFUSED_MSG,ids,deleteType);
throw new BusinessRunTimeException(ExceptionConstants.DELETE_REFUSED_CODE,
ExceptionConstants.DELETE_REFUSED_MSG);
}
if(i<1){
logger.error("异常码[{}],异常提示[{}],参数,ids[{}]",
ExceptionConstants.MATERIAL_DELETE_FAILED_CODE,ExceptionConstants.MATERIAL_DELETE_FAILED_MSG,ids);