Merge branch 'refs/heads/feature/DM/nflg-bom' into feature/DM/nflg-bom-transition

This commit is contained in:
曹鹏飞 2024-06-17 15:55:53 +08:00
commit 7db789d7ac
2 changed files with 10 additions and 3 deletions

View File

@ -2627,6 +2627,9 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
//转移后删除
this.getBaseMapper().delEBomHistory(childParentRowIds);
} else {
this.getBaseMapper().insertEBomFormalParent(exceptRowIds);
this.getBaseMapper().insertEBomFormalChild(exceptRowIds);
}
}

View File

@ -1,5 +1,6 @@
package com.nflg.product.base.core.exception;
import cn.hutool.core.util.StrUtil;
import lombok.extern.slf4j.Slf4j;
import nflg.product.common.constant.STATE;
import nflg.product.common.vo.ResultVO;
@ -51,7 +52,7 @@ public class BaseGlobalExceptionHandle {
public ResultVO<String> handleDuplicateKeyException(DuplicateKeyException e) {
log.error(e.getMessage(), e);
//return ResultVO.error("已存在该记录,请勿重复操作");
return ResultVO.error("已存在该记录,请勿重复操作");
return ResultVO.error("数据库存在重复数据");
}
@ -59,9 +60,12 @@ public class BaseGlobalExceptionHandle {
@ResponseBody
public ResultVO<String> handleException(Exception e) {
log.error(e.getMessage(), e);
//return ResultVO.error("操作失败,请联系系统管理员");
if (StrUtil.isNotBlank(e.getMessage()) && e.getMessage().contains("Deadlock")) {
return ResultVO.error("操作失败,请重试");
} else {
return ResultVO.error("操作失败,请联系系统管理员");
}
}
/**
* @param e