获取上传频率数据接口
This commit is contained in:
parent
01e4e20284
commit
495c864d0b
@ -48,6 +48,14 @@ public class CaptchaController
|
|||||||
return AjaxResult.success(configService.selectSystemName());
|
return AjaxResult.success(configService.selectSystemName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取上传频率
|
||||||
|
*/
|
||||||
|
@GetMapping("/sharedKeys")
|
||||||
|
public AjaxResult getSharedKeys() {
|
||||||
|
return AjaxResult.success(configService.selectSharedKeys());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成验证码
|
* 生成验证码
|
||||||
*/
|
*/
|
||||||
|
@ -109,7 +109,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
|||||||
// 过滤请求
|
// 过滤请求
|
||||||
.authorizeRequests()
|
.authorizeRequests()
|
||||||
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
|
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
|
||||||
.antMatchers("/login", "/register", "/captchaImage","/systemName").anonymous()
|
.antMatchers("/login", "/register", "/captchaImage","/systemName","/sharedKeys").anonymous()
|
||||||
// 数据接收接口,允许匿名访问
|
// 数据接收接口,允许匿名访问
|
||||||
.antMatchers("/ipc/dataReceive/plcData","/ipc/dataReceive/sensorData").permitAll()
|
.antMatchers("/ipc/dataReceive/plcData","/ipc/dataReceive/sensorData").permitAll()
|
||||||
// 静态资源,可匿名访问
|
// 静态资源,可匿名访问
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package com.inspur.system.service;
|
package com.inspur.system.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import com.inspur.system.domain.SysConfig;
|
import com.inspur.system.domain.SysConfig;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -40,6 +42,13 @@ public interface ISysConfigService
|
|||||||
*/
|
*/
|
||||||
public String selectSystemName();
|
public String selectSystemName();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取上传频率
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Map<String,Object> selectSharedKeys();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询参数配置列表
|
* 查询参数配置列表
|
||||||
*
|
*
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
package com.inspur.system.service.impl;
|
package com.inspur.system.service.impl;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -107,6 +109,20 @@ public class SysConfigServiceImpl implements ISysConfigService
|
|||||||
return selectConfigByKey("sys.name");
|
return selectConfigByKey("sys.name");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取上传频率
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String,Object> selectSharedKeys(){
|
||||||
|
Map<String,Object> returnMap = new HashMap<>();
|
||||||
|
Map<String,Integer> map = new HashMap<>();
|
||||||
|
map.put("time",Integer.parseInt(selectConfigByKey("shared.time")));
|
||||||
|
returnMap.put("shared",map);
|
||||||
|
return returnMap;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询参数配置列表
|
* 查询参数配置列表
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user