qryWrTrade.go 25 KB

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