src/main/java/com/flightfeather/monitor/analysis/dust/RiskAnalysisController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/flightfeather/monitor/controller/dust/RiskValueController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/flightfeather/monitor/mapper/RiskAnalysisMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/flightfeather/monitor/service/RiskAnalysisService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/flightfeather/monitor/service/impl/RiskAnalysisServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/application.yml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/RiskAnalysisMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/flightfeather/monitor/analysis/dust/RiskAnalysisController.java
@@ -1,7 +1,13 @@ package com.flightfeather.monitor.analysis.dust; import com.flightfeather.monitor.service.AnalysisDataService; import org.springframework.beans.factory.annotation.Autowired; /** * æ°æ®é£é©åææ§å¶å¨ */ public class RiskAnalysisController { @Autowired private AnalysisDataService analysisDataService; } src/main/java/com/flightfeather/monitor/controller/dust/RiskValueController.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,33 @@ package com.flightfeather.monitor.controller.dust; import com.flightfeather.monitor.domain.ds1.entity.RiskValue; import com.flightfeather.monitor.pojo.AnalysisData; import com.flightfeather.monitor.pojo.Result; import com.flightfeather.monitor.service.AnalysisDataService; import com.flightfeather.monitor.service.RiskAnalysisService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; @Slf4j @RestController @RequestMapping("/dust/risk") @CrossOrigin public class RiskValueController { @Autowired private RiskAnalysisService riskAnalysisService; /*æ ¹æ®ç«ç¹ååï¼å¯éå¼ï¼ï¼æä»½ï¼ç±»åæ¥è¿åé£é©å¼*/ @GetMapping("/month") public Result queryRiskDataByMonth(String siteName,String month,String type){ List<RiskValue> list =riskAnalysisService.queryRiskDataByMonth(siteName,month,type); return Result.success(list); } } src/main/java/com/flightfeather/monitor/mapper/RiskAnalysisMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,13 @@ package com.flightfeather.monitor.mapper; import com.flightfeather.monitor.domain.ds1.entity.RiskValue; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Select; import java.util.List; @Mapper public interface RiskAnalysisMapper { List<RiskValue> queryRiskDataByMonth(String siteName,String month, String type); } src/main/java/com/flightfeather/monitor/service/RiskAnalysisService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,9 @@ package com.flightfeather.monitor.service; import com.flightfeather.monitor.domain.ds1.entity.RiskValue; import java.util.List; public interface RiskAnalysisService { List<RiskValue> queryRiskDataByMonth(String siteName,String month,String type); } src/main/java/com/flightfeather/monitor/service/impl/RiskAnalysisServiceImpl.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,21 @@ package com.flightfeather.monitor.service.impl; import com.flightfeather.monitor.domain.ds1.entity.RiskValue; import com.flightfeather.monitor.mapper.RiskAnalysisMapper; import com.flightfeather.monitor.service.RiskAnalysisService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @Service public class RiskAnalysisServiceImpl implements RiskAnalysisService { @Autowired private RiskAnalysisMapper riskAnalysisMapper; @Override public List<RiskValue> queryRiskDataByMonth(String siteName,String month,String type) { List<RiskValue> list = riskAnalysisMapper.queryRiskDataByMonth(siteName,month,type); return list; } } src/main/resources/application.yml
@@ -6,17 +6,17 @@ # username: fume # password: fume_feiyu2023 # url: jdbc:mysql://localhost:3306/qianduan_sql # username: root # password: 1234 url: jdbc:mysql://localhost:3306/qianduan_sql username: root password: 1234 # url: jdbc:mysql://localhost:3306/fume # username: root # password: 123456 url: jdbc:mysql://114.215.109.124:3306/fume username: fumeRemote password: feiyu2023 # url: jdbc:mysql://114.215.109.124:3306/fume # username: fumeRemote # password: feiyu2023 mybatis: configuration: src/main/resources/mapper/RiskAnalysisMapper.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,42 @@ <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.flightfeather.monitor.mapper.RiskAnalysisMapper"> <select id="queryRiskDataByMonth" resultType="com.flightfeather.monitor.domain.ds1.entity.RiskValue"> select b.name,a.* from du_js_t_risk_value as a join ja_t_dust_site_info as b on a.mn_code = b.mn_code <where> <if test="siteName != null and siteName != '' "> b.name = #{siteName} </if> <if test="month != null and month != '' "> and a.lst = #{month} </if> <if test="type != null and type != '' "> and a.type = #{type} </if> </where> </select> </mapper>