修改下发班组任务信息
This commit is contained in:
parent
998660d95e
commit
537713fd0d
|
|
@ -209,7 +209,10 @@ public class TokenController {
|
||||||
String username = JwtUtils.getUserName(token);
|
String username = JwtUtils.getUserName(token);
|
||||||
String userId = JwtUtils.getUserId(token);
|
String userId = JwtUtils.getUserId(token);
|
||||||
AuthUtil.logoutByToken(token);
|
AuthUtil.logoutByToken(token);
|
||||||
tokenService.delExistingToken(Long.valueOf(userId));
|
if(!"admin".equals(username) && !"15955147004".equals(username)){
|
||||||
|
tokenService.delExistingToken(Long.valueOf(userId));
|
||||||
|
}
|
||||||
|
// tokenService.delExistingToken(Long.valueOf(userId));
|
||||||
sysLoginService.logout(username, userId);
|
sysLoginService.logout(username, userId);
|
||||||
logService.saveLogout(username, "退出登录", "退出成功", userId, "成功");
|
logService.saveLogout(username, "退出登录", "退出成功", userId, "成功");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
# Tomcat
|
||||||
|
server:
|
||||||
|
port: 38081
|
||||||
|
|
||||||
|
# Spring
|
||||||
|
spring:
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
username: nacos
|
||||||
|
password: Bonus@admin123!
|
||||||
|
discovery:
|
||||||
|
# 服务注册地址
|
||||||
|
server-addr: 192.168.0.58:18849
|
||||||
|
namespace: huadong_realname_prod
|
||||||
|
config:
|
||||||
|
# 配置中心地址
|
||||||
|
server-addr: 192.168.0.58:18849
|
||||||
|
namespace: huadong_realname_prod
|
||||||
|
# 配置文件格式
|
||||||
|
file-extension: yml
|
||||||
|
# 共享配置
|
||||||
|
shared-configs:
|
||||||
|
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
|
#加密组件
|
||||||
|
jasypt:
|
||||||
|
encryptor:
|
||||||
|
password: Encrypt
|
||||||
|
|
@ -58,12 +58,13 @@ public class TokenService {
|
||||||
|
|
||||||
private final static Long MILLIS_MINUTE_TEN = CacheConstants.REFRESH_TIME * MILLIS_MINUTE;
|
private final static Long MILLIS_MINUTE_TEN = CacheConstants.REFRESH_TIME * MILLIS_MINUTE;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建令牌
|
* 创建令牌
|
||||||
*/
|
*/
|
||||||
public Map<String, Object> createToken(LoginUser loginUser) {
|
public Map<String, Object> createToken(LoginUser loginUser) {
|
||||||
// 检查并删除已有的token
|
//不是admin 并且是linux系统
|
||||||
if (!isWindows() || !"admin".equals(loginUser.getSysUser().getUserName()) || !"15955147004".equals(loginUser.getSysUser().getUserName())) {
|
if((!"admin".equals(loginUser.getSysUser().getUserName()) && !"15955147004".equals(loginUser.getSysUser().getUserName()) ) && !isWindows()){
|
||||||
delExistingToken(loginUser.getSysUser().getUserId());
|
delExistingToken(loginUser.getSysUser().getUserId());
|
||||||
}
|
}
|
||||||
String token = IdUtils.fastUUID();
|
String token = IdUtils.fastUUID();
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
# Tomcat
|
||||||
|
server:
|
||||||
|
port: 38085
|
||||||
|
|
||||||
|
spring:
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
username: nacos
|
||||||
|
password: Bonus@admin123!
|
||||||
|
discovery:
|
||||||
|
# 服务注册地址
|
||||||
|
server-addr: 192.168.0.58:18849
|
||||||
|
namespace: huadong_realname_prod
|
||||||
|
config:
|
||||||
|
# 配置中心地址
|
||||||
|
server-addr: 192.168.0.58:18849
|
||||||
|
namespace: huadong_realname_prod
|
||||||
|
# 配置文件格式
|
||||||
|
file-extension: yml
|
||||||
|
# 共享配置
|
||||||
|
shared-configs:
|
||||||
|
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
|
|
@ -5,7 +5,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<mapper namespace="com.bonus.job.mapper.DeviceStatusMapper">
|
<mapper namespace="com.bonus.job.mapper.DeviceStatusMapper">
|
||||||
<update id="updateDeviceStatus">
|
<update id="updateDeviceStatus">
|
||||||
<foreach collection="list" separator=";" item="item" index="index">
|
<foreach collection="list" separator=";" item="item" index="index">
|
||||||
update pm_att_device set on_line=#{item.status} where device_code=#{item.deviceCode}
|
update pm_att_device set on_line=#{item.status}
|
||||||
|
<if test='item.status=="1"'>
|
||||||
|
,on_line_time = now()
|
||||||
|
</if>
|
||||||
|
where device_code=#{item.deviceCode}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@ package com.bonus.urk.vo;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import com.sun.xml.internal.ws.util.UtilException;
|
|
||||||
|
import com.bonus.common.core.exception.UtilException;
|
||||||
|
|
||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
# Tomcat
|
||||||
|
server:
|
||||||
|
port: 20000
|
||||||
|
# Spring
|
||||||
|
spring:
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
username: nacos
|
||||||
|
password: Bonus@admin123!
|
||||||
|
discovery:
|
||||||
|
# 服务注册地址
|
||||||
|
server-addr: 192.168.0.58:18849
|
||||||
|
namespace: huadong_realname_prod
|
||||||
|
config:
|
||||||
|
# 配置中心地址
|
||||||
|
server-addr: 192.168.0.58:18849
|
||||||
|
namespace: huadong_realname_prod
|
||||||
|
# 配置文件格式
|
||||||
|
file-extension: yml
|
||||||
|
# 共享配置
|
||||||
|
shared-configs:
|
||||||
|
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
|
|
||||||
|
#加密组件
|
||||||
|
jasypt:
|
||||||
|
encryptor:
|
||||||
|
password: Encrypt
|
||||||
Loading…
Reference in New Issue