탭 항목 스장

This commit is contained in:
주수현
2025-06-14 12:39:28 +09:00
parent 0015b8c651
commit eccbf2a6e7
11 changed files with 483 additions and 9 deletions

View File

@@ -5,6 +5,7 @@
<select id="list" parameterType="app.module.admin.usecase.researcher.web.model.ResearchersListReqVO">
select
a.seq,
a.id,
COUNT(rhh.id) AS household_count,
a.name,
@@ -87,6 +88,49 @@
<if test="adminSeq > 0">
and a.seq = #{adminSeq}
</if>
LIMIT #{size} OFFSET #{page}*#{size}
</select>
<select id="mappingHouseholdListCountAll">
select
count(*)
from household h
join admin_has_role ahr ON h.seq = ahr.admin_seq
where ahr.role_id = 'ROLE_RESEARCHER' and ahr.is_deleted = false
<if test="adminSeq > 0">
and a.admin_seq = #{adminSeq}
</if>
</select>
<select id="visitHouseholdList">
select
rhv.id,
rhv.admin_seq,
rhv.household_seq
h.household_num,
h.name,
rhv.visit_date,
rhv.memo,
case rhv.is_gift_sent when false then '전달완료' when true then '-' end is_gift_sent_flag,
rhv.created_at
from researcher_household_visit rhv
join household h on rhv.household_seq = h.seq
join admin a on a.seq = rhv.admin_seq
where rhv.is_deleted = false
<if test="adminSeq > 0">
and rhv.admin_seq = #{adminSeq}
</if>
LIMIT #{size} OFFSET #{page}*#{size}
</select>
<select id="visitHouseholdListCountAll">
select count(*)
from researcher_household_visit rhv
where rhv.is_deleted = false
<if test="adminSeq > 0">
and rhv.admin_seq = #{adminSeq}
</if>
</select>
</mapper>