From 9e5ba3f1f60d0e3349e37902ceadb843b0f5036f Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Wed, 13 Dec 2023 16:08:03 +0900 Subject: [PATCH] =?UTF-8?q?IFNULL=20->=20NVL,=20=EC=B6=94=EA=B0=80:=20now,?= =?UTF-8?q?=20today=20=EC=98=A4=EB=9D=BC=ED=81=B4=20=EB=B2=84=EC=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/sql/mapper/base/utility.xml | 19 +++++++++++++------ .../mapper/lntris/lntris-B01_03-mapper.xml | 12 ++++++------ .../mapper/lntris/lntris-B04_06-mapper.xml | 12 ++++++------ .../mapper/lntris/lntris-B07_09-mapper.xml | 12 ++++++------ .../mapper/lntris/lntris-B10_12-mapper.xml | 12 ++++++------ .../mapper/lntris/lntris-B13_16-mapper.xml | 15 ++++++++------- 6 files changed, 45 insertions(+), 37 deletions(-) diff --git a/src/main/resources/sql/mapper/base/utility.xml b/src/main/resources/sql/mapper/base/utility.xml index 5187fae..c927282 100644 --- a/src/main/resources/sql/mapper/base/utility.xml +++ b/src/main/resources/sql/mapper/base/utility.xml @@ -20,16 +20,23 @@ SELECT FOUND_ROWS() TOT_CNT -DATE_FORMAT(CURRENT_TIMESTAMP(), '%Y%m%d%H%i%s') - -SELECTNOW + +DATE_FORMAT(CURRENT_TIMESTAMP, '%Y%m%d%H%i%s') DATE_FORMAT(CURRENT_DATE, '%Y%m%d') -SELECTTODAY + + +SELECTNOW FROM DUAL + +SELECTTODAY FROM DUAL -IFNULL(#{thisDay},) +NVL(#{thisDay},) -SELECTTHIS_DAY +SELECTTHIS_DAY FROM DUAL \ No newline at end of file diff --git a/src/main/resources/sql/mapper/lntris/lntris-B01_03-mapper.xml b/src/main/resources/sql/mapper/lntris/lntris-B01_03-mapper.xml index efe9ea9..6cfb74a 100644 --- a/src/main/resources/sql/mapper/lntris/lntris-B01_03-mapper.xml +++ b/src/main/resources/sql/mapper/lntris/lntris-B01_03-mapper.xml @@ -66,7 +66,7 @@ /* 체납상세세목정보_요청 등록(lntrisB01_03Mapper.insertB01Req) */ -SELECT CONCAT(TODAY, LPAD(IFNULL(SUBSTR(MAX(B01_ID), 9) + 1, 1), 22, '0')) NEW_ID +SELECT CONCAT(TODAY, LPAD(NVL(SUBSTR(MAX(B01_ID), 9) + 1, 1), 22, '0')) NEW_ID FROM TB_NIS_SPCL_B01 A, () B WHERE B01_ID LIKE CONCAT(TODAY, '%') INSERT INTO TB_NIS_SPCL_B01 ( @@ -551,7 +551,7 @@ SELECT #{resp.b01Id} , #{currentUser.id} , , #{currentUser.id} - + FROM DUAL @@ -595,7 +595,7 @@ SELECT #{resp.b01Id} /* 수납 상세정보_요청 등록(lntrisB01_03Mapper.insertB02Req) */ -SELECT CONCAT(TODAY, LPAD(IFNULL(SUBSTR(MAX(B02_ID), 9) + 1, 1), 22, '0')) NEW_ID +SELECT CONCAT(TODAY, LPAD(NVL(SUBSTR(MAX(B02_ID), 9) + 1, 1), 22, '0')) NEW_ID FROM TB_NIS_SPCL_B02 A, () B WHERE B02_ID LIKE CONCAT(TODAY, '%') INSERT INTO TB_NIS_SPCL_B02 ( @@ -979,7 +979,7 @@ SELECT #{resp.b02Id} , #{currentUser.id} , , #{currentUser.id} - + FROM DUAL @@ -1023,7 +1023,7 @@ SELECT #{resp.b02Id} /* 결손 상세세목정보_요청 등록(lntrisB01_03Mapper.insertB03Req) */ -SELECT CONCAT(TODAY, LPAD(IFNULL(SUBSTR(MAX(B03_ID), 9) + 1, 1), 22, '0')) NEW_ID +SELECT CONCAT(TODAY, LPAD(NVL(SUBSTR(MAX(B03_ID), 9) + 1, 1), 22, '0')) NEW_ID FROM TB_NIS_SPCL_B03 A, () B WHERE B03_ID LIKE CONCAT(TODAY, '%') INSERT INTO TB_NIS_SPCL_B03 ( @@ -1211,6 +1211,6 @@ SELECT #{resp.b03Id} , #{currentUser.id} , , #{currentUser.id} - + FROM DUAL \ No newline at end of file diff --git a/src/main/resources/sql/mapper/lntris/lntris-B04_06-mapper.xml b/src/main/resources/sql/mapper/lntris/lntris-B04_06-mapper.xml index 8d5d021..06de56f 100644 --- a/src/main/resources/sql/mapper/lntris/lntris-B04_06-mapper.xml +++ b/src/main/resources/sql/mapper/lntris/lntris-B04_06-mapper.xml @@ -53,7 +53,7 @@ /* 체납자독려정보_요청 등록(lntrisB04_06Mapper.insertB04Req) */ -SELECT CONCAT(TODAY, LPAD(IFNULL(SUBSTR(MAX(B04_ID), 9) + 1, 1), 22, '0')) NEW_ID +SELECT CONCAT(TODAY, LPAD(NVL(SUBSTR(MAX(B04_ID), 9) + 1, 1), 22, '0')) NEW_ID FROM TB_NIS_SPCL_B04 A, () B WHERE B04_ID LIKE CONCAT(TODAY, '%') INSERT INTO TB_NIS_SPCL_B04 ( @@ -209,7 +209,7 @@ SELECT #{resp.b04Id} , #{currentUser.id} , , #{currentUser.id} - + FROM DUAL @@ -237,7 +237,7 @@ SELECT #{resp.b04Id} /* 압류정보_요청 등록(lntrisB04_06Mapper.insertB05Req) */ -SELECT CONCAT(TODAY, LPAD(IFNULL(SUBSTR(MAX(B05_ID), 9) + 1, 1), 22, '0')) NEW_ID +SELECT CONCAT(TODAY, LPAD(NVL(SUBSTR(MAX(B05_ID), 9) + 1, 1), 22, '0')) NEW_ID FROM TB_NIS_SPCL_B05 A, () B WHERE B05_ID LIKE CONCAT(TODAY, '%') INSERT INTO TB_NIS_SPCL_B05 ( @@ -437,7 +437,7 @@ SELECT #{resp.b05Id} , #{currentUser.id} , , #{currentUser.id} - + FROM DUAL @@ -465,7 +465,7 @@ SELECT #{resp.b05Id} /* 압류시점 체납정보_요청 등록(lntrisB04_06Mapper.insertB06Req) */ -SELECT CONCAT(TODAY, LPAD(IFNULL(SUBSTR(MAX(B06_ID), 9) + 1, 1), 22, '0')) NEW_ID +SELECT CONCAT(TODAY, LPAD(NVL(SUBSTR(MAX(B06_ID), 9) + 1, 1), 22, '0')) NEW_ID FROM TB_NIS_SPCL_B06 A, () B WHERE B06_ID LIKE CONCAT(TODAY, '%') INSERT INTO TB_NIS_SPCL_B06 ( @@ -585,6 +585,6 @@ SELECT #{resp.b06Id} , #{currentUser.id} , , #{currentUser.id} - + FROM DUAL \ No newline at end of file diff --git a/src/main/resources/sql/mapper/lntris/lntris-B07_09-mapper.xml b/src/main/resources/sql/mapper/lntris/lntris-B07_09-mapper.xml index 9843ecc..27acc69 100644 --- a/src/main/resources/sql/mapper/lntris/lntris-B07_09-mapper.xml +++ b/src/main/resources/sql/mapper/lntris/lntris-B07_09-mapper.xml @@ -49,7 +49,7 @@ /* 과오납 상세정보 요청 등록(lntrisB07_09Mapper.insertB07Req) */ -SELECT CONCAT(TODAY, LPAD(IFNULL(SUBSTR(MAX(B07_ID), 9) + 1, 1), 22, '0')) NEW_ID +SELECT CONCAT(TODAY, LPAD(NVL(SUBSTR(MAX(B07_ID), 9) + 1, 1), 22, '0')) NEW_ID FROM TB_NIS_SPCL_B07 A, () B WHERE B07_ID LIKE CONCAT(TODAY, '%') INSERT INTO TB_NIS_SPCL_B07 ( @@ -245,7 +245,7 @@ SELECT #{resp.b07Id} , #{currentUser.id} , , #{currentUser.id} - + FROM DUAL @@ -273,7 +273,7 @@ SELECT #{resp.b07Id} /* 영치정보 요청 등록(lntrisB07_09Mapper.insertB08Req) */ -SELECT CONCAT(TODAY, LPAD(IFNULL(SUBSTR(MAX(B08_ID), 9) + 1, 1), 22, '0')) NEW_ID +SELECT CONCAT(TODAY, LPAD(NVL(SUBSTR(MAX(B08_ID), 9) + 1, 1), 22, '0')) NEW_ID FROM TB_NIS_SPCL_B08 A, () B WHERE B08_ID LIKE CONCAT(TODAY, '%') INSERT INTO TB_NIS_SPCL_B08 ( @@ -419,7 +419,7 @@ SELECT #{resp.b08Id} , #{currentUser.id} , , #{currentUser.id} - + FROM DUAL @@ -463,7 +463,7 @@ SELECT #{resp.b08Id} /* 고지발송정보 요청 등록(lntrisB07_09Mapper.insertB09Req) */ -SELECT CONCAT(TODAY, LPAD(IFNULL(SUBSTR(MAX(B09_ID), 9) + 1, 1), 22, '0')) NEW_ID +SELECT CONCAT(TODAY, LPAD(NVL(SUBSTR(MAX(B09_ID), 9) + 1, 1), 22, '0')) NEW_ID FROM TB_NIS_SPCL_B09 A, () B WHERE B09_ID LIKE CONCAT(TODAY, '%') INSERT INTO TB_NIS_SPCL_B09 ( @@ -603,6 +603,6 @@ SELECT #{resp.b09Id} , #{currentUser.id} , , #{currentUser.id} - + FROM DUAL \ No newline at end of file diff --git a/src/main/resources/sql/mapper/lntris/lntris-B10_12-mapper.xml b/src/main/resources/sql/mapper/lntris/lntris-B10_12-mapper.xml index 7666d58..1dbb20c 100644 --- a/src/main/resources/sql/mapper/lntris/lntris-B10_12-mapper.xml +++ b/src/main/resources/sql/mapper/lntris/lntris-B10_12-mapper.xml @@ -49,7 +49,7 @@ /* 우편발송결과정보 요청 등록(lntrisB10_12Mapper.insertB10Req) */ -SELECT CONCAT(TODAY, LPAD(IFNULL(SUBSTR(MAX(B10_ID), 9) + 1, 1), 22, '0')) NEW_ID +SELECT CONCAT(TODAY, LPAD(NVL(SUBSTR(MAX(B10_ID), 9) + 1, 1), 22, '0')) NEW_ID FROM TB_NIS_SPCL_B10 A, () B WHERE B10_ID LIKE CONCAT(TODAY, '%') INSERT INTO TB_NIS_SPCL_B10 ( @@ -257,7 +257,7 @@ SELECT #{resp.b10Id} , #{currentUser.id} , , #{currentUser.id} - + FROM DUAL @@ -291,7 +291,7 @@ SELECT #{resp.b10Id} /* 과태료대장 목록 요청 등록(lntrisB10_12Mapper.insertB11Req) */ -SELECT CONCAT(TODAY, LPAD(IFNULL(SUBSTR(MAX(B11_ID), 9) + 1, 1), 22, '0')) NEW_ID +SELECT CONCAT(TODAY, LPAD(NVL(SUBSTR(MAX(B11_ID), 9) + 1, 1), 22, '0')) NEW_ID FROM TB_NIS_SPCL_B11 A, () B WHERE B11_ID LIKE CONCAT(TODAY, '%') INSERT INTO TB_NIS_SPCL_B11 ( @@ -517,7 +517,7 @@ SELECT #{resp.b11Id} , #{currentUser.id} , , #{currentUser.id} - + FROM DUAL @@ -545,7 +545,7 @@ SELECT #{resp.b11Id} /* 과태료대장 상세 요청 등록(lntrisB10_12Mapper.insertB12Req) */ -SELECT CONCAT(TODAY, LPAD(IFNULL(SUBSTR(MAX(B12_ID), 9) + 1, 1), 22, '0')) NEW_ID +SELECT CONCAT(TODAY, LPAD(NVL(SUBSTR(MAX(B12_ID), 9) + 1, 1), 22, '0')) NEW_ID FROM TB_NIS_SPCL_B12 A, () B WHERE B12_ID LIKE CONCAT(TODAY, '%') INSERT INTO TB_NIS_SPCL_B12 ( @@ -1001,6 +1001,6 @@ SELECT #{resp.b12Id} , #{currentUser.id} , , #{currentUser.id} - + FROM DUAL \ No newline at end of file diff --git a/src/main/resources/sql/mapper/lntris/lntris-B13_16-mapper.xml b/src/main/resources/sql/mapper/lntris/lntris-B13_16-mapper.xml index 20f29e5..8532376 100644 --- a/src/main/resources/sql/mapper/lntris/lntris-B13_16-mapper.xml +++ b/src/main/resources/sql/mapper/lntris/lntris-B13_16-mapper.xml @@ -37,7 +37,7 @@ /* 주정차위반 과태료 대장 목록 요청 등록(lntrisB13_16Mapper.insertB13Req) */ -SELECT CONCAT(TODAY, LPAD(IFNULL(SUBSTR(MAX(B13_ID), 9) + 1, 1), 22, '0')) NEW_ID +SELECT CONCAT(TODAY, LPAD(NVL(SUBSTR(MAX(B13_ID), 9) + 1, 1), 22, '0')) NEW_ID FROM TB_NIS_SPCL_B13 A, () B WHERE B13_ID LIKE CONCAT(TODAY, '%') INSERT INTO TB_NIS_SPCL_B13 ( @@ -268,7 +268,7 @@ SELECT #{resp.b13Id} , #{currentUser.id} , , #{currentUser.id} - + FROM DUAL @@ -294,7 +294,7 @@ SELECT #{resp.b13Id} /* 주정차위반 과태료 대장 상세 요청 등록(lntrisB13_16Mapper.insertB14Req) */ -SELECT CONCAT(TODAY, LPAD(IFNULL(SUBSTR(MAX(B14_ID), 9) + 1, 1), 22, '0')) NEW_ID +SELECT CONCAT(TODAY, LPAD(NVL(SUBSTR(MAX(B14_ID), 9) + 1, 1), 22, '0')) NEW_ID FROM TB_NIS_SPCL_B14 A, () B WHERE B14_ID LIKE CONCAT(TODAY, '%') INSERT INTO TB_NIS_SPCL_B14 ( @@ -804,7 +804,7 @@ INSERT INTO TB_NIS_SPCL_B14RV ( /* 전용차로위반 과태료 대장 목록 요청 등록(lntrisB13_16Mapper.insertB15Req) */ -SELECT CONCAT(TODAY, LPAD(IFNULL(SUBSTR(MAX(B15_ID), 9) + 1, 1), 22, '0')) NEW_ID +SELECT CONCAT(TODAY, LPAD(NVL(SUBSTR(MAX(B15_ID), 9) + 1, 1), 22, '0')) NEW_ID FROM TB_NIS_SPCL_B15 A, () B WHERE B15_ID LIKE CONCAT(TODAY, '%') INSERT INTO TB_NIS_SPCL_B15 ( @@ -1030,7 +1030,8 @@ SELECT #{resp.b15Id} , #{currentUser.id} , , #{currentUser.id} - + FROM DUAL + @@ -1055,7 +1056,7 @@ SELECT #{resp.b15Id} /* 전용차로위반 과태료 대장 상세 요청 등록(lntrisB13_16Mapper.insertB16Req) */ -SELECT CONCAT(TODAY, LPAD(IFNULL(SUBSTR(MAX(B16_ID), 9) + 1, 1), 22, '0')) NEW_ID +SELECT CONCAT(TODAY, LPAD(NVL(SUBSTR(MAX(B16_ID), 9) + 1, 1), 22, '0')) NEW_ID FROM TB_NIS_SPCL_B16 A, () B WHERE B16_ID LIKE CONCAT(TODAY, '%') INSERT INTO TB_NIS_SPCL_B16 ( @@ -1519,6 +1520,6 @@ SELECT #{resp.b16Id} , #{currentUser.id} , , #{currentUser.id} - + FROM DUAL \ No newline at end of file