...
|
...
|
@@ -137,7 +137,7 @@ func GetChanceMyApproveChance(uid, cid int64, reviewStatus []int8, lastId int64, |
|
|
sql := fmt.Sprintf(`select a.*,b.images,b.speechs,b.videos from (
|
|
|
select a.*,b.user_id,b.source_content,b.enable_status,b.review_status,b.create_at,b.update_at,b.approve_time chance_approve_time,b.status from (
|
|
|
select id,approve_time,approve_data,uid,chance_id,approve_message,update_at process_create_time
|
|
|
from audit_flow_process where uid=? and review_status in (%v) and (?=0 or id<?)
|
|
|
from audit_flow_process where uid=? and review_status in (%v) and (?=0 or id<?)
|
|
|
)a left outer join chance b on a.chance_id = b.id
|
|
|
)a left outer join chance_data b on a.chance_id =b.chance_id
|
|
|
order by process_create_time desc
|
...
|
...
|
@@ -156,6 +156,29 @@ from audit_flow_process where uid=? and review_status in (%v) `, utils.JoinInt8 |
|
|
return
|
|
|
}
|
|
|
|
|
|
func GetChanceMyApproveChanceEnable(uid, cid int64, reviewStatus []int8, lastId int64, pageSize int, v interface{}) (total int, err error) {
|
|
|
sql := fmt.Sprintf(`select a.*,b.images,b.speechs,b.videos from (
|
|
|
select a.*,b.user_id,b.source_content,b.enable_status,b.review_status,b.create_at,b.update_at,b.approve_time chance_approve_time,b.status from (
|
|
|
select id,approve_time,approve_data,uid,chance_id,approve_message,update_at process_create_time
|
|
|
from audit_flow_process where uid=? and review_status in (%v) and (?=0 or id<?) and enable_status =1
|
|
|
)a left outer join chance b on a.chance_id = b.id
|
|
|
)a left outer join chance_data b on a.chance_id =b.chance_id
|
|
|
order by process_create_time desc
|
|
|
LIMIT ?`, utils.JoinInt8s(reviewStatus, ",")) //
|
|
|
|
|
|
sqlCount := fmt.Sprintf(`select count(0)
|
|
|
from audit_flow_process where uid=? and review_status in (%v) and enable_status =1`, utils.JoinInt8s(reviewStatus, ",")) //and enable_status =1
|
|
|
if err = utils.ExecuteQueryOne(&total, sqlCount, uid); err != nil {
|
|
|
return
|
|
|
}
|
|
|
if v != nil {
|
|
|
if err = utils.ExecuteQueryAll(v, sql, uid, lastId, lastId, pageSize); err != nil {
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
return
|
|
|
}
|
|
|
|
|
|
func GetChanceCollect(uid int64, lastId int64, pageSize int, v interface{}) (total int, err error) {
|
|
|
sql := fmt.Sprintf(`select a.*,b.images,b.speechs,b.videos from (
|
|
|
select a.*,b.user_id chance_user_id,b.create_at,b.source_content,b.enable_status,b.review_status,b.audit_template_id,b.chance_type_id,comment_total,zan_total,view_total,b.publish_status,b.status from (
|
...
|
...
|
|