qryWrTrade.go 21 KB

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