Merge branch 'mark' into su
This commit is contained in:
@@ -123,12 +123,14 @@ type StoreSkuBindInfo struct {
|
||||
|
||||
type tStoreSkuBindAndSpec struct {
|
||||
model.StoreSkuBind
|
||||
Name string
|
||||
SpecQuality float32
|
||||
SpecUnit string
|
||||
SkuNamePrice int
|
||||
SkuNameUnit string
|
||||
RealSkuID int `orm:"column(real_sku_id)"`
|
||||
SkuStatus int
|
||||
SkuNameStatus int
|
||||
Name string
|
||||
SpecQuality float32
|
||||
SpecUnit string
|
||||
SkuNamePrice int
|
||||
SkuNameUnit string
|
||||
RealSkuID int `orm:"column(real_sku_id)"`
|
||||
}
|
||||
|
||||
type SkuSaleInfo struct {
|
||||
@@ -924,12 +926,12 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
|
||||
sql := `
|
||||
SELECT
|
||||
t2.*,
|
||||
t1.id real_sku_id, t1.spec_quality, t1.spec_unit,`
|
||||
t1.id real_sku_id, t1.status sku_status, t1.spec_quality, t1.spec_unit,`
|
||||
if needGetExistingUnitPrice {
|
||||
sql += " IF(t5.unit_price > 0, t5.unit_price, t3.price) sku_name_price,"
|
||||
}
|
||||
sql += `
|
||||
t3.unit sku_name_unit, t3.name
|
||||
t3.unit sku_name_unit, t3.name, t3.status sku_name_status
|
||||
FROM sku t1
|
||||
JOIN store ts ON ts.id = ? AND ts.deleted_at = ?
|
||||
LEFT JOIN store_sku_bind t2 ON t2.sku_id = t1.id AND t2.store_id = ts.id AND t2.deleted_at = ?
|
||||
@@ -982,7 +984,7 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
|
||||
// globals.SugarLogger.Debug(utils.Format4Output(inSkuBind, false))
|
||||
var skuBind *model.StoreSkuBind
|
||||
if v.ID == 0 {
|
||||
if skuBindInfo.IsFocus == 1 {
|
||||
if skuBindInfo.IsFocus == 1 && v.SkuNameStatus == model.SkuStatusNormal && v.SkuStatus == model.SkuStatusNormal {
|
||||
skuBind = &model.StoreSkuBind{
|
||||
StoreID: storeID,
|
||||
SkuID: v.RealSkuID,
|
||||
|
||||
Reference in New Issue
Block a user