From 28cf328a098334b51a3e9d2d56f983fb8c862211 Mon Sep 17 00:00:00 2001 From: yujian <yujian@163.com> Date: 星期六, 23 五月 2020 09:54:38 +0800 Subject: [PATCH] 足迹、收藏订单兼容新需求 --- fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/ExtractServiceImpl.java | 33 +++++++++++++++++++++------------ 1 files changed, 21 insertions(+), 12 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 f226518..f824710 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 @@ -434,9 +434,9 @@ json.put("payee_type", "ALIPAY_LOGONID"); json.put("payee_account", extract.getAccount()); json.put("amount", extract.getMoney()); - json.put("payer_show_name", appName + "App" + "鎻愮幇"); + json.put("payer_show_name", appName); json.put("payee_real_name", extract.getName()); - json.put("remark", "鏉ヨ嚜" + appName + "App" + "鐨勬彁鐜�"); + json.put("remark", "鏉ヨ嚜閲嶅簡蹇渷绉戞妧鏈夐檺鍏徃"); request.setBizContent(json.toString()); AlipayFundTransToaccountTransferResponse response = null; try { @@ -523,7 +523,7 @@ * @param session */ @Transactional - private void extractSuccess(Extract extract) { + private void extractSuccess(Extract extract,String alipayNo) { // 鑰佺増鏈姛鑳� // List<MoneyRecord> list = moneyRecordDao.list("from MoneyRecord mr // where mr.extract.id = " + extract.getId()); @@ -546,21 +546,17 @@ } 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); + detailNew = UserMoneyDetailFactory.createExtract(extract, alipayNo); } catch (UserMoneyDetailException e) { e.printStackTrace(); } // 澶栨樉璐︽埛鏄庣粏 UserMoneyDetail userMoneyDetail = userMoneyDetailMapper.selectByTypeAndUidAndIdentifyCode( - UserMoneyDetailTypeEnum.extract, extract.getUserInfo().getId(), extract.getId()); + UserMoneyDetailTypeEnum.extractNew, extract.getUserInfo().getId(), extract.getId()); if (userMoneyDetail != null) { UserMoneyDetail detail = new UserMoneyDetail(userMoneyDetail.getId()); detail.setShow(true); @@ -603,8 +599,10 @@ // 鑾峰彇鎻愮幇锛岃幏鍙栨彁鐜伴獙璇� List<UserMoneyDetailTypeEnum> typeList = new ArrayList<>(); typeList.add(UserMoneyDetailTypeEnum.extract); + typeList.add(UserMoneyDetailTypeEnum.extractNew); typeList.add(UserMoneyDetailTypeEnum.extractReject); typeList.add(UserMoneyDetailTypeEnum.extractVerify); + typeList.add(UserMoneyDetailTypeEnum.extractVerifyNew); BigDecimal extractMoney = userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, new Date(0), now); extractMoney = extractMoney.abs(); @@ -624,7 +622,7 @@ BigDecimal after = hongBaoMoney.subtract(extractMoney.add(weiqaunMoney).add(balance).add(compensateMoney)); if (after.compareTo(new BigDecimal("0")) != 0) - throw new ExtractException(2, "缁撶畻璧勯噾寮傚父"); + throw new ExtractException(2, "缁撶畻璧勯噾寮傚父锛�" + after); } @Override @@ -673,7 +671,7 @@ if (response.isSuccess()) { String code = response.getCode(); if ("10000".equals(code)) { - extractSuccess(extract); + extractSuccess(extract,response.getOrderId()); } else { extractFail(extract, response.getSubMsg()); } @@ -741,7 +739,7 @@ @Override public void testExtractSuccess(Long id) { Extract extract = extractMapper.selectByPrimaryKey(id); - extractSuccess(extract); + extractSuccess(extract,null); Long uid = extract.getUserInfo().getId(); // 鏇存柊瀹℃牳璁板綍 @@ -1352,4 +1350,15 @@ } } + + @Override + public List<Extract> getExtractSucceedRecord(int page, int pageSize, Long uid) { + return extractMapper.getExtractSucceedRecord((page-1)*pageSize, pageSize, uid); + } + + @Override + public long countExtractSucceedRecord(Long uid) { + Long count = extractMapper.countExtractSucceedRecord(uid); + return count== null? 0 : count; + } } -- Gitblit v1.8.0