assistcreatefence

This commit is contained in:
richboo111
2022-11-18 16:35:07 +08:00
parent b44a06104d
commit 11b63862d1
4 changed files with 34 additions and 18 deletions

View File

@@ -6014,3 +6014,16 @@ func GetVendorOrgCode(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendorID i
}
return storeMap, dao.GetEntitiesByKV(db, &storeMap, cond, false)
}
//辅助创建电子围栏
func AssistCreateFence(appOrgCode string, storeID int64) error {
//创建前检查 暂时不支持
if fenceID, err := tiktok_store.CreateFenceByStore(appOrgCode, storeID); err != nil {
return errors.New(fmt.Sprintf("创建电子围栏失败:%v", err))
} else {
if err := tiktok_store.BindFenceByStore(appOrgCode, storeID, []string{fenceID}); err != nil {
return errors.New(fmt.Sprintf("绑定电子围栏失败:%v", err))
}
}
return nil
}