1
This commit is contained in:
parent
bc888c9dc4
commit
6cd6a12a44
@ -8,10 +8,6 @@ import (
|
|||||||
"main/mt"
|
"main/mt"
|
||||||
"main/model"
|
"main/model"
|
||||||
"main/vo"
|
"main/vo"
|
||||||
/*
|
|
||||||
"math/rand"
|
|
||||||
"main/service"
|
|
||||||
*/
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -64,4 +60,13 @@ func (this *InAppShopApi) OrderInfo(c *gin.Context) {
|
|||||||
if s == nil {
|
if s == nil {
|
||||||
return
|
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",
|
f5.GetApp().GetGinEngine().POST("/api/v1/inapp_shop/purchase",
|
||||||
middleware.JwtAuth,
|
middleware.JwtAuth,
|
||||||
api.InAppShopApi.Purchase)
|
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