Merge remote-tracking branch 'origin/mark' into su

This commit is contained in:
苏尹岚
2020-02-21 14:05:06 +08:00
10 changed files with 31 additions and 21 deletions

View File

@@ -16,7 +16,7 @@ type StoreController struct {
// @Title 得到京西门店信息
// @Description 得到京西门店信息,如下条件之间是与的关系
// @Param token header string true "认证token"
// @Param token header string false "认证token"
// @Param keyword query string false "查询关键字(可以为空,为空表示不限制)"
// @Param storeID query int false "门店ID"
// @Param startStoreID query int false "起始门店ID"
@@ -137,7 +137,7 @@ func (c *StoreController) CreateStore() {
// @Title 得到门店映射信息
// @Description 得到门店映射信息
// @Param token header string true "认证token"
// @Param token header string false "认证token"
// @Param storeID query int true "门店ID"
// @Param vendorID query int false "厂商ID缺省为全部"
// @Success 200 {object} controllers.CallResult

View File

@@ -36,16 +36,18 @@ func (c *DadaDeliveryController) Msg() {
func (c *DadaDeliveryController) Notify() {
if c.Ctx.Input.Method() == http.MethodPost {
obj, notifyResponse := api.DadaAPI.GetNotifyMsg(c.Ctx.Input.RequestBody)
if notifyResponse == nil {
if notifyResponse == nil && obj.MessageObj != nil {
err := api.DadaAPI.ConfirmRidderCancel(obj.MessageObj.OrderID, obj.MessageObj.DadaOrderID, true)
if err != nil {
notifyResponse = dadaapi.FailedNotifyResponse
}
globals.SugarLogger.Debugf("dada notify, obj:%s, err:%v", utils.Format4Output(obj, false), err)
}
if notifyResponse == nil {
notifyResponse = dadaapi.SuccessNotifyResponse
} else {
c.Data["json"] = notifyResponse
c.ServeJSON()
}
c.Data["json"] = notifyResponse
c.ServeJSON()
} else {
c.Abort("404")
}