修改下发班组任务信息

This commit is contained in:
haozq 2025-11-24 13:45:50 +08:00
parent 998660d95e
commit 537713fd0d
8 changed files with 90 additions and 5 deletions

View File

@ -209,7 +209,10 @@ public class TokenController {
String username = JwtUtils.getUserName(token);
String userId = JwtUtils.getUserId(token);
AuthUtil.logoutByToken(token);
if(!"admin".equals(username) && !"15955147004".equals(username)){
tokenService.delExistingToken(Long.valueOf(userId));
}
// tokenService.delExistingToken(Long.valueOf(userId));
sysLoginService.logout(username, userId);
logService.saveLogout(username, "退出登录", "退出成功", userId, "成功");
}

View File

@ -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

View File

@ -58,12 +58,13 @@ public class TokenService {
private final static Long MILLIS_MINUTE_TEN = CacheConstants.REFRESH_TIME * MILLIS_MINUTE;
/**
* 创建令牌
*/
public Map<String, Object> createToken(LoginUser loginUser) {
// 检查并删除已有的token
if (!isWindows() || !"admin".equals(loginUser.getSysUser().getUserName()) || !"15955147004".equals(loginUser.getSysUser().getUserName())) {
//不是admin 并且是linux系统
if((!"admin".equals(loginUser.getSysUser().getUserName()) && !"15955147004".equals(loginUser.getSysUser().getUserName()) ) && !isWindows()){
delExistingToken(loginUser.getSysUser().getUserId());
}
String token = IdUtils.fastUUID();

View File

@ -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}

View File

@ -5,7 +5,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.bonus.job.mapper.DeviceStatusMapper">
<update id="updateDeviceStatus">
<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>
</update>

View File

@ -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.NoSuchAlgorithmException;

View File

@ -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