From 6ec374c5d14e408d318a185d132ff7c49bb158c9 Mon Sep 17 00:00:00 2001 From: linbangquan <1437892690@qq.com> Date: Sat, 11 Nov 2023 13:16:31 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE-=E4=B8=AA=E6=80=A7=E5=8C=96=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E6=8F=90=E9=86=92=E7=9A=84=E6=96=87=E6=A1=88=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1020779955716096]个人设置-个性化弹窗提醒的文案错误 http://192.168.0.96:8090/demo/rdm.html#/bug-detail/939050947543040/939050947543057/1020779955716096 --- .../process/constvalue/UserProfile.java | 46 ++++--------------- .../constvalue/UserProfileOperate.java | 17 +++---- 2 files changed, 19 insertions(+), 44 deletions(-) diff --git a/src/main/java/neatlogic/framework/process/constvalue/UserProfile.java b/src/main/java/neatlogic/framework/process/constvalue/UserProfile.java index 28c19e6c..2187d74c 100755 --- a/src/main/java/neatlogic/framework/process/constvalue/UserProfile.java +++ b/src/main/java/neatlogic/framework/process/constvalue/UserProfile.java @@ -1,23 +1,20 @@ package neatlogic.framework.process.constvalue; import neatlogic.framework.common.constvalue.IUserProfile; -import neatlogic.framework.common.util.ModuleUtil; -import neatlogic.framework.dto.UserProfileVo; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import neatlogic.framework.util.I18n; +import neatlogic.framework.common.constvalue.IUserProfileOperate; +import neatlogic.framework.util.$; import java.util.Arrays; import java.util.List; public enum UserProfile implements IUserProfile { - PROCESSTASK_SUCCESS("processtasksuccess", new I18n("服务上报成功"), Arrays.asList(UserProfileOperate.KEEP_ON_CREATE_TASK, UserProfileOperate.VIEW_PROCESSTASK_DETAIL, UserProfileOperate.BACK_CATALOG_LIST)); + PROCESSTASK_SUCCESS("processtasksuccess", "nfpc.userprofile.processtasksuccess", Arrays.asList(UserProfileOperate.KEEP_ON_CREATE_TASK, UserProfileOperate.VIEW_PROCESSTASK_DETAIL, UserProfileOperate.BACK_CATALOG_LIST)); private final String value; - private final I18n text; - private final List userProfileOperateList; + private final String text; + private final List userProfileOperateList; - private UserProfile(String _value, I18n _text, List _userProfileOperateList) { + private UserProfile(String _value, String _text, List _userProfileOperateList) { this.value = _value; this.text = _text; this.userProfileOperateList = _userProfileOperateList; @@ -28,18 +25,12 @@ public enum UserProfile implements IUserProfile { } public String getText() { - return text.toString(); + return $.t(text); } - public JSONArray getUserProfileOperateList() { - JSONArray userProfileOperateArray = new JSONArray(); - for (UserProfileOperate userProfileOperate : userProfileOperateList) { - JSONObject json = new JSONObject(); - json.put("value", userProfileOperate.getValue()); - json.put("text", userProfileOperate.getText()); - userProfileOperateArray.add(json); - } - return userProfileOperateArray; + @Override + public List getProfileOperateList() { + return userProfileOperateList; } public static String getText(String value) { @@ -56,21 +47,4 @@ public enum UserProfile implements IUserProfile { return "process"; } - @Override - public UserProfileVo getUserProfile() { - UserProfileVo userProfileVo = new UserProfileVo(); - userProfileVo.setModuleId(getModuleId()); - userProfileVo.setModuleName(ModuleUtil.getModuleById(getModuleId()).getName()); - JSONArray userProfileArray = new JSONArray(); - for (UserProfile f : UserProfile.values()) { - JSONObject configJson = new JSONObject(); - configJson.put("value", f.getValue()); - configJson.put("text", f.getText()); - configJson.put("userProfileOperateList", f.getUserProfileOperateList()); - userProfileArray.add(configJson); - } - userProfileVo.setConfig(userProfileArray.toJSONString()); - return userProfileVo; - } - } diff --git a/src/main/java/neatlogic/framework/process/constvalue/UserProfileOperate.java b/src/main/java/neatlogic/framework/process/constvalue/UserProfileOperate.java index a7ff374f..d706b9a2 100755 --- a/src/main/java/neatlogic/framework/process/constvalue/UserProfileOperate.java +++ b/src/main/java/neatlogic/framework/process/constvalue/UserProfileOperate.java @@ -1,16 +1,17 @@ package neatlogic.framework.process.constvalue; -import neatlogic.framework.util.I18n; +import neatlogic.framework.common.constvalue.IUserProfileOperate; +import neatlogic.framework.util.$; -public enum UserProfileOperate { - KEEP_ON_CREATE_TASK("keeponcreatetask", new I18n("继续上报")), - VIEW_PROCESSTASK_DETAIL("viewprocesstaskdetail", new I18n("查看工单详情")), - BACK_CATALOG_LIST("backcataloglist", new I18n("返回服务目录列表")); +public enum UserProfileOperate implements IUserProfileOperate { + KEEP_ON_CREATE_TASK("keeponcreatetask", "nfpc.userprofileoperate.keeponcreatetask"), + VIEW_PROCESSTASK_DETAIL("viewprocesstaskdetail", "nfpc.userprofileoperate.viewprocesstaskdetail"), + BACK_CATALOG_LIST("backcataloglist", "nfpc.userprofileoperate.backcataloglist"); private String value; - private I18n text; + private String text; - private UserProfileOperate(String _value, I18n _text) { + UserProfileOperate(String _value, String _text) { this.value = _value; this.text = _text; } @@ -20,7 +21,7 @@ public enum UserProfileOperate { } public String getText() { - return text.toString(); + return $.t(text); } } -- Gitee