- 拉取平台信息时,存储平台门店名

This commit is contained in:
gazebo
2019-09-03 08:55:28 +08:00
parent 4e617f4ef5
commit 0f69e9b51e
2 changed files with 12 additions and 9 deletions

View File

@@ -1436,6 +1436,7 @@ func GetStoresVendorSnapshot(ctx *jxcontext.Context, parentTask tasksch.ITask, v
CloseTime2: store.CloseTime2, CloseTime2: store.CloseTime2,
DeliveryType: store.DeliveryType, DeliveryType: store.DeliveryType,
StoreName: store.Name,
}} }}
} }
} }
@@ -1481,8 +1482,8 @@ func updateVendorStoreStatusBySnapshot(db *dao.DaoDB, curSnapshotList []*model.V
(v.Status != snapshot.Status || v.DeliveryType != snapshot.DeliveryType) { (v.Status != snapshot.Status || v.DeliveryType != snapshot.DeliveryType) {
v.Status = snapshot.Status v.Status = snapshot.Status
v.DeliveryType = snapshot.DeliveryType v.DeliveryType = snapshot.DeliveryType
v.LastOperator = model.AdminName v.StoreName = snapshot.StoreName
if _, err = dao.UpdateEntity(db, v, model.FieldLastOperator, model.FieldUpdatedAt, model.FieldStatus, "DeliveryType"); err != nil { if _, err = dao.UpdateEntity(db, v, model.FieldStatus, "DeliveryType", "StoreName"); err != nil {
return err return err
} }
} }

View File

@@ -357,6 +357,7 @@ type StoreMap struct {
VendorID int `orm:"column(vendor_id)" json:"vendorID"` VendorID int `orm:"column(vendor_id)" json:"vendorID"`
VendorStoreID string `orm:"column(vendor_store_id);size(48)" json:"vendorStoreID"` VendorStoreID string `orm:"column(vendor_store_id);size(48)" json:"vendorStoreID"`
Status int `json:"status"` // 取值同Store.Status Status int `json:"status"` // 取值同Store.Status
StoreName string `orm:"size(255)" json:"storeName"` // 平台门店的名字
PricePercentage int16 `orm:"default(100)" json:"pricePercentage"` // todo 厂商价格相对于本地价格的百分比,这个字段的修改会比较特殊,因为可能需要刷新厂商价格 PricePercentage int16 `orm:"default(100)" json:"pricePercentage"` // todo 厂商价格相对于本地价格的百分比,这个字段的修改会比较特殊,因为可能需要刷新厂商价格
PricePercentagePack string `orm:"size(32)" json:"pricePercentagePack"` // PricePercentagePack string `orm:"size(32)" json:"pricePercentagePack"` //
@@ -410,6 +411,7 @@ type VendorStoreSnapshot struct {
OpenTime2 int16 `json:"openTime2"` // 格式同上 OpenTime2 int16 `json:"openTime2"` // 格式同上
CloseTime2 int16 `json:"closeTime2"` // 格式同上 CloseTime2 int16 `json:"closeTime2"` // 格式同上
DeliveryType int8 `orm:"default(0)" json:"deliveryType"` // 配送类型 DeliveryType int8 `orm:"default(0)" json:"deliveryType"` // 配送类型
StoreName string `orm:"size(255)" json:"storeName"` // 平台门店的名字
} }
func (*VendorStoreSnapshot) TableUnique() [][]string { func (*VendorStoreSnapshot) TableUnique() [][]string {