qryWrTrade.go 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707
  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. "github.com/gin-gonic/gin"
  9. "mtp2_if/global/app"
  10. "mtp2_if/models"
  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 true "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{}
  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 true "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{}
  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 true "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{}
  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 begindate query string false "开始交易日(yyyymmdd)"
  119. // @Param enddate query string false "结束交易日(yyyymmdd)"
  120. // @Success 200 {array} models.WrOrderDetail
  121. // @Failure 500 {object} app.Response
  122. // @Router /WrTrade2/QueryWrOrderDetail [get]
  123. // @Tags 仓单贸易v2
  124. func QueryWrOrderDetail(c *gin.Context) {
  125. a := app.GinUtils{Gin: app.Gin{C: c}}
  126. m := models.WrOrderDetail{}
  127. a.DoBindReq(&m)
  128. a.DoGetDataByPage(&m)
  129. }
  130. // QueryWrSpecialMatchOrder
  131. // @Summary 查询指定成交
  132. // @Description 页面 现货仓单 | 预售仓单 -> 指定成交
  133. // @Produce json
  134. // @Security ApiKeyAuth
  135. // @Param page query int false "页码"
  136. // @Param pagesize query int false "每页条数"
  137. // @Param userid query int true "用户id"
  138. // @Param marketid query int false "仓单贸易市场id"
  139. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  140. // @Param isspecified query int false "1:指定好友(贸易圈) 2:指定对手 - [挂牌]"
  141. // @Success 200 {array} models.WrSpecialMatchOrder
  142. // @Failure 500 {object} app.Response
  143. // @Router /WrTrade2/QueryWrSpecialMatchOrder [get]
  144. // @Tags 仓单贸易v2
  145. func QueryWrSpecialMatchOrder(c *gin.Context) {
  146. a := app.GinUtils{Gin: app.Gin{C: c}}
  147. m := models.WrSpecialMatchOrder{}
  148. a.DoBindReq(&m)
  149. a.DoGetDataByPage(&m)
  150. }
  151. // QueryWrTradeDetail
  152. // @Summary 查询仓单成交明细
  153. // @Produce json
  154. // @Security ApiKeyAuth
  155. // @Param page query int false "页码"
  156. // @Param pagesize query int false "每页条数"
  157. // @Param userid query int true "用户id"
  158. // @Param marketid query int false "仓单贸易市场id"
  159. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  160. // @Success 200 {array} models.WrTradeDetail
  161. // @Failure 500 {object} app.Response
  162. // @Router /WrTrade2/QueryWrTradeDetail [get]
  163. // @Tags 仓单贸易v2
  164. func QueryWrTradeDetail(c *gin.Context) {
  165. a := app.GinUtils{Gin: app.Gin{C: c}}
  166. m := models.WrTradeDetail{}
  167. a.DoBindReq(&m)
  168. a.DoGetDataByPage(&m)
  169. }
  170. // QueryWrGoodsInfo
  171. // @Summary 查询仓单商品信息
  172. // @Produce json
  173. // @Security ApiKeyAuth
  174. // @Param marketid query int false "仓单贸易市场id"
  175. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  176. // @Param wrfactortypeid query int true "仓单要素id"
  177. // @Param tmplateid query int false "履约模板id(如果指定了履约模板id,履约信息将按模板id查, 否则去市场配置表中找模板)"
  178. // @Success 200 {array} models.WrGoodsInfo
  179. // @Failure 500 {object} app.Response
  180. // @Router /WrTrade2/QueryWrGoodsInfo [get]
  181. // @Tags 仓单贸易v2
  182. func QueryWrGoodsInfo(c *gin.Context) {
  183. a := app.GinUtils{Gin: app.Gin{C: c}}
  184. m := models.WrGoodsInfo{}
  185. a.DoBindReq(&m)
  186. a.DoGetDataI(&m)
  187. }
  188. // QueryPerformancePlan
  189. // @Summary 查询履约信息
  190. // @Produce json
  191. // @Security ApiKeyAuth
  192. // @Param userid query int true "用户id"
  193. // @Param buyorsell query int true "买卖方向 0-买 1-卖"
  194. // @Success 200 {array} models.WrPerformancePlan
  195. // @Failure 500 {object} app.Response
  196. // @Router /WrTrade2/QueryPerformancePlan [get]
  197. // @Tags 仓单贸易v2
  198. func QueryPerformancePlan(c *gin.Context) {
  199. a := app.GinUtils{Gin: app.Gin{C: c}}
  200. m := models.WrPerformancePlan{}
  201. a.DoBindReq(&m)
  202. a.DoGetDataI(&m)
  203. }
  204. // QueryHoldLB
  205. // @Summary 查询仓单持有记录
  206. // @Description 页面 现货仓单->现货明细? , 表名叫仓单持有记录, 有挂单特有维度,为防误解汇总也有相关维度, 新写接口,不跟汇总合在一起了。
  207. // @Produce json
  208. // @Security ApiKeyAuth
  209. // @Param accountid query int true "资金账号"
  210. // @Param warehouseid query int false "仓库id"
  211. // @Param deliverygoodsid query int false "品种id"
  212. // @Param wrstandardid query int false "品类id"
  213. // @Param wrfactortypeid query int false "仓单要素id"
  214. // @Param dgitemname query string false "商品要素项名称模糊匹配, 逗号隔开, 如 产地1,品牌1,规格12mm"
  215. // @Success 200 {array} models.WrHoldLB
  216. // @Failure 500 {object} app.Response
  217. // @Router /WrTrade2/QueryHoldLB [get]
  218. // @Tags 仓单贸易v2
  219. func QueryHoldLB(c *gin.Context) {
  220. a := app.GinUtils{Gin: app.Gin{C: c}}
  221. m := models.WrHoldLB{}
  222. a.DoBindReq(&m)
  223. a.DoGetDataI(&m)
  224. }
  225. // QueryFilterItem
  226. // @Summary 查询筛选框列表 - 作废(以前给pcweb简单筛选框用的,后来改版了)
  227. // @Produce json
  228. // @Security ApiKeyAuth
  229. // @Param itype query string true "类型(可多选,逗号隔开) 1-品种 2-品类(商品) 3-仓库"
  230. // @Success 200 {array} models.WrFilterItem
  231. // @Failure 500 {object} app.Response
  232. // @Router /WrTrade2/QueryFilterItem [get]
  233. // @Tags 仓单贸易v2
  234. func QueryFilterItem(c *gin.Context) {
  235. a := app.GinUtils{Gin: app.Gin{C: c}}
  236. m := models.WrFilterItem{}
  237. a.DoBindReq(&m)
  238. a.DoGetDataI(&m)
  239. }
  240. // QueryFaProductDetail
  241. // @Summary 查询融资产品列表
  242. // @Description 页面 买卖大厅 -> 选择融资方案
  243. // @Produce json
  244. // @Security ApiKeyAuth
  245. // @Param wrfactortypeid query int true "仓单要素id"
  246. // @Success 200 {array} models.WrFAProductDetail
  247. // @Failure 500 {object} app.Response
  248. // @Router /WrTrade2/QueryFaProductDetail [get]
  249. // @Tags 仓单贸易v2
  250. func QueryFaProductDetail(c *gin.Context) {
  251. a := app.GinUtils{Gin: app.Gin{C: c}}
  252. m := models.WrFAProductDetail{}
  253. a.DoBindReq(&m)
  254. a.DoGetDataI(&m)
  255. }
  256. // QueryWrFactorTypeInfo
  257. // @Summary 查询仓单要素详细信息
  258. // @Produce json
  259. // @Security ApiKeyAuth
  260. // @Param wrfactortypeid query int true "仓单要素id"
  261. // @Success 200 {array} models.WrFactorTypeInfo
  262. // @Failure 500 {object} app.Response
  263. // @Router /WrTrade2/QueryWrFactorTypeInfo [get]
  264. // @Tags 仓单贸易v2
  265. func QueryWrFactorTypeInfo(c *gin.Context) {
  266. a := app.GinUtils{Gin: app.Gin{C: c}}
  267. m := models.WrFactorTypeInfo{}
  268. a.DoBindReq(&m)
  269. a.DoGetDataI(&m)
  270. }
  271. // QueryWrFactorTypeInfoEx
  272. // @Summary 查询仓单要素详细信息列表项
  273. // @Produce json
  274. // @Security ApiKeyAuth
  275. // @Param wrfactortypeid query int true "仓单要素id"
  276. // @Success 200 {array} models.WrTypeItem
  277. // @Failure 500 {object} app.Response
  278. // @Router /WrTrade2/QueryWrFactorTypeInfoEx [get]
  279. // @Tags 仓单贸易v2
  280. func QueryWrFactorTypeInfoEx(c *gin.Context) {
  281. a := app.GinUtils{Gin: app.Gin{C: c}}
  282. m := models.WrFactorTypeInfoEx{}
  283. a.DoBindReq(&m)
  284. a.DoGetDataI(&m)
  285. }
  286. // QueryWrMarketTradeConfig
  287. // @Summary 查询市场交易参数配置
  288. // @Produce json
  289. // @Security ApiKeyAuth
  290. // @Param marketid query int false "市场id"
  291. // @Success 200 {array} models.WrMarketTradeConfig
  292. // @Failure 500 {object} app.Response
  293. // @Router /WrTrade2/QueryWrMarketTradeConfig [get]
  294. // @Tags 仓单贸易v2
  295. func QueryWrMarketTradeConfig(c *gin.Context) {
  296. a := app.GinUtils{Gin: app.Gin{C: c}}
  297. m := models.WrMarketTradeConfig{}
  298. a.DoBindReq(&m)
  299. a.DoGetDataI(&m)
  300. }
  301. // QueryFtDeliveryGoods
  302. // @Summary 查询品种品类筛选框列表
  303. // @Produce json
  304. // @Security ApiKeyAuth
  305. // @Success 200 {array} models.WrFtDeliveryGoods
  306. // @Failure 500 {object} app.Response
  307. // @Router /WrTrade2/QueryFtDeliveryGoods [get]
  308. // @Tags 仓单贸易v2
  309. func QueryFtDeliveryGoods(c *gin.Context) {
  310. a := app.GinUtils{Gin: app.Gin{C: c}}
  311. m := models.WrFtDeliveryGoods{}
  312. a.DoBindReq(&m)
  313. a.DoGetDataI(&m)
  314. }
  315. // QueryWrStandardFactoryItem
  316. // @Summary 查询品类要素定义项
  317. // @Produce json
  318. // @Security ApiKeyAuth
  319. // @Param wrstandardid query int true "品类id"
  320. // @Success 200 {array} models.WrStandardFactoryItemEx
  321. // @Failure 500 {object} app.Response
  322. // @Router /WrTrade2/QueryWrStandardFactoryItem [get]
  323. // @Tags 仓单贸易v2
  324. func QueryWrStandardFactoryItem(c *gin.Context) {
  325. a := app.GinUtils{Gin: app.Gin{C: c}}
  326. m := models.WrStandardFactoryItemEx{}
  327. a.DoBindReq(&m)
  328. a.DoGetDataI(&m)
  329. }
  330. // QueryWrPerformancePlanStep
  331. // @Summary 查询履约信息详情
  332. // @Produce json
  333. // @Security ApiKeyAuth
  334. // @Param planid query int true "履约计划id(performanceplanid)"
  335. // @Param curstepid query int false "当前步骤id"
  336. // @Success 200 {array} models.WrPerformancePlanStep
  337. // @Failure 500 {object} app.Response
  338. // @Router /WrTrade2/QueryWrPerformancePlanStep [get]
  339. // @Tags 仓单贸易v2
  340. func QueryWrPerformancePlanStep(c *gin.Context) {
  341. a := app.GinUtils{Gin: app.Gin{C: c}}
  342. m := models.WrPerformancePlanStep{}
  343. a.DoBindReq(&m)
  344. a.DoGetDataI(&m)
  345. }
  346. // QueryWrFinanceBuyApply
  347. // @Summary 查询融资购买申请
  348. // @Description 页面 融资信息+ / 申请单
  349. // @Produce json
  350. // @Security ApiKeyAuth
  351. // @Param userid query int true "用户id"
  352. // @Success 200 {array} models.WrFinanceBuyApply
  353. // @Failure 500 {object} app.Response
  354. // @Router /WrTrade2/QueryWrFinanceBuyApply [get]
  355. // @Tags 仓单贸易v2
  356. func QueryWrFinanceBuyApply(c *gin.Context) {
  357. a := app.GinUtils{Gin: app.Gin{C: c}}
  358. m := models.WrFinanceBuyApply{}
  359. a.DoBindReq(&m)
  360. a.DoGetDataI(&m)
  361. }
  362. // QueryWrScfContract
  363. // @Summary 查询仓单贸易融资合同
  364. // @Produce json
  365. // @Security ApiKeyAuth
  366. // @Param userid query int true "用户id"
  367. // @Param scfcontractid query int false "融资合同id"
  368. // @Success 200 {array} models.WrScfContract
  369. // @Failure 500 {object} app.Response
  370. // @Router /WrTrade2/QueryWrScfContract [get]
  371. // @Tags 仓单贸易v2
  372. func QueryWrScfContract(c *gin.Context) {
  373. a := app.GinUtils{Gin: app.Gin{C: c}}
  374. m := models.WrScfContract{}
  375. a.DoBindReq(&m)
  376. a.DoGetDataI(&m)
  377. }
  378. // QueryWrBuybackDetail
  379. // @Summary 查询仓单回购明细
  380. // @Produce json
  381. // @Security ApiKeyAuth
  382. // @Param scfcontractid query int false "融资合同id"
  383. // @Success 200 {array} models.WrBuybackDetail
  384. // @Failure 500 {object} app.Response
  385. // @Router /WrTrade2/QueryWrBuybackDetail [get]
  386. // @Tags 仓单贸易v2
  387. func QueryWrBuybackDetail(c *gin.Context) {
  388. a := app.GinUtils{Gin: app.Gin{C: c}}
  389. m := models.WrBuybackDetail{}
  390. a.DoBindReq(&m)
  391. a.DoGetDataI(&m)
  392. }
  393. // QueryWrScfContractInterest
  394. // @Summary 查询融资合同费用明细
  395. // @Produce json
  396. // @Security ApiKeyAuth
  397. // @Param scfcontractid query int false "融资合同id"
  398. // @Success 200 {array} models.WrScfContractInterest
  399. // @Failure 500 {object} app.Response
  400. // @Router /WrTrade2/QueryWrScfContractInterest [get]
  401. // @Tags 仓单贸易v2
  402. func QueryWrScfContractInterest(c *gin.Context) {
  403. a := app.GinUtils{Gin: app.Gin{C: c}}
  404. m := models.WrScfContractInterest{}
  405. a.DoBindReq(&m)
  406. a.DoGetDataI(&m)
  407. }
  408. // QueryWrOutInApply
  409. // @Summary 查询提货申请
  410. // @Produce json
  411. // @Security ApiKeyAuth
  412. // @Param userid query int true "用户id"
  413. // @Success 200 {array} models.WrOutInApply
  414. // @Failure 500 {object} app.Response
  415. // @Router /WrTrade2/QueryWrOutInApply [get]
  416. // @Tags 仓单贸易v2
  417. func QueryWrOutInApply(c *gin.Context) {
  418. a := app.GinUtils{Gin: app.Gin{C: c}}
  419. m := models.WrOutInApply{}
  420. a.DoBindReq(&m)
  421. a.DoGetDataI(&m)
  422. }
  423. // QueryWrDeliveryDetail
  424. // @Summary 查询交收
  425. // @Produce json
  426. // @Security ApiKeyAuth
  427. // @Param userid query int true "用户id"
  428. // @Param accountid query int false "资金账号id"
  429. // @Success 200 {array} models.WrDeliveryDetail
  430. // @Failure 500 {object} app.Response
  431. // @Router /WrTrade2/QueryWrDeliveryDetail [get]
  432. // @Tags 仓单贸易v2
  433. func QueryWrDeliveryDetail(c *gin.Context) {
  434. a := app.GinUtils{Gin: app.Gin{C: c}}
  435. m := models.WrDeliveryDetail{}
  436. a.DoBindReq(&m)
  437. a.DoGetDataI(&m)
  438. }
  439. // QueryWrBsGoodsInfo
  440. // @Summary 查询合约交易买卖大厅详情
  441. // @Description 合约交易/买卖大厅/详情
  442. // @Produce json
  443. // @Security ApiKeyAuth
  444. // @Param goodsid query int true "商品id"
  445. // @Success 200 {array} models.WrBsGoodsInfo
  446. // @Failure 500 {object} app.Response
  447. // @Router /WrTrade2/QueryWrBsGoodsInfo [get]
  448. // @Tags 仓单贸易v2
  449. func QueryWrBsGoodsInfo(c *gin.Context) {
  450. a := app.GinUtils{Gin: app.Gin{C: c}}
  451. m := models.WrBsGoodsInfo{}
  452. a.DoBindReq(&m)
  453. a.DoGetDataI(&m)
  454. }
  455. // QueryWrTradeOrderDetail
  456. // @Summary 查询合约交易买卖大厅
  457. // @Produce json
  458. // @Security ApiKeyAuth
  459. // @Param page query int false "页码"
  460. // @Param pagesize query int false "每页条数"
  461. // @Param goodsid query int true "商品id"
  462. // @Param buyorsell query int true "买卖方向 0-买 1-卖"
  463. // @Success 200 {array} models.WrTradeOrderDetail
  464. // @Failure 500 {object} app.Response
  465. // @Router /WrTrade2/QueryWrTradeOrderDetail [get]
  466. // @Tags 仓单贸易v2
  467. func QueryWrTradeOrderDetail(c *gin.Context) {
  468. a := app.GinUtils{Gin: app.Gin{C: c}}
  469. m := models.WrTradeOrderDetail{}
  470. a.DoBindReq(&m)
  471. a.DoGetDataByPage(&m)
  472. }
  473. // QueryWrAverageTradePrice
  474. // @Summary 查询成交价(历史走势)
  475. // @Produce json
  476. // @Security ApiKeyAuth
  477. // @Param page query int false "页码"
  478. // @Param pagesize query int false "每页条数"
  479. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  480. // @Param wrfactortypeid query int true "仓单要素id"
  481. // @Success 200 {array} models.WrAverageTradePrice
  482. // @Failure 500 {object} app.Response
  483. // @Router /WrTrade2/QueryWrAverageTradePrice [get]
  484. // @Tags 仓单贸易v2
  485. func QueryWrAverageTradePrice(c *gin.Context) {
  486. a := app.GinUtils{Gin: app.Gin{C: c}}
  487. m := models.WrAverageTradePrice{}
  488. a.DoBindReq(&m)
  489. a.DoGetDataByPage(&m)
  490. }
  491. // QueryWrDeliveryAvalidHoldLB
  492. // @Summary 查询合约交收可点选仓单
  493. // @Produce json
  494. // @Security ApiKeyAuth
  495. // @Param accountid query int true "资金账号"
  496. // @Param goodsid query int true "商品id"
  497. // @Success 200 {array} models.WrDeliveryAvalidHoldLB
  498. // @Failure 500 {object} app.Response
  499. // @Router /WrTrade2/QueryWrDeliveryAvalidHoldLB [get]
  500. // @Tags 仓单贸易v2
  501. func QueryWrDeliveryAvalidHoldLB(c *gin.Context) {
  502. a := app.GinUtils{Gin: app.Gin{C: c}}
  503. m := models.WrDeliveryAvalidHoldLB{}
  504. a.DoBindReq(&m)
  505. a.DoGetDataI(&m)
  506. }
  507. // QueryWrUserFriend
  508. // @Summary 查询我的朋友
  509. // @Produce json
  510. // @Security ApiKeyAuth
  511. // @Param userid query int true "用户id"
  512. // @Param newuserid query int false "新朋友userid, 如果填写了此项则查找新朋友"
  513. // @Success 200 {array} models.WrUserFriend
  514. // @Failure 500 {object} app.Response
  515. // @Router /WrTrade2/QueryWrUserFriend [get]
  516. // @Tags 仓单贸易v2
  517. func QueryWrUserFriend(c *gin.Context) {
  518. a := app.GinUtils{Gin: app.Gin{C: c}}
  519. m := models.WrUserFriend{}
  520. a.DoBindReq(&m)
  521. a.DoGetDataI(&m)
  522. }
  523. // QueryWrFriendApply
  524. // @Summary 查询好友申请记录
  525. // @Produce json
  526. // @Security ApiKeyAuth
  527. // @Param userid query int true "用户id"
  528. // @Success 200 {array} models.WrFriendApply
  529. // @Failure 500 {object} app.Response
  530. // @Router /WrTrade2/QueryWrFriendApply [get]
  531. // @Tags 仓单贸易v2
  532. func QueryWrFriendApply(c *gin.Context) {
  533. a := app.GinUtils{Gin: app.Gin{C: c}}
  534. m := models.WrFriendApply{}
  535. a.DoBindReq(&m)
  536. a.DoGetDataI(&m)
  537. }
  538. // QueryPermancePlanTmp
  539. // @Summary 查询履约模板
  540. // @Description 返回指定用户的模板和公共模板(用户id为空)
  541. // @Produce json
  542. // @Security ApiKeyAuth
  543. // @Param userid query int false "用户id"
  544. // @Param tmptype query string false "模板类型(逗号隔开), 0:通用 1:交割 2:仓单贸易 3:预售集采 7:竞拍-竞价式 8:竞拍-大宗式 9:荷兰式--失效枚举:4:竞拍-降价式 (无仓单) 5:挂牌期权 6:竞拍-降价式"
  545. // @Param includepub query int false "是否包含公共模板(用户id为空的) 1-包含"
  546. // @Success 200 {array} models.WrPerformanceTemplateEx
  547. // @Failure 500 {object} app.Response
  548. // @Router /WrTrade2/QueryPermancePlanTmp [get]
  549. // @Tags 仓单贸易v2
  550. func QueryPermancePlanTmp(c *gin.Context) {
  551. a := app.GinUtils{Gin: app.Gin{C: c}}
  552. m := models.WrPerformanceTemplateEx{}
  553. a.DoBindReq(&m)
  554. a.DoGetDataI(&m)
  555. }
  556. // QueryWrTradeBargainApply
  557. // @Summary 查询议价单
  558. // @Description 1.页面 挂单/议价单, 只需传单号就行 <br>2.页面 议价->我的议价 参数 userid=登录userid <br>3.页面 议价->对方议价 填写matchuserid=登录用户id
  559. // @Produce json
  560. // @Security ApiKeyAuth
  561. // @Param userid query int false "议价人id(摘牌方)"
  562. // @Param matchuserid query int false "挂牌方id(查对方议价时,填写此项)"
  563. // @Param wrtradeorderid query int false "关联委托单id"
  564. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  565. // @Param begindate query string false "开始交易日(yyyymmdd)"
  566. // @Param enddate query string false "结束交易日(yyyymmdd)"
  567. // @Success 200 {array} models.WRTradeBargainApply
  568. // @Failure 500 {object} app.Response
  569. // @Router /WrTrade2/QueryWrTradeBargainApply [get]
  570. // @Tags 仓单贸易v2
  571. func QueryWrTradeBargainApply(c *gin.Context) {
  572. a := app.GinUtils{Gin: app.Gin{C: c}}
  573. m := models.WRTradeBargainApply{}
  574. a.DoBindReq(&m)
  575. a.DoGetDataI(&m)
  576. }
  577. // QueryWrPerformanceStepType
  578. // @Summary 查询履约步骤枚举
  579. // @Produce json
  580. // @Security ApiKeyAuth
  581. // @Success 200 {array} models.WrPerformanceStepType
  582. // @Failure 500 {object} app.Response
  583. // @Router /WrTrade2/QueryWrPerformanceStepType [get]
  584. // @Tags 仓单贸易v2
  585. func QueryWrPerformanceStepType(c *gin.Context) {
  586. a := app.GinUtils{Gin: app.Gin{C: c}}
  587. m := models.WrPerformanceStepType{}
  588. a.DoBindReq(&m)
  589. a.DoGetDataI(&m)
  590. }
  591. // QueryWrUserReceiptInfo
  592. // @Summary 查询发票信息
  593. // @Produce json
  594. // @Security ApiKeyAuth
  595. // @Param userid query int false "用户id"
  596. // @Param receipttype query int false "发票类型 - 1:个人 2:企业"
  597. // @Success 200 {array} models.WrUserReceiptInfo
  598. // @Failure 500 {object} app.Response
  599. // @Router /WrTrade2/QueryWrUserReceiptInfo [get]
  600. // @Tags 仓单贸易v2
  601. func QueryWrUserReceiptInfo(c *gin.Context) {
  602. a := app.GinUtils{Gin: app.Gin{C: c}}
  603. m := models.WrUserReceiptInfo{}
  604. a.DoBindReq(&m)
  605. a.DoGetDataI(&m)
  606. }
  607. // QuerySiteColumnDetail
  608. // @Summary 查询资讯
  609. // @Produce json
  610. // @Security ApiKeyAuth
  611. // @Param page query int false "页码"
  612. // @Param pagesize query int false "每页条数"
  613. // @Success 200 {array} models.WrSiteColumnDetail
  614. // @Failure 500 {object} app.Response
  615. // @Router /WrTrade2/QuerySiteColumnDetail [get]
  616. // @Tags 仓单贸易v2
  617. func QuerySiteColumnDetail(c *gin.Context) {
  618. a := app.GinUtils{Gin: app.Gin{C: c}}
  619. m := models.WrSiteColumnDetail{}
  620. a.DoBindReq(&m)
  621. a.DoGetDataByPage(&m)
  622. }
  623. // QueryDeliveryGoodsSection
  624. // @Summary 查询板块(分类)
  625. // @Produce json
  626. // @Security ApiKeyAuth
  627. // @Success 200 {array} models.WrDeliveryGoodsSection
  628. // @Failure 500 {object} app.Response
  629. // @Router /WrTrade2/QueryDeliveryGoodsSection [get]
  630. // @Tags 仓单贸易v2
  631. func QueryDeliveryGoodsSection(c *gin.Context) {
  632. a := app.GinUtils{Gin: app.Gin{C: c}}
  633. m := models.WrDeliveryGoodsSection{}
  634. a.DoBindReq(&m)
  635. a.DoGetDataI(&m)
  636. }
  637. // QuerySpotGroupTradeSum
  638. // @Summary 查询指数
  639. // @Produce json
  640. // @Security ApiKeyAuth
  641. // @Success 200 {array} models.WrSpotGroupTradeSumEx
  642. // @Failure 500 {object} app.Response
  643. // @Router /WrTrade2/QuerySpotGroupTradeSum [get]
  644. // @Tags 仓单贸易v2
  645. func QuerySpotGroupTradeSum(c *gin.Context) {
  646. a := app.GinUtils{Gin: app.Gin{C: c}}
  647. m := models.WrSpotGroupTradeSumEx{}
  648. a.DoBindReq(&m)
  649. a.DoGetDataI(&m)
  650. }
  651. // QuerySpotGroupTradeSumDetail
  652. // @Summary 查询指数详细(价格走势图)
  653. // @Description 查询的结果将会按日期 从小到大 排序
  654. // @Produce json
  655. // @Security ApiKeyAuth
  656. // @param deliverygoodsid query int true "现货商品id"
  657. // @param lastnum query int false "查询最新多少条记录(如不填写此项, 默认查30条)"
  658. // @Success 200 {array} models.WrSpotGroupTradeSumDetail
  659. // @Failure 500 {object} app.Response
  660. // @Router /WrTrade2/QuerySpotGroupTradeSumDetail [get]
  661. // @Tags 仓单贸易v2
  662. func QuerySpotGroupTradeSumDetail(c *gin.Context) {
  663. a := app.GinUtils{Gin: app.Gin{C: c}}
  664. m := models.WrSpotGroupTradeSumDetail{}
  665. a.DoBindReq(&m)
  666. a.DoGetDataI(&m)
  667. }