
--- build/resources/main/spring/mapper/account/account-SQL.xml
... | ... | @@ -1,67 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8" ?> | |
2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | - | |
4 | - | |
5 | -<mapper namespace="com.ajin.ajinerp.master.account.dao.AccountDAO"> | |
6 | - <!-- 계정 과목 정보 매퍼 --> | |
7 | - <resultMap id="ac01001TResult" type="AccountVO"> | |
8 | - <result property="accode" column="ACCODE"/> | |
9 | - <result property="acname" column="ACNAME"/> | |
10 | - <result property="dcgubn" column="DCGUBN"/> | |
11 | - <result property="blgubn" column="BLGUBN"/> | |
12 | - <result property="custgu" column="CUSTGU"/> | |
13 | - <result property="gyjngu" column="GYJNGU"/> | |
14 | - <result property="junggu" column="JUNGGU"/> | |
15 | - <result property="jdatgu" column="JDATGU"/> | |
16 | - <result property="sybugu" column="SYBUGU"/> | |
17 | - <result property="gomtgu" column="GOMTGU"/> | |
18 | - <result property="idregx" column="IDREGX"/> | |
19 | - <result property="dtmreg" column="DTMREG"/> | |
20 | - <result property="tmlreg" column="TMLREG"/> | |
21 | - <result property="iduptx" column="IDUPTX"/> | |
22 | - <result property="dtmupt" column="DTMUPT"/> | |
23 | - <result property="tmlupt" column="TMLUPT"/> | |
24 | - <result property="bltaxx" column="BLTAXX"/> | |
25 | - <result property="blcard" column="BLCARD"/> | |
26 | - <result property="blgygu" column="BLGYGU"/> | |
27 | - <result property="bgcard" column="BGCARD"/> | |
28 | - <result property="bggygu" column="BGGYGU"/> | |
29 | - <result property="drmtgu" column="DRMTGU"/> | |
30 | - <result property="crmtgu" column="CRMTGU"/> | |
31 | - <result property="exchgu" column="EXCHGU"/> | |
32 | - <result property="papegu" column="PAPEGU"/> | |
33 | - <result property="jiblgu" column="JIBLGU"/> | |
34 | - <result property="wonjgu" column="WONJGU"/> | |
35 | - <result property="semugu" column="SEMUGU"/> | |
36 | - <result property="pjcode" column="PJCODE"/> | |
37 | - | |
38 | - <result property="BLTXNM" column="BLTXNM" /> | |
39 | - <result property="BGTXNM" column="BGTXNM" /> | |
40 | - <result property="BLCDNM" column="BLCDNM" /> | |
41 | - <result property="BGCDNM" column="BGCDNM" /> | |
42 | - </resultMap> | |
43 | - | |
44 | - <!-- 계정 과목 정보 조회 --> | |
45 | - <select id="getAccountData" resultMap="ac01001TResult"> | |
46 | - SELECT A.*, | |
47 | - NVL(B.ACNAME, '') AS BLTXNM, | |
48 | - NVL(C.ACNAME, '') AS BGTXNM, | |
49 | - NVL(D.ACNAME, '') AS BLCDNM, | |
50 | - NVL(E.ACNAME, '') AS BGCDNM | |
51 | - FROM ( | |
52 | - SELECT A.*, | |
53 | - CASE WHEN A.DCGUBN = '1' THEN '1. 단일' | |
54 | - WHEN A.DCGUBN = '2' THEN '2. 그룹' ELSE A.DCGUBN END AS DCGUNM, | |
55 | - CASE WHEN A.SEMUGU = '1' THEN '개별' | |
56 | - WHEN A.SEMUGU = '2' THEN '일괄' ELSE A.SEMUGU END AS SEMUNM | |
57 | - FROM AC01001T A | |
58 | - ) A | |
59 | - LEFT OUTER JOIN (SELECT ACCODE, ACNAME FROM AC01001T) B ON B.ACCODE = A.BLTAXX | |
60 | - LEFT OUTER JOIN (SELECT ACCODE, ACNAME FROM AC01001T) C ON C.ACCODE = A.BGTAXX | |
61 | - LEFT OUTER JOIN (SELECT ACCODE, ACNAME FROM AC01001T) D ON D.ACCODE = A.BLCARD | |
62 | - LEFT OUTER JOIN (SELECT ACCODE, ACNAME FROM AC01001T) E ON E.ACCODE = A.BGCARD | |
63 | - ORDER BY A.ACCODE | |
64 | - </select> | |
65 | - | |
66 | - | |
67 | -</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ src/main/java/com/ajin/ajinerp/master/commonCode/dao/CommonCodeDAO.java
... | ... | @@ -0,0 +1,34 @@ |
1 | +package com.ajin.ajinerp.master.commonCode.dao; | |
2 | + | |
3 | +import com.ajin.ajinerp.master.commonCode.vo.CommonCodeVO; | |
4 | +import com.ajin.ajinerp.master.commonCode.vo.EmployeeVO; | |
5 | +import com.ajin.ajinerp.user.member.vo.Member; | |
6 | +import org.apache.ibatis.annotations.Mapper; | |
7 | + | |
8 | +import java.util.List; | |
9 | + | |
10 | +/** | |
11 | + * @author 이세현 | |
12 | + * @since 2024-03-08 | |
13 | + * | |
14 | + * (회계) 공통코드 관련된 SQL문에 접근하는 DAO Class | |
15 | + */ | |
16 | +@Mapper | |
17 | +public interface CommonCodeDAO { | |
18 | + /** | |
19 | + * @author 이세현 | |
20 | + * @since 2024.03.08 | |
21 | + * | |
22 | + * 공통 코드 목록 조회 | |
23 | + */ | |
24 | + List<CommonCodeVO> commonCodeList(CommonCodeVO commonCodeVO) throws Exception; | |
25 | + | |
26 | + /** | |
27 | + * @author 이세현 | |
28 | + * @since 2024.03.08 | |
29 | + * | |
30 | + * 공통 코드 목록 조회 | |
31 | + */ | |
32 | + List<EmployeeVO> employeeList(CommonCodeVO commonCodeVO) throws Exception; | |
33 | + | |
34 | +} |
+++ src/main/java/com/ajin/ajinerp/master/commonCode/service/CommonCodeService.java
... | ... | @@ -0,0 +1,16 @@ |
1 | +package com.ajin.ajinerp.master.commonCode.service; | |
2 | + | |
3 | +import com.ajin.ajinerp.common.vo.CustomeResultMap; | |
4 | +import com.ajin.ajinerp.master.commonCode.vo.CommonCodeVO; | |
5 | + | |
6 | +import java.util.List; | |
7 | + | |
8 | +public interface CommonCodeService { | |
9 | + /** | |
10 | + * @author 이세현 | |
11 | + * @since 2024.03.13 | |
12 | + * | |
13 | + * 분류 코드 목록 조회 | |
14 | + */ | |
15 | + CustomeResultMap commonCodeList(CommonCodeVO commonCodeVO) throws Exception; | |
16 | +} |
+++ src/main/java/com/ajin/ajinerp/master/commonCode/service/impl/CommonCodeServiceImpl.java
... | ... | @@ -0,0 +1,39 @@ |
1 | +package com.ajin.ajinerp.master.commonCode.service.impl; | |
2 | + | |
3 | +import com.ajin.ajinerp.common.vo.CustomeResultMap; | |
4 | +import com.ajin.ajinerp.master.commonCode.dao.CommonCodeDAO; | |
5 | +import com.ajin.ajinerp.master.commonCode.service.CommonCodeService; | |
6 | +import com.ajin.ajinerp.master.commonCode.vo.CommonCodeVO; | |
7 | +import lombok.RequiredArgsConstructor; | |
8 | +import org.springframework.stereotype.Service; | |
9 | + | |
10 | +import java.util.List; | |
11 | + | |
12 | +/** | |
13 | + * @author 이세현 | |
14 | + * @since 2024.03.08 | |
15 | + * | |
16 | + * (회계)공통코드 관련 처리 서비스 클래스 | |
17 | + */ | |
18 | +@Service | |
19 | +@RequiredArgsConstructor | |
20 | +public class CommonCodeServiceImpl implements CommonCodeService { | |
21 | + private final CommonCodeDAO commonCodeDAO; | |
22 | + | |
23 | + /** | |
24 | + * @author 이세현 | |
25 | + * @since 2024.03.13 | |
26 | + * | |
27 | + * 분류 코드 목록 조회 | |
28 | + */ | |
29 | + @Override | |
30 | + public CustomeResultMap commonCodeList(CommonCodeVO commonCodeVO) throws Exception { | |
31 | + CustomeResultMap resultMap = new CustomeResultMap(); | |
32 | + List<CommonCodeVO> list = commonCodeDAO.commonCodeList(commonCodeVO); | |
33 | + resultMap.getResultData().put("list",list); | |
34 | + resultMap.getResultData().put("count",list.size()); | |
35 | + return resultMap; | |
36 | + } | |
37 | + | |
38 | + | |
39 | +} |
+++ src/main/java/com/ajin/ajinerp/master/commonCode/vo/CommonCodeVO.java
... | ... | @@ -0,0 +1,62 @@ |
1 | +package com.ajin.ajinerp.master.commonCode.vo; | |
2 | + | |
3 | +import lombok.Getter; | |
4 | +import lombok.Setter; | |
5 | +/** | |
6 | + * @author 이세현 | |
7 | + * @since 2024.03.13 | |
8 | + * | |
9 | + * 공통코드 정보(US02001T) | |
10 | + */ | |
11 | +@Setter @Getter | |
12 | +public class CommonCodeVO { | |
13 | + //업무구분(분류코드:98) | |
14 | + private String prjcod; | |
15 | + //코드분류 | |
16 | + private String gbncod; | |
17 | + //코드 | |
18 | + private String rcodex; | |
19 | + //코드명칭 | |
20 | + private String nmcodx; | |
21 | + //코드약칭 | |
22 | + private String shncod; | |
23 | + //정렬순서 | |
24 | + private String ordsor; | |
25 | + //관리항목1 | |
26 | + private String rref1x; | |
27 | + //관리항목2 | |
28 | + private String rref2x; | |
29 | + //관리항목3 | |
30 | + private String rref3x; | |
31 | + //관리항목4 | |
32 | + private String rref4x; | |
33 | + //관리항목5 | |
34 | + private String rref5x; | |
35 | + //관리항목6 | |
36 | + private String rref6x; | |
37 | + //관리항목7 | |
38 | + private String rref7x; | |
39 | + //관리항목8 | |
40 | + private String rref8x; | |
41 | + //관리항목9 | |
42 | + private String rref9x; | |
43 | + //관리항목10 | |
44 | + private String rref10; | |
45 | + //사용여부(Y/N) | |
46 | + private String saygub; | |
47 | + //등록자ID | |
48 | + private String idregx; | |
49 | + //등록일시 | |
50 | + private String dtmreg; | |
51 | + //등록단말명 | |
52 | + private String tmlreg; | |
53 | + //갱신자ID | |
54 | + private String iduptx; | |
55 | + //갱신일시 | |
56 | + private String dtmupt; | |
57 | + //갱신단말명 | |
58 | + private String tmlupt; | |
59 | + //참고사항 | |
60 | + private String memoxx; | |
61 | + | |
62 | +} |
+++ src/main/java/com/ajin/ajinerp/master/commonCode/vo/EmployeeVO.java
... | ... | @@ -0,0 +1,32 @@ |
1 | +package com.ajin.ajinerp.master.commonCode.vo; | |
2 | + | |
3 | +import jakarta.annotation.Nullable; | |
4 | +import lombok.Getter; | |
5 | +import lombok.Setter; | |
6 | + | |
7 | +/** | |
8 | + * @author 이세현 | |
9 | + * @since 2024.03.13 | |
10 | + * | |
11 | + * 사원 정보(HR02001T) | |
12 | + */ | |
13 | +@Getter @Setter | |
14 | +public class EmployeeVO { | |
15 | + //사원번호 | |
16 | + private String sabnho; | |
17 | + //사원명(한글) | |
18 | + private String namexx; | |
19 | + //부서 | |
20 | + private String buscod; | |
21 | + //직위 | |
22 | + private String jikcod; | |
23 | + //입사일 | |
24 | + private String empymd; | |
25 | + //퇴사일 | |
26 | + private String tojymd; | |
27 | + //부서명 | |
28 | + private String busnam; | |
29 | + //직급명 | |
30 | + private String jiknam; | |
31 | + | |
32 | +} |
+++ src/main/java/com/ajin/ajinerp/master/commonCode/web/CommonCodeController.java
... | ... | @@ -0,0 +1,33 @@ |
1 | +package com.ajin.ajinerp.master.commonCode.web; | |
2 | + | |
3 | +import com.ajin.ajinerp.common.vo.CustomeResultMap; | |
4 | +import com.ajin.ajinerp.master.commonCode.service.CommonCodeService; | |
5 | +import com.ajin.ajinerp.master.commonCode.vo.CommonCodeVO; | |
6 | +import lombok.RequiredArgsConstructor; | |
7 | +import org.springframework.web.bind.annotation.PostMapping; | |
8 | +import org.springframework.web.bind.annotation.RequestBody; | |
9 | +import org.springframework.web.bind.annotation.RestController; | |
10 | + | |
11 | +/** | |
12 | + * @author 이세현 | |
13 | + * @since 2024.03.08 | |
14 | + * | |
15 | + * (회계)공통코드 관련 처리 컨트롤러 | |
16 | + */ | |
17 | +@RestController | |
18 | +@RequiredArgsConstructor | |
19 | +public class CommonCodeController { | |
20 | + private final CommonCodeService commonCodeService; | |
21 | + | |
22 | + /** | |
23 | + * @author 이세현 | |
24 | + * @since 2024.03.13 | |
25 | + * | |
26 | + * 분류 코드 목록 조회 | |
27 | + */ | |
28 | + @PostMapping(value = "/commonCodeList.json") | |
29 | + public CustomeResultMap commonCodeList(@RequestBody CommonCodeVO commonCodeVO) throws Exception { | |
30 | + CustomeResultMap map = commonCodeService.commonCodeList(commonCodeVO); | |
31 | + return map; | |
32 | + } | |
33 | +} |
--- src/main/java/com/ajin/ajinerp/user/member/vo/LoginLogVO.java
+++ src/main/java/com/ajin/ajinerp/user/member/vo/LoginLogVO.java
... | ... | @@ -7,7 +7,7 @@ |
7 | 7 |
* @author 이세현 |
8 | 8 |
* @since 2024.03.08 |
9 | 9 |
* |
10 |
- * 로그인 로그 VO |
|
10 |
+ * 로그인 로그 VO(US01003T) |
|
11 | 11 |
*/ |
12 | 12 |
@Getter @Setter |
13 | 13 |
public class LoginLogVO { |
--- src/main/java/com/ajin/ajinerp/user/member/vo/Member.java
+++ src/main/java/com/ajin/ajinerp/user/member/vo/Member.java
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 |
* @author 이세현 |
9 | 9 |
* @since 2024.03.08 |
10 | 10 |
* |
11 |
- * 회원정보 VO |
|
11 |
+ * 회원정보(US01001T) |
|
12 | 12 |
*/ |
13 | 13 |
|
14 | 14 |
@Getter @Setter |
+++ src/main/resources/spring/mapper/account/commonCode-SQL.xml
... | ... | @@ -0,0 +1,139 @@ |
1 | +<?xml version="1.0" encoding="UTF-8" ?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | + | |
4 | +<mapper namespace="com.ajin.ajinerp.master.commonCode.dao.CommonCodeDAO"> | |
5 | + <!-- 공통코드 --> | |
6 | + <resultMap id="commonCodeVO" type="CommonCodeVO"> | |
7 | + <result property="prjcod" column="PRJCOD" /> | |
8 | + <result property="gbncod" column="GBNCOD" /> | |
9 | + <result property="rcodex" column="RCODEX" /> | |
10 | + <result property="nmcodx" column="NMCODX" /> | |
11 | + <result property="shncod" column="SHNCOD" /> | |
12 | + <result property="ordsor" column="ORDSOR" /> | |
13 | + <result property="rref1x" column="RREF1X" /> | |
14 | + <result property="rref2x" column="RREF2X" /> | |
15 | + <result property="rref3x" column="RREF3X" /> | |
16 | + <result property="rref4x" column="RREF4X" /> | |
17 | + <result property="rref5x" column="RREF5X" /> | |
18 | + <result property="rref6x" column="RREF6X" /> | |
19 | + <result property="rref7x" column="RREF7X" /> | |
20 | + <result property="rref8x" column="RREF8X" /> | |
21 | + <result property="rref9x" column="RREF9X" /> | |
22 | + <result property="rref10" column="RREF10" /> | |
23 | + <result property="saygub" column="SAYGUB" /> | |
24 | + <result property="idregx" column="IDREGX" /> | |
25 | + <result property="dtmreg" column="DTMREG" /> | |
26 | + <result property="tmlreg" column="TMLREG" /> | |
27 | + <result property="iduptx" column="IDUPTX" /> | |
28 | + <result property="dtmupt" column="DTMUPT" /> | |
29 | + <result property="tmlupt" column="TMLUPT" /> | |
30 | + <result property="memoxx" column="MEMOXX" /> | |
31 | + </resultMap> | |
32 | + | |
33 | + <!-- 사원정보 --> | |
34 | + <resultMap id="employeeVO" type="EmployeeVO"> | |
35 | + <result property="sabnho" column="SABNHO" /> | |
36 | + <result property="namexx" column="NAMEXX" /> | |
37 | + <result property="buscod" column="BUSCOD" /> | |
38 | + <result property="jikcod" column="JIKCOD" /> | |
39 | + <result property="empymd" column="EMPYMD" /> | |
40 | + <result property="tojymd" column="TOJYMD" /> | |
41 | + <result property="busnam" column="BUSNAM" /> | |
42 | + <result property="jiknam" column="JIKNAM" /> | |
43 | + </resultMap> | |
44 | + | |
45 | + <!-- <!– 1. 분류목록 조회 –>--> | |
46 | + <!-- <select id="commonCodeList" resultMap="commonCodeVO">--> | |
47 | + <!-- <![CDATA[--> | |
48 | + <!-- SELECT RCODEX, NMCODX--> | |
49 | + <!-- FROM US02001T--> | |
50 | + <!-- WHERE PRJCOD = #{PRJCOD}--> | |
51 | + <!-- AND GBNCOD = '000'--> | |
52 | + <!-- AND RCODEX <> '000' ORDER BY RCODEX--> | |
53 | + <!-- ]]>--> | |
54 | + <!-- </select>--> | |
55 | + <!-- <!– 3. 분류코드의 하위 코드목록 조회 –>--> | |
56 | + <!-- <select id="codeListByCommonCode" resultMap="commonCodeVO">--> | |
57 | + <!-- SELECT *--> | |
58 | + <!-- FROM US02001T--> | |
59 | + <!-- WHERE PRJCOD = #{PRJCOD}--> | |
60 | + <!-- AND GBNCOD = #{RCODEX}--> | |
61 | + <!-- ORDER BY RCODEX--> | |
62 | + <!-- </select>--> | |
63 | + | |
64 | + <!-- <!– 6. 사업장목록 조회 –>--> | |
65 | + <!-- <select id="workplaceList" resultMap="commonCodeVO">--> | |
66 | + <!-- SELECT *--> | |
67 | + <!-- FROM US02001T--> | |
68 | + <!-- WHERE PRJCOD = 'AC'--> | |
69 | + <!-- AND GBNCOD = '004'--> | |
70 | + <!-- ORDER BY RCODEX--> | |
71 | + <!-- </select>--> | |
72 | + | |
73 | + <!-- 1.3.6. 을 합친 (회계) 공통코드 목록 조회--> | |
74 | + <select id="commonCodeList" parameterType="CommonCodeVO" resultMap="commonCodeVO"> | |
75 | + SELECT * | |
76 | + FROM US02001T | |
77 | + WHERE 1=1 | |
78 | + <if test="prjcod != null"> | |
79 | + AND PRJCOD = #{prjcod} | |
80 | + </if> | |
81 | + <if test="gbncod != null"> | |
82 | + AND GBNCOD = #{gbncod} | |
83 | + </if> | |
84 | + <if test="rcodex != null"> | |
85 | + AND GBNCOD = #{rcodex} | |
86 | + </if> | |
87 | + <if test="gbncod == '000'"> | |
88 | + AND RCODEX <> '000' | |
89 | + </if> | |
90 | + ORDER BY RCODEX | |
91 | + </select> | |
92 | + <!-- 7. 사원목록 조회 --> | |
93 | + <select id="employeeList" parameterType="CommonCodeVO" resultMap="employeeVO"> | |
94 | + SELECT | |
95 | + A.*, | |
96 | + B.NMCODX AS BUSNAM, | |
97 | + C.NMCODX AS JIKNAM | |
98 | + FROM ( | |
99 | + SELECT | |
100 | + A.SABNHO, | |
101 | + A.NAMEXX, | |
102 | + A.BUSCOD, | |
103 | + A.JIKCOD, | |
104 | + CASE | |
105 | + WHEN A.EMPYMD IS NULL THEN '00000000' | |
106 | + ELSE A.EMPYMD | |
107 | + END AS EMPYMD, | |
108 | + CASE | |
109 | + WHEN A.TOJYMD IS NULL THEN '99999999' | |
110 | + ELSE A.TOJYMD | |
111 | + END AS TOJYMD | |
112 | + FROM HR02001T A | |
113 | + WHERE A.COMPCD = #{compcd} | |
114 | + ) A | |
115 | + LEFT OUTER JOIN ( | |
116 | + SELECT | |
117 | + NMCODX, | |
118 | + RCODEX | |
119 | + FROM US02001T | |
120 | + WHERE PRJCOD = 'HR' | |
121 | + AND GBNCOD = '001' | |
122 | + ) B ON B.RCODEX = A.BUSCOD | |
123 | + LEFT OUTER JOIN ( | |
124 | + SELECT | |
125 | + NMCODX, | |
126 | + RCODEX | |
127 | + FROM US02001T | |
128 | + WHERE PRJCOD = 'HR' | |
129 | + AND GBNCOD = '002' | |
130 | + ) C ON C.RCODEX = A.JIKCOD | |
131 | + WHERE #{datymd} BETWEEN A.EMPYMD AND A.TOJYMD | |
132 | + AND (A.SABNHO || A.NAMEXX) LIKE #{namexx} | |
133 | + ORDER BY A.SABNHO | |
134 | + </select> | |
135 | + <!-- 2. 분류목록(COUNT) 조회 --> | |
136 | + <!-- 4. 코드목록(COUNT) 조회 --> | |
137 | + <!-- 5. 코드목록 별 카테고리명 조회 --> | |
138 | + <!-- 8. 코드 등록, 수정 --> | |
139 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
--- src/main/resources/spring/mapper/mybatis-config.xml
+++ src/main/resources/spring/mapper/mybatis-config.xml
... | ... | @@ -20,7 +20,10 @@ |
20 | 20 |
<typeAlias type="com.ajin.ajinerp.user.member.vo.LoginLogVO" alias="LoginLogVO"/> |
21 | 21 |
<!-- 계정 과목 객체 --> |
22 | 22 |
<typeAlias type="com.ajin.ajinerp.master.account.vo.AccountVO" alias="AccountVO"/> |
23 |
- |
|
23 |
+ <!-- (회계) 공통코드 객체 --> |
|
24 |
+ <typeAlias type="com.ajin.ajinerp.master.commonCode.vo.CommonCodeVO" alias="CommonCodeVO"/> |
|
25 |
+ <!-- 사원정보 객체 --> |
|
26 |
+ <typeAlias type="com.ajin.ajinerp.master.commonCode.vo.EmployeeVO" alias="EmployeeVO"/> |
|
24 | 27 |
</typeAliases> |
25 | 28 |
|
26 | 29 |
</configuration>(파일 끝에 줄바꿈 문자 없음) |
--- src/main/resources/spring/mapper/user/login-SQL.xml
+++ src/main/resources/spring/mapper/user/login-SQL.xml
... | ... | @@ -27,7 +27,7 @@ |
27 | 27 |
IPADDR, |
28 | 28 |
TMLREG, |
29 | 29 |
SYSDAT, |
30 |
- SYSTIM) |
|
30 |
+ SYSTIM ) |
|
31 | 31 |
VALUES |
32 | 32 |
(#{userid}, |
33 | 33 |
#{usernm}, |
... | ... | @@ -35,7 +35,7 @@ |
35 | 35 |
#{errxxx}, |
36 | 36 |
#{ipaddr}, |
37 | 37 |
#{tmlreg}, |
38 |
- TO_CHAR(SYSDATE, 'YYYYMMDD'), -- 현재 날짜를 YYYYMMDD 포맷으로 변환 |
|
39 |
- TO_CHAR(SYSDATE, 'HH24MISS')) -- 현재 시간을 HH24MISS 포맷으로 변환 |
|
38 |
+ TO_CHAR(SYSDATE, 'YYYYMMDD'), -- 현재 날짜를 YYYYMMDD 포맷으로 변환 |
|
39 |
+ TO_CHAR(SYSDATE, 'HH24MISS')) -- 현재 시간을 HH24MISS 포맷으로 변환 |
|
40 | 40 |
</insert> |
41 | 41 |
</mapper>(파일 끝에 줄바꿈 문자 없음) |
--- src/main/resources/spring/mapper/user/member-SQL.xml
+++ src/main/resources/spring/mapper/user/member-SQL.xml
... | ... | @@ -24,49 +24,52 @@ |
24 | 24 |
|
25 | 25 |
<!-- 1.아이디로 이름 조회--> |
26 | 26 |
<select id="getNameById" parameterType="String" resultMap="memberResult"> |
27 |
- SELECT NVL(USERID, '') AS USERID |
|
28 |
- , NVL(USERNM, '') AS USERNM |
|
29 |
- FROM US01001T |
|
30 |
- WHERE USERID = #{userid} |
|
31 |
- AND SAYGUB = 'Y' |
|
27 |
+ SELECT NVL(USERID, '') AS USERID |
|
28 |
+ , NVL(USERNM, '') AS USERNM |
|
29 |
+ FROM US01001T |
|
30 |
+ WHERE USERID = #{userid} |
|
31 |
+ AND SAYGUB = 'Y' |
|
32 | 32 |
</select> |
33 | 33 |
|
34 | 34 |
<!-- 2. 아이디로 회원 조회 COUNT--> |
35 | 35 |
<select id="getCountById" parameterType="String" resultType="int"> |
36 | 36 |
SELECT COUNT(*) |
37 |
- FROM US01001T |
|
38 |
- WHERE USERID = #{userid} |
|
39 |
- AND SAYGUB = 'Y' |
|
37 |
+ FROM US01001T |
|
38 |
+ WHERE USERID = #{userid} |
|
39 |
+ AND SAYGUB = 'Y' |
|
40 | 40 |
</select> |
41 | 41 |
|
42 | 42 |
<!-- 2.아이디로 이미지 조회 --> |
43 | 43 |
<select id="getImageById" parameterType="String" resultMap="memberResult"> |
44 | 44 |
SELECT IMAGEX |
45 |
- FROM US01003T |
|
46 |
- WHERE USERID = #{userid} |
|
45 |
+ FROM US01003T |
|
46 |
+ WHERE USERID = #{userid} |
|
47 | 47 |
</select> |
48 | 48 |
|
49 | 49 |
<!-- 3.사용자 이미지 변경--> |
50 | 50 |
<update id="updateUserImage" parameterType="String"> |
51 | 51 |
UPDATE US01003T |
52 |
- SET IMAGEX = #{imagex} |
|
53 |
- WHERE USERID = #{userid} |
|
52 |
+ SET IMAGEX = #{imagex} |
|
53 |
+ WHERE USERID = #{userid} |
|
54 | 54 |
</update> |
55 | 55 |
|
56 | 56 |
<!-- 4.사용자 마지막 비밀번호 변경 날짜 조회 --> |
57 | 57 |
<select id="checkPasswordExpiry" parameterType="String" resultType="int"> |
58 |
- SELECT COUNT(*) FROM US01001T WHERE USERID = #{userid} AND MONTHS_BETWEEN(SYSDATE, TO_DATE(PW_YMD, 'YYYYMMDD')) >= 2 |
|
58 |
+ SELECT COUNT(*) |
|
59 |
+ FROM US01001T |
|
60 |
+ WHERE USERID = #{userid} |
|
61 |
+ AND MONTHS_BETWEEN(SYSDATE, TO_DATE(PW_YMD, 'YYYYMMDD')) >= 2 |
|
59 | 62 |
</select> |
60 | 63 |
|
61 | 64 |
<!-- 5.사용자 비밀번호 변경 --> |
62 | 65 |
<update id="updatePassword" parameterType="Member"> |
63 | 66 |
UPDATE US01001T |
64 |
- SET OLDWRD = #{oldwrd} |
|
65 |
- , NEWWRD = #{newwrd} |
|
66 |
- , IDUPTX = #{userid} |
|
67 |
- , DTMUPT = SYSDATE |
|
68 |
- , TMLUPT = #{tmlupt} |
|
69 |
- WHERE USERID = #{userid} |
|
67 |
+ SET OLDWRD = #{oldwrd} |
|
68 |
+ , NEWWRD = #{newwrd} |
|
69 |
+ , IDUPTX = #{userid} |
|
70 |
+ , DTMUPT = SYSDATE |
|
71 |
+ , TMLUPT = #{tmlupt} |
|
72 |
+ WHERE USERID = #{userid} |
|
70 | 73 |
</update> |
71 | 74 |
|
72 | 75 |
<!-- 6.아이디 비밀번호로 회원 조회 --> |
... | ... | @@ -80,18 +83,18 @@ |
80 | 83 |
, NVL(COMPCD, '') AS COMPCD |
81 | 84 |
, NVL(KANGUB, '') AS KANGUB |
82 | 85 |
, NVL(SAYGUB, '') AS SAYGUB |
83 |
- FROM US01001T |
|
84 |
- WHERE USERID = #{userid} |
|
85 |
- AND NEWWRD = #{newwrd} |
|
86 |
- AND SAYGUB = 'Y' |
|
86 |
+ FROM US01001T |
|
87 |
+ WHERE USERID = #{userid} |
|
88 |
+ AND NEWWRD = #{newwrd} |
|
89 |
+ AND SAYGUB = 'Y' |
|
87 | 90 |
</select> |
88 | 91 |
|
89 | 92 |
<!-- 7.아이디 비밀번호로 회원 조회 COUNT --> |
90 | 93 |
<select id="getMemberCount" parameterType="Member" resultType="int"> |
91 | 94 |
SELECT COUNT(*) |
92 |
- FROM US01001T |
|
93 |
- WHERE USERID = #{userid} |
|
94 |
- AND NEWWRD = #{newwrd} |
|
95 |
- AND SAYGUB = 'Y' |
|
95 |
+ FROM US01001T |
|
96 |
+ WHERE USERID = #{userid} |
|
97 |
+ AND NEWWRD = #{newwrd} |
|
98 |
+ AND SAYGUB = 'Y' |
|
96 | 99 |
</select> |
97 | 100 |
</mapper>(파일 끝에 줄바꿈 문자 없음) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?