1
This commit is contained in:
@@ -79,7 +79,7 @@ func (c *BaseScheduler) SelfDeliveredAndUpdateStatus(ctx *jxcontext.Context, ven
|
|||||||
}
|
}
|
||||||
if err == nil {
|
if err == nil {
|
||||||
order.Status = model.OrderStatusFinished // todo 是否需要强制设置完成状态?
|
order.Status = model.OrderStatusFinished // todo 是否需要强制设置完成状态?
|
||||||
if err = dao.SetOrderFlag(dao.GetDB(), ctx.GetUserName(), order.VendorOrderID, order.VendorID, model.OrderFlagMaskSetDelivered); err == nil {
|
if err = dao.SetOrderFlag(dao.GetDB(), ctx.GetUserName(), order.VendorOrderID, order.VendorID, model.OrderFlagMaskSetDelivered); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
order.OrderFinishedAt = time.Now()
|
order.OrderFinishedAt = time.Now()
|
||||||
|
|||||||
@@ -562,9 +562,16 @@ func setStoreMapInfo(ctx *jxcontext.Context, db *dao.DaoDB, storesInfo *StoresIn
|
|||||||
// todo 门店绑定信息可以考虑以数组形式返回,而不是现在这样
|
// 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) {
|
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"]))
|
briefLevel := int(utils.ForceInterface2Int64(params["briefLevel"]))
|
||||||
|
if ctx.GetUserID() == "6D914A8BB71611EDB37F525400E86DC0" {
|
||||||
|
globals.SugarLogger.Debugf("======params:%s", utils.Format4Output(params, false))
|
||||||
|
}
|
||||||
//权限
|
//权限
|
||||||
if permission.IsRoled(ctx) {
|
if permission.IsRoled(ctx) {
|
||||||
if storeIDsMap, err := permission.GetUserStoresResultMap(ctx.GetUserID()); err == nil {
|
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
|
var storeIDs2 []int
|
||||||
if params["storeIDs"] != nil {
|
if params["storeIDs"] != nil {
|
||||||
var storeIDs []int
|
var storeIDs []int
|
||||||
@@ -636,8 +643,16 @@ func GetStores(ctx *jxcontext.Context, keyword string, params map[string]interfa
|
|||||||
pageSize = jxutils.FormalizePageSize(pageSize)
|
pageSize = jxutils.FormalizePageSize(pageSize)
|
||||||
sqlParams = append(sqlParams, pageSize, offset)
|
sqlParams = append(sqlParams, pageSize, offset)
|
||||||
//mapLimit := false
|
//mapLimit := false
|
||||||
|
if ctx.GetUserID() == "6D914A8BB71611EDB37F525400E86DC0" {
|
||||||
|
globals.SugarLogger.Debugf("======sql:%s", sql)
|
||||||
|
globals.SugarLogger.Debugf("======sql:%s", sqlParams)
|
||||||
|
}
|
||||||
txDB, _ := dao.Begin(db)
|
txDB, _ := dao.Begin(db)
|
||||||
if err = dao.GetRowsTx(txDB, &storeList, sql, sqlParams...); err == nil {
|
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.Stores = storeList
|
||||||
retVal.TotalCount = dao.GetLastTotalRowCount2(db, txDB)
|
retVal.TotalCount = dao.GetLastTotalRowCount2(db, txDB)
|
||||||
// 地图区域限制过滤
|
// 地图区域限制过滤
|
||||||
|
|||||||
@@ -353,7 +353,9 @@ func GetUserStoresResultMap(userID string) (resultMap map[int]int, err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
userRoles, err2 := dao.GetUserRole2(db, []string{userID}, nil)
|
userRoles, err2 := dao.GetUserRole2(db, []string{userID}, nil)
|
||||||
globals.SugarLogger.Debugf("======userRoles:%s", utils.Format4Output(userRoles, false))
|
if userID == "6D914A8BB71611EDB37F525400E86DC0" {
|
||||||
|
globals.SugarLogger.Debugf("======userRoles:%s", utils.Format4Output(userRoles, false))
|
||||||
|
}
|
||||||
err = err2
|
err = err2
|
||||||
for _, v := range userRoles {
|
for _, v := range userRoles {
|
||||||
var (
|
var (
|
||||||
|
|||||||
Reference in New Issue
Block a user