no message
Showing
2 changed files
with
9 additions
and
8 deletions
| ... | @@ -20,6 +20,7 @@ import com.lego.core.service.IBuildingBlockService; | ... | @@ -20,6 +20,7 @@ import com.lego.core.service.IBuildingBlockService; |
| 20 | import com.lego.core.service.IEntiretyService; | 20 | import com.lego.core.service.IEntiretyService; |
| 21 | import io.micrometer.core.instrument.util.StringUtils; | 21 | import io.micrometer.core.instrument.util.StringUtils; |
| 22 | import lombok.RequiredArgsConstructor; | 22 | import lombok.RequiredArgsConstructor; |
| 23 | import org.apache.commons.compress.utils.Lists; | ||
| 23 | import org.springframework.stereotype.Service; | 24 | import org.springframework.stereotype.Service; |
| 24 | import org.springframework.util.CollectionUtils; | 25 | import org.springframework.util.CollectionUtils; |
| 25 | 26 | ||
| ... | @@ -93,18 +94,15 @@ public class BuildingBlockServiceImpl implements IBuildingBlockService { | ... | @@ -93,18 +94,15 @@ public class BuildingBlockServiceImpl implements IBuildingBlockService { |
| 93 | */ | 94 | */ |
| 94 | @Override | 95 | @Override |
| 95 | public List<BuildingBlockVo> list(String language, Collection<String> entiretyIds) { | 96 | public List<BuildingBlockVo> list(String language, Collection<String> entiretyIds) { |
| 96 | if(StringUtils.isBlank(language)) | 97 | List<BuildingBlockVo> list = Lists.newArrayList(); |
| 97 | language = "zh_CN"; | ||
| 98 | if(!CollectionUtils.isEmpty(entiretyIds)) { | 98 | if(!CollectionUtils.isEmpty(entiretyIds)) { |
| 99 | List<BuildingBlockVo> list = baseMapper.selectVoList(Wrappers.<BuildingBlock>lambdaQuery().eq(BuildingBlock::getLanguage, language).in(BuildingBlock::getEntiretyId, entiretyIds)); | 99 | list = baseMapper.selectVoList(Wrappers.<BuildingBlock>lambdaQuery().eq(BuildingBlock::getLanguage, language).in(BuildingBlock::getEntiretyId, entiretyIds)); |
| 100 | setInfo(list); | ||
| 101 | return list; | ||
| 102 | } | 100 | } |
| 103 | else{ | 101 | else{ |
| 104 | List<BuildingBlockVo> list = baseMapper.selectVoList(Wrappers.<BuildingBlock>lambdaQuery().eq(BuildingBlock::getLanguage, language)); | 102 | list = baseMapper.selectVoList(Wrappers.<BuildingBlock>lambdaQuery().eq(BuildingBlock::getLanguage, language)); |
| 105 | setInfo(list); | ||
| 106 | return list; | ||
| 107 | } | 103 | } |
| 104 | setInfo(list); | ||
| 105 | return list; | ||
| 108 | } | 106 | } |
| 109 | 107 | ||
| 110 | /** | 108 | /** | ... | ... |
| ... | @@ -21,6 +21,7 @@ import com.lego.core.mapper.BuildingBlockMapper; | ... | @@ -21,6 +21,7 @@ import com.lego.core.mapper.BuildingBlockMapper; |
| 21 | import com.lego.core.mapper.EntiretyMapper; | 21 | import com.lego.core.mapper.EntiretyMapper; |
| 22 | import com.lego.core.service.IBuildingBlockService; | 22 | import com.lego.core.service.IBuildingBlockService; |
| 23 | import com.lego.core.service.IEntiretyService; | 23 | import com.lego.core.service.IEntiretyService; |
| 24 | import io.micrometer.core.instrument.util.StringUtils; | ||
| 24 | import lombok.RequiredArgsConstructor; | 25 | import lombok.RequiredArgsConstructor; |
| 25 | import org.springframework.stereotype.Service; | 26 | import org.springframework.stereotype.Service; |
| 26 | 27 | ||
| ... | @@ -52,6 +53,8 @@ public class EntiretyServiceImpl implements IEntiretyService { | ... | @@ -52,6 +53,8 @@ public class EntiretyServiceImpl implements IEntiretyService { |
| 52 | */ | 53 | */ |
| 53 | @Override | 54 | @Override |
| 54 | public TableDataInfo<EntiretyVo> listPage(PageQuery query, String language) { | 55 | public TableDataInfo<EntiretyVo> listPage(PageQuery query, String language) { |
| 56 | if(StringUtils.isBlank(language)) | ||
| 57 | language = "zh_CN"; | ||
| 55 | Page<EntiretyVo> page = baseMapper.selectVoPage(query.build(), Wrappers.<Entirety>lambdaQuery() | 58 | Page<EntiretyVo> page = baseMapper.selectVoPage(query.build(), Wrappers.<Entirety>lambdaQuery() |
| 56 | .eq(Entirety::getLanguage, language).orderByAsc(Entirety::getSort)); | 59 | .eq(Entirety::getLanguage, language).orderByAsc(Entirety::getSort)); |
| 57 | /** | 60 | /** | ... | ... |
-
Please register or sign in to post a comment