Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
@@ -52,7 +52,10 @@ public class MkDistributionConfigServiceImpl extends ServiceImpl<MkDistributionC
|
||||
public MkDistributionConfigVO detail(Long shopId) {
|
||||
MkDistributionConfig config = getOne(new QueryWrapper().eq(MkDistributionConfig::getShopId, shopId));
|
||||
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);
|
||||
configVO.setLevelConfigList(levelConfigService.list(new QueryWrapper()
|
||||
@@ -74,7 +77,7 @@ public class MkDistributionConfigServiceImpl extends ServiceImpl<MkDistributionC
|
||||
}
|
||||
List<MkDistributionUser> distributionUserList = distributionUserService.list(new QueryWrapper().eq(MkDistributionUser::getShopId, shopId));
|
||||
// 邀请人数变动
|
||||
if (!config.getInviteCount().equals(dto.getInviteCount())) {
|
||||
if (dto.getInviteCount() != null && !config.getInviteCount().equals(dto.getInviteCount())) {
|
||||
distributionUserList.forEach(item -> item.setStatus(item.getInviteCount() >= dto.getInviteCount() ? 1 : 0));
|
||||
distributionUserService.updateBatch(distributionUserList);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@ import org.springframework.stereotype.Service;
|
||||
public class MkEnableConfigServiceImpl extends ServiceImpl<MkEnableConfigMapper, MkEnableConfig> implements MkEnableConfigService{
|
||||
|
||||
@Override
|
||||
@Cacheable(key = "#mainShopId + ':' + #shopId")
|
||||
public MkEnableConfigVO detail(Long mainShopId, Long shopId, TableValueConstant.EnableConfig.Type type) {
|
||||
MkEnableConfig one = getOne(new QueryWrapper().eq(MkEnableConfig::getMainShopId, mainShopId).eq(MkEnableConfig::getType, type.getCode()));
|
||||
if (one == null) {
|
||||
@@ -48,7 +47,6 @@ public class MkEnableConfigServiceImpl extends ServiceImpl<MkEnableConfigMapper,
|
||||
}
|
||||
|
||||
@Override
|
||||
@CacheEvict(key = "#mainShopId + ':' + #shopId")
|
||||
public Boolean upEnable(Long mainShopId, Long shopId, MkEnableConfigDTO dto, TableValueConstant.EnableConfig.Type type) {
|
||||
MkEnableConfig one = getOne(new QueryWrapper().eq(MkEnableConfig::getMainShopId, mainShopId).eq(MkEnableConfig::getType, type.getCode()));
|
||||
if (one == null) {
|
||||
|
||||
Reference in New Issue
Block a user