This commit is contained in:
aozhiwei 2024-11-11 15:59:46 +08:00
parent 8786f49b37
commit 9e58278f3a
3 changed files with 23 additions and 1 deletions

View File

@ -1,6 +1,9 @@
package shop
import (
"main/constant"
"main/common"
"main/vo"
"github.com/gin-gonic/gin"
)
@ -8,4 +11,12 @@ type ShopApi struct {
}
func (this *ShopApi) Goods(c *gin.Context) {
s := c.MustGet(constant.SESSION_KEY).(common.Session)
if s == nil {
return
}
rspObj := struct {
vo.BaseVo
}{}
c.JSON(200, rspObj)
}

View File

@ -2,6 +2,7 @@ package shop
import (
"f5"
"main/middleware"
"main/api/v1"
)
@ -9,5 +10,7 @@ type ShopRouter struct{}
func (this *ShopRouter) InitRouter() {
api := v1.ApiGroupApp.ShopApiGroup
f5.GetApp().GetGinEngine().GET("/api/v1/shop/goods", api.ShopApi.Goods)
f5.GetApp().GetGinEngine().GET("/api/v1/shop/goods",
middleware.JwtAuth,
api.ShopApi.Goods)
}

View File

@ -0,0 +1,8 @@
package vo
import (
)
type Goods struct {
ItemId int32 `json:"item_id"`
}