列表字段更改
This commit is contained in:
@@ -6,13 +6,17 @@ import com.cool.store.entity.HyPartnerBaseInfoDO;
|
||||
import com.cool.store.mapper.HyOpenAreaInfoMapper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
@@ -85,6 +89,14 @@ public class HyOpenAreaInfoDAO {
|
||||
return hyOpenAreaInfoMapper.selectByIds(ids);
|
||||
}
|
||||
|
||||
public Map<Long, String> selectNameMapByIds(List<Long> ids){
|
||||
if (CollectionUtils.isEmpty(ids)){
|
||||
return Maps.newHashMap();
|
||||
}
|
||||
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOS = hyOpenAreaInfoMapper.selectByIds(ids);
|
||||
return ListUtils.emptyIfNull(hyOpenAreaInfoDOS).stream().collect(Collectors.toMap(k->k.getId(), v->v.getAreaName()));
|
||||
}
|
||||
|
||||
|
||||
public HyOpenAreaInfoDO selectById(Long id){
|
||||
if (id==null){
|
||||
|
||||
Reference in New Issue
Block a user