Merge branch 'jdshop' of e.coding.net:rosydev/jx-callback into jdshop
This commit is contained in:
@@ -6014,3 +6014,23 @@ func GetVendorOrgCode(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendorID i
|
||||
}
|
||||
return storeMap, dao.GetEntitiesByKV(db, &storeMap, cond, false)
|
||||
}
|
||||
|
||||
//批量辅助创建电子围栏
|
||||
func AssistCreateFence(relInfo map[string]map[int64]string) (string, error) {
|
||||
errList := errlist.New()
|
||||
for k, v := range relInfo {
|
||||
for i, j := range v {
|
||||
if fenceID, err := tiktok_store.CreateFenceByStore(k, i); err != nil {
|
||||
errList.AddErr(fmt.Errorf("平台门店(%s),门店(%d) 创建电子围栏失败:%v", j, i, err))
|
||||
} else {
|
||||
if err := tiktok_store.BindFenceByStore(k, utils.Str2Int64(j), []string{fenceID}); err != nil {
|
||||
errList.AddErr(fmt.Errorf("平台门店(%s),门店(%d)绑定电子围栏失败:%v", j, i, err))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if errList.GetErrListAsOne() != nil {
|
||||
return fmt.Sprintf("批量创建电子围栏错误,请根据提示处理:%v", errList.GetErrListAsOne()), nil
|
||||
}
|
||||
return "", nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user