package guangzuan import ( "mtp2_if/global/app" "mtp2_if/global/e" "mtp2_if/logger" "mtp2_if/models" "net/http" "github.com/gin-gonic/gin" ) // GetGoods // @Summary 获取钻石详情 // @Produce json // @Security ApiKeyAuth // @Security LoginID // @Security Group // @Param goodsno query string true "商品编号" // @Success 200 {object} models.GZGoods // @Failure 500 {object} app.Response // @Router /Guangzuan/GetGoods [get] // @Tags 广钻 func GetGoods(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.GZGoods{} a.DoBindReq(&m) a.DoGetDataEx(&m) } // GetGZBSCGoods // @Summary 获取保税商品表 // @Produce json // @Security ApiKeyAuth // @Security LoginID // @Security Group // @Success 200 {array} models.Gzbscgoods // @Failure 500 {object} app.Response // @Router /Guangzuan/GetGZBSCGoods [get] // @Tags 广钻 func GetGZBSCGoods(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.Gzbscgoods{} if rsp, err := m.GetAll(); err == nil { a.Gin.Response(http.StatusOK, e.SUCCESS, rsp) } else { logger.GetLogger().Errorf("query fail, %v", err) a.Gin.Response(http.StatusBadRequest, e.ERROR_QUERY_FAIL, nil) } } // GetGZMemberInfo // @Summary 获取会员风采表 // @Produce json // @Security ApiKeyAuth // @Security LoginID // @Security Group // @Success 200 {array} models.Gzmemberinfo // @Failure 500 {object} app.Response // @Router /Guangzuan/GetGZMemberInfo [get] // @Tags 广钻 func GetGZMemberInfo(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.Gzmemberinfo{} if rsp, err := m.GetAll(); err == nil { a.Gin.Response(http.StatusOK, e.SUCCESS, rsp) } else { logger.GetLogger().Errorf("query fail, %v", err) a.Gin.Response(http.StatusBadRequest, e.ERROR_QUERY_FAIL, nil) } }