This commit is contained in:
苏尹岚
2021-02-03 11:18:30 +08:00
parent 1c9f710b45
commit fb55dd6a85
8 changed files with 20 additions and 8 deletions

View File

@@ -245,7 +245,7 @@ func (v *VendorSync) SyncStore2(ctx *jxcontext.Context, db *dao.DaoDB, vendorIDs
db2 = dao.GetDB()
}
if model.IsSyncStatusNew(storeMap.SyncStatus) {
if vendorStoreID, err = handler.CreateStore2(db2, storeMap.StoreID, userName); err == nil {
if vendorStoreID, err = handler.CreateStore2(db2, storeMap.StoreID, userName, nil); err == nil {
resultList = append(resultList, 1)
} else {
failedList = putils.GetErrMsg2FailedSingleList(nil, err, storeMap.StoreID, model.VendorChineseNames[storeMap.VendorID], "创建门店")
@@ -283,7 +283,7 @@ func (v *VendorSync) SyncStore2(ctx *jxcontext.Context, db *dao.DaoDB, vendorIDs
var vendorStoreID string
storeMap := loopMapInfo.StoreMapList[0]
if model.IsSyncStatusNew(storeMap.SyncStatus) {
if vendorStoreID, err = handler.CreateStore2(db2, storeMap.StoreID, userName); err == nil {
if vendorStoreID, err = handler.CreateStore2(db2, storeMap.StoreID, userName, nil); err == nil {
resultList = append(resultList, 1)
} else {
failedList = putils.GetErrMsg2FailedSingleList(nil, err, storeMap.StoreID, model.VendorChineseNames[storeMap.VendorID], "创建门店")

View File

@@ -149,7 +149,7 @@ type IPurchasePlatformHandler interface {
// Store
ReadStore(ctx *jxcontext.Context, vendorOrgCode, vendorStoreID string) (store *dao.StoreDetail, err error)
UpdateStore(db *dao.DaoDB, storeID int, userName string) (err error)
CreateStore2(db *dao.DaoDB, storeID int, userName string) (vendorStoreID string, err error)
CreateStore2(db *dao.DaoDB, storeID int, userName string, params map[string]interface{}) (vendorStoreID string, err error)
DeleteStore(db *dao.DaoDB, storeID int, userName string) (err error)
GetStoreStatus(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string) (storeStatus int, err error)
UpdateStoreCustomID(ctx *jxcontext.Context, vendorOrgCode, vendorStoreID string, storeID int64) (err error)

View File

@@ -550,7 +550,7 @@ func (c *PurchaseHandler) GetShopIDsByPage() (vendorStoreIDs []string, err error
return vendorStoreIDs, err
}
func (p *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName string) (vendorStoreID string, err error) {
func (p *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName string, params map[string]interface{}) (vendorStoreID string, err error) {
return vendorStoreID, err
}

View File

@@ -522,7 +522,7 @@ func (c *PurchaseHandler) UpdateStoreCustomID(ctx *jxcontext.Context, vendorOrgC
return err
}
func (p *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName string) (vendorStoreID string, err error) {
func (p *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName string, params map[string]interface{}) (vendorStoreID string, err error) {
return vendorStoreID, err
}

View File

@@ -77,7 +77,7 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
return err
}
func (p *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName string) (vendorStoreID string, err error) {
func (p *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName string, params map[string]interface{}) (vendorStoreID string, err error) {
store, err := dao.GetStoreDetail(db, storeID, model.VendorIDJDShop, "")
if err != nil {
return vendorStoreID, err

View File

@@ -96,7 +96,7 @@ func (p *PurchaseHandler) CreateStore(db *dao.DaoDB, storeID int, userName strin
return p.UpdateStore(db, storeID, userName)
}
func (p *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName string) (vendorStoreID string, err error) {
func (p *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName string, params map[string]interface{}) (vendorStoreID string, err error) {
return vendorStoreID, err
}

View File

@@ -15,7 +15,7 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
return err
}
func (p *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName string) (vendorStoreID string, err error) {
func (p *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName string, params map[string]interface{}) (vendorStoreID string, err error) {
return vendorStoreID, err
}

View File

@@ -1004,3 +1004,15 @@ func (c *StoreController) InsertStoreCategories() {
return retVal, "", err
})
}
// @Title 创建平台门店
// @Description 创建平台门店
// @Param token header string true "认证token"
// @Param vendorID formData int true "平台ID"
// @Param payload formData string true "json数据store对象"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /CreateVendorStore [post]
func (c *StoreController) CreateVendorStore() {
}