作者 唐旭辉

bug 修复

@@ -46,12 +46,12 @@ func buildSqlForAuditList(usercompanyid int64, companyid int64, userid int64) st @@ -46,12 +46,12 @@ func buildSqlForAuditList(usercompanyid int64, companyid int64, userid int64) st
46 //公开到自己部门的 46 //公开到自己部门的
47 sql3 string = ` SELECT a.id FROM chance AS a 47 sql3 string = ` SELECT a.id FROM chance AS a
48 JOIN chance_department AS b ON a.id=b.chance_id 48 JOIN chance_department AS b ON a.id=b.chance_id
49 - WHERE b.department_id IN (%s) AND a.review_status = 3 ` 49 + WHERE b.department_id IN (%s) AND a.review_status = 3 AND a.publish_status=` + fmt.Sprint(models.ChancePublishStatus2)
50 //指定提交的部门 50 //指定提交的部门
51 sql4 string = ` SELECT id FROM chance WHERE department_id IN (%s) and review_status =3 ` 51 sql4 string = ` SELECT id FROM chance WHERE department_id IN (%s) and review_status =3 `
52 52
53 //全公司公开的 53 //全公司公开的
54 - sql5 string = fmt.Sprintf(` SELECT id FROM chance where publish_status = 1 AND review_status = 3 AND company_id=%d `, companyid) 54 + sql5 string = fmt.Sprintf(` SELECT id FROM chance where publish_status = %d AND review_status = 3 AND company_id=%d `, models.ChancePublishStatus2, companyid)
55 //查看所有公开的 55 //查看所有公开的
56 sql6 string = fmt.Sprintf(`SELECT id FROM chance WHERE review_status =3 And company_id=%d `, companyid) 56 sql6 string = fmt.Sprintf(`SELECT id FROM chance WHERE review_status =3 And company_id=%d `, companyid)
57 57
@@ -189,6 +189,9 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 @@ -189,6 +189,9 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64
189 temp := fmt.Sprintf(`JOIN (%s) AS tt ON tt.id=a.id`, sqlFromPermission) 189 temp := fmt.Sprintf(`JOIN (%s) AS tt ON tt.id=a.id`, sqlFromPermission)
190 s1 = fmt.Sprintf(s1, temp) 190 s1 = fmt.Sprintf(s1, temp)
191 s2 = fmt.Sprintf(s2, temp) 191 s2 = fmt.Sprintf(s2, temp)
  192 + } else {
  193 + s1 = fmt.Sprintf(s1, "")
  194 + s2 = fmt.Sprintf(s2, "")
192 } 195 }
193 datasql.WriteString(s1) 196 datasql.WriteString(s1)
194 countsql.WriteString(s2) 197 countsql.WriteString(s2)