feat:装修团队配置
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.dao.decoration;
|
||||
|
||||
import com.cool.store.dto.decoration.DecorationTeamDTO;
|
||||
import com.cool.store.entity.decoration.DecorationTeamConfigDO;
|
||||
import com.cool.store.mapper.decoration.DecorationTeamConfigMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
@@ -33,5 +34,9 @@ public class DecorationTeamConfigDAO {
|
||||
return decorationTeamConfigMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public List<DecorationTeamDTO> listByCondition(){
|
||||
return decorationTeamConfigMapper.listByCondition();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.dao.decoration;
|
||||
|
||||
import com.aliyun.openservices.shade.com.google.common.collect.Maps;
|
||||
import com.cool.store.dto.decoration.TeamAreaMappingDTO;
|
||||
import com.cool.store.entity.decoration.TeamAreaMappingDO;
|
||||
import com.cool.store.mapper.decoration.TeamAreaMappingMapper;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
@@ -7,6 +9,8 @@ import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
@@ -47,6 +51,14 @@ public class TeamAreaMappingDAO {
|
||||
}
|
||||
|
||||
|
||||
public Map<Long, List<TeamAreaMappingDTO>> listByTeamIdList(List<Long> teamIdList){
|
||||
if (CollectionUtils.isEmpty(teamIdList)){
|
||||
return Maps.newHashMap();
|
||||
}
|
||||
List<TeamAreaMappingDTO> teamAreaMappingDTOS = teamAreaMappingMapper.listByTeamIdList(teamIdList);
|
||||
Map<Long, List<TeamAreaMappingDTO>> map = teamAreaMappingDTOS.stream().collect(Collectors.groupingBy(TeamAreaMappingDTO::getTeamId));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,20 @@
|
||||
package com.cool.store.mapper.decoration;
|
||||
|
||||
import com.cool.store.dto.decoration.DecorationTeamDTO;
|
||||
import com.cool.store.entity.decoration.DecorationTeamConfigDO;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface DecorationTeamConfigMapper extends Mapper<DecorationTeamConfigDO> {
|
||||
|
||||
|
||||
/**
|
||||
* 查询团队
|
||||
* @return
|
||||
*/
|
||||
List<DecorationTeamDTO> listByCondition();
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -13,4 +13,15 @@
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="deleted" jdbcType="TINYINT" property="deleted" />
|
||||
</resultMap>
|
||||
|
||||
<select id="listByCondition" resultType="com.cool.store.dto.decoration.DecorationTeamDTO">
|
||||
select
|
||||
t.id,
|
||||
t.team_name,
|
||||
t.team_code,
|
||||
t.use_system
|
||||
from
|
||||
zxjp_decoration_team_config
|
||||
where deleted = 0
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user