Просмотр исходного кода

客户超时维护丢失定时任务重复提醒BUG修复

anderx лет назад: 3
Родитель
Сommit
312163ffea

+ 1 - 1
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -1366,7 +1366,7 @@
   </update>
   </update>
 
 
   <select id="selectUserByRoleName" parameterType="java.lang.String" resultMap="BaseResultMap">
   <select id="selectUserByRoleName" parameterType="java.lang.String" resultMap="BaseResultMap">
-    select c.id from role a left join user_role b on a.id = b.rid left join admin c on b.uid = c.id where a.role_name in(#{roleName1},#{roleName2})
+    select DISTINCT  c.id from role a left join user_role b on a.id = b.rid left join admin c on b.uid = c.id where a.role_name in(#{roleName1},#{roleName2})
   </select>
   </select>
   <update id="updateDimissionTransfer">
   <update id="updateDimissionTransfer">
     update user
     update user

+ 7 - 1
src/main/java/com/goafanti/common/task/ReleaseUserTask.java

@@ -159,6 +159,13 @@ public class ReleaseUserTask {
 		}
 		}
 		LoggerUtils.debug(getClass(), "==============客户释放完成============");
 		LoggerUtils.debug(getClass(), "==============客户释放完成============");
 	}
 	}
+
+	/**
+	 * 处理外联
+	 * @param releaseTime
+	 * @param userList
+	 * @throws InterruptedException
+	 */
 	private void pushChannel(Date releaseTime, List<User> userList) throws InterruptedException {
 	private void pushChannel(Date releaseTime, List<User> userList) throws InterruptedException {
 		// 获取超过90天客户,判断是否回收过,未回收则回收,已回收则释放为公共客户
 		// 获取超过90天客户,判断是否回收过,未回收则回收,已回收则释放为公共客户
 		List<userDaysBo> userChannelList =null;
 		List<userDaysBo> userChannelList =null;
@@ -237,7 +244,6 @@ public class ReleaseUserTask {
 						u.getUid()));
 						u.getUid()));
 			}
 			}
 		}
 		}
-
 		if(!nl.isEmpty())addNoticeBatch(nl);
 		if(!nl.isEmpty())addNoticeBatch(nl);
 	}
 	}