1
This commit is contained in:
parent
bc888c9dc4
commit
6cd6a12a44
@ -8,10 +8,6 @@ import (
|
||||
"main/mt"
|
||||
"main/model"
|
||||
"main/vo"
|
||||
/*
|
||||
"math/rand"
|
||||
"main/service"
|
||||
*/
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
@ -64,4 +60,13 @@ func (this *InAppShopApi) OrderInfo(c *gin.Context) {
|
||||
if s == nil {
|
||||
return
|
||||
}
|
||||
orderId := c.Param("order_id")
|
||||
orderModel := new(model.InAppOrder)
|
||||
if err, found := orderModel.Find(s.GetAccountId(), orderId); err != nil {
|
||||
f5.RspErr(c, 500, "server internal error")
|
||||
return
|
||||
} else if !found {
|
||||
f5.RspErr(c, 1, "not found")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
@ -13,4 +13,7 @@ func (this *InAppShopRouter) InitRouter() {
|
||||
f5.GetApp().GetGinEngine().POST("/api/v1/inapp_shop/purchase",
|
||||
middleware.JwtAuth,
|
||||
api.InAppShopApi.Purchase)
|
||||
f5.GetApp().GetGinEngine().GET("/api/v1/inapp_shop/order/:order_id",
|
||||
middleware.JwtAuth,
|
||||
api.InAppShopApi.OrderInfo)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user