Junjie
6 天以前 72c49f3afa22c4f84760d57001e45a4fadf2d482
#升级JDK17
2个文件已添加
104个文件已修改
1185 ■■■■ 已修改文件
pom.xml 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/ApiLogController.java 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/ApkBuildTaskController.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/BasStationController.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/BasStationTvController.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/HttpRequestLogController.java 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/OpenController.java 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/TvDeviceController.java 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/ApiLog.java 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/ApkBuildTask.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/BasStation.java 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/BasStationTv.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/HttpRequestLog.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/TvDevice.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/ApiLogMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/ApkBuildTaskMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/BasStationMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/BasStationTvMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/HttpRequestLogMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/TvDeviceMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/ApiLogService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/ApkBuildTaskService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/BasStationService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/BasStationTvService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/HttpRequestLogService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/TvDeviceService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/ApiLogServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/ApkBuildTaskServiceImpl.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/BasStationServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/BasStationTvServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/HttpRequestLogServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/TvDeviceServiceImpl.java 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/timer/WcsStationTimer.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/timer/WmsDataTimer.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/config/AdminInterceptor.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/config/AspectConfig.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/config/CoreCompatConfig.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/config/MybatisPlusConfig.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/entity/Parameter.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/model/PageParam.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/utils/Http.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/utils/RandomValidateCodeUtil.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/web/AuthController.java 72 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/web/BaseController.java 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/web/FileController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/web/RouterController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/controller/AnnouncementController.java 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/controller/ApiController.java 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/controller/ConfigController.java 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/controller/HomeController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/controller/HostController.java 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/controller/OperateLogController.java 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/controller/PermissionController.java 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/controller/ResourceController.java 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/controller/RoleController.java 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/controller/UserController.java 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/controller/UserLoginController.java 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/entity/Announcement.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/entity/Api.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/entity/Config.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/entity/Host.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/entity/OperateLog.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/entity/Permission.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/entity/Resource.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/entity/Role.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/entity/RolePermission.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/entity/RoleResource.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/entity/User.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/entity/UserLogin.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/mapper/AnnouncementMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/mapper/ApiMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/mapper/ConfigMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/mapper/HostMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/mapper/OperateLogMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/mapper/PermissionMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/mapper/ResourceMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/mapper/RoleMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/mapper/RolePermissionMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/mapper/RoleResourceMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/mapper/UserLoginMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/mapper/UserMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/AnnouncementService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/ApiService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/ConfigService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/HostService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/OperateLogService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/PermissionService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/ResourceService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/RolePermissionService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/RoleResourceService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/RoleService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/UserLoginService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/UserService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/impl/AnnouncementServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/impl/ApiServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/impl/ConfigServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/impl/HostServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/impl/OperateLogServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/impl/PermissionServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/impl/ResourceServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/impl/RolePermissionServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/impl/RoleResourceServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/impl/RoleServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/impl/UserLoginServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/impl/UserServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml
@@ -5,7 +5,7 @@
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.5.14</version>
        <version>3.5.11</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.zy</groupId>
@@ -14,13 +14,24 @@
    <packaging>war</packaging>
    <properties>
        <java.version>1.8</java.version>
        <java.version>17</java.version>
        <cool.version>3.4.0</cool.version>
        <mysql-driver.version>5.1.47</mysql-driver.version>
        <mybatis-plus.version>2.3.2</mybatis-plus.version>
        <mybatis-plus.version>3.5.14</mybatis-plus.version>
        <spring-ai.version>1.1.2</spring-ai.version>
        <fastjson.version>1.2.83</fastjson.version>
        <springfox.version>2.7.0</springfox.version>
    </properties>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.ai</groupId>
                <artifactId>spring-ai-bom</artifactId>
                <version>${spring-ai.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
@@ -42,18 +53,21 @@
            <version>${cool.version}</version>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.46</version>
            <groupId>com.mysql</groupId>
            <artifactId>mysql-connector-j</artifactId>
        </dependency>
        <dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>mssql-jdbc</artifactId>
            <version>8.2.2.jre8</version>
        </dependency>
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-boot-starter</artifactId>
            <artifactId>mybatis-plus-spring-boot3-starter</artifactId>
            <version>${mybatis-plus.version}</version>
        </dependency>
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-jsqlparser</artifactId>
            <version>${mybatis-plus.version}</version>
        </dependency>
        <dependency>
@@ -62,19 +76,9 @@
            <version>${fastjson.version}</version>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>${springfox.version}</version>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>${springfox.version}</version>
        </dependency>
        <dependency>
            <groupId>com.github.xiaoymin</groupId>
            <artifactId>swagger-bootstrap-ui</artifactId>
            <version>1.8.9</version>
            <groupId>io.swagger.core.v3</groupId>
            <artifactId>swagger-annotations-jakarta</artifactId>
            <version>2.2.39</version>
        </dependency>
        <dependency>
            <groupId>com.google.zxing</groupId>
@@ -89,7 +93,6 @@
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.16.22</version>
            <scope>provided</scope>
        </dependency>
        <!-- okHttp3 -->
@@ -106,6 +109,10 @@
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.ai</groupId>
            <artifactId>spring-ai-client-chat</artifactId>
        </dependency>
    </dependencies>
    <build>
src/main/java/com/zy/asrs/controller/ApiLogController.java
@@ -1,9 +1,9 @@
package com.zy.asrs.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.annotations.ManagerAuth;
import com.core.common.BaseRes;
import com.core.common.Cools;
@@ -29,7 +29,7 @@
    @RequestMapping(value = "/apiLog/{id}/auth")
    @ManagerAuth
    public R get(@PathVariable("id") String id) {
        return R.ok(apiLogService.selectById(String.valueOf(id)));
        return R.ok(apiLogService.getById(String.valueOf(id)));
    }
    @RequestMapping(value = "/apiLog/list/auth")
@@ -40,17 +40,17 @@
                  @RequestParam(required = false)String orderByType,
                  @RequestParam(required = false)String condition,
                  @RequestParam Map<String, Object> param){
        EntityWrapper<ApiLog> wrapper = new EntityWrapper<>();
        QueryWrapper<ApiLog> wrapper = new QueryWrapper<>();
        excludeTrash(param);
        convert(param, wrapper);
        allLike(ApiLog.class, param.keySet(), wrapper, condition);
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} else {
            wrapper.orderBy("create_time", false);
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} else {
            wrapper.orderBy(true, false, "create_time");
        }
        return R.ok(apiLogService.selectPage(new Page<>(curr, limit), wrapper));
        return R.ok(apiLogService.page(new Page<>(curr, limit), wrapper));
    }
    private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){
    private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){
        for (Map.Entry<String, Object> entry : map.entrySet()){
            String val = String.valueOf(entry.getValue());
            if (val.contains(RANGE_TIME_LINK)){
@@ -66,7 +66,7 @@
    @RequestMapping(value = "/apiLog/add/auth")
    @ManagerAuth
    public R add(ApiLog apiLog) {
        apiLogService.insert(apiLog);
        apiLogService.save(apiLog);
        return R.ok();
    }
@@ -84,7 +84,7 @@
    @ManagerAuth
    public R delete(@RequestParam(value="ids[]") Long[] ids){
         for (Long id : ids){
            apiLogService.deleteById(id);
            apiLogService.removeById(id);
        }
        return R.ok();
    }
@@ -92,20 +92,20 @@
    @RequestMapping(value = "/apiLog/export/auth")
    @ManagerAuth
    public R export(@RequestBody JSONObject param){
        EntityWrapper<ApiLog> wrapper = new EntityWrapper<>();
        QueryWrapper<ApiLog> wrapper = new QueryWrapper<>();
        List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
        Map<String, Object> map = excludeTrash(param.getJSONObject("apiLog"));
        convert(map, wrapper);
        List<ApiLog> list = apiLogService.selectList(wrapper);
        List<ApiLog> list = apiLogService.list(wrapper);
        return R.ok(exportSupport(list, fields));
    }
    @RequestMapping(value = "/apiLogQuery/auth")
    @ManagerAuth
    public R query(String condition) {
        EntityWrapper<ApiLog> wrapper = new EntityWrapper<>();
        QueryWrapper<ApiLog> wrapper = new QueryWrapper<>();
        wrapper.like("uuid", condition);
        Page<ApiLog> page = apiLogService.selectPage(new Page<>(0, 10), wrapper);
        Page<ApiLog> page = apiLogService.page(new Page<>(0, 10), wrapper);
        List<Map<String, Object>> result = new ArrayList<>();
        for (ApiLog apiLog : page.getRecords()){
            Map<String, Object> map = new HashMap<>();
@@ -119,8 +119,8 @@
    @RequestMapping(value = "/apiLog/check/column/auth")
    @ManagerAuth
    public R query(@RequestBody JSONObject param) {
        Wrapper<ApiLog> wrapper = new EntityWrapper<ApiLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val"));
        if (null != apiLogService.selectOne(wrapper)){
        Wrapper<ApiLog> wrapper = new QueryWrapper<ApiLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val"));
        if (null != apiLogService.getOne(wrapper)){
            return R.parse(BaseRes.REPEAT).add(getComment(ApiLog.class, String.valueOf(param.get("key"))));
        }
        return R.ok();
src/main/java/com/zy/asrs/controller/ApkBuildTaskController.java
@@ -2,8 +2,8 @@
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.annotations.ManagerAuth;
import com.core.common.Cools;
import com.core.common.DateUtils;
@@ -14,7 +14,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
@@ -41,7 +41,7 @@
    @RequestMapping(value = "/apkBuildTask/{id}/auth")
    @ManagerAuth
    public R get(@PathVariable("id") Long id) {
        return R.ok(apkBuildTaskService.selectById(id));
        return R.ok(apkBuildTaskService.getById(id));
    }
    /**
@@ -55,22 +55,22 @@
            @RequestParam(required = false) String orderByType,
            @RequestParam Map<String, Object> param) {
        excludeTrash(param);
        EntityWrapper<ApkBuildTask> wrapper = new EntityWrapper<>();
        QueryWrapper<ApkBuildTask> wrapper = new QueryWrapper<>();
        convert(param, wrapper);
        if (!Cools.isEmpty(orderByField)) {
            wrapper.orderBy(orderByField, "asc".equalsIgnoreCase(orderByType));
            wrapper.orderBy(true, "asc".equalsIgnoreCase(orderByType), orderByField);
        } else {
            wrapper.orderBy("id", false);
            wrapper.orderBy(true, false, "id");
        }
        return R.ok(apkBuildTaskService.selectPage(new Page<>(curr, limit), wrapper));
        return R.ok(apkBuildTaskService.page(new Page<>(curr, limit), wrapper));
    }
    /**
     * 搜索参数转换
     */
    private void convert(Map<String, Object> map, EntityWrapper<ApkBuildTask> wrapper) {
    private void convert(Map<String, Object> map, QueryWrapper<ApkBuildTask> wrapper) {
        for (Map.Entry<String, Object> entry : map.entrySet()) {
            String key = entry.getKey();
            Object value = entry.getValue();
@@ -142,9 +142,9 @@
        try {
            int count = apkBuildTaskService.refreshAllPendingTasks();
            // 返回所有任务列表
            EntityWrapper<ApkBuildTask> wrapper = new EntityWrapper<>();
            wrapper.orderBy("id", false);
            List<ApkBuildTask> tasks = apkBuildTaskService.selectList(wrapper);
            QueryWrapper<ApkBuildTask> wrapper = new QueryWrapper<>();
            wrapper.orderBy(true, false, "id");
            List<ApkBuildTask> tasks = apkBuildTaskService.list(wrapper);
            Map<String, Object> result = new HashMap<>();
            result.put("tasks", tasks);
            result.put("refreshedCount", count);
@@ -251,7 +251,7 @@
        if (ids == null || ids.length == 0) {
            return R.error();
        }
        apkBuildTaskService.deleteBatchIds(Arrays.asList(ids));
        apkBuildTaskService.removeByIds(Arrays.asList(ids));
        return R.ok();
    }
src/main/java/com/zy/asrs/controller/BasStationController.java
@@ -2,9 +2,9 @@
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.common.DateUtils;
import com.zy.asrs.entity.BasStation;
import com.zy.asrs.service.BasStationService;
@@ -27,7 +27,7 @@
    @RequestMapping(value = "/basStation/{id}/auth")
    @ManagerAuth
    public R get(@PathVariable("id") String id) {
        return R.ok(basStationService.selectById(String.valueOf(id)));
        return R.ok(basStationService.getById(String.valueOf(id)));
    }
    @RequestMapping(value = "/basStation/list/auth")
@@ -38,15 +38,15 @@
                  @RequestParam(required = false)String orderByType,
                  @RequestParam(required = false)String condition,
                  @RequestParam Map<String, Object> param){
        EntityWrapper<BasStation> wrapper = new EntityWrapper<>();
        QueryWrapper<BasStation> wrapper = new QueryWrapper<>();
        excludeTrash(param);
        convert(param, wrapper);
        allLike(BasStation.class, param.keySet(), wrapper, condition);
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
        return R.ok(basStationService.selectPage(new Page<>(curr, limit), wrapper));
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));}
        return R.ok(basStationService.page(new Page<>(curr, limit), wrapper));
    }
    private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){
    private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){
        for (Map.Entry<String, Object> entry : map.entrySet()){
            String val = String.valueOf(entry.getValue());
            if (val.contains(RANGE_TIME_LINK)){
@@ -62,7 +62,7 @@
    @RequestMapping(value = "/basStation/add/auth")
    @ManagerAuth
    public R add(BasStation basStation) {
        basStationService.insert(basStation);
        basStationService.save(basStation);
        return R.ok();
    }
@@ -80,7 +80,7 @@
    @ManagerAuth
    public R delete(@RequestParam(value="ids[]") Integer[] ids){
         for (Integer id : ids){
            basStationService.deleteById(id);
            basStationService.removeById(id);
        }
        return R.ok();
    }
@@ -88,20 +88,20 @@
    @RequestMapping(value = "/basStation/export/auth")
    @ManagerAuth
    public R export(@RequestBody JSONObject param){
        EntityWrapper<BasStation> wrapper = new EntityWrapper<>();
        QueryWrapper<BasStation> wrapper = new QueryWrapper<>();
        List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
        Map<String, Object> map = excludeTrash(param.getJSONObject("basStation"));
        convert(map, wrapper);
        List<BasStation> list = basStationService.selectList(wrapper);
        List<BasStation> list = basStationService.list(wrapper);
        return R.ok(exportSupport(list, fields));
    }
    @RequestMapping(value = "/basStationQuery/auth")
    @ManagerAuth
    public R query(String condition) {
        EntityWrapper<BasStation> wrapper = new EntityWrapper<>();
        QueryWrapper<BasStation> wrapper = new QueryWrapper<>();
        wrapper.like("station_id", condition);
        Page<BasStation> page = basStationService.selectPage(new Page<>(0, 10), wrapper);
        Page<BasStation> page = basStationService.page(new Page<>(0, 10), wrapper);
        List<Map<String, Object>> result = new ArrayList<>();
        for (BasStation basStation : page.getRecords()){
            Map<String, Object> map = new HashMap<>();
@@ -115,8 +115,8 @@
    @RequestMapping(value = "/basStation/check/column/auth")
    @ManagerAuth
    public R query(@RequestBody JSONObject param) {
        Wrapper<BasStation> wrapper = new EntityWrapper<BasStation>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val"));
        if (null != basStationService.selectOne(wrapper)){
        Wrapper<BasStation> wrapper = new QueryWrapper<BasStation>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val"));
        if (null != basStationService.getOne(wrapper)){
            return R.parse(BaseRes.REPEAT).add(getComment(BasStation.class, String.valueOf(param.get("key"))));
        }
        return R.ok();
src/main/java/com/zy/asrs/controller/BasStationTvController.java
@@ -1,7 +1,7 @@
package com.zy.asrs.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.core.annotations.ManagerAuth;
import com.core.common.R;
import com.core.controller.AbstractBaseController;
@@ -45,13 +45,13 @@
    public R getData() {
        // 1. 获取所有站点
        List<BasStation> stations = basStationService
                .selectList(new EntityWrapper<BasStation>().orderBy("station_id", true));
                .list(new QueryWrapper<BasStation>().orderBy(true, true, "station_id"));
        // 2. 获取所有电视机 (按名称排序)
        List<TvDevice> tvs = tvDeviceService.selectList(new EntityWrapper<TvDevice>().orderBy("name", true));
        List<TvDevice> tvs = tvDeviceService.list(new QueryWrapper<TvDevice>().orderBy(true, true, "name"));
        // 3. 获取所有绑定关系
        List<BasStationTv> relations = basStationTvService.selectList(new EntityWrapper<>());
        List<BasStationTv> relations = basStationTvService.list(new QueryWrapper<>());
        Map<String, Object> data = new HashMap<>();
        data.put("stations", stations);
@@ -73,10 +73,10 @@
            // 全量替换策略:先删除所有旧关系,再插入新关系
            // 注意:这里没有事务控制,如果要求严格一致性,建议在Service层加@Transactional
            basStationTvService.delete(new EntityWrapper<>());
            basStationTvService.remove(new QueryWrapper<>());
            if (relations != null && !relations.isEmpty()) {
                basStationTvService.insertBatch(relations);
                basStationTvService.saveBatch(relations);
            }
            return R.ok();
src/main/java/com/zy/asrs/controller/HttpRequestLogController.java
@@ -2,9 +2,9 @@
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.common.DateUtils;
import com.zy.asrs.entity.HttpRequestLog;
import com.zy.asrs.service.HttpRequestLogService;
@@ -27,7 +27,7 @@
    @RequestMapping(value = "/httpRequestLog/{id}/auth")
    @ManagerAuth
    public R get(@PathVariable("id") String id) {
        return R.ok(httpRequestLogService.selectById(String.valueOf(id)));
        return R.ok(httpRequestLogService.getById(String.valueOf(id)));
    }
    @RequestMapping(value = "/httpRequestLog/list/auth")
@@ -38,16 +38,16 @@
                  @RequestParam(required = false)String orderByType,
                  @RequestParam(required = false)String condition,
                  @RequestParam Map<String, Object> param){
        EntityWrapper<HttpRequestLog> wrapper = new EntityWrapper<>();
        QueryWrapper<HttpRequestLog> wrapper = new QueryWrapper<>();
        excludeTrash(param);
        convert(param, wrapper);
        allLike(HttpRequestLog.class, param.keySet(), wrapper, condition);
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
        wrapper.orderBy("create_time desc");
        return R.ok(httpRequestLogService.selectPage(new Page<>(curr, limit), wrapper));
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));}
        wrapper.orderByDesc("create_time");
        return R.ok(httpRequestLogService.page(new Page<>(curr, limit), wrapper));
    }
    private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){
    private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){
        for (Map.Entry<String, Object> entry : map.entrySet()){
            String val = String.valueOf(entry.getValue());
            if (val.contains(RANGE_TIME_LINK)){
@@ -63,7 +63,7 @@
    @RequestMapping(value = "/httpRequestLog/add/auth")
    @ManagerAuth
    public R add(HttpRequestLog httpRequestLog) {
        httpRequestLogService.insert(httpRequestLog);
        httpRequestLogService.save(httpRequestLog);
        return R.ok();
    }
@@ -81,7 +81,7 @@
    @ManagerAuth
    public R delete(@RequestParam(value="ids[]") Integer[] ids){
         for (Integer id : ids){
            httpRequestLogService.deleteById(id);
            httpRequestLogService.removeById(id);
        }
        return R.ok();
    }
@@ -89,20 +89,20 @@
    @RequestMapping(value = "/httpRequestLog/export/auth")
    @ManagerAuth
    public R export(@RequestBody JSONObject param){
        EntityWrapper<HttpRequestLog> wrapper = new EntityWrapper<>();
        QueryWrapper<HttpRequestLog> wrapper = new QueryWrapper<>();
        List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
        Map<String, Object> map = excludeTrash(param.getJSONObject("httpRequestLog"));
        convert(map, wrapper);
        List<HttpRequestLog> list = httpRequestLogService.selectList(wrapper);
        List<HttpRequestLog> list = httpRequestLogService.list(wrapper);
        return R.ok(exportSupport(list, fields));
    }
    @RequestMapping(value = "/httpRequestLogQuery/auth")
    @ManagerAuth
    public R query(String condition) {
        EntityWrapper<HttpRequestLog> wrapper = new EntityWrapper<>();
        QueryWrapper<HttpRequestLog> wrapper = new QueryWrapper<>();
        wrapper.like("id", condition);
        Page<HttpRequestLog> page = httpRequestLogService.selectPage(new Page<>(0, 10), wrapper);
        Page<HttpRequestLog> page = httpRequestLogService.page(new Page<>(0, 10), wrapper);
        List<Map<String, Object>> result = new ArrayList<>();
        for (HttpRequestLog httpRequestLog : page.getRecords()){
            Map<String, Object> map = new HashMap<>();
@@ -116,8 +116,8 @@
    @RequestMapping(value = "/httpRequestLog/check/column/auth")
    @ManagerAuth
    public R query(@RequestBody JSONObject param) {
        Wrapper<HttpRequestLog> wrapper = new EntityWrapper<HttpRequestLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val"));
        if (null != httpRequestLogService.selectOne(wrapper)){
        Wrapper<HttpRequestLog> wrapper = new QueryWrapper<HttpRequestLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val"));
        if (null != httpRequestLogService.getOne(wrapper)){
            return R.parse(BaseRes.REPEAT).add(getComment(HttpRequestLog.class, String.valueOf(param.get("key"))));
        }
        return R.ok();
src/main/java/com/zy/asrs/controller/OpenController.java
@@ -2,7 +2,7 @@
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.core.annotations.ManagerAuth;
import com.core.common.Cools;
import com.core.common.R;
@@ -26,8 +26,8 @@
import org.springframework.web.multipart.MultipartFile;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
@@ -156,15 +156,15 @@
    public R getLedInfos(HttpServletRequest request) {
        HashMap<String, Object> map = new HashMap<>();
        String remoteAddr = request.getRemoteAddr();
        TvDevice tvDevice = tvDeviceService.selectOne(
                new EntityWrapper<TvDevice>().eq("ip", remoteAddr));
        TvDevice tvDevice = tvDeviceService.getOne(
                new QueryWrapper<TvDevice>().eq("ip", remoteAddr));
        if (tvDevice == null) {
            return R.error("未找到IP对应的电视机设备: " + remoteAddr);
        }
        map.put("deviceName", tvDevice.getName());
        List<BasStationTv> relations = basStationTvService
                .selectList(new EntityWrapper<BasStationTv>().eq("tv_id", tvDevice.getId()));
                .list(new QueryWrapper<BasStationTv>().eq("tv_id", tvDevice.getId()));
        if (relations == null || relations.isEmpty()) {
            map.put("data", new ArrayList<>());
            return R.ok().add(map);
@@ -236,11 +236,11 @@
        }
        String remoteAddr = request.getRemoteAddr();
        TvDevice tvDevice = tvDeviceService.selectOne(
                new EntityWrapper<TvDevice>().eq("ip", remoteAddr));
        TvDevice tvDevice = tvDeviceService.getOne(
                new QueryWrapper<TvDevice>().eq("ip", remoteAddr));
        if (tvDevice != null) {
            List<BasStationTv> relations = basStationTvService
                    .selectList(new EntityWrapper<BasStationTv>().eq("tv_id", tvDevice.getId()));
                    .list(new QueryWrapper<BasStationTv>().eq("tv_id", tvDevice.getId()));
            if (relations != null && !relations.isEmpty()) {
                for (BasStationTv relation : relations) {
                    WcsStationDto wcsStationDto = stationUtils.stationMap.get(relation.getStationId());
@@ -297,11 +297,11 @@
    @GetMapping("/announcement")
    public R top5(){
        EntityWrapper<Announcement> wrapper = new EntityWrapper<>();
        QueryWrapper<Announcement> wrapper = new QueryWrapper<>();
        wrapper.eq("status", 1);
        wrapper.orderBy("create_time", false);
        wrapper.orderBy(true, false, "create_time");
        wrapper.last("limit 5");
        return R.ok(announcementService.selectList(wrapper));
        return R.ok(announcementService.list(wrapper));
    }
    /**
src/main/java/com/zy/asrs/controller/TvDeviceController.java
@@ -1,8 +1,8 @@
package com.zy.asrs.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.annotations.ManagerAuth;
import com.core.common.Cools;
import com.core.common.R;
@@ -41,7 +41,7 @@
    @RequestMapping(value = "/tvDevice/{id}/auth")
    @ManagerAuth
    public R get(@PathVariable("id") Long id) {
        return R.ok(tvDeviceService.selectById(id));
        return R.ok(tvDeviceService.getById(id));
    }
    /**
@@ -53,7 +53,7 @@
            @RequestParam(defaultValue = "10") Integer limit,
            @RequestParam Map<String, Object> param) {
        excludeTrash(param);
        EntityWrapper<TvDevice> wrapper = new EntityWrapper<>();
        QueryWrapper<TvDevice> wrapper = new QueryWrapper<>();
        for (Map.Entry<String, Object> entry : param.entrySet()) {
            String key = entry.getKey();
@@ -68,8 +68,8 @@
            }
        }
        wrapper.orderBy("id", false);
        return R.ok(tvDeviceService.selectPage(new Page<>(curr, limit), wrapper));
        wrapper.orderBy(true, false, "id");
        return R.ok(tvDeviceService.page(new Page<>(curr, limit), wrapper));
    }
    /**
@@ -78,9 +78,9 @@
    @RequestMapping(value = "/tvDevice/all/auth")
    @ManagerAuth
    public R listAll() {
        EntityWrapper<TvDevice> wrapper = new EntityWrapper<>();
        wrapper.orderBy("name", true);
        return R.ok(tvDeviceService.selectList(wrapper));
        QueryWrapper<TvDevice> wrapper = new QueryWrapper<>();
        wrapper.orderBy(true, true, "name");
        return R.ok(tvDeviceService.list(wrapper));
    }
    /**
@@ -106,9 +106,9 @@
        }
        // 检查IP是否已存在
        EntityWrapper<TvDevice> wrapper = new EntityWrapper<>();
        QueryWrapper<TvDevice> wrapper = new QueryWrapper<>();
        wrapper.eq("ip", device.getIp());
        if (tvDeviceService.selectCount(wrapper) > 0) {
        if (tvDeviceService.count(wrapper) > 0) {
            return R.error("该IP已存在");
        }
@@ -118,7 +118,7 @@
        device.setStatus((short) 0);
        device.setCreateTime(new Date());
        device.setUpdateTime(new Date());
        tvDeviceService.insert(device);
        tvDeviceService.save(device);
        return R.ok(device);
    }
@@ -134,9 +134,9 @@
        // 检查IP是否已被其他设备使用
        if (!Cools.isEmpty(device.getIp())) {
            EntityWrapper<TvDevice> wrapper = new EntityWrapper<>();
            QueryWrapper<TvDevice> wrapper = new QueryWrapper<>();
            wrapper.eq("ip", device.getIp()).ne("id", device.getId());
            if (tvDeviceService.selectCount(wrapper) > 0) {
            if (tvDeviceService.count(wrapper) > 0) {
                return R.error("该IP已被其他设备使用");
            }
        }
@@ -155,7 +155,7 @@
        if (ids == null || ids.length == 0) {
            return R.error();
        }
        tvDeviceService.deleteBatchIds(Arrays.asList(ids));
        tvDeviceService.removeByIds(Arrays.asList(ids));
        return R.ok();
    }
@@ -169,7 +169,7 @@
            String result = tvDeviceService.testConnection(id);
            Map<String, Object> data = new HashMap<>();
            data.put("result", result);
            data.put("device", tvDeviceService.selectById(id));
            data.put("device", tvDeviceService.getById(id));
            return R.ok(data);
        } catch (Exception e) {
            return R.error("连接失败: " + e.getMessage());
@@ -209,7 +209,7 @@
                return R.error("请选择安装设备");
            }
            ApkBuildTask task = apkBuildTaskService.selectById(taskId);
            ApkBuildTask task = apkBuildTaskService.getById(taskId);
            if (task == null) {
                return R.error("打包任务不存在");
            }
@@ -286,7 +286,7 @@
            String result = tvDeviceService.launchApp(id, packageName);
            Map<String, Object> data = new HashMap<>();
            data.put("result", result);
            data.put("device", tvDeviceService.selectById(id));
            data.put("device", tvDeviceService.getById(id));
            return R.ok(data);
        } catch (Exception e) {
            return R.error("启动失败: " + e.getMessage());
@@ -324,7 +324,7 @@
            String base64Image = tvDeviceService.captureScreen(id);
            Map<String, Object> data = new HashMap<>();
            data.put("image", base64Image);
            data.put("device", tvDeviceService.selectById(id));
            data.put("device", tvDeviceService.getById(id));
            return R.ok(data);
        } catch (Exception e) {
            return R.error("截图失败: " + e.getMessage());
@@ -342,7 +342,7 @@
            String result = tvDeviceService.restartApp(id, packageName);
            Map<String, Object> data = new HashMap<>();
            data.put("result", result);
            data.put("device", tvDeviceService.selectById(id));
            data.put("device", tvDeviceService.getById(id));
            return R.ok(data);
        } catch (Exception e) {
            return R.error("重启失败: " + e.getMessage());
src/main/java/com/zy/asrs/entity/ApiLog.java
@@ -1,11 +1,11 @@
package com.zy.asrs.entity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.core.common.Cools;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
@@ -22,81 +22,81 @@
    /**
     * ID
     */
    @ApiModelProperty(value= "ID")
    @Schema(description = "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 日志编号
     */
    @ApiModelProperty(value= "日志编号")
    @Schema(description = "日志编号")
    private String uuid;
    /**
     * 名称空间
     */
    @ApiModelProperty(value= "名称空间")
    @Schema(description = "名称空间")
    private String namespace;
    /**
     * 接口地址
     */
    @ApiModelProperty(value= "接口地址")
    @Schema(description = "接口地址")
    private String url;
    /**
     * 平台密钥
     */
    @ApiModelProperty(value= "平台密钥")
    @Schema(description = "平台密钥")
    private String appkey;
    /**
     * 时间戳
     */
    @ApiModelProperty(value= "时间戳")
    @Schema(description = "时间戳")
    private String timestamp;
    /**
     * 客户端IP
     */
    @ApiModelProperty(value= "客户端IP")
    @Schema(description = "客户端IP")
    @TableField("client_ip")
    private String clientIp;
    /**
     * 请求内容
     */
    @ApiModelProperty(value= "请求内容")
    @Schema(description = "请求内容")
    private String request;
    /**
     * 响应内容
     */
    @ApiModelProperty(value= "响应内容")
    @Schema(description = "响应内容")
    private String response;
    /**
     * 异常内容
     */
    @ApiModelProperty(value= "异常内容")
    @Schema(description = "异常内容")
    private String err;
    /**
     * 结果 1: 成功  0: 失败  
     */
    @ApiModelProperty(value= "结果 1: 成功  0: 失败  ")
    @Schema(description = "结果 1: 成功  0: 失败  ")
    private Integer result;
    /**
     * 状态 1: 正常  0: 禁用  
     */
    @ApiModelProperty(value= "状态 1: 正常  0: 禁用  ")
    @Schema(description = "状态 1: 正常  0: 禁用  ")
    private Integer status;
    /**
     * 添加时间
     */
    @ApiModelProperty(value= "添加时间")
    @Schema(description = "添加时间")
    @TableField("create_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;
@@ -104,7 +104,7 @@
    /**
     * 修改时间
     */
    @ApiModelProperty(value= "修改时间")
    @Schema(description = "修改时间")
    @TableField("update_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
@@ -112,7 +112,7 @@
    /**
     * 备注
     */
    @ApiModelProperty(value= "备注")
    @Schema(description = "备注")
    private String memo;
    public ApiLog() {}
src/main/java/com/zy/asrs/entity/ApkBuildTask.java
@@ -1,9 +1,9 @@
package com.zy.asrs.entity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.io.Serializable;
import java.util.Date;
src/main/java/com/zy/asrs/entity/BasStation.java
@@ -1,15 +1,15 @@
package com.zy.asrs.entity;
import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableField;
import com.core.common.Cools;import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
@Data
@@ -21,7 +21,7 @@
    /**
     * 编号
     */
    @ApiModelProperty(value= "编号")
    @Schema(description = "编号")
    @TableId(value = "station_id", type = IdType.INPUT)
    @TableField("station_id")
    private Integer stationId;
@@ -29,41 +29,41 @@
    /**
     * 状态 1: 正常  0: 禁用  
     */
    @ApiModelProperty(value= "状态 1: 正常  0: 禁用  ")
    @Schema(description = "状态 1: 正常  0: 禁用  ")
    private Integer status;
    /**
     * 工作号
     */
    @ApiModelProperty(value= "工作号")
    @Schema(description = "工作号")
    @TableField("wrk_no")
    private Integer wrkNo;
    /**
     * 可入(checkBox)
     */
    @ApiModelProperty(value= "可入(checkBox)")
    @Schema(description = "可入(checkBox)")
    @TableField("in_enable")
    private String inEnable;
    /**
     * 可出(checkBox)
     */
    @ApiModelProperty(value= "可出(checkBox)")
    @Schema(description = "可出(checkBox)")
    @TableField("out_enable")
    private String outEnable;
    /**
     * 创建人员
     */
    @ApiModelProperty(value= "创建人员")
    @Schema(description = "创建人员")
    @TableField("create_by")
    private Long createBy;
    /**
     * 创建时间
     */
    @ApiModelProperty(value= "创建时间")
    @Schema(description = "创建时间")
    @TableField("create_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;
@@ -71,14 +71,14 @@
    /**
     * 修改人员
     */
    @ApiModelProperty(value= "修改人员")
    @Schema(description = "修改人员")
    @TableField("update_by")
    private Long updateBy;
    /**
     * 修改时间
     */
    @ApiModelProperty(value= "修改时间")
    @Schema(description = "修改时间")
    @TableField("update_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
@@ -86,7 +86,7 @@
    /**
     * 备注
     */
    @ApiModelProperty(value= "备注")
    @Schema(description = "备注")
    private String memo;
    public BasStation() {}
src/main/java/com/zy/asrs/entity/BasStationTv.java
@@ -1,7 +1,7 @@
package com.zy.asrs.entity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
src/main/java/com/zy/asrs/entity/HttpRequestLog.java
@@ -1,15 +1,15 @@
package com.zy.asrs.entity;
import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import com.core.common.Cools;import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.IdType;
import java.text.SimpleDateFormat;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotation.TableField;
import org.springframework.format.annotation.DateTimeFormat;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
@Data
@@ -18,25 +18,25 @@
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value= "")
    @Schema(description = "")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty(value= "")
    @Schema(description = "")
    private String name;
    @ApiModelProperty(value= "")
    @Schema(description = "")
    private String request;
    @ApiModelProperty(value= "")
    @Schema(description = "")
    private String response;
    @ApiModelProperty(value= "")
    @Schema(description = "")
    @TableField("create_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @ApiModelProperty(value= "")
    @Schema(description = "")
    private Integer result;
    public HttpRequestLog() {}
src/main/java/com/zy/asrs/entity/TvDevice.java
@@ -1,9 +1,9 @@
package com.zy.asrs.entity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.io.Serializable;
import java.util.Date;
src/main/java/com/zy/asrs/mapper/ApiLogMapper.java
@@ -1,6 +1,6 @@
package com.zy.asrs.mapper;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zy.asrs.entity.ApiLog;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
src/main/java/com/zy/asrs/mapper/ApkBuildTaskMapper.java
@@ -1,6 +1,6 @@
package com.zy.asrs.mapper;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zy.asrs.entity.ApkBuildTask;
import org.apache.ibatis.annotations.Mapper;
src/main/java/com/zy/asrs/mapper/BasStationMapper.java
@@ -1,7 +1,7 @@
package com.zy.asrs.mapper;
import com.zy.asrs.entity.BasStation;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
src/main/java/com/zy/asrs/mapper/BasStationTvMapper.java
@@ -1,6 +1,6 @@
package com.zy.asrs.mapper;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zy.asrs.entity.BasStationTv;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
src/main/java/com/zy/asrs/mapper/HttpRequestLogMapper.java
@@ -1,7 +1,7 @@
package com.zy.asrs.mapper;
import com.zy.asrs.entity.HttpRequestLog;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
src/main/java/com/zy/asrs/mapper/TvDeviceMapper.java
@@ -1,6 +1,6 @@
package com.zy.asrs.mapper;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zy.asrs.entity.TvDevice;
import org.apache.ibatis.annotations.Mapper;
src/main/java/com/zy/asrs/service/ApiLogService.java
@@ -1,6 +1,6 @@
package com.zy.asrs.service;
import com.baomidou.mybatisplus.service.IService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zy.asrs.entity.ApiLog;
public interface ApiLogService extends IService<ApiLog> {
src/main/java/com/zy/asrs/service/ApkBuildTaskService.java
@@ -1,6 +1,6 @@
package com.zy.asrs.service;
import com.baomidou.mybatisplus.service.IService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zy.asrs.entity.ApkBuildTask;
import java.util.List;
src/main/java/com/zy/asrs/service/BasStationService.java
@@ -1,7 +1,7 @@
package com.zy.asrs.service;
import com.zy.asrs.entity.BasStation;
import com.baomidou.mybatisplus.service.IService;
import com.baomidou.mybatisplus.extension.service.IService;
public interface BasStationService extends IService<BasStation> {
src/main/java/com/zy/asrs/service/BasStationTvService.java
@@ -1,6 +1,6 @@
package com.zy.asrs.service;
import com.baomidou.mybatisplus.service.IService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zy.asrs.entity.BasStationTv;
/**
src/main/java/com/zy/asrs/service/HttpRequestLogService.java
@@ -1,7 +1,7 @@
package com.zy.asrs.service;
import com.zy.asrs.entity.HttpRequestLog;
import com.baomidou.mybatisplus.service.IService;
import com.baomidou.mybatisplus.extension.service.IService;
public interface HttpRequestLogService extends IService<HttpRequestLog> {
src/main/java/com/zy/asrs/service/TvDeviceService.java
@@ -1,6 +1,6 @@
package com.zy.asrs.service;
import com.baomidou.mybatisplus.service.IService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zy.asrs.entity.TvDevice;
import java.util.List;
src/main/java/com/zy/asrs/service/impl/ApiLogServiceImpl.java
@@ -1,6 +1,6 @@
package com.zy.asrs.service.impl;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.core.common.SnowflakeIdWorker;
import com.zy.asrs.entity.ApiLog;
import com.zy.asrs.mapper.ApiLogMapper;
@@ -39,7 +39,7 @@
                null,    // 修改时间
                null    // 备注
        );
        if (!this.insert(apiLog)) {
        if (!this.save(apiLog)) {
            log.error("接口调用日志保存失败!");
        }
    }
src/main/java/com/zy/asrs/service/impl/ApkBuildTaskServiceImpl.java
@@ -2,7 +2,7 @@
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zy.asrs.entity.ApkBuildTask;
import com.zy.asrs.mapper.ApkBuildTaskMapper;
import com.zy.asrs.service.ApkBuildTaskService;
@@ -103,13 +103,13 @@
        task.setQueueSize(queueSize);
        task.setCreatedAt(new Date());
        this.insert(task);
        this.save(task);
        return task;
    }
    @Override
    public ApkBuildTask refreshStatus(Long id) throws Exception {
        ApkBuildTask task = this.selectById(id);
        ApkBuildTask task = this.getById(id);
        if (task == null) {
            throw new RuntimeException("任务不存在");
        }
@@ -194,7 +194,7 @@
    @Override
    public String downloadApk(Long id) throws Exception {
        ApkBuildTask task = this.selectById(id);
        ApkBuildTask task = this.getById(id);
        if (task == null) {
            throw new RuntimeException("任务不存在");
        }
@@ -268,7 +268,7 @@
    @Override
    public String installApk(Long id, String deviceIp) throws Exception {
        ApkBuildTask task = this.selectById(id);
        ApkBuildTask task = this.getById(id);
        if (task == null) {
            throw new RuntimeException("任务不存在");
        }
src/main/java/com/zy/asrs/service/impl/BasStationServiceImpl.java
@@ -3,7 +3,7 @@
import com.zy.asrs.mapper.BasStationMapper;
import com.zy.asrs.entity.BasStation;
import com.zy.asrs.service.BasStationService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
@Service("basStationService")
src/main/java/com/zy/asrs/service/impl/BasStationTvServiceImpl.java
@@ -1,6 +1,6 @@
package com.zy.asrs.service.impl;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zy.asrs.entity.BasStationTv;
import com.zy.asrs.mapper.BasStationTvMapper;
import com.zy.asrs.service.BasStationTvService;
src/main/java/com/zy/asrs/service/impl/HttpRequestLogServiceImpl.java
@@ -3,7 +3,7 @@
import com.zy.asrs.mapper.HttpRequestLogMapper;
import com.zy.asrs.entity.HttpRequestLog;
import com.zy.asrs.service.HttpRequestLogService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
@Service("httpRequestLogService")
src/main/java/com/zy/asrs/service/impl/TvDeviceServiceImpl.java
@@ -1,7 +1,7 @@
package com.zy.asrs.service.impl;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zy.asrs.entity.TvDevice;
import com.zy.asrs.mapper.TvDeviceMapper;
import com.zy.asrs.service.TvDeviceService;
@@ -37,7 +37,7 @@
    @Override
    public String testConnection(Long id) throws Exception {
        TvDevice device = this.selectById(id);
        TvDevice device = this.getById(id);
        if (device == null) {
            throw new RuntimeException("设备不存在");
        }
@@ -83,7 +83,7 @@
    @Override
    public int refreshAllStatus() {
        List<TvDevice> devices = this.selectList(null);
        List<TvDevice> devices = this.list(new QueryWrapper<>());
        int count = 0;
        for (TvDevice device : devices) {
            try {
@@ -98,7 +98,7 @@
    @Override
    public String installApk(Long deviceId, String apkPath) throws Exception {
        TvDevice device = this.selectById(deviceId);
        TvDevice device = this.getById(deviceId);
        if (device == null) {
            throw new RuntimeException("设备不存在");
        }
@@ -143,7 +143,7 @@
    public List<String> batchInstallApk(List<Long> deviceIds, String apkPath) {
        List<String> results = new ArrayList<>();
        for (Long deviceId : deviceIds) {
            TvDevice device = this.selectById(deviceId);
            TvDevice device = this.getById(deviceId);
            String deviceName = device != null ? device.getName() : "ID:" + deviceId;
            try {
                String result = installApk(deviceId, apkPath);
@@ -157,12 +157,12 @@
    @Override
    public List<TvDevice> getOnlineDevices() {
        return this.selectList(new EntityWrapper<TvDevice>().eq("status", 1));
        return this.list(new QueryWrapper<TvDevice>().eq("status", 1));
    }
    @Override
    public String launchApp(Long deviceId, String packageName) throws Exception {
        TvDevice device = this.selectById(deviceId);
        TvDevice device = this.getById(deviceId);
        if (device == null) {
            throw new RuntimeException("设备不存在");
        }
@@ -253,7 +253,7 @@
    public List<String> batchLaunchApp(List<Long> deviceIds, String packageName) {
        List<String> results = new ArrayList<>();
        for (Long deviceId : deviceIds) {
            TvDevice device = this.selectById(deviceId);
            TvDevice device = this.getById(deviceId);
            String deviceName = device != null ? device.getName() : "ID:" + deviceId;
            try {
                String result = launchApp(deviceId, packageName);
@@ -267,7 +267,7 @@
    @Override
    public String captureScreen(Long deviceId) throws Exception {
        TvDevice device = this.selectById(deviceId);
        TvDevice device = this.getById(deviceId);
        if (device == null) {
            throw new RuntimeException("设备不存在");
        }
@@ -336,7 +336,7 @@
    @Override
    public String stopApp(Long deviceId, String packageName) throws Exception {
        TvDevice device = this.selectById(deviceId);
        TvDevice device = this.getById(deviceId);
        if (device == null) {
            throw new RuntimeException("设备不存在");
        }
@@ -394,7 +394,7 @@
    public List<String> batchRestartApp(List<Long> deviceIds, String packageName) {
        List<String> results = new ArrayList<>();
        for (Long deviceId : deviceIds) {
            TvDevice device = this.selectById(deviceId);
            TvDevice device = this.getById(deviceId);
            String deviceName = device != null ? device.getName() : "ID:" + deviceId;
            try {
                String result = restartApp(deviceId, packageName);
src/main/java/com/zy/asrs/timer/WcsStationTimer.java
@@ -3,7 +3,7 @@
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zy.asrs.entity.BasStation;
import com.zy.asrs.entity.dto.WcsStationDto;
import com.zy.asrs.service.BasStationService;
@@ -34,7 +34,7 @@
    @Scheduled(cron = "0/3 * * * * ? ")
    public synchronized void execute() {
        Config wcsStationUrlConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "wcsStationUrl"));
        Config wcsStationUrlConfig = configService.getOne(new QueryWrapper<Config>().eq("code", "wcsStationUrl"));
        if (wcsStationUrlConfig == null) {
            return;
        }
@@ -46,7 +46,7 @@
            HashMap<String, Object> requestParam = new HashMap<>();
            List<Integer> list = new ArrayList<>();
            List<BasStation> basStations = basStationService.selectList(new EntityWrapper<>());
            List<BasStation> basStations = basStationService.list(new QueryWrapper<>());
            for (BasStation basStation : basStations) {
                list.add(basStation.getStationId());
            }
src/main/java/com/zy/asrs/timer/WmsDataTimer.java
@@ -3,7 +3,7 @@
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.core.common.Cools;
import com.zy.asrs.entity.BasStation;
import com.zy.asrs.entity.dto.*;
@@ -39,7 +39,7 @@
    //WMS任务查询接口
    @Scheduled(cron = "0/3 * * * * ? ")
    public synchronized void taskQuery() {
        Config wmsTaskQueryUrlConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "wmsTaskQueryUrl"));
        Config wmsTaskQueryUrlConfig = configService.getOne(new QueryWrapper<Config>().eq("code", "wmsTaskQueryUrl"));
        if (wmsTaskQueryUrlConfig == null) {
            return;
        }
@@ -50,7 +50,7 @@
        try {
            HashMap<String, Object> requestParam = new HashMap<>();
            List<BasStation> basStations = basStationService.selectList(new EntityWrapper<BasStation>().eq("out_enable", "Y"));
            List<BasStation> basStations = basStationService.list(new QueryWrapper<BasStation>().eq("out_enable", "Y"));
            for (BasStation basStation : basStations) {
                WcsStationDto wcsStationDto = stationUtils.stationMap.get(basStation.getStationId());
                if (wcsStationDto == null) {
@@ -101,7 +101,7 @@
    //WMS入库任务查询接口
    @Scheduled(cron = "0/3 * * * * ? ")
    public synchronized void inTaskQuery() {
        Config wmsCombQueryUrlConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "wmsCombQueryUrl"));
        Config wmsCombQueryUrlConfig = configService.getOne(new QueryWrapper<Config>().eq("code", "wmsCombQueryUrl"));
        if (wmsCombQueryUrlConfig == null) {
            return;
        }
@@ -112,7 +112,7 @@
        try {
            HashMap<String, Object> requestParam = new HashMap<>();
            List<BasStation> basStations = basStationService.selectList(new EntityWrapper<BasStation>().eq("in_enable", "Y"));
            List<BasStation> basStations = basStationService.list(new QueryWrapper<BasStation>().eq("in_enable", "Y"));
            for (BasStation basStation : basStations) {
                WcsStationDto wcsStationDto = stationUtils.stationMap.get(basStation.getStationId());
                if (wcsStationDto == null) {
@@ -167,7 +167,7 @@
    @Synchronized
    @Scheduled(cron = "0/3 * * * * ? ")
    public void locQuery() {
        Config wmsUrlConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "wmsLocQueryUrl"));
        Config wmsUrlConfig = configService.getOne(new QueryWrapper<Config>().eq("code", "wmsLocQueryUrl"));
        if (wmsUrlConfig == null) {
            return;
        }
@@ -213,7 +213,7 @@
    @Synchronized
    @Scheduled(cron = "0/3 * * * * ? ")
    public void inOutLineCharts() {
        Config wmsUrlConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "wmsInOutLineChartsQueryUrl"));
        Config wmsUrlConfig = configService.getOne(new QueryWrapper<Config>().eq("code", "wmsInOutLineChartsQueryUrl"));
        if (wmsUrlConfig == null) {
            return;
        }
@@ -242,7 +242,7 @@
    @Synchronized
    @Scheduled(cron = "0/3 * * * * ? ")
    public void locDetlStatistics() {
        Config wmsUrlConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "wmsLocDetlStatisticsQueryUrl"));
        Config wmsUrlConfig = configService.getOne(new QueryWrapper<Config>().eq("code", "wmsLocDetlStatisticsQueryUrl"));
        if (wmsUrlConfig == null) {
            return;
        }
src/main/java/com/zy/common/config/AdminInterceptor.java
@@ -1,7 +1,7 @@
package com.zy.common.config;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.core.annotations.ManagerAuth;
import com.core.common.BaseRes;
import com.core.common.Cools;
@@ -14,17 +14,17 @@
import org.springframework.stereotype.Component;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
import org.springframework.web.servlet.HandlerInterceptor;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.lang.reflect.Method;
/**
 * Created by vincent on 2019-06-13
 */
@Component
public class AdminInterceptor extends HandlerInterceptorAdapter {
public class AdminInterceptor implements HandlerInterceptor {
    @Value("${super.pwd}")
    private String superPwd;
@@ -81,19 +81,19 @@
//        if (obj instanceof OperateLog) {
//            OperateLog operate = (OperateLog) obj;
//            operate.setResponse(String.valueOf(response.getStatus()));
//            operateLogService.insert(operate);
//            operateLogService.save(operate);
//        }
    }
    private boolean check(HttpServletRequest request, HttpServletResponse response, String memo) {
        try {
            String token = request.getHeader("token");
            UserLogin userLogin = userLoginService.selectOne(new EntityWrapper<UserLogin>().eq("token", token).eq("system", "WCS"));
            UserLogin userLogin = userLoginService.getOne(new QueryWrapper<UserLogin>().eq("token", token).eq("system", "WCS"));
            if (null == userLogin){
                Http.response(response, BaseRes.DENIED);
                return false;
            }
            User user = userService.selectById(userLogin.getUserId());
            User user = userService.getById(userLogin.getUserId());
            String deToken = Cools.deTokn(token, user.getPassword());
            long timestamp = Long.parseLong(deToken.substring(0, 13));
            // 1天后过期
@@ -113,7 +113,7 @@
            operateLog.setUserId(user.getId());
            operateLog.setRequest(JSON.toJSONString(request.getParameterMap()));
            operateLog.setResponse(JSON.toJSONString(request.getRequestURI()));
            operateLogService.insert(operateLog);
            operateLogService.save(operateLog);
            // 请求缓存
            request.setAttribute("userId", user.getId());
//            request.setAttribute("operateLog", operateLog);
@@ -133,9 +133,9 @@
        Permission permission = new Permission();
        permission.setAction(action);
        permission.setStatus((short) 1);
        Permission one = permissionService.selectOne(new EntityWrapper<>(permission));
        Permission one = permissionService.getOne(new QueryWrapper<>(permission));
        if (!Cools.isEmpty(one)) {
            RolePermission rolePermission = rolePermissionService.selectOne(new EntityWrapper<>(new RolePermission(user.getRoleId(), permission.getId())));
            RolePermission rolePermission = rolePermissionService.getOne(new QueryWrapper<>(new RolePermission(user.getRoleId(), permission.getId())));
            return !Cools.isEmpty(rolePermission);
        }
        return true;
src/main/java/com/zy/common/config/AspectConfig.java
@@ -20,8 +20,8 @@
import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.Date;
@@ -91,7 +91,7 @@
    }
    private void saveLog(ProceedingJoinPoint joinPoint, HttpServletRequest request, Object result, String memo) {
        apiLogService.insert(new ApiLog(
        apiLogService.save(new ApiLog(
                null,
                memo,
                request != null ? Optional.ofNullable(String.valueOf(request.getRequestURI())).orElse(null) : null,
@@ -110,7 +110,7 @@
    private void saveErrLog(ProceedingJoinPoint joinPoint, HttpServletRequest request, Object response, Throwable ex,
                            String memo) {
        apiLogService.insert(new ApiLog(
        apiLogService.save(new ApiLog(
                null,
                memo,
                request != null ? Optional.ofNullable(String.valueOf(request.getRequestURI())).orElse(null) : null,
src/main/java/com/zy/common/config/CoreCompatConfig.java
New file
@@ -0,0 +1,20 @@
package com.zy.common.config;
import com.core.common.SnowflakeIdWorker;
import com.core.common.SpringUtils;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class CoreCompatConfig {
    @Bean
    public SnowflakeIdWorker snowflakeIdWorker() {
        return new SnowflakeIdWorker();
    }
    @Bean
    public SpringUtils springUtils() {
        return new SpringUtils();
    }
}
src/main/java/com/zy/common/config/MybatisPlusConfig.java
New file
@@ -0,0 +1,20 @@
package com.zy.common.config;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
@MapperScan({"com.zy.asrs.mapper", "com.zy.system.mapper"})
public class MybatisPlusConfig {
    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor() {
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
        return interceptor;
    }
}
src/main/java/com/zy/common/entity/Parameter.java
@@ -1,7 +1,7 @@
package com.zy.common.entity;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.zy.system.entity.Config;
@@ -36,7 +36,7 @@
     */
    public static Parameter reset() {
        ConfigService configService = SpringUtils.getBean(ConfigService.class);
        List<Config> configs = configService.selectList(new EntityWrapper<Config>().eq("status", "1"));
        List<Config> configs = configService.list(new QueryWrapper<Config>().eq("status", "1"));
        Map<String, Object> data = new HashMap<>();
        for (Config config : configs) {
            if (config.getType() == 1) {
src/main/java/com/zy/common/model/PageParam.java
@@ -1,6 +1,6 @@
package com.zy.common.model;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
/**
 * 分页参数
@@ -8,10 +8,10 @@
 */
public class PageParam {
    @ApiModelProperty(value="分页索引",required=true)
    @Schema(description = "分页索引", requiredMode = Schema.RequiredMode.REQUIRED)
    private int page = 1;
    @ApiModelProperty(value="单页数量",required=true)
    @Schema(description = "单页数量", requiredMode = Schema.RequiredMode.REQUIRED)
    private int size = 10;
    public Integer getPage() {
src/main/java/com/zy/common/utils/Http.java
@@ -5,7 +5,7 @@
import com.alibaba.fastjson.JSONObject;
import com.core.common.R;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponse;
import java.io.PrintWriter;
/**
src/main/java/com/zy/common/utils/RandomValidateCodeUtil.java
@@ -1,7 +1,7 @@
package com.zy.common.utils;
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponse;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.util.Map;
src/main/java/com/zy/common/web/AuthController.java
@@ -1,8 +1,8 @@
package com.zy.common.web;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.core.annotations.ManagerAuth;
import com.core.common.Cools;
import com.core.common.R;
@@ -22,7 +22,7 @@
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponse;
import java.util.*;
/**
@@ -57,9 +57,9 @@
            res.put("token", Cools.enToken(System.currentTimeMillis() + mobile, superPwd));
            return R.ok(res);
        }
        EntityWrapper<User> userWrapper = new EntityWrapper<>();
        QueryWrapper<User> userWrapper = new QueryWrapper<>();
        userWrapper.eq("mobile", mobile);
        User user = userService.selectOne(userWrapper);
        User user = userService.getOne(userWrapper);
        if (Cools.isEmpty(user)){
            return R.parse(CodeRes.USER_10001);
        }
@@ -70,12 +70,12 @@
            return R.parse(CodeRes.USER_10003);
        }
        String token = Cools.enToken(System.currentTimeMillis() + mobile, user.getPassword());
        userLoginService.delete(new EntityWrapper<UserLogin>().eq("user_id", user.getId()).eq("system", "WCS"));
        userLoginService.remove(new QueryWrapper<UserLogin>().eq("user_id", user.getId()).eq("system", "WCS"));
        UserLogin userLogin = new UserLogin();
        userLogin.setUserId(user.getId());
        userLogin.setToken(token);
        userLogin.setSystem("WCS");
        userLoginService.insert(userLogin);
        userLoginService.save(userLogin);
        Map<String, Object> res = new HashMap<>();
        res.put("username", user.getUsername());
        res.put("token", token);
@@ -112,30 +112,30 @@
    @RequestMapping("/user/detail/auth")
    @ManagerAuth
    public R userDetail(){
        return R.ok(userService.selectById(getUserId()));
        return R.ok(userService.getById(getUserId()));
    }
    @RequestMapping("/menu/auth")
    @ManagerAuth(memo = "首页菜单")
    public R menu(){
        // 获取所有一级菜单
        List<Resource> oneLevel = resourceService.selectList(new EntityWrapper<Resource>().eq("level", 1).eq("status", 1).orderBy("sort"));
        List<Resource> oneLevel = resourceService.list(new QueryWrapper<Resource>().eq("level", 1).eq("status", 1).orderByAsc("sort"));
        User user = null;
        Wrapper<Resource> resourceWrapper;
        if (getUserId() == 9527) {
            resourceWrapper = new EntityWrapper<Resource>().eq("level", 2).eq("status", 1).orderBy("sort");
            resourceWrapper = new QueryWrapper<Resource>().eq("level", 2).eq("status", 1).orderByAsc("sort");
        } else {
            // 获取当前用户的所有二级菜单
            user = userService.selectById(getUserId());
            List<RoleResource> roleResources = roleResourceService.selectList(new EntityWrapper<RoleResource>().eq("role_id", user.getRoleId()));
            user = userService.getById(getUserId());
            List<RoleResource> roleResources = roleResourceService.list(new QueryWrapper<RoleResource>().eq("role_id", user.getRoleId()));
            List<Long> resourceIds = new ArrayList<>();
            roleResources.forEach(roleResource -> resourceIds.add(roleResource.getResourceId()));
            if (resourceIds.isEmpty()){
                return R.ok();
            }
            resourceWrapper = new EntityWrapper<Resource>().in("id", resourceIds).eq("level", 2).eq("status", 1).orderBy("sort");
            resourceWrapper = new QueryWrapper<Resource>().in("id", resourceIds).eq("level", 2).eq("status", 1).orderByAsc("sort");
        }
        List<Resource> twoLevel = resourceService.selectList(resourceWrapper);
        List<Resource> twoLevel = resourceService.list(resourceWrapper);
        List<Map<String, Object>> result = new ArrayList<>();
        for (Resource menu : oneLevel) {
            Map<String, Object> map = new HashMap<>();
@@ -147,12 +147,12 @@
                    // 是否拥有查看权限
                    if (getUserId() != 9527) {
                        Resource view = resourceService.selectOne(new EntityWrapper<Resource>().eq("resource_id", resource.getId()).like("code", "view"));
                        Resource view = resourceService.getOne(new QueryWrapper<Resource>().eq("resource_id", resource.getId()).like("code", "view"));
                        if (!Cools.isEmpty(view)){
                            RoleResource param = new RoleResource();
                            param.setResourceId(view.getId());
                            param.setRoleId(user.getRoleId());
                            if (null == roleResourceService.selectOne(new EntityWrapper<>(param))){
                            if (null == roleResourceService.getOne(new QueryWrapper<>(param))){
                                continue;
                            }
                        }
@@ -178,7 +178,7 @@
    @RequestMapping("/power/list/auth")
    @ManagerAuth
    public R powerList(){
        List<Resource> oneLevels = resourceService.selectList(new EntityWrapper<Resource>().eq("level", 1).eq("status", 1).orderBy("sort"));
        List<Resource> oneLevels = resourceService.list(new QueryWrapper<Resource>().eq("level", 1).eq("status", 1).orderByAsc("sort"));
        List<Map> result = new ArrayList<>();
        // 一级
        for (Resource oneLevel : oneLevels){
@@ -188,7 +188,7 @@
            oneLevelMap.put("id", oneLevel.getId());
            oneLevelMap.put("spread", true);
            oneLevelMap.put("children", twoLevelsList);
            List<Resource> twoLevels = resourceService.selectList(new EntityWrapper<Resource>().eq("resource_id", oneLevel.getId()).eq("level", 2).eq("status", 1).orderBy("sort"));
            List<Resource> twoLevels = resourceService.list(new QueryWrapper<Resource>().eq("resource_id", oneLevel.getId()).eq("level", 2).eq("status", 1).orderByAsc("sort"));
            // 二级
            for (Resource twoLevel : twoLevels){
                Map<String, Object> twoLevelMap = new HashMap<>();
@@ -199,7 +199,7 @@
                List<Map> threeLevelsList = new ArrayList<>();
                twoLevelMap.put("children", threeLevelsList);
                // 三级
                List<Resource> threeLevels = resourceService.selectList(new EntityWrapper<Resource>().eq("resource_id", twoLevel.getId()).eq("level", 3).eq("status", 1).orderBy("sort"));
                List<Resource> threeLevels = resourceService.list(new QueryWrapper<Resource>().eq("resource_id", twoLevel.getId()).eq("level", 3).eq("status", 1).orderByAsc("sort"));
                for (Resource threeLevel : threeLevels){
                    Map<String, Object> threeLevelMap = new HashMap<>();
                    threeLevelMap.put("title", threeLevel.getName());
@@ -220,7 +220,7 @@
        functions.put("spread", true);
        List<Map> funcs = new ArrayList<>();
        functions.put("children", funcs);
        List<Permission> permissions = permissionService.selectList(new EntityWrapper<Permission>().eq("status", 1));
        List<Permission> permissions = permissionService.list(new QueryWrapper<Permission>().eq("status", 1));
        for (Permission permission : permissions) {
            Map<String, Object> func = new HashMap<>();
            func.put("title", permission.getName());
@@ -238,9 +238,9 @@
    public R get(@PathVariable("roleId") Long roleId) {
        List<Object> result = new ArrayList<>();
        // 菜单
        List<RoleResource> roleResources = roleResourceService.selectList(new EntityWrapper<RoleResource>().eq("role_id", roleId));
        List<RoleResource> roleResources = roleResourceService.list(new QueryWrapper<RoleResource>().eq("role_id", roleId));
        for (RoleResource roleResource : roleResources){
            Resource resource = resourceService.selectById(roleResource.getResourceId());
            Resource resource = resourceService.getById(roleResource.getResourceId());
            if (!Cools.isEmpty(resource)){
                if (resource.getLevel() == 3){
                    result.add(resource.getId());
@@ -248,9 +248,9 @@
            }
        }
        // 功能
        List<RolePermission> rolePermissions = rolePermissionService.selectList(new EntityWrapper<RolePermission>().eq("role_id", roleId));
        List<RolePermission> rolePermissions = rolePermissionService.list(new QueryWrapper<RolePermission>().eq("role_id", roleId));
        for (RolePermission rolePermission : rolePermissions){
            Permission permission = permissionService.selectById(rolePermission.getPermissionId());
            Permission permission = permissionService.getById(rolePermission.getPermissionId());
            if (!Cools.isEmpty(permission)){
                result.add(permission.getAction());
            }
@@ -262,18 +262,18 @@
    @ManagerAuth(memo = "授权")
    @Transactional
    public R power(Long roleId, String powers){
        Role role = roleService.selectById(roleId);
        Role role = roleService.getById(roleId);
        Long leaderId = role.getLeader();
        roleResourceService.delete(new EntityWrapper<RoleResource>().eq("role_id", roleId));
        rolePermissionService.delete(new EntityWrapper<RolePermission>().eq("role_id", roleId));
        roleResourceService.remove(new QueryWrapper<RoleResource>().eq("role_id", roleId));
        rolePermissionService.remove(new QueryWrapper<RolePermission>().eq("role_id", roleId));
        if (!Cools.isEmpty(powers)){
            List<PowerDto> dtos = JSON.parseArray(powers, PowerDto.class);
            for (PowerDto dto : dtos) {
                Resource resource = resourceService.selectOne(new EntityWrapper<Resource>().eq("id", dto.getTwo()).eq("level", 2));
                Resource resource = resourceService.getOne(new QueryWrapper<Resource>().eq("id", dto.getTwo()).eq("level", 2));
                if (!Cools.isEmpty(resource)) {
                    // 校验上级权限
                    if (leaderId != null) {
                        RoleResource roleResource = roleResourceService.selectOne(new EntityWrapper<RoleResource>().eq("role_id", leaderId).eq("resource_id", resource.getId()));
                        RoleResource roleResource = roleResourceService.getOne(new QueryWrapper<RoleResource>().eq("role_id", leaderId).eq("resource_id", resource.getId()));
                        if (null == roleResource) {
                            throw new CoolException(resource.getName().concat("无法授权给").concat(role.getName()));
                        }
@@ -281,22 +281,22 @@
                    RoleResource roleResource = new RoleResource();
                    roleResource.setRoleId(roleId);
                    roleResource.setResourceId(resource.getId());
                    roleResourceService.insert(roleResource);
                    roleResourceService.save(roleResource);
                } else {
                    Permission permission = permissionService.selectOne(new EntityWrapper<Permission>().eq("action", dto.getTwo()));
                    Permission permission = permissionService.getOne(new QueryWrapper<Permission>().eq("action", dto.getTwo()));
                    if (!Cools.isEmpty(permission)){
                        RolePermission rolePermission = new RolePermission();
                        rolePermission.setRoleId(roleId);
                        rolePermission.setPermissionId(permission.getId());
                        rolePermissionService.insert(rolePermission);
                        rolePermissionService.save(rolePermission);
                    }
                }
                for (String three : dto.getThree()){
                    Resource resource1 = resourceService.selectOne(new EntityWrapper<Resource>().eq("id", three).eq("level", 3));
                    Resource resource1 = resourceService.getOne(new QueryWrapper<Resource>().eq("id", three).eq("level", 3));
                    if (!Cools.isEmpty(resource1)) {
                        // 校验上级权限
                        if (leaderId != null) {
                            RoleResource roleResource = roleResourceService.selectOne(new EntityWrapper<RoleResource>().eq("role_id", leaderId).eq("resource_id", resource1.getId()));
                            RoleResource roleResource = roleResourceService.getOne(new QueryWrapper<RoleResource>().eq("role_id", leaderId).eq("resource_id", resource1.getId()));
                            if (null == roleResource) {
                                throw new CoolException(resource.getName().concat("的").concat(resource1.getName().concat("无法授权给").concat(role.getName())));
                            }
@@ -304,7 +304,7 @@
                        RoleResource roleResource = new RoleResource();
                        roleResource.setRoleId(roleId);
                        roleResource.setResourceId(resource1.getId());
                        roleResourceService.insert(roleResource);
                        roleResourceService.save(roleResource);
                    }
                }
            }
@@ -317,7 +317,7 @@
    public R buttonResource(@PathVariable("resourceId") Long resourceId) {
        List<Resource> resources;
        if (getUserId() == 9527) {
            resources = resourceService.selectList(new EntityWrapper<Resource>().eq("level", 3).eq("resource_id", resourceId));
            resources = resourceService.list(new QueryWrapper<Resource>().eq("level", 3).eq("resource_id", resourceId));
        } else {
            resources = roleResourceService.getMenuButtomResource(resourceId, getUserId());
        }
src/main/java/com/zy/common/web/BaseController.java
@@ -1,17 +1,17 @@
package com.zy.common.web;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.core.common.BaseRes;
import com.core.common.Cools;
import com.core.controller.AbstractBaseController;
import com.core.exception.CoolException;
import com.zy.system.entity.User;
import com.zy.system.service.UserService;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletRequest;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
@@ -35,7 +35,7 @@
    }
    protected User getUser(){
        User user = userService.selectById(getUserId());
        User user = userService.getById(getUserId());
        if (null == user) {
            throw new CoolException(BaseRes.DENIED);
        }
@@ -46,7 +46,8 @@
        Field[] fields = Cools.getAllFields(cls);
        for (Field field : fields){
            if (fieldName.equals(field.getName())){
                return field.getAnnotation(ApiModelProperty.class).value();
                Schema schema = field.getAnnotation(Schema.class);
                return schema == null ? "" : schema.description();
            }
        }
        return "";
@@ -58,7 +59,7 @@
     * @param set 排除字段集合
     * @param condition 搜索内容
     */
    protected <T> void allLike(Class<T> cls, Set<String> set, EntityWrapper<T> wrapper, String condition){
    protected <T> void allLike(Class<T> cls, Set<String> set, QueryWrapper<T> wrapper, String condition){
        if (Cools.isEmpty(condition)) {
            return;
        }
@@ -83,13 +84,13 @@
        if (columns.isEmpty()) {
            return;
        }
        for (int i=0;i<columns.size();i++){
            if (i==0){
                wrapper.andNew();
            } else {
                wrapper.or();
        wrapper.and(inner -> {
            for (int i = 0; i < columns.size(); i++) {
                if (i > 0) {
                    inner.or();
                }
                inner.like(columns.get(i), condition);
            }
            wrapper.like(columns.get(i), condition);
        }
        });
    }
}
src/main/java/com/zy/common/web/FileController.java
@@ -12,7 +12,7 @@
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
src/main/java/com/zy/common/web/RouterController.java
@@ -5,7 +5,7 @@
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponse;
/**
 * Created by vincent on 2019-07-30
src/main/java/com/zy/system/controller/AnnouncementController.java
@@ -1,8 +1,8 @@
package com.zy.system.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.annotations.ManagerAuth;
import com.core.common.Cools;
import com.core.common.DateUtils;
@@ -24,7 +24,7 @@
    @RequestMapping(value = "/announcement/{id}/auth")
    @ManagerAuth
    public R get(@PathVariable("id") Long id) {
        return R.ok(announcementService.selectById(String.valueOf(id)));
        return R.ok(announcementService.getById(String.valueOf(id)));
    }
    @RequestMapping(value = "/announcement/list/auth")
@@ -35,15 +35,15 @@
                  @RequestParam(required = false)String orderByType,
                  @RequestParam Map<String, Object> param){
        excludeTrash(param);
        EntityWrapper<Announcement> wrapper = new EntityWrapper<>();
        QueryWrapper<Announcement> wrapper = new QueryWrapper<>();
        convert(param, wrapper);
        if (!Cools.isEmpty(orderByField)){
            wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));
            wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));
        }
        return R.ok(announcementService.selectPage(new Page<>(curr, limit), wrapper));
        return R.ok(announcementService.page(new Page<>(curr, limit), wrapper));
    }
    private void convert(Map<String, Object> map, EntityWrapper wrapper){
    private void convert(Map<String, Object> map, QueryWrapper wrapper){
        for (Map.Entry<String, Object> entry : map.entrySet()){
            if ("status".equals(entry.getKey())) {
                wrapper.eq(entry.getKey(), entry.getValue());
@@ -68,7 +68,7 @@
        if (null == announcement.getId()){
            announcement.setCreateTime(new Date());
            announcement.setUpdateTime(new Date());
            announcementService.insert(announcement);
            announcementService.save(announcement);
        } else {
            announcement.setUpdateTime(new Date());
            announcementService.updateById(announcement);
@@ -81,7 +81,7 @@
    public R add(Announcement announcement) {
        announcement.setCreateTime(new Date());
        announcement.setUpdateTime(new Date());
        announcementService.insert(announcement);
        announcementService.save(announcement);
        return R.ok();
    }
@@ -102,7 +102,7 @@
        if (Cools.isEmpty(ids)){
            return R.error();
        }
        announcementService.deleteBatchIds(Arrays.asList(ids));
        announcementService.removeByIds(Arrays.asList(ids));
        return R.ok();
    }
@@ -110,19 +110,19 @@
    @ManagerAuth
    public R export(@RequestBody JSONObject param){
        List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
        EntityWrapper<Announcement> wrapper = new EntityWrapper<>();
        QueryWrapper<Announcement> wrapper = new QueryWrapper<>();
        Map<String, Object> map = excludeTrash(param.getJSONObject("announcement"));
        convert(map, wrapper);
        List<Announcement> list = announcementService.selectList(wrapper);
        List<Announcement> list = announcementService.list(wrapper);
        return R.ok(exportSupport(list, fields));
    }
    @GetMapping("/announcement/top5")
    public R top5(){
        EntityWrapper<Announcement> wrapper = new EntityWrapper<>();
        QueryWrapper<Announcement> wrapper = new QueryWrapper<>();
        wrapper.eq("status", 1);
        wrapper.orderBy("create_time", false);
        wrapper.orderBy(true, false, "create_time");
        wrapper.last("limit 5");
        return R.ok(announcementService.selectList(wrapper));
        return R.ok(announcementService.list(wrapper));
    }
}
src/main/java/com/zy/system/controller/ApiController.java
@@ -1,8 +1,8 @@
package com.zy.system.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.annotations.ManagerAuth;
import com.core.common.Cools;
import com.core.common.DateUtils;
@@ -24,7 +24,7 @@
    @RequestMapping(value = "/api/{id}/auth")
    @ManagerAuth
    public R get(@PathVariable("id") Long id) {
        return R.ok(apiService.selectById(String.valueOf(id)));
        return R.ok(apiService.getById(String.valueOf(id)));
    }
    @RequestMapping(value = "/api/list/auth")
@@ -35,13 +35,13 @@
                  @RequestParam(required = false)String orderByType,
                  @RequestParam Map<String, Object> param){
        excludeTrash(param);
        EntityWrapper<Api> wrapper = new EntityWrapper<>();
        QueryWrapper<Api> wrapper = new QueryWrapper<>();
        convert(param, wrapper);
        wrapper.orderBy("id", false);
        return R.ok(apiService.selectPage(new Page<>(curr, limit), wrapper));
        wrapper.orderBy(true, false, "id");
        return R.ok(apiService.page(new Page<>(curr, limit), wrapper));
    }
    private void convert(Map<String, Object> map, EntityWrapper wrapper){
    private void convert(Map<String, Object> map, QueryWrapper wrapper){
        for (Map.Entry<String, Object> entry : map.entrySet()){
            if (entry.getKey().endsWith(">")) {
                wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue())));
@@ -60,7 +60,7 @@
            return R.error();
        }
        if (null == api.getId()){
            apiService.insert(api);
            apiService.save(api);
        } else {
            apiService.updateById(api);
        }
@@ -70,7 +70,7 @@
    @RequestMapping(value = "/api/add/auth")
    @ManagerAuth
    public R add(Api api) {
        apiService.insert(api);
        apiService.save(api);
        return R.ok();
    }
@@ -90,7 +90,7 @@
        if (Cools.isEmpty(ids)){
            return R.error();
        }
        apiService.deleteBatchIds(Arrays.asList(ids));
        apiService.removeByIds(Arrays.asList(ids));
        return R.ok();
    }
@@ -98,19 +98,19 @@
    @ManagerAuth
    public R export(@RequestBody JSONObject param){
        List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
        EntityWrapper<Api> wrapper = new EntityWrapper<>();
        QueryWrapper<Api> wrapper = new QueryWrapper<>();
        Map<String, Object> map = excludeTrash(param.getJSONObject("api"));
        convert(map, wrapper);
        List<Api> list = apiService.selectList(wrapper);
        List<Api> list = apiService.list(wrapper);
        return R.ok(exportSupport(list, fields));
    }
    @RequestMapping(value = "/apiQuery/auth")
    @ManagerAuth
    public R query(String condition) {
        EntityWrapper<Api> wrapper = new EntityWrapper<>();
        QueryWrapper<Api> wrapper = new QueryWrapper<>();
        wrapper.like("id", condition);
        Page<Api> page = apiService.selectPage(new Page<>(0, 10), wrapper);
        Page<Api> page = apiService.page(new Page<>(0, 10), wrapper);
        List<Map<String, Object>> result = new ArrayList<>();
        for (Api api : page.getRecords()){
            Map<String, Object> map = new HashMap<>();
src/main/java/com/zy/system/controller/ConfigController.java
@@ -2,8 +2,8 @@
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.annotations.ManagerAuth;
import com.core.common.Cools;
import com.core.common.DateUtils;
@@ -29,7 +29,7 @@
    @RequestMapping(value = "/config/{id}/auth")
    @ManagerAuth
    public R get(@PathVariable("id") Long id) {
        return R.ok(configService.selectById(String.valueOf(id)));
        return R.ok(configService.getById(String.valueOf(id)));
    }
    @RequestMapping(value = "/config/list/auth")
@@ -40,21 +40,21 @@
                  @RequestParam(required = false)String orderByType,
                  @RequestParam Map<String, Object> param){
        excludeTrash(param);
        EntityWrapper<Config> wrapper = new EntityWrapper<>();
        QueryWrapper<Config> wrapper = new QueryWrapper<>();
        convert(param, wrapper);
        wrapper.orderBy("id", false);
        return R.ok(configService.selectPage(new Page<>(curr, limit), wrapper));
        wrapper.orderBy(true, false, "id");
        return R.ok(configService.page(new Page<>(curr, limit), wrapper));
    }
    @RequestMapping(value = "/config/listAll/auth")
    @ManagerAuth
    public R listAll(){
        EntityWrapper<Config> wrapper = new EntityWrapper<>();
        wrapper.orderBy("id", false);
        return R.ok(configService.selectList(wrapper));
        QueryWrapper<Config> wrapper = new QueryWrapper<>();
        wrapper.orderBy(true, false, "id");
        return R.ok(configService.list(wrapper));
    }
    private void convert(Map<String, Object> map, EntityWrapper wrapper){
    private void convert(Map<String, Object> map, QueryWrapper wrapper){
        for (Map.Entry<String, Object> entry : map.entrySet()){
            if (entry.getKey().endsWith(">")) {
                wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue())));
@@ -78,7 +78,7 @@
            }
        }
        if (null == config.getId()){
            configService.insert(config);
            configService.save(config);
        } else {
            configService.updateById(config);
            Parameter.reset();
@@ -94,7 +94,7 @@
                return R.error("json解析失败");
            }
        }
        configService.insert(config);
        configService.save(config);
        return R.ok();
    }
@@ -120,7 +120,7 @@
        if (Cools.isEmpty(ids)){
            return R.error();
        }
        configService.deleteBatchIds(Arrays.asList(ids));
        configService.removeByIds(Arrays.asList(ids));
        return R.ok();
    }
@@ -128,19 +128,19 @@
    @ManagerAuth
    public R export(@RequestBody JSONObject param){
        List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
        EntityWrapper<Config> wrapper = new EntityWrapper<>();
        QueryWrapper<Config> wrapper = new QueryWrapper<>();
        Map<String, Object> map = excludeTrash(param.getJSONObject("config"));
        convert(map, wrapper);
        List<Config> list = configService.selectList(wrapper);
        List<Config> list = configService.list(wrapper);
        return R.ok(exportSupport(list, fields));
    }
    @RequestMapping(value = "/configQuery/auth")
    @ManagerAuth
    public R query(String condition) {
        EntityWrapper<Config> wrapper = new EntityWrapper<>();
        QueryWrapper<Config> wrapper = new QueryWrapper<>();
        wrapper.like("id", condition);
        Page<Config> page = configService.selectPage(new Page<>(0, 10), wrapper);
        Page<Config> page = configService.page(new Page<>(0, 10), wrapper);
        List<Map<String, Object>> result = new ArrayList<>();
        for (Config config : page.getRecords()){
            Map<String, Object> map = new HashMap<>();
@@ -173,10 +173,10 @@
    @RequestMapping(value = "/config/getSelectTypes")
    @ManagerAuth
    public R getSelectTypes() {
        EntityWrapper<Config> wrapper = new EntityWrapper<>();
        wrapper.setSqlSelect("DISTINCT select_type as selectType");
        QueryWrapper<Config> wrapper = new QueryWrapper<>();
        wrapper.select("DISTINCT select_type as selectType");
        wrapper.isNotNull("select_type");
        List<Map<String, Object>> maps = configService.selectMaps(wrapper);
        List<Map<String, Object>> maps = configService.listMaps(wrapper);
        List<String> types = new ArrayList<>();
        for (Map<String, Object> map : maps) {
            if (map != null && map.get("selectType") != null) {
src/main/java/com/zy/system/controller/HomeController.java
@@ -1,6 +1,6 @@
package com.zy.system.controller;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.core.annotations.ManagerAuth;
import com.core.common.Arith;
import com.core.common.R;
@@ -31,9 +31,9 @@
    @RequestMapping("/top")
    @ManagerAuth
    public R top(){
        int logTotal = operateLogService.selectCount(new EntityWrapper<>());
        long logTotal = operateLogService.count(new QueryWrapper<>());
        int logWeek = operateLogService.selectCountByCurrentWeek();
        int userTotal = userService.selectCount(new EntityWrapper<>());
        long userTotal = userService.count(new QueryWrapper<>());
        int loginWeek = userLoginService.selectCountByCurrentWeek();
        Map<String, Object> result = new HashMap<>();
src/main/java/com/zy/system/controller/HostController.java
@@ -1,8 +1,8 @@
package com.zy.system.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.annotations.ManagerAuth;
import com.core.common.Cools;
import com.core.common.DateUtils;
@@ -24,7 +24,7 @@
    @RequestMapping(value = "/host/{id}/auth")
    @ManagerAuth
    public R get(@PathVariable("id") Long id) {
        return R.ok(hostService.selectById(String.valueOf(id)));
        return R.ok(hostService.getById(String.valueOf(id)));
    }
    @RequestMapping(value = "/host/list/auth")
@@ -35,13 +35,13 @@
                  @RequestParam(required = false)String orderByType,
                  @RequestParam Map<String, Object> param){
        excludeTrash(param);
        EntityWrapper<Host> wrapper = new EntityWrapper<>();
        QueryWrapper<Host> wrapper = new QueryWrapper<>();
        convert(param, wrapper);
        wrapper.orderBy("id", false);
        return R.ok(hostService.selectPage(new Page<>(curr, limit), wrapper));
        wrapper.orderBy(true, false, "id");
        return R.ok(hostService.page(new Page<>(curr, limit), wrapper));
    }
    private void convert(Map<String, Object> map, EntityWrapper wrapper){
    private void convert(Map<String, Object> map, QueryWrapper wrapper){
        for (Map.Entry<String, Object> entry : map.entrySet()){
            if (entry.getKey().endsWith(">")) {
                wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue())));
@@ -60,7 +60,7 @@
            return R.error();
        }
        if (null == host.getId()){
            hostService.insert(host);
            hostService.save(host);
        } else {
            hostService.updateById(host);
        }
@@ -70,7 +70,7 @@
    @RequestMapping(value = "/host/add/auth")
    @ManagerAuth
    public R add(Host host) {
        hostService.insert(host);
        hostService.save(host);
        return R.ok();
    }
@@ -90,7 +90,7 @@
        if (Cools.isEmpty(ids)){
            return R.error();
        }
        hostService.deleteBatchIds(Arrays.asList(ids));
        hostService.removeByIds(Arrays.asList(ids));
        return R.ok();
    }
@@ -98,19 +98,19 @@
    @ManagerAuth
    public R export(@RequestBody JSONObject param){
        List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
        EntityWrapper<Host> wrapper = new EntityWrapper<>();
        QueryWrapper<Host> wrapper = new QueryWrapper<>();
        Map<String, Object> map = excludeTrash(param.getJSONObject("host"));
        convert(map, wrapper);
        List<Host> list = hostService.selectList(wrapper);
        List<Host> list = hostService.list(wrapper);
        return R.ok(exportSupport(list, fields));
    }
    @RequestMapping(value = "/hostQuery/auth")
    @ManagerAuth
    public R query(String condition) {
        EntityWrapper<Host> wrapper = new EntityWrapper<>();
        QueryWrapper<Host> wrapper = new QueryWrapper<>();
        wrapper.like("name", condition);
        Page<Host> page = hostService.selectPage(new Page<>(0, 10), wrapper);
        Page<Host> page = hostService.page(new Page<>(0, 10), wrapper);
        List<Map<String, Object>> result = new ArrayList<>();
        for (Host host : page.getRecords()){
            Map<String, Object> map = new HashMap<>();
src/main/java/com/zy/system/controller/OperateLogController.java
@@ -1,8 +1,8 @@
package com.zy.system.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.annotations.ManagerAuth;
import com.core.common.Cools;
import com.core.common.DateUtils;
@@ -24,7 +24,7 @@
    @RequestMapping(value = "/operateLog/{id}/auth")
    @ManagerAuth
    public R get(@PathVariable("id") Long id) {
        return R.ok(operateLogService.selectById(String.valueOf(id)));
        return R.ok(operateLogService.getById(String.valueOf(id)));
    }
    @RequestMapping(value = "/operateLog/list/auth")
@@ -35,13 +35,13 @@
                  @RequestParam(required = false)String orderByType,
                  @RequestParam Map<String, Object> param){
        excludeTrash(param);
        EntityWrapper<OperateLog> wrapper = new EntityWrapper<>();
        QueryWrapper<OperateLog> wrapper = new QueryWrapper<>();
        convert(param, wrapper);
        wrapper.orderBy("id", false);
        return R.ok(operateLogService.selectPage(new Page<>(curr, limit), wrapper));
        wrapper.orderBy(true, false, "id");
        return R.ok(operateLogService.page(new Page<>(curr, limit), wrapper));
    }
    private void convert(Map<String, Object> map, EntityWrapper wrapper){
    private void convert(Map<String, Object> map, QueryWrapper wrapper){
        for (Map.Entry<String, Object> entry : map.entrySet()){
            if (entry.getKey().endsWith(">")) {
                wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue())));
@@ -60,7 +60,7 @@
            return R.error();
        }
        if (null == operateLog.getId()){
            operateLogService.insert(operateLog);
            operateLogService.save(operateLog);
        } else {
            operateLogService.updateById(operateLog);
        }
@@ -70,7 +70,7 @@
    @RequestMapping(value = "/operateLog/add/auth")
    @ManagerAuth
    public R add(OperateLog operateLog) {
        operateLogService.insert(operateLog);
        operateLogService.save(operateLog);
        return R.ok();
    }
@@ -90,7 +90,7 @@
        if (Cools.isEmpty(ids)){
            return R.error();
        }
        operateLogService.deleteBatchIds(Arrays.asList(ids));
        operateLogService.removeByIds(Arrays.asList(ids));
        return R.ok();
    }
@@ -98,19 +98,19 @@
    @ManagerAuth
    public R export(@RequestBody JSONObject param){
        List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
        EntityWrapper<OperateLog> wrapper = new EntityWrapper<>();
        QueryWrapper<OperateLog> wrapper = new QueryWrapper<>();
        Map<String, Object> map = excludeTrash(param.getJSONObject("operateLog"));
        convert(map, wrapper);
        List<OperateLog> list = operateLogService.selectList(wrapper);
        List<OperateLog> list = operateLogService.list(wrapper);
        return R.ok(exportSupport(list, fields));
    }
    @RequestMapping(value = "/operateLogQuery/auth")
    @ManagerAuth
    public R query(String condition) {
        EntityWrapper<OperateLog> wrapper = new EntityWrapper<>();
        QueryWrapper<OperateLog> wrapper = new QueryWrapper<>();
        wrapper.like("id", condition);
        Page<OperateLog> page = operateLogService.selectPage(new Page<>(0, 10), wrapper);
        Page<OperateLog> page = operateLogService.page(new Page<>(0, 10), wrapper);
        List<Map<String, Object>> result = new ArrayList<>();
        for (OperateLog operateLog : page.getRecords()){
            Map<String, Object> map = new HashMap<>();
src/main/java/com/zy/system/controller/PermissionController.java
@@ -1,8 +1,8 @@
package com.zy.system.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.annotations.ManagerAuth;
import com.core.common.Cools;
import com.core.common.DateUtils;
@@ -24,7 +24,7 @@
    @RequestMapping(value = "/permission/{id}/auth")
    @ManagerAuth
    public R get(@PathVariable("id") Long id) {
        return R.ok(permissionService.selectById(String.valueOf(id)));
        return R.ok(permissionService.getById(String.valueOf(id)));
    }
    @RequestMapping(value = "/permission/list/auth")
@@ -35,13 +35,13 @@
                  @RequestParam(required = false)String orderByType,
                  @RequestParam Map<String, Object> param){
        excludeTrash(param);
        EntityWrapper<Permission> wrapper = new EntityWrapper<>();
        QueryWrapper<Permission> wrapper = new QueryWrapper<>();
        convert(param, wrapper);
        wrapper.orderBy("id", false);
        return R.ok(permissionService.selectPage(new Page<>(curr, limit), wrapper));
        wrapper.orderBy(true, false, "id");
        return R.ok(permissionService.page(new Page<>(curr, limit), wrapper));
    }
    private void convert(Map<String, Object> map, EntityWrapper wrapper){
    private void convert(Map<String, Object> map, QueryWrapper wrapper){
        for (Map.Entry<String, Object> entry : map.entrySet()){
            if (entry.getKey().endsWith(">")) {
                wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue())));
@@ -60,7 +60,7 @@
            return R.error();
        }
        if (null == permission.getId()){
            permissionService.insert(permission);
            permissionService.save(permission);
        } else {
            permissionService.updateById(permission);
        }
@@ -70,7 +70,7 @@
    @RequestMapping(value = "/permission/add/auth")
    @ManagerAuth
    public R add(Permission permission) {
        permissionService.insert(permission);
        permissionService.save(permission);
        return R.ok();
    }
@@ -90,7 +90,7 @@
        if (Cools.isEmpty(ids)){
            return R.error();
        }
        permissionService.deleteBatchIds(Arrays.asList(ids));
        permissionService.removeByIds(Arrays.asList(ids));
        return R.ok();
    }
@@ -98,19 +98,19 @@
    @ManagerAuth
    public R export(@RequestBody JSONObject param){
        List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
        EntityWrapper<Permission> wrapper = new EntityWrapper<>();
        QueryWrapper<Permission> wrapper = new QueryWrapper<>();
        Map<String, Object> map = excludeTrash(param.getJSONObject("permission"));
        convert(map, wrapper);
        List<Permission> list = permissionService.selectList(wrapper);
        List<Permission> list = permissionService.list(wrapper);
        return R.ok(exportSupport(list, fields));
    }
    @RequestMapping(value = "/permissionQuery/auth")
    @ManagerAuth
    public R query(String condition) {
        EntityWrapper<Permission> wrapper = new EntityWrapper<>();
        QueryWrapper<Permission> wrapper = new QueryWrapper<>();
        wrapper.like("name", condition);
        Page<Permission> page = permissionService.selectPage(new Page<>(0, 10), wrapper);
        Page<Permission> page = permissionService.page(new Page<>(0, 10), wrapper);
        List<Map<String, Object>> result = new ArrayList<>();
        for (Permission permission : page.getRecords()){
            Map<String, Object> map = new HashMap<>();
src/main/java/com/zy/system/controller/ResourceController.java
@@ -1,8 +1,8 @@
package com.zy.system.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.annotations.ManagerAuth;
import com.core.common.Cools;
import com.core.common.DateUtils;
@@ -24,7 +24,7 @@
    @RequestMapping(value = "/resource/{id}/auth")
    @ManagerAuth
    public R get(@PathVariable("id") Long id) {
        return R.ok(resourceService.selectById(String.valueOf(id)));
        return R.ok(resourceService.getById(String.valueOf(id)));
    }
    @RequestMapping(value = "/resource/list/auth")
@@ -35,13 +35,13 @@
                  @RequestParam(required = false)String orderByType,
                  @RequestParam Map<String, Object> param){
        excludeTrash(param);
        EntityWrapper<Resource> wrapper = new EntityWrapper<>();
        QueryWrapper<Resource> wrapper = new QueryWrapper<>();
        convert(param, wrapper);
        wrapper.orderBy("id", false);
        return R.ok(resourceService.selectPage(new Page<>(curr, limit), wrapper));
        wrapper.orderBy(true, false, "id");
        return R.ok(resourceService.page(new Page<>(curr, limit), wrapper));
    }
    private void convert(Map<String, Object> map, EntityWrapper wrapper){
    private void convert(Map<String, Object> map, QueryWrapper wrapper){
        for (Map.Entry<String, Object> entry : map.entrySet()){
            if (entry.getKey().endsWith(">")) {
                wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue())));
@@ -63,7 +63,7 @@
            if (resource.getSort() == null){
                resource.setSort(999);
            }
            resourceService.insert(resource);
            resourceService.save(resource);
        } else {
            resourceService.updateById(resource);
        }
@@ -73,7 +73,7 @@
    @RequestMapping(value = "/resource/add/auth")
    @ManagerAuth(memo = "菜单添加")
    public R add(Resource resource) {
        resourceService.insert(resource);
        resourceService.save(resource);
        return R.ok();
    }
@@ -91,7 +91,7 @@
    @ManagerAuth(memo = "菜单删除")
    public R delete(@RequestParam(value="ids[]") Long[] ids){
        for (Long id : ids){
            resourceService.deleteById(id);
            resourceService.removeById(id);
        }
        return R.ok();
    }
@@ -100,19 +100,19 @@
    @ManagerAuth(memo = "菜单导出")
    public R export(@RequestBody JSONObject param){
        List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
        EntityWrapper<Resource> wrapper = new EntityWrapper<>();
        QueryWrapper<Resource> wrapper = new QueryWrapper<>();
        Map<String, Object> map = excludeTrash(param.getJSONObject("resource"));
        convert(map, wrapper);
        List<Resource> list = resourceService.selectList(wrapper);
        List<Resource> list = resourceService.list(wrapper);
        return R.ok(exportSupport(list, fields));
    }
    @RequestMapping(value = "/resourceQuery/auth")
    @ManagerAuth
    public R query(String condition) {
        EntityWrapper<Resource> wrapper = new EntityWrapper<>();
        QueryWrapper<Resource> wrapper = new QueryWrapper<>();
        wrapper.like("name", condition);
        Page<Resource> page = resourceService.selectPage(new Page<>(0, 10), wrapper);
        Page<Resource> page = resourceService.page(new Page<>(0, 10), wrapper);
        List<Map<String, Object>> result = new ArrayList<>();
        for (Resource resource : page.getRecords()){
            Map<String, Object> map = new HashMap<>();
@@ -130,14 +130,14 @@
                  @RequestParam(required = false)String orderByField,
                  @RequestParam(required = false)String orderByType,
                  @RequestParam Map<String, Object> param){
        EntityWrapper<Resource> wrapper = new EntityWrapper<>();
        QueryWrapper<Resource> wrapper = new QueryWrapper<>();
        excludeTrash(param);
        convert(param, wrapper);
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));}
        else {
            wrapper.orderBy("sort");
            wrapper.orderByAsc("sort");
        }
        return R.parse("0-操作成功").add(resourceService.selectList(wrapper));
        return R.parse("0-操作成功").add(resourceService.list(wrapper));
    }
}
src/main/java/com/zy/system/controller/RoleController.java
@@ -1,8 +1,8 @@
package com.zy.system.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.annotations.ManagerAuth;
import com.core.common.Cools;
import com.core.common.DateUtils;
@@ -24,7 +24,7 @@
    @RequestMapping(value = "/role/{id}/auth")
    @ManagerAuth
    public R get(@PathVariable("id") Long id) {
        return R.ok(roleService.selectById(String.valueOf(id)));
        return R.ok(roleService.getById(String.valueOf(id)));
    }
    @RequestMapping(value = "/role/list/auth")
@@ -35,21 +35,21 @@
                  @RequestParam(required = false)String orderByType,
                  @RequestParam Map<String, Object> param){
        excludeTrash(param);
        EntityWrapper<Role> wrapper = new EntityWrapper<>();
        QueryWrapper<Role> wrapper = new QueryWrapper<>();
        convert(param, wrapper);
        wrapper.orderBy("id", false);
        wrapper.orderBy(true, false, "id");
        if (9527 == getUserId()) {
            return R.ok(roleService.selectPage(new Page<>(curr, limit), wrapper));
            return R.ok(roleService.page(new Page<>(curr, limit), wrapper));
        }
        Long roleId = getUser().getRoleId();
        Role role = roleService.selectById(roleId);
        Role role = roleService.getById(roleId);
        Long leaderId = role.getLeader();
        if (null != leaderId) {
            List<Long> leaderIds = new ArrayList<>();
            leaderIds.add(roleId);
            while (leaderId != null) {
                Role leader = roleService.selectById(leaderId);
                Role leader = roleService.getById(leaderId);
                leaderIds.add(leader.getId());
                leaderId = leader.getLeader();
            }
@@ -58,10 +58,10 @@
//        if (null != role.getLevel()) {
//            wrapper.gt("level", role.getLevel());
//        }
        return R.ok(roleService.selectPage(new Page<>(curr, limit), wrapper));
        return R.ok(roleService.page(new Page<>(curr, limit), wrapper));
    }
    private void convert(Map<String, Object> map, EntityWrapper wrapper){
    private void convert(Map<String, Object> map, QueryWrapper wrapper){
        for (Map.Entry<String, Object> entry : map.entrySet()){
            if (entry.getKey().endsWith(">")) {
                wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue())));
@@ -80,7 +80,7 @@
            return R.error();
        }
        if (null == role.getId()){
            roleService.insert(role);
            roleService.save(role);
        } else {
            roleService.updateById(role);
        }
@@ -90,7 +90,7 @@
    @RequestMapping(value = "/role/add/auth")
    @ManagerAuth(memo = "角色添加")
    public R add(Role role) {
        roleService.insert(role);
        roleService.save(role);
        return R.ok();
    }
@@ -110,7 +110,7 @@
        if (Cools.isEmpty(ids)){
            return R.error();
        }
        roleService.deleteBatchIds(Arrays.asList(ids));
        roleService.removeByIds(Arrays.asList(ids));
        return R.ok();
    }
@@ -118,27 +118,27 @@
    @ManagerAuth(memo = "角色导出")
    public R export(@RequestBody JSONObject param){
        List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
        EntityWrapper<Role> wrapper = new EntityWrapper<>();
        QueryWrapper<Role> wrapper = new QueryWrapper<>();
        Map<String, Object> map = excludeTrash(param.getJSONObject("role"));
        convert(map, wrapper);
        List<Role> list = roleService.selectList(wrapper);
        List<Role> list = roleService.list(wrapper);
        return R.ok(exportSupport(list, fields));
    }
    @RequestMapping(value = "/roleQuery/auth")
    @ManagerAuth
    public R query(String condition) {
        EntityWrapper<Role> wrapper = new EntityWrapper<>();
        QueryWrapper<Role> wrapper = new QueryWrapper<>();
        wrapper.like("name", condition);
        // 上下级管理
        if (9527 != getUserId()) {
            Long roleId = getUser().getRoleId();
            Role role = roleService.selectById(roleId);
            Role role = roleService.getById(roleId);
            Long leaderId = role.getLeader();
            if (null != leaderId) {
                List<Long> leaderIds = new ArrayList<>();
                while (leaderId != null) {
                    Role leader = roleService.selectById(leaderId);
                    Role leader = roleService.getById(leaderId);
                    leaderIds.add(leader.getId());
                    leaderId = leader.getLeader();
                }
@@ -149,7 +149,7 @@
//            }
        }
        Page<Role> page = roleService.selectPage(new Page<>(0, 10), wrapper);
        Page<Role> page = roleService.page(new Page<>(0, 10), wrapper);
        List<Map<String, Object>> result = new ArrayList<>();
        for (Role role : page.getRecords()){
            Map<String, Object> map = new HashMap<>();
src/main/java/com/zy/system/controller/UserController.java
@@ -1,8 +1,8 @@
package com.zy.system.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.annotations.ManagerAuth;
import com.core.common.Cools;
import com.core.common.DateUtils;
@@ -28,7 +28,7 @@
    @RequestMapping(value = "/user/{id}/auth")
    @ManagerAuth
    public R get(@PathVariable("id") Long id) {
        return R.ok(userService.selectById(String.valueOf(id)));
        return R.ok(userService.getById(String.valueOf(id)));
    }
    @RequestMapping(value = "/user/list/auth")
@@ -39,31 +39,31 @@
                  @RequestParam(required = false)String orderByType,
                  @RequestParam Map<String, Object> param){
        excludeTrash(param);
        EntityWrapper<User> wrapper = new EntityWrapper<>();
        QueryWrapper<User> wrapper = new QueryWrapper<>();
        convert(param, wrapper);
        wrapper.orderBy("id", false);
        wrapper.orderBy(true, false, "id");
        if (9527 == getUserId()) {
            return R.ok(userService.selectPage(new Page<>(curr, limit), wrapper));
            return R.ok(userService.page(new Page<>(curr, limit), wrapper));
        }
        Long roleId = getUser().getRoleId();
        Role role = roleService.selectById(roleId);
        Role role = roleService.getById(roleId);
        Long leaderId = role.getLeader();
        if (null != leaderId) {
            List<Long> leaderIds = new ArrayList<>();
            leaderIds.add(role.getId());
            while (leaderId != null) {
                Role leader = roleService.selectById(leaderId);
                Role leader = roleService.getById(leaderId);
                leaderIds.add(leader.getId());
                leaderId = leader.getLeader();
            }
            wrapper.notIn("role_id", leaderIds);
        }
        return R.ok(userService.selectPage(new Page<>(curr, limit), wrapper));
        return R.ok(userService.page(new Page<>(curr, limit), wrapper));
    }
    private void convert(Map<String, Object> map, EntityWrapper wrapper){
    private void convert(Map<String, Object> map, QueryWrapper wrapper){
        for (Map.Entry<String, Object> entry : map.entrySet()){
            if (entry.getKey().endsWith(">")) {
                wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue())));
@@ -82,7 +82,7 @@
            return R.error();
        }
        if (null == user.getId()){
            userService.insert(user);
            userService.save(user);
        } else {
            userService.updateById(user);
        }
@@ -92,7 +92,7 @@
    @RequestMapping(value = "/user/add/auth")
    @ManagerAuth(memo = "系统用户添加")
    public R add(User user) {
        userService.insert(user);
        userService.save(user);
        return R.ok();
    }
@@ -102,7 +102,7 @@
        if (Cools.isEmpty(user) || null==user.getId()){
            return R.error();
        }
        User entity = userService.selectById(user.getId());
        User entity = userService.getById(user.getId());
        if (user.getPassword()!=null) {
            entity.setPassword(user.getPassword());
        }
@@ -123,7 +123,7 @@
    @ManagerAuth(memo = "系统用户删除")
    public R delete(@RequestParam(value="ids[]") Long[] ids){
        for (Long id : ids){
            userService.deleteById(id);
            userService.removeById(id);
        }
        return R.ok();
    }
@@ -132,19 +132,19 @@
    @ManagerAuth(memo = "系统用户导出")
    public R export(@RequestBody JSONObject param){
        List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
        EntityWrapper<User> wrapper = new EntityWrapper<>();
        QueryWrapper<User> wrapper = new QueryWrapper<>();
        Map<String, Object> map = excludeTrash(param.getJSONObject("user"));
        convert(map, wrapper);
        List<User> list = userService.selectList(wrapper);
        List<User> list = userService.list(wrapper);
        return R.ok(exportSupport(list, fields));
    }
    @RequestMapping(value = "/userQuery/auth")
    @ManagerAuth
    public R query(String condition) {
        EntityWrapper<User> wrapper = new EntityWrapper<>();
        QueryWrapper<User> wrapper = new QueryWrapper<>();
        wrapper.like("username", condition);
        Page<User> page = userService.selectPage(new Page<>(0, 10), wrapper);
        Page<User> page = userService.page(new Page<>(0, 10), wrapper);
        List<Map<String, Object>> result = new ArrayList<>();
        for (User user : page.getRecords()){
            Map<String, Object> map = new HashMap<>();
src/main/java/com/zy/system/controller/UserLoginController.java
@@ -1,8 +1,8 @@
package com.zy.system.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.annotations.ManagerAuth;
import com.core.common.Cools;
import com.core.common.DateUtils;
@@ -24,7 +24,7 @@
    @RequestMapping(value = "/userLogin/{id}/auth")
    @ManagerAuth
    public R get(@PathVariable("id") Long id) {
        return R.ok(userLoginService.selectById(String.valueOf(id)));
        return R.ok(userLoginService.getById(String.valueOf(id)));
    }
    @RequestMapping(value = "/userLogin/list/auth")
@@ -35,13 +35,13 @@
                  @RequestParam(required = false)String orderByType,
                  @RequestParam Map<String, Object> param){
        excludeTrash(param);
        EntityWrapper<UserLogin> wrapper = new EntityWrapper<>();
        QueryWrapper<UserLogin> wrapper = new QueryWrapper<>();
        convert(param, wrapper);
        wrapper.orderBy("id", false);
        return R.ok(userLoginService.selectPage(new Page<>(curr, limit), wrapper));
        wrapper.orderBy(true, false, "id");
        return R.ok(userLoginService.page(new Page<>(curr, limit), wrapper));
    }
    private void convert(Map<String, Object> map, EntityWrapper wrapper){
    private void convert(Map<String, Object> map, QueryWrapper wrapper){
        for (Map.Entry<String, Object> entry : map.entrySet()){
            if (entry.getKey().endsWith(">")) {
                wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue())));
@@ -60,7 +60,7 @@
            return R.error();
        }
        if (null == userLogin.getId()){
            userLoginService.insert(userLogin);
            userLoginService.save(userLogin);
        } else {
            userLoginService.updateById(userLogin);
        }
@@ -70,7 +70,7 @@
    @RequestMapping(value = "/userLogin/add/auth")
    @ManagerAuth
    public R add(UserLogin userLogin) {
        userLoginService.insert(userLogin);
        userLoginService.save(userLogin);
        return R.ok();
    }
@@ -90,7 +90,7 @@
        if (Cools.isEmpty(ids)){
            return R.error();
        }
        userLoginService.deleteBatchIds(Arrays.asList(ids));
        userLoginService.removeByIds(Arrays.asList(ids));
        return R.ok();
    }
@@ -98,19 +98,19 @@
    @ManagerAuth
    public R export(@RequestBody JSONObject param){
        List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
        EntityWrapper<UserLogin> wrapper = new EntityWrapper<>();
        QueryWrapper<UserLogin> wrapper = new QueryWrapper<>();
        Map<String, Object> map = excludeTrash(param.getJSONObject("userLogin"));
        convert(map, wrapper);
        List<UserLogin> list = userLoginService.selectList(wrapper);
        List<UserLogin> list = userLoginService.list(wrapper);
        return R.ok(exportSupport(list, fields));
    }
    @RequestMapping(value = "/userLoginQuery/auth")
    @ManagerAuth
    public R query(String condition) {
        EntityWrapper<UserLogin> wrapper = new EntityWrapper<>();
        QueryWrapper<UserLogin> wrapper = new QueryWrapper<>();
        wrapper.like("token", condition);
        Page<UserLogin> page = userLoginService.selectPage(new Page<>(0, 10), wrapper);
        Page<UserLogin> page = userLoginService.page(new Page<>(0, 10), wrapper);
        List<Map<String, Object>> result = new ArrayList<>();
        for (UserLogin userLogin : page.getRecords()){
            Map<String, Object> map = new HashMap<>();
src/main/java/com/zy/system/entity/Announcement.java
@@ -1,9 +1,9 @@
package com.zy.system.entity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.core.common.Cools;
import java.io.Serializable;
src/main/java/com/zy/system/entity/Api.java
@@ -1,9 +1,9 @@
package com.zy.system.entity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.core.common.Cools;
import java.io.Serializable;
src/main/java/com/zy/system/entity/Config.java
@@ -1,8 +1,8 @@
package com.zy.system.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.io.Serializable;
src/main/java/com/zy/system/entity/Host.java
@@ -1,9 +1,9 @@
package com.zy.system.entity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.core.common.Cools;
import java.io.Serializable;
src/main/java/com/zy/system/entity/OperateLog.java
@@ -1,9 +1,9 @@
package com.zy.system.entity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.zy.system.service.UserService;
@@ -77,7 +77,7 @@
    public String getUserId$(){
        UserService service = SpringUtils.getBean(UserService.class);
        User user = service.selectById(this.userId);
        User user = service.getById(this.userId);
        if (!Cools.isEmpty(user)){
            return user.getUsername();
        }
src/main/java/com/zy/system/entity/Permission.java
@@ -1,9 +1,9 @@
package com.zy.system.entity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.zy.system.service.ResourceService;
@@ -88,7 +88,7 @@
    public String getResourceName(){
        ResourceService service = SpringUtils.getBean(ResourceService.class);
        Resource resource = service.selectById(this.resourceId);
        Resource resource = service.getById(this.resourceId);
        if (!Cools.isEmpty(resource)){
            return resource.getName();
        }
src/main/java/com/zy/system/entity/Resource.java
@@ -1,9 +1,9 @@
package com.zy.system.entity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.zy.system.service.ResourceService;
@@ -102,7 +102,7 @@
    public String getResourceName(){
        ResourceService service = SpringUtils.getBean(ResourceService.class);
        Resource resource = service.selectById(this.resourceId);
        Resource resource = service.getById(this.resourceId);
        if (!Cools.isEmpty(resource)){
            return resource.getName();
        }
src/main/java/com/zy/system/entity/Role.java
@@ -1,12 +1,12 @@
package com.zy.system.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.zy.system.service.RoleService;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
@@ -18,32 +18,32 @@
    /**
     * 编号
     */
    @ApiModelProperty(value= "编号")
    @Schema(description = "编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 编码
     */
    @ApiModelProperty(value= "编码")
    @Schema(description = "编码")
    private String code;
    /**
     * 名称
     */
    @ApiModelProperty(value= "名称")
    @Schema(description = "名称")
    private String name;
    /**
     * 上级
     */
    @ApiModelProperty(value= "上级")
    @Schema(description = "上级")
    private Long leader;
    /**
     * 角色等级 1: 一级  2: 二级  3: 三级  4: 四级  5: 五级  
     */
    @ApiModelProperty(value= "角色等级 1: 一级  2: 二级  3: 三级  4: 四级  5: 五级  ")
    @Schema(description = "角色等级 1: 一级  2: 二级  3: 三级  4: 四级  5: 五级  ")
    private Short level;
    public Role() {}
@@ -92,7 +92,7 @@
    public String getLeader$(){
        RoleService service = SpringUtils.getBean(RoleService.class);
        Role role = service.selectById(this.leader);
        Role role = service.getById(this.leader);
        if (!Cools.isEmpty(role)){
            return String.valueOf(role.getName());
        }
src/main/java/com/zy/system/entity/RolePermission.java
@@ -1,9 +1,9 @@
package com.zy.system.entity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.zy.system.service.PermissionService;
@@ -62,7 +62,7 @@
    public String getRoleName(){
        RoleService service = SpringUtils.getBean(RoleService.class);
        Role role = service.selectById(this.roleId);
        Role role = service.getById(this.roleId);
        if (!Cools.isEmpty(role)){
            return role.getName();
        }
@@ -79,7 +79,7 @@
    public String getPermissionName(){
        PermissionService service = SpringUtils.getBean(PermissionService.class);
        Permission permission = service.selectById(this.permissionId);
        Permission permission = service.getById(this.permissionId);
        if (!Cools.isEmpty(permission)){
            return permission.getName();
        }
src/main/java/com/zy/system/entity/RoleResource.java
@@ -1,9 +1,9 @@
package com.zy.system.entity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.io.Serializable;
src/main/java/com/zy/system/entity/User.java
@@ -1,9 +1,9 @@
package com.zy.system.entity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.zy.system.service.HostService;
@@ -82,7 +82,7 @@
    public String getHostName() {
        HostService service = SpringUtils.getBean(HostService.class);
        Host host = service.selectById(this.hostId);
        Host host = service.getById(this.hostId);
        if (!Cools.isEmpty(host)){
            return host.getName();
        }
@@ -119,7 +119,7 @@
    public String getRoleName(){
        RoleService service = SpringUtils.getBean(RoleService.class);
        Role role = service.selectById(this.roleId);
        Role role = service.getById(this.roleId);
        if (!Cools.isEmpty(role)){
            return role.getName();
        }
src/main/java/com/zy/system/entity/UserLogin.java
@@ -1,9 +1,9 @@
package com.zy.system.entity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.zy.system.service.UserService;
@@ -60,7 +60,7 @@
    public String getUserUsername(){
        UserService service = SpringUtils.getBean(UserService.class);
        User user = service.selectById(this.userId);
        User user = service.getById(this.userId);
        if (!Cools.isEmpty(user)){
            return user.getUsername();
        }
src/main/java/com/zy/system/mapper/AnnouncementMapper.java
@@ -1,6 +1,6 @@
package com.zy.system.mapper;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zy.system.entity.Announcement;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
src/main/java/com/zy/system/mapper/ApiMapper.java
@@ -1,6 +1,6 @@
package com.zy.system.mapper;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zy.system.entity.Api;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
src/main/java/com/zy/system/mapper/ConfigMapper.java
@@ -1,6 +1,6 @@
package com.zy.system.mapper;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zy.system.entity.Config;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
src/main/java/com/zy/system/mapper/HostMapper.java
@@ -1,6 +1,6 @@
package com.zy.system.mapper;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zy.system.entity.Host;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
src/main/java/com/zy/system/mapper/OperateLogMapper.java
@@ -1,6 +1,6 @@
package com.zy.system.mapper;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zy.system.entity.OperateLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
src/main/java/com/zy/system/mapper/PermissionMapper.java
@@ -1,6 +1,6 @@
package com.zy.system.mapper;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zy.system.entity.Permission;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
src/main/java/com/zy/system/mapper/ResourceMapper.java
@@ -1,6 +1,6 @@
package com.zy.system.mapper;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zy.system.entity.Resource;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
src/main/java/com/zy/system/mapper/RoleMapper.java
@@ -1,6 +1,6 @@
package com.zy.system.mapper;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zy.system.entity.Role;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
src/main/java/com/zy/system/mapper/RolePermissionMapper.java
@@ -1,6 +1,6 @@
package com.zy.system.mapper;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zy.system.entity.RolePermission;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
src/main/java/com/zy/system/mapper/RoleResourceMapper.java
@@ -1,6 +1,6 @@
package com.zy.system.mapper;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zy.system.entity.Resource;
import com.zy.system.entity.RoleResource;
import org.apache.ibatis.annotations.Mapper;
src/main/java/com/zy/system/mapper/UserLoginMapper.java
@@ -1,6 +1,6 @@
package com.zy.system.mapper;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zy.system.entity.UserLogin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
src/main/java/com/zy/system/mapper/UserMapper.java
@@ -1,6 +1,6 @@
package com.zy.system.mapper;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zy.system.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
src/main/java/com/zy/system/service/AnnouncementService.java
@@ -1,6 +1,6 @@
package com.zy.system.service;
import com.baomidou.mybatisplus.service.IService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zy.system.entity.Announcement;
public interface AnnouncementService extends IService<Announcement> {
src/main/java/com/zy/system/service/ApiService.java
@@ -1,6 +1,6 @@
package com.zy.system.service;
import com.baomidou.mybatisplus.service.IService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zy.system.entity.Api;
public interface ApiService extends IService<Api> {
src/main/java/com/zy/system/service/ConfigService.java
@@ -1,6 +1,6 @@
package com.zy.system.service;
import com.baomidou.mybatisplus.service.IService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zy.system.entity.Config;
public interface ConfigService extends IService<Config> {
src/main/java/com/zy/system/service/HostService.java
@@ -1,6 +1,6 @@
package com.zy.system.service;
import com.baomidou.mybatisplus.service.IService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zy.system.entity.Host;
public interface HostService extends IService<Host> {
src/main/java/com/zy/system/service/OperateLogService.java
@@ -1,6 +1,6 @@
package com.zy.system.service;
import com.baomidou.mybatisplus.service.IService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zy.system.entity.OperateLog;
import java.util.List;
src/main/java/com/zy/system/service/PermissionService.java
@@ -1,6 +1,6 @@
package com.zy.system.service;
import com.baomidou.mybatisplus.service.IService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zy.system.entity.Permission;
public interface PermissionService extends IService<Permission> {
src/main/java/com/zy/system/service/ResourceService.java
@@ -1,6 +1,6 @@
package com.zy.system.service;
import com.baomidou.mybatisplus.service.IService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zy.system.entity.Resource;
public interface ResourceService extends IService<Resource> {
src/main/java/com/zy/system/service/RolePermissionService.java
@@ -1,6 +1,6 @@
package com.zy.system.service;
import com.baomidou.mybatisplus.service.IService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zy.system.entity.RolePermission;
public interface RolePermissionService extends IService<RolePermission> {
src/main/java/com/zy/system/service/RoleResourceService.java
@@ -1,6 +1,6 @@
package com.zy.system.service;
import com.baomidou.mybatisplus.service.IService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zy.system.entity.Resource;
import com.zy.system.entity.RoleResource;
src/main/java/com/zy/system/service/RoleService.java
@@ -1,6 +1,6 @@
package com.zy.system.service;
import com.baomidou.mybatisplus.service.IService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zy.system.entity.Role;
public interface RoleService extends IService<Role> {
src/main/java/com/zy/system/service/UserLoginService.java
@@ -1,6 +1,6 @@
package com.zy.system.service;
import com.baomidou.mybatisplus.service.IService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zy.system.entity.UserLogin;
public interface UserLoginService extends IService<UserLogin> {
src/main/java/com/zy/system/service/UserService.java
@@ -1,6 +1,6 @@
package com.zy.system.service;
import com.baomidou.mybatisplus.service.IService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zy.system.entity.User;
public interface UserService extends IService<User> {
src/main/java/com/zy/system/service/impl/AnnouncementServiceImpl.java
@@ -1,6 +1,6 @@
package com.zy.system.service.impl;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zy.system.entity.Announcement;
import com.zy.system.mapper.AnnouncementMapper;
import com.zy.system.service.AnnouncementService;
src/main/java/com/zy/system/service/impl/ApiServiceImpl.java
@@ -1,6 +1,6 @@
package com.zy.system.service.impl;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zy.system.entity.Api;
import com.zy.system.mapper.ApiMapper;
import com.zy.system.service.ApiService;
src/main/java/com/zy/system/service/impl/ConfigServiceImpl.java
@@ -1,6 +1,6 @@
package com.zy.system.service.impl;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zy.system.entity.Config;
import com.zy.system.mapper.ConfigMapper;
import com.zy.system.service.ConfigService;
src/main/java/com/zy/system/service/impl/HostServiceImpl.java
@@ -1,6 +1,6 @@
package com.zy.system.service.impl;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zy.system.entity.Host;
import com.zy.system.mapper.HostMapper;
import com.zy.system.service.HostService;
src/main/java/com/zy/system/service/impl/OperateLogServiceImpl.java
@@ -1,6 +1,6 @@
package com.zy.system.service.impl;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.core.common.Cools;
import com.zy.system.entity.OperateLog;
import com.zy.system.mapper.OperateLogMapper;
src/main/java/com/zy/system/service/impl/PermissionServiceImpl.java
@@ -1,6 +1,6 @@
package com.zy.system.service.impl;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zy.system.entity.Permission;
import com.zy.system.mapper.PermissionMapper;
import com.zy.system.service.PermissionService;
src/main/java/com/zy/system/service/impl/ResourceServiceImpl.java
@@ -1,6 +1,6 @@
package com.zy.system.service.impl;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zy.system.entity.Resource;
import com.zy.system.mapper.ResourceMapper;
import com.zy.system.service.ResourceService;
src/main/java/com/zy/system/service/impl/RolePermissionServiceImpl.java
@@ -1,6 +1,6 @@
package com.zy.system.service.impl;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zy.system.entity.RolePermission;
import com.zy.system.mapper.RolePermissionMapper;
import com.zy.system.service.RolePermissionService;
src/main/java/com/zy/system/service/impl/RoleResourceServiceImpl.java
@@ -1,6 +1,6 @@
package com.zy.system.service.impl;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zy.system.entity.Resource;
import com.zy.system.entity.RoleResource;
import com.zy.system.mapper.RoleResourceMapper;
src/main/java/com/zy/system/service/impl/RoleServiceImpl.java
@@ -1,6 +1,6 @@
package com.zy.system.service.impl;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zy.system.entity.Role;
import com.zy.system.mapper.RoleMapper;
import com.zy.system.service.RoleService;
src/main/java/com/zy/system/service/impl/UserLoginServiceImpl.java
@@ -1,6 +1,6 @@
package com.zy.system.service.impl;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zy.system.entity.UserLogin;
import com.zy.system.mapper.UserLoginMapper;
import com.zy.system.service.UserLoginService;
src/main/java/com/zy/system/service/impl/UserServiceImpl.java
@@ -1,6 +1,6 @@
package com.zy.system.service.impl;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zy.system.entity.User;
import com.zy.system.mapper.UserMapper;
import com.zy.system.service.UserService;
src/main/resources/application.yml
@@ -16,17 +16,18 @@
    hikari:
      validation-timeout: 3000
      connection-test-query: select 1
    driver-class-name: com.mysql.jdbc.Driver
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://127.0.0.1:3306/monitor?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
    username: root
    password: root
  mvc:
    static-path-pattern: /**
  redis:
    host: 127.0.0.1
    port: 6379
    database: 6
  #    password: 123456
  data:
    redis:
      host: 127.0.0.1
      port: 6379
      database: 0
      # password: 123456
  servlet:
    multipart:
      max-file-size: 100MB
@@ -55,7 +56,7 @@
logging:
  file:
    path: /stock/out/@pom.build.finalName@/logs
    path: ./stock/out/@pom.build.finalName@/logs
super:
  pwd: xltys1995
@@ -82,4 +83,4 @@
  default-package: com.zy
file:
  upload-path: D:/zy_monitor_files/upload_files/
  upload-path: D:/zy_monitor_files/upload_files/