|
@@ -16,7 +16,11 @@ func GetSkuScheme(engine *xorm.Engine, EnterpriseId string, gids []string) map[i |
|
|
var enterpriseScheme model.SchemeWithEnterprise |
|
|
var enterpriseScheme model.SchemeWithEnterprise |
|
|
engine.Where("enterprise_id=?", EnterpriseId).Get(&enterpriseScheme) |
|
|
engine.Where("enterprise_id=?", EnterpriseId).Get(&enterpriseScheme) |
|
|
if enterpriseScheme.SchemeId > 0 { |
|
|
if enterpriseScheme.SchemeId > 0 { |
|
|
|
|
|
|
|
|
|
|
|
var scheme model.Scheme |
|
|
|
|
|
engine.Where("id=?", enterpriseScheme.SchemeId).Get(&scheme) |
|
|
|
|
|
if scheme.State != 1 { |
|
|
|
|
|
return skuSchemeMap |
|
|
|
|
|
} |
|
|
var skuScheme []model.SchemeWithSku |
|
|
var skuScheme []model.SchemeWithSku |
|
|
engine.In("goods_id", gids).And("scheme_id=?", enterpriseScheme.SchemeId).Find(&skuScheme) |
|
|
engine.In("goods_id", gids).And("scheme_id=?", enterpriseScheme.SchemeId).Find(&skuScheme) |
|
|
for _, v := range skuScheme { |
|
|
for _, v := range skuScheme { |
|
|