From 3cf41feae65a864fc00d72fdd09a676372fc3b27 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期五, 15 三月 2019 12:22:20 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/UserAccountController.java |   73 +++++++++++++++++++++---------------
 1 files changed, 43 insertions(+), 30 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/UserAccountController.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/UserAccountController.java
index 0b21371..18ad16d 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/UserAccountController.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/UserAccountController.java
@@ -21,7 +21,7 @@
 import com.yeshi.fanli.entity.bus.user.SMSHistory;
 import com.yeshi.fanli.entity.bus.user.UserInfo;
 import com.yeshi.fanli.entity.bus.user.WeiXinUser;
-import com.yeshi.fanli.entity.system.System;
+import com.yeshi.fanli.entity.system.BusinessSystem;
 import com.yeshi.fanli.entity.taobao.ClientTBPid;
 import com.yeshi.fanli.entity.taobao.PidUser;
 import com.yeshi.fanli.entity.taobao.TBPid;
@@ -30,9 +30,8 @@
 import com.yeshi.fanli.exception.AlipayTransferException;
 import com.yeshi.fanli.exception.UserAccountException;
 import com.yeshi.fanli.log.LogHelper;
+import com.yeshi.fanli.service.inter.config.BusinessSystemService;
 import com.yeshi.fanli.service.inter.config.ConfigService;
-import com.yeshi.fanli.service.inter.config.InviteGetMoneyService;
-import com.yeshi.fanli.service.inter.config.SystemService;
 import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
 import com.yeshi.fanli.service.inter.hongbao.HongBaoV2Service;
 import com.yeshi.fanli.service.inter.hongbao.ThreeSaleSerivce;
@@ -49,6 +48,7 @@
 import com.yeshi.fanli.service.inter.user.TBPidService;
 import com.yeshi.fanli.service.inter.user.UserAccountService;
 import com.yeshi.fanli.service.inter.user.UserInfoService;
+import com.yeshi.fanli.service.inter.user.UserMoneyService;
 import com.yeshi.fanli.service.inter.user.UserShareGoodsRecordService;
 import com.yeshi.fanli.service.inter.user.UserSystemCouponService;
 import com.yeshi.fanli.util.Constant;
@@ -77,7 +77,6 @@
 	@Resource
 	private OrderService orderService;
 
-
 	@Resource
 	private HongBaoV2Service hongBaoV2Service;
 
@@ -91,7 +90,7 @@
 	private ConfigService configService;
 
 	@Resource
-	private SystemService systemService;
+	private BusinessSystemService businessSystemService;
 
 	@Resource
 	private ShamUserService shamUserService;
@@ -115,9 +114,6 @@
 	private RedisManager redisManager;
 
 	@Resource
-	private InviteGetMoneyService inviteGetMoneyService;
-
-	@Resource
 	private TBPidService tbPidService;
 
 	@Resource
@@ -134,9 +130,12 @@
 
 	@Resource
 	private ForbiddenUserIdentifyCodeService forbiddenUserIdentifyCodeService;
-	
+
 	@Resource
 	private UserSystemCouponService userSystemCouponService;
+
+	@Resource
+	private UserMoneyService userMoneyService;
 
 	private static final String PASSWORD_MAX_ERROR = "password_max_error";
 	private static final String EXTRACT_MIN_MONEY = "extract_min_money";
@@ -159,7 +158,8 @@
 	public void login(AcceptData acceptData, String code, String vcode, String phone, boolean wxinstall,
 			String tbOpenid, String tbNickName, String tbPortrait, String tbSession, int loginType, Boolean first,
 			HttpSession session, HttpServletRequest request, PrintWriter out) {
-		System system = systemService.getSystemCache(acceptData.getPlatform(), acceptData.getPackages());
+		BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
+				acceptData.getPackages());
 		if (system == null) {
 			out.print(JsonUtil.loadFalseResult("绯荤粺涓嶅瓨鍦�"));
 			return;
@@ -220,8 +220,8 @@
 			root.put("type", result.getType());
 			root.put("data", data);
 			out.print(JsonUtil.loadTrueResult(root));
-			
-			final UserInfo uuser =  result.getUser();
+
+			final UserInfo uuser = result.getUser();
 			ThreadUtil.run(new Runnable() {
 				public void run() {
 					try {
@@ -238,7 +238,7 @@
 					}
 				}
 			});
-			
+
 		} catch (UserAccountException e) {
 			try {
 				LogHelper.cookieLog("鐧诲綍鍑洪敊:" + e.getCode() + "-" + e.getMessage());
@@ -247,7 +247,7 @@
 			}
 			out.print(JsonUtil.loadFalseResult(e.getCode(), e.getMsg()));
 		}
-		
+
 	}
 
 	/**
@@ -265,7 +265,8 @@
 	@RequestMapping(value = "register")
 	public void register(AcceptData acceptData, String tbOpenid, String tbNickName, String tbPortrait, String vcode,
 			String phone, HttpServletRequest request, HttpSession session, PrintWriter out) {
-		System system = systemService.getSystemCache(acceptData.getPlatform(), acceptData.getPackages());
+		BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
+				acceptData.getPackages());
 		if (system == null) {
 			out.print(JsonUtil.loadFalseResult("绯荤粺涓嶅瓨鍦�"));
 			return;
@@ -325,7 +326,8 @@
 	 */
 	@RequestMapping(value = "connect")
 	public void connect(AcceptData acceptData, long mainUid, long lessUid, HttpSession session, PrintWriter out) {
-		System system = systemService.getSystemCache(acceptData.getPlatform(), acceptData.getPackages());
+		BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
+				acceptData.getPackages());
 		if (system == null) {
 			out.print(JsonUtil.loadFalseResult("绯荤粺涓嶅瓨鍦�"));
 			return;
@@ -358,7 +360,8 @@
 	 */
 	@RequestMapping(value = "getuid")
 	public void getUid(AcceptData acceptData, String code, String tbOpenid, String phone, PrintWriter out) {
-		System system = systemService.getSystemCache(acceptData.getPlatform(), acceptData.getPackages());
+		BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
+				acceptData.getPackages());
 		if (system == null) {
 			out.print(JsonUtil.loadFalseResult("绯荤粺涓嶅瓨鍦�"));
 			return;
@@ -422,7 +425,8 @@
 	 */
 	@RequestMapping(value = "bindPhone")
 	public void bindPhone(AcceptData acceptData, Long uid, String vcode, String phone, PrintWriter out) {
-		System system = systemService.getSystemCache(acceptData.getPlatform(), acceptData.getPackages());
+		BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
+				acceptData.getPackages());
 		if (system == null) {
 			out.print(JsonUtil.loadFalseResult("绯荤粺涓嶅瓨鍦�"));
 			return;
@@ -485,7 +489,8 @@
 	 */
 	@RequestMapping(value = "unBindPhone")
 	public void unBindPhone(AcceptData acceptData, Long uid, String phone, PrintWriter out) {
-		System system = systemService.getSystemCache(acceptData.getPlatform(), acceptData.getPackages());
+		BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
+				acceptData.getPackages());
 		if (system == null) {
 			out.print(JsonUtil.loadFalseResult("绯荤粺涓嶅瓨鍦�"));
 			return;
@@ -521,7 +526,8 @@
 	@RequestMapping(value = "bindTaoBao")
 	public void bindTaoBao(AcceptData acceptData, Long uid, String tbOpenid, String tbNickName, String tbPortrait,
 			String tbSession, PrintWriter out) {
-		System system = systemService.getSystemCache(acceptData.getPlatform(), acceptData.getPackages());
+		BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
+				acceptData.getPackages());
 		if (system == null) {
 			out.print(JsonUtil.loadFalseResult("绯荤粺涓嶅瓨鍦�"));
 			return;
@@ -583,7 +589,8 @@
 	 */
 	@RequestMapping(value = "unBindTaoBao")
 	public void unBindTaoBao(AcceptData acceptData, Long uid, PrintWriter out) {
-		System system = systemService.getSystemCache(acceptData.getPlatform(), acceptData.getPackages());
+		BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
+				acceptData.getPackages());
 		if (system == null) {
 			out.print(JsonUtil.loadFalseResult("绯荤粺涓嶅瓨鍦�"));
 			return;
@@ -607,7 +614,8 @@
 	 */
 	@RequestMapping(value = "changeWX")
 	public void changeWX(AcceptData acceptData, Long uid, String code, PrintWriter out) {
-		System system = systemService.getSystemCache(acceptData.getPlatform(), acceptData.getPackages());
+		BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
+				acceptData.getPackages());
 		if (system == null) {
 			out.print(JsonUtil.loadFalseResult("绯荤粺涓嶅瓨鍦�"));
 			return;
@@ -654,7 +662,8 @@
 	 */
 	@RequestMapping(value = "getphone")
 	public void getPhone(AcceptData acceptData, Long uid, PrintWriter out) {
-		System system = systemService.getSystemCache(acceptData.getPlatform(), acceptData.getPackages());
+		BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
+				acceptData.getPackages());
 		if (system == null) {
 			out.print(JsonUtil.loadFalseResult("绯荤粺涓嶅瓨鍦�"));
 			return;
@@ -674,7 +683,8 @@
 
 	@RequestMapping(value = "verifyvcodeforbind")
 	public void verifyVcodeForbind(AcceptData acceptData, Long uid, String vcode, PrintWriter out) {
-		System system = systemService.getSystemCache(acceptData.getPlatform(), acceptData.getPackages());
+		BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
+				acceptData.getPackages());
 		if (system == null) {
 			out.print(JsonUtil.loadFalseResult("绯荤粺涓嶅瓨鍦�"));
 			return;
@@ -719,7 +729,8 @@
 	 */
 	@RequestMapping(value = "bindalipay")
 	public void bindAlipay(AcceptData acceptData, Long uid, String name, String account, PrintWriter out) {
-		System system = systemService.getSystemCache(acceptData.getPlatform(), acceptData.getPackages());
+		BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
+				acceptData.getPackages());
 		if (system == null) {
 			out.print(JsonUtil.loadFalseResult("绯荤粺涓嶅瓨鍦�"));
 			return;
@@ -774,7 +785,8 @@
 	@RequestMapping(value = "bindalipaywithverify")
 	public void bindAlipayWithVerify(AcceptData acceptData, Long uid, String name, String account, PrintWriter out) {
 
-		System system = systemService.getSystemCache(acceptData.getPlatform(), acceptData.getPackages());
+		BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
+				acceptData.getPackages());
 		if (system == null) {
 			out.print(JsonUtil.loadFalseResult("绯荤粺涓嶅瓨鍦�"));
 			return;
@@ -864,7 +876,8 @@
 	@RequestMapping(value = "bindalipaywithverifynew")
 	public void bindAlipayWithVerifyNew(AcceptData acceptData, Long uid, String name, String account, PrintWriter out) {
 
-		System system = systemService.getSystemCache(acceptData.getPlatform(), acceptData.getPackages());
+		BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
+				acceptData.getPackages());
 		if (system == null) {
 			out.print(JsonUtil.loadFalseResult("绯荤粺涓嶅瓨鍦�"));
 			return;
@@ -984,16 +997,16 @@
 			out.print(JsonUtil.loadFalseResult(2, "鐢ㄦ埛涓嶅瓨鍦�"));
 			return;
 		}
-		BigDecimal moneyToday = inviteGetMoneyService.getMoneyToday(uid + "");
+		BigDecimal moneyToday = userMoneyService.getMoneyToday(uid);
 		if (moneyToday == null) {
 			moneyToday = new BigDecimal(0);
 		}
-		BigDecimal moneyMonth = inviteGetMoneyService.getMoneyMonth(uid + "");
+		BigDecimal moneyMonth = userMoneyService.getMoneyMonth(uid);
 		if (moneyMonth == null) {
 			moneyMonth = new BigDecimal(0);
 		}
 
-		BigDecimal moneyLastMonth = inviteGetMoneyService.getMoneyLastMonth(uid + "");
+		BigDecimal moneyLastMonth = userMoneyService.getMoneyLastMonth(uid);
 		BigDecimal unOpenmoney = hongBaoV2Service.getUnRecievedFanLiMoney(uid);
 		BigDecimal totalFanMoney = hongBaoV2Service.getTotalFanLiMoney(uid);
 		JSONObject data = new JSONObject();

--
Gitblit v1.8.0