仓库重名报错
This commit is contained in:
parent
18013a2e0f
commit
6623d7e57f
|
|
@ -110,7 +110,11 @@ public class WhHouseInfoController extends BaseController {
|
||||||
@SysLog(title = "仓库管理", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改仓库管理")
|
@SysLog(title = "仓库管理", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改仓库管理")
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody WhHouseInfo whHouseInfo) {
|
public AjaxResult edit(@RequestBody WhHouseInfo whHouseInfo) {
|
||||||
return toAjax(whHouseInfoService.updateWhHouseInfo(whHouseInfo));
|
try {
|
||||||
|
return toAjax(whHouseInfoService.updateWhHouseInfo(whHouseInfo));
|
||||||
|
} catch (Exception e) {
|
||||||
|
return error("系统错误, " + e.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,11 @@ public class WhHouseInfoServiceImpl implements IWhHouseInfoService
|
||||||
public int updateWhHouseInfo(WhHouseInfo whHouseInfo)
|
public int updateWhHouseInfo(WhHouseInfo whHouseInfo)
|
||||||
{
|
{
|
||||||
whHouseInfo.setUpdateTime(DateUtils.getNowDate());
|
whHouseInfo.setUpdateTime(DateUtils.getNowDate());
|
||||||
return whHouseInfoMapper.updateWhHouseInfo(whHouseInfo);
|
try {
|
||||||
|
return whHouseInfoMapper.updateWhHouseInfo(whHouseInfo);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new ServiceException("数据库错误或仓库重名");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue