fo bo 머지작업
This commit is contained in:
@@ -1,20 +1,29 @@
|
||||
package com.wb.domainserver.domain.mngr.alarm.controller;
|
||||
|
||||
import com.wb.domainserver.domain.gcone.alarm.service.BOAlarmService;
|
||||
import com.wb.domainserver.domain.gcone.alarm.vo.BOAlarmVO;
|
||||
import com.wb.domainserver.domain.mngr.alarm.vo.AlarmSrchVo;
|
||||
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.RESRC;
|
||||
import com.wb.domainserver.util.communicate.ReplyFromResrc;
|
||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
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.web.bind.annotation.CookieValue;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Controller
|
||||
@RequestMapping(value = "/mngr/alarm")
|
||||
@Slf4j
|
||||
@@ -27,18 +36,36 @@ public class AlarmController {
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
|
||||
@Autowired
|
||||
private BOAlarmService service;
|
||||
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/select/selectAlarmCount")
|
||||
public ResponseEntity<WnbtResponse> selectAlarmCount(@CookieValue(value = "authSopmalCd") String authSopmalCd, AlarmSrchVo vo) {
|
||||
@RequestMapping(value = "/select/selectAlarmCount", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> selectAlarmCount(@CookieValue(value = "authSopmalCd") String authSopmalCd, BOAlarmVO vo) {
|
||||
|
||||
log.debug("selectAlarmCount()");
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/alarm/select/selectAlarmCount",vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
DataMap content = new DataMap();
|
||||
|
||||
List<DataMap> answerList = service.selectAnswerCount(vo);
|
||||
|
||||
List<DataMap> refundList = service.selectRefundCount(vo);
|
||||
|
||||
content.put("refundList", refundList);
|
||||
content.put("answerList", answerList);
|
||||
content.put("status","success");
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,20 +1,33 @@
|
||||
package com.wb.domainserver.domain.mngr.analytics.controller;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||
import com.wb.domainserver.domain.gcone.analytics.service.BOAnalyticsService;
|
||||
import com.wb.domainserver.domain.gcone.analytics.vo.BOAnanlyticsErpGoodsSrchVO;
|
||||
import com.wb.domainserver.domain.mngr.analytics.vo.AnalyticsErpGoodsSrchVO;
|
||||
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.RESRC;
|
||||
import com.wb.domainserver.util.communicate.ReplyFromResrc;
|
||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -30,6 +43,12 @@ public class AnalyticsController {
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
|
||||
@Autowired
|
||||
private BOAnalyticsService service;
|
||||
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
/**
|
||||
* 매출일지 리스트
|
||||
* @return String JSP 경로
|
||||
@@ -40,11 +59,6 @@ public class AnalyticsController {
|
||||
public String selectSummaryList (AnalyticsErpGoodsSrchVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
log.debug("selectSummaryList()");
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/analytics/select/sales-journal", ""),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
return "mngr/analytics/SalesJournal";
|
||||
}
|
||||
@@ -59,14 +73,21 @@ public class AnalyticsController {
|
||||
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value ="/select/erp-goods")
|
||||
public String selectErpGoodsList (AnalyticsErpGoodsSrchVO vo , ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectErpGoodsList (BOAnanlyticsErpGoodsSrchVO vo , ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
log.debug("selectErpGoodsList()");
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/analytics/select/erp-goods", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
log.debug(" 검색 파라미터 확인 리스트 검색조건 : {}", vo);
|
||||
|
||||
DataMap content = new DataMap();
|
||||
List<DataMap> sopmalList = service.selectSopmalCd();
|
||||
content.put("sopmalList",sopmalList);
|
||||
model.addAttribute("resultMap", content);
|
||||
|
||||
return "mngr/analytics/ErpGoods";
|
||||
}
|
||||
@@ -78,14 +99,40 @@ public class AnalyticsController {
|
||||
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value ="/select/erp-goodsR")
|
||||
public String selectErpGoodsListR (AnalyticsErpGoodsSrchVO vo , ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectErpGoodsListR (BOAnanlyticsErpGoodsSrchVO vo , ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
log.debug("selectErpGoodsListR()");
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/analytics/select/erp-goodsR", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
log.debug(" 검색 파라미터 확인 리스트 검색조건 : {}", vo);
|
||||
|
||||
DataMap content = new DataMap();
|
||||
|
||||
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());
|
||||
|
||||
List<DataMap> list = new ArrayList<>();
|
||||
list = service.selectErpGoodsList(vo);
|
||||
|
||||
log.debug("asdsadasdsa" + vo.getPaginationInfo().getTotalRecordCount());
|
||||
|
||||
content.put("list", list);
|
||||
content.put("BOAnanlyticsErpGoodsSrchVO", vo);
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
|
||||
return "mngr/analytics/ErpGoodsR";
|
||||
}
|
||||
@@ -97,14 +144,22 @@ public class AnalyticsController {
|
||||
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value ="/select/erp-set-goods")
|
||||
public String selectErpSetGoodsList (AnalyticsErpGoodsSrchVO vo , ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectErpSetGoodsList (BOAnanlyticsErpGoodsSrchVO vo , ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
log.debug("selectErpSetGoodsList()");
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/analytics/select/erp-set-goods", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
log.debug(" 검색 파라미터 확인 리스트 검색조건 : {}", vo);
|
||||
DataMap content = new DataMap();
|
||||
List<DataMap> sopmalList = service.selectSopmalCd();
|
||||
content.put("sopmalList",sopmalList);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
|
||||
return "mngr/analytics/ErpSetGoods";
|
||||
}
|
||||
@@ -116,14 +171,40 @@ public class AnalyticsController {
|
||||
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value ="/select/erp-set-goodsR")
|
||||
public String selectErpSetGoodsListR (AnalyticsErpGoodsSrchVO vo , ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectErpSetGoodsListR (BOAnanlyticsErpGoodsSrchVO vo , ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
log.debug("selectErpSetGoodsListR()");
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/analytics/select/erp-set-goodsR", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
log.debug(" 검색 파라미터 확인 리스트 검색조건 : {}", vo);
|
||||
|
||||
DataMap content = new DataMap();
|
||||
|
||||
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());
|
||||
|
||||
List<DataMap> list = new ArrayList<>();
|
||||
list = service.selectErpSetGoodsList(vo);
|
||||
|
||||
log.debug("asdsadasdsa" + vo.getPaginationInfo().getTotalRecordCount());
|
||||
|
||||
content.put("list", list);
|
||||
content.put("BOAnanlyticsErpGoodsSrchVO", vo);
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
|
||||
return "mngr/analytics/ErpSetGoodsR";
|
||||
}
|
||||
@@ -134,15 +215,23 @@ public class AnalyticsController {
|
||||
* @param jsonData 게시판 등록 파라미터 jsonData
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/update/erp-goods" , method= RequestMethod.POST)
|
||||
@RequestMapping(value="/update/erp-goods" , method= RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
public ResponseEntity<WnbtResponse> updatePuriOrder(@RequestBody List<Map<String,Object>> jsonData){
|
||||
|
||||
log.debug(" 검색 파라미터 확인 231: {}", jsonData);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/analytics/update/erp-goods", jsonData),
|
||||
ReplyFromResrc::getReply
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
DataMap content = new DataMap();
|
||||
service.updateErpGoods(jsonData);
|
||||
content.put("status", "success");
|
||||
content.put("message", "제상품 정보가 성공적으로 업데이트 되었습니다.");
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
package com.wb.domainserver.domain.mngr.api.controller;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.wb.domainserver.domain.gcone.api.service.BOApiService;
|
||||
import com.wb.domainserver.domain.gcone.common.service.BOCommonService;
|
||||
import com.wb.domainserver.domain.mngr.api.service.ApiService;
|
||||
import com.wb.domainserver.response.ApiResponse;
|
||||
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.RESRC;
|
||||
@@ -16,12 +23,18 @@ import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
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.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.server.ResponseStatusException;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
@@ -39,6 +52,18 @@ public class ApiController {
|
||||
@Autowired
|
||||
private ApiService service;
|
||||
|
||||
@Autowired
|
||||
private BOApiService boservice;
|
||||
|
||||
@Autowired
|
||||
private BOCommonService commonService;
|
||||
|
||||
@Value("${api.AES_KEY}")
|
||||
private String AES_KEY;
|
||||
|
||||
@Value("${api.DATA_ENCRYPT_AES_KEY}")
|
||||
private String DATA_ENCRYPT_AES_KEY;
|
||||
|
||||
/**
|
||||
* Order Api
|
||||
* 주문내역 api
|
||||
@@ -70,13 +95,14 @@ public class ApiController {
|
||||
requestBody.put("authSopmalCd", authSopmalCd);
|
||||
String listStr = "";
|
||||
String clearDataStr = "";
|
||||
ResponseEntity<WnbtResponse> boResponse = responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/api/select/selectOrderList", requestBody),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
|
||||
// CSV 추출
|
||||
Object resultObj = boResponse.getBody().getResBody().getResult();
|
||||
Object resultObj = selectOrdrList(requestBody, response, request);
|
||||
// ResponseEntity<WnbtResponse> boResponse = responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/api/select/selectOrderList", requestBody),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
|
||||
if (resultObj instanceof String) {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
JsonNode outerJson = mapper.readTree((String) resultObj);
|
||||
@@ -102,4 +128,134 @@ public class ApiController {
|
||||
service.insertMngrApiAccessLog(request,response,"Y","",responseData);
|
||||
return listStr;
|
||||
}
|
||||
|
||||
private WnbtResponseBody selectOrdrList(Map<String, Object> requestBody, HttpServletResponse response, HttpServletRequest request){
|
||||
|
||||
// 1. 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if ("01".equals(user.getSysDvCd())) {
|
||||
requestBody.put("sopmalCd", user.getSopmalCd());
|
||||
}
|
||||
|
||||
String hashEqual = "";
|
||||
String csvString = "";
|
||||
String clearData = "";
|
||||
DataMap paramMap = new DataMap();
|
||||
paramMap.put("aesKey", AES_KEY);
|
||||
paramMap.put("timeStamp", requestBody.get("timeStamp"));
|
||||
paramMap.put("data", requestBody.get("data"));
|
||||
paramMap.put("hashData", requestBody.get("hash"));
|
||||
paramMap.put("dataAesKey", DATA_ENCRYPT_AES_KEY);
|
||||
|
||||
log.debug("파라미터 총 체크 : {}", paramMap);
|
||||
|
||||
DataMap content = new DataMap();
|
||||
List<DataMap> list = new ArrayList<>();
|
||||
|
||||
// 2. 타임스탬프 검증
|
||||
try {
|
||||
boservice.isValidTimestamp((String) requestBody.get("timeStamp"));
|
||||
} catch (RuntimeException e) {
|
||||
log.warn("⛔ 타임스탬프 검증 실패: {}", e.getMessage(), e);
|
||||
boservice.insertMngrApiAccessLog(request,response,"N",e.getMessage());
|
||||
throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "요청 시간이 유효하지 않습니다.", e);
|
||||
}
|
||||
|
||||
// 3. 파라미터 복호화
|
||||
String param = boservice.aesParamDecrypt(paramMap);
|
||||
log.debug("📦 디코딩된 API 파라미터: {}", param);
|
||||
|
||||
// 4. 해시값 검증
|
||||
try {
|
||||
hashEqual = boservice.isValidHash(paramMap);
|
||||
log.debug("✅ 해쉬코드 검증 완료: {}", hashEqual);
|
||||
} catch (RuntimeException e) {
|
||||
log.debug("client hash: {}", paramMap.get("hashData"));
|
||||
log.debug("server hash: {}", e.getMessage());
|
||||
log.warn("⛔ 해쉬 코드 검증 실패: {}", e.getMessage(), e);
|
||||
boservice.insertMngrApiAccessLog(request,response,"N",e.getMessage());
|
||||
|
||||
content.put("result", "FAIL");
|
||||
content.put("message", "해쉬값 불일치");
|
||||
throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "해쉬값 불일치", e);
|
||||
}
|
||||
|
||||
// 5. 복호화된 파라미터 파싱 및 리스트 조회
|
||||
int totalSize = 0;
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
try {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
map = objectMapper.readValue(param, new TypeReference<Map<String, Object>>() {});
|
||||
|
||||
} catch (Exception e) {
|
||||
boservice.insertMngrApiAccessLog(request,response,"N",e.getMessage());
|
||||
log.warn("⛔ 파라미터 파싱 또는 리스트 조회 중 오류 발생", e);
|
||||
map = new HashMap<>();
|
||||
}
|
||||
log.debug("복호화 파라미터 : " + map);
|
||||
map.put("secretkey",commonService.selectSecretkey());
|
||||
// total 사이즈
|
||||
totalSize = boservice.selectTableTotalSize(map);
|
||||
|
||||
int pageSize = 10000;
|
||||
int pageIndex = 1;
|
||||
try {
|
||||
pageIndex = Integer.parseInt((String) map.get("pageIndex"));
|
||||
} catch (NumberFormatException e) {
|
||||
log.warn("pageIndex 파싱 실패, 기본값 사용: {}", pageIndex);
|
||||
pageIndex = 1;
|
||||
}
|
||||
|
||||
int offset = (pageIndex - 1) * pageSize;
|
||||
int lastPageIndex = (int) Math.ceil((double) totalSize / pageSize);
|
||||
lastPageIndex = Math.max(1, lastPageIndex);
|
||||
|
||||
if (offset >= totalSize) {
|
||||
pageIndex = lastPageIndex;
|
||||
offset = (pageIndex - 1) * pageSize;
|
||||
}
|
||||
|
||||
if (totalSize <= pageSize) {
|
||||
offset = 0;
|
||||
map.put("limit", pageSize);
|
||||
}
|
||||
map.put("limit", pageSize);
|
||||
map.put("offset", offset);
|
||||
map.put("totalSize", totalSize);
|
||||
long queryStart = System.currentTimeMillis();
|
||||
list = boservice.selectTableList(map);
|
||||
long queryEnd = System.currentTimeMillis();
|
||||
System.out.println("쿼리 실행 시간(ms): " + (queryEnd - queryStart)/ 1000.0 + "초");
|
||||
if (list == null) {
|
||||
list = new ArrayList<>();
|
||||
}
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
result.put("list", list);
|
||||
result.put("pageIndex", pageIndex);
|
||||
result.put("lastPageIndex", lastPageIndex);
|
||||
result.put("totalSize", totalSize);
|
||||
long start = System.currentTimeMillis();
|
||||
clearData = list.toString();
|
||||
// 6. 응답 구성
|
||||
csvString = boservice.convertCsv(result);
|
||||
long afterConvert = System.currentTimeMillis();
|
||||
log.debug("CSV 변환 시간: " + (afterConvert - start)/ 1000.0 + "초");
|
||||
paramMap.put("csvString", csvString);
|
||||
|
||||
// csv text -> AES 암호화 전송
|
||||
csvString = boservice.encryptCsv(paramMap);
|
||||
long afterEncrypt = System.currentTimeMillis();
|
||||
log.debug("CSV 암호화 시간: " + (afterEncrypt - afterConvert)/ 1000.0 + "초");
|
||||
|
||||
|
||||
/*content.put("totalSize", totalSize);
|
||||
content.put("pageIndex", pageIndex);
|
||||
content.put("lastPageIndex", lastPageIndex);*/
|
||||
log.debug("총 후처리 시간: " + (afterEncrypt - start)/ 1000.0 + "초");
|
||||
|
||||
content.put("list", csvString);
|
||||
content.put("clearData", clearData);
|
||||
|
||||
return new WnbtResponseBody(content);
|
||||
}
|
||||
}
|
||||
@@ -2,23 +2,35 @@ package com.wb.domainserver.domain.mngr.bbs.bbsmngr.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.gcone.bbs.bbs.service.BOBbsService;
|
||||
import com.wb.domainserver.domain.gcone.bbs.bbs.vo.BOBbsSetupVO;
|
||||
import com.wb.domainserver.domain.gcone.bbs.bbs.vo.BOBbsVO;
|
||||
import com.wb.domainserver.domain.mngr.bbs.bbsmngr.vo.BbsmngrVO;
|
||||
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.RESRC;
|
||||
import com.wb.domainserver.util.communicate.ReplyFromResrc;
|
||||
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.string.StringUtil;
|
||||
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.util.ObjectUtils;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.CookieValue;
|
||||
@@ -71,143 +83,344 @@ public class BbsmngrController {
|
||||
@Value("${mngrfo.common.board.nc.ntcntalkSndngFormInnb02}")
|
||||
private String ntcntalkSndngFormInnb2;
|
||||
|
||||
@Autowired
|
||||
private BOBbsService service;
|
||||
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
|
||||
/**
|
||||
* 게시판 화면
|
||||
* @param BbsmngrVO 게시판 등록 파라미터 VO
|
||||
* @param vo 게시판 등록 파라미터 VO
|
||||
* @return String JSP 경로
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectBbsListInqireForm")
|
||||
public String selectBbsListInqireForm(BbsmngrVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
public String selectBbsListInqireForm(BOBbsVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/bbs/selectBOBbsListInqireFrom", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
log.debug(" 검색 파라미터 확인 : {}", vo);
|
||||
|
||||
DataMap content = new DataMap();
|
||||
|
||||
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());
|
||||
|
||||
List<DataMap> formList = new ArrayList<>();
|
||||
DataMap fromMap = new DataMap();
|
||||
fromMap = service.selectBOBbsListInqireFrom(vo);
|
||||
formList.add(fromMap);
|
||||
|
||||
List<DataMap> srchList = new ArrayList<>();
|
||||
DataMap srchData = new DataMap();
|
||||
srchData.put("srchWord", vo.getSrchWord());
|
||||
srchData.put("srchBbsTyCd", vo.getSrchBbsTyCd());
|
||||
srchData.put("srchSknTyCd", vo.getSrchSknTyCd());
|
||||
srchData.put("pageUnit", vo.getPageUnit());
|
||||
srchData.put("pageIndex", vo.getPageIndex());
|
||||
srchData.put("pageDv", vo.getPageDv());
|
||||
srchList.add(srchData);
|
||||
|
||||
content.put("srchList", srchList);
|
||||
content.put("formList", formList);
|
||||
content.put("boBbsVo", vo);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
|
||||
return "mngr/bbs/bbsmngr/BbsListRForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 게시판 목록 조회
|
||||
* @param BbsmngrVO 게시판 등록 파라미터 VO
|
||||
* @param vo 게시판 등록 파라미터 VO
|
||||
* @return String JSP 경로
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectBbsListInqire")
|
||||
public String selectBbsListInqire(BbsmngrVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
public String selectBbsListInqire(BOBbsVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/bbs/selectBOBbsListInqire", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
// 쇼핑몰코드
|
||||
|
||||
DataMap content = new DataMap();
|
||||
|
||||
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());
|
||||
|
||||
DataMap srchMap = new DataMap();
|
||||
if (!ObjectUtils.isEmpty(vo.getSrchSknTyCdArr())) {
|
||||
srchMap.put("srchSknTyCd", String.join(",", vo.getSrchSknTyCdArr()));
|
||||
} else {
|
||||
srchMap.put("srchSknTyCd", "");
|
||||
}
|
||||
if (!ObjectUtils.isEmpty(vo.getSrchBbsTyCdArr())) {
|
||||
srchMap.put("srchBbsTyCd", String.join(",", vo.getSrchBbsTyCdArr()));
|
||||
} else {
|
||||
srchMap.put("srchBbsTyCd", "");
|
||||
}
|
||||
if (!StringUtil.isEmpty(vo.getSrchWord())) {
|
||||
srchMap.put("srchWord", vo.getSrchWord());
|
||||
} else {
|
||||
srchMap.put("srchWord", "");
|
||||
}
|
||||
List<DataMap> srchList = new ArrayList<>();
|
||||
srchList.add(srchMap);
|
||||
content.put("srchList", srchList);
|
||||
|
||||
List<DataMap> bbsList = new ArrayList<>();
|
||||
bbsList = service.selectBOBbsListInqire(vo);
|
||||
content.put("bbsList", bbsList);
|
||||
content.put("boBbsVo", vo);
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap",content);
|
||||
|
||||
return "mngr/bbs/bbsmngr/BbsListR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 안내 허용 도메인 파일 팝업
|
||||
* @param BbsmngrVO 게시판 등록 파라미터 VO
|
||||
* @param model 모델객체
|
||||
* @param vo 게시판 등록 파라미터 VO
|
||||
* @return String JSP 경로
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectGuidancePermDomnFilPopup", method = RequestMethod.GET)
|
||||
public ResponseEntity<WnbtResponse> selectGuidancePermDomnFilPopup(BbsmngrVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
@RequestMapping(value="/selectGuidancePermDomnFilPopup", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> selectGuidancePermDomnFilPopup(BOBbsVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/bbs/selectBOSlangDftSetupPopupForm", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
} // 쇼핑몰코드
|
||||
|
||||
DataMap content = new DataMap();
|
||||
BOBbsSetupVO stVo = new BOBbsSetupVO();
|
||||
|
||||
stVo = service.selectBOSlangDftSetupPopupForm(vo);
|
||||
content.put("boBbsSetupVo", stVo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
}
|
||||
/**
|
||||
* 안내 허용 도메인 파일 수정
|
||||
* @param BbsmngrVO 게시판 등록 파라미터 VO
|
||||
* @param vo 게시판 등록 파라미터 VO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/updateGuidancePermDomnFil" , method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> updateGuidancePermDomnFil(BbsmngrVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
@RequestMapping(value="/updateGuidancePermDomnFil" , method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateGuidancePermDomnFil(BOBbsVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/bbs/updateBOSlangSetupRegist", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
} // 쇼핑몰코드
|
||||
vo.setRegusr(user.getUserInnb()); // 등록자
|
||||
vo.setUpdusr(user.getUserInnb()); // 수정자
|
||||
|
||||
DataMap content = new DataMap();
|
||||
|
||||
String message = service.updateBOSlangSetupRegist(vo);
|
||||
BOBbsSetupVO stVo = new BOBbsSetupVO();
|
||||
stVo = service.selectBOSlangDftSetupPopupForm(vo);
|
||||
content.put("boBbsSetupVo", stVo);
|
||||
content.put("message", message);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
}
|
||||
/**
|
||||
* 비속어 기본 설정 팝업
|
||||
* @param BbsmngrVO 게시판 등록 파라미터 VO
|
||||
* @param vo 게시판 등록 파라미터 VO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectSlangDftSetupPopupForm", method = RequestMethod.GET)
|
||||
public ResponseEntity<WnbtResponse> selectSlangDftSetupPopupForm(BbsmngrVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
@RequestMapping(value="/selectSlangDftSetupPopupForm", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> selectSlangDftSetupPopupForm(BOBbsVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/bbs/selectBOSlangDftSetupPopupForm", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
} // 쇼핑몰코드
|
||||
|
||||
DataMap content = new DataMap();
|
||||
BOBbsSetupVO stVo = new BOBbsSetupVO();
|
||||
|
||||
stVo = service.selectBOSlangDftSetupPopupForm(vo);
|
||||
content.put("boBbsSetupVo", stVo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
}
|
||||
/**
|
||||
* 비속어 설정 저장
|
||||
* @param BbsmngrVO 게시판 등록 파라미터 VO
|
||||
* @param vo 게시판 등록 파라미터 VO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/updateSlangSetupRegist" , method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> updateSlangSetupRegist(BbsmngrVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
@RequestMapping(value="/updateSlangSetupRegist" , method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateSlangSetupRegist(BOBbsVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/bbs/updateBOSlangSetupRegist", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
} // 쇼핑몰코드
|
||||
vo.setRegusr(user.getUserInnb()); // 등록자
|
||||
vo.setUpdusr(user.getUserInnb()); // 수정자
|
||||
|
||||
DataMap content = new DataMap();
|
||||
|
||||
String message = service.updateBOSlangSetupRegist(vo);
|
||||
BOBbsSetupVO stVo = new BOBbsSetupVO();
|
||||
stVo = service.selectBOSlangDftSetupPopupForm(vo);
|
||||
content.put("boBbsSetupVo", stVo);
|
||||
content.put("message", message);
|
||||
|
||||
content.put("boBbsSetupVo", stVo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
}
|
||||
/**
|
||||
* 게시판 등록화면
|
||||
* @param BbsmngrVO 게시판 등록 파라미터 VO
|
||||
* @param vo 게시판 등록 파라미터 VO
|
||||
* @return String JSP 경로
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectBbsRegistForm")
|
||||
public String selectBbsRegistForm(BbsmngrVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
public String selectBbsRegistForm(BOBbsVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setNtcntalkSndngFormInnbArr(new String[] {ntcntalkSndngFormInnb1, ntcntalkSndngFormInnb2});
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/bbs/selectBOBbsRegistForm",vo)
|
||||
);
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
// 쇼핑몰코드
|
||||
vo.setRegusr(user.getUserInnb()); // 등록자
|
||||
vo.setUpdusr(user.getUserInnb()); // 수정자
|
||||
|
||||
DataMap codeMap = new DataMap();
|
||||
codeMap = service.selectCommonCode();
|
||||
|
||||
List<DataMap> codeList = new ArrayList<>();
|
||||
codeList.add(codeMap);
|
||||
List<DataMap> mbrGradList = new ArrayList<>();
|
||||
|
||||
vo.setMbrGradGroupInnb("1");
|
||||
mbrGradList = service.selectBOBbsRegistForm(vo);
|
||||
|
||||
List<DataMap> updBbsList = new ArrayList<>();
|
||||
updBbsList = service.selectUpdBbsList(vo);
|
||||
|
||||
List<DataMap> messageList = new ArrayList<>();
|
||||
DataMap sms = new DataMap();
|
||||
sms = service.selectBOBbsSmsFormList(vo);
|
||||
|
||||
DataMap kakao = new DataMap();
|
||||
kakao = service.selectBOBbsKakaoFormList(vo);
|
||||
|
||||
List<DataMap> srchList = new ArrayList<>();
|
||||
DataMap srchData = new DataMap();
|
||||
srchData.put("pageIndex", vo.getPageIndex());
|
||||
srchData.put("pageUnit", vo.getPageUnit());
|
||||
srchData.put("srchWord", vo.getSrchWord());
|
||||
srchData.put("srchSknTyCd", vo.getSrchSknTyCd());
|
||||
srchData.put("srchBbsTyCd", vo.getSrchBbsTyCd());
|
||||
srchList.add(srchData);
|
||||
|
||||
DataMap content = new DataMap();
|
||||
content.put("mbrGradList", mbrGradList);
|
||||
content.put("codeContent", codeList);
|
||||
content.put("bOBbsVo", vo);
|
||||
content.put("srchList", srchList);
|
||||
content.put("updBbsList", updBbsList);
|
||||
content.put("sms", sms);
|
||||
content.put("kakao", kakao);
|
||||
|
||||
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/bbs/selectBOBbsRegistForm",vo)
|
||||
// );
|
||||
//
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
try {
|
||||
resultMap.put("updBbsList", objectMapper.writeValueAsString(resultMap.get("updBbsList")));
|
||||
content.put("updBbsList", objectMapper.writeValueAsString(content.get("updBbsList")));
|
||||
|
||||
} catch (WnbtRestException wre){
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
log.error(wre.getMessage(), wre);
|
||||
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||
} catch(Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
model.addAttribute("resultMap", resultMap);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
|
||||
return "mngr/bbs/bbsmngr/BbsRegistC";
|
||||
}
|
||||
|
||||
/**
|
||||
* 게시판 등록
|
||||
* @param BbsmngrVO 게시판 등록 파라미터 VO
|
||||
* @param vo 게시판 등록 파라미터 VO
|
||||
* @param bindingResult 바인딩 및 정합성 점검결과 객체
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/insertBbsRegist", method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> insertBbsRegist(@Validated BbsmngrVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd, BindingResult bindingResult){
|
||||
@RequestMapping(value="/insertBbsRegist", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> insertBbsRegist(@Validated BOBbsVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd, BindingResult bindingResult){
|
||||
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
List<Map<String, String>> errorList = new ArrayList<>();
|
||||
if (vo.getPgeVtcCnt() <= 0) {
|
||||
if (vo.getPgeVtcCnt() == null || Integer.parseInt(vo.getPgeVtcCnt() )<= 0) {
|
||||
errorList.add(ValidateResultConverter.setErrorMap("pgeVtcCnt", gconeMessageSource.getMessage("errors.required", new Object[]{"페이지세로건수는 최소 1 입니다."})));
|
||||
}
|
||||
//메시지 문자 내용 없을 시
|
||||
@@ -238,20 +451,34 @@ public class BbsmngrController {
|
||||
throw new WnbtRestException(ValidateResultConverter.convertCustomValidate(errorList));
|
||||
}
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/bbs/insertBOBbsRegist", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}// 쇼핑몰코드
|
||||
vo.setRegusr(user.getUserInnb()); // 등록자
|
||||
vo.setUpdusr(user.getUserInnb()); // 수정자
|
||||
|
||||
DataMap content = new DataMap();
|
||||
content = service.insertBOBbsRegist(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
|
||||
}
|
||||
/**
|
||||
* 게시판 아이디 중복확인
|
||||
* @param BbsmngrVO 게시판 등록 파라미터 VO
|
||||
* @param bindingResult 바인딩 및 정합성 점검결과 객체
|
||||
* @param vo 게시판정보 VO
|
||||
* @param authSopmalCd 몰코드
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectBbsIdDplctCnfirm", method = RequestMethod.GET)
|
||||
public ResponseEntity<WnbtResponse> selectBbsIdDplctCnfirm(BbsmngrVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
public ResponseEntity<WnbtResponse> selectBbsIdDplctCnfirm(BOBbsVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
List<Map<String, String>> errorList = new ArrayList<>();
|
||||
final String REGEX_ID = "^[A-Za-z[0-9]-_$]{6,30}$";
|
||||
@@ -263,14 +490,22 @@ public class BbsmngrController {
|
||||
throw new WnbtRestException(ValidateResultConverter.convertCustomValidate(errorList));
|
||||
}
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/bbs/selectBOBbsIdDplctCnfirm", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
|
||||
String result = service.selectBOBbsIdDplctCnfirm(vo);
|
||||
|
||||
DataMap content = new DataMap();
|
||||
content.put("paramVO", vo);
|
||||
content.put("message", result);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
}
|
||||
/**
|
||||
* 게시판 수정 폼
|
||||
* @param BbsmngrVO 게시판 등록 파라미터 VO
|
||||
* @param vo 게시판 등록 파라미터 VO
|
||||
* @param model 모델객체
|
||||
* @return String JSP 경로
|
||||
*/
|
||||
@@ -284,7 +519,9 @@ public class BbsmngrController {
|
||||
|
||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/bbs/selectBOBbsDtlUpdtForm",vo)
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
try {
|
||||
resultMap.put("updBbsList", objectMapper.writeValueAsString(resultMap.get("updBbsList")));
|
||||
@@ -298,14 +535,15 @@ public class BbsmngrController {
|
||||
|
||||
return "mngr/bbs/bbsmngr/BbsDtlUpdtU";
|
||||
}
|
||||
|
||||
/**
|
||||
* 게시판 수정
|
||||
* @param BbsmngrVO 게시판 등록 파라미터 VO
|
||||
* @param vo 게시판 등록 파라미터 VO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/updateBbsUpdt")
|
||||
public ResponseEntity<WnbtResponse> updateBbsUpdt(@Validated BbsmngrVO vo, BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
@RequestMapping(value="/updateBbsUpdt", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateBbsUpdt(@Validated BOBbsVO vo, BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
@@ -349,36 +587,107 @@ public class BbsmngrController {
|
||||
}
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/bbs/updateBOBbsUpdt", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}// 쇼핑몰코드
|
||||
vo.setRegusr(user.getUserInnb()); // 등록자
|
||||
vo.setUpdusr(user.getUserInnb()); // 수정자
|
||||
|
||||
log.debug(" 게시판 수정 파라미터 확인 : {}", vo);
|
||||
|
||||
DataMap content = new DataMap();
|
||||
content = service.updateBOBbsUpdt(vo);
|
||||
|
||||
List<DataMap> srchList = new ArrayList<>();
|
||||
DataMap srchData = new DataMap();
|
||||
srchData.put("srchWord", vo.getSrchWord());
|
||||
srchData.put("srchBbsTyCd", vo.getSrchBbsTyCd());
|
||||
srchData.put("srchSknTyCd", vo.getSrchSknTyCd());
|
||||
srchData.put("pageUnit", vo.getPageUnit());
|
||||
srchData.put("pageIndex", vo.getPageIndex());
|
||||
srchData.put("pageDv", vo.getPageDv());
|
||||
srchList.add(srchData);
|
||||
content.put("srchList", srchList);
|
||||
content.put("vo", vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
}
|
||||
/**
|
||||
* 게시판 복사 폼
|
||||
* @param BbsmngrVO 게시판 등록 파라미터 VO
|
||||
* @param vo 게시판 등록 파라미터 VO
|
||||
* @param model 모델객체
|
||||
* @return String JSP 경로
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectBbsCopyForm")
|
||||
public String selectBbsCopyForm(BbsmngrVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
public String selectBbsCopyForm(BOBbsVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setNtcntalkSndngFormInnbArr(new String[] {ntcntalkSndngFormInnb1, ntcntalkSndngFormInnb2});
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/bbs/selectBOBbsDtlUpdtForm",vo)
|
||||
);
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
} // 쇼핑몰코드
|
||||
vo.setRegusr(user.getUserInnb()); // 등록자
|
||||
vo.setUpdusr(user.getUserInnb()); // 수정자
|
||||
|
||||
DataMap codeMap = new DataMap();
|
||||
codeMap = service.selectCommonCode(); // 공통 코드
|
||||
|
||||
List<DataMap> codeList = new ArrayList<>();
|
||||
codeList.add(codeMap);
|
||||
|
||||
List<DataMap> mbrGradList = new ArrayList<>();
|
||||
mbrGradList = service.selectBOBbsRegistForm(vo); //해당 쇼핑몰 회원 등급 조회
|
||||
|
||||
List<DataMap> updBbsList = new ArrayList<>();
|
||||
updBbsList = service.selectUpdBbsList(vo); // 해당 쇼핑몰 게시판 목록 조회
|
||||
|
||||
List<DataMap> messageList = new ArrayList<>();
|
||||
DataMap sms = new DataMap();
|
||||
sms = service.selectBOBbsSmsFormList(vo); // 메시지 폼
|
||||
|
||||
DataMap kakao = new DataMap();
|
||||
kakao = service.selectBOBbsKakaoFormList(vo); // 카카오 폼
|
||||
|
||||
List<DataMap> srchList = new ArrayList<>();
|
||||
DataMap srchData = new DataMap();
|
||||
srchData.put("srchWord", vo.getSrchWord());
|
||||
srchData.put("srchBbsTyCd", vo.getSrchBbsTyCd());
|
||||
srchData.put("srchSknTyCd", vo.getSrchSknTyCd());
|
||||
srchData.put("pageUnit", vo.getPageUnit());
|
||||
srchData.put("pageIndex", vo.getPageIndex());
|
||||
srchData.put("pageDv", vo.getPageDv());
|
||||
srchList.add(srchData);
|
||||
|
||||
DataMap resultMap = new DataMap();
|
||||
resultMap = service.selectBOBbsDtlUpdtInqire(vo); // 게시판 상세 조회
|
||||
resultMap.put("mbrGradList", mbrGradList);
|
||||
resultMap.put("codeContent", codeList);
|
||||
resultMap.put("srchList", srchList);
|
||||
resultMap.put("updBbsList", updBbsList);
|
||||
resultMap.put("sms", sms);
|
||||
resultMap.put("kakao", kakao);
|
||||
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
try {
|
||||
resultMap.put("updBbsList", objectMapper.writeValueAsString(resultMap.get("updBbsList")));
|
||||
|
||||
} 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);
|
||||
|
||||
@@ -386,34 +695,57 @@ public class BbsmngrController {
|
||||
}
|
||||
/**
|
||||
* 게시판 삭제
|
||||
* @param BbsmngrVO 게시판 등록 파라미터 VO
|
||||
* @param vo 게시판 정보 VO
|
||||
* @return String JSP 경로
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/deleteBbsDel")
|
||||
public ResponseEntity<WnbtResponse> deleteBbsDel(BbsmngrVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
@RequestMapping(value="/deleteBbsDel", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> deleteBbsDel(BOBbsVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/bbs/updateBOBbsDel", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
} // 쇼핑몰코드
|
||||
vo.setRegusr(user.getUserInnb()); // 등록자
|
||||
vo.setUpdusr(user.getUserInnb()); // 수정자
|
||||
|
||||
String result = service.updateBOBbsDel(vo);
|
||||
|
||||
DataMap content = new DataMap();
|
||||
content.put("paramVO", vo);
|
||||
content.put("message", result);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
}
|
||||
/**
|
||||
* 게시글 대시보드 조회폼
|
||||
* @param BbsmngrVO 게시판 등록 파라미터 VO
|
||||
* @param vo 게시판 등록 파라미터 VO
|
||||
* @param model 모델객체
|
||||
* @return String JSP 경로
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectBbscttDshboardInqireForm")
|
||||
public String selectBbscttDshboardInqireForm(BbsmngrVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
public String selectBbscttDshboardInqireForm(BOBbsVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/bbs/selectBOBbscttDshboardInqireForm",vo)
|
||||
);
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
// 쇼핑몰코드
|
||||
vo.setRegusr(user.getUserInnb()); // 등록자
|
||||
vo.setUpdusr(user.getUserInnb()); // 수정자
|
||||
|
||||
DataMap resultMap = new DataMap();
|
||||
resultMap = service.selectBOBbscttDshboardInqireForm(vo);
|
||||
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
@@ -421,9 +753,11 @@ public class BbsmngrController {
|
||||
resultMap.put("updBbsList", objectMapper.writeValueAsString(resultMap.get("updBbsList")));
|
||||
|
||||
} 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);
|
||||
|
||||
@@ -431,53 +765,97 @@ public class BbsmngrController {
|
||||
}
|
||||
/**
|
||||
* 게시글 대시보드 조회
|
||||
* @param BbsmngrVO 게시판 등록 파라미터 VO
|
||||
* @param vo 게시판 등록 파라미터 VO
|
||||
* @param model 모델객체
|
||||
* @return String JSP 경로
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectBbscttDshboardInqire")
|
||||
public String selectBbscttDshboardInqire(BbsmngrVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
public String selectBbscttDshboardInqire(BOBbsVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/bbs/selectBOBbscttDshboardInqire", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
} // 쇼핑몰코드
|
||||
vo.setRegusr(user.getUserInnb()); // 등록자
|
||||
vo.setUpdusr(user.getUserInnb()); // 수정자
|
||||
|
||||
DataMap content = new DataMap();
|
||||
content = service.selectBOBbscttDshboardInqire(vo);
|
||||
model.addAttribute("resultMap",content);
|
||||
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/bbs/selectBOBbscttDshboardInqire", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/bbs/bbsmngr/BbscttDshboardR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 주요 게시판 보기 설정 팝업
|
||||
* @param BbsmngrVO
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectMainBbsExpsrSetupPopupForm")
|
||||
public ResponseEntity<WnbtResponse> selectMainBbsExpsrSetupPopupForm(BbsmngrVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
@RequestMapping(value="/selectMainBbsExpsrSetupPopupForm", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> selectMainBbsExpsrSetupPopupForm(BOBbsVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
} // 쇼핑몰코드
|
||||
vo.setRegusr(user.getUserInnb()); // 등록자
|
||||
vo.setUpdusr(user.getUserInnb()); // 수정자
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/bbs/selectBOMainBbsExpsrSetupPopupForm", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
DataMap content = new DataMap();
|
||||
|
||||
content = service.selectBOMainBbsExpsrSetupPopupForm(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/bbs/selectBOMainBbsExpsrSetupPopupForm", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
/**
|
||||
* 주요 게시판 보기 설정 수정
|
||||
* @param BbsmngrVO 게시판 등록 파라미터 VO
|
||||
* @param vo 게시판 등록 파라미터 VO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/updateMainBbsExpsrSetupUpdt" , method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> updateMainBbsExpsrSetupUpdt(BbsmngrVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
@RequestMapping(value="/updateMainBbsExpsrSetupUpdt" , method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateMainBbsExpsrSetupUpdt(BOBbsVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
} // 쇼핑몰코드
|
||||
vo.setRegusr(user.getUserInnb()); // 등록자
|
||||
vo.setUpdusr(user.getUserInnb()); // 수정자
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/bbs/updateBOMainBbsExpsrSetupUpdt", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
DataMap content = new DataMap();
|
||||
|
||||
content = service.updateBOMainBbsExpsrSetupUpdt(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/bbs/updateBOMainBbsExpsrSetupUpdt", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,15 +1,27 @@
|
||||
package com.wb.domainserver.domain.mngr.bbs.cnslt.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.admin.sys.comncd.service.BOMaComncdService;
|
||||
import com.wb.domainserver.domain.admin.sys.comncd.vo.BOMaComncdVO;
|
||||
import com.wb.domainserver.domain.gcone.bbs.cnslt.service.BOCnsltService;
|
||||
import com.wb.domainserver.domain.gcone.bbs.cnslt.vo.BOCnsltVO;
|
||||
import com.wb.domainserver.domain.gcone.common.service.BOCommonService;
|
||||
import com.wb.domainserver.domain.mngr.bbs.cnslt.vo.CnsltVO;
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
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.*;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
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;
|
||||
@@ -19,6 +31,7 @@ import org.springframework.web.bind.annotation.CookieValue;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -38,20 +51,44 @@ public class CnsltController {
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
|
||||
@Autowired
|
||||
private BOCnsltService service;
|
||||
|
||||
@Autowired
|
||||
private BOMaComncdService bOMaComncdService;
|
||||
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
@Autowired
|
||||
private BOCommonService boCommonService;
|
||||
|
||||
/**
|
||||
* 고객상담 통합게시판 목록 이동
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectCstmrCnsltUnityBbscttListInqireForm")
|
||||
public String selectCstmrCnsltUnityBbscttListInqireForm(CnsltVO cnsltVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectCstmrCnsltUnityBbscttListInqireForm(BOCnsltVO cnsltVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
cnsltVO.setSopmalCd(authSopmalCd);
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/cnslt/selectBOCstmrCnsltUnityBbscttListInqireForm", cnsltVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
|
||||
// 공통코드 호출
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("COUNSEL_PROCS_STTUS"); // 상담처리상태
|
||||
List<?> procsSttusCdList = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
// 공통코드와 리스트를 넣어줌
|
||||
content.put("paramVO", cnsltVO);
|
||||
content.put("procsSttusCdList", procsSttusCdList);
|
||||
|
||||
model.addAttribute("resultMap",content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/cnslt/selectBOCstmrCnsltUnityBbscttListInqireForm", cnsltVO),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/bbs/cnslt/CstmrCnsltUnityBbscttListRForm";
|
||||
}
|
||||
@@ -65,13 +102,48 @@ public class CnsltController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectCstmrCnsltUnityBbscttListInqire")
|
||||
public String selectCstmrCnsltUnityBbscttListInqire(CnsltVO cnsltVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectCstmrCnsltUnityBbscttListInqire(BOCnsltVO cnsltVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
cnsltVO.setSopmalCd(authSopmalCd);
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/cnslt/selectBOCstmrCnsltUnityBbscttListInqire", cnsltVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
cnsltVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
|
||||
// 페이징 객체 생성 & 페이징정보 할당
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(cnsltVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(cnsltVO.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
cnsltVO.setPaginationInfo(paginationInfo);
|
||||
|
||||
cnsltVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
cnsltVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
cnsltVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
// 공통코드 호출
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("COUNSEL_PROCS_STTUS"); // 상담처리상태
|
||||
List<?> procsSttusCdList = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
cnsltVO.setSecretKey(boCommonService.selectSecretkey());
|
||||
List<DataMap> resultList = service.selectBOCstmrCnsltUnityBbscttListInqire(cnsltVO);
|
||||
|
||||
// 맵에 페이징 정보와 리스트를 넣어줌
|
||||
content.put("paramVO", cnsltVO);
|
||||
content.put("resultList", resultList);
|
||||
content.put("paginationInfo", cnsltVO.getPaginationInfo());
|
||||
content.put("procsSttusCdList", procsSttusCdList); // 상담처리상태
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/cnslt/selectBOCstmrCnsltUnityBbscttListInqire", cnsltVO),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/bbs/cnslt/CstmrCnsltUnityBbscttListR";
|
||||
}
|
||||
@@ -83,13 +155,39 @@ public class CnsltController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectCstmrCnsltDtlUpdtInqirePopup")
|
||||
public String selectCstmrCnsltDtlUpdtInqirePopup(CnsltVO cnsltVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectCstmrCnsltDtlUpdtInqirePopup(BOCnsltVO cnsltVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
cnsltVO.setSopmalCd(authSopmalCd);
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/cnslt/selectBOCnsltDtlUpdtInqirePopup", cnsltVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
cnsltVO.setSopmalCd(user.getSopmalCd());
|
||||
} // 쇼핑몰코드
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
|
||||
// 공통코드 호출
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("COUNSEL_PROCS_STTUS"); // 상담처리상태
|
||||
List<?> procsSttusCdList = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
bOMaComncdVO.setGroupCd("TELNB_DV"); // 인콜/아웃콜
|
||||
List<?> telnbDvCdList = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
//시크릿키 set
|
||||
cnsltVO.setSecretKey(boCommonService.selectSecretkey());
|
||||
DataMap result = new DataMap();
|
||||
result = service.selectBOCnsltDtlUpdtInqirePopup(cnsltVO);
|
||||
|
||||
content.put("cnsltVO", result);
|
||||
content.put("procsSttusCdList", procsSttusCdList);
|
||||
content.put("telnbDvCdList", telnbDvCdList);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/cnslt/selectBOCnsltDtlUpdtInqirePopup", cnsltVO),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/bbs/cnslt/CstmrCnsltDtlUpdtPopupU";
|
||||
}
|
||||
@@ -100,8 +198,8 @@ public class CnsltController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/updateCstmrCnsltUpdt")
|
||||
public ResponseEntity<WnbtResponse> updateCstmrCnsltUpdt(@Validated CnsltVO cnsltVO, BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
@RequestMapping(value = "/updateCstmrCnsltUpdt", produces= MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateCstmrCnsltUpdt(@Validated BOCnsltVO cnsltVO, BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
// 정합성 검사
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
@@ -134,10 +232,27 @@ public class CnsltController {
|
||||
cnsltVO.setGoodsRvwBbscttNb(null);
|
||||
}
|
||||
cnsltVO.setSopmalCd(authSopmalCd);
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/cnslt/updateBOCnsltUpdt", cnsltVO),
|
||||
ReplyFromResrc::getReply
|
||||
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
cnsltVO.setSopmalCd(user.getSopmalCd());
|
||||
} // 쇼핑몰코드
|
||||
cnsltVO.setUpdusr(user.getUserInnb()); // 수정자
|
||||
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
message = service.updateBOCnsltUpdt(cnsltVO);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/cnslt/updateBOCnsltUpdt", cnsltVO),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,21 +1,34 @@
|
||||
package com.wb.domainserver.domain.mngr.goods.banner.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.admin.sys.comncd.vo.BOMaComncdVO;
|
||||
import com.wb.domainserver.domain.admin.sys.ctgry.service.BOMaCtgryService;
|
||||
import com.wb.domainserver.domain.gcone.goods.banner.service.BOBannerService;
|
||||
import com.wb.domainserver.domain.gcone.goods.banner.vo.BOBannerVO;
|
||||
import com.wb.domainserver.domain.gcone.goods.goods.vo.BOGoodsVO;
|
||||
import com.wb.domainserver.domain.mngr.goods.banner.vo.BannerVO;
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
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.RESRC;
|
||||
import com.wb.domainserver.util.communicate.ReplyFromResrc;
|
||||
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.FileMngUtil;
|
||||
import com.wb.domainserver.util.file.service.FileStorageService;
|
||||
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;
|
||||
@@ -28,6 +41,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@Controller
|
||||
@@ -51,6 +65,13 @@ public class BannerController {
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
|
||||
@Autowired
|
||||
private BOBannerService service;
|
||||
@Autowired
|
||||
private BOMaCtgryService boMaCtgryService;
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
/**
|
||||
* 배너목록조회
|
||||
* @param vo
|
||||
@@ -59,15 +80,51 @@ public class BannerController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectBannerListR")
|
||||
public String selectBannerListR(BannerVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
public String selectBannerListR(BOBannerVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/banner/selectBOBannerList", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
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());
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
BOMaComncdVO cdVO = new BOMaComncdVO();
|
||||
|
||||
// 목록 조회
|
||||
List<DataMap> list = service.selectBOBannerList(vo);
|
||||
content.put("list", list);
|
||||
|
||||
// 노출위치구분 공통코드 조회
|
||||
cdVO.setGroupCd("EXPSRLC_DV");
|
||||
List<DataMap> expsrlcDvList = service.selectCommCode(cdVO);
|
||||
content.put("expsrlcDvList", expsrlcDvList);
|
||||
|
||||
// 노출구분 공통코드 조회
|
||||
cdVO.setGroupCd("EXPSR_DV");
|
||||
List<DataMap> expsrlcDvCdList = service.selectCommCode(cdVO);
|
||||
content.put("expsrlcDvCdList", expsrlcDvCdList);
|
||||
|
||||
content.put("BOBannerVO", vo);
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/banner/selectBOBannerList", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/goods/banner/BannerListR";
|
||||
}
|
||||
@@ -80,15 +137,52 @@ public class BannerController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectBannerRegistForm")
|
||||
public String selectBannerRegistForm(BannerVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
public String selectBannerRegistForm(BOBannerVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/banner/selectBOBannerRegistForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
BOMaComncdVO cdVO = new BOMaComncdVO();
|
||||
|
||||
// 노출위치구분 공통코드 조회
|
||||
cdVO.setGroupCd("EXPSRLC_DV");
|
||||
List<DataMap> expsrlcDvList = service.selectCommCode(cdVO);
|
||||
content.put("expsrlcDvList", expsrlcDvList);
|
||||
|
||||
// 노출구분 공통코드 조회
|
||||
cdVO.setGroupCd("EXPSR_DV");
|
||||
List<DataMap> expsrlcDvCdList = service.selectCommCode(cdVO);
|
||||
content.put("expsrlcDvCdList", expsrlcDvCdList);
|
||||
|
||||
// 적용대상 제한구분코드
|
||||
cdVO.setGroupCd("GOODS_APPLC_DV");
|
||||
List<DataMap> goodsCtgryLmttDvCdList = service.selectCommCode(cdVO);
|
||||
content.put("goodsCtgryLmttDvCdList", goodsCtgryLmttDvCdList);
|
||||
|
||||
content.put("BOBannerVO", vo);
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
BOGoodsVO goodsVOvo = new BOGoodsVO();
|
||||
goodsVOvo.setUpperCtgryId(vo.getUpperCtgryId());
|
||||
goodsVOvo.setSopmalCd(vo.getSopmalCd());
|
||||
goodsVOvo.setUpperCtgryId("2");
|
||||
List<?> GoodsCategoryList = boMaCtgryService.selectGoodsCategoryList(goodsVOvo);
|
||||
content.put("goodsCategoryList", GoodsCategoryList); // 카테고리 depth1
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/banner/selectBOBannerRegistForm", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/goods/banner/BannerC";
|
||||
}
|
||||
@@ -96,14 +190,14 @@ public class BannerController {
|
||||
/**
|
||||
* 배너 등록
|
||||
* @param vo
|
||||
* @param model
|
||||
* @param bindingResult
|
||||
* @param request
|
||||
* @param authSopmalCd
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/insertBanner" , method = RequestMethod.POST)
|
||||
public ResponseEntity<?> insertBanner(@Validated BannerVO vo, BindingResult bindingResult,
|
||||
@RequestMapping(value="/insertBanner" , method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<?> insertBanner(@Validated BOBannerVO vo, BindingResult bindingResult,
|
||||
HttpServletRequest request,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
if(bindingResult.hasErrors()) {
|
||||
@@ -126,10 +220,25 @@ public class BannerController {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/banner/insertBOBanner", vo),
|
||||
ReplyFromResrc::getReply
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
|
||||
Map<String, Object> content = service.insertBOBanner(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/banner/insertBOBanner", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
|
||||
}
|
||||
|
||||
@@ -142,16 +251,52 @@ public class BannerController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectBannerDtlForm" , method = RequestMethod.POST)
|
||||
public String selectBannerDtlForm(BannerVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
public String selectBannerDtlForm(BOBannerVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/banner/selectBOBannerDtlForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
BOMaComncdVO cdVO = new BOMaComncdVO();
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
|
||||
Map<String, Object> bannerInfo = service.selectBOBannerDtlForm(vo);
|
||||
content.put("bannerInfo", bannerInfo);
|
||||
|
||||
// 노출위치구분 공통코드 조회
|
||||
cdVO.setGroupCd("EXPSRLC_DV");
|
||||
List<DataMap> expsrlcDvList = service.selectCommCode(cdVO);
|
||||
content.put("expsrlcDvList", expsrlcDvList);
|
||||
|
||||
// 노출구분 공통코드 조회
|
||||
cdVO.setGroupCd("EXPSR_DV");
|
||||
List<DataMap> expsrlcDvCdList = service.selectCommCode(cdVO);
|
||||
content.put("expsrlcDvCdList", expsrlcDvCdList);
|
||||
|
||||
// 적용대상 제한구분코드
|
||||
cdVO.setGroupCd("GOODS_APPLC_DV");
|
||||
List<DataMap> goodsCtgryLmttDvCdList = service.selectCommCode(cdVO);
|
||||
content.put("goodsCtgryLmttDvCdList", goodsCtgryLmttDvCdList);
|
||||
|
||||
BOGoodsVO goodsVOvo = new BOGoodsVO();
|
||||
goodsVOvo.setUpperCtgryId(vo.getUpperCtgryId());
|
||||
goodsVOvo.setSopmalCd(vo.getSopmalCd());
|
||||
goodsVOvo.setUpperCtgryId("2");
|
||||
List<?> GoodsCategoryList = boMaCtgryService.selectGoodsCategoryList(goodsVOvo);
|
||||
content.put("goodsCategoryList", GoodsCategoryList); // 카테고리 depth1
|
||||
|
||||
content.put("BOBannerVO", vo);
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap",content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/banner/selectBOBannerDtlForm", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/goods/banner/BannerDtlU";
|
||||
}
|
||||
@@ -159,14 +304,14 @@ public class BannerController {
|
||||
/**
|
||||
* 배너 수정
|
||||
* @param vo
|
||||
* @param model
|
||||
* @param bindingResult
|
||||
* @param request
|
||||
* @param authSopmalCd
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/updateBannerDtl")
|
||||
public ResponseEntity<?> updateBannerDtl(@Validated BannerVO vo, BindingResult bindingResult, HttpServletRequest request, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
@RequestMapping(value="/updateBannerDtl", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<?> updateBannerDtl(@Validated BOBannerVO vo, BindingResult bindingResult, HttpServletRequest request, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
@@ -187,10 +332,25 @@ public class BannerController {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/banner/updateBOBannerDtl", vo),
|
||||
ReplyFromResrc::getReply
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content = service.updateBOBannerDtl(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/banner/updateBOBannerDtl", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
|
||||
}
|
||||
|
||||
@@ -199,16 +359,28 @@ public class BannerController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/deleteBanner" , method = RequestMethod.POST)
|
||||
public ResponseEntity<?> deleteBanner(BannerVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
@RequestMapping(value="/deleteBanner" , method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<?> deleteBanner(BOBannerVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/banner/deleteBOBanner", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
|
||||
Map<String, Object> content = service.deleteBOBanner(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/banner/deleteBOBanner", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
|
||||
@@ -218,16 +390,25 @@ public class BannerController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectBannerOrdrPopup" , method = RequestMethod.POST)
|
||||
public String selectBannerOrdrPopup(BannerVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
public String selectBannerOrdrPopup(BOBannerVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/banner/selectBOBannerOrdrPopup", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
List<DataMap> result = service.selectBOBannerOrdrPopup(vo);
|
||||
content.put("bannerOrdrList", result);
|
||||
|
||||
model.addAttribute("resultMap",content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/banner/selectBOBannerOrdrPopup", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/goods/banner/BannerOrdrPopupR";
|
||||
}
|
||||
@@ -237,18 +418,36 @@ public class BannerController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/updateBannerOrdr" , method = RequestMethod.POST)
|
||||
public ResponseEntity<?> updateBannerOrdr( @RequestBody List<BannerVO> vo,
|
||||
@RequestMapping(value="/updateBannerOrdr" , method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<?> updateBannerOrdr( @RequestBody List<BOBannerVO> vo,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
for(BannerVO bannerVO : vo){
|
||||
for(BOBannerVO bannerVO : vo){
|
||||
bannerVO.setSopmalCd(authSopmalCd);
|
||||
}
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/banner/updateBOBannerOrdr", vo),
|
||||
ReplyFromResrc::getReply
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
for(BOBannerVO tmpVo :vo){
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
tmpVo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
tmpVo.setRegusr(user.getUserInnb());
|
||||
tmpVo.setUpdusr(user.getUserInnb());
|
||||
}
|
||||
|
||||
Map<String, Object> content = service.updateBOBannerOrdr(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/banner/updateBOBannerOrdr", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,23 @@
|
||||
package com.wb.domainserver.domain.mngr.goods.cmnuse.controller;
|
||||
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
import com.wb.domainserver.domain.gcone.goods.cmnuse.service.BOCmnuseService;
|
||||
import com.wb.domainserver.domain.gcone.goods.cmnuse.vo.BOCmnuseVO;
|
||||
import com.wb.domainserver.domain.mngr.goods.cmnuse.vo.CmnuseVO;
|
||||
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.RESRC;
|
||||
import com.wb.domainserver.util.communicate.ReplyFromResrc;
|
||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
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;
|
||||
@@ -18,6 +25,8 @@ import org.springframework.web.bind.annotation.CookieValue;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Cmnuse Controller Class (front)
|
||||
*
|
||||
@@ -51,114 +60,179 @@ public class CmnuseController {
|
||||
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
@Autowired
|
||||
private BOCmnuseService service;
|
||||
|
||||
|
||||
/**
|
||||
* 공용 정보 목록 조회
|
||||
* @param CmnuseVO
|
||||
* @param vo
|
||||
* @param model 모델객체
|
||||
* @return String JSP 경로
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectCmnuseInfoList")
|
||||
public String selectCmnuseInfoList(CmnuseVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
public String selectCmnuseInfoList(BOCmnuseVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/cmnuse/selectBOCmnuseInfoList", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
List<DataMap> infoList = service.selectBOCmnuseInfoList(vo);
|
||||
|
||||
DataMap content = new DataMap();
|
||||
content.put("infoList", infoList);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/cmnuse/selectBOCmnuseInfoList", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/goods/cmnuse/CmnuseInfoListR";
|
||||
}
|
||||
/**
|
||||
* 공용 정보 등록
|
||||
* @param CmnuseVO
|
||||
* @param vo
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/insertCmnuseInfo" , method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> insertCmnuseInfo(CmnuseVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
@RequestMapping(value="/insertCmnuseInfo" , method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> insertCmnuseInfo(BOCmnuseVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/cmnuse/insertBOCmnuseInfo", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
|
||||
DataMap message = new DataMap();
|
||||
|
||||
int result = service.insertBOCmnuseInfo(vo);
|
||||
|
||||
message.put("message", result);
|
||||
message.put("cmnuseInfoInnb", vo.getCmnuseInfoInnb());
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/cmnuse/insertBOCmnuseInfo", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
/**
|
||||
* 공용 정보 등록 화면 조회
|
||||
* @param CmnuseVO
|
||||
* @param model 모델객체
|
||||
* @param vo
|
||||
* @param authSopmalCd
|
||||
* @return String JSP 경로
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectCmnuseInfoForm")
|
||||
public String selectCmnuseInfoForm(CmnuseVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
return "mngr/goods/cmnuse/CmnuseInfoFormR";
|
||||
}
|
||||
/**
|
||||
* 공용 정보 수정
|
||||
* @param CmnuseVO
|
||||
* @param vo
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/updateCmnuseInfoDtl", method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> updateCmnuseInfoDtl(CmnuseVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
@RequestMapping(value="/updateCmnuseInfoDtl", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateCmnuseInfoDtl(BOCmnuseVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/cmnuse/updateBOCmnuseInfoDtl", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
|
||||
DataMap message = new DataMap();
|
||||
int result = service.updateBOCmnuseInfoDtl(vo);
|
||||
message.put("message", result);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/cmnuse/updateBOCmnuseInfoDtl", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
/**
|
||||
* 공용 정보 수정 화면 조회
|
||||
* @param CmnuseVO
|
||||
* @param vo
|
||||
* @param model 모델객체
|
||||
* @return String JSP 경로
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectCmnuseInfoDtlForm")
|
||||
public String selectCmnuseInfoDtlForm(CmnuseVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
public String selectCmnuseInfoDtlForm(BOCmnuseVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/cmnuse/selectBOCmnuseInfoDtlForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
DataMap content = service.selectBOCmnuseInfoDtl(vo);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/cmnuse/selectBOCmnuseInfoDtlForm", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/goods/cmnuse/CmnuseInfoDtlFormR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 공용 정보 삭제
|
||||
* @param CmnuseVO
|
||||
* @param vo
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/deleteCmnuseInfo", method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> deleteCmnuseInfo(CmnuseVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
@RequestMapping(value="/deleteCmnuseInfo", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> deleteCmnuseInfo(BOCmnuseVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/cmnuse/deleteBOCmnuseInfo", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
|
||||
DataMap message = new DataMap();
|
||||
String result = service.deleteBOCmnuseInfo(vo)==1? "success":"fail";
|
||||
message.put("message", result);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/cmnuse/deleteBOCmnuseInfo", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,18 +1,27 @@
|
||||
package com.wb.domainserver.domain.mngr.goods.goodsinfo.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.goods.goodsinfo.service.BOGoodsinfoService;
|
||||
import com.wb.domainserver.domain.gcone.goods.goodsinfo.vo.BOGoodsInfoVO;
|
||||
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.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.RESRC;
|
||||
import com.wb.domainserver.util.communicate.ReplyFromResrc;
|
||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||
import com.wb.domainserver.util.communicate.ValidateResultConverter;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
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;
|
||||
@@ -22,6 +31,9 @@ import org.springframework.web.bind.annotation.CookieValue;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* GoodsInfoController Controller Class (front)
|
||||
*
|
||||
@@ -57,29 +69,58 @@ public class GoodsInfoController {
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
|
||||
@Autowired
|
||||
private BOGoodsinfoService service;
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
/**
|
||||
* 상품 정보 목록 조회
|
||||
* @param GoodsInfoVO
|
||||
* @param vo
|
||||
* @return GoodsInfoListR.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectGoodsInfoList")
|
||||
public String selectBbsListInqire(GoodsInfoVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
public String selectBbsListInqire(BOGoodsInfoVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/goodsinfo/selectBOGoodsInfoList", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
DataMap content = new DataMap();
|
||||
|
||||
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());
|
||||
|
||||
List<DataMap> infoList = new ArrayList<>();
|
||||
infoList = service.selectBOGoodsInfoList(vo);
|
||||
content.put("boGoodsInfo", vo);
|
||||
content.put("infoList", infoList);
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/goodsinfo/selectBOGoodsInfoList", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/goods/goodsinfo/GoodsInfoListR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 상품 정보 등록화면
|
||||
* @param GoodsInfoVO
|
||||
* @param vo
|
||||
* @return GoodsInfoFormR.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@@ -95,86 +136,133 @@ public class GoodsInfoController {
|
||||
|
||||
/**
|
||||
* 상품 정보 등록
|
||||
* @param GoodsInfoVO
|
||||
* @param vo
|
||||
* @param bindingResult 바인딩 및 정합성 점검결과 객체
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/insertGoodsInfo", method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> insertGoodsInfo(@Validated GoodsInfoVO vo, BindingResult bindingResult,
|
||||
@RequestMapping(value="/insertGoodsInfo", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> insertGoodsInfo(@Validated BOGoodsInfoVO vo, BindingResult bindingResult,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/goodsinfo/insertBOGoodsInfo", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
|
||||
DataMap message = new DataMap();
|
||||
message = service.insertBOGoodsInfo(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/goodsinfo/insertBOGoodsInfo", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
* 상품 정보 수정화면
|
||||
* @param GoodsInfoVO
|
||||
* @param vo
|
||||
* @param model 모델객체
|
||||
* @return GoodsInfoDtlFormR.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectGoodsInfoDtlForm")
|
||||
public String selectGoodsInfoDtlForm(GoodsInfoVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
public String selectGoodsInfoDtlForm(BOGoodsInfoVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/goodsinfo/selectBOGoodsInfoDtlForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
DataMap content = service.selectBOGoodsInfoDtl(vo);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/goodsinfo/selectBOGoodsInfoDtlForm", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/goods/goodsinfo/GoodsInfoDtlFormR";
|
||||
}
|
||||
/**
|
||||
* 상품 정보 수정
|
||||
* @param GoodsInfoVO
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/updateGoodsInfoDtl")
|
||||
public ResponseEntity<WnbtResponse> updateGoodsInfoDtl(@Validated GoodsInfoVO vo, BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
@RequestMapping(value="/updateGoodsInfoDtl", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateGoodsInfoDtl(@Validated BOGoodsInfoVO vo, BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/goodsinfo/updateBOGoodsInfoDtl", vo),
|
||||
ReplyFromResrc::getReply
|
||||
DataMap message = new DataMap();
|
||||
message = service.updateBOGoodsInfoDtl(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/goodsinfo/updateBOGoodsInfoDtl", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
* 상품 정보 삭제
|
||||
* @param GoodsInfoVO
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/deleteGoodsInfo")
|
||||
public ResponseEntity<WnbtResponse> deleteGoodsInfo(GoodsInfoVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
@RequestMapping(value="/deleteGoodsInfo", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> deleteGoodsInfo(BOGoodsInfoVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/goodsinfo/updateBOGoodsInfoDel", vo),
|
||||
ReplyFromResrc::getReply
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
|
||||
DataMap message = new DataMap();
|
||||
String result = service.updateBOGoodsInfoDel(vo);
|
||||
message.put("message", result);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/goodsinfo/updateBOGoodsInfoDel", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,20 +1,37 @@
|
||||
package com.wb.domainserver.domain.mngr.goods.prsnt.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.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.admin.sys.ctgry.service.BOMaCtgryService;
|
||||
import com.wb.domainserver.domain.gcone.goods.cmnuse.service.BOCmnuseService;
|
||||
import com.wb.domainserver.domain.gcone.goods.cmnuse.vo.BOCmnuseVO;
|
||||
import com.wb.domainserver.domain.gcone.goods.goods.service.BOGoodsService;
|
||||
import com.wb.domainserver.domain.gcone.goods.goods.vo.BOGoodsVO;
|
||||
import com.wb.domainserver.domain.gcone.setup.dlvygrp.service.BODlvygrpService;
|
||||
import com.wb.domainserver.domain.gcone.setup.dlvygrp.vo.BODlvygrpVO;
|
||||
import com.wb.domainserver.domain.mngr.goods.goodsmngr.vo.GoodsmngrVO;
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
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.RESRC;
|
||||
import com.wb.domainserver.util.communicate.ReplyFromResrc;
|
||||
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 jakarta.servlet.http.HttpServletRequest;
|
||||
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;
|
||||
@@ -27,6 +44,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/mngr/goods/prsnt")
|
||||
@@ -48,75 +66,223 @@ public class PrsntController {
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
|
||||
@Autowired
|
||||
private BOGoodsService service;
|
||||
@Autowired
|
||||
private BOMaCtgryService boMaCtgryService;
|
||||
@Autowired
|
||||
private BOMaSopmalService boMaSopmalService;
|
||||
@Autowired
|
||||
private BOMaComncdService bOMaComncdService;
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
@Autowired
|
||||
private BOCmnuseService bOCmnuseService;
|
||||
@Autowired
|
||||
private BODlvygrpService boDlvygrpService;
|
||||
|
||||
|
||||
/**
|
||||
* 사은품 목록 조회 폼
|
||||
* @param prsntSrchVO
|
||||
* @param vo
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectPrsntListForm")
|
||||
public String selectPrsntListForm(ModelMap model, GoodsmngrVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
public String selectPrsntListForm(ModelMap model, BOGoodsVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/goods/selectBOPrsntListForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
vo.setUpperCtgryId("0");
|
||||
vo.setGoodsKndCd("02"); //사은품
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
List<?> SopmalCdNmList = boMaSopmalService.selectBOSopmalCdNm();
|
||||
content.put("SopmalCdNmList", SopmalCdNmList); //검색조건 > 쇼핑몰
|
||||
|
||||
List<?> GoodsCategoryList = boMaCtgryService.selectGoodsCategoryList(vo);
|
||||
content.put("goodsCategoryList", GoodsCategoryList); // 카테고리 depth1
|
||||
BOMaComncdVO maComncdVO = new BOMaComncdVO();
|
||||
|
||||
maComncdVO = new BOMaComncdVO();
|
||||
maComncdVO.setGroupCd("GOODS_STTUS");
|
||||
List<?> cgo012List = bOMaComncdService.selectBOCommcdDetailList(maComncdVO);
|
||||
content.put("goodsDftinfoSttusList", cgo012List); // 판매상태
|
||||
|
||||
maComncdVO = new BOMaComncdVO();
|
||||
maComncdVO.setGroupCd("INVNTRY_POLICY");
|
||||
List<?> cgo134List = bOMaComncdService.selectBOCommcdDetailList(maComncdVO);
|
||||
|
||||
content.put("goodsDftinfoInvntryPolicyList", cgo134List); // 재고에 따른 판매
|
||||
content.put("BOGoodsVO", vo);
|
||||
|
||||
//사은품 이벤트명 조회
|
||||
List<?> goodsEvtNmList = service.selectBOGoodsEvtNm(vo);
|
||||
content.put("goodsEvtNmList", goodsEvtNmList);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/goods/selectBOPrsntListForm", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/goods/prsnt/PrsntListRForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 사은품 목록 조회
|
||||
* @param prsntSrchVO
|
||||
* @param vo
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectPrsntList")
|
||||
public String selectPrsntList(ModelMap model,GoodsmngrVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
public String selectPrsntList(ModelMap model,BOGoodsVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/goods/selectBOPrsntList", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
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());
|
||||
|
||||
vo.setGoodsKndCd("02"); //사은품
|
||||
|
||||
// 목록 조회
|
||||
List<DataMap> list = service.selectPrsntList(vo);
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("BOGoodsVO", vo);
|
||||
content.put("list", list);
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/goods/selectBOPrsntList", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
return "mngr/goods/prsnt/PrsntListR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 사은품 등록 폼
|
||||
* @param prsntSrchVO
|
||||
* @param vo
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/insertPrsntForm")
|
||||
public String insertPrsntForm(ModelMap model,GoodsmngrVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
public String insertPrsntForm(ModelMap model,BOGoodsVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/goods/selectBOGoodsListForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
|
||||
//검색조건 > 쇼핑몰
|
||||
List<?> SopmalCdNmList = boMaSopmalService.selectBOSopmalCdNm();
|
||||
content.put("SopmalCdNmList", SopmalCdNmList);
|
||||
|
||||
vo.setUpperCtgryId("2");
|
||||
// 카테고리 depth1
|
||||
List<DataMap> goodsCategoryList = boMaCtgryService.selectGoodsCategoryList(vo);
|
||||
content.put("goodsCategoryList", goodsCategoryList);
|
||||
|
||||
|
||||
// 노출
|
||||
BOMaComncdVO maComncdVO = new BOMaComncdVO();
|
||||
maComncdVO.setGroupCd("EXPSR");
|
||||
List<?> cgo014List = bOMaComncdService.selectBOCommcdDetailList(maComncdVO);
|
||||
content.put("expsrCdList", cgo014List);
|
||||
|
||||
// 판매상태
|
||||
maComncdVO = new BOMaComncdVO();
|
||||
maComncdVO.setGroupCd("GOODS_STTUS");
|
||||
List<?> cgo012List = bOMaComncdService.selectBOCommcdDetailList(maComncdVO);
|
||||
content.put("goodsDftinfoSttusList", cgo012List);
|
||||
|
||||
// 재고에 따른 판매
|
||||
maComncdVO = new BOMaComncdVO();
|
||||
maComncdVO.setGroupCd("INVNTRY_POLICY");
|
||||
List<?> cgo134List = bOMaComncdService.selectBOCommcdDetailList(maComncdVO);
|
||||
content.put("goodsDftinfoInvntryPolicyList", cgo134List);
|
||||
|
||||
// 상품아이콘
|
||||
maComncdVO = new BOMaComncdVO();
|
||||
maComncdVO.setGroupCd("GOODS_ICON");
|
||||
List<?> iconList = bOMaComncdService.selectBOCommcdDetailList(maComncdVO);
|
||||
content.put("iconList", iconList);
|
||||
|
||||
// 실시간수량배너구분코드
|
||||
maComncdVO = new BOMaComncdVO();
|
||||
maComncdVO.setGroupCd("RLTM_QY_BANNER_DV");
|
||||
List<?> rltmQyBannerDvList = bOMaComncdService.selectBOCommcdDetailList(maComncdVO);
|
||||
content.put("rltmQyBannerDvList", rltmQyBannerDvList);
|
||||
|
||||
//브랜드 목록조회
|
||||
maComncdVO.setGroupCd("BRAND");
|
||||
List<?> brandList = bOMaComncdService.selectBOCommcdDetailList(maComncdVO);
|
||||
content.put("brandList", brandList);
|
||||
|
||||
//EP 목록조회
|
||||
maComncdVO.setGroupCd("GOODS_EP_DV");
|
||||
List<?> epList = bOMaComncdService.selectBOCommcdDetailList(maComncdVO);
|
||||
content.put("epList", epList);
|
||||
|
||||
|
||||
//배송그룹
|
||||
BODlvygrpVO dlvyGroup = new BODlvygrpVO();
|
||||
dlvyGroup.setSopmalCd(vo.getSopmalCd());
|
||||
List<BODlvygrpVO> dlvyGrpList = boDlvygrpService.selectBODlvyGroupAllList(dlvyGroup);
|
||||
content.put("dlvyGrpList", dlvyGrpList);
|
||||
|
||||
content.put("BOGoodsVO", vo);
|
||||
|
||||
//공용정보목록조회
|
||||
BOCmnuseVO cmnuseVo = new BOCmnuseVO();
|
||||
cmnuseVo.setSopmalCd(vo.getSopmalCd());
|
||||
List<?> infoList = bOCmnuseService.selectBOCmnuseInfoList(cmnuseVo);
|
||||
content.put("infoList", infoList);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/goods/selectBOGoodsListForm", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
return "mngr/goods/prsnt/PrsntC";
|
||||
}
|
||||
/**
|
||||
* 사은품 등록
|
||||
* @param prsntVO
|
||||
* @param vo
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/insertPrsnt" , method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> insertPrsnt(@Validated GoodsmngrVO vo, BindingResult bindingResult , HttpServletRequest request, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
@RequestMapping(value="/insertPrsnt" , method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> insertPrsnt(@Validated BOGoodsVO vo, BindingResult bindingResult , HttpServletRequest request, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
@@ -132,47 +298,112 @@ public class PrsntController {
|
||||
ulpladFileMap = filestore.fileUpload(request);
|
||||
vo.setFileInfo(ulpladFileMap);
|
||||
} 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());
|
||||
}
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/goods/insertBOPrsnt", vo),
|
||||
ReplyFromResrc::getReply
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
vo.setGoodsKndCd("02"); //사은품
|
||||
vo.setOptnTy("01"); // 옵션코드 - 필수옵션(일반)
|
||||
vo.setOptnExpsrAt("Y"); // 옵션노출여부
|
||||
vo.setStdrDvAt("Y"); // 기분구분여부
|
||||
vo.setUseAt("Y"); // 사용여부
|
||||
vo.setExpsrDvCd("01"); // 노출구분 01(노출)
|
||||
|
||||
//상품 등록 로직
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
message = service.insertBOPrsnt(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/goods/insertBOPrsnt", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 사은품 상세조회
|
||||
* @param prsntVO
|
||||
* @param vo
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectPrsntDtlForm")
|
||||
public String selectPrsntDtlForm(ModelMap model,GoodsmngrVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
public String selectPrsntDtlForm(ModelMap model,BOGoodsVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/goods/selectBOPrsntDtl", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
|
||||
// 상세조회
|
||||
DataMap list = new DataMap();
|
||||
list = service.selectBOPrsntDtl(vo);
|
||||
|
||||
List<DataMap> imglist = null;
|
||||
vo.setCutNb("");
|
||||
imglist = service.selectBOGoodsImg(vo);
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
|
||||
BOMaComncdVO maComncdVO = new BOMaComncdVO();
|
||||
maComncdVO.setGroupCd("EXPSR");
|
||||
|
||||
List<?> cgo014List = bOMaComncdService.selectBOCommcdDetailList(maComncdVO);
|
||||
|
||||
content.put("expsrCdList", cgo014List); // 노출
|
||||
|
||||
maComncdVO = new BOMaComncdVO();
|
||||
maComncdVO.setGroupCd("GOODS_STTUS");
|
||||
|
||||
List<?> cgo012List = bOMaComncdService.selectBOCommcdDetailList(maComncdVO);
|
||||
|
||||
content.put("goodsDftinfoSttusList", cgo012List); // 판매상태
|
||||
|
||||
maComncdVO = new BOMaComncdVO();
|
||||
maComncdVO.setGroupCd("INVNTRY_POLICY");
|
||||
|
||||
List<?> cgo134List = bOMaComncdService.selectBOCommcdDetailList(maComncdVO);
|
||||
|
||||
content.put("goodsDftinfoInvntryPolicyList", cgo134List); // 재고에 따른 판매
|
||||
|
||||
content.put("BOGoodsVO", vo);
|
||||
content.put("list", list);
|
||||
content.put("imglist", imglist);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/goods/selectBOPrsntDtl", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
return "mngr/goods/prsnt/PrsntDtlU";
|
||||
}
|
||||
|
||||
/**
|
||||
* 사은품 수정
|
||||
* @param prsntVO
|
||||
* @param vo
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/updatePrsntDtl" , method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> updatePrsntDtl(@Validated GoodsmngrVO vo, BindingResult bindingResult , HttpServletRequest request, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
@RequestMapping(value="/updatePrsntDtl" , method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updatePrsntDtl(@Validated BOGoodsVO vo, BindingResult bindingResult , HttpServletRequest request, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
@@ -188,36 +419,72 @@ public class PrsntController {
|
||||
ulpladFileMap = filestore.fileUpload(request);
|
||||
vo.setFileInfo(ulpladFileMap);
|
||||
} 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());
|
||||
}
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/goods/updateBOPrsnt", vo),
|
||||
ReplyFromResrc::getReply
|
||||
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
vo.setGoodsKndCd("02"); //사은품
|
||||
vo.setOptnTy("01"); // 옵션코드 - 필수옵션(일반)
|
||||
vo.setOptnExpsrAt("Y"); // 옵션노출여부
|
||||
vo.setStdrDvAt("Y"); // 기분구분여부
|
||||
vo.setUseAt("Y"); // 사용여부
|
||||
vo.setExpsrDvCd("01"); // 노출구분 01(노출)
|
||||
|
||||
//사은품 수정 로직
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
message = service.updateBOPrsnt(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/goods/updateBOPrsnt", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 사은품 삭제
|
||||
* @param prsntVO
|
||||
* @param vo
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/deletePrsnt" , method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> deletePrsnt(GoodsmngrVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
@RequestMapping(value="/deletePrsnt" , method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> deletePrsnt(BOGoodsVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/goods/deleteBOGoods", vo),
|
||||
ReplyFromResrc::getReply
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
//상품 삭제 로직
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
message = service.deleteBOGoods(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
|
||||
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/goods/goods/deleteBOGoods", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ import org.springframework.web.util.UriUtils;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@@ -124,6 +125,7 @@ public class MngrLoginController {
|
||||
loginUser = service.mngrLogin(loginRequest);
|
||||
|
||||
|
||||
|
||||
log.debug("loginUser :: {}", loginUser);
|
||||
|
||||
service.createLoginToken(loginUser, request, response);
|
||||
@@ -155,14 +157,15 @@ public class MngrLoginController {
|
||||
|
||||
//쇼핑몰 테마 등 정보 조회
|
||||
Shop shopInfo = bomaSopmalService.selectSopmalInfo(sopmalCd);
|
||||
List<DataMap> siteList = bomaSopmalService.selectSopmalList();
|
||||
|
||||
model.addAttribute("redirectUri", redirectUri);
|
||||
model.addAttribute("accessUrl", accessUrl);
|
||||
model.addAttribute("sopmalCd", sopmalCd);
|
||||
model.addAttribute("realm", RealmContextHolder.getRealm().toLowerCase());
|
||||
model.addAttribute("shopInfo", shopInfo);
|
||||
model.addAttribute("siteList", siteList);
|
||||
|
||||
//디바이스 타입에 따라 조절
|
||||
return "login/login-MNGR";
|
||||
}
|
||||
|
||||
|
||||
@@ -65,13 +65,10 @@ public class MngrMainController {
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/main")
|
||||
public String selectMngrMainInqire(ModelMap model, HttpServletRequest request) {
|
||||
// 응답 메세지 객체
|
||||
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
public String selectMngrMainInqire(@CookieValue(value = "authSopmalCd") String authSopmalCd, ModelMap model, HttpServletRequest request) {
|
||||
DataMap vo = new DataMap();
|
||||
|
||||
vo.put("sopmalCd", user.getSopmalCd());
|
||||
vo.put("sopmalCd", authSopmalCd);
|
||||
Map<String, Object> content = service.selectBOMngrMainInqire(vo);
|
||||
model.addAttribute("resultMap", content);
|
||||
return "mngr/index";
|
||||
|
||||
Reference in New Issue
Block a user