Merge branch 'dev' into daily

This commit is contained in:
김현주
2025-06-16 17:24:22 +09:00
245 changed files with 3890 additions and 3201 deletions

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace="app.module.front.usecase.info.monthly.getMonthlyInputStatus.adapters.persistence.GetMonthlyInputStatusMapper">
<select id="getMonthlyInputStatus"
resultType="app.module.front.usecase.info.monthly.getMonthlyInputStatus.ports.application.domain.GetMonthlyInputStatus">
<if test="id != null">
SELECT
a.id AS id,
a.household_seq AS householdSeq,
a.month AS month,
a.forest_product_status AS forestProductStatus,
a.bank_auto_transfer_input_status AS bankAutoTransferInputStatus,
a.bank_auto_transfer_output_status AS bankAutoTransferOutputStatus,
a.created_at AS createdAt,
a.created_by AS createdBy,
a.updated_at AS updatedAt,
a.updated_by AS updatedBy
FROM monthly_input_status a
WHERE a.id = #{id}
AND a.is_deleted = false
<if test="householdSeq != null">
AND a.household_seq = #{householdSeq}
</if>
</if>
</select>
</mapper>

View File

@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace="app.module.front.usecase.info.monthly.getMonthlyInputStatuss.adapters.persistence.GetMonthlyInputStatussMapper">
<select id="getMonthlyInputStatuss"
resultType="app.module.front.usecase.info.monthly.getMonthlyInputStatuss.adapters.persistence.model.GetMonthlyInputStatussDto">
SELECT
a.id AS id,
a.household_seq AS householdSeq,
a.month AS month,
a.forest_product_status AS forestProductStatus,
a.bank_auto_transfer_input_status AS bankAutoTransferInputStatus,
a.bank_auto_transfer_output_status AS bankAutoTransferOutputStatus,
a.created_at AS createdAt,
a.created_by AS createdBy,
a.updated_at AS updatedAt,
a.updated_by AS updatedBy,
COUNT(*) OVER () AS total
FROM monthly_input_status a
WHERE a.is_deleted = false
<if test="cmd.householdSeq != null">
AND a.household_seq = ${cmd.householdSeq}
</if>
<if test="cmd.searchField != null and cmd.searchField != ''">
<choose>
<when test="cmd.searchField eq 'month'">
AND a.month ILIKE '%' || #{cmd.searchValue} || '%'
</when>
<when test="cmd.searchField eq 'household'">
AND a.household_seq = #{cmd.searchValue}
</when>
<when test="cmd.searchField eq 'updatedBy'">
AND a.updated_by ILIKE '%' || #{cmd.searchValue} || '%'
</when>
</choose>
</if>
<if test="pageable.sort != null and !pageable.sort.isEmpty()">
ORDER BY
<foreach collection="pageable.sort" item="order" separator=",">
<choose>
<when test="order.property eq 'household'">a.household_seq</when>
<when test="order.property eq 'updatedBy'">a.updated_by</when>
<when test="order.property eq 'updatedAt'">a.updated_at</when>
<when test="order.property eq 'createdBy'">a.created_by</when>
<when test="order.property eq 'createdAt'">a.created_at</when>
<otherwise>a.id</otherwise>
</choose>
<choose>
<when test="order.direction.toString() eq 'DESC'">DESC</when>
<otherwise>ASC</otherwise>
</choose>
</foreach>
OFFSET #{pageable.offset} ROWS FETCH NEXT #{pageable.pageSize} ROWS ONLY
</if>
</select>
</mapper>

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace="app.module.front.usecase.info.monthly.getPrevMonthlyInputStatus.adapters.persistence.GetPrevMonthlyInputStatusMapper">
<select id="getPrevMonthlyInputStatus"
resultType="app.module.front.usecase.info.monthly.getPrevMonthlyInputStatus.ports.application.domain.GetPrevMonthlyInputStatus">
<if test="id != null">
SELECT
a.id AS id,
a.household_seq AS householdSeq,
a.month AS month,
a.forest_product_status AS forestProductStatus,
a.bank_auto_transfer_input_status AS bankAutoTransferInputStatus,
a.bank_auto_transfer_output_status AS bankAutoTransferOutputStatus,
a.created_at AS createdAt,
a.created_by AS createdBy,
a.updated_at AS updatedAt,
a.updated_by AS updatedBy
FROM monthly_input_status a
WHERE a.is_deleted = false
AND a.forest_product_status != 'NONE'
AND a.household_seq = #{householdSeq}
AND a.month = (
SELECT TO_CHAR(TO_DATE(month, 'YYYY-MM') - INTERVAL '1 month', 'YYYY-MM')
FROM monthly_input_status
WHERE is_deleted = false AND id = #{id}
);
</if>
</select>
</mapper>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace="app.module.front.usecase.info.monthly.updateMonthlyInputStatus.adapters.persistence.UpdateMonthlyInputStatusMapper">
<update id="updateMonthlyInputStatus">
/* updateNotice 게시글 수정 */
UPDATE monthly_input_status
SET
household_seq = #{householdSeq},
month = #{month},
forest_product_status = #{forestProductStatus},
bank_auto_transfer_input_status = #{bankAutoTransferInputStatus},
bank_auto_transfer_output_status = #{bankAutoTransferOutputStatus},
<include refid="common.fields.UpdateBaseSet"/>
WHERE id = #{id}
</update>
</mapper>

View File

@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace="app.module.front.usecase.info.notice.createNotice.adapters.persistence.CreateNoticeMapper">
<insert id="createNotice" keyProperty="id">
<!-- createNotice 게시글 등록 -->
<selectKey keyProperty="id" order="BEFORE" resultType="long">
SELECT nextval('notice_seq')
</selectKey>
INSERT INTO notice (
id,
content,
end_date,
start_date,
title,
visible,
created_at,
created_by,
updated_at,
updated_by,
is_deleted
) VALUES (
#{id},
#{content},
#{endDate},
#{startDate},
#{title},
#{visible},
#{createdAt},
#{createdBy},
#{updatedAt},
#{updatedBy},
false
)
</insert>
<insert id="createNoticeHasUploadFile">
<!-- createNoticeHasUploadFile 게시글 등록 시, 첨부파일 join 데이터 등록 -->
INSERT INTO notice_has_upload_file
(
notice_id,
upload_files_id,
<include refid="common.fields.CreateUpdateBaseColumns"/>
)
VALUES
<foreach collection="fileMappingId" item="fileId" separator=",">
(
#{id},
#{fileId},
<include refid="common.fields.CreateUpdateBaseValues"/>
)
</foreach>
</insert>
</mapper>

View File

@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace="app.module.front.usecase.info.notice.getNotice.adapters.persistence.GetNoticeMapper">
<select id="getNotice"
resultType="app.module.front.usecase.info.notice.getNotice.ports.application.domain.GetNotice">
/* getNotice 상세 게시글 조회 */
<if test="id != null">
SELECT
a.id AS id,
a.title AS title,
a.content AS content,
a.visible AS visible,
a.start_date AS startDate,
a.end_date AS endDate,
a.created_at AS createdAt,
a.created_by AS createdBy,
a.updated_at AS updatedAt,
a.updated_by AS updatedBy
FROM notice a
WHERE a.id = #{id}
AND a.is_deleted = false
<if test="searchOpen != null and searchOpen != ''">
<choose>
<when test="searchOpen eq 'true'">
AND a.visible = true
</when>
<when test="searchOpen eq 'false'">
AND a.visible = false
</when>
</choose>
</if>
</if>
</select>
<select id="getUploadFiles"
resultType="app.module.front.usecase.info.notice.getNotice.ports.application.domain.GetNoticeUploadFile">
/* getUploadFiles 상세 게시글 조회 시, 첨부파일 조회 */
SELECT
awuf.notice_id AS noticeId,
awuf.upload_files_id AS uploadfileId,
uf.id AS id,
uf.created_at AS createdAt,
uf.created_by AS createdBy,
uf.updated_at AS updatedAt,
uf.updated_by AS updatedBy,
uf.file_length AS fileLength,
uf.name AS name,
uf.origin_name AS originName,
uf.path AS path,
uf.type AS type
FROM notice_has_upload_file awuf
INNER JOIN upload_file uf
ON awuf.upload_files_id = uf.id
WHERE awuf.notice_id = #{id}
</select>
</mapper>

View File

@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace="app.module.front.usecase.info.notice.getNotices.adapters.persistence.GetNoticesMapper">
<select id="getNotices"
resultType="app.module.front.usecase.info.notice.getNotices.adapters.persistence.model.GetNoticesDto">
/* getNotices : 게시물 리스트 */
SELECT
a.id,
a.updated_by,
a.updated_at,
a.created_by,
a.created_at,
a.title,
a.content,
a.visible,
a.start_date,
a.end_date,
COUNT(*) OVER () AS total
FROM notice a
WHERE a.is_deleted = false
<if test="cmd.searchField != null and cmd.searchField != ''">
<choose>
<when test="cmd.searchField eq 'titleContent'">
AND ( a.title ILIKE '%' || #{cmd.searchValue} || '%' OR a.content ILIKE '%' || #{cmd.searchValue} || '%' )
</when>
<when test="cmd.searchField eq 'title'">
AND a.title ILIKE '%' || #{cmd.searchValue} || '%'
</when>
<when test="cmd.searchField eq 'content'">
AND a.content ILIKE '%' || #{cmd.searchValue} || '%'
</when>
<when test="cmd.searchField eq 'updatedBy'">
AND a.updated_by ILIKE '%' || #{cmd.searchValue} || '%'
</when>
</choose>
</if>
<if test="cmd.searchOpen != null and cmd.searchOpen != ''">
<choose>
<when test="cmd.searchOpen eq 'true'">
AND a.visible = true
</when>
<when test="cmd.searchOpen eq 'false'">
AND a.visible = false
</when>
</choose>
</if>
<if test="pageable.sort != null and !pageable.sort.isEmpty()">
ORDER BY
<foreach collection="pageable.sort" item="order" separator=",">
<choose>
<when test="order.property eq 'title'">a.title</when>
<when test="order.property eq 'visible'">a.visible</when>
<when test="order.property eq 'startDate'">a.start_date</when>
<when test="order.property eq 'endDate'">a.end_date</when>
<when test="order.property eq 'updatedBy'">a.updated_by</when>
<when test="order.property eq 'updatedAt'">a.updated_at</when>
<when test="order.property eq 'createdBy'">a.created_by</when>
<when test="order.property eq 'createdAt'">a.created_at</when>
<otherwise>a.id</otherwise>
</choose>
<choose>
<when test="order.direction.toString() eq 'DESC'">DESC</when>
<otherwise>ASC</otherwise>
</choose>
</foreach>
OFFSET #{pageable.offset} ROWS FETCH NEXT #{pageable.pageSize} ROWS ONLY
</if>
</select>
<select id="getUploadFiles"
resultType="app.module.front.usecase.info.notice.getNotices.ports.application.domain.GetNoticeFiles">
/* getUploadFiles : 게시물 리스트의 대표 이미지 */
SELECT
awuf.notice_id,
uf.id,
uf.type,
uf.path,
uf.name,
uf.origin_name,
uf.file_length
FROM notice_has_upload_file awuf
INNER JOIN upload_file uf ON awuf.upload_files_id = uf.id
WHERE awuf.notice_id IN
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
AND uf.type = #{fileUploadType}
AND uf.is_deleted = false
</select>
</mapper>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace="app.module.front.usecase.info.notice.removeNotices.adapters.persistence.RemoveNoticesMapper">
<update id="deleteNotices">
/* deleteNotices : 게시물 삭제 */
UPDATE notice
SET <include refid="common.fields.DeleteBaseSet" />
WHERE id IN
<foreach collection="removeIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</update>
<update id="deleteNoticeHasFiles">
/* deleteNoticeHasFiles : 게시물-파일 매핑 논리 삭제 */
UPDATE notice_has_upload_file
SET <include refid="common.fields.DeleteBaseSet" />
WHERE notice_id IN
<foreach collection="removeIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>

View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace="app.module.front.usecase.info.notice.updateNotice.adapters.persistence.UpdateNoticeMapper">
<update id="deleteFileUploads">
/* deleteFileUploads 게시글 수정 시, 첨부파일 join 데이터 삭제 */
UPDATE notice_has_upload_file
SET <include refid="common.fields.UpdateBaseSet"/>
WHERE notice_id = #{noticeId}
</update>
<insert id="createFileUploads">
/* createFileUploads 게시글 수정 시, 첨부파일 join 데이터 등록 */
INSERT INTO notice_has_upload_file
(
notice_id,
upload_files_id,
<include refid="common.fields.CreateUpdateBaseColumns"/>
)
VALUES
<foreach collection="fileMappingId" item="fileId" separator=",">
(
#{id},
#{fileId},
<include refid="common.fields.CreateUpdateBaseValues"/>
)
</foreach>
</insert>
<update id="updateNotice">
/* updateNotice 게시글 수정 */
UPDATE notice
SET
content = #{content},
end_date = #{endDate},
start_date = #{startDate},
title = #{title},
visible = #{visible},
<include refid="common.fields.UpdateBaseSet"/>
WHERE id = #{id}
</update>
</mapper>

View File

@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace="app.module.front.usecase.info.monthlyProduct.createForestProduct.adapters.persistence.CreateForestProductMapper">
<insert id="createForestProduct" keyProperty="id">
<!-- createForestProduct 게시글 등록 -->
<selectKey keyProperty="id" order="BEFORE" resultType="long">
SELECT nextval('notice_seq')
</selectKey>
INSERT INTO forest_product (
id,
household_seq,
street_num,
land_type,
town,
available_area,
crop_name,
crop_code,
land_area,
month,
main_yield,
main_yield_unit_code,
main_sale_amount,
main_sale_unit_code,
sub_yield,
sub_yield_unit_code,
sub_sale_amount,
sub_sale_unit_code,
monthly_input_status_id,
created_at,
created_by,
updated_at,
updated_by,
is_deleted
) VALUES (
#{id},
#{householdSeq},
#{streetNum},
#{landType},
#{town},
#{availableArea},
#{cropName},
#{cropCode},
#{landArea},
#{month},
#{mainYield},
#{mainYieldUnitCode},
#{mainSaleAmount},
#{mainSaleUnitCode},
#{subYield},
#{subYieldUnitCode},
#{subSaleAmount},
#{subSaleUnitCode},
#{monthlyInputStatusId},
#{createdAt},
#{createdBy},
#{createdAt},
#{createdBy},
false
)
</insert>
</mapper>

View File

@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace="app.module.front.usecase.info.monthlyProduct.getForestProduct.adapters.persistence.GetForestProductMapper">
<select id="getForestProduct"
resultType="app.module.front.usecase.info.monthlyProduct.getForestProduct.ports.application.domain.GetForestProduct">
/* getForestProduct 상세 게시글 조회 */
<if test="id != null">
SELECT
a.id AS id,
a.household_seq AS householdSeq,
a.street_num AS streetNum,
a.land_type AS landType,
a.town AS town,
a.available_area AS availableArea,
a.crop_name AS cropName,
a.crop_code AS cropCode,
a.land_area AS landArea,
a.month AS month,
a.main_yield AS mainYield,
a.main_yield_unit_code AS mainYieldUnitCode,
a.main_sale_amount AS mainSaleAmount,
a.main_sale_unit_code AS mainSaleUnitCode,
a.sub_yield AS subYield,
a.sub_yield_unit_code AS subYieldUnitCode,
a.sub_sale_amount AS subSaleAmount,
a.sub_sale_unit_code AS subSaleUnitCode,
a.monthly_input_status_id AS monthlyInputStatusId,
a.created_at AS createdAt,
a.created_by AS createdBy,
a.updated_at AS updatedAt,
a.updated_by AS updatedBy
FROM forest_product a
WHERE a.id = #{id}
AND a.is_deleted = false
</if>
</select>
</mapper>

View File

@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace="app.module.front.usecase.info.monthlyProduct.getForestProducts.adapters.persistence.GetForestProductsMapper">
<select id="getForestProducts"
resultType="app.module.front.usecase.info.monthlyProduct.getForestProducts.adapters.persistence.model.GetForestProductsDto">
/* getForestProducts : 게시물 리스트 */
SELECT
a.id AS id,
a.household_seq AS householdSeq,
a.street_num AS streetNum,
a.land_type AS landType,
a.town AS town,
a.available_area AS availableArea,
a.crop_name AS cropName,
a.crop_code AS cropCode,
a.land_area AS landArea,
a.month AS month,
a.main_yield AS mainYield,
a.main_yield_unit_code AS mainYieldUnitCode,
a.main_sale_amount AS mainSaleAmount,
a.main_sale_unit_code AS mainSaleUnitCode,
a.sub_yield AS subYield,
a.sub_yield_unit_code AS subYieldUnitCode,
a.sub_sale_amount AS subSaleAmount,
a.sub_sale_unit_code AS subSaleUnitCode,
a.monthly_input_status_id AS monthlyInputStatusId,
a.created_at AS createdAt,
a.created_by AS createdBy,
a.updated_at AS updatedAt,
a.updated_by AS updatedBy,
COUNT(*) OVER () AS total
FROM forest_product a
WHERE a.is_deleted = false
<if test="cmd.searchField != null and cmd.searchField != ''">
<choose>
<when test="cmd.searchField eq 'month'">
AND a.month ILIKE '%' || #{cmd.searchValue} || '%'
</when>
<when test="cmd.searchField eq 'household'">
AND a.household_seq = #{cmd.searchValue}
</when>
<when test="cmd.searchField eq 'updatedBy'">
AND a.updated_by ILIKE '%' || #{cmd.searchValue} || '%'
</when>
</choose>
</if>
<if test="pageable.sort != null and !pageable.sort.isEmpty()">
ORDER BY
<foreach collection="pageable.sort" item="order" separator=",">
<choose>
<when test="order.property eq 'household'">a.household_seq</when>
<when test="order.property eq 'updatedBy'">a.updated_by</when>
<when test="order.property eq 'updatedAt'">a.updated_at</when>
<when test="order.property eq 'createdBy'">a.created_by</when>
<when test="order.property eq 'createdAt'">a.created_at</when>
<otherwise>a.id</otherwise>
</choose>
<choose>
<when test="order.direction.toString() eq 'DESC'">DESC</when>
<otherwise>ASC</otherwise>
</choose>
</foreach>
OFFSET #{pageable.offset} ROWS FETCH NEXT #{pageable.pageSize} ROWS ONLY
</if>
</select>
</mapper>

View File

@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace="app.module.front.usecase.info.monthlyProduct.getMonthlyForestProducts.adapters.persistence.GetMonthlyForestProductsMapper">
<select id="getMonthlyForestProducts"
resultType="app.module.front.usecase.info.monthlyProduct.getMonthlyForestProducts.adapters.persistence.model.GetMonthlyForestProductsDto">
/* getForestProducts : 게시물 리스트 */
SELECT
a.id AS id,
a.household_seq AS householdSeq,
a.street_num AS streetNum,
a.land_type AS landType,
a.town AS town,
a.available_area AS availableArea,
a.crop_name AS cropName,
a.crop_code AS cropCode,
a.land_area AS landArea,
a.month AS month,
a.main_yield AS mainYield,
a.main_yield_unit_code AS mainYieldUnitCode,
a.main_sale_amount AS mainSaleAmount,
a.main_sale_unit_code AS mainSaleUnitCode,
a.sub_yield AS subYield,
a.sub_yield_unit_code AS subYieldUnitCode,
a.sub_sale_amount AS subSaleAmount,
a.sub_sale_unit_code AS subSaleUnitCode,
a.monthly_input_status_id AS monthlyInputStatusId,
a.created_at AS createdAt,
a.created_by AS createdBy,
a.updated_at AS updatedAt,
a.updated_by AS updatedBy,
COUNT(*) OVER () AS total
FROM forest_product a
WHERE a.is_deleted = false
<if test="cmd.monthlyInputStatusId != null">
AND a.monthly_input_status_id = #{cmd.monthlyInputStatusId}
</if>
<if test="cmd.householdSeq != null">
AND a.household_seq = #{cmd.householdSeq}
</if>
<if test="pageable.sort != null and !pageable.sort.isEmpty()">
ORDER BY
<foreach collection="pageable.sort" item="order" separator=",">
<choose>
<when test="order.property eq 'household'">a.household_seq</when>
<when test="order.property eq 'updatedBy'">a.updated_by</when>
<when test="order.property eq 'updatedAt'">a.updated_at</when>
<when test="order.property eq 'createdBy'">a.created_by</when>
<when test="order.property eq 'createdAt'">a.created_at</when>
<otherwise>a.id</otherwise>
</choose>
<choose>
<when test="order.direction.toString() eq 'DESC'">DESC</when>
<otherwise>ASC</otherwise>
</choose>
</foreach>
OFFSET #{pageable.offset} ROWS FETCH NEXT #{pageable.pageSize} ROWS ONLY
</if>
</select>
</mapper>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace="app.module.front.usecase.info.monthlyProduct.removeForestProducts.adapters.persistence.RemoveForestProductsMapper">
<update id="deleteForestProducts">
/* deleteForestProducts : 게시물 삭제 */
UPDATE forest_product
SET <include refid="common.fields.DeleteBaseSet" />
WHERE id IN
<foreach collection="removeIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace="app.module.front.usecase.info.monthlyProduct.removeMonthForestProducts.adapters.persistence.RemoveMonthForestProductsMapper">
<update id="deleteForestProducts">
/* deleteForestProducts : 게시물 삭제 */
UPDATE forest_product
SET <include refid="common.fields.DeleteBaseSet" />
WHERE
household_seq = #{householdSeq}
AND monthly_input_status_id = #{id}
</update>
</mapper>

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace="app.module.front.usecase.info.monthlyProduct.updateForestProduct.adapters.persistence.UpdateForestProductMapper">
<update id="updateForestProduct">
/* updateNotice 게시글 수정 */
UPDATE forest_product
SET
household_seq = #{householdSeq},
street_num = #{streetNum},
land_type = #{landType},
town = #{town},
available_area = #{availableArea},
crop_name = #{cropName},
crop_code = #{cropCode},
land_area = #{landArea},
month = #{month},
main_yield = #{mainYield},
main_yield_unit_code = #{mainYieldUnitCode},
main_sale_amount = #{mainSaleAmount},
main_sale_unit_code = #{mainSaleUnitCode},
sub_yield = #{subYield},
sub_yield_unit_code = #{subYieldUnitCode},
sub_sale_amount = #{subSaleAmount},
sub_sale_unit_code = #{subSaleUnitCode},
monthly_input_status_id = #{monthlyInputStatusId},
<include refid="common.fields.UpdateBaseSet"/>
WHERE id = #{id}
</update>
</mapper>

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace="app.module.front.usecase.info.userFront.getUserFront.adapters.persistence.GetUserFrontMapper">
<select id="findByHouseholdNum"
resultType="app.module.front.usecase.info.userFront.getUserFront.ports.application.domain.GetUserFront">
SELECT
seq,
household_num,
owner_name,
owner_age,
tel,
phone,
password,
region_main_code,
region_sub_code,
region_detail_code,
address,
industry_large_code,
industry_middle_code,
industry_sub_middle,
industry_detail,
employment_code,
is_panel,
memo,
drop_reason,
created_at,
created_by,
updated_at,
updated_by
FROM household
WHERE household_num = #{householdNum}
AND is_deleted = false
</select>
</mapper>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace="app.module.front.usecase.info.userFront.updateUser.adapters.persistence.UpdateUserFrontMapper">
<update id="update">
UPDATE household
SET
owner_name = #{ownerName},
owner_age = #{ownerAge},
tel = #{tel},
phone = #{phone},
region_main_code = #{regionMainCode},
region_sub_code = #{regionSubCode},
address = #{address},
<include refid="common.fields.UpdateBaseSet" />
WHERE seq = ${seq}
</update>
</mapper>