qryWrTrade.go 24 KB

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