+ EnableAutoAcceptOrder
This commit is contained in:
@@ -144,9 +144,6 @@ type IPurchasePlatformHandler interface {
|
|||||||
UpdateStore(db *dao.DaoDB, storeID int, userName string) (err error)
|
UpdateStore(db *dao.DaoDB, storeID int, userName string) (err error)
|
||||||
GetStoreStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string) (storeStatus int, err error)
|
GetStoreStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string) (storeStatus int, err error)
|
||||||
UpdateStoreCustomID(ctx *jxcontext.Context, vendorStoreID string, storeID int64) (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)
|
// 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 {
|
type IStoreHandler interface {
|
||||||
GetAllStoresVendorID(ctx *jxcontext.Context) (vendorStoreIDs []string, err error)
|
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)
|
UpdateStoreStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string, status int) (err error)
|
||||||
// opTime格式为整数1130代表11:30
|
// opTime格式为整数1130代表11:30
|
||||||
UpdateStoreOpTime(ctx *jxcontext.Context, storeID int, vendorStoreID string, opTimeList []int16) (err error)
|
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
|
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) {
|
func (c *PurchaseHandler) UpdateStoreStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string, status int) (err error) {
|
||||||
store, err := c.ReadStore(ctx, vendorStoreID)
|
store, err := c.ReadStore(ctx, vendorStoreID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -20,18 +20,6 @@ func (p *PurchaseHandler) RefreshAllStoresID(ctx *jxcontext.Context, parentTask
|
|||||||
return hint, err
|
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) {
|
func (p *PurchaseHandler) GetStoreStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string) (storeStatus int, err error) {
|
||||||
return storeStatus, err
|
return storeStatus, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,35 +156,6 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
|||||||
return err
|
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) {
|
func (p *PurchaseHandler) GetAllStoresFromRemote() ([]*model.Store, error) {
|
||||||
ids, err := p.GetAllStoresVendorID(jxcontext.AdminCtx)
|
ids, err := p.GetAllStoresVendorID(jxcontext.AdminCtx)
|
||||||
@@ -313,6 +284,11 @@ func (c *PurchaseHandler) OnStoreMsg(msg *jdapi.CallbackOrderMsg) (response *jda
|
|||||||
return jdapi.Err2CallbackResponse(err, "")
|
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) {
|
func (c *PurchaseHandler) UpdateStoreStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string, status int) (err error) {
|
||||||
_, closeStatus := JxStoreStatus2JdStatus(status)
|
_, closeStatus := JxStoreStatus2JdStatus(status)
|
||||||
if globals.EnableJdStoreWrite {
|
if globals.EnableJdStoreWrite {
|
||||||
|
|||||||
@@ -23,6 +23,10 @@ func (p *PurchaseHandler) GetStoreStatus(ctx *jxcontext.Context, storeID int, ve
|
|||||||
return storeStatus, err
|
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) {
|
func (c *PurchaseHandler) UpdateStoreStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string, status int) (err error) {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,6 +170,10 @@ func (p *PurchaseHandler) GetStoreStatus(ctx *jxcontext.Context, storeID int, ve
|
|||||||
return 0, err
|
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) {
|
func (c *PurchaseHandler) UpdateStoreStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string, status int) (err error) {
|
||||||
openLevel, isOnline := bizStatusJX2Mtwm(status)
|
openLevel, isOnline := bizStatusJX2Mtwm(status)
|
||||||
if globals.EnableMtwmStoreWrite {
|
if globals.EnableMtwmStoreWrite {
|
||||||
|
|||||||
Reference in New Issue
Block a user