feat: project skeleton + DB migrations V1-V12 + ga-common framework
- Gradle multi-module: ga-common, ga-core, ga-api, ga-batch, ga-admin - Flyway V1-V12: org/product/rule/receive/ledger/settle/batch/code/menu/system + seed - ga-common (complete): - model: ApiResponse, PageResponse, SearchParam, TreeNode - exception: ErrorCode, BizException, GlobalExceptionHandler - annotation + aop: @RequirePermission, @DataChangeLog, ApiLog - auth + security: JWT, SecurityConfig - mybatis: BaseMapper, EncryptTypeHandler, JsonTypeHandler, AuditInterceptor - code (Redis cached) / menu (RBAC tree) / file / system / notification - excel: SXSSF+Cursor export, SAX+batch import (1M/700K rows) - util: Date/Money/Mask/Encrypt/Security
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package com.ga.common.menu;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Mapper
|
||||
public interface MenuMapper {
|
||||
|
||||
/** 전체 활성 메뉴 (정렬됨) */
|
||||
List<MenuVO> selectAllActive();
|
||||
|
||||
/** 사용자가 접근 가능한 메뉴 목록 */
|
||||
List<MenuVO> selectAccessibleMenusByUserId(@Param("userId") Long userId);
|
||||
|
||||
/** 사용자별 (menuId → permCodes) 매핑 */
|
||||
List<Map<String, Object>> selectUserPermissions(@Param("userId") Long userId);
|
||||
|
||||
/** 단일 (menuCode, permCode) 권한 보유 여부 */
|
||||
int hasPermission(@Param("userId") Long userId,
|
||||
@Param("menuCode") String menuCode,
|
||||
@Param("permCode") String permCode);
|
||||
|
||||
MenuVO selectById(@Param("menuId") Long menuId);
|
||||
MenuVO selectByCode(@Param("menuCode") String menuCode);
|
||||
int insert(MenuVO vo);
|
||||
int update(MenuVO vo);
|
||||
int deleteById(@Param("menuId") Long menuId);
|
||||
int countChildren(@Param("menuId") Long menuId);
|
||||
}
|
||||
Reference in New Issue
Block a user