Jelajahi Sumber

添加水贝亿爵相关查询接口

zhou.xiaoning 2 tahun lalu
induk
melakukan
0ca399c1e1

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

+ 3 - 38
controllers/sbyj/goods.go

@@ -12,11 +12,11 @@ import (
 
 // GetTouristGoods 获取水贝亿爵游客商品列表
 // @Summary 获取水贝亿爵游客商品列表
-// @Produce  json
+// @Produce json
 // @Success 200 {array}  models.TouristGoods
-// @Failure  500     {object} app.Response
+// @Failure 500 {object} app.Response
 // @Router  /sbyj/GetTouristGoods [get]
-// @Tags     水贝亿爵
+// @Tags    水贝亿爵
 func GetTouristGoods(c *gin.Context) {
 	appG := app.Gin{C: c}
 
@@ -37,38 +37,3 @@ type GetMyOrdersReq struct {
 	GoodsId int `form:"goodsId" binding:"required"` // 商品ID
 	UserId  int `form:"userId" binding:"required"`  // 用户ID
 }
-
-// GetTouristGoods 获取我的订单列表
-// @Summary  获取我的订单列表
-// @Produce json
-// @Security ApiKeyAuth
-// @Param    goodsId query    int true "商品ID"
-// @Param    userId  query    int true "用户ID"
-// @Success  200     {array}  models.RedisTradeHolderDetailEx
-// @Failure 500 {object} app.Response
-// @Router   /sbyj/GetMyOrders [get]
-// @Tags    水贝亿爵
-func GetMyOrders(c *gin.Context) {
-	appG := app.Gin{C: c}
-
-	// 获取请求参数
-	var req GetMyOrdersReq
-	if err := appG.C.ShouldBindQuery(&req); err != nil {
-		logger.GetLogger().Errorf("GetMyOrders failed: %s", err.Error())
-		appG.Response(http.StatusBadRequest, e.INVALID_PARAMS, nil)
-		return
-	}
-
-	// 获取数据
-	d := models.RedisTradeHolderDetailEx{}
-	rsp, err := d.GetDataEx(req.UserId, req.GoodsId)
-	if err != nil {
-		// 查询失败
-		logger.GetLogger().Errorf("GetMyOrders failed: %s", err.Error())
-		appG.Response(http.StatusBadRequest, e.ERROR_QUERY_FAIL, nil)
-		return
-	}
-
-	// 查询成功返回
-	appG.Response(http.StatusOK, e.SUCCESS, rsp)
-}

+ 105 - 0
controllers/sbyj/order.go

@@ -0,0 +1,105 @@
+package sbyj
+
+import (
+	"mtp2_if/global/app"
+	"mtp2_if/global/e"
+	"mtp2_if/logger"
+	"mtp2_if/models"
+	"net/http"
+
+	"github.com/gin-gonic/gin"
+)
+
+// GetMyOrders 获取我的订单列表
+// @Summary  获取我的订单列表
+// @Produce  json
+// @Security ApiKeyAuth
+// @Param    goodsId query    int true "商品ID"
+// @Param    userId  query    int true "用户ID"
+// @Success  200     {array}  models.RedisTradeHolderDetailEx
+// @Failure  500     {object} app.Response
+// @Router   /sbyj/GetMyOrders [get]
+// @Tags     水贝亿爵
+func GetMyOrders(c *gin.Context) {
+	appG := app.Gin{C: c}
+
+	// 获取请求参数
+	var req GetMyOrdersReq
+	if err := appG.C.ShouldBindQuery(&req); err != nil {
+		logger.GetLogger().Errorf("GetMyOrders failed: %s", err.Error())
+		appG.Response(http.StatusBadRequest, e.INVALID_PARAMS, nil)
+		return
+	}
+
+	// 获取数据
+	d := models.RedisTradeHolderDetailEx{}
+	rsp, err := d.GetDataEx(req.UserId, req.GoodsId)
+	if err != nil {
+		// 查询失败
+		logger.GetLogger().Errorf("GetMyOrders failed: %s", err.Error())
+		appG.Response(http.StatusBadRequest, e.ERROR_QUERY_FAIL, nil)
+		return
+	}
+
+	// 查询成功返回
+	appG.Response(http.StatusOK, e.SUCCESS, rsp)
+}
+
+// QueryMyTradegoodsdeliveryoffline 查询我的交收
+// @Summary  查询我的交收
+// @Produce  json
+// @Security ApiKeyAuth
+// @Param    userid          query    int true  "用户ID"
+// @Param    deliverystatus query    int false "交收单状态2(52模式使用) - 1:待审核 2:待确认 3:待付款 4:付款中 5:已完成付款 6:处理中 20:交收完成 21:审核拒绝 22:确认过期 23:付款过期 24:财务撤销 -- 枚举deliveryStatus"
+// @Param    page            query    int false "页码"
+// @Param    pagesize        query    int false "每页条数"
+// @Success  200            {array}  models.MyTradegoodsdeliveryoffline
+// @Failure  500             {object} app.Response
+// @Router   /sbyj/QueryMyTradegoodsdeliveryoffline [get]
+// @Tags     水贝亿爵
+func QueryMyTradegoodsdeliveryoffline(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.MyTradegoodsdeliveryoffline{}
+	a.DoBindReq(&m)
+	a.DoGetDataByPage(&m)
+}
+
+// QueryMyDeliveryofflinedetail 查询我的交收-订单明细
+// @Summary  查询我的交收-订单明细
+// @Produce  json
+// @Security ApiKeyAuth
+// @Param    userid         query    int true  "用户ID"
+// @Param    deliveryorderid query    int true  "交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)"
+// @Param    page            query    int false "页码"
+// @Param    pagesize        query    int false "每页条数"
+// @Success  200             {array}  models.MyDeliveryofflinedetail
+// @Failure  500             {object} app.Response
+// @Router   /sbyj/QueryMyDeliveryofflinedetail [get]
+// @Tags     水贝亿爵
+func QueryMyDeliveryofflinedetail(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.MyDeliveryofflinedetail{}
+	a.DoBindReq(&m)
+	a.DoGetDataByPage(&m)
+}
+
+// QueryMyDeliveryofflineoperatelog 查询我的交收-操作明细
+// @Summary  查询我的交收-操作明细
+// @Produce  json
+// @Security ApiKeyAuth
+// @Param    deliveryorderid query    int true  "交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)"
+// @Param    operatetype     query    int false "操作类型 - 1:交收流程 2:付款流水"
+// @Param    deliverypaymode query    int false "付款方式 - 1:线上支付2:线下支付 - 枚举deliveryPayMode"
+// @Param    confirmstatus   query    int false "确认状态 - 1:未确认 2:已确认 - 枚举confirmStatus"
+// @Param    page           query    int false "页码"
+// @Param    pagesize       query    int false "每页条数"
+// @Success  200             {array}  models.MyDeliveryofflineoperatelog
+// @Failure  500            {object} app.Response
+// @Router   /sbyj/QueryMyDeliveryofflineoperatelog [get]
+// @Tags     水贝亿爵
+func QueryMyDeliveryofflineoperatelog(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.MyDeliveryofflineoperatelog{}
+	a.DoBindReq(&m)
+	a.DoGetDataByPage(&m)
+}

+ 462 - 0
docs/docs.go

@@ -21280,6 +21280,199 @@ const docTemplate = `{
                     }
                 }
             }
+        },
+        "/sbyj/QueryMyDeliveryofflinedetail": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "水贝亿爵"
+                ],
+                "summary": "查询我的交收-订单明细",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
+                        "name": "deliveryorderid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.MyDeliveryofflinedetail"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/sbyj/QueryMyDeliveryofflineoperatelog": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "水贝亿爵"
+                ],
+                "summary": "查询我的交收-操作明细",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
+                        "name": "deliveryorderid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "操作类型 - 1:交收流程 2:付款流水",
+                        "name": "operatetype",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "付款方式 - 1:线上支付2:线下支付 - 枚举deliveryPayMode",
+                        "name": "deliverypaymode",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "确认状态 - 1:未确认 2:已确认 - 枚举confirmStatus",
+                        "name": "confirmstatus",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.MyDeliveryofflineoperatelog"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/sbyj/QueryMyTradegoodsdeliveryoffline": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "水贝亿爵"
+                ],
+                "summary": "查询我的交收",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "交收单状态2(52模式使用) - 1:待审核 2:待确认 3:待付款 4:付款中 5:已完成付款 6:处理中 20:交收完成 21:审核拒绝 22:确认过期 23:付款过期 24:财务撤销 -- 枚举deliveryStatus",
+                        "name": "deliverystatus",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.MyTradegoodsdeliveryoffline"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
         }
     },
     "definitions": {
@@ -41791,6 +41984,147 @@ const docTemplate = `{
                 }
             }
         },
+        "models.MyDeliveryofflinedetail": {
+            "type": "object",
+            "required": [
+                "deliveryorderid",
+                "userid"
+            ],
+            "properties": {
+                "accountid": {
+                    "description": "账号ID",
+                    "type": "integer"
+                },
+                "buyorsell": {
+                    "description": "方向 - 0:买 1:卖",
+                    "type": "integer"
+                },
+                "createtime": {
+                    "description": "创建时间",
+                    "type": "string"
+                },
+                "deliveryamount": {
+                    "description": "交收货款",
+                    "type": "number"
+                },
+                "deliverydetailid": {
+                    "description": "明细单号(906+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
+                    "type": "integer"
+                },
+                "deliverylot": {
+                    "description": "申请交收手数",
+                    "type": "integer"
+                },
+                "deliveryorderid": {
+                    "description": "交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
+                    "type": "integer"
+                },
+                "deliveryprice": {
+                    "description": "交收价格",
+                    "type": "number"
+                },
+                "deliveryqty": {
+                    "description": "申请交收数量 (手数*合约乘数)",
+                    "type": "integer"
+                },
+                "holdlot": {
+                    "description": "持仓手数",
+                    "type": "integer"
+                },
+                "holdqty": {
+                    "description": "持仓数量(手数*合约乘数)",
+                    "type": "integer"
+                },
+                "tradeid": {
+                    "description": "成交单号(101+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
+                    "type": "integer"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                }
+            }
+        },
+        "models.MyDeliveryofflineoperatelog": {
+            "type": "object",
+            "required": [
+                "deliveryorderid"
+            ],
+            "properties": {
+                "aftdeliverystatus": {
+                    "description": "操作后交收状态(OperateType=1时) -  枚举deliveryStatus",
+                    "type": "integer"
+                },
+                "confirmid": {
+                    "description": "确认人",
+                    "type": "integer"
+                },
+                "confirmstatus": {
+                    "description": "确认状态 - 1:未确认 2:已确认 - 枚举confirmStatus",
+                    "type": "integer"
+                },
+                "confirmtime": {
+                    "description": "确认时间",
+                    "type": "string"
+                },
+                "curdeliverystatus": {
+                    "description": "当前交收状态(OperateType=1时) -  枚举deliveryStatus",
+                    "type": "integer"
+                },
+                "deliveryorderid": {
+                    "description": "交收单ID",
+                    "type": "integer"
+                },
+                "deliverypaymode": {
+                    "description": "付款方式 - 1:线上支付2:线下支付 - 枚举deliveryPayMode",
+                    "type": "integer"
+                },
+                "fileaddress": {
+                    "description": "文件地址",
+                    "type": "string"
+                },
+                "filename": {
+                    "description": "文件名称",
+                    "type": "string"
+                },
+                "operatelogid": {
+                    "description": "明细单号(907+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
+                    "type": "integer"
+                },
+                "operatetime": {
+                    "description": "操作时间",
+                    "type": "string"
+                },
+                "operatetype": {
+                    "description": "操作类型 - 1:交收流程 2:付款流水",
+                    "type": "integer"
+                },
+                "operatoraccount": {
+                    "description": "操作人账号 - systemmanager的logincode 或 loginaccount的logincode,无则用loginid",
+                    "type": "string"
+                },
+                "operatorid": {
+                    "description": "操作人ID - systemmanager的autoid 或 loginaccount的loginid",
+                    "type": "integer"
+                },
+                "operatorname": {
+                    "description": "操作人名称 - systemmanager的username 或 loginaccount的logincode,无则用loginid",
+                    "type": "string"
+                },
+                "operatorsrc": {
+                    "description": "操作人来源 - 1:管理端 2:终端 3:系统",
+                    "type": "integer"
+                },
+                "payamount": {
+                    "description": "付款金额",
+                    "type": "number"
+                },
+                "remark": {
+                    "description": "操作备注",
+                    "type": "string"
+                }
+            }
+        },
         "models.MyFavorite": {
             "type": "object",
             "required": [
@@ -42479,6 +42813,134 @@ const docTemplate = `{
                 }
             }
         },
+        "models.MyTradegoodsdeliveryoffline": {
+            "type": "object",
+            "required": [
+                "userid"
+            ],
+            "properties": {
+                "accountid": {
+                    "description": "账户ID",
+                    "type": "integer"
+                },
+                "buyorsell": {
+                    "description": "交收方向 - 0:买 1:卖",
+                    "type": "integer"
+                },
+                "closetime": {
+                    "description": "完成时间",
+                    "type": "string"
+                },
+                "closetradedate": {
+                    "description": "完成交易日",
+                    "type": "string"
+                },
+                "deliveryamount": {
+                    "description": "交收货款",
+                    "type": "number"
+                },
+                "deliverycharge": {
+                    "description": "交割手续费",
+                    "type": "number"
+                },
+                "deliveryinfo": {
+                    "description": "交收信息",
+                    "type": "string"
+                },
+                "deliverylot": {
+                    "description": "交收手数",
+                    "type": "integer"
+                },
+                "deliveryorderid": {
+                    "description": "交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
+                    "type": "integer"
+                },
+                "deliverypremium": {
+                    "description": "交收升贴水(每单位)",
+                    "type": "number"
+                },
+                "deliveryprice": {
+                    "description": "交收价格",
+                    "type": "number"
+                },
+                "deliveryqty": {
+                    "description": "交收数量 (手数*合约乘数)",
+                    "type": "integer"
+                },
+                "deliverystatus": {
+                    "description": "交收单状态2(52模式使用) - 1:待审核 2:待确认 3:待付款 4:付款中 5:已完成付款 6:处理中 20:交收完成 21:审核拒绝 22:确认过期 23:付款过期 24:财务撤销 -- 枚举deliveryStatus",
+                    "type": "integer"
+                },
+                "deliverytotalamount": {
+                    "description": "交收总货款 = 交收货款 + 交收升贴水 * 交收数量",
+                    "type": "number"
+                },
+                "exchchargevalue": {
+                    "description": "交易所手续费设置值",
+                    "type": "number"
+                },
+                "feealgorithm": {
+                    "description": "手续费收取方式  1:比率  2:固定",
+                    "type": "integer"
+                },
+                "freezeamount": {
+                    "description": "冻结货款",
+                    "type": "number"
+                },
+                "goodsid": {
+                    "description": "商品ID",
+                    "type": "integer"
+                },
+                "handlestatus": {
+                    "description": "处理状态",
+                    "type": "integer"
+                },
+                "marketid": {
+                    "description": "市场ID",
+                    "type": "integer"
+                },
+                "matchaccountid": {
+                    "description": "对手方AccountID",
+                    "type": "integer"
+                },
+                "matchuserid": {
+                    "description": "对手方UserID",
+                    "type": "integer"
+                },
+                "memberchargevalue": {
+                    "description": "会员手续费设置值",
+                    "type": "number"
+                },
+                "orderstatus": {
+                    "description": "线下交收单状态 - 1:待处理 2:交收中 3:已完成 4:申请失败 枚举deliveryOrderStatus",
+                    "type": "integer"
+                },
+                "payedamount": {
+                    "description": "已付货款",
+                    "type": "number"
+                },
+                "reqtime": {
+                    "description": "申请时间",
+                    "type": "string"
+                },
+                "reqtradedate": {
+                    "description": "申请交易日",
+                    "type": "string"
+                },
+                "toconfirmtime": {
+                    "description": "确认截止时间(买交收)",
+                    "type": "string"
+                },
+                "topaytime": {
+                    "description": "付款截止时间(买交收)",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "申请用户ID",
+                    "type": "integer"
+                }
+            }
+        },
         "models.MyUsedCoupon": {
             "type": "object",
             "required": [

+ 462 - 0
docs/swagger.json

@@ -21271,6 +21271,199 @@
                     }
                 }
             }
+        },
+        "/sbyj/QueryMyDeliveryofflinedetail": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "水贝亿爵"
+                ],
+                "summary": "查询我的交收-订单明细",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
+                        "name": "deliveryorderid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.MyDeliveryofflinedetail"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/sbyj/QueryMyDeliveryofflineoperatelog": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "水贝亿爵"
+                ],
+                "summary": "查询我的交收-操作明细",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
+                        "name": "deliveryorderid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "操作类型 - 1:交收流程 2:付款流水",
+                        "name": "operatetype",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "付款方式 - 1:线上支付2:线下支付 - 枚举deliveryPayMode",
+                        "name": "deliverypaymode",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "确认状态 - 1:未确认 2:已确认 - 枚举confirmStatus",
+                        "name": "confirmstatus",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.MyDeliveryofflineoperatelog"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/sbyj/QueryMyTradegoodsdeliveryoffline": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "水贝亿爵"
+                ],
+                "summary": "查询我的交收",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "交收单状态2(52模式使用) - 1:待审核 2:待确认 3:待付款 4:付款中 5:已完成付款 6:处理中 20:交收完成 21:审核拒绝 22:确认过期 23:付款过期 24:财务撤销 -- 枚举deliveryStatus",
+                        "name": "deliverystatus",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.MyTradegoodsdeliveryoffline"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
         }
     },
     "definitions": {
@@ -41782,6 +41975,147 @@
                 }
             }
         },
+        "models.MyDeliveryofflinedetail": {
+            "type": "object",
+            "required": [
+                "deliveryorderid",
+                "userid"
+            ],
+            "properties": {
+                "accountid": {
+                    "description": "账号ID",
+                    "type": "integer"
+                },
+                "buyorsell": {
+                    "description": "方向 - 0:买 1:卖",
+                    "type": "integer"
+                },
+                "createtime": {
+                    "description": "创建时间",
+                    "type": "string"
+                },
+                "deliveryamount": {
+                    "description": "交收货款",
+                    "type": "number"
+                },
+                "deliverydetailid": {
+                    "description": "明细单号(906+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
+                    "type": "integer"
+                },
+                "deliverylot": {
+                    "description": "申请交收手数",
+                    "type": "integer"
+                },
+                "deliveryorderid": {
+                    "description": "交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
+                    "type": "integer"
+                },
+                "deliveryprice": {
+                    "description": "交收价格",
+                    "type": "number"
+                },
+                "deliveryqty": {
+                    "description": "申请交收数量 (手数*合约乘数)",
+                    "type": "integer"
+                },
+                "holdlot": {
+                    "description": "持仓手数",
+                    "type": "integer"
+                },
+                "holdqty": {
+                    "description": "持仓数量(手数*合约乘数)",
+                    "type": "integer"
+                },
+                "tradeid": {
+                    "description": "成交单号(101+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
+                    "type": "integer"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                }
+            }
+        },
+        "models.MyDeliveryofflineoperatelog": {
+            "type": "object",
+            "required": [
+                "deliveryorderid"
+            ],
+            "properties": {
+                "aftdeliverystatus": {
+                    "description": "操作后交收状态(OperateType=1时) -  枚举deliveryStatus",
+                    "type": "integer"
+                },
+                "confirmid": {
+                    "description": "确认人",
+                    "type": "integer"
+                },
+                "confirmstatus": {
+                    "description": "确认状态 - 1:未确认 2:已确认 - 枚举confirmStatus",
+                    "type": "integer"
+                },
+                "confirmtime": {
+                    "description": "确认时间",
+                    "type": "string"
+                },
+                "curdeliverystatus": {
+                    "description": "当前交收状态(OperateType=1时) -  枚举deliveryStatus",
+                    "type": "integer"
+                },
+                "deliveryorderid": {
+                    "description": "交收单ID",
+                    "type": "integer"
+                },
+                "deliverypaymode": {
+                    "description": "付款方式 - 1:线上支付2:线下支付 - 枚举deliveryPayMode",
+                    "type": "integer"
+                },
+                "fileaddress": {
+                    "description": "文件地址",
+                    "type": "string"
+                },
+                "filename": {
+                    "description": "文件名称",
+                    "type": "string"
+                },
+                "operatelogid": {
+                    "description": "明细单号(907+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
+                    "type": "integer"
+                },
+                "operatetime": {
+                    "description": "操作时间",
+                    "type": "string"
+                },
+                "operatetype": {
+                    "description": "操作类型 - 1:交收流程 2:付款流水",
+                    "type": "integer"
+                },
+                "operatoraccount": {
+                    "description": "操作人账号 - systemmanager的logincode 或 loginaccount的logincode,无则用loginid",
+                    "type": "string"
+                },
+                "operatorid": {
+                    "description": "操作人ID - systemmanager的autoid 或 loginaccount的loginid",
+                    "type": "integer"
+                },
+                "operatorname": {
+                    "description": "操作人名称 - systemmanager的username 或 loginaccount的logincode,无则用loginid",
+                    "type": "string"
+                },
+                "operatorsrc": {
+                    "description": "操作人来源 - 1:管理端 2:终端 3:系统",
+                    "type": "integer"
+                },
+                "payamount": {
+                    "description": "付款金额",
+                    "type": "number"
+                },
+                "remark": {
+                    "description": "操作备注",
+                    "type": "string"
+                }
+            }
+        },
         "models.MyFavorite": {
             "type": "object",
             "required": [
@@ -42470,6 +42804,134 @@
                 }
             }
         },
+        "models.MyTradegoodsdeliveryoffline": {
+            "type": "object",
+            "required": [
+                "userid"
+            ],
+            "properties": {
+                "accountid": {
+                    "description": "账户ID",
+                    "type": "integer"
+                },
+                "buyorsell": {
+                    "description": "交收方向 - 0:买 1:卖",
+                    "type": "integer"
+                },
+                "closetime": {
+                    "description": "完成时间",
+                    "type": "string"
+                },
+                "closetradedate": {
+                    "description": "完成交易日",
+                    "type": "string"
+                },
+                "deliveryamount": {
+                    "description": "交收货款",
+                    "type": "number"
+                },
+                "deliverycharge": {
+                    "description": "交割手续费",
+                    "type": "number"
+                },
+                "deliveryinfo": {
+                    "description": "交收信息",
+                    "type": "string"
+                },
+                "deliverylot": {
+                    "description": "交收手数",
+                    "type": "integer"
+                },
+                "deliveryorderid": {
+                    "description": "交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
+                    "type": "integer"
+                },
+                "deliverypremium": {
+                    "description": "交收升贴水(每单位)",
+                    "type": "number"
+                },
+                "deliveryprice": {
+                    "description": "交收价格",
+                    "type": "number"
+                },
+                "deliveryqty": {
+                    "description": "交收数量 (手数*合约乘数)",
+                    "type": "integer"
+                },
+                "deliverystatus": {
+                    "description": "交收单状态2(52模式使用) - 1:待审核 2:待确认 3:待付款 4:付款中 5:已完成付款 6:处理中 20:交收完成 21:审核拒绝 22:确认过期 23:付款过期 24:财务撤销 -- 枚举deliveryStatus",
+                    "type": "integer"
+                },
+                "deliverytotalamount": {
+                    "description": "交收总货款 = 交收货款 + 交收升贴水 * 交收数量",
+                    "type": "number"
+                },
+                "exchchargevalue": {
+                    "description": "交易所手续费设置值",
+                    "type": "number"
+                },
+                "feealgorithm": {
+                    "description": "手续费收取方式  1:比率  2:固定",
+                    "type": "integer"
+                },
+                "freezeamount": {
+                    "description": "冻结货款",
+                    "type": "number"
+                },
+                "goodsid": {
+                    "description": "商品ID",
+                    "type": "integer"
+                },
+                "handlestatus": {
+                    "description": "处理状态",
+                    "type": "integer"
+                },
+                "marketid": {
+                    "description": "市场ID",
+                    "type": "integer"
+                },
+                "matchaccountid": {
+                    "description": "对手方AccountID",
+                    "type": "integer"
+                },
+                "matchuserid": {
+                    "description": "对手方UserID",
+                    "type": "integer"
+                },
+                "memberchargevalue": {
+                    "description": "会员手续费设置值",
+                    "type": "number"
+                },
+                "orderstatus": {
+                    "description": "线下交收单状态 - 1:待处理 2:交收中 3:已完成 4:申请失败 枚举deliveryOrderStatus",
+                    "type": "integer"
+                },
+                "payedamount": {
+                    "description": "已付货款",
+                    "type": "number"
+                },
+                "reqtime": {
+                    "description": "申请时间",
+                    "type": "string"
+                },
+                "reqtradedate": {
+                    "description": "申请交易日",
+                    "type": "string"
+                },
+                "toconfirmtime": {
+                    "description": "确认截止时间(买交收)",
+                    "type": "string"
+                },
+                "topaytime": {
+                    "description": "付款截止时间(买交收)",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "申请用户ID",
+                    "type": "integer"
+                }
+            }
+        },
         "models.MyUsedCoupon": {
             "type": "object",
             "required": [

+ 324 - 0
docs/swagger.yaml

@@ -15261,6 +15261,110 @@ definitions:
     required:
     - selluserid
     type: object
+  models.MyDeliveryofflinedetail:
+    properties:
+      accountid:
+        description: 账号ID
+        type: integer
+      buyorsell:
+        description: 方向 - 0:买 1:卖
+        type: integer
+      createtime:
+        description: 创建时间
+        type: string
+      deliveryamount:
+        description: 交收货款
+        type: number
+      deliverydetailid:
+        description: 明细单号(906+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+        type: integer
+      deliverylot:
+        description: 申请交收手数
+        type: integer
+      deliveryorderid:
+        description: 交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+        type: integer
+      deliveryprice:
+        description: 交收价格
+        type: number
+      deliveryqty:
+        description: 申请交收数量 (手数*合约乘数)
+        type: integer
+      holdlot:
+        description: 持仓手数
+        type: integer
+      holdqty:
+        description: 持仓数量(手数*合约乘数)
+        type: integer
+      tradeid:
+        description: 成交单号(101+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+        type: integer
+      userid:
+        description: 用户ID
+        type: integer
+    required:
+    - deliveryorderid
+    - userid
+    type: object
+  models.MyDeliveryofflineoperatelog:
+    properties:
+      aftdeliverystatus:
+        description: 操作后交收状态(OperateType=1时) -  枚举deliveryStatus
+        type: integer
+      confirmid:
+        description: 确认人
+        type: integer
+      confirmstatus:
+        description: 确认状态 - 1:未确认 2:已确认 - 枚举confirmStatus
+        type: integer
+      confirmtime:
+        description: 确认时间
+        type: string
+      curdeliverystatus:
+        description: 当前交收状态(OperateType=1时) -  枚举deliveryStatus
+        type: integer
+      deliveryorderid:
+        description: 交收单ID
+        type: integer
+      deliverypaymode:
+        description: 付款方式 - 1:线上支付2:线下支付 - 枚举deliveryPayMode
+        type: integer
+      fileaddress:
+        description: 文件地址
+        type: string
+      filename:
+        description: 文件名称
+        type: string
+      operatelogid:
+        description: 明细单号(907+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+        type: integer
+      operatetime:
+        description: 操作时间
+        type: string
+      operatetype:
+        description: 操作类型 - 1:交收流程 2:付款流水
+        type: integer
+      operatoraccount:
+        description: 操作人账号 - systemmanager的logincode 或 loginaccount的logincode,无则用loginid
+        type: string
+      operatorid:
+        description: 操作人ID - systemmanager的autoid 或 loginaccount的loginid
+        type: integer
+      operatorname:
+        description: 操作人名称 - systemmanager的username 或 loginaccount的logincode,无则用loginid
+        type: string
+      operatorsrc:
+        description: 操作人来源 - 1:管理端 2:终端 3:系统
+        type: integer
+      payamount:
+        description: 付款金额
+        type: number
+      remark:
+        description: 操作备注
+        type: string
+    required:
+    - deliveryorderid
+    type: object
   models.MyFavorite:
     properties:
       accountname:
@@ -15758,6 +15862,102 @@ definitions:
     required:
     - userid
     type: object
+  models.MyTradegoodsdeliveryoffline:
+    properties:
+      accountid:
+        description: 账户ID
+        type: integer
+      buyorsell:
+        description: 交收方向 - 0:买 1:卖
+        type: integer
+      closetime:
+        description: 完成时间
+        type: string
+      closetradedate:
+        description: 完成交易日
+        type: string
+      deliveryamount:
+        description: 交收货款
+        type: number
+      deliverycharge:
+        description: 交割手续费
+        type: number
+      deliveryinfo:
+        description: 交收信息
+        type: string
+      deliverylot:
+        description: 交收手数
+        type: integer
+      deliveryorderid:
+        description: 交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+        type: integer
+      deliverypremium:
+        description: 交收升贴水(每单位)
+        type: number
+      deliveryprice:
+        description: 交收价格
+        type: number
+      deliveryqty:
+        description: 交收数量 (手数*合约乘数)
+        type: integer
+      deliverystatus:
+        description: 交收单状态2(52模式使用) - 1:待审核 2:待确认 3:待付款 4:付款中 5:已完成付款 6:处理中 20:交收完成
+          21:审核拒绝 22:确认过期 23:付款过期 24:财务撤销 -- 枚举deliveryStatus
+        type: integer
+      deliverytotalamount:
+        description: 交收总货款 = 交收货款 + 交收升贴水 * 交收数量
+        type: number
+      exchchargevalue:
+        description: 交易所手续费设置值
+        type: number
+      feealgorithm:
+        description: 手续费收取方式  1:比率  2:固定
+        type: integer
+      freezeamount:
+        description: 冻结货款
+        type: number
+      goodsid:
+        description: 商品ID
+        type: integer
+      handlestatus:
+        description: 处理状态
+        type: integer
+      marketid:
+        description: 市场ID
+        type: integer
+      matchaccountid:
+        description: 对手方AccountID
+        type: integer
+      matchuserid:
+        description: 对手方UserID
+        type: integer
+      memberchargevalue:
+        description: 会员手续费设置值
+        type: number
+      orderstatus:
+        description: 线下交收单状态 - 1:待处理 2:交收中 3:已完成 4:申请失败 枚举deliveryOrderStatus
+        type: integer
+      payedamount:
+        description: 已付货款
+        type: number
+      reqtime:
+        description: 申请时间
+        type: string
+      reqtradedate:
+        description: 申请交易日
+        type: string
+      toconfirmtime:
+        description: 确认截止时间(买交收)
+        type: string
+      topaytime:
+        description: 付款截止时间(买交收)
+        type: string
+      userid:
+        description: 申请用户ID
+        type: integer
+    required:
+    - userid
+    type: object
   models.MyUsedCoupon:
     properties:
       accountid:
@@ -42332,6 +42532,130 @@ paths:
       summary: 获取水贝亿爵游客商品列表
       tags:
       - 水贝亿爵
+  /sbyj/QueryMyDeliveryofflinedetail:
+    get:
+      parameters:
+      - description: 用户ID
+        in: query
+        name: userid
+        required: true
+        type: integer
+      - description: 交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+        in: query
+        name: deliveryorderid
+        required: true
+        type: integer
+      - description: 页码
+        in: query
+        name: page
+        type: integer
+      - description: 每页条数
+        in: query
+        name: pagesize
+        type: integer
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.MyDeliveryofflinedetail'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 查询我的交收-订单明细
+      tags:
+      - 水贝亿爵
+  /sbyj/QueryMyDeliveryofflineoperatelog:
+    get:
+      parameters:
+      - description: 交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+        in: query
+        name: deliveryorderid
+        required: true
+        type: integer
+      - description: 操作类型 - 1:交收流程 2:付款流水
+        in: query
+        name: operatetype
+        type: integer
+      - description: 付款方式 - 1:线上支付2:线下支付 - 枚举deliveryPayMode
+        in: query
+        name: deliverypaymode
+        type: integer
+      - description: 确认状态 - 1:未确认 2:已确认 - 枚举confirmStatus
+        in: query
+        name: confirmstatus
+        type: integer
+      - description: 页码
+        in: query
+        name: page
+        type: integer
+      - description: 每页条数
+        in: query
+        name: pagesize
+        type: integer
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.MyDeliveryofflineoperatelog'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 查询我的交收-操作明细
+      tags:
+      - 水贝亿爵
+  /sbyj/QueryMyTradegoodsdeliveryoffline:
+    get:
+      parameters:
+      - description: 用户ID
+        in: query
+        name: userid
+        required: true
+        type: integer
+      - description: 交收单状态2(52模式使用) - 1:待审核 2:待确认 3:待付款 4:付款中 5:已完成付款 6:处理中 20:交收完成
+          21:审核拒绝 22:确认过期 23:付款过期 24:财务撤销 -- 枚举deliveryStatus
+        in: query
+        name: deliverystatus
+        type: integer
+      - description: 页码
+        in: query
+        name: page
+        type: integer
+      - description: 每页条数
+        in: query
+        name: pagesize
+        type: integer
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.MyTradegoodsdeliveryoffline'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 查询我的交收
+      tags:
+      - 水贝亿爵
 securityDefinitions:
   ApiKeyAuth:
     in: header

+ 88 - 0
models/ori.go

@@ -607,3 +607,91 @@ type Gzmemberinfo struct {
 func (r *Gzmemberinfo) TableName() string {
 	return "GZ_MEMBERINFO"
 }
+
+// Tradegoodsdeliveryoffline 交易合约线下交收表 - 收益权
+type Tradegoodsdeliveryoffline struct {
+	DELIVERYORDERID     int64     `json:"deliveryorderid" xorm:"DELIVERYORDERID"`         // 交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+	USERID              int64     `json:"userid" xorm:"USERID"`                           // 申请用户ID
+	ACCOUNTID           int64     `json:"accountid" xorm:"ACCOUNTID"`                     // 账户ID
+	GOODSID             int64     `json:"goodsid" xorm:"GOODSID"`                         // 商品ID
+	MARKETID            int32     `json:"marketid" xorm:"MARKETID"`                       // 市场ID
+	BUYORSELL           int32     `json:"buyorsell" xorm:"BUYORSELL"`                     // 交收方向 - 0:买 1:卖
+	DELIVERYLOT         int64     `json:"deliverylot" xorm:"DELIVERYLOT"`                 // 交收手数
+	DELIVERYQTY         int64     `json:"deliveryqty" xorm:"DELIVERYQTY"`                 // 交收数量 (手数*合约乘数)
+	DELIVERYINFO        string    `json:"deliveryinfo" xorm:"DELIVERYINFO"`               // 交收信息
+	MATCHUSERID         int64     `json:"matchuserid" xorm:"MATCHUSERID"`                 // 对手方UserID
+	MATCHACCOUNTID      int64     `json:"matchaccountid" xorm:"MATCHACCOUNTID"`           // 对手方AccountID
+	REQTIME             time.Time `json:"reqtime" xorm:"REQTIME"`                         // 申请时间
+	REQTRADEDATE        string    `json:"reqtradedate" xorm:"REQTRADEDATE"`               // 申请交易日
+	ORDERSTATUS         int32     `json:"orderstatus" xorm:"ORDERSTATUS"`                 // 线下交收单状态 - 1:待处理 2:交收中 3:已完成 4:申请失败 枚举deliveryOrderStatus
+	DELIVERYPRICE       float64   `json:"deliveryprice" xorm:"DELIVERYPRICE"`             // 交收价格
+	DELIVERYAMOUNT      float64   `json:"deliveryamount" xorm:"DELIVERYAMOUNT"`           // 交收货款
+	CLOSETIME           time.Time `json:"closetime" xorm:"CLOSETIME"`                     // 完成时间
+	CLOSETRADEDATE      string    `json:"closetradedate" xorm:"CLOSETRADEDATE"`           // 完成交易日
+	DELIVERYCHARGE      float64   `json:"deliverycharge" xorm:"DELIVERYCHARGE"`           // 交割手续费
+	FEEALGORITHM        int32     `json:"feealgorithm" xorm:"FEEALGORITHM"`               // 手续费收取方式  1:比率  2:固定
+	MEMBERCHARGEVALUE   float64   `json:"memberchargevalue" xorm:"MEMBERCHARGEVALUE"`     // 会员手续费设置值
+	EXCHCHARGEVALUE     float64   `json:"exchchargevalue" xorm:"EXCHCHARGEVALUE"`         // 交易所手续费设置值
+	HANDLESTATUS        int32     `json:"handlestatus" xorm:"HANDLESTATUS"`               // 处理状态
+	DELIVERYPREMIUM     float64   `json:"deliverypremium" xorm:"DELIVERYPREMIUM"`         // 交收升贴水(每单位)
+	DELIVERYTOTALAMOUNT float64   `json:"deliverytotalamount" xorm:"DELIVERYTOTALAMOUNT"` // 交收总货款 = 交收货款 + 交收升贴水 * 交收数量
+	DELIVERYSTATUS      int32     `json:"deliverystatus" xorm:"DELIVERYSTATUS"`           // 交收单状态2(52模式使用) - 1:待审核 2:待确认 3:待付款 4:付款中 5:已完成付款 6:处理中 20:交收完成 21:审核拒绝 22:确认过期 23:付款过期 24:财务撤销 -- 枚举deliveryStatus
+	TOCONFIRMTIME       time.Time `json:"toconfirmtime" xorm:"TOCONFIRMTIME"`             // 确认截止时间(买交收)
+	TOPAYTIME           time.Time `json:"topaytime" xorm:"TOPAYTIME"`                     // 付款截止时间(买交收)
+	PAYEDAMOUNT         float64   `json:"payedamount" xorm:"PAYEDAMOUNT"`                 // 已付货款
+	FREEZEAMOUNT        float64   `json:"freezeamount" xorm:"FREEZEAMOUNT"`               // 冻结货款
+}
+
+// TableName is TRADE_GOODSDELIVERYOFFLINE
+func (r *Tradegoodsdeliveryoffline) TableName() string {
+	return "TRADE_GOODSDELIVERYOFFLINE"
+}
+
+// Deliveryofflinedetail 交易合约线下交收明细表
+type Deliveryofflinedetail struct {
+	DELIVERYDETAILID int64     `json:"deliverydetailid" xorm:"DELIVERYDETAILID"` // 明细单号(906+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+	DELIVERYORDERID  int64     `json:"deliveryorderid" xorm:"DELIVERYORDERID"`   // 交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+	TRADEID          int64     `json:"tradeid" xorm:"TRADEID"`                   // 成交单号(101+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+	BUYORSELL        int32     `json:"buyorsell" xorm:"BUYORSELL"`               // 方向 - 0:买 1:卖
+	USERID           int64     `json:"userid" xorm:"USERID"`                     // 用户ID
+	ACCOUNTID        int64     `json:"accountid" xorm:"ACCOUNTID"`               // 账号ID
+	HOLDLOT          int64     `json:"holdlot" xorm:"HOLDLOT"`                   // 持仓手数
+	HOLDQTY          int64     `json:"holdqty" xorm:"HOLDQTY"`                   // 持仓数量(手数*合约乘数)
+	DELIVERYLOT      int64     `json:"deliverylot" xorm:"DELIVERYLOT"`           // 申请交收手数
+	DELIVERYQTY      int64     `json:"deliveryqty" xorm:"DELIVERYQTY"`           // 申请交收数量 (手数*合约乘数)
+	DELIVERYPRICE    float64   `json:"deliveryprice" xorm:"DELIVERYPRICE"`       // 交收价格
+	DELIVERYAMOUNT   float64   `json:"deliveryamount" xorm:"DELIVERYAMOUNT"`     // 交收货款
+	CREATETIME       time.Time `json:"createtime" xorm:"CREATETIME"`             // 创建时间
+}
+
+// TableName is DELIVERYOFFLINEDETAIL
+func (r *Deliveryofflinedetail) TableName() string {
+	return "DELIVERYOFFLINEDETAIL"
+}
+
+// Deliveryofflineoperatelog 交易合约线下交收操作流水表
+type Deliveryofflineoperatelog struct {
+	OPERATELOGID      int64     `json:"operatelogid" xorm:"OPERATELOGID"`           // 明细单号(907+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+	DELIVERYORDERID   int64     `json:"deliveryorderid" xorm:"DELIVERYORDERID"`     // 交收单ID
+	OPERATETYPE       int32     `json:"operatetype" xorm:"OPERATETYPE"`             // 操作类型 - 1:交收流程 2:付款流水
+	CURDELIVERYSTATUS int32     `json:"curdeliverystatus" xorm:"CURDELIVERYSTATUS"` // 当前交收状态(OperateType=1时) -  枚举deliveryStatus
+	AFTDELIVERYSTATUS int32     `json:"aftdeliverystatus" xorm:"AFTDELIVERYSTATUS"` // 操作后交收状态(OperateType=1时) -  枚举deliveryStatus
+	OPERATORSRC       int32     `json:"operatorsrc" xorm:"OPERATORSRC"`             // 操作人来源 - 1:管理端 2:终端 3:系统
+	OPERATORID        int64     `json:"operatorid" xorm:"OPERATORID"`               // 操作人ID - systemmanager的autoid 或 loginaccount的loginid
+	OPERATORACCOUNT   string    `json:"operatoraccount" xorm:"OPERATORACCOUNT"`     // 操作人账号 - systemmanager的logincode 或 loginaccount的logincode,无则用loginid
+	OPERATORNAME      string    `json:"operatorname" xorm:"OPERATORNAME"`           // 操作人名称 - systemmanager的username 或 loginaccount的logincode,无则用loginid
+	REMARK            string    `json:"remark" xorm:"REMARK"`                       // 操作备注
+	OPERATETIME       time.Time `json:"operatetime" xorm:"OPERATETIME"`             // 操作时间
+	FILENAME          string    `json:"filename" xorm:"FILENAME"`                   // 文件名称
+	FILEADDRESS       string    `json:"fileaddress" xorm:"FILEADDRESS"`             // 文件地址
+	DELIVERYPAYMODE   int32     `json:"deliverypaymode" xorm:"DELIVERYPAYMODE"`     // 付款方式 - 1:线上支付2:线下支付 - 枚举deliveryPayMode
+	PAYAMOUNT         float64   `json:"payamount" xorm:"PAYAMOUNT"`                 // 付款金额
+	CONFIRMSTATUS     int32     `json:"confirmstatus" xorm:"CONFIRMSTATUS"`         // 确认状态 - 1:未确认 2:已确认 - 枚举confirmStatus
+	CONFIRMID         int64     `json:"confirmid" xorm:"CONFIRMID"`                 // 确认人
+	CONFIRMTIME       time.Time `json:"confirmtime" xorm:"CONFIRMTIME"`             // 确认时间
+}
+
+// TableName is DELIVERYOFFLINEOPERATELOG
+func (r *Deliveryofflineoperatelog) TableName() string {
+	return "DELIVERYOFFLINEOPERATELOG"
+}

+ 224 - 0
models/sbyj.go

@@ -6,6 +6,7 @@ import (
 	"mtp2_if/mtpcache"
 	"mtp2_if/pb"
 	"mtp2_if/rediscli"
+	"mtp2_if/utils"
 	"sort"
 	"time"
 
@@ -211,3 +212,226 @@ func (r *RedisTradeHolderDetailEx) ParseFromProto(p *pb.RedisTradeHolderDetailEx
 	// 单位
 	r.GoodsUnit = mtpcache.GetEnumDicitemName(int32(r.GoodsUnitID))
 }
+
+type MyTradegoodsdeliveryoffline struct {
+	DELIVERYORDERID     int64     `json:"deliveryorderid" xorm:"DELIVERYORDERID"`                     // 交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+	USERID              int64     `json:"userid" xorm:"USERID" form:"userid" binding:"required"`      // 申请用户ID
+	ACCOUNTID           int64     `json:"accountid" xorm:"ACCOUNTID"`                                 // 账户ID
+	GOODSID             int64     `json:"goodsid" xorm:"GOODSID"`                                     // 商品ID
+	MARKETID            int32     `json:"marketid" xorm:"MARKETID"`                                   // 市场ID
+	BUYORSELL           int32     `json:"buyorsell" xorm:"BUYORSELL"`                                 // 交收方向 - 0:买 1:卖
+	DELIVERYLOT         int64     `json:"deliverylot" xorm:"DELIVERYLOT"`                             // 交收手数
+	DELIVERYQTY         int64     `json:"deliveryqty" xorm:"DELIVERYQTY"`                             // 交收数量 (手数*合约乘数)
+	DELIVERYINFO        string    `json:"deliveryinfo" xorm:"DELIVERYINFO"`                           // 交收信息
+	MATCHUSERID         int64     `json:"matchuserid" xorm:"MATCHUSERID"`                             // 对手方UserID
+	MATCHACCOUNTID      int64     `json:"matchaccountid" xorm:"MATCHACCOUNTID"`                       // 对手方AccountID
+	REQTIME             time.Time `json:"reqtime" xorm:"REQTIME"`                                     // 申请时间
+	REQTRADEDATE        string    `json:"reqtradedate" xorm:"REQTRADEDATE"`                           // 申请交易日
+	ORDERSTATUS         int32     `json:"orderstatus" xorm:"ORDERSTATUS"`                             // 线下交收单状态 - 1:待处理 2:交收中 3:已完成 4:申请失败 枚举deliveryOrderStatus
+	DELIVERYPRICE       float64   `json:"deliveryprice" xorm:"DELIVERYPRICE"`                         // 交收价格
+	DELIVERYAMOUNT      float64   `json:"deliveryamount" xorm:"DELIVERYAMOUNT"`                       // 交收货款
+	CLOSETIME           time.Time `json:"closetime" xorm:"CLOSETIME"`                                 // 完成时间
+	CLOSETRADEDATE      string    `json:"closetradedate" xorm:"CLOSETRADEDATE"`                       // 完成交易日
+	DELIVERYCHARGE      float64   `json:"deliverycharge" xorm:"DELIVERYCHARGE"`                       // 交割手续费
+	FEEALGORITHM        int32     `json:"feealgorithm" xorm:"FEEALGORITHM"`                           // 手续费收取方式  1:比率  2:固定
+	MEMBERCHARGEVALUE   float64   `json:"memberchargevalue" xorm:"MEMBERCHARGEVALUE"`                 // 会员手续费设置值
+	EXCHCHARGEVALUE     float64   `json:"exchchargevalue" xorm:"EXCHCHARGEVALUE"`                     // 交易所手续费设置值
+	HANDLESTATUS        int32     `json:"handlestatus" xorm:"HANDLESTATUS"`                           // 处理状态
+	DELIVERYPREMIUM     float64   `json:"deliverypremium" xorm:"DELIVERYPREMIUM"`                     // 交收升贴水(每单位)
+	DELIVERYTOTALAMOUNT float64   `json:"deliverytotalamount" xorm:"DELIVERYTOTALAMOUNT"`             // 交收总货款 = 交收货款 + 交收升贴水 * 交收数量
+	DELIVERYSTATUS      int32     `json:"deliverystatus" xorm:"DELIVERYSTATUS" form:"deliverystatus"` // 交收单状态2(52模式使用) - 1:待审核 2:待确认 3:待付款 4:付款中 5:已完成付款 6:处理中 20:交收完成 21:审核拒绝 22:确认过期 23:付款过期 24:财务撤销 -- 枚举deliveryStatus
+	TOCONFIRMTIME       time.Time `json:"toconfirmtime" xorm:"TOCONFIRMTIME"`                         // 确认截止时间(买交收)
+	TOPAYTIME           time.Time `json:"topaytime" xorm:"TOPAYTIME"`                                 // 付款截止时间(买交收)
+	PAYEDAMOUNT         float64   `json:"payedamount" xorm:"PAYEDAMOUNT"`                             // 已付货款
+	FREEZEAMOUNT        float64   `json:"freezeamount" xorm:"FREEZEAMOUNT"`                           // 冻结货款
+
+	PageEx `xorm:"extends"` // 页码信息
+}
+
+func (r *MyTradegoodsdeliveryoffline) calc() {
+
+}
+
+func (r *MyTradegoodsdeliveryoffline) buildSql() string {
+	var sqlId utils.SQLVal = `
+	SELECT 
+		t.deliveryorderid,
+		t.userid,
+		t.accountid,
+		t.goodsid,
+		t.marketid,
+		t.buyorsell,
+		t.deliverylot,
+		t.deliveryqty,
+		t.deliveryinfo,
+		t.matchuserid,
+		t.matchaccountid,
+		t.reqtime,
+		t.reqtradedate,
+		t.orderstatus,
+		t.deliveryprice,
+		t.deliveryamount,
+		t.closetime,
+		t.closetradedate,
+		t.deliverycharge,
+		t.feealgorithm,
+		t.memberchargevalue,
+		t.exchchargevalue,
+		t.handlestatus,
+		t.deliverypremium,
+		t.deliverytotalamount,
+		t.deliverystatus,
+		t.toconfirmtime,
+		t.topaytime,
+		t.payedamount,
+		t.freezeamount
+	FROM TRADE_GOODSDELIVERYOFFLINE t
+	WHERE t.userid = %v 
+	`
+	sqlId.FormatParam(r.USERID)
+	sqlId.AndEx("t.DELIVERYSTATUS", r.DELIVERYSTATUS, r.DELIVERYSTATUS > 0)
+
+	sqlId.Page(r.Page, r.PageSize)
+	return sqlId.String()
+}
+
+func (r *MyTradegoodsdeliveryoffline) GetDataByPage() (interface{}, error, int, int, int) {
+	sData := make([]MyTradegoodsdeliveryoffline, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	total := 0
+	for i := range sData {
+		sData[i].calc()
+		total = sData[i].Total
+	}
+	return sData, err, r.Page, r.PageSize, total
+}
+
+// Deliveryofflinedetail 交易合约线下交收明细表
+type MyDeliveryofflinedetail struct {
+	DELIVERYDETAILID int64     `json:"deliverydetailid" xorm:"DELIVERYDETAILID"`                                         // 明细单号(906+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+	DELIVERYORDERID  int64     `json:"deliveryorderid" xorm:"DELIVERYORDERID" form:"deliveryorderid" binding:"required"` // 交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+	TRADEID          int64     `json:"tradeid" xorm:"TRADEID"`                                                           // 成交单号(101+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+	BUYORSELL        int32     `json:"buyorsell" xorm:"BUYORSELL"`                                                       // 方向 - 0:买 1:卖
+	USERID           int64     `json:"userid" xorm:"USERID"  form:"userid" binding:"required"`                           // 用户ID
+	ACCOUNTID        int64     `json:"accountid" xorm:"ACCOUNTID"`                                                       // 账号ID
+	HOLDLOT          int64     `json:"holdlot" xorm:"HOLDLOT"`                                                           // 持仓手数
+	HOLDQTY          int64     `json:"holdqty" xorm:"HOLDQTY"`                                                           // 持仓数量(手数*合约乘数)
+	DELIVERYLOT      int64     `json:"deliverylot" xorm:"DELIVERYLOT"`                                                   // 申请交收手数
+	DELIVERYQTY      int64     `json:"deliveryqty" xorm:"DELIVERYQTY"`                                                   // 申请交收数量 (手数*合约乘数)
+	DELIVERYPRICE    float64   `json:"deliveryprice" xorm:"DELIVERYPRICE"`                                               // 交收价格
+	DELIVERYAMOUNT   float64   `json:"deliveryamount" xorm:"DELIVERYAMOUNT"`                                             // 交收货款
+	CREATETIME       time.Time `json:"createtime" xorm:"CREATETIME"`                                                     // 创建时间
+
+	PageEx `xorm:"extends"` // 页码信息
+}
+
+func (r *MyDeliveryofflinedetail) calc() {
+
+}
+
+func (r *MyDeliveryofflinedetail) buildSql() string {
+	var sqlId utils.SQLVal = `
+	SELECT 
+		t.deliverydetailid,
+		t.deliveryorderid,
+		t.tradeid,
+		t.buyorsell,
+		t.userid,
+		t.accountid,
+		t.holdlot,
+		t.holdqty,
+		t.deliverylot,
+		t.deliveryqty,
+		t.deliveryprice,
+		t.deliveryamount,
+		t.createtime
+	FROM DELIVERYOFFLINEDETAIL t
+	WHERE t.userid = %v AND t.deliveryorderid = %v 
+	`
+	sqlId.FormatParam(r.USERID, r.DELIVERYORDERID)
+
+	sqlId.Page(r.Page, r.PageSize)
+	return sqlId.String()
+}
+
+func (r *MyDeliveryofflinedetail) GetDataByPage() (interface{}, error, int, int, int) {
+	sData := make([]MyDeliveryofflinedetail, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	total := 0
+	for i := range sData {
+		sData[i].calc()
+		total = sData[i].Total
+	}
+	return sData, err, r.Page, r.PageSize, total
+}
+
+// Deliveryofflineoperatelog 交易合约线下交收操作流水表
+type MyDeliveryofflineoperatelog struct {
+	OPERATELOGID      int64     `json:"operatelogid" xorm:"OPERATELOGID"`                                                 // 明细单号(907+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+	DELIVERYORDERID   int64     `json:"deliveryorderid" xorm:"DELIVERYORDERID" form:"deliveryorderid" binding:"required"` // 交收单ID
+	OPERATETYPE       int32     `json:"operatetype" xorm:"OPERATETYPE" form:"operatetype"`                                // 操作类型 - 1:交收流程 2:付款流水
+	CURDELIVERYSTATUS int32     `json:"curdeliverystatus" xorm:"CURDELIVERYSTATUS"`                                       // 当前交收状态(OperateType=1时) -  枚举deliveryStatus
+	AFTDELIVERYSTATUS int32     `json:"aftdeliverystatus" xorm:"AFTDELIVERYSTATUS"`                                       // 操作后交收状态(OperateType=1时) -  枚举deliveryStatus
+	OPERATORSRC       int32     `json:"operatorsrc" xorm:"OPERATORSRC"`                                                   // 操作人来源 - 1:管理端 2:终端 3:系统
+	OPERATORID        int64     `json:"operatorid" xorm:"OPERATORID"`                                                     // 操作人ID - systemmanager的autoid 或 loginaccount的loginid
+	OPERATORACCOUNT   string    `json:"operatoraccount" xorm:"OPERATORACCOUNT"`                                           // 操作人账号 - systemmanager的logincode 或 loginaccount的logincode,无则用loginid
+	OPERATORNAME      string    `json:"operatorname" xorm:"OPERATORNAME"`                                                 // 操作人名称 - systemmanager的username 或 loginaccount的logincode,无则用loginid
+	REMARK            string    `json:"remark" xorm:"REMARK"`                                                             // 操作备注
+	OPERATETIME       time.Time `json:"operatetime" xorm:"OPERATETIME"`                                                   // 操作时间
+	FILENAME          string    `json:"filename" xorm:"FILENAME"`                                                         // 文件名称
+	FILEADDRESS       string    `json:"fileaddress" xorm:"FILEADDRESS"`                                                   // 文件地址
+	DELIVERYPAYMODE   int32     `json:"deliverypaymode" xorm:"DELIVERYPAYMODE" form:"deliverypaymode"`                    // 付款方式 - 1:线上支付2:线下支付 - 枚举deliveryPayMode
+	PAYAMOUNT         float64   `json:"payamount" xorm:"PAYAMOUNT"`                                                       // 付款金额
+	CONFIRMSTATUS     int32     `json:"confirmstatus" xorm:"CONFIRMSTATUS" form:"confirmstatus"`                          // 确认状态 - 1:未确认 2:已确认 - 枚举confirmStatus
+	CONFIRMID         int64     `json:"confirmid" xorm:"CONFIRMID"`                                                       // 确认人
+	CONFIRMTIME       time.Time `json:"confirmtime" xorm:"CONFIRMTIME"`                                                   // 确认时间
+
+	PageEx `xorm:"extends"` // 页码信息
+}
+
+func (r *MyDeliveryofflineoperatelog) calc() {
+
+}
+
+func (r *MyDeliveryofflineoperatelog) buildSql() string {
+	var sqlId utils.SQLVal = `
+	SELECT 
+		t.operatelogid,
+		t.deliveryorderid,
+		t.operatetype,
+		t.curdeliverystatus,
+		t.aftdeliverystatus,
+		t.operatorsrc,
+		t.operatorid,
+		t.operatoraccount,
+		t.operatorname,
+		t.remark,
+		t.operatetime,
+		t.filename,
+		t.fileaddress,
+		t.deliverypaymode,
+		t.payamount,
+		t.confirmstatus,
+		t.confirmid,
+		t.confirmtime
+	FROM DELIVERYOFFLINEOPERATELOG t
+	WHERE t.deliveryorderid = %v 
+	`
+	sqlId.FormatParam(r.DELIVERYORDERID)
+	sqlId.AndEx("t.operatetype", r.OPERATETYPE, r.OPERATETYPE > 0)
+	sqlId.OrderByDesc("t.operatetime")
+
+	sqlId.Page(r.Page, r.PageSize)
+	return sqlId.String()
+}
+
+func (r *MyDeliveryofflineoperatelog) GetDataByPage() (interface{}, error, int, int, int) {
+	sData := make([]MyDeliveryofflineoperatelog, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	total := 0
+	for i := range sData {
+		sData[i].calc()
+		total = sData[i].Total
+	}
+	return sData, err, r.Page, r.PageSize, total
+}

+ 3 - 0
routers/router.go

@@ -784,6 +784,9 @@ func InitRouter() *gin.Engine {
 	{
 		sbyjR.Use().GET("GetTouristGoods", sbyj.GetTouristGoods)
 		sbyjR.Use(token.Auth()).GET("GetMyOrders", sbyj.GetMyOrders)
+		sbyjR.Use(token.Auth()).GET("QueryMyTradegoodsdeliveryoffline", sbyj.QueryMyTradegoodsdeliveryoffline)
+		sbyjR.Use(token.Auth()).GET("QueryMyDeliveryofflinedetail", sbyj.QueryMyDeliveryofflinedetail)
+		sbyjR.Use(token.Auth()).GET("QueryMyDeliveryofflineoperatelog", sbyj.QueryMyDeliveryofflineoperatelog)
 	}
 
 	return r