|
@@ -267,7 +267,7 @@ func GetChancePoolAll(uid, cid int64, chanceTypeId int, lastId int64, pageSize i |
|
@@ -267,7 +267,7 @@ func GetChancePoolAll(uid, cid int64, chanceTypeId int, lastId int64, pageSize i |
267
|
sql := `select a.*,b.images,speechs,videos
|
267
|
sql := `select a.*,b.images,speechs,videos
|
268
|
from (
|
268
|
from (
|
269
|
select id,user_id,approve_time create_at,source_content,review_status,audit_template_id,chance_type_id,comment_total,zan_total,view_total from chance
|
269
|
select id,user_id,approve_time create_at,source_content,review_status,audit_template_id,chance_type_id,comment_total,zan_total,view_total from chance
|
270
|
-where company_id=? and review_status=3 and (?=0 or chance_type_id =?) and (?=0 or id<?) and enable_status=1 and status=1
|
270
|
+where company_id=? and review_status=3 and (?=0 or chance_type_id =?) and (?=0 or approve_time<?) and enable_status=1 and status=1
|
271
|
) a left JOIN chance_data b on a.id =b.chance_id
|
271
|
) a left JOIN chance_data b on a.id =b.chance_id
|
272
|
order by create_at desc
|
272
|
order by create_at desc
|
273
|
limit ?
|
273
|
limit ?
|
|
@@ -316,7 +316,7 @@ select * from ( |
|
@@ -316,7 +316,7 @@ select * from ( |
316
|
select DISTINCT chance_id from audit_flow_process where uid =%v and review_status=3
|
316
|
select DISTINCT chance_id from audit_flow_process where uid =%v and review_status=3
|
317
|
) a inner join chance b on a.chance_id = b.id
|
317
|
) a inner join chance b on a.chance_id = b.id
|
318
|
|
318
|
|
319
|
-) a where review_status=3 and (0=%v or chance_type_id =%v) and (0=%v or id<%v) and a.enable_status=1 and status=1
|
319
|
+) a where review_status=3 and (0=%v or chance_type_id =%v) and (0=%v or create_at<%v) and a.enable_status=1 and status=1
|
320
|
) a left JOIN chance_data b on a.id =b.chance_id
|
320
|
) a left JOIN chance_data b on a.id =b.chance_id
|
321
|
order by create_at desc
|
321
|
order by create_at desc
|
322
|
limit %v
|
322
|
limit %v
|
|
@@ -391,7 +391,7 @@ select * from ( |
|
@@ -391,7 +391,7 @@ select * from ( |
391
|
select DISTINCT chance_id from audit_flow_process where uid =%v and review_status=3
|
391
|
select DISTINCT chance_id from audit_flow_process where uid =%v and review_status=3
|
392
|
) a inner join chance b on a.chance_id = b.id
|
392
|
) a inner join chance b on a.chance_id = b.id
|
393
|
|
393
|
|
394
|
-) a where review_status=3 and (0=%v or chance_type_id =%v) and (0=%v or id<%v) and a.enable_status=1 and status=1
|
394
|
+) a where review_status=3 and (0=%v or chance_type_id =%v) and (0=%v or create_at<%v) and a.enable_status=1 and status=1
|
395
|
) a left JOIN chance_data b on a.id =b.chance_id
|
395
|
) a left JOIN chance_data b on a.id =b.chance_id
|
396
|
order by create_at desc
|
396
|
order by create_at desc
|
397
|
limit %v
|
397
|
limit %v
|
|
@@ -468,7 +468,7 @@ select * from ( |
|
@@ -468,7 +468,7 @@ select * from ( |
468
|
select DISTINCT chance_id from audit_flow_process where uid =%v and review_status=3
|
468
|
select DISTINCT chance_id from audit_flow_process where uid =%v and review_status=3
|
469
|
) a inner join chance b on a.chance_id = b.id
|
469
|
) a inner join chance b on a.chance_id = b.id
|
470
|
|
470
|
|
471
|
-) a where review_status=3 and (0=%v or chance_type_id =%v) and (0=%v or id<%v) and a.enable_status=1 and status=1
|
471
|
+) a where review_status=3 and (0=%v or chance_type_id =%v) and (0=%v or create_at<%v) and a.enable_status=1 and status=1
|
472
|
) a left JOIN chance_data b on a.id =b.chance_id
|
472
|
) a left JOIN chance_data b on a.id =b.chance_id
|
473
|
order by create_at desc
|
473
|
order by create_at desc
|
474
|
limit %v
|
474
|
limit %v
|
|
@@ -525,7 +525,7 @@ select * from ( |
|
@@ -525,7 +525,7 @@ select * from ( |
525
|
select DISTINCT chance_id from audit_flow_process where uid =%v and review_status=3
|
525
|
select DISTINCT chance_id from audit_flow_process where uid =%v and review_status=3
|
526
|
) a inner join chance b on a.chance_id = b.id
|
526
|
) a inner join chance b on a.chance_id = b.id
|
527
|
|
527
|
|
528
|
-) a where review_status=3 and (0=%v or chance_type_id =%v) and (0=%v or id<%v) and a.enable_status=1 and status=1
|
528
|
+) a where review_status=3 and (0=%v or chance_type_id =%v) and (0=%v or create_at<%v) and a.enable_status=1 and status=1
|
529
|
) a left JOIN chance_data b on a.id =b.chance_id
|
529
|
) a left JOIN chance_data b on a.id =b.chance_id
|
530
|
order by create_at desc
|
530
|
order by create_at desc
|
531
|
limit %v
|
531
|
limit %v
|