|
|
@@ -90,10 +90,19 @@ public class GangDaPaiBanController extends GenericProvider {
|
|
|
* @return 操作结果
|
|
|
*/
|
|
|
@PostMapping("/update")
|
|
|
- public void update(@RequestBody GangDaPaiBanPo po) throws Exception {
|
|
|
- //增加校验
|
|
|
- service.checkParam(po,"U");
|
|
|
- service.updateSelective(po);
|
|
|
+ public APIResult<Void> update(@RequestBody GangDaPaiBanPo po) throws Exception {
|
|
|
+ APIResult<Void> result = new APIResult<Void>();
|
|
|
+ try {
|
|
|
+ //增加校验
|
|
|
+ service.checkParam(po,"U");
|
|
|
+ service.updateSelective(po);
|
|
|
+ result.setMessage("保存成功");
|
|
|
+ } catch (Exception e) {
|
|
|
+ result.setMessage("保存失败");
|
|
|
+ setExceptionResult(result, StateEnum.ERROR.getCode(), I18nUtil.getMessage(StateEnum.ERROR_ROLE.getCode()+""), e);
|
|
|
+ }
|
|
|
+
|
|
|
+ return result;
|
|
|
}
|
|
|
|
|
|
/**
|