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

@@ -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()
}