Documentation ¶
Overview ¶
商品模块,此模块相对来说代码质量是有保证的,可以正常使用但是要排计划做测试用例
Index ¶
- func APIGETGoods(c *gin.Context)
- func APIGETGoodsByID(c *gin.Context)
- func APIPOSTGoods(c *gin.Context)
- func APIPUTGoods(c *gin.Context)
- func GETGoods(req *GETGoodsReq) (*[]model.DBGoods, error)
- func GETGoodsByID(req *GETGoodsByIDReq) (*model.DBGoods, error)
- func POSTGoods(tx *sql.Tx, postGoodsReq *POSTGoodsReq) (sql.Result, error)
- func PUTGoods(tx *sql.Tx, req *PUTGoodsReq) (sql.Result, error)
- func Register()
- type GETGoodsByIDReq
- type GETGoodsReq
- type POSTGoodsReq
- type PUTGoodsReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GETGoods ¶
func GETGoods(req *GETGoodsReq) (*[]model.DBGoods, error)
func GETGoodsByID ¶
func GETGoodsByID(req *GETGoodsByIDReq) (*model.DBGoods, error)
func Register ¶
func Register()
Types ¶
type GETGoodsByIDReq ¶
type GETGoodsByIDReq struct {
GoodsID uint64 `form:"goods_id" json:"goods_id" binding:"required"`
}
type GETGoodsReq ¶
type POSTGoodsReq ¶
type POSTGoodsReq struct { GoodsName string `json:"goods_name" binding:"required"` GoodsPrice float64 `json:"goods_price" binding:"required"` GoodsCategoryID uint64 `json:"goods_category_id" binding:"required"` GoodsUID uint64 GoodsContent string `json:"goods_content"` GoodsExcerpt string `json:"goods_excerpt"` GoodsStatus string `json:"goods_status"` GoodsOrder uint64 `json:"goods_order"` }
type PUTGoodsReq ¶
type PUTGoodsReq struct { GoodsID uint64 `json:"goods_id" binding:"required"` GoodsName string `json:"goods_name" binding:"required"` GoodsPrice float64 `json:"goods_price" binding:"required"` GoodsCategoryID uint64 `json:"goods_category_id" binding:"required"` GoodsUID uint64 GoodsContent string `json:"goods_content"` GoodsExcerpt string `json:"goods_excerpt"` GoodsStatus string `json:"goods_status"` GoodsOrder uint64 `json:"goods_order"` GoodsImg string `json:"goods_img"` GoodsExt string `json:"goods_ext"` }
Click to show internal directories.
Click to hide internal directories.