qryWrTrade.go 20 KB

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