lyhzzz 2 年之前
父節點
當前提交
c2414c30ce

+ 1 - 1
src/main/java/com/fdkankan/manage/config/SaTokenConfigure.java

@@ -37,7 +37,7 @@ public class SaTokenConfigure {
     public SaServletFilter getSaServletFilter() {
         return new SaServletFilter()
                 // 指定 拦截路由 与 放行路由
-                .addInclude("/**").addExclude("/favicon.ico")
+                .addInclude("/**").addExclude("/favicon.ico","/test/**")
                 // 认证函数: 每次请求执行
                 .setAuth(obj -> {
                     System.out.println("---------- 进入Sa-Token全局认证 -----------");

+ 19 - 0
src/main/java/com/fdkankan/manage/test/TestController.java

@@ -0,0 +1,19 @@
+package com.fdkankan.manage.test;
+
+import com.fdkankan.common.response.ResultData;
+import com.fdkankan.manage.util.Dateutils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+
+@RestController
+public class TestController {
+
+    @RequestMapping("/test")
+    public ResultData test(){
+        String date = Dateutils.getDate(new Date());
+        return ResultData.ok(date);
+    }
+
+}

+ 4 - 4
src/main/resources/mapper/manage/DataMapper.xml

@@ -74,7 +74,7 @@
 
     <select id="sceneGroupBy" resultType="com.fdkankan.manage.vo.response.DataGroupByCount">
         SELECT DATE_FORMAT(create_time,#{dateFormat}) AS groupKey, count(id) AS count ,
-        <if test="tb == 't_scene_pro'">
+        <if test="tb == 't_scene_pro' or tb == 't_scene_plus' ">
             scene_source as groupKey2
         </if>
         <if test="tb == 't_camera_detail'">
@@ -82,7 +82,7 @@
         </if>
         FROM ${tb}
         WHERE rec_status = 'A'
-          <if test="tb == 't_scene_pro'">
+          <if test="tb == 't_scene_pro' or tb == 't_scene_plus' ">
               AND is_upgrade = 0
           </if>
         and create_time between #{startTime} and #{endTime}
@@ -91,7 +91,7 @@
 
     <select id="sceneGroupByWeek" resultType="com.fdkankan.manage.vo.response.DataGroupByCount">
         SELECT groupKey ,count(1) as count,
-        <if test="tb == 't_scene_pro'">
+        <if test="tb == 't_scene_pro' or tb == 't_scene_plus' ">
             scene_source as groupKey2
         </if>
         <if test="tb == 't_camera_detail'">
@@ -99,7 +99,7 @@
         </if>
         FROM (
         select date_format(date_add(create_time,interval-(weekday(create_time ))day),'%Y-%m-%d')  as groupKey,
-        <if test="tb == 't_scene_pro'">
+        <if test="tb == 't_scene_pro' or tb == 't_scene_plus' ">
             scene_source
         </if>
         <if test="tb == 't_camera_detail'">