sys包下中英文返回值

This commit is contained in:
caozhen
2023-09-15 18:41:54 +08:00
parent bb591d937f
commit e45518aefd
12 changed files with 128 additions and 62 deletions
@@ -75,7 +75,7 @@ public class LawsProjectLibraryController extends JeroController<LawsProjectLibr
public Result<T> add(@Validated @RequestBody LawsProjectLibrary lawsProjectLibrary) {
lawsProjectLibrary.setDelFlag("0");
lawsProjectLibraryService.add(lawsProjectLibrary);
return Result.OK(MessageUtils.getLanguage().equals("EN") ? ResultCommon.OK : "操作成功!");
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
}
/**
@@ -86,7 +86,7 @@ public class LawsProjectLibraryController extends JeroController<LawsProjectLibr
@PostMapping(value = "/edit")
public Result<T> edit(@RequestBody LawsProjectLibrary lawsProjectLibrary) {
lawsProjectLibraryService.editById(lawsProjectLibrary);
return Result.OK(MessageUtils.getLanguage().equals("EN") ? ResultCommon.OK : "操作成功!");
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
}
/**
@@ -100,7 +100,7 @@ public class LawsProjectLibraryController extends JeroController<LawsProjectLibr
return Result.error(MessageUtils.getLanguage().equals("EN") ? "Please select data!" : "请选择数据!");
}
lawsProjectLibraryService.deleteById(map.get("id"));
return Result.OK(MessageUtils.getLanguage().equals("EN") ? ResultCommon.OK : "操作成功!");
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
}
/**
@@ -111,10 +111,10 @@ public class LawsProjectLibraryController extends JeroController<LawsProjectLibr
@PostMapping(value = "/deleteBatch")
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
if(!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))){
return Result.error(MessageUtils.getLanguage().equals("EN") ? "Please select data!" : "请选择数据!");
throw new JeroBootException(ResultCommon.PLEASE_SELECT_DATA);
}
this.lawsProjectLibraryService.deleteByIds(Arrays.asList(map.get("ids").split(",")));
return Result.OK(MessageUtils.getLanguage().equals("EN") ? ResultCommon.OK : "批量删除成功!");
return Result.error(MessageUtils.getMessage(ResultCommon.SUCCESSFULLY_DELETED_IN_BULK));
}
/**