作者 yangfu

机会修改

... ... @@ -112,7 +112,7 @@ func GetChanceMyChance(uid, cid int64, reviewStatus []int8, lastId int64, pageSi
sql := `select a.*,b.images,speechs,videos
from (
select id,user_id,create_at,update_at,approve_time chance_approve_time,source_content,approve_data,review_status,enable_status,status from chance
where user_id=? and company_id=? and review_status in (?) and (?=0 or id<?) and status=1
where user_id=? and company_id=? and review_status in (?) and (?=0 or id<?) and status=1 and enable_status=1
) a left JOIN chance_data b on a.id =b.chance_id
order by update_at desc
limit ?
... ... @@ -120,7 +120,7 @@ limit ?
//update_at
sqlCount := fmt.Sprintf(`select count(0) from (
select id,user_id,create_at,source_content from chance
where user_id=? and company_id=? and review_status in (%v) and status=1
where user_id=? and company_id=? and review_status in (%v) and status=1 and enable_status=1
) a left JOIN chance_data b on a.id =b.chance_id`, utils.JoinInt8s(reviewStatus, ","))
if err = utils.ExecuteQueryOne(&total, sqlCount, uid, cid); err != nil {
return
... ...