Explorar o código

修改开发签单客户拉起列表BUG

anderx %!s(int64=4) %!d(string=hai) anos
pai
achega
8f533a52f3

+ 8 - 5
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -521,10 +521,7 @@
 			left join district_glossory dg2 on b.location_city = dg2.id
 			left join district_glossory dg3 on b.location_area = dg3.id
 		where
-			a.type = 1
-			and a.share_type = 1
-			and a.status != 1
-			and a.source != 0
+			a.type = 1 and a.share_type = 1 and a.status != 1 and a.source != 0
 		<if test="aid != null and aid !=''">
 			and a.aid = #{aid,jdbcType=VARCHAR}
 		</if>
@@ -1637,7 +1634,13 @@
     
     <select id="selectSignedCustomerByName"  resultType="com.goafanti.customer.bo.CustomerSimpleBo">
    	 	select b.id,b.identify_name as name from user b  
-	where b.status != 1 and b.channel=1
+	where b.status != 1
+	<if test="type==2">
+	and b.channel=1
+	</if>
+	<if test="type==1">
+	and b.share_type=2
+	</if>  
 	and b.aid = #{aid}  and b.identify_name like concat('%',#{name},'%')
     </select>
     

+ 12 - 8
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -787,14 +787,18 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	 * @param ub
 	 */
 	private void followProject(String uid, int x) {
-		Date date = null;
-		if (x == 1)
-			date = new Date();
+		Date date = new Date();
 		String aid = TokenManager.getAdminId();
-		if (userLockReleaseMapper.updateUserMid(uid, aid, date, date) < 1) {
-			userLockReleaseMapper.insertUserMid(uid, aid, date, date);
+		if(x==0) {
+			if (userLockReleaseMapper.updateUserMid(uid,aid,date,null)<1) {
+				userLockReleaseMapper.insertUserMid(uid,aid,date,null);
+			}
+		}else {
+			if (userLockReleaseMapper.updateUserMid(uid,aid,date,date)<1) {
+				userLockReleaseMapper.insertUserMid(uid,aid,date,date);
+			}
 		}
-
+			
 	}
 
 	@SuppressWarnings("unused")
@@ -1716,12 +1720,12 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 
 	@Override
 	public List<CustomerSimpleBo> getSignedCustomerByName(String name) {
-		return userMapper.selectSignedCustomerByName(name, TokenManager.getAdminId(), 2);
+		return userMapper.selectSignedCustomerByName(name, TokenManager.getAdminId(), 1);
 	}
 
 	@Override
 	public List<CustomerSimpleBo> getChannelCustomerByName(String name) {
-		return userMapper.selectSignedCustomerByName(name, TokenManager.getAdminId(), 3);
+		return userMapper.selectSignedCustomerByName(name, TokenManager.getAdminId(), 2);
 	}
 
 	private int updateUserLock(String uid, String aid, Integer oldStatus, Integer newStatus) {