등급제 대량등록 수정
This commit is contained in:
parent
7454e342be
commit
f3f51805d0
@ -46,6 +46,9 @@ public interface MberGrdService {
|
|||||||
// 회원별 등급 등록 All => 기존대상자 제외
|
// 회원별 등급 등록 All => 기존대상자 제외
|
||||||
public void insertMberGrdAllByExist(MberGrdVO mberGrdVO) throws Exception;
|
public void insertMberGrdAllByExist(MberGrdVO mberGrdVO) throws Exception;
|
||||||
|
|
||||||
|
// 회원별 등급 히스토리 등록 All
|
||||||
|
public void insertMberGrdHistAll(MberGrdVO mberGrdVO) throws Exception;
|
||||||
|
|
||||||
// 회원별 등급 일괄변경
|
// 회원별 등급 일괄변경
|
||||||
public int updateMberGrdAll(MberGrdVO mberGrdVO) throws Exception;
|
public int updateMberGrdAll(MberGrdVO mberGrdVO) throws Exception;
|
||||||
|
|
||||||
|
|||||||
@ -73,6 +73,11 @@ public class MberGrdDAO extends EgovAbstractDAO {
|
|||||||
insert("mberGrdDAO.insertMberGrdAllByExist", mberGrdVO);
|
insert("mberGrdDAO.insertMberGrdAllByExist", mberGrdVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 회원별 등급 히스토리 등록 All
|
||||||
|
public void insertMberGrdHistAll(MberGrdVO mberGrdVO) throws Exception{
|
||||||
|
insert("mberGrdDAO.insertMberGrdHistAll", mberGrdVO);
|
||||||
|
}
|
||||||
|
|
||||||
// 회원별 등급 일괄변경
|
// 회원별 등급 일괄변경
|
||||||
public int updateMberGrdAll(MberGrdVO mberGrdVO) throws Exception {
|
public int updateMberGrdAll(MberGrdVO mberGrdVO) throws Exception {
|
||||||
return update("mberGrdDAO.updateMberGrdAll", mberGrdVO);
|
return update("mberGrdDAO.updateMberGrdAll", mberGrdVO);
|
||||||
|
|||||||
@ -152,6 +152,12 @@ public class MberGrdServiceImpl extends EgovAbstractServiceImpl implements MberG
|
|||||||
mberGrdDAO.insertMberGrdAllByExist(mberGrdVO);
|
mberGrdDAO.insertMberGrdAllByExist(mberGrdVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 회원별 등급 히스토리 등록 All
|
||||||
|
@Override
|
||||||
|
public void insertMberGrdHistAll(MberGrdVO mberGrdVO) throws Exception {
|
||||||
|
mberGrdDAO.insertMberGrdHistAll(mberGrdVO);
|
||||||
|
}
|
||||||
|
|
||||||
// 회원별 등급 일괄변경
|
// 회원별 등급 일괄변경
|
||||||
@Override
|
@Override
|
||||||
public int updateMberGrdAll(MberGrdVO mberGrdVO) throws Exception {
|
public int updateMberGrdAll(MberGrdVO mberGrdVO) throws Exception {
|
||||||
@ -181,6 +187,8 @@ public class MberGrdServiceImpl extends EgovAbstractServiceImpl implements MberG
|
|||||||
// Step5. 등급제 정상대상자 초기화(화이트등급)
|
// Step5. 등급제 정상대상자 초기화(화이트등급)
|
||||||
updateCnt3 = updateMberGrdWhiteByTemp(mberGrdVO);
|
updateCnt3 = updateMberGrdWhiteByTemp(mberGrdVO);
|
||||||
|
|
||||||
|
// Step6. 회원별 등급 히스토리 등록
|
||||||
|
insertMberGrdHistAll(mberGrdVO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -371,7 +371,7 @@
|
|||||||
, #picture3Price#
|
, #picture3Price#
|
||||||
, #amt#
|
, #amt#
|
||||||
, #totAmt#
|
, #totAmt#
|
||||||
, #grdDate#
|
, #grdNewDate#
|
||||||
, #grdStartDate#
|
, #grdStartDate#
|
||||||
, #grdEndDate#
|
, #grdEndDate#
|
||||||
, #grdStatus#
|
, #grdStatus#
|
||||||
@ -394,6 +394,7 @@
|
|||||||
, PICTURE3_PRICE = #picture3Price#
|
, PICTURE3_PRICE = #picture3Price#
|
||||||
, AMT = #amt#
|
, AMT = #amt#
|
||||||
, TOT_AMT = #totAmt#
|
, TOT_AMT = #totAmt#
|
||||||
|
, GRD_DATE = #grdNewDate#
|
||||||
, EDIT_ID = #editId#
|
, EDIT_ID = #editId#
|
||||||
, EDIT_DATE = NOW()
|
, EDIT_DATE = NOW()
|
||||||
WHERE
|
WHERE
|
||||||
@ -475,6 +476,44 @@
|
|||||||
AND M.spamYn = 'N'
|
AND M.spamYn = 'N'
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<!-- 회원별 등급 히스토리 등록 All -->
|
||||||
|
<insert id="mberGrdDAO.insertMberGrdHistAll" parameterClass="mberGrdVO">
|
||||||
|
INSERT INTO MJ_MBER_GRD_HIST
|
||||||
|
(
|
||||||
|
MBER_ID
|
||||||
|
, GRD_SET_NO
|
||||||
|
, SHORT_PRICE
|
||||||
|
, LONG_PRICE
|
||||||
|
, PICTURE_PRICE
|
||||||
|
, PICTURE2_PRICE
|
||||||
|
, PICTURE3_PRICE
|
||||||
|
, AMT
|
||||||
|
, TOT_AMT
|
||||||
|
, GRD_DATE
|
||||||
|
, REG_ID
|
||||||
|
, REG_DATE
|
||||||
|
, EDIT_ID
|
||||||
|
, EDIT_DATE
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
MBER_ID
|
||||||
|
, GRD_SET_NO
|
||||||
|
, SHORT_PRICE
|
||||||
|
, LONG_PRICE
|
||||||
|
, PICTURE_PRICE
|
||||||
|
, PICTURE2_PRICE
|
||||||
|
, PICTURE3_PRICE
|
||||||
|
, AMT
|
||||||
|
, TOT_AMT
|
||||||
|
, GRD_DATE
|
||||||
|
, REG_ID
|
||||||
|
, REG_DATE
|
||||||
|
, EDIT_ID
|
||||||
|
, EDIT_DATE
|
||||||
|
FROM MJ_MBER_GRD_INFO
|
||||||
|
WHERE GRD_STATUS = 'Y'
|
||||||
|
</insert>
|
||||||
|
|
||||||
<!-- 회원별 등급 일괄변경 -->
|
<!-- 회원별 등급 일괄변경 -->
|
||||||
<update id="mberGrdDAO.updateMberGrdAll" parameterClass="mberGrdVO">
|
<update id="mberGrdDAO.updateMberGrdAll" parameterClass="mberGrdVO">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
@ -519,6 +558,7 @@
|
|||||||
, A.PICTURE_PRICE = C.PICTURE_PRICE
|
, A.PICTURE_PRICE = C.PICTURE_PRICE
|
||||||
, A.PICTURE2_PRICE = C.PICTURE2_PRICE
|
, A.PICTURE2_PRICE = C.PICTURE2_PRICE
|
||||||
, A.PICTURE3_PRICE = C.PICTURE3_PRICE
|
, A.PICTURE3_PRICE = C.PICTURE3_PRICE
|
||||||
|
, A.AMT = B.AMT_SUM
|
||||||
, A.TOT_AMT = B.AMT_SUM
|
, A.TOT_AMT = B.AMT_SUM
|
||||||
, A.GRD_DATE = CONCAT(DATE_FORMAT(#grdNewDate#, '%Y-%m-%d'), ' ', '00:00:00')
|
, A.GRD_DATE = CONCAT(DATE_FORMAT(#grdNewDate#, '%Y-%m-%d'), ' ', '00:00:00')
|
||||||
, A.EDIT_DATE = NOW()
|
, A.EDIT_DATE = NOW()
|
||||||
@ -576,6 +616,7 @@
|
|||||||
, A.PICTURE_PRICE = C.PICTURE_PRICE
|
, A.PICTURE_PRICE = C.PICTURE_PRICE
|
||||||
, A.PICTURE2_PRICE = C.PICTURE2_PRICE
|
, A.PICTURE2_PRICE = C.PICTURE2_PRICE
|
||||||
, A.PICTURE3_PRICE = C.PICTURE3_PRICE
|
, A.PICTURE3_PRICE = C.PICTURE3_PRICE
|
||||||
|
, A.AMT = B.AMT_SUM
|
||||||
, A.TOT_AMT = B.AMT_SUM
|
, A.TOT_AMT = B.AMT_SUM
|
||||||
, A.GRD_DATE = CONCAT(DATE_FORMAT(#grdNewDate#, '%Y-%m-%d'), ' ', '00:00:00')
|
, A.GRD_DATE = CONCAT(DATE_FORMAT(#grdNewDate#, '%Y-%m-%d'), ' ', '00:00:00')
|
||||||
, A.EDIT_ID = #editId#
|
, A.EDIT_ID = #editId#
|
||||||
@ -808,7 +849,7 @@
|
|||||||
, #picture3Price#
|
, #picture3Price#
|
||||||
, #amt#
|
, #amt#
|
||||||
, #totAmt#
|
, #totAmt#
|
||||||
, #grdDate#
|
, #grdNewDate#
|
||||||
, #regId#
|
, #regId#
|
||||||
, NOW()
|
, NOW()
|
||||||
, #editId#
|
, #editId#
|
||||||
@ -840,7 +881,9 @@
|
|||||||
ON A.GRD_SET_NO = B.GRD_SET_NO
|
ON A.GRD_SET_NO = B.GRD_SET_NO
|
||||||
WHERE 1=1
|
WHERE 1=1
|
||||||
AND A.MBER_ID = #mberId#
|
AND A.MBER_ID = #mberId#
|
||||||
|
AND A.TOT_AMT > 0
|
||||||
AND A.GRD_DATE >= (SELECT S.GRD_DATE FROM MJ_MBER_GRD_INFO S WHERE S.MBER_ID = #mberId#)
|
AND A.GRD_DATE >= (SELECT S.GRD_DATE FROM MJ_MBER_GRD_INFO S WHERE S.MBER_ID = #mberId#)
|
||||||
|
GROUP BY A.TOT_AMT, A.AMT
|
||||||
ORDER BY A.REG_DATE DESC
|
ORDER BY A.REG_DATE DESC
|
||||||
LIMIT #recordCountPerPage# OFFSET #firstIndex#
|
LIMIT #recordCountPerPage# OFFSET #firstIndex#
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -238,8 +238,8 @@ function setMberGrdSave() {
|
|||||||
<col style="width: 5%">
|
<col style="width: 5%">
|
||||||
<col style="width: auto;">
|
<col style="width: auto;">
|
||||||
<col style="width: 8%;">
|
<col style="width: 8%;">
|
||||||
<col style="width: 8%;">
|
<col style="width: 7%;">
|
||||||
<col style="width: 10%">
|
<col style="width: 9%">
|
||||||
<col style="width: 9%">
|
<col style="width: 9%">
|
||||||
<col style="width: 8%">
|
<col style="width: 8%">
|
||||||
<col style="width: 8%">
|
<col style="width: 8%">
|
||||||
@ -322,13 +322,13 @@ function setMberGrdSave() {
|
|||||||
</c:forEach>
|
</c:forEach>
|
||||||
</tbody>
|
</tbody>
|
||||||
<c:if test="${empty resultList}">
|
<c:if test="${empty resultList}">
|
||||||
<tr><td colspan="7"><spring:message code="common.nodata.msg" /></td></tr>
|
<tr><td colspan="12"><spring:message code="common.nodata.msg" /></td></tr>
|
||||||
</c:if>
|
</c:if>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnWrap">
|
<div class="btnWrap">
|
||||||
<input type="text" name="mberId" value="" style="height: 50px; width: 120px;" />
|
<input type="text" name="mberId" value="" style="height: 50px; width: 120px;" placeholder="아이디" />
|
||||||
<input type="button" class="btnType2" value="등급제 적용테스트" onclick="javascript:setMberGrdSave(); return false;">
|
<input type="button" class="btnType2" value="등급 등록(테스트용)" onclick="javascript:setMberGrdSave(); return false;">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<c:if test="${!empty resultList}">
|
<c:if test="${!empty resultList}">
|
||||||
|
|||||||
@ -84,7 +84,7 @@
|
|||||||
async: false,
|
async: false,
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (data.isSuccess) {
|
if (data.isSuccess) {
|
||||||
alert(numberWithCommas(data.updateMberCnt) + "명 저장 완료했습니다.");
|
alert(numberWithCommas(data.updateMberCnt) + "명 등급 업데이트 완료했습니다.");
|
||||||
location.reload();
|
location.reload();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -110,7 +110,7 @@
|
|||||||
async: false,
|
async: false,
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (data.isSuccess) {
|
if (data.isSuccess) {
|
||||||
alert(numberWithCommas(data.updateMberCnt) + "명 저장 완료했습니다.");
|
alert(numberWithCommas(data.updateMberCnt) + "명 업데이트 완료했습니다.");
|
||||||
location.reload();
|
location.reload();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user