From 5aeec2b48b5c3f1ed9d9ecf8b95a8ddc2031d43d Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期三, 06 三月 2019 14:15:56 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java
index eb9f9c4..2e9c12c 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java
@@ -4,6 +4,7 @@
 import java.io.FileWriter;
 import java.io.IOException;
 import java.math.BigDecimal;
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
@@ -24,7 +25,6 @@
 import com.yeshi.fanli.dao.mybatis.BindingAccountMapper;
 import com.yeshi.fanli.dao.mybatis.MoneyRecordMapper;
 import com.yeshi.fanli.dao.mybatis.PidOrderMapper;
-import com.yeshi.fanli.dao.mybatis.ThreeSaleMapper;
 import com.yeshi.fanli.dao.mybatis.UserConnectHistoryMapper;
 import com.yeshi.fanli.dao.mybatis.UserInfoMapper;
 import com.yeshi.fanli.dao.mybatis.hongbao.HongBaoMapper;
@@ -48,6 +48,7 @@
 import com.yeshi.fanli.exception.UserAccountException;
 import com.yeshi.fanli.log.LogHelper;
 import com.yeshi.fanli.service.inter.hongbao.HongBaoService;
+import com.yeshi.fanli.service.inter.hongbao.ThreeSaleSerivce;
 import com.yeshi.fanli.service.inter.msg.UserAccountMsgNotificationService;
 import com.yeshi.fanli.service.inter.user.ForbiddenUserIdentifyCodeService;
 import com.yeshi.fanli.service.inter.user.SpreadUserImgService;
@@ -88,7 +89,7 @@
 	private OrderItemMapper orderItemMapper;
 
 	@Resource
-	private ThreeSaleMapper threeSaleMapper;
+	private ThreeSaleSerivce threeSaleSerivce;
 
 	@Resource
 	private PidOrderMapper pidOrderMapper;
@@ -198,7 +199,7 @@
 				if (lastUser == null) {
 					if (userInfo != null) {
 						// 浣垮垎閿�鍏崇郴鐢熸晥
-						threeSaleMapper.effectThreeSale(userInfo.getId());
+						threeSaleSerivce.effective(userInfo);
 						// 鏇存柊澶村儚涓庢樀绉�
 						UserInfo updateUserInfo = new UserInfo(userInfo.getId());
 						updateUserInfo.setNickName(weiXinUser.getNickname());
@@ -274,7 +275,7 @@
 							session.removeAttribute("LAST_LOGIN_USER");
 
 							// 浣垮垎閿�鍏崇郴鐢熸晥
-							threeSaleMapper.effectThreeSale(userInfo.getId());
+							threeSaleSerivce.effective(userInfo);
 
 							return new LoginResult(LoginResult.TYPE_NORMAL, userInfo);
 						} else {// 涓や釜璐﹀彿鎷ユ湁涓嶅悓鐨刄ID
@@ -288,7 +289,7 @@
 							result.setLessUser(lastUser);
 
 							// 浣垮垎閿�鍏崇郴鐢熸晥
-							threeSaleMapper.effectThreeSale(userInfo.getId());
+							threeSaleSerivce.effective(userInfo);
 							return result;
 						}
 
@@ -499,9 +500,9 @@
 		if (!StringUtil.isNullOrEmpty(mainUser.getPhone()) && !StringUtil.isNullOrEmpty(lessUser.getPhone()))
 			throw new UserAccountException(9, "涓や釜璐﹀彿閮界粦瀹氫簡鎵嬫満鍙风爜锛岃瑙g粦鍏朵腑涓�涓�");
 
-		if (lessUser.getMyHongBao().compareTo(new BigDecimal("20")) >= 0
-				&& mainUser.getMyHongBao().compareTo(new BigDecimal("20")) > 0)
-			throw new UserAccountException(10, String.format("璐︽埛ID:%s 鐨勮祫閲戣秴杩�20鍏冿紝涓轰繚璇佽祫閲戝畨鍏ㄨ鑱旂郴瀹㈡湇鎵撻��", lessUser.getId() + ""));
+		if (lessUser.getMyHongBao().compareTo(new BigDecimal("10")) >= 0
+				&& mainUser.getMyHongBao().compareTo(new BigDecimal("10")) > 0)
+			throw new UserAccountException(10, String.format("璐︽埛ID:%s 鐨勮祫閲戣秴杩�10鍏冿紝涓轰繚璇佽祫閲戝畨鍏ㄨ鑱旂郴瀹㈡湇鎵撻��", lessUser.getId() + ""));
 
 		// 鍒ゅ畾鏄惁缁戝畾浜嗗悓涓�鏀粯瀹�
 		List<BindingAccount> mainUserAccountList = bindingAccountMapper.selectByUid(mainUser.getId());
@@ -910,7 +911,7 @@
 		List<OrderItem> orderItemList = orderItemMapper.selectByUid(uid);
 
 		// 澶囦唤閭�璇峰叧绯�
-		List<ThreeSale> threeSaleList = threeSaleMapper.selectByUid(uid);
+		List<ThreeSale> threeSaleList = new ArrayList<>();
 
 		// 澶囦唤鍒嗕韩璧�
 		List<PidOrder> pidOrderList = pidOrderMapper.selectByUid(uid);

--
Gitblit v1.8.0