Commit 775e8ef8 authored by zengtianlai3's avatar zengtianlai3

准备发布版本

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