Logo

GitLab

Sign in

朱子纯 / test3

  • Back to Dashboard
  • Project
  • Activity
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 1
  • Labels
  • Wiki
  • Snippets
  • Commits 42
  • Compare
  • Branches 4
  • Tags 0
  • test3
  • backend
  • src
  • main
08 May, 2026
11 commits
  • fix(usr): 修复 review round 2 must-fix REQ-USR-001 ...
    952b5985
    - EMPLOYEE_NOT_FOUND 值恢复为规格文档规定的 40001
    zichun authored
    2026-05-08 11:15:14 +0800  
    Browse Code »
  • fix(usr): 修复 review round 1 must-fix REQ-USR-001 ...
    33c5f888
    - getPermissionGroups 增加 brandId 多租户过滤
    - EMPLOYEE_NOT_FOUND = 40401 常量替换魔法数字 40001
    - 权限组绑定改为批量 insert(Collection) 消除 N+1
    zichun authored
    2026-05-08 11:09:51 +0800  
    Browse Code »
  • feat(usr): 增加用户后端实现 REQ-USR-001 ...
    ff5af471
    - UserPrincipal record + JwtAuthenticationFilter 注入用户上下文
    - SecurityConfig 补充 authenticationEntryPoint 返回 401
    - UserService/UserServiceImpl: 创建用户、获取员工列表、获取权限组
    - UserController: POST /users、GET /users/staffs、GET /users/permission-groups
    - UserServiceTest (6 cases) + UserControllerTest (5 cases) 全部通过
    zichun authored
    2026-05-08 10:58:31 +0800  
    Browse Code »
  • fix(usr): review round 2 approve + Flyway V2 migration path REQ-USR-004 ...
    38d8cfcc
    - Copy V2 migration to backend/src/main/resources/db/migration/ for Flyway classpath
    - Update review report to round 2 approve
    - Mark REQ-USR-004 done in docs/08
    zichun authored
    2026-05-08 10:33:26 +0800  
    Browse Code »
  • fix(usr): review round-1 修复 — 多租户唯一索引 + LambdaUpdateWrapper + refresh 锁定检查 REQ-USR-004 ...
    2c78bc87
    1. V2 migration: uk_usr_user_username 改为 (sUsername, sBrandsId) 复合唯一
    2. AuthServiceImpl: UpdateWrapper 换 LambdaUpdateWrapper(一致性)
    3. AuthServiceImpl.refresh(): 追加 tLockUntil 检查,防绕过锁定
    4. AuthServiceTest: 新增 refresh_lockedUser_throws40103
    5. pom.xml: Lombok 1.18.36 适配 Java 25,surefire ByteBuddy 实验模式
    6. .mvn/jvm.config + scripts/test.sh: Java 21 编译兼容性修复
    zichun authored
    2026-05-08 10:27:47 +0800  
    Browse Code »
  • feat(usr): SecurityConfig + JwtFilter + AuthController REQ-USR-004 ...
    ae7e90e0
    - SecurityConfig: STATELESS, permitAll /api/auth/**, JWT filter
    - JwtAuthenticationFilter: Bearer token → SecurityContext
    - AuthController: POST /login, POST /refresh, GET /brands
    - BrandVO: @JsonProperty to fix Jackson serialization of sNo/sName
    - AuthControllerTest: 4/4 PASS; all 22 backend tests GREEN
    zichun authored
    2026-05-08 09:57:55 +0800  
    Browse Code »
  • feat(usr): AuthService login/refresh/getBrands + BizException + BeanConfig REQ-USR-004 ...
    79a8340d
    - LoginReqDTO/RefreshTokenReqDTO/LoginVO/BrandVO DTO/VO
    - AuthService interface: login/refresh/getBrands
    - AuthServiceImpl: multi-tenant brand query, BCrypt, disabled/lock check,
      fail count (5x → lock 30min), success reset; refresh token validate + re-issue;
      getBrands ORDER BY sName
    - UpdateWrapper (string columns) avoids LambdaWrapper unit test issue
    - BeanConfig: @Bean BCryptPasswordEncoder
    - AuthServiceTest: 10/10 PASS (7 login + 3 refresh/brands)
    zichun authored
    2026-05-08 09:54:34 +0800  
    Browse Code »
  • feat(usr): BrandEntity/UsrUserEntity + Mapper + MyBatisPlusConfig REQ-USR-004 ...
    dd310300
    - BrandEntity/UsrUserEntity: @TableName + @TableField (map-underscore-to-camel-case=false)
    - BrandMapper/UsrUserMapper: extends BaseMapper
    - MyBatisPlusConfig: @MapperScan + PaginationInnerInterceptor
    - BrandMapperTest: insert/query/delete against test DB PASS
    zichun authored
    2026-05-08 09:50:22 +0800  
    Browse Code »
  • feat(usr): JwtUtil generate + parse access/refresh token REQ-USR-004 ...
    7fbd1447
    - JwtProperties: @ConfigurationProperties("jwt") with secret/expiry
    - JwtUtil: generateAccessToken/generateRefreshToken/parseAccessToken/parseRefreshToken
    - parseRefreshToken validates type=refresh claim, throws 40103 if mismatch
    - JwtUtilTest: 3 tests PASS
    zichun authored
    2026-05-08 09:48:56 +0800  
    Browse Code »
  • feat(usr): common Result/BizException/AuthErrorCode/GlobalExceptionHandler REQ-USR-004 ...
    75fa00a6
    - Result<T>: ok()/fail() with code/message/data/timestamp
    - BizException: carries int code
    - AuthErrorCode: 40100/40101/40102/40103 constants
    - GlobalExceptionHandler: BizException, validation, fallback 99000
    zichun authored
    2026-05-08 09:47:15 +0800  
    Browse Code »
  • chore(backend): init Spring Boot 3 project skeleton REQ-USR-004 ...
    199a3381
    - pom.xml: Spring Boot 3.3.5, MyBatis-Plus 3.5.7, JJWT 0.12.6, Flyway 10.x
    - application.yml: DB/JWT from env vars, Flyway baseline-on-migrate=true
    - V1 migration copied to classpath:db/migration
    - ApplicationContextTest: @SpringBootTest context loads + Flyway baseline OK
    zichun authored
    2026-05-08 09:46:15 +0800  
    Browse Code »