Procházet zdrojové kódy

作者:张哲
时间:2023/03/27
类型:开发
描述:里程碑(3) 搜索统计-返回值结构修改

zizg před 1 rokem
rodič
revize
3a5ca3848f

+ 7 - 0
src/main/java/com/redxun/knowledge/analysis/controller/AnalysisCommonController.java

@@ -190,6 +190,13 @@ public class AnalysisCommonController {
         return JsonResult.getSuccessResult(map);
     }
 
+    @ApiOperation("各板块访问量分布(UV)")
+    @GetMapping("moduleUserUniqueVisits")
+    public JsonResult moduleUserUniqueVisits(@RequestParam("type") String type){
+
+        return JsonResult.getSuccessResult("");
+    }
+
     @ApiOperation("组织访问量")
     @PostMapping("organizationVisits")
     public JsonPageResult organizationVisits(@RequestBody QueryData queryData){

+ 2 - 0
src/main/java/com/redxun/knowledge/analysis/entity/vo/SystemDetailVisitsVo.java

@@ -20,4 +20,6 @@ public class SystemDetailVisitsVo implements Serializable {
 
     private Double percentage;
 
+    private Integer value;
+
 }

+ 0 - 1
src/main/java/com/redxun/knowledge/analysis/service/AnalysisSearchServiceImpl.java

@@ -43,7 +43,6 @@ public class AnalysisSearchServiceImpl {
      * @return
      */
     public List<SystemDetailVisitsVo> searchSystemDetailVisits(String type) {
-        Map<String, Double> map = new HashMap<>();
         Calendar calendar = Calendar.getInstance();
         int year = calendar.get(Calendar.YEAR);
         List<SystemDetailVisitsVo> result = new ArrayList<>();

+ 1 - 1
src/main/resources/mapper/knowledge/analysis/AnalysisSearchMapper.xml

@@ -3,7 +3,7 @@
 <mapper namespace="com.redxun.knowledge.analysis.mapper.AnalysisSearchMapper">
 
     <select id="searchSystemDetailVisits" resultType="com.redxun.knowledge.analysis.entity.vo.SystemDetailVisitsVo">
-        select PLATFORM as label,round(count(*) / sum(count(*)) over (),2) as percentage from KM_PV_LOG
+        select PLATFORM as label,count(*) as value,round(count(*) / sum(count(*)) over (),2) as percentage from KM_PV_LOG
         <where>
             <if test="firstDay != null and lastDay != null">
                 TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') &gt;= #{firstDay}