|
|
@@ -2,7 +2,10 @@ package guangzuan
|
|
|
|
|
|
import (
|
|
|
"mtp2_if/global/app"
|
|
|
+ "mtp2_if/global/e"
|
|
|
+ "mtp2_if/logger"
|
|
|
"mtp2_if/models"
|
|
|
+ "net/http"
|
|
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
)
|
|
|
@@ -24,3 +27,47 @@ func GetGoods(c *gin.Context) {
|
|
|
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)
|
|
|
+ }
|
|
|
+}
|