提交 3cd0d458 编写于 作者: lakernote's avatar lakernote

(新增)[整体](修改统计sql)

上级 92d63ea6
...@@ -8,13 +8,11 @@ import java.util.ArrayList; ...@@ -8,13 +8,11 @@ import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
/** /**
* 增加依赖 * 自定义配置
* <dependency> *
* <groupId>org.springframework.boot</groupId> * @author laker
* <artifactId>spring-boot-configuration-processor</artifactId>
* <optional>true</optional>
* </dependency>
*/ */
@Configuration @Configuration
@Data @Data
......
...@@ -23,6 +23,7 @@ import java.io.IOException; ...@@ -23,6 +23,7 @@ import java.io.IOException;
/** /**
* durid 监控页面配置 默认地址 localhost:8080/druid/login.html * durid 监控页面配置 默认地址 localhost:8080/druid/login.html
* @author laker
*/ */
@Configuration @Configuration
@Slf4j @Slf4j
......
...@@ -12,6 +12,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc; ...@@ -12,6 +12,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
/** /**
* ip:port/doc.html * ip:port/doc.html
* @author longli
*/ */
@Configuration @Configuration
@EnableSwagger2WebMvc @EnableSwagger2WebMvc
......
...@@ -12,6 +12,9 @@ import org.springframework.context.annotation.Bean; ...@@ -12,6 +12,9 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile; import org.springframework.context.annotation.Profile;
/**
* @author laker
*/
@Configuration @Configuration
@MapperScan("com.laker.admin.**.mapper") @MapperScan("com.laker.admin.**.mapper")
public class MybatisConfig { public class MybatisConfig {
......
...@@ -24,21 +24,19 @@ public interface ExtLogMapper extends BaseMapper<ExtLog> { ...@@ -24,21 +24,19 @@ public interface ExtLogMapper extends BaseMapper<ExtLog> {
@Select("SELECT\n" + @Select("SELECT\n" +
"\tw.ip,\n" + "\tw.ip,\n" +
"\t( SELECT n.city FROM ext_log n WHERE n.ip = w.ip ORDER BY n.create_time LIMIT 1 ) city,\n" + "\tcity,\n" +
"\tcount( * ) \n" + "\tcount( * ) \n" +
"VALUE\n" + "\tVALUE\t\n" +
"\t\n" +
"FROM\n" + "FROM\n" +
"\text_log w \n" + "\text_log w \n" +
"WHERE\n" + "WHERE\n" +
"\tDATE_SUB( CURDATE( ), INTERVAL 12 HOUR ) <= w.create_time \n" + "\tDATE_SUB( CURDATE( ), INTERVAL 1 day ) <= w.create_time \n" +
"GROUP BY\n" + "GROUP BY\n" +
"\tw.ip \n" + "\tw.ip \n" +
"ORDER BY\n" + "ORDER BY\n" +
"\t\n" + "\t\n" +
"VALUE\n" + "VALUE\n" +
"DESC\n" + "DESC \n" +
"\n" +
"LIMIT 10") "LIMIT 10")
List<LogStatisticsTop10Vo> selectStatisticsVisitsTop10IP(); List<LogStatisticsTop10Vo> selectStatisticsVisitsTop10IP();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册