Bläddra i källkod

/Guangzuan/QueryDiamond 钻石搜索,增加证书编号入参

zhou.xiaoning 2 år sedan
förälder
incheckning
5bf8fea689

+ 1 - 0
controllers/guangzuan/trade.go

@@ -91,6 +91,7 @@ func QueryDiamond(c *gin.Context) {
 		ORIGIN:             req.ORIGIN,
 		ZSSTYLETYPE:        req.ZSSTYLETYPE,
 		ZSCZCOLOR1TYPE:     req.ZSCZCOLOR1TYPE,
+		CERNO:              req.CERNO,
 
 		PageEx: models.PageEx{Page: req.Page, PageSize: req.PageSize},
 	}

+ 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]

+ 4 - 0
docs/docs.go

@@ -49182,6 +49182,10 @@ const docTemplate = `{
         "models.SellOrderQueryReq": {
             "type": "object",
             "properties": {
+                "cerno": {
+                    "description": "证书编号",
+                    "type": "string"
+                },
                 "origin": {
                     "description": "原产地",
                     "type": "string"

+ 4 - 0
docs/swagger.json

@@ -49173,6 +49173,10 @@
         "models.SellOrderQueryReq": {
             "type": "object",
             "properties": {
+                "cerno": {
+                    "description": "证书编号",
+                    "type": "string"
+                },
                 "origin": {
                     "description": "原产地",
                     "type": "string"

+ 3 - 0
docs/swagger.yaml

@@ -20590,6 +20590,9 @@ definitions:
     type: object
   models.SellOrderQueryReq:
     properties:
+      cerno:
+        description: 证书编号
+        type: string
       origin:
         description: 原产地
         type: string

+ 4 - 0
models/guangzuan.go

@@ -372,6 +372,7 @@ type SellOrderQueryReq struct {
 	ORIGIN             string   `json:"origin"`             // 原产地
 	ZSSTYLETYPE        []string `json:"zsstyletype"`        // 款式
 	ZSCZCOLOR1TYPE     []string `json:"zsczcolor1type"`     // 彩钻颜色1
+	CERNO              string   `json:"cerno"`              // 证书编号
 
 	PageJosn // 分页
 }
@@ -852,6 +853,9 @@ func (r *SellOrder) buildQueryDiamond() string {
 	if len(r.ZSCZCOLOR1TYPE) > 0 {
 		sqlId.JoinFormat(" AND q.ZSCZCOLOR1TYPE IN (%v)", strings.Join(r.ZSCZCOLOR1TYPE, ","))
 	}
+	if len(r.CERNO) > 0 {
+		sqlId.JoinFormat(" AND q.CERNO LIKE '%%%v%%'", r.CERNO)
+	}
 
 	sqlId.Page(r.Page, r.PageSize)
 	return sqlId.String()