Ver código fonte

상품권 등록 메뉴 개발중

jsshin 5 anos atrás
pai
commit
c9d66af0e0

+ 5 - 3
src/main/java/com/style24/admin/biz/service/TsaGiftCardService.java

@@ -76,6 +76,10 @@ public class TsaGiftCardService {
 		String resultMsg;
 		GiftCard giftCard = objectMapper.convertValue(gagaMap, GiftCard.class);
 
+		giftCard.setRegNo(userNo);
+		giftCard.setUpdNo(userNo);
+		giftCard.setIpAddr(ip);
+
 		// 1. 엑셀 내용 데이터 생성
 		giftCardDao.createGfcdBulkReg(giftCard);
 
@@ -89,10 +93,8 @@ public class TsaGiftCardService {
 			// 상품권 API 호출
 			String result = yes24Giftcard.soapDataTransfer(pubNo, ip, custNo);
 
+			giftCard.setGfcdNo(pubNo);
 			giftCard.setCustNo(custNo);
-			giftCard.setRegNo(userNo);
-			giftCard.setUpdNo(userNo);
-			giftCard.setIpAddr(ip);
 
 			if ("01".equals(result)) {
 				giftCard.setResultVal(result);

+ 4 - 1
src/main/java/com/style24/admin/biz/web/TsaMarketingController.java

@@ -2536,8 +2536,11 @@ public class TsaMarketingController extends TsaBaseController {
 		String targetPath = GagaFileUtil.getConcatenationPath(env.getProperty("upload.excel.target.path"), "excel");
 		String[] giftGardNames = {"custId", "gfcdNo"};
 		Collection<GagaMap> excelGiftCardList = GagaExcelUtil.getList(GagaFileUtil.getConcatenationPath(targetPath, giftCard.getExcelFileNm()), 0, giftGardNames, 0);
+
 		for (GagaMap gagaMap : excelGiftCardList) {
-			giftCardService.saveGiftcardUseConfirm(gagaMap);
+			if (StringUtils.isNotBlank(gagaMap.getString("custId"))  && StringUtils.isNotBlank(gagaMap.getString("gfcdNo"))) {
+				giftCardService.saveGiftcardUseConfirm(gagaMap);
+			}
 		}
 		return super.ok(message.getMessage("SUCC_0001"));
 	}

+ 3 - 3
src/main/webapp/WEB-INF/views/customer/CustomerDetailForm.html

@@ -42,7 +42,7 @@
 				</td>
 				<th>아이디</th>
 				<td>
-					<span id="custId" name="custId"></span>
+					<span id="spanCustId" name="spanCustId"></span>
 					<th:block th:if="${sessionInfo.userId == 'jsshin'}">
 						<button type="button" id="btnLogin" class="btn btnRight btn-success btn-lg">Login</button>
 					</th:block>
@@ -1216,7 +1216,7 @@
 			, function (data) {
 				if (!gagajf.isNull(data)) {
 					$('#spanCustNm').text(data.maskingCustNm);
-					$('#custId').text(data.maskingCustId);
+					$('#spanCustId').text(data.maskingCustId);
 					$('#siteNm').text(gagaAgGrid.lookupValue(siteList, data.siteCd));
 					$('#custGrade').val(data.custGrade);
 					$('#custGb').val(data.custGb);
@@ -1534,7 +1534,7 @@
 
 
 	$('#btnLogin').on('click', function () {
-		let custId = $('span[name=custId]').text();
+		let custId = $('#spanCustId').text();
 		const actionUrl = _frontUrl + '/customer/front/login?custId=' + custId;
 		let popupWidth = window.screen.width;
 		let popupHeight = window.screen.height;

+ 3 - 3
src/main/webapp/WEB-INF/views/marketing/GiftCardListForm.html

@@ -99,13 +99,13 @@
 	const columnDefs = [
 		{
 			headerName: "회원ID", field:'maskingCustId', width:120, cellClass: 'text-left',
-			valueGetter: function (params) {
+			cellRenderer: function (params) {
 				return gagajf.isNull(params.data.custNo) ?
 					params.data.maskingCustId :'<a href="javascript:void(0);" onclick="cfnOpenCustDetailPopup(\''+params.data.custNo+'\')">' + params.data.maskingCustId + '</a>'
 			}
 		},
-		{headerName: "상품권번호", field:'gfcdNo', width:100, cellClass: 'text-center'},
-		{headerName: "결과메시지", field:'resultMsg', width:100, cellClass: 'text-center'},
+		{headerName: "상품권번호", field:'gfcdNo', width:200, cellClass: 'text-center'},
+		{headerName: "결과메시지", field:'resultMsg', width:150, cellClass: 'text-center'},
 		{
 			headerName: "등록일자", field:'regDt', width:120, cellClass: 'text-center',
 			valueGetter: function (params) { return gagaAgGrid.toDateFormat(params.data.regDt); }