This commit is contained in:
苏尹岚
2021-03-17 17:14:57 +08:00
parent f73783b2c9
commit e0a1393eee

View File

@@ -448,10 +448,7 @@ func RefreshStoreManageState(ctx *jxcontext.Context) {
}
storeDetail, _ := dao.GetStoreDetail(db, storeMap.StoreID, vendorID, storeMap.VendorOrgCode)
storeManage := buildStoreManageState(ctx, db, storeMap, storeDetail, messageFlag)
if storeManageStates, err := dao.GetStoreManageStateSimple(db, []int{storeDetail.ID}, nil, vendorID); err == nil && len(storeManageStates) > 0 {
storeManage.ID = storeManageStates[0].ID
dao.CreateEntity(db, storeManage)
}
dao.CreateEntity(db, storeManage)
return retVal, err
}, createList)
tasksch.HandleTask(task3, task, true).Run()
@@ -464,7 +461,10 @@ func RefreshStoreManageState(ctx *jxcontext.Context) {
}
storeDetail, _ := dao.GetStoreDetail(db, storeMap.StoreID, vendorID, storeMap.VendorOrgCode)
storeManage := buildStoreManageState(ctx, db, storeMap, storeDetail, messageFlag)
dao.UpdateEntity(db, storeManage)
if storeManageStates, err := dao.GetStoreManageStateSimple(db, []int{storeDetail.ID}, nil, vendorID); err == nil && len(storeManageStates) > 0 {
storeManage.ID = storeManageStates[0].ID
dao.UpdateEntity(db, storeManage)
}
return retVal, err
}, updateList)
tasksch.HandleTask(task4, task, true).Run()