260615_02_ENH: kon 관련 매퍼 추가
This commit is contained in:
26
src/main/resources/mybatis/mapper/kon/KonMapper.xml
Normal file
26
src/main/resources/mybatis/mapper/kon/KonMapper.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"https://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.kri.gwcf.review.back.persistence.mapper.kon.KonMapper">
|
||||
|
||||
<select id="findPerformanceApplyCount" resultType="PerformanceApplyCountDto">
|
||||
SELECT performance_id, COUNT(1) AS apply_cnt
|
||||
FROM (
|
||||
SELECT DISTINCT
|
||||
JSON_VALUE(DJ.[VALUE], '$.SC') AS IDKEY,
|
||||
DV.[value] AS performance_id
|
||||
FROM [DATA] DA WITH(NOLOCK)
|
||||
CROSS APPLY OPENJSON([DATJSON]) DJ
|
||||
CROSS APPLY OPENJSON(DJ.[value]) DV
|
||||
WHERE PKEY = '2605013_B'
|
||||
AND [Status] = 10
|
||||
AND JSON_VALUE(DJ.[VALUE], '$.SC') IS NOT NULL
|
||||
AND DV.[KEY] LIKE 'Q1%'
|
||||
AND [SURVEY_TYPE] = #{surveyType}
|
||||
) A
|
||||
GROUP BY performance_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user