添加抖音授权登录,国美测试接口,修改运单重复骑手,添加推送骑手信息

This commit is contained in:
邹宗楠
2022-05-13 16:05:19 +08:00
parent 977d11ed9c
commit a91f46207f
49 changed files with 3355 additions and 254 deletions

View File

@@ -0,0 +1,87 @@
package gomei
import (
"fmt"
gomei "git.rosy.net.cn/baseapi/platformapi/gome_live_show"
"git.rosy.net.cn/baseapi/platformapi/jdshopapi"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxutils"
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
"git.rosy.net.cn/jx-callback/business/model"
"git.rosy.net.cn/jx-callback/business/model/dao"
"git.rosy.net.cn/jx-callback/globals/api"
)
func (p *PurchaseHandler) ReadStore(ctx *jxcontext.Context, vendorOrgCode, vendorStoreID, vendorStoreName string) (storeDetail *dao.StoreDetail, err error) {
if vendorStoreName != "" {
result2, _ := api.GuoMeiApi.QueryStoreList(&gomei.GetStoreListReq{
StoreName: vendorStoreName,
})
if len(result2.Data.Records) != model.YES {
return storeDetail, fmt.Errorf("国美未查询到该平台门店平台门店ID[%v]", vendorStoreID)
}
storeDetail = &dao.StoreDetail{}
storeDetail.Name = result2.Data.Records[0].StoreName
storeDetail.Lat = jxutils.StandardCoordinate2Int(utils.Str2Float64("0.000"))
storeDetail.Lng = jxutils.StandardCoordinate2Int(utils.Str2Float64("0.000"))
}
return storeDetail, err
}
// stoerIDs为nil表示所有
func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName string) (err error) {
return nil
}
func (p *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName string, params map[string]interface{}, storeDetail *dao.StoreDetail) (vendorStoreID string, err error) {
return "", err
}
func (p *PurchaseHandler) DeleteStore(db *dao.DaoDB, storeID int, userName string) (err error) {
return err
}
func (p *PurchaseHandler) RefreshAllStoresID(ctx *jxcontext.Context, parentTask tasksch.ITask, isAsync bool) (hint string, err error) {
return hint, err
}
func (p *PurchaseHandler) GetStoreStatus(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string) (storeStatus int, err error) {
return storeStatus, err
}
func (p *PurchaseHandler) EnableAutoAcceptOrder(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, isSetEnable bool) (err error) {
return err
}
func (c *PurchaseHandler) UpdateStoreStatus(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, status int) (err error) {
err = api.JdShopAPI.UpdateStatus(utils.Str2Int(vendorStoreID), jxStatus2JdsStatus(status))
return err
}
func (c *PurchaseHandler) UpdateStoreOpTime(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, opTimeList []int16) (err error) {
return err
}
func (c *PurchaseHandler) GetAllStoresVendorID(ctx *jxcontext.Context, vendorOrgCode string) (vendorStoreIDs []string, err error) {
return vendorStoreIDs, err
}
func (c *PurchaseHandler) UpdateStoreCustomID(ctx *jxcontext.Context, vendorOrgCode, vendorStoreID string, storeID int64) (err error) {
return err
}
func jxStatus2JdsStatus(status int) (result int) {
if status == model.StoreStatusOpened {
result = jdshopapi.JdsStoreStatusOnline
} else if status == model.StoreStatusHaveRest || status == model.StoreStatusClosed {
result = jdshopapi.JdsStoreStatusRest
} else {
result = jdshopapi.JdsStoreStatusDisable
}
return result
}
func (c *PurchaseHandler) UpdateStoreLineStatus(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, lineStatus int) (err error) {
return err
}