Commit df764430 by 涂亚平

活跃度检测bug修复

1 parent 6be77ec7
...@@ -69,6 +69,14 @@ public class AuthenticationInterceptor implements HandlerInterceptor { ...@@ -69,6 +69,14 @@ public class AuthenticationInterceptor implements HandlerInterceptor {
Method method = handlerMethod.getMethod(); Method method = handlerMethod.getMethod();
TimeRequired timeRequired = method.getAnnotation(TimeRequired.class); TimeRequired timeRequired = method.getAnnotation(TimeRequired.class);
if (timeRequired != null) {
Calendar calendar = Calendar.getInstance();
int hour = calendar.get(Calendar.HOUR_OF_DAY);
if (hour < 6 || hour >= 23 ) {
throw new HttpException(17001);
}
}
LoginRequired methodAnnotation = method.getAnnotation(LoginRequired.class); LoginRequired methodAnnotation = method.getAnnotation(LoginRequired.class);
if (methodAnnotation != null) { if (methodAnnotation != null) {
...@@ -100,7 +108,7 @@ public class AuthenticationInterceptor implements HandlerInterceptor { ...@@ -100,7 +108,7 @@ public class AuthenticationInterceptor implements HandlerInterceptor {
int hour = calendar.get(Calendar.HOUR_OF_DAY); int hour = calendar.get(Calendar.HOUR_OF_DAY);
int minute = calendar.get(Calendar.MINUTE); int minute = calendar.get(Calendar.MINUTE);
if (hour < 6 || (hour >= 23 && minute >= 30)) { if (hour < 6 || hour >= 23 ) {
throw new HttpException(17001); throw new HttpException(17001);
} }
} }
......
# 环境配置 # 环境配置
spring.profiles.active=dev spring.profiles.active=prod
#和CPU数 #和CPU数
spring.server.acceptorThreadCount=600 spring.server.acceptorThreadCount=600
spring.server.minSpareThreads=100 spring.server.minSpareThreads=100
......
...@@ -40,7 +40,8 @@ ...@@ -40,7 +40,8 @@
FROM FROM
activity_detection t activity_detection t
WHERE WHERE
t.class_id = #{classId} t.delete_date IS NULL
and t.class_id = #{classId}
AND t.member_id = #{memberId} AND t.member_id = #{memberId}
AND t.check_type = #{checkType} AND t.check_type = #{checkType}
AND t.`status` = #{status} AND t.`status` = #{status}
......
...@@ -142,11 +142,10 @@ ...@@ -142,11 +142,10 @@
class_member_mapping t class_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id LEFT JOIN member t2 ON t.member_id = t2.id
LEFT JOIN activity_detection t3 ON t.class_id = t3.class_id LEFT JOIN activity_detection t3 ON t.class_id = t3.class_id
AND t.member_id = t3.member_id AND t.member_id = t3.member_id and t3.delete_date IS NULL
left join company_dict t4 on t2.company_id = t4.id left join company_dict t4 on t2.company_id = t4.id
where t.delete_date IS NULL where t.delete_date IS NULL
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
and t3.delete_date IS NULL
AND t.class_id = #{classId} AND t.class_id = #{classId}
<if test="userName != null and userName !=''"> <if test="userName != null and userName !=''">
and t2.user_name like concat('%',#{userName} ,'%') and t2.user_name like concat('%',#{userName} ,'%')
...@@ -180,12 +179,11 @@ ...@@ -180,12 +179,11 @@
class_member_mapping t class_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id LEFT JOIN member t2 ON t.member_id = t2.id
LEFT JOIN image_check_record t3 ON t.class_id = t3.class_id LEFT JOIN image_check_record t3 ON t.class_id = t3.class_id
AND t.member_id = t3.member_id AND t.member_id = t3.member_id and t3.delete_date IS NULL
left join company_dict t4 on t2.company_id = t4.id left join company_dict t4 on t2.company_id = t4.id
WHERE WHERE
t.delete_date IS NULL t.delete_date IS NULL
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
and t3.delete_date IS NULL
<if test="userName != null and userName !=''"> <if test="userName != null and userName !=''">
and t2.user_name like concat('%',#{userName} ,'%') and t2.user_name like concat('%',#{userName} ,'%')
</if> </if>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!