forked from Gitlink/microservices
feat(数据统计):创客任务总浏览量统计
This commit is contained in:
parent
24ecd3953c
commit
15bbfc6d2d
|
|
@ -16,6 +16,8 @@ public class MakerSpaceTotalDataVo {
|
|||
|
||||
private float paidAwardAmount;
|
||||
|
||||
private int totalVisits;
|
||||
|
||||
private List<Object> taskPublishedCountsByYear;
|
||||
|
||||
private List<Object> taskBountyCountsByYear;
|
||||
|
|
|
|||
|
|
@ -46,4 +46,6 @@ public interface TasksMapper{
|
|||
Map<String, String> getTaskStatisticsByStatus(@Param("status") Integer status);
|
||||
|
||||
List<Map<String, String>> getTaskUserOperLogTopN(@Param("topNum") Integer topNum, @Param("taskLogOperations") String[] taskLogOperations);
|
||||
|
||||
int getTotalVisits();
|
||||
}
|
||||
|
|
@ -42,6 +42,7 @@ public class TasksServiceImpl implements ITasksService {
|
|||
makerSpaceTotalDataVo.setTotalApplicants(tasksMapper.getTotalApplicantCount());
|
||||
makerSpaceTotalDataVo.setCurrentTotalAwardAmount(tasksMapper.getCurrentTotalAwardAmount()/10000);
|
||||
makerSpaceTotalDataVo.setPaidAwardAmount(tasksMapper.getPaidAwardAmount()/10000);
|
||||
makerSpaceTotalDataVo.setTotalVisits(tasksMapper.getTotalVisits());
|
||||
makerSpaceTotalDataVo.setTaskPublishedCountsByYear(tasksMapper.getTaskPublishedCountsByYear());
|
||||
makerSpaceTotalDataVo.setTaskBountyCountsByYear(tasksMapper.getTaskBountyCountsByYear());
|
||||
return makerSpaceTotalDataVo;
|
||||
|
|
|
|||
|
|
@ -208,10 +208,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
GROUP BY publish_mode
|
||||
</select>
|
||||
<select id="getPaidAwardAmount" resultType="java.lang.Float">
|
||||
SELECT SUM(bounty)
|
||||
SELECT COALESCE(SUM(bounty), 0) AS total_bounty
|
||||
FROM tasks
|
||||
WHERE is_delete = 0 AND `status` = 8 and except_closed_boolean = 0;
|
||||
</select>
|
||||
<select id="getTotalVisits" resultType="java.lang.Integer">
|
||||
SELECT COALESCE(SUM(visits), 0) AS total_visits
|
||||
FROM tasks
|
||||
WHERE is_delete = 0;
|
||||
</select>
|
||||
<select id="getTaskStatisticsByStatus" resultType="java.util.Map">
|
||||
<if test = "status == 3">
|
||||
select '成果征集中' AS status,sub1.total_tasks, sub1.total_bounty, sub2.total_applied_papers
|
||||
|
|
|
|||
Loading…
Reference in New Issue