Ver código fonte

fix 双重认证账号时间

zoujiajian 3 anos atrás
pai
commit
6a8594f1a8

+ 1 - 1
netflix-dao/src/main/java/com/cyksj/mapper/GroupsMapper.java

@@ -22,7 +22,7 @@ public interface GroupsMapper extends BaseMapper<GroupsTrips> {
     @Select("select count(*) from groups_trips where sku_id = #{skuId} and num = available_num")
 	Integer selectEmptyNetfilxTrips(Long skuId);
 
-	@Select("select gt.* from (select a.account,t.account_id,t.id as groups_id,t.sku_id,t.num from account a inner join groups_trips t on a.id = t.account_id where t.sku_id in (select id from goods_don_sku where goods_id = #{goodsId} and status is true) and t.num > 1 and a.api_secret = '') gt" +
+	@Select("select gt.* from (select a.account,t.account_id,t.id as groups_id,t.sku_id,t.num from account a inner join groups_trips t on a.id = t.account_id where t.sku_id in (select id from goods_don_sku where goods_id = #{goodsId} and status is true) and t.num > 1 and a.api_secret = '' and a.created_time > '2023-05-11') gt" +
 			" where gt.num = (select count(*) from groups_relation gr where gr.groups_id = gt.groups_id and gr.`status` = 'validity')" +
 			" and not EXISTS (select account_id from account_double_verify_record where account_id = gt.account_id and deleted is true)" +
 			" and DATE_SUB(now(),INTERVAL 3 day) >= (select max(update_time) from groups_relation gr where gr.groups_id = gt.groups_id and gr.`status` = 'validity')")

+ 1 - 2
netflix-service/src/main/java/com/cyksj/task/Scheduler.java

@@ -457,11 +457,10 @@ public class Scheduler {
 	 * 每日凌晨下架今日过期车队账号
 	 */
 	@Scheduled(cron = "0 0 0 * * ?")
-	public void closeGroupsTrips() throws Exception {
+	public void closeGroupsTrips() {
 		DateTime now = DateTime.now();
 		DateTime nextDay = DateUtil.offsetDay(DateUtil.beginOfDay(now), 1);
 		List<CloseGroupsTripsView> closeGroupsTripsViews = Optional.ofNullable(beanSearcher.searchAll(CloseGroupsTripsView.class, MapUtils.builder()
-				.field(CloseGroupsTripsView::getCreatedTime, "2023-05-11").op(Operator.GreaterEqual)
 				.field(CloseGroupsTripsView::getExpiryTime, nextDay).op(Operator.LessThan)
 				.field(CloseGroupsTripsView::getGoodsId, List.of(18, 26)).op(Operator.InList)
 				.field(CloseGroupsTripsView::getGroupsId).op(Operator.NotNull)