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

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

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