에러 수정.
parent
e321c6e45e
commit
144b6790a1
|
|
@ -28,7 +28,7 @@ public class TnDailyUserLog {
|
||||||
@Column(name = "log_dt")
|
@Column(name = "log_dt")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private LocalDate logDt;
|
private LocalDate logDt;
|
||||||
|
|
||||||
@Column(name = "log_cnt")
|
@Column(name = "log_cnt")
|
||||||
private Long logCnt;
|
private Long logCnt;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,5 +23,5 @@ public interface UserLogsRepository extends JpaRepository<TnDailyUserLog, Long>
|
||||||
+ "ORDER BY log_dt asc", nativeQuery = true)
|
+ "ORDER BY log_dt asc", nativeQuery = true)
|
||||||
List<Object[]> selectCountUser(@Param("startDate") String startDate, @Param("endDate") String endDate);
|
List<Object[]> selectCountUser(@Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||||
|
|
||||||
Optional<TnDailyUserConnLog> findByLogDt(LocalDate logDt);
|
Optional<TnDailyUserLog> findByLogDt(LocalDate logDt);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ package com.dbnt.kcscbackend.admin.logs.service;
|
||||||
|
|
||||||
import com.dbnt.kcscbackend.admin.logs.entity.ThLoginLog;
|
import com.dbnt.kcscbackend.admin.logs.entity.ThLoginLog;
|
||||||
import com.dbnt.kcscbackend.admin.logs.entity.ThPrivacyLog;
|
import com.dbnt.kcscbackend.admin.logs.entity.ThPrivacyLog;
|
||||||
import com.dbnt.kcscbackend.admin.logs.entity.TnDailyUserConnLog;
|
import com.dbnt.kcscbackend.admin.logs.entity.TnDailyUserLog;
|
||||||
import com.dbnt.kcscbackend.admin.logs.repository.PrivacyLogsRepository;
|
import com.dbnt.kcscbackend.admin.logs.repository.PrivacyLogsRepository;
|
||||||
import com.dbnt.kcscbackend.admin.logs.repository.ThLoginLogRepository;
|
import com.dbnt.kcscbackend.admin.logs.repository.ThLoginLogRepository;
|
||||||
import com.dbnt.kcscbackend.admin.logs.repository.UserLogsRepository;
|
import com.dbnt.kcscbackend.admin.logs.repository.UserLogsRepository;
|
||||||
|
|
@ -67,9 +67,9 @@ public class AdminLogsService extends EgovAbstractServiceImpl {
|
||||||
// 로그인 기록이면 tn_daily_yser_log 카운트 조정
|
// 로그인 기록이면 tn_daily_yser_log 카운트 조정
|
||||||
if(accessType.equals("Y")){
|
if(accessType.equals("Y")){
|
||||||
//오늘 일자 로그 조회
|
//오늘 일자 로그 조회
|
||||||
TnDailyUserConnLog userConnLog = userLogsRepository.findByLogDt(LocalDate.now()).orElse(null);
|
TnDailyUserLog userConnLog = userLogsRepository.findByLogDt(LocalDate.now()).orElse(null);
|
||||||
if(userConnLog==null){
|
if(userConnLog==null){
|
||||||
userConnLog = new TnDailyUserConnLog();
|
userConnLog = new TnDailyUserLog();
|
||||||
userConnLog.setLogDt(LocalDate.now());
|
userConnLog.setLogDt(LocalDate.now());
|
||||||
userConnLog.setLogCnt(0L);
|
userConnLog.setLogCnt(0L);
|
||||||
userConnLog.setMobileCnt(0L);
|
userConnLog.setMobileCnt(0L);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue