开启缓存,殷老师的本地启动数据库修改

This commit is contained in:
朱豫宸 2025-04-28 17:58:18 +08:00
parent a4108d591e
commit 3d9db587cd
11 changed files with 9244 additions and 45 deletions

File diff suppressed because it is too large Load Diff

View File

@ -91,6 +91,13 @@
<classifier>all</classifier>
</dependency>
<!-- Mysql驱动包 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.28</version>
</dependency>
<!-- JWT 工具库 -->
<dependency>
<groupId>io.jsonwebtoken</groupId>

View File

@ -156,13 +156,13 @@ public class ShiroConfig {
filterMap.put("/**/*.js", "anon");
// 后端接口
//todo 关闭jwt
// filterMap.put("/**", "jwt,authc");
// filterMap.put("/**", "login,authc");
// filterMap.put("/ZHZS/GetTitleScore*", "dapingCache");
// filterMap.put("/TongJi/zhutiqiyefugailv*", "dapingCache");
// filterMap.put("/CCKH/GetKaoHeLv*", "dapingCache");
filterMap.put("/**", "login");
// todo 关闭登录验证发布的时候要打开
// filterMap.put("/**", "login");
// filterMap.put("/**", "jwt");
// 授权过滤器

View File

@ -39,6 +39,7 @@ public class CCKHController {
//统计模块-抽查考核
@GetMapping("/GetKaoHeLv")
@ApiOperation(value = "抽查考核考核率")
@DapingCache(isEnableCache = true)
@Log(title = "抽查考核考核率", businessType = BusinessType.SELECT)
public Object GetKaoHe(String wherestr) {
AllQuery xinXiZhuiSuQuery = JSONUtil.toBean(wherestr, AllQuery.class);
@ -50,6 +51,7 @@ public class CCKHController {
@GetMapping("/kaoHeLvExport")
@ApiOperation(value = "抽查考核及相关结果导出")
@DapingCache(isEnableCache = true)
@Log(title = "抽查考核及相关结果导出", businessType = BusinessType.EXPORT)
public void kaoHeLvExport(String wherestr, HttpServletResponse response) {
AllQuery xinXiZhuiSuQuery = JSONUtil.toBean(wherestr, AllQuery.class);
@ -64,7 +66,7 @@ public class CCKHController {
@GetMapping("/GetKaoHeDaPing")
@ApiOperation(value = "抽查考核大屏主界面")
@Log(title = "抽查考核(大屏)", businessType = BusinessType.SELECT)
// @DapingCache(isEnableCache = false)
@DapingCache(isEnableCache = true)
public ZR<List<CCKHVo>> GetKaoHeDaPing(String hj, String szqx, String month) {
// szqx = Util.setSzqxFromUserName(szqx);
String startMonth = ObjectUtils.isEmpty(month) ? "1" : month;
@ -75,10 +77,10 @@ public class CCKHController {
return cckhDataService.getKaoHeDaPing(hj, szqx, start, end);
}
//追溯信息
@GetMapping("/GetScoreByHuanJie")
@Log(title = "追溯信息根据环节获取成绩", businessType = BusinessType.SELECT)
@DapingCache(isEnableCache = false)
@DapingCache(isEnableCache = true)
public Object GetScoreByHuanJie(String szqx, String month) {
String startMonth = ObjectUtils.isEmpty(month) ? "1" : month;
String endMonth = ObjectUtils.isEmpty(month) ? "12" : month;

View File

@ -139,7 +139,7 @@ public class TSJBController {
@GetMapping("/GetTouSuLvDaPing")
@ApiOperation(value = "投诉举报(大屏演示)")
@Log(title = "投诉举报(大屏演示)", businessType = BusinessType.SELECT)
@DapingCache(isEnableCache = false)
@DapingCache(isEnableCache = true)
public ZR<List<TouSuJuBaoLv>> GetTouSuLvDaPing(String hj, String szqx, String month) {
// String userName = BaseContext.getUserName();
// if (Tools.isNotEmpty(userName) && userName.contains("")) {
@ -156,7 +156,7 @@ public class TSJBController {
@GetMapping("/GetTouSuLvDaPingStreet")
@ApiOperation(value = "投诉举报(大屏演示)街道")
@Log(title = "投诉举报(大屏)街道", businessType = BusinessType.SELECT)
@DapingCache(isEnableCache = false)
@DapingCache(isEnableCache = true)
public ZR<List<TouSuJuBaoLv>> GetTouSuLvDaPingStreet(String hj, String szqx, String month,String street) {
String startMonth = ObjectUtils.isEmpty(month) ? "1" : month;
String endMonth = ObjectUtils.isEmpty(month) ? "12" : month;
@ -169,7 +169,7 @@ public class TSJBController {
//投诉举报
@GetMapping("/GetScoreByHuanJie")
@Log(title = "投诉举报根据环节获取成绩", businessType = BusinessType.SELECT)
@DapingCache(isEnableCache = false)
@DapingCache(isEnableCache = true)
public Object GetScoreByHuanJie(String szqx, String month) {
String startMonth = ObjectUtils.isEmpty(month) ? "1" : month;
String endMonth = ObjectUtils.isEmpty(month) ? "12" : month;

View File

@ -334,7 +334,7 @@ public class TongJiController {
/// 查询合格率统计信息20231021Add
@GetMapping("/TongJi/GetTongJiHeGeLvDaPing")
@Log(title = "抽检监测(大屏)", businessType = BusinessType.SELECT)
@DapingCache(isEnableCache = false)
@DapingCache(isEnableCache = true)
public ZR<List<TongJiHeGeLv>> GetTongJiHeGeLvDaPing(String hj, String szqx, String month) {
// String userName = BaseContext.getUserName();
@ -353,7 +353,7 @@ public class TongJiController {
/// 查询合格率统计信息20231021Add
@GetMapping("/TongJi/GetTongJiHeGeLvDaPingStreet")
@Log(title = "抽检监测(大屏)街道", businessType = BusinessType.SELECT)
@DapingCache(isEnableCache = false)
@DapingCache(isEnableCache = true)
public ZR<List<TongJiHeGeLv>> GetTongJiHeGeLvDaPingStreet(String hj, String szqx, String month,String street) {
// String userName = BaseContext.getUserName();
@ -453,7 +453,7 @@ public class TongJiController {
@GetMapping("/CJJC/GetScoreByHuanJie")
@Log(title = "抽检监测根据环节获取成绩", businessType = BusinessType.SELECT)
@DapingCache(isEnableCache = false)
@DapingCache(isEnableCache = true)
public Object GetScoreByHuanJie(String szqx, String month) {
String startMonth = ObjectUtils.isEmpty(month) ? "1" : month;
String endMonth = ObjectUtils.isEmpty(month) ? "12" : month;

View File

@ -69,7 +69,7 @@ public class XXZSController {
@GetMapping("/GetZhuiSuDaPing")
@ApiOperation(value = "信息追溯(大屏)")
@Log(title = "信息追溯(大屏)", businessType = BusinessType.SELECT)
@DapingCache(isEnableCache = false)
@DapingCache(isEnableCache = true)
public Object GetZhuiSuDaPing(String hj, String szqx, String month) {
String startMonth = ObjectUtils.isEmpty(month) ? "1" : month;
String endMonth = ObjectUtils.isEmpty(month) ? "12" : month;
@ -83,7 +83,7 @@ public class XXZSController {
@GetMapping("/GetZhuiSuDaPingStreet")
@ApiOperation(value = "信息追溯(大屏)街道")
@Log(title = "信息追溯(大屏)街道", businessType = BusinessType.SELECT)
@DapingCache(isEnableCache = false)
@DapingCache(isEnableCache = true)
public Object GetZhuiSuDaPingStreet(String hj, String szqx, String month,String street) {
String startMonth = ObjectUtils.isEmpty(month) ? "1" : month;
String endMonth = ObjectUtils.isEmpty(month) ? "12" : month;
@ -95,7 +95,7 @@ public class XXZSController {
@GetMapping("/GetScoreByHuanJie")
@Log(title = "追溯信息根据环节获取成绩", businessType = BusinessType.SELECT)
@DapingCache(isEnableCache = false)
@DapingCache(isEnableCache = true)
public Object GetScoreByHuanJie(String szqx, String month) {
String startMonth = ObjectUtils.isEmpty(month) ? "1" : month;
String endMonth = ObjectUtils.isEmpty(month) ? "12" : month;

View File

@ -95,7 +95,7 @@ public class XZCFController {
//统计模块-行政处罚
@GetMapping("/GetFaShengLvDaPing")
@Log(title = "行政处罚(大屏)", businessType = BusinessType.SELECT)
@DapingCache(isEnableCache = false)
@DapingCache(isEnableCache = true)
public Map<String, Object> GetFaShengLvDaPing(String hj, String szqx, String month) {
// String userName = BaseContext.getUserName();
// if (Tools.isNotEmpty(userName) && userName.contains("")) {
@ -114,7 +114,7 @@ public class XZCFController {
//统计模块-行政处罚
@GetMapping("/GetFaShengLvDaPingStreet")
@Log(title = "行政处罚(大屏)街道", businessType = BusinessType.SELECT)
@DapingCache(isEnableCache = false)
@DapingCache(isEnableCache = true)
public Map<String, Object> GetFaShengLvDaPingStreet(String hj, String szqx, String month,String street) {
// String userName = BaseContext.getUserName();
// if (Tools.isNotEmpty(userName) && userName.contains("")) {
@ -152,7 +152,7 @@ public class XZCFController {
@GetMapping("/GetScoreByHuanJie")
@Log(title = "行政处罚根据环节获取成绩", businessType = BusinessType.SELECT)
@DapingCache(isEnableCache = false)
@DapingCache(isEnableCache = true)
public Object GetScoreByHuanJie(String szqx, String month) {
String startMonth = ObjectUtils.isEmpty(month) ? "1" : month;
String endMonth = ObjectUtils.isEmpty(month) ? "12" : month;

View File

@ -59,7 +59,7 @@ public class ZFJCController {
//统计模块-执法检查
@GetMapping("/GetWenTiLvDaPing")
@Log(title = "执法检查(大屏)", businessType = BusinessType.SELECT)
@DapingCache(isEnableCache = false)
@DapingCache(isEnableCache = true)
public Object GetWenTiLvDaPing(String hj, String szqx, String month) {
String startMonth = ObjectUtils.isEmpty(month) ? "1" : month;
String endMonth = ObjectUtils.isEmpty(month) ? "12" : month;
@ -72,7 +72,7 @@ public class ZFJCController {
//执法检查 大屏 街道
@GetMapping("/GetWenTiLvDaPingStreet")
@Log(title = "执法检查(大屏)街道", businessType = BusinessType.SELECT)
@DapingCache(isEnableCache = false)
@DapingCache(isEnableCache = true)
public Object GetWenTiLvDaPingStreet(String hj, String szqx, String month,String street) {
String startMonth = ObjectUtils.isEmpty(month) ? "1" : month;
String endMonth = ObjectUtils.isEmpty(month) ? "12" : month;
@ -84,7 +84,7 @@ public class ZFJCController {
@GetMapping("/GetScoreByHuanJie")
@Log(title = "执法检查据环节获取成绩", businessType = BusinessType.SELECT)
@DapingCache(isEnableCache = false)
@DapingCache(isEnableCache = true)
public Object GetScoreByHuanJie(String szqx, String month) {
String startMonth = ObjectUtils.isEmpty(month) ? "1" : month;
String endMonth = ObjectUtils.isEmpty(month) ? "12" : month;

View File

@ -53,7 +53,7 @@ public class ZHZSController {
@GetMapping("/GetScoreNew")
@ApiOperation(value = "综合指数各区分数大屏,计算分数", notes = "返回各区的各个维度的分数,以及总分")
@Log(title = "综合指数各区分数大屏,计算分数", businessType = BusinessType.SELECT)
@DapingCache(isEnableCache = false)
@DapingCache(isEnableCache = true)
public R<List<DaPingScoreQX>> getCountyMapScore(String hj, String szqx, String month) throws ParseException {
String startMonth = ObjectUtils.isEmpty(month) ? "1" : month;
String endMonth = ObjectUtils.isEmpty(month) ? "12" : month;
@ -71,7 +71,7 @@ public class ZHZSController {
@GetMapping("/GetScoreNewStreet")
@ApiOperation(value = "综合指数各街道分数大屏,计算分数", notes = "返回各区的各个维度的分数,以及总分")
@Log(title = "综合指数各街道分数大屏,计算分数", businessType = BusinessType.SELECT)
@DapingCache(isEnableCache = false)
@DapingCache(isEnableCache = true)
public R<List<DaPingScoreQX>> getStreetMapScore(String hj, String szqx, String month) throws ParseException {
String startMonth = ObjectUtils.isEmpty(month) ? "1" : month;
String endMonth = ObjectUtils.isEmpty(month) ? "12" : month;
@ -84,6 +84,28 @@ public class ZHZSController {
return R.success(zhzsService.getStreetMapScore(hj, szqx, startTime, endTime));
}
//街道分数大屏
@GetMapping("/GetScoreNewStreetAndShanghai")
@ApiOperation(value = "综合指数各街道分数大屏,计算分数", notes = "返回各区的各个维度的分数,以及总分")
@Log(title = "综合指数各街道分数大屏,计算分数", businessType = BusinessType.SELECT)
@DapingCache(isEnableCache = true)
public R<List<DaPingScoreQX>> getScoreStreetAndShanghai(String hj, String szqx, String month) throws ParseException {
String startMonth = ObjectUtils.isEmpty(month) ? "1" : month;
String endMonth = ObjectUtils.isEmpty(month) ? "12" : month;
//开始时间不用
String start = "2023/" + startMonth + "/1";
String end = "2023/" + endMonth + "/31";
DateTimeFormatter dateString = DateTimeFormatter.ofPattern("yyyy/M/d");
LocalDate startTime = !ObjectUtils.isEmpty(start) ? LocalDate.parse(start, dateString) : null;
LocalDate endTime = !ObjectUtils.isEmpty(end) ? LocalDate.parse(end, dateString) : null;
if (szqx.equals("上海市")) {
return R.success(zhzsService.getCountyMapScore(hj, szqx, startTime, endTime));
} else{
return R.success(zhzsService.getStreetMapScore(hj, szqx, startTime, endTime));
}
// return R.success(zhzsService.getStreetMapScore(hj, szqx, startTime, endTime));
}
//街道分数大屏
@GetMapping("/getStreetMapScoreExport")
@ -97,7 +119,7 @@ public class ZHZSController {
@GetMapping("/GetTitleScore")
@ApiOperation(value = "计算标题分数", notes = "计算当前条件下的总分(不受区县条件影响)")
@Log(title = "计算标题分数", businessType = BusinessType.SELECT)
@DapingCache(isEnableCache = false)
@DapingCache(isEnableCache = true)
public R<BigDecimal> GetTitleScoreNew(String hj, String szqx, String month) {
// szqx = Util.setSzqxFromUserName(szqx);
String startMonth = ObjectUtils.isEmpty(month) ? "1" : month;
@ -117,7 +139,7 @@ public class ZHZSController {
//综合性指标 大屏综合指数
@GetMapping("/GetZHScoreDaPing")
@Log(title = "综合性指标 大屏", businessType = BusinessType.SELECT)
@DapingCache(isEnableCache = false)
@DapingCache(isEnableCache = true)
public ZR<List<ZhData>> GetZHScoreDaPing(String szqx) {
// szqx = Util.setSzqxFromUserName(szqx);
String year = "2023";

View File

@ -11,20 +11,22 @@ spring:
strict: false
datasource:
db1:
url: jdbc:dm://localhost:5236?clobAsString=true
username: BL
password: asd159159
driver-class-name: dm.jdbc.driver.DmDriver
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/buliang?characterEncoding=utf-8&useSSL=false
username: root
password: root
# db2:
# url: jdbc:clickhouse://192.168.1.128:8123
# username: default
# password: ""
# driver-class-name: com.clickhouse.jdbc.ClickHouseDriver
db2:
url: jdbc:clickhouse://192.168.1.128:8124
username: default
password: default
driver-class-name: com.clickhouse.jdbc.ClickHouseDriver
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/buliang?characterEncoding=utf-8&useSSL=false
username: root
password: root
hikari:
connection-timeout: 120000
jackson: