Merge branch 'dev' into deploy-dev-front
This commit is contained in:
@@ -593,4 +593,27 @@ AS SELECT a.seq,
|
||||
LEFT JOIN researcher_has_household rhh ON rhh.admin_seq = a.seq AND rhh.is_deleted = false
|
||||
LEFT JOIN household h ON h.seq = rhh.household_seq AND h.is_panel IS TRUE AND h.is_deleted = false
|
||||
WHERE ahr.role_id::text = 'ROLE_RESEARCHER'::text
|
||||
GROUP BY a.seq, a.id, a.name, a.phone, a.account_disabled;
|
||||
GROUP BY a.seq, a.id, a.name, a.phone, a.account_disabled;
|
||||
|
||||
-- ============================================
|
||||
-- 개인정보 변경 동의 내역
|
||||
-- ============================================
|
||||
-- public.term_agreement
|
||||
|
||||
CREATE SEQUENCE public.term_agreement_seq
|
||||
INCREMENT BY 1
|
||||
MINVALUE 1
|
||||
MAXVALUE 9223372036854775807
|
||||
START 1
|
||||
CACHE 1
|
||||
NO CYCLE;
|
||||
|
||||
CREATE TABLE public.term_agreement (
|
||||
id int8 DEFAULT nextval('term_agreement_seq'::regclass) NOT NULL,
|
||||
seq int8 not NULL,
|
||||
"type" varchar(10) NULL,
|
||||
previous_data varchar(10) NULL,
|
||||
created_at timestamp(6) NULL,
|
||||
created_by varchar(255) null,
|
||||
CONSTRAINT term_agreement_pkey PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package app.module.front.usecase.info.userFront.insertTermAgreement.adapters.persistence;
|
||||
|
||||
import app.module.core.config.application.annotation.CreateCommand;
|
||||
import app.module.front.usecase.info.userFront.insertTermAgreement.ports.InsertTermAgreementPortOut;
|
||||
import app.module.front.usecase.info.userFront.insertTermAgreement.ports.application.domain.InsertTermAgreementCmd;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
class InsertTermAgreementDao implements InsertTermAgreementPortOut {
|
||||
|
||||
private final InsertTermAgreementMapper mapper;
|
||||
|
||||
@Override
|
||||
@CreateCommand
|
||||
public void operate(InsertTermAgreementCmd cmd) {
|
||||
mapper.insert(cmd);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package app.module.front.usecase.info.userFront.insertTermAgreement.adapters.persistence;
|
||||
|
||||
import app.module.front.usecase.info.userFront.getUserFront.ports.application.domain.GetUserFront;
|
||||
import app.module.front.usecase.info.userFront.insertTermAgreement.ports.application.domain.InsertTermAgreementCmd;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@Mapper
|
||||
public interface InsertTermAgreementMapper {
|
||||
void insert(InsertTermAgreementCmd cmd);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package app.module.front.usecase.info.userFront.insertTermAgreement.ports;
|
||||
|
||||
import app.module.front.usecase.info.userFront.insertTermAgreement.ports.application.domain.InsertTermAgreementCmd;
|
||||
|
||||
public interface InsertTermAgreementPortIn {
|
||||
void operate(InsertTermAgreementCmd cmd);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package app.module.front.usecase.info.userFront.insertTermAgreement.ports;
|
||||
|
||||
import app.module.front.usecase.info.userFront.insertTermAgreement.ports.application.domain.InsertTermAgreementCmd;
|
||||
|
||||
public interface InsertTermAgreementPortOut {
|
||||
void operate(InsertTermAgreementCmd cmd);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package app.module.front.usecase.info.userFront.insertTermAgreement.ports.application;
|
||||
|
||||
import app.module.front.usecase.info.userFront.insertTermAgreement.ports.InsertTermAgreementPortIn;
|
||||
import app.module.front.usecase.info.userFront.insertTermAgreement.ports.InsertTermAgreementPortOut;
|
||||
import app.module.front.usecase.info.userFront.insertTermAgreement.ports.application.domain.InsertTermAgreementCmd;
|
||||
import app.module.front.usecase.info.userFront.updateUser.ports.UpdateUserFrontPortIn;
|
||||
import app.module.front.usecase.info.userFront.updateUser.ports.UpdateUserFrontPortOut;
|
||||
import app.module.front.usecase.info.userFront.updateUser.ports.application.domain.UpdateUserFrontCmd;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
class InsertTermAgreementService implements InsertTermAgreementPortIn {
|
||||
private final InsertTermAgreementPortOut portOut;
|
||||
|
||||
@Override
|
||||
public void operate(InsertTermAgreementCmd cmd) { portOut.operate(cmd); }
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package app.module.front.usecase.info.userFront.insertTermAgreement.ports.application.domain;
|
||||
|
||||
import app.module.core.config.adapters.persistence.component.AuditCommand;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
public class InsertTermAgreementCmd extends AuditCommand {
|
||||
private Long seq;
|
||||
private String previousData;
|
||||
private String type;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package app.module.front.usecase.info.userFront.updateUser.ports.application.domain;
|
||||
|
||||
import app.module.core.config.adapters.persistence.component.AuditCommand;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
public class InsertUserFrontTermAgreementCmd extends AuditCommand {
|
||||
private Long seq;
|
||||
private String previousData;
|
||||
private String type;
|
||||
}
|
||||
@@ -6,6 +6,8 @@ import app.module.front.config.application.response.ApiResponse;
|
||||
import app.module.front.usecase.info.userFront.getUserFront.ports.GetUserFrontPortIn;
|
||||
import app.module.front.usecase.info.userFront.getUserFront.ports.application.domain.GetUserFront;
|
||||
import app.module.front.usecase.info.userFront.getUserFront.ports.application.domain.GetUserFrontCmd;
|
||||
import app.module.front.usecase.info.userFront.insertTermAgreement.ports.InsertTermAgreementPortIn;
|
||||
import app.module.front.usecase.info.userFront.insertTermAgreement.ports.application.domain.InsertTermAgreementCmd;
|
||||
import app.module.front.usecase.info.userFront.updateUser.ports.UpdateUserFrontPortIn;
|
||||
import app.module.front.usecase.info.userFront.updateUser.ports.application.domain.UpdateUserFrontCmd;
|
||||
import app.module.front.usecase.info.userUI.updateUserUI.adapters.web.model.UpdateUserReqVO;
|
||||
@@ -25,6 +27,7 @@ class UpdateUserController {
|
||||
private final UpdateUserFrontPortIn updateUserPortIn;
|
||||
|
||||
private final GetUserFrontPortIn getUserPortIn;
|
||||
private final InsertTermAgreementPortIn insertTermAgreementPortIn;
|
||||
|
||||
|
||||
private final CoreUtil coreUtil;
|
||||
@@ -36,6 +39,13 @@ class UpdateUserController {
|
||||
}
|
||||
GetUserFront getHousehold = getUserPortIn.operate(new GetUserFrontCmd(CommonUtil.getLoginUsername())).orElseThrow();
|
||||
|
||||
if(reqVO.getTermAgreement()){
|
||||
insertTermAgreementPortIn.operate(new InsertTermAgreementCmd(
|
||||
getHousehold.getSeq(),
|
||||
getHousehold.getOwnerName(),
|
||||
"PERSONAL"
|
||||
));
|
||||
}
|
||||
updateUserPortIn.operate(new UpdateUserFrontCmd(
|
||||
getHousehold.getSeq(),
|
||||
reqVO.getOwnerName(),
|
||||
|
||||
@@ -48,4 +48,7 @@ public class UpdateUserReqVO {
|
||||
@NotBlank(message = "전체 주소를 입력해주세요.")//"주소는 필수 항목입니다.")
|
||||
@Size(max = 255, message = "전체 주소를 입력해주세요.")//"주소는 255자 이하여야 합니다.")
|
||||
private String address;
|
||||
|
||||
private Boolean termAgreement;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<?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.insertTermAgreement.adapters.persistence.InsertTermAgreementMapper">
|
||||
|
||||
<update id="insert">
|
||||
INSERT INTO term_agreement(
|
||||
id,
|
||||
seq,
|
||||
"type",
|
||||
previous_data,
|
||||
created_at,
|
||||
created_by
|
||||
)VALUES(
|
||||
nextval('term_agreement_seq'::regclass),
|
||||
#{seq},
|
||||
#{type},
|
||||
#{previousData},
|
||||
NOW(),
|
||||
#{createdBy}
|
||||
)
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -1,19 +0,0 @@
|
||||
[
|
||||
{"no":1, "start":1, "end":2, "children": []},
|
||||
{"no":2, "start":3, "end":4, "children": [{}, {}]},
|
||||
{"no":3, "start":5, "end":6, "children": []},
|
||||
{"no":4, "start":7, "end":7, "children": [{}]},
|
||||
{"no":5, "start":8, "end":9, "children": []},
|
||||
{"no":6, "start":10, "end":11, "children": []},
|
||||
{"no":7, "start":12, "end":13, "children": []},
|
||||
{"no":8, "start":14, "end":14, "children": []},
|
||||
{"no":9, "start":15, "end":16, "children": []},
|
||||
{"no":10, "start":17, "end":18, "children": []},
|
||||
{"no":11, "start":19, "end":20, "children": [{}, {}]},
|
||||
{"no":12, "start":21, "end":21, "children": []},
|
||||
{"no":13, "start":22, "end":23, "children": []},
|
||||
{"no":14, "start":24, "end":25, "children": [{}, {}]},
|
||||
{"no":15, "start":26, "end":27, "children": [{}, {}, {}, {}]},
|
||||
{"no":16, "start":28, "end":29, "children": []},
|
||||
{"no":17, "start":30, "end":31, "children": []}
|
||||
]
|
||||
@@ -1,18 +0,0 @@
|
||||
[
|
||||
{"no":1, "start":1, "end":2, "children": []},
|
||||
{"no":2, "start":3, "end":4, "children": [{}, {}]},
|
||||
{"no":3, "start":5, "end":6, "children": []},
|
||||
{"no":4, "start":7, "end":7, "children": [{}]},
|
||||
{"no":5, "start":8, "end":9, "children": []},
|
||||
{"no":6, "start":10, "end":11, "children": []},
|
||||
{"no":7, "start":12, "end":13, "children": []},
|
||||
{"no":8, "start":14, "end":14, "children": []},
|
||||
{"no":9, "start":15, "end":16, "children": []},
|
||||
{"no":10, "start":17, "end":18, "children": []},
|
||||
{"no":11, "start":19, "end":20, "children": [{}, {}]},
|
||||
{"no":12, "start":21, "end":21, "children": []},
|
||||
{"no":13, "start":22, "end":23, "children": []},
|
||||
{"no":14, "start":24, "end":25, "children": [{}, {}]},
|
||||
{"no":15, "start":26, "end":27, "children": [{}, {}, {}, {}]},
|
||||
{"no":16, "start":28, "end":28, "children": []}
|
||||
]
|
||||
@@ -1,19 +0,0 @@
|
||||
[
|
||||
{"no":1, "start":1, "end":2, "children": []},
|
||||
{"no":2, "start":3, "end":4, "children": [{}, {}]},
|
||||
{"no":3, "start":5, "end":6, "children": []},
|
||||
{"no":4, "start":7, "end":7, "children": [{}]},
|
||||
{"no":5, "start":8, "end":9, "children": []},
|
||||
{"no":6, "start":10, "end":11, "children": []},
|
||||
{"no":7, "start":12, "end":13, "children": []},
|
||||
{"no":8, "start":14, "end":14, "children": []},
|
||||
{"no":9, "start":15, "end":16, "children": []},
|
||||
{"no":10, "start":17, "end":18, "children": []},
|
||||
{"no":11, "start":19, "end":20, "children": [{}, {}]},
|
||||
{"no":12, "start":21, "end":21, "children": []},
|
||||
{"no":13, "start":22, "end":23, "children": []},
|
||||
{"no":14, "start":24, "end":25, "children": [{}, {}]},
|
||||
{"no":15, "start":26, "end":27, "children": [{}, {}, {}, {}]},
|
||||
{"no":16, "start":28, "end":29, "children": []},
|
||||
{"no":17, "start":30, "end":31, "children": []}
|
||||
]
|
||||
@@ -1,19 +0,0 @@
|
||||
[
|
||||
{"no":1, "start":1, "end":2, "children": []},
|
||||
{"no":2, "start":3, "end":4, "children": [{}, {}]},
|
||||
{"no":3, "start":5, "end":6, "children": []},
|
||||
{"no":4, "start":7, "end":7, "children": [{}]},
|
||||
{"no":5, "start":8, "end":9, "children": []},
|
||||
{"no":6, "start":10, "end":11, "children": []},
|
||||
{"no":7, "start":12, "end":13, "children": []},
|
||||
{"no":8, "start":14, "end":14, "children": []},
|
||||
{"no":9, "start":15, "end":16, "children": []},
|
||||
{"no":10, "start":17, "end":18, "children": []},
|
||||
{"no":11, "start":19, "end":20, "children": [{}, {}]},
|
||||
{"no":12, "start":21, "end":21, "children": []},
|
||||
{"no":13, "start":22, "end":23, "children": []},
|
||||
{"no":14, "start":24, "end":25, "children": [{}, {}]},
|
||||
{"no":15, "start":26, "end":27, "children": [{}, {}, {}, {}]},
|
||||
{"no":16, "start":28, "end":29, "children": []},
|
||||
{"no":17, "start":30, "end":30, "children": []}
|
||||
]
|
||||
@@ -1,19 +0,0 @@
|
||||
[
|
||||
{"no":1, "start":1, "end":2, "children": []},
|
||||
{"no":2, "start":3, "end":4, "children": [{}, {}]},
|
||||
{"no":3, "start":5, "end":6, "children": []},
|
||||
{"no":4, "start":7, "end":7, "children": [{}]},
|
||||
{"no":5, "start":8, "end":9, "children": []},
|
||||
{"no":6, "start":10, "end":11, "children": []},
|
||||
{"no":7, "start":12, "end":13, "children": []},
|
||||
{"no":8, "start":14, "end":14, "children": []},
|
||||
{"no":9, "start":15, "end":16, "children": []},
|
||||
{"no":10, "start":17, "end":18, "children": []},
|
||||
{"no":11, "start":19, "end":20, "children": [{}, {}]},
|
||||
{"no":12, "start":21, "end":21, "children": []},
|
||||
{"no":13, "start":22, "end":23, "children": []},
|
||||
{"no":14, "start":24, "end":25, "children": [{}, {}]},
|
||||
{"no":15, "start":26, "end":27, "children": [{}, {}, {}, {}]},
|
||||
{"no":16, "start":28, "end":29, "children": []},
|
||||
{"no":17, "start":30, "end":31, "children": []}
|
||||
]
|
||||
@@ -1,19 +0,0 @@
|
||||
[
|
||||
{"no":1, "start":1, "end":2, "children": []},
|
||||
{"no":2, "start":3, "end":4, "children": [{}, {}]},
|
||||
{"no":3, "start":5, "end":6, "children": []},
|
||||
{"no":4, "start":7, "end":7, "children": [{}]},
|
||||
{"no":5, "start":8, "end":9, "children": []},
|
||||
{"no":6, "start":10, "end":11, "children": []},
|
||||
{"no":7, "start":12, "end":13, "children": []},
|
||||
{"no":8, "start":14, "end":14, "children": []},
|
||||
{"no":9, "start":15, "end":16, "children": []},
|
||||
{"no":10, "start":17, "end":18, "children": []},
|
||||
{"no":11, "start":19, "end":20, "children": []},
|
||||
{"no":12, "start":21, "end":21, "children": []},
|
||||
{"no":13, "start":22, "end":23, "children": []},
|
||||
{"no":14, "start":24, "end":25, "children": []},
|
||||
{"no":15, "start":26, "end":27, "children": []},
|
||||
{"no":16, "start":28, "end":29, "children": []},
|
||||
{"no":17, "start":30, "end":30, "children": []}
|
||||
]
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"name": "My App",
|
||||
"short_name": "MyApp",
|
||||
"start_url": "/",
|
||||
"display": "standalone",
|
||||
"background_color": "#ffffff",
|
||||
//"theme_color": "#4BBC43",
|
||||
"icons": [
|
||||
{
|
||||
"src": "kri_appimg.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
<!-- iOS 홈화면 -->
|
||||
<link rel="apple-touch-icon" th:href="@{/static/assets/images/kri_appimg.png}">
|
||||
<!-- PWA -->
|
||||
<link rel="manifest" th:href="@{/static/assets/json/manifest.json}">
|
||||
<link rel="manifest" th:href="@{/static/manifest.json}">
|
||||
<link rel="icon" type="image/x-icon" th:href="@{/static/assets/images/kri_favicon.ico}" />
|
||||
<link rel="shortcut icon" type="image/x-icon" th:href="@{/static/assets/images/kri_favicon.ico}" />
|
||||
<link th:href="@{/static/assets/styles/style.css}" type="text/css" rel="stylesheet" />
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<section class="form-group">
|
||||
<form method="post" name="reqForm" id="reqForm" onsubmit="formControl.authInfoUser();"
|
||||
th:action="@{/api/front/info/user/update}" th:object="${userInfo}">
|
||||
<input type="hidden" name="termAgreement" value="false" />
|
||||
<!-- 이름 -->
|
||||
<div class="component-input">
|
||||
<div class="input-label">
|
||||
@@ -386,12 +387,11 @@
|
||||
}
|
||||
}
|
||||
if (form.phone1.value || form.phone2.value || form.phone3.value) {
|
||||
if (form.tel2.value.length === 3) errors.push({ field: 'tel1', message: '핸드폰 번호를 입력해 주세요.' });
|
||||
if (form.tel2.value.length < 3 || form.tel2.value.length > 4) errors.push({ field: 'tel2', message: '핸드폰 번호를 입력해 주세요.' });
|
||||
if (form.tel3.value.length !== 4) errors.push({ field: 'tel3', message: '핸드폰 번호를 입력해 주세요.' });
|
||||
if (form.phone1.value.length !== 3) errors.push({ field: 'phone1', message: '핸드폰 번호를 입력해 주세요.' });
|
||||
if (form.phone2.value.length < 3 || form.phone2.value.length > 4) errors.push({ field: 'phone2', message: '핸드폰 번호를 입력해 주세요.' });
|
||||
if (form.phone3.value.length !== 4) errors.push({ field: 'phone3', message: '핸드폰 번호를 입력해 주세요.' });
|
||||
}
|
||||
if (!form.phone1.value ||!form.phone2.value || !form.phone3.value) errors.push({field: 'phone1', message: '휴대폰 번호를 입력해 주세요.'});
|
||||
if (form.phone1.value.length < 2 || form.phone2.value.length < 3 || form.phone2.value.length > 4 || form.phone3.value.length < 3 || form.phone3.value.length > 4) errors.push({field: 'phone1', message: '휴대폰 번호를 입력해 주세요.'});
|
||||
if (!form.regionSubCode.value) errors.push({field: 'regionSubCode', message: '지역을 선택해 주세요.'});
|
||||
if (!form.regionDetailCode.value) errors.push({field: 'regionDetailCode', message: '세부 지역를 선택해 주세요.'});
|
||||
if (!form.address.value) errors.push({field: 'address', message: '전체 주소를 입력해 주세요.'});
|
||||
@@ -410,6 +410,7 @@
|
||||
},
|
||||
confirmPopupOk() {
|
||||
ENV.module.confirmPopup.close();
|
||||
document.querySelector('input[name="termAgreement"]').value = true;
|
||||
formControl.updateUserInfo();
|
||||
},
|
||||
updateUserInfo() {
|
||||
|
||||
Reference in New Issue
Block a user