- refactor as baseapi.
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/platform/dadaapi"
|
||||
"git.rosy.net.cn/baseapi/platformapi/dadaapi"
|
||||
"git.rosy.net.cn/jx-callback/globals/globals2"
|
||||
)
|
||||
|
||||
type OrderController struct {
|
||||
}
|
||||
|
||||
func Error2Response(err error) *dadaapi.DadaCallbackResponse {
|
||||
func Error2Response(err error) *dadaapi.CallbackResponse {
|
||||
if err != nil {
|
||||
return dadaapi.FailedResponse
|
||||
}
|
||||
return dadaapi.SuccessResponse
|
||||
}
|
||||
|
||||
func (o *OrderController) OrderStatusChanged(msg *dadaapi.DadaCallbackMsg) *dadaapi.DadaCallbackResponse {
|
||||
func (o *OrderController) OrderStatusChanged(msg *dadaapi.CallbackMsg) *dadaapi.CallbackResponse {
|
||||
return Error2Response(globals2.FreshFoodAPI.DadaOrderStatusChanged(msg))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user