作者 yangfu

统计修改

... ... @@ -779,3 +779,15 @@ from (
}
return
}
// 机会数量统计按审核状态
func GetChanceMyChanceCountByReviewStatus(uid, cid int64, reviewStatus []int8) (total int, err error) {
//update_at
sqlCount := fmt.Sprintf(`select count(0) from chance
where user_id=? and company_id=? and review_status in (%v) and status=1 and enable_status=1
`, utils.JoinInt8s(reviewStatus, ","))
if err = utils.ExecuteQueryOne(&total, sqlCount, uid, cid); err != nil {
return
}
return
}
\ No newline at end of file
... ...
... ... @@ -10,7 +10,7 @@ import (
//我的机会
func MyChanceStatic(header *protocol.RequestHeader, reviewStatus ...int8) (total int, err error) {
var ()
if total, err = models.GetChanceMyChance(header.UserId, header.CompanyId, reviewStatus, 0, 0, nil); err != nil {
if total, err = models.GetChanceMyChanceCountByReviewStatus(header.UserId, header.CompanyId, reviewStatus); err != nil {
if err == orm.ErrNoRows {
err = nil
return
... ...