仓库重名报错

This commit is contained in:
sxu 2024-10-16 18:59:09 +08:00
parent 18013a2e0f
commit 6623d7e57f
2 changed files with 10 additions and 2 deletions

View File

@ -110,7 +110,11 @@ public class WhHouseInfoController extends BaseController {
@SysLog(title = "仓库管理", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改仓库管理")
@PutMapping
public AjaxResult edit(@RequestBody WhHouseInfo whHouseInfo) {
try {
return toAjax(whHouseInfoService.updateWhHouseInfo(whHouseInfo));
} catch (Exception e) {
return error("系统错误, " + e.getMessage());
}
}
/**

View File

@ -71,7 +71,11 @@ public class WhHouseInfoServiceImpl implements IWhHouseInfoService
public int updateWhHouseInfo(WhHouseInfo whHouseInfo)
{
whHouseInfo.setUpdateTime(DateUtils.getNowDate());
try {
return whHouseInfoMapper.updateWhHouseInfo(whHouseInfo);
} catch (Exception e) {
throw new ServiceException("数据库错误或仓库重名");
}
}
/**