From ee1d39f11b9483b64a88029f1755a6e7166fea15 Mon Sep 17 00:00:00 2001 From: yujian <yujian@163.com> Date: 星期日, 26 四月 2020 16:49:21 +0800 Subject: [PATCH] 等级显示问题 --- fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/ExtractServiceImpl.java | 64 +++++++++++++++---------------- 1 files changed, 31 insertions(+), 33 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/ExtractServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/ExtractServiceImpl.java index 210e1b9..f226518 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/ExtractServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/ExtractServiceImpl.java @@ -178,7 +178,6 @@ updateExtract.setId(id); updateExtract.setState(Extract.STATE_PROCESSING); extractMapper.updateByPrimaryKeySelective(updateExtract); - // TODO 鏂扮増閮ㄧ讲鍚庡垹闄� // 鏀瑰彉璧勯噾璁板綍鐘舵�� UserMoneyDetail detail = userMoneyDetailService.selectByTypeAndUidAndIdentifyCode( UserMoneyDetailTypeEnum.extract, find.getUserInfo().getId(), find.getId()); @@ -302,7 +301,7 @@ auditRecord.setExtract(extract); Date minTime = new Date(System.currentTimeMillis() - 1000 * 60 * 60 * 24 * 180L); - + extractAuditRecordMapper.insertSelective(auditRecord); ThreadUtil.run(new Runnable() { @@ -311,14 +310,15 @@ public void run() { // 缁熻鏁版嵁 int less10Count = commonOrderCountService.countOderByUidAndLess10(user.getId()); - ExtractAuditRecord update=new ExtractAuditRecord(); + ExtractAuditRecord update = new ExtractAuditRecord(); update.setId(auditRecord.getId()); - int orderCount50More = orderUserStatisticService.countOrderCount100MoreByUidAndMinTime(user.getId(), minTime); + int orderCount50More = orderUserStatisticService.countOrderCount100MoreByUidAndMinTime(user.getId(), + minTime); BigDecimal weiQuanOrderFanAmount = orderUserStatisticService.sumWeiQuanOrderFanAmountByUid(user.getId(), minTime); int weiQuanOrderCount = orderUserStatisticService.countWeiQuanOrderByUid(user.getId(), minTime); - update.setExtraInfoStr(new Gson().toJson( - new ExtractOrderStatisticDTO(orderCount50More, weiQuanOrderCount, weiQuanOrderFanAmount, 0, less10Count))); + update.setExtraInfoStr(new Gson().toJson(new ExtractOrderStatisticDTO(orderCount50More, + weiQuanOrderCount, weiQuanOrderFanAmount, 0, less10Count))); extractAuditRecordMapper.updateByPrimaryKeySelective(update); } }); @@ -326,7 +326,7 @@ // 鏂扮増璧勯噾璇︽儏 UserMoneyDetail userMoneyDetail = null; try { - userMoneyDetail = UserMoneyDetailFactory.createExtract(extract); + userMoneyDetail = UserMoneyDetailFactory.createExtract(extract, null); } catch (UserMoneyDetailException e2) { try { LogHelper.errorDetailInfo(e2); @@ -546,8 +546,31 @@ } catch (Exception e) { e.printStackTrace(); } + List<PayInfo> payInfoList = payInfoMapper.getListbyExtractId(extract.getId()); + String alipayNo = ""; + if (payInfoList != null && payInfoList.size() > 0) + alipayNo = payInfoList.get(0).getOrderId(); + + UserMoneyDetail detailNew = null; + try { + detailNew = UserMoneyDetailFactory.createExtract(updateExtract, alipayNo); + } catch (UserMoneyDetailException e) { + e.printStackTrace(); + } + + // 澶栨樉璐︽埛鏄庣粏 + UserMoneyDetail userMoneyDetail = userMoneyDetailMapper.selectByTypeAndUidAndIdentifyCode( + UserMoneyDetailTypeEnum.extract, extract.getUserInfo().getId(), extract.getId()); + if (userMoneyDetail != null) { + UserMoneyDetail detail = new UserMoneyDetail(userMoneyDetail.getId()); + detail.setShow(true); + detail.setUpdateTime(new Date()); + if (detailNew != null) + detail.setDescInfo(detailNew.getDescInfo()); + userMoneyDetailMapper.updateByPrimaryKeySelective(detail); + } // 鏂扮増閫氱煡 - userMoneyMsgNotificationService.extractSuccess(extract); + userMoneyMsgNotificationService.extractSuccess(extract, alipayNo); } /** @@ -710,16 +733,6 @@ // 鏇存柊鎻愮幇璁板綍瀹℃牳琛� extractAuditRecordMapper.updateByPrimaryKeySelective(auditRecord); - } - - // 澶栨樉璐︽埛鏄庣粏 - UserMoneyDetail userMoneyDetail = userMoneyDetailMapper.selectByTypeAndUidAndIdentifyCode( - UserMoneyDetailTypeEnum.extract, extract.getUserInfo().getId(), extract.getId()); - if (userMoneyDetail != null) { - UserMoneyDetail detail = new UserMoneyDetail(userMoneyDetail.getId()); - detail.setShow(true); - detail.setUpdateTime(new Date()); - userMoneyDetailMapper.updateByPrimaryKeySelective(detail); } } @@ -900,10 +913,6 @@ LogHelper.errorDetailInfo(e); } - // 4銆佸彂閫佹秷鎭�氱煡 - String desc = "涓轰繚闅滀綘鐨勮处鎴蜂綑棰濆畨鍏紝鑷姩鎻愮幇閲戦灏嗕笉浼氶珮浜�5鍏�"; - String beizu = "璐︽埛涓墿浣欎綑棰濊鍦ㄦ湰App鍐呭畬鎴愭彁鐜�"; - userMoneyMsgNotificationService.extractAuto(extractRecord, "鏈鍙�-鎻愮幇涓�", desc, beizu); } private boolean parseSendResult(String result) { @@ -1242,11 +1251,6 @@ // 璧勯噾璁$畻 userMoneyService.subUserMoney(userInfo.getId(), money, detail); - // 4銆佸彂閫佹秷鎭�氱煡 - String desc = "涓轰繚闅滀綘鐨勮处鎴蜂綑棰濆畨鍏紝鑷姩鎻愮幇閲戦灏嗕笉浼氶珮浜�5鍏�"; - String beizu = "璐︽埛涓墿浣欎綑棰濊鍦ㄦ湰App鍐呭畬鎴愭彁鐜�"; - userMoneyMsgNotificationService.extractAuto(extractRecord, "鏈鍙�-鎻愮幇涓�", desc, beizu); - // 婊¤冻鏉′欢杩斿洖淇℃伅 return userInfo; } @@ -1332,8 +1336,6 @@ extractWeiXinRecordService.updateByPrimaryKeySelective(updeteRecord); if (ExtractWeiXinRecord.RECEIVED.equals(status)) { - // 鍙戦�佹秷鎭�氱煡 - userMoneyMsgNotificationService.extractAuto(record, "宸查鍙�-宸叉彁鐜�", null, null); } else if (ExtractWeiXinRecord.REFUND.equals(status)) { // 璧勯噾鏄庣粏 UserMoneyDetail detail = new UserMoneyDetail(); @@ -1345,12 +1347,8 @@ detail.setType(UserMoneyDetailTypeEnum.extractAutoWXRefund); detail.setUpdateTime(new Date()); detail.setUserInfo(new UserInfo(record.getUid())); - // 璧勯噾璁$畻 userMoneyService.addUserMoney(record.getUid(), record.getMoney(), detail); - - // 鍙戦�佹秷鎭�氱煡 - userMoneyMsgNotificationService.extractAuto(record, "宸查��鍥�-浣欓涓�", null, null); } } -- Gitblit v1.8.0