| 123456789101112131415161718192021222324252627282930313233 |
- package goods
- import (
- "mtp2_if/global/app"
- "mtp2_if/global/e"
- "mtp2_if/logger"
- "mtp2_if/models"
- "net/http"
- "github.com/gin-gonic/gin"
- )
- // GetTCEGoodsCollections 获取TCE商品集合表
- // @Summary 获取TCE商品集合表
- // @Produce json
- // @Success 200 {array} models.TCEGoodsCollect
- // @Failure 500 {object} app.Response
- // @Router /Goods/GetTCEGoodsCollections [get]
- // @Tags 商品服务
- func GetTCEGoodsCollections(c *gin.Context) {
- appG := app.Gin{C: c}
- rst, err := models.GetTCEGoodsCollections()
- if err != nil {
- // 查询失败
- logger.GetLogger().Errorf("GetTCEGoodsCollections failed: %s", err.Error())
- appG.Response(http.StatusBadRequest, e.ERROR_QUERY_FAIL, nil)
- return
- }
- // 查询成功
- appG.Response(http.StatusOK, e.SUCCESS, rst)
- }
|