yujian
2020-05-06 eb1adc13eda955e8ef0fc9fe41fb246fa89b722d
fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/ExtractServiceImpl.java
@@ -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();
@@ -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();
      // 更新审核记录