qryWrTrade.go 26 KB

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