|
@@ -219,14 +219,16 @@ func ModifyLongzhonginfoIsNormal(longzhonginfoId int) (err error) {
|
|
|
}
|
|
|
|
|
|
type LzPriceInfo struct {
|
|
|
- Standard string `json:"standard"`
|
|
|
- ModelName string `json:"modelName"`
|
|
|
- Unit string `json:"unit"`
|
|
|
- AreaName string `json:"areaName"`
|
|
|
- PriceType string `json:"priceType"`
|
|
|
- Memo string `json:"memo"`
|
|
|
- Id string `json:"id"`
|
|
|
- ProductName string `json:"productName"`
|
|
|
+ Standard string `json:"standard"`
|
|
|
+ ModelName string `json:"modelName"`
|
|
|
+ Unit string `json:"unit"`
|
|
|
+ AreaName string `json:"areaName"`
|
|
|
+ PriceType string `json:"priceType"`
|
|
|
+ Memo string `json:"memo"`
|
|
|
+ Id string `json:"id"`
|
|
|
+ ProductName string `json:"productName"`
|
|
|
+ MarketName string `json:"marketName"`
|
|
|
+ ManufactureName string `json:"manufactureName"`
|
|
|
}
|
|
|
|
|
|
type LzPriceInfoResp struct {
|
|
@@ -247,6 +249,8 @@ type Longzhongpriceinfo struct {
|
|
|
ProductName string
|
|
|
InfoType string
|
|
|
InfoTypeRemark string
|
|
|
+ MarketName string
|
|
|
+ ManufactureName string
|
|
|
}
|
|
|
|
|
|
func AddLongzhongpriceinfo(item *Longzhongpriceinfo) (newId int64, err error) {
|
|
@@ -270,7 +274,7 @@ func GetLongzhongpriceinfo() (items []*Longzhongpriceinfo, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
o.Using("edb")
|
|
|
sql := `SELECT * FROM longzhongpriceinfo `
|
|
|
- _,err = o.Raw(sql).QueryRows(&items)
|
|
|
+ _, err = o.Raw(sql).QueryRows(&items)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -308,9 +312,9 @@ func GetLongzhongpricedataCount(unitid, priceDate string) (count int, err error)
|
|
|
}
|
|
|
|
|
|
type LzPriceData struct {
|
|
|
- Id string `json:"id"`
|
|
|
- PriceDate string `json:"priceDate"`
|
|
|
- Memo string `json:"memo"`
|
|
|
+ Id string `json:"id"`
|
|
|
+ PriceDate string `json:"priceDate"`
|
|
|
+ Memo string `json:"memo"`
|
|
|
Price string `json:"price"`
|
|
|
CnyPrice string `json:"cnyPrice"`
|
|
|
ZsyPrice string `json:"zsyPrice"`
|
|
@@ -320,7 +324,7 @@ type LzPriceData struct {
|
|
|
RisePrice string `json:"risePrice"`
|
|
|
TonPrice string `json:"tonPrice"`
|
|
|
PriceType string `json:"priceType"`
|
|
|
- UpdateDate string `json:"updateDate"`
|
|
|
+ UpdateDate string `json:"updateDate"`
|
|
|
}
|
|
|
|
|
|
type LzPriceDataResp struct {
|
|
@@ -365,4 +369,22 @@ func GetLongzhongPriceDataById(lzPriceInfoId int) (items []*LongzhongpricedataIt
|
|
|
sql := `SELECT * FROM longzhongpricedata WHERE longzhongpriceinfo_id=? ORDER BY price_date DESC `
|
|
|
_, err = o.Raw(sql, lzPriceInfoId).QueryRows(&items)
|
|
|
return
|
|
|
-}
|
|
|
+}
|
|
|
+
|
|
|
+func ModifyLongzhongpriceinfo(item *Longzhongpriceinfo) (err error) {
|
|
|
+ o := orm.NewOrm()
|
|
|
+ o.Using("edb")
|
|
|
+ sql := `UPDATE longzhongpriceinfo
|
|
|
+SET
|
|
|
+ standard = ?,
|
|
|
+ model_name = ?,
|
|
|
+ unit= ?,
|
|
|
+ area_name=?,
|
|
|
+ price_type = ?,
|
|
|
+ memo = ?,
|
|
|
+ market_name = ?,
|
|
|
+ manufacture_name = ?
|
|
|
+WHERE price_id = ? `
|
|
|
+ _, err = o.Raw(sql, item.Standard, item.ModelName, item.Unit, item.AreaName, item.PriceType, item.Memo, item.MarketName, item.ManufactureName, item.PriceId).Exec()
|
|
|
+ return
|
|
|
+}
|