Compare commits
No commits in common. "e59dbd413d3df556ff19fe7592997bc09f83b944" and "5c8824eaae54d9d6864a17ffd06430250d6f8d82" have entirely different histories.
e59dbd413d
...
5c8824eaae
|
@ -240,13 +240,8 @@ public class TbFuseServiceImpl extends CrudServiceImpl<TbFuseDao, TbFuseEntity,
|
||||||
QueryWrapper wrapper = new QueryWrapper();
|
QueryWrapper wrapper = new QueryWrapper();
|
||||||
wrapper.eq("fuse_id", fuseId);
|
wrapper.eq("fuse_id", fuseId);
|
||||||
List<TbFuseResourceEntity> list = fuseResourceDao.selectList(wrapper);
|
List<TbFuseResourceEntity> list = fuseResourceDao.selectList(wrapper);
|
||||||
result = list.stream().map(index -> {
|
Map<String, List<TbFuseResourceEntity>> resourceMap = list.stream().filter(index -> index.getType() != null).collect(Collectors.groupingBy(TbFuseResourceEntity::getType));
|
||||||
TbFuseResourceDTO dto = new TbFuseResourceDTO();
|
|
||||||
dto.setFuseId(fuseId);
|
|
||||||
BeanUtils.copyProperties(index, dto);
|
|
||||||
return dto;
|
|
||||||
}).collect(Collectors.toList());
|
|
||||||
// Map<String, List<TbFuseResourceEntity>> resourceMap = list.stream().filter(index -> index.getType() != null).collect(Collectors.groupingBy(TbFuseResourceEntity::getType));
|
|
||||||
// resourceMap.forEach((type, value) -> {
|
// resourceMap.forEach((type, value) -> {
|
||||||
// if ("组件服务".equals(type)) {
|
// if ("组件服务".equals(type)) {
|
||||||
// result.addAll(value.stream().map(attr -> {
|
// result.addAll(value.stream().map(attr -> {
|
||||||
|
|
|
@ -775,25 +775,4 @@ public class TAbilityApplicationController {
|
||||||
return new Result().ok(tAbilityApplicationService.getApplyPriceCount());
|
return new Result().ok(tAbilityApplicationService.getApplyPriceCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据能力资源id获取该能力申请使用分页
|
|
||||||
*
|
|
||||||
* @param params
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@GetMapping("page_for_score")
|
|
||||||
@ApiOperation("用于评分的分页")
|
|
||||||
@ApiImplicitParams({@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"),
|
|
||||||
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
|
|
||||||
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
|
||||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
|
|
||||||
@ApiImplicitParam(name = "ended", value = "是否完成(true, false)", paramType = "query", dataType = "String"),
|
|
||||||
@ApiImplicitParam(name = "resourceId", value = "资源id", paramType = "query", dataType = "String")
|
|
||||||
}
|
|
||||||
)
|
|
||||||
public Result<PageData<TAbilityApplicationDTO>> pageForScore(@ApiIgnore @RequestParam Map<String, Object> params) {
|
|
||||||
PageData<TAbilityApplicationDTO> page = tAbilityApplicationService.page(params);
|
|
||||||
return new Result<PageData<TAbilityApplicationDTO>>().ok(page);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -24,18 +24,10 @@
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="getFuseDTOList" resultMap="fuseDTO">
|
<select id="getFuseDTOList" resultMap="fuseDTO">
|
||||||
SELECT
|
select tf.*, count(trc.id) as collectCount, if(sum(trc.user_id=#{userId})>0 , 'true', 'false') as isCollect
|
||||||
tf.*,
|
from tb_fuse tf left join (select id, resource_Id, user_id from tb_resource_collection where 1=1 and del_flag=0)
|
||||||
count( trc.id ) AS collectCount,
|
trc on tf.id=trc.resource_id
|
||||||
IF
|
where 1=1
|
||||||
(
|
|
||||||
sum(
|
|
||||||
trc.user_id = #{userId})>0 , 'true', 'false') as isCollect
|
|
||||||
FROM
|
|
||||||
tb_fuse tf
|
|
||||||
LEFT JOIN ( SELECT id, resource_Id, user_id FROM tb_resource_collection WHERE 1 = 1 AND del_flag = 0 ) trc ON tf.id = trc.resource_id
|
|
||||||
WHERE
|
|
||||||
1 =1
|
|
||||||
<if test="name != null and name != ''">
|
<if test="name != null and name != ''">
|
||||||
and name like concat('%', #{name}, '%')
|
and name like concat('%', #{name}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
|
Loading…
Reference in New Issue