diff --git a/src/main/java/com/keyware/htey/controller/user/UserController.java b/src/main/java/com/keyware/htey/controller/user/UserController.java index 969fb90..f79d3a1 100644 --- a/src/main/java/com/keyware/htey/controller/user/UserController.java +++ b/src/main/java/com/keyware/htey/controller/user/UserController.java @@ -1,8 +1,7 @@ package com.keyware.htey.controller.user; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.keyware.htey.entity.User; +import com.keyware.htey.entity.user.User; import com.keyware.htey.service.itf.UserService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.responses.ApiResponse; @@ -13,6 +12,7 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; + /** * @author yangmengchuan * @date 2025/1/7 @@ -37,14 +37,15 @@ public class UserController { // 创建分页对象 Page pageParam = new Page<>(pageNum, pageSize); - // 创建查询条件 + /*// 创建查询条件 QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.notLike("USER_NAME","安全保密员") .notLike("USER_NAME","系统管理员") .notLike("USER_NAME","安全审计员") .notLike("USER_NAME","超级管理员"); // 模糊查询 // 执行分页查询 - return userService.page(pageParam, queryWrapper); + return userService.page(pageParam, queryWrapper);*/ + return userService.page(pageParam); } /** * @author yangmengchuan diff --git a/src/main/java/com/keyware/htey/entity/User.java b/src/main/java/com/keyware/htey/entity/user/User.java similarity index 89% rename from src/main/java/com/keyware/htey/entity/User.java rename to src/main/java/com/keyware/htey/entity/user/User.java index 54d5520..64f0538 100644 --- a/src/main/java/com/keyware/htey/entity/User.java +++ b/src/main/java/com/keyware/htey/entity/user/User.java @@ -1,4 +1,4 @@ -package com.keyware.htey.entity; +package com.keyware.htey.entity.user; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; diff --git a/src/main/java/com/keyware/htey/mapper/UserMapper.java b/src/main/java/com/keyware/htey/mybatis/itf/UserMapper.java similarity index 76% rename from src/main/java/com/keyware/htey/mapper/UserMapper.java rename to src/main/java/com/keyware/htey/mybatis/itf/UserMapper.java index 93d4c31..7651e28 100644 --- a/src/main/java/com/keyware/htey/mapper/UserMapper.java +++ b/src/main/java/com/keyware/htey/mybatis/itf/UserMapper.java @@ -1,7 +1,7 @@ -package com.keyware.htey.mapper; +package com.keyware.htey.mybatis.itf; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.keyware.htey.entity.User; +import com.keyware.htey.entity.user.User; import org.apache.ibatis.annotations.Mapper; /** diff --git a/src/main/java/com/keyware/htey/service/impl/UserServiceImpl.java b/src/main/java/com/keyware/htey/service/impl/UserServiceImpl.java index 5597e44..8482150 100644 --- a/src/main/java/com/keyware/htey/service/impl/UserServiceImpl.java +++ b/src/main/java/com/keyware/htey/service/impl/UserServiceImpl.java @@ -1,8 +1,8 @@ package com.keyware.htey.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.keyware.htey.entity.User; -import com.keyware.htey.mapper.UserMapper; +import com.keyware.htey.entity.user.User; +import com.keyware.htey.mybatis.itf.UserMapper; import com.keyware.htey.service.itf.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/keyware/htey/service/itf/UserService.java b/src/main/java/com/keyware/htey/service/itf/UserService.java index 5aa6f28..66a3333 100644 --- a/src/main/java/com/keyware/htey/service/itf/UserService.java +++ b/src/main/java/com/keyware/htey/service/itf/UserService.java @@ -1,7 +1,7 @@ package com.keyware.htey.service.itf; import com.baomidou.mybatisplus.extension.service.IService; -import com.keyware.htey.entity.User; +import com.keyware.htey.entity.user.User; public interface UserService extends IService { } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index d9cc9d4..7d936d9 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -19,7 +19,7 @@ mybatis: logging: level: com.baomidou.mybatisplus: DEBUG - com.keyware.htey.mapper: DEBUG # 替换为您的 Mapper 接口所在的包名 + com.keyware.htey.mybatis.itf: DEBUG # 替换为您的 Mapper 接口所在的包名 #swagger springdoc: swagger-ui: