Просмотр исходного кода

增加“查询我的求购”和“查询我的出售”接口

zhou.xiaoning 3 лет назад
Родитель
Сommit
0a6485375c
6 измененных файлов с 1805 добавлено и 110 удалено
  1. 2 2
      controllers/common/common.go
  2. 48 0
      controllers/guangzuan/wrposition.go
  3. 579 54
      docs/docs.go
  4. 579 54
      docs/swagger.json
  5. 367 0
      docs/swagger.yaml
  6. 230 0
      models/guangzuan.go

+ 2 - 2
controllers/common/common.go

@@ -83,7 +83,7 @@ func QueryProvincesAndCities(c *gin.Context) {
 // @Summary 查询区域信息
 // @Produce json
 // @Success 200 {object} models.Division
-// @Failure 500       {object} app.Response
+// @Failure     500    {object} app.Response
 // @Router  /Common/GetDivisions [get]
 // @Tags    通用服务
 func GetDivisions(c *gin.Context) {
@@ -135,7 +135,7 @@ type QueryImageConfigsRsp struct {
 // @Param   userId    query    int false "用户id"
 // @Param   imageType query    int false "类型 - 1:App首页轮播 2:我的 3:首页(PC) 4:首页推广(移动-新会)"
 // @Success 200       {object} QueryImageConfigsRsp
-// @Failure     500    {object} app.Response
+// @Failure 500       {object} app.Response
 // @Router  /Common/QueryImageConfigs [get]
 // @Tags    通用服务
 func QueryImageConfigs(c *gin.Context) {

+ 48 - 0
controllers/guangzuan/wrposition.go

@@ -29,3 +29,51 @@ func QueryMyWRPosition(c *gin.Context) {
 	a.DoBindReq(&m)
 	a.DoGetDataByPage(&m)
 }
+
+// QueryMyBuyOrder
+// @Summary  查询我的求购
+// @Produce  json
+// @Security ApiKeyAuth
+// @Security LoginID
+// @Security Group
+// @Param    userid          query    int    true  "用户ID"
+// @Param    page            query    int    false "页码"
+// @Param    pagesize        query    int    false "每页条数"
+// @Param    zsallproperties query    string false "商品(查询字段-模糊查询)"
+// @Param    zscategory      query    int    false "钻石分类枚举ID"
+// @Param    wrtradeorderid  query    int    false "委托单号"
+// @Param    ishis           query    bool   false "是否历史查询"
+// @Success  200             {array}  models.MyBuyOrder
+// @Failure  500             {object} app.Response
+// @Router   /Guangzuan/QueryMyBuyOrder [get]
+// @Tags     广钻
+func QueryMyBuyOrder(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.MyBuyOrder{}
+	a.DoBindReq(&m)
+	a.DoGetDataByPage(&m)
+}
+
+// QueryMySellOrder
+// @Summary  查询我的出售
+// @Produce  json
+// @Security ApiKeyAuth
+// @Security LoginID
+// @Security Group
+// @Param    userid          query    int    true  "用户ID"
+// @Param    page            query    int    false "页码"
+// @Param    pagesize        query    int    false "每页条数"
+// @Param    zsallproperties query    string false "商品(查询字段-模糊查询)"
+// @Param    zscategory      query    int    false "钻石分类枚举ID"
+// @Param    wrtradeorderid  query    int    false "委托单号"
+// @Param    ishis           query    bool   false "是否历史查询"
+// @Success  200             {array}  models.MySellOrder
+// @Failure  500             {object} app.Response
+// @Router   /Guangzuan/QueryMySellOrder [get]
+// @Tags     广钻
+func QueryMySellOrder(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.MySellOrder{}
+	a.DoBindReq(&m)
+	a.DoGetDataByPage(&m)
+}

+ 579 - 54
docs/docs.go

@@ -7611,6 +7611,174 @@ const docTemplate = `{
                 }
             }
         },
+        "/Guangzuan/QueryMyBuyOrder": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    },
+                    {
+                        "LoginID": []
+                    },
+                    {
+                        "Group": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "广钻"
+                ],
+                "summary": "查询我的求购",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "商品(查询字段-模糊查询)",
+                        "name": "zsallproperties",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "钻石分类枚举ID",
+                        "name": "zscategory",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "委托单号",
+                        "name": "wrtradeorderid",
+                        "in": "query"
+                    },
+                    {
+                        "type": "boolean",
+                        "description": "是否历史查询",
+                        "name": "ishis",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.MyBuyOrder"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/Guangzuan/QueryMySellOrder": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    },
+                    {
+                        "LoginID": []
+                    },
+                    {
+                        "Group": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "广钻"
+                ],
+                "summary": "查询我的出售",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "商品(查询字段-模糊查询)",
+                        "name": "zsallproperties",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "钻石分类枚举ID",
+                        "name": "zscategory",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "委托单号",
+                        "name": "wrtradeorderid",
+                        "in": "query"
+                    },
+                    {
+                        "type": "boolean",
+                        "description": "是否历史查询",
+                        "name": "ishis",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.MySellOrder"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Guangzuan/QueryMyWRPosition": {
             "get": {
                 "security": [
@@ -32215,93 +32383,238 @@ const docTemplate = `{
                 }
             }
         },
-        "models.MyCoupon": {
+        "models.MyBuyOrder": {
             "type": "object",
             "required": [
-                "accountid",
-                "coupontypeid"
+                "userid"
             ],
             "properties": {
                 "accountid": {
                     "description": "资金账户ID",
                     "type": "integer"
                 },
-                "areauserid": {
-                    "description": "所属机构",
+                "marketid": {
+                    "description": "市场ID",
                     "type": "integer"
                 },
-                "conditionvalue": {
-                    "description": "条件阈值(可为0)",
-                    "type": "number"
+                "origin": {
+                    "description": "原产地",
+                    "type": "string"
                 },
-                "couponcategroy": {
-                    "description": "种类 - 1:现金券 2:折扣券 3:折扣券(单张)",
+                "remark": {
+                    "description": "备注",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "用户ID",
                     "type": "integer"
                 },
-                "couponname": {
-                    "description": "优惠券名称",
+                "warehouseids": {
+                    "description": "仓库ID - 多个, 逗号分隔",
                     "type": "string"
                 },
-                "coupontypeid": {
-                    "description": "优惠券类型ID",
+                "warehouseinfosdisplay": {
                     "type": "string"
                 },
-                "couponvalue": {
-                    "description": "面值[1:现金券 - 抵扣值 2:折扣券-折扣值]",
-                    "type": "number"
-                },
-                "curfreezeqty": {
-                    "description": "期末冻结数量",
+                "wrtradeorderid": {
+                    "description": "[委托单号]买委托单ID(320+Unix秒时间戳(10位)+xxxxxx)",
                     "type": "integer"
                 },
-                "curqty": {
-                    "description": "期末数量",
+                "zscategory": {
+                    "description": "钻石分类 - 枚举”ZSCategory“",
                     "type": "integer"
                 },
-                "isgeneral": {
-                    "description": "是否通用券 - 0:否 1:是",
-                    "type": "integer"
+                "zscategorydisplay": {
+                    "type": "string"
                 },
-                "isunusable": {
-                    "description": "是否不可用",
-                    "type": "boolean"
+                "zsclaritytype": {
+                    "description": "净度 - 两个, 逗号分隔",
+                    "type": "string"
                 },
-                "limitedflag": {
-                    "description": "是否指定商品 - 0:不限 1:限制",
-                    "type": "integer"
+                "zsclaritytypedisplay": {
+                    "type": "string"
                 },
-                "limitedgoodsids": {
-                    "description": "指定商品IDs[逗号分隔,前后加逗号]",
+                "zscolortype": {
+                    "description": "颜色 - 两个, 逗号分隔",
                     "type": "string"
                 },
-                "orifreezeqty": {
-                    "description": "期初冻结数量",
-                    "type": "integer"
+                "zscolortypedisplay": {
+                    "type": "string"
                 },
-                "oriqty": {
-                    "description": "期初数量",
-                    "type": "integer"
+                "zscrystaltype": {
+                    "description": "晶型 -  多个,逗号分隔",
+                    "type": "string"
                 },
-                "reasontype": {
-                    "description": "不可用原因 - 0:未确认 1:不可用于此商品 2:不可用于此卖家",
-                    "type": "integer"
+                "zscrystaltypedisplay": {
+                    "type": "string"
                 },
-                "todaydecrease": {
-                    "description": "今日减少",
-                    "type": "integer"
+                "zscurrencytype": {
+                    "description": "货币类型 -   多个, 逗号分隔",
+                    "type": "string"
                 },
-                "todayincrease": {
-                    "description": "今日增加",
-                    "type": "integer"
+                "zscurrencytypedisplay": {
+                    "type": "string"
                 },
-                "userid": {
-                    "description": "用户ID",
-                    "type": "integer"
+                "zscuttype": {
+                    "description": "切工 - 两个, 逗号分隔",
+                    "type": "string"
                 },
-                "userscope": {
-                    "description": "卖家范围(用户ID,逗号分隔,前后加逗号) [IsGeneral =0时使用]",
+                "zscuttypedisplay": {
                     "type": "string"
-                }
+                },
+                "zsczcolor1type": {
+                    "description": "彩钻颜色1, 逗号分隔",
+                    "type": "string"
+                },
+                "zsczcolor1typedisplay": {
+                    "type": "string"
+                },
+                "zsczcolor2type": {
+                    "description": "彩钻颜色2, 逗号分隔",
+                    "type": "string"
+                },
+                "zsczcolor2typedisplay": {
+                    "type": "string"
+                },
+                "zsczcolor3type": {
+                    "description": "彩钻颜色3, 逗号分隔",
+                    "type": "string"
+                },
+                "zsczcolor3typedisplay": {
+                    "type": "string"
+                },
+                "zsfluorescencetype": {
+                    "description": "荧光 - 多个, 逗号分隔",
+                    "type": "string"
+                },
+                "zsfluorescencetypedisplay": {
+                    "type": "string"
+                },
+                "zspolishtype": {
+                    "description": "抛光度 - 两个, 逗号分隔",
+                    "type": "string"
+                },
+                "zspolishtypedisplay": {
+                    "type": "string"
+                },
+                "zsshapetype": {
+                    "description": "形状 - 多个, 逗号分隔",
+                    "type": "string"
+                },
+                "zsshapetypedisplay": {
+                    "type": "string"
+                },
+                "zssize": {
+                    "description": "尺寸 - 两个小数, 逗号分隔",
+                    "type": "string"
+                },
+                "zsstyletype": {
+                    "description": "款式 -  多个, 逗号分隔",
+                    "type": "string"
+                },
+                "zsstyletypedisplay": {
+                    "type": "string"
+                },
+                "zssymmetrytype": {
+                    "description": "对称度 - 两个, 逗号分隔",
+                    "type": "string"
+                },
+                "zssymmetrytypedisplay": {
+                    "type": "string"
+                },
+                "zstabledisplay": {
+                    "description": "求购信息",
+                    "type": "string"
+                }
+            }
+        },
+        "models.MyCoupon": {
+            "type": "object",
+            "required": [
+                "accountid",
+                "coupontypeid"
+            ],
+            "properties": {
+                "accountid": {
+                    "description": "资金账户ID",
+                    "type": "integer"
+                },
+                "areauserid": {
+                    "description": "所属机构",
+                    "type": "integer"
+                },
+                "conditionvalue": {
+                    "description": "条件阈值(可为0)",
+                    "type": "number"
+                },
+                "couponcategroy": {
+                    "description": "种类 - 1:现金券 2:折扣券 3:折扣券(单张)",
+                    "type": "integer"
+                },
+                "couponname": {
+                    "description": "优惠券名称",
+                    "type": "string"
+                },
+                "coupontypeid": {
+                    "description": "优惠券类型ID",
+                    "type": "string"
+                },
+                "couponvalue": {
+                    "description": "面值[1:现金券 - 抵扣值 2:折扣券-折扣值]",
+                    "type": "number"
+                },
+                "curfreezeqty": {
+                    "description": "期末冻结数量",
+                    "type": "integer"
+                },
+                "curqty": {
+                    "description": "期末数量",
+                    "type": "integer"
+                },
+                "isgeneral": {
+                    "description": "是否通用券 - 0:否 1:是",
+                    "type": "integer"
+                },
+                "isunusable": {
+                    "description": "是否不可用",
+                    "type": "boolean"
+                },
+                "limitedflag": {
+                    "description": "是否指定商品 - 0:不限 1:限制",
+                    "type": "integer"
+                },
+                "limitedgoodsids": {
+                    "description": "指定商品IDs[逗号分隔,前后加逗号]",
+                    "type": "string"
+                },
+                "orifreezeqty": {
+                    "description": "期初冻结数量",
+                    "type": "integer"
+                },
+                "oriqty": {
+                    "description": "期初数量",
+                    "type": "integer"
+                },
+                "reasontype": {
+                    "description": "不可用原因 - 0:未确认 1:不可用于此商品 2:不可用于此卖家",
+                    "type": "integer"
+                },
+                "todaydecrease": {
+                    "description": "今日减少",
+                    "type": "integer"
+                },
+                "todayincrease": {
+                    "description": "今日增加",
+                    "type": "integer"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                },
+                "userscope": {
+                    "description": "卖家范围(用户ID,逗号分隔,前后加逗号) [IsGeneral =0时使用]",
+                    "type": "string"
+                }
             }
         },
         "models.MyCouponHold": {
@@ -32384,6 +32697,218 @@ const docTemplate = `{
                 }
             }
         },
+        "models.MySellOrder": {
+            "type": "object",
+            "required": [
+                "userid"
+            ],
+            "properties": {
+                "accountid": {
+                    "description": "资金账号",
+                    "type": "integer"
+                },
+                "applyid": {
+                    "description": "申请单ID",
+                    "type": "integer"
+                },
+                "attachment1": {
+                    "description": "附件1",
+                    "type": "string"
+                },
+                "attachment2": {
+                    "description": "附件2",
+                    "type": "string"
+                },
+                "buyorsell": {
+                    "description": "买卖 - 0:买 1:卖",
+                    "type": "integer"
+                },
+                "canbargain": {
+                    "description": "是否可议价 - 0:不可 1:可",
+                    "type": "integer"
+                },
+                "cancelqty": {
+                    "description": "撤销数量",
+                    "type": "integer"
+                },
+                "canceltime": {
+                    "description": "撤销时间",
+                    "type": "string"
+                },
+                "chargealgorithm": {
+                    "description": "手续费收取方式 1:比率  2:固定",
+                    "type": "integer"
+                },
+                "chargealgorithmvalue": {
+                    "description": "手续费设置值(交易所部分)",
+                    "type": "number"
+                },
+                "chargealgorithmvalue2": {
+                    "description": "手续费设置值(会员部分)",
+                    "type": "number"
+                },
+                "clientordertime": {
+                    "description": "客户端委托时间",
+                    "type": "string"
+                },
+                "exchangerate": {
+                    "description": "汇率[67]",
+                    "type": "number"
+                },
+                "firstratio": {
+                    "description": "首付比率 - [挂牌时指定,摘牌时使用]",
+                    "type": "number"
+                },
+                "fixedprice": {
+                    "description": "固定价格    -   [挂牌]",
+                    "type": "number"
+                },
+                "freezecharge": {
+                    "description": "冻结手续费",
+                    "type": "number"
+                },
+                "freezefirstamount": {
+                    "description": "冻结首付金额 - [摘牌]",
+                    "type": "number"
+                },
+                "freezemargin": {
+                    "description": "冻结保证金",
+                    "type": "number"
+                },
+                "goodsno": {
+                    "description": "商品编号",
+                    "type": "string"
+                },
+                "isspecified": {
+                    "description": "是否指定对手 - 0:不指定 1:指定好友(贸易圈) 2:指定对手    -   [挂牌]",
+                    "type": "integer"
+                },
+                "marginalgorithm": {
+                    "description": "保证金方式 - 1:比率  2:固定",
+                    "type": "integer"
+                },
+                "marginvalue": {
+                    "description": "保证金设置值",
+                    "type": "number"
+                },
+                "marketid": {
+                    "description": "市场ID",
+                    "type": "integer"
+                },
+                "orderamount": {
+                    "description": "挂牌金额[账户] [67]= OrderQty * FixedPrice * ExchangeRate /100",
+                    "type": "number"
+                },
+                "orderqty": {
+                    "description": "委托数量",
+                    "type": "integer"
+                },
+                "ordertime": {
+                    "description": "委托时间",
+                    "type": "string"
+                },
+                "performancetemplateid": {
+                    "description": "履约计划模板ID",
+                    "type": "integer"
+                },
+                "pricefactor": {
+                    "description": "价格系数(浮动价时填写)    -   [挂牌]",
+                    "type": "number"
+                },
+                "pricemove": {
+                    "description": "升贴水(浮动价时填写)    -   [挂牌]",
+                    "type": "number"
+                },
+                "relatedwrtradeorderid": {
+                    "description": "关联委托单号(摘牌委托关联挂牌委托单ID)",
+                    "type": "integer"
+                },
+                "retcode": {
+                    "description": "错误代码",
+                    "type": "integer"
+                },
+                "tradedate": {
+                    "description": "交易日(yyyyMMdd)",
+                    "type": "string"
+                },
+                "tradeprice": {
+                    "description": "成交价格 - [摘牌] (浮动价  ((商品1价格*商品1价格系数+升贴水)* 商品1重量系数 + 商品2价格*商品2价格系数+商品2升贴水)* 商品2重量系数 ...)* 委托单价格系数 + 委托单升贴水)",
+                    "type": "number"
+                },
+                "tradeqty": {
+                    "description": "成交数量",
+                    "type": "integer"
+                },
+                "unfreezecharge": {
+                    "description": "解冻手续费",
+                    "type": "number"
+                },
+                "unfreezefirstamount": {
+                    "description": "解冻首付金额 - [摘牌]",
+                    "type": "number"
+                },
+                "unfreezemargin": {
+                    "description": "解冻保证金",
+                    "type": "number"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                },
+                "uuid": {
+                    "description": "发起端唯一id",
+                    "type": "string"
+                },
+                "validtime": {
+                    "description": "有效期限",
+                    "type": "string"
+                },
+                "validtype": {
+                    "description": "有效类型 - 1当日有效 2本周有效 3指定日期有效 4一直有效",
+                    "type": "integer"
+                },
+                "wrbargainid": {
+                    "description": "议价申请单ID",
+                    "type": "integer"
+                },
+                "wrfactortypeid": {
+                    "description": "仓单要素类型ID/商品ID(77)",
+                    "type": "integer"
+                },
+                "wrpricetype": {
+                    "description": "价格方式 - 1:固定价 2-浮动价  -   [挂牌]",
+                    "type": "integer"
+                },
+                "wrstandardid": {
+                    "description": "现货商品ID",
+                    "type": "integer"
+                },
+                "wrtradeorderid": {
+                    "description": "仓单贸易委托单ID(320+Unix秒时间戳(10位)+xxxxxx)",
+                    "type": "integer"
+                },
+                "wrtradeorderstatus": {
+                    "description": "委托状态 - 参考枚举'WRTradeOrderStatus' - 1:委托请求  2:待冻结  3:委托成功  4:委托失败  5:配对成功  6:已撤  7:部成  8:已成  9:部成部撤  10:成交失败  11:委托拒绝  12:经过摘牌(先摘后挂专用)  13:冻结成功(通道交易专用)  14:通道已撤  15:通道部成部撤  16:成交失败违约(荷兰式竞拍专用)  17:冻结PD成功  18:冻结PD失败  19:冻结能量成功  20:冻结能量失败  21:预约已报价  22:过期未付  23:优惠券处理中  24:仓单生成失败  25:首付扣款失败  26:履约失败  27:撤单解冻贷款失败",
+                    "type": "integer"
+                },
+                "wrtradetype": {
+                    "description": "仓单贸易类型 - 1:挂牌 2:摘牌 3:提货卖(文化中国) 4:提货买(文化中国)",
+                    "type": "integer"
+                },
+                "wrtransferuserid": {
+                    "description": "仓单受让用户 - [摘牌]",
+                    "type": "integer"
+                },
+                "zscategory": {
+                    "description": "钻石分类 - 枚举”ZSCategory“",
+                    "type": "integer"
+                },
+                "zscurrencytype": {
+                    "description": "货币类型 - 枚举“ZSCurrencyType”",
+                    "type": "integer"
+                }
+            }
+        },
         "models.MyUsedCoupon": {
             "type": "object",
             "required": [

+ 579 - 54
docs/swagger.json

@@ -7602,6 +7602,174 @@
                 }
             }
         },
+        "/Guangzuan/QueryMyBuyOrder": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    },
+                    {
+                        "LoginID": []
+                    },
+                    {
+                        "Group": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "广钻"
+                ],
+                "summary": "查询我的求购",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "商品(查询字段-模糊查询)",
+                        "name": "zsallproperties",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "钻石分类枚举ID",
+                        "name": "zscategory",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "委托单号",
+                        "name": "wrtradeorderid",
+                        "in": "query"
+                    },
+                    {
+                        "type": "boolean",
+                        "description": "是否历史查询",
+                        "name": "ishis",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.MyBuyOrder"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/Guangzuan/QueryMySellOrder": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    },
+                    {
+                        "LoginID": []
+                    },
+                    {
+                        "Group": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "广钻"
+                ],
+                "summary": "查询我的出售",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "商品(查询字段-模糊查询)",
+                        "name": "zsallproperties",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "钻石分类枚举ID",
+                        "name": "zscategory",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "委托单号",
+                        "name": "wrtradeorderid",
+                        "in": "query"
+                    },
+                    {
+                        "type": "boolean",
+                        "description": "是否历史查询",
+                        "name": "ishis",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.MySellOrder"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Guangzuan/QueryMyWRPosition": {
             "get": {
                 "security": [
@@ -32206,93 +32374,238 @@
                 }
             }
         },
-        "models.MyCoupon": {
+        "models.MyBuyOrder": {
             "type": "object",
             "required": [
-                "accountid",
-                "coupontypeid"
+                "userid"
             ],
             "properties": {
                 "accountid": {
                     "description": "资金账户ID",
                     "type": "integer"
                 },
-                "areauserid": {
-                    "description": "所属机构",
+                "marketid": {
+                    "description": "市场ID",
                     "type": "integer"
                 },
-                "conditionvalue": {
-                    "description": "条件阈值(可为0)",
-                    "type": "number"
+                "origin": {
+                    "description": "原产地",
+                    "type": "string"
                 },
-                "couponcategroy": {
-                    "description": "种类 - 1:现金券 2:折扣券 3:折扣券(单张)",
+                "remark": {
+                    "description": "备注",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "用户ID",
                     "type": "integer"
                 },
-                "couponname": {
-                    "description": "优惠券名称",
+                "warehouseids": {
+                    "description": "仓库ID - 多个, 逗号分隔",
                     "type": "string"
                 },
-                "coupontypeid": {
-                    "description": "优惠券类型ID",
+                "warehouseinfosdisplay": {
                     "type": "string"
                 },
-                "couponvalue": {
-                    "description": "面值[1:现金券 - 抵扣值 2:折扣券-折扣值]",
-                    "type": "number"
-                },
-                "curfreezeqty": {
-                    "description": "期末冻结数量",
+                "wrtradeorderid": {
+                    "description": "[委托单号]买委托单ID(320+Unix秒时间戳(10位)+xxxxxx)",
                     "type": "integer"
                 },
-                "curqty": {
-                    "description": "期末数量",
+                "zscategory": {
+                    "description": "钻石分类 - 枚举”ZSCategory“",
                     "type": "integer"
                 },
-                "isgeneral": {
-                    "description": "是否通用券 - 0:否 1:是",
-                    "type": "integer"
+                "zscategorydisplay": {
+                    "type": "string"
                 },
-                "isunusable": {
-                    "description": "是否不可用",
-                    "type": "boolean"
+                "zsclaritytype": {
+                    "description": "净度 - 两个, 逗号分隔",
+                    "type": "string"
                 },
-                "limitedflag": {
-                    "description": "是否指定商品 - 0:不限 1:限制",
-                    "type": "integer"
+                "zsclaritytypedisplay": {
+                    "type": "string"
                 },
-                "limitedgoodsids": {
-                    "description": "指定商品IDs[逗号分隔,前后加逗号]",
+                "zscolortype": {
+                    "description": "颜色 - 两个, 逗号分隔",
                     "type": "string"
                 },
-                "orifreezeqty": {
-                    "description": "期初冻结数量",
-                    "type": "integer"
+                "zscolortypedisplay": {
+                    "type": "string"
                 },
-                "oriqty": {
-                    "description": "期初数量",
-                    "type": "integer"
+                "zscrystaltype": {
+                    "description": "晶型 -  多个,逗号分隔",
+                    "type": "string"
                 },
-                "reasontype": {
-                    "description": "不可用原因 - 0:未确认 1:不可用于此商品 2:不可用于此卖家",
-                    "type": "integer"
+                "zscrystaltypedisplay": {
+                    "type": "string"
                 },
-                "todaydecrease": {
-                    "description": "今日减少",
-                    "type": "integer"
+                "zscurrencytype": {
+                    "description": "货币类型 -   多个, 逗号分隔",
+                    "type": "string"
                 },
-                "todayincrease": {
-                    "description": "今日增加",
-                    "type": "integer"
+                "zscurrencytypedisplay": {
+                    "type": "string"
                 },
-                "userid": {
-                    "description": "用户ID",
-                    "type": "integer"
+                "zscuttype": {
+                    "description": "切工 - 两个, 逗号分隔",
+                    "type": "string"
                 },
-                "userscope": {
-                    "description": "卖家范围(用户ID,逗号分隔,前后加逗号) [IsGeneral =0时使用]",
+                "zscuttypedisplay": {
                     "type": "string"
-                }
+                },
+                "zsczcolor1type": {
+                    "description": "彩钻颜色1, 逗号分隔",
+                    "type": "string"
+                },
+                "zsczcolor1typedisplay": {
+                    "type": "string"
+                },
+                "zsczcolor2type": {
+                    "description": "彩钻颜色2, 逗号分隔",
+                    "type": "string"
+                },
+                "zsczcolor2typedisplay": {
+                    "type": "string"
+                },
+                "zsczcolor3type": {
+                    "description": "彩钻颜色3, 逗号分隔",
+                    "type": "string"
+                },
+                "zsczcolor3typedisplay": {
+                    "type": "string"
+                },
+                "zsfluorescencetype": {
+                    "description": "荧光 - 多个, 逗号分隔",
+                    "type": "string"
+                },
+                "zsfluorescencetypedisplay": {
+                    "type": "string"
+                },
+                "zspolishtype": {
+                    "description": "抛光度 - 两个, 逗号分隔",
+                    "type": "string"
+                },
+                "zspolishtypedisplay": {
+                    "type": "string"
+                },
+                "zsshapetype": {
+                    "description": "形状 - 多个, 逗号分隔",
+                    "type": "string"
+                },
+                "zsshapetypedisplay": {
+                    "type": "string"
+                },
+                "zssize": {
+                    "description": "尺寸 - 两个小数, 逗号分隔",
+                    "type": "string"
+                },
+                "zsstyletype": {
+                    "description": "款式 -  多个, 逗号分隔",
+                    "type": "string"
+                },
+                "zsstyletypedisplay": {
+                    "type": "string"
+                },
+                "zssymmetrytype": {
+                    "description": "对称度 - 两个, 逗号分隔",
+                    "type": "string"
+                },
+                "zssymmetrytypedisplay": {
+                    "type": "string"
+                },
+                "zstabledisplay": {
+                    "description": "求购信息",
+                    "type": "string"
+                }
+            }
+        },
+        "models.MyCoupon": {
+            "type": "object",
+            "required": [
+                "accountid",
+                "coupontypeid"
+            ],
+            "properties": {
+                "accountid": {
+                    "description": "资金账户ID",
+                    "type": "integer"
+                },
+                "areauserid": {
+                    "description": "所属机构",
+                    "type": "integer"
+                },
+                "conditionvalue": {
+                    "description": "条件阈值(可为0)",
+                    "type": "number"
+                },
+                "couponcategroy": {
+                    "description": "种类 - 1:现金券 2:折扣券 3:折扣券(单张)",
+                    "type": "integer"
+                },
+                "couponname": {
+                    "description": "优惠券名称",
+                    "type": "string"
+                },
+                "coupontypeid": {
+                    "description": "优惠券类型ID",
+                    "type": "string"
+                },
+                "couponvalue": {
+                    "description": "面值[1:现金券 - 抵扣值 2:折扣券-折扣值]",
+                    "type": "number"
+                },
+                "curfreezeqty": {
+                    "description": "期末冻结数量",
+                    "type": "integer"
+                },
+                "curqty": {
+                    "description": "期末数量",
+                    "type": "integer"
+                },
+                "isgeneral": {
+                    "description": "是否通用券 - 0:否 1:是",
+                    "type": "integer"
+                },
+                "isunusable": {
+                    "description": "是否不可用",
+                    "type": "boolean"
+                },
+                "limitedflag": {
+                    "description": "是否指定商品 - 0:不限 1:限制",
+                    "type": "integer"
+                },
+                "limitedgoodsids": {
+                    "description": "指定商品IDs[逗号分隔,前后加逗号]",
+                    "type": "string"
+                },
+                "orifreezeqty": {
+                    "description": "期初冻结数量",
+                    "type": "integer"
+                },
+                "oriqty": {
+                    "description": "期初数量",
+                    "type": "integer"
+                },
+                "reasontype": {
+                    "description": "不可用原因 - 0:未确认 1:不可用于此商品 2:不可用于此卖家",
+                    "type": "integer"
+                },
+                "todaydecrease": {
+                    "description": "今日减少",
+                    "type": "integer"
+                },
+                "todayincrease": {
+                    "description": "今日增加",
+                    "type": "integer"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                },
+                "userscope": {
+                    "description": "卖家范围(用户ID,逗号分隔,前后加逗号) [IsGeneral =0时使用]",
+                    "type": "string"
+                }
             }
         },
         "models.MyCouponHold": {
@@ -32375,6 +32688,218 @@
                 }
             }
         },
+        "models.MySellOrder": {
+            "type": "object",
+            "required": [
+                "userid"
+            ],
+            "properties": {
+                "accountid": {
+                    "description": "资金账号",
+                    "type": "integer"
+                },
+                "applyid": {
+                    "description": "申请单ID",
+                    "type": "integer"
+                },
+                "attachment1": {
+                    "description": "附件1",
+                    "type": "string"
+                },
+                "attachment2": {
+                    "description": "附件2",
+                    "type": "string"
+                },
+                "buyorsell": {
+                    "description": "买卖 - 0:买 1:卖",
+                    "type": "integer"
+                },
+                "canbargain": {
+                    "description": "是否可议价 - 0:不可 1:可",
+                    "type": "integer"
+                },
+                "cancelqty": {
+                    "description": "撤销数量",
+                    "type": "integer"
+                },
+                "canceltime": {
+                    "description": "撤销时间",
+                    "type": "string"
+                },
+                "chargealgorithm": {
+                    "description": "手续费收取方式 1:比率  2:固定",
+                    "type": "integer"
+                },
+                "chargealgorithmvalue": {
+                    "description": "手续费设置值(交易所部分)",
+                    "type": "number"
+                },
+                "chargealgorithmvalue2": {
+                    "description": "手续费设置值(会员部分)",
+                    "type": "number"
+                },
+                "clientordertime": {
+                    "description": "客户端委托时间",
+                    "type": "string"
+                },
+                "exchangerate": {
+                    "description": "汇率[67]",
+                    "type": "number"
+                },
+                "firstratio": {
+                    "description": "首付比率 - [挂牌时指定,摘牌时使用]",
+                    "type": "number"
+                },
+                "fixedprice": {
+                    "description": "固定价格    -   [挂牌]",
+                    "type": "number"
+                },
+                "freezecharge": {
+                    "description": "冻结手续费",
+                    "type": "number"
+                },
+                "freezefirstamount": {
+                    "description": "冻结首付金额 - [摘牌]",
+                    "type": "number"
+                },
+                "freezemargin": {
+                    "description": "冻结保证金",
+                    "type": "number"
+                },
+                "goodsno": {
+                    "description": "商品编号",
+                    "type": "string"
+                },
+                "isspecified": {
+                    "description": "是否指定对手 - 0:不指定 1:指定好友(贸易圈) 2:指定对手    -   [挂牌]",
+                    "type": "integer"
+                },
+                "marginalgorithm": {
+                    "description": "保证金方式 - 1:比率  2:固定",
+                    "type": "integer"
+                },
+                "marginvalue": {
+                    "description": "保证金设置值",
+                    "type": "number"
+                },
+                "marketid": {
+                    "description": "市场ID",
+                    "type": "integer"
+                },
+                "orderamount": {
+                    "description": "挂牌金额[账户] [67]= OrderQty * FixedPrice * ExchangeRate /100",
+                    "type": "number"
+                },
+                "orderqty": {
+                    "description": "委托数量",
+                    "type": "integer"
+                },
+                "ordertime": {
+                    "description": "委托时间",
+                    "type": "string"
+                },
+                "performancetemplateid": {
+                    "description": "履约计划模板ID",
+                    "type": "integer"
+                },
+                "pricefactor": {
+                    "description": "价格系数(浮动价时填写)    -   [挂牌]",
+                    "type": "number"
+                },
+                "pricemove": {
+                    "description": "升贴水(浮动价时填写)    -   [挂牌]",
+                    "type": "number"
+                },
+                "relatedwrtradeorderid": {
+                    "description": "关联委托单号(摘牌委托关联挂牌委托单ID)",
+                    "type": "integer"
+                },
+                "retcode": {
+                    "description": "错误代码",
+                    "type": "integer"
+                },
+                "tradedate": {
+                    "description": "交易日(yyyyMMdd)",
+                    "type": "string"
+                },
+                "tradeprice": {
+                    "description": "成交价格 - [摘牌] (浮动价  ((商品1价格*商品1价格系数+升贴水)* 商品1重量系数 + 商品2价格*商品2价格系数+商品2升贴水)* 商品2重量系数 ...)* 委托单价格系数 + 委托单升贴水)",
+                    "type": "number"
+                },
+                "tradeqty": {
+                    "description": "成交数量",
+                    "type": "integer"
+                },
+                "unfreezecharge": {
+                    "description": "解冻手续费",
+                    "type": "number"
+                },
+                "unfreezefirstamount": {
+                    "description": "解冻首付金额 - [摘牌]",
+                    "type": "number"
+                },
+                "unfreezemargin": {
+                    "description": "解冻保证金",
+                    "type": "number"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                },
+                "uuid": {
+                    "description": "发起端唯一id",
+                    "type": "string"
+                },
+                "validtime": {
+                    "description": "有效期限",
+                    "type": "string"
+                },
+                "validtype": {
+                    "description": "有效类型 - 1当日有效 2本周有效 3指定日期有效 4一直有效",
+                    "type": "integer"
+                },
+                "wrbargainid": {
+                    "description": "议价申请单ID",
+                    "type": "integer"
+                },
+                "wrfactortypeid": {
+                    "description": "仓单要素类型ID/商品ID(77)",
+                    "type": "integer"
+                },
+                "wrpricetype": {
+                    "description": "价格方式 - 1:固定价 2-浮动价  -   [挂牌]",
+                    "type": "integer"
+                },
+                "wrstandardid": {
+                    "description": "现货商品ID",
+                    "type": "integer"
+                },
+                "wrtradeorderid": {
+                    "description": "仓单贸易委托单ID(320+Unix秒时间戳(10位)+xxxxxx)",
+                    "type": "integer"
+                },
+                "wrtradeorderstatus": {
+                    "description": "委托状态 - 参考枚举'WRTradeOrderStatus' - 1:委托请求  2:待冻结  3:委托成功  4:委托失败  5:配对成功  6:已撤  7:部成  8:已成  9:部成部撤  10:成交失败  11:委托拒绝  12:经过摘牌(先摘后挂专用)  13:冻结成功(通道交易专用)  14:通道已撤  15:通道部成部撤  16:成交失败违约(荷兰式竞拍专用)  17:冻结PD成功  18:冻结PD失败  19:冻结能量成功  20:冻结能量失败  21:预约已报价  22:过期未付  23:优惠券处理中  24:仓单生成失败  25:首付扣款失败  26:履约失败  27:撤单解冻贷款失败",
+                    "type": "integer"
+                },
+                "wrtradetype": {
+                    "description": "仓单贸易类型 - 1:挂牌 2:摘牌 3:提货卖(文化中国) 4:提货买(文化中国)",
+                    "type": "integer"
+                },
+                "wrtransferuserid": {
+                    "description": "仓单受让用户 - [摘牌]",
+                    "type": "integer"
+                },
+                "zscategory": {
+                    "description": "钻石分类 - 枚举”ZSCategory“",
+                    "type": "integer"
+                },
+                "zscurrencytype": {
+                    "description": "货币类型 - 枚举“ZSCurrencyType”",
+                    "type": "integer"
+                }
+            }
+        },
         "models.MyUsedCoupon": {
             "type": "object",
             "required": [

+ 367 - 0
docs/swagger.yaml

@@ -11792,6 +11792,110 @@ definitions:
     required:
     - messageboardid
     type: object
+  models.MyBuyOrder:
+    properties:
+      accountid:
+        description: 资金账户ID
+        type: integer
+      marketid:
+        description: 市场ID
+        type: integer
+      origin:
+        description: 原产地
+        type: string
+      remark:
+        description: 备注
+        type: string
+      userid:
+        description: 用户ID
+        type: integer
+      warehouseids:
+        description: 仓库ID - 多个, 逗号分隔
+        type: string
+      warehouseinfosdisplay:
+        type: string
+      wrtradeorderid:
+        description: '[委托单号]买委托单ID(320+Unix秒时间戳(10位)+xxxxxx)'
+        type: integer
+      zscategory:
+        description: 钻石分类 - 枚举”ZSCategory“
+        type: integer
+      zscategorydisplay:
+        type: string
+      zsclaritytype:
+        description: 净度 - 两个, 逗号分隔
+        type: string
+      zsclaritytypedisplay:
+        type: string
+      zscolortype:
+        description: 颜色 - 两个, 逗号分隔
+        type: string
+      zscolortypedisplay:
+        type: string
+      zscrystaltype:
+        description: 晶型 -  多个,逗号分隔
+        type: string
+      zscrystaltypedisplay:
+        type: string
+      zscurrencytype:
+        description: 货币类型 -   多个, 逗号分隔
+        type: string
+      zscurrencytypedisplay:
+        type: string
+      zscuttype:
+        description: 切工 - 两个, 逗号分隔
+        type: string
+      zscuttypedisplay:
+        type: string
+      zsczcolor1type:
+        description: 彩钻颜色1, 逗号分隔
+        type: string
+      zsczcolor1typedisplay:
+        type: string
+      zsczcolor2type:
+        description: 彩钻颜色2, 逗号分隔
+        type: string
+      zsczcolor2typedisplay:
+        type: string
+      zsczcolor3type:
+        description: 彩钻颜色3, 逗号分隔
+        type: string
+      zsczcolor3typedisplay:
+        type: string
+      zsfluorescencetype:
+        description: 荧光 - 多个, 逗号分隔
+        type: string
+      zsfluorescencetypedisplay:
+        type: string
+      zspolishtype:
+        description: 抛光度 - 两个, 逗号分隔
+        type: string
+      zspolishtypedisplay:
+        type: string
+      zsshapetype:
+        description: 形状 - 多个, 逗号分隔
+        type: string
+      zsshapetypedisplay:
+        type: string
+      zssize:
+        description: 尺寸 - 两个小数, 逗号分隔
+        type: string
+      zsstyletype:
+        description: 款式 -  多个, 逗号分隔
+        type: string
+      zsstyletypedisplay:
+        type: string
+      zssymmetrytype:
+        description: 对称度 - 两个, 逗号分隔
+        type: string
+      zssymmetrytypedisplay:
+        type: string
+      zstabledisplay:
+        description: 求购信息
+        type: string
+    required:
+    - userid
+    type: object
   models.MyCoupon:
     properties:
       accountid:
@@ -11917,6 +12021,165 @@ definitions:
     required:
     - couponholdid
     type: object
+  models.MySellOrder:
+    properties:
+      accountid:
+        description: 资金账号
+        type: integer
+      applyid:
+        description: 申请单ID
+        type: integer
+      attachment1:
+        description: 附件1
+        type: string
+      attachment2:
+        description: 附件2
+        type: string
+      buyorsell:
+        description: 买卖 - 0:买 1:卖
+        type: integer
+      canbargain:
+        description: 是否可议价 - 0:不可 1:可
+        type: integer
+      cancelqty:
+        description: 撤销数量
+        type: integer
+      canceltime:
+        description: 撤销时间
+        type: string
+      chargealgorithm:
+        description: 手续费收取方式 1:比率  2:固定
+        type: integer
+      chargealgorithmvalue:
+        description: 手续费设置值(交易所部分)
+        type: number
+      chargealgorithmvalue2:
+        description: 手续费设置值(会员部分)
+        type: number
+      clientordertime:
+        description: 客户端委托时间
+        type: string
+      exchangerate:
+        description: 汇率[67]
+        type: number
+      firstratio:
+        description: 首付比率 - [挂牌时指定,摘牌时使用]
+        type: number
+      fixedprice:
+        description: 固定价格    -   [挂牌]
+        type: number
+      freezecharge:
+        description: 冻结手续费
+        type: number
+      freezefirstamount:
+        description: 冻结首付金额 - [摘牌]
+        type: number
+      freezemargin:
+        description: 冻结保证金
+        type: number
+      goodsno:
+        description: 商品编号
+        type: string
+      isspecified:
+        description: 是否指定对手 - 0:不指定 1:指定好友(贸易圈) 2:指定对手    -   [挂牌]
+        type: integer
+      marginalgorithm:
+        description: 保证金方式 - 1:比率  2:固定
+        type: integer
+      marginvalue:
+        description: 保证金设置值
+        type: number
+      marketid:
+        description: 市场ID
+        type: integer
+      orderamount:
+        description: 挂牌金额[账户] [67]= OrderQty * FixedPrice * ExchangeRate /100
+        type: number
+      orderqty:
+        description: 委托数量
+        type: integer
+      ordertime:
+        description: 委托时间
+        type: string
+      performancetemplateid:
+        description: 履约计划模板ID
+        type: integer
+      pricefactor:
+        description: 价格系数(浮动价时填写)    -   [挂牌]
+        type: number
+      pricemove:
+        description: 升贴水(浮动价时填写)    -   [挂牌]
+        type: number
+      relatedwrtradeorderid:
+        description: 关联委托单号(摘牌委托关联挂牌委托单ID)
+        type: integer
+      retcode:
+        description: 错误代码
+        type: integer
+      tradedate:
+        description: 交易日(yyyyMMdd)
+        type: string
+      tradeprice:
+        description: 成交价格 - [摘牌] (浮动价  ((商品1价格*商品1价格系数+升贴水)* 商品1重量系数 + 商品2价格*商品2价格系数+商品2升贴水)*
+          商品2重量系数 ...)* 委托单价格系数 + 委托单升贴水)
+        type: number
+      tradeqty:
+        description: 成交数量
+        type: integer
+      unfreezecharge:
+        description: 解冻手续费
+        type: number
+      unfreezefirstamount:
+        description: 解冻首付金额 - [摘牌]
+        type: number
+      unfreezemargin:
+        description: 解冻保证金
+        type: number
+      userid:
+        description: 用户ID
+        type: integer
+      uuid:
+        description: 发起端唯一id
+        type: string
+      validtime:
+        description: 有效期限
+        type: string
+      validtype:
+        description: 有效类型 - 1当日有效 2本周有效 3指定日期有效 4一直有效
+        type: integer
+      wrbargainid:
+        description: 议价申请单ID
+        type: integer
+      wrfactortypeid:
+        description: 仓单要素类型ID/商品ID(77)
+        type: integer
+      wrpricetype:
+        description: 价格方式 - 1:固定价 2-浮动价  -   [挂牌]
+        type: integer
+      wrstandardid:
+        description: 现货商品ID
+        type: integer
+      wrtradeorderid:
+        description: 仓单贸易委托单ID(320+Unix秒时间戳(10位)+xxxxxx)
+        type: integer
+      wrtradeorderstatus:
+        description: 委托状态 - 参考枚举'WRTradeOrderStatus' - 1:委托请求  2:待冻结  3:委托成功  4:委托失败  5:配对成功  6:已撤  7:部成  8:已成  9:部成部撤  10:成交失败  11:委托拒绝  12:经过摘牌(先摘后挂专用)  13:冻结成功(通道交易专用)  14:通道已撤  15:通道部成部撤  16:成交失败违约(荷兰式竞拍专用)  17:冻结PD成功  18:冻结PD失败  19:冻结能量成功  20:冻结能量失败  21:预约已报价  22:过期未付  23:优惠券处理中  24:仓单生成失败  25:首付扣款失败  26:履约失败  27:撤单解冻贷款失败
+        type: integer
+      wrtradetype:
+        description: 仓单贸易类型 - 1:挂牌 2:摘牌 3:提货卖(文化中国) 4:提货买(文化中国)
+        type: integer
+      wrtransferuserid:
+        description: 仓单受让用户 - [摘牌]
+        type: integer
+      zscategory:
+        description: 钻石分类 - 枚举”ZSCategory“
+        type: integer
+      zscurrencytype:
+        description: 货币类型 - 枚举“ZSCurrencyType”
+        type: integer
+    required:
+    - userid
+    type: object
   models.MyUsedCoupon:
     properties:
       accountid:
@@ -27291,6 +27554,110 @@ paths:
       summary: 钻石搜索
       tags:
       - 广钻
+  /Guangzuan/QueryMyBuyOrder:
+    get:
+      parameters:
+      - description: 用户ID
+        in: query
+        name: userid
+        required: true
+        type: integer
+      - description: 页码
+        in: query
+        name: page
+        type: integer
+      - description: 每页条数
+        in: query
+        name: pagesize
+        type: integer
+      - description: 商品(查询字段-模糊查询)
+        in: query
+        name: zsallproperties
+        type: string
+      - description: 钻石分类枚举ID
+        in: query
+        name: zscategory
+        type: integer
+      - description: 委托单号
+        in: query
+        name: wrtradeorderid
+        type: integer
+      - description: 是否历史查询
+        in: query
+        name: ishis
+        type: boolean
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.MyBuyOrder'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      - LoginID: []
+      - Group: []
+      summary: 查询我的求购
+      tags:
+      - 广钻
+  /Guangzuan/QueryMySellOrder:
+    get:
+      parameters:
+      - description: 用户ID
+        in: query
+        name: userid
+        required: true
+        type: integer
+      - description: 页码
+        in: query
+        name: page
+        type: integer
+      - description: 每页条数
+        in: query
+        name: pagesize
+        type: integer
+      - description: 商品(查询字段-模糊查询)
+        in: query
+        name: zsallproperties
+        type: string
+      - description: 钻石分类枚举ID
+        in: query
+        name: zscategory
+        type: integer
+      - description: 委托单号
+        in: query
+        name: wrtradeorderid
+        type: integer
+      - description: 是否历史查询
+        in: query
+        name: ishis
+        type: boolean
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.MySellOrder'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      - LoginID: []
+      - Group: []
+      summary: 查询我的出售
+      tags:
+      - 广钻
   /Guangzuan/QueryMyWRPosition:
     get:
       parameters:

+ 230 - 0
models/guangzuan.go

@@ -523,3 +523,233 @@ func (r *SellOrder) GetDataByPage() (interface{}, error, int, int, int) {
 	}
 	return sData, err, r.Page, r.PageSize, total
 }
+
+// MyBuyOrder 我的求购
+type MyBuyOrder struct {
+	ZSALLPROPERTIES           string `json:"-" xorm:"ZSALLPROPERTIES" form:"zsallproperties"`            // 商品(查询字段-模糊查询)
+	ZSTABLEDISPLAY            string `json:"zstabledisplay" xorm:"ZSTABLEDISPLAY"`                       // 求购信息
+	ZSCATEGORYDISPLAY         string `json:"zscategorydisplay" xorm:"ZSCATEGORYDISPLAY"`                 //
+	ZSCURRENCYTYPEDISPLAY     string `json:"zscurrencytypedisplay" xorm:"ZSCURRENCYTYPEDISPLAY"`         //
+	ZSSHAPETYPEDISPLAY        string `json:"zsshapetypedisplay" xorm:"ZSSHAPETYPEDISPLAY"`               //
+	ZSCOLORTYPEDISPLAY        string `json:"zscolortypedisplay" xorm:"ZSCOLORTYPEDISPLAY"`               //
+	ZSCLARITYTYPEDISPLAY      string `json:"zsclaritytypedisplay" xorm:"ZSCLARITYTYPEDISPLAY"`           //
+	ZSCUTTYPEDISPLAY          string `json:"zscuttypedisplay" xorm:"ZSCUTTYPEDISPLAY"`                   //
+	ZSSYMMETRYTYPEDISPLAY     string `json:"zssymmetrytypedisplay" xorm:"ZSSYMMETRYTYPEDISPLAY"`         //
+	ZSPOLISHTYPEDISPLAY       string `json:"zspolishtypedisplay" xorm:"ZSPOLISHTYPEDISPLAY"`             //
+	ZSFLUORESCENCETYPEDISPLAY string `json:"zsfluorescencetypedisplay" xorm:"ZSFLUORESCENCETYPEDISPLAY"` //
+	ZSCRYSTALTYPEDISPLAY      string `json:"zscrystaltypedisplay" xorm:"ZSCRYSTALTYPEDISPLAY"`           //
+	ZSSTYLETYPEDISPLAY        string `json:"zsstyletypedisplay" xorm:"ZSSTYLETYPEDISPLAY"`               //
+	ZSCZCOLOR1TYPEDISPLAY     string `json:"zsczcolor1typedisplay" xorm:"ZSCZCOLOR1TYPEDISPLAY"`         //
+	ZSCZCOLOR2TYPEDISPLAY     string `json:"zsczcolor2typedisplay" xorm:"ZSCZCOLOR2TYPEDISPLAY"`         //
+	ZSCZCOLOR3TYPEDISPLAY     string `json:"zsczcolor3typedisplay" xorm:"ZSCZCOLOR3TYPEDISPLAY"`         //
+	WAREHOUSEINFOSDISPLAY     string `json:"warehouseinfosdisplay" xorm:"WAREHOUSEINFOSDISPLAY"`         //
+
+	WRTRADEORDERID int64 `json:"wrtradeorderid" xorm:"WRTRADEORDERID" form:"wrtradeorderid"` // [委托单号]买委托单ID(320+Unix秒时间戳(10位)+xxxxxx)
+	USERID         int64 `json:"userid" xorm:"USERID" form:"userid" binding:"required"`      // 用户ID
+	ACCOUNTID      int64 `json:"accountid" xorm:"ACCOUNTID"`                                 // 资金账户ID
+
+	ZSCATEGORY         int32  `json:"zscategory" xorm:"ZSCATEGORY" form:"zscategory"` // 钻石分类 - 枚举”ZSCategory“
+	ZSCURRENCYTYPE     string `json:"zscurrencytype" xorm:"ZSCURRENCYTYPE"`           // 货币类型 -   多个, 逗号分隔
+	ZSSHAPETYPE        string `json:"zsshapetype" xorm:"ZSSHAPETYPE"`                 // 形状 - 多个, 逗号分隔
+	ZSCOLORTYPE        string `json:"zscolortype" xorm:"ZSCOLORTYPE"`                 // 颜色 - 两个, 逗号分隔
+	ZSCLARITYTYPE      string `json:"zsclaritytype" xorm:"ZSCLARITYTYPE"`             // 净度 - 两个, 逗号分隔
+	ZSCUTTYPE          string `json:"zscuttype" xorm:"ZSCUTTYPE"`                     // 切工 - 两个, 逗号分隔
+	ZSSYMMETRYTYPE     string `json:"zssymmetrytype" xorm:"ZSSYMMETRYTYPE"`           // 对称度 - 两个, 逗号分隔
+	ZSPOLISHTYPE       string `json:"zspolishtype" xorm:"ZSPOLISHTYPE"`               // 抛光度 - 两个, 逗号分隔
+	ZSFLUORESCENCETYPE string `json:"zsfluorescencetype" xorm:"ZSFLUORESCENCETYPE"`   // 荧光 - 多个, 逗号分隔
+	ZSSIZE             string `json:"zssize" xorm:"ZSSIZE"`                           // 尺寸 - 两个小数, 逗号分隔
+	ZSCRYSTALTYPE      string `json:"zscrystaltype" xorm:"ZSCRYSTALTYPE"`             // 晶型 -  多个,逗号分隔
+	ORIGIN             string `json:"origin" xorm:"ORIGIN"`                           // 原产地
+	ZSSTYLETYPE        string `json:"zsstyletype" xorm:"ZSSTYLETYPE"`                 // 款式 -  多个, 逗号分隔
+	ZSCZCOLOR1TYPE     string `json:"zsczcolor1type" xorm:"ZSCZCOLOR1TYPE"`           // 彩钻颜色1, 逗号分隔
+	ZSCZCOLOR2TYPE     string `json:"zsczcolor2type" xorm:"ZSCZCOLOR2TYPE"`           // 彩钻颜色2, 逗号分隔
+	ZSCZCOLOR3TYPE     string `json:"zsczcolor3type" xorm:"ZSCZCOLOR3TYPE"`           // 彩钻颜色3, 逗号分隔
+	REMARK             string `json:"remark" xorm:"REMARK"`                           // 备注
+	WAREHOUSEIDS       string `json:"warehouseids" xorm:"WAREHOUSEIDS"`               // 仓库ID - 多个, 逗号分隔
+	MARKETID           int32  `json:"marketid" xorm:"MARKETID"`                       // 市场ID
+
+	IsHis bool `json:"-" form:"ishis"` // 是否历史查询
+
+	PageEx `xorm:"extends"` // 页码信息
+}
+
+func (r *MyBuyOrder) calc() {
+
+}
+
+func (r *MyBuyOrder) buildSql() string {
+	var sqlId utils.SQLVal = `
+	SELECT 
+		q.*
+	FROM WRTrade_OrderDetail t
+	INNER JOIN View_GZ_BuyOrderDetail_Query q ON t.wrtradeorderid = q.wrtradeorderid
+	WHERE t.marketid=67201 AND t.BuyOrSell = 0 AND t.WRTradeOrderStatus IN (3,7)
+	`
+	sqlId.And("q.USERID", r.USERID)
+	sqlId.AndEx("q.ZSCATEGORY", r.ZSCATEGORY, r.ZSCATEGORY > 0)
+	sqlId.AndLike("q.ZSALLPROPERTIES", r.ZSALLPROPERTIES)
+	sqlId.AndEx("q.WRTRADEORDERID", r.WRTRADEORDERID, r.WRTRADEORDERID > 0)
+	sqlId.Page(r.Page, r.PageSize)
+	return sqlId.String()
+}
+
+func (r *MyBuyOrder) buildSql_His() string {
+	var sqlId utils.SQLVal = `
+	SELECT 
+		q.*
+	FROM HIS_WRTrade_OrderDetail t
+	INNER JOIN View_GZ_BuyOrderDetail_Query q ON t.wrtradeorderid = q.wrtradeorderid
+	WHERE t.isvaliddata =1 AND t.marketid=67201 AND t.BuyOrSell = 0 AND t.WRTradeOrderStatus IN (3,7)
+	`
+	sqlId.And("q.USERID", r.USERID)
+	sqlId.AndEx("q.ZSCATEGORY", r.ZSCATEGORY, r.ZSCATEGORY > 0)
+	sqlId.AndLike("q.ZSALLPROPERTIES", r.ZSALLPROPERTIES)
+	sqlId.AndEx("q.WRTRADEORDERID", r.WRTRADEORDERID, r.WRTRADEORDERID > 0)
+	sqlId.Page(r.Page, r.PageSize)
+	return sqlId.String()
+}
+
+func (r *MyBuyOrder) GetDataByPage() (interface{}, error, int, int, int) {
+	sData := make([]MyBuyOrder, 0)
+	sql := ""
+	if r.IsHis {
+		sql = r.buildSql_His()
+	} else {
+		sql = r.buildSql()
+	}
+	err := db.GetEngine().SQL(sql).Find(&sData)
+	total := 0
+	for i := range sData {
+		sData[i].calc()
+		total = sData[i].Total
+	}
+	return sData, err, r.Page, r.PageSize, total
+}
+
+// MySellOrder 我的出售
+type MySellOrder struct {
+	ZSALLPROPERTIES string `json:"-" xorm:"ZSALLPROPERTIES" form:"zsallproperties"` // 商品(查询字段-模糊查询)
+
+	WRSTANDARDID   int64  `json:"wrstandardid" xorm:"WRSTANDARDID"`                      // 现货商品ID
+	USERID         int64  `json:"userid" xorm:"USERID" form:"userid" binding:"required"` // 用户ID
+	ZSCATEGORY     int32  `json:"zscategory" xorm:"ZSCATEGORY" form:"zscategory"`        // 钻石分类 - 枚举”ZSCategory“
+	ZSCURRENCYTYPE int32  `json:"zscurrencytype" xorm:"ZSCURRENCYTYPE"`                  // 货币类型 - 枚举“ZSCurrencyType”
+	GOODSNO        string `json:"goodsno" xorm:"GOODSNO"`                                // 商品编号
+
+	WRTRADEORDERID        int64     `json:"wrtradeorderid" xorm:"WRTRADEORDERID" form:"wrtradeorderid"` // 仓单贸易委托单ID(320+Unix秒时间戳(10位)+xxxxxx)
+	TRADEDATE             string    `json:"tradedate" xorm:"TRADEDATE"`                                 // 交易日(yyyyMMdd)
+	WRTRADETYPE           int32     `json:"wrtradetype" xorm:"WRTRADETYPE"`                             // 仓单贸易类型 - 1:挂牌 2:摘牌 3:提货卖(文化中国) 4:提货买(文化中国)
+	BUYORSELL             int32     `json:"buyorsell" xorm:"BUYORSELL"`                                 // 买卖 - 0:买 1:卖
+	RELATEDWRTRADEORDERID int64     `json:"relatedwrtradeorderid" xorm:"RELATEDWRTRADEORDERID"`         // 关联委托单号(摘牌委托关联挂牌委托单ID)
+	MARKETID              int64     `json:"marketid" xorm:"MARKETID"`                                   // 市场ID
+	ACCOUNTID             int64     `json:"accountid" xorm:"ACCOUNTID"`                                 // 资金账号
+	WRFACTORTYPEID        int64     `json:"wrfactortypeid" xorm:"WRFACTORTYPEID"`                       // 仓单要素类型ID/商品ID(77)
+	ORDERQTY              int64     `json:"orderqty" xorm:"ORDERQTY"`                                   // 委托数量
+	TRADEQTY              int64     `json:"tradeqty" xorm:"TRADEQTY"`                                   // 成交数量
+	CANCELQTY             int64     `json:"cancelqty" xorm:"CANCELQTY"`                                 // 撤销数量
+	WRPRICETYPE           int32     `json:"wrpricetype" xorm:"WRPRICETYPE"`                             // 价格方式 - 1:固定价 2-浮动价  -   [挂牌]
+	FIXEDPRICE            float64   `json:"fixedprice" xorm:"FIXEDPRICE"`                               // 固定价格    -   [挂牌]
+	ISSPECIFIED           int32     `json:"isspecified" xorm:"ISSPECIFIED"`                             // 是否指定对手 - 0:不指定 1:指定好友(贸易圈) 2:指定对手    -   [挂牌]
+	PRICEFACTOR           float64   `json:"pricefactor" xorm:"PRICEFACTOR"`                             // 价格系数(浮动价时填写)    -   [挂牌]
+	PRICEMOVE             float64   `json:"pricemove" xorm:"PRICEMOVE"`                                 // 升贴水(浮动价时填写)    -   [挂牌]
+	FIRSTRATIO            float64   `json:"firstratio" xorm:"FIRSTRATIO"`                               // 首付比率 - [挂牌时指定,摘牌时使用]
+	WRTRANSFERUSERID      int64     `json:"wrtransferuserid" xorm:"WRTRANSFERUSERID"`                   // 仓单受让用户 - [摘牌]
+	TRADEPRICE            float64   `json:"tradeprice" xorm:"TRADEPRICE"`                               // 成交价格 - [摘牌] (浮动价  ((商品1价格*商品1价格系数+升贴水)* 商品1重量系数 + 商品2价格*商品2价格系数+商品2升贴水)* 商品2重量系数 ...)* 委托单价格系数 + 委托单升贴水)
+	FREEZEFIRSTAMOUNT     float64   `json:"freezefirstamount" xorm:"FREEZEFIRSTAMOUNT"`                 // 冻结首付金额 - [摘牌]
+	UNFREEZEFIRSTAMOUNT   float64   `json:"unfreezefirstamount" xorm:"UNFREEZEFIRSTAMOUNT"`             // 解冻首付金额 - [摘牌]
+	PERFORMANCETEMPLATEID int64     `json:"performancetemplateid" xorm:"PERFORMANCETEMPLATEID"`         // 履约计划模板ID
+	VALIDTYPE             int32     `json:"validtype" xorm:"VALIDTYPE"`                                 // 有效类型 - 1当日有效 2本周有效 3指定日期有效 4一直有效
+	VALIDTIME             time.Time `json:"validtime" xorm:"VALIDTIME"`                                 // 有效期限
+	ORDERTIME             time.Time `json:"ordertime" xorm:"ORDERTIME"`                                 // 委托时间
+	CANCELTIME            time.Time `json:"canceltime" xorm:"CANCELTIME"`                               // 撤销时间
+	WRTRADEORDERSTATUS    int32     `json:"wrtradeorderstatus" xorm:"WRTRADEORDERSTATUS"`               // 委托状态 - 参考枚举'WRTradeOrderStatus' - 1:委托请求  2:待冻结  3:委托成功  4:委托失败  5:配对成功  6:已撤  7:部成  8:已成  9:部成部撤  10:成交失败  11:委托拒绝  12:经过摘牌(先摘后挂专用)  13:冻结成功(通道交易专用)  14:通道已撤  15:通道部成部撤  16:成交失败违约(荷兰式竞拍专用)  17:冻结PD成功  18:冻结PD失败  19:冻结能量成功  20:冻结能量失败  21:预约已报价  22:过期未付  23:优惠券处理中  24:仓单生成失败  25:首付扣款失败  26:履约失败  27:撤单解冻贷款失败
+	CLIENTTICKET          string    `json:"-" xorm:"CLIENTTICKET"`                                      // 客户端流水号
+	ORDERSRC              int32     `json:"-" xorm:"ORDERSRC"`                                          // 委托来源 - 1:客户端 2:管理端 3:风控服务 4:交割服务 5:交易服务 6:交易日结
+	CLIENTTYPE            int32     `json:"-" xorm:"CLIENTTYPE"`                                        // 客户端类型 - 0:保留为未填终端类型 1:PC管理端 2:PC交易端 3:手机客户端_安卓 4:网页客户端 5:微信客户端 6:手机客户端_苹果 7:网上开户客户端 8:无效终端编号 9:报价终端(中江)
+	UUID                  string    `json:"uuid" xorm:"UUID"`                                           // 发起端唯一id
+	CLIENTORDERTIME       time.Time `json:"clientordertime" xorm:"CLIENTORDERTIME"`                     // 客户端委托时间
+	RETCODE               int32     `json:"retcode" xorm:"RETCODE"`                                     // 错误代码
+	OPERATORID            int64     `json:"-" xorm:"OPERATORID"`                                        // 操作员ID
+	PRICEDISPLAYMODE      int32     `json:"-" xorm:"PRICEDISPLAYMODE"`                                  // 浮动价显示方式 - 1:合并显示 2:分开显示1: 价格显示一个值 :(商品拟合价*价格系统+升贴水)2: 价格显示两个值:(商品拟合价*价格系统)  、 升贴水
+	FREEZEMARGIN          float64   `json:"freezemargin" xorm:"FREEZEMARGIN"`                           // 冻结保证金
+	UNFREEZEMARGIN        float64   `json:"unfreezemargin" xorm:"UNFREEZEMARGIN"`                       // 解冻保证金
+	FREEZECHARGE          float64   `json:"freezecharge" xorm:"FREEZECHARGE"`                           // 冻结手续费
+	UNFREEZECHARGE        float64   `json:"unfreezecharge" xorm:"UNFREEZECHARGE"`                       // 解冻手续费
+	MARGINALGORITHM       int32     `json:"marginalgorithm" xorm:"MARGINALGORITHM"`                     // 保证金方式 - 1:比率  2:固定
+	MARGINVALUE           float64   `json:"marginvalue" xorm:"MARGINVALUE"`                             // 保证金设置值
+	CHARGEALGORITHM       int32     `json:"chargealgorithm" xorm:"CHARGEALGORITHM"`                     // 手续费收取方式 1:比率  2:固定
+	CHARGEALGORITHMVALUE  float64   `json:"chargealgorithmvalue" xorm:"CHARGEALGORITHMVALUE"`           // 手续费设置值(交易所部分)
+	CHARGEALGORITHMVALUE2 float64   `json:"chargealgorithmvalue2" xorm:"CHARGEALGORITHMVALUE2"`         // 手续费设置值(会员部分)
+	CANBARGAIN            int32     `json:"canbargain" xorm:"CANBARGAIN"`                               // 是否可议价 - 0:不可 1:可
+	WRBARGAINID           int64     `json:"wrbargainid" xorm:"WRBARGAINID"`                             // 议价申请单ID
+	ATTACHMENT1           string    `json:"attachment1" xorm:"ATTACHMENT1"`                             // 附件1
+	ATTACHMENT2           string    `json:"attachment2" xorm:"ATTACHMENT2"`                             // 附件2
+	APPLYID               int64     `json:"applyid" xorm:"APPLYID"`                                     // 申请单ID
+	EXCHANGERATE          float64   `json:"exchangerate" xorm:"EXCHANGERATE"`                           // 汇率[67]
+	ORDERAMOUNT           float64   `json:"orderamount" xorm:"ORDERAMOUNT"`                             // 挂牌金额[账户] [67]= OrderQty * FixedPrice * ExchangeRate /100
+
+	IsHis bool `json:"-" form:"ishis"` // 是否历史查询
+
+	PageEx `xorm:"extends"` // 页码信息
+}
+
+func (r *MySellOrder) calc() {
+
+}
+
+func (r *MySellOrder) buildSql() string {
+	var sqlId utils.SQLVal = `
+	SELECT
+		q.ZSCATEGORY,
+		q.ZSCURRENCYTYPE,
+		q.GOODSNO, 
+		t.* 
+	FROM WRTrade_OrderDetail t
+	INNER JOIN View_GZ_WRStandard_Ex_Query q ON t.wrstandardid = q.wrstandardid
+	WHERE t.marketid=67201 AND t.BuyOrSell = 1 AND t.WRTradeOrderStatus IN (3,7) 
+	`
+
+	sqlId.And("t.USERID", r.USERID)
+	sqlId.AndEx("q.ZSCATEGORY", r.ZSCATEGORY, r.ZSCATEGORY > 0)
+	sqlId.AndLike("q.ZSALLPROPERTIES", r.ZSALLPROPERTIES)
+	sqlId.AndEx("q.WRTRADEORDERID", r.WRTRADEORDERID, r.WRTRADEORDERID > 0)
+	sqlId.Page(r.Page, r.PageSize)
+	return sqlId.String()
+}
+
+func (r *MySellOrder) buildSql_His() string {
+	var sqlId utils.SQLVal = `
+	SELECT
+		q.ZSCATEGORY,
+		q.ZSCURRENCYTYPE,
+		q.GOODSNO, 
+		t.* 
+	FROM HIS_WRTrade_OrderDetail t
+	INNER JOIN View_GZ_WRStandard_Ex_Query q ON t.wrstandardid = q.wrstandardid
+	WHERE t.isvaliddata =1 AND t.marketid=67201 AND t.BuyOrSell = 1 AND t.WRTradeOrderStatus IN (3,7) 
+	`
+
+	sqlId.And("t.USERID", r.USERID)
+	sqlId.AndEx("q.ZSCATEGORY", r.ZSCATEGORY, r.ZSCATEGORY > 0)
+	sqlId.AndLike("q.ZSALLPROPERTIES", r.ZSALLPROPERTIES)
+	sqlId.AndEx("q.WRTRADEORDERID", r.WRTRADEORDERID, r.WRTRADEORDERID > 0)
+	sqlId.Page(r.Page, r.PageSize)
+	return sqlId.String()
+}
+
+func (r *MySellOrder) GetDataByPage() (interface{}, error, int, int, int) {
+	sData := make([]MySellOrder, 0)
+	sql := ""
+	if r.IsHis {
+		sql = r.buildSql_His()
+	} else {
+		sql = r.buildSql()
+	}
+	err := db.GetEngine().SQL(sql).Find(&sData)
+	total := 0
+	for i := range sData {
+		sData[i].calc()
+		total = sData[i].Total
+	}
+	return sData, err, r.Page, r.PageSize, total
+}