From 69bee82b81626b82b7f39f0e459e4f56b1699b51 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期三, 13 三月 2019 12:02:16 +0800
Subject: [PATCH] 正式数据库修改

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/ThreeSaleSerivceImpl.java |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/ThreeSaleSerivceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/ThreeSaleSerivceImpl.java
index 2733077..a2eefb0 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/ThreeSaleSerivceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/ThreeSaleSerivceImpl.java
@@ -102,6 +102,7 @@
 	public void bind(UserInfo worker, UserInfo inviter) throws ThreeSaleException {
 		if (worker == null || inviter == null)
 			throw new ThreeSaleException(1, "鐢ㄦ埛淇℃伅涓虹┖");
+
 		if (worker.getId() == null)// 璇ョ敤鎴疯繕涓嶅瓨鍦�
 		{
 			// 淇濆瓨鐢ㄦ埛
@@ -132,6 +133,9 @@
 			userInviteMsgNotificationService.inviteScan(inviter.getId(), threeSale);
 
 		} else {// 鏄凡缁忓瓨鍦ㄧ殑鐢ㄦ埛
+			if (worker.getId().longValue() == inviter.getId())
+				throw new ThreeSaleException(4, "涓嶈兘缁戝畾鑷繁");
+
 			worker = userInfoService.selectByPKey(worker.getId());
 
 			// 鐢ㄦ埛宸茬粡瀛樺湪鎴戜滑鐨勭敤鎴峰簱涓�
@@ -212,7 +216,7 @@
 						update.setState(true);
 						update.setSucceedTime(System.currentTimeMillis());
 						threeSaleMapper.updateByPrimaryKeySelective(update);
-						ThreeSaleCMQManager.getInstance().addThreeSaleMsg(list.get(0));//娣诲姞閫氱煡
+						ThreeSaleCMQManager.getInstance().addThreeSaleMsg(list.get(0));// 娣诲姞閫氱煡
 						userInviteMsgNotificationService.inviteSuccess(inviter.getId(), list.get(0));
 					}
 				}

--
Gitblit v1.8.0