Compare commits
94 Commits
388e41f06f
...
master_ord
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
305d5d226c | ||
|
|
8a5583b600 | ||
|
|
5db37dfafb | ||
|
|
bcf64f0f92 | ||
|
|
2763d956a8 | ||
|
|
96670ab6a5 | ||
|
|
1097660b22 | ||
|
|
12ae420a48 | ||
|
|
1a7cab2c9c | ||
|
|
072704c995 | ||
|
|
cb022e9841 | ||
|
|
4939bf7954 | ||
|
|
55192f8ccc | ||
|
|
780f061592 | ||
|
|
daf9770fbe | ||
|
|
86c7b59070 | ||
|
|
190f81d5c6 | ||
|
|
e6bf779b11 | ||
|
|
e9b53f049e | ||
|
|
a1c1b77c86 | ||
|
|
f82df1e5cf | ||
|
|
006d3f5a09 | ||
|
|
844d539166 | ||
|
|
543a05b5f5 | ||
|
|
f5dfdb2f78 | ||
|
|
3b8eba8e0b | ||
|
|
df6340658e | ||
|
|
f8282b55e0 | ||
|
|
c567cf4d4c | ||
|
|
acf929e0eb | ||
|
|
8f131dcec4 | ||
|
|
cbc4c6bee5 | ||
|
|
a7dd13fc65 | ||
|
|
252a27601e | ||
|
|
b654dcb447 | ||
|
|
22d45afeb5 | ||
|
|
36b0f963c2 | ||
|
|
77060045ca | ||
|
|
c0d7079e37 | ||
|
|
bda09e6e4f | ||
|
|
4f920c0919 | ||
|
|
d41b6a45f6 | ||
|
|
a1a107cfe1 | ||
|
|
542ec44a3c | ||
|
|
3346af5d1f | ||
|
|
df0cba8888 | ||
|
|
5cc24e3fc9 | ||
|
|
60f083a22f | ||
|
|
72328ab9f8 | ||
|
|
eee0e423f8 | ||
|
|
73690055e2 | ||
|
|
a43c0b5ae3 | ||
|
|
46b465c74b | ||
|
|
8797be6b74 | ||
|
|
3e409a3408 | ||
|
|
27b816b332 | ||
|
|
be349e305b | ||
|
|
9407a4fb78 | ||
|
|
deb1ab8174 | ||
|
|
d9a33f8dc5 | ||
|
|
abf74d996b | ||
|
|
4e20d28c4d | ||
|
|
085a75593a | ||
|
|
ac1db26212 | ||
|
|
c3ed788b0a | ||
|
|
1e1f70ff73 | ||
|
|
05e09659b2 | ||
|
|
65d920874f | ||
|
|
54c0266824 | ||
|
|
3f812a4bb4 | ||
|
|
88e12c794d | ||
|
|
dc4e554d47 | ||
|
|
342b01f32f | ||
|
|
382000a4f5 | ||
|
|
8fd320df3f | ||
|
|
5bceea8e2a | ||
|
|
7507881c57 | ||
|
|
c9dbc1f0f5 | ||
|
|
1dc4d79d95 | ||
|
|
d4facbb997 | ||
|
|
bc45eb31ce | ||
|
|
827c76c1af | ||
|
|
6902ac8ef4 | ||
|
|
118edb72dd | ||
|
|
e018aa5f76 | ||
|
|
c99e76fc12 | ||
|
|
0a695e95f2 | ||
|
|
cc10195872 | ||
|
|
79bda0c22b | ||
|
|
ba8d57a2b7 | ||
|
|
c4bb58c75c | ||
|
|
79d17e3fc2 | ||
|
|
6eb3a8e8ed | ||
|
|
03f6804253 |
@@ -34,7 +34,7 @@ public class ImagePaginationRenderer extends AbstractPaginationRenderer implemen
|
||||
//previousPageLabel = "<li><a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \"><img src=\"" + servletContext.getContextPath() + "/images/egovframework/com/cmm/mod/icon/icon_prev.gif\" alt=\"이전\" border=\"0\"/></a></li>";
|
||||
previousPageLabel = "<button class=\"pagination__item prev\" onclick=\"{0}({1});return false; \"><span class=\"visually-hidden\">이전 페이지로</span></button>";
|
||||
//currentPageLabel = "<li><strong>{0}</strong></li>";
|
||||
currentPageLabel = "<li><button class=\"pagination__item active\"><span>{0}</span></button></li>";
|
||||
currentPageLabel = "<li><button class=\"pagination__item active\" onclick=\"return false; \"><span>{0}</span></button></li>";
|
||||
//otherPageLabel = "<li><a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \">{2}</a></li>";
|
||||
otherPageLabel = "<li><button class=\"pagination__item\" onclick=\"{0}({1});return false; \"><span>{2}</span></button></li>";
|
||||
//nextPageLabel = "<li> <a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \"><img src=\"" + servletContext.getContextPath() + "/images/egovframework/com/cmm/mod/icon/icon_next.gif\" alt=\"다음\" border=\"0\"/></a></li>";
|
||||
|
||||
@@ -286,6 +286,13 @@ public class BOMaMtngController {
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
} else {
|
||||
// if (CollectionUtils.isEmpty(multiOrdrDlvylc)) {
|
||||
// log.info("배송지 정보를 찾을 수 없습니다.");
|
||||
// content.put("result","Y");
|
||||
// content.put("message", "배송지 정보를 찾을 수 없습니다.");
|
||||
// // throw new WnbtRestException("주문유형 정보를 찾을 수 없습니다.");
|
||||
// return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
// }
|
||||
if (CollectionUtils.isEmpty(shipping)) {
|
||||
log.info("배송지 정보를 찾을 수 없습니다.");
|
||||
content.put("result","Y");
|
||||
@@ -322,27 +329,91 @@ public class BOMaMtngController {
|
||||
String[] receptMbtlnbArray = null; // 배송지 받는이 휴대폰번호
|
||||
|
||||
if ("01".equals(ordrTyCd) || "03".equals(ordrTyCd) || "06".equals(ordrTyCd)) { // 일반주문, 회원개인결제, 정기배송
|
||||
if (
|
||||
StringUtil.isEmpty((String) shipping.get("dlvylcZip")) ||
|
||||
StringUtil.isEmpty((String) shipping.get("dlvylcAdresDvCd")) ||
|
||||
( "01".equals(shipping.get("dlvylcAdresDvCd")) && StringUtil.isEmpty((String) shipping.get("dlvylcRnmAdres")) ) ||
|
||||
( "02".equals(shipping.get("dlvylcAdresDvCd")) && StringUtil.isEmpty((String) shipping.get("dlvylcLnbAdres")) ) ||
|
||||
StringUtil.isEmpty((String) shipping.get("dlvylcAdresDtl"))
|
||||
) {
|
||||
content.put("result","Y");
|
||||
content.put("message", "배송지 정보를 찾을 수 없습니다. 다시 시도해 주세요.");
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
if (!CollectionUtils.isEmpty(multiOrdrDlvylc)) {
|
||||
|
||||
// 배송지 리스트
|
||||
List<LinkedHashMap<String, Object>> dlvylcListMulti = (List<LinkedHashMap<String, Object>>) multiOrdrDlvylc.get("dlvylc");
|
||||
|
||||
/** ----------------------------------------------- 배송지별 주문 상품 수량 검사 START ----------------------------------------------- */
|
||||
content = checkDistributedQyMatchesOrder(goodsList, dlvylcListMulti);
|
||||
if (!"0".equals(content.get("status"))) {
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
/** ----------------------------------------------- 배송지별 주문 상품 수량 검사 END ----------------------------------------------- */
|
||||
|
||||
// 부정판매 체크를 위한 배송지 정렬
|
||||
if (!CollectionUtils.isEmpty(dlvylcListMulti)) {
|
||||
|
||||
boolean hasInvalidAddress = dlvylcListMulti.stream().anyMatch(map -> {
|
||||
String dlvylcZip = StringUtil.isNullToString(map.get("dlvylcZip"));
|
||||
String adresDvCd = StringUtil.isNullToString(map.get("dlvylcAdresDvCd"));
|
||||
String dlvylcLnbAdres = StringUtil.isNullToString(map.get("dlvylcLnbAdres"));
|
||||
String dlvylcRnmAdres = StringUtil.isNullToString(map.get("dlvylcRnmAdres"));
|
||||
String adresDtl = StringUtil.isNullToString(map.get("dlvylcAdresDtl"));
|
||||
|
||||
return StringUtil.isEmpty(dlvylcZip)
|
||||
|| StringUtil.isEmpty(adresDvCd)
|
||||
|| ("01".equals(adresDvCd) && StringUtil.isEmpty(dlvylcRnmAdres))
|
||||
|| ("02".equals(adresDvCd) && StringUtil.isEmpty(dlvylcLnbAdres))
|
||||
|| StringUtil.isEmpty(adresDtl);
|
||||
});
|
||||
|
||||
if (hasInvalidAddress) {
|
||||
content.put("result","Y");
|
||||
content.put("message", "배송지 정보를 찾을 수 없습니다. 다시 시도해 주세요.");
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
List<String> adresList = dlvylcListMulti.stream()
|
||||
.map(map -> {
|
||||
String adresDvCd = StringUtil.isNullToString(map.get("dlvylcAdresDvCd"));
|
||||
String adresDtl = StringUtil.isNullToString(map.get("dlvylcAdresDtl"));
|
||||
String dlvylcLnbAdres = StringUtil.isNullToString(map.get("dlvylcLnbAdres"));
|
||||
String dlvylcRnmAdres = StringUtil.isNullToString(map.get("dlvylcRnmAdres"));
|
||||
String adresMulti;
|
||||
if ("01".equals(adresDvCd)) {
|
||||
adresMulti = dlvylcRnmAdres + " " + adresDtl;
|
||||
} else {
|
||||
adresMulti = dlvylcLnbAdres + " " + adresDtl;
|
||||
}
|
||||
|
||||
return adresMulti;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
|
||||
adresArray = adresList.toArray(new String[0]);
|
||||
|
||||
List<String> receptMbtlnbList = dlvylcListMulti.stream()
|
||||
.map(map -> {
|
||||
return StringUtil.isNullToString(map.get("recpntMbtlnb"));
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
|
||||
receptMbtlnbArray = receptMbtlnbList.toArray(new String[0]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String dlvylcAdresDvCd = (String) shipping.get("dlvylcAdresDvCd");
|
||||
String dlvylcLnbAdres = (String) shipping.get("dlvylcLnbAdres");
|
||||
String dlvylcRnmAdres = (String) shipping.get("dlvylcRnmAdres");
|
||||
String dlvylcAdresDtl = (String) shipping.get("dlvylcAdresDtl");
|
||||
|
||||
adres = "01".equals(dlvylcAdresDvCd) ? dlvylcRnmAdres + " " + dlvylcAdresDtl : dlvylcLnbAdres + " " + dlvylcAdresDtl;
|
||||
|
||||
String recpntMbtlnb = StringUtil.isNullToString(shipping.get("recpntMbtlnb"));
|
||||
receptMbtlnbArray = new String[]{recpntMbtlnb};
|
||||
// if (
|
||||
// StringUtil.isEmpty((String) shipping.get("dlvylcZip")) ||
|
||||
// StringUtil.isEmpty((String) shipping.get("dlvylcAdresDvCd")) ||
|
||||
// ( "01".equals(shipping.get("dlvylcAdresDvCd")) && StringUtil.isEmpty((String) shipping.get("dlvylcRnmAdres")) ) ||
|
||||
// ( "02".equals(shipping.get("dlvylcAdresDvCd")) && StringUtil.isEmpty((String) shipping.get("dlvylcLnbAdres")) ) ||
|
||||
// StringUtil.isEmpty((String) shipping.get("dlvylcAdresDtl"))
|
||||
// ) {
|
||||
// content.put("result","Y");
|
||||
// content.put("message", "배송지 정보를 찾을 수 없습니다. 다시 시도해 주세요.");
|
||||
// return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
// }
|
||||
//
|
||||
// String dlvylcAdresDvCd = (String) shipping.get("dlvylcAdresDvCd");
|
||||
// String dlvylcLnbAdres = (String) shipping.get("dlvylcLnbAdres");
|
||||
// String dlvylcRnmAdres = (String) shipping.get("dlvylcRnmAdres");
|
||||
// String dlvylcAdresDtl = (String) shipping.get("dlvylcAdresDtl");
|
||||
//
|
||||
// adres = "01".equals(dlvylcAdresDvCd) ? dlvylcRnmAdres + " " + dlvylcAdresDtl : dlvylcLnbAdres + " " + dlvylcAdresDtl;
|
||||
//
|
||||
// String recpntMbtlnb = StringUtil.isNullToString(shipping.get("recpntMbtlnb"));
|
||||
// receptMbtlnbArray = new String[]{recpntMbtlnb};
|
||||
} else if ("05".equals(ordrTyCd)) { // 여러곳 배송
|
||||
if (!CollectionUtils.isEmpty(multiOrdrDlvylc)) {
|
||||
|
||||
|
||||
@@ -406,6 +406,8 @@ public class BOMaMtngService {
|
||||
List<LinkedHashMap> goodsList = (List<LinkedHashMap>) param.get("goodsList"); // 상품정보
|
||||
LinkedHashMap enuri = (LinkedHashMap) param.get("enuri"); // 할인정보
|
||||
|
||||
log.debug("selectBOPreOrderValidationList-goodsList: {}",goodsList);
|
||||
|
||||
//사용한 장바구니 쿠폰
|
||||
//비회원의 경우 enuri 자체가 없어서 isEmpty 확인
|
||||
List<LinkedHashMap> usedCartCouponList = new ArrayList<>();
|
||||
|
||||
@@ -138,6 +138,12 @@ public class BOMaSopmalVO extends AbstractVO {
|
||||
/** 주문 자동 구매확정 기간 */
|
||||
private String ordrAtmcPurchsDcsnPd;
|
||||
|
||||
/** 1엔 환율(살때) */
|
||||
private String buyRate;
|
||||
|
||||
/** 1엔 환율(팔때) */
|
||||
private String sellRate;
|
||||
|
||||
/** 마일리지 보유 사용 금액 */
|
||||
private String mlgHoldUseAmt;
|
||||
|
||||
@@ -495,6 +501,9 @@ public class BOMaSopmalVO extends AbstractVO {
|
||||
/** 회원가입 주요문구 */
|
||||
private String joinComptWords;
|
||||
|
||||
/** 구독서비스 안내문구 */
|
||||
private String subsvcGuidanceWords;
|
||||
|
||||
/** 회원등급 정보 */
|
||||
private String mbrGradGroupNm;
|
||||
private String pageDv;
|
||||
|
||||
@@ -322,13 +322,15 @@ public class BOJobUserService {
|
||||
|
||||
|
||||
// 일치하면 1, 불일치하면 0 반환
|
||||
log.debug("encodedPwd:{}", encodedPwd);
|
||||
log.debug("newPwd:{}", newPwd);
|
||||
|
||||
if (encodedPwd.equals(newPwd)) {
|
||||
result = 1;
|
||||
} else {
|
||||
result = 0;
|
||||
}
|
||||
|
||||
log.debug("result:{}", result);
|
||||
} catch (WnbtRestException wre){
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -81,6 +81,10 @@ public interface BOGnrlbbscttMapper {
|
||||
/*사용자 > 이용안내 조회*/
|
||||
public List<DataMap> selectUseGuidanceCn(BOGnrlbbscttVO bbsctt);
|
||||
|
||||
/**********1:1문의**********/
|
||||
/*1:1문의 목록 조회*/
|
||||
public List<DataMap> selectBOM2mBbscttListInqire(BOGnrlbbscttVO bbsctt);
|
||||
|
||||
/*******************
|
||||
* 게시글 상세 조회
|
||||
*******************/
|
||||
@@ -180,7 +184,10 @@ public interface BOGnrlbbscttMapper {
|
||||
********************************************************************/
|
||||
/** 게시글 연관 상품 등록 */
|
||||
public void insertBOBbscttGoods(BOGnrlbbscttVO bbsctt);
|
||||
|
||||
|
||||
/** 게시글 연관 주문 등록 (1:1문의) */
|
||||
public void insertBOBbscttM2mGoods(BOGnrlbbscttVO bbsctt);
|
||||
|
||||
/** 게시글 상세조회(연관상품목록) */
|
||||
public List<DataMap> selectBOBbscttDtlGoods(BOGnrlbbscttVO bbsctt);
|
||||
|
||||
|
||||
@@ -32,6 +32,8 @@ import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static java.lang.Integer.parseInt;
|
||||
|
||||
/**
|
||||
* 게시글 관리 Service
|
||||
*
|
||||
@@ -334,6 +336,15 @@ public class BOGnrlbbscttService {
|
||||
resultList = mapper.selectBOEvtBbscttListInqire(bbsctt);
|
||||
}
|
||||
break;
|
||||
case "12": //1:1문의
|
||||
resultList = mapper.selectBOM2mBbscttListInqire(bbsctt);
|
||||
if(resultList != null && resultList.size() !=0){
|
||||
resultCnt.setTotCnt(((BigInteger) resultList.get(0).get("totCnt")).intValue());
|
||||
bbsctt.getPaginationInfo().setTotalRecordCount(((BigInteger) resultList.get(0).get("totCnt")).intValue());
|
||||
}else{
|
||||
resultCnt.setTotCnt(0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
/*비속어 필터*/
|
||||
@@ -888,6 +899,12 @@ public class BOGnrlbbscttService {
|
||||
mapper.insertBOBbscttGoods(bbsctt);
|
||||
}
|
||||
}
|
||||
/*1:1문의 (반품문의)는 주문번호 등록*/
|
||||
if("12".equals(bbsctt.getBbsTyCd())){
|
||||
if(bbsctt.getOrdrInnb() != null){
|
||||
mapper.insertBOBbscttM2mGoods(bbsctt);
|
||||
}
|
||||
}
|
||||
message.put("result", "success");
|
||||
/*마일리지 적립 시 게시글고유번호 파라미터*/
|
||||
message.put("bbscttInnb", bbsctt.getBbscttInnb());
|
||||
@@ -1085,30 +1102,33 @@ public class BOGnrlbbscttService {
|
||||
}
|
||||
}
|
||||
}
|
||||
//게시글 연관 상품 삭제
|
||||
mapper.deleteBOBbscttGoods(bbsctt);
|
||||
//게시글 연관 상품 등록(fm_boarddata_goods)
|
||||
if (bbsctt.getGoodsInnbArr() != null) {
|
||||
/*1:1 문의 게시판이 아닌경우만 처리 */
|
||||
if("12".equals(bbsctt.getBbsTyCd())){
|
||||
//게시글 연관 상품 삭제
|
||||
mapper.deleteBOBbscttGoods(bbsctt);
|
||||
//게시글 연관 상품 등록(fm_boarddata_goods)
|
||||
if (bbsctt.getGoodsInnbArr() != null) {
|
||||
for (int i = 0; bbsctt.getGoodsInnbArr().size() > i; i++) {
|
||||
bbsctt.setGoodsInnb(bbsctt.getGoodsInnbArr().get(i));
|
||||
if ("06".equals(bbsctt.getBbsTyCd()) || "07".equals(bbsctt.getBbsTyCd())) {
|
||||
if (bbsctt.getOrdrGoodsOptnInnbArr() != null) {
|
||||
if (!"goodsNone".equals(bbsctt.getOrdrGoodsOptnInnbArr().get(i))) {
|
||||
bbsctt.setOrdrGoodsOptnInnb(bbsctt.getOrdrGoodsOptnInnbArr().get(i));
|
||||
}
|
||||
}
|
||||
if (bbsctt.getReOrderAtArr() != null) {
|
||||
if (bbsctt.getReOrderAtArr().get(i) != null) {
|
||||
bbsctt.setReOrderAt(bbsctt.getReOrderAtArr().get(i));
|
||||
if (bbsctt.getGoodsInnbArr() != null) {
|
||||
for (int i = 0; bbsctt.getGoodsInnbArr().size() > i; i++) {
|
||||
bbsctt.setGoodsInnb(bbsctt.getGoodsInnbArr().get(i));
|
||||
if ("06".equals(bbsctt.getBbsTyCd()) || "07".equals(bbsctt.getBbsTyCd())) {
|
||||
if (bbsctt.getOrdrGoodsOptnInnbArr() != null) {
|
||||
if (!"goodsNone".equals(bbsctt.getOrdrGoodsOptnInnbArr().get(i))) {
|
||||
bbsctt.setOrdrGoodsOptnInnb(bbsctt.getOrdrGoodsOptnInnbArr().get(i));
|
||||
}
|
||||
}
|
||||
if (bbsctt.getReOrderAtArr() != null) {
|
||||
if (bbsctt.getReOrderAtArr().get(i) != null) {
|
||||
bbsctt.setReOrderAt(bbsctt.getReOrderAtArr().get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
mapper.insertBOBbscttGoods(bbsctt);
|
||||
}
|
||||
mapper.insertBOBbscttGoods(bbsctt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
message.put("result", "success");
|
||||
} catch (WnbtRestException wre) {
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
|
||||
@@ -81,19 +81,6 @@ public class BOOrderService {
|
||||
log.debug("결제정보 => {} ", new Gson().toJson(setle));
|
||||
log.debug("사은품 => {} ", new Gson().toJson(prsntList));
|
||||
|
||||
/** 여러곳 배송 배송지 세팅 시작 */
|
||||
LinkedHashMap<String, Object> multiOrdrDlvylcMap = new LinkedHashMap<>();
|
||||
List<LinkedHashMap<String, Object>> dlvylcListMulti = new ArrayList<>();
|
||||
|
||||
multiOrdrDlvylcMap = (LinkedHashMap) param.get("multiOrdrDlvylc");
|
||||
log.debug("multiOrdrDlvylcMap : {}", multiOrdrDlvylcMap);
|
||||
if (!CollectionUtils.isEmpty(multiOrdrDlvylcMap)) {
|
||||
// 배송지 리스트
|
||||
dlvylcListMulti = (List<LinkedHashMap<String, Object>>) multiOrdrDlvylcMap.get("dlvylc");
|
||||
log.debug("dlvylcListMulti : {}", dlvylcListMulti);
|
||||
}
|
||||
/** 여러곳 배송 배송지 세팅 종료 */
|
||||
|
||||
String sopmalCd = "";
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
sopmalCd = user.getSopmalCd();
|
||||
@@ -103,6 +90,85 @@ public class BOOrderService {
|
||||
|
||||
String ordrTyCd = (String) param.get("ordrTyCd");
|
||||
|
||||
log.debug("insertMngrOrdrRegist-param : {}", param);
|
||||
|
||||
/* *****************************
|
||||
0. 여러곳 배송 배송지 세팅
|
||||
***************************** */
|
||||
/** 여러곳 배송 배송지 세팅 시작 */
|
||||
LinkedHashMap<String, Object> multiOrdrDlvylcMap = new LinkedHashMap<>();
|
||||
List<LinkedHashMap<String, Object>> dlvylcListMulti = new ArrayList<>();
|
||||
multiOrdrDlvylcMap = (LinkedHashMap) param.get("multiOrdrDlvylc");
|
||||
log.debug("multiOrdrDlvylcMap : {}", multiOrdrDlvylcMap);
|
||||
|
||||
if ("01".equals(ordrTyCd) || "03".equals(ordrTyCd) || "04".equals(ordrTyCd) || "06".equals(ordrTyCd)) { // 일반주문, 회원 개인결제, 정기배송
|
||||
|
||||
for(int i=0;i<goodsList.size();i++) {
|
||||
int goodsQy = (int) goodsList.get(i).get("qy");
|
||||
int dlvyGroupInnb = (int) goodsList.get(i).get("dlvyGroupInnb");
|
||||
String sopmalCode = sopmalCd;
|
||||
|
||||
DataMap shippingParam = new DataMap() {{
|
||||
put("dlvyGroupInnb", dlvyGroupInnb);
|
||||
put("sopmalCd", sopmalCode);
|
||||
}};
|
||||
|
||||
DataMap shippingGrouping = mapper.selectShippingGrouping(shippingParam);
|
||||
|
||||
BigDecimal itemDftDlvyAmt = (BigDecimal) shippingGrouping.get("dftDlvyAmt"); // 기본배송비
|
||||
BigDecimal itemDlvyAmt = itemDftDlvyAmt; // 배송비
|
||||
// String dlvyAreaAditAt = (String) shippingGrouping.get("dlvyAreaAditAt"); // 도서산간 추가 배송비 조건
|
||||
// BigDecimal areaAditDlvyAmt = (BigDecimal) shippingGrouping.get("areaAditDlvyAmt"); // 도서산간 추가 배송비
|
||||
|
||||
List<LinkedHashMap> itemGoodsList = new ArrayList<>();
|
||||
itemGoodsList.add(goodsList.get(i));
|
||||
for (LinkedHashMap<String, Object> itemGoodsMap : itemGoodsList) {
|
||||
itemGoodsMap.put("qy", 1);
|
||||
}
|
||||
List<LinkedHashMap> itempPrsntList = new ArrayList<>();
|
||||
if(!prsntList.isEmpty()){
|
||||
itempPrsntList.add(prsntList.get(i));
|
||||
for (LinkedHashMap<String, Object> itemPrsntMap : itempPrsntList) {
|
||||
itemPrsntMap.put("qy", 1);
|
||||
}
|
||||
}
|
||||
|
||||
for(int j=0;j<goodsQy;j++) {
|
||||
LinkedHashMap<String, Object> dlvyMap = new LinkedHashMap<>();
|
||||
|
||||
dlvyMap.put("dftDlvyAmt", itemDftDlvyAmt.intValue());
|
||||
dlvyMap.put("dlvyAmt", itemDlvyAmt.intValue());
|
||||
dlvyMap.put("couponInnb", 0);
|
||||
dlvyMap.put("dwldCouponInnb", 0);
|
||||
dlvyMap.put("dplctDscntAt", "");
|
||||
dlvyMap.put("otrCouponSmtmUseAt", "");
|
||||
dlvyMap.put("mngrFreeDlvyUseAt", "N");
|
||||
dlvyMap.put("dlvylcZip", shipping.get("dlvylcZip"));
|
||||
dlvyMap.put("recpntNm", shipping.get("recpntNm"));
|
||||
dlvyMap.put("recpntMbtlnb", shipping.get("recpntMbtlnb"));
|
||||
dlvyMap.put("dlvylcAdresDvCd", shipping.get("dlvylcAdresDvCd"));
|
||||
dlvyMap.put("dlvylcLnbAdres", shipping.get("dlvylcLnbAdres"));
|
||||
dlvyMap.put("dlvylcRnmAdres", shipping.get("dlvylcRnmAdres"));
|
||||
dlvyMap.put("dlvylcAdresDtl", shipping.get("dlvylcAdresDtl"));
|
||||
dlvyMap.put("dlvyMssageCn", shipping.get("dlvyMssageCn"));
|
||||
dlvyMap.put("goodsList", itemGoodsList);
|
||||
dlvyMap.put("prsntList", itempPrsntList); //prsntList.get(i));
|
||||
|
||||
dlvylcListMulti.add(dlvyMap);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
} else if ("05".equals(ordrTyCd)) { // 여러곳 배송, 선물하기
|
||||
if (!CollectionUtils.isEmpty(multiOrdrDlvylcMap)) {
|
||||
// 배송지 리스트
|
||||
dlvylcListMulti = (List<LinkedHashMap<String, Object>>) multiOrdrDlvylcMap.get("dlvylc");
|
||||
log.debug("dlvylcListMulti : {}", dlvylcListMulti);
|
||||
}
|
||||
}
|
||||
/** 여러곳 배송 배송지 세팅 종료 */
|
||||
|
||||
/* *****************************
|
||||
1. 주문등록(GC_ORDER)
|
||||
***************************** */
|
||||
@@ -128,122 +194,387 @@ public class BOOrderService {
|
||||
|
||||
BOOrderShippingVO shippingEscrowVO = new BOOrderShippingVO();
|
||||
if ("01".equals(ordrTyCd) || "03".equals(ordrTyCd) || "04".equals(ordrTyCd) || "06".equals(ordrTyCd)) { // 일반주문, 회원 개인결제, 정기배송
|
||||
BOOrderShippingVO shippingVO = new BOOrderShippingVO();
|
||||
log.debug("여러곳 배송 > 배송지별 배송정보 => {} ", new Gson().toJson(dlvylcListMulti));
|
||||
|
||||
shippingVO.setSopmalCd(sopmalCd);
|
||||
shippingVO.setOrdrInnb(ordrInnb);
|
||||
shippingVO.setMngrInnb(orderVO.getMngrInnb());
|
||||
shippingVO.setMbrInnb(orderVO.getMbrInnb());
|
||||
shippingVO.setOrdrSttusCd(orderVO.getOrdrSttusCd());
|
||||
shippingVO.setMngrFreeDlvyUseAt(StringUtil.isNullToString(shipping.get("mngrFreeDlvyUseAt")) != "" ? StringUtil.isNullToString(shipping.get("mngrFreeDlvyUseAt")) : "N");
|
||||
// 짜투리 계산을 위해 상품별 수량 체크
|
||||
List<LinkedHashMap> goodsSetList = new ArrayList<>();
|
||||
for (LinkedHashMap multiGoods : goodsList) {
|
||||
int multiGoodsInnb = (int) multiGoods.get("goodsInnb");
|
||||
int multiGoodsOptnInnb = (int) multiGoods.get("goodsOptnInnb");
|
||||
|
||||
/* *****************************************
|
||||
5. 주문배송 정보 등록(GC_ORDER_SHIPPING)
|
||||
***************************************** */
|
||||
LinkedHashMap baseGoods = goodsList.stream()
|
||||
.filter(goods ->
|
||||
Objects.equals((int) goods.get("goodsInnb"), multiGoodsInnb) &&
|
||||
Objects.equals((int) goods.get("goodsOptnInnb"), multiGoodsOptnInnb)
|
||||
)
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
|
||||
insertShipping(ordrTyCd, shipping, shippingVO);
|
||||
shippingEscrowVO = shippingVO; //에스크로에 보낼 배송정보
|
||||
|
||||
BigInteger ordrDlvyInnb = shippingVO.getOrdrDlvyInnb();
|
||||
|
||||
String mngrFreeDlvyUseAt = (String) shipping.get("mngrFreeDlvyUseAt");
|
||||
|
||||
if ("Y".equals(mngrFreeDlvyUseAt)) { // TODO : cjh : 2025-02-28 무료 배송비 : 'Y' 일 경우 애누리에 할인 금액 세팅 -> 배송비 0원에 여부 데이터만 세팅으로 변경 됌.
|
||||
// BigDecimal dscntAmt = new BigDecimal(StringUtils.hasText((String) enuri.get("enuriAmt")) ? (String) enuri.get("enuriAmt") : "0");
|
||||
// BigDecimal mngrFreeDlvyUseAmt = new BigDecimal((String) shipping.get("mngrFreeDlvyUseAmt"));
|
||||
|
||||
// enuri.put("enuriAmt", dscntAmt.add(mngrFreeDlvyUseAmt).toString());
|
||||
}
|
||||
|
||||
// 분배된 할인 금액 누적
|
||||
BOOrderRestAmtVO discountInfo = new BOOrderRestAmtVO();
|
||||
|
||||
int optionSeqIndex = 1;
|
||||
BOOrderNoVO optionNoVO = new BOOrderNoVO();
|
||||
optionNoVO.setOrdrInnb(ordrInnb);
|
||||
for (int i = 0; i < goodsList.size(); i++) {
|
||||
LinkedHashMap goods = goodsList.get(i);
|
||||
|
||||
boolean isLast = i == goodsList.size() - 1;
|
||||
|
||||
if (!CollectionUtils.isEmpty(goods)) {
|
||||
int goodsInnb = (int) goods.get("goodsInnb");
|
||||
int goodsOptnInnb = (int) goods.get("goodsOptnInnb");
|
||||
int ordrQy = (int) goods.get("qy");
|
||||
|
||||
BOOrderItemVO orderItemVO = insertedGoodsList.stream().filter(obj-> Objects.equals(ordrInnb, obj.getOrdrInnb()) &&
|
||||
Objects.equals(BigInteger.valueOf(goodsInnb), obj.getGoodsInnb())).findAny().orElse(null);
|
||||
|
||||
/* ***********************************************
|
||||
6. 주문 상품 옵션 정보 등록(GC_ORDER_ITEM_OPTION)
|
||||
주문 상품 입력 옵션 정보 등록
|
||||
*********************************************** */
|
||||
if (orderItemVO != null) {
|
||||
BOOrderItemOptnVO itemOptnVO = new BOOrderItemOptnVO();
|
||||
|
||||
itemOptnVO.setSopmalCd(sopmalCd);
|
||||
itemOptnVO.setOrdrGoodsInnb(orderItemVO.getOrdrGoodsInnb());
|
||||
itemOptnVO.setOrdrDlvyInnb(ordrDlvyInnb);
|
||||
itemOptnVO.setOrdrInnb(ordrInnb);
|
||||
itemOptnVO.setOrdrSttusCd("0"); // 주문상태(99:결제실패)
|
||||
|
||||
setGoodsOptn(sopmalCd, goodsInnb, goodsOptnInnb, ordrQy, itemOptnVO); // 상품 옵션정보 세팅
|
||||
|
||||
setDscntDtls(goodsInnb, goodsOptnInnb, null, goodsList, shipping, enuri, itemOptnVO, isLast, isLast, discountInfo); // 상품 할인내역 세팅
|
||||
|
||||
if (StringUtils.hasText((String) purchsr.get("mbrId"))) { // 회원
|
||||
setMlgAmt(ordrTyCd, goodsInnb, goodsOptnInnb, ordrQy, goodsList, itemOptnVO); // 상품 마일리지 정보 세팅
|
||||
} else {
|
||||
itemOptnVO.setMlgAccmlUnit(new BigDecimal(0)); // 마일리지적립금액(개당)
|
||||
itemOptnVO.setMlgAccmlRest(new BigDecimal(0)); // 마일리지적립금액(짜투리)
|
||||
}
|
||||
|
||||
itemOptnVO.setOrdrGoodsOptnInnb(orderNoService.generateOrderItemOptnNo());
|
||||
mapper.insertOrdrGoodsOption(itemOptnVO); // 주문 상품 옵션 정보 등록
|
||||
|
||||
String inputOptn = (String) goods.get("inputOptn");
|
||||
|
||||
if (StringUtils.hasText(inputOptn)) {
|
||||
String[] inputOptns = inputOptn.split("/");
|
||||
|
||||
for (int j = 0; j < inputOptns.length; j++) {
|
||||
String optn = inputOptns[j];
|
||||
String[] optns = optn.split(",");
|
||||
|
||||
BOOrderItemOptnVO inputOptnVO = new BOOrderItemOptnVO();
|
||||
|
||||
inputOptnVO.setSopmalCd(sopmalCd); // 쇼핑몰 코드
|
||||
inputOptnVO.setOrdrGoodsInnb(orderItemVO.getOrdrGoodsInnb()); // 주문상품 고유번호
|
||||
inputOptnVO.setOrdrDlvyInnb(ordrDlvyInnb); // 주문배송 고유번호
|
||||
inputOptnVO.setOrdrSttusCd(orderVO.getOrdrSttusCd());
|
||||
inputOptnVO.setRelateOrdrGoodsOptnInnb(itemOptnVO.getOrdrGoodsOptnInnb());
|
||||
|
||||
setGoodsOptn(optns[0], Integer.parseInt(optns[1]), Integer.parseInt(optns[2]), 0, inputOptnVO);
|
||||
|
||||
if (i == 0) {
|
||||
inputOptnVO.setOptnVal1(optns[3]);
|
||||
} else if (i == 1) {
|
||||
inputOptnVO.setOptnVal2(optns[3]);
|
||||
} else if (i == 2) {
|
||||
inputOptnVO.setOptnVal3(optns[3]);
|
||||
} else if (i == 3) {
|
||||
inputOptnVO.setOptnVal4(optns[3]);
|
||||
}
|
||||
|
||||
itemOptnVO.setOrdrGoodsOptnInnb(orderNoService.generateOrderItemOptnNo());
|
||||
mapper.insertOrdrGoodsOption(inputOptnVO); // 주문 상품 입력 옵션 정보 등록
|
||||
}
|
||||
}
|
||||
}
|
||||
if (baseGoods != null) {
|
||||
LinkedHashMap merged = new LinkedHashMap<>(baseGoods);
|
||||
merged.put("setQy", 0);
|
||||
goodsSetList.add(merged);
|
||||
}
|
||||
}
|
||||
|
||||
/* ***********************************************************
|
||||
7. 주문 상품 옵션(사은품) 정보 등록(GC_ORDER_ITEM_OPTION)
|
||||
*********************************************************** */
|
||||
if (!CollectionUtils.isEmpty(prsntList)) {
|
||||
insertPrsnt(sopmalCd, ordrInnb, shippingVO.getOrdrDlvyInnb(), prsntList);
|
||||
log.debug("상품별 수량 체크 : {}", goodsSetList);
|
||||
|
||||
|
||||
if (!CollectionUtils.isEmpty(dlvylcListMulti)) {
|
||||
|
||||
// 배송지별 상품 수량 합산 - isLast 찾기 위함.
|
||||
List<LinkedHashMap<String, Object>> allMergedGoodsList = new ArrayList<>();
|
||||
|
||||
for (LinkedHashMap<String, Object> dlvylcMapMulti : dlvylcListMulti) {
|
||||
List<LinkedHashMap> goodsListMulti = (List<LinkedHashMap>) dlvylcMapMulti.get("goodsList");
|
||||
|
||||
for (LinkedHashMap multiGoods : goodsListMulti) {
|
||||
int multiGoodsInnb = (int) multiGoods.get("goodsInnb");
|
||||
int multiGoodsOptnInnb = (int) multiGoods.get("goodsOptnInnb");
|
||||
|
||||
LinkedHashMap baseGoods = goodsList.stream()
|
||||
.filter(goods ->
|
||||
Objects.equals((int) goods.get("goodsInnb"), multiGoodsInnb) &&
|
||||
Objects.equals((int) goods.get("goodsOptnInnb"), multiGoodsOptnInnb)
|
||||
)
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
|
||||
if (baseGoods != null) {
|
||||
LinkedHashMap<String, Object> merged = new LinkedHashMap<>(baseGoods);
|
||||
allMergedGoodsList.add(merged);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 분배된 할인 금액 누적
|
||||
BOOrderRestAmtVO discountInfo = new BOOrderRestAmtVO();
|
||||
int allGoodsCount = 0; // 전체 상품 순번
|
||||
|
||||
for (LinkedHashMap<String, Object> dlvylcMapMulti : dlvylcListMulti) {
|
||||
log.debug("dlvylcMapMulti : {}", dlvylcMapMulti);
|
||||
|
||||
BOOrderShippingVO shippingVO = new BOOrderShippingVO();
|
||||
|
||||
shippingVO.setSopmalCd(sopmalCd);
|
||||
shippingVO.setOrdrInnb(ordrInnb);
|
||||
shippingVO.setMngrInnb(orderVO.getMngrInnb());
|
||||
shippingVO.setMbrInnb(orderVO.getMbrInnb());
|
||||
shippingVO.setOrdrSttusCd(orderVO.getOrdrSttusCd());
|
||||
shippingVO.setMngrFreeDlvyUseAt(StringUtil.isNullToString(dlvylcMapMulti.get("mngrFreeDlvyUseAt")) != "" ? StringUtil.isNullToString(dlvylcMapMulti.get("mngrFreeDlvyUseAt")) : "N");
|
||||
|
||||
/* *****************************************
|
||||
5. 주문배송 정보 등록(GC_ORDER_SHIPPING)
|
||||
***************************************** */
|
||||
insertShipping(ordrTyCd, dlvylcMapMulti, shippingVO);
|
||||
shippingEscrowVO = shippingVO; //에스크로에 보낼 배송정보
|
||||
|
||||
BigInteger ordrDlvyInnb = shippingVO.getOrdrDlvyInnb();
|
||||
|
||||
String mngrFreeDlvyUseAt = (String) dlvylcMapMulti.get("mngrFreeDlvyUseAt");
|
||||
|
||||
if ("Y".equals(mngrFreeDlvyUseAt)) { // TODO : cjh : 2025-02-28 무료 배송비 : 'Y' 일 경우 애누리에 할인 금액 세팅 -> 배송비 0원에 여부 데이터만 세팅으로 변경 됌.
|
||||
// BigDecimal dscntAmt = new BigDecimal(StringUtils.hasText((String) enuri.get("enuriAmt")) ? (String) enuri.get("enuriAmt") : "0");
|
||||
// BigDecimal mngrFreeDlvyUseAmt = new BigDecimal((String) dlvylcMapMulti.get("mngrFreeDlvyUseAmt"));
|
||||
|
||||
// enuri.put("enuriAmt", dscntAmt.add(mngrFreeDlvyUseAmt).toString());
|
||||
}
|
||||
|
||||
|
||||
List<LinkedHashMap> goodsListMulti = (List<LinkedHashMap>) dlvylcMapMulti.get("goodsList");
|
||||
|
||||
List<LinkedHashMap> mergedGoodsList = new ArrayList<>();
|
||||
|
||||
/** CJH
|
||||
* 배송지별 상품 정보 머지
|
||||
* 여러곳 배송일 경우 서버에서 계산해온 상품 정보를 배송지별 수량에 맞게 분배하다보니
|
||||
* 상품 정보와 배송지별 수량정보를 합쳐주는 작업이 필요함
|
||||
* * 일반 주분에서 이벤트 할인 금액, 쿠폰 적용 처리, 적립 마일리지 계산을 배송지별로 계속해서 계산하는데에 어려움이 있어 상품은 유지하고 배송지별로 분배하는 방법을 채택함.
|
||||
*/
|
||||
for (LinkedHashMap multiGoods : goodsListMulti) {
|
||||
int multiGoodsInnb = (int) multiGoods.get("goodsInnb");
|
||||
int multiGoodsOptnInnb = (int) multiGoods.get("goodsOptnInnb");
|
||||
|
||||
// 머지대상
|
||||
int qy = (int) multiGoods.get("qy"); // 주문 수량
|
||||
|
||||
// goodsList에서 상세 정보 찾기
|
||||
LinkedHashMap baseGoods = goodsList.stream()
|
||||
.filter(goods ->
|
||||
Objects.equals((int) goods.get("goodsInnb"), multiGoodsInnb) &&
|
||||
Objects.equals((int) goods.get("goodsOptnInnb"), multiGoodsOptnInnb)
|
||||
)
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
|
||||
if (baseGoods != null) {
|
||||
// 병합
|
||||
LinkedHashMap<String, Object> merged = new LinkedHashMap<>(baseGoods);
|
||||
merged.put("baseQy", merged.get("qy")); // 총 상품별 주문 수량 유지
|
||||
merged.put("qy", qy); // 수량은 배송지별 정보 우선
|
||||
mergedGoodsList.add(merged);
|
||||
}
|
||||
}
|
||||
|
||||
log.debug("머지 작업 후 mergedGoodsList : {}", mergedGoodsList);
|
||||
log.debug("머지 작업 후 goodsList : {}", goodsList);
|
||||
|
||||
|
||||
/** ------------------------------------------- 사은품 세팅 시작 ------------------------------------------- */
|
||||
List<LinkedHashMap> prsntListMulti = (List<LinkedHashMap>) dlvylcMapMulti.get("prsntList");
|
||||
|
||||
List<LinkedHashMap> mergedPrsntList = new ArrayList<>();
|
||||
|
||||
/** CJH
|
||||
* 배송지별 상품 정보 머지
|
||||
* 여러곳 배송일 경우 서버에서 계산해온 상품 정보를 배송지별 수량에 맞게 분배하다보니
|
||||
* 상품 정보와 배송지별 수량정보를 합쳐주는 작업이 필요함
|
||||
* * 일반 주분에서 이벤트 할인 금액, 쿠폰 적용 처리, 적립 마일리지 계산을 배송지별로 계속해서 계산하는데에 어려움이 있어 상품은 유지하고 배송지별로 분배하는 방법을 채택함.
|
||||
*/
|
||||
for (LinkedHashMap multiGoods : prsntListMulti) {
|
||||
int multiGoodsInnb = (int) multiGoods.get("goodsInnb");
|
||||
int multiGoodsOptnInnb = (int) multiGoods.get("goodsOptnInnb");
|
||||
|
||||
// 머지대상
|
||||
int qy = (int) multiGoods.get("provdCnt"); // 주문 수량
|
||||
|
||||
// goodsList에서 상세 정보 찾기
|
||||
LinkedHashMap baseGoods = prsntList.stream()
|
||||
.filter(goods ->
|
||||
Objects.equals((int) goods.get("goodsInnb"), multiGoodsInnb) &&
|
||||
Objects.equals((int) goods.get("goodsOptnInnb"), multiGoodsOptnInnb)
|
||||
)
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
|
||||
if (baseGoods != null) {
|
||||
// 병합
|
||||
LinkedHashMap<String, Object> merged = new LinkedHashMap<>(baseGoods);
|
||||
merged.put("baseQy", merged.get("provdCnt")); // 총 상품별 주문 수량 유지
|
||||
merged.put("provdCnt", qy); // 수량은 배송지별 정보 우선
|
||||
mergedPrsntList.add(merged);
|
||||
}
|
||||
}
|
||||
|
||||
log.debug("머지 작업 후 mergedPrsntList : {}", mergedPrsntList);
|
||||
log.debug("머지 작업 후 prsntList : {}", prsntList);
|
||||
/** ------------------------------------------- 사은품 세팅 끝 ------------------------------------------- */
|
||||
|
||||
|
||||
|
||||
for (int i = 0; i < mergedGoodsList.size(); i++) {
|
||||
LinkedHashMap goods = mergedGoodsList.get(i);
|
||||
|
||||
boolean isLast = allGoodsCount == allMergedGoodsList.size() - 1;
|
||||
|
||||
if (!CollectionUtils.isEmpty(goods)) {
|
||||
int goodsInnb = (int) goods.get("goodsInnb");
|
||||
int goodsOptnInnb = (int) goods.get("goodsOptnInnb");
|
||||
int ordrQy = (int) goods.get("qy");
|
||||
|
||||
BOOrderItemVO orderItemVO = insertedGoodsList.stream().filter(obj-> Objects.equals(ordrInnb, obj.getOrdrInnb()) &&
|
||||
Objects.equals(BigInteger.valueOf(goodsInnb), obj.getGoodsInnb())).findAny().orElse(null);
|
||||
|
||||
/* ***********************************************
|
||||
6. 주문 상품 옵션 정보 등록(GC_ORDER_ITEM_OPTION)
|
||||
주문 상품 입력 옵션 정보 등록
|
||||
*********************************************** */
|
||||
if (orderItemVO != null) {
|
||||
BOOrderItemOptnVO itemOptnVO = new BOOrderItemOptnVO();
|
||||
|
||||
itemOptnVO.setSopmalCd(sopmalCd);
|
||||
itemOptnVO.setOrdrGoodsInnb(orderItemVO.getOrdrGoodsInnb());
|
||||
itemOptnVO.setOrdrDlvyInnb(ordrDlvyInnb);
|
||||
itemOptnVO.setOrdrInnb(ordrInnb);
|
||||
itemOptnVO.setOrdrSttusCd("0"); // 주문상태(99:결제실패)
|
||||
|
||||
setGoodsOptn(sopmalCd, goodsInnb, goodsOptnInnb, ordrQy, itemOptnVO); // 상품 옵션정보 세팅
|
||||
|
||||
LinkedHashMap goodsSet = goodsSetList.stream().filter(obj-> Objects.equals(goodsInnb, obj.get("goodsInnb")) && Objects.equals(goodsOptnInnb, obj.get("goodsOptnInnb"))).findAny().orElse(null);
|
||||
|
||||
setDscntDtlsMulti(goodsInnb, goodsOptnInnb, null, mergedGoodsList, dlvylcMapMulti, enuri, itemOptnVO, isLast, isLast, discountInfo, goodsList, goodsSet); // 상품 할인내역 세팅 - 여러곳 배송
|
||||
|
||||
if (StringUtils.hasText((String) purchsr.get("mbrId"))) { // 회원
|
||||
setMlgAmtMulti(ordrTyCd, goodsInnb, goodsOptnInnb, ordrQy, mergedGoodsList, itemOptnVO, goodsSet); // 상품 마일리지 정보 세팅 - 여러곳 배송
|
||||
} else {
|
||||
itemOptnVO.setMlgAccmlUnit(new BigDecimal(0)); // 마일리지적립금액(개당)
|
||||
itemOptnVO.setMlgAccmlRest(new BigDecimal(0)); // 마일리지적립금액(짜투리)
|
||||
}
|
||||
|
||||
itemOptnVO.setOrdrGoodsOptnInnb(orderNoService.generateOrderItemOptnNo());
|
||||
mapper.insertOrdrGoodsOption(itemOptnVO); // 주문 상품 옵션 정보 등록
|
||||
|
||||
// 상품별 수량 체크
|
||||
goodsSet.put("setQy", (int) goodsSet.get("setQy") + ordrQy);
|
||||
|
||||
String inputOptn = (String) goods.get("inputOptn");
|
||||
|
||||
if (StringUtils.hasText(inputOptn)) {
|
||||
String[] inputOptns = inputOptn.split("/");
|
||||
|
||||
for (int j = 0; j < inputOptns.length; j++) {
|
||||
String optn = inputOptns[j];
|
||||
String[] optns = optn.split(",");
|
||||
|
||||
BOOrderItemOptnVO inputOptnVO = new BOOrderItemOptnVO();
|
||||
|
||||
inputOptnVO.setSopmalCd(sopmalCd); // 쇼핑몰 코드
|
||||
inputOptnVO.setOrdrGoodsInnb(orderItemVO.getOrdrGoodsInnb()); // 주문상품 고유번호
|
||||
inputOptnVO.setOrdrDlvyInnb(ordrDlvyInnb); // 주문배송 고유번호
|
||||
inputOptnVO.setOrdrSttusCd(orderVO.getOrdrSttusCd());
|
||||
inputOptnVO.setRelateOrdrGoodsOptnInnb(itemOptnVO.getOrdrGoodsOptnInnb());
|
||||
|
||||
setGoodsOptn(optns[0], Integer.parseInt(optns[1]), Integer.parseInt(optns[2]), 0, inputOptnVO);
|
||||
|
||||
if (i == 0) {
|
||||
inputOptnVO.setOptnVal1(optns[3]);
|
||||
} else if (i == 1) {
|
||||
inputOptnVO.setOptnVal2(optns[3]);
|
||||
} else if (i == 2) {
|
||||
inputOptnVO.setOptnVal3(optns[3]);
|
||||
} else if (i == 3) {
|
||||
inputOptnVO.setOptnVal4(optns[3]);
|
||||
}
|
||||
|
||||
itemOptnVO.setOrdrGoodsOptnInnb(orderNoService.generateOrderItemOptnNo());
|
||||
mapper.insertOrdrGoodsOption(inputOptnVO); // 주문 상품 입력 옵션 정보 등록
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 전체 수량의 마지막 체크
|
||||
allGoodsCount = allGoodsCount + 1;
|
||||
}
|
||||
|
||||
/* ***********************************************************
|
||||
7. 주문 상품 옵션(사은품) 정보 등록(GC_ORDER_ITEM_OPTION)
|
||||
*********************************************************** */
|
||||
if (!CollectionUtils.isEmpty(prsntList)) {
|
||||
insertPrsnt(sopmalCd, ordrInnb, ordrDlvyInnb, mergedPrsntList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// BOOrderShippingVO shippingVO = new BOOrderShippingVO();
|
||||
//
|
||||
// shippingVO.setSopmalCd(sopmalCd);
|
||||
// shippingVO.setOrdrInnb(ordrInnb);
|
||||
// shippingVO.setMngrInnb(orderVO.getMngrInnb());
|
||||
// shippingVO.setMbrInnb(orderVO.getMbrInnb());
|
||||
// shippingVO.setOrdrSttusCd(orderVO.getOrdrSttusCd());
|
||||
// shippingVO.setMngrFreeDlvyUseAt(StringUtil.isNullToString(shipping.get("mngrFreeDlvyUseAt")) != "" ? StringUtil.isNullToString(shipping.get("mngrFreeDlvyUseAt")) : "N");
|
||||
//
|
||||
// /* *****************************************
|
||||
// 5. 주문배송 정보 등록(GC_ORDER_SHIPPING)
|
||||
// ***************************************** */
|
||||
//
|
||||
// insertShipping(ordrTyCd, shipping, shippingVO);
|
||||
// shippingEscrowVO = shippingVO; //에스크로에 보낼 배송정보
|
||||
//
|
||||
// BigInteger ordrDlvyInnb = shippingVO.getOrdrDlvyInnb();
|
||||
//
|
||||
// String mngrFreeDlvyUseAt = (String) shipping.get("mngrFreeDlvyUseAt");
|
||||
//
|
||||
// if ("Y".equals(mngrFreeDlvyUseAt)) { // TODO : cjh : 2025-02-28 무료 배송비 : 'Y' 일 경우 애누리에 할인 금액 세팅 -> 배송비 0원에 여부 데이터만 세팅으로 변경 됌.
|
||||
//// BigDecimal dscntAmt = new BigDecimal(StringUtils.hasText((String) enuri.get("enuriAmt")) ? (String) enuri.get("enuriAmt") : "0");
|
||||
//// BigDecimal mngrFreeDlvyUseAmt = new BigDecimal((String) shipping.get("mngrFreeDlvyUseAmt"));
|
||||
//
|
||||
// // enuri.put("enuriAmt", dscntAmt.add(mngrFreeDlvyUseAmt).toString());
|
||||
// }
|
||||
//
|
||||
// // 분배된 할인 금액 누적
|
||||
// BOOrderRestAmtVO discountInfo = new BOOrderRestAmtVO();
|
||||
//
|
||||
// int optionSeqIndex = 1;
|
||||
// BOOrderNoVO optionNoVO = new BOOrderNoVO();
|
||||
// optionNoVO.setOrdrInnb(ordrInnb);
|
||||
// for (int i = 0; i < goodsList.size(); i++) {
|
||||
// LinkedHashMap goods = goodsList.get(i);
|
||||
//
|
||||
// boolean isLast = i == goodsList.size() - 1;
|
||||
//
|
||||
// if (!CollectionUtils.isEmpty(goods)) {
|
||||
// int goodsInnb = (int) goods.get("goodsInnb");
|
||||
// int goodsOptnInnb = (int) goods.get("goodsOptnInnb");
|
||||
// int ordrQy = (int) goods.get("qy");
|
||||
//
|
||||
// BOOrderItemVO orderItemVO = insertedGoodsList.stream().filter(obj-> Objects.equals(ordrInnb, obj.getOrdrInnb()) &&
|
||||
// Objects.equals(BigInteger.valueOf(goodsInnb), obj.getGoodsInnb())).findAny().orElse(null);
|
||||
//
|
||||
// /* ***********************************************
|
||||
// 6. 주문 상품 옵션 정보 등록(GC_ORDER_ITEM_OPTION)
|
||||
// 주문 상품 입력 옵션 정보 등록
|
||||
// *********************************************** */
|
||||
// if (orderItemVO != null) {
|
||||
// BOOrderItemOptnVO itemOptnVO = new BOOrderItemOptnVO();
|
||||
//
|
||||
// itemOptnVO.setSopmalCd(sopmalCd);
|
||||
// itemOptnVO.setOrdrGoodsInnb(orderItemVO.getOrdrGoodsInnb());
|
||||
// itemOptnVO.setOrdrDlvyInnb(ordrDlvyInnb);
|
||||
// itemOptnVO.setOrdrInnb(ordrInnb);
|
||||
// itemOptnVO.setOrdrSttusCd("0"); // 주문상태(99:결제실패)
|
||||
//
|
||||
// setGoodsOptn(sopmalCd, goodsInnb, goodsOptnInnb, ordrQy, itemOptnVO); // 상품 옵션정보 세팅
|
||||
//
|
||||
// setDscntDtls(goodsInnb, goodsOptnInnb, null, goodsList, shipping, enuri, itemOptnVO, isLast, isLast, discountInfo); // 상품 할인내역 세팅
|
||||
//
|
||||
// if (StringUtils.hasText((String) purchsr.get("mbrId"))) { // 회원
|
||||
// setMlgAmt(ordrTyCd, goodsInnb, goodsOptnInnb, ordrQy, goodsList, itemOptnVO); // 상품 마일리지 정보 세팅
|
||||
// } else {
|
||||
// itemOptnVO.setMlgAccmlUnit(new BigDecimal(0)); // 마일리지적립금액(개당)
|
||||
// itemOptnVO.setMlgAccmlRest(new BigDecimal(0)); // 마일리지적립금액(짜투리)
|
||||
// }
|
||||
//
|
||||
// itemOptnVO.setOrdrGoodsOptnInnb(orderNoService.generateOrderItemOptnNo());
|
||||
// mapper.insertOrdrGoodsOption(itemOptnVO); // 주문 상품 옵션 정보 등록
|
||||
//
|
||||
// String inputOptn = (String) goods.get("inputOptn");
|
||||
//
|
||||
// if (StringUtils.hasText(inputOptn)) {
|
||||
// String[] inputOptns = inputOptn.split("/");
|
||||
//
|
||||
// for (int j = 0; j < inputOptns.length; j++) {
|
||||
// String optn = inputOptns[j];
|
||||
// String[] optns = optn.split(",");
|
||||
//
|
||||
// BOOrderItemOptnVO inputOptnVO = new BOOrderItemOptnVO();
|
||||
//
|
||||
// inputOptnVO.setSopmalCd(sopmalCd); // 쇼핑몰 코드
|
||||
// inputOptnVO.setOrdrGoodsInnb(orderItemVO.getOrdrGoodsInnb()); // 주문상품 고유번호
|
||||
// inputOptnVO.setOrdrDlvyInnb(ordrDlvyInnb); // 주문배송 고유번호
|
||||
// inputOptnVO.setOrdrSttusCd(orderVO.getOrdrSttusCd());
|
||||
// inputOptnVO.setRelateOrdrGoodsOptnInnb(itemOptnVO.getOrdrGoodsOptnInnb());
|
||||
//
|
||||
// setGoodsOptn(optns[0], Integer.parseInt(optns[1]), Integer.parseInt(optns[2]), 0, inputOptnVO);
|
||||
//
|
||||
// if (i == 0) {
|
||||
// inputOptnVO.setOptnVal1(optns[3]);
|
||||
// } else if (i == 1) {
|
||||
// inputOptnVO.setOptnVal2(optns[3]);
|
||||
// } else if (i == 2) {
|
||||
// inputOptnVO.setOptnVal3(optns[3]);
|
||||
// } else if (i == 3) {
|
||||
// inputOptnVO.setOptnVal4(optns[3]);
|
||||
// }
|
||||
//
|
||||
// itemOptnVO.setOrdrGoodsOptnInnb(orderNoService.generateOrderItemOptnNo());
|
||||
// mapper.insertOrdrGoodsOption(inputOptnVO); // 주문 상품 입력 옵션 정보 등록
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /* ***********************************************************
|
||||
// 7. 주문 상품 옵션(사은품) 정보 등록(GC_ORDER_ITEM_OPTION)
|
||||
// *********************************************************** */
|
||||
// if (!CollectionUtils.isEmpty(prsntList)) {
|
||||
// insertPrsnt(sopmalCd, ordrInnb, shippingVO.getOrdrDlvyInnb(), prsntList);
|
||||
// }
|
||||
} else if ("05".equals(ordrTyCd)) { // 여러곳 배송, 선물하기
|
||||
log.debug("여러곳 배송 > 배송지별 배송정보 => {} ", new Gson().toJson(dlvylcListMulti));
|
||||
|
||||
@@ -1219,18 +1550,30 @@ public class BOOrderService {
|
||||
shippingVO.setDlvyMthCd("01"); // 택배
|
||||
|
||||
if ("01".equals(ordrTyCd) || "03".equals(ordrTyCd) || "06".equals(ordrTyCd)) { // 일반주문, 회원개인결제, 정기배송
|
||||
shippingVO.setRecpntNm((String) shipping.get("recpntNm"));
|
||||
shippingVO.setRecpntTelnb((String) shipping.get("recpntTelnb"));
|
||||
shippingVO.setRecpntMbtlnb((String) shipping.get("recpntMbtlnb"));
|
||||
shippingVO.setRecpntNm(StringUtil.isNullToString(shipping.get("recpntNm")));
|
||||
shippingVO.setRecpntTelnb(StringUtil.isNullToString(shipping.get("recpntTelnb")));
|
||||
shippingVO.setRecpntMbtlnb(StringUtil.isNullToString(shipping.get("recpntMbtlnb")));
|
||||
|
||||
shippingVO.setDlvylcZip((String) shipping.get("dlvylcZip"));
|
||||
shippingVO.setDlvylcAdresDvCd((String) shipping.get("dlvylcAdresDvCd"));
|
||||
shippingVO.setDlvylcLnbAdres((String) shipping.get("dlvylcLnbAdres"));
|
||||
shippingVO.setDlvylcRnmAdres((String) shipping.get("dlvylcRnmAdres"));
|
||||
shippingVO.setDlvylcAdresDtl((String) shipping.get("dlvylcAdresDtl"));
|
||||
shippingVO.setDlvylcZip(StringUtil.isNullToString(shipping.get("dlvylcZip")));
|
||||
shippingVO.setDlvylcAdresDvCd(StringUtil.isNullToString(shipping.get("dlvylcAdresDvCd")));
|
||||
shippingVO.setDlvylcLnbAdres(StringUtil.isNullToString(shipping.get("dlvylcLnbAdres")));
|
||||
shippingVO.setDlvylcRnmAdres(StringUtil.isNullToString(shipping.get("dlvylcRnmAdres")));
|
||||
shippingVO.setDlvylcAdresDtl(StringUtil.isNullToString(shipping.get("dlvylcAdresDtl")));
|
||||
|
||||
shippingVO.setDlvyMssageCn((String) shipping.get("dlvyMssageCn"));
|
||||
shippingVO.setDlvyCycleCd((String) shipping.get("dlvyCycleCd"));
|
||||
shippingVO.setDlvyMssageCn(StringUtil.isNullToString(shipping.get("dlvyMssageCn")));
|
||||
shippingVO.setDlvyCycleCd(StringUtil.isNullToString(shipping.get("dlvyCycleCd")));
|
||||
// shippingVO.setRecpntNm((String) shipping.get("recpntNm"));
|
||||
// shippingVO.setRecpntTelnb((String) shipping.get("recpntTelnb"));
|
||||
// shippingVO.setRecpntMbtlnb((String) shipping.get("recpntMbtlnb"));
|
||||
//
|
||||
// shippingVO.setDlvylcZip((String) shipping.get("dlvylcZip"));
|
||||
// shippingVO.setDlvylcAdresDvCd((String) shipping.get("dlvylcAdresDvCd"));
|
||||
// shippingVO.setDlvylcLnbAdres((String) shipping.get("dlvylcLnbAdres"));
|
||||
// shippingVO.setDlvylcRnmAdres((String) shipping.get("dlvylcRnmAdres"));
|
||||
// shippingVO.setDlvylcAdresDtl((String) shipping.get("dlvylcAdresDtl"));
|
||||
//
|
||||
// shippingVO.setDlvyMssageCn((String) shipping.get("dlvyMssageCn"));
|
||||
// shippingVO.setDlvyCycleCd((String) shipping.get("dlvyCycleCd"));
|
||||
}
|
||||
|
||||
if ("05".equals(ordrTyCd)) { // 여러곳 배송
|
||||
@@ -2194,6 +2537,9 @@ public class BOOrderService {
|
||||
throw new WnbtRestException("주문배송 정보를 찾을 수 없습니다.");
|
||||
}
|
||||
} else {
|
||||
// if (CollectionUtils.isEmpty(multiOrdrDlvylc)) {
|
||||
// throw new WnbtRestException("주문배송 정보를 찾을 수 없습니다.");
|
||||
// }
|
||||
if (CollectionUtils.isEmpty(shipping)) {
|
||||
throw new WnbtRestException("주문배송 정보를 찾을 수 없습니다.");
|
||||
}
|
||||
|
||||
@@ -177,6 +177,7 @@ public class BOPurchsService {
|
||||
public DataMap selectDftDlvylc(BOPurchsrVO purchsrVO) {
|
||||
DataMap dftDlvylc = new DataMap();
|
||||
|
||||
//기본배송지여부
|
||||
purchsrVO.setDftDlvylcAt("Y");
|
||||
|
||||
List<DataMap> dlvylcAdresList = mapper.selectDlvylcList(purchsrVO);
|
||||
@@ -1854,6 +1855,8 @@ public class BOPurchsService {
|
||||
}};
|
||||
|
||||
String defaultAdressAt = "";
|
||||
String dlvylcAreaCd = (String) param.get("dlvylcAreaCd");
|
||||
String prefcd = (String) param.get("prefcd");
|
||||
|
||||
List<LinkedHashMap> goodsList = (List<LinkedHashMap>) param.get("goodsList");
|
||||
|
||||
@@ -1922,7 +1925,7 @@ public class BOPurchsService {
|
||||
if (dlvylc.get("dlvyAmt") != null) {
|
||||
dlvyAmtBydlvylc = dlvyAmtBydlvylc + castAmt(dlvylc, "dlvyAmt");
|
||||
} else {
|
||||
dlvyAmtMap = getDlvyAmt(goodsList, sopmalCd, defaultAdressAt);
|
||||
dlvyAmtMap = getDlvyAmt(goodsList, sopmalCd, defaultAdressAt, dlvylcAreaCd);
|
||||
|
||||
if (!CollectionUtils.isEmpty(dlvyAmtMap)) {
|
||||
dlvyAmtBydlvylc = ((BigDecimal) dlvyAmtMap.get("dlvyAmt")).intValue();
|
||||
@@ -1947,7 +1950,7 @@ public class BOPurchsService {
|
||||
if (dlvylcMap.get("dlvyAmt") != null) {
|
||||
dlvyAmtBydlvylc = dlvyAmtBydlvylc + castAmt(dlvylcMap, "dlvyAmt");
|
||||
} else {
|
||||
dlvyAmtMap = getDlvyAmt(goodsList, sopmalCd, defaultAdressAt);
|
||||
dlvyAmtMap = getDlvyAmt(goodsList, sopmalCd, defaultAdressAt, dlvylcAreaCd);
|
||||
|
||||
if (!CollectionUtils.isEmpty(dlvyAmtMap)) {
|
||||
dlvyAmtBydlvylc = ((BigDecimal) dlvyAmtMap.get("dlvyAmt")).intValue();
|
||||
@@ -1958,7 +1961,7 @@ public class BOPurchsService {
|
||||
dlvyAmt = new BigDecimal(dlvyAmtBydlvylc);
|
||||
}
|
||||
} else {
|
||||
dlvyAmtMap = getDlvyAmt(goodsList, sopmalCd, defaultAdressAt);
|
||||
dlvyAmtMap = getDlvyAmt(goodsList, sopmalCd, defaultAdressAt, dlvylcAreaCd);
|
||||
|
||||
if (!CollectionUtils.isEmpty(dlvyAmtMap)) {
|
||||
dlvyAmt = (BigDecimal) dlvyAmtMap.get("dlvyAmt");
|
||||
@@ -2104,9 +2107,10 @@ public class BOPurchsService {
|
||||
* @param goodsList
|
||||
* @return List<DataMap>
|
||||
*/
|
||||
public DataMap getDlvyAmt(List<LinkedHashMap> goodsList, String sopmalCd, String defaultAdressAt) {
|
||||
public DataMap getDlvyAmt(List<LinkedHashMap> goodsList, String sopmalCd, String defaultAdressAt, String dlvylcAreaCd) {
|
||||
DataMap dlvyAmtMap = null;
|
||||
log.debug("우편번호 확인 : {}", defaultAdressAt);
|
||||
log.debug("getDlvyAmt-goodsList : {}", goodsList);
|
||||
|
||||
BigDecimal rlDlvyAmt = new BigDecimal(0); // 실 최종 배송비
|
||||
|
||||
@@ -2158,6 +2162,9 @@ public class BOPurchsService {
|
||||
for (Map.Entry<BigInteger, List<DataMap>> dlvyGroupEtry : goodsByDlvyGroupMap.entrySet()) {
|
||||
int dlvyGroupInnb = dlvyGroupEtry.getKey().intValue();
|
||||
List<DataMap> goodsByDlvyGroupList = dlvyGroupEtry.getValue();
|
||||
log.debug("goodsByDlvyGroupList : {}", goodsByDlvyGroupList);
|
||||
// BigDecimal goodsQy = (BigDecimal) goodsByDlvyGroupList.get("qy");
|
||||
// log.debug("goodsByDlvyGroupList qy : {}", qy);
|
||||
|
||||
finalDlvyGroupInnb = dlvyGroupInnb;
|
||||
|
||||
@@ -2168,38 +2175,65 @@ public class BOPurchsService {
|
||||
|
||||
DataMap shippingGrouping = mapper.selectShippingGrouping(param);
|
||||
|
||||
//"KR".equals(dlvylcAreaCd)인 경우
|
||||
String dlvyGroupDvCd = (String) shippingGrouping.get("dlvyGroupDvCd");
|
||||
BigDecimal dftDlvyAmt = (BigDecimal) shippingGrouping.get("dftDlvyAmt"); // 기본배송비
|
||||
BigDecimal dlvyAmt = dftDlvyAmt; // 배송비
|
||||
String dlvyAreaAditAt = (String) shippingGrouping.get("dlvyAreaAditAt"); // 도서산간 추가 배송비 조건
|
||||
BigDecimal areaAditDlvyAmt = (BigDecimal) shippingGrouping.get("areaAditDlvyAmt"); // 도서산간 추가 배송비
|
||||
String amtCndUseAt = (String) shippingGrouping.get("amtCndUseAt"); // 금액조건
|
||||
BigDecimal amtCndAditAmt = (BigDecimal) shippingGrouping.get("amtCndAditAmt");
|
||||
String cntCndUseAt = (String) shippingGrouping.get("cntCndUseAt"); // 수량조건
|
||||
BigDecimal cntCndAditAmt = (BigDecimal) shippingGrouping.get("cntCndAditAmt"); // 수량
|
||||
|
||||
if("JP".equals(dlvylcAreaCd)){
|
||||
// dlvyGroupDvCd = (String) shippingGrouping.get("dlvyGroupDvCd2");
|
||||
dftDlvyAmt = (BigDecimal) shippingGrouping.get("dftDlvyAmt2"); // 기본배송비
|
||||
dlvyAmt = dftDlvyAmt; // 배송비
|
||||
dlvyAreaAditAt = (String) shippingGrouping.get("dlvyAreaAditAt2"); // 도서산간 추가 배송비 조건
|
||||
areaAditDlvyAmt = (BigDecimal) shippingGrouping.get("areaAditDlvyAmt2"); // 도서산간 추가 배송비
|
||||
amtCndUseAt = (String) shippingGrouping.get("amtCndUseAt2"); // 금액조건
|
||||
amtCndAditAmt = (BigDecimal) shippingGrouping.get("amtCndAditAmt");
|
||||
cntCndUseAt = (String) shippingGrouping.get("cntCndUseAt2"); // 수량조건
|
||||
cntCndAditAmt = (BigDecimal) shippingGrouping.get("cntCndAditAmt2"); // 수량
|
||||
}
|
||||
|
||||
// 무료배송(조건부)
|
||||
if ("01".equals(dlvyGroupDvCd)) {
|
||||
// 조건(적용상품이 1건일 경우)
|
||||
String amtCndUseAt = (String) shippingGrouping.get("amtCndUseAt"); // 금액조건
|
||||
String cntCndUseAt = (String) shippingGrouping.get("cntCndUseAt"); // 수량조건
|
||||
// String amtCndUseAt = (String) shippingGrouping.get("amtCndUseAt"); // 금액조건
|
||||
// String cntCndUseAt = (String) shippingGrouping.get("cntCndUseAt"); // 수량조건
|
||||
|
||||
for (DataMap goodsMap : goodsByDlvyGroupList) {
|
||||
|
||||
// BigDecimal qy = (BigDecimal) goodsMap.get("qy"); // 수량
|
||||
|
||||
// 금액 조건
|
||||
if ("Y".equals(amtCndUseAt)) {
|
||||
BigDecimal amtCndAditAmt = (BigDecimal) shippingGrouping.get("amtCndAditAmt"); // 금액조건 추가금액
|
||||
// BigDecimal amtCndAditAmt = (BigDecimal) shippingGrouping.get("amtCndAditAmt"); // 금액조건 추가금액
|
||||
BigDecimal slepric = (BigDecimal) goodsMap.get("subSlepric"); // 판매가 * 수량
|
||||
|
||||
if (slepric.compareTo(amtCndAditAmt) > 0) {
|
||||
dlvyAmt = new BigDecimal(0);
|
||||
}
|
||||
// else {
|
||||
// //배송비 합(같은상품 수량당 배송비 책정)
|
||||
// dlvyAmt = dlvyAmt.multiply(qy);
|
||||
// }
|
||||
}
|
||||
|
||||
// 수량 조건
|
||||
if ("Y".equals(cntCndUseAt)) {
|
||||
BigDecimal cntCndAditAmt = (BigDecimal) shippingGrouping.get("cntCndAditAmt"); // 금액조건 추가금액
|
||||
// BigDecimal cntCndAditAmt = (BigDecimal) shippingGrouping.get("cntCndAditAmt"); // 금액조건 추가금액
|
||||
BigDecimal qy = (BigDecimal) goodsMap.get("qy"); // 수량
|
||||
|
||||
if (qy.compareTo(cntCndAditAmt) > 0) {
|
||||
dlvyAmt = new BigDecimal(0);
|
||||
}
|
||||
// else {
|
||||
// //배송비 합(같은상품 수량당 배송비 책정)
|
||||
// dlvyAmt = dlvyAmt.multiply(qy);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2258,20 +2292,66 @@ public class BOPurchsService {
|
||||
|
||||
} else if ("03".equals(dlvyGroupDvCd)) { // 유료배송
|
||||
|
||||
paidDlvyAmt = paidDlvyAmt.add(dlvyAmt); // 유료배송비 합
|
||||
if("KR".equals(dlvylcAreaCd) || "JP".equals(dlvylcAreaCd)) {
|
||||
|
||||
if (!StringUtils.isEmpty(dlvyAreaAditAt) && "Y".equals(dlvyAreaAditAt)) {
|
||||
if (!StringUtils.isEmpty(defaultAdressAt) && "Y".equals(defaultAdressAt)) {
|
||||
addPaidDlvyAmt = addPaidDlvyAmt.add(areaAditDlvyAmt); // 유료 배송 도서산간 추가 배송비
|
||||
}
|
||||
BigDecimal goodsQy = new BigDecimal(0);
|
||||
|
||||
for (DataMap goodsMap : goodsByDlvyGroupList) {
|
||||
|
||||
BigDecimal qy = (BigDecimal) goodsMap.get("qy"); // 수량
|
||||
|
||||
// 수량 조건
|
||||
if ("Y".equals(cntCndUseAt)) {
|
||||
|
||||
qy = (BigDecimal) goodsMap.get("qy"); // 수량
|
||||
|
||||
if (qy.compareTo(cntCndAditAmt) > 0) {
|
||||
goodsQy = qy.divide(cntCndAditAmt, 0, RoundingMode.CEILING);
|
||||
//배송비 합(같은상품 수량당 배송비 책정)
|
||||
BigDecimal multidlvyAmt = dlvyAmt.multiply(goodsQy);
|
||||
paidDlvyAmt = paidDlvyAmt.add(multidlvyAmt);
|
||||
|
||||
// 추가배송비 계산 (MUL)
|
||||
if (!StringUtils.isEmpty(dlvyAreaAditAt) && "Y".equals(dlvyAreaAditAt)) {
|
||||
if (!StringUtils.isEmpty(defaultAdressAt) && "Y".equals(defaultAdressAt)) {
|
||||
addPaidDlvyAmt = addPaidDlvyAmt.add(areaAditDlvyAmt.multiply(goodsQy)); // 유료 배송 도서산간 추가 배송비
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
// 수량당 배송비가 1인경우
|
||||
paidDlvyAmt = paidDlvyAmt.add(dlvyAmt);
|
||||
// 추가배송비 계산
|
||||
if (!StringUtils.isEmpty(dlvyAreaAditAt) && "Y".equals(dlvyAreaAditAt)) {
|
||||
if (!StringUtils.isEmpty(defaultAdressAt) && "Y".equals(defaultAdressAt)) {
|
||||
addPaidDlvyAmt = addPaidDlvyAmt.add(areaAditDlvyAmt); // 유료 배송 도서산간 추가 배송비
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//수량 조건 없는 경우
|
||||
paidDlvyAmt = paidDlvyAmt.add(dlvyAmt); // 유료배송비 합
|
||||
// 추가배송비 계산
|
||||
if (!StringUtils.isEmpty(dlvyAreaAditAt) && "Y".equals(dlvyAreaAditAt)) {
|
||||
if (!StringUtils.isEmpty(defaultAdressAt) && "Y".equals(defaultAdressAt)) {
|
||||
addPaidDlvyAmt = addPaidDlvyAmt.add(areaAditDlvyAmt); // 유료 배송 도서산간 추가 배송비
|
||||
}
|
||||
}
|
||||
}
|
||||
} //for
|
||||
} else {
|
||||
dlvyAmt = new BigDecimal(0);
|
||||
dftDlvyAmt = new BigDecimal(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BigDecimal finalDlvyAmt = dlvyAmt;
|
||||
BigDecimal amtCndAditAmt = (BigDecimal) shippingGrouping.get("amtCndAditAmt"); // 금액조건 추가금액
|
||||
BigDecimal finalDftDlvyAmt = dftDlvyAmt;
|
||||
// BigDecimal amtCndAditAmt = (BigDecimal) shippingGrouping.get("amtCndAditAmt"); // 금액조건 추가금액
|
||||
DataMap dlvyGroupMap = new DataMap(){{
|
||||
put("dlvyGroupInnb", dlvyGroupInnb);
|
||||
put("dftDlvyAmt", dftDlvyAmt);
|
||||
put("dftDlvyAmt", finalDftDlvyAmt);
|
||||
put("dlvyAmt", finalDlvyAmt);
|
||||
}};
|
||||
|
||||
@@ -2281,7 +2361,7 @@ public class BOPurchsService {
|
||||
log.debug("@@@ 유료배송비 합 : {}", paidDlvyAmt);
|
||||
|
||||
dlvyAmtByDlvyGroupList.add(dlvyGroupMap); // 배송그룹별 배송비 목록
|
||||
}
|
||||
} // for
|
||||
|
||||
// TODO : 도서산간 추가배송비 정채 :: 무료일 경우 무조건 무료인지 추가배송비는 발생 시킬건지 정의 필요 ( 2024-10-01 )
|
||||
addFreeDlvyAmt = addFreeDlvyAmt.compareTo(addBundleDlvyAmtY) > 0 ? addFreeDlvyAmt : addBundleDlvyAmtY; // 무료배송 추가 배송비와 조건부 무료배송 묶음 O 의 추가 배송비 중 큰 배송비
|
||||
|
||||
@@ -89,4 +89,11 @@ public class BOPurchsrVO extends AbstractVO {
|
||||
|
||||
/** 기본배송지 여부 */
|
||||
private String dftDlvylcAt;
|
||||
|
||||
/** 도도부현 코드(일본) */
|
||||
private String prefcd;
|
||||
|
||||
/**배송지역코드*/
|
||||
private String dlvylcAreaCd;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.wb.domainserver.domain.gcone.goods.subsvc.mapper;
|
||||
|
||||
import com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface BOSubsvcMapper {
|
||||
|
||||
/** 구독서비스 목록 조회*/
|
||||
List<DataMap> selectBOSubsvcList(BOSubsvcVO vo);
|
||||
/** 구독서비스 상세 조회 (관리자에서 사용함)*/
|
||||
DataMap selectBOSubsvcDetail(BOSubsvcVO vo);
|
||||
|
||||
/** 관리자 구독서비스 목록 조회*/
|
||||
List<DataMap> selectBOMngrSubsvcList(BOSubsvcVO vo);
|
||||
/** 관리자 구독서비스 조회조건 구독서비스*/
|
||||
List<DataMap> selectBOMngrSrchSubsvcList(BOSubsvcVO vo);
|
||||
/** 관리자 구독서비스 조회조건 구독서비스별 기수*/
|
||||
List<DataMap> selectBOMngrSrchSubsvcGnrList(BOSubsvcVO vo);
|
||||
/** 관리자 구독서비스 선택 삭제*/
|
||||
int deleteBOMngrSubsvc(BOSubsvcVO vo);
|
||||
/** 관리자 구독서비스 수정*/
|
||||
int updateBOMngrSubsvc(BOSubsvcVO vo);
|
||||
/** 관리자 구둑서비스 등록 */
|
||||
void insertBOMngrSubsvc(BOSubsvcVO vo);
|
||||
/** 관리자 구독서비스 명 중복체크*/
|
||||
int selectBOMngrSubsvcNmDupCheck(BOSubsvcVO vo);
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
package com.wb.domainserver.domain.gcone.goods.subsvc.service;
|
||||
|
||||
import com.wb.domainserver.domain.gcone.goods.goodsinfo.vo.BOGoodsInfoVO;
|
||||
import com.wb.domainserver.domain.gcone.goods.subsvc.mapper.BOSubsvcMapper;
|
||||
import com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import io.micrometer.common.util.StringUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class BOSubsvcService {
|
||||
|
||||
@Autowired
|
||||
private BOSubsvcMapper mapper;
|
||||
|
||||
/**
|
||||
* 구독서비스 목록 조회
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
public List<DataMap> selectBOSubsvcList(BOSubsvcVO vo) {
|
||||
List<DataMap> dataList = new ArrayList<>();
|
||||
|
||||
dataList = mapper.selectBOSubsvcList(vo);
|
||||
|
||||
return dataList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 구독서비스 상세 조회
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
public DataMap selectBOSubsvcDetail(BOSubsvcVO vo) {
|
||||
DataMap dataMap = new DataMap();
|
||||
|
||||
dataMap = mapper.selectBOSubsvcDetail(vo);
|
||||
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 관리자 구독서비스 목록 조회
|
||||
* */
|
||||
public List<DataMap> selectBOMngrSubsvcList(BOSubsvcVO vo) {
|
||||
List<DataMap> dataList = new ArrayList<>();
|
||||
|
||||
dataList = mapper.selectBOMngrSubsvcList(vo);
|
||||
if(dataList == null || dataList.isEmpty()){
|
||||
vo.getPaginationInfo().setTotalRecordCount(0);
|
||||
}else{
|
||||
vo.getPaginationInfo().setTotalRecordCount(((Long)dataList.get(0).get("totCnt")).intValue());
|
||||
}
|
||||
|
||||
return dataList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 관리자 구독서비스 조회조건 구독서비스
|
||||
* */
|
||||
public List<DataMap> selectBOMngrSrchSubsvcList(BOSubsvcVO vo) {
|
||||
List<DataMap> dataList = new ArrayList<>();
|
||||
|
||||
dataList = mapper.selectBOMngrSrchSubsvcList(vo);
|
||||
|
||||
return dataList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 관리자 구독서비스 조회조건 구독서비스별 기수
|
||||
* */
|
||||
public List<DataMap> selectBOMngrSrchSubsvcGnrList(BOSubsvcVO vo) {
|
||||
List<DataMap> dataList = new ArrayList<>();
|
||||
|
||||
dataList = mapper.selectBOMngrSrchSubsvcGnrList(vo);
|
||||
|
||||
return dataList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 관리자 구독서비스 선택 삭제(여러건 삭제)
|
||||
* */
|
||||
public String deleteBOMngrSubsvc(BOSubsvcVO vo) {
|
||||
String message = "fail";
|
||||
int result = mapper.deleteBOMngrSubsvc(vo);
|
||||
if (result > 0) {
|
||||
message = "success";
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* 관리자 구독서비스명 중복체크
|
||||
* */
|
||||
public String selectBOMngrSubsvcNmDupCheck(BOSubsvcVO vo) {
|
||||
String message = "success";
|
||||
int result = mapper.selectBOMngrSubsvcNmDupCheck(vo);
|
||||
if (result > 0) {
|
||||
message = "fail";
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 관리자 구독서비스 수정
|
||||
* */
|
||||
public String updateBOMngrSubsvc(BOSubsvcVO vo) {
|
||||
String message = "fail";
|
||||
int result = mapper.updateBOMngrSubsvc(vo);
|
||||
if (result > 0) {
|
||||
message = "success";
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* 관리자 구독서비스 등록
|
||||
* */
|
||||
public String insertBOMngrSubsvc(BOSubsvcVO vo) {
|
||||
String message = "success";
|
||||
try{
|
||||
mapper.insertBOMngrSubsvc(vo);
|
||||
if(StringUtils.isEmpty(vo.getSubsvcInnb())){
|
||||
message = "fail";
|
||||
}
|
||||
}catch(Exception e){
|
||||
log.error(e.getMessage());
|
||||
message = "fail";
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.wb.domainserver.domain.gcone.goods.subsvc.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BOSubsvcVO extends AbstractVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 구독서비스고유번호 */
|
||||
private String subsvcInnb;
|
||||
/** 쇼핑몰코드 */
|
||||
private String sopmalCd;
|
||||
/** 구독서비스명 */
|
||||
private String subsvcNm;
|
||||
/** 구독기간 */
|
||||
private String subPd;
|
||||
/** 구독서비스기수 */
|
||||
private String subsvcGnr;
|
||||
/** 구독서비스명 다음기수 */
|
||||
private String subsvcNextGnr;
|
||||
/** 구독서비스기수명 */
|
||||
private String subsvcGnrNm;
|
||||
/** 배송횟수 */
|
||||
private String dlvyCnt;
|
||||
/** 배송주기 */
|
||||
private String dlvyCycle;
|
||||
/** 구독료 */
|
||||
private String subsvcCt;
|
||||
/** 1회 배송비 */
|
||||
private String tmeDlvyAmt;
|
||||
/** 소비자가 */
|
||||
private String cnsmrpric;
|
||||
/** 판매가 */
|
||||
private String slepric;
|
||||
/** 재고수량 */
|
||||
private String invntryQy;
|
||||
/** 판매재고수량 */
|
||||
private String usefulInvntryQy;
|
||||
/** 재고정책 */
|
||||
private String invntryPolicyCd;
|
||||
/** 가용재고제한수량 */
|
||||
private String avlinvLmttQy;
|
||||
/** 구독서비스상태 */
|
||||
private String subsvcSttusCd;
|
||||
/** 노출구분 */
|
||||
private String expsrDvCd;
|
||||
/** 노출시작일시 */
|
||||
private String expsrBgnDt;
|
||||
/** 노출종료일시 */
|
||||
private String expsrEndDt;
|
||||
/** 노출설정앞문구 */
|
||||
private String expsrSetupFwords;
|
||||
/** 구매수량제한구분코드 */
|
||||
private String purchsQyLmttDvCd;
|
||||
/** 구매수량 유형 */
|
||||
private String purchsQyTyCd;
|
||||
/** 최소구매수량 */
|
||||
private String mummPurchsQy;
|
||||
/** 최대구매수량 */
|
||||
private String mxmmPurchsQy;
|
||||
/** 구독서비스설명 */
|
||||
private String subsvcDc;
|
||||
/** 모바일구독서비스설명 */
|
||||
private String mblSubsvcDc;
|
||||
/** 모바일구독서비스설명 PC 동일여부 */
|
||||
private String mblSubsvcDcPcSameAt;
|
||||
/** 섬네일이미지경로 */
|
||||
private String img;
|
||||
/** 청약철회가능여부 */
|
||||
private String subscrptWthdrawPosblAt;
|
||||
/** 기본상품옵션고유번호 */
|
||||
private String dftGoodsOptnInnb;
|
||||
/** 최종처리차수 */
|
||||
private String lastProcsOdr;
|
||||
/** 삭제섬네일이미지경로 */
|
||||
private String delImg;
|
||||
|
||||
|
||||
/** 검색조건 */
|
||||
/** 구독서비스명 selectbox*/
|
||||
private String srchSelSubsvcNm;
|
||||
/** 구독서비스명 */
|
||||
private String srchSubsvcNm;
|
||||
/** 구독서비스기수 select */
|
||||
private String srchSelSubsvcGnr;
|
||||
/** 구독서비스기수명 */
|
||||
private String srchSubsvcGnrNm;
|
||||
/** 구독서비스상태 */
|
||||
private List<String> srchArrSubsvcSttusCd;
|
||||
/** 노출구분 */
|
||||
private String srchExpsrDvCd;
|
||||
/** 정렬구분 */
|
||||
private String sortDv;
|
||||
/** 배열 구독서비스고유번호 */
|
||||
private List<String> arrSubsvcInnb;
|
||||
}
|
||||
@@ -291,6 +291,11 @@ public interface BOMbrMapper {
|
||||
*/
|
||||
public Integer selectBOMbrMbtlnbCompare(BOMbrVO mbrVO);
|
||||
|
||||
/**
|
||||
* 회원 이메일 비교
|
||||
* @param mbrVO
|
||||
*/
|
||||
public Integer selectBOMbrEmailCompare(BOMbrVO mbrVO);
|
||||
|
||||
/**
|
||||
* 회원 이메일 수정
|
||||
@@ -355,6 +360,9 @@ public interface BOMbrMapper {
|
||||
public List<DataMap> selectBOMbrwithdrawalSearch(BOMbrVO vo);
|
||||
public List<DataMap> selectBOMbrwithdrawalSnsSearch(BOMbrVO vo);
|
||||
|
||||
public List<DataMap> selectBOMbrwithdrawalSearchEmail(BOMbrVO vo);
|
||||
public List<DataMap> selectBOMbrwithdrawalSnsSearchEmail(BOMbrVO vo);
|
||||
|
||||
public List<DataMap> selectBOJoinAgreeTermsForm(BOMbrVO vo);
|
||||
|
||||
public List<DataMap> selectBOClauseAgre(BOMbrVO vo);
|
||||
|
||||
@@ -500,6 +500,18 @@ public class BOMbrService {
|
||||
return changeAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* 회원 정보 수정 전 이메일 변경 여부 체크
|
||||
*
|
||||
* @param mbrVO
|
||||
* @return
|
||||
* @author
|
||||
*/
|
||||
public Integer selectBOMbrEmailCompare(BOMbrVO mbrVO) {
|
||||
Integer changeAt = mapper.selectBOMbrMbtlnbCompare(mbrVO);
|
||||
return changeAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* 회원 아이디 수정
|
||||
*
|
||||
@@ -1363,6 +1375,30 @@ public class BOMbrService {
|
||||
return codeList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 기존 가입 여부 조회(Email)
|
||||
*/
|
||||
public List<DataMap> selectBOMbrwithdrawalSearchEmail(BOMbrVO vo) {
|
||||
|
||||
List<DataMap> mbrWithDrawalList = new ArrayList<>();
|
||||
mbrWithDrawalList = mapper.selectBOMbrwithdrawalSearchEmail(vo);
|
||||
|
||||
return mbrWithDrawalList;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 기존 가입 여부 조회(Email)
|
||||
*/
|
||||
public List<DataMap> selectBOMbrwithdrawalSnsSearchEmail(BOMbrVO vo) {
|
||||
|
||||
List<DataMap> mbrWithDrawalList = new ArrayList<>();
|
||||
mbrWithDrawalList = mapper.selectBOMbrwithdrawalSnsSearchEmail(vo);
|
||||
|
||||
return mbrWithDrawalList;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 기존 가입 여부 조회
|
||||
*/
|
||||
|
||||
@@ -206,7 +206,11 @@ public class BOAtmcRcpmnyCnfirmVO extends AbstractVO {
|
||||
/** 입금여부3 */
|
||||
private String srchOrdrSttusCd3;
|
||||
|
||||
private String srchDatePick;
|
||||
|
||||
/** 회원 구분 코드 */
|
||||
private String mbrDvCd;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -767,6 +767,8 @@ public interface BOOrdrMapper {
|
||||
*/
|
||||
public String selectBODefaultAdressAtInqire(DataMap vo);
|
||||
|
||||
public String selectBODefaultAdressAtInqire2(DataMap vo);
|
||||
|
||||
|
||||
/**
|
||||
* 주문 상품 옵션별 정보와 배송그룹 정보
|
||||
@@ -972,6 +974,14 @@ public interface BOOrdrMapper {
|
||||
* @return
|
||||
*/
|
||||
public String commonOrderSttusCdCheckCurrent(DataMap vo);
|
||||
|
||||
|
||||
/**
|
||||
* 사용자 > 마이페이지 > 구독서비스 주문/배송 목록 조회
|
||||
* @param ordrDlvyVO
|
||||
* @return List<DataMap>
|
||||
*/
|
||||
public List<DataMap> selectMbrSubsvcOrdrList(BOOrdrDlvyVO ordrDlvyVO);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1810,6 +1810,25 @@ public class BOOrdrService{
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 사용자 > 마이페이지 > MY쇼핑 > 구독서비스 주문/배송조회 > 구독서비스 주문/배송 목록 조회
|
||||
* @param ordrDlvyVO
|
||||
* @return List<DataMap>
|
||||
*/
|
||||
public List<DataMap> selectMbrSubsvcOrdrListInqireAjax(BOOrdrDlvyVO ordrDlvyVO) {
|
||||
List<DataMap> resultList = null;
|
||||
|
||||
resultList = mapper.selectMbrSubsvcOrdrList(ordrDlvyVO);
|
||||
|
||||
if(resultList == null || resultList.size() == 0){
|
||||
ordrDlvyVO.getPaginationInfo().setTotalRecordCount(0);
|
||||
}else{
|
||||
ordrDlvyVO.getPaginationInfo().setTotalRecordCount(Integer.parseInt(String.valueOf(resultList.get(0).get("totCnt"))));
|
||||
}
|
||||
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 사용자 > 마이페이지 > MY쇼핑 > 주문/배송조회 > 주문 취소 상태 수정
|
||||
* @param ordrDlvyVO
|
||||
@@ -2805,7 +2824,7 @@ public class BOOrdrService{
|
||||
cashVO.setSopmalCd(ordrVO.getSopmalCd());
|
||||
cashVO.setMbrDvCd(ordrVO.getMbrDvCd());
|
||||
cashVO.setMbrInnb(String.valueOf(ordrVO.getMbrInnb()));
|
||||
|
||||
//구매자조회
|
||||
DataMap purchsrMap = purchsService.selectPurchsr(purchsrVO);
|
||||
|
||||
if (!CollectionUtils.isEmpty(purchsrMap)) {
|
||||
@@ -2984,6 +3003,8 @@ public class BOOrdrService{
|
||||
public Map<String, Object> selectSetleExpectAmt(DataMap param) throws Exception {
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
|
||||
log.debug("selectSetleExpectAmt-param : {}", param);
|
||||
|
||||
LinkedHashMap setleExpectAmtMap = new LinkedHashMap() {{
|
||||
put("goodsAmt", 0);
|
||||
put("dlvyAmt", 0);
|
||||
@@ -3041,6 +3062,7 @@ public class BOOrdrService{
|
||||
LinkedHashMap<String, Object> enuriMap = (LinkedHashMap) param.get("enuri"); // 애누리 ( 장바구니 쿠폰, 마일리지, 애누리 )
|
||||
|
||||
List<LinkedHashMap> goodsList = (List<LinkedHashMap>) param.get("goodsList");
|
||||
log.debug("goodsList : {}", goodsList);
|
||||
|
||||
if (!CollectionUtils.isEmpty(goodsList)) {
|
||||
for (LinkedHashMap goods : goodsList) {
|
||||
@@ -3356,10 +3378,16 @@ public class BOOrdrService{
|
||||
|
||||
// ############################################## 배송지별 배송비 계산 START ##############################################
|
||||
|
||||
String ordrAdressZip = StringUtil.isNullToString(param.get("dlvylcZip"));
|
||||
LinkedHashMap<String, Object> shippingMap = (LinkedHashMap) param.get("shipping");
|
||||
|
||||
// String ordrAdressZip = StringUtil.isNullToString(param.get("dlvylcZip"));
|
||||
String ordrAdressZip = StringUtil.isNullToString(shippingMap.get("dlvylcZip"));
|
||||
String dlvylcAreaCd = (String) shippingMap.get("dlvylcAreaCd");
|
||||
String prefcd = (String) shippingMap.get("prefcd");
|
||||
DataMap defaultAdressVO = new DataMap() {{ //
|
||||
put("sopmalCd", sopmalCd); // 쇼핑몰 코드
|
||||
put("zip", ordrAdressZip); // 우편번호
|
||||
put("prefcd", prefcd); // 도도부현코드
|
||||
}};
|
||||
|
||||
String defaultAdressAt = "N"; // 내가 제2권역 주소인지 여부
|
||||
@@ -3391,15 +3419,21 @@ public class BOOrdrService{
|
||||
dlvyCouponDscntAmt = dlvyCouponDscntAmt.add(new BigDecimal(applyDlvylcCouponDscntAmt));
|
||||
}
|
||||
|
||||
|
||||
defaultAdressVO.put("zip", StringUtil.isNullToString(dlvylcMapMulti.get("dlvylcZip")));
|
||||
log.debug("defaultAdressVO : {}", defaultAdressVO);
|
||||
defaultAdressAt = mapper.selectBODefaultAdressAtInqire(defaultAdressVO);
|
||||
if("KR".equals(dlvylcAreaCd)){
|
||||
defaultAdressVO.put("zip", StringUtil.isNullToString(dlvylcMapMulti.get("dlvylcZip")));
|
||||
log.debug("defaultAdressVO-KR : {}", defaultAdressVO);
|
||||
defaultAdressAt = mapper.selectBODefaultAdressAtInqire(defaultAdressVO);
|
||||
}
|
||||
if("JP".equals(dlvylcAreaCd)){
|
||||
defaultAdressVO.put("prefcd", StringUtil.isNullToString(dlvylcMapMulti.get("prefcd")));
|
||||
log.debug("defaultAdressVO-JP : {}", defaultAdressVO);
|
||||
defaultAdressAt = mapper.selectBODefaultAdressAtInqire2(defaultAdressVO);
|
||||
}
|
||||
|
||||
List<LinkedHashMap> goodsListMulti = (List<LinkedHashMap>) dlvylcMapMulti.get("goodsList");
|
||||
log.debug("goodsListMulti : {}", goodsListMulti);
|
||||
if (!CollectionUtils.isEmpty(goodsListMulti)) {
|
||||
dlvyAmtMapMulti = purchsService.getDlvyAmt(goodsListMulti, sopmalCd, defaultAdressAt);
|
||||
dlvyAmtMapMulti = purchsService.getDlvyAmt(goodsListMulti, sopmalCd, defaultAdressAt, dlvylcAreaCd);
|
||||
|
||||
if (!CollectionUtils.isEmpty(dlvyAmtMapMulti)) {
|
||||
if (dlvylcMapMulti.get("mngrFreeDlvyUseAt") != null && "Y".equals(dlvylcMapMulti.get("mngrFreeDlvyUseAt").toString())) {
|
||||
@@ -3423,8 +3457,68 @@ public class BOOrdrService{
|
||||
}
|
||||
|
||||
} else { // 일반 주문
|
||||
// DataMap dlvyAmtMapMulti = null;
|
||||
//
|
||||
// LinkedHashMap<String, Object> multiOrdrDlvylcMap = (LinkedHashMap) param.get("multiOrdrDlvylc");
|
||||
//
|
||||
// log.debug("multiOrdrDlvylcMap : {}", multiOrdrDlvylcMap);
|
||||
// if (!CollectionUtils.isEmpty(multiOrdrDlvylcMap)) {
|
||||
//
|
||||
// List<LinkedHashMap<String, Object>> dlvylcListMulti = (List<LinkedHashMap<String, Object>>) multiOrdrDlvylcMap.get("dlvylc");
|
||||
//
|
||||
// if (!CollectionUtils.isEmpty(dlvylcListMulti)) {
|
||||
//
|
||||
// int dlvyAmtIndex = 0; // 배송지 rownum 체크
|
||||
// for (LinkedHashMap<String, Object> dlvylcMapMulti : dlvylcListMulti) {
|
||||
// int dlvyAmtBydlvylc = 0;
|
||||
//
|
||||
// LinkedHashMap dlvylcDscntDtlsMulti = (LinkedHashMap) dlvylcMapMulti.get("dlvylcDscntDtls");
|
||||
//
|
||||
// if (!CollectionUtils.isEmpty(dlvylcDscntDtlsMulti)) {
|
||||
// int applyDlvylcCouponDscntAmt = (int) dlvylcDscntDtlsMulti.get("dscntAmt");
|
||||
//
|
||||
// dlvyCouponDscntAmt = dlvyCouponDscntAmt.add(new BigDecimal(applyDlvylcCouponDscntAmt));
|
||||
// }
|
||||
//
|
||||
//
|
||||
// defaultAdressVO.put("zip", StringUtil.isNullToString(dlvylcMapMulti.get("dlvylcZip")));
|
||||
// log.debug("defaultAdressVO : {}", defaultAdressVO);
|
||||
// defaultAdressAt = mapper.selectBODefaultAdressAtInqire(defaultAdressVO);
|
||||
//
|
||||
// List<LinkedHashMap> goodsListMulti = (List<LinkedHashMap>) dlvylcMapMulti.get("goodsList");
|
||||
// log.debug("goodsListMulti : {}", goodsListMulti);
|
||||
// if (!CollectionUtils.isEmpty(goodsListMulti)) {
|
||||
// dlvyAmtMapMulti = purchsService.getDlvyAmt(goodsListMulti, sopmalCd, defaultAdressAt, dlvylcAreaCd);
|
||||
//
|
||||
// if (!CollectionUtils.isEmpty(dlvyAmtMapMulti)) {
|
||||
// if (dlvylcMapMulti.get("mngrFreeDlvyUseAt") != null && "Y".equals(dlvylcMapMulti.get("mngrFreeDlvyUseAt").toString())) {
|
||||
// log.debug("관리자 무료배송 체크 'Y'");
|
||||
// dlvyAmt = dlvyAmt.add(new BigDecimal(0));
|
||||
// } else {
|
||||
// dlvyAmt = dlvyAmt.add((BigDecimal) dlvyAmtMapMulti.get("dlvyAmt"));
|
||||
// }
|
||||
// dlvyAmtMulti.put("shippingDlvyAmt" + dlvyAmtIndex, new BigDecimal(String.valueOf(dlvyAmtMapMulti.get("dlvyAmt"))));
|
||||
//
|
||||
// dftDlvyAmt = dftDlvyAmt.add((BigDecimal) dlvyAmtMapMulti.get("dftDlvyAmt"));
|
||||
// dlvyAmtMulti.put("shippingDftDlvyAmt" + dlvyAmtIndex, new BigDecimal(String.valueOf(dlvyAmtMapMulti.get("dftDlvyAmt"))));
|
||||
//
|
||||
// dlvyAmtIndex += 1; // 배송지 rownum ++
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
defaultAdressAt = mapper.selectBODefaultAdressAtInqire(defaultAdressVO);
|
||||
if("KR".equals(dlvylcAreaCd)){
|
||||
log.debug("defaultAdressVO-KR : {}", defaultAdressVO);
|
||||
defaultAdressAt = mapper.selectBODefaultAdressAtInqire(defaultAdressVO);
|
||||
}
|
||||
if("JP".equals(dlvylcAreaCd)){
|
||||
log.debug("defaultAdressVO-JP : {}", defaultAdressVO);
|
||||
defaultAdressAt = mapper.selectBODefaultAdressAtInqire2(defaultAdressVO);
|
||||
}
|
||||
|
||||
LinkedHashMap<String, Object> dlvylcMap = (LinkedHashMap) param.get("dlvylc");
|
||||
|
||||
@@ -3452,18 +3546,18 @@ public class BOOrdrService{
|
||||
if (dlvylcMap.get("dlvyAmt") != null) {
|
||||
log.debug("배송비 객체 : {}", dlvylcMap);
|
||||
if (dlvylcMap.get("mngrFreeDlvyUseAt") != null && "N".equals(dlvylcMap.get("mngrFreeDlvyUseAt").toString())) {
|
||||
dlvyAmtMap = purchsService.getDlvyAmt(goodsList, sopmalCd, defaultAdressAt);
|
||||
dlvyAmtMap = purchsService.getDlvyAmt(goodsList, sopmalCd, defaultAdressAt, dlvylcAreaCd);
|
||||
} else if (dlvylcMap.get("mngrFreeDlvyUseAt") != null && "Y".equals(dlvylcMap.get("mngrFreeDlvyUseAt").toString())) {
|
||||
log.debug("관리자 무료배송 체크 'Y'");
|
||||
} else {
|
||||
dlvyAmtMap = purchsService.getDlvyAmt(goodsList, sopmalCd, defaultAdressAt);
|
||||
dlvyAmtMap = purchsService.getDlvyAmt(goodsList, sopmalCd, defaultAdressAt, dlvylcAreaCd);
|
||||
}
|
||||
|
||||
if (!CollectionUtils.isEmpty(dlvyAmtMap)) {
|
||||
dlvyAmtBydlvylc = ((BigDecimal) dlvyAmtMap.get("dlvyAmt")).intValue();
|
||||
}
|
||||
} else {
|
||||
dlvyAmtMap = purchsService.getDlvyAmt(goodsList, sopmalCd, defaultAdressAt);
|
||||
dlvyAmtMap = purchsService.getDlvyAmt(goodsList, sopmalCd, defaultAdressAt, dlvylcAreaCd);
|
||||
|
||||
if (!CollectionUtils.isEmpty(dlvyAmtMap)) {
|
||||
dlvyAmtBydlvylc = ((BigDecimal) dlvyAmtMap.get("dlvyAmt")).intValue();
|
||||
@@ -3472,7 +3566,7 @@ public class BOOrdrService{
|
||||
|
||||
dlvyAmt = new BigDecimal(dlvyAmtBydlvylc);
|
||||
} else {
|
||||
dlvyAmtMap = purchsService.getDlvyAmt(goodsList, sopmalCd, defaultAdressAt);
|
||||
dlvyAmtMap = purchsService.getDlvyAmt(goodsList, sopmalCd, defaultAdressAt, dlvylcAreaCd);
|
||||
|
||||
if (!CollectionUtils.isEmpty(dlvyAmtMap)) {
|
||||
dlvyAmt = (BigDecimal) dlvyAmtMap.get("dlvyAmt");
|
||||
|
||||
@@ -26,6 +26,8 @@ public class BOCrmDlvylcVO extends AbstractVO{
|
||||
@NotBlank(message = "배송지 설명")
|
||||
@Length(min=1, max=67)
|
||||
private String dlvylcDcCn;
|
||||
/**배송지역코드*/
|
||||
private String dlvylcAreaCd;
|
||||
/** 받는사람명 */
|
||||
@NotBlank(message = "받으시는 분")
|
||||
@Length(min=1, max=13)
|
||||
@@ -38,7 +40,7 @@ public class BOCrmDlvylcVO extends AbstractVO{
|
||||
private String telnb;
|
||||
/** 우편번호 */
|
||||
@NotBlank(message = "우편번호")
|
||||
@Length(min=1, max=5)
|
||||
@Length(min=1, max=7)
|
||||
private String zip;
|
||||
/** 도로명,지번 구분*/
|
||||
private String adresDv;
|
||||
@@ -50,6 +52,10 @@ public class BOCrmDlvylcVO extends AbstractVO{
|
||||
private String rnmAdres = "";
|
||||
/** 상세주소 */
|
||||
private String dtlAdres;
|
||||
/** 개인통관부호(개인통관번호) */
|
||||
private String cstmclerCd;
|
||||
/** 도도부현 코드(일본) */
|
||||
private String prefcd;
|
||||
/** 기본배송지여부 */
|
||||
private String dftDlvylcAt = "N";
|
||||
/** 최근배송지여부 */
|
||||
|
||||
@@ -16,7 +16,7 @@ public class BODwldItmVO extends AbstractVO {
|
||||
|
||||
private String sopmalCd; // 쇼핑몰 코드
|
||||
|
||||
private long excelDwldFormSnb; // 엑셀다운로드양식순번
|
||||
private String excelDwldFormSnb; // 엑셀다운로드양식순번
|
||||
|
||||
private String excelFormDvCd; // 코드그룹 : formDvCd 코드 : 주문, 회원
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ public class BOOrdrSrchVO extends AbstractVO{
|
||||
|
||||
private String srchMemorSetleAt; // 수기결제여부
|
||||
|
||||
private long srchExcelDwldFormSnb; // 엑셀다운로드양식순번
|
||||
private String srchExcelDwldFormSnb; // 엑셀다운로드양식순번
|
||||
|
||||
private String srchExcelDwldDvCd; // 엑셀다운로드 대상 구분 코드
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.wb.domainserver.domain.gcone.ordr.subsvc.mapper;
|
||||
|
||||
import com.wb.domainserver.domain.gcone.ordr.subsvc.vo.BOSubsvcOrderVO;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* 구독서비스 주문 BO mapper
|
||||
* @author jazz
|
||||
* @since 2026-02-04
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2026-02-04 jazz 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface BOSubsvcOrdrMapper {
|
||||
|
||||
/** 구독서비스 상품준비 관리 목록*/
|
||||
List<DataMap> selectBOSubsvcOrderList(BOSubsvcOrderVO vo);
|
||||
/** 구독서비스 상품준비 관리 목록 배송내역 팝업 배송내역목록*/
|
||||
List<DataMap> selectBOSubsvcOrderDlvyList(BOSubsvcOrderVO vo);
|
||||
/** 구독서비스 상품준비 관리 상품매칭 - 1. GC_ORDER update*/
|
||||
int updateBOSubsvcGoodsMappgOrdr(BOSubsvcOrderVO vo);
|
||||
/** 구독서비스 상품준비 관리 상품매칭 - 2. GC_ORDER_ITEM update*/
|
||||
int updateBOSubsvcGoodsMappgOrdrItem(BOSubsvcOrderVO vo);
|
||||
/** 구독서비스 상품준비 관리 상품매칭 - 3. GC_ORDER_ITEM_OPTION update*/
|
||||
int updateBOSubsvcGoodsMappgOrdrItemOptn(BOSubsvcOrderVO vo);
|
||||
/** 구독서비스 상품준비 관리 상품매칭 - 4. GC_ORDER_SHIPPING update*/
|
||||
int updateBOSubsvcGoodsMappgShipping(BOSubsvcOrderVO vo);
|
||||
/** 구독서비스 상품준비 관리 상품매칭 - 5. GC_SUBSVC update*/
|
||||
int updateBOSubsvcGoodsMappgSubsvc(BOSubsvcOrderVO vo);
|
||||
|
||||
/** 구독서비스 상품변경 관리 목록*/
|
||||
List<DataMap> selectBOSubsvcOrderMappedList(BOSubsvcOrderVO vo);
|
||||
|
||||
/** 구독서비스 구독자조회 목록*/
|
||||
List<DataMap> selectBOSubsvcOrderMbrList(BOSubsvcOrderVO vo);
|
||||
/** 구독서비스 구독자조회 - 구독자목록 팝업 - 구독서비스 정보*/
|
||||
DataMap selectBOSubsvcInfo(BOSubsvcOrderVO vo);
|
||||
/** 구독서비스 구독자조회 - 구독자목록 팝업 - 구독자목록 조회*/
|
||||
List<DataMap> selectBOSubsvcOrderMbrInfoList(BOSubsvcOrderVO vo);
|
||||
/** 구독서비스 구독자조회 - 배송상품 목록팝업 - 배송상품목록 조회*/
|
||||
List<DataMap> selectBOSubsvcOrderGoodsInfoList(BOSubsvcOrderVO vo);
|
||||
}
|
||||
@@ -0,0 +1,247 @@
|
||||
package com.wb.domainserver.domain.gcone.ordr.subsvc.service;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.nimbusds.jose.shaded.gson.Gson;
|
||||
import com.wb.domainserver.common.prop.PropertyService;
|
||||
import com.wb.domainserver.domain.admin.instcSle.mtng.mapper.BOMaMtngMapper;
|
||||
import com.wb.domainserver.domain.admin.store.sopmal.mapper.BOMaSopmalMapper;
|
||||
import com.wb.domainserver.domain.admin.sys.comncd.service.BOMaComncdService;
|
||||
import com.wb.domainserver.domain.admin.sys.comncd.vo.BOMaComncdVO;
|
||||
import com.wb.domainserver.domain.gcone.goods.goods.service.BOGoodsService;
|
||||
import com.wb.domainserver.domain.gcone.goods.purchs.mapper.BOPurchsMapper;
|
||||
import com.wb.domainserver.domain.gcone.goods.purchs.service.BOOrderNoService;
|
||||
import com.wb.domainserver.domain.gcone.goods.purchs.service.BOOrderService;
|
||||
import com.wb.domainserver.domain.gcone.goods.purchs.service.BOPurchsService;
|
||||
import com.wb.domainserver.domain.gcone.goods.purchs.vo.*;
|
||||
import com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO;
|
||||
import com.wb.domainserver.domain.gcone.mbr.mbr.mapper.BOMbrMapper;
|
||||
import com.wb.domainserver.domain.gcone.mbr.mbr.service.BOMbrService;
|
||||
import com.wb.domainserver.domain.gcone.mbr.mbr.vo.BOMbrAppnVO;
|
||||
import com.wb.domainserver.domain.gcone.mbr.mbr.vo.BOMbrVO;
|
||||
import com.wb.domainserver.domain.gcone.mbr.mlg.service.BOMlgService;
|
||||
import com.wb.domainserver.domain.gcone.mbr.mlg.vo.BOCashVO;
|
||||
import com.wb.domainserver.domain.gcone.mbr.mlg.vo.BOMlgVO;
|
||||
import com.wb.domainserver.domain.gcone.ntcn.mssage.service.BOMssageService;
|
||||
import com.wb.domainserver.domain.gcone.ordr.ordr.mapper.BOOrdrMapper;
|
||||
import com.wb.domainserver.domain.gcone.ordr.ordr.service.BOOrderCommonService;
|
||||
import com.wb.domainserver.domain.gcone.ordr.ordr.service.BOOrdrLogService;
|
||||
import com.wb.domainserver.domain.gcone.ordr.ordr.vo.*;
|
||||
import com.wb.domainserver.domain.gcone.ordr.pay.service.BOPayService;
|
||||
import com.wb.domainserver.domain.gcone.ordr.pay.vo.BOPayVO;
|
||||
import com.wb.domainserver.domain.gcone.ordr.rtngudrefnd.mapper.BORtngudrefndMapper;
|
||||
import com.wb.domainserver.domain.gcone.ordr.rtngudrefnd.service.BORtngudrefndService;
|
||||
import com.wb.domainserver.domain.gcone.ordr.rtngudrefnd.vo.BORtngudrefndVO;
|
||||
import com.wb.domainserver.domain.gcone.ordr.selngpruf.service.BOSelngprufService;
|
||||
import com.wb.domainserver.domain.gcone.ordr.selngpruf.vo.BOSelngprufVO;
|
||||
import com.wb.domainserver.domain.gcone.ordr.subsvc.mapper.BOSubsvcOrdrMapper;
|
||||
import com.wb.domainserver.domain.gcone.ordr.subsvc.vo.BOSubsvcOrderVO;
|
||||
import com.wb.domainserver.domain.gcone.promtn.coupon.service.BOCouponService;
|
||||
import com.wb.domainserver.domain.gcone.promtn.coupon.vo.BODwldCouponVO;
|
||||
import com.wb.domainserver.domain.gcone.setup.site.service.BOSiteService;
|
||||
import com.wb.domainserver.domain.gcone.setup.site.vo.BOGoodsgrpVO;
|
||||
import com.wb.domainserver.domain.gcone.setup.site.vo.BOSiteVO;
|
||||
import com.wb.domainserver.exception.WnbtException;
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
import com.wb.domainserver.security.authentication.AnonymousUser;
|
||||
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import com.wb.domainserver.util.string.StringUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.time.ZoneOffset;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.format.DateTimeParseException;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
*
|
||||
* 구독서비스주문 BO service
|
||||
* @author jazz
|
||||
* @since 2026-02-05
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2026-02-05 jazz 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class BOSubsvcOrdrService {
|
||||
@Autowired
|
||||
private BOSubsvcOrdrMapper mapper;
|
||||
|
||||
/**
|
||||
* 구독서비스 상품준비 관리 목록
|
||||
* @param
|
||||
* @return List<DataMap>
|
||||
*/
|
||||
public List<DataMap> selectBOSubsvcOrderList(BOSubsvcOrderVO vo) {
|
||||
List<DataMap> dataList = new ArrayList<>();
|
||||
|
||||
try {
|
||||
dataList = mapper.selectBOSubsvcOrderList(vo);
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
throw e;
|
||||
}
|
||||
if(dataList == null || dataList.isEmpty()){
|
||||
vo.getPaginationInfo().setTotalRecordCount(0);
|
||||
}else{
|
||||
vo.getPaginationInfo().setTotalRecordCount(((Long)dataList.get(0).get("totCnt")).intValue());
|
||||
}
|
||||
|
||||
return dataList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 구독서비스 상품준비 관리 목록 배송내역 팝업 배송내역목록
|
||||
* @param
|
||||
* @return List<DataMap>
|
||||
*/
|
||||
public List<DataMap> selectBOSubsvcOrderDlvyList(BOSubsvcOrderVO vo) {
|
||||
List<DataMap> dataList = new ArrayList<>();
|
||||
dataList = mapper.selectBOSubsvcOrderDlvyList(vo);
|
||||
return dataList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 선택대상 상품준비 일괄처리
|
||||
* 구독서비스 상품준비 일괄처리
|
||||
* 1. GC_ORDER 주문상태를 결제확인(25)만 상품준비중(35)로 변경(25가 아니면 UPDT_DT만 변경)
|
||||
* 2. GC_ORDER_ITEM의 상품고유번호(GOODS_INNB), 상품이지지경로(GOODS_IMG_COURS), 상품명(GOODS_NM)를 변경
|
||||
* 3. GC_ORDER_ITEM_OPTION의 상품옵셥 고유번호(GOODS_OPTN_INNB), 주문상태(GOODS_STTUS_CD)를 결제확인(25)=>상품준비중(35), 옵션명1(OPTN_NM_1) 부터 GC_GOODS_OPTION과 동일한 컬럼 매칭
|
||||
* 4. GC_ORDER_SHIPPING의 주문배송고유번호(ORDR_DLVY_INNB)가 같은 대상의 주문상태(GOODS_STTUS_CD)를 결제확인(25)=>상품준비중(35)
|
||||
* 5. GC_SUBSVC의 최종처리차수(LAST_PROCS_DGR)를 수정 (주문상품옵션에 주문별 처리차수중 가능 큰처리차수(35~75까지 COUNT해서 가장 큰수)를 등록)
|
||||
* */
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String updateSubsvcOrdrReady(BOSubsvcOrderVO vo) {
|
||||
String message = "success";
|
||||
/*1. GC_ORDER*/
|
||||
int result = mapper.updateBOSubsvcGoodsMappgOrdr(vo);
|
||||
if (!(result > 0)) {
|
||||
log.error("GC_ORDER UPDATE 오류");
|
||||
throw new WnbtException("500","GC_ORDER UPDATE 오류");
|
||||
}
|
||||
result = mapper.updateBOSubsvcGoodsMappgOrdrItem(vo);
|
||||
if (!(result > 0)) {
|
||||
log.error("GC_ORDER_ITEM UPDATE 오류");
|
||||
throw new WnbtException("500","GC_ORDER_ITEM UPDATE 오류");
|
||||
}
|
||||
result = mapper.updateBOSubsvcGoodsMappgOrdrItemOptn(vo);
|
||||
if (!(result > 0)) {
|
||||
log.error("GC_ORDER_ITEM_OPTION UPDATE 오류");
|
||||
throw new WnbtException("500","GC_ORDER_ITEM_OPTION UPDATE 오류");
|
||||
}
|
||||
result = mapper.updateBOSubsvcGoodsMappgShipping(vo);
|
||||
if (!(result > 0)) {
|
||||
log.error("GC_ORDER_SHIPPING UPDATE 오류");
|
||||
throw new WnbtException("500","GC_ORDER_SHIPPING UPDATE 오류");
|
||||
}
|
||||
result = mapper.updateBOSubsvcGoodsMappgSubsvc(vo);
|
||||
if (!(result > 0)) {
|
||||
log.error("GC_SUBSVC 처리중 오류");
|
||||
throw new WnbtException("500","GC_SUBSVC 처리중 오류");
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* 구독서비스 상품변경 관리 목록
|
||||
* @param vo
|
||||
* @return List<DataMap>
|
||||
*/
|
||||
public List<DataMap> selectBOSubsvcOrderMappedList(BOSubsvcOrderVO vo) {
|
||||
List<DataMap> dataList = new ArrayList<>();
|
||||
|
||||
try {
|
||||
dataList = mapper.selectBOSubsvcOrderMappedList(vo);
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
throw e;
|
||||
}
|
||||
if(dataList == null || dataList.isEmpty()){
|
||||
vo.getPaginationInfo().setTotalRecordCount(0);
|
||||
}else{
|
||||
vo.getPaginationInfo().setTotalRecordCount(((Long)dataList.get(0).get("totCnt")).intValue());
|
||||
}
|
||||
|
||||
return dataList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 구독서비스 구독자조회 목록
|
||||
* @param vo
|
||||
* @return List<DataMap>
|
||||
*/
|
||||
public List<DataMap> selectBOSubsvcOrderMbrList(BOSubsvcOrderVO vo) {
|
||||
List<DataMap> dataList = new ArrayList<>();
|
||||
|
||||
try {
|
||||
dataList = mapper.selectBOSubsvcOrderMbrList(vo);
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
throw e;
|
||||
}
|
||||
if(dataList == null || dataList.isEmpty()){
|
||||
vo.getPaginationInfo().setTotalRecordCount(0);
|
||||
}else{
|
||||
vo.getPaginationInfo().setTotalRecordCount(((Long)dataList.get(0).get("totCnt")).intValue());
|
||||
}
|
||||
|
||||
return dataList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 구독서비스 구독자조회 - 구독자목록 팝업 - 구독서비스 정보
|
||||
* @param vo
|
||||
* @return DataMap
|
||||
*/
|
||||
public DataMap selectBOSubsvcInfo(BOSubsvcOrderVO vo) {
|
||||
DataMap data = new DataMap();
|
||||
data = mapper.selectBOSubsvcInfo(vo);
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 구독서비스 구독자조회 - 구독자목록 팝업 - 구독자목록 조회
|
||||
* @param vo
|
||||
* @return DataMap
|
||||
*/
|
||||
public List<DataMap> selectBOSubsvcOrderMbrInfoList(BOSubsvcOrderVO vo) {
|
||||
List<DataMap> dataList = new ArrayList<DataMap>();
|
||||
dataList = mapper.selectBOSubsvcOrderMbrInfoList(vo);
|
||||
return dataList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 구독서비스 구독자조회 - 배송상품 목록팝업 - 배송상품목록 조회
|
||||
* @param vo
|
||||
* @return DataMap
|
||||
*/
|
||||
public List<DataMap> selectBOSubsvcOrderGoodsInfoList(BOSubsvcOrderVO vo) {
|
||||
List<DataMap> dataList = new ArrayList<DataMap>();
|
||||
dataList = mapper.selectBOSubsvcOrderGoodsInfoList(vo);
|
||||
return dataList;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.wb.domainserver.domain.gcone.ordr.subsvc.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BOSubsvcOrderVO extends AbstractVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 구독서비스고유번호 */
|
||||
private String subsvcInnb;
|
||||
/** 쇼핑몰코드 */
|
||||
private String sopmalCd;
|
||||
/** 구독서비스명 */
|
||||
private String subsvcNm;
|
||||
/** 구독기간 */
|
||||
private String subPd;
|
||||
/** 구독서비스기수 */
|
||||
private String subsvcGnr;
|
||||
/** 구독서비스명 다음기수 */
|
||||
private String subsvcNextGnr;
|
||||
/** 구독서비스기수명 */
|
||||
private String subsvcGnrNm;
|
||||
/** 주문고유번호 */
|
||||
private String ordrInnb;
|
||||
/** 주문상품고유번호 */
|
||||
private String ordrGoodsInnb;
|
||||
/** 주문상품옵션고유번호 */
|
||||
private String ordrGoodsOptnInnb;
|
||||
|
||||
|
||||
/** 출고상품고유번호*/
|
||||
private String goodsInnb;
|
||||
/** 출고상품옵션고유번호*/
|
||||
private String goodsOptnInnb;
|
||||
/** 출고상품옵션구분*/
|
||||
private String optnTy;
|
||||
|
||||
/** 상품준비대상*/
|
||||
private List<String> arrCheck;
|
||||
/** 상품준비대상 주문고유번호*/
|
||||
private List<String> arrOrdrInnb;
|
||||
/** 상품준비대상 주문상품고유번호*/
|
||||
private List<String> arrOrdrGoodsInnb;
|
||||
/** 상품준비대상 주문상품옵션고유번호*/
|
||||
private List<String> arrOrdrGoodsOptnInnb;
|
||||
/** 상품준비대상 주문고유번호*/
|
||||
private List<String> arrOrdrDlvyInnb;
|
||||
|
||||
/** 검색조건 */
|
||||
/** 구독서비스명 selectbox*/
|
||||
private String srchSelSubsvcNm;
|
||||
/** 구독서비스명 */
|
||||
private String srchSubsvcNm;
|
||||
/** 구독서비스기수 select */
|
||||
private String srchSelSubsvcGnr;
|
||||
/** 구독서비스기수명 */
|
||||
private String srchSubsvcGnrNm;
|
||||
/** 정렬구분 */
|
||||
private String sortDv;
|
||||
/** 배열 구독서비스고유번호 */
|
||||
private List<String> arrSubsvcInnb;
|
||||
/**당월제외*/
|
||||
private String srchCurMonExclude;
|
||||
/**주문번호*/
|
||||
private String srchOrdrInnb;
|
||||
/**주문자명*/
|
||||
private String srchMbrNm;
|
||||
/**주문자ID*/
|
||||
private String srchMbrId;
|
||||
/**구독종료여부*/
|
||||
private String srchSubEndAt;
|
||||
}
|
||||
@@ -88,18 +88,21 @@ public interface BODlvygrpMapper {
|
||||
* @param dlvyGroup
|
||||
*/
|
||||
void updateBODlvyGroupRtnlc(BODlvygrpVO dlvyGroup);
|
||||
void updateBODlvyGroupRtnlc2(BODlvygrpVO dlvyGroup);
|
||||
|
||||
/**
|
||||
* 배송그룹 반송지 등록
|
||||
* @param dlvyGroup
|
||||
*/
|
||||
void insertBODlvyGroupAddress(BODlvygrpVO dlvyGroup);
|
||||
void insertBODlvyGroupAddress2(BODlvygrpVO dlvyGroup);
|
||||
|
||||
/**
|
||||
* 배송그룹 반송지 삭제 (Y -> N)
|
||||
* @param dlvyGroup
|
||||
*/
|
||||
void deleteBODlvyGroupRtnlc(BODlvygrpVO dlvyGroup);
|
||||
void deleteBODlvyGroupRtnlc2(BODlvygrpVO dlvyGroup);
|
||||
|
||||
/**
|
||||
* 배송 반송지 조회
|
||||
|
||||
@@ -76,9 +76,11 @@ public class BODlvygrpService {
|
||||
public Map<String, Object> insertBODlvyGroup(BODlvygrpVO dlvyGroup) {
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
try {
|
||||
|
||||
|
||||
// KR 반송지 등록
|
||||
mapper.insertBODlvyGroupAddress(dlvyGroup);
|
||||
// JP 반송지 등록
|
||||
mapper.insertBODlvyGroupAddress2(dlvyGroup);
|
||||
// 배송그룹 등록
|
||||
mapper.insertBODlvyGroup(dlvyGroup);
|
||||
message.put("dlvyGroupInnb", dlvyGroup.getDlvyGroupInnb());
|
||||
message.put("result", "success");
|
||||
@@ -113,6 +115,7 @@ public class BODlvygrpService {
|
||||
try {
|
||||
|
||||
mapper.updateBODlvyGroupRtnlc(dlvyGroup);
|
||||
mapper.updateBODlvyGroupRtnlc2(dlvyGroup);
|
||||
int result = mapper.updateBODlvyGroupDtl(dlvyGroup);
|
||||
message.put("result", "success");
|
||||
message.put("dlvyGroupInnb", dlvyGroup.getDlvyGroupInnb());
|
||||
@@ -137,7 +140,9 @@ public class BODlvygrpService {
|
||||
int goodsEa = mapper.isIncludeGoods(dlvyGroup);
|
||||
if(goodsEa < 1) {
|
||||
try {
|
||||
|
||||
dlvyGroup = mapper.selectBODlvyGroupDtlForm(dlvyGroup);
|
||||
mapper.deleteBODlvyGroupRtnlc(dlvyGroup);
|
||||
mapper.deleteBODlvyGroupRtnlc2(dlvyGroup);
|
||||
int result = mapper.deleteBODlvyGroup(dlvyGroup);
|
||||
message.put("result", "success");
|
||||
} catch (WnbtRestException wre){
|
||||
|
||||
@@ -73,12 +73,66 @@ public class BODlvygrpVO extends AbstractVO {
|
||||
private String rtnlcTelnb;
|
||||
|
||||
|
||||
/*반품배송비왕복금액적용여부*/
|
||||
/** 반품배송비왕복금액적용여부 */
|
||||
private String returnDlvyApplcAt;
|
||||
|
||||
/*반품배송비금액*/
|
||||
/** 반품배송비금액 */
|
||||
private String returnDlvyAmt;
|
||||
|
||||
/*왕복배송비금액*/
|
||||
/** 왕복배송비금액 */
|
||||
private String exchngDlvyAmt;
|
||||
|
||||
|
||||
/** 반송지2(JP) 고유번호 */
|
||||
private Integer rtnlcInnb2;
|
||||
|
||||
/** 반송지 우편번호2(JP) */
|
||||
private String rtnlcZip2;
|
||||
|
||||
/** 반송지 주소2(JP) */
|
||||
private String rtnlcAdres2;
|
||||
|
||||
/** 반송지 상세주소2(JP) */
|
||||
@Length(min=0, max=100, message = "반송지(JP상세주소)")
|
||||
private String rtnlcDtlAdres2;
|
||||
|
||||
/** 반송지 전화번호2(JP) */
|
||||
private String rtnlcTelnb2;
|
||||
|
||||
/** 기본배송비2(JP) */
|
||||
private String dftDlvyAmt2;
|
||||
|
||||
/** 금액조건2(JP) */
|
||||
private String amtCndUseAt2;
|
||||
|
||||
/** 금액조건 추가금액2(JP) */
|
||||
private String amtCndAditAmt2;
|
||||
|
||||
/** 개수조건2(JP) */
|
||||
private String cntCndUseAt2;
|
||||
|
||||
/** 개수조건 추가금액2(JP) */
|
||||
private String cntCndAditAmt2;
|
||||
|
||||
/** 배송지역추가여부2(JP) */
|
||||
private String dlvyAreaAditAt2;
|
||||
|
||||
/** 지역추가배송비2(JP) */
|
||||
private String areaAditDlvyAmt2;
|
||||
|
||||
/** 묶음배송 사용여부2(JP) */
|
||||
private String bundleDlvyUseAt2;
|
||||
|
||||
/** 묶음배송 조건금액2(JP) */
|
||||
private String bundleDlvyCndAmt2;
|
||||
|
||||
/** 반품배송비왕복금액적용여부2(JP) */
|
||||
private String returnDlvyApplcAt2;
|
||||
|
||||
/** 반품배송비금액2(JP) */
|
||||
private String returnDlvyAmt2;
|
||||
|
||||
/** 왕복배송비금액2(JP) */
|
||||
private String exchngDlvyAmt2;
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 주문 설정 VO
|
||||
@@ -23,6 +24,7 @@ import lombok.Data;
|
||||
* </pre>
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper=true)
|
||||
public class BOSetupOrdrVO extends AbstractVO {
|
||||
/** 쇼핑몰 코드 */
|
||||
private String sopmalCd;
|
||||
|
||||
@@ -303,6 +303,9 @@ public class GnrlscttController {
|
||||
case "11" :
|
||||
returnUrl = "mngr/bbs/gnrlsctt/EvtResultListR";
|
||||
break;
|
||||
case "12" :
|
||||
returnUrl = "mngr/bbs/gnrlsctt/m2mQnaBbscttListR";
|
||||
break;
|
||||
}
|
||||
return returnUrl;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.wb.domainserver.domain.mngr.bbs.rvw.controller;
|
||||
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||
import com.wb.domainserver.domain.gcone.bbs.bbs.service.BOBbsService;
|
||||
import com.wb.domainserver.domain.gcone.bbs.bbs.vo.BOBbsVO;
|
||||
import com.wb.domainserver.domain.gcone.bbs.gnrlbbsctt.service.BOGnrlbbscttService;
|
||||
@@ -84,6 +86,8 @@ public class RvwController {
|
||||
private BOMssageService boMssageService;
|
||||
@Autowired
|
||||
private BOOrdrService boOrdrService;
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
/**
|
||||
* 게시글 목록 조회 팝업 (검색 section)
|
||||
@@ -177,67 +181,55 @@ public class RvwController {
|
||||
@RequestMapping(value = "/selectRvwListInqire")
|
||||
public String selectRvwListInqire(BOGnrlbbscttVO bbsctt, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
bbsctt.setSopmalCd(authSopmalCd);
|
||||
//게시글 노출 항목 설정값과 게시판 목록 조회
|
||||
Map<String, Object> content = new HashMap<String, Object>();
|
||||
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if ("01".equals(user.getSysDvCd())) {
|
||||
|
||||
if ("01".equals(user.getSysDvCd())) {//사용자 조회 일 경우
|
||||
bbsctt.setSopmalCd(user.getSopmalCd());
|
||||
bbsctt.setMbrDvCd(user.getMbrDvCd());
|
||||
bbsctt.setMbrInnb(user.getUserInnb());
|
||||
}
|
||||
if ("mpage".equals(bbsctt.getReqUrl()) || "crm".equals(bbsctt.getReqUrl())) {
|
||||
|
||||
if (!"crm".equals(bbsctt.getReqUrl())) {
|
||||
if (user.getUserInnb() > 0) {
|
||||
bbsctt.setRegusr(user.getUserInnb());
|
||||
bbsctt.setRegusrDvCd("01");
|
||||
if ("sopmal".equals(bbsctt.getServerDv())) {
|
||||
bbsctt.setRegusrDvCd("01");
|
||||
} else {
|
||||
bbsctt.setRegusrDvCd("02");
|
||||
}
|
||||
} else {
|
||||
bbsctt.setRegusr(0);
|
||||
bbsctt.setRegusrDvCd("99");
|
||||
}
|
||||
}
|
||||
// pagination
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(bbsctt.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(bbsctt.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
|
||||
bbsctt.setPaginationInfo(paginationInfo);
|
||||
bbsctt.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
bbsctt.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
bbsctt.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
// 게시글 목록조회
|
||||
Map<String, Object> resultList = new HashMap<String, Object>();
|
||||
resultList = service.selectBOBbscttListInqire(bbsctt);
|
||||
|
||||
// 게시판 설정 정보 조회
|
||||
BOBbsVO bbsVO = new BOBbsVO();
|
||||
// bbsVO에 쇼핑몰코드, 해당 게시판 set
|
||||
bbsVO.setSopmalCd(bbsctt.getSopmalCd());
|
||||
bbsVO.setBbsId(bbsctt.getBbsId());
|
||||
bbsVO.setBbsTyCd(bbsctt.getBbsTyCd());
|
||||
// 게시판 설정 정보 조회
|
||||
DataMap bbsInfo = new DataMap();
|
||||
bbsInfo = bbsService.selectBOBbsSetupInfo(bbsVO);
|
||||
DataMap content = new DataMap();
|
||||
|
||||
//사용자에서 이벤트 폼 조회시 해당 쇼핑몰 이벤트 게시판 정보 조회(이벤트,당첨자발표 게시판)
|
||||
List<DataMap> evtBbsList = new ArrayList<>();
|
||||
if ("sopmal".equals(bbsctt.getServerDv())) {
|
||||
if ("03".equals((String) bbsInfo.get("bbsTyCd")) || "11".equals((String) bbsInfo.get("bbsTyCd"))) {
|
||||
evtBbsList = bbsService.selectBOEvtBbsList(bbsVO);
|
||||
content.put("evtBbsList", evtBbsList);
|
||||
}
|
||||
}
|
||||
// 분류 조회
|
||||
List<DataMap> itmList = new ArrayList<>();
|
||||
itmList = service.selectBOBbscttItmInqire(bbsctt);
|
||||
|
||||
// 게시판 목록 조회 및 게시글 개수 조회(관리자 페이지)
|
||||
List<DataMap> bbsListCnt = new ArrayList<>();
|
||||
if (!"01".equals(user.getSysDvCd())) {
|
||||
bbsListCnt = bbsService.selectBOBbsttListInqire(bbsVO);
|
||||
content.put("bbsListCnt", bbsListCnt);
|
||||
}
|
||||
Map<String, Object> qesitmList = new HashMap<String, Object>();
|
||||
Map<String, Object> rvwQesitmList = new HashMap<String, Object>();
|
||||
//리뷰 목록 조회일 시 service 호출
|
||||
if ("rvw".equals(bbsctt.getRvwBbscttDv())) {
|
||||
//추가항목 리스트, 추가항목 항목 리스트(리뷰)
|
||||
qesitmList = service.selectBOBbscttRegistPopupForm(bbsctt);
|
||||
//리뷰항목 리스트, 리뷰항목 항목 리스트
|
||||
rvwQesitmList = service.selectBOStarItm(bbsctt);
|
||||
}
|
||||
content.put("bbsInfo", bbsInfo);
|
||||
content.put("itmList", itmList);
|
||||
if ("rvw".equals(bbsctt.getRvwBbscttDv())) {
|
||||
content.put("qesitmList", qesitmList);
|
||||
content.put("rvwQesitmList", rvwQesitmList);
|
||||
}
|
||||
content.put("bbsctt", bbsctt);
|
||||
|
||||
content.put("resultList", resultList);
|
||||
content.put("paginationInfo", bbsctt.getPaginationInfo());
|
||||
model.addAttribute("resultMap",content);
|
||||
|
||||
// responseHandler.handleResponse(
|
||||
|
||||
@@ -0,0 +1,441 @@
|
||||
package com.wb.domainserver.domain.mngr.goods.subsvc.controller;
|
||||
|
||||
import com.google.j2objc.annotations.Property;
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||
import com.wb.domainserver.domain.admin.sys.comncd.service.BOMaComncdService;
|
||||
import com.wb.domainserver.domain.admin.sys.comncd.vo.BOMaComncdVO;
|
||||
import com.wb.domainserver.domain.gcone.common.service.BOCommonService;
|
||||
import com.wb.domainserver.domain.gcone.goods.cmnuse.vo.BOCmnuseVO;
|
||||
import com.wb.domainserver.domain.gcone.goods.goods.vo.BOGoodsVO;
|
||||
import com.wb.domainserver.domain.gcone.goods.goodsinfo.vo.BOGoodsInfoVO;
|
||||
import com.wb.domainserver.domain.gcone.goods.subsvc.service.BOSubsvcService;
|
||||
import com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO;
|
||||
import com.wb.domainserver.domain.gcone.setup.dlvygrp.vo.BODlvygrpVO;
|
||||
import com.wb.domainserver.domain.mngr.goods.goodsinfo.vo.GoodsInfoVO;
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
import com.wb.domainserver.response.WnbtResponse;
|
||||
import com.wb.domainserver.response.WnbtResponseBody;
|
||||
import com.wb.domainserver.security.authentication.AnonymousUser;
|
||||
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||
import com.wb.domainserver.util.communicate.ValidateResultConverter;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import com.wb.domainserver.util.file.service.FileStorageService;
|
||||
import com.wb.domainserver.util.file.vo.FileVo;
|
||||
import io.micrometer.common.util.StringUtils;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.CookieValue;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* SubsvcController Controller Class
|
||||
*
|
||||
* @author
|
||||
* @since 2026-01-23
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2026-01-23 jazz 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
@Slf4j
|
||||
@Controller
|
||||
@RequestMapping("/mngr/goods/subsvc")
|
||||
public class SubsvcController {
|
||||
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
|
||||
/** 공통 메시지 처리를 위한 메시지 객체 */
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
/** 파일 업로드 */
|
||||
@Autowired
|
||||
private FileStorageService filestore;
|
||||
|
||||
@Value("${mngrfo.common.fileupload.uploaddirs.web}")
|
||||
private String uploadWebFilePath;
|
||||
@Value("${mngrfo.common.subsvc.dft-goods-optn-innb}")
|
||||
private String dftGoodsOptnInnb;
|
||||
@Autowired
|
||||
private BOSubsvcService boSubsvcService;
|
||||
@Autowired
|
||||
private BOCommonService commonService;
|
||||
@Autowired
|
||||
private BOMaComncdService boMaComncdService;
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
/**
|
||||
* 구독서비스 목록 조회 폼
|
||||
* @param vo
|
||||
* @return SubsvcListForm.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectSubsvcListForm")
|
||||
public String selectSubsvcListForm(BOSubsvcVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("paramVO", vo);
|
||||
|
||||
// 조회조건 구독서비스
|
||||
List<?> SrchSubsvcList = boSubsvcService.selectBOMngrSrchSubsvcList(vo);
|
||||
content.put("srchSubsvcList", SrchSubsvcList);
|
||||
|
||||
//조회조건 판매상태
|
||||
BOMaComncdVO param = new BOMaComncdVO();
|
||||
param.setGroupCd("GOODS_STTUS");
|
||||
List<?> srchSubsvcSttusList = boMaComncdService.selectBOCommcdDetailList(param);
|
||||
content.put("srchSubsvcSttusList", srchSubsvcSttusList);
|
||||
|
||||
//조회조건 노출구분
|
||||
param.setGroupCd("EXPSR_DV");
|
||||
List<?> srchExpsrDvList = boMaComncdService.selectBOCommcdDetailList(param);
|
||||
content.put("srchExpsrDvList", srchExpsrDvList);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
return "mngr/goods/subsvc/SubsvcListForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 구독서비스 수정화면
|
||||
* @param vo
|
||||
* @return SubsvcDtlU.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectSubsvcDtlForm")
|
||||
public String selectSubsvcDtlForm(BOSubsvcVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if ("01".equals(user.getSysDvCd())) {
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("paramVO", vo);
|
||||
|
||||
// 구독서비스 상세조회
|
||||
DataMap subsvcDtl = boSubsvcService.selectBOSubsvcDetail(vo);
|
||||
content.put("subsvcDtl", subsvcDtl);
|
||||
|
||||
//판매상태
|
||||
BOMaComncdVO param = new BOMaComncdVO();
|
||||
param.setGroupCd("GOODS_STTUS");
|
||||
List<?> subsvcSttusList = boMaComncdService.selectBOCommcdDetailList(param);
|
||||
content.put("subsvcSttusList", subsvcSttusList);
|
||||
|
||||
//노출구분
|
||||
param.setGroupCd("EXPSR_DV");
|
||||
List<?> expsrDvList = boMaComncdService.selectBOCommcdDetailList(param);
|
||||
content.put("expsrDvList", expsrDvList);
|
||||
|
||||
//가용재고정책
|
||||
param.setGroupCd("INVNTRY_POLICY");
|
||||
List<?> invntryPolicyList = boMaComncdService.selectBOCommcdDetailList(param);
|
||||
content.put("invntryPolicyList", invntryPolicyList);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
return "mngr/goods/subsvc/SubsvcU";
|
||||
}
|
||||
|
||||
/**
|
||||
* 구독서비스 수정
|
||||
* @param vo
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/updateSubsvc", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateSubsvc(BOSubsvcVO vo, HttpServletRequest request, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
if ("01".equals(user.getSysDvCd())) {
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
//파일 업로드 관련 START
|
||||
List<HashMap<String, Object>> uploadFileMap = new ArrayList<HashMap<String, Object>>();
|
||||
|
||||
request.setAttribute("shopCd", vo.getSopmalCd());
|
||||
request.setAttribute("pathGubun", "GDIG"); //이미지구분코드 - 상품
|
||||
|
||||
try {
|
||||
/*파일 업로드 후 경로 추출하여 vo에 셋팅*/
|
||||
uploadFileMap = filestore.fileUpload(request);
|
||||
if(uploadFileMap.size() == 1){
|
||||
FileVo thumbNail = (FileVo) uploadFileMap.get(0).get("thumbNail");
|
||||
vo.setImg( uploadFileMap.get(0).get("filePath")+ File.separator + thumbNail.getFileName());
|
||||
}
|
||||
} catch (WnbtRestException wre) {
|
||||
log.error(wre.getMessage(), wre);
|
||||
throw new WnbtRestException("파일 업로드에 실패했습니다." + wre.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new WnbtRestException("파일 업로드에 실패했습니다." + e.getMessage());
|
||||
}
|
||||
//파일 업로드 관련 END
|
||||
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
String result = boSubsvcService.updateBOMngrSubsvc(vo);
|
||||
message.put("message",result);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 구독서비스 등록(복사)품
|
||||
* @param vo
|
||||
* @return SubsvcC.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectSubsvcRegistForm")
|
||||
public String selectSubsvcRegistForm(BOSubsvcVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if ("01".equals(user.getSysDvCd())) {
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("paramVO", vo);
|
||||
|
||||
// 구독서비스 상세조회
|
||||
DataMap subsvcDtl = boSubsvcService.selectBOSubsvcDetail(vo);
|
||||
content.put("subsvcDtl", subsvcDtl);
|
||||
|
||||
//판매상태
|
||||
BOMaComncdVO param = new BOMaComncdVO();
|
||||
param.setGroupCd("GOODS_STTUS");
|
||||
List<?> subsvcSttusList = boMaComncdService.selectBOCommcdDetailList(param);
|
||||
content.put("subsvcSttusList", subsvcSttusList);
|
||||
|
||||
//노출구분
|
||||
param.setGroupCd("EXPSR_DV");
|
||||
List<?> expsrDvList = boMaComncdService.selectBOCommcdDetailList(param);
|
||||
content.put("expsrDvList", expsrDvList);
|
||||
|
||||
//가용재고정책
|
||||
param.setGroupCd("INVNTRY_POLICY");
|
||||
List<?> invntryPolicyList = boMaComncdService.selectBOCommcdDetailList(param);
|
||||
content.put("invntryPolicyList", invntryPolicyList);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
return "mngr/goods/subsvc/SubsvcC";
|
||||
}
|
||||
|
||||
/**
|
||||
* 구독서비스 등록
|
||||
* @param vo
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/insertSubsvc", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> insertSubsvc(BOSubsvcVO vo, HttpServletRequest request, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
if ("01".equals(user.getSysDvCd())) {
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
//파일 업로드 관련 START
|
||||
List<HashMap<String, Object>> uploadFileMap = new ArrayList<HashMap<String, Object>>();
|
||||
|
||||
request.setAttribute("shopCd", vo.getSopmalCd());
|
||||
request.setAttribute("pathGubun", "GDIG"); //이미지구분코드 - 상품
|
||||
|
||||
try {
|
||||
/*파일 업로드 후 경로 추출하여 vo에 셋팅*/
|
||||
uploadFileMap = filestore.fileUpload(request);
|
||||
if(uploadFileMap.size() == 1){
|
||||
FileVo thumbNail = (FileVo) uploadFileMap.get(0).get("thumbNail");
|
||||
vo.setImg( uploadFileMap.get(0).get("filePath")+ File.separator + thumbNail.getFileName());
|
||||
}
|
||||
} catch (WnbtRestException wre) {
|
||||
log.error(wre.getMessage(), wre);
|
||||
throw new WnbtRestException("파일 업로드에 실패했습니다." + wre.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new WnbtRestException("파일 업로드에 실패했습니다." + e.getMessage());
|
||||
}
|
||||
//파일 업로드 관련 END
|
||||
|
||||
//기본상품옵션번호셋팅
|
||||
vo.setDftGoodsOptnInnb(dftGoodsOptnInnb);
|
||||
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
String result = boSubsvcService.insertBOMngrSubsvc(vo);
|
||||
message.put("message",result);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 구독서비스 목록 조회 리스트
|
||||
* @param vo
|
||||
* @param model
|
||||
* @return SubsvcList.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectSubsvcList")
|
||||
public String selectSubsvcList(BOSubsvcVO vo,ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
// 페이징 객체 생성 & 페이징정보 할당
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
|
||||
vo.setPaginationInfo(paginationInfo);
|
||||
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
if(StringUtils.isEmpty(vo.getSortDv())){
|
||||
//정렬기준 초기값 셋팅
|
||||
vo.setSortDv("subsvcGnrAsc");
|
||||
}
|
||||
|
||||
// 목록 조회
|
||||
List<DataMap> list = boSubsvcService.selectBOMngrSubsvcList(vo);
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("paramVO", vo);
|
||||
|
||||
content.put("list", list);
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
|
||||
return "mngr/goods/subsvc/SubsvcList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 구독서비스명 중복체크
|
||||
* @param vo
|
||||
* @return ResponseEntity<WnbtResponse>
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectSubsvcNmDupCheck", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> selectSubsvcNmDupCheck(BOSubsvcVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
DataMap message = new DataMap();
|
||||
String result = boSubsvcService.selectBOMngrSubsvcNmDupCheck(vo);
|
||||
message.put("message", result);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 구독서비스 선택삭제
|
||||
* @param vo
|
||||
* @return ResponseEntity<WnbtResponse>
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/deleteSubsvc", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> deleteSubsvc(BOSubsvcVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setUpdusr(user.getUserInnb()); //수정자
|
||||
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
DataMap message = new DataMap();
|
||||
String result = boSubsvcService.deleteBOMngrSubsvc(vo);
|
||||
message.put("message", result);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 구독서비스 목록 조회 리스트
|
||||
* @param vo
|
||||
* @return ResponseEntity<WnbtResponse>
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectSrchSubsvcGnrListAjax", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> selectSrchSubsvcGnrListAjax(BOSubsvcVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
|
||||
// 조회조건 구독서비스
|
||||
List<DataMap> SrchSubsvcGnrList = boSubsvcService.selectBOMngrSrchSubsvcGnrList(vo);
|
||||
content.put("srchSubsvcGnrList", SrchSubsvcGnrList);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,12 @@ package com.wb.domainserver.domain.mngr.main.controller;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.wb.domainserver.domain.admin.store.sopmal.service.BOMaSopmalService;
|
||||
import com.wb.domainserver.domain.admin.store.sopmal.vo.BOMaSopmalVO;
|
||||
import com.wb.domainserver.domain.gcone.bbs.bbs.service.BOBbsService;
|
||||
import com.wb.domainserver.domain.gcone.bbs.bbs.vo.BOBbsVO;
|
||||
import com.wb.domainserver.domain.gcone.main.service.BOMainService;
|
||||
import com.wb.domainserver.domain.mngr.main.vo.MainVO;
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
import com.wb.domainserver.exception.code.ErrorCode;
|
||||
import com.wb.domainserver.realm.RealmContextHolder;
|
||||
import com.wb.domainserver.response.WnbtResponse;
|
||||
import com.wb.domainserver.response.WnbtResponseBody;
|
||||
@@ -43,6 +47,8 @@ public class MngrMainController {
|
||||
private BOMainService service;
|
||||
@Autowired
|
||||
private BOMaSopmalService maSopmalService;
|
||||
@Autowired
|
||||
private BOBbsService bbsService;
|
||||
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
@@ -68,52 +74,85 @@ public class MngrMainController {
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/main")
|
||||
// public String selectMngrMainInqire(@CookieValue(value = "authSopmalCd") String authSopmalCd, ModelMap model, HttpServletRequest request) {
|
||||
public String selectMngrMainInqire(String authSopmalCd, ModelMap model, HttpServletRequest request ) {
|
||||
DataMap vo = new DataMap();
|
||||
|
||||
log.debug("authSopmalCd index1 {}", authSopmalCd);
|
||||
|
||||
if("".equals(authSopmalCd)|| authSopmalCd == null) {
|
||||
log.debug("index authSopmalCd is null");
|
||||
authSopmalCd = request.getAttribute("authSopmalCd") != null ? request.getAttribute("authSopmalCd").toString() : "";
|
||||
// log.debug("request Attribute authSopmalCd X");
|
||||
public String selectMngrMainInqire(String authSopmalCd, ModelMap model, HttpServletRequest request, HttpServletResponse response ) {
|
||||
BOBbsVO vo = new BOBbsVO();
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
// 쇼핑몰코드
|
||||
vo.setRegusr(user.getUserInnb()); // 등록자
|
||||
vo.setUpdusr(user.getUserInnb()); // 수정자
|
||||
|
||||
log.debug("authSopmalCd index2 {}", authSopmalCd);
|
||||
DataMap resultMap = new DataMap();
|
||||
resultMap = bbsService.selectBOBbscttDshboardInqireForm(vo);
|
||||
|
||||
String sopmalCd = "";
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
//최초 로그인이 아니면 쿠키에서 쇼핑몰정보 조회
|
||||
if(StringUtil.isEmpty(authSopmalCd)) {
|
||||
try {
|
||||
resultMap.put("updBbsList", objectMapper.writeValueAsString(resultMap.get("updBbsList")));
|
||||
|
||||
if(request.getCookies()!=null) {
|
||||
|
||||
for(Cookie cookie : request.getCookies()){
|
||||
if("authSopmalCd".equals(cookie.getName())){
|
||||
sopmalCd = cookie.getValue();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
sopmalCd = authSopmalCd;
|
||||
} catch (WnbtRestException wre){
|
||||
log.error(wre.getMessage(), wre);
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
} catch(Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
model.addAttribute("resultMap", resultMap);
|
||||
|
||||
log.debug("main sopmalCd set {}", sopmalCd);
|
||||
return "mngr/bbs/bbsmngr/BbscttDshboardForm";
|
||||
|
||||
vo.put("sopmalCd", sopmalCd);
|
||||
|
||||
//쇼핑몰 지정후 메인 이동시 sopmalCd 세팅
|
||||
model.addAttribute("cookieAuthSopmalCd", sopmalCd);
|
||||
|
||||
log.debug("mainindex {}", model.getAttribute("cookieAuthSopmalCd"));
|
||||
|
||||
// vo.put("sopmalCd", authSopmalCd);
|
||||
Map<String, Object> content = service.selectBOMngrMainInqire(vo);
|
||||
model.addAttribute("resultMap", content);
|
||||
return "mngr/index";
|
||||
// DataMap vo = new DataMap();
|
||||
//
|
||||
// log.debug("authSopmalCd index1 {}", authSopmalCd);
|
||||
//
|
||||
// if("".equals(authSopmalCd)|| authSopmalCd == null) {
|
||||
// log.debug("index authSopmalCd is null");
|
||||
// authSopmalCd = request.getAttribute("authSopmalCd") != null ? request.getAttribute("authSopmalCd").toString() : "";
|
||||
//// log.debug("request Attribute authSopmalCd X");
|
||||
//
|
||||
// }
|
||||
//
|
||||
// log.debug("authSopmalCd index2 {}", authSopmalCd);
|
||||
//
|
||||
// String sopmalCd = "";
|
||||
//
|
||||
// //최초 로그인이 아니면 쿠키에서 쇼핑몰정보 조회
|
||||
// if(StringUtil.isEmpty(authSopmalCd)) {
|
||||
//
|
||||
// if(request.getCookies()!=null) {
|
||||
//
|
||||
// for(Cookie cookie : request.getCookies()){
|
||||
// if("authSopmalCd".equals(cookie.getName())){
|
||||
// sopmalCd = cookie.getValue();
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }else{
|
||||
// sopmalCd = authSopmalCd;
|
||||
// }
|
||||
//
|
||||
// log.debug("main sopmalCd set {}", sopmalCd);
|
||||
//
|
||||
// vo.put("sopmalCd", sopmalCd);
|
||||
//
|
||||
// //쇼핑몰 지정후 메인 이동시 sopmalCd 세팅
|
||||
// model.addAttribute("cookieAuthSopmalCd", sopmalCd);
|
||||
//
|
||||
// log.debug("mainindex {}", model.getAttribute("cookieAuthSopmalCd"));
|
||||
//
|
||||
//
|
||||
//// vo.put("sopmalCd", authSopmalCd);
|
||||
// Map<String, Object> content = service.selectBOMngrMainInqire(vo);
|
||||
// model.addAttribute("resultMap", content);
|
||||
// return "mngr/index";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -124,23 +124,16 @@ public class AtmcSndngController {
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
vo.setFormDvCd("FORM_DV_");
|
||||
|
||||
//시스템 02
|
||||
vo.setMngrDv("02");
|
||||
vo.setFormDvCd("FORM_DV_");
|
||||
vo.setMngrDv("01");
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
//검색 폼 code
|
||||
List<DataMap> sopmal = service.selectBOSopmalAtmcSndng();
|
||||
content.put("sopmal",sopmal);
|
||||
//초기 쇼핑몰 코드 없을 경우 목록의 첫번째 입력
|
||||
if("".equals(StringUtil.isNullToString(vo.getSopmalCd()))) {
|
||||
vo.setSopmalCd(StringUtil.isNullToString(sopmal.get(0).get("sopmalCd")));
|
||||
}
|
||||
content.put("bOAtmcSndngVO", vo);
|
||||
content.put("boCtrlMap", service.selectBOAtmcSndngManageListInqire(vo));
|
||||
content.put("shopAtmcSndntTme", service.selectBOShopAtmcSndngTme(vo));
|
||||
|
||||
|
||||
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/atmcsnd/selectBOAtmcSndngManageListInqire", vo)
|
||||
// );
|
||||
|
||||
@@ -0,0 +1,453 @@
|
||||
package com.wb.domainserver.domain.mngr.ordr.subsvc.controller;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||
import com.wb.domainserver.domain.admin.store.sopmal.service.BOMaSopmalService;
|
||||
import com.wb.domainserver.domain.admin.sys.comncd.service.BOMaComncdService;
|
||||
import com.wb.domainserver.domain.admin.sys.comncd.vo.BOMaComncdVO;
|
||||
import com.wb.domainserver.domain.gcone.common.service.BOCommonService;
|
||||
import com.wb.domainserver.domain.gcone.goods.purchs.service.BOOrderService;
|
||||
import com.wb.domainserver.domain.gcone.goods.purchs.vo.BOOrderLogVO;
|
||||
import com.wb.domainserver.domain.gcone.goods.subsvc.service.BOSubsvcService;
|
||||
import com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO;
|
||||
import com.wb.domainserver.domain.gcone.ordr.ordr.service.BOOrdrService;
|
||||
import com.wb.domainserver.domain.gcone.ordr.ordr.vo.*;
|
||||
import com.wb.domainserver.domain.gcone.ordr.pay.vo.BOPayVO;
|
||||
import com.wb.domainserver.domain.gcone.ordr.subsvc.service.BOSubsvcOrdrService;
|
||||
import com.wb.domainserver.domain.gcone.ordr.subsvc.vo.BOSubsvcOrderVO;
|
||||
import com.wb.domainserver.domain.gcone.setup.dlvygrp.service.BODlvygrpService;
|
||||
import com.wb.domainserver.domain.gcone.setup.nbkk.service.BONbkkService;
|
||||
import com.wb.domainserver.domain.gcone.setup.nbkk.vo.BOSetupNbkkVO;
|
||||
import com.wb.domainserver.domain.mngr.ordr.ordrmngr.vo.DwldItmVO;
|
||||
import com.wb.domainserver.domain.mngr.ordr.ordrmngr.vo.OrdrShippingVO;
|
||||
import com.wb.domainserver.domain.mngr.ordr.ordrmngr.vo.OrdrSrchVO;
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
import com.wb.domainserver.exception.code.ErrorCode;
|
||||
import com.wb.domainserver.response.WnbtResponse;
|
||||
import com.wb.domainserver.response.WnbtResponseBody;
|
||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
||||
import com.wb.domainserver.security.authentication.AnonymousUser;
|
||||
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||
import com.wb.domainserver.util.communicate.ValidateResultConverter;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
||||
import io.micrometer.common.util.StringUtils;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.CookieValue;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.math.BigInteger;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 구독서비스 주문 관리 Controller
|
||||
*
|
||||
* @author jazz
|
||||
* @since 2026-02-05
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2026-02-05 jazz 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/mngr/ordr/subsvc")
|
||||
@Slf4j
|
||||
public class SubsvcOrdrController {
|
||||
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
/** 공통 메시지 처리를 위한 메시지 객체 */
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
@Autowired
|
||||
private BOSubsvcOrdrService boSubsvcOrdrService;
|
||||
|
||||
@Autowired
|
||||
private BOSubsvcService boSubsvcService;
|
||||
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
|
||||
/**
|
||||
* 구독서비스 상품준비 조회 폼
|
||||
* @param subsvcVO,subsvcOrderVO,model,authSopmalCd
|
||||
* @return SubsvcOrdrListForm.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectSubsvcOrdrListForm")
|
||||
public String selectSubsvcOrdrListForm(BOSubsvcVO subsvcVO, BOSubsvcOrderVO subsvcOrderVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
subsvcVO.setSopmalCd(authSopmalCd);
|
||||
subsvcOrderVO.setSopmalCd(authSopmalCd);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
subsvcVO.setSopmalCd(user.getSopmalCd());
|
||||
subsvcOrderVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("paramVO", subsvcOrderVO);
|
||||
|
||||
// 조회조건 구독서비스
|
||||
List<?> SrchSubsvcList = boSubsvcService.selectBOMngrSrchSubsvcList(subsvcVO);
|
||||
content.put("srchSubsvcList", SrchSubsvcList);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
return "mngr/ordr/subsvc/SubsvcOrdrListForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 구독서비스 상품준비 목록 조회 리스트
|
||||
* @param subsvcOrderVO
|
||||
* @param model
|
||||
* @return SubsvcOrdrList.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectSubsvcOrdrList")
|
||||
public String selectSubsvcOrdrList(BOSubsvcOrderVO subsvcOrderVO,ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
subsvcOrderVO.setSopmalCd(authSopmalCd);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
subsvcOrderVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
// 페이징 객체 생성 & 페이징정보 할당
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(subsvcOrderVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(subsvcOrderVO.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
|
||||
subsvcOrderVO.setPaginationInfo(paginationInfo);
|
||||
subsvcOrderVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
subsvcOrderVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
subsvcOrderVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
if(StringUtils.isEmpty(subsvcOrderVO.getSortDv())){
|
||||
//정렬기준 초기값 셋팅
|
||||
subsvcOrderVO.setSortDv("subsvcGnrAsc");
|
||||
}
|
||||
|
||||
// 목록 조회
|
||||
List<DataMap> list = boSubsvcOrdrService.selectBOSubsvcOrderList(subsvcOrderVO);
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("paramVO", subsvcOrderVO);
|
||||
|
||||
content.put("list", list);
|
||||
content.put("paginationInfo", subsvcOrderVO.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
|
||||
return "mngr/ordr/subsvc/SubsvcOrdrList";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 구독서비스 상품준비 일괄처리
|
||||
* @param subsvcOrderVO
|
||||
* @return ResponseEntity<WnbtResponse>
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/updateSubsvcOrdrReady", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateSubsvcOrdrReady(BOSubsvcOrderVO subsvcOrderVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
subsvcOrderVO.setSopmalCd(authSopmalCd);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
subsvcOrderVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
/**
|
||||
* 체크대상정보 파싱
|
||||
* 형태 : 주문고유번호@주문상품고유번호@주문상품옵션고유번호@주문배송고유번호
|
||||
* */
|
||||
subsvcOrderVO.setArrOrdrInnb(new ArrayList<String>());
|
||||
subsvcOrderVO.setArrOrdrGoodsInnb(new ArrayList<String>());
|
||||
subsvcOrderVO.setArrOrdrGoodsOptnInnb(new ArrayList<String>());
|
||||
subsvcOrderVO.setArrOrdrDlvyInnb(new ArrayList<String>());
|
||||
ArrayList<String> arrCheck = (ArrayList<String>)subsvcOrderVO.getArrCheck();
|
||||
|
||||
((ArrayList<String>)subsvcOrderVO.getArrCheck()).forEach(check -> {
|
||||
String[] innb = check.split("@");
|
||||
subsvcOrderVO.getArrOrdrInnb().add(innb[0]);
|
||||
subsvcOrderVO.getArrOrdrGoodsInnb().add(innb[1]);
|
||||
subsvcOrderVO.getArrOrdrGoodsOptnInnb().add(innb[2]);
|
||||
subsvcOrderVO.getArrOrdrDlvyInnb().add(innb[3]);
|
||||
});
|
||||
|
||||
DataMap message = new DataMap();
|
||||
String result = "";
|
||||
|
||||
try{
|
||||
result = boSubsvcOrdrService.updateSubsvcOrdrReady(subsvcOrderVO);
|
||||
}catch(Exception e){
|
||||
log.error(e.getMessage());
|
||||
result = "fail";
|
||||
}
|
||||
|
||||
message.put("message", result);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 구독서비스 상품준비 배송내역 목록 팝업
|
||||
* @param subsvcOrderVO
|
||||
* @param model
|
||||
* @return SubsvcOrdrList.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectSubsvcOrdrDlvyListPop")
|
||||
public String selectSubsvcOrdrDlvyListPop(BOSubsvcOrderVO subsvcOrderVO,ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
subsvcOrderVO.setSopmalCd(authSopmalCd);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
subsvcOrderVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
// 목록 조회
|
||||
List<DataMap> list = boSubsvcOrdrService.selectBOSubsvcOrderDlvyList(subsvcOrderVO);
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("paramVO", subsvcOrderVO);
|
||||
|
||||
content.put("list", list);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
|
||||
return "mngr/ordr/subsvc/SubsvcOrdrDlvyListPop";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 구독서비스 상품변경 조회 폼
|
||||
* @param subsvcVO,subsvcOrderVO,model,authSopmalCd
|
||||
* @return SubsvcOrdrMappedListForm.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectSubsvcOrdrMappedListForm")
|
||||
public String selectSubsvcOrdrMappedListForm(BOSubsvcVO subsvcVO, BOSubsvcOrderVO subsvcOrderVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
subsvcVO.setSopmalCd(authSopmalCd);
|
||||
subsvcOrderVO.setSopmalCd(authSopmalCd);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
subsvcVO.setSopmalCd(user.getSopmalCd());
|
||||
subsvcOrderVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("paramVO", subsvcOrderVO);
|
||||
|
||||
// 조회조건 구독서비스
|
||||
List<?> SrchSubsvcList = boSubsvcService.selectBOMngrSrchSubsvcList(subsvcVO);
|
||||
content.put("srchSubsvcList", SrchSubsvcList);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
return "mngr/ordr/subsvc/SubsvcOrdrMappedListForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 구독서비스 상품변경 목록 조회 리스트
|
||||
* @param subsvcOrderVO
|
||||
* @param model
|
||||
* @return SubsvcOrdrMappedList.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectSubsvcOrdrMappedList")
|
||||
public String selectSubsvcOrdrMappedList(BOSubsvcOrderVO subsvcOrderVO,ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
subsvcOrderVO.setSopmalCd(authSopmalCd);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
subsvcOrderVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
// 페이징 객체 생성 & 페이징정보 할당
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(subsvcOrderVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(subsvcOrderVO.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
|
||||
subsvcOrderVO.setPaginationInfo(paginationInfo);
|
||||
subsvcOrderVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
subsvcOrderVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
subsvcOrderVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
if(StringUtils.isEmpty(subsvcOrderVO.getSortDv())){
|
||||
//정렬기준 초기값 셋팅
|
||||
subsvcOrderVO.setSortDv("subsvcGnrAsc");
|
||||
}
|
||||
|
||||
// 목록 조회
|
||||
List<DataMap> list = boSubsvcOrdrService.selectBOSubsvcOrderMappedList(subsvcOrderVO);
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("paramVO", subsvcOrderVO);
|
||||
|
||||
content.put("list", list);
|
||||
content.put("paginationInfo", subsvcOrderVO.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
|
||||
return "mngr/ordr/subsvc/SubsvcOrdrMappedList";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 구독서비스 구독자 조회 폼
|
||||
* @param subsvcVO,subsvcOrderVO,model,authSopmalCd
|
||||
* @return SubsvcOrdrMbrListForm.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectSubsvcOrdrMbrListForm")
|
||||
public String selectSubsvcOrdrMbrListForm(BOSubsvcVO subsvcVO, BOSubsvcOrderVO subsvcOrderVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
subsvcVO.setSopmalCd(authSopmalCd);
|
||||
subsvcOrderVO.setSopmalCd(authSopmalCd);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
subsvcVO.setSopmalCd(user.getSopmalCd());
|
||||
subsvcOrderVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("paramVO", subsvcOrderVO);
|
||||
|
||||
// 조회조건 구독서비스
|
||||
List<?> SrchSubsvcList = boSubsvcService.selectBOMngrSrchSubsvcList(subsvcVO);
|
||||
content.put("srchSubsvcList", SrchSubsvcList);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
return "mngr/ordr/subsvc/SubsvcOrdrMbrListForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 구독서비스 구독자 목록 조회 리스트
|
||||
* @param subsvcOrderVO
|
||||
* @param model
|
||||
* @return SubsvcOrdrMbrList.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectSubsvcOrdrMbrList")
|
||||
public String selectSubsvcOrdrMbrList(BOSubsvcOrderVO subsvcOrderVO,ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
subsvcOrderVO.setSopmalCd(authSopmalCd);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
subsvcOrderVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
// 페이징 객체 생성 & 페이징정보 할당
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(subsvcOrderVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(subsvcOrderVO.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
|
||||
subsvcOrderVO.setPaginationInfo(paginationInfo);
|
||||
subsvcOrderVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
subsvcOrderVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
subsvcOrderVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
if(StringUtils.isEmpty(subsvcOrderVO.getSortDv())){
|
||||
//정렬기준 초기값 셋팅
|
||||
subsvcOrderVO.setSortDv("subsvcGnrAsc");
|
||||
}
|
||||
|
||||
// 목록 조회
|
||||
List<DataMap> list = boSubsvcOrdrService.selectBOSubsvcOrderMbrList(subsvcOrderVO);
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("paramVO", subsvcOrderVO);
|
||||
content.put("list", list);
|
||||
content.put("paginationInfo", subsvcOrderVO.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
|
||||
return "mngr/ordr/subsvc/SubsvcOrdrMbrList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 구독서비스 구독자 조회 - 구독자 목록 팝업
|
||||
* @param subsvcOrderVO
|
||||
* @param model
|
||||
* @return SubsvcOrdrList.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectSubsvcOrderMbrInfoListPop")
|
||||
public String selectSubsvcOrderMbrInfoListPop(BOSubsvcOrderVO subsvcOrderVO,ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
subsvcOrderVO.setSopmalCd(authSopmalCd);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
subsvcOrderVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
//구독서비스 정보 조회
|
||||
DataMap subsvcInfo = boSubsvcOrdrService.selectBOSubsvcInfo(subsvcOrderVO);
|
||||
// 목록 조회
|
||||
List<DataMap> list = boSubsvcOrdrService.selectBOSubsvcOrderMbrInfoList(subsvcOrderVO);
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("paramVO", subsvcOrderVO);
|
||||
content.put("subsvcInfo", subsvcInfo);
|
||||
content.put("list", list);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
|
||||
return "mngr/ordr/subsvc/SubsvcOrderMbrInfoListPop";
|
||||
}
|
||||
|
||||
/**
|
||||
* 구독서비스 구독자 조회 - 배송상품 목록 팝업
|
||||
* @param subsvcOrderVO
|
||||
* @param model
|
||||
* @return SubsvcOrdrList.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectSubsvcOrderGoodsInfoListPop")
|
||||
public String selectSubsvcOrderGoodsInfoListPop(BOSubsvcOrderVO subsvcOrderVO,ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
subsvcOrderVO.setSopmalCd(authSopmalCd);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
subsvcOrderVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
//구독서비스 정보 조회
|
||||
DataMap subsvcInfo = boSubsvcOrdrService.selectBOSubsvcInfo(subsvcOrderVO);
|
||||
// 목록 조회
|
||||
List<DataMap> list = boSubsvcOrdrService.selectBOSubsvcOrderGoodsInfoList(subsvcOrderVO);
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("paramVO", subsvcOrderVO);
|
||||
content.put("subsvcInfo", subsvcInfo);
|
||||
content.put("list", list);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
|
||||
return "mngr/ordr/subsvc/SubsvcOrderGoodsInfoListPop";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -151,11 +151,15 @@ public class SetupDlvygrpController {
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
|
||||
// VO Param setting
|
||||
// 기본배송비 null 일때 0으로 기본값 셋팅
|
||||
if(StringUtil.isEmpty(dlvyGroup.getDftDlvyAmt())) {
|
||||
dlvyGroup.setDftDlvyAmt("0");
|
||||
}
|
||||
if(StringUtil.isEmpty(dlvyGroup.getDftDlvyAmt2())) {
|
||||
dlvyGroup.setDftDlvyAmt2("0");
|
||||
}
|
||||
// 금액조건 여부가 Null 이거나 N 일때, 금액값 기본값 셋팅
|
||||
if(dlvyGroup.getAmtCndUseAt() == null || dlvyGroup.getAmtCndUseAt().equals("N")) {
|
||||
dlvyGroup.setAmtCndAditAmt("0");
|
||||
@@ -164,6 +168,13 @@ public class SetupDlvygrpController {
|
||||
dlvyGroup.setAmtCndUseAt("N");
|
||||
}
|
||||
}
|
||||
if(dlvyGroup.getAmtCndUseAt2() == null || dlvyGroup.getAmtCndUseAt2().equals("N")) {
|
||||
dlvyGroup.setAmtCndAditAmt2("0");
|
||||
// 금액조건2 여부가 null 일 때 N으로 기본값 셋팅
|
||||
if(dlvyGroup.getAmtCndUseAt2() == null) {
|
||||
dlvyGroup.setAmtCndUseAt2("N");
|
||||
}
|
||||
}
|
||||
// 개수조건 여부가 Null 이거나 N 일때, 금액값 기본값 셋팅
|
||||
if(dlvyGroup.getCntCndUseAt() == null || dlvyGroup.getCntCndUseAt().equals("N")) {
|
||||
dlvyGroup.setCntCndAditAmt("0");
|
||||
@@ -172,6 +183,13 @@ public class SetupDlvygrpController {
|
||||
dlvyGroup.setCntCndUseAt("N");
|
||||
}
|
||||
}
|
||||
if(dlvyGroup.getCntCndUseAt2() == null || dlvyGroup.getCntCndUseAt2().equals("N")) {
|
||||
dlvyGroup.setCntCndAditAmt2("0");
|
||||
// 개수조건2 여부가 null 일 때 N으로 기본값 셋팅
|
||||
if(dlvyGroup.getCntCndUseAt2() == null){
|
||||
dlvyGroup.setCntCndUseAt2("N");
|
||||
}
|
||||
}
|
||||
// 묶음배송 여부가 Null 이거나 N 일때, 금액값 기본값 셋팅
|
||||
if(dlvyGroup.getBundleDlvyUseAt() == null || dlvyGroup.getBundleDlvyUseAt().equals("N")){
|
||||
dlvyGroup.setBundleDlvyCndAmt("0");
|
||||
@@ -180,23 +198,42 @@ public class SetupDlvygrpController {
|
||||
dlvyGroup.setBundleDlvyUseAt("N");
|
||||
}
|
||||
}
|
||||
if(dlvyGroup.getBundleDlvyUseAt2() == null || dlvyGroup.getBundleDlvyUseAt2().equals("N")){
|
||||
dlvyGroup.setBundleDlvyCndAmt2("0");
|
||||
// 묶음배송 여부가 null 일 때 N으로 기본값 셋팅
|
||||
if(dlvyGroup.getBundleDlvyUseAt2() == null) {
|
||||
dlvyGroup.setBundleDlvyUseAt2("N");
|
||||
}
|
||||
}
|
||||
// 배송권역 여부가 Null 이거나 N 일때, 금액값 기본값 셋팅
|
||||
if(dlvyGroup.getDlvyAreaAditAt().equals("N")) {
|
||||
dlvyGroup.setAreaAditDlvyAmt("0");
|
||||
}
|
||||
if(dlvyGroup.getDlvyAreaAditAt2().equals("N")) {
|
||||
dlvyGroup.setAreaAditDlvyAmt2("0");
|
||||
}
|
||||
// 반품배송비 편도 null 일때 0으로 기본값 셋팅
|
||||
if(StringUtil.isEmpty(dlvyGroup.getDftDlvyAmt())) {
|
||||
if(StringUtil.isEmpty(dlvyGroup.getReturnDlvyAmt())) {
|
||||
dlvyGroup.setReturnDlvyAmt("0");
|
||||
}
|
||||
if(StringUtil.isEmpty(dlvyGroup.getReturnDlvyAmt2())) {
|
||||
dlvyGroup.setReturnDlvyAmt2("0");
|
||||
}
|
||||
// 반품배송비 왕복 null 일때 0으로 기본값 셋팅
|
||||
if(StringUtil.isEmpty(dlvyGroup.getDftDlvyAmt())) {
|
||||
if(StringUtil.isEmpty(dlvyGroup.getExchngDlvyAmt())) {
|
||||
dlvyGroup.setExchngDlvyAmt("0");
|
||||
}
|
||||
if(StringUtil.isEmpty(dlvyGroup.getExchngDlvyAmt2())) {
|
||||
dlvyGroup.setExchngDlvyAmt2("0");
|
||||
}
|
||||
|
||||
//반품 배송비 왕복금액 적용여부 null 일 경우 N 처리
|
||||
if(StringUtil.isEmpty(dlvyGroup.getReturnDlvyApplcAt())) {
|
||||
dlvyGroup.setReturnDlvyApplcAt("N");
|
||||
}
|
||||
if(StringUtil.isEmpty(dlvyGroup.getReturnDlvyApplcAt2())) {
|
||||
dlvyGroup.setReturnDlvyApplcAt2("N");
|
||||
}
|
||||
// 숫자(금액&갯수) ',' 제거
|
||||
dlvyGroup.setDftDlvyAmt(StringUtil.removeCommaChar(dlvyGroup.getDftDlvyAmt()));
|
||||
dlvyGroup.setAmtCndAditAmt(StringUtil.removeCommaChar(dlvyGroup.getAmtCndAditAmt()));
|
||||
@@ -206,6 +243,14 @@ public class SetupDlvygrpController {
|
||||
dlvyGroup.setReturnDlvyAmt(StringUtil.removeCommaChar(dlvyGroup.getReturnDlvyAmt()));
|
||||
dlvyGroup.setExchngDlvyAmt(StringUtil.removeCommaChar(dlvyGroup.getExchngDlvyAmt()));
|
||||
|
||||
dlvyGroup.setDftDlvyAmt2(StringUtil.removeCommaChar(dlvyGroup.getDftDlvyAmt2()));
|
||||
dlvyGroup.setAmtCndAditAmt2(StringUtil.removeCommaChar(dlvyGroup.getAmtCndAditAmt2()));
|
||||
dlvyGroup.setCntCndAditAmt2(StringUtil.removeCommaChar(dlvyGroup.getCntCndAditAmt2()));
|
||||
dlvyGroup.setAreaAditDlvyAmt2(StringUtil.removeCommaChar(dlvyGroup.getAreaAditDlvyAmt2()));
|
||||
dlvyGroup.setBundleDlvyCndAmt2(StringUtil.removeCommaChar(dlvyGroup.getBundleDlvyCndAmt2()));
|
||||
dlvyGroup.setReturnDlvyAmt2(StringUtil.removeCommaChar(dlvyGroup.getReturnDlvyAmt2()));
|
||||
dlvyGroup.setExchngDlvyAmt2(StringUtil.removeCommaChar(dlvyGroup.getExchngDlvyAmt2()));
|
||||
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
dlvyGroup.setRegusr(user.getUserInnb());
|
||||
@@ -369,6 +414,9 @@ public class SetupDlvygrpController {
|
||||
if(StringUtil.isEmpty(dlvyGroup.getDftDlvyAmt())) {
|
||||
dlvyGroup.setDftDlvyAmt("0");
|
||||
}
|
||||
if(StringUtil.isEmpty(dlvyGroup.getDftDlvyAmt2())) {
|
||||
dlvyGroup.setDftDlvyAmt2("0");
|
||||
}
|
||||
// 금액조건 여부가 Null 이거나 N 일때, 금액값 기본값 셋팅
|
||||
if(dlvyGroup.getAmtCndUseAt() == null || dlvyGroup.getAmtCndUseAt().equals("N")) {
|
||||
dlvyGroup.setAmtCndAditAmt("0");
|
||||
@@ -377,6 +425,13 @@ public class SetupDlvygrpController {
|
||||
dlvyGroup.setAmtCndUseAt("N");
|
||||
}
|
||||
}
|
||||
if(dlvyGroup.getAmtCndUseAt2() == null || dlvyGroup.getAmtCndUseAt2().equals("N")) {
|
||||
dlvyGroup.setAmtCndAditAmt2("0");
|
||||
// 금액조건2 여부가 null 일 때 N으로 기본값 셋팅
|
||||
if(dlvyGroup.getAmtCndUseAt2() == null) {
|
||||
dlvyGroup.setAmtCndUseAt2("N");
|
||||
}
|
||||
}
|
||||
// 개수조건 여부가 Null 이거나 N 일때, 금액값 기본값 셋팅
|
||||
if(dlvyGroup.getCntCndUseAt() == null || dlvyGroup.getCntCndUseAt().equals("N")) {
|
||||
dlvyGroup.setCntCndAditAmt("0");
|
||||
@@ -385,6 +440,13 @@ public class SetupDlvygrpController {
|
||||
dlvyGroup.setCntCndUseAt("N");
|
||||
}
|
||||
}
|
||||
if(dlvyGroup.getCntCndUseAt2() == null || dlvyGroup.getCntCndUseAt2().equals("N")) {
|
||||
dlvyGroup.setCntCndAditAmt2("0");
|
||||
// 개수조건2 여부가 null 일 때 N으로 기본값 셋팅
|
||||
if(dlvyGroup.getCntCndUseAt2() == null){
|
||||
dlvyGroup.setCntCndUseAt2("N");
|
||||
}
|
||||
}
|
||||
// 묶음배송 여부가 Null 이거나 N 일때, 금액값 기본값 셋팅
|
||||
if(dlvyGroup.getBundleDlvyUseAt() == null || dlvyGroup.getBundleDlvyUseAt().equals("N")){
|
||||
dlvyGroup.setBundleDlvyCndAmt("0");
|
||||
@@ -393,26 +455,43 @@ public class SetupDlvygrpController {
|
||||
dlvyGroup.setBundleDlvyUseAt("N");
|
||||
}
|
||||
}
|
||||
if(dlvyGroup.getBundleDlvyUseAt2() == null || dlvyGroup.getBundleDlvyUseAt2().equals("N")){
|
||||
dlvyGroup.setBundleDlvyCndAmt2("0");
|
||||
// 묶음배송 여부가 null 일 때 N으로 기본값 셋팅
|
||||
if(dlvyGroup.getBundleDlvyUseAt2() == null) {
|
||||
dlvyGroup.setBundleDlvyUseAt2("N");
|
||||
}
|
||||
}
|
||||
// 배송권역 여부가 Null 이거나 N 일때, 금액값 기본값 셋팅
|
||||
if(dlvyGroup.getDlvyAreaAditAt().equals("N")) {
|
||||
dlvyGroup.setAreaAditDlvyAmt("0");
|
||||
}
|
||||
|
||||
if(dlvyGroup.getDlvyAreaAditAt2().equals("N")) {
|
||||
dlvyGroup.setAreaAditDlvyAmt2("0");
|
||||
}
|
||||
// 반품배송비 편도 null 일때 0으로 기본값 셋팅
|
||||
if(StringUtil.isEmpty(dlvyGroup.getDftDlvyAmt())) {
|
||||
if(StringUtil.isEmpty(dlvyGroup.getReturnDlvyAmt())) {
|
||||
dlvyGroup.setReturnDlvyAmt("0");
|
||||
}
|
||||
if(StringUtil.isEmpty(dlvyGroup.getReturnDlvyAmt2())) {
|
||||
dlvyGroup.setReturnDlvyAmt2("0");
|
||||
}
|
||||
// 반품배송비 왕복 null 일때 0으로 기본값 셋팅
|
||||
if(StringUtil.isEmpty(dlvyGroup.getDftDlvyAmt())) {
|
||||
if(StringUtil.isEmpty(dlvyGroup.getExchngDlvyAmt())) {
|
||||
dlvyGroup.setExchngDlvyAmt("0");
|
||||
}
|
||||
|
||||
if(StringUtil.isEmpty(dlvyGroup.getExchngDlvyAmt2())) {
|
||||
dlvyGroup.setExchngDlvyAmt2("0");
|
||||
}
|
||||
//반품 배송비 왕복금액 적용여부 null 일 경우 N 처리
|
||||
if(StringUtil.isEmpty(dlvyGroup.getReturnDlvyApplcAt())) {
|
||||
dlvyGroup.setReturnDlvyApplcAt("N");
|
||||
}
|
||||
if(StringUtil.isEmpty(dlvyGroup.getReturnDlvyApplcAt2())) {
|
||||
dlvyGroup.setReturnDlvyApplcAt2("N");
|
||||
}
|
||||
|
||||
// 숫자(금액&갯수) , 제거
|
||||
// 숫자(금액&갯수) ',' 제거
|
||||
dlvyGroup.setDftDlvyAmt(StringUtil.removeCommaChar(dlvyGroup.getDftDlvyAmt()));
|
||||
dlvyGroup.setAmtCndAditAmt(StringUtil.removeCommaChar(dlvyGroup.getAmtCndAditAmt()));
|
||||
dlvyGroup.setCntCndAditAmt(StringUtil.removeCommaChar(dlvyGroup.getCntCndAditAmt()));
|
||||
@@ -421,6 +500,14 @@ public class SetupDlvygrpController {
|
||||
dlvyGroup.setReturnDlvyAmt(StringUtil.removeCommaChar(dlvyGroup.getReturnDlvyAmt()));
|
||||
dlvyGroup.setExchngDlvyAmt(StringUtil.removeCommaChar(dlvyGroup.getExchngDlvyAmt()));
|
||||
|
||||
dlvyGroup.setDftDlvyAmt2(StringUtil.removeCommaChar(dlvyGroup.getDftDlvyAmt2()));
|
||||
dlvyGroup.setAmtCndAditAmt2(StringUtil.removeCommaChar(dlvyGroup.getAmtCndAditAmt2()));
|
||||
dlvyGroup.setCntCndAditAmt2(StringUtil.removeCommaChar(dlvyGroup.getCntCndAditAmt2()));
|
||||
dlvyGroup.setAreaAditDlvyAmt2(StringUtil.removeCommaChar(dlvyGroup.getAreaAditDlvyAmt2()));
|
||||
dlvyGroup.setBundleDlvyCndAmt2(StringUtil.removeCommaChar(dlvyGroup.getBundleDlvyCndAmt2()));
|
||||
dlvyGroup.setReturnDlvyAmt2(StringUtil.removeCommaChar(dlvyGroup.getReturnDlvyAmt2()));
|
||||
dlvyGroup.setExchngDlvyAmt2(StringUtil.removeCommaChar(dlvyGroup.getExchngDlvyAmt2()));
|
||||
|
||||
//배송그룹 등록처리 결과 메시지(JSON) 처리
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
@@ -33,6 +33,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
@@ -150,10 +151,15 @@ public class SetupMngrInfoController {
|
||||
/*비밀번호 체크*/
|
||||
if("Y".equals(vo.getPwChngAt())){
|
||||
/*1 비밀번호 변경 시 현재 비밀번호 확인*/
|
||||
Map<String, Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserPasswordInqire", vo)
|
||||
);
|
||||
int result = (int) resultMap.get("result");
|
||||
// Map<String, Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserPasswordInqire", vo)
|
||||
// );
|
||||
|
||||
BOJobUserVO uvo = new BOJobUserVO();
|
||||
uvo.setMngrInnb(vo.getMngrInnb());
|
||||
uvo.setPassword(vo.getPassword());
|
||||
|
||||
Integer result = jobUserService.selectBOJobUserPasswordInqire(uvo);;
|
||||
if(result == 0){
|
||||
throw new WnbtRestException("현재 비밀번호가 일치하지 않습니다");
|
||||
}
|
||||
|
||||
@@ -126,6 +126,8 @@ public class CscController {
|
||||
private PaginationProperties paginationProperties;
|
||||
@Autowired
|
||||
private BOCmService boCmService;
|
||||
@Autowired
|
||||
private BOMaSopmalService boMaSopmalService;
|
||||
|
||||
/************************************************************
|
||||
고객센터 목록 폼
|
||||
@@ -551,7 +553,7 @@ public class CscController {
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBbscttCn", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<?> selectBbscttCn(BOGnrlbbscttVO bbsctt) {
|
||||
public ResponseEntity<?> selectBbscttCn(@RequestBody BOGnrlbbscttVO bbsctt) {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
if ("01".equals(user.getSysDvCd())) {
|
||||
@@ -938,7 +940,7 @@ public class CscController {
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOBbscttRegistPopupForm",bbsctt)
|
||||
// );
|
||||
model.addAttribute("resultMap", resultMap);
|
||||
model.addAttribute("bbscttVO", resultMap);
|
||||
model.addAttribute("bbscttVO", bbsctt);
|
||||
return Util.getDeviceType(request)+"/csc/BbscttRegistPopupC";
|
||||
}
|
||||
|
||||
@@ -1182,7 +1184,7 @@ public class CscController {
|
||||
// );
|
||||
}
|
||||
|
||||
/**ㄴ
|
||||
/**
|
||||
* 게시글 삭제
|
||||
* @param bbsctt
|
||||
* @return ResponseEntity
|
||||
@@ -1654,7 +1656,6 @@ public class CscController {
|
||||
if ("01".equals(user.getSysDvCd())) {
|
||||
bbsctt.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
;
|
||||
|
||||
BOGnrlbbscttVO regusrInfo = new BOGnrlbbscttVO();
|
||||
DataMap mbrInfo = new DataMap();
|
||||
@@ -1682,6 +1683,13 @@ public class CscController {
|
||||
regusrInfo.setRegusrDvCd("99");//비회원
|
||||
}
|
||||
|
||||
// 약관정보
|
||||
BOMaSopmalVO sopmalVO = new BOMaSopmalVO();
|
||||
sopmalVO.setStplatDvCd("11");
|
||||
sopmalVO.setSopmalCd(bbsctt.getSopmalCd());
|
||||
List<DataMap> clauseList = new ArrayList<>();
|
||||
clauseList = boMaSopmalService.selectBOClauseInformation(sopmalVO);
|
||||
|
||||
// 게시판 설정 정보
|
||||
BOBbsVO bbsVO = new BOBbsVO();
|
||||
// bbsVO에 쇼핑몰코드, 해당 게시판 set
|
||||
@@ -1737,6 +1745,7 @@ public class CscController {
|
||||
content.put("regusrInfo", regusrInfo);
|
||||
content.put("bbscttVO", bbsctt);
|
||||
content.put("itmList", itmList);
|
||||
content.put("clauseList", clauseList);
|
||||
content.put("bbsInfo", bbsInfo);
|
||||
content.put("qesitmList", qesitmList);
|
||||
content.put("rvwQesitmList", rvwQesitmList);
|
||||
|
||||
@@ -9,6 +9,8 @@ import com.wb.domainserver.domain.admin.store.sopmal.vo.BOMaSopmalVO;
|
||||
import com.wb.domainserver.domain.admin.sys.comncd.service.BOMaComncdService;
|
||||
import com.wb.domainserver.domain.admin.sys.comncd.vo.BOMaComncdVO;
|
||||
import com.wb.domainserver.domain.gcone.common.service.BOCommonService;
|
||||
import com.wb.domainserver.domain.gcone.goods.subsvc.service.BOSubsvcService;
|
||||
import com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO;
|
||||
import com.wb.domainserver.domain.gcone.mbr.mbr.service.BOMbrService;
|
||||
import com.wb.domainserver.domain.gcone.mbr.mbr.vo.BOMbrVO;
|
||||
import com.wb.domainserver.domain.gcone.ordr.ordr.service.BOOrdrService;
|
||||
@@ -20,15 +22,11 @@ import com.wb.domainserver.domain.gcone.setup.site.vo.BOPrevewVO;
|
||||
import com.wb.domainserver.domain.gcone.setup.site.vo.BOSiteVO;
|
||||
import com.wb.domainserver.domain.itrnt.str.service.BOItrntStrService;
|
||||
import com.wb.domainserver.domain.itrnt.str.vo.BOItrntStrVO;
|
||||
import com.wb.domainserver.domain.sample.vo.PrevewVO;
|
||||
import com.wb.domainserver.domain.sopmal.main.vo.BrandVO;
|
||||
import com.wb.domainserver.domain.sopmal.main.vo.MaSopmalVO;
|
||||
import com.wb.domainserver.domain.sopmal.main.vo.MainVO;
|
||||
import com.wb.domainserver.domain.sopmal.main.vo.StrVO;
|
||||
import com.wb.domainserver.domain.sopmal.mpage.ordr.vo.MyOrdrDlvyVO;
|
||||
import com.wb.domainserver.domain.sopmal.mpage.ordr.vo.MyRefundVO;
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
import com.wb.domainserver.response.ApiResponse;
|
||||
import com.wb.domainserver.response.WnbtResponse;
|
||||
import com.wb.domainserver.response.WnbtResponseBody;
|
||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
||||
@@ -36,7 +34,9 @@ import com.wb.domainserver.security.authentication.AnonymousUser;
|
||||
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||
import com.wb.domainserver.util.communicate.*;
|
||||
import com.wb.domainserver.util.communicate.KakaoProperties;
|
||||
import com.wb.domainserver.util.communicate.MultiValueMapConverter;
|
||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import com.wb.domainserver.util.util.Util;
|
||||
import jakarta.servlet.http.Cookie;
|
||||
@@ -45,14 +45,12 @@ import jakarta.servlet.http.HttpSession;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import java.math.BigInteger;
|
||||
@@ -99,6 +97,8 @@ public class MainController {
|
||||
private BOMaSopmalService boMaSopmalService;
|
||||
@Autowired
|
||||
private BOMbrService boMbrService;
|
||||
@Autowired
|
||||
private BOSubsvcService boSubsvcService;
|
||||
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value= {"/","/index", "/sopmal/index","/sopmal/main"})
|
||||
@@ -793,6 +793,54 @@ public class MainController {
|
||||
return url;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 구독서비스 폼 이동
|
||||
* @param model
|
||||
* @param request
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/sopmal/main/selectSubscribeForm")
|
||||
public String selectSubscribeForm(ModelMap model, HttpServletRequest request) {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
DataMap content = new DataMap();
|
||||
|
||||
BOSubsvcVO subsvcVo = new BOSubsvcVO();
|
||||
subsvcVo.setSopmalCd(user.getSopmalCd());
|
||||
content.put("subsvcList", boSubsvcService.selectBOSubsvcList(subsvcVo));
|
||||
|
||||
BOMaSopmalVO sopmalVO = new BOMaSopmalVO();
|
||||
sopmalVO.setSopmalCd(user.getSopmalCd());
|
||||
content.put("sopmalInfo", boMaSopmalService.selectBOSopmalUpdtForm(sopmalVO));
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
|
||||
return Util.getDeviceType(request) + "/main/SubscribeR";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 구독서비스 상세 조회
|
||||
* @param subsvcVO
|
||||
* @return ResponseEntity<WnbtResponse>
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/sopmal/main/selectSubscribeDetail", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<?> selectSubscribeDetail(BOSubsvcVO subsvcVO) {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
subsvcVO.setSopmalCd(user.getSopmalCd());
|
||||
|
||||
message.put("resultMap", boSubsvcService.selectBOSubsvcDetail(subsvcVO));
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 자담유 > 네가지약속 (모바일)
|
||||
*
|
||||
|
||||
@@ -44,6 +44,9 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -420,6 +423,8 @@ public class MbrController {
|
||||
DataMap content = new DataMap();
|
||||
content = service.selectBOEmailAuth(vo);
|
||||
|
||||
log.debug("selectEmailAuth content : {}", content);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
@@ -609,9 +614,40 @@ public class MbrController {
|
||||
return "sopmal_m/mbr/PosJoinCompleteR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 기존 가입 여부 조회(이메일)
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value="/selectMbrwithdrawalSearchEmail", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> selectMbrwithdrawalSearchEmail(BOMbrVO vo, BindingResult bindingResult){
|
||||
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setMainSopmalCd(user.getSopmalCd());
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
vo.setMbrDvCd(service.selectBOMbrDvCd(vo));
|
||||
|
||||
String secretKey = commonService.selectSecretkey();
|
||||
vo.setSecretKey(secretKey);
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
List<DataMap> mbrWithDrawalList = new ArrayList<DataMap>();
|
||||
if (vo.getJoinMthCd() != null) {
|
||||
mbrWithDrawalList = service.selectBOMbrwithdrawalSnsSearchEmail(vo);
|
||||
} else {
|
||||
mbrWithDrawalList = service.selectBOMbrwithdrawalSearchEmail(vo);
|
||||
}
|
||||
content.put("mbrWithDrawalList", mbrWithDrawalList);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 기존 가입 여부 조회
|
||||
* 기존 가입 여부 조회(휴대전화)
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@@ -891,6 +927,10 @@ public class MbrController {
|
||||
sopmalVo.setSopmalCd(vo.getSopmalCd());
|
||||
sopmalInfoMap = maSopmalService.selectBOSopmalFooterInfo(sopmalVo);
|
||||
DataMap sopmalInfo = (DataMap) sopmalInfoMap.get("sopmalInfo");
|
||||
LocalDate today = LocalDate.now();
|
||||
LocalTime currentTime = LocalTime.now();
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm:ss");
|
||||
String formatedNow = currentTime.format(formatter);
|
||||
|
||||
/** 신규 패스워드 자동발송 */
|
||||
if (content.get("result").equals("success")) {
|
||||
@@ -905,9 +945,11 @@ public class MbrController {
|
||||
paramMap.put("recptnNb", vo.getMbtlnb());
|
||||
paramMap.put("recpntEmail", vo.getEmail());
|
||||
|
||||
// SMS
|
||||
// EMAIL
|
||||
paramMap.put("userid", vo.getMbrId());
|
||||
paramMap.put("shopName", sopmalInfo.get("sopmalNm"));
|
||||
paramMap.put("password", content.get("newPassword"));
|
||||
paramMap.put("regist_date", today+" "+formatedNow);
|
||||
|
||||
boMssageService.insertBOAtmcsndng(paramMap);
|
||||
}
|
||||
|
||||
@@ -261,6 +261,140 @@ public class MyActController {
|
||||
|
||||
return Util.getDeviceType(request)+"/mpage/act/MyGoodsQnaDtlUpdtU";
|
||||
}
|
||||
/**
|
||||
* 1:1 문의 조회
|
||||
* @param bbsctt
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value="/selectM2mQnaInqire")
|
||||
public String selectM2mQnaInqire(HttpServletRequest request, ModelMap model, BOGnrlbbscttVO bbsctt, BOMbrVO vo){
|
||||
bbsctt.setBbsTyCd("12");
|
||||
bbsctt.setServerDv("sopmal");
|
||||
bbsctt.setReqUrl("mpage");
|
||||
|
||||
DataMap content = selectBOBbscttListInqire(bbsctt);
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOBbscttListInqire",bbsctt),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
Map<String, Object> content2 = selectBOMpageInfoInqire(vo);
|
||||
// 마이페이지 > 상단 회원 정보 ( 등금, 이름, 마일리지, 쿠폰, 위시리스트, 배송중, 등급산정기준 )
|
||||
model.addAttribute("mpageResultMap", content2);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMpageInfoInqire",bbsctt),
|
||||
// model,
|
||||
// "mpageResultMap"
|
||||
// );
|
||||
|
||||
return Util.getDeviceType(request)+"/mpage/act/MyM2mQaR";
|
||||
}
|
||||
/**
|
||||
* 1:1 문의 ajax 조회
|
||||
* @param bbsctt
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value="/selectM2mQnaInqireAjax", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<?> selectM2mQnaInqireAjax(BOGnrlbbscttVO bbsctt){
|
||||
bbsctt.setBbsTyCd("12");
|
||||
bbsctt.setServerDv("sopmal");
|
||||
bbsctt.setReqUrl("mpage");
|
||||
//게시글 노출 항목 설정값과 게시판 목록 조회
|
||||
|
||||
DataMap content = selectBOBbscttListInqire(bbsctt);
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOBbscttListInqire",bbsctt),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
* 1:1 문의 수정 폼 이동
|
||||
* @param bbsctt
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value="/selectM2mQnaDtlUpdtForm")
|
||||
public String selectM2mQnaDtlUpdtForm(HttpServletRequest request, ModelMap model,BOGnrlbbscttVO bbsctt, BOMbrVO vo){
|
||||
bbsctt.setServerDv("sopmal");
|
||||
bbsctt.setBbsTyCd("12");
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if ("01".equals(user.getSysDvCd())) {
|
||||
bbsctt.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
;
|
||||
if (user.getUserInnb() > 0) {
|
||||
if ("mngr".equals(bbsctt.getServerDv())) {
|
||||
bbsctt.setRegusrDvCd("02"); //관리자
|
||||
} else {
|
||||
bbsctt.setRegusrDvCd("01"); //회원
|
||||
bbsctt.setAnswMbtlnb(user.getMbtlnb());
|
||||
}
|
||||
} else {
|
||||
bbsctt.setRegusrDvCd("99");//비회원
|
||||
}
|
||||
bbsctt.setSecretKey(boCommonService.selectSecretkey());
|
||||
// 게시판 설정 정보
|
||||
BOBbsVO bbsVO = new BOBbsVO();
|
||||
// bbsVO에 쇼핑몰코드, 해당 게시판 set
|
||||
bbsVO.setSopmalCd(bbsctt.getSopmalCd());
|
||||
bbsVO.setBbsId(bbsctt.getBbsId());
|
||||
bbsVO.setBbsTyCd(bbsctt.getBbsTyCd());
|
||||
DataMap bbsInfo = new DataMap();
|
||||
bbsInfo = bbsService.selectBOBbsSetupInfo(bbsVO);
|
||||
|
||||
// 게시글 상세 조회
|
||||
Map<String, Object> bbscttInfo = new HashMap<String, Object>();
|
||||
bbscttInfo = service.selectBOBbscttUpdt(bbsctt);
|
||||
|
||||
// 분류 조회
|
||||
List<DataMap> itmList = new ArrayList<>();
|
||||
itmList = service.selectBOBbscttItmInqire(bbsctt);
|
||||
|
||||
//추가 항목 조회, 추가항목 항목 조회
|
||||
Map<String, Object> qesitmList = new HashMap<String, Object>();
|
||||
qesitmList = service.selectBOBbscttRegistPopupForm(bbsctt);
|
||||
|
||||
//리뷰항목 리스트, 리뷰항목 항목 리스트
|
||||
Map<String, Object> rvwQesitmList = new HashMap<String, Object>();
|
||||
rvwQesitmList = service.selectBOStarItm(bbsctt);
|
||||
|
||||
Map<String, Object> content = new HashMap<String, Object>();
|
||||
content.put("bbsInfo", bbsInfo);
|
||||
content.put("bbscttVO", bbsctt);
|
||||
content.put("bbscttInfo", bbscttInfo);
|
||||
content.put("itmList", itmList);
|
||||
content.put("qesitmList", qesitmList);
|
||||
content.put("rvwQesitmList", rvwQesitmList);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOBbscttUpdtPopupForm",bbsctt),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
model.addAttribute("bbsctt", bbsctt);
|
||||
|
||||
// 마이페이지 > 상단 회원 정보 ( 등금, 이름, 마일리지, 쿠폰, 위시리스트, 배송중, 등급산정기준 )
|
||||
Map<String, Object> content2 = selectBOMpageInfoInqire(vo);
|
||||
model.addAttribute("mpageResultMap", content2);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMpageInfoInqire",bbsctt),
|
||||
// model,
|
||||
// "mpageResultMap"
|
||||
// );
|
||||
|
||||
return Util.getDeviceType(request)+"/mpage/act/MyM2mQnaDtlUpdtU";
|
||||
}
|
||||
|
||||
/**
|
||||
* 나의 리뷰 조회 폼
|
||||
|
||||
@@ -62,6 +62,8 @@ import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import static com.wb.domainserver.util.string.StringUtil.isEmpty;
|
||||
|
||||
/**
|
||||
*
|
||||
* 마이페이지 회원
|
||||
@@ -746,7 +748,10 @@ public class MyMbrController {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
|
||||
vo.setMbtlnb(vo.getMbtlnb().replace("-",""));
|
||||
if(!isEmpty(vo.getMbtlnb())){
|
||||
vo.setMbtlnb(vo.getMbtlnb().replace("-",""));
|
||||
}
|
||||
|
||||
//모바일일 시 진행
|
||||
if("mobile".equals(mymbrVO.getUtilDv())){
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
@@ -762,11 +767,15 @@ public class MyMbrController {
|
||||
// Map<String, Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMbrMbtlnbCompare", mymbrVO)
|
||||
// );
|
||||
int result = service.selectBOMbrMbtlnbCompare(vo);
|
||||
// int result = service.selectBOMbrMbtlnbCompare(vo);
|
||||
int result = service.selectBOMbrEmailCompare(vo);
|
||||
if(result == 0){
|
||||
if(!"Y".equals(mymbrVO.getMbtlnbChngAt())){
|
||||
throw new WnbtRestException("휴대폰 인증이 필요합니다.");
|
||||
if(!"Y".equals(mymbrVO.getEmailChngAt())){
|
||||
throw new WnbtRestException("이메일 인증이 필요합니다.");
|
||||
}
|
||||
// if(!"Y".equals(mymbrVO.getMbtlnbChngAt())){
|
||||
// throw new WnbtRestException("휴대폰 인증이 필요합니다.");
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -854,7 +863,7 @@ public class MyMbrController {
|
||||
bowithdrawalVO.setRegistIp(ip);
|
||||
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if (StringUtil.isEmpty(bowithdrawalVO.getSopmalCd())) {//사용자
|
||||
if (isEmpty(bowithdrawalVO.getSopmalCd())) {//사용자
|
||||
bowithdrawalVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
bowithdrawalVO.setRegusr(user.getUserInnb());
|
||||
|
||||
@@ -19,6 +19,8 @@ public class DlvylcVO extends AbstractVO{
|
||||
/** 배송지설명내용 */
|
||||
@NotBlank(message = "배송지 설명")
|
||||
private String dlvylcDcCn;
|
||||
/**배송지역코드*/
|
||||
private String dlvylcAreaCd;
|
||||
/** 받는사람명 */
|
||||
@NotBlank(message = "받으시는 분")
|
||||
private String recpntNm;
|
||||
@@ -30,7 +32,7 @@ public class DlvylcVO extends AbstractVO{
|
||||
private String telnb;
|
||||
/** 우편번호 */
|
||||
@NotBlank(message = "우편번호")
|
||||
@Length(min=1, max=5)
|
||||
@Length(min=1, max=7)
|
||||
private String zip;
|
||||
/** 도로명,지번 구분 */
|
||||
private String adresDv;
|
||||
@@ -43,6 +45,10 @@ public class DlvylcVO extends AbstractVO{
|
||||
/** 상세주소 */
|
||||
@NotBlank(message = "상세주소")
|
||||
private String dtlAdres;
|
||||
/** 개인통관부호(개인통관번호) */
|
||||
private String cstmclerCd;
|
||||
/** 도도부현 코드(일본) */
|
||||
private String prefcd;
|
||||
/** 기본배송지여부 */
|
||||
private String dftDlvylcAt = "N";
|
||||
/** 최근배송지여부 */
|
||||
|
||||
@@ -12,11 +12,11 @@ public class MyMbrEmailChngVO extends AbstractVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/*id*/
|
||||
@NotBlank(message = "아이디")
|
||||
// @NotBlank(message = "아이디")
|
||||
private String id;
|
||||
|
||||
/*도메인*/
|
||||
@NotBlank(message = "도메인")
|
||||
// @NotBlank(message = "도메인")
|
||||
private String domain;
|
||||
|
||||
/*이메일주소*/
|
||||
|
||||
@@ -61,6 +61,9 @@ public class MyMbrVO extends AbstractVO {
|
||||
/** 휴대폰 번호 변경 여부*/
|
||||
private String mbtlnbChngAt;
|
||||
|
||||
/** 이메일 변경 여부*/
|
||||
private String emailChngAt;
|
||||
|
||||
/** SMS수신여부 */
|
||||
private String smsRecptnAt;
|
||||
|
||||
@@ -68,7 +71,7 @@ public class MyMbrVO extends AbstractVO {
|
||||
private String telnb;
|
||||
|
||||
/** 우편번호 */
|
||||
@NotBlank(message = "우편번호")
|
||||
// @NotBlank(message = "우편번호")
|
||||
private String zip;
|
||||
|
||||
/** 도로명; 지번 */
|
||||
@@ -82,7 +85,7 @@ public class MyMbrVO extends AbstractVO {
|
||||
private String rnmAdres;
|
||||
|
||||
/** 상세주소 */
|
||||
@NotBlank(message = "상세주소")
|
||||
// @NotBlank(message = "상세주소")
|
||||
private String dtlAdres;
|
||||
|
||||
/** 성별 */
|
||||
|
||||
@@ -155,6 +155,93 @@ public class MyOrdrController {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 마이 페이지 > MY쇼핑 > 구독서비스 주문/배송 > 구독서비스 목록 조회 화면 이동
|
||||
* @return SubsvcOrdrDlvyListRForm.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectMbrSubsvcOrdrListInqireRForm")
|
||||
public String selectMbrSubsvcOrdrListInqireForm(HttpServletRequest request, ModelMap model, MyOrdrDlvyVO ordrDlvyVO, BOMbrVO vo) throws Exception {
|
||||
model.addAttribute("paramVO", new ObjectMapper().writeValueAsString(ordrDlvyVO));
|
||||
|
||||
// 마이페이지 > 상단 회원 정보 ( 등금, 이름, 마일리지, 쿠폰, 위시리스트, 배송중, 등급산정기준 )
|
||||
Map<String, Object> content = selectBOMpageInfoInqire(vo);
|
||||
model.addAttribute("mpageResultMap", content);
|
||||
|
||||
return Util.getDeviceType(request) + "/mpage/ordr/SubsvcOrdrDlvyListRForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 마이 페이지 > MY쇼핑 > 구독서비스 주문/배송 > 구독서비스 주문/배송 목록 조회
|
||||
* @param ordrDlvyVO
|
||||
* @return ResponseEntity<WnbtResponse>
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectMbrSubsvcOrdrListInqireAjax")
|
||||
public String selectMbrSubsvcOrdrListInqireAjax(ModelMap model, BOOrdrDlvyVO ordrDlvyVO) {
|
||||
|
||||
Map<String, Object> content = selectBOMbrSubsvcOrdrListInqireAjax(ordrDlvyVO);
|
||||
model.addAttribute("data", content);
|
||||
return "sopmal/mpage/ordr/SubsvcOrdrDlvyListR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 마이 페이지 > MY쇼핑 > 구독서비스 주문/배송조회 > 구독서비스 주문/배송 목록 조회 (스크롤)
|
||||
* @param ordrDlvyVO
|
||||
* @return ResponseEntity<WnbtResponse>
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectMbrSubsvcOrdrListInqireScrollAjax", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> selectMbrSubsvcOrdrListInqireScrollAjax(ModelMap model, BOOrdrDlvyVO ordrDlvyVO) {
|
||||
|
||||
Map<String, Object> content = selectBOMbrSubsvcOrdrListInqireAjax(ordrDlvyVO);
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 마이 페이지 > MY쇼핑 > 구독서비스 주문/배송조회 > 주문/배송 상세 조회 화면 이동
|
||||
* @return OrdrDtlR.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectMbrSubsvcOrdrDtlInqire")
|
||||
public String selectMbrSubsvcOrdrDtlInqire(HttpServletRequest request, ModelMap model, BOOrdrDlvyVO ordrDlvyVO, BOMbrVO vo) throws Exception {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if ("01".equals(user.getSysDvCd())) {
|
||||
ordrDlvyVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
Map<String, Object> message = boOrdrService.selectMbrOrdrDtlInqire(ordrDlvyVO);
|
||||
/**발급대상구분코드*/
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("ISSU_TRGET_DV");
|
||||
List<?> issuTrgetDv = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
message.put("issuTrgetDv", issuTrgetDv);
|
||||
model.addAttribute("data", message);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ordr/ordr/selectBOMbrOrdrDtlInqire", ordrDlvyVO),
|
||||
// model,
|
||||
// "data"
|
||||
// );
|
||||
model.addAttribute("paramVO", new ObjectMapper().writeValueAsString(ordrDlvyVO));
|
||||
model.addAttribute("vo", ordrDlvyVO);
|
||||
|
||||
// 마이페이지 > 상단 회원 정보 ( 등금, 이름, 마일리지, 쿠폰, 위시리스트, 배송중, 등급산정기준 )
|
||||
Map<String, Object> content = selectBOMpageInfoInqire(vo);
|
||||
model.addAttribute("mpageResultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMpageInfoInqire", ordrDlvyVO),
|
||||
// model,
|
||||
// "mpageResultMap"
|
||||
// );
|
||||
|
||||
return Util.getDeviceType(request) + "/mpage/ordr/SubsvcOrdrDtlR";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 마이 페이지 > MY쇼핑 > 주문/배송조회 > 주문/배송 목록 조회
|
||||
* @param ordrDlvyVO
|
||||
@@ -1466,6 +1553,39 @@ public class MyOrdrController {
|
||||
return content;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 사용자 > 마이페이지 > 구독서비스 주문/배송 조회
|
||||
*/
|
||||
public Map<String, Object> selectBOMbrSubsvcOrdrListInqireAjax(BOOrdrDlvyVO ordrDlvyVO) {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if ("01".equals(user.getSysDvCd())) {
|
||||
ordrDlvyVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
ordrDlvyVO.setMbrInnb(BigInteger.valueOf(user.getUserInnb()));
|
||||
ordrDlvyVO.setMbrDvCd(user.getMbrDvCd());
|
||||
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(ordrDlvyVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(ordrDlvyVO.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
|
||||
ordrDlvyVO.setPaginationInfo(paginationInfo);
|
||||
ordrDlvyVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
ordrDlvyVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
ordrDlvyVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
ordrDlvyVO.setMbrInnb(BigInteger.valueOf(MemberJwtContextHolder.getMemberInfo().getUserInnb()));
|
||||
|
||||
List<DataMap> resultList = boOrdrService.selectMbrSubsvcOrdrListInqireAjax(ordrDlvyVO);
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
|
||||
content.put("resultList", resultList);
|
||||
content.put("paginationInfo", ordrDlvyVO.getPaginationInfo());
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
/**
|
||||
* bo로직 관리자 > 주문 > 주문관리 > 전체 주문 조회 > 전체주문상세 조회 > 결제취소/환불신청 정보 조회
|
||||
*/
|
||||
|
||||
@@ -362,6 +362,7 @@ public class OrdrController {
|
||||
param.put("mbrDvCd", user.getMbrDvCd());
|
||||
param.put("mbrInnb", user.getUserInnb());
|
||||
}
|
||||
log.debug("CONselectSetleExpectAmt-param : {}", param);
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
try {
|
||||
DataMap datamap = new DataMap();
|
||||
@@ -1723,6 +1724,7 @@ public class OrdrController {
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectSpbk")
|
||||
public String selectSpbk(HttpServletRequest request, ModelMap model, BOSpbkVO spbkVO) throws Exception {
|
||||
log.debug("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@/selectSpbk 시작");
|
||||
String sesionId ="";
|
||||
Cookie[] cookies = request.getCookies();
|
||||
if(cookies != null){
|
||||
@@ -1808,6 +1810,7 @@ public class OrdrController {
|
||||
model.addAttribute("commonCertiKey", naverMap.getCommonCertiKey());
|
||||
// 네이버 페이 BUTTON_KEY
|
||||
model.addAttribute("buttonKey", naverMap.getButtonKey());
|
||||
log.debug("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@/selectSpbk 끝");
|
||||
return Util.getDeviceType(request) + "/ordr/SpbkPtinR";
|
||||
}
|
||||
|
||||
@@ -1818,6 +1821,7 @@ public class OrdrController {
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectSpbkGoodsList")
|
||||
public String selectSpbkGoodsList(HttpServletRequest request, ModelMap model, @RequestBody BOSpbkVO spbkVO) throws Exception {
|
||||
log.debug("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@/selectSpbkGoodsList 시작");
|
||||
String sesionId ="";
|
||||
Cookie[] cookies = request.getCookies();
|
||||
if(cookies != null){
|
||||
@@ -1837,6 +1841,7 @@ public class OrdrController {
|
||||
|
||||
model.addAttribute("data", resultMap);
|
||||
model.addAttribute("jsonData", new Gson().toJson(resultMap));
|
||||
log.debug("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@/selectSpbkGoodsList 끝");
|
||||
|
||||
return Util.getDeviceType(request) + "/ordr/SpbkPtinRList";
|
||||
}
|
||||
@@ -3004,6 +3009,13 @@ public class OrdrController {
|
||||
return content;
|
||||
}
|
||||
} else {
|
||||
// if (CollectionUtils.isEmpty(multiOrdrDlvylc)) {
|
||||
// log.info("배송지 정보를 찾을 수 없습니다.");
|
||||
// content.put("result","Y");
|
||||
// content.put("message", "배송지 정보를 찾을 수 없습니다.");
|
||||
// // throw new WnbtRestException("주문유형 정보를 찾을 수 없습니다.");
|
||||
// return content;
|
||||
// }
|
||||
if (CollectionUtils.isEmpty(shipping)) {
|
||||
log.info("배송지 정보를 찾을 수 없습니다.");
|
||||
content.put("result","Y");
|
||||
@@ -3040,6 +3052,70 @@ public class OrdrController {
|
||||
String[] receptMbtlnbArray = null; // 배송지 받는이 휴대폰번호
|
||||
|
||||
if ("01".equals(ordrTyCd) || "03".equals(ordrTyCd) || "06".equals(ordrTyCd)) { // 일반주문, 회원개인결제, 정기배송
|
||||
// if (!CollectionUtils.isEmpty(multiOrdrDlvylc)) {
|
||||
//
|
||||
// // 배송지 리스트
|
||||
// List<LinkedHashMap<String, Object>> dlvylcListMulti = (List<LinkedHashMap<String, Object>>) multiOrdrDlvylc.get("dlvylc");
|
||||
//
|
||||
// /** ----------------------------------------------- 배송지별 주문 상품 수량 검사 START ----------------------------------------------- */
|
||||
// content = checkDistributedQyMatchesOrder(goodsList, dlvylcListMulti);
|
||||
// if (!"0".equals(content.get("status"))) {
|
||||
// return content;
|
||||
// }
|
||||
// /** ----------------------------------------------- 배송지별 주문 상품 수량 검사 END ----------------------------------------------- */
|
||||
//
|
||||
// // 부정판매 체크를 위한 배송지 정렬
|
||||
// if (!CollectionUtils.isEmpty(dlvylcListMulti)) {
|
||||
//
|
||||
// boolean hasInvalidAddress = dlvylcListMulti.stream().anyMatch(map -> {
|
||||
// String dlvylcZip = StringUtil.isNullToString(map.get("dlvylcZip"));
|
||||
// String adresDvCd = StringUtil.isNullToString(map.get("dlvylcAdresDvCd"));
|
||||
// String dlvylcLnbAdres = StringUtil.isNullToString(map.get("dlvylcLnbAdres"));
|
||||
// String dlvylcRnmAdres = StringUtil.isNullToString(map.get("dlvylcRnmAdres"));
|
||||
// String adresDtl = StringUtil.isNullToString(map.get("dlvylcAdresDtl"));
|
||||
//
|
||||
// return StringUtil.isEmpty(dlvylcZip)
|
||||
// || StringUtil.isEmpty(adresDvCd)
|
||||
// || ("01".equals(adresDvCd) && StringUtil.isEmpty(dlvylcRnmAdres))
|
||||
// || ("02".equals(adresDvCd) && StringUtil.isEmpty(dlvylcLnbAdres))
|
||||
// || StringUtil.isEmpty(adresDtl);
|
||||
// });
|
||||
//
|
||||
// if (hasInvalidAddress) {
|
||||
// content.put("result","Y");
|
||||
// content.put("message", "배송지 정보를 찾을 수 없습니다. 다시 시도해 주세요.");
|
||||
// return content;
|
||||
// }
|
||||
//
|
||||
// List<String> adresList = dlvylcListMulti.stream()
|
||||
// .map(map -> {
|
||||
// String adresDvCd = StringUtil.isNullToString(map.get("dlvylcAdresDvCd"));
|
||||
// String adresDtl = StringUtil.isNullToString(map.get("dlvylcAdresDtl"));
|
||||
// String dlvylcLnbAdres = StringUtil.isNullToString(map.get("dlvylcLnbAdres"));
|
||||
// String dlvylcRnmAdres = StringUtil.isNullToString(map.get("dlvylcRnmAdres"));
|
||||
// String adresMulti;
|
||||
// if ("01".equals(adresDvCd)) {
|
||||
// adresMulti = dlvylcRnmAdres + " " + adresDtl;
|
||||
// } else {
|
||||
// adresMulti = dlvylcLnbAdres + " " + adresDtl;
|
||||
// }
|
||||
//
|
||||
// return adresMulti;
|
||||
// })
|
||||
// .collect(Collectors.toList());
|
||||
//
|
||||
// adresArray = adresList.toArray(new String[0]);
|
||||
//
|
||||
// List<String> receptMbtlnbList = dlvylcListMulti.stream()
|
||||
// .map(map -> {
|
||||
// return StringUtil.isNullToString(map.get("recpntMbtlnb"));
|
||||
// })
|
||||
// .collect(Collectors.toList());
|
||||
//
|
||||
// receptMbtlnbArray = receptMbtlnbList.toArray(new String[0]);
|
||||
//
|
||||
// }
|
||||
// }
|
||||
if (
|
||||
StringUtil.isEmpty((String) shipping.get("dlvylcZip")) ||
|
||||
StringUtil.isEmpty((String) shipping.get("dlvylcAdresDvCd")) ||
|
||||
|
||||
@@ -26,7 +26,8 @@ public enum PurchsValidCode {
|
||||
EVT_TRGET_AT("evtTrgetAt","GC25E03T24A014","이벤트 대상 상품 아님"),
|
||||
DPLCT_LMTT_COUPON("dplctLmttCoupon","GC25D03L24C015","이벤트 중복제한 쿠폰 존재"),
|
||||
PURCHS_TOTAL_AMT("setleAmt","GC25P03T24A016","주문 요청 총 결제금액과 계산된 총 결제금액 불일치"),
|
||||
USE_CASH_MLG_AT("useCashMlgAt","GC25U06C26M017","GC 머니 보유금액 초과 사용")
|
||||
USE_CASH_MLG_AT("useCashMlgAt","GC25U06C26M017","GC 머니 보유금액 초과 사용"),
|
||||
OPTN_EXPSR_AT("optnExpsrAt","GC25G06C26M018","판매 불가능한 상품 존재 - 변경된 상품옵션이 장바구니에 있음")
|
||||
|
||||
;
|
||||
|
||||
|
||||
@@ -53,6 +53,8 @@ public class MngrMenuInterceptor implements HandlerInterceptor {
|
||||
|
||||
String accessUri = request.getRequestURI(); // 현재 요청된 URI
|
||||
|
||||
logger.debug("MenuInterceptor accessUri: {}", accessUri);
|
||||
|
||||
AnonymousUser mngr = MemberJwtContextHolder.getMemberInfo();
|
||||
String mngrDv = mngr.getMngrDv();
|
||||
|
||||
@@ -108,7 +110,7 @@ public class MngrMenuInterceptor implements HandlerInterceptor {
|
||||
}
|
||||
}
|
||||
|
||||
if("/mngr/main".equals(accessUri) || "/admin/main".equals(accessUri) || accessUri.contains("/crm") || accessUri.contains("/itrnt")) {
|
||||
if("/mngr/main".equals(accessUri) || "/admin/main".equals(accessUri) || accessUri.contains("/crm") || accessUri.contains("/itrnt") || accessUri.contains("/mngr/bbs")) {
|
||||
checkMenu = "Y";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.wb.domainserver.security.config;
|
||||
|
||||
import com.wb.domainserver.realm.RealmResolver;
|
||||
import com.wb.domainserver.realm.filter.RealmFilter;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.Ordered;
|
||||
|
||||
@Configuration
|
||||
public class RealmFilterConfig {
|
||||
|
||||
@Autowired
|
||||
RealmResolver realmResolver;
|
||||
|
||||
@Bean
|
||||
public FilterRegistrationBean<RealmFilter> realmFilter() {
|
||||
FilterRegistrationBean<RealmFilter> registrationBean = new FilterRegistrationBean<>();
|
||||
registrationBean.setFilter(new RealmFilter(realmResolver));
|
||||
registrationBean.addUrlPatterns("/*");
|
||||
registrationBean.setOrder(Ordered.HIGHEST_PRECEDENCE);
|
||||
return registrationBean;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.wb.domainserver.security.config;
|
||||
|
||||
import com.wb.domainserver.common.prop.PropertyService;
|
||||
import com.wb.domainserver.domain.sopmal.oauth.service.CustomOAuth2UserService;
|
||||
import com.wb.domainserver.exception.response.CustomOauthFailureException;
|
||||
import com.wb.domainserver.realm.RealmResolver;
|
||||
@@ -23,6 +24,7 @@ import com.wb.domainserver.response.CustomAuthenticationSuccessHandler;
|
||||
import com.wb.domainserver.security.authentication.CustomAccessDeniedEntryPoint;
|
||||
import com.wb.domainserver.security.authentication.CustomAuthenticationEntryPoint;
|
||||
import com.wb.domainserver.security.authorization.WnbtAuthorizationManager;
|
||||
import com.wb.domainserver.security.filter.BatchFilter;
|
||||
import com.wb.domainserver.security.filter.CustomXssFilter;
|
||||
import com.wb.domainserver.security.filter.JwtAuthenticationFilter;
|
||||
import com.wb.domainserver.security.handler.CustomLogoutSuccessHandler;
|
||||
@@ -55,7 +57,7 @@ import java.util.stream.Collectors;
|
||||
|
||||
import static org.springframework.beans.factory.config.BeanDefinition.ROLE_INFRASTRUCTURE;
|
||||
|
||||
@EnableWebSecurity(debug = false)
|
||||
@EnableWebSecurity(debug = true)
|
||||
@Configuration
|
||||
//@EnableMethodSecurity
|
||||
public class ResourceServerConfig {
|
||||
@@ -113,7 +115,7 @@ public class ResourceServerConfig {
|
||||
OrRequestMatcher resourceMatchers = new OrRequestMatcher(resourcePath);
|
||||
|
||||
return http
|
||||
.securityMatcher("/sopmal/**", "/oauth2/**", "/login/oauth2/**")
|
||||
.securityMatcher("/*", "/sopmal/**", "/oauth2/**", "/login/oauth2/**","/file/*") ///gcone/** #배치호출처리
|
||||
.headers((headers)->headers.frameOptions(HeadersConfigurer.FrameOptionsConfig::sameOrigin))
|
||||
.csrf(AbstractHttpConfigurer::disable)
|
||||
.authorizeHttpRequests(authorize ->
|
||||
@@ -205,6 +207,26 @@ public class ResourceServerConfig {
|
||||
.build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Order(3)
|
||||
SecurityFilterChain batchSecurityFilterChain(HttpSecurity http, SecurityPathProperties securityProperties) throws Exception {
|
||||
|
||||
List<RequestMatcher> uriList = securityProperties.getBatch().getUri().stream()
|
||||
.map(AntPathRequestMatcher::new)
|
||||
.collect(Collectors.toList());
|
||||
OrRequestMatcher uri = new OrRequestMatcher(uriList);
|
||||
|
||||
return http
|
||||
.securityMatcher(uri)
|
||||
.headers((headers)->headers.frameOptions(HeadersConfigurer.FrameOptionsConfig::sameOrigin))
|
||||
.csrf(AbstractHttpConfigurer::disable)
|
||||
.addFilterBefore(new BatchFilter(securityProperties), RequestCacheAwareFilter.class) /*batch 호출된 주소 확인 후 주소가 아니면 제외*/
|
||||
.exceptionHandling(exceptions -> exceptions
|
||||
.accessDeniedHandler(accessDeniedEntryPoint)
|
||||
)
|
||||
.build();
|
||||
}
|
||||
|
||||
//
|
||||
// private String customBearerTokenResolver(HttpServletRequest request) {
|
||||
// String authorization = request.getHeader("Authorization");
|
||||
|
||||
@@ -19,6 +19,8 @@ public class SecurityPathProperties {
|
||||
private Solmal solmal;
|
||||
private Admin admin;
|
||||
private Common common;
|
||||
private Batch batch;
|
||||
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@@ -39,5 +41,12 @@ public class SecurityPathProperties {
|
||||
public static class Common {
|
||||
private List<String> resources;
|
||||
}
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public static class Batch {
|
||||
private List<String> accessip;
|
||||
private List<String> uri;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.wb.domainserver.security.filter;
|
||||
|
||||
import com.wb.domainserver.common.prop.PropertyService;
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
import com.wb.domainserver.security.config.SecurityPathProperties;
|
||||
import com.wb.domainserver.security.filter.wrapper.XssServletWrapper;
|
||||
import jakarta.servlet.*;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletRequestWrapper;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.util.ContentCachingResponseWrapper;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Slf4j
|
||||
public class BatchFilter implements Filter {
|
||||
|
||||
SecurityPathProperties securityProperties;
|
||||
|
||||
public BatchFilter(SecurityPathProperties securityProperties) {
|
||||
this.securityProperties = securityProperties;
|
||||
}
|
||||
|
||||
/*
|
||||
* batch서버에서 호출 되었는지 확인하는 필터
|
||||
* */
|
||||
@Override
|
||||
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
|
||||
HttpServletRequest httpRequest = (HttpServletRequest) request;
|
||||
|
||||
String ip = httpRequest.getHeader("X-Forwarded-For");
|
||||
if (ip == null || ip.isEmpty()) {
|
||||
ip = httpRequest.getRemoteAddr();
|
||||
}
|
||||
// 여러 프록시를 거친 경우, 콤마로 구분된 여러 IP가 있을 수 있어 첫 번째 IP만 가져오거나 처리 필요 [4, 7].
|
||||
if (ip != null && ip.contains(",")) {
|
||||
ip = ip.split(",")[0];
|
||||
}
|
||||
|
||||
Object[] whiteIp = securityProperties.getBatch().getAccessip().toArray();
|
||||
|
||||
/* 대상 ip가 아닌경우 처리불가*/
|
||||
if(!Arrays.asList(whiteIp).contains(ip)){
|
||||
throw new IOException("접근이 허용되지 않은 IP입니다.");
|
||||
}
|
||||
|
||||
chain.doFilter(request, response);
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@Controller
|
||||
@RequestMapping("/mngr/file")
|
||||
@RequestMapping(value={"/mngr/file","/file"})
|
||||
public class FileController {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -58,9 +58,9 @@ spring:
|
||||
gcone:
|
||||
hikari:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
jdbc-url: jdbc:mysql://172.31.16.11:3306/gcone?useSSL=false&useUnicode=true&serverTimezone=Asia/Seoul&autoReconnect=true&allowMultiQueries=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=false&verifyServerCertificate=false
|
||||
username: winbit
|
||||
password: dnlsqlxm1!
|
||||
jdbc-url: jdbc:mysql://115.68.176.232:3306/sake?useSSL=false&useUnicode=true&serverTimezone=Asia/Seoul&autoReconnect=true&allowMultiQueries=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=yes&verifyServerCertificate=false
|
||||
username: sakeone
|
||||
password: dnlfxjtm13@$
|
||||
minimumIdle: 1
|
||||
maximumPoolSize: 10
|
||||
idleTimeout: 30000 #30초
|
||||
@@ -70,9 +70,9 @@ spring:
|
||||
sure:
|
||||
hikari:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
jdbc-url: jdbc:mysql://172.31.17.11:3306/nutricore
|
||||
username: winbit
|
||||
password: dnlsqlxm1!
|
||||
jdbc-url: jdbc:mysql://115.68.176.232:3306/sake?useSSL=false&useUnicode=true&serverTimezone=Asia/Seoul&autoReconnect=true&allowMultiQueries=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=yes&verifyServerCertificate=false
|
||||
username: sakeone
|
||||
password: dnlfxjtm13@$
|
||||
minimumIdle: 1
|
||||
maximumPoolSize: 10
|
||||
idleTimeout: 30000 #30초
|
||||
@@ -358,6 +358,8 @@ mngrfo:
|
||||
extensions:
|
||||
images: .gif,.jpg,.jpeg,.png
|
||||
cdnurl: http://dev.img.soju1sake1.com
|
||||
subsvc:
|
||||
dft-goods-optn-innb: 5
|
||||
|
||||
|
||||
secret:
|
||||
@@ -378,9 +380,9 @@ naverpay:
|
||||
real-url: https://pay.naver.com
|
||||
|
||||
mail:
|
||||
host: mail.soju1sake1.com
|
||||
host: mail.sake1jan.com
|
||||
port: 587
|
||||
username: custom@soju1sake1.com
|
||||
username: custom@sake1jan.com
|
||||
password: mail13@$
|
||||
connectiontimeout: 10000
|
||||
timeout: 10000
|
||||
|
||||
@@ -58,7 +58,7 @@ spring:
|
||||
gcone:
|
||||
hikari:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
jdbc-url: jdbc:mysql://sakedb01.sldb.iwinv.net:3306/sake?useSSL=false&useUnicode=true&serverTimezone=Asia/Seoul&autoReconnect=true&allowMultiQueries=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=false&verifyServerCertificate=false
|
||||
jdbc-url: jdbc:mysql://115.68.176.232:3306/sake?useSSL=false&useUnicode=true&serverTimezone=Asia/Seoul&autoReconnect=true&allowMultiQueries=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=yes&verifyServerCertificate=false
|
||||
username: sakeone
|
||||
password: dnlfxjtm13@$
|
||||
minimumIdle: 1
|
||||
@@ -70,7 +70,7 @@ spring:
|
||||
sure:
|
||||
hikari:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
jdbc-url: jdbc:mysql://sakedb01.sldb.iwinv.net:3306/sake?useSSL=false&useUnicode=true&serverTimezone=Asia/Seoul&autoReconnect=true&allowMultiQueries=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=false&verifyServerCertificate=false
|
||||
jdbc-url: jdbc:mysql://115.68.176.232:3306/sake?useSSL=false&useUnicode=true&serverTimezone=Asia/Seoul&autoReconnect=true&allowMultiQueries=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=yes&verifyServerCertificate=false
|
||||
username: sakeone
|
||||
password: dnlfxjtm13@$
|
||||
minimumIdle: 1
|
||||
@@ -359,7 +359,8 @@ mngrfo:
|
||||
images: .gif,.jpg,.jpeg,.png
|
||||
cdnurl: https://19b0bde6dcdc15ad.kinxzone.com
|
||||
upurl: https://www.soju1sake1.com
|
||||
|
||||
subsvc:
|
||||
dft-goods-optn-innb: 5
|
||||
|
||||
secret:
|
||||
key: 1df5be2f7e90ae36
|
||||
@@ -379,9 +380,9 @@ naverpay:
|
||||
real-url: https://pay.naver.com
|
||||
|
||||
mail:
|
||||
host: mail.soju1sake1.com
|
||||
host: mail.sake1jan.com
|
||||
port: 587
|
||||
username: custom@soju1sake1.com
|
||||
username: custom@sake1jan.com
|
||||
password: mail13@$
|
||||
connectiontimeout: 10000
|
||||
timeout: 10000
|
||||
|
||||
@@ -58,11 +58,11 @@ spring:
|
||||
gcone:
|
||||
hikari:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
jdbc-url: jdbc:mysql://sakedb01.sldb.iwinv.net:3306/sake?useSSL=false&useUnicode=true&serverTimezone=Asia/Seoul&autoReconnect=true&allowMultiQueries=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=false&verifyServerCertificate=false
|
||||
jdbc-url: jdbc:mysql://10.2.1.101:3306/sake?useSSL=false&useUnicode=true&serverTimezone=Asia/Seoul&autoReconnect=true&allowMultiQueries=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=yes&verifyServerCertificate=false
|
||||
username: sakeone
|
||||
password: dnlfxjtm13@$
|
||||
minimumIdle: 1
|
||||
maximumPoolSize: 10
|
||||
minimumIdle: 10
|
||||
maximumPoolSize: 50
|
||||
idleTimeout: 30000 #30초
|
||||
maxLifetime: 1800000 #30분
|
||||
connectionTimeout: 30000
|
||||
@@ -70,7 +70,7 @@ spring:
|
||||
sure:
|
||||
hikari:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
jdbc-url: jdbc:mysql://sakedb01.sldb.iwinv.net:3306/sake?useSSL=false&useUnicode=true&serverTimezone=Asia/Seoul&autoReconnect=true&allowMultiQueries=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=false&verifyServerCertificate=false
|
||||
jdbc-url: jdbc:mysql://10.2.1.101:3306/sake?useSSL=false&useUnicode=true&serverTimezone=Asia/Seoul&autoReconnect=true&allowMultiQueries=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=yes&verifyServerCertificate=false
|
||||
username: sakeone
|
||||
password: dnlfxjtm13@$
|
||||
minimumIdle: 1
|
||||
@@ -358,6 +358,8 @@ mngrfo:
|
||||
extensions:
|
||||
images: .gif,.jpg,.jpeg,.png
|
||||
cdnurl: https://19b0bde6dcdc15ad.kinxzone.com
|
||||
subsvc:
|
||||
dft-goods-optn-innb: 5
|
||||
|
||||
|
||||
secret:
|
||||
@@ -378,9 +380,9 @@ naverpay:
|
||||
real-url: https://pay.naver.com
|
||||
|
||||
mail:
|
||||
host: mail.soju1sake1.com
|
||||
host: 10.2.1.76
|
||||
port: 587
|
||||
username: custom@soju1sake1.com
|
||||
username: custom@sake1jan.com
|
||||
password: mail13@$
|
||||
connectiontimeout: 10000
|
||||
timeout: 10000
|
||||
|
||||
@@ -428,6 +428,7 @@
|
||||
END
|
||||
END AS EVT_TRGET_AT -- 이벤트 진행여부 이벤트 대상일경우 1을 반환함 = 정상 처리 0 이벤트 대상 아닐경우 1
|
||||
, IFNULL(EVT_DUPL_COUPON.DPLCT_LMTT_COUPON, 0) AS DPLCT_LMTT_COUPON -- 이벤트 중복제한 쿠폰 존재여부
|
||||
, CASE WHEN OPTN.OPTN_EXPSR_AT = 'Y' THEN 0 ELSE 1 END AS OPTN_EXPSR_AT
|
||||
FROM (SELECT GG.GOODS_INNB -- 상품 고유번호
|
||||
, GG.SOPMAL_CD -- 쇼핑몰코드
|
||||
, GG.DLVY_GROUP_INNB -- 배송그룹고유번호
|
||||
@@ -750,6 +751,7 @@
|
||||
, EVT.DSCNT_BNEF_DV_CD
|
||||
, OPTN.COMPNB_DSCNT_AT
|
||||
, OPTN.SCTN_DSCNT_AT
|
||||
, OPTN.OPTN_EXPSR_AT
|
||||
</select>
|
||||
|
||||
<!--주문 전 쿠폰번호 재확인-->
|
||||
|
||||
@@ -164,6 +164,8 @@
|
||||
ORDR_CANCL_ATMC_PROCS_PD,
|
||||
ORDR_PURCHSR_DCSN_AT,
|
||||
ORDR_ATMC_PURCHS_DCSN_PD,
|
||||
BUY_RATE,
|
||||
SELL_RATE,
|
||||
FORMAT(MLG_HOLD_USE_AMT, 0) AS MLG_HOLD_USE_AMT,
|
||||
FORMAT(MLG_SETLE_AMT_USE_AMT, 0) AS MLG_SETLE_AMT_USE_AMT,
|
||||
FORMAT(MLG_MUMM_USE_AMT, 0) AS MLG_MUMM_USE_AMT,
|
||||
@@ -192,6 +194,7 @@
|
||||
JOIN_GUIDANCE_WORDS,
|
||||
JOIN_BNEF,
|
||||
JOIN_COMPT_WORDS,
|
||||
SUBSVC_GUIDANCE_WORDS,
|
||||
TOP_SYS_FIL_NM,
|
||||
META_DC,
|
||||
META_KWRD,
|
||||
@@ -511,6 +514,8 @@
|
||||
ORDR_CANCL_ATMC_PROCS_PD,
|
||||
ORDR_PURCHSR_DCSN_AT,
|
||||
ORDR_ATMC_PURCHS_DCSN_PD,
|
||||
BUY_RATE,
|
||||
SELL_RATE,
|
||||
MLG_HOLD_USE_AMT,
|
||||
MLG_SETLE_AMT_USE_AMT,
|
||||
MLG_MUMM_USE_AMT,
|
||||
@@ -543,6 +548,7 @@
|
||||
JOIN_GUIDANCE_WORDS,
|
||||
JOIN_BNEF,
|
||||
JOIN_COMPT_WORDS,
|
||||
SUBSVC_GUIDANCE_WORDS,
|
||||
REGUSR,
|
||||
REGIST_DT,
|
||||
UPDUSR,
|
||||
@@ -577,6 +583,8 @@
|
||||
#{ordrCanclAtmcProcsPd },
|
||||
#{ordrPurchsrDcsnAt },
|
||||
#{ordrAtmcPurchsDcsnPd },
|
||||
#{buyRate },
|
||||
#{sellRate },
|
||||
#{mlgHoldUseAmt },
|
||||
#{mlgSetleAmtUseAmt },
|
||||
#{mlgMummUseAmt },
|
||||
@@ -609,6 +617,7 @@
|
||||
#{joinGuidanceWords},
|
||||
#{joinBnef},
|
||||
#{joinComptWords},
|
||||
#{subsvcGuidanceWords},
|
||||
#{regusr},
|
||||
SYSDATE(),
|
||||
#{regusr},
|
||||
@@ -889,6 +898,8 @@
|
||||
ORDR_ATMC_PURCHS_DCSN_PD = 0,
|
||||
</otherwise>
|
||||
</choose>
|
||||
BUY_RATE = #{buyRate},
|
||||
SELL_RATE = #{sellRate},
|
||||
MLG_HOLD_USE_AMT = #{mlgHoldUseAmt},
|
||||
MLG_SETLE_AMT_USE_AMT = #{mlgSetleAmtUseAmt},
|
||||
MLG_MUMM_USE_AMT = #{mlgMummUseAmt},
|
||||
@@ -918,6 +929,7 @@
|
||||
JOIN_GUIDANCE_WORDS = #{joinGuidanceWords},
|
||||
JOIN_BNEF = #{joinBnef},
|
||||
JOIN_COMPT_WORDS = #{joinComptWords},
|
||||
SUBSVC_GUIDANCE_WORDS = #{subsvcGuidanceWords},
|
||||
UPDUSR = #{updusr},
|
||||
UPDT_DT = SYSDATE(),
|
||||
META_DC = #{metaDc},
|
||||
|
||||
@@ -1543,6 +1543,146 @@
|
||||
ORDER BY -FB.SORT_ORDR DESC
|
||||
</select>
|
||||
|
||||
<select id="selectBOM2mBbscttListInqire"
|
||||
parameterType="com.wb.domainserver.domain.gcone.bbs.gnrlbbsctt.vo.BOGnrlbbscttVO"
|
||||
resultType="dataMap">
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT CAST(@ROWNUM:=@ROWNUM+1 AS UNSIGNED) AS RNUM
|
||||
,TB.*
|
||||
FROM (SELECT CAST(count(*) OVER() AS UNSIGNED) AS TOT_CNT,
|
||||
FB.BBSCTT_INNB ,
|
||||
FB.IP ,
|
||||
FB.SJ ,
|
||||
FB.CN ,
|
||||
FB.EXPSR_AT ,
|
||||
FB.PASSWORD ,
|
||||
FB.REGUSR ,
|
||||
FB.NTCE_PD_SETUP_AT ,
|
||||
FB.NTC_AT ,
|
||||
FB.NTC_PD_SETUP_AT ,
|
||||
FB.INQIRE_CNT ,
|
||||
FB.SECRET_BBSCTT_AT ,
|
||||
FB.USE_AT ,
|
||||
IFNULL(FB.SORT_ORDR, 999) SORT_ORDR ,
|
||||
FB.SOPMAL_CD ,
|
||||
FB.REGUSR_DV_CD ,
|
||||
FB.REGUSR_ID ,
|
||||
FB.REGUSR_NM ,
|
||||
CONCAT(SUBSTRING(FB.REGUSR_NM, 1, 1), '*', SUBSTRING(FB.REGUSR_NM, CHAR_LENGTH(FB.REGUSR_NM), 1))MASKING_REGUSR_NM ,
|
||||
FMG.MBR_GRAD_NM ,
|
||||
FBM.NEW_NTT_STDR_DE_CNT ,
|
||||
FBM.POPULAR_NTT_STDR_INQIRE_CNT ,
|
||||
FB.Npay_BBSCTT_SNB ,
|
||||
IFNULL(FBM.MNGR_NM, '관리자') AS MNGR_NM ,
|
||||
FBM.WRTER_INDICT_TY_CD ,
|
||||
FBA.ANSW_CN ,
|
||||
CASE
|
||||
WHEN FB.INQIRE_CNT <![CDATA[>=]]> FBM.POPULAR_NTT_STDR_INQIRE_CNT THEN 'Y'
|
||||
ELSE 'N'
|
||||
END POPULAR_AT ,
|
||||
CASE
|
||||
WHEN DATE_FORMAT(FB.REGIST_DT, '%Y-%m-%d') <![CDATA[>=]]> DATE_FORMAT(DATE_SUB( NOW(), INTERVAL FBM.NEW_NTT_STDR_DE_CNT DAY), '%Y-%m-%d') THEN 'Y'
|
||||
ELSE 'N'
|
||||
END NEW_AT ,
|
||||
FB.NTCE_BGN_DE ,
|
||||
FB.NTCE_END_DE ,
|
||||
DATE_FORMAT(FB.REGIST_DT, '%Y-%m-%d %H:%i:%s') REGIST_DT ,
|
||||
DATE_FORMAT(FB.REGIST_DT, '%Y-%m-%d %H:%i') SUM_REGIST_DT, /* 사용자 등록일 조회*/
|
||||
DATE_FORMAT(FB.UPDT_DT, '%Y-%m-%d %H:%i:%s') UPDT_DT ,
|
||||
FB.NTC_BGN_DE ,
|
||||
FB.NTC_END_DE ,
|
||||
'0' NTC_DVN ,
|
||||
EXISTS (
|
||||
SELECT
|
||||
FBF.BBSCTT_ATCHMNFIL_INNB
|
||||
FROM
|
||||
GC_BOARDDATA_FILE FBF
|
||||
WHERE
|
||||
FBF.BBSCTT_INNB = FB.BBSCTT_INNB
|
||||
AND FBF.SOPMAL_CD = FB.SOPMAL_CD) AS ISFILES ,
|
||||
ANSW.BBSCTT_INNB AS ANSW_BBSCTT_INNB ,
|
||||
ANSW.SJ AS ANSW_SJ ,
|
||||
ANSW.CN AS ANSW_BBSCTT_CN ,
|
||||
DATE_FORMAT(ANSW.REGIST_DT, '%Y-%m-%d %H:%i:%s') AS ANSW_REGIST_DT ,
|
||||
FBG.GOODS_INNB ,
|
||||
FG.GOODS_NM ,
|
||||
FGI.IMG,
|
||||
GM.JOIN_MTH_CD,
|
||||
GM.MBR_DV_CD,
|
||||
GOI.ORDR_INNB,
|
||||
GOIO.ORDR_GOODS_OPTN_INNB
|
||||
FROM
|
||||
GC_BOARDDATA FB
|
||||
INNER JOIN GC_BOARDMANAGER FBM ON
|
||||
FB.SOPMAL_CD = FBM.SOPMAL_CD
|
||||
AND FB.BBS_ID = FBM.BBS_ID
|
||||
INNER JOIN GC_SHOP FS ON
|
||||
FS.SOPMAL_CD = FB.SOPMAL_CD
|
||||
LEFT JOIN GC_BOARDDATA_GOODS FBG ON
|
||||
FB.BBSCTT_INNB = FBG.BBSCTT_INNB
|
||||
AND FB.SOPMAL_CD = FBG.SOPMAL_CD
|
||||
LEFT JOIN GC_ORDER_ITEM_OPTION GOIO ON
|
||||
GOIO.ORDR_GOODS_OPTN_INNB = FBG.ORDR_GOODS_OPTN_INNB
|
||||
AND GOIO.SOPMAL_CD = FBG.SOPMAL_CD
|
||||
LEFT JOIN GC_ORDER_ITEM GOI ON
|
||||
GOI.ORDR_GOODS_INNB = GOIO.ORDR_GOODS_INNB
|
||||
AND GOI.SOPMAL_CD = GOIO.SOPMAL_CD
|
||||
LEFT JOIN GC_GOODS FG ON
|
||||
FBG.GOODS_INNB = FG.GOODS_INNB
|
||||
AND FBG.SOPMAL_CD = FG.SOPMAL_CD
|
||||
LEFT JOIN GC_GOODS_IMAGE FGI ON
|
||||
FG.GOODS_INNB = FGI.GOODS_INNB
|
||||
AND FG.SOPMAL_CD = FGI.SOPMAL_CD
|
||||
AND FGI.IMG_KND = '02'
|
||||
AND FGI.CUT_NB = 1
|
||||
LEFT JOIN GC_BOARDDATA ANSW ON
|
||||
FB.SOPMAL_CD = ANSW.SOPMAL_CD
|
||||
AND FB.BBS_ID = ANSW.BBS_ID
|
||||
AND FB.BBSCTT_INNB = ANSW.PARNTS_BBSCTT_INNB
|
||||
AND ANSW.DEPTH = 1
|
||||
AND ANSW.USE_AT = 'Y'
|
||||
LEFT JOIN GC_MEMBER_GRAD_MAPPING FMGM ON
|
||||
FB.SOPMAL_CD = FMGM.SOPMAL_CD
|
||||
AND FB.REGUSR = FMGM.MBR_INNB
|
||||
LEFT JOIN GC_MEMBER GM
|
||||
ON GM.MBR_DV_CD = FMGM.MBR_DV_CD
|
||||
AND GM.MBR_INNB = FMGM.MBR_INNB
|
||||
LEFT JOIN GC_MEMBER_GRAD FMG ON
|
||||
FMGM.MBR_GRAD_INNB = FMG.MBR_GRAD_INNB
|
||||
LEFT JOIN GC_BOARD_ADDITM FBA ON
|
||||
FB.SOPMAL_CD = FBA.SOPMAL_CD
|
||||
AND FB.BBSCTT_INNB = FBA.BBSCTT_INNB
|
||||
AND FBA.QESITM_INNB IN (
|
||||
SELECT
|
||||
FBF.QESITM_INNB
|
||||
FROM
|
||||
GC_BOARDFORM FBF
|
||||
WHERE
|
||||
FBF.ADIT_ITM_DV_CD = '03'
|
||||
AND FBA.SOPMAL_CD = FBF.SOPMAL_CD
|
||||
AND FBF.BBS_ID = FB.BBS_ID)
|
||||
WHERE 1=1
|
||||
<include refid="selectListWhere"/>
|
||||
<if test = "@com.wb.domainserver.util.dataaccess.MybaitsUtil@isEquals(serverDv, 'sopmal')">
|
||||
<include refid="selectSopmalNtceWhere"/>
|
||||
</if>
|
||||
AND (FB.USE_AT = 'Y'
|
||||
/* 사용자 화면에선 삭제글은 보이지 않음 */
|
||||
<if test = "!@com.wb.domainserver.util.dataaccess.MybaitsUtil@isEquals(serverDv, 'sopmal')">
|
||||
OR ANSW.BBSCTT_INNB IS NOT NULL
|
||||
</if>
|
||||
)
|
||||
AND FB.DEPTH = 0
|
||||
AND FB.SOPMAL_CD = #{sopmalCd}
|
||||
AND FB.BBS_ID = #{bbsId}
|
||||
ORDER BY BBSCTT_INNB DESC) TB
|
||||
WHERE (@rownum:=0)=0
|
||||
) PV
|
||||
WHERE 1=1
|
||||
LIMIT #{recordCountPerPage} OFFSET #{firstIndex}
|
||||
</select>
|
||||
|
||||
|
||||
<!--*****************************************
|
||||
게시글 상세 조회 시작
|
||||
@@ -1671,7 +1811,7 @@
|
||||
,LEAD(FB.REGUSR_ID)OVER(ORDER BY FB.BBSCTT_INNB DESC)AS AFTER_REGUSR_ID
|
||||
,LEAD(FB.REGUSR_NM)OVER(ORDER BY FB.BBSCTT_INNB DESC)AS AFTER_REGUSR_NM
|
||||
</if>
|
||||
<if test = "@com.wb.domainserver.util.dataaccess.MybaitsUtil@isEquals(rvwBbscttDv, 'rvw')">/* 리뷰 상세보기 일 때만 */
|
||||
<if test = "@com.wb.domainserver.util.dataaccess.MybaitsUtil@isEquals(rvwBbscttDv, 'rvw') || @com.wb.domainserver.util.dataaccess.MybaitsUtil@isEquals(bbsTyCd, '12')">/* 리뷰, 1:1문의 상세보기 일 때만 */
|
||||
,FOI.ORDR_INNB
|
||||
</if>
|
||||
,GM.JOIN_MTH_CD
|
||||
@@ -1691,7 +1831,7 @@
|
||||
AND GM.MBR_INNB = FMGM.MBR_INNB
|
||||
LEFT JOIN GC_MEMBER_GRAD FMG
|
||||
ON FMGM.MBR_GRAD_INNB = FMG.MBR_GRAD_INNB
|
||||
<if test = "@com.wb.domainserver.util.dataaccess.MybaitsUtil@isEquals(rvwBbscttDv, 'rvw')">/* 리뷰 상세보기 일 때만 */
|
||||
<if test = "@com.wb.domainserver.util.dataaccess.MybaitsUtil@isEquals(rvwBbscttDv, 'rvw') || @com.wb.domainserver.util.dataaccess.MybaitsUtil@isEquals(bbsTyCd, '12')">/* 리뷰, 1:1문의 상세보기 일 때만 */
|
||||
LEFT JOIN GC_BOARDDATA_GOODS FBG
|
||||
ON FB.BBSCTT_INNB = FBG.BBSCTT_INNB
|
||||
AND FB.SOPMAL_CD = FBG.SOPMAL_CD
|
||||
@@ -2472,6 +2612,37 @@
|
||||
#{goodsInnb})
|
||||
</insert>
|
||||
|
||||
<!--*****************************************
|
||||
게시글 연관상품 시작 (등록, 조회, 삭제)
|
||||
********************************************* -->
|
||||
<insert id = "insertBOBbscttM2mGoods" parameterType="com.wb.domainserver.domain.gcone.bbs.gnrlbbsctt.vo.BOGnrlbbscttVO">
|
||||
INSERT INTO GC_BOARDDATA_GOODS
|
||||
(
|
||||
SOPMAL_CD,
|
||||
BBSCTT_INNB,
|
||||
ORDR_GOODS_OPTN_INNB,
|
||||
RE_ORDER_AT,
|
||||
REGUSR,
|
||||
REGIST_DT,
|
||||
GOODS_INNB)
|
||||
(SELECT GOI.SOPMAL_CD
|
||||
, #{bbscttInnb} AS BBSCTT_INNB
|
||||
, GOIO.ORDR_GOODS_OPTN_INNB
|
||||
, #{reOrderAt} AS RE_ORDER_AT
|
||||
, #{regusr} AS REGIST_DT
|
||||
, SYSDATE()
|
||||
, GOI.GOODS_INNB
|
||||
FROM GC_ORDER_ITEM GOI
|
||||
JOIN GC_ORDER_ITEM_OPTION GOIO
|
||||
ON GOIO.ORDR_GOODS_INNB = GOI.ORDR_GOODS_INNB
|
||||
AND GOIO.SOPMAL_CD = GOI.SOPMAL_CD
|
||||
WHERE GOI.ORDR_INNB = #{ordrInnb}
|
||||
AND GOI.SOPMAL_CD = #{sopmalCd}
|
||||
ORDER BY GOIO.ORDR_GOODS_OPTN_INNB ASC
|
||||
LIMIT 1
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 게시글 상세 조회 (연관상품) -->
|
||||
<select id="selectBOBbscttDtlGoods"
|
||||
parameterType="com.wb.domainserver.domain.gcone.bbs.gnrlbbsctt.vo.BOGnrlbbscttVO"
|
||||
|
||||
@@ -343,6 +343,8 @@
|
||||
, CAST(@ROWNUM:=@ROWNUM + 1 AS UNSIGNED) AS RNUM
|
||||
FROM (
|
||||
SELECT FG.GOODS_INNB
|
||||
, FGO.GOODS_OPTN_INNB
|
||||
, FGO.OPTN_TY
|
||||
, FG.DLVY_GROUP_INNB
|
||||
, FG.SOPMAL_CD
|
||||
, FG.GOODS_NM
|
||||
@@ -378,6 +380,7 @@
|
||||
, FGO.CNSMRPRIC
|
||||
, FGO.SLEPRIC
|
||||
, FGO.SOPMAL_CD
|
||||
, FGO.OPTN_TY
|
||||
FROM GC_GOODS_OPTION FGO
|
||||
WHERE FGO.OPTN_EXPSR_AT = 'Y'
|
||||
AND FGO.STDR_DV_AT = 'Y'
|
||||
|
||||
@@ -1269,7 +1269,9 @@ FROM (
|
||||
, FDA.RECPNT_NM
|
||||
, REGEXP_REPLACE(CAST(AES_DECRYPT(UNHEX(FDA.TELNB), '1df5be2f7e90ae36') AS CHAR(50)), '(.{2})(.{4})(.{4})', '$1-$2-$3') AS TELNB
|
||||
, REGEXP_REPLACE(CAST(AES_DECRYPT(UNHEX(FDA.MBTLNB), '1df5be2f7e90ae36') AS CHAR(50)), '(.{3})(.{4})(.{4})', '$1-$2-$3') AS MBTLNB
|
||||
, FDA.DLVYLC_AREA_CD
|
||||
, FDA.ZIP
|
||||
, FDA.PREFCD
|
||||
, FDA.ADRES_DV
|
||||
, FDA.RNM_ADRES
|
||||
, FDA.LNB_ADRES
|
||||
@@ -1573,6 +1575,15 @@ FROM (
|
||||
, ROUND(IFNULL(FSG.BUNDLE_DLVY_CND_AMT, 0), '0') AS BUNDLE_DLVY_CND_AMT
|
||||
, FSG.DLVY_AREA_ADIT_AT
|
||||
, ROUND(IFNULL(FSG.AREA_ADIT_DLVY_AMT, 0), '0') AS AREA_ADIT_DLVY_AMT
|
||||
, ROUND(IFNULL(FSG.DFT_DLVY_AMT2, 0), '0') AS DFT_DLVY_AMT2
|
||||
, FSG.AMT_CND_USE_AT2
|
||||
, ROUND(IFNULL(FSG.AMT_CND_ADIT_AMT2, 0), '0') AS AMT_CND_ADIT_AMT2
|
||||
, FSG.CNT_CND_USE_AT2
|
||||
, ROUND(IFNULL(FSG.CNT_CND_ADIT_AMT2, 0), '0') AS CNT_CND_ADIT_AMT2
|
||||
, FSG.BUNDLE_DLVY_USE_AT2
|
||||
, ROUND(IFNULL(FSG.BUNDLE_DLVY_CND_AMT2, 0), '0') AS BUNDLE_DLVY_CND_AMT2
|
||||
, FSG.DLVY_AREA_ADIT_AT2
|
||||
, ROUND(IFNULL(FSG.AREA_ADIT_DLVY_AMT2, 0), '0') AS AREA_ADIT_DLVY_AMT2
|
||||
FROM GC_SHIPPING_GROUPING FSG
|
||||
WHERE FSG.DLVY_GROUP_INNB = #{dlvyGroupInnb}
|
||||
AND FSG.SOPMAL_CD = #{sopmalCd}
|
||||
|
||||
@@ -0,0 +1,301 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.wb.domainserver.domain.gcone.goods.subsvc.mapper.BOSubsvcMapper">
|
||||
|
||||
<!-- 구독서비스 목록 조회 -->
|
||||
<select id="selectBOSubsvcList"
|
||||
parameterType="com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO"
|
||||
resultType="dataMap">
|
||||
<![CDATA[
|
||||
SELECT GS.SUBSVC_INNB
|
||||
, SUBSVC_STTUS_CD
|
||||
, CONCAT(GS.SUBSVC_NM, ' (', GS.SUBSVC_GNR_NM, ')') AS SUBSVC_CONCAT_NM
|
||||
FROM GC_SUBSVC GS
|
||||
WHERE GS.SOPMAL_CD = 'SK'
|
||||
AND GS.SUBSVC_STTUS_CD != '03'
|
||||
AND GS.EXPSR_DV_CD IN ('01','03')
|
||||
AND
|
||||
CASE
|
||||
WHEN EXPSR_DV_CD = '03'
|
||||
THEN NOW() BETWEEN GS.EXPSR_BGN_DT AND GS.EXPSR_END_DT
|
||||
ELSE 1=1
|
||||
END
|
||||
]]>
|
||||
</select>
|
||||
|
||||
<!-- 구독서비스 상세 조회 -->
|
||||
<select id="selectBOSubsvcDetail"
|
||||
parameterType="com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO"
|
||||
resultType="dataMap">
|
||||
<![CDATA[
|
||||
SELECT GS.SUBSVC_INNB
|
||||
, GS.SOPMAL_CD
|
||||
, GS.SUBSVC_NM
|
||||
, GS.SUB_PD /*구독기간*/
|
||||
, GS.SUBSVC_GNR /*기수*/
|
||||
, (SELECT MAX(A.SUBSVC_GNR) + 1 FROM GC_SUBSVC A WHERE A.SOPMAL_CD = GS.SOPMAL_CD AND A.SUBSVC_NM = GS.SUBSVC_NM) AS SUBSVC_NEXT_GNR /*다음기수*/
|
||||
, GS.SUBSVC_GNR_NM /*기수명*/
|
||||
, CONCAT(GS.SUBSVC_NM, ' (', GS.SUBSVC_GNR_NM, ')') AS SUBSVC_CONCAT_NM
|
||||
, GS.DLVY_CNT /*배송횟수*/
|
||||
, GS.DLVY_CYCLE /*배송주기*/
|
||||
, GS.SUBSVC_CT /*구독료*/
|
||||
, GS.TME_DLVY_AMT /*1회배송비*/
|
||||
, GS.CNSMRPRIC /*소비자가*/
|
||||
, GS.SUBSVC_CT + (TME_DLVY_AMT * DLVY_CNT) as SELPRIC /*실판매가=구독료+(1회배송비X배송횟수)*/
|
||||
, ROUND((GS.CNSMRPRIC - (GS.SUBSVC_CT + (TME_DLVY_AMT * DLVY_CNT))) / NULLIF(GS.CNSMRPRIC, 0) * 100, 0) AS DSCNT_RAITO
|
||||
, GS.INVNTRY_QY /*재고수량*/
|
||||
, GS.USEFUL_INVNTRY_QY /*판매재고수량*/
|
||||
, GS.INVNTRY_QY - GS.USEFUL_INVNTRY_QY AS AVAIL_QT /*가용제고*/
|
||||
, GS.SUBSVC_STTUS_CD /*상태코드*/
|
||||
, FN_GET_COMMCODE_NAME('GOODS_STTUS', GS.SUBSVC_STTUS_CD) AS SUBSVC_STTUS
|
||||
, FN_GET_COMMCODE_NAME('EXPSR_DV', GS.EXPSR_DV_CD) AS EXPSR_DV
|
||||
, GS.EXPSR_DV_CD /*노출구분코드*/
|
||||
, GS.EXPSR_BGN_DT /*노출시작일시*/
|
||||
, GS.EXPSR_END_DT /*노출종료일시*/
|
||||
, GS.INVNTRY_POLICY_CD /*재고정책코드*/
|
||||
, GS.AVLINV_LMTT_QY /*가용재고제한수량*/
|
||||
, GS.SUBSVC_DC /*구독서비스 설명*/
|
||||
, GS.IMG /*섬네일 이미지*/
|
||||
, GS.MBL_SUBSVC_DC /*모바일 구독서비스 설명*/
|
||||
, GS.MBL_SUBSVC_DC_PC_SAME_AT /*모바일 구독서비스 설명 PC동일여부*/
|
||||
, GS.LAST_PROCS_ODR /*최종차수*/
|
||||
, GS.DFT_GOODS_OPTN_INNB /*기본상품옵션고유번호*/
|
||||
FROM GC_SUBSVC GS
|
||||
WHERE GS.SOPMAL_CD = #{sopmalCd}
|
||||
AND GS.SUBSVC_INNB = #{subsvcInnb}
|
||||
]]>
|
||||
</select>
|
||||
|
||||
<!-- 관리자 구독서비스 목록 조회 -->
|
||||
<select id="selectBOMngrSubsvcList" parameterType="com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO" resultType="dataMap">
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT TB.*
|
||||
, CAST(@ROWNUM:=@ROWNUM + 1 AS UNSIGNED) AS RNUM
|
||||
FROM (
|
||||
SELECT COUNT(*) OVER() AS TOT_CNT
|
||||
, GC.SUBSVC_INNB
|
||||
, GC.SOPMAL_CD
|
||||
, GC.SUBSVC_NM
|
||||
, GC.SUBSVC_GNR
|
||||
, GC.SUBSVC_GNR_NM
|
||||
, GC.DLVY_CNT
|
||||
, GC.INVNTRY_QY
|
||||
, GC.INVNTRY_QY - GC.USEFUL_INVNTRY_QY AS AVAIL_QT /*가용제고*/
|
||||
, GC.SUBSVC_STTUS_CD
|
||||
, FN_GET_COMMCODE_NAME('GOODS_STTUS', GC.SUBSVC_STTUS_CD) AS SUBSVC_STTUS /*구독서비스 상태*/
|
||||
, FN_GET_COMMCODE_NAME('EXPSR_DV', GC.EXPSR_DV_CD) AS EXPSR_DV /*노출구분*/
|
||||
, GC.SUBSVC_CT /*구독료*/
|
||||
, GC.TME_DLVY_AMT /*1회배송비*/
|
||||
, GC.CNSMRPRIC /*소비자가*/
|
||||
, GC.SUBSVC_CT + (TME_DLVY_AMT * DLVY_CNT) as SELPRIC /*실판매가=구독료+(1회배송비X배송횟수)*/
|
||||
, GC.IMG /*섬네일 이미지*/
|
||||
, GC.LAST_PROCS_ODR /*최종차수*/
|
||||
FROM GC_SUBSVC GC
|
||||
WHERE GC.USE_AT = 'Y'
|
||||
AND GC.SOPMAL_CD = #{sopmalCd}
|
||||
<if test="srchSelSubsvcNm != null and srchSelSubsvcNm != ''">
|
||||
AND GC.SUBSVC_NM = #{srchSelSubsvcNm} /*구독서비스 명*/
|
||||
</if>
|
||||
<if test="srchSelSubsvcGnr != null and srchSelSubsvcGnr != ''">
|
||||
AND GC.SUBSVC_GNR = #{srchSelSubsvcGnr} /*기수*/
|
||||
</if>
|
||||
<if test="srchSubsvcNm != null and srchSubsvcNm != ''">
|
||||
AND GC.SUBSVC_NM LIKE CONCAT('%',#{srchSubsvcNm},'%') /*구독서비스 명*/
|
||||
</if>
|
||||
<if test="srchSubsvcGnrNm != null and srchSubsvcGnrNm != ''">
|
||||
AND GC.SUBSVC_GNR_NM LIKE CONCAT('%',#{srchSubsvcGnrNm},'%') /*기수명*/
|
||||
</if>
|
||||
<choose>
|
||||
<when test="@com.wb.domainserver.util.dataaccess.MybaitsUtil@isNotEmpty(srchArrSubsvcSttusCd)">
|
||||
/*판매상태*/
|
||||
AND GC.SUBSVC_STTUS_CD IN
|
||||
<foreach collection="srchArrSubsvcSttusCd" item="subsvcSttusCd" open="(" close=")" separator=",">
|
||||
#{subsvcSttusCd}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
<if test="srchExpsrDvCd != null and srchExpsrDvCd != ''">
|
||||
AND GC.EXPSR_DV_CD = #{srchExpsrDvCd} /*노출여부*/
|
||||
</if>
|
||||
ORDER BY
|
||||
<choose>
|
||||
<when test="sortDv == 'subsvcGnrAsc'">
|
||||
GC.SUBSVC_NM ASC, SUBSVC_GNR ASC,
|
||||
</when>
|
||||
<otherwise>
|
||||
GC.SUBSVC_NM DESC, SUBSVC_GNR DESC,
|
||||
</otherwise>
|
||||
</choose>
|
||||
GC.SUBSVC_INNB ASC
|
||||
) TB
|
||||
WHERE (@ROWNUM:=0)=0
|
||||
) PV
|
||||
WHERE 1=1
|
||||
LIMIT #{recordCountPerPage} OFFSET #{firstIndex}
|
||||
</select>
|
||||
|
||||
<!-- 관리자 구독서비스 조회조건 구독서비스 -->
|
||||
<select id="selectBOMngrSrchSubsvcList" parameterType="com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO" resultType="dataMap">
|
||||
SELECT GC.SUBSVC_NM, MIN(GC.SUBSVC_INNB) SUBSVC_INNB
|
||||
FROM GC_SUBSVC GC
|
||||
WHERE GC.SOPMAL_CD = #{sopmalCd}
|
||||
AND GC.USE_AT = 'Y'
|
||||
GROUP BY GC.SUBSVC_NM
|
||||
ORDER BY SUBSVC_INNB ASC
|
||||
</select>
|
||||
|
||||
<!-- 관리자 구독서비스 조회조건 구독서비스별 기수 -->
|
||||
<select id="selectBOMngrSrchSubsvcGnrList" parameterType="com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO" resultType="dataMap">
|
||||
<![CDATA[
|
||||
SELECT GC.SUBSVC_GNR, CONCAT(GC.SUBSVC_GNR , '기 (', GC.SUBSVC_GNR_NM, ')') SUBSVC_GNR_NM
|
||||
FROM GC_SUBSVC GC
|
||||
WHERE GC.SUBSVC_NM = #{srchSelSubsvcNm}
|
||||
AND GC.SOPMAL_CD = #{sopmalCd}
|
||||
AND GC.USE_AT = 'Y'
|
||||
GROUP BY GC.SUBSVC_GNR, GC.SUBSVC_GNR_NM
|
||||
ORDER BY GC.SUBSVC_GNR ASC
|
||||
]]>
|
||||
</select>
|
||||
<!--선택된 구독서비스 삭제(사용여부N처리)-->
|
||||
<update id="deleteBOMngrSubsvc" parameterType="com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO">
|
||||
UPDATE GC_SUBSVC
|
||||
SET USE_AT = 'N'
|
||||
,UPDUSR = #{updusr}
|
||||
,UPDT_DT = NOW()
|
||||
WHERE SOPMAL_CD = #{sopmalCd}
|
||||
<choose>
|
||||
<when test="@com.wb.domainserver.util.dataaccess.MybaitsUtil@isNotEmpty(arrSubsvcInnb)">
|
||||
AND SUBSVC_INNB IN
|
||||
<foreach collection="arrSubsvcInnb" item="subsvcInnb" open="(" separator="," close=")">
|
||||
#{subsvcInnb}
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
AND 1=2
|
||||
</otherwise>
|
||||
</choose>
|
||||
</update>
|
||||
<!--선택된 구독서비스 수정-->
|
||||
<update id="updateBOMngrSubsvc" parameterType="com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO">
|
||||
UPDATE GC_SUBSVC
|
||||
SET SOPMAL_CD = #{sopmalCd}
|
||||
, SUBSVC_NM = #{subsvcNm}
|
||||
, SUB_PD = #{subPd}
|
||||
, SUBSVC_GNR_NM = #{subsvcGnrNm}
|
||||
, DLVY_CNT = REPLACE(#{dlvyCnt},',','')
|
||||
, DLVY_CYCLE = #{dlvyCycle}
|
||||
, SUBSVC_CT = REPLACE(#{subsvcCt},',','')
|
||||
, TME_DLVY_AMT = REPLACE(#{tmeDlvyAmt},',','')
|
||||
, CNSMRPRIC = REPLACE(#{cnsmrpric},',','')
|
||||
, INVNTRY_QY = REPLACE(#{invntryQy},',','')
|
||||
, INVNTRY_POLICY_CD = #{invntryPolicyCd}
|
||||
, AVLINV_LMTT_QY = #{avlinvLmttQy}
|
||||
, SUBSVC_STTUS_CD = #{subsvcSttusCd}
|
||||
, EXPSR_DV_CD = #{expsrDvCd}
|
||||
<choose>
|
||||
<when test="@com.wb.domainserver.util.dataaccess.MybaitsUtil@isNotEmpty(expsrBgnDt)">
|
||||
, EXPSR_BGN_DT = #{expsrBgnDt}
|
||||
</when>
|
||||
<otherwise>
|
||||
, EXPSR_BGN_DT = null
|
||||
</otherwise>
|
||||
</choose>
|
||||
<choose>
|
||||
<when test="@com.wb.domainserver.util.dataaccess.MybaitsUtil@isNotEmpty(expsrEndDt)">
|
||||
, EXPSR_END_DT = #{expsrEndDt}
|
||||
</when>
|
||||
<otherwise>
|
||||
, EXPSR_END_DT = null
|
||||
</otherwise>
|
||||
</choose>
|
||||
, SUBSVC_DC = #{subsvcDc}
|
||||
, MBL_SUBSVC_DC = #{mblSubsvcDc}
|
||||
, MBL_SUBSVC_DC_PC_SAME_AT = #{mblSubsvcDcPcSameAt}
|
||||
<if test="@com.wb.domainserver.util.dataaccess.MybaitsUtil@isNotEmpty(img)">
|
||||
, IMG = #{img}
|
||||
</if>
|
||||
, UPDUSR = #{updusr}
|
||||
, UPDT_DT = NOW()
|
||||
WHERE SUBSVC_INNB = #{subsvcInnb}
|
||||
</update>
|
||||
|
||||
<!-- 구독서비스 등록 -->
|
||||
<insert id="insertBOMngrSubsvc" parameterType="com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO" useGeneratedKeys="true" keyProperty="subsvcInnb" keyColumn="SUBSVC_INNB">
|
||||
INSERT INTO GC_SUBSVC (SOPMAL_CD
|
||||
, SUBSVC_NM
|
||||
, SUB_PD
|
||||
, SUBSVC_GNR
|
||||
, SUBSVC_GNR_NM
|
||||
, DLVY_CNT
|
||||
, DLVY_CYCLE
|
||||
, SUBSVC_CT
|
||||
, TME_DLVY_AMT
|
||||
, CNSMRPRIC
|
||||
, INVNTRY_QY
|
||||
, USEFUL_INVNTRY_QY
|
||||
, INVNTRY_POLICY_CD
|
||||
, AVLINV_LMTT_QY
|
||||
, SUBSVC_STTUS_CD
|
||||
, EXPSR_DV_CD
|
||||
, EXPSR_BGN_DT
|
||||
, EXPSR_END_DT
|
||||
, SUBSVC_DC
|
||||
, MBL_SUBSVC_DC
|
||||
, MBL_SUBSVC_DC_PC_SAME_AT
|
||||
, IMG
|
||||
, DFT_GOODS_OPTN_INNB
|
||||
, USE_AT
|
||||
, REGUSR
|
||||
, REGIST_DT)
|
||||
VALUES (#{sopmalCd}
|
||||
, #{subsvcNm}
|
||||
, #{subPd}
|
||||
, #{subsvcGnr}
|
||||
, #{subsvcGnrNm}
|
||||
, REPLACE(#{dlvyCnt},',','')
|
||||
, #{dlvyCycle}
|
||||
, REPLACE(#{subsvcCt},',','')
|
||||
, REPLACE(#{tmeDlvyAmt},',','')
|
||||
, REPLACE(#{cnsmrpric},',','')
|
||||
, REPLACE(#{invntryQy},',','')
|
||||
, 0
|
||||
, #{invntryPolicyCd}
|
||||
, #{avlinvLmttQy}
|
||||
, #{subsvcSttusCd}
|
||||
, #{expsrDvCd}
|
||||
<choose>
|
||||
<when test="@com.wb.domainserver.util.dataaccess.MybaitsUtil@isNotEmpty(expsrBgnDt)">
|
||||
, #{expsrBgnDt}
|
||||
</when>
|
||||
<otherwise>
|
||||
, null
|
||||
</otherwise>
|
||||
</choose>
|
||||
<choose>
|
||||
<when test="@com.wb.domainserver.util.dataaccess.MybaitsUtil@isNotEmpty(expsrEndDt)">
|
||||
, #{expsrEndDt}
|
||||
</when>
|
||||
<otherwise>
|
||||
, null
|
||||
</otherwise>
|
||||
</choose>
|
||||
, #{subsvcDc}
|
||||
, #{mblSubsvcDc}
|
||||
, #{mblSubsvcDcPcSameAt}
|
||||
, #{img}
|
||||
, #{dftGoodsOptnInnb}
|
||||
, 'Y'
|
||||
, #{regusr}
|
||||
, NOW()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 구독서비스명 중복체크 -->
|
||||
<select id="selectBOMngrSubsvcNmDupCheck" parameterType="com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO" resultType="int">
|
||||
SELECT COUNT(*) CNT
|
||||
FROM GC_SUBSVC GS
|
||||
WHERE GS.SOPMAL_CD = #{sopmalCd}
|
||||
AND GS.SUBSVC_NM = #{subsvcNm}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -726,6 +726,15 @@
|
||||
AND MBTLNB = HEX(AES_ENCRYPT(#{mbtlnb}, #{secretKey}))
|
||||
</select>
|
||||
|
||||
<!--회원 핸드폰 번호와 바뀐 핸드폰 번호 비교-->
|
||||
<select id = "selectBOMbrEmailCompare" parameterType="com.wb.domainserver.domain.gcone.mbr.mbr.vo.BOMbrVO">
|
||||
SELECT COUNT(1)
|
||||
FROM GC_MEMBER MBR
|
||||
WHERE MBR.MBR_INNB = #{mbrInnb}
|
||||
AND MBR.MBR_DV_CD = #{mbrDvCd}
|
||||
AND EMAIL = HEX(AES_ENCRYPT(#{email}, #{secretKey}))
|
||||
</select>
|
||||
|
||||
<!-- 회원 정보 수정 -->
|
||||
<update id="updateBOMbrInfoUpdt" parameterType="com.wb.domainserver.domain.gcone.mbr.mbr.vo.BOMbrVO">
|
||||
UPDATE GC_MEMBER SET
|
||||
@@ -1810,6 +1819,113 @@
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<!--기존 가입 여부 조회 - Email -->
|
||||
<select id="selectBOMbrwithdrawalSearchEmail"
|
||||
parameterType="com.wb.domainserver.domain.gcone.mbr.mbr.vo.BOMbrVO" resultType="dataMap">
|
||||
SELECT TGT.*
|
||||
FROM (
|
||||
SELECT GM.MBR_INNB,
|
||||
GM.MBR_ID,
|
||||
CAST(AES_DECRYPT(UNHEX(GEM.EMAIL_ADRES) , #{secretKey}) AS CHAR(50)) AS EMAIL_ADRES,
|
||||
SHOP.SOPMAL_NM AS BRAND,
|
||||
FN_GET_COMMCODE_NAME('EXTRL_INTRLCK_DV', GEM.EXTRL_INTRLCK_DV_CD) EXTRL_INTRLCK_DV,
|
||||
CASE WHEN GM.MNGR_LOG LIKE '%휴면해제%' THEN 2 ELSE 1 END IS_HM,
|
||||
GMS.LAST_PURCHS_DT,
|
||||
GMS.LAST_LOGIN_DT,
|
||||
CASE WHEN (GM.MBR_ID LIKE 'M-%' OR REGEXP_LIKE(GM.MBR_ID,'kko[0-9]{10}') OR GM.MBR_ID LIKE '%@%')
|
||||
THEN CASE WHEN GM.MNGR_LOG LIKE '%휴면해제%' THEN 4 -- SNS 가입 AND 휴면인적이 있던 회원
|
||||
ELSE 3 -- SNS 가입 AND 휴면인적이 없던 회원
|
||||
END
|
||||
ELSE CASE WHEN GM.MNGR_LOG LIKE '%휴면해제%' THEN 2 -- 사이트 가입 AND 휴면인적이 있던 회원
|
||||
ELSE 1 -- 사이트 가입 AND 휴면인적이 없던 회원
|
||||
END
|
||||
END DEV,
|
||||
RANK() OVER (PARTITION BY GM.MBR_NM, GM.MBTLNB
|
||||
ORDER BY (CASE WHEN (GM.MBR_ID LIKE 'M-%' OR REGEXP_LIKE(GM.MBR_ID,'kko[0-9]{10}') OR GM.MBR_ID LIKE '%@%')
|
||||
THEN CASE WHEN GM.MNGR_LOG LIKE '%휴면해제%' THEN 4
|
||||
ELSE 3
|
||||
END
|
||||
ELSE CASE WHEN GM.MNGR_LOG LIKE '%휴면해제%' THEN 2
|
||||
ELSE 1
|
||||
END
|
||||
END),
|
||||
GMS.LAST_PURCHS_DT DESC, GMS.LAST_LOGIN_DT DESC, GMS.MBR_INNB DESC
|
||||
) AS RK
|
||||
FROM GC_MEMBER GM
|
||||
INNER JOIN GC_MEMBER_SITE GMS
|
||||
ON GM.MBR_INNB = GMS.MBR_INNB
|
||||
AND GM.MBR_DV_CD = GMS.MBR_DV_CD
|
||||
LEFT JOIN GC_EXTRL_MEMBER GEM
|
||||
ON GMS.MBR_INNB = GEM.MBR_INNB
|
||||
AND GMS.MBR_DV_CD = GEM.MBR_DV_CD
|
||||
AND GMS.SOPMAL_CD = GEM.SOPMAL_CD
|
||||
LEFT JOIN GC_SHOP SHOP
|
||||
ON GMS.SOPMAL_CD = SHOP.SOPMAL_CD
|
||||
WHERE 1 = 1
|
||||
AND GM.USE_AT = 'Y'
|
||||
AND GM.MBR_DV_CD = #{mbrDvCd}
|
||||
AND GM.MBR_NM = #{mbrNm}
|
||||
AND GM.EMAIL = HEX(AES_ENCRYPT(#{email}, #{secretKey}))
|
||||
) TGT
|
||||
WHERE 1 = 1
|
||||
AND NOT (EXTRL_INTRLCK_DV IS NULL AND DEV >= 3)
|
||||
ORDER BY DEV, RK
|
||||
</select>
|
||||
|
||||
<!--기존 가입 여부 조회(SNS) - Email -->
|
||||
<select id="selectBOMbrwithdrawalSnsSearchEmail"
|
||||
parameterType="com.wb.domainserver.domain.gcone.mbr.mbr.vo.BOMbrVO" resultType="dataMap">
|
||||
SELECT TGT.*
|
||||
FROM (
|
||||
SELECT GM.MBR_INNB,
|
||||
GM.MBR_ID,
|
||||
CAST(AES_DECRYPT(UNHEX(GEM.EMAIL_ADRES) , #{secretKey}) AS CHAR(50)) AS EMAIL_ADRES,
|
||||
SHOP.SOPMAL_NM AS BRAND,
|
||||
FN_GET_COMMCODE_NAME('EXTRL_INTRLCK_DV', GEM.EXTRL_INTRLCK_DV_CD) EXTRL_INTRLCK_DV,
|
||||
CASE WHEN GM.MNGR_LOG LIKE '%휴면해제%' THEN 2 ELSE 1 END IS_HM,
|
||||
GMS.LAST_PURCHS_DT,
|
||||
GMS.LAST_LOGIN_DT,
|
||||
CASE WHEN (GM.MBR_ID LIKE 'M-%' OR REGEXP_LIKE(GM.MBR_ID,'kko[0-9]{10}') OR GM.MBR_ID LIKE '%@%')
|
||||
THEN CASE WHEN GM.MNGR_LOG LIKE '%휴면해제%' THEN 4 -- SNS 가입 AND 휴면인적이 있던 회원
|
||||
ELSE 3 -- SNS 가입 AND 휴면인적이 없던 회원
|
||||
END
|
||||
ELSE CASE WHEN GM.MNGR_LOG LIKE '%휴면해제%' THEN 2 -- 사이트 가입 AND 휴면인적이 있던 회원
|
||||
ELSE 1 -- 사이트 가입 AND 휴면인적이 없던 회원
|
||||
END
|
||||
END DEV,
|
||||
RANK() OVER (PARTITION BY GM.MBR_NM, GM.MBTLNB
|
||||
ORDER BY (CASE WHEN (GM.MBR_ID LIKE 'M-%' OR REGEXP_LIKE(GM.MBR_ID,'kko[0-9]{10}') OR GM.MBR_ID LIKE '%@%')
|
||||
THEN CASE WHEN GM.MNGR_LOG LIKE '%휴면해제%' THEN 4
|
||||
ELSE 3
|
||||
END
|
||||
ELSE CASE WHEN GM.MNGR_LOG LIKE '%휴면해제%' THEN 2
|
||||
ELSE 1
|
||||
END
|
||||
END),
|
||||
GMS.LAST_PURCHS_DT DESC, GMS.LAST_LOGIN_DT DESC, GMS.MBR_INNB DESC
|
||||
) AS RK
|
||||
FROM GC_MEMBER GM
|
||||
INNER JOIN GC_MEMBER_SITE GMS
|
||||
ON GM.MBR_INNB = GMS.MBR_INNB
|
||||
AND GM.MBR_DV_CD = GMS.MBR_DV_CD
|
||||
LEFT JOIN GC_EXTRL_MEMBER GEM
|
||||
ON GMS.MBR_INNB = GEM.MBR_INNB
|
||||
AND GMS.MBR_DV_CD = GEM.MBR_DV_CD
|
||||
AND GMS.SOPMAL_CD = GEM.SOPMAL_CD
|
||||
LEFT JOIN GC_SHOP SHOP
|
||||
ON GMS.SOPMAL_CD = SHOP.SOPMAL_CD
|
||||
WHERE 1 = 1
|
||||
AND GM.USE_AT = 'Y'
|
||||
AND GM.MBR_DV_CD = #{mbrDvCd}
|
||||
AND GM.MBR_NM = #{mbrNm}
|
||||
AND GM.EMAIL = HEX(AES_ENCRYPT(#{email}, #{secretKey}))
|
||||
) TGT
|
||||
WHERE 1 = 1
|
||||
AND NOT (EXTRL_INTRLCK_DV IS NULL AND DEV >= 3)
|
||||
ORDER BY DEV, RK
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<!--동의 약정 조회 -->
|
||||
<select id="selectBOJoinAgreeTermsForm"
|
||||
parameterType="com.wb.domainserver.domain.gcone.mbr.mbr.vo.BOMbrVO" resultType="dataMap">
|
||||
@@ -1873,15 +1989,6 @@
|
||||
MBR_ID,
|
||||
JOIN_MTH_CD,
|
||||
<if test="@com.wb.domainserver.util.dataaccess.MybaitsUtil@isEmpty(joinMthCd)">
|
||||
ZIP,
|
||||
ADRES_DV,
|
||||
<if test="adresDv == '01'">
|
||||
RNM_ADRES,
|
||||
</if>
|
||||
<if test="adresDv == '02'">
|
||||
LNB_ADRES,
|
||||
</if>
|
||||
DTL_ADRES,
|
||||
PASSWORD_CHNG_DE,
|
||||
</if>
|
||||
MBR_PASSWORD,
|
||||
@@ -1912,10 +2019,6 @@
|
||||
<if test="@com.wb.domainserver.util.dataaccess.MybaitsUtil@isEmpty(joinMthCd)">
|
||||
#{mbrId},
|
||||
'none',
|
||||
#{zip},
|
||||
#{adresDv},
|
||||
#{lnbAdres},
|
||||
#{dtlAdres},
|
||||
SYSDATE(),
|
||||
</if>
|
||||
#{mbrPassword},
|
||||
@@ -2069,6 +2172,7 @@
|
||||
SELECT COUNT(1)
|
||||
FROM GC_CRTNB
|
||||
WHERE 1 = 1
|
||||
AND SNDNG_INNB = #{sndngInnb}
|
||||
AND EMAIL = #{email}
|
||||
AND CRTNB = #{crtnb}
|
||||
</select>
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
AND OI.GOODS_INNB = G.GOODS_INNB
|
||||
INNER JOIN GC_ORDER O ON EX.SOPMAL_CD = O.SOPMAL_CD
|
||||
AND EX.ORDR_INNB = O.ORDR_INNB
|
||||
/*AND O.SUBSVC_AT = 'N'*/ /*구독서비스 제외*/
|
||||
INNER JOIN GC_ORDER_SHIPPING OSHIP ON EX.SOPMAL_CD = OSHIP.SOPMAL_CD
|
||||
AND EX.ORDR_INNB = OSHIP.ORDR_INNB
|
||||
AND EX.ORDR_DLVY_INNB = OSHIP.ORDR_DLVY_INNB
|
||||
@@ -405,6 +406,7 @@
|
||||
AND OI.GOODS_INNB = G.GOODS_INNB
|
||||
INNER JOIN GC_ORDER O ON SH.SOPMAL_CD = O.SOPMAL_CD
|
||||
AND SH.ORDR_INNB = O.ORDR_INNB
|
||||
/*AND O.SUBSVC_AT = 'N'*/ /*구독서비스 제외*/
|
||||
INNER JOIN GC_ORDER_SETLE ST ON SH.SOPMAL_CD = ST.SOPMAL_CD
|
||||
AND SH.ORDR_INNB = ST.ORDR_INNB
|
||||
LEFT JOIN GC_MEMBER MBR ON O.MBR_DV_CD = MBR.MBR_DV_CD
|
||||
@@ -583,8 +585,10 @@
|
||||
,SUM(OIOP.ORDR_QY) AS ORDR_QY -- 주문수량
|
||||
,COUNT(OIOP.ORDR_GOODS_OPTN_INNB) AS CNT
|
||||
,IFNULL(SUM(OIOP.STEP85), 0) AS SETLE_CANCEL_QY -- 취소수량
|
||||
,SUM(OIOP.STEP35 + OIOP.STEP45 + OIOP.STEP55 + OIOP.STEP65 + OIOP.STEP75) AS SNDNG_QY -- 보낸 수량
|
||||
,SUM((OIOP.ORDR_QY - OIOP.STEP85) - (OIOP.STEP35 + OIOP.STEP45 + OIOP.STEP55 + OIOP.STEP65 + OIOP.STEP75)) AS REMAIN_QY -- 남은 수량
|
||||
-- ,SUM(OIOP.STEP35 + OIOP.STEP45 + OIOP.STEP55 + OIOP.STEP65 + OIOP.STEP75) AS SNDNG_QY -- 보낸 수량
|
||||
-- ,SUM((OIOP.ORDR_QY - OIOP.STEP85) - (OIOP.STEP35 + OIOP.STEP45 + OIOP.STEP55 + OIOP.STEP65 + OIOP.STEP75)) AS REMAIN_QY -- 남은 수량
|
||||
,SUM(OIOP.STEP45 + OIOP.STEP55 + OIOP.STEP65 + OIOP.STEP75) AS SNDNG_QY -- 보낸 수량
|
||||
,SUM((OIOP.ORDR_QY - OIOP.STEP85) - (OIOP.STEP45 + OIOP.STEP55 + OIOP.STEP65 + OIOP.STEP75)) AS REMAIN_QY -- 남은 수량
|
||||
,CASE --
|
||||
WHEN COUNT(OIOP.ORDR_GOODS_OPTN_INNB) > 1 THEN CONCAT(MAX(OI.GOODS_NM) , ' 외 ', COUNT(OIOP.ORDR_GOODS_OPTN_INNB)-1, '종')
|
||||
ELSE MAX(OI.GOODS_NM)
|
||||
@@ -662,8 +666,10 @@
|
||||
,SUM(OIOP.ORDR_QY) AS ORDR_QY -- 주문수량
|
||||
,COUNT(OIOP.ORDR_GOODS_OPTN_INNB) AS CNT
|
||||
,IFNULL(SUM(OIOP.STEP85), 0) AS SETLE_CANCEL_QY -- 취소수량
|
||||
,SUM(OIOP.STEP35 + OIOP.STEP45 + OIOP.STEP55 + OIOP.STEP65 + OIOP.STEP75) AS SNDNG_QY -- 보낸 수량
|
||||
,SUM((OIOP.ORDR_QY - OIOP.STEP85) - (OIOP.STEP35 + OIOP.STEP45 + OIOP.STEP55 + OIOP.STEP65 + OIOP.STEP75)) AS REMAIN_QY -- 남은 수량
|
||||
-- ,SUM(OIOP.STEP35 + OIOP.STEP45 + OIOP.STEP55 + OIOP.STEP65 + OIOP.STEP75) AS SNDNG_QY -- 보낸 수량
|
||||
-- ,SUM((OIOP.ORDR_QY - OIOP.STEP85) - (OIOP.STEP35 + OIOP.STEP45 + OIOP.STEP55 + OIOP.STEP65 + OIOP.STEP75)) AS REMAIN_QY -- 남은 수량
|
||||
,SUM(OIOP.STEP45 + OIOP.STEP55 + OIOP.STEP65 + OIOP.STEP75) AS SNDNG_QY -- 보낸 수량
|
||||
,SUM((OIOP.ORDR_QY - OIOP.STEP85) - (OIOP.STEP45 + OIOP.STEP55 + OIOP.STEP65 + OIOP.STEP75)) AS REMAIN_QY -- 남은 수량
|
||||
,CASE --
|
||||
WHEN COUNT(OIOP.ORDR_GOODS_OPTN_INNB) > 1 THEN CONCAT(MAX(OI.GOODS_NM) , ' 외 ', COUNT(OIOP.ORDR_GOODS_OPTN_INNB)-1, '종')
|
||||
ELSE MAX(OI.GOODS_NM)
|
||||
@@ -755,7 +761,8 @@
|
||||
OIOP.ORDR_GOODS_OPTN_INNB
|
||||
,OIOP.SOPMAL_CD
|
||||
,OIOP.OPTN_TY
|
||||
,((OIOP.ORDR_QY - OIOP.STEP85) - (OIOP.STEP35 + OIOP.STEP45 + OIOP.STEP55 + OIOP.STEP65 + OIOP.STEP75)) AS QY
|
||||
-- ,((OIOP.ORDR_QY - OIOP.STEP85) - (OIOP.STEP35 + OIOP.STEP45 + OIOP.STEP55 + OIOP.STEP65 + OIOP.STEP75)) AS QY
|
||||
,((OIOP.ORDR_QY - OIOP.STEP85) - (OIOP.STEP45 + OIOP.STEP55 + OIOP.STEP65 + OIOP.STEP75)) AS QY /*상품준비(35)는 출고대상으로 지정*/
|
||||
,OI.GOODS_NM
|
||||
,(
|
||||
SELECT
|
||||
|
||||
@@ -79,14 +79,17 @@
|
||||
MBR_INNB,
|
||||
MBR_DV_CD,
|
||||
DLVYLC_DC_CN,
|
||||
DLVYLC_AREA_CD,
|
||||
RECPNT_NM,
|
||||
CAST(AES_DECRYPT(UNHEX(MBTLNB) , '1df5be2f7e90ae36') AS CHAR(50)) AS MBTLNB,
|
||||
ADRES_DV,
|
||||
LNB_ADRES,
|
||||
RNM_ADRES,
|
||||
DTL_ADRES,
|
||||
CSTMCLER_CD,
|
||||
DFT_DLVYLC_AT,
|
||||
ZIP
|
||||
ZIP,
|
||||
PREFCD
|
||||
<include refid="dlvyAdresFrom"/>
|
||||
<include refid="mbrInnbWhere"/>
|
||||
ORDER BY (CASE WHEN DFT_DLVYLC_AT = 'Y' THEN 1 ELSE 2 END), ADBK_INNB DESC
|
||||
@@ -179,12 +182,15 @@
|
||||
SELECT
|
||||
ADBK_INNB,
|
||||
MBR_INNB,
|
||||
DLVYLC_AREA_CD,
|
||||
RECPNT_NM,
|
||||
ZIP,
|
||||
PREFCD,
|
||||
DLVYLC_DC_CN,
|
||||
LNB_ADRES,
|
||||
RNM_ADRES,
|
||||
DTL_ADRES,
|
||||
CSTMCLER_CD,
|
||||
CAST(AES_DECRYPT(UNHEX(MBTLNB) , '1df5be2f7e90ae36') AS CHAR(50)) AS MBTLNB,
|
||||
DFT_DLVYLC_AT,
|
||||
REGIST_DT,
|
||||
@@ -222,14 +228,17 @@
|
||||
MBR_DV_CD,
|
||||
MBR_INNB,
|
||||
DLVYLC_DC_CN,
|
||||
DLVYLC_AREA_CD,
|
||||
RECPNT_NM,
|
||||
TELNB,
|
||||
MBTLNB,
|
||||
ZIP,
|
||||
PREFCD,
|
||||
ADRES_DV,
|
||||
LNB_ADRES,
|
||||
RNM_ADRES,
|
||||
DTL_ADRES,
|
||||
CSTMCLER_CD,
|
||||
DFT_DLVYLC_AT,
|
||||
RECENT_DLVYLC_AT,
|
||||
REGUSR,
|
||||
@@ -241,14 +250,17 @@
|
||||
#{mbrDvCd},
|
||||
#{mbrInnb},
|
||||
#{dlvylcDcCn},
|
||||
#{dlvylcAreaCd},
|
||||
#{recpntNm},
|
||||
#{telnb},
|
||||
HEX(AES_ENCRYPT(REPLACE(#{mbtlnb},'-',''), '1df5be2f7e90ae36')),
|
||||
#{zip},
|
||||
#{prefcd},
|
||||
#{adresDv},
|
||||
#{lnbAdres},
|
||||
#{rnmAdres},
|
||||
#{dtlAdres},
|
||||
#{cstmclerCd},
|
||||
#{dftDlvylcAt},
|
||||
#{recentDlvylcAt},
|
||||
#{regusr},
|
||||
@@ -264,13 +276,16 @@
|
||||
<![CDATA[
|
||||
UPDATE GC_DELIVERY_ADDRESS
|
||||
SET
|
||||
DLVYLC_AREA_CD= #{dlvylcAreaCd},
|
||||
RECPNT_NM = #{recpntNm},
|
||||
MBTLNB = HEX(AES_ENCRYPT(REPLACE(#{mbtlnb},'-',''), '1df5be2f7e90ae36')),
|
||||
ZIP = #{zip},
|
||||
PREFCD = #{prefcd},
|
||||
ADRES_DV = #{adresDv},
|
||||
RNM_ADRES = #{rnmAdres},
|
||||
LNB_ADRES = #{lnbAdres},
|
||||
DTL_ADRES = #{dtlAdres},
|
||||
CSTMCLER_CD = #{cstmclerCd},
|
||||
DFT_DLVYLC_AT = #{dftDlvylcAt},
|
||||
UPDUSR = #{updusr},
|
||||
UPDT_DT = SYSDATE(),
|
||||
@@ -482,6 +497,7 @@
|
||||
AND FOS.ORDR_INNB = FO.ORDR_INNB
|
||||
WHERE FO.USE_AT = 'Y'
|
||||
AND IFNULL(FOS.ORDR_INNB, '') != ''
|
||||
/*AND FO.SUBSVC_AT = 'N'*/
|
||||
AND FO.SOPMAL_CD = #{sopmalCd}
|
||||
<include refid="orderWhere"/>
|
||||
</select>
|
||||
@@ -585,6 +601,7 @@
|
||||
ON FOS.SOPMAL_CD = FO.SOPMAL_CD
|
||||
AND FOS.ORDR_INNB = FO.ORDR_INNB
|
||||
WHERE FO.USE_AT = 'Y'
|
||||
/*AND FO.SUBSVC_AT = 'N'*/
|
||||
AND FOS.ORDR_INNB IS NOT NULL -- GC_ORDER_SETLE 에 데이터가 있을 때 조건
|
||||
# AND IFNULL(FOS.ORDR_INNB, '') != '' -- 필터조건의 의미가 inner join 을 의미하므로, GC_ORDER_SETLE 테이블과 inner join 으로 변경하였음.
|
||||
AND FO.SOPMAL_CD = #{sopmalCd}
|
||||
@@ -2690,7 +2707,7 @@
|
||||
|
||||
<!-- 다운로드항목 등록 -->
|
||||
<insert id="insertDwldForm" parameterType="com.wb.domainserver.domain.gcone.ordr.ordr.vo.BODwldItmVO">
|
||||
<selectKey order="BEFORE" keyProperty="excelDwldFormSnb" resultType="java.lang.Long">
|
||||
<selectKey order="BEFORE" keyProperty="excelDwldFormSnb" resultType="java.lang.String">
|
||||
SELECT IFNULL(MAX(EXCEL_DWLD_FORM_SNB), 0) + 1 FROM GC_EXCEL_DWLD_FORM
|
||||
</selectKey>
|
||||
|
||||
@@ -3803,6 +3820,7 @@
|
||||
LEFT JOIN GC_ORDER_SETLE FOS ON FOS.SOPMAL_CD = FO.SOPMAL_CD
|
||||
AND FOS.ORDR_INNB = FO.ORDR_INNB
|
||||
WHERE FO.USE_AT = 'Y'
|
||||
AND FO.SUBSVC_AT = 'N' /*구독서비스 제외*/
|
||||
AND IFNULL(FOS.ORDR_INNB, '') != ''
|
||||
AND FO.SOPMAL_CD = #{sopmalCd}
|
||||
AND FO.MBR_DV_CD = #{mbrDvCd}
|
||||
@@ -3939,6 +3957,7 @@
|
||||
AND GOR.SOPMAL_CD = #{sopmalCd}
|
||||
AND GOR.MBR_DV_CD = #{mbrDvCd}
|
||||
AND GOR.MBR_INNB = #{mbrInnb}
|
||||
AND GOR.SUBSVC_INNB IS NULL /*구독서비스 제외*/
|
||||
)
|
||||
GROUP BY FOI.ORDR_INNB
|
||||
) ITEM ON ITEM.SOPMAL_CD = FO.SOPMAL_CD
|
||||
@@ -3946,6 +3965,7 @@
|
||||
LEFT JOIN GC_ORDER_SETLE FOS ON FOS.SOPMAL_CD = FO.SOPMAL_CD
|
||||
AND FOS.ORDR_INNB = FO.ORDR_INNB
|
||||
WHERE FO.USE_AT = 'Y'
|
||||
AND FO.SUBSVC_AT = 'N' /*구독서비스 제외*/
|
||||
AND ( ( FO.ORDR_STTUS_CD BETWEEN '15' AND '75' ) OR FO.ORDR_STTUS_CD = '95' )
|
||||
AND FO.SOPMAL_CD = #{sopmalCd}
|
||||
AND FO.MBR_DV_CD = #{mbrDvCd}
|
||||
@@ -4619,7 +4639,7 @@
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 추가지역별배송비 해당 여부 -->
|
||||
<!-- 추가지역별배송비 해당 여부 (KR) -->
|
||||
<select id="selectBODefaultAdressAtInqire"
|
||||
resultType="java.lang.String">
|
||||
<![CDATA[
|
||||
@@ -4637,6 +4657,24 @@
|
||||
]]>
|
||||
</select>
|
||||
|
||||
<!-- 추가지역별배송비 해당 여부 (JP) -->
|
||||
<select id="selectBODefaultAdressAtInqire2"
|
||||
resultType="java.lang.String">
|
||||
<![CDATA[
|
||||
SELECT
|
||||
CASE
|
||||
WHEN EXISTS (
|
||||
SELECT 1
|
||||
FROM GC_DEFAULT_ADDSHIPPING
|
||||
WHERE SOPMAL_CD = #{sopmalCd}
|
||||
AND PREFCD = #{prefcd}
|
||||
) THEN 'Y'
|
||||
ELSE 'N'
|
||||
END AS ADDSHIPPING_AT
|
||||
FROM DUAL
|
||||
]]>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5247,6 +5285,163 @@
|
||||
]]>
|
||||
</select>
|
||||
|
||||
<!-- 사용자 > 마이페이지 > 구독서비스 주문/배송 목록 조회 -->
|
||||
<select id="selectMbrSubsvcOrdrList" parameterType="com.wb.domainserver.domain.gcone.ordr.ordr.vo.BOOrdrDlvyVO" resultType="dataMap">
|
||||
<![CDATA[
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT CAST(@ROWNUM:=@ROWNUM + 1 AS UNSIGNED) AS RNUM
|
||||
, TB.*
|
||||
FROM (
|
||||
SELECT COUNT(*) OVER() TOT_CNT
|
||||
, FO.SOPMAL_CD
|
||||
, CAST(FO.ORDR_INNB AS CHAR) AS ORDR_INNB
|
||||
, FO.ORDR_RCEPT_DT
|
||||
, DATE_FORMAT(FO.ORDR_RCEPT_DT, '%Y.%m.%d') AS ORDR_DT
|
||||
, GS.IMG AS GOODS_IMAGE_URL
|
||||
, CONCAT(GS.SUBSVC_NM, '[', GS.SUBSVC_GNR_NM, ']') AS GOODS_NM
|
||||
, FN_GET_ORDER_GOODS_OPTN_NAME(FO.SOPMAL_CD, FO.ORDR_INNB, 0) AS OPTN_NM
|
||||
, GS.SUBSVC_INNB AS GOODS_INNB
|
||||
, ITEM.ORDR_DLVY_INNB
|
||||
, FO.RL_SETLE_AMT AS SETLE_AMT
|
||||
, FO.ORDR_STTUS_CD
|
||||
, CASE
|
||||
WHEN FO.ORDR_STTUS_CD = '95' THEN '주문취소'
|
||||
ELSE FN_GET_COMMCODE_NAME('ORDR_STTUS', FO.ORDR_STTUS_CD)
|
||||
END AS ORDR_STTUS_NM
|
||||
, (
|
||||
SELECT
|
||||
FN_GET_COMMCODE_NAME('GIFT_STTUS', SH.GIFT_STTUS_CD) AS GIFT_STTUS_CD
|
||||
FROM GC_ORDER_SHIPPING SH
|
||||
WHERE 1 =1
|
||||
AND SH.SOPMAL_CD = FO.SOPMAL_CD
|
||||
AND SH.ORDR_INNB = FO.ORDR_INNB
|
||||
LIMIT 1
|
||||
) AS GIFT_STTUS_CD_NM
|
||||
, (
|
||||
SELECT
|
||||
SH.GIFT_STTUS_CD
|
||||
FROM GC_ORDER_SHIPPING SH
|
||||
WHERE 1 =1
|
||||
AND SH.SOPMAL_CD = FO.SOPMAL_CD
|
||||
AND SH.ORDR_INNB = FO.ORDR_INNB
|
||||
LIMIT 1
|
||||
) AS GIFT_STTUS_CD
|
||||
, FO.ORDR_TY_CD
|
||||
, FO.SKN_ENVRN_CD
|
||||
, FN_GET_COMMCODE_NAME('ORDR_TY', FO.ORDR_TY_CD) AS ORDR_TY_CD_NM
|
||||
, FO.MBR_INNB
|
||||
, FO.MBR_DV_CD
|
||||
, CASE
|
||||
WHEN EXISTS (
|
||||
SELECT 1
|
||||
FROM GC_ORDER_ITEM_OPTION FOIO
|
||||
INNER JOIN GC_ORDER_ITEM FOI
|
||||
ON FOIO.SOPMAL_CD = FOI.SOPMAL_CD
|
||||
AND FOIO.ORDR_GOODS_INNB = FOI.ORDR_GOODS_INNB
|
||||
INNER JOIN GC_GOODS FG
|
||||
ON FOI.GOODS_INNB = FG.GOODS_INNB
|
||||
AND FOI.SOPMAL_CD = FG.SOPMAL_CD
|
||||
AND FG.GOODS_KND_CD = '01'
|
||||
LEFT JOIN LATERAL ( SELECT FBG.ORDR_GOODS_OPTN_INNB
|
||||
, FBG.SOPMAL_CD
|
||||
, SUM(CASE WHEN FB.BBS_ID = 'goods_review' THEN 1 ELSE 0 END) RVW_CNT
|
||||
, SUM(CASE WHEN FB.BBS_ID = 'goods_review_month' THEN 1 ELSE 0 END) MT_RVW_CNT
|
||||
FROM GC_BOARDDATA_GOODS FBG
|
||||
INNER JOIN GC_BOARDDATA FB
|
||||
ON FBG.BBSCTT_INNB = FB.BBSCTT_INNB
|
||||
AND FBG.SOPMAL_CD = FB.SOPMAL_CD
|
||||
AND FB.BBS_ID IN ('goods_review','goods_review_month')
|
||||
WHERE FOIO.ORDR_GOODS_OPTN_INNB = FBG.ORDR_GOODS_OPTN_INNB
|
||||
GROUP BY FBG.ORDR_GOODS_OPTN_INNB, FBG.SOPMAL_CD
|
||||
)RVW
|
||||
ON FOIO.ORDR_GOODS_OPTN_INNB = RVW.ORDR_GOODS_OPTN_INNB
|
||||
AND FOIO.SOPMAL_CD = RVW.SOPMAL_CD
|
||||
WHERE 1 = 1
|
||||
AND FOIO.SOPMAL_CD = FO.SOPMAL_CD
|
||||
AND FOI.ORDR_INNB = FO.ORDR_INNB
|
||||
AND FOIO.PURCHS_DCSN_QY > 0
|
||||
AND FOIO.OPTN_TY <> '04'
|
||||
AND ((FG.RVW_WRITNG_POSBL_AT = 'Y' AND (CASE WHEN IFNULL(FOIO.PURCHS_DCSN_QY,0) < IFNULL(FOIO.ORDR_QY,0) - IFNULL(STEP85,0) THEN IFNULL(FOIO.PURCHS_DCSN_QY,0)
|
||||
ELSE IFNULL(FOIO.ORDR_QY,0) - IFNULL(STEP85,0) END) > IFNULL(RVW.RVW_CNT,0) )
|
||||
OR (FG.MT_RVW_WRITNG_POSBL_AT = 'Y' AND IFNULL(MT_RVW_CNT,0) < 1))
|
||||
AND FOIO.PURCHS_DCSN_DT > DATE_SUB(SYSDATE(),INTERVAL 6 MONTH)
|
||||
) THEN 'Y'
|
||||
ELSE 'N'
|
||||
END AS REVIEW_AT
|
||||
, CASE
|
||||
WHEN EXISTS (
|
||||
SELECT
|
||||
1
|
||||
FROM GC_ORDER_ITEM_OPTION OIOP
|
||||
INNER JOIN GC_ORDER_SHIPPING SH ON OIOP.SOPMAL_CD = SH.SOPMAL_CD
|
||||
AND OIOP.ORDR_DLVY_INNB = SH.ORDR_DLVY_INNB
|
||||
WHERE 1 = 1
|
||||
AND OIOP.PURCHS_DCSN_AT = 'N'
|
||||
AND FO.SOPMAL_CD = SH.SOPMAL_CD
|
||||
AND FO.ORDR_INNB = SH.ORDR_INNB
|
||||
AND OIOP.ORDR_STTUS_CD BETWEEN '50' AND '75'
|
||||
) THEN 'Y'
|
||||
ELSE 'N'
|
||||
END AS PURCHS_DCSN_AT
|
||||
,FOS.SETLE_TY_CD
|
||||
FROM GC_ORDER FO
|
||||
INNER JOIN GC_SUBSVC GS ON FO.SUBSVC_INNB = GS.SUBSVC_INNB
|
||||
INNER JOIN (
|
||||
SELECT FOI.SOPMAL_CD
|
||||
, FOI.ORDR_INNB
|
||||
, MAX(FOI.GOODS_INNB) AS GOODS_INNB
|
||||
, MAX(FOIO.ORDR_DLVY_INNB) AS ORDR_DLVY_INNB
|
||||
, COUNT(DISTINCT FOI.ORDR_GOODS_INNB) AS CNT
|
||||
, SUM(FOIO.ORDR_QY) AS ORDR_QY
|
||||
, MAX(FN_GET_ORDER_INPUT_OPTN(FOI.SOPMAL_CD, FOI.ORDR_INNB, FOI.ORDR_GOODS_INNB, FOIO.ORDR_GOODS_OPTN_INNB)) AS INPUT_OPTN_TEXT
|
||||
, MAX(FOI.GOODS_IMG_COURS) AS GOODS_IMG_COURS
|
||||
FROM GC_ORDER_ITEM FOI
|
||||
INNER JOIN GC_ORDER_ITEM_OPTION FOIO ON FOI.SOPMAL_CD = FOIO.SOPMAL_CD
|
||||
AND FOI.ORDR_GOODS_INNB = FOIO.ORDR_GOODS_INNB
|
||||
WHERE FOI.SOPMAL_CD = #{sopmalCd}
|
||||
AND FOI.GOODS_KND_CD = '01'
|
||||
AND (FOI.SOPMAL_CD, FOI.ORDR_INNB) IN (
|
||||
SELECT GOR.SOPMAL_CD
|
||||
, GOR.ORDR_INNB
|
||||
FROM GC_ORDER GOR
|
||||
WHERE GOR.USE_AT = 'Y'
|
||||
AND GOR.SOPMAL_CD = #{sopmalCd}
|
||||
AND GOR.MBR_DV_CD = #{mbrDvCd}
|
||||
AND GOR.MBR_INNB = #{mbrInnb}
|
||||
AND GOR.SUBSVC_AT = 'Y' /*구독서비스*/
|
||||
)
|
||||
GROUP BY FOI.ORDR_INNB
|
||||
) ITEM ON ITEM.SOPMAL_CD = FO.SOPMAL_CD
|
||||
AND ITEM.ORDR_INNB = FO.ORDR_INNB
|
||||
LEFT JOIN GC_ORDER_SETLE FOS ON FOS.SOPMAL_CD = FO.SOPMAL_CD
|
||||
AND FOS.ORDR_INNB = FO.ORDR_INNB
|
||||
WHERE FO.USE_AT = 'Y'
|
||||
AND FO.SUBSVC_AT = 'Y' /*구독서비스*/
|
||||
AND ( ( FO.ORDR_STTUS_CD BETWEEN '15' AND '75' ) OR FO.ORDR_STTUS_CD = '95' )
|
||||
AND FO.SOPMAL_CD = #{sopmalCd}
|
||||
AND FO.MBR_DV_CD = #{mbrDvCd}
|
||||
AND FO.MBR_INNB = #{mbrInnb}
|
||||
ORDER BY FO.REGIST_DT DESC
|
||||
) TB
|
||||
WHERE (@rownum:=0) = 0
|
||||
]]>
|
||||
<include refid="mbrOrdrSubsvcListWhere"/>
|
||||
) PV
|
||||
LIMIT #{recordCountPerPage} OFFSET #{firstIndex}
|
||||
</select>
|
||||
|
||||
<sql id="mbrOrdrSubsvcListWhere">
|
||||
<if test="@com.wb.domainserver.util.dataaccess.MybaitsUtil@isNotEmpty(srchwrd)">
|
||||
AND (
|
||||
TB.ORDR_INNB LIKE CONCAT('%', #{srchwrd}, '%') OR
|
||||
TB.GOODS_NM LIKE CONCAT('%', #{srchwrd}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="@com.wb.domainserver.util.dataaccess.MybaitsUtil@isNotEmpty(bgnDt) and @com.wb.domainserver.util.dataaccess.MybaitsUtil@isNotEmpty(endDt)">
|
||||
AND TB.ORDR_RCEPT_DT BETWEEN DATE(#{bgnDt}) AND DATE(#{endDt}) + 1
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
@@ -0,0 +1,470 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.wb.domainserver.domain.gcone.ordr.subsvc.mapper.BOSubsvcOrdrMapper">
|
||||
<!--구독서비스 상품준비 관리 목록-->
|
||||
<select id="selectBOSubsvcOrderList" parameterType="com.wb.domainserver.domain.gcone.ordr.subsvc.vo.BOSubsvcOrderVO" resultType="dataMap">
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT CAST(@ROWNUM:=@ROWNUM + 1 AS UNSIGNED) AS RNUM
|
||||
, COUNT(*) OVER() AS TOT_CNT
|
||||
, MAIN.*
|
||||
FROM (
|
||||
SELECT ROW_NUMBER() OVER(PARTITION BY GO.ORDR_INNB ORDER BY GO.ORDR_INNB ASC, GOIO.ORDR_STTUS_CD ASC, GOI.ORDR_GOODS_INNB ASC, GOIO.ORDR_GOODS_OPTN_INNB ASC) AS LINE
|
||||
, GO.ORDR_INNB
|
||||
, GOI.ORDR_GOODS_INNB
|
||||
, GOIO.ORDR_GOODS_OPTN_INNB /*일괄처리 대상 주문상품옵션고유번호*/
|
||||
, GOIO.ORDR_DLVY_INNB
|
||||
, GS.SUBSVC_NM
|
||||
, GS.SUBSVC_GNR
|
||||
, GS.SUBSVC_GNR_NM
|
||||
, GM.MBR_NM
|
||||
, GM.MBR_ID
|
||||
, GM.MBR_DV_CD
|
||||
, GM.MBR_INNB
|
||||
, fn_get_member_grad_name(GO.SOPMAL_CD, GM.MBR_DV_CD, GM.MBR_INNB) AS GRADE
|
||||
, SUM(CASE WHEN GOIO.ORDR_STTUS_CD BETWEEN '35' AND '75' THEN 1 ELSE 0 END) OVER(PARTITION BY GO.ORDR_INNB)+1 AS CURT_PROCS_ODR
|
||||
, SUM(CASE WHEN GOIO.ORDR_STTUS_CD BETWEEN '35' AND '75' THEN 1 ELSE 0 END) OVER(PARTITION BY GO.ORDR_INNB) AS MBR_LAST_PROCS_ODR /*회원별 최종차수 상품준비 ~ 배송완료*/
|
||||
, MAX(GOIO.UPDT_DT) OVER(PARTITION BY GO.ORDR_INNB) AS LAST_PRCS_DT/*최종처리일*/
|
||||
, IFNULL(GS.LAST_PROCS_ODR,0) AS LAST_PROCS_ODR /*최종차수*/
|
||||
, GOIO.ORDR_STTUS_CD
|
||||
FROM GC_ORDER GO
|
||||
JOIN GC_SUBSVC GS ON GS.SOPMAL_CD = GO.SOPMAL_CD AND GS.SUBSVC_INNB = GO.SUBSVC_INNB
|
||||
JOIN GC_MEMBER GM ON GM.MBR_DV_CD = GO.MBR_DV_CD AND GM.MBR_INNB = GO.MBR_INNB
|
||||
JOIN GC_ORDER_ITEM GOI ON GO.SOPMAL_CD =GOI.SOPMAL_CD AND GO.ORDR_INNB = GOI.ORDR_INNB
|
||||
JOIN GC_ORDER_ITEM_OPTION GOIO ON GOI.SOPMAL_CD = GOIO.SOPMAL_CD AND GOI.ORDR_GOODS_INNB = GOIO.ORDR_GOODS_INNB AND GOIO.OPTN_TY = '01'
|
||||
WHERE GO.USE_AT = 'Y'
|
||||
AND GO.SUBSVC_AT = 'Y'
|
||||
AND GO.SOPMAL_CD = #{sopmalCd}
|
||||
<if test='srchSelSubsvcNm != null and srchSelSubsvcNm != ""'>
|
||||
AND GS.SUBSVC_NM = #{srchSelSubsvcNm} /*구독서비스 명*/
|
||||
</if>
|
||||
<if test='srchSelSubsvcGnr != null and srchSelSubsvcGnr != ""'>
|
||||
AND GS.SUBSVC_GNR = #{srchSelSubsvcGnr} /*기수*/
|
||||
</if>
|
||||
<if test='srchSubsvcNm != null and srchSubsvcNm != ""'>
|
||||
AND GS.SUBSVC_NM LIKE CONCAT('%',#{srchSubsvcNm},'%') /*구독서비스 명*/
|
||||
</if>
|
||||
<if test='srchSubsvcGnrNm != null and srchSubsvcGnrNm != ""'>
|
||||
AND GS.SUBSVC_GNR_NM LIKE CONCAT('%',#{srchSubsvcGnrNm},'%') /*기수명*/
|
||||
</if>
|
||||
) MAIN
|
||||
WHERE (@ROWNUM:=0)=0
|
||||
AND MAIN.LINE = 1
|
||||
AND MAIN.ORDR_STTUS_CD = '25'
|
||||
<if test='srchCurMonExclude!= null and srchCurMonExclude == "Y"'>
|
||||
<![CDATA[
|
||||
AND MAIN.LAST_PRCS_DT < CONCAT(DATE_FORMAT(NOW(),'%Y-%m'),'-01') /*당월 처리자 제외*/
|
||||
]]>
|
||||
</if>
|
||||
<choose>
|
||||
<when test='sortDv == "subsvcGnrAsc"'>
|
||||
ORDER BY SUBSVC_NM ASC, SUBSVC_GNR ASC /*구독서비스명+기수*/
|
||||
</when>
|
||||
<when test='sortDv == "subsvcGnrDesc"'>
|
||||
ORDER BY SUBSVC_NM DESC, SUBSVC_GNR DESC /*구독서비스명+기수*/
|
||||
</when>
|
||||
<when test='sortDv == "mbrAsc"'>
|
||||
ORDER BY MBR_NM ASC, MBR_ID ASC /*주문자순*/
|
||||
</when>
|
||||
<when test='sortDv == "mbrDesc"'>
|
||||
ORDER BY MBR_NM DESC, MBR_ID DESC /*주문자순*/
|
||||
</when>
|
||||
<when test='sortDv == "ordrAsc"'>
|
||||
ORDER BY ORDR_INNB ASC /*주문번호순*/
|
||||
</when>
|
||||
<when test='sortDv == "ordrDesc"'>
|
||||
ORDER BY ORDR_INNB DESC /*주문번호순*/
|
||||
</when>
|
||||
<when test='sortDv == "lastPrcsDtAsc"'>
|
||||
ORDER BY LAST_PRCS_DT ASC /*최종처리일순*/
|
||||
</when>
|
||||
<when test='sortDv == "lastPrcsDtDesc"'>
|
||||
ORDER BY LAST_PRCS_DT ASC /*최종처리일순*/
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY SUBSVC_NM ASC, SUBSVC_GNR ASC
|
||||
</otherwise>
|
||||
</choose>
|
||||
) PV
|
||||
WHERE 1=1
|
||||
LIMIT #{recordCountPerPage} OFFSET #{firstIndex}
|
||||
|
||||
</select>
|
||||
|
||||
<!--구독서비스 상품준비 관리 목록 배송내역 팝업 배송내역목록-->
|
||||
<select id="selectBOSubsvcOrderDlvyList" parameterType="com.wb.domainserver.domain.gcone.ordr.subsvc.vo.BOSubsvcOrderVO" resultType="dataMap">
|
||||
SELECT CAST(@ROWNUM:=@ROWNUM + 1 AS UNSIGNED) AS RNUM
|
||||
, GOIO.ORDR_GOODS_OPTN_INNB
|
||||
, GO.ORDR_INNB
|
||||
, GM.MBR_NM
|
||||
, GM.MBR_ID
|
||||
, GM.MBR_DV_CD
|
||||
, GM.MBR_INNB
|
||||
, fn_get_member_grad_name(GO.SOPMAL_CD, GM.MBR_DV_CD, GM.MBR_INNB) AS GRADE
|
||||
, IFNULL(GOIO.UPDT_DT, GOIO.REGIST_DT) AS PROCS_DT /*발생일자*/
|
||||
, GOI.GOODS_IMG_COURS
|
||||
, GOI.GOODS_NM
|
||||
, GOIO.OPTN_NM_1
|
||||
, GOIO.OPTN_VAL_1
|
||||
, GOIO.CNSMRPRIC /*정가*/
|
||||
, GOIO.SLEPRIC /*판매가*/
|
||||
, fn_get_commcode_name('ORDR_STTUS', GOIO.ORDR_STTUS_CD) AS ORDR_STTUS
|
||||
FROM GC_ORDER GO
|
||||
JOIN GC_MEMBER GM ON GM.MBR_DV_CD = GO.MBR_DV_CD AND GM.MBR_INNB = GO.MBR_INNB
|
||||
JOIN GC_ORDER_ITEM GOI ON GOI.SOPMAL_CD = GO.SOPMAL_CD AND GOI.ORDR_INNB = GO.ORDR_INNB
|
||||
JOIN GC_ORDER_ITEM_OPTION GOIO ON GOI.SOPMAL_CD = GOIO.SOPMAL_CD AND GOI.ORDR_GOODS_INNB = GOIO.ORDR_GOODS_INNB AND GOIO.OPTN_TY = '01'
|
||||
WHERE (@ROWNUM:=0)=0
|
||||
AND GOI.ORDR_INNB = #{ordrInnb}
|
||||
AND GOI.SOPMAL_CD = #{sopmalCd}
|
||||
ORDER BY GOIO.ORDR_GOODS_OPTN_INNB ASC
|
||||
</select>
|
||||
<!--구독서비스 상품준비 관리 상품매칭 - 1. GC_ORDER update-->
|
||||
<update id="updateBOSubsvcGoodsMappgOrdr" parameterType="com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO">
|
||||
<foreach collection="arrOrdrInnb" item="ordrInnb" separator=";">
|
||||
UPDATE GC_ORDER
|
||||
SET ORDR_STTUS_CD = (CASE WHEN ORDR_STTUS_CD = '25' THEN '35' ELSE ORDR_STTUS_CD END)
|
||||
, UPDT_DT = NOW()
|
||||
WHERE SOPMAL_CD = #{sopmalCd}
|
||||
AND ORDR_INNB = #{ordrInnb}
|
||||
</foreach>
|
||||
</update>
|
||||
<!--구독서비스 상품준비 관리 상품매칭 - 2. GC_ORDER_ITEM update-->
|
||||
<update id="updateBOSubsvcGoodsMappgOrdrItem" parameterType="com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO">
|
||||
<foreach collection="arrOrdrGoodsInnb" item="ordrGoodsInnb" separator=";">
|
||||
UPDATE GC_ORDER_ITEM GOI, (SELECT GG.GOODS_INNB, GG.GOODS_NM, GGI.IMG
|
||||
FROM GC_GOODS GG
|
||||
JOIN GC_GOODS_IMAGE GGI ON GGI.SOPMAL_CD = GG.SOPMAL_CD AND GGI.GOODS_INNB = GG.GOODS_INNB AND GGI.CUT_NB = 1 AND GGI.IMG_KND = '02'
|
||||
WHERE GG.GOODS_INNB = #{goodsInnb}
|
||||
LIMIT 1) G
|
||||
SET GOI.GOODS_INNB = G.GOODS_INNB
|
||||
, GOI.GOODS_NM = G.GOODS_NM
|
||||
, GOI.GOODS_IMG_COURS = G.IMG
|
||||
WHERE SOPMAL_CD = #{sopmalCd}
|
||||
AND GOI.ORDR_GOODS_INNB = #{ordrGoodsInnb}
|
||||
</foreach>
|
||||
</update>
|
||||
<!--구독서비스 상품준비 관리 상품매칭 - 3. GC_ORDER_ITEM_OPTION update-->
|
||||
<update id="updateBOSubsvcGoodsMappgOrdrItemOptn" parameterType="com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO">
|
||||
<foreach collection="arrOrdrGoodsOptnInnb" item="ordrGoodsOptnInnb" separator=";">
|
||||
UPDATE GC_ORDER_ITEM_OPTION GOIO, (SELECT GOODS_OPTN_INNB
|
||||
, OPTN_TY
|
||||
, OPTN_NM_1
|
||||
, OPTN_NM_2
|
||||
, OPTN_NM_3
|
||||
, OPTN_NM_4
|
||||
, OPTN_VAL_1
|
||||
, OPTN_VAL_2
|
||||
, OPTN_VAL_3
|
||||
, OPTN_VAL_4
|
||||
, OPTN_CD_1
|
||||
, OPTN_CD_2
|
||||
, OPTN_CD_3
|
||||
, OPTN_CD_4
|
||||
, OPTN_INFO
|
||||
, CNSMRPRIC
|
||||
, SLEPRIC
|
||||
, GG.TAX_AT
|
||||
FROM GC_GOODS_OPTION GGO
|
||||
JOIN GC_GOODS GG ON GG.SOPMAL_CD = GGO.SOPMAL_CD AND GG.GOODS_INNB = GGO.GOODS_INNB
|
||||
WHERE GGO.GOODS_OPTN_INNB = #{goodsOptnInnb}
|
||||
AND GGO.OPTN_TY = #{optnTy}
|
||||
LIMIT 1) G
|
||||
SET GOIO.GOODS_OPTN_INNB = G.GOODS_OPTN_INNB
|
||||
, GOIO.OPTN_TY = G.OPTN_TY
|
||||
, GOIO.OPTN_NM_1 = G.OPTN_NM_1
|
||||
, GOIO.OPTN_NM_2 = G.OPTN_NM_2
|
||||
, GOIO.OPTN_NM_3 = G.OPTN_NM_3
|
||||
, GOIO.OPTN_NM_4 = G.OPTN_NM_4
|
||||
, GOIO.OPTN_VAL_1 = G.OPTN_VAL_1
|
||||
, GOIO.OPTN_VAL_2 = G.OPTN_VAL_2
|
||||
, GOIO.OPTN_VAL_3 = G.OPTN_VAL_3
|
||||
, GOIO.OPTN_VAL_4 = G.OPTN_VAL_4
|
||||
, GOIO.OPTN_CD_1 = G.OPTN_CD_1
|
||||
, GOIO.OPTN_CD_2 = G.OPTN_CD_2
|
||||
, GOIO.OPTN_CD_3 = G.OPTN_CD_3
|
||||
, GOIO.OPTN_CD_4 = G.OPTN_CD_4
|
||||
, GOIO.OPTN_INFO = G.OPTN_INFO
|
||||
, GOIO.CNSMRPRIC = G.CNSMRPRIC
|
||||
, GOIO.SLEPRIC = G.SLEPRIC
|
||||
, GOIO.TAX_AT = G.TAX_AT
|
||||
, GOIO.STEP85 = 0
|
||||
, GOIO.STEP35 = GOIO.ORDR_QY
|
||||
, GOIO.STEP45 = 0
|
||||
, GOIO.STEP55 = 0
|
||||
, GOIO.STEP65 = 0
|
||||
, GOIO.STEP75 = 0
|
||||
, GOIO.ORDR_STTUS_CD = '35'
|
||||
, GOIO.UPDT_DT = NOW()
|
||||
WHERE GOIO.SOPMAL_CD = #{sopmalCd}
|
||||
AND GOIO.ORDR_GOODS_OPTN_INNB = #{ordrGoodsOptnInnb}
|
||||
</foreach>
|
||||
</update>
|
||||
<!--구독서비스 상품준비 관리 상품매칭 - 4. GC_ORDER_SHIPPING update-->
|
||||
<update id="updateBOSubsvcGoodsMappgShipping" parameterType="com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO">
|
||||
<foreach collection="arrOrdrDlvyInnb" item="ordrDlvyInnb" separator=";">
|
||||
UPDATE GC_ORDER_SHIPPING
|
||||
SET ORDR_STTUS_CD = '35'
|
||||
, UPDT_DT = NOW()
|
||||
WHERE SOPMAL_CD = #{sopmalCd}
|
||||
AND ORDR_DLVY_INNB = #{ordrDlvyInnb}
|
||||
</foreach>
|
||||
</update>
|
||||
<!--구독서비스 상품준비 관리 상품매칭 - 5. GC_SUBSVC update-->
|
||||
<update id="updateBOSubsvcGoodsMappgSubsvc" parameterType="com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO">
|
||||
UPDATE GC_SUBSVC GS, ( SELECT SOPMAL_CD, SUBSVC_INNB, MAX(LAST_PROCS_ODR) LAST_PROCS_ODR
|
||||
FROM (
|
||||
SELECT GOIO.SOPMAL_CD, GO.SUBSVC_INNB, SUM(CASE WHEN GOIO.ORDR_STTUS_CD BETWEEN '35' AND '75' THEN 1 ELSE 0 END) OVER(PARTITION BY GO.SOPMAL_CD, GO.ORDR_INNB) AS LAST_PROCS_ODR
|
||||
FROM GC_ORDER GO
|
||||
JOIN GC_ORDER_ITEM GOI ON GOI.SOPMAL_CD = GO.SOPMAL_CD AND GOI.ORDR_INNB = GO.ORDR_INNB
|
||||
JOIN GC_ORDER_ITEM_OPTION GOIO ON GOIO.SOPMAL_CD = GOI.SOPMAL_CD AND GOI.ORDR_GOODS_INNB = GOIO.ORDR_GOODS_INNB
|
||||
WHERE GO.SUBSVC_AT = 'Y'
|
||||
AND GO.SOPMAL_CD = #{sopmalCd}
|
||||
AND GO.SUBSVC_INNB IN (SELECT DISTINCT SUBSVC_INNB
|
||||
FROM GC_ORDER
|
||||
WHERE SOPMAL_CD = #{sopmalCd}
|
||||
AND ORDR_INNB IN
|
||||
<foreach collection="arrOrdrInnb" item="ordrInnb" open="(" close=")" separator=",">
|
||||
#{ordrInnb}
|
||||
</foreach>
|
||||
)
|
||||
) M
|
||||
GROUP BY SOPMAL_CD, SUBSVC_INNB
|
||||
) MAIN
|
||||
SET GS.LAST_PROCS_ODR = MAIN.LAST_PROCS_ODR
|
||||
, UPDT_DT = NOW()
|
||||
WHERE GS.SOPMAL_CD = MAIN.SOPMAL_CD
|
||||
AND GS.SUBSVC_INNB = MAIN.SUBSVC_INNB
|
||||
</update>
|
||||
|
||||
<!--구독서비스 상품변경 관리 목록-->
|
||||
<select id="selectBOSubsvcOrderMappedList" parameterType="com.wb.domainserver.domain.gcone.ordr.subsvc.vo.BOSubsvcOrderVO" resultType="dataMap">
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT CAST(@ROWNUM:=@ROWNUM + 1 AS UNSIGNED) AS RNUM
|
||||
, COUNT(*) OVER() AS TOT_CNT
|
||||
, MAIN.*
|
||||
FROM (
|
||||
SELECT ROW_NUMBER() OVER(PARTITION BY GO.ORDR_INNB ORDER BY GOI.ORDR_GOODS_INNB ASC, GOIO.ORDR_GOODS_OPTN_INNB ASC) AS CURT_PROCS_ODR /*차수*/
|
||||
, GO.ORDR_INNB /*주문번호*/
|
||||
, GOI.ORDR_GOODS_INNB
|
||||
, GOIO.ORDR_GOODS_OPTN_INNB /*일괄처리 대상 주문상품옵션고유번호*/
|
||||
, GOIO.ORDR_DLVY_INNB
|
||||
, GS.SUBSVC_NM
|
||||
, GS.SUBSVC_GNR
|
||||
, GS.SUBSVC_GNR_NM
|
||||
, GM.MBR_NM /*회원명*/
|
||||
, GM.MBR_ID /*회원ID*/
|
||||
, GM.MBR_DV_CD /*회원구분코드*/
|
||||
, GM.MBR_INNB /*회원고유번호*/
|
||||
, fn_get_member_grad_name(GO.SOPMAL_CD, GM.MBR_DV_CD, GM.MBR_INNB) AS GRADE /*회원등급*/
|
||||
, MAX(GOIO.UPDT_DT) OVER(PARTITION BY GO.ORDR_INNB) AS LAST_PRCS_DT/*최종처리일*/
|
||||
, GOIO.ORDR_STTUS_CD
|
||||
, GOI.GOODS_IMG_COURS /*상품이미지*/
|
||||
, GOI.GOODS_NM /*상품명*/
|
||||
, GOIO.OPTN_NM_1 /*상품옵션명*/
|
||||
, GOIO.OPTN_VAL_1 /*상품옵션값*/
|
||||
, GOIO.UPDT_DT /*처리일자*/
|
||||
FROM GC_ORDER GO
|
||||
JOIN GC_SUBSVC GS ON GS.SOPMAL_CD = GO.SOPMAL_CD AND GS.SUBSVC_INNB = GO.SUBSVC_INNB
|
||||
JOIN GC_MEMBER GM ON GM.MBR_DV_CD = GO.MBR_DV_CD AND GM.MBR_INNB = GO.MBR_INNB
|
||||
JOIN GC_ORDER_ITEM GOI ON GO.SOPMAL_CD =GOI.SOPMAL_CD AND GO.ORDR_INNB = GOI.ORDR_INNB
|
||||
JOIN GC_ORDER_ITEM_OPTION GOIO ON GOI.SOPMAL_CD = GOIO.SOPMAL_CD AND GOI.ORDR_GOODS_INNB = GOIO.ORDR_GOODS_INNB AND GOIO.OPTN_TY = '01'
|
||||
WHERE GO.USE_AT = 'Y'
|
||||
AND GO.SUBSVC_AT = 'Y'
|
||||
AND GO.SOPMAL_CD = #{sopmalCd}
|
||||
<if test='srchSelSubsvcNm != null and srchSelSubsvcNm != ""'>
|
||||
AND GS.SUBSVC_NM = #{srchSelSubsvcNm} /*구독서비스 명*/
|
||||
</if>
|
||||
<if test='srchSelSubsvcGnr != null and srchSelSubsvcGnr != ""'>
|
||||
AND GS.SUBSVC_GNR = #{srchSelSubsvcGnr} /*기수*/
|
||||
</if>
|
||||
<if test='srchSubsvcNm != null and srchSubsvcNm != ""'>
|
||||
AND GS.SUBSVC_NM LIKE CONCAT('%',#{srchSubsvcNm},'%') /*구독서비스 명*/
|
||||
</if>
|
||||
<if test='srchSubsvcGnrNm != null and srchSubsvcGnrNm != ""'>
|
||||
AND GS.SUBSVC_GNR_NM LIKE CONCAT('%',#{srchSubsvcGnrNm},'%') /*기수명*/
|
||||
</if>
|
||||
<if test='srchOrdrInnb != null and srchOrdrInnb != ""'>
|
||||
AND GO.ORDR_INNB = #{srchOrdrInnb} /*주문번호*/
|
||||
</if>
|
||||
<if test='srchMbrNm != null and srchMbrNm != ""'>
|
||||
AND GM.MBR_NM LIKE CONCAT('%',#{srchMbrNm},'%') /*주문자명*/
|
||||
</if>
|
||||
<if test='srchMbrId != null and srchMbrId != ""'>
|
||||
AND GM.MBR_ID LIKE CONCAT('%',#{srchMbrId},'%') /*주문자id*/
|
||||
</if>
|
||||
) MAIN
|
||||
WHERE (@ROWNUM:=0)=0
|
||||
AND MAIN.ORDR_STTUS_CD = '35'
|
||||
<if test='srchCurMonExclude!= null and srchCurMonExclude == "Y"'>
|
||||
<![CDATA[
|
||||
AND MAIN.LAST_PRCS_DT < CONCAT(DATE_FORMAT(NOW(),'%Y-%m'),'-01') /*당월 처리자 제외*/
|
||||
]]>
|
||||
</if>
|
||||
<choose>
|
||||
<when test='sortDv == "subsvcGnrAsc"'>
|
||||
ORDER BY SUBSVC_NM ASC, SUBSVC_GNR ASC /*구독서비스명+기수*/
|
||||
</when>
|
||||
<when test='sortDv == "subsvcGnrDesc"'>
|
||||
ORDER BY SUBSVC_NM DESC, SUBSVC_GNR DESC /*구독서비스명+기수*/
|
||||
</when>
|
||||
<when test='sortDv == "mbrAsc"'>
|
||||
ORDER BY MBR_NM ASC, MBR_ID ASC /*주문자순*/
|
||||
</when>
|
||||
<when test='sortDv == "mbrDesc"'>
|
||||
ORDER BY MBR_NM DESC, MBR_ID DESC /*주문자순*/
|
||||
</when>
|
||||
<when test='sortDv == "ordrAsc"'>
|
||||
ORDER BY ORDR_INNB ASC /*주문번호순*/
|
||||
</when>
|
||||
<when test='sortDv == "ordrDesc"'>
|
||||
ORDER BY ORDR_INNB DESC /*주문번호순*/
|
||||
</when>
|
||||
<when test='sortDv == "lastPrcsDtAsc"'>
|
||||
ORDER BY UPDT_DT ASC /*처리일순*/
|
||||
</when>
|
||||
<when test='sortDv == "lastPrcsDtDesc"'>
|
||||
ORDER BY UPDT_DT ASC /*처리일순*/
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY SUBSVC_NM ASC, SUBSVC_GNR ASC
|
||||
</otherwise>
|
||||
</choose>
|
||||
) PV
|
||||
WHERE 1=1
|
||||
LIMIT #{recordCountPerPage} OFFSET #{firstIndex}
|
||||
</select>
|
||||
|
||||
|
||||
<!--구독서비스 구독자조회 목록-->
|
||||
<select id="selectBOSubsvcOrderMbrList" parameterType="com.wb.domainserver.domain.gcone.ordr.subsvc.vo.BOSubsvcOrderVO" resultType="dataMap">
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT CAST(@ROWNUM:=@ROWNUM + 1 AS UNSIGNED) AS RNUM
|
||||
, COUNT(*) OVER() AS TOT_CNT
|
||||
, MAIN.*
|
||||
FROM (
|
||||
WITH ORDR AS (SELECT COUNT(DISTINCT GO.ORDR_INNB) AS SUBSCRIBER_CNT
|
||||
, MAX(GOIO.UPDT_DT) AS LAST_PRCS_DT
|
||||
, GO.SOPMAL_CD
|
||||
, GO.SUBSVC_INNB
|
||||
FROM GC_ORDER GO
|
||||
JOIN GC_ORDER_ITEM GOI ON GOI.SOPMAL_CD = GO.SOPMAL_CD AND GOI.ORDR_INNB = GO.ORDR_INNB
|
||||
JOIN GC_ORDER_ITEM_OPTION GOIO ON GOIO.SOPMAL_CD = GOI.SOPMAL_CD AND GOIO.ORDR_GOODS_INNB AND GOI.ORDR_GOODS_INNB
|
||||
WHERE GO.SUBSVC_AT = 'Y'
|
||||
AND GO.USE_AT = 'Y'
|
||||
GROUP BY GO.SOPMAL_CD, GO.SUBSVC_INNB)
|
||||
SELECT GS.SUBSVC_INNB
|
||||
, GS.SUBSVC_NM /*구독서비스명*/
|
||||
, GS.SUBSVC_GNR /*구독서비스명 기수*/
|
||||
, GS.SUBSVC_GNR_NM /*구독서비스명 기수명*/
|
||||
, GS.SUBSVC_CT + (GS.TME_DLVY_AMT * GS.DLVY_CNT) as SELPRIC /*실판매가=구독료+(1회배송비X배송횟수)*/
|
||||
, GS.DLVY_CNT /*배송횟수*/
|
||||
, IFNULL(GS.LAST_PROCS_ODR, 0) AS LAST_PROCS_ODR /*최종차수*/
|
||||
, IFNULL(ORDR.SUBSCRIBER_CNT, 0) AS SUBSCRIBER_CNT /*구독자수*/
|
||||
, ORDR.LAST_PRCS_DT
|
||||
FROM GC_SUBSVC GS
|
||||
LEFT JOIN ORDR ON ORDR.SOPMAL_CD = GS.SOPMAL_CD AND ORDR.SUBSVC_INNB = GS.SUBSVC_INNB
|
||||
WHERE GS.USE_AT = 'Y'
|
||||
AND GS.SOPMAL_CD = #{sopmalCd}
|
||||
<if test='srchSelSubsvcNm != null and srchSelSubsvcNm != ""'>
|
||||
AND GS.SUBSVC_NM = #{srchSelSubsvcNm} /*구독서비스 명*/
|
||||
</if>
|
||||
<if test='srchSelSubsvcGnr != null and srchSelSubsvcGnr != ""'>
|
||||
AND GS.SUBSVC_GNR = #{srchSelSubsvcGnr} /*기수*/
|
||||
</if>
|
||||
<if test='srchSubsvcNm != null and srchSubsvcNm != ""'>
|
||||
AND GS.SUBSVC_NM LIKE CONCAT('%',#{srchSubsvcNm},'%') /*구독서비스 명*/
|
||||
</if>
|
||||
<if test='srchSubsvcGnrNm != null and srchSubsvcGnrNm != ""'>
|
||||
AND GS.SUBSVC_GNR_NM LIKE CONCAT('%',#{srchSubsvcGnrNm},'%') /*기수명*/
|
||||
</if>
|
||||
<if test='srchSubEndAt == "Y"'>
|
||||
<![CDATA[
|
||||
AND (GS.LAST_PROCS_ODR IS NULL OR GS.LAST_PROCS_ODR < DLVY_CNT) /*구독종료여부*/
|
||||
]]>
|
||||
</if>
|
||||
<choose>
|
||||
<when test='sortDv == "subsvcGnrAsc"'>
|
||||
ORDER BY SUBSVC_NM ASC, SUBSVC_GNR ASC /*구독서비스명+기수*/
|
||||
</when>
|
||||
<when test='sortDv == "subsvcGnrDesc"'>
|
||||
ORDER BY SUBSVC_NM DESC, SUBSVC_GNR DESC /*구독서비스명+기수*/
|
||||
</when>
|
||||
<when test='sortDv == "subscriberAsc"'>
|
||||
ORDER BY SUBSCRIBER_CNT ASC /*구독자수 정렬*/
|
||||
</when>
|
||||
<when test='sortDv == "subscriberDesc"'>
|
||||
ORDER BY SUBSCRIBER_CNT DESC /*구독자수 정렬*/
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY SUBSVC_NM ASC, SUBSVC_GNR ASC
|
||||
</otherwise>
|
||||
</choose>
|
||||
) MAIN
|
||||
WHERE (@ROWNUM:=0)=0
|
||||
) PV
|
||||
WHERE 1=1
|
||||
LIMIT #{recordCountPerPage} OFFSET #{firstIndex}
|
||||
</select>
|
||||
|
||||
<!--구독서비스 구독자조회 - 구독자목록 팝업 - 구독서비스 정보-->
|
||||
<select id="selectBOSubsvcInfo" parameterType="com.wb.domainserver.domain.gcone.ordr.subsvc.vo.BOSubsvcOrderVO" resultType="dataMap">
|
||||
SELECT GS.SUBSVC_NM, GS.SUBSVC_GNR, GS.SUBSVC_GNR_NM
|
||||
FROM GC_SUBSVC GS
|
||||
WHERE GS.SUBSVC_INNB = #{subsvcInnb}
|
||||
</select>
|
||||
|
||||
<!--구독서비스 구독자조회 - 구독자목록 팝업 - 구독자목록 조회-->
|
||||
<select id="selectBOSubsvcOrderMbrInfoList" parameterType="com.wb.domainserver.domain.gcone.ordr.subsvc.vo.BOSubsvcOrderVO" resultType="dataMap">
|
||||
SELECT CAST(@ROWNUM:=@ROWNUM + 1 AS UNSIGNED) AS RNUM
|
||||
, COUNT(*) OVER() AS TOT_CNT
|
||||
, MAIN.*
|
||||
FROM (
|
||||
SELECT GO.ORDR_INNB
|
||||
, GM.MBR_NM
|
||||
, GM.MBR_ID
|
||||
, GM.MBR_DV_CD
|
||||
, fn_get_member_grad_name(GO.SOPMAL_CD, GM.MBR_DV_CD, GM.MBR_INNB) AS GRADE
|
||||
, SUM(CASE WHEN GOIO.ORDR_STTUS_CD BETWEEN '35' AND '75' THEN 1 ELSE 0 END) AS LAST_PROCS_ODR/*최종차수 상품준비 ~ 배송완료*/
|
||||
, MAX(GOIO.UPDT_DT) AS LAST_PRCS_DT/*최종처리일*/
|
||||
FROM GC_ORDER GO
|
||||
JOIN GC_MEMBER GM ON GM.MBR_DV_CD = GO.MBR_DV_CD AND GM.MBR_INNB = GO.MBR_INNB
|
||||
JOIN GC_ORDER_ITEM GOI ON GO.SOPMAL_CD =GOI.SOPMAL_CD AND GO.ORDR_INNB = GOI.ORDR_INNB
|
||||
JOIN GC_ORDER_ITEM_OPTION GOIO ON GOI.SOPMAL_CD = GOIO.SOPMAL_CD AND GOI.ORDR_GOODS_INNB = GOIO.ORDR_GOODS_INNB AND GOIO.OPTN_TY = '01'
|
||||
WHERE GO.USE_AT = 'Y'
|
||||
AND GO.SUBSVC_AT = 'Y'
|
||||
AND GO.SUBSVC_INNB = #{subsvcInnb} /*구독서비스 고유번호*/
|
||||
GROUP BY GO.SOPMAL_CD, GO.ORDR_INNB, GM.MBR_DV_CD, GM.MBR_NM, GM.MBR_ID
|
||||
ORDER BY GO.ORDR_INNB ASC
|
||||
)MAIN
|
||||
WHERE (@ROWNUM:=0)=0
|
||||
</select>
|
||||
|
||||
<!--구독서비스 구독자조회 - 배송상품 목록팝업 - 배송상품목록 조회-->
|
||||
<select id="selectBOSubsvcOrderGoodsInfoList" parameterType="com.wb.domainserver.domain.gcone.ordr.subsvc.vo.BOSubsvcOrderVO" resultType="dataMap">
|
||||
SELECT CAST(@ROWNUM:=@ROWNUM + 1 AS UNSIGNED) AS RNUM
|
||||
, COUNT(*) OVER() AS TOT_CNT
|
||||
, MAIN.*
|
||||
FROM (
|
||||
SELECT GOIO.GOODS_OPTN_INNB
|
||||
, GOI.GOODS_IMG_COURS
|
||||
, GOI.GOODS_NM
|
||||
, GOIO.OPTN_NM_1
|
||||
, GOIO.OPTN_VAL_1
|
||||
, COUNT(DISTINCT GO.ORDR_INNB) AS APPLY_CNT/*적용횟수*/
|
||||
FROM GC_ORDER GO
|
||||
JOIN GC_ORDER_ITEM GOI ON GO.SOPMAL_CD =GOI.SOPMAL_CD AND GO.ORDR_INNB = GOI.ORDR_INNB
|
||||
JOIN GC_ORDER_ITEM_OPTION GOIO ON GOI.SOPMAL_CD = GOIO.SOPMAL_CD AND GOI.ORDR_GOODS_INNB = GOIO.ORDR_GOODS_INNB AND GOIO.OPTN_TY = '01'
|
||||
WHERE GO.USE_AT = 'Y'
|
||||
AND GO.SUBSVC_AT = 'Y'
|
||||
AND GOIO.ORDR_STTUS_CD BETWEEN '35' AND '75' /*상품준비 ~ 배송완료*/
|
||||
AND GO.SUBSVC_INNB = #{subsvcInnb} /*구독서비스 고유번호*/
|
||||
GROUP BY GOIO.GOODS_OPTN_INNB, GOODS_IMG_COURS, GOI.GOODS_NM, GOIO.OPTN_NM_1, GOIO.OPTN_VAL_1
|
||||
ORDER BY GOI.GOODS_NM, GOIO.OPTN_NM_1, GOIO.OPTN_VAL_1
|
||||
) MAIN
|
||||
WHERE (@ROWNUM:=0)=0
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
||||
@@ -129,6 +129,19 @@
|
||||
,RETURN_DLVY_APPLC_AT
|
||||
,RETURN_DLVY_AMT
|
||||
,EXCHNG_DLVY_AMT
|
||||
,RTNLC_INNB2
|
||||
,DFT_DLVY_AMT2
|
||||
,AMT_CND_USE_AT2
|
||||
,AMT_CND_ADIT_AMT2
|
||||
,CNT_CND_USE_AT2
|
||||
,CNT_CND_ADIT_AMT2
|
||||
,DLVY_AREA_ADIT_AT2
|
||||
,AREA_ADIT_DLVY_AMT2
|
||||
,BUNDLE_DLVY_USE_AT2
|
||||
,BUNDLE_DLVY_CND_AMT2
|
||||
,RETURN_DLVY_APPLC_AT2
|
||||
,RETURN_DLVY_AMT2
|
||||
,EXCHNG_DLVY_AMT2
|
||||
,USE_AT
|
||||
,REGUSR
|
||||
,REGIST_DT
|
||||
@@ -154,6 +167,19 @@
|
||||
,#{returnDlvyApplcAt}
|
||||
,#{returnDlvyAmt}
|
||||
,#{exchngDlvyAmt}
|
||||
,#{rtnlcInnb2}
|
||||
,#{dftDlvyAmt2}
|
||||
,#{amtCndUseAt2}
|
||||
,#{amtCndAditAmt2}
|
||||
,#{cntCndUseAt2}
|
||||
,#{cntCndAditAmt2}
|
||||
,#{dlvyAreaAditAt2}
|
||||
,#{areaAditDlvyAmt2}
|
||||
,#{bundleDlvyUseAt2}
|
||||
,#{bundleDlvyCndAmt2}
|
||||
,#{returnDlvyApplcAt2}
|
||||
,#{returnDlvyAmt2}
|
||||
,#{exchngDlvyAmt2}
|
||||
,'Y'
|
||||
,#{regusr}
|
||||
,now()
|
||||
@@ -200,12 +226,50 @@
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 배송 반송지 등록 -->
|
||||
<insert id="insertBODlvyGroupAddress2" parameterType="com.wb.domainserver.domain.gcone.setup.dlvygrp.vo.BODlvygrpVO">
|
||||
<selectKey keyProperty="rtnlcInnb2"
|
||||
resultType="java.lang.Integer"
|
||||
order="BEFORE">
|
||||
SELECT IFNULL(MAX(RTNLC_INNB),0) + 1 FROM GC_SHIPPING_ADDRESS WHERE SOPMAL_CD = #{sopmalCd}
|
||||
</selectKey>
|
||||
INSERT INTO GC_SHIPPING_ADDRESS
|
||||
(
|
||||
RTNLC_INNB
|
||||
, SOPMAL_CD
|
||||
, RTNLC_ZIP
|
||||
, RTNLC_ADRES
|
||||
, RTNLC_DTL_ADRES
|
||||
, RTNLC_TELNB
|
||||
, USE_AT
|
||||
, REGUSR
|
||||
, REGIST_DT
|
||||
, UPDUSR
|
||||
, UPDT_DT
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
#{rtnlcInnb2}
|
||||
, #{sopmalCd}
|
||||
, #{rtnlcZip2}
|
||||
, #{rtnlcAdres2}
|
||||
, #{rtnlcDtlAdres2}
|
||||
, #{rtnlcTelnb2}
|
||||
, 'Y'
|
||||
, #{regusr}
|
||||
, now()
|
||||
, #{regusr}
|
||||
, now()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 배송그룹 정보 조회 -->
|
||||
<select id="selectBODlvyGroupDtlForm"
|
||||
parameterType="com.wb.domainserver.domain.gcone.setup.dlvygrp.vo.BODlvygrpVO"
|
||||
resultType="com.wb.domainserver.domain.gcone.setup.dlvygrp.vo.BODlvygrpVO">
|
||||
SELECT
|
||||
SG.DLVY_GROUP_INNB
|
||||
,SG.SOPMAL_CD
|
||||
,SG.DLVY_GROUP_DV_CD
|
||||
,SG.DLVY_GROUP_NM
|
||||
,SG.DFT_DLVY_AMT
|
||||
@@ -220,19 +284,41 @@
|
||||
,SG.RETURN_DLVY_APPLC_AT
|
||||
,SG.RETURN_DLVY_AMT
|
||||
,SG.EXCHNG_DLVY_AMT
|
||||
,SG.DFT_DLVY_AMT2
|
||||
,SG.AMT_CND_USE_AT2
|
||||
,SG.AMT_CND_ADIT_AMT2
|
||||
,SG.CNT_CND_USE_AT2
|
||||
,SG.CNT_CND_ADIT_AMT2
|
||||
,SG.DLVY_AREA_ADIT_AT2
|
||||
,SG.AREA_ADIT_DLVY_AMT2
|
||||
,SG.BUNDLE_DLVY_USE_AT2
|
||||
,SG.BUNDLE_DLVY_CND_AMT2
|
||||
,SG.RETURN_DLVY_APPLC_AT2
|
||||
,SG.RETURN_DLVY_AMT2
|
||||
,SG.EXCHNG_DLVY_AMT2
|
||||
,SG.RTNLC_INNB
|
||||
,SA.RTNLC_ZIP
|
||||
,SA.RTNLC_ADRES
|
||||
,SA.RTNLC_DTL_ADRES
|
||||
,SA.RTNLC_TELNB
|
||||
,SG.RTNLC_INNB2
|
||||
,SA1.RTNLC_ZIP
|
||||
,SA1.RTNLC_ADRES
|
||||
,SA1.RTNLC_DTL_ADRES
|
||||
,SA1.RTNLC_TELNB
|
||||
,SA2.RTNLC_ZIP AS RTNLC_ZIP2
|
||||
,SA2.RTNLC_ADRES AS RTNLC_ADRES2
|
||||
,SA2.RTNLC_DTL_ADRES AS RTNLC_DTL_ADRES2
|
||||
,SA2.RTNLC_TELNB AS RTNLC_TELNB2
|
||||
,SG.RETURN_DLVY_AMT
|
||||
,SG.EXCHNG_DLVY_AMT
|
||||
FROM GC_SHIPPING_GROUPING SG
|
||||
LEFT JOIN GC_SHIPPING_ADDRESS SA
|
||||
ON SG.RTNLC_INNB = SA.RTNLC_INNB
|
||||
AND SG.SOPMAL_CD = SA.SOPMAL_CD
|
||||
AND SG.USE_AT = 'Y'
|
||||
AND SA.USE_AT = 'Y'
|
||||
LEFT JOIN GC_SHIPPING_ADDRESS SA1
|
||||
ON SG.RTNLC_INNB = SA1.RTNLC_INNB
|
||||
AND SG.SOPMAL_CD = SA1.SOPMAL_CD
|
||||
AND SG.USE_AT = 'Y'
|
||||
AND SA1.USE_AT = 'Y'
|
||||
LEFT JOIN GC_SHIPPING_ADDRESS SA2
|
||||
ON SG.RTNLC_INNB2 = SA2.RTNLC_INNB
|
||||
AND SG.SOPMAL_CD = SA2.SOPMAL_CD
|
||||
AND SG.USE_AT = 'Y'
|
||||
AND SA2.USE_AT = 'Y'
|
||||
WHERE 1=1
|
||||
AND SG.SOPMAL_CD = #{sopmalCd}
|
||||
AND DLVY_GROUP_INNB = #{dlvyGroupInnb}
|
||||
@@ -257,6 +343,18 @@
|
||||
,RETURN_DLVY_APPLC_AT = #{returnDlvyApplcAt}
|
||||
,RETURN_DLVY_AMT = #{returnDlvyAmt}
|
||||
,EXCHNG_DLVY_AMT = #{exchngDlvyAmt}
|
||||
,DFT_DLVY_AMT2 = #{dftDlvyAmt2}
|
||||
,AMT_CND_USE_AT2 = #{amtCndUseAt2}
|
||||
,AMT_CND_ADIT_AMT2 = #{amtCndAditAmt2}
|
||||
,CNT_CND_USE_AT2 = #{cntCndUseAt2}
|
||||
,CNT_CND_ADIT_AMT2 = #{cntCndAditAmt2}
|
||||
,DLVY_AREA_ADIT_AT2 = #{dlvyAreaAditAt2}
|
||||
,AREA_ADIT_DLVY_AMT2 = #{areaAditDlvyAmt2}
|
||||
,BUNDLE_DLVY_USE_AT2 = #{bundleDlvyUseAt2}
|
||||
,BUNDLE_DLVY_CND_AMT2 = #{bundleDlvyCndAmt2}
|
||||
,RETURN_DLVY_APPLC_AT2 = #{returnDlvyApplcAt2}
|
||||
,RETURN_DLVY_AMT2 = #{returnDlvyAmt2}
|
||||
,EXCHNG_DLVY_AMT2 = #{exchngDlvyAmt2}
|
||||
,UPDUSR = #{updusr}
|
||||
,UPDT_DT = NOW()
|
||||
]]>
|
||||
@@ -278,11 +376,27 @@
|
||||
AND SOPMAL_CD = #{sopmalCd}
|
||||
</update>
|
||||
|
||||
<!-- 배송그룹 수정 -->
|
||||
<update id="updateBODlvyGroupRtnlc2"
|
||||
parameterType="com.wb.domainserver.domain.gcone.setup.dlvygrp.vo.BODlvygrpVO">
|
||||
UPDATE GC_SHIPPING_ADDRESS
|
||||
SET RTNLC_ZIP = #{rtnlcZip2}
|
||||
, RTNLC_ADRES = #{rtnlcAdres2}
|
||||
, RTNLC_DTL_ADRES = #{rtnlcDtlAdres2}
|
||||
, RTNLC_TELNB = #{rtnlcTelnb2}
|
||||
, UPDUSR = #{updusr}
|
||||
, UPDT_DT = NOW()
|
||||
WHERE 1=1
|
||||
AND RTNLC_INNB = #{rtnlcInnb2}
|
||||
AND SOPMAL_CD = #{sopmalCd}
|
||||
</update>
|
||||
|
||||
<!-- 배송그룹 삭제(사용여부 Update y > n) -->
|
||||
<update id="deleteBODlvyGroup" parameterType="com.wb.domainserver.domain.gcone.setup.dlvygrp.vo.BODlvygrpVO">
|
||||
<![CDATA[
|
||||
UPDATE GC_SHIPPING_GROUPING
|
||||
SET USE_AT = 'N'
|
||||
, UPDT_DT = NOW()
|
||||
]]>
|
||||
<include refid="selectDlvyKeyWhere"/>
|
||||
</update>
|
||||
@@ -291,10 +405,20 @@
|
||||
<update id="deleteBODlvyGroupRtnlc" parameterType="com.wb.domainserver.domain.gcone.setup.dlvygrp.vo.BODlvygrpVO">
|
||||
UPDATE GC_SHIPPING_ADDRESS
|
||||
SET USE_AT = 'N'
|
||||
, UPDT_DT = NOW()
|
||||
WHERE RTNLC_INNB = #{rtnlcInnb}
|
||||
AND SOPMAL_CD = #{sopmalCd}
|
||||
</update>
|
||||
|
||||
<!-- 배송그룹 삭제(사용여부 Update y > n) -->
|
||||
<update id="deleteBODlvyGroupRtnlc2" parameterType="com.wb.domainserver.domain.gcone.setup.dlvygrp.vo.BODlvygrpVO">
|
||||
UPDATE GC_SHIPPING_ADDRESS
|
||||
SET USE_AT = 'N'
|
||||
, UPDT_DT = NOW()
|
||||
WHERE RTNLC_INNB = #{rtnlcInnb2}
|
||||
AND SOPMAL_CD = #{sopmalCd}
|
||||
</update>
|
||||
|
||||
<!-- 배송그룹 고유키로 연결 상품의 갯수 검색 -->
|
||||
<select id="isIncludeGoods"
|
||||
parameterType="com.wb.domainserver.domain.gcone.setup.dlvygrp.vo.BODlvygrpVO"
|
||||
|
||||
@@ -25,6 +25,14 @@ secured:
|
||||
- /**/fonts/**
|
||||
- /favicon.ico
|
||||
- /**/vender/**
|
||||
batch:
|
||||
accessip:
|
||||
- 127.0.0.1
|
||||
- 10.2.1.76
|
||||
- 115.68.232.36
|
||||
uri:
|
||||
- /gcone/mbr/mbr/selectBOJoinGuidanceForm # 셈플로 넣음 사용하는 uri 설정해야함
|
||||
|
||||
|
||||
|
||||
#secured:
|
||||
|
||||
@@ -105,6 +105,7 @@ const fn_move_dlvylc_manage_full = function (pageIndex, callback, formId = '') {
|
||||
배송지 등록 팝업 호출
|
||||
***********************************************/
|
||||
const fn_move_dlvylc_regpage_pop = function (isPop, dftDlvylcAt) {
|
||||
$("#dlvylcUpdate").remove();
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '/sopmal/mpage/mbr/selectDlvylcRegistForm',
|
||||
@@ -369,8 +370,90 @@ const fn_update_dlvylc = function (pageIndex,msg,isMobile) {
|
||||
jibunAddress: $(".lnbAdres").eq(index).val(),
|
||||
recpntNm: $(".recpntNmR").eq(index).val(),
|
||||
dtlAdres: $(".dtlAdres").eq(index).val(),
|
||||
dlvylcAreaCd: $(".dlvylcAreaCd").eq(index).val(),
|
||||
prefcd: $(".prefcd").eq(index).val(),
|
||||
cstmclerCd: $(".cstmclerCd").eq(index).val(),
|
||||
mbtlnb: $(".mbtlnb").eq(index).val(),
|
||||
extraAddress: extraAddress
|
||||
}, formId);
|
||||
fn_close_modal("dlvylcManage");
|
||||
}
|
||||
|
||||
/**********************************************
|
||||
배송지 관리 팝업 언어 설정
|
||||
***********************************************/
|
||||
const fn_toggle_langHeader = function () {
|
||||
var id = $('[name=dlvylcAreaCd]:checked').attr('id');
|
||||
|
||||
$('.langKr, .langJp').hide();
|
||||
$('.' + id).show();
|
||||
|
||||
if (id == 'langJp') {
|
||||
$('#zip').prop('readonly', false);
|
||||
$('#cstmclerCd').prop('disabled', true);
|
||||
$('#prefcode').prop('disabled', false);
|
||||
} else {
|
||||
$('#zip').prop('readonly', true);
|
||||
$('#cstmclerCd').prop('disabled', false);
|
||||
$('#prefcode').prop('disabled', true);
|
||||
|
||||
$('#postcodeAlert').hide();
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************
|
||||
ibsnet api 호출
|
||||
***********************************************/
|
||||
const fn_select_postcodeJp = function () {
|
||||
$('#postcodeAlert').hide();
|
||||
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: 'https://zipcloud.ibsnet.co.jp/api/search?zipcode=' + $('#zip').val(),
|
||||
dataType: 'jsonp',
|
||||
success: function(data) {
|
||||
if(data.status == 200) {
|
||||
let result = data.results[0];
|
||||
|
||||
let adres = result.address1;
|
||||
let dtlAdres = [result.address2, result.address3].join(" ");
|
||||
let prefcode = result.prefcode;
|
||||
|
||||
$("#adres").val(adres);
|
||||
$("#dtlAdres").val(dtlAdres);
|
||||
$("#prefcode").val(prefcode);
|
||||
$("#adresDv").val("01");
|
||||
} else {
|
||||
$('#postcodeAlert').show();
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error('API 호출 실패:', error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**********************************************
|
||||
배송지 관리 팝업 언어별 form 초기화
|
||||
***********************************************/
|
||||
let dlvylcFormPreValues = {};
|
||||
const fn_clear_dlvylcForm = function () {
|
||||
const tableInputs = $("#dlvylcFormTable").find("input[name]");
|
||||
|
||||
if (Object.keys(dlvylcFormPreValues).length == 0) {
|
||||
tableInputs.each(function () {
|
||||
const input = $(this);
|
||||
const name = input.attr("name");
|
||||
dlvylcFormPreValues[name] = input.val();
|
||||
input.val("");
|
||||
});
|
||||
} else {
|
||||
tableInputs.each(function () {
|
||||
const input = $(this);
|
||||
const name = input.attr("name");
|
||||
const currentValue = input.val();
|
||||
input.val(dlvylcFormPreValues[name] ?? "");
|
||||
dlvylcFormPreValues[name] = currentValue;
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1914,3 +1914,29 @@ function history_add(serializeData){
|
||||
window.history.replaceState({}, '', currentUrl.toString());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 주문번호를 받아 새창에 주문상세화면 호출
|
||||
*/
|
||||
const fn_comm_go_ordr_dtl = function(ordrInnb) {
|
||||
// form 생성
|
||||
var form = document.createElement('form');
|
||||
form.method = 'POST';
|
||||
form.action = '/mngr/ordr/ordrmngr/selectOrdrDtlInqire';
|
||||
form.target = '_blank'; // 새 창
|
||||
|
||||
// 파라미터 input 생성
|
||||
var input = document.createElement('input');
|
||||
input.type = 'hidden';
|
||||
input.name = 'ordrInnb';
|
||||
input.value = ordrInnb;
|
||||
|
||||
form.appendChild(input);
|
||||
|
||||
// body에 form 추가 후 submit
|
||||
document.body.appendChild(form);
|
||||
form.submit();
|
||||
|
||||
// submit 후 form 제거 (메모리 관리)
|
||||
document.body.removeChild(form);
|
||||
}
|
||||
|
||||
@@ -119,6 +119,7 @@ const fn_move_dlvylc_manage_pop_wrapper = function (pageIndex) {
|
||||
배송지 등록 팝업 호출 ok
|
||||
***********************************************/
|
||||
const fn_move_dlvylc_regpage_pop = function (isPop, mbrInnb, mbrDvCd, dftDlvylcAt) {
|
||||
$("#dlvylcUpdate").remove();
|
||||
if (!mbrInnb) {
|
||||
mbrInnb = $("#leftMbrInnb").val();
|
||||
}
|
||||
@@ -318,8 +319,91 @@ const fn_select_mngrOrdr_postcode = function (callback, index, formId = '') {
|
||||
jibunAddress: $(".lnbAdres").eq(index).val(),
|
||||
recpntNm: $(".recpntNmR").eq(index).val(),
|
||||
dtlAdres: $(".dtlAdres").eq(index).val(),
|
||||
dlvylcAreaCd: $(".dlvylcAreaCd").eq(index).val(),
|
||||
prefcd: $(".prefcd").eq(index).val(),
|
||||
cstmclerCd: $(".cstmclerCd").eq(index).val(),
|
||||
mbtlnb: $(".dlvylcMbtlnb").eq(index).val(),
|
||||
extraAddress: extraAddress
|
||||
}, formId);
|
||||
fn_close_modal("dlvylcManage");
|
||||
}
|
||||
|
||||
/**********************************************
|
||||
배송지 관리 팝업 언어 설정
|
||||
***********************************************/
|
||||
const fn_toggle_langHeader = function () {
|
||||
var id = $('[name=dlvylcAreaCd]:checked').attr('id');
|
||||
|
||||
$('.langKr, .langJp').hide();
|
||||
$('.' + id).show();
|
||||
|
||||
if (id == 'langJp') {
|
||||
$('#zip').prop('readonly', false);
|
||||
$('#cstmclerCd').prop('disabled', true);
|
||||
$('#prefcode').prop('disabled', false);
|
||||
} else {
|
||||
$('#zip').prop('readonly', true);
|
||||
$('#cstmclerCd').prop('disabled', false);
|
||||
$('#prefcode').prop('disabled', true);
|
||||
|
||||
$('#postcodeAlert').hide();
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************
|
||||
ibsnet api 호출
|
||||
***********************************************/
|
||||
const fn_select_postcodeJp = function () {
|
||||
$('#postcodeAlert').hide();
|
||||
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: 'https://zipcloud.ibsnet.co.jp/api/search?zipcode=' + $('#zip').val()
|
||||
+'&callback=' + 'fn_set_postcodeJp',
|
||||
dataType: 'jsonp',
|
||||
success: function(data) {
|
||||
if(data.status == 200) {
|
||||
let result = data.results[0];
|
||||
|
||||
let adres = result.address1;
|
||||
let dtlAdres = [result.address2, result.address3].join(" ");
|
||||
let prefcode = result.prefcode;
|
||||
|
||||
$("#adres").val(adres);
|
||||
$("#dtlAdres").val(dtlAdres);
|
||||
$("#prefcode").val(prefcode);
|
||||
$("#adresDv").val("01");
|
||||
} else {
|
||||
$('#postcodeAlert').show();
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error('API 호출 실패:', error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**********************************************
|
||||
배송지 관리 팝업 언어별 form 초기화
|
||||
***********************************************/
|
||||
let dlvylcFormPreValues = {};
|
||||
const fn_clear_dlvylcForm = function () {
|
||||
const tableInputs = $("#dlvylcFormTable").find("input[name]");
|
||||
|
||||
if (Object.keys(dlvylcFormPreValues).length == 0) {
|
||||
tableInputs.each(function () {
|
||||
const input = $(this);
|
||||
const name = input.attr("name");
|
||||
dlvylcFormPreValues[name] = input.val();
|
||||
input.val("");
|
||||
});
|
||||
} else {
|
||||
tableInputs.each(function () {
|
||||
const input = $(this);
|
||||
const name = input.attr("name");
|
||||
const currentValue = input.val();
|
||||
input.val(dlvylcFormPreValues[name] ?? "");
|
||||
dlvylcFormPreValues[name] = currentValue;
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -10,109 +10,83 @@
|
||||
addFilesObj(event, mode,"fileList");
|
||||
}
|
||||
|
||||
function addFilesObj(event, mode, objId, represntAt){
|
||||
function addFilesObj(event, mode, objId){
|
||||
if(!($(event.target).is('[multiple]'))) filesTempArr.splice(0, filesTempArr.length);
|
||||
|
||||
var files = event.target.files; //선택한 파일들
|
||||
var files = event.target.files;
|
||||
var filesArr = Array.prototype.slice.call(files); //file객체 array추가
|
||||
var filesArrLen = filesArr.length;
|
||||
var filesTempArrSize = filesTempArr.length*1;
|
||||
|
||||
let obj = $('#'+objId);
|
||||
if((mode === 1 && filesArrLen>1) || (mode === 1 && obj.find('li').length>0)){
|
||||
|
||||
if(mode === 1 && obj.find('li').length>0){
|
||||
alert("파일은 한개만 첨부할 수 있습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
var templist = '';
|
||||
for(var i=0; i<filesArrLen; i++){
|
||||
if(i === filesArrLen-1){ //게시판 대표이미지 배열 첫번째로 이동
|
||||
if(represntAt === 'Y'){
|
||||
filesTempArr.unshift(filesArr[i]); //임시배열에 저장
|
||||
}else{
|
||||
filesTempArr.push(filesArr[i]); //임시배열에 저장
|
||||
}
|
||||
}else{
|
||||
filesTempArr.push(filesArr[i]); //임시배열에 저장
|
||||
}
|
||||
filesTempArr.push(filesArr[i]); //임시배열에 저장
|
||||
|
||||
if($(event.target).is('[multiple]')){
|
||||
//templist = "<div id='temp"+(i+filesTempArrSize)+"'><a href='#' onclick='downloadFile(this, "+(i+filesTempArrSize)+");'>"+ filesArr[i].name + "</a><span style='color:red;' onclick='deleteFile(this, event, "+(i+filesTempArrSize)+");'> [X]</span></div>";
|
||||
let fileSize = (filesArr[i].size / 1024).toFixed(2);
|
||||
if(objId=='fileList'){
|
||||
templist ="<li id='temp"+(i+filesTempArrSize)+"'>"
|
||||
+"<a href='#' onclick='downloadFile(this, "+(i+filesTempArrSize)+");'>"
|
||||
+ "<i class='icon icon_file-list mr-2'></i>"
|
||||
+ "<span class='file-list__item-title'>"+ filesArr[i].name + "</span>"
|
||||
+"</a>"
|
||||
+"<button type='button' class='file-list__delete' onclick='deleteFile(this,0,0, "+(i+filesTempArrSize)+");'/>"
|
||||
+"</li>";
|
||||
}else {
|
||||
templist = "<li class = 'uploadList__item' id='temp" + (i + filesTempArrSize) + "'>"
|
||||
+ "<p class = 'uploadList__itemText'>"
|
||||
+ "<span class = 'uploadList__itemName'/> "+ filesArr[i].name + "</span>"
|
||||
+ "<span class ='uploadList__itemSize'>("+ fileSize + " KB)</span>"
|
||||
+ "</p>"
|
||||
+ "<input type = 'hidden' value = '"+ fileSize + "' class = 'filsSize'/>"
|
||||
+ "<button class='uploadList__removeBtn' type='button' onclick='deleteFile(this,0,0," + (i+filesTempArrSize) + ",\"" + objId + "\"); fn_sum_file_size();'/>"
|
||||
+ "<span class ='visually-hidden'>삭제</span>"
|
||||
+ "</button>"
|
||||
+ "</li>"
|
||||
}
|
||||
templist ="<li id='temp"+(i+filesTempArrSize)+"'>"
|
||||
+"<a href='#' onclick='downloadFile(this, "+(i+filesTempArrSize)+");'>"
|
||||
+ "<i class='icon icon_file-list mr-2'></i>"
|
||||
+ "<span class='file-list__item-title'>"+ filesArr[i].name + "</span>"
|
||||
+"</a>"
|
||||
+"<button type='button' class='file-list__delete' onclick='deleteFile(this,0,0, "+(i+filesTempArrSize)+");'/>"
|
||||
+"</li>";
|
||||
|
||||
obj.append(templist);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//파일삭제
|
||||
//callbackNm ajax 파일 처리 성공시 실행 할 콜백함수
|
||||
function deleteFile(obj, shopCd, menuGb, orderParam,callbackNm,callbackParam) {
|
||||
deleteFiles(obj, shopCd, menuGb, orderParam, 'fileUpload',callbackNm,callbackParam);
|
||||
}
|
||||
|
||||
//파일삭제
|
||||
function deleteFiles(obj, shopCd, menuGb, orderParam, objId, callbackNm,callbackParam) {
|
||||
filesTempArr.splice(orderParam, 1);
|
||||
var $div = $(obj).closest('li');
|
||||
var $id = $div.attr('id');
|
||||
var obj = "#" + objId;
|
||||
if ($id.indexOf('temp') == 0) { //임시등록파일은 화면에서 삭제
|
||||
$div.remove();
|
||||
$(obj).val('');
|
||||
} else { //업로드된 파일은 서버삭제
|
||||
if (confirm("파일을 삭제하시겠습니까?")) {
|
||||
ajaxFileDelete($div, $id, shopCd, menuGb, orderParam,callbackNm,callbackParam);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//파일삭제(html 요소 조작 없이 단순 파일 삭제)
|
||||
function dropzoneDeleteFiles(fileId, shopCd, menuGb, orderParam,callbackNm,callbackParam) {
|
||||
//드롭존 파일삭제(html 요소 조작 없이 단순 파일 삭제)
|
||||
function dropzoneDeleteFiles(fileId, shopCd, menuGb, orderParam, callbackNm) {
|
||||
if (fileId.indexOf('temp') != 0) { //임시등록파일은 화면에서 삭제
|
||||
if (confirm("파일을 삭제하시겠습니까?")) {
|
||||
ajaxFileDelete('', fileId, shopCd, menuGb, orderParam, callbackNm,callbackParam);
|
||||
ajaxFileDelete('', fileId, shopCd, menuGb, orderParam, callbackNm);
|
||||
return "Y";
|
||||
}else{
|
||||
} else {
|
||||
return "N";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var ajaxFileDelete = function (obj, fileId, shopCd, menuGb, orderParam, callbackNm,callbackParam) {
|
||||
//파일삭제
|
||||
function deleteFile (obj, shopCd, menuGb, orderParam){
|
||||
deleteFiles (obj, shopCd, menuGb, orderParam, '#fileUpload');
|
||||
}
|
||||
|
||||
//파일삭제
|
||||
function deleteFiles (obj, shopCd, menuGb, orderParam, objNm){
|
||||
filesTempArr.splice(orderParam, 1);
|
||||
var $div = $(obj).closest('li');
|
||||
var $id = $div.attr('id');
|
||||
|
||||
if($id.indexOf('temp') == 0) { //임시등록파일은 화면에서 삭제
|
||||
$div.remove(); $(objNm).val('');
|
||||
}else{ //업로드된 파일은 서버삭제
|
||||
if(confirm("파일을 삭제하시겠습니까?")){
|
||||
ajaxFileDelete($div,$id,shopCd, menuGb,orderParam);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var ajaxFileDelete = function(obj,fileId,shopCd, menuGb,orderParam){
|
||||
$.ajax({
|
||||
//url: '/file/deleteUploadedFile/'+shopCd+'/'+menuGb+'/'+fileId+'/ajax',
|
||||
url: '/file/deleteUploadedFile?sopCd=' + shopCd + '&menuGb=' + menuGb + '&fileKey=' + fileId,
|
||||
data: fileId,
|
||||
// url: '/file/deleteUploadedFile/'+shopCd+'/'+menuGb+'/'+fileId+'/ajax',
|
||||
url: '/file/deleteUploadedFile?sopCd='+shopCd+'&menuGb='+menuGb+'&fileKey='+fileId,
|
||||
data: {fileId:fileId},
|
||||
type: 'get',
|
||||
success: function (data) {
|
||||
if (obj !== '') {
|
||||
success : function(data){
|
||||
if(obj !== ''){
|
||||
obj.remove();
|
||||
}
|
||||
if (callbackNm != null) {
|
||||
callbackNm(callbackParam);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
error: function(){
|
||||
alert("삭제에 실패하였습니다.");
|
||||
}
|
||||
});
|
||||
@@ -132,144 +106,21 @@
|
||||
}
|
||||
|
||||
//$(location).attr('href','/file/download/'+shopCd+'/'+menuGb+'/'+fileId+'/'+orgFileId+'/ajax');
|
||||
//$(location).attr('href','/file/download/'+shopCd+'/'+menuGb+'/'+fileId+'/ajax');
|
||||
//$(location).attr('href','/file/download/'+shopCd+'/'+menuGb+'/'+fileId+'/ajax');
|
||||
$(location).attr('href','/file/fileDownload?sopCd='+shopCd+'&menuGb='+menuGb+'&fileKey='+fileId);
|
||||
}
|
||||
|
||||
|
||||
//다운로드
|
||||
var linkDownloadFile = function(key,shopCd, menuGb,orderParam){ //파일글번호, 원본파일명
|
||||
var linkDownloadFile = function(key, fileName ,shopCd, menuGb,orderParam){ //파일글번호, 원본파일명
|
||||
filesTempArr.splice(orderParam, 1);
|
||||
|
||||
if(key.indexOf('temp') == 0){
|
||||
alert("등록된 파일만 다운로드 가능합니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
//$(location).attr('href','/file/download/'+shopCd+'/'+menuGb+'/'+key+'/ajax');
|
||||
$(location).attr('href','/file/fileDownload?sopCd='+shopCd+'&menuGb='+menuGb+'&fileKey='+key);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------
|
||||
// 이미지 업로드 시 이미지 미리보기 , 삭제버튼(배열에서 제거함) 기능
|
||||
//-----------------------------------------------------------
|
||||
|
||||
// let selectedFiles = []; // 선택된 파일을 저장하는 배열
|
||||
function addImgFilesView(event,objId){
|
||||
const previewContainer = document.getElementById(objId);
|
||||
const files = event.target.files; // 선택된 파일들 가져오기
|
||||
// previewContainer.innerHTML = ''; // 기존 미리보기 초기화
|
||||
// filesTempArr = []; // 기존 배열 초기화
|
||||
|
||||
// 파일 개수 제한 확인
|
||||
// const maxFiles = 3; // 최대 파일 개수 제한
|
||||
/*if (filesTempArr.length + files.length > maxFiles) {
|
||||
alert(`최대 ${maxFiles}개의 파일만 업로드할 수 있습니다.`);
|
||||
return;
|
||||
}
|
||||
Array.from(files).forEach((file) => {
|
||||
if (filesTempArr.length < maxFiles) {
|
||||
filesTempArr.push(file); // 파일 추가
|
||||
displayPreview(file, previewContainer);
|
||||
}
|
||||
});*/
|
||||
Array.from(files).forEach((file) => {
|
||||
filesTempArr.push(file); // 파일 추가
|
||||
displayPreview(file, previewContainer);
|
||||
});
|
||||
|
||||
// input 초기화 (같은 파일 재선택 가능)
|
||||
event.target.value = '';
|
||||
}
|
||||
|
||||
function displayPreview(file,obj) {
|
||||
const reader = new FileReader();
|
||||
|
||||
reader.onload = function (e) {
|
||||
// 미리보기 항목 생성
|
||||
const previewItem = document.createElement('div');
|
||||
previewItem.classList.add('preview-item');
|
||||
|
||||
// 이미지 태그 생성
|
||||
const img = document.createElement('img');
|
||||
img.src = e.target.result;
|
||||
|
||||
// 삭제 버튼 생성
|
||||
const deleteBtn = document.createElement('button');
|
||||
deleteBtn.classList.add('delete-btn');
|
||||
deleteBtn.textContent = '×';
|
||||
deleteBtn.onclick = function () {
|
||||
removeImgFile(file, previewItem);
|
||||
};
|
||||
|
||||
// 미리보기 항목에 이미지와 버튼 추가
|
||||
previewItem.appendChild(img);
|
||||
previewItem.appendChild(deleteBtn);
|
||||
obj.appendChild(previewItem);
|
||||
};
|
||||
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
|
||||
function removeImgFile(file, previewItem) {
|
||||
// 선택된 파일 배열에서 제거
|
||||
filesTempArr = filesTempArr.filter((f) => f !== file);
|
||||
|
||||
// 미리보기 항목 제거
|
||||
previewItem.remove();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
var initFileList = function($files){
|
||||
if(Array.isArray($files)){
|
||||
$.each($files, function(index, item){
|
||||
filesTempArr.push(item);
|
||||
filesTempArr[index].upload = 'disable';
|
||||
});
|
||||
}else{
|
||||
filesTempArr.push(new File([$files], $files+".txt", {
|
||||
type: "text/plain",
|
||||
}));
|
||||
filesTempArr[0].upload = 'disable';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//파일삭제(단건)
|
||||
function deleteSingleFile (obj, eventParam, orderParam){
|
||||
if(confirm('삭제하시겠습니까?')){
|
||||
filesTempArr.splice(orderParam, 1);
|
||||
var $div = $(obj).closest('div')
|
||||
var $id = $div.attr('id');
|
||||
if($id.indexOf('temp') == 0) {
|
||||
$div.remove();
|
||||
}else{
|
||||
$div.remove();
|
||||
|
||||
$('#updateFileDiv').show();
|
||||
filesTempArr = [];
|
||||
$('#imgSavedYn').val("N");
|
||||
//ajaxSingleFileDelete($id);
|
||||
}
|
||||
}
|
||||
}
|
||||
//파일삭제(단건) 후처리
|
||||
var ajaxSingleFileDelete = function(fileId){
|
||||
$.ajax({
|
||||
url: '/bo/comm/file/deleteUploadedFile/'+fileId+"/ajax",
|
||||
data: fileId,
|
||||
type: 'post',
|
||||
success : function(data){
|
||||
//찾아보기 div구역 id = updateFileDiv
|
||||
$('#updateFileDiv').show();
|
||||
filesTempArr = [];
|
||||
},
|
||||
error: function(xhr, status, error){
|
||||
alert("삭제에 실패하였습니다.");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -9112,10 +9112,10 @@ main {
|
||||
padding: 32px 32px;
|
||||
}
|
||||
.subList__list__inner {
|
||||
width: 960px;
|
||||
width: 1080px;
|
||||
margin-inline: auto;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, 1fr);
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 16px;
|
||||
}
|
||||
.subList__list__item {
|
||||
@@ -14084,7 +14084,7 @@ main {
|
||||
background-color: #ffffff;
|
||||
overflow: hidden;
|
||||
height: 44px;
|
||||
padding-right: 16px;
|
||||
padding-right: 32px;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 4px;
|
||||
text-align: right;
|
||||
|
||||
@@ -108,6 +108,7 @@ const fn_move_dlvylc_manage_pop = function (pageIndex, mbrInnb, mbrDvCd, callbac
|
||||
배송지 등록 팝업 호출 ok
|
||||
***********************************************/
|
||||
const fn_move_dlvylc_regpage_pop = function (isPop, mbrInnb, mbrDvCd, dftDlvylcAt) {
|
||||
$("#dlvylcUpdate").remove();
|
||||
if (!mbrInnb) {
|
||||
mbrInnb = $("#leftMbrInnb").val();
|
||||
}
|
||||
@@ -308,8 +309,91 @@ const fn_select_mngrOrdr_postcode = function (callback, index) {
|
||||
jibunAddress: $(".lnbAdres").eq(index).val(),
|
||||
recpntNm: $(".recpntNmR").eq(index).val(),
|
||||
dtlAdres: $(".dtlAdres").eq(index).val(),
|
||||
dlvylcAreaCd: $(".dlvylcAreaCd").eq(index).val(),
|
||||
prefcd: $(".prefcd").eq(index).val(),
|
||||
cstmclerCd: $(".cstmclerCd").eq(index).val(),
|
||||
mbtlnb: $(".dlvylcMbtlnb").eq(index).val(),
|
||||
extraAddress: extraAddress
|
||||
});
|
||||
fn_close_modal("dlvylcManage");
|
||||
}
|
||||
|
||||
/**********************************************
|
||||
배송지 관리 팝업 언어 설정
|
||||
***********************************************/
|
||||
const fn_toggle_langHeader = function () {
|
||||
var id = $('[name=dlvylcAreaCd]:checked').attr('id');
|
||||
|
||||
$('.langKr, .langJp').hide();
|
||||
$('.' + id).show();
|
||||
|
||||
if (id == 'langJp') {
|
||||
$('#zip').prop('readonly', false);
|
||||
$('#cstmclerCd').prop('disabled', true);
|
||||
$('#prefcode').prop('disabled', false);
|
||||
} else {
|
||||
$('#zip').prop('readonly', true);
|
||||
$('#cstmclerCd').prop('disabled', false);
|
||||
$('#prefcode').prop('disabled', true);
|
||||
|
||||
$('#postcodeAlert').hide();
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************
|
||||
ibsnet api 호출
|
||||
***********************************************/
|
||||
const fn_select_postcodeJp = function () {
|
||||
$('#postcodeAlert').hide();
|
||||
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: 'https://zipcloud.ibsnet.co.jp/api/search?zipcode=' + $('#zip').val()
|
||||
+'&callback=' + 'fn_set_postcodeJp',
|
||||
dataType: 'jsonp',
|
||||
success: function(data) {
|
||||
if(data.status == 200) {
|
||||
let result = data.results[0];
|
||||
|
||||
let adres = result.address1;
|
||||
let dtlAdres = [result.address2, result.address3].join(" ");
|
||||
let prefcode = result.prefcode;
|
||||
|
||||
$("#adres").val(adres);
|
||||
$("#dtlAdres").val(dtlAdres);
|
||||
$("#prefcode").val(prefcode);
|
||||
$("#adresDv").val("01");
|
||||
} else {
|
||||
$('#postcodeAlert').show();
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error('API 호출 실패:', error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**********************************************
|
||||
배송지 관리 팝업 언어별 form 초기화
|
||||
***********************************************/
|
||||
let dlvylcFormPreValues = {};
|
||||
const fn_clear_dlvylcForm = function () {
|
||||
const tableInputs = $("#dlvylcFormTable").find("input[name]");
|
||||
|
||||
if (Object.keys(dlvylcFormPreValues).length == 0) {
|
||||
tableInputs.each(function () {
|
||||
const input = $(this);
|
||||
const name = input.attr("name");
|
||||
dlvylcFormPreValues[name] = input.val();
|
||||
input.val("");
|
||||
});
|
||||
} else {
|
||||
tableInputs.each(function () {
|
||||
const input = $(this);
|
||||
const name = input.attr("name");
|
||||
const currentValue = input.val();
|
||||
input.val(dlvylcFormPreValues[name] ?? "");
|
||||
dlvylcFormPreValues[name] = currentValue;
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -119,6 +119,7 @@ const fn_move_dlvylc_manage_pop_wrapper = function (pageIndex) {
|
||||
배송지 등록 팝업 호출 ok
|
||||
***********************************************/
|
||||
const fn_move_dlvylc_regpage_pop = function (isPop, mbrInnb, mbrDvCd, dftDlvylcAt) {
|
||||
$("#dlvylcUpdate").remove();
|
||||
if (!mbrInnb) {
|
||||
mbrInnb = $("#leftMbrInnb").val();
|
||||
}
|
||||
@@ -318,8 +319,91 @@ const fn_select_mngrOrdr_postcode = function (callback, index, formId = '') {
|
||||
jibunAddress: $(".lnbAdres").eq(index).val(),
|
||||
recpntNm: $(".recpntNmR").eq(index).val(),
|
||||
dtlAdres: $(".dtlAdres").eq(index).val(),
|
||||
dlvylcAreaCd: $(".dlvylcAreaCd").eq(index).val(),
|
||||
prefcd: $(".prefcd").eq(index).val(),
|
||||
cstmclerCd: $(".cstmclerCd").eq(index).val(),
|
||||
mbtlnb: $(".dlvylcMbtlnb").eq(index).val(),
|
||||
extraAddress: extraAddress
|
||||
}, formId);
|
||||
fn_close_modal("dlvylcManage");
|
||||
}
|
||||
|
||||
/**********************************************
|
||||
배송지 관리 팝업 언어 설정
|
||||
***********************************************/
|
||||
const fn_toggle_langHeader = function () {
|
||||
var id = $('[name=dlvylcAreaCd]:checked').attr('id');
|
||||
|
||||
$('.langKr, .langJp').hide();
|
||||
$('.' + id).show();
|
||||
|
||||
if (id == 'langJp') {
|
||||
$('#zip').prop('readonly', false);
|
||||
$('#cstmclerCd').prop('disabled', true);
|
||||
$('#prefcode').prop('disabled', false);
|
||||
} else {
|
||||
$('#zip').prop('readonly', true);
|
||||
$('#cstmclerCd').prop('disabled', false);
|
||||
$('#prefcode').prop('disabled', true);
|
||||
|
||||
$('#postcodeAlert').hide();
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************
|
||||
ibsnet api 호출
|
||||
***********************************************/
|
||||
const fn_select_postcodeJp = function () {
|
||||
$('#postcodeAlert').hide();
|
||||
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: 'https://zipcloud.ibsnet.co.jp/api/search?zipcode=' + $('#zip').val()
|
||||
+'&callback=' + 'fn_set_postcodeJp',
|
||||
dataType: 'jsonp',
|
||||
success: function(data) {
|
||||
if(data.status == 200) {
|
||||
let result = data.results[0];
|
||||
|
||||
let adres = result.address1;
|
||||
let dtlAdres = [result.address2, result.address3].join(" ");
|
||||
let prefcode = result.prefcode;
|
||||
|
||||
$("#adres").val(adres);
|
||||
$("#dtlAdres").val(dtlAdres);
|
||||
$("#prefcode").val(prefcode);
|
||||
$("#adresDv").val("01");
|
||||
} else {
|
||||
$('#postcodeAlert').show();
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error('API 호출 실패:', error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**********************************************
|
||||
배송지 관리 팝업 언어별 form 초기화
|
||||
***********************************************/
|
||||
let dlvylcFormPreValues = {};
|
||||
const fn_clear_dlvylcForm = function () {
|
||||
const tableInputs = $("#dlvylcFormTable").find("input[name]");
|
||||
|
||||
if (Object.keys(dlvylcFormPreValues).length == 0) {
|
||||
tableInputs.each(function () {
|
||||
const input = $(this);
|
||||
const name = input.attr("name");
|
||||
dlvylcFormPreValues[name] = input.val();
|
||||
input.val("");
|
||||
});
|
||||
} else {
|
||||
tableInputs.each(function () {
|
||||
const input = $(this);
|
||||
const name = input.attr("name");
|
||||
const currentValue = input.val();
|
||||
input.val(dlvylcFormPreValues[name] ?? "");
|
||||
dlvylcFormPreValues[name] = currentValue;
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -9142,10 +9142,10 @@ main {
|
||||
padding: 32px 32px;
|
||||
}
|
||||
.subList__list__inner {
|
||||
width: 960px;
|
||||
width: 1080px;
|
||||
margin-inline: auto;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, 1fr);
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 16px;
|
||||
}
|
||||
.subList__list__item {
|
||||
@@ -14175,7 +14175,7 @@ main {
|
||||
background-color: #ffffff;
|
||||
overflow: hidden;
|
||||
height: 44px;
|
||||
padding-right: 16px;
|
||||
padding-right: 35px;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 4px;
|
||||
text-align: right;
|
||||
|
||||
@@ -9112,10 +9112,10 @@ main {
|
||||
padding: 32px 32px;
|
||||
}
|
||||
.subList__list__inner {
|
||||
width: 960px;
|
||||
width: 1080px;
|
||||
margin-inline: auto;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, 1fr);
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 16px;
|
||||
}
|
||||
.subList__list__item {
|
||||
@@ -14083,7 +14083,7 @@ main {
|
||||
background-color: #ffffff;
|
||||
overflow: hidden;
|
||||
height: 44px;
|
||||
padding-right: 16px;
|
||||
padding-right: 35px;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 4px;
|
||||
text-align: right;
|
||||
|
||||
@@ -24,6 +24,7 @@ since : 2023.12.19 김세엽 최초 생성
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Include.jsp" %>
|
||||
<script src="<c:url value='/js/fileupload_comm.js'/>"></script>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<spring:eval expression="@environment.getProperty('currency-unit.default')" var="curUnit"/>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
fn_init();
|
||||
@@ -80,6 +81,7 @@ since : 2023.12.19 김세엽 최초 생성
|
||||
* cd: 공통코드cd
|
||||
******************************************************** */
|
||||
const fn_add_emptyBox = function () {
|
||||
var curUnit = '${curUnit}';
|
||||
let count = $('#tableSorting').children('tr').length + 1; // tr 개수 +1
|
||||
const index = count-1;
|
||||
const mbrGradCnCdNm = $("#mbrGradCndCdNm").val(); // 회원 등급 코드
|
||||
@@ -109,7 +111,7 @@ since : 2023.12.19 김세엽 최초 생성
|
||||
</td>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text number right mm" type="text" name="mbrGradAmtArr" title="실 결제금액" value="0" maxlength="10"/>원
|
||||
<input class="input-text number right mm" type="text" name="mbrGradAmtArr" title="실 결제금액" value="0" maxlength="10"/>` + curUnit + `
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
@@ -578,7 +580,7 @@ since : 2023.12.19 김세엽 최초 생성
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text number right mm" type="text" name="mbrGradAmtArr" title="실 결제금액"
|
||||
value="<fmt:formatNumber value="${gradStdr.mbrGradAmt}" pattern="#,###" />" maxlength="10"/>원
|
||||
value="<fmt:formatNumber value="${gradStdr.mbrGradAmt}" pattern="#,###" />" maxlength="10"/>${curUnit}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
@@ -671,7 +673,7 @@ since : 2023.12.19 김세엽 최초 생성
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text number right mm" type="text" name="mbrGradAmtArr" title="실 결제금액"
|
||||
value="0" placeholder="0" maxlength="10" readonly/>원
|
||||
value="0" placeholder="0" maxlength="10" readonly/>${curUnit}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
fn_create_ckeditor('#joinGuidanceWords', sopmalCd);
|
||||
fn_create_ckeditor('#joinBnef', sopmalCd);
|
||||
fn_create_ckeditor('#joinComptWords', sopmalCd);
|
||||
fn_create_ckeditor('#subsvcGuidanceWords', sopmalCd);
|
||||
|
||||
$("#kakaoIntrlckAt-Y").on("change", function () {
|
||||
if ($(this).is(":checked")) {
|
||||
@@ -159,6 +160,24 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 환율 입력 (숫자와 소숫점. 2자리수까지 허용)
|
||||
$("#buyRate, #sellRate").on("input", function () {
|
||||
let value = $(this).val();
|
||||
value = value.replace(/[^0-9.]/g, "");
|
||||
|
||||
const dotCount = (value.match(/\./g) || []).length;
|
||||
if (dotCount > 1) {
|
||||
value = value.substring(0, value.lastIndexOf("."));
|
||||
}
|
||||
|
||||
const parts = value.split(".");
|
||||
if (parts[1] && parts[1].length > 2) {
|
||||
value = parts[0] + "." + parts[1].slice(0, 2);
|
||||
}
|
||||
|
||||
$(this).val(value);
|
||||
});
|
||||
});
|
||||
isChkd_Dup = false;
|
||||
|
||||
@@ -481,6 +500,7 @@
|
||||
regForm.find("#joinGuidanceWords").val(fn_get_editor_data('#joinGuidanceWords'));
|
||||
regForm.find("#joinBnef").val(fn_get_editor_data('#joinBnef'));
|
||||
regForm.find("#joinComptWords").val(fn_get_editor_data('#joinComptWords'));
|
||||
regForm.find("#subsvcGuidanceWords").val(fn_get_editor_data('#subsvcGuidanceWords'));
|
||||
let params = regForm.serialize();
|
||||
|
||||
if (isChkd_Dup) {
|
||||
@@ -1511,6 +1531,26 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>환율(살때) 일본 1円(엔)기준</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="input-container">
|
||||
<input type="text" class="input-text sm right number" name="buyRate" id="buyRate" title="1엔 환율(살때)">
|
||||
<span class="input-unit-text">원</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>환율(팔때) 일본 1円(엔)기준</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="input-container">
|
||||
<input type="text" class="input-text sm right number" name="sellRate" id="sellRate" title="1엔 환율(팔때)">
|
||||
<span class="input-unit-text">원</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -1956,7 +1996,17 @@
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<textarea class="textarea" id="joinComptWords" name="joinComptWords"
|
||||
title="회원가입 주요혜택" rows="2">
|
||||
title="회원가입 완료문구" rows="2">
|
||||
</textarea>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>구독서비스 안내문구</th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<textarea class="textarea" id="subsvcGuidanceWords" name="subsvcGuidanceWords"
|
||||
title="구독서비스 안내문구" rows="2">
|
||||
</textarea>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
fn_create_ckeditor('#joinGuidanceWords', sopmalCd);
|
||||
fn_create_ckeditor('#joinBnef', sopmalCd);
|
||||
fn_create_ckeditor('#joinComptWords', sopmalCd);
|
||||
fn_create_ckeditor('#subsvcGuidanceWords', sopmalCd);
|
||||
|
||||
// fn_get_join_info();
|
||||
|
||||
@@ -195,6 +196,24 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 환율 입력 (숫자와 소숫점. 2자리수까지 허용)
|
||||
$("#buyRate, #sellRate").on("input", function () {
|
||||
let value = $(this).val();
|
||||
value = value.replace(/[^0-9.]/g, "");
|
||||
|
||||
const dotCount = (value.match(/\./g) || []).length;
|
||||
if (dotCount > 1) {
|
||||
value = value.substring(0, value.lastIndexOf("."));
|
||||
}
|
||||
|
||||
const parts = value.split(".");
|
||||
if (parts[1] && parts[1].length > 2) {
|
||||
value = parts[0] + "." + parts[1].slice(0, 2);
|
||||
}
|
||||
|
||||
$(this).val(value);
|
||||
});
|
||||
});
|
||||
|
||||
const fn_get_join_info = function() {
|
||||
@@ -210,6 +229,7 @@
|
||||
fn_set_editor_data("#joinGuidanceWords", resultJson.joinInfo.joinGuidanceWords);
|
||||
fn_set_editor_data("#joinBnef", resultJson.joinInfo.joinBnef);
|
||||
fn_set_editor_data("#joinComptWords", resultJson.joinInfo.joinComptWords);
|
||||
fn_set_editor_data("#subsvcGuidanceWords", resultJson.joinInfo.subsvcGuidanceWords);
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -679,6 +699,7 @@
|
||||
updForm.find("#joinGuidanceWords").val(fn_get_editor_data('#joinGuidanceWords'));
|
||||
updForm.find("#joinBnef").val(fn_get_editor_data('#joinBnef'));
|
||||
updForm.find("#joinComptWords").val(fn_get_editor_data('#joinComptWords'));
|
||||
updForm.find("#subsvcGuidanceWords").val(fn_get_editor_data('#subsvcGuidanceWords'));
|
||||
let params = updForm.serialize();
|
||||
|
||||
if (fn_check_selectStplatBox() > 0) {
|
||||
@@ -1649,7 +1670,26 @@
|
||||
<input type="text" class="input-text sm right number" name="ordrAtmcPurchsDcsnPd" id="ordrAt" title="자동 구매 확정기간" maxlength="3" value="${resultMap.sopmalDetailList[0].ordrAtmcPurchsDcsnPd }" ${ordrAtmcPurchsDcsnPdDisabled }>
|
||||
<span class="input-unit-text">일</span>
|
||||
</div>
|
||||
<span class="gray-7">(출고 완료, 배송중, 배송 완료 후 해당기간 경과 시 자동 구매 확정)</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>환율(살때) 일본 1円(엔)기준</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="input-container">
|
||||
<input type="text" class="input-text sm right" name="buyRate" id="buyRate" title="1엔 환율(살때)" value="${resultMap.sopmalDetailList[0].buyRate }">
|
||||
<span class="input-unit-text">원</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>환율(팔때) 일본 1円(엔)기준</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="input-container">
|
||||
<input type="text" class="input-text sm right" name="sellRate" id="sellRate" title="1엔 환율(팔때)" value="${resultMap.sopmalDetailList[0].sellRate }">
|
||||
<span class="input-unit-text">원</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -2171,12 +2211,23 @@
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<textarea class="textarea" id="joinComptWords" name="joinComptWords"
|
||||
title="회원가입 주요혜택" rows="2">
|
||||
title="회원가입 완료문구" rows="2">
|
||||
${resultMap.sopmalDetailList[0].joinComptWords }
|
||||
</textarea>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>구독서비스 안내문구</th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<textarea class="textarea" id="subsvcGuidanceWords" name="subsvcGuidanceWords"
|
||||
title="구독서비스 안내문구" rows="2">
|
||||
${resultMap.sopmalDetailList[0].subsvcGuidanceWords }
|
||||
</textarea>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -159,38 +159,46 @@
|
||||
</div>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<span class="footer-body__text01">
|
||||
사업자명 : <c:out value="${operBsnmInfo.bsnmNm}"/>
|
||||
</span>
|
||||
<div style="background-color: mistyrose; text-align: center">
|
||||
<span class="footer-body__text01" style="color: red;">
|
||||
술은 만 20세부터, 미성년자의 음주는 법률로 금지되어 있습니다. 만 20세 미만의 분에게는 술을 판매하지 않습니다.<br>
|
||||
お酒は20歳から、未成年者の飲酒は法律で禁止されています。満20歳未満の方にはお酒を販売していません。
|
||||
</span>
|
||||
</div>
|
||||
<%-- <span class="footer-body__text01">--%>
|
||||
<%-- 사업자명 : <c:out value="${operBsnmInfo.bsnmNm}"/>--%>
|
||||
<%-- </span>--%>
|
||||
<p class="footer-body__text02">
|
||||
대표자 : <c:out value="${operBsnmInfo.reprsntvnm}"/>
|
||||
주소:
|
||||
<c:choose>
|
||||
<c:when test="${not empty operBsnmInfo.rnmAdres && not empty operBsnmInfo.lnbAdres}">
|
||||
<c:out value="${operBsnmInfo.lnbAdres}"/>
|
||||
</c:when>
|
||||
<c:when test="${empty operBsnmInfo.rnmAdres && not empty operBsnmInfo.lnbAdres}">
|
||||
<c:out value="${operBsnmInfo.lnbAdres}"/>
|
||||
</c:when>
|
||||
<c:when test="${not empty operBsnmInfo.rnmAdres && empty operBsnmInfo.lnbAdres}">
|
||||
<c:out value="${operBsnmInfo.rnmAdres}"/>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<c:out value="${operBsnmInfo.dtlAdres}"/>
|
||||
대표전화 : <c:out value="${sopmalInfo.reprsntTelnb}"/>
|
||||
대표이메일 :
|
||||
[상호명] <b><c:out value="${operBsnmInfo.bsnmNm}"/> </b>
|
||||
[주소]
|
||||
<b>
|
||||
<c:choose>
|
||||
<c:when test="${not empty operBsnmInfo.rnmAdres && not empty operBsnmInfo.lnbAdres}">
|
||||
<c:out value="${operBsnmInfo.lnbAdres}"/>
|
||||
</c:when>
|
||||
<c:when test="${empty operBsnmInfo.rnmAdres && not empty operBsnmInfo.lnbAdres}">
|
||||
<c:out value="${operBsnmInfo.lnbAdres}"/>
|
||||
</c:when>
|
||||
<c:when test="${not empty operBsnmInfo.rnmAdres && empty operBsnmInfo.lnbAdres}">
|
||||
<c:out value="${operBsnmInfo.rnmAdres}"/>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<c:out value="${operBsnmInfo.dtlAdres}"/>
|
||||
</b>
|
||||
<%-- 대표전화 : <c:out value="${sopmalInfo.reprsntTelnb}"/> --%>
|
||||
[대표이메일]
|
||||
<a href="mailto:<c:out value='${sopmalInfo.reprsntEmail}'/>">
|
||||
<c:out value="${sopmalInfo.reprsntEmail}"/>
|
||||
</a>
|
||||
<br/>
|
||||
개인정보관리책임자 : <c:out value="${operBsnmInfo.indvdlinfoPrtcRspnberNm}"/>
|
||||
사업자 등록번호: <c:out value="${operBsnmInfo.bizrnb}"/>
|
||||
<a href="javascript:;" onclick="window.open('https://www.ftc.go.kr/bizCommPop.do?wrkr_no=<c:out value='${operBsnmInfo.replaceBizrnb}'/>','communicationViewPopup','width=750,height=700,scrollbars=yes')">
|
||||
[사업자정보확인]
|
||||
</a>
|
||||
통신판매업 신고번호 : <c:out value="${sleBsnmInfo.mobDclNb}"/>
|
||||
<%-- <br/>--%>
|
||||
<%-- 개인정보관리책임자 : <c:out value="${operBsnmInfo.indvdlinfoPrtcRspnberNm}"/> --%>
|
||||
<%-- 사업자 등록번호: <c:out value="${operBsnmInfo.bizrnb}"/>--%>
|
||||
<%-- <a href="javascript:;" onclick="window.open('https://www.ftc.go.kr/bizCommPop.do?wrkr_no=<c:out value='${operBsnmInfo.replaceBizrnb}'/>','communicationViewPopup','width=750,height=700,scrollbars=yes')">--%>
|
||||
<%-- [사업자정보확인]--%>
|
||||
<%-- </a> --%>
|
||||
<%-- 통신판매업 신고번호 : <c:out value="${sleBsnmInfo.mobDclNb}"/>--%>
|
||||
</p>
|
||||
<p class="footer-body__text03">
|
||||
<p class="footer-body__text03 text-center">
|
||||
Copyright ⓒ<c:out value="${sleBsnmInfo.bsnmNm}"/> All rights reserved.
|
||||
</p>
|
||||
<div class="footer-image-container">
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</ul>
|
||||
<div class="footer__second" style="color: red;">
|
||||
술은 만 20세부터, 미성년자의 음주는 법률로 금지되어 있습니다. 만 20세 미만의 분에게는 술을 판매하지 않습니다.<br>
|
||||
お酒は20歳から、未成年者の飲酒は法律で禁止されています。満20歳未満の方にはお酒を販売していません。
|
||||
</div>
|
||||
<div class="footer__second">
|
||||
<button type="button" class="footer__second__detailBtn">사업자 정보 확인</button>
|
||||
<c:if test = "${not empty footerInfo.footerInfo.familySite}">
|
||||
@@ -117,12 +121,12 @@
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<li>
|
||||
<span class="footer__third__th">사업자명</span>
|
||||
<span class="footer__third__th">상호명</span>
|
||||
<span class="footer__third__td">
|
||||
<c:out value="${operBsnmInfo.bsnmNm}"/>
|
||||
</span>
|
||||
<c:out value="${operBsnmInfo.bsnmNm}"/>
|
||||
</span>
|
||||
</li>
|
||||
<li><span class="footer__third__th">대표자</span><span class="footer__third__td"><c:out value="${operBsnmInfo.reprsntvnm}"/></span></li>
|
||||
<%-- <li><span class="footer__third__th">대표자</span><span class="footer__third__td"><c:out value="${operBsnmInfo.reprsntvnm}"/></span></li>--%>
|
||||
<li><span class="footer__third__th">주소</span><span class="footer__third__td">
|
||||
<c:choose>
|
||||
<c:when test = "${not empty operBsnmInfo.rnmAdres && not empty operBsnmInfo.lnbAdres}">
|
||||
@@ -135,21 +139,21 @@
|
||||
<c:out value="${operBsnmInfo.rnmAdres}"/>
|
||||
</c:when>
|
||||
</c:choose> <c:out value="${operBsnmInfo.dtlAdres}"/></span></li>
|
||||
<li><span class="footer__third__th">대표전화</span><span class="footer__third__td"><c:out value="${sopmalInfo.reprsntTelnb}"/></span>
|
||||
</li>
|
||||
<%-- <li><span class="footer__third__th">대표전화</span><span class="footer__third__td"><c:out value="${sopmalInfo.reprsntTelnb}"/></span>--%>
|
||||
<%-- </li>--%>
|
||||
<li><span class="footer__third__th">대표이메일</span>
|
||||
<a href="mailto:<c:out value='${sopmalInfo.reprsntEmail}'/>" class="footer__third__td"><strong><c:out value="${sopmalInfo.reprsntEmail}"/></strong></a>
|
||||
</li>
|
||||
<li><span class="footer__third__th">사업자 등록번호</span><span
|
||||
class="footer__third__td"><c:out value="${operBsnmInfo.bizrnb}"/></span>
|
||||
<a href="javascript:;" onclick="window.open('https://www.ftc.go.kr/bizCommPop.do?wrkr_no=<c:out value="${operBsnmInfo.replaceBizrnb}"/>','communicationViewPopup','width=750,height=700,scrollbars=yes')" class="footer__underLine">사업자정보확인</a>
|
||||
</li>
|
||||
<li><span class="footer__third__th">개인정보관리책임자</span><span class="footer__third__td"><c:out value="${operBsnmInfo.indvdlinfoPrtcRspnberNm}"/></span>
|
||||
</li>
|
||||
<li><span class="footer__third__th">통신판매업 신고번호</span><span class="footer__third__td"><c:out value="${sleBsnmInfo.mobDclNb}"/></span></li>
|
||||
<%-- <li><span class="footer__third__th">사업자 등록번호</span><span--%>
|
||||
<%-- class="footer__third__td"><c:out value="${operBsnmInfo.bizrnb}"/></span>--%>
|
||||
<%-- <a href="javascript:;" onclick="window.open('https://www.ftc.go.kr/bizCommPop.do?wrkr_no=<c:out value="${operBsnmInfo.replaceBizrnb}"/>','communicationViewPopup','width=750,height=700,scrollbars=yes')" class="footer__underLine">사업자정보확인</a>--%>
|
||||
<%-- </li>--%>
|
||||
<%-- <li><span class="footer__third__th">개인정보관리책임자</span><span class="footer__third__td"><c:out value="${operBsnmInfo.indvdlinfoPrtcRspnberNm}"/></span>--%>
|
||||
<%-- </li>--%>
|
||||
<%-- <li><span class="footer__third__th">통신판매업 신고번호</span><span class="footer__third__td"><c:out value="${sleBsnmInfo.mobDclNb}"/></span></li>--%>
|
||||
</ul>
|
||||
<div class="footer__logo">
|
||||
</div>
|
||||
<%-- <div class="footer__logo">--%>
|
||||
<%-- </div>--%>
|
||||
<p class="footer__copyright">ⓒ<c:out value="${sleBsnmInfo.bsnmNm}"/> All rights reserved.</p>
|
||||
<%--로딩이미지--%>
|
||||
<img src="/mobile/images/loading.svg" style = "display:none" class = "loadingImg">
|
||||
|
||||
@@ -887,7 +887,7 @@
|
||||
<c:choose>
|
||||
<c:when test="${isAuthenticated}"><%--회원일시--%>
|
||||
<a href="/sopmal/mpage/mbr/selectMpageMainInqire" class="textBtns__btn">마이페이지</a>
|
||||
<a href="/logout" class="textBtns__btn">로그아웃</a>
|
||||
<a href="/sopmal/logout" class="textBtns__btn">로그아웃</a>
|
||||
</c:when>
|
||||
<c:otherwise><%--비회원일시--%>
|
||||
<a href="/sopmal/mpage/ordr/selectMbrOrdrListInqire" class="textBtns__btn">주문조회</a>
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
</p>
|
||||
</div>
|
||||
</a>
|
||||
<%--
|
||||
<a href="/sopmal/mpage/ordr/selectMbrOrdrListInqire" class="member-rank-summary__summary-item">
|
||||
<img src="/pc/images/icon_member-rank-delivery.png" alt="">
|
||||
<div class="member-rank-summary__summary-description">
|
||||
@@ -89,6 +90,7 @@
|
||||
</p>
|
||||
</div>
|
||||
</a>
|
||||
--%>
|
||||
</div>
|
||||
<c:if test="${sopmallInfo.shopInfo.cashAt eq 'N'}"> <%--충전형마일리지 사용야부에 따라 화면 위치 다름--%>
|
||||
<div class="member-rank-summary__summary-info">
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
<spring:eval expression="@environment.getProperty('currency-unit.default')" var="curUnit"/>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<jsp:include page="/WEB-INF/views/comm/Include.jsp"/>
|
||||
</head>
|
||||
<c:choose>
|
||||
<c:when test = "${empty prevewVO.mainSiteInnb && prevewVO.evtPageAt ne 'Y'}"> <%--이벤트게시글 아님--%>
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<jsp:include page="/WEB-INF/views/comm/Include.jsp"/>
|
||||
</head>
|
||||
<body>
|
||||
<%-- 공통 Header --%>
|
||||
<jsp:include page="/WEB-INF/views/comm/Header.jsp"/>
|
||||
@@ -1271,13 +1271,13 @@
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
<div class="quick-menu__customer-service">
|
||||
<i class="icon icon_quick-customer-service"></i>
|
||||
<span class="visually-hidden">고객센터</span>
|
||||
<span class="quick-menu__customer-service__num">
|
||||
${ fn:replace(resultMap.operAt.cscTelnb, '-', '<br>') }
|
||||
</span>
|
||||
</div>
|
||||
<%-- <div class="quick-menu__customer-service">--%>
|
||||
<%-- <i class="icon icon_quick-customer-service"></i>--%>
|
||||
<%-- <span class="visually-hidden">고객센터</span>--%>
|
||||
<%-- <span class="quick-menu__customer-service__num">--%>
|
||||
<%-- ${ fn:replace(resultMap.operAt.cscTelnb, '-', '<br>') }--%>
|
||||
<%-- </span>--%>
|
||||
<%-- </div>--%>
|
||||
<div class="quick-menu__to-top">
|
||||
<button><i class="icon icon_quick-to-top"></i><span class="visually-hidden">위로
|
||||
가기</span></button>
|
||||
|
||||
@@ -228,6 +228,10 @@
|
||||
<a class="login__misc__link" href="${accessUrl}/sopmal/mbr/selectIdPasswordSearch">아이디/비밀번호 찾기</a>
|
||||
</div>
|
||||
</form>
|
||||
<div class="login__signIn">
|
||||
<p class="login__signIn__text">아직 <span>${shopInfo.sopmalNm}</span> 회원이 아니세요?</p>
|
||||
<a class="login__signIn__link" href="${accessUrl}${'/sopmal/mbr/selectJoinGuidance'}">회원가입</a>
|
||||
</div>
|
||||
<div class="login__sns">
|
||||
<c:if test="${shopInfo.kakaoIntrlckAt == 'Y'}">
|
||||
<button type="button" class="login__sns__btn kakao" onclick="openSocialLoginPopup('kakao')"><i class="icon icon_kakaoLogin"></i>카카오
|
||||
@@ -509,7 +513,15 @@
|
||||
})
|
||||
.then(data => {
|
||||
console.log('Login successful', data);
|
||||
let moveTo = new URL(redirectUri).pathname;
|
||||
let moveTo = "";
|
||||
try{
|
||||
moveTo = new URL(redirectUri).pathname;
|
||||
}catch(e){
|
||||
if(redirectUri.startsWith("/",0)){
|
||||
domain = window.location.href.split("/")[0];
|
||||
moveTo = new URL(domain+redirectUri).pathname;
|
||||
}
|
||||
}
|
||||
|
||||
if (!fn_is_empty(moveTo) && !moveTo.includes('/login') && moveTo !=='/') {
|
||||
window.location.href = redirectUri;
|
||||
|
||||
@@ -292,10 +292,10 @@
|
||||
찾기</a>
|
||||
</div>
|
||||
<%-- FIXME : 회원가입 이동 활성화 하기 위해 주석 해제--%>
|
||||
<%-- <div class="login__signIn">--%>
|
||||
<%-- <p class="login__signIn__text">아직 <span>${shopInfo.sopmalNm}</span> 회원이 아니세요?</p>--%>
|
||||
<%-- <a class="login__signIn__link" href="${accessUrl}${'/sopmal/mbr/selectJoinGuidance'}">회원가입</a>--%>
|
||||
<%-- </div>--%>
|
||||
<div class="login__signIn">
|
||||
<p class="login__signIn__text">아직 <span>${shopInfo.sopmalNm}</span> 회원이 아니세요?</p>
|
||||
<a class="login__signIn__link" href="${accessUrl}${'/sopmal/mbr/selectJoinGuidance'}">회원가입</a>
|
||||
</div>
|
||||
<div class="login__sns">
|
||||
<c:if test="${shopInfo.kakaoIntrlckAt eq 'Y'}">
|
||||
<button type="button" class="login__sns__btn kakao" onclick="openSocialLoginPopup('kakao')">
|
||||
@@ -387,10 +387,15 @@
|
||||
})
|
||||
.then(data => {
|
||||
console.log('Login successful', data);
|
||||
let moveTo = new URL(redirectUri).pathname;
|
||||
console.log('move', moveTo);
|
||||
console.log('data.url', data.url);
|
||||
|
||||
let moveTo = "";
|
||||
try{
|
||||
moveTo = new URL(redirectUri).pathname;
|
||||
}catch(e){
|
||||
if(redirectUri.startsWith("/",0)){
|
||||
domain = window.location.href.split("/")[0];
|
||||
moveTo = new URL(domain+redirectUri).pathname;
|
||||
}
|
||||
}
|
||||
if (!fn_is_empty(moveTo) && !moveTo.includes('/login') && moveTo !=='/') {
|
||||
window.location.href = redirectUri;
|
||||
} else {
|
||||
|
||||
@@ -1146,7 +1146,7 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<c:if test="${resultMap.bbsVo.bbsTyCd ne '05' && resultMap.bbsVo.bbsTyCd ne '10'}">
|
||||
<c:if test="${resultMap.bbsVo.bbsTyCd ne '05' && resultMap.bbsVo.bbsTyCd ne '10' && resultMap.bbsVo.bbsTyCd ne '12'}">
|
||||
<tr id="bbscttEvlAt"
|
||||
<c:if test="${resultMap.bbsVo.bbscttRegistUseAt ne 'Y'}">style="display: none"</c:if>>
|
||||
<th>게시글 평가</th>
|
||||
@@ -1341,7 +1341,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</c:if>
|
||||
<c:if test="${resultMap.bbsVo.bbsTyCd eq '01' || resultMap.bbsVo.bbsTyCd eq '05'}">
|
||||
<c:if test="${resultMap.bbsVo.bbsTyCd eq '01' || resultMap.bbsVo.bbsTyCd eq '05' || resultMap.bbsVo.bbsTyCd eq '12'}">
|
||||
<tr>
|
||||
<th>답글 쓰기
|
||||
<label class="b-checkbox checkbox ">
|
||||
@@ -1381,7 +1381,7 @@
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<%--게시판 타입 일반게시글, 상품q&a, 일반리뷰, 한달리뷰, 대량구매--%>
|
||||
<c:if test="${resultMap.bbsVo.bbsTyCd eq '01' || resultMap.bbsVo.bbsTyCd eq '05' || resultMap.bbsVo.bbsTyCd eq '06' || resultMap.bbsVo.bbsTyCd eq '07' || resultMap.bbsVo.bbsTyCd eq '08'}">
|
||||
<c:if test="${resultMap.bbsVo.bbsTyCd eq '01' || resultMap.bbsVo.bbsTyCd eq '05' || resultMap.bbsVo.bbsTyCd eq '06' || resultMap.bbsVo.bbsTyCd eq '07' || resultMap.bbsVo.bbsTyCd eq '08' || resultMap.bbsVo.bbsTyCd eq '12'}">
|
||||
<tr>
|
||||
<th rowspan="2">게시글 기본 문구</th>
|
||||
<td>
|
||||
@@ -1487,7 +1487,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<c:if test="${resultMap.bbsVo.bbsTyCd eq '01' || resultMap.bbsVo.bbsTyCd eq '05' || resultMap.bbsVo.bbsTyCd eq '08' || resultMap.bbsVo.bbsTyCd eq '09'}">
|
||||
<c:if test="${resultMap.bbsVo.bbsTyCd eq '01' || resultMap.bbsVo.bbsTyCd eq '05' || resultMap.bbsVo.bbsTyCd eq '08' || resultMap.bbsVo.bbsTyCd eq '09' || resultMap.bbsVo.bbsTyCd eq '12'}">
|
||||
<th>비밀글 여부</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
@@ -1557,7 +1557,7 @@
|
||||
</table>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${resultMap.bbsVo.bbsTyCd eq '01' || resultMap.bbsVo.bbsTyCd eq '02' || resultMap.bbsVo.bbsTyCd eq '03' || resultMap.bbsVo.bbsTyCd eq '04' || resultMap.bbsVo.bbsTyCd eq '05' || resultMap.bbsVo.bbsTyCd eq '06' || resultMap.bbsVo.bbsTyCd eq '07' || resultMap.bbsVo.bbsTyCd eq '10' || resultMap.bbsVo.bbsTyCd eq '11' }">
|
||||
<c:if test="${resultMap.bbsVo.bbsTyCd eq '01' || resultMap.bbsVo.bbsTyCd eq '02' || resultMap.bbsVo.bbsTyCd eq '03' || resultMap.bbsVo.bbsTyCd eq '04' || resultMap.bbsVo.bbsTyCd eq '05' || resultMap.bbsVo.bbsTyCd eq '06' || resultMap.bbsVo.bbsTyCd eq '07' || resultMap.bbsVo.bbsTyCd eq '10' || resultMap.bbsVo.bbsTyCd eq '11' || resultMap.bbsVo.bbsTyCd eq '12'}">
|
||||
<h3 class="content-section__inner-title">게시글 작성 상세 설정</h3>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
@@ -1660,7 +1660,7 @@
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<input type="hidden" name="qesitmInnb_s"
|
||||
value="${resultMap.bbsVo.rvwInputList[0].scoreIndictMthCd }"/>
|
||||
value="${resultMap.rvwInputList[0].scoreIndictMthCd }"/>
|
||||
<c:forEach var="cgn022"
|
||||
items="${resultMap.codeContent[0].cgn022 }"
|
||||
varStatus="status">
|
||||
@@ -1800,7 +1800,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</c:if>
|
||||
<c:if test="${resultMap.bbsVo.bbsTyCd eq '01' || resultMap.bbsVo.bbsTyCd eq '05'}">
|
||||
<c:if test="${resultMap.bbsVo.bbsTyCd eq '01' || resultMap.bbsVo.bbsTyCd eq '05' || resultMap.bbsVo.bbsTyCd eq '12'}">
|
||||
<tr id="rpuseDv"
|
||||
<c:if test="${resultMap.bbsVo.answRegistUseAt ne 'Y'}">style="display:none"</c:if>>
|
||||
<th>자주쓰는 답변</th>
|
||||
@@ -1928,7 +1928,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</c:if>
|
||||
<c:if test="${resultMap.bbsVo.bbsTyCd eq '01' || resultMap.bbsVo.bbsTyCd eq '02' || resultMap.bbsVo.bbsTyCd eq '04' || resultMap.bbsVo.bbsTyCd eq '05' || resultMap.bbsVo.bbsTyCd eq '06' || resultMap.bbsVo.bbsTyCd eq '07' || resultMap.bbsVo.bbsTyCd eq '10' || resultMap.bbsVo.bbsTyCd eq '11' }">
|
||||
<c:if test="${resultMap.bbsVo.bbsTyCd eq '01' || resultMap.bbsVo.bbsTyCd eq '02' || resultMap.bbsVo.bbsTyCd eq '04' || resultMap.bbsVo.bbsTyCd eq '05' || resultMap.bbsVo.bbsTyCd eq '06' || resultMap.bbsVo.bbsTyCd eq '07' || resultMap.bbsVo.bbsTyCd eq '10' || resultMap.bbsVo.bbsTyCd eq '11' || resultMap.bbsVo.bbsTyCd eq '12'}">
|
||||
<tr id="listUaccordion">
|
||||
<th>페이지당 노출수</th>
|
||||
<td>
|
||||
@@ -1960,7 +1960,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<c:if test="${resultMap.bbsVo.bbsTyCd eq '01' || resultMap.bbsVo.bbsTyCd eq '02' || resultMap.bbsVo.bbsTyCd eq '03' || resultMap.bbsVo.bbsTyCd eq '04' || resultMap.bbsVo.bbsTyCd eq '05' || resultMap.bbsVo.bbsTyCd eq '09'}">
|
||||
<c:if test="${resultMap.bbsVo.bbsTyCd eq '01' || resultMap.bbsVo.bbsTyCd eq '02' || resultMap.bbsVo.bbsTyCd eq '03' || resultMap.bbsVo.bbsTyCd eq '04' || resultMap.bbsVo.bbsTyCd eq '05' || resultMap.bbsVo.bbsTyCd eq '09' || resultMap.bbsVo.bbsTyCd eq '12'}">
|
||||
<th>인기게시물 기준 조회 일수</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
@@ -2042,7 +2042,8 @@
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<c:if test="${resultMap.bbsVo.bbsTyCd eq '01' || resultMap.bbsVo.bbsTyCd eq '03' || resultMap.bbsVo.bbsTyCd eq '05' || resultMap.bbsVo.bbsTyCd eq '06' || resultMap.bbsVo.bbsTyCd eq '07' }">
|
||||
<%-- 일반, 이벤트, 상품Q&A, 일반리뷰, 한달리뷰, 1:1문의 --%>
|
||||
<c:if test="${resultMap.bbsVo.bbsTyCd eq '01' || resultMap.bbsVo.bbsTyCd eq '03' || resultMap.bbsVo.bbsTyCd eq '05' || resultMap.bbsVo.bbsTyCd eq '06' || resultMap.bbsVo.bbsTyCd eq '07' || resultMap.bbsVo.bbsTyCd eq '12' }">
|
||||
<tr>
|
||||
<th>사용자</th>
|
||||
<td>
|
||||
@@ -2061,7 +2062,8 @@
|
||||
</td>
|
||||
</tr>
|
||||
</c:if>
|
||||
<c:if test="${resultMap.bbsVo.bbsTyCd eq '01' || resultMap.bbsVo.bbsTyCd eq '03' || resultMap.bbsVo.bbsTyCd eq '04' || resultMap.bbsVo.bbsTyCd eq '05' || resultMap.bbsVo.bbsTyCd eq '06' || resultMap.bbsVo.bbsTyCd eq '07' }">
|
||||
<%-- 일반, 이벤트, 상품Q&A, FAQ, 일반리뷰, 한달리뷰, 1:1문의 --%>
|
||||
<c:if test="${resultMap.bbsVo.bbsTyCd eq '01' || resultMap.bbsVo.bbsTyCd eq '03' || resultMap.bbsVo.bbsTyCd eq '04' || resultMap.bbsVo.bbsTyCd eq '05' || resultMap.bbsVo.bbsTyCd eq '06' || resultMap.bbsVo.bbsTyCd eq '07' || resultMap.bbsVo.bbsTyCd eq '12'}">
|
||||
<tr>
|
||||
<th>관리자</th>
|
||||
<td>
|
||||
@@ -2105,13 +2107,7 @@
|
||||
</div>
|
||||
</section>
|
||||
</c:if>
|
||||
<c:if test="${ resultMap.bbsVo.sknTyCd eq '02' }">
|
||||
<form name="updForm">
|
||||
<input type="hidden" name="pgeWthCnt" title="페이지가로건수" value="${resultMap.bbsVo.pgeWthCnt }"/>
|
||||
<input type="hidden" name="pgeVtcCnt" title="페이지세로건수" value="${resultMap.bbsVo.pgeVtcCnt }"/>
|
||||
</form>
|
||||
</c:if>
|
||||
<c:if test="${resultMap.bbsVo.bbsTyCd eq '01' || resultMap.bbsVo.bbsTyCd eq '05' || resultMap.bbsVo.bbsTyCd eq '08'}">
|
||||
<c:if test="${resultMap.bbsVo.bbsTyCd eq '01' || resultMap.bbsVo.bbsTyCd eq '05' || resultMap.bbsVo.bbsTyCd eq '08' || resultMap.bbsVo.bbsTyCd eq '12'}">
|
||||
<section class="content-section content-fold">
|
||||
<div class="content-fold__header">
|
||||
<h3 class="content-section__title">메시지 발송</h3>
|
||||
@@ -2391,7 +2387,7 @@
|
||||
name="photoRvwMlgAccmlmnyAmt"
|
||||
value="${resultMap.bbsVo.photoRvwMlgAccmlmnyAmt }"
|
||||
title="해당 인풋에 대한 설명" maxlength="10">
|
||||
<span class="input-unit-text">원</span>
|
||||
<span class="input-unit-text">점</span>
|
||||
</div>
|
||||
유효기간:
|
||||
<div class="input-container">
|
||||
@@ -2414,7 +2410,7 @@
|
||||
name="gnrlRvwMlgAccmlmnyAmt"
|
||||
value="${resultMap.bbsVo.gnrlRvwMlgAccmlmnyAmt }"
|
||||
title="포토후기마일리지적립금액" maxlength="10">
|
||||
<span class="input-unit-text">원</span>
|
||||
<span class="input-unit-text">점</span>
|
||||
</div>
|
||||
유효기간:
|
||||
<div class="input-container">
|
||||
@@ -2457,7 +2453,7 @@
|
||||
name="aditPymntMlgAccmlmnyAmt"
|
||||
value="${resultMap.bbsVo.aditPymntMlgAccmlmnyAmt }"
|
||||
title="추가지급마일리지적립금액" maxlength="10">
|
||||
<span class="input-unit-text">원</span>
|
||||
<span class="input-unit-text">점</span>
|
||||
</div>
|
||||
유효기간:
|
||||
<div class="input-container">
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
onclick="fn_delete_bbsctt('<c:out value="${ bbscttInfo.bbscttInnb }"/>'
|
||||
,''
|
||||
,''
|
||||
<c:if test="${bbsInfo.bbsTyCd eq '05'}">
|
||||
<c:if test="${bbsInfo.bbsTyCd eq '05' || bbsInfo.bbsTyCd eq '12'}">
|
||||
,'Y'
|
||||
</c:if>);">
|
||||
<spring:message code="button.delete"/></button>
|
||||
@@ -390,6 +390,14 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<c:if test="${bbsInfo.bbsTyCd eq '12'}">
|
||||
<tr>
|
||||
<th>주문번호</th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner"><a style="cursor:pointer; text-decoration: underline;" onclick="fn_comm_go_ordr_dtl('<c:out value="${bbscttInfo.ordrInnb}" />');return false;"><c:out value="${bbscttInfo.ordrInnb}"/></a></div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:if>
|
||||
<c:if test="${not empty resultMap.bbscttInfo.fileInfo}">
|
||||
<c:choose>
|
||||
<c:when test = "${bbscttInfo.regusrDvCd ne '02'}"><%--상품qna 사진 미리보기--%>
|
||||
|
||||
@@ -741,10 +741,11 @@
|
||||
*********************************************************/
|
||||
const fn_select_bbsctt_update_pop = function (bbscttInnb, dtlPop) {
|
||||
const bbsId = $("#bbsId").val();
|
||||
const bbsTyCd = $("#bbsTyCd").val();
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<c:url value='/mngr/bbs/gnrlsctt/selectBbscttUpdtPopupForm'/>",
|
||||
data: {"bbsId": bbsId, "bbscttInnb": bbscttInnb, "dtlPop": dtlPop},
|
||||
data: {"bbsId": bbsId, "bbscttInnb": bbscttInnb, "dtlPop": dtlPop, "bbsTyCd":bbsTyCd},
|
||||
success: function (data) {
|
||||
$("#modalDiv").find("script").remove();
|
||||
if ($("#board-list-update")) {
|
||||
|
||||
@@ -126,6 +126,12 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<c:if test="${bbsInfo.bbsTyCd eq '12'}">
|
||||
<tr>
|
||||
<th>주문번호</th>
|
||||
<td colspan="3"><a style="cursor:pointer; text-decoration: underline;" onclick="fn_comm_go_ordr_dtl('<c:out value="${bbscttInfo.ordrInnb}" />');return false;"><c:out value="${bbscttInfo.ordrInnb}"/></a></td>
|
||||
</tr>
|
||||
</c:if>
|
||||
<tr class = "visibleAt">
|
||||
<c:choose>
|
||||
<c:when test = "${bbsInfo.bbsTyCd ne '04' && bbsInfo.bbsTyCd ne '10'}">
|
||||
|
||||
@@ -0,0 +1,230 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||
<%@ taglib prefix="f" uri="/WEB-INF/tlds/f.tld"%>
|
||||
<%--
|
||||
Class Name : GoodsQnaBbscttListR.jsp
|
||||
Description : 일반 게시글 목록 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2023-12-08 김혜지 최초 생성
|
||||
--%>
|
||||
<section class="content-section">
|
||||
<div class="form-control-container">
|
||||
<div class="left">
|
||||
<div class="search-number">
|
||||
<span class="search-number__text">총 <strong><fmt:formatNumber value="${resultMap.paginationInfo.totalRecordCount}" pattern="#,###"/></strong>건</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="select-box">
|
||||
<select id="pageUnit" name="pageUnit" title="페이지당 출력될 목록건수" onchange="fn_select_bbsctt_list('1');">
|
||||
<c:forEach items="${ resultMap.paginationInfo.pageUnitArr }" var="pageUnit" varStatus="pageUnitStatus">
|
||||
<option value="<c:out value="${ pageUnit }"/>" <c:if test="${ resultMap.paginationInfo.recordCountPerPage eq pageUnit }">selected="selected"</c:if>><c:out value="${ pageUnit }"/>개씩</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form id="listForm">
|
||||
<hr class="horizontal-line">
|
||||
<div class="form-control-container">
|
||||
<div class="left">
|
||||
<button type="button" class="btn outline sm" onclick="fn_delete_bbsctt('', 'many');">선택 <spring:message code="button.delete"/></button>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
</div>
|
||||
</div>
|
||||
<hr class="spacing">
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 3%;">
|
||||
<col style="width: 3%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 5%;">
|
||||
<col style="width: 18%;">
|
||||
<col style="width: auto">
|
||||
<col style="width: 5%">
|
||||
<col style="width: 6%">
|
||||
<col style="width: 4%">
|
||||
<col style="width: 10%">
|
||||
<col style="width: 5%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="b-checkbox checkbox is-medium check-all" >
|
||||
<input type="checkbox" value="" id="listChkA">
|
||||
<span class="check"></span>
|
||||
</label>
|
||||
</th>
|
||||
<th>번호</th>
|
||||
<th>작성자</th>
|
||||
<th>IP</th>
|
||||
<th>분류</th>
|
||||
<th>주문번호</th>
|
||||
<th>제목</th>
|
||||
<th>답변상태</th>
|
||||
<th>등록일</th>
|
||||
<th>조회수</th>
|
||||
<th>관리</th>
|
||||
<th>삭제</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id ="contentSection">
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultList.resultList }">
|
||||
<c:forEach items="${ resultMap.resultList.resultList }" var="resultList" varStatus="status">
|
||||
<tr <c:if test = "${empty resultList.answBbscttInnb}">class="sendOut-info__reseller"</c:if>>
|
||||
<td>
|
||||
<c:if test="${ resultList.useAt eq 'Y' }">
|
||||
<label class="b-checkbox checkbox is-medium chkLabel">
|
||||
<input type="checkbox" value="${ resultList.bbscttInnb }"
|
||||
name="selectedBbscttRow" class='bbscttChk'>
|
||||
<span class="check"></span>
|
||||
</label>
|
||||
</c:if>
|
||||
<input type = "hidden" value = "<c:out value="${ resultList.goodsInnb}"/>">
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${resultMap.paginationInfo.totalRecordCount - resultList.rnum+1 }" />
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<%--회원--%>
|
||||
<c:when test="${resultList.regusrDvCd eq '01'}">
|
||||
<button type="button"
|
||||
class="crmBtn"
|
||||
data-info="info01"
|
||||
onclick="fn_select_crm_mini_info(this,
|
||||
'<c:out value='${resultList.regusr}'/>'
|
||||
,'<c:out value='${resultList.mbrDvCd}'/>'
|
||||
,'#modalDiv');">
|
||||
<span class="gray-12">
|
||||
<c:out value="${resultList.regusrNm}"/>
|
||||
</span><br>
|
||||
(<c:choose>
|
||||
<c:when test="${resultList.joinMthCd eq 'kakao'}"><%--kakao--%>
|
||||
<i class="icon icon_word-badge_kakao"></i>
|
||||
</c:when>
|
||||
<c:when test="${resultList.joinMthCd eq 'naver'}"><%--naver--%>
|
||||
<i class="icon icon_word-badge_naver"></i>
|
||||
</c:when>
|
||||
<c:when test="${resultList.joinMthCd eq 'pos'}"><%--pos--%>
|
||||
<i class="icon icon_word-badge_pos"></i>
|
||||
<span class="fw-500 blue-7">
|
||||
<c:out value="${resultList.regusrId}"/>
|
||||
</span>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<span class="fw-500 blue-7"><c:out value="${resultList.regusrId}"/></span>
|
||||
</c:otherwise>
|
||||
</c:choose>/
|
||||
<span class="fw-500 green-8"><c:out value="${resultList.mbrGradNm}"/></span>)
|
||||
</button>
|
||||
</c:when>
|
||||
<%--관리자--%>
|
||||
<c:when test="${resultList.regusrDvCd eq '02'}">
|
||||
<c:out value="${ resultList.mngrNm}"/>(<c:out value="${ resultList.maskingRegusrId}"/>)
|
||||
</c:when>
|
||||
<%--네이버페이--%>
|
||||
<c:when test="${resultList.regusrDvCd eq '03'}">
|
||||
naverpay
|
||||
</c:when>
|
||||
<%--비회원--%>
|
||||
<c:when test="${resultList.regusrDvCd eq '99'}">
|
||||
<c:out value="${resultList.maskingRegusrNm}"/>[비회원]
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td><c:out value="${ resultList.ip}" /></td>
|
||||
<td><c:out value="${resultList.answCn}" /></td>
|
||||
<td><a class="under-line moveDetil" onclick="fn_comm_go_ordr_dtl('<c:out value="${resultList.ordrInnb}" />');return false;"><c:out value="${resultList.ordrInnb}" /></a></td>
|
||||
<td class="left">
|
||||
<a class="under-line moveDetil"
|
||||
bbsctt-innb = "<c:out value="${ resultList.bbscttInnb }"/>"
|
||||
bbs-id ="<c:out value="${ resultList.bbsId }"/>"
|
||||
regusr-dv = "02">
|
||||
<c:choose>
|
||||
<c:when test = "${resultList.useAt eq 'Y'}">
|
||||
<c:out value="${ resultList.sj }"/>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<span class="stone-6">삭제된 게시글입니다.[<c:out value="${ resultList.updtDt}"/>]</span>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</a>
|
||||
<c:if test="${resultList.isfiles eq 1}">
|
||||
<i class="icon icon_image-badge"></i>
|
||||
</c:if>
|
||||
<c:if test="${resultList.newAt eq 'Y'}">
|
||||
<i class="icon icon_new-badge"></i>
|
||||
</c:if>
|
||||
<c:if test="${resultList.popularAt eq 'Y'}">
|
||||
<i class="icon icon_hot-badge"></i>
|
||||
</c:if>
|
||||
<c:if test="${ resultList.secretBbscttAt eq 'Y' }">
|
||||
<i class="icon icon_lock"></i>
|
||||
</c:if>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test = "${not empty resultList.answBbscttInnb}">답변완료</c:if>
|
||||
<c:if test = "${empty resultList.answBbscttInnb}">답변대기</c:if>
|
||||
</td>
|
||||
<td><c:out value="${ resultList.registDt }"/></td>
|
||||
<td><fmt:formatNumber value="${resultList.inqireCnt}" pattern="#,##0"/></td>
|
||||
<td>
|
||||
<div class="manage-btn-container">
|
||||
<c:if test="${ resultList.useAt eq 'Y' && empty resultList.npayBbscttSnb}">
|
||||
<button type ="button" class="btn xsm outline primary" onclick="fn_select_bbsctt_update_pop('<c:out value="${ resultList.bbscttInnb }"/>','<c:out value="${ resultList.bbsId }"/>','');"><spring:message code="button.update"/></button>
|
||||
<c:if test = "${resultMap.bbsInfo.answRegist eq 'Y'}">
|
||||
<c:choose>
|
||||
<c:when test="${not empty resultList.answBbscttInnb}">
|
||||
<button type ="button" class="btn xsm primary outline" onclick="fn_select_answ_update_pop('<c:out value="${ resultList.bbscttInnb }"/>', '<c:out value="${ resultList.answBbscttInnb}"/>','<c:out value="${ resultList.bbsId }"/>','');">답변 <spring:message code="button.update"/></button>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<button type ="button" class="btn xsm primary" onclick="fn_select_answ_regist_pop('<c:out value="${ resultList.bbscttInnb }"/>','<c:out value="${ resultList.bbsId }"/>','');">답변 <spring:message code="button.insert"/></button>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${ resultList.useAt eq 'Y' && empty resultList.npayBbscttSnb}">
|
||||
<div class="manage-btn-container">
|
||||
<button class="btn xsm dark" type="button" onclick="fn_delete_bbsctt('<c:out value="${ resultList.bbscttInnb }"/>','','<c:out value="${ resultList.goodsInnb }"/>');"><spring:message code="button.delete"/></button>
|
||||
</div>
|
||||
</c:if>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td colspan="100%"><spring:message code="common.nodata"/></td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="<c:out value = '${resultMap.bbsctt.pageIndex}'/>"/>
|
||||
<div class="pagination__container">
|
||||
<ui:pagination paginationInfo="${resultMap.paginationInfo}" type="image" jsFunction="fn_select_bbsctt_list" />
|
||||
</div>
|
||||
@@ -25,6 +25,7 @@
|
||||
<title>일반 관리자</title>
|
||||
<%-- 공통 include --%>
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Include.jsp"%>
|
||||
<spring:eval expression="@environment.getProperty('currency-unit.default')" var="curUnit"/>
|
||||
</head>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
@@ -305,6 +306,7 @@
|
||||
})
|
||||
})
|
||||
});
|
||||
var curUnit = '${curUnit}';
|
||||
|
||||
|
||||
//숫자 인풋 포커스시 0 제거
|
||||
@@ -1466,12 +1468,12 @@
|
||||
title="일반옵션 마일리지적립금액">
|
||||
<div class="select-box">
|
||||
<select class="short" title="일반옵션 마일리지적립구분코드" style="display: none;" name="mlgAccmlCd_normal" disabled>
|
||||
<option value="02">원</option>
|
||||
<option value="02">` + curUnit + `</option>
|
||||
<option value="01">%</option>
|
||||
</select>
|
||||
<div class="nice-select short disabled" tabindex="0"><span class="current">원</span>
|
||||
<div class="nice-select short disabled" tabindex="0"><span class="current">` + curUnit + `</span>
|
||||
<ul class="list">
|
||||
<li data-value="02" class="option selected">원</li>
|
||||
<li data-value="02" class="option selected">` + curUnit + `</li>
|
||||
<li data-value="01" class="option">%</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -1570,13 +1572,13 @@
|
||||
<input class="input-text sm number right" value="" type="text" title="재고옵션 마일리지적립금액" name="mlgAccmlAmt_invntry" disabled/>
|
||||
<div class="select-box">
|
||||
<select class="short" title="재고옵션 마일리지적립구분코드" style="display: none;" name="mlgAccmlCd_invntry" disabled >
|
||||
<option value="02">원</option>
|
||||
<option value="02">` + curUnit + `</option>
|
||||
<option value="01">%</option>
|
||||
</select>
|
||||
<div class="nice-select short disabled" tabindex="0">
|
||||
<span class="current">원</span>
|
||||
<span class="current">` + curUnit + `</span>
|
||||
<ul class="list">
|
||||
<li data-value="02" class="option selected">원</li>
|
||||
<li data-value="02" class="option selected">` + curUnit + `</li>
|
||||
<li data-value="01" class="option">%</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -1706,9 +1708,9 @@
|
||||
<input class="input-text sm number right" value="" type="text" title="추가옵션 마일리지적립금액" name="mlgAccmlAmt_added" disabled>
|
||||
<div class="select-box">
|
||||
<select class="short" title="추가옵션 마일리지적립구분코드" style="display: none;" name="mlgAccmlCd_added" disabled >
|
||||
<option value="02">원</option>
|
||||
<option value="02">` + curUnit + `</option>
|
||||
<option value="01">%</option>
|
||||
</select><div class="nice-select short disabled" tabindex="0"><span class="current">원</span><ul class="list"><li data-value="02" class="option selected">원</li><li data-value="01" class="option">%</li></ul></div>
|
||||
</select><div class="nice-select short disabled" tabindex="0"><span class="current">` + curUnit + `</span><ul class="list"><li data-value="02" class="option selected">` + curUnit + `</li><li data-value="01" class="option">%</li></ul></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1880,7 +1882,7 @@
|
||||
</div>
|
||||
<div class="product-group__description">
|
||||
<p>` + good.goodsNm + `</p>
|
||||
<p class="product-group__description-price">` + fn_format_comma(good.goodsPrice) + `원</p>
|
||||
<p class="product-group__description-price">` + fn_format_comma(good.goodsPrice) + curUnit + `</p>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
@@ -2669,14 +2671,14 @@
|
||||
<caption>판매정보</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
<col style="width: 38%;">
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
<col style="width: 38%;">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>판매 상태</th>
|
||||
<td colspan="2">
|
||||
<td colspan="4">
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<c:forEach items="${resultMap.goodsDftinfoSttusList}" var="goodsDftinfoSttus" varStatus="status">
|
||||
@@ -3135,13 +3137,13 @@
|
||||
<input class="input-text sm number right" value="" type="text" id="mlgAccmlAmt" name="mlgAccmlAmt_normal" title="마일리지" disabled>
|
||||
<div class="select-box">
|
||||
<select class="short" title="일반옵션 마일리지구분코드" style="display: none;" name="mlgAccmlCd_normal" disabled>
|
||||
<option value="02">원</option>
|
||||
<option value="02">${curUnit}</option>
|
||||
<option value="01">%</option>
|
||||
</select>
|
||||
<div class="nice-select short disabled"
|
||||
tabindex="0"><span class="current">원</span>
|
||||
tabindex="0"><span class="current">${curUnit}</span>
|
||||
<ul class="list">
|
||||
<li data-value="02" class="option selected">원</li>
|
||||
<li data-value="02" class="option selected">${curUnit}</li>
|
||||
<li data-value="01" class="option">%</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -3528,7 +3530,7 @@
|
||||
<input class="input-text xsm number right" value="" type="text" title="추가옵션 마일리지적립금액" name="mlgAccmlAmt_added" disabled>
|
||||
<div class="select-box">
|
||||
<select class="short" title="추가옵션 마일리지적립구분코드" name="mlgAccmlCd_added" disabled>
|
||||
<option value="02">원</option>
|
||||
<option value="02">${curUnit}</option>
|
||||
<option value="01">%</option>
|
||||
</select>
|
||||
</div>
|
||||
@@ -4076,14 +4078,14 @@
|
||||
<select class="short"
|
||||
title="일반옵션 마일리지구분코드"
|
||||
style="display: none;" name="mlgAccmlCd_normal" disabled>
|
||||
<option value="02">원</option>
|
||||
<option value="02">` + curUnit + `</option>
|
||||
<option value="01">%</option>
|
||||
</select>
|
||||
<div class="nice-select short disabled"
|
||||
tabindex="0"><span class="current">원</span>
|
||||
tabindex="0"><span class="current">` + curUnit + `</span>
|
||||
<ul class="list">
|
||||
<li data-value=""
|
||||
class="option selected">원
|
||||
class="option selected">` + curUnit + `
|
||||
</li>
|
||||
<li data-value=""
|
||||
class="option">%
|
||||
@@ -4327,7 +4329,7 @@
|
||||
<div class="select-box">
|
||||
<select class="short"
|
||||
title="추가옵션 마일리지적립구분코드" name="mlgAccmlCd_added" disabled>
|
||||
<option value="02">원
|
||||
<option value="02">` + curUnit + `
|
||||
</option>
|
||||
<option value="01">%
|
||||
</option>
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<title>일반 관리자</title>
|
||||
<%-- 공통 include --%>
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Include.jsp"%>
|
||||
<spring:eval expression="@environment.getProperty('currency-unit.default')" var="curUnit"/>
|
||||
</head>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
@@ -337,6 +338,7 @@
|
||||
})
|
||||
|
||||
});
|
||||
var curUnit = '${curUnit}';
|
||||
|
||||
//재고와 상관없이 판매일 경우 옵션재고 disabled
|
||||
$(document).on('change', 'input[name="invntryPolicyCd"]',function () {
|
||||
@@ -1503,12 +1505,12 @@
|
||||
title="일반옵션 마일리지적립금액">
|
||||
<div class="select-box">
|
||||
<select class="short" title="일반옵션 마일리지적립구분코드" style="display: none;" name="mlgAccmlCd_normal" disabled>
|
||||
<option value="02">원</option>
|
||||
<option value="02">` + curUnit + `</option>
|
||||
<option value="01">%</option>
|
||||
</select>
|
||||
<div class="nice-select short disabled" tabindex="0"><span class="current">원</span>
|
||||
<div class="nice-select short disabled" tabindex="0"><span class="current">` + curUnit + `</span>
|
||||
<ul class="list">
|
||||
<li data-value="02" class="option selected">원</li>
|
||||
<li data-value="02" class="option selected">` + curUnit + `</li>
|
||||
<li data-value="01" class="option">%</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -1608,13 +1610,13 @@
|
||||
<input class="input-text sm number right" value="" type="text" title="재고옵션 마일리지적립금액" name="mlgAccmlAmt_invntry" disabled/>
|
||||
<div class="select-box">
|
||||
<select class="short" title="재고옵션 마일리지적립구분코드" style="display: none;" name="mlgAccmlCd_invntry" disabled >
|
||||
<option value="02">원</option>
|
||||
<option value="02">` + curUnit + `</option>
|
||||
<option value="01">%</option>
|
||||
</select>
|
||||
<div class="nice-select short disabled" tabindex="0">
|
||||
<span class="current">원</span>
|
||||
<span class="current">` + curUnit + `</span>
|
||||
<ul class="list">
|
||||
<li data-value="02" class="option selected">원</li>
|
||||
<li data-value="02" class="option selected">` + curUnit + `</li>
|
||||
<li data-value="01" class="option">%</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -1744,9 +1746,9 @@
|
||||
<input class="input-text sm number right" value="" type="text" title="추가옵션 마일리지적립금액" name="mlgAccmlAmt_added" disabled >
|
||||
<div class="select-box">
|
||||
<select class="short" title="추가옵션 마일리지적립구분코드" style="display: none;" name="mlgAccmlCd_added" disabled >
|
||||
<option value="02">원</option>
|
||||
<option value="02">` + curUnit + `</option>
|
||||
<option value="01">%</option>
|
||||
</select><div class="nice-select short disabled" tabindex="0"><span class="current">원</span><ul class="list"><li data-value="02" class="option selected">원</li><li data-value="01" class="option">%</li></ul></div>
|
||||
</select><div class="nice-select short disabled" tabindex="0"><span class="current">` + curUnit + `</span><ul class="list"><li data-value="02" class="option selected">` + curUnit + `</li><li data-value="01" class="option">%</li></ul></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1972,7 +1974,7 @@
|
||||
</div>
|
||||
<div class="product-group__description">
|
||||
<p>` + good.goodsNm + `</p>
|
||||
<p class="product-group__description-price">` + fn_format_comma(good.goodsPrice) + `원</p>
|
||||
<p class="product-group__description-price">` + fn_format_comma(good.goodsPrice) + curUnit + `</p>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
@@ -2841,9 +2843,9 @@
|
||||
<caption>판매정보</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
<col style="width: 38%;">
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
<col style="width: 38%;">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
@@ -3428,7 +3430,7 @@
|
||||
<c:if test="${mlgPolicyCd011_status.index eq mlgAccmlCd011_status.index}">
|
||||
<div class="select-box">
|
||||
<select class="short" title="일반옵션 마일리지구분코드" style="display: none;" name="mlgAccmlCd_normal" <c:if test="${mlgPolicyCd011 ne '02'}"> disabled </c:if> >
|
||||
<option value="02" <c:if test="${mlgAccmlCd011 eq '02'}"> selected </c:if> >원</option>
|
||||
<option value="02" <c:if test="${mlgAccmlCd011 eq '02'}"> selected </c:if> >${curUnit}</option>
|
||||
<option value="01" <c:if test="${mlgAccmlCd011 eq '01'}"> selected </c:if> >%</option>
|
||||
</select>
|
||||
</div>
|
||||
@@ -3575,13 +3577,13 @@
|
||||
<input class="input-text sm number right" value="" type="text" id="mlgAccmlAmt_normal" name="mlgAccmlAmt_normal" title="마일리지" disabled >
|
||||
<div class="select-box">
|
||||
<select class="short" title="일반옵션 마일리지구분코드" style="display: none;" name="mlgAccmlCd_normal" disabled >
|
||||
<option value="02" selected >원</option>
|
||||
<option value="02" selected >${curUnit}</option>
|
||||
<option value="01" >%</option>
|
||||
</select>
|
||||
<%-- <div class="nice-select short <c:if test="${optnList01.mlgPolicyCd ne '02'}"> disabled </c:if> "--%>
|
||||
<%-- tabindex="0"><span class="current">원</span>--%>
|
||||
<%-- tabindex="0"><span class="current">${curUnit}</span>--%>
|
||||
<%-- <ul class="list">--%>
|
||||
<%-- <li data-value="02" class="option <c:if test="${optnList01.mlgAccmlCd eq '02'}"> </c:if> ">원</li>--%>
|
||||
<%-- <li data-value="02" class="option <c:if test="${optnList01.mlgAccmlCd eq '02'}"> </c:if> ">${curUnit}</li>--%>
|
||||
<%-- <li data-value="01" class="option <c:if test="${optnList01.mlgAccmlCd eq '01'}"> </c:if> ">%</li>--%>
|
||||
<%-- </ul>--%>
|
||||
<%-- </div>--%>
|
||||
@@ -3805,7 +3807,7 @@
|
||||
<input class="input-text sm number right" value="${goodsOpt02Val.mlgAccmlAmt}" type="text" title="재고옵션 마일리지적립금액" name="mlgAccmlAmt_invntry" disabled/>
|
||||
<div class="select-box">
|
||||
<select class="short" title="재고옵션 마일리지적립구분코드" style="display: none;" name="mlgAccmlCd_invntry" disabled >
|
||||
<option value="02" <c:if test="${goodsOpt02Val.mlgAccmlCd eq '02'}"> selected</c:if> >원</option>
|
||||
<option value="02" <c:if test="${goodsOpt02Val.mlgAccmlCd eq '02'}"> selected</c:if> >${curUnit}</option>
|
||||
<option value="01" <c:if test="${goodsOpt02Val.mlgAccmlCd eq '01'}"> selected</c:if> >%</option>
|
||||
</select>
|
||||
</div>
|
||||
@@ -4183,7 +4185,7 @@
|
||||
<c:if test="${mlgPolicyCd033_status.index eq mlgAccmlAmt033_status.index}">
|
||||
<div class="select-box">
|
||||
<select class="short" title="추가옵션 마일리지적립구분코드" name="mlgAccmlCd_added" <c:if test="${mlgPolicyCd033 ne '02'}"> disabled </c:if> >
|
||||
<option value="02" <c:if test="${mlgAccmlCd033 eq '02'}"> selected </c:if> >원</option>
|
||||
<option value="02" <c:if test="${mlgAccmlCd033 eq '02'}"> selected </c:if> >${curUnit}</option>
|
||||
<option value="01" <c:if test="${mlgAccmlCd033 eq '01'}"> selected </c:if> >%</option>
|
||||
</select>
|
||||
</div>
|
||||
@@ -4591,7 +4593,7 @@
|
||||
</div>
|
||||
<div class="product-group__description">
|
||||
<p><c:out value="${goodsInfo.goodsNm}"/></p>
|
||||
<p class="product-group__description-price"><fmt:formatNumber value="${goodsInfo.slepric}" pattern="#,###"/>원</p>
|
||||
<p class="product-group__description-price"><fmt:formatNumber value="${goodsInfo.slepric}" pattern="#,###"/>${curUnit}</p>
|
||||
</div>
|
||||
</div>
|
||||
</c:forEach>
|
||||
@@ -5057,14 +5059,14 @@
|
||||
<select class="short"
|
||||
title="일반옵션 마일리지구분코드"
|
||||
style="display: none;" name="mlgAccmlCd_normal" disabled>
|
||||
<option value="02">원</option>
|
||||
<option value="02">` + curUnit + `</option>
|
||||
<option value="01">%</option>
|
||||
</select>
|
||||
<div class="nice-select short disabled"
|
||||
tabindex="0"><span class="current">원</span>
|
||||
tabindex="0"><span class="current">` + curUnit + `</span>
|
||||
<ul class="list">
|
||||
<li data-value=""
|
||||
class="option selected">원
|
||||
class="option selected">` + curUnit + `
|
||||
</li>
|
||||
<li data-value=""
|
||||
class="option">%
|
||||
@@ -5349,7 +5351,7 @@
|
||||
<div class="select-box">
|
||||
<select class="short"
|
||||
title="추가옵션 마일리지적립구분코드" name="mlgAccmlCd_added" disabled>
|
||||
<option value="02">원
|
||||
<option value="02">` + curUnit + `
|
||||
</option>
|
||||
<option value="01">%
|
||||
</option>
|
||||
|
||||
@@ -2977,6 +2977,7 @@
|
||||
<spring:eval expression="@environment.getProperty('spring.servlet.multipart.max-file-size')" var="maxFileSize"/>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.cdnurl')" var="cdnurl"/>
|
||||
<spring:eval expression="@environment.getProperty('currency-unit.default')" var="curUnit"/>
|
||||
<input type="hidden" id="cdnurl" value="${cdnurl}"/>
|
||||
<section id="section01" class="content-section content-scroll-detect content-fold">
|
||||
<div class="content-fold__header">
|
||||
@@ -5071,7 +5072,7 @@
|
||||
</div>
|
||||
<div class="product-group__description">
|
||||
<p><c:out value="${goodsInfo.goodsNm}"/></p>
|
||||
<p class="product-group__description-price"><fmt:formatNumber value="${goodsInfo.slepric}" pattern="#,###"/>원</p>
|
||||
<p class="product-group__description-price"><fmt:formatNumber value="${goodsInfo.slepric}" pattern="#,###"/>${curUnit}</p>
|
||||
</div>
|
||||
</div>
|
||||
</c:forEach>
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
$('#appendList tr').each(function() {
|
||||
const goodsId = $(this).attr('id').replace('choiseListId', '');
|
||||
const goodsOptnInnb = $(this).find('input[name="goodsOptnInnb"]').val();
|
||||
const optnTy = $(this).find('input[name="optnTy"]').val();
|
||||
const goodsImg = $(this).find('input[name="goodsImgCours"]').val();
|
||||
const goodsNm = $(this).find('input[name="goodsNm"]').val();
|
||||
const goodsPrice = $(this).find('input[name="slepric"]').val();
|
||||
@@ -32,6 +34,8 @@
|
||||
if (goodsId) {
|
||||
selectedGoods.push({
|
||||
goodsId: goodsId,
|
||||
goodsOptnInnb: goodsOptnInnb,
|
||||
optnTy: optnTy,
|
||||
goodsImg: goodsImg,
|
||||
goodsNm: goodsNm,
|
||||
goodsPrice: goodsPrice,
|
||||
@@ -46,6 +50,8 @@
|
||||
var copyTr = $(this).clone();
|
||||
|
||||
var goodsId = $(this).find('input[name="goodsInnb"]').val();
|
||||
var goodsOptnInnb = $(this).find('input[name="goodsOptnInnb"]').val();
|
||||
var optnTy = $(this).find('input[name="optnTy"]').val();
|
||||
var goodsImg = $(this).find('input[name="goodsImgCours"]').val();
|
||||
var goodsNm = $(this).find('input[name="goodsNm"]').val();
|
||||
var goodsPrice = $(this).find('input[name="slepric"]').val();
|
||||
@@ -75,6 +81,8 @@
|
||||
|
||||
selectedGoods.push({
|
||||
goodsId: goodsId,
|
||||
goodsOptnInnb: goodsOptnInnb,
|
||||
optnTy: optnTy,
|
||||
goodsImg: goodsImg,
|
||||
goodsNm: goodsNm,
|
||||
goodsPrice: goodsPrice,
|
||||
@@ -151,6 +159,8 @@
|
||||
<tr class="searchList">
|
||||
<td class="text-left">
|
||||
<input type="hidden" id="goodsInnb" name="goodsInnb" value="<c:out value="${ list.goodsInnb }"/>"/>
|
||||
<input type="hidden" id="goodsOptnInnb" name="goodsOptnInnb" value="<c:out value="${ list.goodsOptnInnb }"/>"/>
|
||||
<input type="hidden" id="optnTy" name="optnTy" value="<c:out value="${ list.optnTy }"/>"/>
|
||||
<input type="hidden" id="goodsImgCours" name="goodsImgCours" value="<c:out value="${cdnurl}${ list.goodsImgCours }"/>"/>
|
||||
<input type="hidden" id="goodsNm" name="goodsNm" value="<c:out value="${ list.goodsNm }"/>"/>
|
||||
<input type="hidden" id="slepric" name="slepric" value="<fmt:parseNumber value="${ list.slepric }"/>"/>
|
||||
|
||||
877
src/main/webapp/WEB-INF/views/mngr/goods/subsvc/SubsvcC.jsp
Normal file
877
src/main/webapp/WEB-INF/views/mngr/goods/subsvc/SubsvcC.jsp
Normal file
@@ -0,0 +1,877 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui" %>
|
||||
<%@ taglib prefix="f" uri="/WEB-INF/tlds/f.tld" %>
|
||||
|
||||
<%--
|
||||
Class Name : SubsvcU.jsp
|
||||
Description : 구독서비스 상세
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2026-01-27 jazz 최초생성
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>일반 관리자</title>
|
||||
<%-- 공통 include --%>
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Include.jsp"%>
|
||||
</head>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
//페이지 로드 시 숫자 인풋 정규화( 3자리 컴마)
|
||||
$('.input-text.number').each(function () {
|
||||
var input = $(this).val();
|
||||
$(this).val(input.replace(/[^0-9]/g, "").replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));
|
||||
});
|
||||
|
||||
const expsrSetTable = document.getElementById('expsrSet');
|
||||
//노출예약 체크되어있을 경우 enable 처리
|
||||
if($("input[name='expsrDvCd']:checked").val() ==='03'){
|
||||
enableTableInputs(expsrSetTable)
|
||||
}
|
||||
|
||||
const sopmalCd = $('#sopmalCd').val()
|
||||
fn_create_ckeditor('#subsvcDc', sopmalCd); //상세 설명 > 상품 설명 ck에디터 적용
|
||||
fn_create_ckeditor('#mblSubsvcDc', sopmalCd); // 모바일용 상세 설명 > 모바일용 상품 설명 ck에디터 적용
|
||||
/* 모바일용 상세 설명 설정 이벤트 */
|
||||
fn_handleMblSubsvcDcPcSameAt();
|
||||
|
||||
//모바일용 상세 설명 설정 이벤트 설정
|
||||
$('[name="mblSubsvcDcPcSameAt"]').on('change', fn_handleMblSubsvcDcPcSameAt);
|
||||
|
||||
//실판매가 자동계산 이벤트 등록
|
||||
$('[name="dlvyCnt"]').on('change', fn_cal_selpric);
|
||||
$('[name="subsvcCt"]').on('change', fn_cal_selpric);
|
||||
$('[name="tmeDlvyAmt"]').on('change', fn_cal_selpric);
|
||||
|
||||
//재고변경 시 가용재고 계산
|
||||
$('#invntryQy').on('change', fn_cal_availQt);
|
||||
//구독서비스명 변경 시 중복체크 초기화
|
||||
$('#subsvcNm').on('change', fn_initDupCheck);
|
||||
});
|
||||
|
||||
//숫자 인풋 포커스시 0 제거
|
||||
$(document).on("focus", '.input-text.number',function () {
|
||||
if(fn_nvl($(this).val(), '0') === '0'){
|
||||
$(this).val('');
|
||||
}
|
||||
});
|
||||
|
||||
//재고와 상관없이 판매일 경우 옵션재고 disabled
|
||||
$(document).on('change', 'input[name="invntryPolicyCd"]',function () {
|
||||
|
||||
let normalQy = $('input[name="invntryQy_normal"]');
|
||||
let invntryQy = $('input[name="invntryQy_invntry"]');
|
||||
let addeddQy = $('input[name="invntryQy_added"]');
|
||||
|
||||
if($(this).val() === '02'){
|
||||
normalQy.prop('disabled', true)
|
||||
invntryQy.prop('disabled', true)
|
||||
addeddQy.prop('disabled', true)
|
||||
}else{
|
||||
normalQy.prop('disabled', false)
|
||||
invntryQy.prop('disabled', false)
|
||||
addeddQy.prop('disabled', false)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
//예약 판매설정 체크 해제시 예약상품 배송일자, 안내문구 빈값 처리
|
||||
$(document).on('click', '#goodsExpsrTy02', function () {
|
||||
if(!$(this).prop('checked')){
|
||||
$('#resveGoods input').val('')
|
||||
}
|
||||
})
|
||||
|
||||
//노출여부 노출예약이 아닐경우 노출 정보 빈값 처리
|
||||
$(document).on('click', 'input[name="expsrDvCd"]', function () {
|
||||
const target = $('#expsrDvCd3')
|
||||
if($(this).attr('id') !== target.attr('id')){
|
||||
$('#expsrSet input').val('')
|
||||
}
|
||||
})
|
||||
|
||||
//재고와 상관없이 판매일 경우 가용재고제한수량 빈값처리
|
||||
$(document).on('click', '#invntryPolicyCd2', function () {
|
||||
$('#avlinvLmttQy').val('')
|
||||
})
|
||||
|
||||
/* ********************************************************
|
||||
* 모바일용 상세설명 설정 enable-disable
|
||||
******************************************************** */
|
||||
function fn_handleMblSubsvcDcPcSameAt() {
|
||||
if($('[name="mblSubsvcDcPcSameAt"]:checked').val() === 'Y'){
|
||||
$('.mobileSubsvcCn').hide();
|
||||
}else{
|
||||
$('.mobileSubsvcCn').show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* ********************************************************
|
||||
* 노출여부 enable-disable
|
||||
******************************************************** */
|
||||
function handleRadioClick2(radio) {
|
||||
//노출쳬약 객체
|
||||
const lastRadio = document.querySelector('#expsrDvCd3');
|
||||
const table = document.getElementById('expsrSet');
|
||||
|
||||
if (radio === lastRadio) {
|
||||
enableTableInputs(table);
|
||||
} else {
|
||||
disableTableInputs(table);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 재고에 따른 판매 enable-disable
|
||||
******************************************************** */
|
||||
function handleRadioClickDisable(radio) {
|
||||
const firstRadio = document.querySelector('input[name="invntryPolicyCd"]:first-of-type');
|
||||
const inputText = document.getElementById('avlinvLmttQy');
|
||||
|
||||
if (radio === firstRadio) {
|
||||
inputText.disabled = false;
|
||||
} else {
|
||||
inputText.disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* enable-disable
|
||||
******************************************************** */
|
||||
function enableTableInputs(table) {
|
||||
const inputs = table.querySelectorAll('input');
|
||||
inputs.forEach(input => input.disabled = false);
|
||||
}
|
||||
|
||||
function disableTableInputs(table) {
|
||||
const inputs = table.querySelectorAll('input');
|
||||
inputs.forEach(input => input.disabled = true);
|
||||
}
|
||||
|
||||
function convertToDate(dateStr) {
|
||||
// 입력된 문자열을 Date 객체로 변환
|
||||
const date = new Date(dateStr);
|
||||
// 유효하지 않은 날짜인 경우 null 반환
|
||||
if (isNaN(date.getTime())) {
|
||||
return null;
|
||||
}
|
||||
return date;
|
||||
}
|
||||
|
||||
//시간을 분으로 변경하는 함수
|
||||
function timeToMinutes(timeStr) {
|
||||
// 시간과 분을 ':'를 기준으로 분리
|
||||
const [hours, minutes] = timeStr.split(':').map(Number);
|
||||
// 시간을 분으로 변환
|
||||
return hours * 60 + minutes;
|
||||
}
|
||||
|
||||
//마지막 컴마 지우기
|
||||
const remove_Last_Comma = function removeLastComma(str) {
|
||||
const lastCommaIndex = str.lastIndexOf(',');
|
||||
if (lastCommaIndex !== -1) {
|
||||
return str.substring(0, lastCommaIndex);
|
||||
} else {
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
const fn_create_input = function (type, name, value, tgtForm) {
|
||||
const input = document.createElement('input');
|
||||
input.setAttribute("type", type);
|
||||
input.setAttribute("name", name);
|
||||
input.setAttribute("value", value);
|
||||
tgtForm.appendChild(input);
|
||||
}
|
||||
|
||||
|
||||
/* ********************************************************
|
||||
* 리스트 바로가기
|
||||
******************************************************** */
|
||||
const fn_select_list = function () {
|
||||
const url = '<c:url value="/mngr/goods/subsvc/selectSubsvcListForm"/>';
|
||||
|
||||
$('#subsvcForm').attr('action', url);
|
||||
$('#subsvcForm').attr('method', 'post');
|
||||
$('#subsvcForm').submit();
|
||||
};
|
||||
|
||||
//모든 컴마 삭제 및 문자를 숫자로 변환
|
||||
const fn_comma_del_str_to_number = function (str) {
|
||||
|
||||
// null이나 undefined인 경우 0을 반환
|
||||
if (str === null || str === undefined || str.trim() === '') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 쉼표를 제거하고 숫자로 변환
|
||||
const numberWithoutCommas = str.replace(/,/g, '');
|
||||
const number = parseFloat(numberWithoutCommas);
|
||||
|
||||
// 변환된 값이 NaN인 경우 0을 반환
|
||||
if (isNaN(number)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return number;
|
||||
|
||||
}
|
||||
|
||||
/* 에러메세지 처리 */
|
||||
const fn_proc_error_message = function(data) {
|
||||
$('#overlay').fadeOut();
|
||||
|
||||
if (!data.responseJSON.resBody.message) {
|
||||
alert('<spring:message code="error.internal-server"/>');
|
||||
} else {
|
||||
if (fn_check_json(data.responseJSON.resBody.message)) {
|
||||
const errorObject = JSON.parse(data.responseJSON.resBody.message);
|
||||
|
||||
if (!errorObject) {
|
||||
alert('<spring:message code="error.internal-server"/>');
|
||||
} else {
|
||||
if (!errorObject.errorMsg) {
|
||||
alert('<spring:message code="error.internal-server"/>');
|
||||
} else {
|
||||
alert(errorObject.errorMsg);
|
||||
|
||||
let isMtched = false;
|
||||
|
||||
$('.main').eq(0).find('input, select, textarea').each(function () {
|
||||
for (let idx = 0; idx < errorObject.errorFields.length; idx++) {
|
||||
const name = $(this).prop('name');
|
||||
|
||||
if (!fn_is_empty(name)) {
|
||||
if (errorObject.errorFields[idx].indexOf(name) >= 0) {
|
||||
isMtched = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isMtched) {
|
||||
$(this).focus();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (data.responseJSON.resBody.message) {
|
||||
alert(data.responseJSON.resBody.message);
|
||||
} else {
|
||||
alert('<spring:message code="error.internal-server"/>');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//상품이미지 삭제
|
||||
const deleteFileImg = function (obj) {
|
||||
$("#delImg").val($("#img").val());
|
||||
|
||||
$(obj).parent('div.file-preview').parent('div.file-preview__container').remove()
|
||||
}
|
||||
|
||||
/*실판매가 자동계산*/
|
||||
const fn_cal_selpric = function(){
|
||||
var dlvyCnt = $('#dlvyCnt'); //배송횟수
|
||||
var subsvcCt = $('#subsvcCt'); //구독료
|
||||
var tmeDlvyAmt = $('#tmeDlvyAmt'); //1회 배송비
|
||||
var selpric = $('#selpric'); //1회 배송비
|
||||
selpric.val(((Number(dlvyCnt.val().replace(/,/g, '')) * Number(tmeDlvyAmt.val().replace(/,/g, ''))) + Number(subsvcCt.val().replace(/,/g, ''))).toLocaleString());
|
||||
}
|
||||
|
||||
/*가용재고 자동계산*/
|
||||
const fn_cal_availQt = function(){
|
||||
var invntryQy = $('#invntryQy');
|
||||
var usefulInvntryQy = $('#usefulInvntryQy');
|
||||
var availQt = $('#availQt');
|
||||
availQt.val(Number(invntryQy.val().replace(/,/g, '')) - Number(usefulInvntryQy.val().replace(/,/g, '')));
|
||||
}
|
||||
|
||||
/** 중복체크 초기화*/
|
||||
const fn_initDupCheck = function (){
|
||||
$('#dupCheck').val('false');
|
||||
}
|
||||
|
||||
/** 제약조건 체크 */
|
||||
const validate = function(){
|
||||
var retVal = true;
|
||||
//에디터내용을 textarea로 복사
|
||||
var subsvcDc = $('#subsvcDc');
|
||||
subsvcDc.val(fn_get_editor_data('#subsvcDc'));
|
||||
|
||||
//구독서비스명 중복확인
|
||||
var dupCheck = $('#dupCheck');
|
||||
if(typeof dupCheck.val() != 'undefined' && dupCheck.val() == 'false'){
|
||||
alert('구독서비스명 중복확인이 필요합니다.');
|
||||
return false;
|
||||
}
|
||||
// 텍스트 입력 내용중 필수 항목 체크
|
||||
$(':text[required]').each(function () {
|
||||
if($(this).hasClass('number')){
|
||||
if ($(this).val().trim() == '' || $(this).val().trim() == '0') {
|
||||
alert($(this).prop('title')+"은(는) 필수입니다");
|
||||
$(this).focus();
|
||||
retVal = false;
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
if ($(this).val().trim() == '') {
|
||||
alert($(this).prop('title')+"은(는) 필수입니다");
|
||||
$(this).focus();
|
||||
retVal = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
if(!retVal){
|
||||
return retVal;
|
||||
}
|
||||
|
||||
//노출예약 인 경우 노출기간 필수
|
||||
if($('input[name="expsrDvCd"]:checked').val() == '03'){
|
||||
if($('#expsrBgnDt_dt').val().trim() == ''){
|
||||
alert($('#expsrBgnDt_dt').prop('title')+"은(는) 노출여부가 노출예약인 경우 필수입니다");
|
||||
$('#expsrBgnDt_dt').focus();
|
||||
return false;
|
||||
}
|
||||
if($('#expsrBgnDt_time').val().trim().replaceAll(':','') == ''){
|
||||
alert($('#expsrBgnDt_time').prop('title')+"은(는) 노출여부가 노출예약인 경우 필수입니다");
|
||||
$('#expsrBgnDt_time').focus();
|
||||
return false;
|
||||
}
|
||||
if($('#expsrEndDt_dt').val().trim() == ''){
|
||||
alert($('#expsrEndDt_dt').prop('title')+"은(는) 노출여부가 노출예약인 경우 필수입니다");
|
||||
$('#expsrEndDt_dt').focus();
|
||||
return false;
|
||||
}
|
||||
if($('#expsrEndDt_time').val().trim().replaceAll(':','') == ''){
|
||||
alert($('#expsrEndDt_time').prop('title')+"은(는) 노출여부가 노출예약인 경우 필수입니다");
|
||||
$('#expsrEndDt_time').focus();
|
||||
return false;
|
||||
}
|
||||
// 노출기간 셋팅
|
||||
const expsrBgnDt = $('#expsrBgnDt_dt').val() + ' ' +$('#expsrBgnDt_time').val() +':00'
|
||||
const expsrEndDt = $('#expsrEndDt_dt').val() + ' ' +$('#expsrEndDt_time').val() +':00'
|
||||
|
||||
$('#expsrBgnDt').val(expsrBgnDt);
|
||||
$('#expsrEndDt').val(expsrEndDt);
|
||||
}
|
||||
|
||||
//재고가 있으면 판매인 경우 개수 품절처리 필수
|
||||
if($('input[name="invntryPolicyCd"]:checked').val() == '01'){
|
||||
if($('#avlinvLmttQy').val() == ''){
|
||||
alert($('#avlinvLmttQy').prop('title')+"은(는) 노출여부가 노출예약인 경우 필수입니다");
|
||||
$('#avlinvLmttQy').focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//이미지 필수 체크
|
||||
if(imgDropzone.files.length != 1){
|
||||
if(imgDropzone.files.length == 0){
|
||||
alert("대표이미지(섬네일)은(는) 필수입니다");
|
||||
}else{
|
||||
alert("대표이미지(섬네일)은(는) 1개만 등록가능합니다");
|
||||
}
|
||||
$('#img-dropzone')[0].scrollIntoView();
|
||||
// $('#img-dropzone').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
//상품설명 필수체크
|
||||
if(subsvcDc.val() == ''){
|
||||
alert(subsvcDc.prop('title')+"은(는) 필수입니다");
|
||||
CKEditorArray['#subsvcDc'].editing.view.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
//PC와 모바일 다르게 설정인 경우 모바일 상품설명 필수
|
||||
if($('input[name="mblSubsvcDcPcSameAt"]:checked').val() == 'N'){
|
||||
var mblSubsvcDc = $('#mblSubsvcDc');
|
||||
mblSubsvcDc.val(fn_get_editor_data('#mblSubsvcDc'));
|
||||
if(mblSubsvcDc.val().trim() == ''){
|
||||
alert(mblSubsvcDc.prop('title')+"은(는) 필수입니다");
|
||||
CKEditorArray['#mblSubsvcDc'].editing.view.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/** 등록하기*/
|
||||
const fn_updateSubsvc = function (){
|
||||
if(!validate()){
|
||||
return false;
|
||||
}
|
||||
|
||||
const url = '<c:url value="/mngr/goods/subsvc/insertSubsvc"/>';
|
||||
var formData = new FormData($('#subsvcForm')[0]);
|
||||
|
||||
imgDropzone.files.forEach(function(file, index){
|
||||
console.log("file",file);
|
||||
//1개만 등록 되도록
|
||||
if(index == 0){
|
||||
formData.append('files',file);
|
||||
}
|
||||
});
|
||||
|
||||
console.log("formData",formData);
|
||||
|
||||
if (confirm(`구독서비스를 <spring:message code="confirm.common.insert"/>`)) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
enctype: 'multipart/form-data',
|
||||
url: url,
|
||||
data: formData,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function (data) {
|
||||
try{
|
||||
const message = JSON.parse(data.resBody.result).message;
|
||||
if(message == "success"){
|
||||
alert('<spring:message code="success.common.insert"/>');
|
||||
//등록 후 목록화면으로 이동
|
||||
fn_select_list();
|
||||
} else {
|
||||
alert('<spring:message code="fail.common.insert"/>');
|
||||
}
|
||||
}catch (e) {
|
||||
alert('<spring:message code="fail.common.insert"/>');
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
error: function (request, status, error) {
|
||||
alert('<spring:message code="fail.common.insert"/>');
|
||||
console.log(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/** 구독서비스 명칭 중복확인 */
|
||||
fn_subsvcNmDupCheck = function (subsvcNm){
|
||||
const url = '<c:url value="/mngr/goods/subsvc/selectSubsvcNmDupCheck"/>';
|
||||
|
||||
if(subsvcNm.val().trim() == ''){
|
||||
alert('구독서비스명을 입력해주세요.');
|
||||
return false;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: url,
|
||||
data: {
|
||||
'subsvcNm': subsvcNm.val()
|
||||
},
|
||||
success: function (data) {
|
||||
try{
|
||||
const message = JSON.parse(data.resBody.result).message;
|
||||
if(message == "success"){
|
||||
alert('사용가능한 구독서비스입니다.');
|
||||
$('#dupCheck').val('true');
|
||||
//check 컬럼에 true 등록
|
||||
} else {
|
||||
alert('동일한 구독서비스가 있습니다.');
|
||||
$('#dupCheck').val('false');
|
||||
//check 컬럼에 false 등록
|
||||
}
|
||||
}catch (e) {
|
||||
alert('<spring:message code="fail.common.select"/>');
|
||||
//check 컬럼에 false 등록
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
error: function (request, status, error) {
|
||||
alert('<spring:message code="fail.common.select"/>');
|
||||
console.log(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<body>
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Header.jsp"%>
|
||||
<main class="main">
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Left.jsp"%>
|
||||
<div class="content">
|
||||
<div class="content__inner">
|
||||
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
|
||||
<div class="page-title">
|
||||
<h2 class="page-title__title">
|
||||
구독서비스 등록
|
||||
</h2>
|
||||
<div class="page-title__btn-container">
|
||||
<button onclick="fn_select_list();" class="btn outline"><spring:message code="button.list"/></button>
|
||||
<button onclick="fn_updateSubsvc();return false;" class="btn primary"><spring:message code="button.insert"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<form id="subsvcForm" method="post" action="" enctype="multipart/form-data">
|
||||
<input type="hidden" id="subsvcInnb" name="subsvcInnb" value="">
|
||||
<input type="hidden" id="sopmalCd" name="sopmalCd" value="${resultMap.paramVO.sopmalCd}">
|
||||
<input type="hidden" id="srchSelSubsvcNm" name="srchSelSubsvcNm" value="${resultMap.paramVO.srchSelSubsvcNm}">
|
||||
<input type="hidden" id="srchSubsvcNm" name="srchSubsvcNm" value="${resultMap.paramVO.srchSubsvcNm}">
|
||||
<input type="hidden" id="srchSelSubsvcGnr" name="srchSelSubsvcGnr" value="${resultMap.paramVO.srchSelSubsvcGnr}">
|
||||
<input type="hidden" id="srchSubsvcGnrNm" name="srchSubsvcGnrNm" value="${resultMap.paramVO.srchSubsvcGnrNm}">
|
||||
<c:forEach items="${resultMap.paramVO.srchArrSubsvcSttusCd}" var="srchSubsvcSttusCd" varStatus="status">
|
||||
<input type="hidden" id="srchArrSubsvcSttusCd${status.count}" name="srchArrSubsvcSttusCd" value="${srchSubsvcSttusCd}">
|
||||
</c:forEach>
|
||||
<input type="hidden" id="srchExpsrDvCd" name="srchExpsrDvCd" value="${resultMap.paramVO.srchExpsrDvCd}">
|
||||
<input type="hidden" id="sortDv" name="sortDv" value="${resultMap.paramVO.sortDv}">
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="${ resultMap.paramVO.pageIndex }"/>
|
||||
<input type="hidden" id="pageUnit" name="pageUnit" value="${ resultMap.paramVO.pageUnit }">
|
||||
<input type="hidden" id="delImg" name="delImg" value="">
|
||||
<input type="hidden" id="expsrBgnDt" name="expsrBgnDt" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.expsrBgnDt}</c:if>">
|
||||
<input type="hidden" id="expsrEndDt" name="expsrEndDt" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.expsrBgnDt}</c:if>">
|
||||
<input type="hidden" id="usefulInvntryQy" name="usefulInvntryQy" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.usefulInvntryQy}</c:if>">
|
||||
<spring:eval expression="@environment.getProperty('spring.servlet.multipart.max-file-size')" var="maxFileSize"/>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.cdnurl')" var="cdnurl"/>
|
||||
<input type="hidden" id="cdnurl" value="${cdnurl}"/>
|
||||
|
||||
<section id="section01" class="content-section content-scroll-detect content-fold">
|
||||
<div class="content-fold__header">
|
||||
<h3 class="content-section__title">기본정보</h3>
|
||||
<button class="content-fold__btn"><span class="visually-hidden">접기</span></button>
|
||||
</div>
|
||||
<div class="content-fold__content">
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>기본정보</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 38%">
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 38%">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>구독서비스명<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text lg" type="text" title="구독서비스명" id="subsvcNm" name="subsvcNm" maxlength="100" value="${resultMap.subsvcDtl.subsvcNm}" <c:if test='${resultMap.subsvcDtl != null}'>readonly</c:if> required>
|
||||
<c:if test='${resultMap.subsvcDtl == null}'>
|
||||
<button type="button" id="dupCheckButton" onclick="fn_subsvcNmDupCheck($('#subsvcNm'));return false;" class="btn xsm gray ml-5">중복확인</button>
|
||||
<input type="hidden" id="dupCheck" name="dupCheck" value="false">
|
||||
</c:if>
|
||||
</div>
|
||||
</td>
|
||||
<th>구독기간<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xsm number text-right" type="text" title="구독기간" id="subPd" name="subPd" maxlength="3" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.subPd}</c:if>" required> 개월
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>기수</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xsm number text-right" type="text" title="기수" id="subsvcGnr" name="subsvcGnr" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.subsvcNextGnr}</c:if><c:if test='${resultMap.subsvcDtl == null}'>1</c:if>" readonly> 기
|
||||
</div>
|
||||
</td>
|
||||
<th>기수명<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text lg" type="text" title="기수명" id="subsvcGnrNm" name="subsvcGnrNm" maxlength="80" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.subsvcGnrNm}</c:if>" required>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>배송횟수<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xsm number text-right" type="text" title="배송횟수" id="dlvyCnt" name="dlvyCnt" maxlength="3" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.dlvyCnt}</c:if>" required> 회
|
||||
</div>
|
||||
</td>
|
||||
<th>배송주기<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text sm" type="text" title="배송주기" id="dlvyCycle" name="dlvyCycle" maxlength="30" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.dlvyCycle}</c:if>" required>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="section02" class="content-section content-scroll-detect content-fold">
|
||||
<div class="content-fold__header">
|
||||
<h3 class="content-section__title">판매정보</h3>
|
||||
<button class="content-fold__btn"><span class="visually-hidden">접기</span></button>
|
||||
</div>
|
||||
<div class="content-fold__content">
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>판매정보</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 38%">
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 38%">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>구독료<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text sm number text-right" type="text" title="구독료" id="subsvcCt" name="subsvcCt" maxlength="11" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.subsvcCt}</c:if>" required> 円(엔)
|
||||
</div>
|
||||
</td>
|
||||
<th>1회 배송비<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text sm number text-right" type="text" title="1회 배송비" id="tmeDlvyAmt" name="tmeDlvyAmt" maxlength="11" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.tmeDlvyAmt}</c:if>" required> 円(엔)
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>소비자가</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text sm number text-right" type="text" title="소비자가" id="cnsmrpric" name="cnsmrpric" maxlength="11" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.cnsmrpric}</c:if>"> 円(엔)
|
||||
</div>
|
||||
</td>
|
||||
<th>실판매가<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text sm number text-right" type="text" title="실판매가" id="selpric" name="selpric" maxlength="11" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.selpric}</c:if>" readonly> 円(엔)
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="section03" class="content-section content-scroll-detect content-fold">
|
||||
<div class="content-fold__header">
|
||||
<h3 class="content-section__title">구독설정</h3>
|
||||
<button type="button" class="content-fold__btn"><span class="visually-hidden">접기</span></button>
|
||||
</div>
|
||||
<div class="content-fold__content">
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>구독설정</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>재고<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text sm number text-right" type="text" title="재고" id="invntryQy" name="invntryQy" maxlength="11" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.invntryQy}</c:if>" required>
|
||||
</div>
|
||||
</td>
|
||||
<th>가용재고</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text sm number text-right" type="text" title="가용재고" id="availQt" maxlength="11" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.availQt}</c:if>" readonly>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>판매 상태</th>
|
||||
<td colspan="2">
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<c:forEach items="${resultMap.subsvcSttusList}" var="subsvcSttus" varStatus="status">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="subsvcSttusCd${status.count}" name="subsvcSttusCd" title="판매 상태" value="${subsvcSttus.cd}" <c:if test="${resultMap.subsvcDtl.subsvcSttusCd eq subsvcSttus.cd}">checked</c:if>/>
|
||||
<label for="subsvcSttusCd${status.count}">${subsvcSttus.cdNm}</label>
|
||||
<input type="hidden" value="${resultMap.subsvcDtl.subsvcSttusCd}" id="subsvcSttusCdChk"/>
|
||||
</div>
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>노출 여부</th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner vertical">
|
||||
<div class="custom-radio-container mt-10">
|
||||
<c:forEach items="${resultMap.expsrDvList}" var="expsrDv" varStatus="status">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="expsrDvCd${status.count}" name="expsrDvCd" title="노출 여부" value="${expsrDv.cd}" onclick="handleRadioClick2(this);" <c:if test="${resultMap.subsvcDtl.expsrDvCd eq expsrDv.cd}">checked</c:if>/>
|
||||
<label for="expsrDvCd${status.count}">${expsrDv.cdNm}</label>
|
||||
<input type="hidden" value="${resultMap.subsvcDtl.expsrDvCd}" id="expsrDvCdChk"/>
|
||||
</div>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div class="table-wrapper mt-10">
|
||||
<table class="table">
|
||||
<caption>노출 기간</caption>
|
||||
<colgroup>
|
||||
<col style="width: 16%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody id="expsrSet">
|
||||
<tr>
|
||||
<th>노출 기간</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input type="text" id="expsrBgnDt_dt" class="datepicker" title="시작 날짜 선택" autocomplete="off" value="${fn:split(resultMap.subsvcDtl.expsrBgnDt,' ')[0]}" disabled>
|
||||
<div class="timepicker-container">
|
||||
<input type="text" class="bs-timepicker" id="expsrBgnDt_time" title="시작 시간 설정" value="${fn:split(fn:split(resultMap.subsvcDtl.expsrBgnDt,' ')[1], ':')[0]}:${fn:split(fn:split(resultMap.subsvcDtl.expsrBgnDt,' ')[1], ':')[1]}" disabled>
|
||||
</div>
|
||||
<span class="tilde">~</span>
|
||||
<input type="text" id="expsrEndDt_dt" class="datepicker" title="종료 날짜 선택" autocomplete="off" value="${fn:split(resultMap.subsvcDtl.expsrEndDt,' ')[0]}" disabled>
|
||||
<div class="timepicker-container">
|
||||
<input type="text" class="bs-timepicker" id="expsrEndDt_time" title="종료 시간 설정" value="${fn:split(fn:split(resultMap.subsvcDtl.expsrEndDt,' ')[1], ':')[0]}:${fn:split(fn:split(resultMap.subsvcDtl.expsrEndDt,' ')[1], ':')[1]}" disabled>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>재고에 따른 판매</th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<c:forEach items="${resultMap.invntryPolicyList}" var="invntryPolicy" varStatus="status">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="invntryPolicyCd${status.count}" name="invntryPolicyCd" value="${invntryPolicy.cd}" onclick="handleRadioClickDisable(this);"<c:if test="${resultMap.subsvcDtl.invntryPolicyCd eq invntryPolicy.cd}">checked</c:if>/>
|
||||
<label for="invntryPolicyCd${status.count}">${invntryPolicy.cdNm}</label>
|
||||
</div>
|
||||
<c:if test="${status.first}">
|
||||
<div>
|
||||
<span class="ml-4">(</span>
|
||||
<input class="input-text number xsm ml-5 right" id="avlinvLmttQy" name="avlinvLmttQy" value="${resultMap.subsvcDtl.avlinvLmttQy}" type="text" title="해당 인풋에 대한 설명" <c:if test="${resultMap.subsvcDtl.invntryPolicyCd eq '02'}"> disabled</c:if> />
|
||||
개 이하 일 때 품절 처리
|
||||
<span class="ml-4">)</span>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="section07" class="content-section content-scroll-detect content-fold">
|
||||
<div class="content-fold__header">
|
||||
<h3 class="content-section__title">구독서비스 설명</h3>
|
||||
<button class="content-fold__btn"><span class="visually-hidden">접기</span></button>
|
||||
</div>
|
||||
<div class="content-fold__content">
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>구독서비스 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>대표이미지(썸네일) 등록<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner vertical">
|
||||
<div class="dropzone-wrapper">
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<div class="dropzone" id="img-dropzone">
|
||||
</div><p class="fyi gray-7 mt-15">1개의 이미지만 등록가능합니다.</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>상품 설명<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner"><textarea class="textarea" title="상품 설명" cols="30" rows="10" id="subsvcDc" name="subsvcDc">${resultMap.subsvcDtl.subsvcDc}</textarea>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>모바일용 상세 설명 설정</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container mr-5">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="mblSubsvcDcPcSameAt1" name="mblSubsvcDcPcSameAt" value="Y" <c:if test="${ resultMap.subsvcDtl.mblSubsvcDcPcSameAt eq 'Y'}">checked</c:if>>
|
||||
<label for="mblSubsvcDcPcSameAt1">PC와 동일</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="mblSubsvcDcPcSameAt2" name="mblSubsvcDcPcSameAt" value="N" <c:if test="${ resultMap.subsvcDtl.mblSubsvcDcPcSameAt eq 'N'}">checked</c:if>>
|
||||
<label for="mblSubsvcDcPcSameAt2">PC와 모바일 다르게 설정</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="mobileSubsvcCn">
|
||||
<th>모바일용 상세 설명<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner"><textarea class="textarea" title="모바일용 상품 설명" cols="30" rows="10" id="mblSubsvcDc" name="mblSubsvcDc">${resultMap.subsvcDtl.mblSubsvcDc}</textarea>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="modalDiv">
|
||||
|
||||
</div>
|
||||
<%--관리자 수정이력 내역보기 모달 --%>
|
||||
<div id="logDiv"></div>
|
||||
</main>
|
||||
<script>
|
||||
// Dropzone 파일업로드
|
||||
if ($("#img-dropzone").length > 0) {
|
||||
Dropzone.autoDiscover = false;
|
||||
var imgDropzone = new Dropzone("#img-dropzone", {
|
||||
url: "/file-upload",
|
||||
maxFiles: 1,
|
||||
maxFilesize: 20,
|
||||
autoProcessQueue: false,
|
||||
addRemoveLinks: true,
|
||||
dictDefaultMessage: "클릭하거나 파일을 여기로 드래그하세요",
|
||||
dictRemoveFile: "삭제",
|
||||
acceptedFiles: "${acceptFileExtensions}",
|
||||
dictCancelUpload: "취소",
|
||||
dictCancelUploadConfirmation: "업로드를 취소하시겠습니까?",
|
||||
dictInvalidFileType: "이 파일은 업로드할 수 없습니다.",
|
||||
dictFileTooBig: "파일이 너무 큽니다. ({{filesize}}MB). 최대 파일 크기: {{maxFilesize}}MB.",
|
||||
dictMaxFilesExceeded: "파일을 더 이상 추가할 수 없습니다.",
|
||||
dictResponseError: "서버에서 응답을 받지 못했습니다.",
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
137
src/main/webapp/WEB-INF/views/mngr/goods/subsvc/SubsvcList.jsp
Normal file
137
src/main/webapp/WEB-INF/views/mngr/goods/subsvc/SubsvcList.jsp
Normal file
@@ -0,0 +1,137 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui" %>
|
||||
<%@ taglib prefix="f" uri="/WEB-INF/tlds/f.tld" %>
|
||||
|
||||
<%--
|
||||
Class Name : SubsvcList.jsp
|
||||
Description : 구독서비스 목록 조회 리스트
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2026-02-05 jazz 최초 생성
|
||||
--%>
|
||||
<section class="content-section">
|
||||
<div class="form-control-container">
|
||||
<div class="left">
|
||||
<div class="search-number">
|
||||
<span class="search-number__text">총 <strong><c:out value="${ resultMap.paginationInfo.totalRecordCount }"/></strong>건</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="select-box">
|
||||
<select title="정렬순" name="sortDvView" id="sortDvView" onchange="fn_select_list(1);return false;">
|
||||
<option value="subsvcGnrAsc" <c:if test="${resultMap.paramVO.sortDv eq 'subsvcGnrAsc'}">selected="selected"</c:if>>구독서비스+기수 오름차순</option>
|
||||
<option value="subsvcGnrDesc" <c:if test="${resultMap.paramVO.sortDv eq 'subsvcGnrDesc'}">selected="selected"</c:if>>구독서비스+기수 내림차순</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="select-box">
|
||||
<select id="pageUnitView" name="pageUnitView" title="페이지당 출력될 목록건수" onchange="fn_select_list(1,this.value);return false;">
|
||||
<c:forEach items="${ resultMap.paginationInfo.pageUnitArr }" var="pageUnit" varStatus="pageUnitStatus">
|
||||
<option value="<c:out value="${ pageUnit }"/>"
|
||||
<c:if test="${ resultMap.paginationInfo.recordCountPerPage eq pageUnit}">selected="selected"</c:if>>
|
||||
<c:out value="${ pageUnit }"/>개씩
|
||||
</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="horizontal-line">
|
||||
<div class="form-control-container">
|
||||
<div class="left">
|
||||
<button class="btn dark sm" onclick="fn_delete_check();return false;">선택 삭제</button>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
</div>
|
||||
<hr class="spacing">
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical">
|
||||
<caption>구독서비스 목록</caption>
|
||||
<colgroup>
|
||||
<col style="width: 4%;">
|
||||
<col style="width: 4%;">
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 6%;">
|
||||
<col style="width: 6%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 7%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="b-checkbox checkbox is-medium">
|
||||
<input type="checkbox" id="checkAll" value="">
|
||||
<span class="check"></span>
|
||||
</label>
|
||||
</th>
|
||||
<th>번호</th>
|
||||
<th>구독서비스</th>
|
||||
<th>기수</th>
|
||||
<th>기수명</th>
|
||||
<th>배송횟수</th>
|
||||
<th>재고</th>
|
||||
<th>가용재고</th>
|
||||
<th>판매상태</th>
|
||||
<th>노출여부</th>
|
||||
<th>구독료</th>
|
||||
<th>1회배송비</th>
|
||||
<th>소비자가</th>
|
||||
<th>실판매가</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.list }">
|
||||
<c:forEach items="${ resultMap.list }" var="subsvc" varStatus="status">
|
||||
<tr>
|
||||
<td>
|
||||
<label class="b-checkbox checkbox is-medium check-all">
|
||||
<input type="checkbox" name="arrSubsvcInnb" class="subsvcInnb" value="${subsvc.subsvcInnb}">
|
||||
<span class="check"></span>
|
||||
</label>
|
||||
</td>
|
||||
<td><c:out value="${ resultMap.paginationInfo.totalRecordCount - subsvc.rnum + 1 }" /></td>
|
||||
<td><a onclick="fn_move_subsvc_dtl(<c:out value="${subsvc.subsvcInnb}"/>)" class="under-line"><c:out value="${subsvc.subsvcNm}"/></a></td>
|
||||
<td><c:out value="${subsvc.subsvcGnr}"/>기 <button class="btn xsm outline" type="button" onclick="fn_move_subsvc_copy(<c:out value="${subsvc.subsvcInnb}"/>)"><spring:message code="button.copy"/> </button></td>
|
||||
<td><c:out value="${subsvc.subsvcGnrNm}"/></td>
|
||||
<td><c:out value="${subsvc.dlvyCnt}"/>회</td>
|
||||
<td><fmt:formatNumber value="${subsvc.invntryQy}" pattern="#,###"/></td>
|
||||
<td><fmt:formatNumber value="${subsvc.availQt}" pattern="#,###"/></td>
|
||||
<td><c:out value="${subsvc.subsvcSttus}"/></td>
|
||||
<td><c:out value="${subsvc.expsrDv}"/></td>
|
||||
<td><fmt:formatNumber value="${subsvc.subsvcCt}" pattern="#,###"/></td>
|
||||
<td><fmt:formatNumber value="${subsvc.tmeDlvyAmt}" pattern="#,###"/></td>
|
||||
<td><fmt:formatNumber value="${subsvc.cnsmrpric}" pattern="#,###"/></td>
|
||||
<td><fmt:formatNumber value="${subsvc.selpric}" pattern="#,###"/></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td colspan="100%"><spring:message code="common.nodata"/></td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="pagination__container">
|
||||
<ui:pagination paginationInfo="${resultMap.paginationInfo}" type="image" jsFunction="fn_select_list"/>
|
||||
</div>
|
||||
@@ -0,0 +1,449 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui" %>
|
||||
<%@ taglib prefix="f" uri="/WEB-INF/tlds/f.tld" %>
|
||||
|
||||
<%--
|
||||
Class Name : SubsvcListForm.jsp
|
||||
Description : 구독서비스 목록 조회 폼
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2026-02-05 jazz 최초 생성
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>일반 관리자</title>
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Include.jsp"%>
|
||||
|
||||
</head>
|
||||
<script>
|
||||
var initFlag = true;
|
||||
$(document).ready(function () {
|
||||
let pageIndex = $("#pageIndex").val();
|
||||
let pageUnit = $("#pageUnit").val();
|
||||
let srchSelSubsvcNm = $('#srchSelSubsvcNm').val();
|
||||
// event 제어
|
||||
fn_event();
|
||||
|
||||
if(srchSelSubsvcNm != ''){
|
||||
fn_getsubsvcGnr(srchSelSubsvcNm);
|
||||
}else{
|
||||
// 목록 조회
|
||||
fn_select_list(pageIndex, pageUnit);
|
||||
}
|
||||
|
||||
// 엔터키 검색
|
||||
$('#listForm').on('keydown', function (event) {
|
||||
if (event.keyCode === 13) {
|
||||
event.preventDefault();
|
||||
fn_select_list(1);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/*********************************************************
|
||||
* 목록 조회
|
||||
******************************************************** */
|
||||
const fn_select_list = function (pageIndex, pageUnit) {
|
||||
let dataStr;
|
||||
|
||||
if (!pageIndex) {
|
||||
$('#pageIndex').val(1);
|
||||
} else {
|
||||
$('#pageIndex').val(pageIndex);
|
||||
}
|
||||
//정렬기준 셋팅
|
||||
if(typeof $('#sortDvView') !== undefined && $('#sortDvView').val() !== undefined){
|
||||
$('#sortDv').val($('#sortDvView').val());
|
||||
}
|
||||
//한페이지 목록개수 셋팅
|
||||
if(typeof $('#pageUnitView') !== undefined && $('#pageUnitView').val() !== undefined){
|
||||
$('#pageUnit').val($('#pageUnitView').val());
|
||||
}
|
||||
|
||||
if (!pageUnit) {
|
||||
dataStr = $('#listForm').serialize();
|
||||
} else {
|
||||
if ($('#pageUnit').length) {
|
||||
$('#pageUnit').val(pageUnit);
|
||||
dataStr = $('#listForm').serialize();
|
||||
} else {
|
||||
dataStr = $('#listForm').serialize() + '&pageUnit=' + pageUnit;
|
||||
}
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<c:url value="/mngr/goods/subsvc/selectSubsvcList"/>",
|
||||
data: dataStr,
|
||||
success: function (resultHtml) {
|
||||
$('#pageDiv').html(resultHtml);
|
||||
$('#sortDv').val($('#sortDvView').val());
|
||||
$('#pageUnitView').niceSelect();
|
||||
$('#sortDvView').niceSelect();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
* 구독서비스 복사 조회
|
||||
*********************************************************/
|
||||
const fn_move_subsvc_copy = (subsvcInnb) => {
|
||||
const url = '<c:url value="/mngr/goods/subsvc/selectSubsvcRegistForm"/>';
|
||||
$('#subsvcInnb').val(subsvcInnb);
|
||||
|
||||
$('#listForm').attr('action', url);
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
* 구독서비스 상세 조회
|
||||
*********************************************************/
|
||||
const fn_move_subsvc_dtl = (subsvcInnb) => {
|
||||
const url = '<c:url value="/mngr/goods/subsvc/selectSubsvcDtlForm"/>';
|
||||
$('#subsvcInnb').val(subsvcInnb);
|
||||
|
||||
$('#listForm').attr('action', url);
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
* 등록폼 이동
|
||||
******************************************************** */
|
||||
const fn_move_regpage = function () {
|
||||
const url = '<c:url value="/mngr/goods/subsvc/selectSubsvcRegistForm"/>';
|
||||
|
||||
$('#listForm').attr('action', url);
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#listForm').submit();
|
||||
};
|
||||
|
||||
/* 현제uri에 프로토콜, 호스트, 쿼리스티링을 제외하여 history갱신 */
|
||||
history.replaceState({}, null, location.pathname);
|
||||
|
||||
/* ****************************
|
||||
* event 제어
|
||||
******************************/
|
||||
const fn_event = function () {
|
||||
/* 검색조건 구독서비스 선택 시 회차 조회 이벤트*/
|
||||
$(document).on('change', '#srchSelSubsvcNm', function(){
|
||||
var srchSelSubsvcNm = $(this).val();
|
||||
if(fn_is_empty(srchSelSubsvcNm)){
|
||||
// 회차 초기화
|
||||
$('#srchSelSubsvcGnr').empty().append('<option value="">전체</option>').niceSelect('update');
|
||||
}else{
|
||||
//해당구독서비스 기수조회
|
||||
fn_getsubsvcGnr(srchSelSubsvcNm);
|
||||
}
|
||||
});
|
||||
|
||||
/* 목록 > 전체선택 체인지 이벤트 */
|
||||
$(document).on('change', '#checkAll', function () {
|
||||
let checkbox = $(this).closest('table').find('input[name="arrSubsvcInnb"]');
|
||||
|
||||
$(checkbox).prop('checked', false);
|
||||
$(checkbox).prop('checked', $(this).is(':checked'));
|
||||
});
|
||||
}
|
||||
|
||||
/* ****************************
|
||||
* 해당구독서비스 기수조회 AJAX
|
||||
******************************/
|
||||
const fn_getsubsvcGnr = function (srchSelSubsvcNm) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<c:url value="/mngr/goods/subsvc/selectSrchSubsvcGnrListAjax"/>',
|
||||
data: {
|
||||
'srchSelSubsvcNm': srchSelSubsvcNm
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.resBody != null) {
|
||||
const result = JSON.parse(data.resBody.result);
|
||||
const srchSubsvcGnrList = result.srchSubsvcGnrList;
|
||||
if (srchSubsvcGnrList.length > 0) {
|
||||
// 회차 초기화
|
||||
$('#srchSelSubsvcGnr').empty().append('<option value="">전체</option>').niceSelect('update');
|
||||
// $('#srchSubsvcGnr option').filter(function() {
|
||||
// return $(this).val() !== '';
|
||||
// }).remove();
|
||||
|
||||
for (let i = 0; i < srchSubsvcGnrList.length; i++) {
|
||||
const srchSubsvcGnr = srchSubsvcGnrList[i];
|
||||
var check = "";
|
||||
if(srchSubsvcGnr.subsvcGnr == '${resultMap.paramVO.srchSelSubsvcGnr}'){
|
||||
check ="selected"
|
||||
}
|
||||
console.log("check:",check," resultMap.paramVO.srchSelSubsvcGnr", '${resultMap.paramVO.srchSelSubsvcGnr}');
|
||||
if(initFlag == true){
|
||||
$('#srchSelSubsvcGnr').append('<option value="' + srchSubsvcGnr.subsvcGnr + '" '+ check+'>' + srchSubsvcGnr.subsvcGnrNm + '</option>');
|
||||
fn_select_list();
|
||||
initFlag = false;
|
||||
}else{
|
||||
$('#srchSelSubsvcGnr').append('<option value="' + srchSubsvcGnr.subsvcGnr + '">' + srchSubsvcGnr.subsvcGnrNm + '</option>');
|
||||
|
||||
}
|
||||
}
|
||||
$('#srchSelSubsvcGnr').niceSelect('update');
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (data) {
|
||||
fn_proc_error_message(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 체크박스 전체 처리
|
||||
* */
|
||||
const fn_change_event = function (_target, _arg) {
|
||||
if (_arg === 'all') {
|
||||
|
||||
if ($('#' + _target + '-all').is(':checked')) {
|
||||
$('[name=' + _target + ']').prop('checked', true);
|
||||
} else {
|
||||
$('[name=' + _target + ']').prop('checked', false);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
let chkCnt = $('[name=' + _target + ']:checked').length;
|
||||
let allCnt = $('[name=' + _target + ']').length;
|
||||
if (chkCnt !== allCnt && $('#' + _target + '-all').is(':checked')) {
|
||||
$('#' + _target + '-all').prop('checked', false);
|
||||
} else if (chkCnt === allCnt) {
|
||||
$('#' + _target + '-all').prop('checked', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
* 구독서비스 선택 삭제 AJAX
|
||||
*********************************************************/
|
||||
const fn_delete_check = function () {
|
||||
|
||||
let url = '<c:url value="/mngr/goods/subsvc/deleteSubsvc"/>';
|
||||
let arrSubsvcInnb = $("input[name='arrSubsvcInnb']:checked");
|
||||
let subsvcInnbArr = [];
|
||||
|
||||
if (arrSubsvcInnb.length === 0) {
|
||||
alert("선택된 상품이 없습니다.");
|
||||
return false;
|
||||
}else{
|
||||
arrSubsvcInnb.each( function (){
|
||||
subsvcInnbArr.push($(this).val());
|
||||
});
|
||||
}
|
||||
|
||||
if (confirm('상품을 <spring:message code="confirm.common.delete"/>')) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: url,
|
||||
data: {
|
||||
"arrSubsvcInnb": subsvcInnbArr
|
||||
},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
const message = JSON.parse(data.resBody.result).message;
|
||||
if(message == "success"){
|
||||
alert('<spring:message code="success.common.delete"/>');
|
||||
fn_select_list();
|
||||
}else{
|
||||
alert('<spring:message code="fail.common.delete"/>');
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* 관리자 주문 > 상품조회 > 검색조건 > 날짜 선택 이벤트 */
|
||||
$(document).on('click', '.dateRange-btn', function () {
|
||||
const date = $(this).attr('id');
|
||||
|
||||
$('.dateRange-btn').removeClass('selected');
|
||||
$('#' + date).addClass('selected');
|
||||
|
||||
const datepicker = $(this).closest('.td-inner').find('.datepicker');
|
||||
const start = $(datepicker[0]).attr('id');
|
||||
const end = $(datepicker[1]).attr('id');
|
||||
|
||||
if ('allDays' === date) {
|
||||
$('#' + start + ', #' + end).val('');
|
||||
|
||||
$('#datePeriod').val(date);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
fn_set_date(start, end, end, date);
|
||||
|
||||
$('#datePeriod').val(date);
|
||||
});
|
||||
|
||||
//카테고리 선택시 카테고리 아이디 저장(검색용)
|
||||
$(document).on('change', 'select[id^=ctgryDepth]', function () {
|
||||
const ctgryOptn = $(this).val()
|
||||
|
||||
if(!fn_is_empty(ctgryOptn)){
|
||||
$('#ctgryId').val(ctgryOptn)
|
||||
}else{
|
||||
//value가 ''인 카테고리 선택할경우
|
||||
let currentCtgryDepth = parseInt($(this).attr('id').replace('ctgryDepth', ''));
|
||||
|
||||
//1차 카테고리가 아닐 경우 이전 카테고리 번호 가져오기
|
||||
if(currentCtgryDepth !== 1){
|
||||
$('#ctgryId').val($('#ctgryDepth' + (currentCtgryDepth - 1)).val())
|
||||
}else{
|
||||
//1차 카테고리 일경우 카테고리 번호 비우기
|
||||
$('#ctgryId').val('')
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
//초기화버튼
|
||||
$(document).on('click', '#resetBtn', function () {
|
||||
$('#listForm')[0].reset();
|
||||
$('#srchSelSubsvcNm').niceSelect('update');
|
||||
$('#srchSelSubsvcNm').trigger("change");
|
||||
$('#srchSelSubsvcGnr').niceSelect('update');
|
||||
|
||||
fn_select_list(1);
|
||||
})
|
||||
|
||||
</script>
|
||||
<body>
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Header.jsp"%>
|
||||
<main class="main">
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Left.jsp"%>
|
||||
<div class="content">
|
||||
<div class="content__inner">
|
||||
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
|
||||
<div class="page-title">
|
||||
<h2 class="page-title__title">구독서비스 목록</h2>
|
||||
<div class="page-title__btn-container">
|
||||
<button onclick="fn_move_regpage()" class="btn primary">구독서비스 <spring:message code="button.insert"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<form id='listForm' name="listForm" method="post" action="<c:url value="/mngr/goods/subsvc/selectSubsvcList"/>">
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="${ resultMap.paramVO.pageIndex }"/>
|
||||
<input type="hidden" id="sortDv" name="sortDv" value="${ resultMap.paramVO.sortDv }">
|
||||
<input type="hidden" id="pageUnit" name="pageUnit" value="${ resultMap.paramVO.pageUnit }">
|
||||
<input type="hidden" id="subsvcInnb" name="subsvcInnb" value="">
|
||||
<section class="content-section" id="search-section">
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<th>구독서비스</th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select title="구독서비스" id="srchSelSubsvcNm" name="srchSelSubsvcNm">
|
||||
<option value="" <c:if test="${ resultMap.paramVO.srchSelSubsvcNm eq ''}">selected="selected"</c:if>>전체</option>
|
||||
<c:forEach items="${resultMap.srchSubsvcList}" var="srchSubsvc" varStatus="status">
|
||||
<option value="${srchSubsvc.subsvcNm}" <c:if test="${ resultMap.paramVO.srchSelSubsvcNm eq srchSubsvc.subsvcNm}">selected="selected"</c:if>>${srchSubsvc.subsvcNm}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div class="select-box">
|
||||
<select title="구독서비스회차" id="srchSelSubsvcGnr" name="srchSelSubsvcGnr">
|
||||
<option value="" <c:if test="${ resultMap.paramVO.srchSelSubsvcGnr eq ''}">selected="selected"</c:if>>전체</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>구독서비스명</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" title="구독서비스명" id="srchSubsvcNm" name="srchSubsvcNm" value="<c:out value="${ resultMap.paramVO.srchSubsvcNm }" />">
|
||||
</div>
|
||||
</td>
|
||||
<th>기수명</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" title="구독서비스명" id="srchSubsvcGnrNm" name="srchSubsvcGnrNm" value="<c:out value="${ resultMap.paramVO.srchSubsvcGnrNm }" />">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>판매상태</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="b-checkbox-container">
|
||||
<label class="b-checkbox checkbox check-all">
|
||||
<input id="srchArrSubsvcSttusCd-all" type="checkbox" name="srchArrSubsvcSttusCd-all" <c:if test="${resultMap.paramVO.srchArrSubsvcSttusCd == null || fn:length(resultMap.paramVO.srchArrSubsvcSttusCd) == 3}" >checked</c:if> value="" onclick="fn_change_event('srchArrSubsvcSttusCd', 'all');">
|
||||
<span class="check"></span>
|
||||
<span class="subsvcSttus-all">전체</span>
|
||||
</label>
|
||||
<c:forEach items="${resultMap.srchSubsvcSttusList}" var="srchSubsvcSttus" varStatus="status">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" name="srchArrSubsvcSttusCd" value="${srchSubsvcSttus.cd}" onclick="fn_change_event('srchArrSubsvcSttusCd', 'other');" <c:if test="${resultMap.paramVO.srchArrSubsvcSttusCd == null || fn:contains(resultMap.paramVO.srchArrSubsvcSttusCd, srchSubsvcSttus.cd) }">checked</c:if>>
|
||||
<span class="check"></span>
|
||||
<span class="control-label">${srchSubsvcSttus.cdNm}</span>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>노출여부</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="srchExpsrDvCd" name="srchExpsrDvCd" value="" <c:if test="${resultMap.paramVO.srchExpsrDvCd eq '' || resultMap.paramVO.srchExpsrDvCd == null}">checked</c:if>>
|
||||
<label for="srchExpsrDvCd">전체</label>
|
||||
</div>
|
||||
<c:forEach items="${resultMap.srchExpsrDvList}" var="srchExpsrDvCd" varStatus="status">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="srchExpsrDvCd${status.count}" name="srchExpsrDvCd" value="${srchExpsrDvCd.cd}"<c:if test="${srchExpsrDvCd.cd eq resultMap.paramVO.srchExpsrDvCd}">checked</c:if>>
|
||||
<label for="srchExpsrDvCd${status.count}">${srchExpsrDvCd.cdNm}</label>
|
||||
</div>
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-control-container">
|
||||
<div class="left"></div>
|
||||
<div class="center">
|
||||
<button class="btn outline" id="resetBtn" type="button">초기화</button>
|
||||
<button class="btn primary" id="searchBtn" type="button" onclick="fn_select_list(1);"><spring:message code="button.search"/> </button>
|
||||
</div>
|
||||
<div class="right">
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div id="pageDiv">
|
||||
</div>
|
||||
</form>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="modalDiv">
|
||||
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
842
src/main/webapp/WEB-INF/views/mngr/goods/subsvc/SubsvcU.jsp
Normal file
842
src/main/webapp/WEB-INF/views/mngr/goods/subsvc/SubsvcU.jsp
Normal file
@@ -0,0 +1,842 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui" %>
|
||||
<%@ taglib prefix="f" uri="/WEB-INF/tlds/f.tld" %>
|
||||
|
||||
<%--
|
||||
Class Name : SubsvcU.jsp
|
||||
Description : 구독서비스 상세
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2026-01-27 jazz 최초생성
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>일반 관리자</title>
|
||||
<%-- 공통 include --%>
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Include.jsp"%>
|
||||
</head>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
//페이지 로드 시 숫자 인풋 정규화( 3자리 컴마)
|
||||
$('.input-text.number').each(function () {
|
||||
var input = $(this).val();
|
||||
$(this).val(input.replace(/[^0-9]/g, "").replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));
|
||||
});
|
||||
|
||||
const expsrSetTable = document.getElementById('expsrSet');
|
||||
//노출예약 체크되어있을 경우 enable 처리
|
||||
if($("input[name='expsrDvCd']:checked").val() ==='03'){
|
||||
enableTableInputs(expsrSetTable)
|
||||
}
|
||||
|
||||
const sopmalCd = $('#sopmalCd').val()
|
||||
fn_create_ckeditor('#subsvcDc', sopmalCd); //상세 설명 > 상품 설명 ck에디터 적용
|
||||
fn_create_ckeditor('#mblSubsvcDc', sopmalCd); // 모바일용 상세 설명 > 모바일용 상품 설명 ck에디터 적용
|
||||
/* 모바일용 상세 설명 설정 이벤트 */
|
||||
fn_handleMblSubsvcDcPcSameAt();
|
||||
|
||||
//모바일용 상세 설명 설정 이벤트 설정
|
||||
$('[name="mblSubsvcDcPcSameAt"]').on('change', fn_handleMblSubsvcDcPcSameAt);
|
||||
|
||||
//실판매가 자동계산 이벤트 등록
|
||||
$('[name="dlvyCnt"]').on('change', fn_cal_selpric);
|
||||
$('[name="subsvcCt"]').on('change', fn_cal_selpric);
|
||||
$('[name="tmeDlvyAmt"]').on('change', fn_cal_selpric);
|
||||
|
||||
$('#invntryQy').on('change', fn_cal_availQt)
|
||||
|
||||
});
|
||||
|
||||
//숫자 인풋 포커스시 0 제거
|
||||
$(document).on("focus", '.input-text.number',function () {
|
||||
if(fn_nvl($(this).val(), '0') === '0'){
|
||||
$(this).val('');
|
||||
}
|
||||
});
|
||||
|
||||
//재고와 상관없이 판매일 경우 옵션재고 disabled
|
||||
$(document).on('change', 'input[name="invntryPolicyCd"]',function () {
|
||||
|
||||
let normalQy = $('input[name="invntryQy_normal"]');
|
||||
let invntryQy = $('input[name="invntryQy_invntry"]');
|
||||
let addeddQy = $('input[name="invntryQy_added"]');
|
||||
|
||||
if($(this).val() === '02'){
|
||||
normalQy.prop('disabled', true)
|
||||
invntryQy.prop('disabled', true)
|
||||
addeddQy.prop('disabled', true)
|
||||
}else{
|
||||
normalQy.prop('disabled', false)
|
||||
invntryQy.prop('disabled', false)
|
||||
addeddQy.prop('disabled', false)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
//예약 판매설정 체크 해제시 예약상품 배송일자, 안내문구 빈값 처리
|
||||
$(document).on('click', '#goodsExpsrTy02', function () {
|
||||
if(!$(this).prop('checked')){
|
||||
$('#resveGoods input').val('')
|
||||
}
|
||||
})
|
||||
|
||||
//노출여부 노출예약이 아닐경우 노출 정보 빈값 처리
|
||||
$(document).on('click', 'input[name="expsrDvCd"]', function () {
|
||||
const target = $('#expsrDvCd3')
|
||||
if($(this).attr('id') !== target.attr('id')){
|
||||
$('#expsrSet input').val('')
|
||||
}
|
||||
})
|
||||
|
||||
//재고와 상관없이 판매일 경우 가용재고제한수량 빈값처리
|
||||
$(document).on('click', '#invntryPolicyCd2', function () {
|
||||
$('#avlinvLmttQy').val('')
|
||||
})
|
||||
|
||||
/* ********************************************************
|
||||
* 모바일용 상세설명 설정 enable-disable
|
||||
******************************************************** */
|
||||
function fn_handleMblSubsvcDcPcSameAt() {
|
||||
if($('[name="mblSubsvcDcPcSameAt"]:checked').val() === 'Y'){
|
||||
$('.mobileSubsvcCn').hide();
|
||||
}else{
|
||||
$('.mobileSubsvcCn').show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* ********************************************************
|
||||
* 노출여부 enable-disable
|
||||
******************************************************** */
|
||||
function handleRadioClick2(radio) {
|
||||
//노출쳬약 객체
|
||||
const lastRadio = document.querySelector('#expsrDvCd3');
|
||||
const table = document.getElementById('expsrSet');
|
||||
|
||||
if (radio === lastRadio) {
|
||||
enableTableInputs(table);
|
||||
} else {
|
||||
disableTableInputs(table);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 재고에 따른 판매 enable-disable
|
||||
******************************************************** */
|
||||
function handleRadioClickDisable(radio) {
|
||||
const firstRadio = document.querySelector('input[name="invntryPolicyCd"]:first-of-type');
|
||||
const inputText = document.getElementById('avlinvLmttQy');
|
||||
|
||||
if (radio === firstRadio) {
|
||||
inputText.disabled = false;
|
||||
} else {
|
||||
inputText.disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* enable-disable
|
||||
******************************************************** */
|
||||
function enableTableInputs(table) {
|
||||
const inputs = table.querySelectorAll('input');
|
||||
inputs.forEach(input => input.disabled = false);
|
||||
}
|
||||
|
||||
function disableTableInputs(table) {
|
||||
const inputs = table.querySelectorAll('input');
|
||||
inputs.forEach(input => input.disabled = true);
|
||||
}
|
||||
|
||||
function convertToDate(dateStr) {
|
||||
// 입력된 문자열을 Date 객체로 변환
|
||||
const date = new Date(dateStr);
|
||||
// 유효하지 않은 날짜인 경우 null 반환
|
||||
if (isNaN(date.getTime())) {
|
||||
return null;
|
||||
}
|
||||
return date;
|
||||
}
|
||||
|
||||
//시간을 분으로 변경하는 함수
|
||||
function timeToMinutes(timeStr) {
|
||||
// 시간과 분을 ':'를 기준으로 분리
|
||||
const [hours, minutes] = timeStr.split(':').map(Number);
|
||||
// 시간을 분으로 변환
|
||||
return hours * 60 + minutes;
|
||||
}
|
||||
|
||||
//마지막 컴마 지우기
|
||||
const remove_Last_Comma = function removeLastComma(str) {
|
||||
const lastCommaIndex = str.lastIndexOf(',');
|
||||
if (lastCommaIndex !== -1) {
|
||||
return str.substring(0, lastCommaIndex);
|
||||
} else {
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
const fn_create_input = function (type, name, value, tgtForm) {
|
||||
const input = document.createElement('input');
|
||||
input.setAttribute("type", type);
|
||||
input.setAttribute("name", name);
|
||||
input.setAttribute("value", value);
|
||||
tgtForm.appendChild(input);
|
||||
}
|
||||
|
||||
|
||||
/* ********************************************************
|
||||
* 리스트 바로가기
|
||||
******************************************************** */
|
||||
const fn_select_list = function () {
|
||||
const url = '<c:url value="/mngr/goods/subsvc/selectSubsvcListForm"/>';
|
||||
|
||||
$('#subsvcForm').attr('action', url);
|
||||
$('#subsvcForm').attr('method', 'post');
|
||||
$('#subsvcForm').submit();
|
||||
};
|
||||
|
||||
//모든 컴마 삭제 및 문자를 숫자로 변환
|
||||
const fn_comma_del_str_to_number = function (str) {
|
||||
|
||||
// null이나 undefined인 경우 0을 반환
|
||||
if (str === null || str === undefined || str.trim() === '') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 쉼표를 제거하고 숫자로 변환
|
||||
const numberWithoutCommas = str.replace(/,/g, '');
|
||||
const number = parseFloat(numberWithoutCommas);
|
||||
|
||||
// 변환된 값이 NaN인 경우 0을 반환
|
||||
if (isNaN(number)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return number;
|
||||
|
||||
}
|
||||
|
||||
/* 에러메세지 처리 */
|
||||
const fn_proc_error_message = function(data) {
|
||||
$('#overlay').fadeOut();
|
||||
|
||||
if (!data.responseJSON.resBody.message) {
|
||||
alert('<spring:message code="error.internal-server"/>');
|
||||
} else {
|
||||
if (fn_check_json(data.responseJSON.resBody.message)) {
|
||||
const errorObject = JSON.parse(data.responseJSON.resBody.message);
|
||||
|
||||
if (!errorObject) {
|
||||
alert('<spring:message code="error.internal-server"/>');
|
||||
} else {
|
||||
if (!errorObject.errorMsg) {
|
||||
alert('<spring:message code="error.internal-server"/>');
|
||||
} else {
|
||||
alert(errorObject.errorMsg);
|
||||
|
||||
let isMtched = false;
|
||||
|
||||
$('.main').eq(0).find('input, select, textarea').each(function () {
|
||||
for (let idx = 0; idx < errorObject.errorFields.length; idx++) {
|
||||
const name = $(this).prop('name');
|
||||
|
||||
if (!fn_is_empty(name)) {
|
||||
if (errorObject.errorFields[idx].indexOf(name) >= 0) {
|
||||
isMtched = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isMtched) {
|
||||
$(this).focus();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (data.responseJSON.resBody.message) {
|
||||
alert(data.responseJSON.resBody.message);
|
||||
} else {
|
||||
alert('<spring:message code="error.internal-server"/>');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//상품이미지 삭제
|
||||
const deleteFileImg = function (obj) {
|
||||
$("#delImg").val($("#img").val());
|
||||
|
||||
$(obj).parent('div.file-preview').parent('div.file-preview__container').remove()
|
||||
}
|
||||
|
||||
/*실판매가 자동계산*/
|
||||
const fn_cal_selpric = function(){
|
||||
var dlvyCnt = $('#dlvyCnt'); //배송횟수
|
||||
var subsvcCt = $('#subsvcCt'); //구독료
|
||||
var tmeDlvyAmt = $('#tmeDlvyAmt'); //1회 배송비
|
||||
var selpric = $('#selpric'); //1회 배송비
|
||||
selpric.val(((Number(dlvyCnt.val().replace(/,/g, '')) * Number(tmeDlvyAmt.val().replace(/,/g, ''))) + Number(subsvcCt.val().replace(/,/g, ''))).toLocaleString());
|
||||
}
|
||||
|
||||
/*가용재고 자동계산*/
|
||||
const fn_cal_availQt = function(){
|
||||
var invntryQy = $('#invntryQy');
|
||||
var usefulInvntryQy = $('#usefulInvntryQy');
|
||||
var availQt = $('#availQt');
|
||||
availQt.val(Number(invntryQy.val().replace(/,/g, '')) - Number(usefulInvntryQy.val().replace(/,/g, '')));
|
||||
}
|
||||
|
||||
/** 제약조건 체크 */
|
||||
const validate = function(){
|
||||
var retVal = true;
|
||||
//에디터내용을 textarea로 복사
|
||||
var subsvcDc = $('#subsvcDc');
|
||||
subsvcDc.val(fn_get_editor_data('#subsvcDc'));
|
||||
|
||||
// 텍스트 입력 내용중 필수 항목 체크
|
||||
$(':text[required]').each(function () {
|
||||
if($(this).hasClass('number')){
|
||||
if ($(this).val().trim() == '' || $(this).val().trim() == '0') {
|
||||
alert($(this).prop('title')+"은(는) 필수입니다");
|
||||
$(this).focus();
|
||||
retVal = false;
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
if ($(this).val().trim() == '') {
|
||||
alert($(this).prop('title')+"은(는) 필수입니다");
|
||||
$(this).focus();
|
||||
retVal = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
if(!retVal){
|
||||
return retVal;
|
||||
}
|
||||
|
||||
//노출예약 인 경우 노출기간 필수
|
||||
if($('input[name="expsrDvCd"]:checked').val() == '03'){
|
||||
if($('#expsrBgnDt_dt').val().trim() == ''){
|
||||
alert($('#expsrBgnDt_dt').prop('title')+"은(는) 노출여부가 노출예약인 경우 필수입니다");
|
||||
$('#expsrBgnDt_dt').focus();
|
||||
return false;
|
||||
}
|
||||
if($('#expsrBgnDt_time').val().trim().replaceAll(':','') == ''){
|
||||
alert($('#expsrBgnDt_time').prop('title')+"은(는) 노출여부가 노출예약인 경우 필수입니다");
|
||||
$('#expsrBgnDt_time').focus();
|
||||
return false;
|
||||
}
|
||||
if($('#expsrEndDt_dt').val().trim() == ''){
|
||||
alert($('#expsrEndDt_dt').prop('title')+"은(는) 노출여부가 노출예약인 경우 필수입니다");
|
||||
$('#expsrEndDt_dt').focus();
|
||||
return false;
|
||||
}
|
||||
if($('#expsrEndDt_time').val().trim().replaceAll(':','') == ''){
|
||||
alert($('#expsrEndDt_time').prop('title')+"은(는) 노출여부가 노출예약인 경우 필수입니다");
|
||||
$('#expsrEndDt_time').focus();
|
||||
return false;
|
||||
}
|
||||
// 노출기간 셋팅
|
||||
const expsrBgnDt = $('#expsrBgnDt_dt').val() + ' ' +$('#expsrBgnDt_time').val() +':00'
|
||||
const expsrEndDt = $('#expsrEndDt_dt').val() + ' ' +$('#expsrEndDt_time').val() +':00'
|
||||
|
||||
$('#expsrBgnDt').val(expsrBgnDt);
|
||||
$('#expsrEndDt').val(expsrEndDt);
|
||||
}else if($('input[name="expsrDvCd"]:checked').val() != '03'){
|
||||
$('#expsrBgnDt').val('');
|
||||
$('#expsrEndDt').val('');
|
||||
}
|
||||
|
||||
//재고가 있으면 판매인 경우 개수 품절처리 필수
|
||||
if($('input[name="invntryPolicyCd"]:checked').val() == '01'){
|
||||
if($('#avlinvLmttQy').val() == ''){
|
||||
alert($('#avlinvLmttQy').prop('title')+"은(는) 노출여부가 노출예약인 경우 필수입니다");
|
||||
$('#avlinvLmttQy').focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//이미지 필수 체크
|
||||
if((($('#delImg').val() != '' || $('#img').val() == '') && imgDropzone.files.length != 1)){
|
||||
if(imgDropzone.files.length == 0){
|
||||
alert("대표이미지(섬네일)은(는) 필수입니다");
|
||||
}else{
|
||||
alert("대표이미지(섬네일)은(는) 1개만 등록가능합니다");
|
||||
}
|
||||
$('#img-dropzone')[0].scrollIntoView();
|
||||
// $('#img-dropzone').focus();
|
||||
return false;
|
||||
|
||||
}else if(imgDropzone.files.length > 1){
|
||||
alert("대표이미지(섬네일)은(는) 1개만 등록가능합니다");
|
||||
$('#img-dropzone').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
//상품설명 필수체크
|
||||
if(subsvcDc.val() == ''){
|
||||
alert(subsvcDc.prop('title')+"은(는) 필수입니다");
|
||||
CKEditorArray['#subsvcDc'].editing.view.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
//PC와 모바일 다르게 설정인 경우 모바일 상품설명 필수
|
||||
if($('input[name="mblSubsvcDcPcSameAt"]:checked').val() == 'N'){
|
||||
var mblSubsvcDc = $('#mblSubsvcDc');
|
||||
mblSubsvcDc.val(fn_get_editor_data('#mblSubsvcDc'));
|
||||
if(mblSubsvcDc.val().trim() == ''){
|
||||
alert(mblSubsvcDc.prop('title')+"은(는) 필수입니다");
|
||||
CKEditorArray['#mblSubsvcDc'].editing.view.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*수정하기*/
|
||||
const fn_updateSubsvc = function (){
|
||||
if(!validate()){
|
||||
return false;
|
||||
}
|
||||
|
||||
const url = '<c:url value="/mngr/goods/subsvc/updateSubsvc"/>';
|
||||
var formData = new FormData($('#subsvcForm')[0]);
|
||||
|
||||
imgDropzone.files.forEach(function(file, index){
|
||||
console.log("file",file);
|
||||
//1개만 등록 되도록
|
||||
if(index == 0){
|
||||
formData.append('files',file);
|
||||
}
|
||||
});
|
||||
|
||||
console.log("formData",formData);
|
||||
|
||||
if (confirm(`구독서비스를 <spring:message code="confirm.common.update"/>`)) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
enctype: 'multipart/form-data',
|
||||
url: url,
|
||||
data: formData,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function (data) {
|
||||
try{
|
||||
const message = JSON.parse(data.resBody.result).message;
|
||||
if(message == "success"){
|
||||
alert('<spring:message code="success.common.update"/>');
|
||||
//등록 후 수정화면으로 이동
|
||||
window.location.reload();
|
||||
} else {
|
||||
alert('<spring:message code="fail.common.update"/>');
|
||||
}
|
||||
}catch (e) {
|
||||
console.log(e);
|
||||
alert('<spring:message code="fail.common.update"/>');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<body>
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Header.jsp"%>
|
||||
<main class="main">
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Left.jsp"%>
|
||||
<div class="content">
|
||||
<div class="content__inner">
|
||||
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
|
||||
<div class="page-title">
|
||||
<h2 class="page-title__title">구독서비스 수정 (상품번호 : ${resultMap.subsvcDtl.subsvcInnb})</h2>
|
||||
<div class="page-title__btn-container">
|
||||
<button onclick="fn_select_list()" class="btn outline"><spring:message code="button.list"/></button>
|
||||
<button onclick="fn_updateSubsvc();return false;" class="btn primary"><spring:message code="button.update"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<form id="subsvcForm" method="post" action="" enctype="multipart/form-data">
|
||||
<input type="hidden" id="subsvcInnb" name="subsvcInnb" value="${resultMap.subsvcDtl.subsvcInnb}">
|
||||
<input type="hidden" id="sopmalCd" name="sopmalCd" value="${resultMap.paramVO.sopmalCd}">
|
||||
<input type="hidden" id="srchSelSubsvcNm" name="srchSelSubsvcNm" value="${resultMap.paramVO.srchSelSubsvcNm}">
|
||||
<input type="hidden" id="srchSubsvcNm" name="srchSubsvcNm" value="${resultMap.paramVO.srchSubsvcNm}">
|
||||
<input type="hidden" id="srchSelSubsvcGnr" name="srchSelSubsvcGnr" value="${resultMap.paramVO.srchSelSubsvcGnr}">
|
||||
<input type="hidden" id="srchSubsvcGnrNm" name="srchSubsvcGnrNm" value="${resultMap.paramVO.srchSubsvcGnrNm}">
|
||||
<c:forEach items="${resultMap.paramVO.srchArrSubsvcSttusCd}" var="srchSubsvcSttusCd" varStatus="status">
|
||||
<input type="hidden" id="srchArrSubsvcSttusCd${status.count}" name="srchArrSubsvcSttusCd" value="${srchSubsvcSttusCd}">
|
||||
</c:forEach>
|
||||
<input type="hidden" id="srchExpsrDvCd" name="srchExpsrDvCd" value="${resultMap.paramVO.srchExpsrDvCd}">
|
||||
<input type="hidden" id="sortDv" name="sortDv" value="${resultMap.paramVO.sortDv}">
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="${ resultMap.paramVO.pageIndex }"/>
|
||||
<input type="hidden" id="pageUnit" name="pageUnit" value="${ resultMap.paramVO.pageUnit }">
|
||||
<input type="hidden" id="delImg" name="delImg" value="">
|
||||
<input type="hidden" id="expsrBgnDt" name="expsrBgnDt" value="${resultMap.subsvcDtl.expsrBgnDt}">
|
||||
<input type="hidden" id="expsrEndDt" name="expsrEndDt" value="${resultMap.subsvcDtl.expsrEndDt}">
|
||||
<input type="hidden" id="usefulInvntryQy" name="usefulInvntryQy" value="${resultMap.subsvcDtl.usefulInvntryQy}">
|
||||
<spring:eval expression="@environment.getProperty('spring.servlet.multipart.max-file-size')" var="maxFileSize"/>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.cdnurl')" var="cdnurl"/>
|
||||
<input type="hidden" id="cdnurl" value="${cdnurl}"/>
|
||||
|
||||
<section id="section01" class="content-section content-scroll-detect content-fold">
|
||||
<div class="content-fold__header">
|
||||
<h3 class="content-section__title">기본정보</h3>
|
||||
<button class="content-fold__btn"><span class="visually-hidden">접기</span></button>
|
||||
</div>
|
||||
<div class="content-fold__content">
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>기본정보</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 38%">
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 38%">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>구독서비스명<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" title="구독서비스명" id="subsvcNm" name="subsvcNm" maxlength="100" value="${resultMap.subsvcDtl.subsvcNm}" required>
|
||||
</div>
|
||||
</td>
|
||||
<th>구독기간<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xsm number text-right" type="text" title="구독기간" id="subPd" name="subPd" maxlength="3" value="${resultMap.subsvcDtl.subPd}" required> 개월
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>기수</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xsm number text-right" type="text" title="기수" id="subsvcGnr" name="subsvcGnr" value="${resultMap.subsvcDtl.subsvcGnr}" readonly> 기
|
||||
</div>
|
||||
</td>
|
||||
<th>기수명<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" title="기수명" id="subsvcGnrNm" name="subsvcGnrNm" maxlength="80" value="${resultMap.subsvcDtl.subsvcGnrNm}" required>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>배송횟수<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xsm number text-right" type="text" title="배송횟수" id="dlvyCnt" name="dlvyCnt" maxlength="3" value="${resultMap.subsvcDtl.dlvyCnt}" required> 회
|
||||
</div>
|
||||
</td>
|
||||
<th>배송주기<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text sm" type="text" title="배송주기" id="dlvyCycle" name="dlvyCycle" maxlength="30" value="${resultMap.subsvcDtl.dlvyCycle}" required>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="section02" class="content-section content-scroll-detect content-fold">
|
||||
<div class="content-fold__header">
|
||||
<h3 class="content-section__title">판매정보</h3>
|
||||
<button class="content-fold__btn"><span class="visually-hidden">접기</span></button>
|
||||
</div>
|
||||
<div class="content-fold__content">
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>판매정보</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 38%">
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 38%">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>구독료<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text sm number text-right" type="text" title="구독료" id="subsvcCt" name="subsvcCt" maxlength="11" value="${resultMap.subsvcDtl.subsvcCt}" required> 円(엔)
|
||||
</div>
|
||||
</td>
|
||||
<th>1회 배송비<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text sm number text-right" type="text" title="1회 배송비" id="tmeDlvyAmt" name="tmeDlvyAmt" maxlength="11" value="${resultMap.subsvcDtl.tmeDlvyAmt}" required> 円(엔)
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>소비자가</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text sm number text-right" type="text" title="소비자가" id="cnsmrpric" name="cnsmrpric" maxlength="11" value="${resultMap.subsvcDtl.cnsmrpric}"> 円(엔)
|
||||
</div>
|
||||
</td>
|
||||
<th>실판매가<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text sm number text-right" type="text" title="실판매가" id="selpric" name="selpric" maxlength="11" value="${resultMap.subsvcDtl.selpric}" readonly> 円(엔)
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="section03" class="content-section content-scroll-detect content-fold">
|
||||
<div class="content-fold__header">
|
||||
<h3 class="content-section__title">구독설정</h3>
|
||||
<button type="button" class="content-fold__btn"><span class="visually-hidden">접기</span></button>
|
||||
</div>
|
||||
<div class="content-fold__content">
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>구독설정</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>재고<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text sm number text-right" type="text" title="재고" id="invntryQy" name="invntryQy" maxlength="11" value="${resultMap.subsvcDtl.invntryQy}" required>
|
||||
</div>
|
||||
</td>
|
||||
<th>가용재고</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text sm number text-right" type="text" title="가용재고" id="availQt" maxlength="11" value="${resultMap.subsvcDtl.availQt}" readonly>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>판매 상태</th>
|
||||
<td colspan="2">
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<c:forEach items="${resultMap.subsvcSttusList}" var="subsvcSttus" varStatus="status">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="subsvcSttusCd${status.count}" name="subsvcSttusCd" title="판매 상태" value="${subsvcSttus.cd}" <c:if test="${resultMap.subsvcDtl.subsvcSttusCd eq subsvcSttus.cd}">checked</c:if>/>
|
||||
<label for="subsvcSttusCd${status.count}">${subsvcSttus.cdNm}</label>
|
||||
<input type="hidden" value="${resultMap.subsvcDtl.subsvcSttusCd}" id="subsvcSttusCdChk"/>
|
||||
</div>
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>노출 여부</th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner vertical">
|
||||
<div class="custom-radio-container mt-10">
|
||||
<c:forEach items="${resultMap.expsrDvList}" var="expsrDv" varStatus="status">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="expsrDvCd${status.count}" name="expsrDvCd" title="노출 여부" value="${expsrDv.cd}" onclick="handleRadioClick2(this);" <c:if test="${resultMap.subsvcDtl.expsrDvCd eq expsrDv.cd}">checked</c:if>/>
|
||||
<label for="expsrDvCd${status.count}">${expsrDv.cdNm}</label>
|
||||
<input type="hidden" value="${resultMap.subsvcDtl.expsrDvCd}" id="expsrDvCdChk"/>
|
||||
</div>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div class="table-wrapper mt-10">
|
||||
<table class="table">
|
||||
<caption>노출 기간</caption>
|
||||
<colgroup>
|
||||
<col style="width: 16%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody id="expsrSet">
|
||||
<tr>
|
||||
<th>노출 기간</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input type="text" id="expsrBgnDt_dt" class="datepicker" title="시작 날짜 선택" autocomplete="off" value="${fn:split(resultMap.subsvcDtl.expsrBgnDt,' ')[0]}" disabled>
|
||||
<div class="timepicker-container">
|
||||
<input type="text" class="bs-timepicker" id="expsrBgnDt_time" title="시작 시간 설정" value="${fn:split(fn:split(resultMap.subsvcDtl.expsrBgnDt,' ')[1], ':')[0]}:${fn:split(fn:split(resultMap.subsvcDtl.expsrBgnDt,' ')[1], ':')[1]}" disabled>
|
||||
</div>
|
||||
<span class="tilde">~</span>
|
||||
<input type="text" id="expsrEndDt_dt" class="datepicker" title="종료 날짜 선택" autocomplete="off" value="${fn:split(resultMap.subsvcDtl.expsrEndDt,' ')[0]}" disabled>
|
||||
<div class="timepicker-container">
|
||||
<input type="text" class="bs-timepicker" id="expsrEndDt_time" title="종료 시간 설정" value="${fn:split(fn:split(resultMap.subsvcDtl.expsrEndDt,' ')[1], ':')[0]}:${fn:split(fn:split(resultMap.subsvcDtl.expsrEndDt,' ')[1], ':')[1]}" disabled>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>재고에 따른 판매</th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<c:forEach items="${resultMap.invntryPolicyList}" var="invntryPolicy" varStatus="status">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="invntryPolicyCd${status.count}" name="invntryPolicyCd" value="${invntryPolicy.cd}" onclick="handleRadioClickDisable(this);"<c:if test="${resultMap.subsvcDtl.invntryPolicyCd eq invntryPolicy.cd}">checked</c:if>/>
|
||||
<label for="invntryPolicyCd${status.count}">${invntryPolicy.cdNm}</label>
|
||||
</div>
|
||||
<c:if test="${status.first}">
|
||||
<div>
|
||||
<span class="ml-4">(</span>
|
||||
<input class="input-text number xsm ml-5 right" id="avlinvLmttQy" name="avlinvLmttQy" value="${resultMap.subsvcDtl.avlinvLmttQy}" type="text" title="해당 인풋에 대한 설명" <c:if test="${resultMap.subsvcDtl.invntryPolicyCd eq '02'}"> disabled</c:if> />
|
||||
개 이하 일 때 품절 처리
|
||||
<span class="ml-4">)</span>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="section07" class="content-section content-scroll-detect content-fold">
|
||||
<div class="content-fold__header">
|
||||
<h3 class="content-section__title">구독서비스 설명</h3>
|
||||
<button class="content-fold__btn"><span class="visually-hidden">접기</span></button>
|
||||
</div>
|
||||
<div class="content-fold__content">
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>구독서비스 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>대표이미지(썸네일) 등록<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner vertical">
|
||||
<div class="dropzone-wrapper">
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<div class="dropzone" id="img-dropzone">
|
||||
</div><p class="fyi gray-7 mt-15">1개의 이미지만 등록가능합니다.</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>등록한 대표이미지(썸네일)</th>
|
||||
<td>
|
||||
<div class="td-inner" id="sortable">
|
||||
<c:if test="${not empty resultMap.subsvcDtl.img}">
|
||||
<div class="file-preview__container">
|
||||
<div class="file-preview">
|
||||
<span class="file-preview__number"></span>
|
||||
<button class="file-preview__delete" id="file-preview__delete" onclick="deleteFileImg(this)">
|
||||
<span class="visually-hidden">삭제</span></button>
|
||||
<div class="file-preview__image">
|
||||
<img src="<c:out value="${cdnurl}${resultMap.subsvcDtl.img}"/>" alt="구독서비스 이미지" onerror="this.src='/mngr/images/image_placeholder.png'" >
|
||||
<input type="hidden" id="img" name="img" value="<c:out value="${resultMap.subsvcDtl.img}"/>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>상품 설명<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner"><textarea class="textarea" title="상품 설명" cols="30" rows="10" id="subsvcDc" name="subsvcDc">${resultMap.subsvcDtl.subsvcDc}</textarea>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>모바일용 상세 설명 설정</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container mr-5">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="mblSubsvcDcPcSameAt1" name="mblSubsvcDcPcSameAt" value="Y" <c:if test="${ resultMap.subsvcDtl.mblSubsvcDcPcSameAt eq 'Y'}">checked</c:if>>
|
||||
<label for="mblSubsvcDcPcSameAt1">PC와 동일</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="mblSubsvcDcPcSameAt2" name="mblSubsvcDcPcSameAt" value="N" <c:if test="${ resultMap.subsvcDtl.mblSubsvcDcPcSameAt eq 'N'}">checked</c:if>>
|
||||
<label for="mblSubsvcDcPcSameAt2">PC와 모바일 다르게 설정</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="mobileSubsvcCn">
|
||||
<th>모바일용 상세 설명<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner"><textarea class="textarea" title="모바일용 상품 설명" cols="30" rows="10" id="mblSubsvcDc" name="mblSubsvcDc">${resultMap.subsvcDtl.mblSubsvcDc}</textarea>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="modalDiv">
|
||||
|
||||
</div>
|
||||
<%--관리자 수정이력 내역보기 모달 --%>
|
||||
<div id="logDiv"></div>
|
||||
</main>
|
||||
<script>
|
||||
// Dropzone 파일업로드
|
||||
if ($("#img-dropzone").length > 0) {
|
||||
Dropzone.autoDiscover = false;
|
||||
var imgDropzone = new Dropzone("#img-dropzone", {
|
||||
url: "/file-upload",
|
||||
maxFiles: 1,
|
||||
maxFilesize: 20,
|
||||
autoProcessQueue: false,
|
||||
addRemoveLinks: true,
|
||||
dictDefaultMessage: "클릭하거나 파일을 여기로 드래그하세요",
|
||||
dictRemoveFile: "삭제",
|
||||
acceptedFiles: "${acceptFileExtensions}",
|
||||
dictCancelUpload: "취소",
|
||||
dictCancelUploadConfirmation: "업로드를 취소하시겠습니까?",
|
||||
dictInvalidFileType: "이 파일은 업로드할 수 없습니다.",
|
||||
dictFileTooBig: "파일이 너무 큽니다. ({{filesize}}MB). 최대 파일 크기: {{maxFilesize}}MB.",
|
||||
dictMaxFilesExceeded: "파일을 더 이상 추가할 수 없습니다.",
|
||||
dictResponseError: "서버에서 응답을 받지 못했습니다.",
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user