fo bo 머지작업 - 오류수정

This commit is contained in:
jazz
2025-12-04 17:50:20 +09:00
parent 36dc0d7f43
commit c108b2127c
2 changed files with 78 additions and 8 deletions

View File

@@ -511,27 +511,71 @@ public class BbsmngrController {
*/
@Policy(AuthPolicy.RESTRICTED)
@RequestMapping(value="/selectBbsDtlUpdtForm")
public String selectBbsDtlUpdtForm(BbsmngrVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
public String selectBbsDtlUpdtForm(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 content = new DataMap();
content = service.selectBOBbsDtlUpdtInqire(vo); // 게시판 상세 조회
content.put("mbrGradList", mbrGradList);
content.put("codeContent", codeList);
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/selectBOBbsDtlUpdtForm",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());
} catch(Exception e) {
log.error(e.getMessage(), e);
}
model.addAttribute("resultMap", resultMap);
model.addAttribute("resultMap", content);
return "mngr/bbs/bbsmngr/BbsDtlUpdtU";
}