/** * @Author: zou.yingbin * @Create : 2021/7/20 18:30 * @Modify : 2021/7/20 18:30 */ package wrTrade2 import ( "mtp2_if/global/app" "mtp2_if/global/e" "mtp2_if/logger" "mtp2_if/models" "net/http" "github.com/gin-gonic/gin" ) // QueryOrderQuote // @Summary 查询大厅行情列表 // @Description 仓单交易 wrfactortypeid 唯一确定1条记录, 仓单预售 wrfactortypeid + deliverymonth 唯一确定1条记录 // @Produce json // @Security ApiKeyAuth // @Param page query int false "页码" // @Param pagesize query int false "每页条数" // @Param marketid query int false "仓单贸易市场id" // @Param wrpricetype query int true "价格方式 - 1:固定价 2-浮动价" // @Param haswr query int false "0:仓单预售 1:仓单贸易" // @Param dgitemname query string false "商品要素项名称模糊匹配, 逗号隔开, 如 产地1,品牌1,规格12mm" // @Param warehouseid query int false "仓库id(筛选条件)" // @Param deliverygoodsid query int false "品种id" // @Param wrstandardid query int false "品类id" // @Param brandid query int false "品牌id(dgfactoryitemid)" // @Param yearsid query int false "年份id(dgfactoryitemid)" // @Param wrfactortypeid query string false "仓单要素id" // @Param deliverymonth query string false "交收月(yyyy-mm) 仓单预售填写" // @Success 200 {array} models.WrOrderQuote // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryOrderQuote [get] // @Tags 仓单贸易v2 func QueryOrderQuote(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrOrderQuote{HasWr: -1} a.DoBindReq(&m) a.DoGetDataByPage(&m) } // QueryOrderQuoteDetail // @Summary 查询买卖大厅 // @Produce json // @Security ApiKeyAuth // @Param page query int false "页码" // @Param pagesize query int false "每页条数" // @Param marketid query int false "仓单贸易市场id" // @Param wrpricetype query int true "价格方式 - 1:固定价 2-浮动价" // @Param haswr query int false "0:仓单预售 1:仓单贸易" // @Param wrfactortypeid query int true "仓单要素id" // @Param goodsid query int false "期货商品id(浮动价方式时填)" // @Param buyorsell query int true "买卖方向 0-买 1-卖" // @Param deliverymonth query string false "交收月(yyyy-mm) 查仓单预售的买卖大厅时填写" // @Success 200 {array} models.WrOrderQuoteDetail // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryOrderQuoteDetail [get] // @Tags 仓单贸易v2 func QueryOrderQuoteDetail(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrOrderQuoteDetail{HasWr: -1} a.DoBindReq(&m) a.DoGetDataByPage(&m) } // QueryOrderQuoteMyq // @Summary 查询贸易圈挂牌大厅 // @Description // @Produce json // @Security ApiKeyAuth // @Param page query int false "页码" // @Param pagesize query int false "每页条数" // @Param userid query int true "用户id" // @Param marketid query int false "仓单贸易市场id" // @Param haswr query int false "0:仓单预售 1:仓单贸易" // @Param buyorsell query int true "买卖方向 0-买 1-卖" // @Param deliverygoodsid query int false "品种id" // @Param wrstandardid query int false "品类id" // @Param deliverymonth query string false "交收月(yyyy-mm) 仓单预售填写" // @Param dgitemname query string false "商品要素项名称模糊匹配, 逗号隔开, 如 产地1,品牌1,规格12mm" // @Success 200 {array} models.WrQuoteOrderMyq // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryOrderQuoteMyq [get] // @Tags 仓单贸易v2 func QueryOrderQuoteMyq(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrQuoteOrderMyq{HasWr: -1} a.DoBindReq(&m) a.DoGetDataByPage(&m) } // QueryWrPosition // @Summary 查询现货(预售)仓单持仓 // @Description 页面 现货仓单->现货汇总/库存汇总; 预售仓单->订单汇总 // @Produce json // @Security ApiKeyAuth // @Param userid query int true "用户id" // @Param querytype query int true "查询类型 1-现货汇总 2-库存汇总(订单汇总)" // @Param haswr query int true "0:仓单预售 1:仓单贸易" // @Param dgitemname query string false "商品要素项名称模糊匹配, 逗号隔开, 如 产地1,品牌1,规格12mm" // @Param warehouseid query int false "仓库id(筛选条件)" // @Param deliverygoodsid query int false "品种id" // @Param wrstandardid query int false "品类id" // @Success 200 {array} models.WrPosition // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrPosition [get] // @Tags 仓单贸易v2 func QueryWrPosition(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrPosition{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrOrderDetail // @Summary 查询仓单委托单 // @Description 页面 现货仓单 | 预售仓单 -> 委托单 // @Produce json // @Security ApiKeyAuth // @Param page query int false "页码" // @Param pagesize query int false "每页条数" // @Param userid query int true "用户id" // @Param marketid query int false "仓单贸易市场id" // @Param haswr query int true "0:仓单预售 1:仓单贸易" // @Param bcancel query int false "是否仅查可撤单据 1:可撤 注:此参数仅对当前记录有效, 且不含47模式市场" // @Param wrtradetype query int false "仓单贸易类型 - 1:挂牌 2:摘牌 3:提货卖(文化中国) 4:提货买(文化中国)" // @Param begindate query string false "开始交易日(yyyymmdd)" // @Param enddate query string false "结束交易日(yyyymmdd)" // @Success 200 {array} models.WrOrderDetail // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrOrderDetail [get] // @Tags 仓单贸易v2 func QueryWrOrderDetail(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrOrderDetail{} a.DoBindReq(&m) a.DoGetDataByPage(&m) } // QueryWrSpecialMatchOrder // @Summary 查询指定成交 // @Description 页面 现货仓单 | 预售仓单 -> 指定成交 // @Produce json // @Security ApiKeyAuth // @Param page query int false "页码" // @Param pagesize query int false "每页条数" // @Param userid query int true "用户id" // @Param marketid query int false "仓单贸易市场id" // @Param haswr query int true "0:仓单预售 1:仓单贸易" // @Param isspecified query int false "1:指定好友(贸易圈) 2:指定对手 - [挂牌]" // @Success 200 {array} models.WrSpecialMatchOrder // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrSpecialMatchOrder [get] // @Tags 仓单贸易v2 func QueryWrSpecialMatchOrder(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrSpecialMatchOrder{} a.DoBindReq(&m) a.DoGetDataByPage(&m) } // QueryWrTradeDetail // @Summary 查询仓单成交明细 // @Produce json // @Security ApiKeyAuth // @Param page query int false "页码" // @Param pagesize query int false "每页条数" // @Param userid query int true "用户id" // @Param marketid query int false "仓单贸易市场id" // @Param haswr query int true "0:仓单预售 1:仓单贸易" // @Param begindate query string false "开始交易日(yyyymmdd)" // @Param enddate query string false "结束交易日(yyyymmdd)" // @Success 200 {array} models.WrTradeDetail // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrTradeDetail [get] // @Tags 仓单贸易v2 func QueryWrTradeDetail(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrTradeDetail{} a.DoBindReq(&m) a.DoGetDataByPage(&m) } // QueryWrGoodsInfo // @Summary 查询仓单商品信息 // @Produce json // @Security ApiKeyAuth // @Param marketid query int false "仓单贸易市场id" // @Param haswr query int true "0:仓单预售 1:仓单贸易" // @Param wrfactortypeid query int true "仓单要素id" // @Param tmplateid query int false "履约模板id(如果指定了履约模板id,履约信息将按模板id查, 否则去市场配置表中找模板)" // @Success 200 {array} models.WrGoodsInfo // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrGoodsInfo [get] // @Tags 仓单贸易v2 func QueryWrGoodsInfo(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrGoodsInfo{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryPerformancePlan // @Summary 查询履约信息 // @Produce json // @Security ApiKeyAuth // @Param userid query int true "用户id" // @Param buyorsell query int true "买卖方向 0-买 1-卖" // @Param status query string false "履约状态(可多个,逗号隔开) 1:待激活 2:正常 3:处理错误 4:违约待处理 5:违约处理中 6:完成 7.违约已完成 8:释放冻结失败 9:超时待处理 10:超时关闭" // @Param begindate query string false "开始交易日(yyyymmdd)" // @Param enddate query string false "结束交易日(yyyymmdd)" // @Success 200 {array} models.WrPerformancePlan // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryPerformancePlan [get] // @Tags 仓单贸易v2 func QueryPerformancePlan(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrPerformancePlan{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryHoldLB // @Summary 查询仓单持有记录 // @Description 页面 现货仓单->现货明细? , 表名叫仓单持有记录, 有挂单特有维度,为防误解汇总也有相关维度, 新写接口,不跟汇总合在一起了。 // @Produce json // @Security ApiKeyAuth // @Param accountid query int true "资金账号" // @Param warehouseid query int false "仓库id" // @Param deliverygoodsid query int false "品种id" // @Param wrstandardid query int false "品类id" // @Param wrfactortypeid query int false "仓单要素id" // @Param dgitemname query string false "商品要素项名称模糊匹配, 逗号隔开, 如 产地1,品牌1,规格12mm" // @Success 200 {array} models.WrHoldLB // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryHoldLB [get] // @Tags 仓单贸易v2 func QueryHoldLB(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrHoldLB{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryFilterItem // @Summary 查询筛选框列表 - 作废(以前给pcweb简单筛选框用的,后来改版了) // @Produce json // @Security ApiKeyAuth // @Param itype query string true "类型(可多选,逗号隔开) 1-品种 2-品类(商品) 3-仓库" // @Success 200 {array} models.WrFilterItem // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryFilterItem [get] // @Tags 仓单贸易v2 func QueryFilterItem(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrFilterItem{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryFaProductDetail // @Summary 查询融资产品列表 // @Description 页面 买卖大厅 -> 选择融资方案 // @Produce json // @Security ApiKeyAuth // @Param wrfactortypeid query int true "仓单要素id" // @Success 200 {array} models.WrFAProductDetail // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryFaProductDetail [get] // @Tags 仓单贸易v2 func QueryFaProductDetail(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrFAProductDetail{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrFactorTypeInfo // @Summary 查询仓单要素详细信息 // @Produce json // @Security ApiKeyAuth // @Param wrfactortypeid query int true "仓单要素id" // @Success 200 {array} models.WrFactorTypeInfo // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrFactorTypeInfo [get] // @Tags 仓单贸易v2 func QueryWrFactorTypeInfo(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrFactorTypeInfo{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrFactorTypeInfoEx // @Summary 查询仓单要素详细信息列表项 // @Produce json // @Security ApiKeyAuth // @Param wrfactortypeid query int true "仓单要素id" // @Success 200 {array} models.WrTypeItem // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrFactorTypeInfoEx [get] // @Tags 仓单贸易v2 func QueryWrFactorTypeInfoEx(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrFactorTypeInfoEx{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrMarketTradeConfig // @Summary 查询市场交易参数配置 // @Produce json // @Security ApiKeyAuth // @Param marketid query int false "市场id" // @Success 200 {array} models.WrMarketTradeConfig // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrMarketTradeConfig [get] // @Tags 仓单贸易v2 func QueryWrMarketTradeConfig(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrMarketTradeConfig{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryFtDeliveryGoods // @Summary 查询品种品类筛选框列表 // @Produce json // @Security ApiKeyAuth // @Success 200 {array} models.WrFtDeliveryGoods // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryFtDeliveryGoods [get] // @Tags 仓单贸易v2 func QueryFtDeliveryGoods(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrFtDeliveryGoods{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrStandardFactoryItem // @Summary 查询品类要素定义项 // @Produce json // @Security ApiKeyAuth // @Param wrstandardid query int true "品类id" // @Success 200 {array} models.WrStandardFactoryItemEx // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrStandardFactoryItem [get] // @Tags 仓单贸易v2 func QueryWrStandardFactoryItem(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrStandardFactoryItemEx{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrPerformancePlanStep // @Summary 查询履约信息详情 // @Produce json // @Security ApiKeyAuth // @Param planid query int true "履约计划id(performanceplanid)" // @Param curstepid query int false "当前步骤id" // @Success 200 {array} models.WrPerformancePlanStep // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrPerformancePlanStep [get] // @Tags 仓单贸易v2 func QueryWrPerformancePlanStep(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrPerformancePlanStep{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrFinanceBuyApply // @Summary 查询融资购买申请 // @Description 页面 融资信息+ / 申请单 // @Produce json // @Security ApiKeyAuth // @Param userid query int true "用户id" // @Success 200 {array} models.WrFinanceBuyApply // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrFinanceBuyApply [get] // @Tags 仓单贸易v2 func QueryWrFinanceBuyApply(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrFinanceBuyApply{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrScfContract // @Summary 查询仓单贸易融资合同 // @Produce json // @Security ApiKeyAuth // @Param userid query int true "用户id" // @Param scfcontractid query int false "融资合同id" // @Success 200 {array} models.WrScfContract // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrScfContract [get] // @Tags 仓单贸易v2 func QueryWrScfContract(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrScfContract{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrBuybackDetail // @Summary 查询仓单回购明细 // @Produce json // @Security ApiKeyAuth // @Param scfcontractid query int false "融资合同id" // @Success 200 {array} models.WrBuybackDetail // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrBuybackDetail [get] // @Tags 仓单贸易v2 func QueryWrBuybackDetail(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrBuybackDetail{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrScfContractInterest // @Summary 查询融资合同费用明细 // @Produce json // @Security ApiKeyAuth // @Param scfcontractid query int false "融资合同id" // @Success 200 {array} models.WrScfContractInterest // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrScfContractInterest [get] // @Tags 仓单贸易v2 func QueryWrScfContractInterest(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrScfContractInterest{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrOutInApply // @Summary 查询提货申请 // @Produce json // @Security ApiKeyAuth // @Param page query int false "页码" // @Param pagesize query int false "每页条数" // @Param userid query int true "用户id" // @Param begindate query string false "开始交易日(yyyymmdd)" // @Param enddate query string false "结束交易日(yyyymmdd)" // @Success 200 {array} models.WrOutInApply // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrOutInApply [get] // @Tags 仓单贸易v2 func QueryWrOutInApply(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrOutInApply{} a.DoBindReq(&m) // a.DoGetDataI(&m) a.DoGetDataByPage(&m) } // QueryWrDeliveryDetail // @Summary 查询交收 // @Produce json // @Security ApiKeyAuth // @Param userid query int true "用户id" // @Param accountid query int false "资金账号id" // @Param begindate query string false "开始交易日(yyyymmdd)" // @Param enddate query string false "结束交易日(yyyymmdd)" // @Success 200 {array} models.WrDeliveryDetail // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrDeliveryDetail [get] // @Tags 仓单贸易v2 func QueryWrDeliveryDetail(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrDeliveryDetail{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrBsGoodsInfo // @Summary 查询合约交易买卖大厅详情 // @Description 合约交易/买卖大厅/详情 // @Produce json // @Security ApiKeyAuth // @Param goodsid query int true "商品id" // @Success 200 {array} models.WrBsGoodsInfo // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrBsGoodsInfo [get] // @Tags 仓单贸易v2 func QueryWrBsGoodsInfo(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrBsGoodsInfo{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrTradeOrderDetail // @Summary 查询合约交易买卖大厅 // @Produce json // @Security ApiKeyAuth // @Param page query int false "页码" // @Param pagesize query int false "每页条数" // @Param goodsid query int true "商品id" // @Param buyorsell query int true "买卖方向 0-买 1-卖" // @Success 200 {array} models.WrTradeOrderDetail // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrTradeOrderDetail [get] // @Tags 仓单贸易v2 func QueryWrTradeOrderDetail(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrTradeOrderDetail{} a.DoBindReq(&m) a.DoGetDataByPage(&m) } // QueryWrAverageTradePrice // @Summary 查询成交价(历史走势) // @Produce json // @Security ApiKeyAuth // @Param page query int false "页码" // @Param pagesize query int false "每页条数" // @Param haswr query int true "0:仓单预售 1:仓单贸易" // @Param wrfactortypeid query int true "仓单要素id" // @Success 200 {array} models.WrAverageTradePrice // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrAverageTradePrice [get] // @Tags 仓单贸易v2 func QueryWrAverageTradePrice(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrAverageTradePrice{} a.DoBindReq(&m) a.DoGetDataByPage(&m) } // QueryWrDeliveryAvalidHoldLB // @Summary 查询合约交收可点选仓单 // @Produce json // @Security ApiKeyAuth // @Param accountid query int true "资金账号" // @Param goodsid query int true "商品id" // @Success 200 {array} models.WrDeliveryAvalidHoldLB // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrDeliveryAvalidHoldLB [get] // @Tags 仓单贸易v2 func QueryWrDeliveryAvalidHoldLB(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrDeliveryAvalidHoldLB{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrUserFriend // @Summary 查询我的朋友 // @Produce json // @Security ApiKeyAuth // @Param userid query int true "用户id" // @Param newuserid query int false "新朋友userid, 如果填写了此项则查找新朋友" // @Success 200 {array} models.WrUserFriend // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrUserFriend [get] // @Tags 仓单贸易v2 func QueryWrUserFriend(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrUserFriend{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrFriendApply // @Summary 查询好友申请记录 // @Produce json // @Security ApiKeyAuth // @Param userid query int true "用户id" // @Success 200 {array} models.WrFriendApply // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrFriendApply [get] // @Tags 仓单贸易v2 func QueryWrFriendApply(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrFriendApply{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryPermancePlanTmp // @Summary 查询履约模板 // @Description 返回指定用户的模板和公共模板(用户id为空) // @Description 注意:天津麦顿客户 填写marketid参数,其它参数不用填;其它客户不用填marketid字段 // @Produce json // @Security ApiKeyAuth // @Param userid query int false "用户id" // @Param tmptype query string false "模板类型(逗号隔开), 0:通用 1:交割 2:仓单贸易 3:预售集采 7:竞拍-竞价式 8:竞拍-大宗式 9:荷兰式--失效枚举:4:竞拍-降价式 (无仓单) 5:挂牌期权 6:竞拍-降价式" // @Param includepub query int false "是否包含公共模板(用户id为空的) 1-包含" // @Param marketid query int false "市场id(天津麦顿指定此参数,其它不用)" // @Success 200 {array} models.WrPerformanceTemplateEx // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryPermancePlanTmp [get] // @Tags 仓单贸易v2 func QueryPermancePlanTmp(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrPerformanceTemplateEx{} m.MARKETID = -1 a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrTradeBargainApply // @Summary 查询议价单 // @Description 1.页面 挂单/议价单, 只需传单号就行
2.页面 议价->我的议价 参数 userid=登录userid
3.页面 议价->对方议价 填写matchuserid=登录用户id // @Produce json // @Security ApiKeyAuth // @Param userid query int false "议价人id(摘牌方)" // @Param matchuserid query int false "挂牌方id(查对方议价时,填写此项)" // @Param wrtradeorderid query int false "关联委托单id" // @Param haswr query int true "0:仓单预售 1:仓单贸易" // @Param begindate query string false "开始交易日(yyyymmdd)" // @Param enddate query string false "结束交易日(yyyymmdd)" // @Success 200 {array} models.WRTradeBargainApply // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrTradeBargainApply [get] // @Tags 仓单贸易v2 func QueryWrTradeBargainApply(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WRTradeBargainApply{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrPerformanceStepType // @Summary 查询履约步骤枚举 // @Produce json // @Security ApiKeyAuth // @Success 200 {array} models.WrPerformanceStepType // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrPerformanceStepType [get] // @Tags 仓单贸易v2 func QueryWrPerformanceStepType(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrPerformanceStepType{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrUserReceiptInfo // @Summary 查询发票信息 // @Produce json // @Security ApiKeyAuth // @Param userid query int false "用户id" // @Param receipttype query int false "发票类型 - 1:个人 2:企业" // @Success 200 {array} models.WrUserReceiptInfo // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrUserReceiptInfo [get] // @Tags 仓单贸易v2 func QueryWrUserReceiptInfo(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrUserReceiptInfo{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QuerySiteColumnDetail // @Summary 查询资讯 // @Produce json // @Param page query int false "页码" // @Param pagesize query int false "每页条数" // @Param columnid query int false "所属栏目id" // @Success 200 {array} models.WrSiteColumnDetail // @Failure 500 {object} app.Response // @Router /WrTrade2/QuerySiteColumnDetail [get] // @Tags 仓单贸易v2 func QuerySiteColumnDetail(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrSiteColumnDetail{COLUMNID: -9999999999} a.DoBindReq(&m) a.DoGetDataByPage(&m) } // QuerySiteColumnConfig // @Summary 查询资讯栏目配置 // @Produce json // @Param page query int false "页码" // @Param pagesize query int false "每页条数" // @Param columntype query int false "栏目类型 - 1:行情资讯 10:会员服务 30:关于我们 100:核心企业栏目-百色" // @Success 200 {array} models.Sitecolumnconfig // @Failure 500 {object} app.Response // @Router /WrTrade2/QuerySiteColumnConfig [get] // @Tags 仓单贸易v2 func QuerySiteColumnConfig(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.Sitecolumnconfig{} a.DoBindReq(&m) a.DoGetDataByPage(&m) } // QueryDeliveryGoodsSection // @Summary 查询板块(分类) // @Produce json // @Security ApiKeyAuth // @Success 200 {array} models.WrDeliveryGoodsSection // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryDeliveryGoodsSection [get] // @Tags 仓单贸易v2 func QueryDeliveryGoodsSection(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrDeliveryGoodsSection{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QuerySpotGroupTradeSum // @Summary 查询指数 // @Produce json // @Security ApiKeyAuth // @Success 200 {array} models.WrSpotGroupTradeSumEx // @Failure 500 {object} app.Response // @Router /WrTrade2/QuerySpotGroupTradeSum [get] // @Tags 仓单贸易v2 func QuerySpotGroupTradeSum(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrSpotGroupTradeSumEx{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QuerySpotGroupTradeSumDetail // @Summary 查询指数详细(价格走势图) // @Description 查询的结果将会按日期 从小到大 排序 // @Produce json // @Security ApiKeyAuth // @param deliverygoodsid query int true "现货商品id" // @param lastnum query int false "查询最新多少条记录(如不填写此项, 默认查30条)" // @Success 200 {array} models.WrSpotGroupTradeSumDetail // @Failure 500 {object} app.Response // @Router /WrTrade2/QuerySpotGroupTradeSumDetail [get] // @Tags 仓单贸易v2 func QuerySpotGroupTradeSumDetail(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrSpotGroupTradeSumDetail{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrPreSaleInfo // @Summary 查询新品发布 // @Produce json // @Security ApiKeyAuth // @param marketid query int false "市场id" // @param presalestatus query string false "预售状态(逗号隔开,如1,2,3) 1:未开始 2:进行中 3:已结束 4:已关闭" // @param lotteryflag query int false "摇号标识 - 0:未摇号 1:已摇号" // @param lastnum query int false "最近多少条记录(按创建时间倒序)" // @Success 200 {array} models.WrPreSaleInfo // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrPreSaleInfo [get] // @Tags 仓单贸易v2 func QueryWrPreSaleInfo(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrPreSaleInfo{LOTTERYFLAG: -1} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrReckonSpotGoodsTradeSum // @Summary 查询价格走势 // @Produce json // @Security ApiKeyAuth // @param marketid query int true "市场id" // @param wrstandardid query int true "现货商品id" // @Param begindate query string false "开始交易日(yyyymmdd)" // @Param enddate query string false "结束交易日(yyyymmdd)" // @param lastnum query int false "最近多少条记录(按交易日倒序)" // @param istoday query bool false "是否今日" // @Success 200 {array} models.WrReckonSpotGoodsTradeSum // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrReckonSpotGoodsTradeSum [get] // @Tags 仓单贸易v2 func QueryWrReckonSpotGoodsTradeSum(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrReckonSpotGoodsTradeSum{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrSearchUser // @Summary 查询用户 // @Produce json // @Security ApiKeyAuth // @param username query string true "用户名称(模糊匹配)" // @Success 200 {array} models.WrSearchUser // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrSearchUser [get] // @Tags 仓单贸易v2 func QueryWrSearchUser(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrSearchUser{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrDraftUserInfo // @Summary 查询实名认证信息 // @Produce json // @Security ApiKeyAuth // @Param userid query int true "用户ID" // @Param userstatus query int false "用户状态 1:正常 2:注销" // @Success 200 {array} models.WrDraftUserInfo // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrDraftUserInfo [get] // @Tags 仓单贸易v2 func QueryWrDraftUserInfo(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrDraftUserInfo{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrBrandAndYears // @Summary 查询品牌和年份 // @Produce json // @Security ApiKeyAuth // @Success 200 {array} models.WrBrandAndYears // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrBrandAndYears [get] // @Tags 仓单贸易v2 func QueryWrBrandAndYears(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrBrandAndYears{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrClientAdSpaceConfig // @Summary 查询固定广告配置 // @Produce json // @Security ApiKeyAuth // @Success 200 {array} models.WrClientAdSpaceConfig // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrClientAdSpaceConfig [get] // @Tags 仓单贸易v2 func QueryWrClientAdSpaceConfig(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrClientAdSpaceConfig{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryXhcpSellBackApply // @Summary 查询我的回收申请(新会陈皮) // @Produce json // @Security ApiKeyAuth // @Param userid query int true "用户ID" // @Success 200 {array} models.Xhcpsellbackapply // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryXhcpSellBackApply [get] // @Tags 仓单贸易v2 func QueryXhcpSellBackApply(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.Xhcpsellbackapply{} a.DoBindReq(&m) a.DoGetDataI(&m) } // InsertXhcpSellBackApply // @Summary 新增回收申请(新会陈皮) // @Produce json // @Security ApiKeyAuth // @Param jsonBody body models.XhcpSellBackApplyEx true "回收申请" // @Success 200 {object} app.Response // @Failure 500 {object} app.Response // @Router /WrTrade2/InsertXhcpSellBackApply [post] // @Tags 仓单贸易v2 func InsertXhcpSellBackApply(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.XhcpSellBackApplyEx{} a.DoBindReq(&m) if err := m.Insert(); err == nil { a.Response(http.StatusOK, e.SUCCESS, "OK") } else { logger.GetLogger().Errorf("insert fail, %v", err) a.Response(http.StatusBadRequest, e.ERROR_OPERATION_FAILED, nil) } } // QueryWrTradeQuote // @Summary 查询仓单贸易成交行情 // @Produce json // @Security ApiKeyAuth // @param wrstandardid query int true "现货商品id" // @Param begindate query string true "开始日期(yyyymmdd)" // @Param enddate query string true "结束日期(yyyymmdd)" // @param marketid query int false "市场id" // @Success 200 {array} models.Wrtradetradequote // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrTradeQuote [get] // @Tags 仓单贸易v2 func QueryWrTradeQuote(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.Wrtradetradequote1{} a.DoBindReq(&m) a.DoGetDataI(&m) }