Compare commits

..

No commits in common. "main" and "yoon" have entirely different histories.
main ... yoon

16 changed files with 183 additions and 335 deletions

View File

@ -4,6 +4,7 @@ import java.util.List;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ -25,7 +26,6 @@ public class MainController {
private final MainService mainService;
@Member
@ParameterCheck
@GetMapping("/category")
@ -50,8 +50,8 @@ public class MainController {
@Member
@ParameterCheck
@PostMapping("/inserEvent")
public ApiResponse<String> insertEvent(@ReqMap MapDto map) {
return mainService.insertEvent(map);
public ApiResponse<String> inserEvent(@ReqMap MapDto map) {
return mainService.inserEvent(map);
}
@Admin
@ -76,11 +76,4 @@ public class MainController {
long memberSeq = map.getInt("memberSeq");
return mainService.rejectMember(memberSeq);
}
@Member
@ParameterCheck
@PostMapping("/getUserLeaveRecord")
public ApiResponse<MapDto> getUserLeaveRecord(@ReqMap MapDto map) {
return mainService.getUserLeaveRecord(map);
}
}

View File

@ -180,11 +180,4 @@ public class ProjectController {
return ApiResponse.ok(netprojctService.selectUserProjectPeriod(projctSeq));
}
@ParameterCheck
@GetMapping("/people/{memberSeq}")
public ApiResponse<List<MapDto>> selectUserProjectPeriod2(@PathVariable int memberSeq) {
return ApiResponse.ok(netprojctService.selectUserProjectPeriod2(memberSeq));
}
}

View File

@ -30,11 +30,9 @@ import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.context.SecurityContextHolderStrategy;
import org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PatchMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
@ -244,9 +242,6 @@ public class UserController {
}
// @GetMapping("checkUserSession")
// public
// 유저 세션 체크
@GetMapping(value = "check")
@ -263,21 +258,6 @@ public class UserController {
return ApiResponse.ok(sessionData);
}
// 유저 세션 권한 체크
@PostMapping(value = "authCheck")
public ApiResponse<?> authCheck(@ReqMap MapDto map) {
String memberId = map.getString("memberId");
if(!StringUtils.hasText(memberId)) return ApiResponse.error(HttpStatus.BAD_REQUEST, "파라미터 오류");
String userRole = "";
MemberVo vo = AuthUtil.getUser();
if(vo != null && memberId.equals(vo.getLoginId())) {
userRole = vo.getRole();
}
return ApiResponse.ok(userRole);
}
// rememberMe 확인용
@GetMapping(value = "rememberCheck")
public ApiResponse<?> rememberCheck(HttpServletRequest request) {
@ -328,6 +308,9 @@ public class UserController {
/**
* 사원 목록 전체 조회
*
*
*
*/
@ParameterCheck
@GetMapping("/allUserList")

View File

@ -1,9 +1,5 @@
package io.company.localhost.controller.common;
import java.time.Duration;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@ -69,84 +65,60 @@ public class WeatherController {
JsonNode nodeData = objectMapper.readTree(jsonData);
JsonNode forecastList = nodeData.get("list");
// 현재 날짜 시간 계산
LocalDate today = LocalDate.now();
LocalDateTime nowTime = LocalDateTime.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
// 날짜별 데이터를 그룹화
// 날짜별로 데이터 그룹화
Map<String, List<String>> dailyWeathers = new HashMap<>();
Map<String, List<String>> dailyDescriptions = new HashMap<>();
Map<String, List<String>> dailyIcons = new HashMap<>();
// 오늘 예보 가장 가까운 예보 저장 변수
JsonNode closestForecastToday = null;
long minDiff = Long.MAX_VALUE;
// forecastList를 순회하며 데이터를 그룹화하고, 오늘의 경우 가장 가까운 forecast 선택
for (JsonNode forecast : forecastList) {
String dtTxt = forecast.get("dt_txt").asText();
String date = dtTxt.split(" ")[0]; // 날짜 추출 (: "2025-04-04")
String date = forecast.get("dt_txt").asText().split(" ")[0]; //날짜 추출
JsonNode weather = forecast.get("weather").get(0);
String mainWeather = weather.get("main").asText();
String description = weather.get("description").asText();
String icon = weather.get("icon").asText();
// 해당 날짜의 리스트에 추가 (map이 없으면 생성)
dailyWeathers.computeIfAbsent(date, k -> new ArrayList<>()).add(mainWeather);
dailyDescriptions.computeIfAbsent(date, k -> new ArrayList<>()).add(description);
dailyIcons.computeIfAbsent(date, k -> new ArrayList<>()).add(icon);
// 오늘 날짜의 forecast라면 현재 시간과의 차이 계산
if (date.equals(today.toString())) {
LocalDateTime forecastTime = LocalDateTime.parse(dtTxt, formatter);
long diff = Math.abs(Duration.between(forecastTime, nowTime).toMillis());
if (diff < minDiff) {
minDiff = diff;
closestForecastToday = forecast;
}
if (!dailyWeathers.containsKey(date)) {
dailyWeathers.put(date, new ArrayList<>());
dailyDescriptions.put(date, new ArrayList<>());
dailyIcons.put(date, new ArrayList<>());
}
dailyWeathers.get(date).add(mainWeather);
dailyDescriptions.get(date).add(description);
dailyIcons.get(date).add(icon);
}
// 최종적으로 날짜의 대표 날씨 결정
// 날짜별 대표 날씨 결정 (가장 빈번한 날씨 상태)
List<WeatherVo> dailyWeatherList = new ArrayList<>();
for (String date : dailyWeathers.keySet()) {
String repMainWeather;
String repDescription;
String repIcon;
List<String> weathers = dailyWeathers.get(date);
List<String> descriptions = dailyDescriptions.get(date);
List<String> icons = dailyIcons.get(date);
// 오늘인 경우, 가장 가까운 forecast의 아이콘과 설명 사용
if (date.equals(today.toString()) && closestForecastToday != null) {
JsonNode weather = closestForecastToday.get("weather").get(0);
repMainWeather = weather.get("main").asText();
repDescription = weather.get("description").asText();
repIcon = weather.get("icon").asText();
} else {
// 기타 날짜는 기존 방식대로 가장 빈번한 날씨 상태 선택
List<String> weathers = dailyWeathers.get(date);
List<String> descriptions = dailyDescriptions.get(date);
List<String> icons = dailyIcons.get(date);
Map<String, Integer> weatherCounts = new HashMap<>();
for (String w : weathers) {
weatherCounts.put(w, weatherCounts.getOrDefault(w, 0) + 1);
}
repMainWeather = "";
int maxCount = 0;
for (Map.Entry<String, Integer> entry : weatherCounts.entrySet()) {
if (entry.getValue() > maxCount) {
maxCount = entry.getValue();
repMainWeather = entry.getKey();
}
}
int repIndex = weathers.indexOf(repMainWeather);
repDescription = descriptions.get(repIndex);
repIcon = icons.get(repIndex);
// 가장 빈번한 날씨 찾기(카운팅)
Map<String, Integer> weatherCounts = new HashMap<>();
for (String w : weathers) {
weatherCounts.put(w, weatherCounts.getOrDefault(w, 0) + 1);
}
dailyWeatherList.add(new WeatherVo(date, repMainWeather, repDescription, repIcon));
String mainWeather = "";
int maxCount = 0;
for (Map.Entry<String, Integer> entry : weatherCounts.entrySet()) {
if (entry.getValue() > maxCount) {
maxCount = entry.getValue();
mainWeather = entry.getKey();
}
}
// 평균값 계산
int mainWeatherIndex = weathers.indexOf(mainWeather);
String description = descriptions.get(mainWeatherIndex);
String icon = icons.get(mainWeatherIndex);
dailyWeatherList.add(new WeatherVo(date, mainWeather, description, icon));
}
return dailyWeatherList;

View File

@ -37,6 +37,4 @@ public interface CommutersMapper {
int deleteCommuters(MapDto map);
MapDto selectUserLeaveWorkList(MapDto map);
}

View File

@ -34,7 +34,4 @@ public interface NetprojctMapper {
int deleteProject(MapDto map);
List<MapDto> selectUserProjectPeriod(int projectSeq);
List<MapDto> selectUserProjectPeriod2(int memberSeq);
}

View File

@ -20,8 +20,6 @@ import java.util.List;
import org.springframework.stereotype.Service;
import io.company.localhost.common.annotation.ReqMap;
import io.company.localhost.common.dto.ApiResponse;
import io.company.localhost.common.dto.MapDto;
import io.company.localhost.mapper.CommutersMapper;
import lombok.RequiredArgsConstructor;
@ -109,15 +107,4 @@ public class CommutersService {
* commutersMapper.updateCommuterProject(map) > 0; }
*/
/**
* 사용자의 퇴근 기록 조회
*
* @return
*/
public ApiResponse<MapDto> selectUserLeaveWorkList(@ReqMap MapDto map) {
map.put("currentDate", LocalDateTime.now());
return ApiResponse.ok(commutersMapper.selectUserLeaveWorkList(map));
}
}

View File

@ -21,8 +21,6 @@ import org.springframework.stereotype.Service;
import io.company.localhost.common.dto.ApiResponse;
import io.company.localhost.common.dto.MapDto;
import io.company.localhost.utils.AuthUtil;
import io.company.localhost.vo.MemberVo;
import lombok.RequiredArgsConstructor;
@Service
@ -30,10 +28,12 @@ import lombok.RequiredArgsConstructor;
public class MainService {
private final commoncodService commoncodService;
private final NetmemberService netmemberService;
private final localvacaService localvacaService;
private final LocalevntService localevntService;
private final CommutersService commutersService;
/**
@ -72,13 +72,15 @@ public class MainService {
if(localevntService.selectCheckEvent(map) > 0) {
localevntService.deleteEvent(map);
return ApiResponse.okMessage("이벤트 삭제");
//return ApiResponse.error(HttpStatus.CONFLICT, "이미 동일한 이벤트가 존재합니다");
} else {
// localevntService.insertEvent(map);
// return ApiResponse.okMessage("이벤트 추가");
return ApiResponse.error(HttpStatus.CONFLICT, "해당 이벤트가 존재하지 않습니다");
}
}
public ApiResponse<String> insertEvent(MapDto map) {
public ApiResponse<String> inserEvent(MapDto map) {
if(localevntService.selectCheckEvent(map) > 0) {
return ApiResponse.error(HttpStatus.CONFLICT, "이미 동일한 이벤트가 존재합니다");
} else {
@ -104,14 +106,8 @@ public class MainService {
* @return
*/
public ApiResponse<String> registerMember(long memberSeq) {
Long loginUserId = AuthUtil.getUser().getId();
MemberVo user = netmemberService.getUserInfoById(loginUserId);
if(user.getId() != loginUserId || !"ROLE_ADMIN".equals(user.getRole())) {
return ApiResponse.error(HttpStatus.FORBIDDEN, "사용 권한 없음");
}
int result = netmemberService.registerMember(memberSeq);
return result == 1 ? ApiResponse.ok("사원 등록 성공") : ApiResponse.ok("사원 등록 실패");
}
@ -122,19 +118,9 @@ public class MainService {
* @return
*/
public ApiResponse<String> rejectMember(long memberSeq) {
Long loginUserId = AuthUtil.getUser().getId();
MemberVo user = netmemberService.getUserInfoById(loginUserId);
if(user.getId() != loginUserId || !"ROLE_ADMIN".equals(user.getRole())) {
return ApiResponse.error(HttpStatus.UNAUTHORIZED, "사용 권한 없음");
}
int result = netmemberService.rejectMember(memberSeq);
return result == 1 ? ApiResponse.ok("미승인 대상자 등록") : ApiResponse.ok("미승인 대상자 등록 실패");
}
public ApiResponse<MapDto> getUserLeaveRecord(MapDto map) {
return commutersService.selectUserLeaveWorkList(map);
return result == 1 ? ApiResponse.ok("미승인 대상자 등록") : ApiResponse.ok("미승인 대상자 등록 실패");
}

View File

@ -175,8 +175,4 @@ public class NetprojctService {
return netprojctMapper.selectUserProjectPeriod(projctSeq);
}
public List<MapDto> selectUserProjectPeriod2(int memberSeq) {
return netprojctMapper.selectUserProjectPeriod2(memberSeq);
}
}

View File

@ -288,32 +288,38 @@ public class localvacaService {
return emp;
}).collect(Collectors.toList());
}
/**
* 연차 계산 로직
*/
/**
* 연차 계산 로직
*/
public int procCalculateTotalVacation(LocalDate hireDate) {
LocalDate today = LocalDate.now();
int hireYear = hireDate.getYear();
int currentYear = today.getYear();
LocalDate today = LocalDate.now(); // 현재 날짜
int yearsWorked = hireDate.until(today).getYears();
int hireMonth = hireDate.getMonthValue();
// 입사년도와 현재년도가 같으면 : (12 - 입사월)
if (hireYear == currentYear) {
return 12 - hireDate.getMonthValue();
// 🔹 1년 미만: 입사한 월을 고려하여 연차 개수 계산
if (yearsWorked < 1) {
return 12 - hireMonth;
} else {
int totalVacation = 12 - hireMonth; // 1년 미만 사용하고 남은 연차 반영
LocalDate nextIncreaseDate = hireDate.plusYears(1).withMonth(hireMonth).withDayOfMonth(1);
// 🔹 매년 입사월에 15개 지급
while (!nextIncreaseDate.isAfter(today)) {
totalVacation += 15;
nextIncreaseDate = nextIncreaseDate.plusYears(1);
}
// 🔹 입사년도 2년마다 입사월에 15개에서 1개씩 추가 지급
LocalDate additionalIncreaseDate = hireDate.plusYears(2).withMonth(hireMonth).withDayOfMonth(1);
int extraIncrease = 1;
while (!additionalIncreaseDate.isAfter(today)) {
totalVacation += extraIncrease;
additionalIncreaseDate = additionalIncreaseDate.plusYears(2);
extraIncrease++; // 2년마다 1개씩 증가
}
return totalVacation;
}
// 기본 연차 15
int totalVacation = 15;
// 입사년도 기준 3년차 1월부터, 2년마다 1개씩 증가
LocalDate accrualDate = LocalDate.of(hireYear + 3, 1, 1);
while (!accrualDate.isAfter(today)) {
totalVacation++;
accrualDate = accrualDate.plusYears(2);
}
return totalVacation;
}
public List<MapDto> selectSentVacationCount(MapDto map) {

View File

@ -93,8 +93,6 @@ public class worddictyService {
}
}
}
return filtered;
}

View File

@ -95,8 +95,6 @@ logging:
connection: off
io.company: DEBUG
io.company.localhost.mapper: off
file:
path: logs
filePath:

View File

@ -100,9 +100,4 @@
<delete id="deleteCommuters" parameterType="int">
DELETE FROM commuters WHERE PROJCTSEQ = #{projctSeq}
</delete>
<select id="selectUserLeaveWorkList">
/* 금일 퇴근 조회 */
SELECT * FROM COMMUTERS WHERE MEMBERSEQ = #{memberSeq} AND COMMUTDAY = DATE_FORMAT(#{currentDate}, '%Y-%m-%d')
</select>
</mapper>

View File

@ -116,65 +116,35 @@
<!-- 프로젝트 모든 사용자 참여기간 조회 -->
<select id="selectUserProjectPeriod" resultType="io.company.localhost.common.dto.MapDto">
SELECT
m.MEMBERSEQ,
m.MEMBERNAM,
p.PROJCTSEQ,
p.PROJCTNAM,
p.PROJCTSTR AS projectStartDate,
p.PROJCTEND AS projectEndDate,
COALESCE((
SELECT MIN(c2.COMMUTDAY)
FROM commuters c2
WHERE c2.PROJCTSEQ = p.PROJCTSEQ
AND c2.MEMBERSEQ = m.MEMBERSEQ
), p.PROJCTSTR) AS userStartDate,
COALESCE((
SELECT MAX(c2.COMMUTDAY)
FROM commuters c2
WHERE c2.PROJCTSEQ = p.PROJCTSEQ
AND c2.MEMBERSEQ = m.MEMBERSEQ
), p.PROJCTEND) AS userEndDate
FROM
netprojct p
LEFT JOIN
commuters c ON p.PROJCTSEQ = c.PROJCTSEQ
LEFT JOIN
netmember m ON c.MEMBERSEQ = m.MEMBERSEQ
WHERE
p.PROJCTSEQ = #{projectSeq}
GROUP BY
m.MEMBERSEQ, m.MEMBERNAM, p.PROJCTSEQ, p.PROJCTNAM, p.PROJCTSTR, p.PROJCTEND
</select>
<select id="selectUserProjectPeriod2" resultType="io.company.localhost.common.dto.MapDto">
SELECT
pm.MEMBERSEQ,
p.PROJCTSEQ,
p.PROJCTNAM,
p.PROJCTSTR AS projectStartDate,
p.PROJCTEND AS projectEndDate,
(
SELECT MIN(c2.COMMUTDAY)
FROM commuters c2
WHERE c2.PROJCTSEQ = p.PROJCTSEQ
AND c2.MEMBERSEQ = pm.MEMBERSEQ
) AS userStartDate,
CASE
WHEN p.PROJCTEND IS NOT NULL THEN (
SELECT
m.MEMBERSEQ,
m.MEMBERNAM,
p.PROJCTSEQ,
p.PROJCTNAM,
p.PROJCTSTR as projectStartDate,
p.PROJCTEND as projectEndDate,
(
SELECT MIN(c2.COMMUTDAY)
FROM commuters c2
WHERE c2.PROJCTSEQ = p.PROJCTSEQ
AND c2.MEMBERSEQ = m.MEMBERSEQ
) as userStartDate,
(
SELECT MAX(c2.COMMUTDAY)
FROM commuters c2
WHERE c2.PROJCTSEQ = p.PROJCTSEQ
AND c2.MEMBERSEQ = pm.MEMBERSEQ
)
ELSE NULL
END AS userEndDate
FROM promember pm
INNER JOIN netprojct p ON pm.PROJCTSEQ = p.PROJCTSEQ
WHERE pm.MEMBERSEQ = #{memberSeq}
AND pm.PROJCTYON = 1
</select>
AND c2.MEMBERSEQ = m.MEMBERSEQ
) as userEndDate
FROM
netprojct p
INNER JOIN
commuters c ON p.PROJCTSEQ = c.PROJCTSEQ
INNER JOIN
netmember m ON c.MEMBERSEQ = m.MEMBERSEQ
WHERE
p.PROJCTSEQ = #{projectSeq}
GROUP BY
m.MEMBERSEQ, p.PROJCTSEQ
</select>
</mapper>

View File

@ -84,14 +84,7 @@
</when>
</choose>
</if>
<choose>
<when test='myVote == "2"'>
ORDER BY LOCVOTEDT ASC, formatted_LOCVOTRDT DESC
</when>
<otherwise>
ORDER BY formatted_LOCVOTRDT DESC
</otherwise>
</choose>
ORDER BY formatted_LOCVOTRDT DESC
</select>
<update id="updateEndData" parameterType="map">
UPDATE

View File

@ -12,49 +12,49 @@
<!-- 색인표 조건 -->
<if test="indexKeyword != null and indexKeyword != ''">
<choose>
<!-- 한글 ㄱ ~ ㅎ에 대한 검색 (자음만 있는 경우도 포함) -->
<when test='indexKeyword == "ㄱ"'>
AND (w.WRDDICTTL BETWEEN '가' AND '깋' OR w.WRDDICTTL LIKE 'ㄱ%')
</when>
<when test='indexKeyword == "ㄴ"'>
AND (w.WRDDICTTL BETWEEN '나' AND '닣' OR w.WRDDICTTL LIKE 'ㄴ%')
</when>
<when test='indexKeyword == "ㄷ"'>
AND (w.WRDDICTTL BETWEEN '다' AND '딷' OR w.WRDDICTTL LIKE 'ㄷ%')
</when>
<when test='indexKeyword == "ㄹ"'>
AND (w.WRDDICTTL BETWEEN '라' AND '릿' OR w.WRDDICTTL LIKE 'ㄹ%')
</when>
<when test='indexKeyword == "ㅁ"'>
AND (w.WRDDICTTL BETWEEN '마' AND '밓' OR w.WRDDICTTL LIKE 'ㅁ%')
</when>
<when test='indexKeyword == "ㅂ"'>
AND (w.WRDDICTTL BETWEEN '바' AND '빟' OR w.WRDDICTTL LIKE 'ㅂ%')
</when>
<when test='indexKeyword == "ㅅ"'>
AND (w.WRDDICTTL BETWEEN '사' AND '싷' OR w.WRDDICTTL LIKE 'ㅅ%')
</when>
<when test='indexKeyword == "ㅇ"'>
AND (w.WRDDICTTL BETWEEN '아' AND '잏' OR w.WRDDICTTL LIKE 'ㅇ%')
</when>
<when test='indexKeyword == "ㅈ"'>
AND (w.WRDDICTTL BETWEEN '자' AND '짛' OR w.WRDDICTTL LIKE 'ㅈ%')
</when>
<when test='indexKeyword == "ㅊ"'>
AND (w.WRDDICTTL BETWEEN '차' AND '칳' OR w.WRDDICTTL LIKE 'ㅊ%')
</when>
<when test='indexKeyword == "ㅋ"'>
AND (w.WRDDICTTL BETWEEN '카' AND '킿' OR w.WRDDICTTL LIKE 'ㅋ%')
</when>
<when test='indexKeyword == "ㅌ"'>
AND (w.WRDDICTTL BETWEEN '타' AND '틷' OR w.WRDDICTTL LIKE 'ㅌ%')
</when>
<when test='indexKeyword == "ㅍ"'>
AND (w.WRDDICTTL BETWEEN '파' AND '핗' OR w.WRDDICTTL LIKE 'ㅍ%')
</when>
<when test='indexKeyword == "ㅎ"'>
AND (w.WRDDICTTL BETWEEN '하' AND '힣' OR w.WRDDICTTL LIKE 'ㅎ%')
</when>
<!-- 한글 ㄱ ~ ㅎ에 대한 검색 -->
<when test='indexKeyword == "ㄱ"'>
and w.WRDDICTTL BETWEEN '가' AND '깋'
</when>
<when test='indexKeyword == "ㄴ"'>
and w.WRDDICTTL BETWEEN '나' AND '닣'
</when>
<when test='indexKeyword == "ㄷ"'>
and w.WRDDICTTL BETWEEN '다' AND '딷'
</when>
<when test='indexKeyword == "ㄹ"'>
and w.WRDDICTTL BETWEEN '라' AND '릿'
</when>
<when test='indexKeyword == "ㅁ"'>
and w.WRDDICTTL BETWEEN '마' AND '밓'
</when>
<when test='indexKeyword == "ㅂ"'>
and w.WRDDICTTL BETWEEN '바' AND '빟'
</when>
<when test='indexKeyword == "ㅅ"'>
and w.WRDDICTTL BETWEEN '사' AND '싷'
</when>
<when test='indexKeyword == "ㅇ"'>
and w.WRDDICTTL BETWEEN '아' AND '잏'
</when>
<when test='indexKeyword == "ㅈ"'>
and w.WRDDICTTL BETWEEN '자' AND '짛'
</when>
<when test='indexKeyword == "ㅊ"'>
and w.WRDDICTTL BETWEEN '차' AND '칳'
</when>
<when test='indexKeyword == "ㅋ"'>
and w.WRDDICTTL BETWEEN '카' AND '킿'
</when>
<when test='indexKeyword == "ㅌ"'>
and w.WRDDICTTL BETWEEN '타' AND '틷'
</when>
<when test='indexKeyword == "ㅍ"'>
and w.WRDDICTTL BETWEEN '파' AND '핗'
</when>
<when test='indexKeyword == "ㅎ"'>
and w.WRDDICTTL BETWEEN '하' AND '힣'
</when>
<!-- 알파벳 a ~ z에 대한 검색 -->
<when test='indexKeyword == "a"'>
and w.WRDDICTTL like "a%"
@ -134,9 +134,6 @@
<when test='indexKeyword == "z"'>
and w.WRDDICTTL like "z%"
</when>
<otherwise>
and w.WRDDICTTL like CONCAT('%', #{indexKeyword}, '%')
</otherwise>
</choose>
</if>
<!-- 카테고리 조건 -->
@ -304,47 +301,33 @@
CHARACTER_,
COUNT(*) AS COUNT
FROM (
SELECT 'ㄱ' AS CHARACTER_, WRDDICTTL FROM worddicty
WHERE WRDDICTTL BETWEEN '가' AND '깋' OR WRDDICTTL LIKE 'ㄱ%'
UNION ALL
SELECT 'ㄴ' AS CHARACTER_, WRDDICTTL FROM worddicty
WHERE WRDDICTTL BETWEEN '나' AND '닣' OR WRDDICTTL LIKE 'ㄴ%'
UNION ALL
SELECT 'ㄷ' AS CHARACTER_, WRDDICTTL FROM worddicty
WHERE WRDDICTTL BETWEEN '다' AND '딷' OR WRDDICTTL LIKE 'ㄷ%'
UNION ALL
SELECT 'ㄹ' AS CHARACTER_, WRDDICTTL FROM worddicty
WHERE WRDDICTTL BETWEEN '라' AND '릿' OR WRDDICTTL LIKE 'ㄹ%'
UNION ALL
SELECT 'ㅁ' AS CHARACTER_, WRDDICTTL FROM worddicty
WHERE WRDDICTTL BETWEEN '마' AND '밓' OR WRDDICTTL LIKE 'ㅁ%'
UNION ALL
SELECT 'ㅂ' AS CHARACTER_, WRDDICTTL FROM worddicty
WHERE WRDDICTTL BETWEEN '바' AND '빟' OR WRDDICTTL LIKE 'ㅂ%'
UNION ALL
SELECT 'ㅅ' AS CHARACTER_, WRDDICTTL FROM worddicty
WHERE WRDDICTTL BETWEEN '사' AND '싷' OR WRDDICTTL LIKE 'ㅅ%'
UNION ALL
SELECT 'ㅇ' AS CHARACTER_, WRDDICTTL FROM worddicty
WHERE WRDDICTTL BETWEEN '아' AND '잏' OR WRDDICTTL LIKE 'ㅇ%'
UNION ALL
SELECT 'ㅈ' AS CHARACTER_, WRDDICTTL FROM worddicty
WHERE WRDDICTTL BETWEEN '자' AND '짛' OR WRDDICTTL LIKE 'ㅈ%'
UNION ALL
SELECT 'ㅊ' AS CHARACTER_, WRDDICTTL FROM worddicty
WHERE WRDDICTTL BETWEEN '차' AND '칳' OR WRDDICTTL LIKE 'ㅊ%'
UNION ALL
SELECT 'ㅋ' AS CHARACTER_, WRDDICTTL FROM worddicty
WHERE WRDDICTTL BETWEEN '카' AND '킿' OR WRDDICTTL LIKE 'ㅋ%'
UNION ALL
SELECT 'ㅌ' AS CHARACTER_, WRDDICTTL FROM worddicty
WHERE WRDDICTTL BETWEEN '타' AND '틷' OR WRDDICTTL LIKE 'ㅌ%'
UNION ALL
SELECT 'ㅍ' AS CHARACTER_, WRDDICTTL FROM worddicty
WHERE WRDDICTTL BETWEEN '파' AND '핗' OR WRDDICTTL LIKE 'ㅍ%'
UNION ALL
SELECT 'ㅎ' AS CHARACTER_, WRDDICTTL FROM worddicty
WHERE WRDDICTTL BETWEEN '하' AND '힣' OR WRDDICTTL LIKE 'ㅎ%'
SELECT 'ㄱ' AS CHARACTER_, WRDDICTTL FROM worddicty WHERE WRDDICTTL BETWEEN '가' AND '깋'
UNION ALL
SELECT 'ㄴ' AS CHARACTER_, WRDDICTTL FROM worddicty WHERE WRDDICTTL BETWEEN '나' AND '닣'
UNION ALL
SELECT 'ㄷ' AS CHARACTER_, WRDDICTTL FROM worddicty WHERE WRDDICTTL BETWEEN '다' AND '딷'
UNION ALL
SELECT 'ㄹ' AS CHARACTER_, WRDDICTTL FROM worddicty WHERE WRDDICTTL BETWEEN '라' AND '릿'
UNION ALL
SELECT 'ㅁ' AS CHARACTER_, WRDDICTTL FROM worddicty WHERE WRDDICTTL BETWEEN '마' AND '밓'
UNION ALL
SELECT 'ㅂ' AS CHARACTER_, WRDDICTTL FROM worddicty WHERE WRDDICTTL BETWEEN '바' AND '빟'
UNION ALL
SELECT 'ㅅ' AS CHARACTER_, WRDDICTTL FROM worddicty WHERE WRDDICTTL BETWEEN '사' AND '싷'
UNION ALL
SELECT 'ㅇ' AS CHARACTER_, WRDDICTTL FROM worddicty WHERE WRDDICTTL BETWEEN '아' AND '잏'
UNION ALL
SELECT 'ㅈ' AS CHARACTER_, WRDDICTTL FROM worddicty WHERE WRDDICTTL BETWEEN '자' AND '짛'
UNION ALL
SELECT 'ㅊ' AS CHARACTER_, WRDDICTTL FROM worddicty WHERE WRDDICTTL BETWEEN '차' AND '칳'
UNION ALL
SELECT 'ㅋ' AS CHARACTER_, WRDDICTTL FROM worddicty WHERE WRDDICTTL BETWEEN '카' AND '킿'
UNION ALL
SELECT 'ㅌ' AS CHARACTER_, WRDDICTTL FROM worddicty WHERE WRDDICTTL BETWEEN '타' AND '틷'
UNION ALL
SELECT 'ㅍ' AS CHARACTER_, WRDDICTTL FROM worddicty WHERE WRDDICTTL BETWEEN '파' AND '핗'
UNION ALL
SELECT 'ㅎ' AS CHARACTER_, WRDDICTTL FROM worddicty WHERE WRDDICTTL BETWEEN '하' AND '힣'
UNION ALL
SELECT 'a' AS CHARACTER_, WRDDICTTL FROM worddicty WHERE WRDDICTTL LIKE 'a%'
UNION ALL