Merge remote-tracking branch 'origin/feat_chievements_dev' into feat_chievements_dev
This commit is contained in:
commit
fd54700340
|
@ -171,4 +171,12 @@ public class BehaviorImageController extends BaseController {
|
|||
{
|
||||
return AjaxResult.success(behaviorImageService.getActivityStatistic());
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(value = "/getUserBehaviorSum")
|
||||
@ApiOperation("获取用户的所有关注、点赞数")
|
||||
public AjaxResult getUserBehaviorSum(Long userId)
|
||||
{
|
||||
return AjaxResult.success(behaviorImageService.getUserBehaviorSum(userId));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
package com.microservices.dms.behaviorImage.controller;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 区块链Controller
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-04-17
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/blockChain")
|
||||
@Api(tags = "数据产权子系统")
|
||||
public class BlockChainController {
|
||||
//查询所有上链的项目select * from projects where use_blockchain='1'
|
||||
}
|
|
@ -101,4 +101,6 @@ public interface BehaviorImageMapper {
|
|||
List<KeyValueVo> getActivityStatistic();
|
||||
|
||||
List<ActivityUserLibrary> selectActivityUserLibraryListAll(ActivityUserLibrary activityUserLibrary);
|
||||
|
||||
UserTypeTotalVo getUserBehaviorSum(@Param("userId")Long userId);
|
||||
}
|
||||
|
|
|
@ -76,4 +76,6 @@ public interface IBehaviorImageService {
|
|||
UserExpertTotalVo getUserExpertStatistic(Long userId);
|
||||
|
||||
List<KeyValueVo> getActivityStatistic();
|
||||
|
||||
UserTypeTotalVo getUserBehaviorSum(Long userId);
|
||||
}
|
||||
|
|
|
@ -339,4 +339,9 @@ public class BehaviorImageServiceImpl implements IBehaviorImageService {
|
|||
List<ActivityUserLibrary> list = behaviorImageMapper.selectActivityUserLibraryListAll(activityUserLibrary);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserTypeTotalVo getUserBehaviorSum(Long userId) {
|
||||
return behaviorImageMapper.getUserBehaviorSum(userId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -315,4 +315,13 @@
|
|||
inner join experts e on u.id = e.user_id
|
||||
where e.is_delete='0' and e.status = 1
|
||||
</select>
|
||||
|
||||
<select id="getUserBehaviorSum" resultType="com.microservices.dms.behaviorImage.domain.UserTypeTotalVo">
|
||||
select
|
||||
(select count(1) as "resultCount" from watchers where user_id = u.id ) as "watchSum",
|
||||
(select count(1) as "resultCount" from favorites where user_id = u.id ) as "favoriteSum",
|
||||
(select count(1) as "resultCount" from praise_treads where user_id = u.id ) as "praiseSum"
|
||||
from users u
|
||||
where u.id = #{userId}
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue