/**
* @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
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
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)
}
