zoujiajian 1 год назад
Родитель
Сommit
0a009b8f9c

+ 3 - 2
netflix-dao/src/main/java/com/cyksj/model/entity/CorpKfAccountFollow.java

@@ -31,7 +31,8 @@ public class CorpKfAccountFollow extends BaseEntity{
 	private String endTime;
 
 	/**
-	 * 值班星期 数组
+	 * 值班星期
+	 * 1星期天 2星期一 ....
 	 */
-	private String dutyWeek;
+	private Integer dutyWeek;
 }

+ 1 - 1
netflix-service/src/main/java/com/cyksj/service/corp/impl/CorpServiceImpl.java

@@ -818,7 +818,7 @@ public class CorpServiceImpl implements CorpService {
 					.eq(CorpKfAccountFollow::getOpenKfId, openKfId)
 					.le(CorpKfAccountFollow::getStartTime, thisHourDate)
 					.ge(CorpKfAccountFollow::getEndTime, thisHourDate)
-					.apply(String.format(" JSON_CONTAINS(duty_week,'\"%s\"')", dayOfWeek)));
+					.eq(CorpKfAccountFollow::getDutyWeek, dayOfWeek));
 			//非值班时间 发送通知
 			if (dutyHourCount == 0) {
 				//非值班时间 移入等待池并发送进入等待池消息

+ 2 - 2
netflix-service/src/main/java/com/cyksj/service/corp/kf/impl/CorpKfServiceImpl.java

@@ -168,7 +168,7 @@ public class CorpKfServiceImpl implements CorpKfService {
 				.eq(CorpKfAccountFollow::getOpenKfId, openKfId)
 				.le(CorpKfAccountFollow::getStartTime, thisHourDate)
 				.ge(CorpKfAccountFollow::getEndTime, thisHourDate)
-				.apply(String.format(String.format(" JSON_CONTAINS(duty_week,'\"%s\"')", dayOfWeek))));
+				.eq(CorpKfAccountFollow::getDutyWeek, dayOfWeek));
 		//无需值班
 		if (corpKfAccountFollows.isEmpty()) {
 			throw BusinessRuntimeException.getInstance("非值班时间");
@@ -211,7 +211,7 @@ public class CorpKfServiceImpl implements CorpKfService {
 				.eq(CorpKfAccountFollow::getOpenKfId, openKfId)
 				.le(CorpKfAccountFollow::getStartTime, thisHourDate)
 				.ge(CorpKfAccountFollow::getEndTime, thisHourDate)
-				.apply(String.format(" JSON_CONTAINS(duty_week,'\"%s\"')", dayOfWeek)));
+				.eq(CorpKfAccountFollow::getDutyWeek, dayOfWeek));
 
 		if (corpKfAccountFollows.isEmpty()) {
 			return Lists.newArrayList();