Compare commits

..

No commits in common. "afc2e0c292094188320c49daabb4c2ac12851b30" and "5ac81177a5e154646793b78b0be434f514ef3cd3" have entirely different histories.

3 changed files with 6 additions and 40 deletions

View File

@ -240,13 +240,8 @@ public class TbFuseServiceImpl extends CrudServiceImpl<TbFuseDao, TbFuseEntity,
QueryWrapper wrapper = new QueryWrapper();
wrapper.eq("fuse_id", fuseId);
List<TbFuseResourceEntity> list = fuseResourceDao.selectList(wrapper);
result = list.stream().map(index -> {
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));
Map<String, List<TbFuseResourceEntity>> resourceMap = list.stream().filter(index -> index.getType() != null).collect(Collectors.groupingBy(TbFuseResourceEntity::getType));
// resourceMap.forEach((type, value) -> {
// if ("组件服务".equals(type)) {
// result.addAll(value.stream().map(attr -> {

View File

@ -775,25 +775,4 @@ public class TAbilityApplicationController {
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);
}
}

View File

@ -24,18 +24,10 @@
</resultMap>
<select id="getFuseDTOList" resultMap="fuseDTO">
SELECT
tf.*,
count( trc.id ) AS collectCount,
IF
(
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
select tf.*, count(trc.id) as collectCount, if(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 != ''">
and name like concat('%', #{name}, '%')
</if>