| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- /**
- * @Author: zou.yingbin
- * @Create : 2021/4/12 10:39
- * @Modify : 2021/4/12 10:39
- */
- package ermcp
- import (
- "github.com/gin-gonic/gin"
- "mtp2_if/global/app"
- "mtp2_if/models"
- )
- // QuerySpotGoodsPrice
- // @Summary 查询现货市价(现货市价)
- // @Produce json
- // @Security ApiKeyAuth
- // @Param userid query int true "用户ID"
- // @Success 200 {array} models.ErmcpSpotGoodsPrice
- // @Failure 500 {object} app.Response
- // @Router /Ermcp/QuerySpotGoodsPrice [get]
- // @Tags 企业风险管理(app)
- func QuerySpotGoodsPrice(c *gin.Context) {
- req := struct {
- UserId int64 `form:"userid" binding:"required"` // 用户id
- }{}
- a := app.GinUtils{Gin: app.Gin{C: c}}
- a.DoBindReq(&req)
- m := models.ErmcpSpotGoodsPrice{AREAUSERID: req.UserId}
- a.DoGetDataI(&m)
- }
- // QuerySpotGoodsPriceLog
- // @Summary 查询现货市价详情(现货市价/详情)
- // @Produce json
- // @Security ApiKeyAuth
- // @Param userid query int true "用户ID"
- // @Param wrstandardid query int true "现货商品ID"
- // @Success 200 {array} models.ErmcpSpotGoodsPriceLog
- // @Failure 500 {object} app.Response
- // @Router /Ermcp/QuerySpotGoodsPriceLog [get]
- // @Tags 企业风险管理(app)
- func QuerySpotGoodsPriceLog(c *gin.Context) {
- req := struct {
- UserId int64 `form:"userid" binding:"required"` // 用户id
- Wrstandardid int64 `form:"wrstandardid" binding:"required"` // 现货商品id
- }{}
- a := app.GinUtils{Gin: app.Gin{C: c}}
- a.DoBindReq(&req)
- m := models.ErmcpSpotGoodsPriceLog{AREAUSERID: req.UserId, WRSTANDARDID: req.Wrstandardid}
- a.DoGetDataI(&m)
- }
|