This commit is contained in:
邹宗楠
2024-04-19 10:14:36 +08:00
parent 55b24bb283
commit 7a3a7d18f8
4 changed files with 135 additions and 24 deletions

View File

@@ -1051,13 +1051,14 @@ func (c *StoreSkuController) CopyMtToJd() {
// @Param fromStoreID formData string true "被复制门店id"
// @Param toStoreID formData string true "复制到门店id"
// @Param vendorID formData int true "平台id"
// @Param offSet formData int true "跳过页码"
// @Param offSet formData int false "跳过页码"
// @Param syncType formData int true "同步类型[1-商品/2-活动/3-前两者一起同步]"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /CopyMtToMt [post]
func (c *StoreSkuController) CopyMtToMt() {
c.callCopyMtToMt(func(params *tStoreSkuCopyMtToMtParams) (retVal interface{}, errCode string, err error) {
retVal, err = cms.CopyOnStoreSkuToOther(params.Ctx, params.FromStoreID, params.ToStoreID, params.VendorID, false, params.OffSet)
retVal, err = cms.CopyOnStoreSkuToOther(params.Ctx, params.FromStoreID, params.ToStoreID, params.VendorID, false, params.OffSet, params.SyncType)
return retVal, errCode, err
})
}

View File

@@ -28,6 +28,7 @@ func (c *Djsw2Controller) handleMsg(handler func(*jdapi.API, interface{}) *jdapi
func (c *Djsw2Controller) orderStatus() {
if c.Ctx.Input.Method() == http.MethodPost {
callbackResponse := c.handleMsg(func(a *jdapi.API, obj interface{}) (callbackResponse *jdapi.CallbackResponse) {
globals.SugarLogger.Debugf("========jds2 := %s", utils.Format4Output(obj, false))
if orderMsg, ok := obj.(*jdapi.CallbackOrderMsg); ok {
orderman.FixedOrderManager.OnNewFakeJdOrder(orderMsg.BillID)
}
@@ -41,6 +42,7 @@ func (c *Djsw2Controller) orderStatus() {
}
func (c *Djsw2Controller) NewOrder() {
globals.SugarLogger.Debugf("========jds2 := %s", "NewOrder")
c.orderStatus()
}
@@ -49,18 +51,22 @@ func (c *Djsw2Controller) OrderAdjust() {
}
func (c *Djsw2Controller) OrderWaitOutStore() {
globals.SugarLogger.Debugf("========jds2 := %s", "OrderWaitOutStore")
c.nullOperation()
}
func (c *Djsw2Controller) PickFinishOrder() {
globals.SugarLogger.Debugf("========jds2 := %s", "PickFinishOrder")
c.nullOperation()
}
func (c *Djsw2Controller) DeliveryOrder() {
globals.SugarLogger.Debugf("========jds2 := %s", "DeliveryOrder")
c.nullOperation()
}
func (c *Djsw2Controller) FinishOrder() {
globals.SugarLogger.Debugf("========jds2 := %s", "FinishOrder")
c.nullOperation()
}
@@ -73,6 +79,7 @@ func (c *Djsw2Controller) UnlockOrder() {
}
func (c *Djsw2Controller) UserCancelOrder() {
globals.SugarLogger.Debugf("========jds2 := %s", "UserCancelOrder")
c.nullOperation()
}

View File

@@ -35,8 +35,10 @@ func (c *DjswController) handleMsg(handler func(*jdapi.API, interface{}) *jdapi.
}
func (c *DjswController) orderStatus() {
globals.SugarLogger.Debugf("========jds := %s", "orderStatus")
if c.Ctx.Input.Method() == http.MethodPost {
callbackResponse := c.handleMsg(func(a *jdapi.API, obj interface{}) (callbackResponse *jdapi.CallbackResponse) {
globals.SugarLogger.Debugf("========obj := %s", utils.Format4Output(obj, false))
callbackResponse = jd.OnOrderMsg(obj.(*jdapi.CallbackOrderMsg), a)
return callbackResponse
})
@@ -48,30 +50,37 @@ func (c *DjswController) orderStatus() {
}
func (c *DjswController) NewOrder() {
globals.SugarLogger.Debugf("========jds := %s", "NewOrder")
c.orderStatus()
}
func (c *DjswController) OrderAdjust() {
globals.SugarLogger.Debugf("========jds := %s", "OrderAdjust")
c.orderStatus()
}
func (c *DjswController) OrderWaitOutStore() {
globals.SugarLogger.Debugf("========jds := %s", "OrderWaitOutStore")
c.orderStatus()
}
func (c *DjswController) PickFinishOrder() {
globals.SugarLogger.Debugf("========jds := %s", "PickFinishOrder")
c.orderStatus()
}
func (c *DjswController) DeliveryOrder() {
globals.SugarLogger.Debugf("========jds := %s", "DeliveryOrder")
c.orderStatus()
}
func (c *DjswController) FinishOrder() {
globals.SugarLogger.Debugf("========jds := %s", "FinishOrder")
c.orderStatus()
}
func (c *DjswController) LockOrder() {
globals.SugarLogger.Debugf("========jds := %s", "LockOrder")
c.orderStatus()
}
@@ -80,6 +89,7 @@ func (c *DjswController) UnlockOrder() {
}
func (c *DjswController) UserCancelOrder() {
globals.SugarLogger.Debugf("========jds := %s", "UserCancelOrder")
c.orderStatus()
}