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