fix: critical bugs + admin account (V16)

Bugs:
- MyBatisConfig: @MapperScan basePackages corrected to scan all com.ga.* by @Mapper annotation (was missing common.code/menu/system/file/notification)
- CalcRecruitStep: endDate was first day of month (only contracts on day 1 were picked); now full month range via DateUtil.getMonthRange
- EncryptTypeHandler: removed @MappedTypes(String.class) to prevent encrypting all String columns; now requires explicit per-column typeHandler
- mybatis-config.xml: removed redundant javaType for JsonTypeHandler (uses @MappedTypes)

V16 admin initial data:
- Child menus (24): ORG_TREE, ORG_AGENT, CONTRACT_LIST, COMPANY, PRODUCT,
  RULE_*, RECEIVE_*, LEDGER_*, SETTLE_LIST, BATCH_RUN, PAYMENT, SYSTEM_*
- Permissions for each PAGE menu × {READ,CREATE,UPDATE,DELETE,APPROVE,EXPORT}
- SUPER_ADMIN: full grants
- ADMIN: all except SYSTEM
- MANAGER: READ/CREATE/UPDATE/EXPORT except SYSTEM
- AGENT: READ on LEDGER_*, SETTLE_LIST
- admin user (login_id=admin, pw=admin1234!) mapped to SUPER_ADMIN
This commit is contained in:
GA Pro
2026-05-09 22:21:45 +09:00
parent 7f3c564605
commit d4433a8e46
5 changed files with 130 additions and 22 deletions
@@ -1,12 +1,17 @@
package com.ga.common.config;
import com.ga.common.mybatis.AuditInterceptor;
import org.apache.ibatis.annotations.Mapper;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* 모든 com.ga 패키지 하위에서 @Mapper 가 붙은 인터페이스만 스캔.
* (common.code / common.menu / common.system / common.notification / common.file / core.mapper.*)
*/
@Configuration
@MapperScan(basePackages = {"com.ga.common.mapper", "com.ga.core.mapper"})
@MapperScan(basePackages = "com.ga", annotationClass = Mapper.class)
public class MyBatisConfig {
@Bean
@@ -3,7 +3,6 @@ package com.ga.common.mybatis;
import com.ga.common.util.EncryptUtil;
import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.MappedTypes;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
@@ -16,10 +15,13 @@ import java.sql.SQLException;
/**
* AES 암호화 컬럼용 TypeHandler.
* Mapper XML 에서 typeHandler="com.ga.common.mybatis.EncryptTypeHandler" 지정.
*
* @MappedTypes 를 의도적으로 빼서 String 전체 자동 적용을 막는다.
* 사용 시 컬럼별로 명시:
* <result property="residentNo" column="resident_no"
* typeHandler="com.ga.common.mybatis.EncryptTypeHandler"/>
*/
@Component
@MappedTypes(String.class)
public class EncryptTypeHandler extends BaseTypeHandler<String> implements ApplicationContextAware {
private static EncryptUtil encryptUtil;