fix : 관리자 구독서비스 목록
This commit is contained in:
@@ -34,7 +34,7 @@ public class ImagePaginationRenderer extends AbstractPaginationRenderer implemen
|
||||
//previousPageLabel = "<li><a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \"><img src=\"" + servletContext.getContextPath() + "/images/egovframework/com/cmm/mod/icon/icon_prev.gif\" alt=\"이전\" border=\"0\"/></a></li>";
|
||||
previousPageLabel = "<button class=\"pagination__item prev\" onclick=\"{0}({1});return false; \"><span class=\"visually-hidden\">이전 페이지로</span></button>";
|
||||
//currentPageLabel = "<li><strong>{0}</strong></li>";
|
||||
currentPageLabel = "<li><button class=\"pagination__item active\"><span>{0}</span></button></li>";
|
||||
currentPageLabel = "<li><button class=\"pagination__item active\" onclick=\"return false; \"><span>{0}</span></button></li>";
|
||||
//otherPageLabel = "<li><a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \">{2}</a></li>";
|
||||
otherPageLabel = "<li><button class=\"pagination__item\" onclick=\"{0}({1});return false; \"><span>{2}</span></button></li>";
|
||||
//nextPageLabel = "<li> <a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \"><img src=\"" + servletContext.getContextPath() + "/images/egovframework/com/cmm/mod/icon/icon_next.gif\" alt=\"다음\" border=\"0\"/></a></li>";
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.wb.domainserver.domain.gcone.goods.subsvc.mapper;
|
||||
|
||||
import com.wb.domainserver.domain.gcone.goods.banner.vo.BOBannerVO;
|
||||
import com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@@ -23,5 +22,6 @@ public interface BOSubsvcMapper {
|
||||
List<DataMap> selectBOMngrSrchSubsvcList(BOSubsvcVO vo);
|
||||
/** 관리자 구독서비스 조회조건 구독서비스별 기수*/
|
||||
List<DataMap> selectBOMngrSrchSubsvcGnrList(BOSubsvcVO vo);
|
||||
|
||||
/** 관리자 구독서비스 선택 삭제*/
|
||||
int deleteBOMngrSubsvc(BOSubsvcVO vo);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.wb.domainserver.domain.gcone.goods.subsvc.service;
|
||||
|
||||
import com.wb.domainserver.domain.gcone.goods.goodsinfo.vo.BOGoodsInfoVO;
|
||||
import com.wb.domainserver.domain.gcone.goods.subsvc.mapper.BOSubsvcMapper;
|
||||
import com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
@@ -43,4 +44,51 @@ public class BOSubsvcService {
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 관리자 구독서비스 목록 조회
|
||||
* */
|
||||
public List<DataMap> selectBOMngrSubsvcList(BOSubsvcVO vo) {
|
||||
List<DataMap> dataList = new ArrayList<>();
|
||||
|
||||
dataList = mapper.selectBOMngrSubsvcList(vo);
|
||||
if(dataList == null || dataList.isEmpty()){
|
||||
vo.getPaginationInfo().setTotalRecordCount(0);
|
||||
}else{
|
||||
vo.getPaginationInfo().setTotalRecordCount(((Long)dataList.get(0).get("totCnt")).intValue());
|
||||
}
|
||||
|
||||
return dataList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 관리자 구독서비스 조회조건 구독서비스
|
||||
* */
|
||||
public List<DataMap> selectBOMngrSrchSubsvcList(BOSubsvcVO vo) {
|
||||
List<DataMap> dataList = new ArrayList<>();
|
||||
|
||||
dataList = mapper.selectBOMngrSrchSubsvcList(vo);
|
||||
|
||||
return dataList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 관리자 구독서비스 조회조건 구독서비스별 기수
|
||||
* */
|
||||
public List<DataMap> selectBOMngrSrchSubsvcGnrList(BOSubsvcVO vo) {
|
||||
List<DataMap> dataList = new ArrayList<>();
|
||||
|
||||
dataList = mapper.selectBOMngrSrchSubsvcGnrList(vo);
|
||||
|
||||
return dataList;
|
||||
}
|
||||
|
||||
public String deleteBOMngrSubsvc(BOSubsvcVO vo) {
|
||||
String message = "fail";
|
||||
int result = mapper.deleteBOMngrSubsvc(vo);
|
||||
if (result > 0) {
|
||||
message = "success";
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -93,4 +93,6 @@ private static final long serialVersionUID = 1L;
|
||||
private String srchExpsrDvCd;
|
||||
/** 정렬구분 */
|
||||
private String sortDv;
|
||||
/** 배열 구독서비스고유번호 */
|
||||
private List<String> arrSubsvcInnb;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
package com.wb.domainserver.domain.mngr.goods.subsvc.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.goods.cmnuse.vo.BOCmnuseVO;
|
||||
import com.wb.domainserver.domain.gcone.goods.goods.vo.BOGoodsVO;
|
||||
import com.wb.domainserver.domain.gcone.goods.goodsinfo.vo.BOGoodsInfoVO;
|
||||
import com.wb.domainserver.domain.gcone.goods.subsvc.service.BOSubsvcService;
|
||||
import com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO;
|
||||
import com.wb.domainserver.domain.gcone.setup.dlvygrp.vo.BODlvygrpVO;
|
||||
import com.wb.domainserver.domain.mngr.goods.goodsinfo.vo.GoodsInfoVO;
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
import com.wb.domainserver.response.WnbtResponse;
|
||||
import com.wb.domainserver.response.WnbtResponseBody;
|
||||
import com.wb.domainserver.security.authentication.AnonymousUser;
|
||||
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||
import com.wb.domainserver.util.communicate.ValidateResultConverter;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import io.micrometer.common.util.StringUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.CookieValue;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* SubsvcController Controller Class
|
||||
*
|
||||
* @author
|
||||
* @since 2026-01-23
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2026-01-23 jazz 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
@Slf4j
|
||||
@Controller
|
||||
@RequestMapping("/mngr/goods/subsvc")
|
||||
public class SubsvcController {
|
||||
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
|
||||
/** 공통 메시지 처리를 위한 메시지 객체 */
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
@Autowired
|
||||
private BOSubsvcService service;
|
||||
@Autowired
|
||||
private BOMaComncdService boMaComncdService;
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
/**
|
||||
* 구독서비스 목록 조회 폼
|
||||
* @param vo
|
||||
* @return SubsvcListForm.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectSubsvcListForm")
|
||||
public String selectSubsvcListForm(BOSubsvcVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("paramVO", vo);
|
||||
|
||||
// 조회조건 구독서비스
|
||||
List<?> SrchSubsvcList = service.selectBOMngrSrchSubsvcList(vo);
|
||||
content.put("srchSubsvcList", SrchSubsvcList);
|
||||
|
||||
//조회조건 판매상태
|
||||
BOMaComncdVO param = new BOMaComncdVO();
|
||||
param.setGroupCd("GOODS_STTUS");
|
||||
List<?> srchSubsvcSttusList = boMaComncdService.selectBOCommcdDetailList(param);
|
||||
content.put("srchSubsvcSttusList", srchSubsvcSttusList);
|
||||
|
||||
//조회조건 노출구분
|
||||
param.setGroupCd("EXPSR_DV");
|
||||
List<?> srchExpsrDvList = boMaComncdService.selectBOCommcdDetailList(param);
|
||||
content.put("srchExpsrDvList", srchExpsrDvList);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
return "mngr/goods/subsvc/SubsvcListForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 구독서비스 목록 조회 리스트
|
||||
* @param vo
|
||||
* @param model
|
||||
* @return SubsvcList.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectSubsvcList")
|
||||
public String selectSubsvcList(BOSubsvcVO vo,ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
// 페이징 객체 생성 & 페이징정보 할당
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
|
||||
vo.setPaginationInfo(paginationInfo);
|
||||
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
if(StringUtils.isEmpty(vo.getSortDv())){
|
||||
//정렬기준 초기값 셋팅
|
||||
vo.setSortDv("subsvcGnrAsc");
|
||||
}
|
||||
|
||||
// 목록 조회
|
||||
List<DataMap> list = service.selectBOMngrSubsvcList(vo);
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("paramVO", vo);
|
||||
|
||||
content.put("list", list);
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
|
||||
return "mngr/goods/subsvc/SubsvcList";
|
||||
}
|
||||
/**
|
||||
* 구독서비스 선택삭제
|
||||
* @param vo
|
||||
* @return ResponseEntity<WnbtResponse>
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/deleteSubsvc", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> deleteSubsvc(BOSubsvcVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setUpdusr(user.getUserInnb()); //수정자
|
||||
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
DataMap message = new DataMap();
|
||||
String result = service.deleteBOMngrSubsvc(vo);
|
||||
message.put("message", result);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 구독서비스 목록 조회 리스트
|
||||
* @param vo
|
||||
* @return ResponseEntity<WnbtResponse>
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectSrchSubsvcGnrListAjax", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> selectSrchSubsvcGnrListAjax(BOSubsvcVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
|
||||
// 조회조건 구독서비스
|
||||
List<DataMap> SrchSubsvcGnrList = service.selectBOMngrSrchSubsvcGnrList(vo);
|
||||
content.put("srchSubsvcGnrList", SrchSubsvcGnrList);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user