qryWrTrade.go 28 KB

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