先生成一个store_sku_bind历史表
This commit is contained in:
@@ -2322,7 +2322,7 @@ func SyncStoresCourierInfo(ctx *jxcontext.Context, storeIDs []int, isAsync, isCo
|
||||
func SyncStoresQualify(ctx *jxcontext.Context, storeIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||
if len(storeIDs) > 0 {
|
||||
db := dao.GetDB()
|
||||
task := tasksch.NewParallelTask(fmt.Sprintf("上传门店资质:%v", storeIDs), tasksch.NewParallelConfig().SetIsContinueWhenError(isContinueWhenError), ctx,
|
||||
task := tasksch.NewParallelTask(fmt.Sprintf("上传门店资质:%v", storeIDs), tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(isContinueWhenError), ctx,
|
||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
vendorID := model.VendorIDJD
|
||||
if handler := partner.GetPurchasePlatformFromVendorID(vendorID).(partner.IStoreSyncQualifyHandler); handler != nil {
|
||||
|
||||
@@ -134,6 +134,58 @@ func (*StoreSkuBind) TableIndex() [][]string {
|
||||
}
|
||||
}
|
||||
|
||||
type StoreSkuBindHistory struct {
|
||||
ModelIDCULD
|
||||
StoreSkuBindID int `orm:"column(store_sku_bind_id)"`
|
||||
StoreID int `orm:"column(store_id)"`
|
||||
SkuID int `orm:"column(sku_id)"`
|
||||
SubStoreID int `orm:"column(sub_store_id)"`
|
||||
Price int // 单位为分,不用int64的原因是这里不需要累加
|
||||
UnitPrice int // 这个是一斤的门店商品价,放在这里的原因是避免额外增加一张store sku_name表,逻辑上要保证同一SKU NAME中的所有SKU这个字段的数据一致
|
||||
Status int
|
||||
|
||||
// ElmID int64 `orm:"column(elm_id);index"`
|
||||
MtwmID int64 `orm:"column(mtwm_id);index"`
|
||||
EbaiID int64 `orm:"column(ebai_id);index"`
|
||||
// WscID int64 `orm:"column(wsc_id);index"` // 表示微盟skuId
|
||||
// WscID2 int64 `orm:"column(wsc_id2);index"` // 表示微盟goodsId
|
||||
|
||||
// ElmSyncStatus int8 `orm:"default(2)"`
|
||||
JdSyncStatus int8 `orm:"default(2)"`
|
||||
MtwmSyncStatus int8 `orm:"default(2)"`
|
||||
EbaiSyncStatus int8 `orm:"default(2)"`
|
||||
// WscSyncStatus int8 `orm:"default(2)"`
|
||||
|
||||
JdPrice int `json:"jdPrice"`
|
||||
MtwmPrice int `json:"mtwmPrice"`
|
||||
EbaiPrice int `json:"ebaiPrice"`
|
||||
JxPrice int `json:"jxPrice"`
|
||||
|
||||
JdLockTime *time.Time `orm:"null" json:"jdLockTime"`
|
||||
MtwmLockTime *time.Time `orm:"null" json:"mtwmLockTime"`
|
||||
EbaiLockTime *time.Time `orm:"null" json:"ebaiLockTime"`
|
||||
JxLockTime *time.Time `orm:"null" json:"jxLockTime"`
|
||||
|
||||
AutoSaleAt time.Time `orm:"type(datetime);null" json:"autoSaleAt"`
|
||||
|
||||
StatusSaleBegin int16 //商品可售时间范围
|
||||
StatusSaleEnd int16
|
||||
|
||||
SnapshotAt time.Time `orm:"type(datetime);null;index" json:"snapshotAt"`
|
||||
}
|
||||
|
||||
func (*StoreSkuBindHistory) TableUnique() [][]string {
|
||||
return [][]string{
|
||||
[]string{"StoreID", "SkuID", "DeletedAt"},
|
||||
}
|
||||
}
|
||||
|
||||
func (*StoreSkuBindHistory) TableIndex() [][]string {
|
||||
return [][]string{
|
||||
[]string{"SkuID", "StoreID", "DeletedAt"},
|
||||
}
|
||||
}
|
||||
|
||||
type StoreOpRequest struct {
|
||||
ModelIDCULD // DeletedAt用于表示请求操作结束,而并不一定是删除
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ func Init() {
|
||||
orm.RegisterModel(&model.Place{})
|
||||
orm.RegisterModel(&model.Store{}, &model.StoreSub{}, &model.StoreMap{}, &model.StoreCourierMap{})
|
||||
orm.RegisterModel(&model.SkuVendorCategory{}, &model.StoreSkuCategoryMap{}, &model.SkuName{}, &model.Sku{}, &model.SkuNamePlaceBind{}, &model.StoreSkuBind{})
|
||||
orm.RegisterModel(&model.StoreSkuBindHistory{})
|
||||
orm.RegisterModel(&model.SkuCategory{})
|
||||
orm.RegisterModel(&model.ThingMap{})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user