|
@@ -9,7 +9,6 @@ import (
|
|
"github.com/gogf/gf/v2/util/gconv"
|
|
"github.com/gogf/gf/v2/util/gconv"
|
|
IC "jyBXSubscribe/rpc/init"
|
|
IC "jyBXSubscribe/rpc/init"
|
|
"jyBXSubscribe/rpc/type/bxsubscribe"
|
|
"jyBXSubscribe/rpc/type/bxsubscribe"
|
|
- "log"
|
|
|
|
"strings"
|
|
"strings"
|
|
"time"
|
|
"time"
|
|
)
|
|
)
|
|
@@ -60,7 +59,6 @@ func (p *PersonSubscribe) IsEmpty() bool {
|
|
// eStatus 是否有企业订阅 -1 无企业订阅 1 有企业订阅
|
|
// eStatus 是否有企业订阅 -1 无企业订阅 1 有企业订阅
|
|
// pStatus 是否有个人订阅 -1 无个人订阅 1 有个人订阅
|
|
// pStatus 是否有个人订阅 -1 无个人订阅 1 有个人订阅
|
|
func GetStaffSubscribeList(entId, entUserId int, query string, eStatus, pStatus, pageNum, pageSize int64) (total int64, list []*bxsubscribe.StaffSubscribe) {
|
|
func GetStaffSubscribeList(entId, entUserId int, query string, eStatus, pStatus, pageNum, pageSize int64) (total int64, list []*bxsubscribe.StaffSubscribe) {
|
|
- log.Println("222222222222222", entId, entUserId, query, eStatus, pStatus, pageNum, pageSize)
|
|
|
|
userEnt := EntInfo(entId, entUserId)
|
|
userEnt := EntInfo(entId, entUserId)
|
|
// 非管理员无权限查询
|
|
// 非管理员无权限查询
|
|
if !(userEnt.Role_admin_system || userEnt.Role_admin_department) {
|
|
if !(userEnt.Role_admin_system || userEnt.Role_admin_department) {
|
|
@@ -175,11 +173,9 @@ WHERE`
|
|
|
|
|
|
countSql := fmt.Sprintf("SELECT count(id) %s %s", sql, strings.Join(queryArr, " AND "))
|
|
countSql := fmt.Sprintf("SELECT count(id) %s %s", sql, strings.Join(queryArr, " AND "))
|
|
total = IC.MainMysql.CountBySql(countSql, valueArr...)
|
|
total = IC.MainMysql.CountBySql(countSql, valueArr...)
|
|
- fmt.Println(countSql, valueArr)
|
|
|
|
if total > 0 {
|
|
if total > 0 {
|
|
finalSql := fmt.Sprintf("SELECT * %s %s ORDER BY createtime DESC LIMIT %d,%d", sql, strings.Join(queryArr, " AND "), common.If(pageNum >= 0, pageNum, 0).(int64)*pageSize, pageSize)
|
|
finalSql := fmt.Sprintf("SELECT * %s %s ORDER BY createtime DESC LIMIT %d,%d", sql, strings.Join(queryArr, " AND "), common.If(pageNum >= 0, pageNum, 0).(int64)*pageSize, pageSize)
|
|
finalRes := IC.MainMysql.SelectBySql(finalSql, valueArr...)
|
|
finalRes := IC.MainMysql.SelectBySql(finalSql, valueArr...)
|
|
- fmt.Println(countSql, valueArr)
|
|
|
|
if finalRes != nil && len(*finalRes) > 0 {
|
|
if finalRes != nil && len(*finalRes) > 0 {
|
|
for _, m := range *finalRes {
|
|
for _, m := range *finalRes {
|
|
eUser := common.Int64All(m["id"])
|
|
eUser := common.Int64All(m["id"])
|