...
|
...
|
@@ -267,7 +267,7 @@ func GetChancePoolAll(uid, cid int64, chanceTypeId int, lastId int64, pageSize i |
|
|
sql := `select a.*,b.images,speechs,videos
|
|
|
from (
|
|
|
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
|
|
|
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
|
|
|
where company_id=? and review_status=3 and (?=0 or chance_type_id =?) and (?=0 or unix_timestamp(approve_time)<?) and enable_status=1 and status=1
|
|
|
) a left JOIN chance_data b on a.id =b.chance_id
|
|
|
order by create_at desc
|
|
|
limit ?
|
...
|
...
|
@@ -316,7 +316,7 @@ select * from ( |
|
|
select DISTINCT chance_id from audit_flow_process where uid =%v and review_status=3
|
|
|
) a inner join chance b on a.chance_id = b.id
|
|
|
|
|
|
) 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
|
|
|
) a where review_status=3 and (0=%v or chance_type_id =%v) and (0=%v or unix_timestamp(create_at)<%v) and a.enable_status=1 and status=1
|
|
|
) a left JOIN chance_data b on a.id =b.chance_id
|
|
|
order by create_at desc
|
|
|
limit %v
|
...
|
...
|
@@ -391,7 +391,7 @@ select * from ( |
|
|
select DISTINCT chance_id from audit_flow_process where uid =%v and review_status=3
|
|
|
) a inner join chance b on a.chance_id = b.id
|
|
|
|
|
|
) 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
|
|
|
) a where review_status=3 and (0=%v or chance_type_id =%v) and (0=%v or unix_timestamp(create_at)<%v) and a.enable_status=1 and status=1
|
|
|
) a left JOIN chance_data b on a.id =b.chance_id
|
|
|
order by create_at desc
|
|
|
limit %v
|
...
|
...
|
@@ -468,7 +468,7 @@ select * from ( |
|
|
select DISTINCT chance_id from audit_flow_process where uid =%v and review_status=3
|
|
|
) a inner join chance b on a.chance_id = b.id
|
|
|
|
|
|
) 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
|
|
|
) a where review_status=3 and (0=%v or chance_type_id =%v) and (0=%v or unix_timestamp(create_at)<%v) and a.enable_status=1 and status=1
|
|
|
) a left JOIN chance_data b on a.id =b.chance_id
|
|
|
order by create_at desc
|
|
|
limit %v
|
...
|
...
|
@@ -525,7 +525,7 @@ select * from ( |
|
|
select DISTINCT chance_id from audit_flow_process where uid =%v and review_status=3
|
|
|
) a inner join chance b on a.chance_id = b.id
|
|
|
|
|
|
) 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
|
|
|
) a where review_status=3 and (0=%v or chance_type_id =%v) and (0=%v or unix_timestamp(create_at)<%v) and a.enable_status=1 and status=1
|
|
|
) a left JOIN chance_data b on a.id =b.chance_id
|
|
|
order by create_at desc
|
|
|
limit %v
|
...
|
...
|
|