qryWrTrade.go 23 KB

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