feat: 회원가입 제한·봇차단(허니팟/레이트리밋)·카드 자동인식 보정
- 관리자 회원가입 허용 토글(app_setting), 공개 GET /auth/signup-enabled - 회원가입 봇차단: 허니팟(website) + IP 레이트리밋(Redis, 1h 5회) - 카드 알림: 현금 오선택 보정(카드 양방향 매칭+단일카드 자동), 광고 푸시 차단(승인신호 없는 광고성 표현 무시) - @MapperScan 에 admin.mapper 추가 - account.sql: 매 기동 wallet MODIFY 제거(라이브 락 위험) — CREATE 정의에 255 반영됨 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
fb94df8112
commit
c05be0880c
@@ -0,0 +1,28 @@
|
||||
package com.sb.web.admin.service;
|
||||
|
||||
import com.sb.web.admin.mapper.AppSettingMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 앱 전역 설정 서비스. 현재는 회원가입 허용 여부.
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class AppSettingService {
|
||||
|
||||
private final AppSettingMapper appSettingMapper;
|
||||
|
||||
/** 회원가입 허용 여부. 설정 행이 없으면 기본 허용(true). */
|
||||
public boolean isSignupEnabled() {
|
||||
Boolean v = appSettingMapper.isSignupEnabled();
|
||||
return v == null || v;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public boolean setSignupEnabled(boolean enabled) {
|
||||
appSettingMapper.updateSignupEnabled(enabled);
|
||||
return enabled;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user