结构变化

main
yangmengchuan 2 weeks ago
parent eeac34f266
commit f6dfaf93e1
  1. 9
      src/main/java/com/keyware/htey/controller/user/UserController.java
  2. 2
      src/main/java/com/keyware/htey/entity/user/User.java
  3. 4
      src/main/java/com/keyware/htey/mybatis/itf/UserMapper.java
  4. 4
      src/main/java/com/keyware/htey/service/impl/UserServiceImpl.java
  5. 2
      src/main/java/com/keyware/htey/service/itf/UserService.java
  6. 2
      src/main/resources/application.yml

@ -1,8 +1,7 @@
package com.keyware.htey.controller.user; package com.keyware.htey.controller.user;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 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 com.keyware.htey.service.itf.UserService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse; 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.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
/** /**
* @author yangmengchuan * @author yangmengchuan
* @date 2025/1/7 * @date 2025/1/7
@ -37,14 +37,15 @@ public class UserController {
// 创建分页对象 // 创建分页对象
Page<User> pageParam = new Page<>(pageNum, pageSize); Page<User> pageParam = new Page<>(pageNum, pageSize);
// 创建查询条件 /*// 创建查询条件
QueryWrapper<User> queryWrapper = new QueryWrapper<>(); QueryWrapper<User> queryWrapper = new QueryWrapper<>();
queryWrapper.notLike("USER_NAME","安全保密员") queryWrapper.notLike("USER_NAME","安全保密员")
.notLike("USER_NAME","系统管理员") .notLike("USER_NAME","系统管理员")
.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 * @author yangmengchuan

@ -1,4 +1,4 @@
package com.keyware.htey.entity; package com.keyware.htey.entity.user;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;

@ -1,7 +1,7 @@
package com.keyware.htey.mapper; package com.keyware.htey.mybatis.itf;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; 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; import org.apache.ibatis.annotations.Mapper;
/** /**

@ -1,8 +1,8 @@
package com.keyware.htey.service.impl; package com.keyware.htey.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.keyware.htey.entity.User; import com.keyware.htey.entity.user.User;
import com.keyware.htey.mapper.UserMapper; import com.keyware.htey.mybatis.itf.UserMapper;
import com.keyware.htey.service.itf.UserService; import com.keyware.htey.service.itf.UserService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;

@ -1,7 +1,7 @@
package com.keyware.htey.service.itf; package com.keyware.htey.service.itf;
import com.baomidou.mybatisplus.extension.service.IService; 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<User> { public interface UserService extends IService<User> {
} }

@ -19,7 +19,7 @@ mybatis:
logging: logging:
level: level:
com.baomidou.mybatisplus: DEBUG com.baomidou.mybatisplus: DEBUG
com.keyware.htey.mapper: DEBUG # 替换为您的 Mapper 接口所在的包名 com.keyware.htey.mybatis.itf: DEBUG # 替换为您的 Mapper 接口所在的包名
#swagger #swagger
springdoc: springdoc:
swagger-ui: swagger-ui:

Loading…
Cancel
Save