qryWrTrade.go 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795
  1. /**
  2. * @Author: zou.yingbin
  3. * @Create : 2021/7/20 18:30
  4. * @Modify : 2021/7/20 18:30
  5. */
  6. package wrTrade2
  7. import (
  8. "mtp2_if/global/app"
  9. "mtp2_if/models"
  10. "github.com/gin-gonic/gin"
  11. )
  12. // QueryOrderQuote
  13. // @Summary 查询大厅行情列表
  14. // @Description 仓单交易 wrfactortypeid 唯一确定1条记录, 仓单预售 wrfactortypeid + deliverymonth 唯一确定1条记录
  15. // @Produce json
  16. // @Security ApiKeyAuth
  17. // @Param page query int false "页码"
  18. // @Param pagesize query int false "每页条数"
  19. // @Param marketid query int false "仓单贸易市场id"
  20. // @Param wrpricetype query int true "价格方式 - 1:固定价 2-浮动价"
  21. // @Param haswr query int false "0:仓单预售 1:仓单贸易"
  22. // @Param dgitemname query string false "商品要素项名称模糊匹配, 逗号隔开, 如 产地1,品牌1,规格12mm"
  23. // @Param warehouseid query int false "仓库id(筛选条件)"
  24. // @Param deliverygoodsid query int false "品种id"
  25. // @Param wrstandardid query int false "品类id"
  26. // @Param wrfactortypeid query int false "仓单要素id"
  27. // @Param deliverymonth query string false "交收月(yyyy-mm) 仓单预售填写"
  28. // @Success 200 {array} models.WrOrderQuote
  29. // @Failure 500 {object} app.Response
  30. // @Router /WrTrade2/QueryOrderQuote [get]
  31. // @Tags 仓单贸易v2
  32. func QueryOrderQuote(c *gin.Context) {
  33. a := app.GinUtils{Gin: app.Gin{C: c}}
  34. m := models.WrOrderQuote{HasWr: -1}
  35. a.DoBindReq(&m)
  36. a.DoGetDataByPage(&m)
  37. }
  38. // QueryOrderQuoteDetail
  39. // @Summary 查询买卖大厅
  40. // @Produce json
  41. // @Security ApiKeyAuth
  42. // @Param page query int false "页码"
  43. // @Param pagesize query int false "每页条数"
  44. // @Param marketid query int false "仓单贸易市场id"
  45. // @Param wrpricetype query int true "价格方式 - 1:固定价 2-浮动价"
  46. // @Param haswr query int false "0:仓单预售 1:仓单贸易"
  47. // @Param wrfactortypeid query int true "仓单要素id"
  48. // @Param goodsid query int false "期货商品id(浮动价方式时填)"
  49. // @Param buyorsell query int true "买卖方向 0-买 1-卖"
  50. // @Param deliverymonth query string false "交收月(yyyy-mm) 查仓单预售的买卖大厅时填写"
  51. // @Success 200 {array} models.WrOrderQuoteDetail
  52. // @Failure 500 {object} app.Response
  53. // @Router /WrTrade2/QueryOrderQuoteDetail [get]
  54. // @Tags 仓单贸易v2
  55. func QueryOrderQuoteDetail(c *gin.Context) {
  56. a := app.GinUtils{Gin: app.Gin{C: c}}
  57. m := models.WrOrderQuoteDetail{HasWr: -1}
  58. a.DoBindReq(&m)
  59. a.DoGetDataByPage(&m)
  60. }
  61. // QueryOrderQuoteMyq
  62. // @Summary 查询贸易圈挂牌大厅
  63. // @Description
  64. // @Produce json
  65. // @Security ApiKeyAuth
  66. // @Param page query int false "页码"
  67. // @Param pagesize query int false "每页条数"
  68. // @Param userid query int true "用户id"
  69. // @Param marketid query int false "仓单贸易市场id"
  70. // @Param haswr query int false "0:仓单预售 1:仓单贸易"
  71. // @Param buyorsell query int true "买卖方向 0-买 1-卖"
  72. // @Param deliverygoodsid query int false "品种id"
  73. // @Param wrstandardid query int false "品类id"
  74. // @Param deliverymonth query string false "交收月(yyyy-mm) 仓单预售填写"
  75. // @Param dgitemname query string false "商品要素项名称模糊匹配, 逗号隔开, 如 产地1,品牌1,规格12mm"
  76. // @Success 200 {array} models.WrQuoteOrderMyq
  77. // @Failure 500 {object} app.Response
  78. // @Router /WrTrade2/QueryOrderQuoteMyq [get]
  79. // @Tags 仓单贸易v2
  80. func QueryOrderQuoteMyq(c *gin.Context) {
  81. a := app.GinUtils{Gin: app.Gin{C: c}}
  82. m := models.WrQuoteOrderMyq{HasWr: -1}
  83. a.DoBindReq(&m)
  84. a.DoGetDataByPage(&m)
  85. }
  86. // QueryWrPosition
  87. // @Summary 查询现货(预售)仓单持仓
  88. // @Description 页面 现货仓单->现货汇总/库存汇总; 预售仓单->订单汇总
  89. // @Produce json
  90. // @Security ApiKeyAuth
  91. // @Param userid query int true "用户id"
  92. // @Param querytype query int true "查询类型 1-现货汇总 2-库存汇总(订单汇总)"
  93. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  94. // @Param dgitemname query string false "商品要素项名称模糊匹配, 逗号隔开, 如 产地1,品牌1,规格12mm"
  95. // @Param warehouseid query int false "仓库id(筛选条件)"
  96. // @Param deliverygoodsid query int false "品种id"
  97. // @Param wrstandardid query int false "品类id"
  98. // @Success 200 {array} models.WrPosition
  99. // @Failure 500 {object} app.Response
  100. // @Router /WrTrade2/QueryWrPosition [get]
  101. // @Tags 仓单贸易v2
  102. func QueryWrPosition(c *gin.Context) {
  103. a := app.GinUtils{Gin: app.Gin{C: c}}
  104. m := models.WrPosition{}
  105. a.DoBindReq(&m)
  106. a.DoGetDataI(&m)
  107. }
  108. // QueryWrOrderDetail
  109. // @Summary 查询仓单委托单
  110. // @Description 页面 现货仓单 | 预售仓单 -> 委托单
  111. // @Produce json
  112. // @Security ApiKeyAuth
  113. // @Param page query int false "页码"
  114. // @Param pagesize query int false "每页条数"
  115. // @Param userid query int true "用户id"
  116. // @Param marketid query int false "仓单贸易市场id"
  117. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  118. // @Param bcancel query int false "是否仅查可撤单据 1:可撤 注:此参数仅对当前记录有效, 且不含47模式市场"
  119. // @Param wrtradetype query int false "仓单贸易类型 - 1:挂牌 2:摘牌 3:提货卖(文化中国) 4:提货买(文化中国)"
  120. // @Param begindate query string false "开始交易日(yyyymmdd)"
  121. // @Param enddate query string false "结束交易日(yyyymmdd)"
  122. // @Success 200 {array} models.WrOrderDetail
  123. // @Failure 500 {object} app.Response
  124. // @Router /WrTrade2/QueryWrOrderDetail [get]
  125. // @Tags 仓单贸易v2
  126. func QueryWrOrderDetail(c *gin.Context) {
  127. a := app.GinUtils{Gin: app.Gin{C: c}}
  128. m := models.WrOrderDetail{}
  129. a.DoBindReq(&m)
  130. a.DoGetDataByPage(&m)
  131. }
  132. // QueryWrSpecialMatchOrder
  133. // @Summary 查询指定成交
  134. // @Description 页面 现货仓单 | 预售仓单 -> 指定成交
  135. // @Produce json
  136. // @Security ApiKeyAuth
  137. // @Param page query int false "页码"
  138. // @Param pagesize query int false "每页条数"
  139. // @Param userid query int true "用户id"
  140. // @Param marketid query int false "仓单贸易市场id"
  141. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  142. // @Param isspecified query int false "1:指定好友(贸易圈) 2:指定对手 - [挂牌]"
  143. // @Success 200 {array} models.WrSpecialMatchOrder
  144. // @Failure 500 {object} app.Response
  145. // @Router /WrTrade2/QueryWrSpecialMatchOrder [get]
  146. // @Tags 仓单贸易v2
  147. func QueryWrSpecialMatchOrder(c *gin.Context) {
  148. a := app.GinUtils{Gin: app.Gin{C: c}}
  149. m := models.WrSpecialMatchOrder{}
  150. a.DoBindReq(&m)
  151. a.DoGetDataByPage(&m)
  152. }
  153. // QueryWrTradeDetail
  154. // @Summary 查询仓单成交明细
  155. // @Produce json
  156. // @Security ApiKeyAuth
  157. // @Param page query int false "页码"
  158. // @Param pagesize query int false "每页条数"
  159. // @Param userid query int true "用户id"
  160. // @Param marketid query int false "仓单贸易市场id"
  161. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  162. // @Param begindate query string false "开始交易日(yyyymmdd)"
  163. // @Param enddate query string false "结束交易日(yyyymmdd)"
  164. // @Success 200 {array} models.WrTradeDetail
  165. // @Failure 500 {object} app.Response
  166. // @Router /WrTrade2/QueryWrTradeDetail [get]
  167. // @Tags 仓单贸易v2
  168. func QueryWrTradeDetail(c *gin.Context) {
  169. a := app.GinUtils{Gin: app.Gin{C: c}}
  170. m := models.WrTradeDetail{}
  171. a.DoBindReq(&m)
  172. a.DoGetDataByPage(&m)
  173. }
  174. // QueryWrGoodsInfo
  175. // @Summary 查询仓单商品信息
  176. // @Produce json
  177. // @Security ApiKeyAuth
  178. // @Param marketid query int false "仓单贸易市场id"
  179. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  180. // @Param wrfactortypeid query int true "仓单要素id"
  181. // @Param tmplateid query int false "履约模板id(如果指定了履约模板id,履约信息将按模板id查, 否则去市场配置表中找模板)"
  182. // @Success 200 {array} models.WrGoodsInfo
  183. // @Failure 500 {object} app.Response
  184. // @Router /WrTrade2/QueryWrGoodsInfo [get]
  185. // @Tags 仓单贸易v2
  186. func QueryWrGoodsInfo(c *gin.Context) {
  187. a := app.GinUtils{Gin: app.Gin{C: c}}
  188. m := models.WrGoodsInfo{}
  189. a.DoBindReq(&m)
  190. a.DoGetDataI(&m)
  191. }
  192. // QueryPerformancePlan
  193. // @Summary 查询履约信息
  194. // @Produce json
  195. // @Security ApiKeyAuth
  196. // @Param userid query int true "用户id"
  197. // @Param buyorsell query int true "买卖方向 0-买 1-卖"
  198. // @Param status query string false "履约状态(可多个,逗号隔开) 1:待激活 2:正常 3:处理错误 4:违约待处理 5:违约处理中 6:完成 7.违约已完成 8:释放冻结失败 9:超时待处理 10:超时关闭"
  199. // @Param begindate query string false "开始交易日(yyyymmdd)"
  200. // @Param enddate query string false "结束交易日(yyyymmdd)"
  201. // @Success 200 {array} models.WrPerformancePlan
  202. // @Failure 500 {object} app.Response
  203. // @Router /WrTrade2/QueryPerformancePlan [get]
  204. // @Tags 仓单贸易v2
  205. func QueryPerformancePlan(c *gin.Context) {
  206. a := app.GinUtils{Gin: app.Gin{C: c}}
  207. m := models.WrPerformancePlan{}
  208. a.DoBindReq(&m)
  209. a.DoGetDataI(&m)
  210. }
  211. // QueryHoldLB
  212. // @Summary 查询仓单持有记录
  213. // @Description 页面 现货仓单->现货明细? , 表名叫仓单持有记录, 有挂单特有维度,为防误解汇总也有相关维度, 新写接口,不跟汇总合在一起了。
  214. // @Produce json
  215. // @Security ApiKeyAuth
  216. // @Param accountid query int true "资金账号"
  217. // @Param warehouseid query int false "仓库id"
  218. // @Param deliverygoodsid query int false "品种id"
  219. // @Param wrstandardid query int false "品类id"
  220. // @Param wrfactortypeid query int false "仓单要素id"
  221. // @Param dgitemname query string false "商品要素项名称模糊匹配, 逗号隔开, 如 产地1,品牌1,规格12mm"
  222. // @Success 200 {array} models.WrHoldLB
  223. // @Failure 500 {object} app.Response
  224. // @Router /WrTrade2/QueryHoldLB [get]
  225. // @Tags 仓单贸易v2
  226. func QueryHoldLB(c *gin.Context) {
  227. a := app.GinUtils{Gin: app.Gin{C: c}}
  228. m := models.WrHoldLB{}
  229. a.DoBindReq(&m)
  230. a.DoGetDataI(&m)
  231. }
  232. // QueryFilterItem
  233. // @Summary 查询筛选框列表 - 作废(以前给pcweb简单筛选框用的,后来改版了)
  234. // @Produce json
  235. // @Security ApiKeyAuth
  236. // @Param itype query string true "类型(可多选,逗号隔开) 1-品种 2-品类(商品) 3-仓库"
  237. // @Success 200 {array} models.WrFilterItem
  238. // @Failure 500 {object} app.Response
  239. // @Router /WrTrade2/QueryFilterItem [get]
  240. // @Tags 仓单贸易v2
  241. func QueryFilterItem(c *gin.Context) {
  242. a := app.GinUtils{Gin: app.Gin{C: c}}
  243. m := models.WrFilterItem{}
  244. a.DoBindReq(&m)
  245. a.DoGetDataI(&m)
  246. }
  247. // QueryFaProductDetail
  248. // @Summary 查询融资产品列表
  249. // @Description 页面 买卖大厅 -> 选择融资方案
  250. // @Produce json
  251. // @Security ApiKeyAuth
  252. // @Param wrfactortypeid query int true "仓单要素id"
  253. // @Success 200 {array} models.WrFAProductDetail
  254. // @Failure 500 {object} app.Response
  255. // @Router /WrTrade2/QueryFaProductDetail [get]
  256. // @Tags 仓单贸易v2
  257. func QueryFaProductDetail(c *gin.Context) {
  258. a := app.GinUtils{Gin: app.Gin{C: c}}
  259. m := models.WrFAProductDetail{}
  260. a.DoBindReq(&m)
  261. a.DoGetDataI(&m)
  262. }
  263. // QueryWrFactorTypeInfo
  264. // @Summary 查询仓单要素详细信息
  265. // @Produce json
  266. // @Security ApiKeyAuth
  267. // @Param wrfactortypeid query int true "仓单要素id"
  268. // @Success 200 {array} models.WrFactorTypeInfo
  269. // @Failure 500 {object} app.Response
  270. // @Router /WrTrade2/QueryWrFactorTypeInfo [get]
  271. // @Tags 仓单贸易v2
  272. func QueryWrFactorTypeInfo(c *gin.Context) {
  273. a := app.GinUtils{Gin: app.Gin{C: c}}
  274. m := models.WrFactorTypeInfo{}
  275. a.DoBindReq(&m)
  276. a.DoGetDataI(&m)
  277. }
  278. // QueryWrFactorTypeInfoEx
  279. // @Summary 查询仓单要素详细信息列表项
  280. // @Produce json
  281. // @Security ApiKeyAuth
  282. // @Param wrfactortypeid query int true "仓单要素id"
  283. // @Success 200 {array} models.WrTypeItem
  284. // @Failure 500 {object} app.Response
  285. // @Router /WrTrade2/QueryWrFactorTypeInfoEx [get]
  286. // @Tags 仓单贸易v2
  287. func QueryWrFactorTypeInfoEx(c *gin.Context) {
  288. a := app.GinUtils{Gin: app.Gin{C: c}}
  289. m := models.WrFactorTypeInfoEx{}
  290. a.DoBindReq(&m)
  291. a.DoGetDataI(&m)
  292. }
  293. // QueryWrMarketTradeConfig
  294. // @Summary 查询市场交易参数配置
  295. // @Produce json
  296. // @Security ApiKeyAuth
  297. // @Param marketid query int false "市场id"
  298. // @Success 200 {array} models.WrMarketTradeConfig
  299. // @Failure 500 {object} app.Response
  300. // @Router /WrTrade2/QueryWrMarketTradeConfig [get]
  301. // @Tags 仓单贸易v2
  302. func QueryWrMarketTradeConfig(c *gin.Context) {
  303. a := app.GinUtils{Gin: app.Gin{C: c}}
  304. m := models.WrMarketTradeConfig{}
  305. a.DoBindReq(&m)
  306. a.DoGetDataI(&m)
  307. }
  308. // QueryFtDeliveryGoods
  309. // @Summary 查询品种品类筛选框列表
  310. // @Produce json
  311. // @Security ApiKeyAuth
  312. // @Success 200 {array} models.WrFtDeliveryGoods
  313. // @Failure 500 {object} app.Response
  314. // @Router /WrTrade2/QueryFtDeliveryGoods [get]
  315. // @Tags 仓单贸易v2
  316. func QueryFtDeliveryGoods(c *gin.Context) {
  317. a := app.GinUtils{Gin: app.Gin{C: c}}
  318. m := models.WrFtDeliveryGoods{}
  319. a.DoBindReq(&m)
  320. a.DoGetDataI(&m)
  321. }
  322. // QueryWrStandardFactoryItem
  323. // @Summary 查询品类要素定义项
  324. // @Produce json
  325. // @Security ApiKeyAuth
  326. // @Param wrstandardid query int true "品类id"
  327. // @Success 200 {array} models.WrStandardFactoryItemEx
  328. // @Failure 500 {object} app.Response
  329. // @Router /WrTrade2/QueryWrStandardFactoryItem [get]
  330. // @Tags 仓单贸易v2
  331. func QueryWrStandardFactoryItem(c *gin.Context) {
  332. a := app.GinUtils{Gin: app.Gin{C: c}}
  333. m := models.WrStandardFactoryItemEx{}
  334. a.DoBindReq(&m)
  335. a.DoGetDataI(&m)
  336. }
  337. // QueryWrPerformancePlanStep
  338. // @Summary 查询履约信息详情
  339. // @Produce json
  340. // @Security ApiKeyAuth
  341. // @Param planid query int true "履约计划id(performanceplanid)"
  342. // @Param curstepid query int false "当前步骤id"
  343. // @Success 200 {array} models.WrPerformancePlanStep
  344. // @Failure 500 {object} app.Response
  345. // @Router /WrTrade2/QueryWrPerformancePlanStep [get]
  346. // @Tags 仓单贸易v2
  347. func QueryWrPerformancePlanStep(c *gin.Context) {
  348. a := app.GinUtils{Gin: app.Gin{C: c}}
  349. m := models.WrPerformancePlanStep{}
  350. a.DoBindReq(&m)
  351. a.DoGetDataI(&m)
  352. }
  353. // QueryWrFinanceBuyApply
  354. // @Summary 查询融资购买申请
  355. // @Description 页面 融资信息+ / 申请单
  356. // @Produce json
  357. // @Security ApiKeyAuth
  358. // @Param userid query int true "用户id"
  359. // @Success 200 {array} models.WrFinanceBuyApply
  360. // @Failure 500 {object} app.Response
  361. // @Router /WrTrade2/QueryWrFinanceBuyApply [get]
  362. // @Tags 仓单贸易v2
  363. func QueryWrFinanceBuyApply(c *gin.Context) {
  364. a := app.GinUtils{Gin: app.Gin{C: c}}
  365. m := models.WrFinanceBuyApply{}
  366. a.DoBindReq(&m)
  367. a.DoGetDataI(&m)
  368. }
  369. // QueryWrScfContract
  370. // @Summary 查询仓单贸易融资合同
  371. // @Produce json
  372. // @Security ApiKeyAuth
  373. // @Param userid query int true "用户id"
  374. // @Param scfcontractid query int false "融资合同id"
  375. // @Success 200 {array} models.WrScfContract
  376. // @Failure 500 {object} app.Response
  377. // @Router /WrTrade2/QueryWrScfContract [get]
  378. // @Tags 仓单贸易v2
  379. func QueryWrScfContract(c *gin.Context) {
  380. a := app.GinUtils{Gin: app.Gin{C: c}}
  381. m := models.WrScfContract{}
  382. a.DoBindReq(&m)
  383. a.DoGetDataI(&m)
  384. }
  385. // QueryWrBuybackDetail
  386. // @Summary 查询仓单回购明细
  387. // @Produce json
  388. // @Security ApiKeyAuth
  389. // @Param scfcontractid query int false "融资合同id"
  390. // @Success 200 {array} models.WrBuybackDetail
  391. // @Failure 500 {object} app.Response
  392. // @Router /WrTrade2/QueryWrBuybackDetail [get]
  393. // @Tags 仓单贸易v2
  394. func QueryWrBuybackDetail(c *gin.Context) {
  395. a := app.GinUtils{Gin: app.Gin{C: c}}
  396. m := models.WrBuybackDetail{}
  397. a.DoBindReq(&m)
  398. a.DoGetDataI(&m)
  399. }
  400. // QueryWrScfContractInterest
  401. // @Summary 查询融资合同费用明细
  402. // @Produce json
  403. // @Security ApiKeyAuth
  404. // @Param scfcontractid query int false "融资合同id"
  405. // @Success 200 {array} models.WrScfContractInterest
  406. // @Failure 500 {object} app.Response
  407. // @Router /WrTrade2/QueryWrScfContractInterest [get]
  408. // @Tags 仓单贸易v2
  409. func QueryWrScfContractInterest(c *gin.Context) {
  410. a := app.GinUtils{Gin: app.Gin{C: c}}
  411. m := models.WrScfContractInterest{}
  412. a.DoBindReq(&m)
  413. a.DoGetDataI(&m)
  414. }
  415. // QueryWrOutInApply
  416. // @Summary 查询提货申请
  417. // @Produce json
  418. // @Security ApiKeyAuth
  419. // @Param userid query int true "用户id"
  420. // @Param begindate query string false "开始交易日(yyyymmdd)"
  421. // @Param enddate query string false "结束交易日(yyyymmdd)"
  422. // @Success 200 {array} models.WrOutInApply
  423. // @Failure 500 {object} app.Response
  424. // @Router /WrTrade2/QueryWrOutInApply [get]
  425. // @Tags 仓单贸易v2
  426. func QueryWrOutInApply(c *gin.Context) {
  427. a := app.GinUtils{Gin: app.Gin{C: c}}
  428. m := models.WrOutInApply{}
  429. a.DoBindReq(&m)
  430. a.DoGetDataI(&m)
  431. }
  432. // QueryWrDeliveryDetail
  433. // @Summary 查询交收
  434. // @Produce json
  435. // @Security ApiKeyAuth
  436. // @Param userid query int true "用户id"
  437. // @Param accountid query int false "资金账号id"
  438. // @Param begindate query string false "开始交易日(yyyymmdd)"
  439. // @Param enddate query string false "结束交易日(yyyymmdd)"
  440. // @Success 200 {array} models.WrDeliveryDetail
  441. // @Failure 500 {object} app.Response
  442. // @Router /WrTrade2/QueryWrDeliveryDetail [get]
  443. // @Tags 仓单贸易v2
  444. func QueryWrDeliveryDetail(c *gin.Context) {
  445. a := app.GinUtils{Gin: app.Gin{C: c}}
  446. m := models.WrDeliveryDetail{}
  447. a.DoBindReq(&m)
  448. a.DoGetDataI(&m)
  449. }
  450. // QueryWrBsGoodsInfo
  451. // @Summary 查询合约交易买卖大厅详情
  452. // @Description 合约交易/买卖大厅/详情
  453. // @Produce json
  454. // @Security ApiKeyAuth
  455. // @Param goodsid query int true "商品id"
  456. // @Success 200 {array} models.WrBsGoodsInfo
  457. // @Failure 500 {object} app.Response
  458. // @Router /WrTrade2/QueryWrBsGoodsInfo [get]
  459. // @Tags 仓单贸易v2
  460. func QueryWrBsGoodsInfo(c *gin.Context) {
  461. a := app.GinUtils{Gin: app.Gin{C: c}}
  462. m := models.WrBsGoodsInfo{}
  463. a.DoBindReq(&m)
  464. a.DoGetDataI(&m)
  465. }
  466. // QueryWrTradeOrderDetail
  467. // @Summary 查询合约交易买卖大厅
  468. // @Produce json
  469. // @Security ApiKeyAuth
  470. // @Param page query int false "页码"
  471. // @Param pagesize query int false "每页条数"
  472. // @Param goodsid query int true "商品id"
  473. // @Param buyorsell query int true "买卖方向 0-买 1-卖"
  474. // @Success 200 {array} models.WrTradeOrderDetail
  475. // @Failure 500 {object} app.Response
  476. // @Router /WrTrade2/QueryWrTradeOrderDetail [get]
  477. // @Tags 仓单贸易v2
  478. func QueryWrTradeOrderDetail(c *gin.Context) {
  479. a := app.GinUtils{Gin: app.Gin{C: c}}
  480. m := models.WrTradeOrderDetail{}
  481. a.DoBindReq(&m)
  482. a.DoGetDataByPage(&m)
  483. }
  484. // QueryWrAverageTradePrice
  485. // @Summary 查询成交价(历史走势)
  486. // @Produce json
  487. // @Security ApiKeyAuth
  488. // @Param page query int false "页码"
  489. // @Param pagesize query int false "每页条数"
  490. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  491. // @Param wrfactortypeid query int true "仓单要素id"
  492. // @Success 200 {array} models.WrAverageTradePrice
  493. // @Failure 500 {object} app.Response
  494. // @Router /WrTrade2/QueryWrAverageTradePrice [get]
  495. // @Tags 仓单贸易v2
  496. func QueryWrAverageTradePrice(c *gin.Context) {
  497. a := app.GinUtils{Gin: app.Gin{C: c}}
  498. m := models.WrAverageTradePrice{}
  499. a.DoBindReq(&m)
  500. a.DoGetDataByPage(&m)
  501. }
  502. // QueryWrDeliveryAvalidHoldLB
  503. // @Summary 查询合约交收可点选仓单
  504. // @Produce json
  505. // @Security ApiKeyAuth
  506. // @Param accountid query int true "资金账号"
  507. // @Param goodsid query int true "商品id"
  508. // @Success 200 {array} models.WrDeliveryAvalidHoldLB
  509. // @Failure 500 {object} app.Response
  510. // @Router /WrTrade2/QueryWrDeliveryAvalidHoldLB [get]
  511. // @Tags 仓单贸易v2
  512. func QueryWrDeliveryAvalidHoldLB(c *gin.Context) {
  513. a := app.GinUtils{Gin: app.Gin{C: c}}
  514. m := models.WrDeliveryAvalidHoldLB{}
  515. a.DoBindReq(&m)
  516. a.DoGetDataI(&m)
  517. }
  518. // QueryWrUserFriend
  519. // @Summary 查询我的朋友
  520. // @Produce json
  521. // @Security ApiKeyAuth
  522. // @Param userid query int true "用户id"
  523. // @Param newuserid query int false "新朋友userid, 如果填写了此项则查找新朋友"
  524. // @Success 200 {array} models.WrUserFriend
  525. // @Failure 500 {object} app.Response
  526. // @Router /WrTrade2/QueryWrUserFriend [get]
  527. // @Tags 仓单贸易v2
  528. func QueryWrUserFriend(c *gin.Context) {
  529. a := app.GinUtils{Gin: app.Gin{C: c}}
  530. m := models.WrUserFriend{}
  531. a.DoBindReq(&m)
  532. a.DoGetDataI(&m)
  533. }
  534. // QueryWrFriendApply
  535. // @Summary 查询好友申请记录
  536. // @Produce json
  537. // @Security ApiKeyAuth
  538. // @Param userid query int true "用户id"
  539. // @Success 200 {array} models.WrFriendApply
  540. // @Failure 500 {object} app.Response
  541. // @Router /WrTrade2/QueryWrFriendApply [get]
  542. // @Tags 仓单贸易v2
  543. func QueryWrFriendApply(c *gin.Context) {
  544. a := app.GinUtils{Gin: app.Gin{C: c}}
  545. m := models.WrFriendApply{}
  546. a.DoBindReq(&m)
  547. a.DoGetDataI(&m)
  548. }
  549. // QueryPermancePlanTmp
  550. // @Summary 查询履约模板
  551. // @Description 返回指定用户的模板和公共模板(用户id为空)
  552. // @Description 注意:天津麦顿客户 填写marketid参数,其它参数不用填;其它客户不用填marketid字段
  553. // @Produce json
  554. // @Security ApiKeyAuth
  555. // @Param userid query int false "用户id"
  556. // @Param tmptype query string false "模板类型(逗号隔开), 0:通用 1:交割 2:仓单贸易 3:预售集采 7:竞拍-竞价式 8:竞拍-大宗式 9:荷兰式--失效枚举:4:竞拍-降价式 (无仓单) 5:挂牌期权 6:竞拍-降价式"
  557. // @Param includepub query int false "是否包含公共模板(用户id为空的) 1-包含"
  558. // @Param marketid query int false "市场id(天津麦顿指定此参数,其它不用)"
  559. // @Success 200 {array} models.WrPerformanceTemplateEx
  560. // @Failure 500 {object} app.Response
  561. // @Router /WrTrade2/QueryPermancePlanTmp [get]
  562. // @Tags 仓单贸易v2
  563. func QueryPermancePlanTmp(c *gin.Context) {
  564. a := app.GinUtils{Gin: app.Gin{C: c}}
  565. m := models.WrPerformanceTemplateEx{}
  566. m.MARKETID = -1
  567. a.DoBindReq(&m)
  568. a.DoGetDataI(&m)
  569. }
  570. // QueryWrTradeBargainApply
  571. // @Summary 查询议价单
  572. // @Description 1.页面 挂单/议价单, 只需传单号就行 <br>2.页面 议价->我的议价 参数 userid=登录userid <br>3.页面 议价->对方议价 填写matchuserid=登录用户id
  573. // @Produce json
  574. // @Security ApiKeyAuth
  575. // @Param userid query int false "议价人id(摘牌方)"
  576. // @Param matchuserid query int false "挂牌方id(查对方议价时,填写此项)"
  577. // @Param wrtradeorderid query int false "关联委托单id"
  578. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  579. // @Param begindate query string false "开始交易日(yyyymmdd)"
  580. // @Param enddate query string false "结束交易日(yyyymmdd)"
  581. // @Success 200 {array} models.WRTradeBargainApply
  582. // @Failure 500 {object} app.Response
  583. // @Router /WrTrade2/QueryWrTradeBargainApply [get]
  584. // @Tags 仓单贸易v2
  585. func QueryWrTradeBargainApply(c *gin.Context) {
  586. a := app.GinUtils{Gin: app.Gin{C: c}}
  587. m := models.WRTradeBargainApply{}
  588. a.DoBindReq(&m)
  589. a.DoGetDataI(&m)
  590. }
  591. // QueryWrPerformanceStepType
  592. // @Summary 查询履约步骤枚举
  593. // @Produce json
  594. // @Security ApiKeyAuth
  595. // @Success 200 {array} models.WrPerformanceStepType
  596. // @Failure 500 {object} app.Response
  597. // @Router /WrTrade2/QueryWrPerformanceStepType [get]
  598. // @Tags 仓单贸易v2
  599. func QueryWrPerformanceStepType(c *gin.Context) {
  600. a := app.GinUtils{Gin: app.Gin{C: c}}
  601. m := models.WrPerformanceStepType{}
  602. a.DoBindReq(&m)
  603. a.DoGetDataI(&m)
  604. }
  605. // QueryWrUserReceiptInfo
  606. // @Summary 查询发票信息
  607. // @Produce json
  608. // @Security ApiKeyAuth
  609. // @Param userid query int false "用户id"
  610. // @Param receipttype query int false "发票类型 - 1:个人 2:企业"
  611. // @Success 200 {array} models.WrUserReceiptInfo
  612. // @Failure 500 {object} app.Response
  613. // @Router /WrTrade2/QueryWrUserReceiptInfo [get]
  614. // @Tags 仓单贸易v2
  615. func QueryWrUserReceiptInfo(c *gin.Context) {
  616. a := app.GinUtils{Gin: app.Gin{C: c}}
  617. m := models.WrUserReceiptInfo{}
  618. a.DoBindReq(&m)
  619. a.DoGetDataI(&m)
  620. }
  621. // QuerySiteColumnDetail
  622. // @Summary 查询资讯
  623. // @Produce json
  624. // @Security ApiKeyAuth
  625. // @Param page query int false "页码"
  626. // @Param pagesize query int false "每页条数"
  627. // @Param columnid query int false "所属栏目id"
  628. // @Success 200 {array} models.WrSiteColumnDetail
  629. // @Failure 500 {object} app.Response
  630. // @Router /WrTrade2/QuerySiteColumnDetail [get]
  631. // @Tags 仓单贸易v2
  632. func QuerySiteColumnDetail(c *gin.Context) {
  633. a := app.GinUtils{Gin: app.Gin{C: c}}
  634. m := models.WrSiteColumnDetail{COLUMNID: -9999999999}
  635. a.DoBindReq(&m)
  636. a.DoGetDataByPage(&m)
  637. }
  638. // QueryDeliveryGoodsSection
  639. // @Summary 查询板块(分类)
  640. // @Produce json
  641. // @Security ApiKeyAuth
  642. // @Success 200 {array} models.WrDeliveryGoodsSection
  643. // @Failure 500 {object} app.Response
  644. // @Router /WrTrade2/QueryDeliveryGoodsSection [get]
  645. // @Tags 仓单贸易v2
  646. func QueryDeliveryGoodsSection(c *gin.Context) {
  647. a := app.GinUtils{Gin: app.Gin{C: c}}
  648. m := models.WrDeliveryGoodsSection{}
  649. a.DoBindReq(&m)
  650. a.DoGetDataI(&m)
  651. }
  652. // QuerySpotGroupTradeSum
  653. // @Summary 查询指数
  654. // @Produce json
  655. // @Security ApiKeyAuth
  656. // @Success 200 {array} models.WrSpotGroupTradeSumEx
  657. // @Failure 500 {object} app.Response
  658. // @Router /WrTrade2/QuerySpotGroupTradeSum [get]
  659. // @Tags 仓单贸易v2
  660. func QuerySpotGroupTradeSum(c *gin.Context) {
  661. a := app.GinUtils{Gin: app.Gin{C: c}}
  662. m := models.WrSpotGroupTradeSumEx{}
  663. a.DoBindReq(&m)
  664. a.DoGetDataI(&m)
  665. }
  666. // QuerySpotGroupTradeSumDetail
  667. // @Summary 查询指数详细(价格走势图)
  668. // @Description 查询的结果将会按日期 从小到大 排序
  669. // @Produce json
  670. // @Security ApiKeyAuth
  671. // @param deliverygoodsid query int true "现货商品id"
  672. // @param lastnum query int false "查询最新多少条记录(如不填写此项, 默认查30条)"
  673. // @Success 200 {array} models.WrSpotGroupTradeSumDetail
  674. // @Failure 500 {object} app.Response
  675. // @Router /WrTrade2/QuerySpotGroupTradeSumDetail [get]
  676. // @Tags 仓单贸易v2
  677. func QuerySpotGroupTradeSumDetail(c *gin.Context) {
  678. a := app.GinUtils{Gin: app.Gin{C: c}}
  679. m := models.WrSpotGroupTradeSumDetail{}
  680. a.DoBindReq(&m)
  681. a.DoGetDataI(&m)
  682. }
  683. // QueryWrPreSaleInfo
  684. // @Summary 查询新品发布
  685. // @Produce json
  686. // @Security ApiKeyAuth
  687. // @param marketid query int false "市场id"
  688. // @param presalestatus query string false "预售状态(逗号隔开,如1,2,3) 1:未开始 2:进行中 3:已结束 4:已关闭"
  689. // @param lotteryflag query int false "摇号标识 - 0:未摇号 1:已摇号"
  690. // @param lastnum query int false "最近多少条记录(按创建时间倒序)"
  691. // @Success 200 {array} models.WrPreSaleInfo
  692. // @Failure 500 {object} app.Response
  693. // @Router /WrTrade2/QueryWrPreSaleInfo [get]
  694. // @Tags 仓单贸易v2
  695. func QueryWrPreSaleInfo(c *gin.Context) {
  696. a := app.GinUtils{Gin: app.Gin{C: c}}
  697. m := models.WrPreSaleInfo{LOTTERYFLAG: -1}
  698. a.DoBindReq(&m)
  699. a.DoGetDataI(&m)
  700. }
  701. // QueryWrReckonSpotGoodsTradeSum
  702. // @Summary 查询价格走势
  703. // @Produce json
  704. // @Security ApiKeyAuth
  705. // @param marketid query int true "市场id"
  706. // @param wrstandardid query int true "现货商品id"
  707. // @Param begindate query string false "开始交易日(yyyymmdd)"
  708. // @Param enddate query string false "结束交易日(yyyymmdd)"
  709. // @param lastnum query int false "最近多少条记录(按交易日倒序)"
  710. // @Success 200 {array} models.WrReckonSpotGoodsTradeSum
  711. // @Failure 500 {object} app.Response
  712. // @Router /WrTrade2/QueryWrReckonSpotGoodsTradeSum [get]
  713. // @Tags 仓单贸易v2
  714. func QueryWrReckonSpotGoodsTradeSum(c *gin.Context) {
  715. a := app.GinUtils{Gin: app.Gin{C: c}}
  716. m := models.WrReckonSpotGoodsTradeSum{}
  717. a.DoBindReq(&m)
  718. a.DoGetDataI(&m)
  719. }
  720. // QueryWrSearchUser
  721. // @Summary 查询用户
  722. // @Produce json
  723. // @Security ApiKeyAuth
  724. // @param username query string true "用户名称(模糊匹配)"
  725. // @Success 200 {array} models.WrSearchUser
  726. // @Failure 500 {object} app.Response
  727. // @Router /WrTrade2/QueryWrSearchUser [get]
  728. // @Tags 仓单贸易v2
  729. func QueryWrSearchUser(c *gin.Context) {
  730. a := app.GinUtils{Gin: app.Gin{C: c}}
  731. m := models.WrSearchUser{}
  732. a.DoBindReq(&m)
  733. a.DoGetDataI(&m)
  734. }
  735. // QueryWrDraftUserInfo
  736. // @Summary 查询实名认证信息
  737. // @Produce json
  738. // @Security ApiKeyAuth
  739. // @Param userid query int true "用户ID"
  740. // @Param userstatus query int false "用户状态 1:正常 2:注销"
  741. // @Success 200 {array} models.WrDraftUserInfo
  742. // @Failure 500 {object} app.Response
  743. // @Router /WrTrade2/QueryWrDraftUserInfo [get]
  744. // @Tags 仓单贸易v2
  745. func QueryWrDraftUserInfo(c *gin.Context) {
  746. a := app.GinUtils{Gin: app.Gin{C: c}}
  747. m := models.WrDraftUserInfo{}
  748. a.DoBindReq(&m)
  749. a.DoGetDataI(&m)
  750. }