초기소스
This commit is contained in:
@@ -163,7 +163,7 @@ public class MngrLoginController {
|
||||
model.addAttribute("shopInfo", shopInfo);
|
||||
|
||||
//디바이스 타입에 따라 조절
|
||||
return "MO".equals(request.getAttribute("env"))?"login/login-MNGRM":"login/login-MNGR";
|
||||
return "login/login-MNGR";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package com.wb.domainserver.domain.mngr.main.controller;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.wb.domainserver.domain.admin.store.sopmal.service.BOMaSopmalService;
|
||||
import com.wb.domainserver.domain.admin.store.sopmal.vo.BOMaSopmalVO;
|
||||
import com.wb.domainserver.domain.gcone.main.service.BOMainService;
|
||||
import com.wb.domainserver.domain.mngr.main.vo.MainVO;
|
||||
import com.wb.domainserver.realm.RealmContextHolder;
|
||||
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;
|
||||
@@ -15,14 +18,12 @@ 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.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.CookieValue;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.util.UriUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -41,6 +42,9 @@ public class MngrMainController {
|
||||
@Autowired
|
||||
private BOMaSopmalService maSopmalService;
|
||||
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@GetMapping(value="")
|
||||
@@ -78,13 +82,14 @@ public class MngrMainController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectMngrMainChart1Inqire")
|
||||
public ResponseEntity<WnbtResponse> selectMngrMainChart1Inqire() {
|
||||
@RequestMapping(value="/selectMngrMainChart1Inqire", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
public ResponseEntity<WnbtResponse> selectMngrMainChart1Inqire(@CookieValue(value = "authSopmalCd") String authSopmalCd, MainVO mainvo) {
|
||||
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
DataMap vo = new DataMap();
|
||||
mainvo.setSopmalCd(authSopmalCd);
|
||||
|
||||
vo.put("sopmalCd", user.getSopmalCd());
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
DataMap vo = objectMapper.convertValue(mainvo, DataMap.class);
|
||||
|
||||
// 응답 메세지 객체
|
||||
List<DataMap> content = service.selectBOMngrMainChart1Inqire(vo);
|
||||
@@ -93,7 +98,6 @@ public class MngrMainController {
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -101,8 +105,13 @@ public class MngrMainController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectMngrMainChart2Inqire")
|
||||
public ResponseEntity<WnbtResponse> selectMngrMainChart2Inqire(DataMap vo) {
|
||||
@RequestMapping(value="/selectMngrMainChart2Inqire", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> selectMngrMainChart2Inqire(@CookieValue(value = "authSopmalCd") String authSopmalCd, MainVO mainvo) {
|
||||
|
||||
mainvo.setSopmalCd(authSopmalCd);
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
DataMap vo = objectMapper.convertValue(mainvo, DataMap.class);
|
||||
|
||||
// 응답 메세지 객체
|
||||
List<DataMap> content = service.selectBOMngrMainChart2Inqire(vo);
|
||||
return ResponseEntity.ok(
|
||||
@@ -110,6 +119,7 @@ public class MngrMainController {
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -118,7 +128,7 @@ public class MngrMainController {
|
||||
* @return map
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/getPcUrl")
|
||||
@RequestMapping(value = "/getPcUrl", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
public ResponseEntity<WnbtResponse> getPcUrl(BOMaSopmalVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
@@ -133,6 +143,7 @@ public class MngrMainController {
|
||||
|
||||
DataMap content = new DataMap();
|
||||
content.put("sopmalInfo", sopmalInfo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
|
||||
Reference in New Issue
Block a user