qryWrTrade.go 23 KB

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