aa
This commit is contained in:
@@ -3889,13 +3889,25 @@ func UpdateBrand(ctx *jxcontext.Context, payload map[string]interface{}, isDel b
|
||||
}
|
||||
|
||||
func CreateVendorStore(ctx *jxcontext.Context, storeID, vendorID int, payload map[string]interface{}) (err error) {
|
||||
// var (
|
||||
// db = dao.GetDB()
|
||||
// )
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
storeDetail *dao.StoreDetail
|
||||
)
|
||||
if storeDetail, err = dao.GetStoreDetail(db, storeID, vendorID, ""); err != nil {
|
||||
return fmt.Errorf("获取门店信息失败,请联系技术部!")
|
||||
}
|
||||
if payload["vendorOrgCode"] == nil {
|
||||
return fmt.Errorf("请选择平台账号!")
|
||||
}
|
||||
// storeDetail, _ := dao.GetStoreDetail(db, storeID, vendorID, payload["vendorOrgCode"].(string))
|
||||
if vendorID == model.VendorIDMTWM {
|
||||
if brands, err := dao.GetBrands(db, "", storeDetail.BrandID); err == nil {
|
||||
if len(brands) > 0 {
|
||||
if strings.Contains(brands[0].Name, "无品牌") {
|
||||
return fmt.Errorf("无品牌店铺不允许创建美团门店!")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// handler := partner.GetPurchasePlatformFromVendorID(vendorID)
|
||||
// vendorStoreID, err := handler.CreateStore2(db, storeID, ctx.GetUserName(), payload)
|
||||
// if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user