|
@@ -498,6 +498,13 @@ type CompanyViewPageListResp struct {
|
|
|
Paging *paging.PagingItem `description:"分页数据"`
|
|
|
}
|
|
|
|
|
|
+func GetCompanyUserListByReportCount(companyId int) (count int, err error) {
|
|
|
+ o := orm.NewOrm()
|
|
|
+ sql := ` SELECT COUNT(1) AS count FROM wx_user WHERE company_id =? AND ficc_view_total>0 `
|
|
|
+ err = o.Raw(sql, companyId).QueryRow(&count)
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
// GetCompanyUserListByReport
|
|
|
// @Description: 根据报告阅读情况获取联系人列表
|
|
|
// @author: Roc
|
|
@@ -510,7 +517,7 @@ type CompanyViewPageListResp struct {
|
|
|
// @return err error
|
|
|
func GetCompanyUserListByReport(companyId, startSize, pageSize int, order string) (items []*CompanyUser, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
- sql := `SELECT * FROM wx_user WHERE company_id = ? `
|
|
|
+ sql := `SELECT * FROM wx_user WHERE company_id = ? AND ficc_view_total>0 `
|
|
|
|
|
|
if order != "" {
|
|
|
sql += order
|