diff --git a/frontend/src/modules/channelMgt/service/channelMgtApi.js b/frontend/src/modules/channelMgt/service/channelMgtApi.js
index 1494529..a15a8aa 100644
--- a/frontend/src/modules/channelMgt/service/channelMgtApi.js
+++ b/frontend/src/modules/channelMgt/service/channelMgtApi.js
@@ -27,8 +27,13 @@ const getExcelHeader = category => {
});
};
+const tmpltRejectList = (params) => {
+ return httpClient.post('/api/v1/bo/channelMgt/tmpltRejectList', params);
+}
+
export default {
getCommCode,
tmpltListExcel,
getExcelHeader,
+ tmpltRejectList
}
diff --git a/frontend/src/modules/channelMgt/views/TmpltList.vue b/frontend/src/modules/channelMgt/views/TmpltList.vue
index c9bdbdf..e0e8c01 100644
--- a/frontend/src/modules/channelMgt/views/TmpltList.vue
+++ b/frontend/src/modules/channelMgt/views/TmpltList.vue
@@ -63,8 +63,9 @@
:addCls="grid.addCls"
:header="grid.headder"
>
-
+
+
@@ -76,8 +77,38 @@ import channelMgtApi from '../service/channelMgtApi';
import xlsx from '@/common/excel';
import moment from 'moment';
import commonModal from '@/components/modal/commonModal';
+import TmpltRejectViewPop from '../components/TmpltRejectViewPop';
import api from '@/service/api';
+class CustomATagRenderer {
+ constructor(props) {
+ this.props = props;
+ if(props.colValue == "반려"){
+ const el = document.createElement('a');
+ el.href = 'javascript:void(0);';
+ el.className = 'btn_text';
+ el.innerText = String(props.colValue);
+ this.el = el;
+ }else{
+ const el = document.createElement('p');
+ el.className = 'btn_text';
+ el.innerText = String(props.colValue);
+ this.el = el;
+ }
+ }
+
+ getElement() {
+ return this.el;
+ }
+
+ addEvent(selEl) {
+ selEl.addEventListener('click', () => {
+ const { callback } = this.props['cgrido' + this.props.colName].options;
+ callback(this.props);
+ });
+ }
+}
+
export default {
name: 'temltList',
data() {
@@ -128,7 +159,18 @@ export default {
// { name: 'tmpltCd', header: '템플릿코드', align: 'center', width: '12%' },
{ name: 'tmpltNm', header: '템플릿명', align: 'center', width: '16%' },
{ name: 'tmpltType', header: '템플릿 유형', align: 'center', width: '6%' },
- { name: 'stat', header: '상태', align: 'center', width: '7%' },
+ {
+ name: 'stat',
+ header: '상태',
+ align: 'center',
+ width: '7%',
+ renderer: {
+ type: CustomATagRenderer,
+ options: {
+ callback: this.tmpltRejectViewPopOpen,
+ },
+ },
+ },
{ name: 'sendProfile', header: '발신프로필', align: 'center', width: '28%' },
{ name: 'userInfo', header: '등록ID(이름)', align: 'center', width: '10%' },
{ name: 'lastChgDt', header: '마지막 수정일', width: '7%', cls: 'td_line' },
@@ -147,6 +189,7 @@ export default {
customGrid: customGrid,
channelMgtApi,
commonModal,
+ TmpltRejectViewPop
},
created() {
this.getExcelHeader();
@@ -268,6 +311,11 @@ export default {
return String.fromCharCode(s.match(/\d+/gm)[0]);
});
},
+ tmpltRejectViewPopOpen(props) {
+ if(props.stat == "반려"){
+ this.$refs.TmpltRejectViewPop.tmpltRejectViewPopOpen(props.sndrprofKey, props.tmpltKey);
+ }
+ }
},
beforeRouteLeave(to, from, next) {
diff --git a/src/main/java/kr/co/uplus/ez/api/channelMgt/ChannelMgtController.java b/src/main/java/kr/co/uplus/ez/api/channelMgt/ChannelMgtController.java
index 7ff0536..0fb6e8a 100644
--- a/src/main/java/kr/co/uplus/ez/api/channelMgt/ChannelMgtController.java
+++ b/src/main/java/kr/co/uplus/ez/api/channelMgt/ChannelMgtController.java
@@ -81,4 +81,25 @@ public class ChannelMgtController {
return channelService.tmpltListExcel(tmpltListExcelReqDto, userId);
}
+
+ /**
+ * date : 2022. 4. 25.
+ * auth : ckr
+ * desc : 알림톡 템플릿 목록 조회
+ * @param tmpltListReqDto
+ * @return
+ * @
+ */
+ @ApiOperation(value = "tmpltRejectList", notes = "알림톡 템플릿 반려 목록 조회")
+ @ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
+ @RequestMapping(value = "tmpltRejectList", method = { RequestMethod.POST })
+ @ResponseBody
+ public TmpltListResDto tmpltRejectList(@RequestBody @Valid TmpltListReqDto tmpltListReqDto, BindingResult bindingResult) {
+
+ if (validComponents.validParameter(bindingResult)) {
+ return new TmpltListResDto(ApiResponseCode.CM_PARAMETER_ERROR);
+ }
+
+ return channelService.tmpltRejectList(tmpltListReqDto);
+ }
}
diff --git a/src/main/java/kr/co/uplus/ez/api/channelMgt/ChannelMgtService.java b/src/main/java/kr/co/uplus/ez/api/channelMgt/ChannelMgtService.java
index 797aebc..8bcac39 100644
--- a/src/main/java/kr/co/uplus/ez/api/channelMgt/ChannelMgtService.java
+++ b/src/main/java/kr/co/uplus/ez/api/channelMgt/ChannelMgtService.java
@@ -1,17 +1,25 @@
package kr.co.uplus.ez.api.channelMgt;
import kr.co.uplus.ez.api.channelMgt.dto.*;
+import kr.co.uplus.ez.common.components.WebClientRequestService;
import kr.co.uplus.ez.common.data.ApiResponseCode;
+import kr.co.uplus.ez.common.data.Const;
import kr.co.uplus.ez.common.data.Paging;
+
+import org.json.simple.JSONArray;
+import org.json.simple.JSONObject;
import org.mybatis.spring.SqlSessionTemplate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
@Service
public class ChannelMgtService {
@@ -25,6 +33,15 @@ public class ChannelMgtService {
@Autowired
@Qualifier("sqlSessionTemplateDb2")
private SqlSessionTemplate sqlSessionSlave;
+
+ @Autowired
+ WebClientRequestService clientRequestService;
+
+ @Value("${hubeasy-api.domain:http://localhost:7070/}")
+ String apiDomain;
+
+ @Value("${hubeasy-api.url.alTolkTemplet:api/v1/kko/template/get}")
+ String apiUrlAlTolkTemplet;
/**
* date : 2022. 4. 25.
@@ -82,4 +99,47 @@ public class ChannelMgtService {
return new TmpltListExcelResDto(ApiResponseCode.SUCCESS, tmpltListRes);
}
+
+
+ /**
+ * desc : 알림톡 템플릿 반려 목록 조회
+ * @param tmpltListReqDto
+ * @return
+ */
+ @SuppressWarnings("unchecked")
+ public TmpltListResDto tmpltRejectList(TmpltListReqDto tmpltListReqDto) {
+ RjtTmpltListRes tmpltListRes = new RjtTmpltListRes();
+ Map