구독서비스 결제 화면
This commit is contained in:
@@ -13,6 +13,8 @@ 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.service.BOSubsvcService;
|
||||
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;
|
||||
@@ -144,6 +146,9 @@ public class BOOrdrService{
|
||||
@Autowired
|
||||
private BOOrderNoService orderNoService;
|
||||
|
||||
@Autowired
|
||||
private BOSubsvcService subsvcService;
|
||||
|
||||
@Autowired
|
||||
private PropertyService propertyService;
|
||||
|
||||
@@ -3807,6 +3812,50 @@ public class BOOrdrService{
|
||||
return content;
|
||||
}
|
||||
|
||||
/**
|
||||
* 사용자 > 구독상품 > 구매/결제 > 구독서비스 결제 > 결제 예정금액
|
||||
* @param param
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
public Map<String, Object> selectSubsvcSetleExpectAmt(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);
|
||||
put("evtDscntAmt", 0);
|
||||
put("goodsCouponDscntAmt", 0);
|
||||
put("dlvyCouponDscntAmt", 0);
|
||||
put("cartCouponDscntAmt", 0);
|
||||
put("useMlgAmt", 0);
|
||||
put("useCashMlgAmt", 0);
|
||||
put("dscntAmt", 0);
|
||||
put("setleAmt", 0);
|
||||
put("accmlMlgAmt", 0);
|
||||
}};
|
||||
|
||||
BigDecimal goodsAmt = new BigDecimal(0);
|
||||
|
||||
List<LinkedHashMap> goodsList = (List<LinkedHashMap>) param.get("goodsList");
|
||||
log.debug("goodsList : {}", goodsList);
|
||||
|
||||
BOSubsvcVO subsvcVO = new BOSubsvcVO();
|
||||
subsvcVO.setSubsvcInnb((String) param.get("subsvcInnb"));
|
||||
subsvcVO.setSopmalCd((String) param.get("sopmalCd"));
|
||||
DataMap subsvcDetail = subsvcService.selectBOSubsvcDetail(subsvcVO);
|
||||
goodsAmt = (BigDecimal) subsvcDetail.get("subsvcCt");
|
||||
|
||||
// ############################################## 결제 예정 금액 적용 ##############################################
|
||||
setleExpectAmtMap.put("goodsAmt", goodsAmt.intValue());
|
||||
|
||||
content.put("setleExpectAmt", setleExpectAmtMap);
|
||||
content.put("goodsList", goodsList);
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
/**
|
||||
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > 구매 정보 등록
|
||||
* @param param
|
||||
|
||||
@@ -181,7 +181,7 @@ public class OrdrController {
|
||||
model.addAttribute("deviceType", Util.getDeviceType(request));
|
||||
model.addAttribute("stplat", stplat);
|
||||
|
||||
return Util.getDeviceType(request) + "/ordr/MbrPurchsC";
|
||||
return Util.getDeviceType(request) + "/ordr/MbrSubscribeC";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -398,6 +398,67 @@ public class OrdrController {
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
* 사용자 > 구독상품 > 구매/결제 > 구독서비스 결제 > 결제 예정금액 조회
|
||||
* @param param
|
||||
* @return ResponseEntity<WnbtResponse>
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectSubsvcSetleExpectAmt", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> selectSubsvcSetleExpectAmt(HttpServletRequest request, @RequestBody HashMap<String, Object> param) {
|
||||
String sesionId ="";
|
||||
Cookie[] cookies = request.getCookies();
|
||||
if(cookies != null){
|
||||
for(Cookie cookie : cookies ){
|
||||
if(cookie.getName().equals("JSESSIONID")){
|
||||
sesionId = cookie.getValue();
|
||||
param.put("sesionId", sesionId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if ("01".equals(user.getSysDvCd())) {
|
||||
param.put("sopmalCd", user.getSopmalCd());
|
||||
param.put("mbrDvCd", user.getMbrDvCd());
|
||||
param.put("mbrInnb", user.getUserInnb());
|
||||
}
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
try {
|
||||
DataMap datamap = new DataMap();
|
||||
param.entrySet().forEach(map -> {
|
||||
datamap.put(map.getKey(), map.getValue());
|
||||
});
|
||||
content = service.selectSubsvcSetleExpectAmt(datamap);
|
||||
} catch (WnbtRestException wre) {
|
||||
log.debug("결제예정금액 ordr wre");
|
||||
log.error(wre.getMessage(), wre);
|
||||
content = new HashMap<>() {{
|
||||
put("status", "1");
|
||||
put("message", wre.getMessage());
|
||||
put("mlgMxmmUseAmt", wre.getCode());
|
||||
}};
|
||||
} catch (Exception e) {
|
||||
log.debug("결제예정금액 ordr e");
|
||||
log.error(e.getMessage(), e);
|
||||
|
||||
content = new HashMap<>() {{
|
||||
put("status", "1");
|
||||
put("message", "예기치 못한 오류가 발생하였습니다.\n관리자에게 문의하시기 바랍니다.");
|
||||
}};
|
||||
}
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ordr/ordr/selectBOSetleExpectAmt", param),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 관리자 주문 > 브랜드페이 > 토큰발급
|
||||
|
||||
4553
src/main/webapp/WEB-INF/views/sopmal/ordr/MbrSubscribeC.jsp
Normal file
4553
src/main/webapp/WEB-INF/views/sopmal/ordr/MbrSubscribeC.jsp
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user