From 99f131731d056d3d2f7d4b20e0d2578f57602362 Mon Sep 17 00:00:00 2001 From: yujian <yujian@163.com> Date: 星期二, 14 四月 2020 11:06:51 +0800 Subject: [PATCH] 消息调整 --- fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgMoneyDetailFactory.java | 26 ++++++++++++-------------- 1 files changed, 12 insertions(+), 14 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgMoneyDetailFactory.java b/fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgMoneyDetailFactory.java index 3d95283..03269a2 100644 --- a/fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgMoneyDetailFactory.java +++ b/fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgMoneyDetailFactory.java @@ -41,7 +41,7 @@ new ClientTextStyleVO(String.format("鏀粯瀹�:%s-濮撳悕:%s",account, name), ClientTextStyleVO.COLOR_CONTENT))); List<ClientTextStyleVO> contentList = new ArrayList<>(); - contentList.add(new ClientTextStyleVO("楼" + extract.getMoney().setScale(2), ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT)); + contentList.add(new ClientTextStyleVO("楼" + extract.getMoney().setScale(2, BigDecimal.ROUND_DOWN), ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT)); if (!StringUtil.isNullOrEmpty(alipayNo)) { contentList.add(new ClientTextStyleVO(String.format("&鏀粯瀹濊鍗曞彿: %s", "*" + alipayNo.substring(alipayNo.length() - 10)), ClientTextStyleVO.COLOR_CONTENT)); } @@ -98,7 +98,7 @@ listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("鎻愮幇璐﹀彿", ClientTextStyleVO.COLOR_TITLE), new ClientTextStyleVO(String.format("鏀粯瀹�:%s-濮撳悕:%s",account, name), ClientTextStyleVO.COLOR_CONTENT))); listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("鎵撴閲戦", ClientTextStyleVO.COLOR_TITLE), - new ClientTextStyleVO(money + "", ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT))); + new ClientTextStyleVO(money.setScale(2, BigDecimal.ROUND_DOWN) + "", ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT))); listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("鎻愮幇璐﹀彿", ClientTextStyleVO.COLOR_TITLE), new ClientTextStyleVO(String.format("鎻愮幇璐﹀彿鏀跺埌涓�绗旓紝鏉ヨ嚜%s鐨勮浆璐︼紝鍗崇粦瀹氭垚鍔�", appName), ClientTextStyleVO.COLOR_CONTENT))); List<ClientTextStyleVO> contentList = new ArrayList<>(); @@ -137,14 +137,12 @@ if (change) { changeWay = "淇敼"; } - String name = filterName(valid.getName()); - String account = filterAccount(valid.getAccount()); List<CommonMsgItemVO> listMsg = new ArrayList<>(); listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("楠岃瘉鐘舵��", ClientTextStyleVO.COLOR_TITLE), new ClientTextStyleVO(String.format("鎻愮幇璐﹀彿%s澶辫触", changeWay), ClientTextStyleVO.COLOR_CONTENT))); listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("鎻愮幇璐﹀彿", ClientTextStyleVO.COLOR_TITLE), - new ClientTextStyleVO(String.format("鏀粯瀹�:%s-濮撳悕:%s",account, name), ClientTextStyleVO.COLOR_CONTENT))); + new ClientTextStyleVO(String.format("鏀粯瀹�:%s-濮撳悕:%s",valid.getAccount(), valid.getName()), ClientTextStyleVO.COLOR_CONTENT))); listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("鍘熷洜", ClientTextStyleVO.COLOR_TITLE), new ClientTextStyleVO("璇蜂粩缁嗘牳瀵瑰~鍐欒处鍙锋槸鍚︽湁璇垨璺濅笂涓�娆′慨鏀规椂闀挎槸鍚﹁秴杩�30澶�", ClientTextStyleVO.COLOR_CONTENT))); @@ -196,7 +194,7 @@ sourceName += "-杩斿埄璁㈠崟"; typeEnum = MsgTypeMoneyTypeEnum.fanli; } else if (Constant.TYPE_SHAER == type) { - fanliName = "鍒嗕韩濂栭噾:"; + fanliName = "鍒嗕韩濂栭噾"; sourceName += "-鍒嗕韩璁㈠崟"; typeEnum = MsgTypeMoneyTypeEnum.share; } @@ -221,8 +219,8 @@ new ClientTextStyleVO(fanliName, ClientTextStyleVO.COLOR_CONTENT))); List<ClientTextStyleVO> contentList2 = new ArrayList<>(); - contentList2.add(new ClientTextStyleVO("楼" + money, ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT)); - contentList2.add(new ClientTextStyleVO("锛堣处鎴蜂綑棰澛ワ級"+ balance, ClientTextStyleVO.COLOR_CONTENT)); + contentList2.add(new ClientTextStyleVO("楼" + money.setScale(2, BigDecimal.ROUND_DOWN), ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT)); + contentList2.add(new ClientTextStyleVO("锛堣处鎴蜂綑棰澛�"+ balance.setScale(2, BigDecimal.ROUND_DOWN) + "锛�", ClientTextStyleVO.COLOR_CONTENT)); listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("鍒拌处閲戦", ClientTextStyleVO.COLOR_TITLE), contentList2)); listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("澶囨敞", ClientTextStyleVO.COLOR_TITLE), new ClientTextStyleVO("濡傛湁鐤戦棶璇疯仈绯讳汉宸ュ鏈�", ClientTextStyleVO.COLOR_CONTENT))); @@ -288,10 +286,10 @@ listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("閫�鍥炲師鍥�", ClientTextStyleVO.COLOR_TITLE), new ClientTextStyleVO(weiquan, ClientTextStyleVO.COLOR_CONTENT))); listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("鍒拌处閲戦", ClientTextStyleVO.COLOR_TITLE), - new ClientTextStyleVO("楼" +fanliMoney.setScale(2) + "锛堝師鍒拌处閲戦锛�", ClientTextStyleVO.COLOR_CONTENT))); + new ClientTextStyleVO("楼" +fanliMoney.setScale(2, BigDecimal.ROUND_DOWN) + "锛堝師鍒拌处閲戦锛�", ClientTextStyleVO.COLOR_CONTENT))); List<ClientTextStyleVO> contentList2 = new ArrayList<>(); - contentList2.add(new ClientTextStyleVO("楼" + money.setScale(2), ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT)); + contentList2.add(new ClientTextStyleVO("楼" + money.setScale(2, BigDecimal.ROUND_DOWN), ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT)); contentList2.add(new ClientTextStyleVO("锛�"+ weiquanMoney + "锛�", ClientTextStyleVO.COLOR_CONTENT)); listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("閫�鍥為噾棰�", ClientTextStyleVO.COLOR_TITLE), contentList2)); @@ -337,8 +335,8 @@ new ClientTextStyleVO("鍥㈤槦鏀剁泭", ClientTextStyleVO.COLOR_CONTENT), true)); List<ClientTextStyleVO> contentList2 = new ArrayList<>(); - contentList2.add(new ClientTextStyleVO("楼" + money.setScale(2), ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT)); - contentList2.add(new ClientTextStyleVO("锛堣处鎴蜂綑棰澛� "+ balance.setScale(2)+"锛�", ClientTextStyleVO.COLOR_CONTENT)); + contentList2.add(new ClientTextStyleVO("楼" + money.setScale(2, BigDecimal.ROUND_DOWN), ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT)); + contentList2.add(new ClientTextStyleVO("锛堣处鎴蜂綑棰澛� "+ balance.setScale(2, BigDecimal.ROUND_DOWN)+"锛�", ClientTextStyleVO.COLOR_CONTENT)); listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("鍒拌处閲戦", ClientTextStyleVO.COLOR_TITLE), contentList2)); listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("澶囨敞", ClientTextStyleVO.COLOR_TITLE), new ClientTextStyleVO("濡傛湁鐤戦棶璇疯仈绯讳汉宸ュ鏈�", ClientTextStyleVO.COLOR_CONTENT))); @@ -392,14 +390,14 @@ } else {// 鍏朵粬 if (alipayAccount.length() >= 6) { for (int i = 0; i < alipayAccount.length(); i++) { - if (i < 3 || i >= alipayAccount.length() - 2) + if (i < alipayAccount.length() - 4) account += alipayAccount.charAt(i); else account += "*"; } } else { for (int i = 0; i < alipayAccount.length(); i++) { - if (i < 1 || i >= alipayAccount.length() - 1) + if (i < alipayAccount.length() - 1) account += alipayAccount.charAt(i); else account += "*"; -- Gitblit v1.8.0