分销默认配置
This commit is contained in:
parent
3ea25c831e
commit
02cea05706
|
|
@ -52,7 +52,10 @@ public class MkDistributionConfigServiceImpl extends ServiceImpl<MkDistributionC
|
||||||
public MkDistributionConfigVO detail(Long shopId) {
|
public MkDistributionConfigVO detail(Long shopId) {
|
||||||
MkDistributionConfig config = getOne(new QueryWrapper().eq(MkDistributionConfig::getShopId, shopId));
|
MkDistributionConfig config = getOne(new QueryWrapper().eq(MkDistributionConfig::getShopId, shopId));
|
||||||
if (config == null) {
|
if (config == null) {
|
||||||
return null;
|
config = new MkDistributionConfig();
|
||||||
|
config.setShopId(shopId);
|
||||||
|
save(config);
|
||||||
|
config = getOne(new QueryWrapper().eq(MkDistributionConfig::getShopId, shopId));
|
||||||
}
|
}
|
||||||
MkDistributionConfigVO configVO = BeanUtil.copyProperties(config, MkDistributionConfigVO.class);
|
MkDistributionConfigVO configVO = BeanUtil.copyProperties(config, MkDistributionConfigVO.class);
|
||||||
configVO.setLevelConfigList(levelConfigService.list(new QueryWrapper()
|
configVO.setLevelConfigList(levelConfigService.list(new QueryWrapper()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue