正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
@@ -112,7 +112,7 @@ func GetChanceMyChance(uid, cid int64, reviewStatus []int8, lastId int64, pageSi | @@ -112,7 +112,7 @@ func GetChanceMyChance(uid, cid int64, reviewStatus []int8, lastId int64, pageSi | ||
112 | sql := `select a.*,b.images,speechs,videos | 112 | sql := `select a.*,b.images,speechs,videos |
113 | from ( | 113 | from ( |
114 | select id,user_id,create_at,update_at,approve_time chance_approve_time,source_content,approve_data,review_status,enable_status,status from chance | 114 | select id,user_id,create_at,update_at,approve_time chance_approve_time,source_content,approve_data,review_status,enable_status,status from chance |
115 | -where user_id=? and company_id=? and review_status in (?) and (?=0 or id<?) and status=1 | 115 | +where user_id=? and company_id=? and review_status in (?) and (?=0 or id<?) and status=1 and enable_status=1 |
116 | ) a left JOIN chance_data b on a.id =b.chance_id | 116 | ) a left JOIN chance_data b on a.id =b.chance_id |
117 | order by update_at desc | 117 | order by update_at desc |
118 | limit ? | 118 | limit ? |
@@ -120,7 +120,7 @@ limit ? | @@ -120,7 +120,7 @@ limit ? | ||
120 | //update_at | 120 | //update_at |
121 | sqlCount := fmt.Sprintf(`select count(0) from ( | 121 | sqlCount := fmt.Sprintf(`select count(0) from ( |
122 | select id,user_id,create_at,source_content from chance | 122 | select id,user_id,create_at,source_content from chance |
123 | -where user_id=? and company_id=? and review_status in (%v) and status=1 | 123 | +where user_id=? and company_id=? and review_status in (%v) and status=1 and enable_status=1 |
124 | ) a left JOIN chance_data b on a.id =b.chance_id`, utils.JoinInt8s(reviewStatus, ",")) | 124 | ) a left JOIN chance_data b on a.id =b.chance_id`, utils.JoinInt8s(reviewStatus, ",")) |
125 | if err = utils.ExecuteQueryOne(&total, sqlCount, uid, cid); err != nil { | 125 | if err = utils.ExecuteQueryOne(&total, sqlCount, uid, cid); err != nil { |
126 | return | 126 | return |
-
请 注册 或 登录 后发表评论