- com.sb.web 패키지로 재구성: account / auth / board / user / admin / common - 가계부(account): 내역(필터), 계좌·순자산, 예산, 분류, 정기 거래, 투자 포트폴리오 (종목·매매 이력, 이동평균 평단·실현/평가손익) - MyBatis + MariaDB + Redis 세션, BCrypt - 스키마 자동 초기화(db/*.sql, 멱등), 사용자별 데이터 격리(member_id) - 문서: docs/BACKEND.md, .env.example Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
34 lines
1008 B
Java
34 lines
1008 B
Java
package com.sb.web.account.mapper;
|
|
|
|
import com.sb.web.account.domain.Budget;
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* 예산 매퍼. 모든 동작은 member_id(소유자)로 격리.
|
|
*/
|
|
@Mapper
|
|
public interface BudgetMapper {
|
|
|
|
List<Budget> findByMember(@Param("memberId") Long memberId);
|
|
|
|
Budget findByIdAndMember(@Param("id") Long id, @Param("memberId") Long memberId);
|
|
|
|
int countByCategory(@Param("memberId") Long memberId,
|
|
@Param("category") String category,
|
|
@Param("excludeId") Long excludeId);
|
|
|
|
int insert(Budget budget);
|
|
|
|
int update(Budget budget);
|
|
|
|
int delete(@Param("id") Long id, @Param("memberId") Long memberId);
|
|
|
|
/** 분류 이름 변경 시 예산 일괄 갱신 */
|
|
int renameCategory(@Param("memberId") Long memberId,
|
|
@Param("oldName") String oldName,
|
|
@Param("newName") String newName);
|
|
}
|