Files
jx-callback/business/mtps/controller/order.go
2018-06-22 22:38:30 +08:00

27 lines
697 B
Go

package controller
import (
"git.rosy.net.cn/baseapi/platformapi/mtpsapi"
"git.rosy.net.cn/jx-callback/globals/globals2"
)
type OrderController struct {
}
func Error2Response(err error) *mtpsapi.CallbackResponse {
if err != nil {
return &mtpsapi.CallbackResponse{
Code: -1,
}
}
return mtpsapi.SuccessResponse
}
func (c *OrderController) OrderStatusChanged(order *mtpsapi.CallbackOrderMsg) *mtpsapi.CallbackResponse {
return Error2Response(globals2.FreshFoodAPI.MtpsOrderStatusChanged(order))
}
func (c *OrderController) OrderException(order *mtpsapi.CallbackOrderExceptionMsg) *mtpsapi.CallbackResponse {
return Error2Response(globals2.FreshFoodAPI.MtpsOrderException(order))
}