This commit is contained in:
aozhiwei 2024-11-29 13:22:45 +08:00
parent bc888c9dc4
commit 6cd6a12a44
2 changed files with 12 additions and 4 deletions

View File

@ -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
}
}

View File

@ -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)
}