1.增加查询服务器管理列表-无权限校验接口。
2.解决同步信息时获取用户信息异常bug。
7 files modified
61 ■■■■■ changed files
ard-work/src/main/java/com/ard/work/component/netty/TyTcpClientManager.java 2 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ard/work/mapper/ArdServerInfoMapper.java 8 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ard/work/service/IArdServerInfoService.java 8 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ard/work/service/ITyService.java 1 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ard/work/service/impl/ArdServerInfoServiceImpl.java 11 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ard/work/service/impl/TyServiceImpl.java 2 ●●●●● patch | view | raw | blame | history
ard-work/src/main/resources/mapper/ArdServerInfoMapper.xml 29 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ard/work/component/netty/TyTcpClientManager.java
@@ -124,7 +124,7 @@
    @PostConstruct
    public void initConnectServers() {
        try {
            var serverList = ardServerService.selectArdServerInfoList(new ArdServerInfo()); // ← 从数据库查询所有服务器配置
            var serverList = ardServerService.getServerLsNoPermission(new ArdServerInfo()); // ← 从数据库查询所有服务器配置
            if (serverList == null || serverList.isEmpty()) {
                log.warn("未在数据库中找到边缘服务器配置,跳过连接初始化");
                return;
ard-work/src/main/java/com/ard/work/mapper/ArdServerInfoMapper.java
@@ -29,6 +29,14 @@
    public List<ArdServerInfo> selectArdServerInfoList(ArdServerInfo ardServerInfo);
    /**
     * 查询服务器管理列表
     *
     * @param ardServerInfo 服务器管理
     * @return 服务器管理集合
     */
    public List<ArdServerInfo> getServerLsNoPermission(ArdServerInfo ardServerInfo);
    /**
     * 新增服务器管理
     * 
     * @param ardServerInfo 服务器管理
ard-work/src/main/java/com/ard/work/service/IArdServerInfoService.java
@@ -29,6 +29,14 @@
    public List<ArdServerInfo> selectArdServerInfoList(ArdServerInfo ardServerInfo);
    /**
     * 查询服务器管理列表 - 无权限校验
     *
     * @param ardServerInfo 服务器管理
     * @return 服务器管理集合
     */
    public List<ArdServerInfo> getServerLsNoPermission(ArdServerInfo ardServerInfo);
    /**
     * 新增服务器管理
     * 
     * @param ardServerInfo 服务器管理
ard-work/src/main/java/com/ard/work/service/ITyService.java
@@ -36,7 +36,6 @@
     */
    AccessTokenReceiver getAccessToken(String ServerId);
    /**
     * 获取全部服务器云盒列表
     * @return
ard-work/src/main/java/com/ard/work/service/impl/ArdServerInfoServiceImpl.java
@@ -59,6 +59,17 @@
    }
    /**
     * 查询服务器管理列表 - 无权限
     *
     * @param ardServerInfo 服务器管理
     * @return 服务器管理
     */
    @Override
    public List<ArdServerInfo> getServerLsNoPermission(ArdServerInfo ardServerInfo) {
        return ardServerInfoMapper.getServerLsNoPermission(ardServerInfo);
    }
    /**
     * 新增服务器管理
     *
     * @param ardServerInfo 服务器管理
ard-work/src/main/java/com/ard/work/service/impl/TyServiceImpl.java
@@ -94,7 +94,7 @@
     */
    @Override
    public List<BoxInfoReceiver> getBoxList() {
        List<ArdServerInfo> ardServerInfos = ardServerService.selectArdServerInfoList(new ArdServerInfo());
        List<ArdServerInfo> ardServerInfos = ardServerService.getServerLsNoPermission(new ArdServerInfo());
        return getBoxList(ardServerInfos);
    }
ard-work/src/main/resources/mapper/ArdServerInfoMapper.xml
@@ -20,6 +20,23 @@
        <result property="serverStatus"    column="server_status"    />
    </resultMap>
    <sql id="selectArdServerInfoVoNo">
        select id,
               server_name,
               host,
               tcp_port,
               http_port,
               access_key_id,
               access_key_secret,
               longitude,
               latitude,
               altitude,
               user_id,
               dept_id,
               server_status
        from ard_server_info
    </sql>
    <sql id="selectArdServerInfoVo">
        select c.id,
               c.server_name,
@@ -54,6 +71,18 @@
            ${params.dataScope}
        </where>
    </select>
    <select id="getServerLsNoPermission" parameterType="ArdServerInfo" resultMap="ArdServerInfoResult">
        <include refid="selectArdServerInfoVoNo"/>
        <where>
            <if test="id != null and id != ''"> and id = #{id}</if>
            <if test="serverName != null and serverName != ''"> and server_name like concat('%', #{serverName}, '%')</if>
            <if test="accessKeyId != null and accessKeyId != ''"> and access_key_id = #{accessKeyId}</if>
            <if test="accessKeySecret != null and accessKeySecret != ''"> and access_key_secret = #{accessKeySecret}</if>
            <if test="serverStatus != null and serverStatus != ''"> and server_status = #{serverStatus}</if>
            <if test="deptId != null and deptId != 0">and dept_id = #{deptId}</if>
        </where>
    </select>
    
    <select id="selectArdServerInfoById" parameterType="String" resultMap="ArdServerInfoResult">
        <include refid="selectArdServerInfoVo"/>