fix 77991 标签项管理--批量删除--批量删除成功的提示语为英文
This commit is contained in:
@@ -63,7 +63,7 @@ public class Result<T> implements Serializable {
|
||||
Result<T> r = new Result<>();
|
||||
r.setSuccess(true);
|
||||
r.setCode(CommonConstant.SC_OK_200);
|
||||
r.setMessage("操作成功!");
|
||||
r.setMessage(MessageUtils.getMessage(ResultCommon.OK));
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,14 @@ public class ResultCommon {
|
||||
/**同一所属模块下,展示区域名称不能重复!*/
|
||||
public static final String TAG_ERROR_1 = "tag.error.1";
|
||||
/**该展示区域有关联数据,无法删除!*/
|
||||
public static final String TAG_ERROR_2 = "tag.error.2";
|
||||
public static final String TAG_DELETE_ERROR_2 = "tag.delete.error.2";
|
||||
/**包含固定字段,不可删除*/
|
||||
public static final String TAG_DELETE_ERROR_3 = "tag.delete.error.3";
|
||||
/**包含固定字段,不可删除*/
|
||||
public static final String TAG_EDIT_ERROR_1 = "tag.edit.error.1";
|
||||
/**包含固定字段,不可删除*/
|
||||
public static final String TAG_EDIT_ERROR_2 = "tag.edit.error.2";
|
||||
|
||||
/**标签已被引用,无法删除*/
|
||||
public static final String DICT_DELETE_ERROR = "dict.delete.error";
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ public class LawsAreaController extends JeroController<LawsArea, ILawsAreaServic
|
||||
LawsArea lawsArea = lawsAreaService.queryById(id);
|
||||
int count= lawsTagService.queryExitArea(lawsArea);
|
||||
if (count > 0) {
|
||||
return Result.error(ResultCommon.TAG_ERROR_2);
|
||||
return Result.error(ResultCommon.TAG_DELETE_ERROR_2);
|
||||
}else {
|
||||
lawsAreaService.deleteById(id);
|
||||
return Result.OK(ResultCommon.SUCCESSFULLY_DELETED);
|
||||
|
||||
@@ -3,12 +3,11 @@ package com.jero.modules.tag.controller;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.api.vo.ResultCommon;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.common.constant.enums.LanguageEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.util.MessageUtils;
|
||||
import com.jero.modules.enums.FixedFieldEnum;
|
||||
import com.jero.modules.system.entity.SysDict;
|
||||
import com.jero.modules.system.mapper.SysDictMapper;
|
||||
@@ -20,7 +19,6 @@ import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
@@ -131,7 +129,7 @@ public class LawsTagController extends JeroController<LawsTag, ILawsTagService>
|
||||
}
|
||||
}else{
|
||||
//中英切换提示语
|
||||
throw new JeroBootException("tag.edit.属性已存在,请检查");
|
||||
throw new JeroBootException(ResultCommon.TAG_EDIT_ERROR_2);
|
||||
}
|
||||
}else {
|
||||
lawsTagService.add(lawsTag);
|
||||
@@ -140,7 +138,7 @@ public class LawsTagController extends JeroController<LawsTag, ILawsTagService>
|
||||
}else {//同步文档拆分
|
||||
//this.onlCgformApiController.h(String.valueOf(TableNameEnum.FILE_SPLIT_ID.getValue()), "normal");
|
||||
}
|
||||
return result.success("添加成功!");
|
||||
return Result.OK(ResultCommon.OK);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -158,7 +156,7 @@ public class LawsTagController extends JeroController<LawsTag, ILawsTagService>
|
||||
public Result<?> edit(@Validated @RequestBody LawsTag lawsTag) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(lawsTag.getIsReadOnly().toString()) ||
|
||||
FixedFieldEnum.CONFIGURABLE_FIELD.getValue().equals(lawsTag.getIsReadOnly().toString())) {
|
||||
return Result.error(MessageUtils.getMessage("tag.edit.固定字段,不可修改"));
|
||||
return Result.error(ResultCommon.TAG_EDIT_ERROR_1);
|
||||
}else {
|
||||
String isModel = lawsTag.getIsModel();
|
||||
String tableName = TableNameEnum.getTableName(isModel);
|
||||
@@ -199,7 +197,7 @@ public class LawsTagController extends JeroController<LawsTag, ILawsTagService>
|
||||
}
|
||||
//有未删数据,报错
|
||||
} else {
|
||||
throw new JeroBootException("tag.edit.属性已存在,请检查");
|
||||
throw new JeroBootException(ResultCommon.TAG_EDIT_ERROR_2);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
@@ -210,7 +208,7 @@ public class LawsTagController extends JeroController<LawsTag, ILawsTagService>
|
||||
//this.onlCgformApiController.h(String.valueOf(TableNameEnum.FILE_SPLIT_ID.getValue()), "normal");
|
||||
}
|
||||
}
|
||||
return Result.OK("编辑成功!");
|
||||
return Result.OK(ResultCommon.EDIT_OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,7 +222,7 @@ public class LawsTagController extends JeroController<LawsTag, ILawsTagService>
|
||||
@RequiresPermissions("tag:logicDelete")
|
||||
public Result<String> logicDelete(@RequestBody Map<String, String> map) {
|
||||
if(!map.containsKey("id") || StringUtils.isEmpty(map.get("id"))){
|
||||
return Result.error("请选择数据!");
|
||||
return Result.error(ResultCommon.PLEASE_SELECT_DATA);
|
||||
}
|
||||
String id = map.get("id");
|
||||
Result<String> result = new Result<>();
|
||||
@@ -233,14 +231,13 @@ public class LawsTagController extends JeroController<LawsTag, ILawsTagService>
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(lawsTag.getIsReadOnly().toString()) ||
|
||||
FixedFieldEnum.CONFIGURABLE_FIELD.getValue().equals(lawsTag.getIsReadOnly().toString())) {
|
||||
//中英切换提示语
|
||||
return Result.error(MessageUtils.getMessage("tag.edit.固定字段,不可删除"));
|
||||
return Result.error(ResultCommon.TAG_DELETE_ERROR_3);
|
||||
} else {
|
||||
lawsTagService.removeById(id);
|
||||
////onlCgformApiController.h(String.valueOf(TableNameEnum.FILE_TABLE_ID),"normal");//逻辑删除-->改变状态,数据库不删
|
||||
return Result.OK("删除成功!");
|
||||
return Result.OK(ResultCommon.SUCCESSFULLY_DELETED);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -252,7 +249,7 @@ public class LawsTagController extends JeroController<LawsTag, ILawsTagService>
|
||||
@RequiresPermissions("tag:logicDeleteBatch")
|
||||
public Result<?> logicDeleteBatch(@RequestBody Map<String, String> map) {
|
||||
if(!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))){
|
||||
return Result.error("请选择数据!");
|
||||
return Result.error(ResultCommon.PLEASE_SELECT_DATA);
|
||||
}
|
||||
String ids = map.get("ids");
|
||||
Result<LawsTag> result = new Result<>();
|
||||
@@ -260,26 +257,14 @@ public class LawsTagController extends JeroController<LawsTag, ILawsTagService>
|
||||
for(String list:idList){
|
||||
LawsTag midTag= lawsTagService.getById(list);
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(String.valueOf(midTag.getIsReadOnly())) || FixedFieldEnum.CONFIGURABLE_FIELD.getValue().equals(String.valueOf(midTag.getIsReadOnly()))) {
|
||||
//中英切换提示语
|
||||
return Result.error(MessageUtils.getMessage("tag.delete.包含固定字段,不可删除"));
|
||||
return Result.error(ResultCommon.TAG_DELETE_ERROR_3);
|
||||
}else {
|
||||
if (StringUtils.isNotBlank(String.valueOf(midTag.getIsReadOnly()))) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(String.valueOf(midTag.getIsReadOnly()))) {
|
||||
//中英切换提示语
|
||||
if(LanguageEnum.CN.getValue().equals(midTag.getCut())) {
|
||||
result.error500("包含固定字段,不可删除");
|
||||
}else{
|
||||
result.error500("It contains fixed fields and cannot be deleted.");
|
||||
}
|
||||
return Result.error(ResultCommon.TAG_DELETE_ERROR_3);
|
||||
} else {
|
||||
lawsTagService.removeById(midTag.getId());
|
||||
////onlCgformApiController.h(String.valueOf(TableNameEnum.FILE_TABLE_ID),"normal");//逻辑删除-->改变状态,数据库不删
|
||||
//中英切换提示语
|
||||
if(LanguageEnum.CN.getValue().equals(midTag.getCut())) {
|
||||
result.success("批量删除成功!");
|
||||
}else{
|
||||
result.success("Batch deletion succeeded!");
|
||||
}
|
||||
return Result.OK(ResultCommon.SUCCESSFULLY_DELETED_IN_BULK);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -299,7 +284,7 @@ public class LawsTagController extends JeroController<LawsTag, ILawsTagService>
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
LawsTag lawsTag = lawsTagService.queryById(id);
|
||||
if(lawsTag ==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
return Result.error(ResultCommon.NO_CORRESPONDING_DATA_FOUND);
|
||||
}
|
||||
return Result.OK(lawsTag);
|
||||
}
|
||||
|
||||
@@ -2,9 +2,8 @@ message=1
|
||||
message.operate.error=123{0}
|
||||
tag.add.\u5B57\u6BB5\u540D\u79F0\u592A\u957F=\u60A8\u8BBE\u7F6E\u7684\u5B57\u6BB5\u540D\u4E3A{0}\uFF0C\u6700\u957F\u4E3A64\u4F4D\u5B57\u7B26\u3002
|
||||
tag.delete.\u5305\u542B\u56FA\u5B9A\u5B57\u6BB5,\u4E0D\u53EF\u5220\u9664=\u5305\u542B\u56FA\u5B9A\u5B57\u6BB5,\u4E0D\u53EF\u5220\u9664
|
||||
tag.edit.\u56FA\u5B9A\u5B57\u6BB5,\u4E0D\u53EF\u4FEE\u6539=\u56FA\u5B9A\u5B57\u6BB5,\u4E0D\u53EF\u4FEE\u6539
|
||||
tag.edit.\u56FA\u5B9A\u5B57\u6BB5,\u4E0D\u53EF\u5220\u9664=\u56FA\u5B9A\u5B57\u6BB5,\u4E0D\u53EF\u5220\u9664
|
||||
tag.edit.\u5C5E\u6027\u5DF2\u5B58\u5728,\u8BF7\u68C0\u67E5=\u5C5E\u6027\u5DF2\u5B58\u5728,\u8BF7\u68C0\u67E5
|
||||
tag.edit.error.2=\u5C5E\u6027\u5DF2\u5B58\u5728,\u8BF7\u68C0\u67E5
|
||||
es.rmr.setQuality.overTen=\u8BF7\u6700\u591A\u9009\u62E910\u6761
|
||||
message.ok=\u64CD\u4F5C\u6210\u529F
|
||||
message.error=\u64CD\u4F5C\u5931\u8D25
|
||||
@@ -53,7 +52,7 @@ no.auth=\u6CA1\u6709\u64CD\u4F5C\u6743\u9650
|
||||
tag.error.1=\u540C\u4E00\u6240\u5C5E\u6A21\u5757\u4E0B,\u5C55\u793A\u533A\u57DF\u540D\u79F0\u4E0D\u80FD\u91CD\u590D\uFF01
|
||||
edit.ok=\u7F16\u8F91\u6210\u529F
|
||||
edit.error=\u7F16\u8F91\u5931\u8D25
|
||||
tag.error.2=\u8BE5\u5C55\u793A\u533A\u57DF\u6709\u5173\u8054\u6570\u636E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF01
|
||||
tag.delete.error.2=\u8BE5\u5C55\u793A\u533A\u57DF\u6709\u5173\u8054\u6570\u636E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF01
|
||||
check.data.error=\u8BF7\u9009\u62E9\u6570\u636E
|
||||
import.template.error=\u5BFC\u5165\u6A21\u677F\u9519\u8BEF
|
||||
zip.charset.error=zip\u538B\u7F29\u5305\u7F16\u7801\u9519\u8BEF
|
||||
@@ -62,3 +61,5 @@ you.have.not.data.auth=\u60A8\u6CA1\u6709{0}\u7684\u6570\u636E\u6743\u9650\uFF0C
|
||||
dict.delete.error=\u6807\u7B7E\u5DF2\u88AB\u5F15\u7528\uFF0C\u65E0\u6CD5\u5220\u9664
|
||||
parameter.not.recognized=\u53C2\u6570\u4E0D\u8BC6\u522B
|
||||
the.real.name.and.job.number.mismatch.export=\u7B2C{0}\u884C,\u59D3\u540D\u4E0E\u5DE5\u53F7\u4E0D\u5339\u914D
|
||||
tag.delete.error.3=\u5305\u542B\u56FA\u5B9A\u5B57\u6BB5,\u4E0D\u53EF\u5220\u9664
|
||||
tag.edit.error.1=\u56FA\u5B9A\u5B57\u6BB5,\u4E0D\u53EF\u4FEE\u6539
|
||||
|
||||
@@ -2,9 +2,8 @@ message=1
|
||||
message.operate.error=123{0}
|
||||
tag.add.\u5B57\u6BB5\u540D\u79F0\u592A\u957F=The field name you set is {0}, with a maximum length of 64 characters.
|
||||
tag.delete.\u5305\u542B\u56FA\u5B9A\u5B57\u6BB5,\u4E0D\u53EF\u5220\u9664=It contains fixed fields and cannot be deleted.
|
||||
tag.edit.\u56FA\u5B9A\u5B57\u6BB5,\u4E0D\u53EF\u4FEE\u6539=Fixed field, which cannot be modified.
|
||||
tag.edit.\u56FA\u5B9A\u5B57\u6BB5,\u4E0D\u53EF\u5220\u9664=Fixed field, cannot be deleted.
|
||||
tag.edit.\u5C5E\u6027\u5DF2\u5B58\u5728,\u8BF7\u68C0\u67E5=Attribute already exists, please check!
|
||||
tag.edit.error.2=Attribute already exists, please check!
|
||||
message.ok=Successful operation
|
||||
message.error=Operation failure
|
||||
message.empty.source=The source cannot be empty
|
||||
@@ -57,7 +56,7 @@ no.auth=No permission to operate
|
||||
tag.error.1=Under the same module, the display area name cannot be duplicate!
|
||||
edit.ok=edit ok
|
||||
edit.error=edit error
|
||||
tag.error.2=This exhibition area has associated data and cannot be deleted!
|
||||
tag.delete.error.2=This exhibition area has associated data and cannot be deleted!
|
||||
check.data.error=Please select data
|
||||
import.template.error=Import template error
|
||||
zip.charset.error=Zip charset error
|
||||
@@ -67,3 +66,5 @@ dict.delete.error=The label has been referenced and cannot be deleted
|
||||
parameter.not.recognized=parameter not recognized
|
||||
|
||||
the.real.name.and.job.number.mismatch.export=Line {0},real name and job number mismatch
|
||||
tag.delete.error.3=It contains fixed fields and cannot be deleted.
|
||||
tag.edit.error.1=Fixed field, which cannot be modified.
|
||||
|
||||
@@ -2,9 +2,8 @@ message=1
|
||||
message.operate.error=123{0}
|
||||
tag.add.\u5B57\u6BB5\u540D\u79F0\u592A\u957F=\u60A8\u8BBE\u7F6E\u7684\u5B57\u6BB5\u540D\u4E3A{0}\uFF0C\u6700\u957F\u4E3A64\u4F4D\u5B57\u7B26\u3002
|
||||
tag.delete.\u5305\u542B\u56FA\u5B9A\u5B57\u6BB5,\u4E0D\u53EF\u5220\u9664=\u5305\u542B\u56FA\u5B9A\u5B57\u6BB5,\u4E0D\u53EF\u5220\u9664
|
||||
tag.edit.\u56FA\u5B9A\u5B57\u6BB5,\u4E0D\u53EF\u4FEE\u6539=\u56FA\u5B9A\u5B57\u6BB5,\u4E0D\u53EF\u4FEE\u6539
|
||||
tag.edit.\u56FA\u5B9A\u5B57\u6BB5,\u4E0D\u53EF\u5220\u9664=\u56FA\u5B9A\u5B57\u6BB5,\u4E0D\u53EF\u5220\u9664
|
||||
tag.edit.\u5C5E\u6027\u5DF2\u5B58\u5728,\u8BF7\u68C0\u67E5=\u5C5E\u6027\u5DF2\u5B58\u5728,\u8BF7\u68C0\u67E5
|
||||
tag.edit.error.2=\u5C5E\u6027\u5DF2\u5B58\u5728,\u8BF7\u68C0\u67E5
|
||||
es.rmr.setQuality.overTen=\u8BF7\u6700\u591A\u9009\u62E910\u6761
|
||||
message.ok=\u64CD\u4F5C\u6210\u529F
|
||||
message.error=\u64CD\u4F5C\u5931\u8D25
|
||||
@@ -56,7 +55,7 @@ no.auth=\u6CA1\u6709\u64CD\u4F5C\u6743\u9650
|
||||
tag.error.1=\u540C\u4E00\u6240\u5C5E\u6A21\u5757\u4E0B,\u5C55\u793A\u533A\u57DF\u540D\u79F0\u4E0D\u80FD\u91CD\u590D\uFF01
|
||||
edit.ok=\u7F16\u8F91\u6210\u529F
|
||||
edit.error=\u7F16\u8F91\u5931\u8D25
|
||||
tag.error.2=\u8BE5\u5C55\u793A\u533A\u57DF\u6709\u5173\u8054\u6570\u636E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF01
|
||||
tag.delete.error.2=\u8BE5\u5C55\u793A\u533A\u57DF\u6709\u5173\u8054\u6570\u636E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF01
|
||||
check.data.error=\u8BF7\u9009\u62E9\u6570\u636E
|
||||
import.template.error=\u5BFC\u5165\u6A21\u677F\u9519\u8BEF
|
||||
zip.charset.error=zip\u538B\u7F29\u5305\u7F16\u7801\u9519\u8BEF
|
||||
@@ -66,3 +65,5 @@ dict.delete.error=\u6807\u7B7E\u5DF2\u88AB\u5F15\u7528\uFF0C\u65E0\u6CD5\u5220\u
|
||||
parameter.not.recognized=\u53C2\u6570\u4E0D\u8BC6\u522B
|
||||
|
||||
the.real.name.and.job.number.mismatch.export=\u7B2C{0}\u884C,\u59D3\u540D\u4E0E\u5DE5\u53F7\u4E0D\u5339\u914D
|
||||
tag.delete.error.3=\u5305\u542B\u56FA\u5B9A\u5B57\u6BB5,\u4E0D\u53EF\u5220\u9664
|
||||
tag.edit.error.1=\u56FA\u5B9A\u5B57\u6BB5,\u4E0D\u53EF\u4FEE\u6539
|
||||
|
||||
Reference in New Issue
Block a user