1
This commit is contained in:
@@ -562,16 +562,9 @@ func setStoreMapInfo(ctx *jxcontext.Context, db *dao.DaoDB, storesInfo *StoresIn
|
||||
// todo 门店绑定信息可以考虑以数组形式返回,而不是现在这样
|
||||
func GetStores(ctx *jxcontext.Context, keyword string, params map[string]interface{}, offset, pageSize int, orderTimeFrom, orderTimeTo time.Time, orderCountFrom, orderCountTo int) (retVal *StoresInfo, err error) {
|
||||
briefLevel := int(utils.ForceInterface2Int64(params["briefLevel"]))
|
||||
if ctx.GetUserID() == "6D914A8BB71611EDB37F525400E86DC0" {
|
||||
globals.SugarLogger.Debugf("======params:%s", utils.Format4Output(params, false))
|
||||
}
|
||||
//权限
|
||||
if permission.IsRoled(ctx) {
|
||||
if storeIDsMap, err := permission.GetUserStoresResultMap(ctx.GetUserID()); err == nil {
|
||||
if ctx.GetUserID() == "6D914A8BB71611EDB37F525400E86DC0" {
|
||||
globals.SugarLogger.Debugf("======storeIDsMap:%s", utils.Format4Output(storeIDsMap, false))
|
||||
}
|
||||
|
||||
var storeIDs2 []int
|
||||
if params["storeIDs"] != nil {
|
||||
var storeIDs []int
|
||||
@@ -607,7 +600,6 @@ func GetStores(ctx *jxcontext.Context, keyword string, params map[string]interfa
|
||||
}
|
||||
}
|
||||
}
|
||||
globals.SugarLogger.Debugf("===============params := %s", utils.Format4Output(params, false))
|
||||
sql, sqlParams, _, _, err := getStoresSql(ctx, keyword, params, orderTimeFrom, orderTimeTo)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -643,16 +635,8 @@ func GetStores(ctx *jxcontext.Context, keyword string, params map[string]interfa
|
||||
pageSize = jxutils.FormalizePageSize(pageSize)
|
||||
sqlParams = append(sqlParams, pageSize, offset)
|
||||
//mapLimit := false
|
||||
if ctx.GetUserID() == "6D914A8BB71611EDB37F525400E86DC0" {
|
||||
globals.SugarLogger.Debugf("======sql:%s", sql)
|
||||
globals.SugarLogger.Debugf("======sql:%s", sqlParams)
|
||||
}
|
||||
txDB, _ := dao.Begin(db)
|
||||
if err = dao.GetRowsTx(txDB, &storeList, sql, sqlParams...); err == nil {
|
||||
if ctx.GetUserID() == "6D914A8BB71611EDB37F525400E86DC0" {
|
||||
globals.SugarLogger.Debugf("======storeList:%s", utils.Format4Output(storeList, false))
|
||||
}
|
||||
|
||||
retVal.Stores = storeList
|
||||
retVal.TotalCount = dao.GetLastTotalRowCount2(db, txDB)
|
||||
// 地图区域限制过滤
|
||||
@@ -1149,7 +1133,7 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
|
||||
return num, err
|
||||
}
|
||||
|
||||
// updateVendorStoreStatusAndDeliveryStatus 当门店被禁用时,将三方平台和三方配送全部关闭
|
||||
//// updateVendorStoreStatusAndDeliveryStatus 当门店被禁用时,将三方平台和三方配送全部关闭
|
||||
//func updateVendorStoreStatusAndDeliveryStatus(ctx *jxcontext.Context, storeId int) error {
|
||||
// var (
|
||||
// db = dao.GetDB()
|
||||
|
||||
@@ -3,7 +3,6 @@ package permission
|
||||
import (
|
||||
"fmt"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -353,9 +352,6 @@ func GetUserStoresResultMap(userID string) (resultMap map[int]int, err error) {
|
||||
}
|
||||
}
|
||||
userRoles, err2 := dao.GetUserRole2(db, []string{userID}, nil)
|
||||
if userID == "6D914A8BB71611EDB37F525400E86DC0" {
|
||||
globals.SugarLogger.Debugf("======userRoles:%s", utils.Format4Output(userRoles, false))
|
||||
}
|
||||
err = err2
|
||||
for _, v := range userRoles {
|
||||
var (
|
||||
|
||||
Reference in New Issue
Block a user