+ EnableAutoAcceptOrder
This commit is contained in:
@@ -144,9 +144,6 @@ type IPurchasePlatformHandler interface {
|
||||
UpdateStore(db *dao.DaoDB, storeID int, userName string) (err error)
|
||||
GetStoreStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string) (storeStatus int, err error)
|
||||
UpdateStoreCustomID(ctx *jxcontext.Context, vendorStoreID string, storeID int64) (err error)
|
||||
// EnableAutoAcceptOrder(vendorStoreID string, isEnabled bool) error
|
||||
// OpenStore(vendorStoreID string, userName string) error
|
||||
// CloseStore(vendorStoreID, closeNotice, userName string) error
|
||||
|
||||
// SyncStoreSkus(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, skuIDs []int, isAsync, isContinueWhenError bool) (hint string, err error)
|
||||
// // !!!注意,此操作会先清除门店已有的商品,一般用于初始化,小心使用
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
type IStoreHandler interface {
|
||||
GetAllStoresVendorID(ctx *jxcontext.Context) (vendorStoreIDs []string, err error)
|
||||
|
||||
EnableAutoAcceptOrder(ctx *jxcontext.Context, storeID int, vendorStoreID string, isSetEnable bool) (err error)
|
||||
UpdateStoreStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string, status int) (err error)
|
||||
// opTime格式为整数1130代表11:30
|
||||
UpdateStoreOpTime(ctx *jxcontext.Context, storeID int, vendorStoreID string, opTimeList []int16) (err error)
|
||||
|
||||
@@ -444,6 +444,10 @@ func (c *PurchaseHandler) GetShopHealthInfo(vendorShopID string) (shopHealthInfo
|
||||
return shopHealthInfo, err
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) EnableAutoAcceptOrder(ctx *jxcontext.Context, storeID int, vendorStoreID string, isSetEnable bool) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *PurchaseHandler) UpdateStoreStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string, status int) (err error) {
|
||||
store, err := c.ReadStore(ctx, vendorStoreID)
|
||||
if err != nil {
|
||||
|
||||
@@ -20,18 +20,6 @@ func (p *PurchaseHandler) RefreshAllStoresID(ctx *jxcontext.Context, parentTask
|
||||
return hint, err
|
||||
}
|
||||
|
||||
// func (p *PurchaseHandler) EnableAutoAcceptOrder(vendorStoreID string, isEnabled bool) error {
|
||||
// return nil
|
||||
// }
|
||||
|
||||
// func (p *PurchaseHandler) OpenStore(vendorStoreID string, userName string) error {
|
||||
// return nil
|
||||
// }
|
||||
|
||||
// func (p *PurchaseHandler) CloseStore(vendorStoreID, closeNotice, userName string) error {
|
||||
// return nil
|
||||
// }
|
||||
|
||||
func (p *PurchaseHandler) GetStoreStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string) (storeStatus int, err error) {
|
||||
return storeStatus, err
|
||||
}
|
||||
|
||||
@@ -156,35 +156,6 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
||||
return err
|
||||
}
|
||||
|
||||
// 没用
|
||||
// func (p *PurchaseHandler) DeleteStore(vendorStoreID, userName string) error {
|
||||
// params := map[string]interface{}{
|
||||
// "yn": 1,
|
||||
// }
|
||||
// return getAPI("").UpdateStoreInfo4Open(vendorStoreID, userName, params)
|
||||
// }
|
||||
|
||||
// func (p *PurchaseHandler) EnableAutoAcceptOrder(vendorStoreID string, isEnabled bool) error {
|
||||
// _, err := getAPI("").UpdateStoreConfig4Open(vendorStoreID, isEnabled)
|
||||
// return err
|
||||
// }
|
||||
|
||||
// func (p *PurchaseHandler) OpenStore(vendorStoreID string, userName string) error {
|
||||
// params := map[string]interface{}{
|
||||
// "closeStatus": 0,
|
||||
// "storeNotice": "",
|
||||
// }
|
||||
// return getAPI("").UpdateStoreInfo4Open(vendorStoreID, userName, params)
|
||||
// }
|
||||
|
||||
// func (p *PurchaseHandler) CloseStore(vendorStoreID, closeNotice, userName string) error {
|
||||
// params := map[string]interface{}{
|
||||
// "closeStatus": 1,
|
||||
// "storeNotice": closeNotice,
|
||||
// }
|
||||
// return getAPI("").UpdateStoreInfo4Open(vendorStoreID, userName, params)
|
||||
// }
|
||||
|
||||
///////////////////////
|
||||
func (p *PurchaseHandler) GetAllStoresFromRemote() ([]*model.Store, error) {
|
||||
ids, err := p.GetAllStoresVendorID(jxcontext.AdminCtx)
|
||||
@@ -313,6 +284,11 @@ func (c *PurchaseHandler) OnStoreMsg(msg *jdapi.CallbackOrderMsg) (response *jda
|
||||
return jdapi.Err2CallbackResponse(err, "")
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) EnableAutoAcceptOrder(ctx *jxcontext.Context, storeID int, vendorStoreID string, isSetEnable bool) (err error) {
|
||||
_, err = getAPI("").UpdateStoreConfig4Open(vendorStoreID, isSetEnable)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *PurchaseHandler) UpdateStoreStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string, status int) (err error) {
|
||||
_, closeStatus := JxStoreStatus2JdStatus(status)
|
||||
if globals.EnableJdStoreWrite {
|
||||
|
||||
@@ -23,6 +23,10 @@ func (p *PurchaseHandler) GetStoreStatus(ctx *jxcontext.Context, storeID int, ve
|
||||
return storeStatus, err
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) EnableAutoAcceptOrder(ctx *jxcontext.Context, storeID int, vendorStoreID string, isSetEnable bool) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *PurchaseHandler) UpdateStoreStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string, status int) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -170,6 +170,10 @@ func (p *PurchaseHandler) GetStoreStatus(ctx *jxcontext.Context, storeID int, ve
|
||||
return 0, err
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) EnableAutoAcceptOrder(ctx *jxcontext.Context, storeID int, vendorStoreID string, isSetEnable bool) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *PurchaseHandler) UpdateStoreStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string, status int) (err error) {
|
||||
openLevel, isOnline := bizStatusJX2Mtwm(status)
|
||||
if globals.EnableMtwmStoreWrite {
|
||||
|
||||
Reference in New Issue
Block a user