1
This commit is contained in:
@@ -2036,27 +2036,27 @@ func TmpGetJxBadCommentsNo(ctx *jxcontext.Context, storeID int) (count int, err
|
||||
func TmpGetJxBadCommentsByStoreId(ctx *jxcontext.Context, keyword string, storeIDs []int, offset, pageSize, commentType int, fromTime, toTime time.Time, orderFlag, operatorPhone string) (retVal map[string]interface{}, err error) {
|
||||
db := dao.GetDB()
|
||||
//权限
|
||||
if permission.IsRoled(ctx) {
|
||||
if storeIDsMap, err := permission.GetUserStoresResultMap(ctx.GetUserID()); err == nil {
|
||||
var storeIDs2 []int
|
||||
if len(storeIDs) > 0 {
|
||||
for _, v := range storeIDs {
|
||||
if storeIDsMap[v] != 0 {
|
||||
storeIDs2 = append(storeIDs2, v)
|
||||
}
|
||||
}
|
||||
if len(storeIDs2) == 0 {
|
||||
storeIDs2 = append(storeIDs2, -1)
|
||||
}
|
||||
} else {
|
||||
for k, _ := range storeIDsMap {
|
||||
storeIDs2 = append(storeIDs2, k)
|
||||
}
|
||||
}
|
||||
storeIDs = nil
|
||||
storeIDs = storeIDs2
|
||||
}
|
||||
}
|
||||
//if permission.IsRoled(ctx) {
|
||||
// if storeIDsMap, err := permission.GetUserStoresResultMap(ctx.GetUserID()); err == nil {
|
||||
// var storeIDs2 []int
|
||||
// if len(storeIDs) > 0 {
|
||||
// for _, v := range storeIDs {
|
||||
// if storeIDsMap[v] != 0 {
|
||||
// storeIDs2 = append(storeIDs2, v)
|
||||
// }
|
||||
// }
|
||||
// if len(storeIDs2) == 0 {
|
||||
// storeIDs2 = append(storeIDs2, -1)
|
||||
// }
|
||||
// } else {
|
||||
// for k, _ := range storeIDsMap {
|
||||
// storeIDs2 = append(storeIDs2, k)
|
||||
// }
|
||||
// }
|
||||
// storeIDs = nil
|
||||
// storeIDs = storeIDs2
|
||||
// }
|
||||
//}
|
||||
sql := `
|
||||
SELECT SQL_CALC_FOUND_ROWS
|
||||
t1.*, t2.name store_name, t3.name city_name,
|
||||
|
||||
Reference in New Issue
Block a user