Files
ga-commission-system/ga-common/src/main/java/com/ga/common/system/SystemLogMapper.java
T

45 lines
2.1 KiB
Java
Raw Normal View History

package com.ga.common.system;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 시스템 로그 DB 매퍼 (MyBatis) — 로그인/API접근/데이터변경 3종.
* insert*는 로그 적재용(주로 비동기 서비스가 호출), select*는 관리 화면 조회용이다.
*/
@Mapper
public interface SystemLogMapper {
int insertLoginLog(@Param("userId") Long userId,
@Param("loginId") String loginId,
@Param("loginType") String loginType,
@Param("failReason") String failReason,
@Param("ipAddress") String ipAddress,
@Param("userAgent") String userAgent);
int insertApiAccessLog(@Param("userId") Long userId,
@Param("method") String method,
@Param("url") String url,
@Param("requestParam") String requestParam,
@Param("responseCode") String responseCode,
@Param("responseTime") Integer responseTime,
@Param("ipAddress") String ipAddress,
@Param("errorMessage") String errorMessage);
int insertDataChangeLog(@Param("userId") Long userId,
@Param("menuCode") String menuCode,
@Param("tableName") String tableName,
@Param("recordId") String recordId,
@Param("actionType") String actionType,
@Param("beforeJson") String beforeJson,
@Param("afterJson") String afterJson,
@Param("changedKeys") String changedKeys);
List<Map<String, Object>> selectLoginLogs(@Param("param") Map<String, Object> param);
List<Map<String, Object>> selectApiAccessLogs(@Param("param") Map<String, Object> param);
List<Map<String, Object>> selectDataChangeLogs(@Param("param") Map<String, Object> param);
}