- 重构配送门店管理
This commit is contained in:
@@ -335,18 +335,19 @@ func (c *StoreController) DeleteStoreCourierMap() {
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 根据绑定的京东定,自动创建达达店
|
||||
// @Description 根据绑定的京东定,自动创建达达店
|
||||
// @Title 自动创建或更新快递门店
|
||||
// @Description 自动创建或更新快递门店
|
||||
// @Param token header string true "认证token"
|
||||
// @Param storeID formData int false "门店ID"
|
||||
// @Param isForceUpdate formData bool false "是否强制更新"
|
||||
// @Param isAsync formData bool false "是否异步操作"
|
||||
// @Param isContinueWhenError formData bool false "单个同步失败是否继续,缺省false"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /RefreshMissingDadaStores [put]
|
||||
func (c *StoreController) RefreshMissingDadaStores() {
|
||||
c.callRefreshMissingDadaStores(func(params *tStoreRefreshMissingDadaStoresParams) (retVal interface{}, errCode string, err error) {
|
||||
retVal, err = cms.RefreshMissingDadaStores(params.Ctx, params.StoreID, params.IsAsync, params.IsContinueWhenError)
|
||||
// @router /UpdateOrCreateCourierStores [put]
|
||||
func (c *StoreController) UpdateOrCreateCourierStores() {
|
||||
c.callUpdateOrCreateCourierStores(func(params *tStoreUpdateOrCreateCourierStoresParams) (retVal interface{}, errCode string, err error) {
|
||||
retVal, err = cms.UpdateOrCreateCourierStores(params.Ctx, params.StoreID, params.IsForceUpdate, params.IsAsync, params.IsContinueWhenError)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
@@ -49,3 +49,16 @@ func (c *MtpsController) Except() {
|
||||
c.Abort("404")
|
||||
}
|
||||
}
|
||||
|
||||
func (c *MtpsController) StoreStatus() {
|
||||
if c.Ctx.Input.Method() == http.MethodPost {
|
||||
obj, callbackResponse := api.MtpsAPI.GetShopStatusCallbackMsg(c.Ctx.Request)
|
||||
if callbackResponse == nil {
|
||||
callbackResponse = mtps.OnStoreStatus(obj)
|
||||
}
|
||||
c.Data["json"] = callbackResponse
|
||||
c.ServeJSON()
|
||||
} else {
|
||||
c.Abort("404")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user