|
|
@@ -23,15 +23,15 @@ type GoodsQueryRsp struct {
|
|
|
MarketID int `json:"marketid" binding:"required"`
|
|
|
}
|
|
|
|
|
|
-type Goodstest struct {
|
|
|
+type Goods struct {
|
|
|
Goodsid int `json:"goodsid" xorm:"'GOODSID'"`
|
|
|
Goodscode string `json:"goodscode" xorm:"'GOODSCODE'"`
|
|
|
Goodsname string `json:"goodsname" xorm:"'GOODSNAME'"`
|
|
|
Marketid int `json:"marketid" xorm:"'MARKETID'"`
|
|
|
}
|
|
|
|
|
|
-func (Goodstest) TableName() string {
|
|
|
- return "GOODSTEST"
|
|
|
+func (Goods) TableName() string {
|
|
|
+ return "GOODS"
|
|
|
}
|
|
|
|
|
|
// GetGoodsInfo 商品信息查询
|
|
|
@@ -75,7 +75,7 @@ func GetGoods(c *gin.Context) {
|
|
|
|
|
|
engine := db.GetEngine()
|
|
|
|
|
|
- goodsinfo := new(Goodstest)
|
|
|
+ goodsinfo := new(Goods)
|
|
|
has, err := engine.Where("goodsid=?", goods.GoodsID).Get(goodsinfo)
|
|
|
if err != nil {
|
|
|
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
|