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>

View File

@@ -55,7 +55,6 @@ var ajaxUtil = {
},
});
}
},
_alertId : function (alertId, afterEvent) {
ajaxUtil._alertMethod({

View File

@@ -1,129 +1,52 @@
<!DOCTYPE html>
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org">
xmlns:th="http://www.thymeleaf.org">
<div layout:fragment="content">
<main id="content" role="main">
<style>
label {
display: inline-block;
width: 150px;
}
div {
margin-bottom: 15px;
}
.invalid-feedback {
display: none;
font-size: 12px;
font-weight: bold;
}
.is-invalid + .invalid-feedback {
display: block;
}
input[readonly] {
background-color: #e9ecef;
color: #6c757d;
cursor: not-allowed;
}
</style>
<div>
<form
method="get"
name="reqForm"
th:action="@{/user/info}" th:object="${userInfo}">
<input type="hidden" name="id" th:value="*{seq}">
<div>
<label for="householdNum">임가번호</label>
<input id="householdNum" name="householdNum" placeholder="아이디" readonly="readonly" th:field="*{householdNum}"
type="text">
<div class="invalid-feedback field-id"></div>
</div>
<div>
<label for="ownerName">경영주</label>
<input id="ownerName" name="ownerName" placeholder="경영주 이름" th:field="*{ownerName}" type="text">
<div class="invalid-feedback field-id"></div>
</div>
<div>
<label for="ownerAge">만나이</label>
<input id="ownerAge" name="ownerAge" placeholder="나이" th:field="*{ownerAge}" type="text">
<div class="invalid-feedback field-id"></div>
</div>
<div>
<label for="tel">가구연락처</label>
<input id="tel" name="tel" placeholder="가구연락처" th:field="*{tel}" type="text">
<div class="invalid-feedback field-id"></div>
</div>
<div>
<label for="phone">핸드폰번호</label>
<input id="phone" name="phone" placeholder="핸드폰번호" th:field="*{phone}" type="text">
<div class="invalid-feedback field-id"></div>
</div>
<!-- <div>-->
<!-- <label for="region">시.도</label>-->
<!-- <input id="region" name="region" placeholder="시.도" th:field="*{region}" type="text">-->
<!-- <div class="invalid-feedback field-id"></div>-->
<!-- </div>-->
<!-- <div>-->
<!-- <label for="city">시.군.도</label>-->
<!-- <input id="city" name="city" placeholder="시.군.도" th:field="*{city}" type="text">-->
<!-- <div class="invalid-feedback field-id"></div>-->
<!-- </div>-->
<div>
<label for="addressDetail">전체 주소</label>
<input id="addressDetail" name="addressDetail" placeholder="세부 주소" th:field="*{address}" type="text">
<div class="invalid-feedback field-id"></div>
</div>
</form>
<button onclick="updateUser();">수정하기</button>
</div>
</main>
<div layout:fragment="content" th:classappend="'mypage-wrap'">
<main id="content" role="main">
<div class="inner">
<hgroup class="tit-group">
<h3>
이번달의 <br>
<strong>은행 자동이체 내역 입력 현황</strong>을
확인하세요.
</h3>
</hgroup>
<ul class="product-col-list">
<li>
<a href="">
<p class="list-tit">수입</p>
<span class="tag">미등록</span>
</a>
</li>
<li class="complete">
<a href="">
<p class="list-tit">지출</p>
<span class="tag">등록완료</span>
</a>
</li>
</ul>
</div>
</main>
</div>
<section layout:fragment="script">
<script>
const updateUser = () => {
const f = document.reqForm;
const obj = $(f).serializeObject();
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.monthly.path}]]*/'rootUrl'
},
module: {
confirmPopup: null
},
submitted: false,
};
let formControl = {
init() {
// 기존 에러 메세지 초기화
$('.is-invalid').removeClass('is-invalid');
$.ajax({
method: 'PATCH',
url: '/api/front/household/update',
data: obj,
beforeSend: function (xhr) {
xhr.setRequestHeader(
$("meta[name='_csrf_header']").attr("content"),
$("meta[name='_csrf']").attr("content"));
},
success(res) {
if (confirm(`'${res.ownerName} 님의' 정보가 수정되었습니다.`)) {
location.reload();
}
},
statusCode: {
'422': (res) => {
const fieldErrors = res.responseJSON.fieldErrors;
$(fieldErrors).each(function (idx, error) {
let target = $(f).find('[name=' + error.field + ']');
target.addClass('is-invalid');
target.parent().find('.invalid-feedback').text(error.message);
});
}
}
})
}
</script>
}
}
</script>
</section>

View File

@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org">
<div layout:fragment="content" th:classappend="'mypage-wrap'">
<main id="content" role="main">
<div class="inner">
<hgroup class="tit-group">
<h3>
이번달의 <br>
<strong>은행 자동이체 내역 입력 현황</strong>을
확인하세요.
</h3>
</hgroup>
<ul class="product-col-list">
<li>
<a href="">
<p class="list-tit">수입</p>
<span class="tag">미등록</span>
</a>
</li>
<li class="complete">
<a href="">
<p class="list-tit">지출</p>
<span class="tag">등록완료</span>
</a>
</li>
</ul>
</div>
</main>
</div>
<section layout:fragment="script">
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.monthly.path}]]*/'rootUrl'
},
module: {
confirmPopup: null
},
submitted: false,
};
let formControl = {
init() {
}
}
</script>
</section>
</html>

View File

@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org">
<div layout:fragment="content" th:classappend="'mypage-wrap'">
<main id="content" role="main">
<div class="inner">
<hgroup class="tit-group">
<h3>
이번달의 <br>
<strong>은행 자동이체 내역 입력 현황</strong>을
확인하세요.
</h3>
</hgroup>
<ul class="product-col-list">
<li>
<a href="">
<p class="list-tit">수입</p>
<span class="tag">미등록</span>
</a>
</li>
<li class="complete">
<a href="">
<p class="list-tit">지출</p>
<span class="tag">등록완료</span>
</a>
</li>
</ul>
</div>
</main>
</div>
<section layout:fragment="script">
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.monthly.path}]]*/'rootUrl'
},
module: {
confirmPopup: null
},
submitted: false,
};
let formControl = {
init() {
}
}
</script>
</section>
</html>

View File

@@ -1,93 +1,95 @@
<!DOCTYPE html>
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org">
xmlns:th="http://www.thymeleaf.org">
<div layout:fragment="content" th:classappend="'mypage-wrap bg-gray'">
<main id="content" role="main">
<!-- alert-box 클래스 리스트
fail : 실패(빨강)
warning : 경고(노랑)
success : 성공(초록)
info : 인포(파랑)
-->
<article class="alert-box warning" th:if="${isUnregisteredDate}"> <!-- TODO Controller 단에서 처리 필요. 임시 -->
<p class="tit"><strong th:text="${userInfo?.ownerName}">홍길동</strong>님,</p>
<span class="txt">
<main id="content" role="main">
<!-- alert-box 클래스 리스트
fail : 실패(빨강)
warning : 경고(노랑)
success : 성공(초록)
info : 인포(파랑)
-->
<article class="alert-box warning" th:if="${isUnregisteredDate}"> <!-- TODO Controller 단에서 처리 필요. 임시 -->
<p class="tit"><strong th:text="${userInfo?.ownerName}">홍길동</strong>님,</p>
<span class="txt">
일계부를 등록하지 않은 날짜가 있습니다. <br>
정확한 조사를 위해 꾸준히 입력해 주세요.
</span>
</article>
</article>
<section class="info-top-area">
<div class="inner">
<dl class="info-card">
<dt class="name" th:text="${userInfo?.ownerName}"></dt>
<dd class="location" th:text="${userInfo?.address}"></dd><!-- TODO 임가 주소 위치 임시로 . 처리함. -->
<dd class="date" th:if="${latestRegisteredDate != null or !#strings.isEmpty(latestRegisteredDate)}" th:text="${'최근등록: '+latestRegisteredDate}"></dd>
</dl>
<th:block th:if="${notice != null}">
<a th:href="@{'/info/notice/' + ${notice.id}}" class="notice-box">
<p class="tit">공지사항</p>
<p class="txt" th:text="${notice.title}"></p>
</a>
</th:block>
<section class="info-top-area">
<div class="inner">
<dl class="info-card">
<dt class="name" th:text="${userInfo?.ownerName}"></dt>
<dd class="location" th:text="${userInfo?.address}"></dd><!-- TODO 임가 주소 위치 임시로 . 처리함. -->
<dd class="date" th:if="${latestRegisteredDate != null or !#strings.isEmpty(latestRegisteredDate)}"
th:text="${'최근등록: '+latestRegisteredDate}"></dd>
</dl>
<th:block th:if="${notice != null}">
<a th:href="@{'/info/notice/' + ${notice.id}}" class="notice-box">
<p class="tit">공지사항</p>
<p class="txt" th:text="${notice.title}"></p>
</a>
</th:block>
</div>
</section>
</div>
</section>
<section class="info-bottom-area bg-white bg-lround">
<ul class="btn-link-list">
<li>
<a href="/info/user/password">
<i class="ico-privacy ico-normal" aria-hidden="true"></i>
<dl>
<dt>개인정보 변경</dt>
<dd>이름, 주소, 연락처를 수정할 수 있어요</dd>
</dl>
</a>
</li>
<li>
<a href="/info/monthly">
<i class="ico-chart ico-normal" aria-hidden="true"></i>
<dl>
<dt>임산물 현황</dt>
<dd>이번 달 생산한 임산물을 입력해 주세요</dd>
</dl>
</a>
</li>
<li>
<a href="/info/bank">
<i class="ico-bank ico-normal" aria-hidden="true"></i>
<dl>
<dt>은행 자동이체 내역</dt>
<dd>자동으로 입금·출금된 금액을 <br>
기록해 주세요</dd>
</dl>
</a>
</li>
</ul>
</section>
</main>
<section class="info-bottom-area bg-white bg-lround">
<ul class="btn-link-list">
<li>
<a href="/info/user/password">
<i class="ico-privacy ico-normal" aria-hidden="true"></i>
<dl>
<dt>개인정보 변경</dt>
<dd>이름, 주소, 연락처를 수정할 수 있어요</dd>
</dl>
</a>
</li>
<li>
<a href="/info/monthly">
<i class="ico-chart ico-normal" aria-hidden="true"></i>
<dl>
<dt>임산물 현황</dt>
<dd>이번 달 생산한 임산물을 입력해 주세요</dd>
</dl>
</a>
</li>
<li>
<a href="/info/bank">
<i class="ico-bank ico-normal" aria-hidden="true"></i>
<dl>
<dt>은행 자동이체 내역</dt>
<dd>자동으로 입금·출금된 금액을 <br>
기록해 주세요
</dd>
</dl>
</a>
</li>
</ul>
</section>
</main>
</div>
<section layout:fragment="script">
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.path}]]*/'rootUrl',
},
submitted: false,
};
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.path}]]*/'rootUrl',
},
submitted: false,
};
let formControl = {
createValid() {
let formControl = {
createValid() {
}
};
</script>
}
};
</script>
</section>

File diff suppressed because it is too large Load Diff

View File

@@ -1,45 +1,46 @@
<!DOCTYPE html>
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org">
xmlns:th="http://www.thymeleaf.org">
<div layout:fragment="content" th:classappend="'mypage-wrap'">
<main id="content" role="main">
<div class="inner">
<hgroup class="tit-group">
<h3>
월별 등록된 <strong>임산물 현황</strong>을 <br> 확인하세요.
</h3>
</hgroup>
<ul class="product-col-list">
<main id="content" role="main">
<div class="inner">
<hgroup class="tit-group">
<h3>
월별 등록된 <strong>임산물 현황</strong>을 <br> 확인하세요.
</h3>
</hgroup>
<ul class="product-col-list">
<li th:each="item : ${list.content}" th:classappend="${item.forestProductStatus != MonthStatus.NONE} ? ' complete'">
<a th:href="@{/info/monthly/create/{id}(id=${item.id})}">
<p class="list-tit" th:text="${item.koreanMonth}"></p>
<span class="tag" th:text="${item.forestProductStatus.desc}"></span>
</a>
</li>
</ul>
</div>
</main>
<li th:each="item : ${list.content}"
th:classappend="${item.forestProductStatus != MonthStatus.NONE} ? ' complete'">
<a th:href="@{/info/monthly/create/{id}(id=${item.id})}">
<p class="list-tit" th:text="${item.koreanMonth}"></p>
<span class="tag" th:text="${item.forestProductStatus.desc}"></span>
</a>
</li>
</ul>
</div>
</main>
</div>
<section layout:fragment="script">
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.monthly.path}]]*/'rootUrl'
},
module:{
confirmPopup : null
},
submitted: false,
};
let formControl = {
init(){
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.monthly.path}]]*/'rootUrl'
},
module: {
confirmPopup: null
},
submitted: false,
};
let formControl = {
init() {
}
}
</script>
}
}
</script>
</section>

File diff suppressed because it is too large Load Diff

View File

@@ -1,119 +1,129 @@
<!DOCTYPE html>
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org">
xmlns:th="http://www.thymeleaf.org">
<div layout:fragment="content" th:classappend="'mypage-wrap'">
<main id="content" role="main">
<div class="inner">
<section class="search-area">
<form autocomplete="off" method="get" name="reqForm" action="/info/notice" onsubmit="formControl.goSearch()"
th:object="${reqVO}"
>
<input type="hidden" name="sort" id="sort" value="createdAt,DESC"/>
<input type="hidden" name="page" id="page" th:value="${notices != null} ? ${notices.number} : 0"/>
<main id="content" role="main">
<div class="inner">
<section class="search-area">
<form autocomplete="off" method="get" name="reqForm" action="/info/notice"
onsubmit="formControl.goSearch()"
th:object="${reqVO}"
>
<input type="hidden" name="sort" id="sort" value="createdAt,DESC"/>
<input type="hidden" name="page" id="page" th:value="${notices != null} ? ${notices.number} : 0"/>
<div id="searchFieldId" class="component-select bottom-sheet" data-props-default="제목 + 내용" data-props-type="bottomSheet">
<input type="hidden" name="searchField"/>
<button type="button" class="select-box">
<span class="select-txt">제목 + 내용</span>
</button>
<div class="select-options">
<div class="select-header">
<p>검색 분류 선택</p>
<button type="button" class="select-close">
<span class="hide-txt">닫기</span>
</button>
</div>
<div class="select-scroll">
<ul class="">
<li class="option" th:classappend="*{searchField == null or searchField == 'titleContent'} ? ' current' : ''" data-value="titleContent">제목 + 내용</li>
<li class="option" th:classappend="*{searchField == 'title'} ? ' current' : ''" data-value="title">제목</li>
<li class="option" th:classappend="*{searchField == 'content'} ? ' current' : ''" data-value="content">내용</li>
</ul>
</div>
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" id="temp_input_ico_id_0001" placeholder="검색어를 입력해 주세요" name="searchValue" th:field="*{searchValue}"/>
<i class="input-field-ico ico-search" aria-hidden="true" onclick="formControl.goSearch()"></i>
</div>
</div>
</form>
</section>
<hr>
<div id="searchFieldId" class="component-select bottom-sheet" data-props-default="제목 + 내용"
data-props-type="bottomSheet">
<input type="hidden" name="searchField"/>
<button type="button" class="select-box">
<span class="select-txt">제목 + 내용</span>
</button>
<div class="select-options">
<div class="select-header">
<p>검색 분류 선택</p>
<button type="button" class="select-close">
<span class="hide-txt">닫기</span>
</button>
</div>
<div class="select-scroll">
<ul class="">
<li class="option"
th:classappend="*{searchField == null or searchField == 'titleContent'} ? ' current' : ''"
data-value="titleContent">제목 + 내용
</li>
<li class="option" th:classappend="*{searchField == 'title'} ? ' current' : ''"
data-value="title">제목
</li>
<li class="option" th:classappend="*{searchField == 'content'} ? ' current' : ''"
data-value="content">내용
</li>
</ul>
</div>
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" id="temp_input_ico_id_0001" placeholder="검색어를 입력해 주세요" name="searchValue"
th:field="*{searchValue}"/>
<i class="input-field-ico ico-search" aria-hidden="true"
onclick="formControl.goSearch()"></i>
</div>
</div>
</form>
</section>
<hr>
<section class="list-area" th:unless="${notices.content.size() > 0}">
<div class="no-data">
<i class="ico-nodata ico-large" aria-hidden="true"></i>
<p>조회 가능한 목록이 없습니다.</p>
</div>
</section>
<section class="list-area" th:unless="${notices.content.size() > 0}">
<div class="no-data">
<i class="ico-nodata ico-large" aria-hidden="true"></i>
<p>조회 가능한 목록이 없습니다.</p>
</div>
</section>
<section class="list-area" th:if="${notices.content.size() > 0}">
<p class="total-num">
총 <strong th:text="${notices.totalElements}"></strong>건
</p>
<ul>
<section class="list-area" th:if="${notices.content.size() > 0}">
<p class="total-num">
총 <strong th:text="${notices.totalElements}"></strong>건
</p>
<ul>
<li th:each="item : ${notices.content}">
<a th:href="@{'/info/notice/' + ${item.id}}">
<p class="list-tit" th:text="${item.title}"></p>
<p class="list-info">
<span class="date" th:text="${#temporals.format(item.createdAt, 'yyyy.MM.dd')}">2025.05.28</span>
<span class="badge" th:if="${item.newDate}">NEW</span>
</p>
</a>
</li>
<li th:each="item : ${notices.content}">
<a th:href="@{'/info/notice/' + ${item.id}}">
<p class="list-tit" th:text="${item.title}"></p>
<p class="list-info">
<span class="date" th:text="${#temporals.format(item.createdAt, 'yyyy.MM.dd')}">2025.05.28</span>
<span class="badge" th:if="${item.newDate}">NEW</span>
</p>
</a>
</li>
</ul>
</ul>
<div th:replace="common/list-components :: paginationCommon(${notices})"></div>
<div th:replace="common/list-components :: paginationCommon(${notices})"></div>
</section>
</section>
</div>
</main>
</div>
</main>
</div>
<section layout:fragment="script">
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.notice.path}]]*/'detailUrl',
notice: /*[[#{uri.front.info.notice.path}]]*/'noticeUrl'
},
module:{
confirmPopup : null
},
submitted: false,
};
let formControl = {
init(){
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.notice.path}]]*/'detailUrl',
notice: /*[[#{uri.front.info.notice.path}]]*/'noticeUrl'
},
module: {
confirmPopup: null
},
submitted: false,
};
let formControl = {
init() {
},
},
/**
* TODO 검색할때 각 페이지에 함수 구현 필요.
* TODO 일단 뒤로가기에 대한 부분 정의가 없기에 페이지 이동으로 처리해둠...
*/
goSearch(){
const f = document.reqForm;
/**
* TODO 검색할때 각 페이지에 함수 구현 필요.
* TODO 일단 뒤로가기에 대한 부분 정의가 없기에 페이지 이동으로 처리해둠...
*/
goSearch() {
const f = document.reqForm;
f.searchField.value = document.getElementById('searchFieldId').value;
f.submit();
},
goPageable(page, size, sort){
const f = document.reqForm;
f.page.value = page;
f.submit();
}
}
</script>
f.searchField.value = document.getElementById('searchFieldId').value;
f.submit();
},
goPageable(page, size, sort) {
const f = document.reqForm;
f.page.value = page;
f.submit();
}
}
</script>
</section>

View File

@@ -1,71 +1,72 @@
<!DOCTYPE html>
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org">
xmlns:th="http://www.thymeleaf.org">
<div layout:fragment="content" th:classappend="'mypage-wrap'">
<main id="content" role="main">
<div class="detail-wrap">
<div class="inner">
<dl class="detail-tit-group">
<dt th:text="${notice.title}"></dt>
<dd>[[${#temporals.format(notice.createdAt, 'yyyy.MM.dd')}]] <span class="badge" th:if="${notice.newDate}">new</span></dd>
</dl>
<div class="detail-content">
<p th:utext="${notice.content}"></p>
</div>
<main id="content" role="main">
<div class="detail-wrap">
<div class="inner">
<dl class="detail-tit-group">
<dt th:text="${notice.title}"></dt>
<dd>[[${#temporals.format(notice.createdAt, 'yyyy.MM.dd')}]] <span class="badge"
th:if="${notice.newDate}">new</span>
</dd>
</dl>
<div class="detail-content">
<p th:utext="${notice.content}"></p>
</div>
<div class="download-file" th:if="${!#lists.isEmpty(notice.uploadFiles)}">
<p class="tit">첨부파일</p>
<ul>
<li th:each="item : ${notice.uploadFiles}"><a th:href="${item.attachmentURL}" download
th:text="${item.originName}"></a></li>
</ul>
</div>
<button type="button" class="btn btn-list btn-full" onclick="formControl.goList()">
<span class="btn-txt">목록</span>
</button>
<div class="download-file" th:if="${!#lists.isEmpty(notice.uploadFiles)}">
<p class="tit">첨부파일</p>
<ul>
<li th:each="item : ${notice.uploadFiles}"><a th:href="${item.attachmentURL}" download th:text="${item.originName}"></a></li>
</ul>
</div>
<button type="button" class="btn btn-list btn-full" onclick="formControl.goList()">
<span class="btn-txt">목록</span>
</button>
</div>
</div>
</main>
</div>
</div>
</main>
</div>
root: /*[[|#{uri.front.info.user.path}/password|]]*/'rootUrl',
<section layout:fragment="script">
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.notice.path}]]*/'detailUrl',
notice: /*[[#{uri.front.info.notice.path}]]*/'noticeUrl'
},
module:{
confirmPopup : null
},
submitted: false,
};
let formControl = {
init() {
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.notice.path}]]*/'detailUrl',
notice: /*[[#{uri.front.info.notice.path}]]*/'noticeUrl'
},
module: {
confirmPopup: null
},
submitted: false,
};
let formControl = {
init() {
},
goList(){
/**
* TODO 외부 유입에 따라 history.back과 location.href 가 적절하게 사용되어야함...
* 전체적인 수정 필요.(이전 페이지
*/
const previousUrl = document.referrer;
},
goList() {
/**
* TODO 외부 유입에 따라 history.back과 location.href 가 적절하게 사용되어야함...
* 전체적인 수정 필요.(이전 페이지
*/
const previousUrl = document.referrer;
if (previousUrl.includes('/info/notice')) {
history.back();
} else {
location.href = '/info/notice';
}
if (previousUrl.includes('/info/notice')) {
history.back();
} else {
location.href = '/info/notice';
}
}
}
}
</script>
}
</script>
</section>

View File

@@ -1,83 +1,83 @@
<!DOCTYPE html>
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org">
xmlns:th="http://www.thymeleaf.org">
<div layout:fragment="content" th:classappend="'mypage-wrap'">
<main id="content" role="main">
<div class="inner">
<hgroup class="tit-group">
<h3>
개인정보 보호를 위해 <br>
<strong>비밀번호를 다시 입력</strong>해 주세요.
</h3>
<p>본인 확인 후 개인정보 변경이 가능합니다.</p>
</hgroup>
<main id="content" role="main">
<div class="inner">
<hgroup class="tit-group">
<h3>
개인정보 보호를 위해 <br>
<strong>비밀번호를 다시 입력</strong>해 주세요.
</h3>
<p>본인 확인 후 개인정보 변경이 가능합니다.</p>
</hgroup>
<section class="form-group">
<form method="post" name="reqForm" id="reqForm" onsubmit="formControl.authInfoUser();" th:action="@{/}" >
<div class="component-input" data-props-toggle-Password="true">
<div class="input-label">
<label for="password" class="label-txt">비밀번호</label>
</div>
<div class="input-field">
<input type="password" id="password" placeholder="비밀번호 4자리를 입력해 주세요" name="password" maxlength="4">
</div>
</div>
<div class="component-btns">
<div class="btns-row">
<button type="button" class="btn btn-full btn-l btn-primary" onclick="formControl.authInfoUser()">
<span class="btn-txt">다음</span>
</button>
</div>
</div>
</form>
</section>
<section class="form-group">
<form method="post" name="reqForm" id="reqForm" onsubmit="formControl.authInfoUser();" th:action="@{/}">
<div class="component-input" data-props-toggle-Password="true">
<div class="input-label">
<label for="password" class="label-txt">비밀번호</label>
</div>
<div class="input-field">
<input type="password" id="password" placeholder="비밀번호 4자리를 입력해 주세요" name="password"
maxlength="4">
</div>
</div>
<div class="component-btns">
<div class="btns-row">
<button type="button" class="btn btn-full btn-l btn-primary"
onclick="formControl.authInfoUser()">
<span class="btn-txt">다음</span>
</button>
</div>
</div>
</form>
</section>
</div>
</main>
</div>
</main>
</div>
<section layout:fragment="script">
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[|#{uri.front.info.user.path}/password|]]*/'rootUrl',
auth: /*[[|/api/front#{uri.front.info.user.path}/password/auth|]]*/'passwordAuthUrl',
user: /*[[#{uri.front.info.user.path}]]*/'userUrl',
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[|#{uri.front.info.user.path}/password|]]*/'rootUrl',
auth: /*[[|/api/front#{uri.front.info.user.path}/password/auth|]]*/'passwordAuthUrl',
user: /*[[#{uri.front.info.user.path}]]*/'userUrl',
},
},
submitted: false,
};
let formControl = {
authInfoUser() {
const f = document.reqForm;
submitted: false,
};
let formControl = {
authInfoUser() {
const f = document.reqForm;
const obj = $(f).serializeObject();
console.log(obj)
ajaxUtil._ajaxAsync(
ENV.httpUrl.auth,
obj,
function (rstData, status) {
if(rstData.code ==='SUCCESS'){
location.replace(ENV.httpUrl.user);
} else if (rstData.code === 'ERROR'){
if(rstData.message ==='INVALID_PASSWORD'){
ajaxUtil._alert('입력하신 정보가 맞지 않습니다.\n 다시 확인해주세요.',null);
} else {
ajaxUtil._alert('잠시 뒤에 다시 시도해 주세요.', null);
}
}
},
);
}
};
</script>
const obj = $(f).serializeObject();
console.log(obj)
ajaxUtil._ajaxAsync(
ENV.httpUrl.auth,
obj,
function (rstData, status) {
if (rstData.code === 'SUCCESS') {
location.replace(ENV.httpUrl.user);
} else if (rstData.code === 'ERROR') {
if (rstData.message === 'INVALID_PASSWORD') {
ajaxUtil._alert('입력하신 정보가 맞지 않습니다.\n 다시 확인해주세요.', null);
} else {
ajaxUtil._alert('잠시 뒤에 다시 시도해 주세요.', null);
}
}
},
);
}
};
</script>
</section>

View File

@@ -1,364 +1,376 @@
<!DOCTYPE html>
<html layout:decorate="~{layout/layout-none}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org">
xmlns:th="http://www.thymeleaf.org">
<div layout:fragment="content" th:classappend="'mypage-wrap'">
<main id="content" role="main">
<div class="inner">
<main id="content" role="main">
<div class="inner">
<p class="form-desc">필수입력</p>
<p class="form-desc">필수입력</p>
<section class="form-group">
<form method="post" name="reqForm" id="reqForm" onsubmit="formControl.authInfoUser();" th:action="@{/api/front/info/user/update}" th:object="${userInfo}">
<!-- 이름 -->
<div class="component-input">
<div class="input-label">
<label for="temp_input_0001" class="label-txt">
이름<i class="ico-required-mark" role="img" aria-label="필수">*</i>
</label>
</div>
<div class="input-field">
<input type="text" id="temp_input_0001" placeholder="이름을 입력해 주세요" th:field="*{ownerName}" maxlength="10">
</div>
</div>
<!-- 연령 -->
<div class="component-input">
<div class="input-label">
<label for="temp_input_0002" class="label-txt">
연령<span>(만 나이)</span> <i class="ico-required-mark" role="img" aria-label="필수">*</i>
</label>
</div>
<div class="input-field">
<input type="text" id="temp_input_0002" placeholder="만 나이를 입력해 주세요" th:field="*{ownerAge}" maxlength="3" oninput="this.value=this.value.replace(/[^0-9]/g,'')">
</div>
</div>
<!-- 가구연락처 -->
<div class="input-flex-group type-num">
<div class="input-label">
<label for="tel1Id" class="label-txt">
가구 연락처
</label>
</div>
<div class="d-flex">
<div class="select-group">
<section class="form-group">
<form method="post" name="reqForm" id="reqForm" onsubmit="formControl.authInfoUser();"
th:action="@{/api/front/info/user/update}" th:object="${userInfo}">
<!-- 이름 -->
<div class="component-input">
<div class="input-label">
<label for="temp_input_0001" class="label-txt">
이름<i class="ico-required-mark" role="img" aria-label="필수">*</i>
</label>
</div>
<div class="input-field">
<input type="text" id="temp_input_0001" placeholder="이름을 입력해 주세요" th:field="*{ownerName}"
maxlength="10">
</div>
</div>
<!-- 연령 -->
<div class="component-input">
<div class="input-label">
<label for="temp_input_0002" class="label-txt">
연령<span>(만 나이)</span> <i class="ico-required-mark" role="img" aria-label="필수">*</i>
</label>
</div>
<div class="input-field">
<input type="text" id="temp_input_0002" placeholder="만 나이를 입력해 주세요" th:field="*{ownerAge}"
maxlength="3" oninput="this.value=this.value.replace(/[^0-9]/g,'')">
</div>
</div>
<!-- 가구연락처 -->
<div class="input-flex-group type-num">
<div class="input-label">
<label for="tel1Id" class="label-txt">
가구 연락처
</label>
</div>
<div class="d-flex">
<div class="select-group">
<div id="tel1Id" class="component-select bottom-sheet" th:data-props-default="${userInfo.tel1}" data-props-type="bottomSheet">
<input type="hidden" th:field="*{tel1}" data-type="select">
<button type="button" class="select-box">
<span class="select-txt"></span>
</button>
<div class="select-options">
<div class="select-header">
<p>가구 연락처</p>
<button type="button" class="select-close">
<span class="hide-txt">닫기</span>
</button>
</div>
<div class="select-scroll">
<ul class="">
<li class="option" data-value="02">02</li>
<li class="option" data-value="31">31</li>
<li class="option" data-value="033">033</li>
<li class="option" data-value="042">042</li>
<li class="option" data-value="043">043</li>
<li class="option" data-value="051">051</li>
<li class="option" data-value="052">052</li>
<li class="option" data-value="053">053</li>
<li class="option" data-value="054">054</li>
<li class="option" data-value="055">055</li>
<li class="option" data-value="061">061</li>
<li class="option" data-value="062">062</li>
<li class="option" data-value="063">063</li>
<li class="option" data-value="064">064</li>
<li class="option" data-value="010">010</li>
<li class="option" data-value="011">011</li>
<li class="option" data-value="111">111</li>
</ul>
</div>
</div>
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" placeholder=0000 th:field="*{tel2}" maxlength="4" oninput="this.value=this.value.replace(/[^0-9]/g,'')"/>
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" placeholder=0000 th:field="*{tel3}" maxlength="4" oninput="this.value=this.value.replace(/[^0-9]/g,'')"/>
</div>
</div>
</div>
</div>
<!-- 휴대폰 번호 -->
<div class="input-flex-group type-num">
<div class="input-label">
<label for="phoneId" class="label-txt">
휴대폰 번호 <i class="ico-required-mark" role="img" aria-label="필수">*</i>
</label>
</div>
<div class="d-flex">
<div class="select-group">
<div id="tel1Id" class="component-select bottom-sheet"
th:data-props-default="${userInfo.tel1}" data-props-type="bottomSheet">
<input type="hidden" th:field="*{tel1}" data-type="select">
<button type="button" class="select-box">
<span class="select-txt"></span>
</button>
<div class="select-options">
<div class="select-header">
<p>가구 연락처</p>
<button type="button" class="select-close">
<span class="hide-txt">닫기</span>
</button>
</div>
<div class="select-scroll">
<ul class="">
<li class="option" data-value="02">02</li>
<li class="option" data-value="31">31</li>
<li class="option" data-value="033">033</li>
<li class="option" data-value="042">042</li>
<li class="option" data-value="043">043</li>
<li class="option" data-value="051">051</li>
<li class="option" data-value="052">052</li>
<li class="option" data-value="053">053</li>
<li class="option" data-value="054">054</li>
<li class="option" data-value="055">055</li>
<li class="option" data-value="061">061</li>
<li class="option" data-value="062">062</li>
<li class="option" data-value="063">063</li>
<li class="option" data-value="064">064</li>
<li class="option" data-value="010">010</li>
<li class="option" data-value="011">011</li>
<li class="option" data-value="111">111</li>
</ul>
</div>
</div>
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" placeholder=0000 th:field="*{tel2}" maxlength="4"
oninput="this.value=this.value.replace(/[^0-9]/g,'')"/>
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" placeholder=0000 th:field="*{tel3}" maxlength="4"
oninput="this.value=this.value.replace(/[^0-9]/g,'')"/>
</div>
</div>
</div>
</div>
<!-- 휴대폰 번호 -->
<div class="input-flex-group type-num">
<div class="input-label">
<label for="phoneId" class="label-txt">
휴대폰 번호 <i class="ico-required-mark" role="img" aria-label="필수">*</i>
</label>
</div>
<div class="d-flex">
<div class="select-group">
<div id="phoneId" class="component-select bottom-sheet" th:data-props-default="${userInfo.phone1}" data-props-type="bottomSheet">
<input type="hidden" th:field="*{phone1}" data-type="select">
<button type="button" class="select-box">
<span class="select-txt"></span>
</button>
<div class="select-options">
<div class="select-header">
<p>휴대폰 번호</p>
<button type="button" class="select-close">
<span class="hide-txt">닫기</span>
</button>
</div>
<div class="select-scroll">
<ul class="">
<li class="option" data-value="010">010</li>
<li class="option" data-value="011">011</li>
</ul>
</div>
</div>
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" id="temp_input_0006" placeholder=0000 th:field="*{phone2}" maxlength="4" oninput="this.value=this.value.replace(/[^0-9]/g,'')">
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" id="temp_input_0007" placeholder=0000 th:field="*{phone3}" maxlength="4" oninput="this.value=this.value.replace(/[^0-9]/g,'')">
</div>
</div>
</div>
</div>
<!-- 도로명 주소 -->
<div class="input-col-group">
<div class="select-group">
<div class="select-label">
<p class="label-txt">
도로명 주소
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
</p>
</div>
<div id="phoneId" class="component-select bottom-sheet"
th:data-props-default="${userInfo.phone1}" data-props-type="bottomSheet">
<input type="hidden" th:field="*{phone1}" data-type="select">
<button type="button" class="select-box">
<span class="select-txt"></span>
</button>
<div class="select-options">
<div class="select-header">
<p>휴대폰 번호</p>
<button type="button" class="select-close">
<span class="hide-txt">닫기</span>
</button>
</div>
<div class="select-scroll">
<ul class="">
<li class="option" data-value="010">010</li>
<li class="option" data-value="011">011</li>
</ul>
</div>
</div>
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" id="temp_input_0006" placeholder=0000 th:field="*{phone2}"
maxlength="4" oninput="this.value=this.value.replace(/[^0-9]/g,'')">
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" id="temp_input_0007" placeholder=0000 th:field="*{phone3}"
maxlength="4" oninput="this.value=this.value.replace(/[^0-9]/g,'')">
</div>
</div>
</div>
</div>
<!-- 도로명 주소 -->
<div class="input-col-group">
<div class="select-group">
<div class="select-label">
<p class="label-txt">
도로명 주소
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
</p>
</div>
<div id="regionMainCodeId" class="component-select bottom-sheet" data-props-default="시/도 선택" data-props-type="bottomSheet">
<input type="hidden" th:field="*{regionMainCode}" data-type="select">
<button type="button" class="select-box">
<span class="select-txt">선택</span>
</button>
<div class="select-options">
<div class="select-header">
<p>시/도 선택</p>
<button type="button" class="select-close">
<span class="hide-txt">닫기</span>
</button>
</div>
<div class="select-scroll">
<ul class="">
<th:block th:each="item : ${regionMainList}">
<li class="option" th:data-value="${item.id}" th:text="${item.codeText}">option1</li>
</th:block>
</ul>
</div>
</div>
</div>
<div id="regionMainCodeId" class="component-select bottom-sheet" data-props-default="시/도 선택"
data-props-type="bottomSheet">
<input type="hidden" th:field="*{regionMainCode}" data-type="select">
<button type="button" class="select-box">
<span class="select-txt">선택</span>
</button>
<div class="select-options">
<div class="select-header">
<p>시/도 선택</p>
<button type="button" class="select-close">
<span class="hide-txt">닫기</span>
</button>
</div>
<div class="select-scroll">
<ul class="">
<th:block th:each="item : ${regionMainList}">
<li class="option" th:data-value="${item.id}"
th:text="${item.codeText}">option1
</li>
</th:block>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="select-group">
<div id="regionSubCodeId" class="component-select bottom-sheet" data-props-default="시/군/구 선택" data-props-type="bottomSheet">
<input type="hidden" th:field="*{regionSubCode}" data-type="select">
<button type="button" class="select-box">
<span class="select-txt">선택</span>
</button>
<div class="select-options">
<div class="select-header">
<p>시/군/구 선택</p>
<button type="button" class="select-close">
<span class="hide-txt">닫기</span>
</button>
</div>
<div class="select-scroll">
<ul class="">
<th:block th:each="item : ${regionSubList}">
<li class="option" th:data-value="${item.id}" th:text="${item.codeText}" >option1</li>
</th:block>
<div class="select-group">
<div id="regionSubCodeId" class="component-select bottom-sheet"
data-props-default="시/군/구 선택" data-props-type="bottomSheet">
<input type="hidden" th:field="*{regionSubCode}" data-type="select">
<button type="button" class="select-box">
<span class="select-txt">선택</span>
</button>
<div class="select-options">
<div class="select-header">
<p>시/군/구 선택</p>
<button type="button" class="select-close">
<span class="hide-txt">닫기</span>
</button>
</div>
<div class="select-scroll">
<ul class="">
<th:block th:each="item : ${regionSubList}">
<li class="option" th:data-value="${item.id}"
th:text="${item.codeText}">option1
</li>
</th:block>
</ul>
</div>
</div>
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" id="temp_input_00023" placeholder="세부 주소를 입력해 주세요" th:field="*{address}" maxlength="50"/>
</div>
</div>
</div>
</form>
</section>
</ul>
</div>
</div>
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" id="temp_input_00023" placeholder="세부 주소를 입력해 주세요"
th:field="*{address}" maxlength="50"/>
</div>
</div>
</div>
</form>
</section>
<div class="component-btns">
<div class="btns-row">
<button type="button" class="btn btn-full btn-l btn-primary" onclick="formControl.confirmPopup()">
<span class="btn-txt">변경</span>
</button>
</div>
</div>
<div class="component-btns">
<div class="btns-row">
<button type="button" class="btn btn-full btn-l btn-primary" onclick="formControl.confirmPopup()">
<span class="btn-txt">변경</span>
</button>
</div>
</div>
</div>
</main>
</div>
</main>
<!-- 모달 팝업 -->
<div class="layer-wrap">
<div class="component-modal confirmPopup" data-props-dimm-click="true">
<div class="modal-dimm"></div>
<div class="modal-frame">
<div class="modal-container">
<div class="modal-header">
<h3 class="modal-tit">개인정보 수집 및 활용 동의</h3>
</div>
<div class="modal-content">
<div class="modal-content-inner">
<div>
이런 저런 내용<br><br><br><br><br><br><br><br><br>모달 스크롤 적용필요!!!
</div>
<div class="component-btns">
<div class="btns-row two-col">
<div class="btns-col-1">
<button type="button" class="btn btn-full btn-l btn-secondary" onclick="ENV.module.confirmPopup.close();">
<span class="btn-txt">동의 안함</span>
</button>
</div>
<div class="btns-col-2">
<button type="button" class="btn btn-full btn-l btn-primary" onclick="formControl.confirmPopupOk()">
<span class="btn-txt">동의</span>
</button>
</div>
</div>
</div>
</div>
</div>
<button class="modal-close"></button>
</div>
</div>
</div>
</div>
<!-- //모달 팝업 -->
<!-- 모달 팝업 -->
<div class="layer-wrap">
<div class="component-modal confirmPopup" data-props-dimm-click="true">
<div class="modal-dimm"></div>
<div class="modal-frame">
<div class="modal-container">
<div class="modal-header">
<h3 class="modal-tit">개인정보 수집 및 활용 동의</h3>
</div>
<div class="modal-content">
<div class="modal-content-inner">
<div>
이런 저런 내용<br><br><br><br><br><br><br><br><br>모달 스크롤 적용필요!!!
</div>
<div class="component-btns">
<div class="btns-row two-col">
<div class="btns-col-1">
<button type="button" class="btn btn-full btn-l btn-secondary"
onclick="ENV.module.confirmPopup.close();">
<span class="btn-txt">동의 안함</span>
</button>
</div>
<div class="btns-col-2">
<button type="button" class="btn btn-full btn-l btn-primary"
onclick="formControl.confirmPopupOk()">
<span class="btn-txt">동의</span>
</button>
</div>
</div>
</div>
</div>
</div>
<button class="modal-close"></button>
</div>
</div>
</div>
</div>
<!-- //모달 팝업 -->
</div>
<section layout:fragment="script">
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.user.path}]]*/'rootUrl',
user: /*[[|/api/front#{uri.front.info.user.path}/update|]]*/'updateUrl',
myInfo: /*[[#{uri.front.info.path}]]*/'myInfoUrl',
},
module:{
confirmPopup : null
},
submitted: false,
};
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.user.path}]]*/'rootUrl',
user: /*[[|/api/front#{uri.front.info.user.path}/update|]]*/'updateUrl',
myInfo: /*[[#{uri.front.info.path}]]*/'myInfoUrl',
},
module: {
confirmPopup: null
},
submitted: false,
};
let formControl = {
init(){
this._bindUI();
ajaxUtil._alert('select 010->10으로 노출\n 최초값 지정 및 값 취득 함수 필요\n 개인정보 작성 필요\n 모달 내부 스크롤 기능 추가 필요',null);
let formControl = {
init() {
this._bindUI();
ajaxUtil._alert('select 010->10으로 노출\n 최초값 지정 및 값 취득 함수 필요\n 개인정보 작성 필요\n 모달 내부 스크롤 기능 추가 필요', null);
},
_bindUI(){
ENV.module.confirmPopup = document.querySelector(".confirmPopup").ui;
},
confirmPopup(){
ENV.module.confirmPopup.open();
},
confirmPopupOk(){
ENV.module.confirmPopup.close();
},
_bindUI() {
ENV.module.confirmPopup = document.querySelector(".confirmPopup").ui;
},
confirmPopup() {
ENV.module.confirmPopup.open();
},
confirmPopupOk() {
ENV.module.confirmPopup.close();
setTimeout(function() {
formControl.updateUserInfo();
}, 500);
},
updateUserInfo() {
setTimeout(function () {
formControl.updateUserInfo();
}, 500);
},
updateUserInfo() {
const f = document.reqForm;
// TODO 어쩔수 없이 이렇게 하는데..... 콤포넌트값 핸들링 방법 UX에서 지정하면 수정해야함.
const tel1Element = document.getElementById('tel1Id');
const phone1IdElement = document.getElementById('phone1Id');
const regionMainCodeIdElement = document.getElementById('regionMainCodeId');
const regionSubCodeIdElement = document.getElementById('regionSubCodeId');
if (tel1Element && tel1Element.value) {
f.tel1.value = tel1Element.value;
}
if (phone1IdElement && phone1IdElement.value) {
f.phone1.value = phone1IdElement.value;
}
if (regionMainCodeIdElement && regionMainCodeIdElement.value) {
f.regionMainCode.value = regionMainCodeIdElement.value;
}
if (regionSubCodeIdElement && regionSubCodeIdElement.value) {
f.regionSubCode.value = regionSubCodeIdElement.value;
}
const f = document.reqForm;
// TODO 어쩔수 없이 이렇게 하는데..... 콤포넌트값 핸들링 방법 UX에서 지정하면 수정해야함.
const tel1Element = document.getElementById('tel1Id');
const phone1IdElement = document.getElementById('phone1Id');
const regionMainCodeIdElement = document.getElementById('regionMainCodeId');
const regionSubCodeIdElement = document.getElementById('regionSubCodeId');
if (tel1Element && tel1Element.value) {
f.tel1.value = tel1Element.value;
}
if (phone1IdElement && phone1IdElement.value) {
f.phone1.value = phone1IdElement.value;
}
if (regionMainCodeIdElement && regionMainCodeIdElement.value) {
f.regionMainCode.value = regionMainCodeIdElement.value;
}
if (regionSubCodeIdElement && regionSubCodeIdElement.value) {
f.regionSubCode.value = regionSubCodeIdElement.value;
}
const obj = $(f).serializeObject();
console.log(obj)
ajaxUtil._ajaxAsync(
ENV.httpUrl.user,
obj,
function (rstData, status) {
if(rstData.code ==='SUCCESS'){
ajaxUtil._alert('개인정보 변경이 완료되었습니다.', null, function () {
/**
* TODO
* 내정보에서만 들어온다는 가정하에서 back을 하게함 SB에는 내정보로 이동하게 되어 있음.
*/
history.back()
});
} else if (rstData.code === 'ERROR'){
ajaxUtil._alert('잠시 뒤에 다시 시도해 주세요.', null);
}
},
);
},
const obj = $(f).serializeObject();
console.log(obj)
ajaxUtil._ajaxAsync(
ENV.httpUrl.user,
obj,
function (rstData, status) {
if (rstData.code === 'SUCCESS') {
ajaxUtil._alert('개인정보 변경이 완료되었습니다.', null, function () {
/**
* TODO
* 내정보에서만 들어온다는 가정하에서 back을 하게함 SB에는 내정보로 이동하게 되어 있음.
*/
history.back()
});
} else if (rstData.code === 'ERROR') {
ajaxUtil._alert('잠시 뒤에 다시 시도해 주세요.', null);
}
},
);
},
telAndPhoneCheck(tel1, tel2, tel3) {
// 공백 제거
tel1 = tel1.trim();
tel2 = tel2.trim();
tel3 = tel3.trim();
telAndPhoneCheck(tel1, tel2, tel3) {
// 공백 제거
tel1 = tel1.trim();
tel2 = tel2.trim();
tel3 = tel3.trim();
const telRegex = /^[0-9]+$/;
if (!telRegex.test(tel1) || !telRegex.test(tel2) || !telRegex.test(tel3)) {
return null;
}
if (!((tel1.length === 2 || tel1.length === 3) && tel2.length === 4 && tel3.length === 4)) {
return null;
}
const formatted = `${tel1}-${tel2}-${tel3}`;
return formatted;
}
const telRegex = /^[0-9]+$/;
if (!telRegex.test(tel1) || !telRegex.test(tel2) || !telRegex.test(tel3)) {
return null;
}
if (!((tel1.length === 2 || tel1.length === 3) && tel2.length === 4 && tel3.length === 4)) {
return null;
}
const formatted = `${tel1}-${tel2}-${tel3}`;
return formatted;
}
};
</script>
};
</script>
</section>

View File

@@ -4,15 +4,15 @@
<body>
<section layout:fragment="content">
<p>Page content goes here</p>
<p>Page content goes here</p>
</section>
<div class="container">
<footer class="py-3 my-4 border-top">
<div class="text-center">
<span class="text-muted">&copy; 2022 All rights reserved</span>
</div>
</footer>
<footer class="py-3 my-4 border-top">
<div class="text-center">
<span class="text-muted">&copy; 2022 All rights reserved</span>
</div>
</footer>
</div>
</body>

View File

@@ -6,7 +6,7 @@
<body>
<section class="container" layout:fragment="content">
<p>Page content goes here</p>
<p>Page content goes here</p>
</section>
</body>