根据excel刷新京西价

This commit is contained in:
苏尹岚
2019-12-10 17:20:49 +08:00
parent 04ab485bd7
commit ed67833601
3 changed files with 77 additions and 3 deletions

View File

@@ -1050,6 +1050,22 @@ func RefershStoreSkusMidPrice(db *DaoDB, storeIDs []int) (count int64, err error
return ExecuteSQL(db, sql, sqlParams)
}
func GetStoreSkuNamePrice(db *DaoDB) (storeSkuNamePriceList []*model.StoreSkuNamePrice, err error) {
sql := `
SELECT *
FROM store_sku_name_price
WHERE deleted_at = ?
`
sqlParams := []interface{}{
utils.DefaultTimeValue,
}
err = GetRows(db, &storeSkuNamePriceList, sql, sqlParams...)
if err != nil {
return nil,err
}
return storeSkuNamePriceList, err
}
func SetStoreSkuBindVendorPrice(storeSkuBind *model.StoreSkuBind, vendorID int, vendorPrice int) {
switch vendorID {
case model.VendorIDJD:

View File

@@ -495,13 +495,13 @@ type StoreSkuNamePrice struct {
func (*StoreSkuNamePrice) TableUnique() [][]string {
return [][]string{
[]string{"Name", "NameIDGroup"},
[]string{"OutSkuID", "Price", "NameIDGroup"},
}
}
func (*StoreSkuNamePrice) TableIndex() [][]string {
return [][]string{
[]string{"Name"},
[]string{"OutSkuID"},
}
}