fix 77991 标签项管理--批量删除--批量删除成功的提示语为英文
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user