This commit is contained in:
邹宗楠
2023-04-03 15:07:19 +08:00
parent 30ed11db6c
commit 015d14ee0c
3 changed files with 19 additions and 2 deletions

View File

@@ -562,9 +562,16 @@ 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
@@ -636,8 +643,16 @@ 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)
// 地图区域限制过滤