| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888 |
- /**
- * @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 int 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 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)
- }
- // 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.页面 挂单/议价单, 只需传单号就行 <br>2.页面 议价->我的议价 参数 userid=登录userid <br>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
- // @Security ApiKeyAuth
- // @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)
- }
- // 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.Wrtradetradequote{}
- a.DoBindReq(&m)
- a.DoGetDataI(&m)
- }
|