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