sensitive的新增和修改方法,美团配送打开和新增的时候实时更新的方法
This commit is contained in:
@@ -1509,7 +1509,17 @@ func GetStoreCourierMaps(ctx *jxcontext.Context, db *dao.DaoDB, storeID int, ven
|
||||
if vendorID != -1 {
|
||||
cond[model.FieldVendorID] = vendorID
|
||||
}
|
||||
return storeCourierMaps, dao.GetEntitiesByKV(db, &storeCourierMaps, cond, false)
|
||||
err = dao.GetEntitiesByKV(db, &storeCourierMaps, cond, false)
|
||||
if len(storeCourierMaps) != 0 {
|
||||
//同步美团配送与否状态及美团门店是否存在
|
||||
for _, v := range storeCourierMaps {
|
||||
if v.VendorID != model.VendorIDMTPS {
|
||||
continue
|
||||
}
|
||||
SetMTPSStatus(jxcontext.AdminCtx, v.StoreID, v.Status)
|
||||
}
|
||||
}
|
||||
return storeCourierMaps, err
|
||||
}
|
||||
|
||||
func AddStoreCourierMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendorID int, storeCourierMap *model.StoreCourierMap) (outStoreCourierMap *model.StoreCourierMap, err error) {
|
||||
@@ -1556,6 +1566,10 @@ func addStoreCourierMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendorID
|
||||
} else {
|
||||
err = ErrCanNotFindVendor
|
||||
}
|
||||
//同步美团配送与否状态及美团门店是否存在
|
||||
if outStoreCourierMap.VendorID == model.VendorIDMTPS {
|
||||
SetMTPSStatus(jxcontext.AdminCtx, outStoreCourierMap.StoreID, outStoreCourierMap.Status)
|
||||
}
|
||||
return outStoreCourierMap, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user