Commit 775e8ef8 authored by zengtianlai3's avatar zengtianlai3

准备发布版本

parent 3316d7f1
...@@ -12,7 +12,7 @@ import java.io.IOException; ...@@ -12,7 +12,7 @@ import java.io.IOException;
@RestController @RestController
@RequestMapping("/iot_license/resource") @RequestMapping("/resource")
public class ResourceContrller { public class ResourceContrller {
@Autowired @Autowired
......
package iot.sixiang.license.controller; package iot.sixiang.license.controller;
import iot.sixiang.license.model.ResResult;
import iot.sixiang.license.model.SamMonitor; import iot.sixiang.license.model.SamMonitor;
import iot.sixiang.license.operate.OperateManager; import iot.sixiang.license.operate.OperateManager;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -23,7 +24,7 @@ public class SamMapController { ...@@ -23,7 +24,7 @@ public class SamMapController {
public OperateManager operateManager; public OperateManager operateManager;
@GetMapping("count") @GetMapping("count")
public Map<String,Integer> getSamTotalCount() { public ResResult getSamTotalCount() {
Map<String, SamMonitor> samMonitorMap = operateManager.getSamMonitorMap(); Map<String, SamMonitor> samMonitorMap = operateManager.getSamMonitorMap();
Map<String,Integer> map = new HashMap<>(); Map<String,Integer> map = new HashMap<>();
int totalSamCount = 0; int totalSamCount = 0;
...@@ -34,6 +35,6 @@ public class SamMapController { ...@@ -34,6 +35,6 @@ public class SamMapController {
} }
map.put("totalSamCount",totalSamCount); map.put("totalSamCount",totalSamCount);
map.put("totalOnlineCount",totalOnlineCount); map.put("totalOnlineCount",totalOnlineCount);
return map; return ResResult.success().record(map);
} }
} }
...@@ -7,13 +7,14 @@ import iot.sixiang.license.model.ResResult; ...@@ -7,13 +7,14 @@ import iot.sixiang.license.model.ResResult;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import javax.servlet.*; import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@Slf4j @Slf4j
//@WebFilter(filterName = "jwtFilter", urlPatterns = "/iot_license/*") @WebFilter(filterName = "jwtFilter", urlPatterns = "/iot_license/*")
public class JwtFilter implements Filter { public class JwtFilter implements Filter {
......
...@@ -39,7 +39,7 @@ public class ApplyServiceImpl extends ServiceImpl<ApplyMapper, Apply> implements ...@@ -39,7 +39,7 @@ public class ApplyServiceImpl extends ServiceImpl<ApplyMapper, Apply> implements
throw new IotLicenseException(400,"应用key不能为空"); throw new IotLicenseException(400,"应用key不能为空");
} }
if(userId == 0) { if(userId == 0) {
throw new IotLicenseException(400,"用户不能为空"); throw new IotLicenseException(400,"用户Id不能为空");
} }
Apply res = applyMapper.getApplyByAppName(appName); Apply res = applyMapper.getApplyByAppName(appName);
if (res != null) { if (res != null) {
...@@ -56,9 +56,7 @@ public class ApplyServiceImpl extends ServiceImpl<ApplyMapper, Apply> implements ...@@ -56,9 +56,7 @@ public class ApplyServiceImpl extends ServiceImpl<ApplyMapper, Apply> implements
if(pageSize == 0) { if(pageSize == 0) {
throw new IotLicenseException(400, "pageSize不能为空"); throw new IotLicenseException(400, "pageSize不能为空");
} }
if (StringUtils.isEmpty(appName)) {
throw new IotLicenseException(400, "应用名不能为空");
}
List<AppVo> records = applyMapper.getAppList(appName); List<AppVo> records = applyMapper.getAppList(appName);
records = records.stream().sorted(Comparator.comparing(AppVo::getAppId)).collect(Collectors.toList()); records = records.stream().sorted(Comparator.comparing(AppVo::getAppId)).collect(Collectors.toList());
List<AppVo> result = new ArrayList<>(); List<AppVo> result = new ArrayList<>();
......
...@@ -3,9 +3,9 @@ server: ...@@ -3,9 +3,9 @@ server:
spring: spring:
datasource: datasource:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/iot_license?serverTimezone=GMT%2B8 url: jdbc:mysql://rm-wz9w0x7a26q11av687o.mysql.rds.aliyuncs.com:3306/iot_license?serverTimezone=GMT%2B8
username: root username: dada
password: 123456 password: Acc2019123
mybatis-plus: mybatis-plus:
mapper-locations: classpath:/mapper/**.xml mapper-locations: classpath:/mapper/**.xml
type-aliases-package: iot.sixiang.license.entity type-aliases-package: iot.sixiang.license.entity
\ No newline at end of file
...@@ -3,9 +3,9 @@ server: ...@@ -3,9 +3,9 @@ server:
spring: spring:
datasource: datasource:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.1.19:3306/iot_license?serverTimezone=GMT%2B8 url: jdbc:mysql://rm-wz9w0x7a26q11av687o.mysql.rds.aliyuncs.com:3306/iot_license?serverTimezone=GMT%2B8
username: root username: dada
password: 123456 password: Acc2019123
mybatis-plus: mybatis-plus:
mapper-locations: classpath:/mapper/**.xml mapper-locations: classpath:/mapper/**.xml
type-aliases-package: iot.sixiang.license.entity type-aliases-package: iot.sixiang.license.entity
\ No newline at end of file
spring: spring:
profiles: profiles:
active: dev active: test
application: application:
name: iot_license #当前服务的名称 name: iot_license #当前服务的名称
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment