Ver Fonte

增加接口:
/Guangzuan/GetGZBSCGoods 获取保税商品表
/Guangzuan/GetGZMemberInfo 获取会员风采表

zhou.xiaoning há 2 anos atrás
pai
commit
aea2e0db48

+ 6 - 7
config/config.xml

@@ -13,11 +13,11 @@
     <DbAddress value="192.168.31.88"/>
     <DbName value="orcl"/>
     <DbPort value="1521"/>
-    <DbUser value="mtp2_test167"/>
+    <DbUser value="mtp2_test104"/>
     <DbPwd value="muchinfo"/>
   </DbSetting>
   <RedisSetting>
-    <Address value="192.168.31.167"/>
+    <Address value="192.168.31.104"/>
     <Port value="5007"/>
     <Timeout value="3"/>
     <ConnNum value="1"/>
@@ -25,11 +25,11 @@
     <Pwd value=""/>
   </RedisSetting>
   <MqSetting>
-    <Url value="amqp://guest:guest@192.168.31.167:5020/test"/>
+    <Url value="amqp://guest:guest@192.168.31.104:5020/test"/>
     <Exchange value="entry"/>
   </MqSetting>
   <MongoDBSetting>
-    <HostName value="192.168.31.167"/>
+    <HostName value="192.168.31.104"/>
     <Port value="5025"/>
     <DBName value="HistoryQuote"/>
     <Username value="quote_test01"/>
@@ -38,9 +38,8 @@
   <MySQLSetting>
     <Host value="192.168.30.72"/>
     <Port value="3306"/>
-    <DBName value="historyquote_test167"/>
-    <Username value="quote_test167"/>
+    <DBName value="historyquote_test104"/>
+    <Username value="quote_test104"/>
     <Password value="123456"/>
   </MySQLSetting>
 </Configuration>
-

+ 47 - 0
controllers/guangzuan/goods.go

@@ -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)
+	}
+}

+ 4 - 4
controllers/guangzuan/tradeService.go

@@ -18,8 +18,8 @@ import (
 // @Security Group
 // @Param    userid   query    int    true  "用户ID"
 // @Param    executestatus query    int false "执行状态 - 1:未生效 2:进行中 3:已结束"
-// @Param    page          query    int false "页码"
-// @Param    pagesize      query    int false "每页条数"
+// @Param    page     query    int    false "页码"
+// @Param    pagesize query    int    false "每页条数"
 // @Success  200           {array}  models.GzcjjcorderM
 // @Failure  500     {object} app.Response
 // @Router   /Guangzuan/QueryGZCJJCOrder [get]
@@ -39,8 +39,8 @@ func QueryGZCJJCOrder(c *gin.Context) {
 // @Security Group
 // @Param    userid        query    int true  "用户ID"
 // @Param    orderid  query    string false "单据ID"
-// @Param    page     query    int    false "页码"
-// @Param    pagesize query    int    false "每页条数"
+// @Param    page          query    int false "页码"
+// @Param    pagesize      query    int false "每页条数"
 // @Success  200      {array}  models.GzcjjcorderdetailM
 // @Failure  500           {object} app.Response
 // @Router   /Guangzuan/QueryGZCJJCOrderDetail [get]

+ 168 - 0
docs/docs.go

@@ -9032,6 +9032,84 @@ const docTemplate = `{
                 }
             }
         },
+        "/Guangzuan/GetGZBSCGoods": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    },
+                    {
+                        "LoginID": []
+                    },
+                    {
+                        "Group": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "广钻"
+                ],
+                "summary": "获取保税商品表",
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.Gzbscgoods"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/Guangzuan/GetGZMemberInfo": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    },
+                    {
+                        "LoginID": []
+                    },
+                    {
+                        "Group": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "广钻"
+                ],
+                "summary": "获取会员风采表",
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.Gzmemberinfo"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Guangzuan/GetGoods": {
             "get": {
                 "security": [
@@ -34826,6 +34904,55 @@ const docTemplate = `{
                 }
             }
         },
+        "models.Gzbscgoods": {
+            "type": "object",
+            "properties": {
+                "countryname": {
+                    "description": "产销国",
+                    "type": "string"
+                },
+                "currencyname": {
+                    "description": "币制",
+                    "type": "string"
+                },
+                "executionflag": {
+                    "description": "海关执行标志",
+                    "type": "string"
+                },
+                "goodsid": {
+                    "description": "商品ID(料号)",
+                    "type": "integer"
+                },
+                "goodsname": {
+                    "description": "商品名称",
+                    "type": "string"
+                },
+                "goodsnum": {
+                    "description": "商品编号",
+                    "type": "string"
+                },
+                "goodsspec": {
+                    "description": "规格型号",
+                    "type": "string"
+                },
+                "legalunit": {
+                    "description": "法定计量单位",
+                    "type": "string"
+                },
+                "reportunit": {
+                    "description": "申报计量单位",
+                    "type": "string"
+                },
+                "storageperiod": {
+                    "description": "存储(监管)期限",
+                    "type": "string"
+                },
+                "unitprice": {
+                    "description": "单价",
+                    "type": "number"
+                }
+            }
+        },
         "models.GzbsfworderM": {
             "type": "object",
             "required": [
@@ -35571,6 +35698,47 @@ const docTemplate = `{
                 }
             }
         },
+        "models.Gzmemberinfo": {
+            "type": "object",
+            "properties": {
+                "contactname": {
+                    "description": "联系人",
+                    "type": "string"
+                },
+                "contactphone": {
+                    "description": "电话",
+                    "type": "string"
+                },
+                "contactwx": {
+                    "description": "微信号",
+                    "type": "string"
+                },
+                "imageurl": {
+                    "description": "图片地址",
+                    "type": "string"
+                },
+                "memberid": {
+                    "description": "会员ID(SEQ_GZ_MEMBERINFO)",
+                    "type": "integer"
+                },
+                "membername": {
+                    "description": "会员名称",
+                    "type": "string"
+                },
+                "membertags": {
+                    "description": "标签(逗号分隔)",
+                    "type": "string"
+                },
+                "orderindex": {
+                    "description": "显示顺序",
+                    "type": "integer"
+                },
+                "updatetime": {
+                    "description": "更新时间",
+                    "type": "string"
+                }
+            }
+        },
         "models.Gzrapaportprice": {
             "type": "object",
             "properties": {

+ 168 - 0
docs/swagger.json

@@ -9023,6 +9023,84 @@
                 }
             }
         },
+        "/Guangzuan/GetGZBSCGoods": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    },
+                    {
+                        "LoginID": []
+                    },
+                    {
+                        "Group": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "广钻"
+                ],
+                "summary": "获取保税商品表",
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.Gzbscgoods"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/Guangzuan/GetGZMemberInfo": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    },
+                    {
+                        "LoginID": []
+                    },
+                    {
+                        "Group": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "广钻"
+                ],
+                "summary": "获取会员风采表",
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.Gzmemberinfo"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Guangzuan/GetGoods": {
             "get": {
                 "security": [
@@ -34817,6 +34895,55 @@
                 }
             }
         },
+        "models.Gzbscgoods": {
+            "type": "object",
+            "properties": {
+                "countryname": {
+                    "description": "产销国",
+                    "type": "string"
+                },
+                "currencyname": {
+                    "description": "币制",
+                    "type": "string"
+                },
+                "executionflag": {
+                    "description": "海关执行标志",
+                    "type": "string"
+                },
+                "goodsid": {
+                    "description": "商品ID(料号)",
+                    "type": "integer"
+                },
+                "goodsname": {
+                    "description": "商品名称",
+                    "type": "string"
+                },
+                "goodsnum": {
+                    "description": "商品编号",
+                    "type": "string"
+                },
+                "goodsspec": {
+                    "description": "规格型号",
+                    "type": "string"
+                },
+                "legalunit": {
+                    "description": "法定计量单位",
+                    "type": "string"
+                },
+                "reportunit": {
+                    "description": "申报计量单位",
+                    "type": "string"
+                },
+                "storageperiod": {
+                    "description": "存储(监管)期限",
+                    "type": "string"
+                },
+                "unitprice": {
+                    "description": "单价",
+                    "type": "number"
+                }
+            }
+        },
         "models.GzbsfworderM": {
             "type": "object",
             "required": [
@@ -35562,6 +35689,47 @@
                 }
             }
         },
+        "models.Gzmemberinfo": {
+            "type": "object",
+            "properties": {
+                "contactname": {
+                    "description": "联系人",
+                    "type": "string"
+                },
+                "contactphone": {
+                    "description": "电话",
+                    "type": "string"
+                },
+                "contactwx": {
+                    "description": "微信号",
+                    "type": "string"
+                },
+                "imageurl": {
+                    "description": "图片地址",
+                    "type": "string"
+                },
+                "memberid": {
+                    "description": "会员ID(SEQ_GZ_MEMBERINFO)",
+                    "type": "integer"
+                },
+                "membername": {
+                    "description": "会员名称",
+                    "type": "string"
+                },
+                "membertags": {
+                    "description": "标签(逗号分隔)",
+                    "type": "string"
+                },
+                "orderindex": {
+                    "description": "显示顺序",
+                    "type": "integer"
+                },
+                "updatetime": {
+                    "description": "更新时间",
+                    "type": "string"
+                }
+            }
+        },
         "models.Gzrapaportprice": {
             "type": "object",
             "properties": {

+ 110 - 0
docs/swagger.yaml

@@ -11031,6 +11031,42 @@ definitions:
     - goodscode
     - tradedate
     type: object
+  models.Gzbscgoods:
+    properties:
+      countryname:
+        description: 产销国
+        type: string
+      currencyname:
+        description: 币制
+        type: string
+      executionflag:
+        description: 海关执行标志
+        type: string
+      goodsid:
+        description: 商品ID(料号)
+        type: integer
+      goodsname:
+        description: 商品名称
+        type: string
+      goodsnum:
+        description: 商品编号
+        type: string
+      goodsspec:
+        description: 规格型号
+        type: string
+      legalunit:
+        description: 法定计量单位
+        type: string
+      reportunit:
+        description: 申报计量单位
+        type: string
+      storageperiod:
+        description: 存储(监管)期限
+        type: string
+      unitprice:
+        description: 单价
+        type: number
+    type: object
   models.GzbsfworderM:
     properties:
       accountid:
@@ -11584,6 +11620,36 @@ definitions:
     - orderid
     - status
     type: object
+  models.Gzmemberinfo:
+    properties:
+      contactname:
+        description: 联系人
+        type: string
+      contactphone:
+        description: 电话
+        type: string
+      contactwx:
+        description: 微信号
+        type: string
+      imageurl:
+        description: 图片地址
+        type: string
+      memberid:
+        description: 会员ID(SEQ_GZ_MEMBERINFO)
+        type: integer
+      membername:
+        description: 会员名称
+        type: string
+      membertags:
+        description: 标签(逗号分隔)
+        type: string
+      orderindex:
+        description: 显示顺序
+        type: integer
+      updatetime:
+        description: 更新时间
+        type: string
+    type: object
   models.Gzrapaportprice:
     properties:
       dollar:
@@ -32368,6 +32434,50 @@ paths:
       summary: 保税服务单据操作信息
       tags:
       - 广钻
+  /Guangzuan/GetGZBSCGoods:
+    get:
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.Gzbscgoods'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      - LoginID: []
+      - Group: []
+      summary: 获取保税商品表
+      tags:
+      - 广钻
+  /Guangzuan/GetGZMemberInfo:
+    get:
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.Gzmemberinfo'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      - LoginID: []
+      - Group: []
+      summary: 获取会员风采表
+      tags:
+      - 广钻
   /Guangzuan/GetGoods:
     get:
       parameters:

+ 12 - 0
models/guangzuan.go

@@ -4147,3 +4147,15 @@ func (r *Bscinoutorder) GetDataByPage() (interface{}, error, int, int, int) {
 	}
 	return sData, err, r.Page, r.PageSize, total
 }
+
+func (r *Gzbscgoods) GetAll() (rsp []Gzbscgoods, err error) {
+	rsp = make([]Gzbscgoods, 0)
+	err = db.GetEngine().Find(&rsp)
+	return
+}
+
+func (r *Gzmemberinfo) GetAll() (rsp []Gzmemberinfo, err error) {
+	rsp = make([]Gzmemberinfo, 0)
+	err = db.GetEngine().OrderBy("ORDERINDEX").Find(&rsp)
+	return
+}

+ 18 - 0
models/ori.go

@@ -562,3 +562,21 @@ type Gzbscinoutorder struct {
 func (r *Gzbscinoutorder) TableName() string {
 	return "GZ_BSCINOUTORDER"
 }
+
+// Gzmemberinfo 会员风采表
+type Gzmemberinfo struct {
+	MEMBERID     int32     `json:"memberid" xorm:"MEMBERID"`         // 会员ID(SEQ_GZ_MEMBERINFO)
+	MEMBERNAME   string    `json:"membername" xorm:"MEMBERNAME"`     // 会员名称
+	CONTACTNAME  string    `json:"contactname" xorm:"CONTACTNAME"`   // 联系人
+	CONTACTPHONE string    `json:"contactphone" xorm:"CONTACTPHONE"` // 电话
+	CONTACTWX    string    `json:"contactwx" xorm:"CONTACTWX"`       // 微信号
+	MEMBERTAGS   string    `json:"membertags" xorm:"MEMBERTAGS"`     // 标签(逗号分隔)
+	IMAGEURL     string    `json:"imageurl" xorm:"IMAGEURL"`         // 图片地址
+	UPDATETIME   time.Time `json:"updatetime" xorm:"UPDATETIME"`     // 更新时间
+	ORDERINDEX   int32     `json:"orderindex" xorm:"ORDERINDEX"`     // 显示顺序
+}
+
+// TableName is GZ_MEMBERINFO
+func (r *Gzmemberinfo) TableName() string {
+	return "GZ_MEMBERINFO"
+}

+ 2 - 1
routers/router.go

@@ -695,7 +695,8 @@ func InitRouter() *gin.Engine {
 		guangzuanR.GET("QueryGzbscusermonthpay", guangzuan.QueryGzbscusermonthpay)
 		guangzuanR.GET("QueryGzbscuserpowerfee", guangzuan.QueryGzbscuserpowerfee)
 		guangzuanR.GET("QueryBscinoutorder", guangzuan.QueryBscinoutorder)
-
+		guangzuanR.GET("GetGZBSCGoods", guangzuan.GetGZBSCGoods)
+		guangzuanR.GET("GetGZMemberInfo", guangzuan.GetGZMemberInfo)
 	}
 
 	// **************************上海铁合金*************************