From c8f11c229b87d1652b6da0b15576c166cd51eb8b Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期三, 01 一月 2020 14:25:22 +0800
Subject: [PATCH] 首页悬浮图mapperbug修改,增加商品详情中的比例展示

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/ExtractServiceImpl.java |   23 ++++++++++-------------
 1 files changed, 10 insertions(+), 13 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 6f03b3d..6099276 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
@@ -172,10 +172,10 @@
 		updateExtract.setId(id);
 		updateExtract.setState(Extract.STATE_PROCESSING);
 		extractMapper.updateByPrimaryKeySelective(updateExtract);
-		//TODO 鏂扮増閮ㄧ讲鍚庡垹闄�
+		// TODO 鏂扮増閮ㄧ讲鍚庡垹闄�
 		// 鏀瑰彉璧勯噾璁板綍鐘舵��
-		UserMoneyDetail detail = userMoneyDetailService
-				.selectByTypeAndUidAndIdentifyCode(UserMoneyDetailTypeEnum.extract, find.getUserInfo().getId(), find.getId());
+		UserMoneyDetail detail = userMoneyDetailService.selectByTypeAndUidAndIdentifyCode(
+				UserMoneyDetailTypeEnum.extract, find.getUserInfo().getId(), find.getId());
 		if (detail != null) {
 			UserMoneyDetail update = new UserMoneyDetail(detail.getId());
 			update.setShow(true);
@@ -188,7 +188,7 @@
 		return null;
 	}
 
-	@Transactional
+	@Transactional(rollbackFor = Exception.class)
 	public synchronized void rejectExtract(long id, String reason, AdminUser admin)
 			throws ObjectStateException, NotExistObjectException {
 		Extract find = extractMapper.selectByPrimaryKey(id);
@@ -426,7 +426,7 @@
 			response = alipayClient.execute(request);
 			LogHelper.userErrorInfo("鎻愮幇:鏀粯瀹濋�氳繃鎻愮幇鎴愬姛-" + extract.getId());
 		} catch (AlipayApiException e) {
-			e.printStackTrace();
+			LogHelper.errorDetailInfo(e, "鏀粯瀹濊浆璐﹀紓甯�:" + extract.getId(), "");
 			LogHelper.userErrorInfo("鎻愮幇:鏀粯瀹濇彁鐜板紓甯革細" + response + ",鎻愮幇淇℃伅" + GsonUtil.toJson(extract));
 		}
 
@@ -541,7 +541,7 @@
 		return extractMapper.selectByPrimaryKey(id);
 	}
 
-	@Transactional
+	@Transactional(rollbackFor = Exception.class)
 	@Override
 	public void checkExtract(Long uid) throws ExtractException {
 		BigDecimal compensateMoney = extractMapper.computeCompensateByUid(uid);
@@ -1086,8 +1086,7 @@
 		}
 		return listOpendIDs;
 	}
-	
-	
+
 	@Override
 	public List<UserInfo> preAutoUserTo1212() throws Exception {
 		int page = 0;
@@ -1139,7 +1138,7 @@
 		}
 		return list;
 	}
-	
+
 	@Override
 	public List<String> getAutoExtractOpenIdsTo1212() throws Exception {
 		int page = 0;
@@ -1152,9 +1151,7 @@
 		String refundDate = DateUtil.reduceDayTostring(15, nowDate);
 
 		// 鎻愮幇閲戦
-		BigDecimal money = BigDecimal.valueOf(Constant.AUTO_EXTRACT_MONEY);
-		// 浣欓鏈�浣庨檺鍒�
-		BigDecimal minSurplus = BigDecimal.valueOf(Constant.AUTO_EXTRACT_MIN_SURPLUS);
+		BigDecimal money = BigDecimal.valueOf(1);
 
 		List<String> listOpendIDs = new ArrayList<String>();
 		// 棣栬appID
@@ -1179,7 +1176,7 @@
 			}
 
 			for (Long uid : listValid) {
-				UserInfo userInfo = subHongBaoByUid(uid, money, minSurplus);
+				UserInfo userInfo = subHongBaoByUid(uid, money, money);
 				if (userInfo != null) {
 					listOpendIDs.add(userInfo.getWxOpenId());
 					if (listOpendIDs.size() >= maxSize)

--
Gitblit v1.8.0