Forráskód Böngészése

Merge branch 'develop' into card007

card007 4 éve
szülő
commit
0f4e8156e3
47 módosított fájl, 1457 hozzáadás és 525 törlés
  1. 20 0
      src/main/java/com/style24/admin/biz/dao/TsaCounselDao.java
  2. 11 1
      src/main/java/com/style24/admin/biz/dao/TsaCustomerDao.java
  3. 22 0
      src/main/java/com/style24/admin/biz/service/TsaCounselService.java
  4. 15 8
      src/main/java/com/style24/admin/biz/service/TsaCustomerService.java
  5. 36 7
      src/main/java/com/style24/admin/biz/web/TsaCustomerController.java
  6. 35 0
      src/main/java/com/style24/admin/biz/web/TsaDisplayController.java
  7. 34 13
      src/main/java/com/style24/admin/biz/web/TsaShoplinkerController.java
  8. 2 2
      src/main/java/com/style24/admin/support/config/TsaRedisSessionConfig.java
  9. 39 1
      src/main/java/com/style24/admin/support/config/TsaWebMvcConfig.java
  10. 4 1
      src/main/java/com/style24/persistence/domain/CategoryGoods.java
  11. 8 0
      src/main/java/com/style24/persistence/domain/Counsel.java
  12. 2 1
      src/main/java/com/style24/persistence/domain/CustomerSearch.java
  13. 36 0
      src/main/java/com/style24/persistence/domain/GoodsCategory.java
  14. 1 0
      src/main/java/com/style24/persistence/domain/Plan.java
  15. 178 48
      src/main/java/com/style24/persistence/mybatis/shop/TsaCounsel.xml
  16. 30 3
      src/main/java/com/style24/persistence/mybatis/shop/TsaCustomer.xml
  17. 256 128
      src/main/java/com/style24/persistence/mybatis/shop/TsaDsiplay.xml
  18. 3 0
      src/main/java/com/style24/persistence/mybatis/shop/TsaGoods.xml
  19. 7 3
      src/main/java/com/style24/persistence/mybatis/shop/TsaPlan.xml
  20. 2 2
      src/main/java/com/style24/persistence/mybatis/shop/TsaReview.xml
  21. 2 2
      src/main/java/com/style24/persistence/mybatis/shop/TsaSocial.xml
  22. 1 1
      src/main/resources/config/application-style.yml
  23. 7 1
      src/main/webapp/WEB-INF/views/customer/CustomerActiveListForm.html
  24. 56 7
      src/main/webapp/WEB-INF/views/customer/CustomerDetailForm.html
  25. 5 0
      src/main/webapp/WEB-INF/views/customer/CustomerDormantListForm.html
  26. 4 0
      src/main/webapp/WEB-INF/views/customer/CustomerSecedeListForm.html
  27. 35 5
      src/main/webapp/WEB-INF/views/customer/GoodsQnaForm.html
  28. 39 2
      src/main/webapp/WEB-INF/views/customer/OneToOneQnaDetailForm.html
  29. 36 4
      src/main/webapp/WEB-INF/views/customer/OneToOneQnaForm.html
  30. 11 1
      src/main/webapp/WEB-INF/views/display/CategoryForm.html
  31. 1 3
      src/main/webapp/WEB-INF/views/display/CategoryGoodsForm.html
  32. 309 79
      src/main/webapp/WEB-INF/views/display/GoodsCategoryForm.html
  33. 6 2
      src/main/webapp/WEB-INF/views/display/ItemkindCategoryForm.html
  34. 3 3
      src/main/webapp/WEB-INF/views/marketing/CouponIssuePopupForm.html
  35. 7 3
      src/main/webapp/WEB-INF/views/marketing/PlanCornerListForm.html
  36. 11 13
      src/main/webapp/WEB-INF/views/marketing/PlanDetailPopupForm.html
  37. 29 30
      src/main/webapp/WEB-INF/views/marketing/PlanListForm.html
  38. 4 5
      src/main/webapp/WEB-INF/views/marketing/PlanReplyDetailForm.html
  39. 1 1
      src/main/webapp/WEB-INF/views/marketing/PlanReplyListForm.html
  40. 44 44
      src/main/webapp/WEB-INF/views/marketing/PlanTemplatePopupForm.html
  41. 54 3
      src/main/webapp/WEB-INF/views/marketing/PollListForm.html
  42. 1 1
      src/main/webapp/WEB-INF/views/marketing/SocialShoppingListForm.html
  43. 13 58
      src/main/webapp/WEB-INF/views/order/OrderDetailForm.html
  44. 1 1
      src/main/webapp/WEB-INF/views/shoplinker/ShoplinkerGoodsSendForm.html
  45. 12 18
      src/main/webapp/WEB-INF/views/shoplinker/ShoplinkerInvoiceSendForm.html
  46. 23 19
      src/main/webapp/WEB-INF/views/shoplinker/ShoplinkerOrderForm.html
  47. 1 1
      src/main/webapp/WEB-INF/views/shoplinker/ShoplinkerStockForm.html

+ 20 - 0
src/main/java/com/style24/admin/biz/dao/TsaCounselDao.java

@@ -24,6 +24,17 @@ public interface TsaCounselDao {
 	 * @since 2020. 12. 24
 	 */
 	Collection<Counsel> getOneToOneQnaList(Counsel counsel);
+	
+
+	/**
+	 * 1:1문의 전체 카운트
+	 * @param counsel -상담정보
+	 * @return
+	 * @author sowon
+	 * @since 2021. 06. 28
+	 */
+	int getOneToOneQnaListCount(Counsel counsel);
+
 
 	/**
 	 * 1:1문의 상세
@@ -50,6 +61,15 @@ public interface TsaCounselDao {
 	 * @since 2020. 12. 24
 	 */
 	Collection<Counsel> getGoodsQnaList(Counsel counsel);
+	
+	/**
+	 * 상품문의 목록 카운트
+	 * @param counsel -상담정보
+	 * @return
+	 * @author sowon
+	 * @since 2021. 06. 28
+	 */
+	int getGoodsQnaListCount(Counsel counsel);
 
 	/**
 	 * 상품문의 상세

+ 11 - 1
src/main/java/com/style24/admin/biz/dao/TsaCustomerDao.java

@@ -62,6 +62,16 @@ public interface TsaCustomerDao {
 	 */
 	void updateCustomerCellPhnno(Customer customer);
 
+
+	/**
+	 * 회원 주문내역
+	 * @param customerSearch - 고객번호
+	 * @return Collection<Order>
+	 * @author jsshin
+	 * @since 2021. 01. 21
+	 */
+	int getCustomerOrderListCount(CustomerSearch customerSearch);
+
 	/**
 	 * 회원 주문내역
 	 * @param custNo - 고객번호
@@ -69,7 +79,7 @@ public interface TsaCustomerDao {
 	 * @author jsshin
 	 * @since 2021. 01. 21
 	 */
-	Collection<Order> getCustomerOrderList(Integer custNo);
+	Collection<Order> getCustomerOrderList(CustomerSearch customerSearch);
 
 	/**
 	 * 회원상세-쿠폰내역

+ 22 - 0
src/main/java/com/style24/admin/biz/service/TsaCounselService.java

@@ -34,6 +34,17 @@ public class TsaCounselService {
 	public Collection<Counsel> getOneToOneQnaList(Counsel counsel) {
 		return counselDao.getOneToOneQnaList(counsel);
 	}
+	
+	/**
+	 * 1:1문의 목록 카운트
+	 * @param counsel -상담정보
+	 * @return
+	 * @author sowon
+	 * @since 2021. 06. 28
+	 */
+	public int getOneToOneQnaListCount(Counsel counsel) {
+		return counselDao.getOneToOneQnaListCount(counsel);
+	}
 
 	/**
 	 * 1:1문의 상세
@@ -69,6 +80,17 @@ public class TsaCounselService {
 	public Collection<Counsel> getGoodsQnaList(Counsel counsel) {
 		return counselDao.getGoodsQnaList(counsel);
 	}
+	
+	/**
+	 * 상품문의 목록 카운트
+	 * @param counsel -상담정보
+	 * @return
+	 * @author sowon
+	 * @since 2021. 06. 28
+	 */
+	public int getGoodsQnaListCount(Counsel counsel) {
+		return counselDao.getGoodsQnaListCount(counsel);
+	}
 
 	/**
 	 * 상품문의 상세

+ 15 - 8
src/main/java/com/style24/admin/biz/service/TsaCustomerService.java

@@ -173,11 +173,7 @@ public class TsaCustomerService {
 		}
 
 		if (StringUtils.isNotBlank(customer.getEmail())) {
-			try {
-				mailService.sendCustomerTempPassword(customer, userNo);
-			} catch (Exception e) {
-				log.error(e.getMessage());
-			}
+			mailService.sendCustomerTempPassword(customer, userNo);
 		}
 
 	}
@@ -211,15 +207,26 @@ public class TsaCustomerService {
 		return coreCustomerService.saveCustomerSecede(customer);
 	}
 
+	/**
+	 * 회원 주문내역 총 목록
+	 * @param customerSearch - 고객번호, 페이징
+	 * @return Collection<Order>
+	 * @author jsshin
+	 * @since 2021. 1. 21
+	 */
+	public int getCustomerOrderListCount(CustomerSearch customerSearch) {
+		return customerDao.getCustomerOrderListCount(customerSearch);
+	}
+
 	/**
 	 * 회원 주문내역
-	 * @param custNo - 고객번호
+	 * @param customerSearch - 고객번호, 페이징
 	 * @return Collection<Order>
 	 * @author jsshin
 	 * @since 2021. 1. 21
 	 */
-	public Collection<Order> getCustomerOrderList(Integer custNo) {
-		return customerDao.getCustomerOrderList(custNo);
+	public Collection<Order> getCustomerOrderList(CustomerSearch customerSearch) {
+		return customerDao.getCustomerOrderList(customerSearch);
 	}
 
 	/**

+ 36 - 7
src/main/java/com/style24/admin/biz/web/TsaCustomerController.java

@@ -44,6 +44,7 @@ import lombok.extern.slf4j.Slf4j;
 
 import com.gagaframework.web.rest.server.GagaResponse;
 import com.style24.persistence.domain.Order;
+import com.style24.persistence.domain.Plan;
 import com.style24.persistence.domain.Point;
 import com.style24.persistence.domain.Review;
 
@@ -112,8 +113,18 @@ public class TsaCustomerController extends TsaBaseController {
 	 */
 	@PostMapping("/onetoone/qna/list")
 	@ResponseBody
-	public Collection<Counsel> getOneToOneQnaList(@RequestBody Counsel counsel) {
-		return counselService.getOneToOneQnaList(counsel);
+	public GagaMap getOneToOneQnaList(@RequestBody Counsel counsel) {
+		GagaMap result = new GagaMap();
+		
+		counsel.setPageable(new TscPageRequest(counsel.getPageNo() - 1, counsel.getPageSize()));
+		counsel.getPageable().setTotalCount(counselService.getOneToOneQnaListCount(counsel));
+		
+		Collection<Counsel> counselList = counselService.getOneToOneQnaList(counsel);
+		
+		result.set("pageing", counsel);
+		result.set("counselList", counselList);
+		
+		return result;
 	}
 
 	/**
@@ -225,8 +236,20 @@ public class TsaCustomerController extends TsaBaseController {
 	 */
 	@PostMapping("/goods/qna/list")
 	@ResponseBody
-	public Collection<Counsel> getGoodsQnaList(@RequestBody Counsel counsel) {
-		return counselService.getGoodsQnaList(counsel);
+	public GagaMap getGoodsQnaList(@RequestBody Counsel counsel) {
+		
+		GagaMap result = new GagaMap();
+		
+		counsel.setPageable(new TscPageRequest(counsel.getPageNo() - 1, counsel.getPageSize()));
+		counsel.getPageable().setTotalCount(counselService.getGoodsQnaListCount(counsel));
+		
+		Collection<Counsel> counselList = counselService.getGoodsQnaList(counsel);
+		
+		result.set("pageing", counsel);
+		result.set("counselList", counselList);
+		
+		
+		return result;
 	}
 
 	/**
@@ -716,10 +739,16 @@ public class TsaCustomerController extends TsaBaseController {
 	 * @author jsshin
 	 * @since 2021. 01. 21
 	 */
-	@GetMapping("/order/list/{custNo}")
+	@PostMapping("/order/list")
 	@ResponseBody
-	public Collection<Order> getCustomerOrderList(@PathVariable Integer custNo) {
-		return customerService.getCustomerOrderList(custNo);
+	public GagaMap getCustomerOrderList(@RequestBody CustomerSearch customerSearch) {
+		GagaMap result = new GagaMap();
+		customerSearch.setRegNo(TsaSession.getInfo().getUserNo());
+		customerSearch.setPageable(new TscPageRequest(customerSearch.getPageNo()-1, customerSearch.getPageSize()));
+		customerSearch.getPageable().setTotalCount(customerService.getCustomerOrderListCount(customerSearch));
+		result.set("pageing", customerSearch);
+		result.set("custOrderList", customerService.getCustomerOrderList(customerSearch));
+		return result;
 	}
 
 	/**

+ 35 - 0
src/main/java/com/style24/admin/biz/web/TsaDisplayController.java

@@ -2,6 +2,8 @@ package com.style24.admin.biz.web;
 
 import java.util.Collection;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -69,6 +71,9 @@ public class TsaDisplayController extends TsaBaseController {
 	@Autowired
 	private TscLookbookService coreLookbookService;
 
+	@Autowired
+	private ObjectMapper mapper;
+
 	/**
 	 * 카테고리관리 화면
 	 * @return
@@ -279,6 +284,36 @@ public class TsaDisplayController extends TsaBaseController {
 	public GagaMap getGoodsCategoryList(@RequestBody GoodsCategory goodsCategory) {
 		GagaMap result = new GagaMap();
 
+		// multi row 검색관련 처리
+		if (!StringUtils.isBlank(goodsCategory.getCondition())) {
+			goodsCategory.setConditionList(goodsCategory.getCondition().replaceAll("\r", "").trim().split("\n"));
+
+			if ("searchExtendGoodsCd".equals(goodsCategory.getSearch())) {
+				goodsCategory.setSearchGb("EXTEND");
+			} else if ("searchMasterGoodsCd".equals(goodsCategory.getSearch())) {
+				goodsCategory.setSearchGb("MASTER");
+			}
+		}
+		if (!StringUtils.isBlank(goodsCategory.getBrandList())) {
+			try {
+				String[] arrBrandCd = mapper.readValue(goodsCategory.getBrandList(), String[].class);
+				goodsCategory.setMultiBrand(arrBrandCd);
+			} catch (Exception e) {
+				e.printStackTrace();
+				throw new IllegalStateException("브랜드코드 검색중 오류로 인해 조회되지 않았습니다.");
+			}
+		}
+
+		if (!StringUtils.isBlank(goodsCategory.getSupplyCompList())) {
+			try {
+				String[] arrSupplyComp = mapper.readValue(goodsCategory.getSupplyCompList(), String[].class);
+				goodsCategory.setMultiSupplyCompCd(arrSupplyComp);
+			} catch (Exception e) {
+				e.printStackTrace();
+				throw new IllegalStateException("업체코드 검색중 오류로 인해 조회되지 않았습니다.");
+			}
+		}
+
 		goodsCategory.setRegNo(TsaSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
 		goodsCategory.setPageable(new TscPageRequest(goodsCategory.getPageNo() - 1, goodsCategory.getPageSize()));
 		goodsCategory.getPageable().setTotalCount(displayService.getGoodsCategoryListCount(goodsCategory));

+ 34 - 13
src/main/java/com/style24/admin/biz/web/TsaShoplinkerController.java

@@ -6,6 +6,7 @@ import java.net.URLEncoder;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
+import java.util.List;
 
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -121,6 +122,11 @@ public class TsaShoplinkerController extends TsaBaseController {
 			}
 		}
 
+		// multi row 검색관련 처리
+		if (!StringUtils.isBlank(shoplinkerSearch.getCondition())) {
+			shoplinkerSearch.setConditionList(shoplinkerSearch.getCondition().replaceAll("\r", "").trim().split("\n"));
+		}
+
 		shoplinkerSearch.setRegNo(TsaSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
 		shoplinkerSearch.setPageable(new TscPageRequest(shoplinkerSearch.getPageNo() - 1, shoplinkerSearch.getPageSize()));
 		shoplinkerSearch.getPageable().setTotalCount(shoplinkerService.getGoodsSendListCount(shoplinkerSearch));
@@ -262,6 +268,11 @@ public class TsaShoplinkerController extends TsaBaseController {
 
 		GagaMap result = new GagaMap();
 
+		// multi row 검색관련 처리
+		if (!StringUtils.isBlank(shoplinkerOrder.getCondition())) {
+			shoplinkerOrder.setConditionList(shoplinkerOrder.getCondition().replaceAll("\r", "").trim().split("\n"));
+		}
+
 		shoplinkerOrder.setRegNo(TsaSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
 		shoplinkerOrder.setPageable(new TscPageRequest(shoplinkerOrder.getPageNo() - 1, shoplinkerOrder.getPageSize()));
 		shoplinkerOrder.getPageable().setTotalCount(shoplinkerService.getShoplinkerOrderListCount(shoplinkerOrder));
@@ -310,7 +321,9 @@ public class TsaShoplinkerController extends TsaBaseController {
 		GagaMap rtnMap = new GagaMap();
 
 		ShoplinkerOrder shoplinkerOrder = new ShoplinkerOrder();
-		shoplinkerOrder.setApiStDate(apiStDate);
+		shoplinkerOrder.setStDate(apiStDate);
+		shoplinkerOrder.setEdDate(apiStDate);
+		shoplinkerOrder.setInfoStr(apiStDate);	// shoplinker_runable.txt 에 참고할 텍스트
 
 		// 서버타입
 		String profiles = env.getProperty("spring.profiles.active").toLowerCase();
@@ -344,6 +357,7 @@ public class TsaShoplinkerController extends TsaBaseController {
 				shoplinkerOrder.setCustomerId(env.getProperty("shoplinker.customer_id"));
 				shoplinkerOrder.setShoplinkerId(env.getProperty("shoplinker.shoplinker_id"));
 				shoplinkerOrder.setRegNo(TsaSession.getInfo().getUserNo());
+				shoplinkerOrder.setAcType("ADMMIN");
 				rtnMap = shoplinkerService.insertShoplinkerOrderStep1(shoplinkerOrder);
 
 				// 3. 제휴몰 주문등록
@@ -356,9 +370,6 @@ public class TsaShoplinkerController extends TsaBaseController {
 				shoplinkerService.updateCallApiRunable(slkSearch);
 				orderOcmService.createShoplinkerOrder("S", TsaSession.getInfo().getUserNo());
 
-				// 5. 제휴몰 대기상태건들 실패로 업데이트(대기상태건들이 없는게 맞지만 오류로인해 성공/실패 처리가 안된건이 있을경우 대비용)
-				shoplinkerService.updateShoplinkerExtmallWaitList();
-
 			}catch (Exception e) {
 
 				log.error("TsaShoplinkerController.orderReceiveList => error \n"+e);
@@ -417,6 +428,11 @@ public class TsaShoplinkerController extends TsaBaseController {
 
 		GagaMap result = new GagaMap();
 
+		// multi row 검색관련 처리
+		if (!StringUtils.isBlank(shoplinkerInvoice.getCondition())) {
+			shoplinkerInvoice.setConditionList(shoplinkerInvoice.getCondition().replaceAll("\r", "").trim().split("\n"));
+		}
+
 		shoplinkerInvoice.setRegNo(TsaSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
 		shoplinkerInvoice.setPageable(new TscPageRequest(shoplinkerInvoice.getPageNo() - 1, shoplinkerInvoice.getPageSize()));
 		shoplinkerInvoice.getPageable().setTotalCount(shoplinkerService.getSendInvoiceListCount(shoplinkerInvoice));
@@ -642,12 +658,17 @@ public class TsaShoplinkerController extends TsaBaseController {
 			}
 		}
 
+		// multi row 검색관련 처리
+		if (!StringUtils.isBlank(shoplinkerSearch.getCondition())) {
+			shoplinkerSearch.setConditionList(shoplinkerSearch.getCondition().replaceAll("\r", "").trim().split("\n"));
+		}
+
 		shoplinkerSearch.setRegNo(TsaSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
 		shoplinkerSearch.setPageable(new TscPageRequest(shoplinkerSearch.getPageNo() - 1, shoplinkerSearch.getPageSize()));
 		shoplinkerSearch.getPageable().setTotalCount(shoplinkerService.getStockListCount(shoplinkerSearch));
 
 		result.set("pageing", shoplinkerSearch);
-		result.set("stockList", shoplinkerService.getStockListList(shoplinkerSearch));
+		result.set("stockList", shoplinkerService.getStockList(shoplinkerSearch));
 
 		return result;
 	}
@@ -818,6 +839,9 @@ System.out.println("####### : "+re.getResult());
 			com.gagaframework.shoplinker.domain.orderlist.Shoplinker shoplinkerOrdResult;
 
 			testXmlUrl = "http://ts5000.ipdisk.co.kr:8999/shoplinker/order/order_time.xml";
+			//testXmlUrl = "http://ts5000.ipdisk.co.kr:8999/shoplinker/order/0528/order_real_1.xml";	// 28~31일 15시~07시
+			//testXmlUrl = "http://ts5000.ipdisk.co.kr:8999/shoplinker/order/0528/order_real_28.xml";	// 28 15시~235959  7개
+			testXmlUrl = "http://ts5000.ipdisk.co.kr:8999/shoplinker/order/0528/order_real_31.xml";	// 31일 000000시~07시  5582개
 			responseXmlData =   shoplinkerUtil.callShoplinkerApiByGet(GagaShoplinkerConstants.API_DOMAIN+"/Order/orderlist.php?iteminfo_url="+testXmlUrl, "");
 
 
@@ -844,17 +868,14 @@ System.out.println("####### : "+re.getResult());
 				System.out.println("### 7.주문 result24 :: "+rHeader.getCurrentlyCount()); //500
 
 				//ExtmallOrder extmallOrder = mapper.convertValue(gagaMap, ExtmallOrder.class);
-				ShoplinkerOrder slOrder;
-				for(Order ord : rOrdList) {
-					slOrder = mapper.convertValue(ord, ShoplinkerOrder.class);
-					System.out.println("HMJ :: 00 "+slOrder);
-					System.out.println("HMJ :: 11 "+slOrder.getOrderFlag());
-				}
+				//ShoplinkerOrder slOrder;
+				//for(com.gagaframework.shoplinker.domain.orderlist.Order ord : rOrdList) {
+				//	slOrder = mapper.convertValue(ord, ShoplinkerOrder.class);
+				//	System.out.println("### :: 11 "+slOrder.getOrderFlag());
+				//}
 
 			}
-
 */
-
 			//99 주문수집 목록확인 끝
 
 		}catch(Exception e) {

+ 2 - 2
src/main/java/com/style24/admin/support/config/TsaRedisSessionConfig.java

@@ -91,8 +91,8 @@ public class TsaRedisSessionConfig
 		serializer.setUseBase64Encoding(false);
 
 		// SSL인증서 적용 시 주석 제거
-//		serializer.setUseSecureCookie(true);
-//		serializer.setSameSite("NONE");
+		serializer.setUseSecureCookie(true);
+		serializer.setSameSite("NONE");
 
 		return serializer;
 	}

+ 39 - 1
src/main/java/com/style24/admin/support/config/TsaWebMvcConfig.java

@@ -1,22 +1,29 @@
 package com.style24.admin.support.config;
 
 import java.nio.charset.Charset;
+import java.util.Iterator;
+import java.util.List;
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.web.servlet.FilterRegistrationBean;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.http.MediaType;
 import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
+import org.springframework.http.converter.HttpMessageConverter;
 import org.springframework.http.converter.StringHttpMessageConverter;
+import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
 import org.springframework.web.client.RestTemplate;
 import org.springframework.web.multipart.support.MultipartFilter;
 import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import com.style24.admin.support.interceptor.TsaDefaultInterceptor;
 import com.style24.admin.support.interceptor.TsaPosInterceptor;
 import com.style24.admin.support.readable.TsaRequestFilter;
 import com.style24.core.support.filter.TscXssServletFilter;
+import com.style24.core.support.text.TscHtmlCharacterEscapes;
 
 import com.gagaframework.web.rest.client.GagaRequestStringTrim;
 
@@ -77,7 +84,7 @@ public class TsaWebMvcConfig implements WebMvcConfigurer {
 
 	/**
 	 * XSS(Cross Site Script) Prevention Filter
-	 *
+	 *		form data에 적용
 	 * @return
 	 */
 	@SuppressWarnings({"rawtypes", "unchecked"})
@@ -114,6 +121,37 @@ public class TsaWebMvcConfig implements WebMvcConfigurer {
 		return bean;
 	}
 
+	/**
+	 * MappingJackson2HttpMessageConverter가 여러 개일 경우 내가 추가한 것이 선택되지 않을 수 있음
+	 * 그러므로 application/json으로 선택되는 converter를 덮어 써야 함
+	 */
+	@SuppressWarnings("rawtypes")
+	@Override
+	public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
+		// Replace MessageConverter from default WebMvcConfigurer
+		Iterator<HttpMessageConverter<?>> converterIterator = converters.iterator();
+		while (converterIterator.hasNext()) {
+			// Do not add new one, must replace
+			HttpMessageConverter converter = converterIterator.next();
+			if (converter.getSupportedMediaTypes().contains(MediaType.APPLICATION_JSON)) {
+				converterIterator.remove();
+			}
+		}
+		converters.add(jsonEscapeConverter());
+	}
+
+	/**
+	 * XSS(Cross Site Script) Prevention
+	 * 		@ResponseBody로 전달되는 JSON에 대한 처리
+	 * @return
+	 */
+	@Bean
+	public MappingJackson2HttpMessageConverter jsonEscapeConverter() {
+		ObjectMapper objectMapper = new ObjectMapper();
+		objectMapper.getFactory().setCharacterEscapes(new TscHtmlCharacterEscapes());
+		return new MappingJackson2HttpMessageConverter(objectMapper);
+	}
+
 	/**
 	 * API 호출을 위한 RestTemplate 설정
 	 *

+ 4 - 1
src/main/java/com/style24/persistence/domain/CategoryGoods.java

@@ -37,7 +37,7 @@ public class CategoryGoods extends TscBaseDomain {
 	private Integer tagPrice;				// tag가
 	private Integer listPrice;				// 정상가
 	private Integer currPrice;				// 현재가
-	private String dcRate;					// 할인율
+	private int dcRate;					// 할인율
 	private String goodsStat;
 	private String brandCd;
 	private String supplyGoodsCd;
@@ -67,6 +67,9 @@ public class CategoryGoods extends TscBaseDomain {
 	private String goodsAddYn;
 
 	private String brandGroupNo;
+	private int stockQtySum;
+	private String brandGrpNm;
+	private String regNm;
 
 	// Pagination
 	private TscPageRequest pageable;

+ 8 - 0
src/main/java/com/style24/persistence/domain/Counsel.java

@@ -4,6 +4,7 @@ import com.style24.admin.support.security.session.TsaSession;
 import com.style24.core.support.util.CryptoUtils;
 import com.style24.core.support.util.MaskingUtils;
 import com.style24.persistence.TscBaseDomain;
+import com.style24.persistence.TscPageRequest;
 
 import lombok.Data;
 
@@ -75,6 +76,13 @@ public class Counsel extends TscBaseDomain {
 	private String termGb;			// 기간구분
 	private String termStdt;		// 검색시작날짜
 	private String termEddt;		// 검색끝날짜
+	
+	// Pagination
+	private TscPageRequest pageable;
+	private int pageNo = 1;
+	private int pageSize = 50;
+	private int pageUnit = 10;
+	private int cnt;
 
 	// 암호화 대상 복호화 처리
 	public String getCustNm() {

+ 2 - 1
src/main/java/com/style24/persistence/domain/CustomerSearch.java

@@ -35,7 +35,8 @@ public class CustomerSearch extends TscBaseDomain {
 	private String custNm;
 	private String email;
 	private String custId;
-	
+	private Integer custNo;
+
 	// 쿠폰발행팝업
 	private String cpnPubPopYn;		// 쿠폰발행팝업
 

+ 36 - 0
src/main/java/com/style24/persistence/domain/GoodsCategory.java

@@ -98,6 +98,42 @@ public class GoodsCategory extends TscBaseDomain {
 
 	List<CategoryGoods> goodsList;
 
+	private String goodsType;
+	private String search; // 키워드 종류
+	private String condition; // 키워드 종류별 값
+	private String brandList;
+	private String supplyCompList;
+	private String itemkindNm;
+	private String goodsImageYn;
+	private String sysImgNm;
+	private int stockQtySum;
+
+	/* 상품목록 Multi CheckBox 항목*/
+	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
+	private String[] multiBrand;
+
+	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
+	private String[] multiItemkindCd;
+
+	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
+	private String[] multiGoodsStat;
+
+	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
+	private String[] multiStyleYear;
+
+	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
+	private String[] multiSeasonCd;
+	/* 상품목록 Multi CheckBox 항목*/
+
+	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
+	private String[] conditionList;
+
+	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
+	private String[] arrGoodsCd;
+	/* 다다익선 Multi 추가 */
+	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
+	private String[] multiSupplyCompCd;
+
 	// Pagination
 	private TscPageRequest pageable;
 	private int pageNo = 1;

+ 1 - 0
src/main/java/com/style24/persistence/domain/Plan.java

@@ -81,6 +81,7 @@ public class Plan extends TscBaseDomain{
 		private String custJoinEddt;		//회원가입종료일시
 		private String sysImgNm;			//이미지
 		private String brandNm;				//브랜드이름
+		private String regNm;				//등록자이름
 
 		// 기획전 소스
 		private Integer seq;					//일련번호

+ 178 - 48
src/main/java/com/style24/persistence/mybatis/shop/TsaCounsel.xml

@@ -2,27 +2,93 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.style24.admin.biz.dao.TsaCounselDao">
 
+	<sql id="getListPagingCondition_sql">
+		<choose>
+			<when test="pageable != null">
+				) A
+				)Z
+				WHERE RNUM BETWEEN  #{pageable.startRow} AND #{pageable.endRow}
+			</when>
+			<otherwise>
+				) A
+				)Z
+			</otherwise>
+		</choose>
+	</sql>
+
 	<!-- 1:1문의 목록 -->
 	<select id="getOneToOneQnaList" parameterType="Counsel" resultType="Counsel">
 		/* TsaCounsel.getOneToOneQnaList */
-		SELECT A.COUNSEL_SQ                                                        /*상담일련번호*/
-		     , A.SITE_CD                                                           /*사이트코드*/
-		     , FN_GET_CODE_NM('G059',A.COUNSEL_CLSF)           AS COUNSEL_CLSF_NM  /*상담분류명*/
-		     , FN_GET_CODE_NM(A.COUNSEL_CLSF,A.COUNSEL_DCLSF)  AS COUNSEL_DCLSF_NM /*상담상세분류명*/
-		     , A.COUNSEL_DCLSF                                                     /*상담상세분류*/
-		     , DATE_FORMAT(A.QUEST_DT,'%Y-%m-%d %H:%i:%S')     AS QUEST_DT         /*문의일시*/
-		     , A.QUEST_TITLE                                                       /*문의제목*/
-		     , A.CUST_NO                                                           /*고객번호*/
-		     , B.CUST_ID                                                           /*고객ID*/
-		     , B.CUST_NM                                                           /*고객명*/
-		     , A.CELL_PHNNO                                                        /*휴대전화번호*/
-		     , A.SMS_REQ_YN                                                        /*SMS요청여부*/
-		     , A.SMS_SEND_YN                                                       /*SMS발송여부*/
-		     , A.EMAIL                                                             /*이메일*/
-		     , A.ANS_STAT                                                          /*답변상태*/
-		     , DATE_FORMAT(A.ANS_DT, '%Y-%m-%d %H:%i:%S')      AS ANS_DT           /*답변일시*/
-		     , A.ANS_NO                                                            /*답변자번호*/
-		     , D.USER_NM                                       AS ANS_NM           /*답변자명*/
+		 SELECT Z.*
+		 FROM(
+		      SELECT @rownum := @rownum + 1 AS RNUM
+		            ,A.*
+		      FROM (
+		             SELECT A.COUNSEL_SQ                                                        /*상담일련번호*/
+		                  , A.SITE_CD                                                           /*사이트코드*/
+		                  , FN_GET_CODE_NM('G059',A.COUNSEL_CLSF)           AS COUNSEL_CLSF_NM  /*상담분류명*/
+		                  , FN_GET_CODE_NM(A.COUNSEL_CLSF,A.COUNSEL_DCLSF)  AS COUNSEL_DCLSF_NM /*상담상세분류명*/
+		                  , A.COUNSEL_DCLSF                                                     /*상담상세분류*/
+		                  , DATE_FORMAT(A.QUEST_DT,'%Y-%m-%d %H:%i:%S')     AS QUEST_DT         /*문의일시*/
+		                  , A.QUEST_TITLE                                                       /*문의제목*/
+		                  , A.CUST_NO                                                           /*고객번호*/
+		                  , B.CUST_ID                                                           /*고객ID*/
+		                  , B.CUST_NM                                                           /*고객명*/
+		                  , A.CELL_PHNNO                                                        /*휴대전화번호*/
+		                  , A.SMS_REQ_YN                                                        /*SMS요청여부*/
+		                  , A.SMS_SEND_YN                                                       /*SMS발송여부*/
+		                  , A.EMAIL                                                             /*이메일*/
+		                  , A.ANS_STAT                                                          /*답변상태*/
+		                  , DATE_FORMAT(A.ANS_DT, '%Y-%m-%d %H:%i:%S')      AS ANS_DT           /*답변일시*/
+		                  , A.ANS_NO                                                            /*답변자번호*/
+		                  , D.USER_NM                                       AS ANS_NM           /*답변자명*/
+		             FROM   TB_COUNSEL A
+		             INNER JOIN TB_CUSTOMER B ON A.CUST_NO = B.CUST_NO
+		             LEFT OUTER JOIN TB_USER D ON A.ANS_NO = D.USER_NO
+		             JOIN ( SELECT @rownum := 0) R
+		             WHERE  COUNSEL_TYPE = 'C' /*상담유형(1:1문의)*/
+		             <if test="siteCd != null and siteCd != ''">
+		             AND    A.SITE_CD = #{siteCd}
+		             </if>
+		             <if test="counselClsf != null and counselClsf != ''">
+		             AND    A.COUNSEL_CLSF = #{counselClsf}
+		             </if>
+		             <if test="counselDclsf != null and counselDclsf != ''">
+		             AND    A.COUNSEL_DCLSF = #{counselDclsf}
+		             </if>
+		             <if test="ansNo != null and ansNo != ''">
+		             AND    A.ANS_NO = #{ansNo}
+		             </if>
+		             <if test="delYn != null and delYn != ''">
+		             AND    A.DEL_YN = #{delYn}
+		             </if>
+		             <if test="condition != null and condition != ''">
+		                 <if test="custGb == 'custId'">
+		             AND    B.CUST_ID LIKE #{condition}||'%'
+		                 </if>
+		                 <if test="custGb == 'custNm'">
+		             AND    B.CUST_NM LIKE #{condition}||'%'
+		                 </if>
+		                 <if test="custGb == 'email'">
+		             AND    A.EMAIL LIKE #{condition}||'%'
+		                 </if>
+		             </if>
+		             <if test="termStdt != null and termStdt != ''">
+		             AND    A.QUEST_DT <![CDATA[>=]]> STR_TO_DATE(#{termStdt},'%Y-%m-%d')
+		             </if>
+		             <if test="termEddt != null and termEddt != ''">
+		             AND    A.QUEST_DT <![CDATA[<]]> DATE_ADD(STR_TO_DATE(#{termEddt},'%Y-%m-%d'),INTERVAL 1 DAY)
+		             </if>
+		             <if test="ansStat != null and ansStat != ''">
+		             AND    A.ANS_STAT = #{ansStat}
+		             </if>
+		             ORDER  BY A.QUEST_DT DESC
+		        <include refid="getListPagingCondition_sql"/>
+	</select>
+	
+	<select id="getOneToOneQnaListCount" parameterType="Counsel" resultType="int">
+		/* TsaCounsel.getOneToOneQnaList */
+		SELECT COUNT(*)AS CNT 
 		FROM   TB_COUNSEL A
 		INNER JOIN TB_CUSTOMER B ON A.CUST_NO = B.CUST_NO
 		LEFT OUTER JOIN TB_USER D ON A.ANS_NO = D.USER_NO
@@ -119,35 +185,100 @@
 	<!-- 상품문의 목록 -->
 	<select id="getGoodsQnaList" parameterType="Counsel" resultType="Counsel">
 		/* TsaCounsel.getGoodsQnaList */
-		SELECT A.COUNSEL_SQ                                                        /*상담일련번호*/
-		     , A.SITE_CD                                                           /*사이트코드*/
-		     , DATE_FORMAT(A.QUEST_DT,'%Y-%m-%d %H:%i:%S')     AS QUEST_DT         /*문의일시*/
-		     , A.SECRET_YN                                                         /*비밀글여부*/
-		     , A.CUST_NO                                                           /*고객번호*/
-		     , B.CUST_ID                                                           /*고객ID*/
-		     , B.CUST_NM                                                           /*고객명*/
-		     , A.CELL_PHNNO                                                        /*휴대전화번호*/
-		     , A.SMS_REQ_YN                                                        /*SMS요청여부*/
-		     , A.SMS_SEND_YN                                                       /*SMS발송여부*/
-		     , A.EMAIL                                                             /*이메일*/
-		     , A.REL_GOODS_CD                                                      /*관련상품코드*/
-		     , G.GOODS_NM                                                          /*상품명*/
-		     , (SELECT SYS_IMG_NM
-		        FROM   TB_GOODS_IMG
-		        WHERE  GOODS_CD = G.GOODS_CD
-		        AND    COLOR_CD = G.MAIN_COLOR_CD
-		        AND    DEFAULT_IMG_YN = 'Y' /*디폴트이미지*/
-		        LIMIT 1
-		       )                                               AS GOODS_IMG        /*상품이미지*/
-		     , A.ANS_STAT                                                          /*답변상태*/
-		     , A.ANS_TRANS_YN                                                      /*답변의뢰여부*/
-		     , A.ANS_COMP_CD                                                       /*답변업체코드*/
-		     , DATE_FORMAT(A.ANS_TRANS_DT,'%Y-%m-%d %H:%i:%S') AS ANS_TRANS_DT     /*답변의뢰일시*/
-		     , A.ANS_TRANS_NO                                                      /*답변의뢰자번호*/
-		     , C.USER_NM                                       AS ANS_TRANS_NM     /*답변의뢰자명*/
-		     , DATE_FORMAT(A.ANS_DT, '%Y-%m-%d %H:%i:%S')      AS ANS_DT           /*답변일시*/
-		     , A.ANS_NO                                                            /*답변자번호*/
-		     , D.USER_NM                                       AS ANS_NM           /*답변자명*/
+		SELECT Z.*
+		 FROM(
+		       SELECT @rownum := @rownum + 1 AS RNUM
+		              ,A.*
+		       FROM (
+		              SELECT A.COUNSEL_SQ                                                        /*상담일련번호*/
+		                   , A.SITE_CD                                                           /*사이트코드*/
+		                   , DATE_FORMAT(A.QUEST_DT,'%Y-%m-%d %H:%i:%S')     AS QUEST_DT         /*문의일시*/
+		                   , A.SECRET_YN                                                         /*비밀글여부*/
+		                   , A.CUST_NO                                                           /*고객번호*/
+		                   , B.CUST_ID                                                           /*고객ID*/
+		                   , B.CUST_NM                                                           /*고객명*/
+		                   , A.CELL_PHNNO                                                        /*휴대전화번호*/
+		                   , A.SMS_REQ_YN                                                        /*SMS요청여부*/
+		                   , A.SMS_SEND_YN                                                       /*SMS발송여부*/
+		                   , A.EMAIL                                                             /*이메일*/
+		                   , A.REL_GOODS_CD                                                      /*관련상품코드*/
+		                   , G.GOODS_NM                                                          /*상품명*/
+		                   , (SELECT SYS_IMG_NM
+		                      FROM   TB_GOODS_IMG
+		                      WHERE  GOODS_CD = G.GOODS_CD
+		                      AND    COLOR_CD = G.MAIN_COLOR_CD
+		                      AND    DEFAULT_IMG_YN = 'Y' /*디폴트이미지*/
+		                      LIMIT 1
+		                     )                                               AS GOODS_IMG        /*상품이미지*/
+		                   , A.ANS_STAT                                                          /*답변상태*/
+		                   , A.ANS_TRANS_YN                                                      /*답변의뢰여부*/
+		                   , A.ANS_COMP_CD                                                       /*답변업체코드*/
+		                   , DATE_FORMAT(A.ANS_TRANS_DT,'%Y-%m-%d %H:%i:%S') AS ANS_TRANS_DT     /*답변의뢰일시*/
+		                   , A.ANS_TRANS_NO                                                      /*답변의뢰자번호*/
+		                   , C.USER_NM                                       AS ANS_TRANS_NM     /*답변의뢰자명*/
+		                   , DATE_FORMAT(A.ANS_DT, '%Y-%m-%d %H:%i:%S')      AS ANS_DT           /*답변일시*/
+		                   , A.ANS_NO                                                            /*답변자번호*/
+		                   , D.USER_NM                                       AS ANS_NM           /*답변자명*/
+		              FROM   TB_COUNSEL A
+		              INNER JOIN TB_CUSTOMER B ON A.CUST_NO = B.CUST_NO
+		              INNER JOIN TB_GOODS G ON A.REL_GOODS_CD = G.GOODS_CD
+		              LEFT OUTER JOIN TB_USER C ON A.ANS_TRANS_NO = C.USER_NO
+		              LEFT OUTER JOIN TB_USER D ON A.ANS_NO = D.USER_NO
+		              JOIN ( SELECT @rownum := 0) R
+		              WHERE  COUNSEL_TYPE = 'G' /*상담유형(상품문의)*/
+		              <if test="siteCd != null and siteCd != ''">
+		              AND    A.SITE_CD = #{siteCd}
+		              </if>
+		              <if test="counselClsf != null and counselClsf != ''">
+		              AND    A.COUNSEL_CLSF = #{counselClsf}
+		              </if>
+		              <if test="counselDclsf != null and counselDclsf != ''">
+		              AND    A.COUNSEL_DCLSF = #{counselDclsf}
+		              </if>
+		              <if test="ansNo != null and ansNo != ''">
+		              AND    A.ANS_NO = #{ansNo}
+		              </if>
+		              <if test="ansTransNo != null and ansTransNo != ''">
+		              AND    A.ANS_TRANS_NO = #{ansTransNo}
+		              </if>
+		              <if test="delYn != null and delYn != ''">
+		              AND    A.DEL_YN = #{delYn}
+		              </if>
+		              <if test="condition != null and condition != ''">
+		                  <if test="custGb == 'custId'">
+		              AND    B.CUST_ID LIKE #{condition}||'%'
+		                  </if>
+		                  <if test="custGb == 'custNm'">
+		              AND    B.CUST_NM LIKE #{condition}||'%'
+		                  </if>
+		                  <if test="custGb == 'email'">
+		              AND    A.EMAIL LIKE #{condition}||'%'
+		                  </if>
+		              </if>
+		              <if test="termStdt != null and termStdt != '' and termEddt != null and termEddt != ''">
+		                  <if test="termGb == 'regDt'">
+		              AND    A.QUEST_DT <![CDATA[>=]]> STR_TO_DATE(#{termStdt},'%Y-%m-%d')
+		              AND    A.QUEST_DT <![CDATA[<]]> DATE_ADD(STR_TO_DATE(#{termEddt},'%Y-%m-%d'),INTERVAL 1 DAY)
+		                  </if>
+		                  <if test="termGb == 'ansDt'">
+		              AND    A.ANS_DT <![CDATA[>=]]> STR_TO_DATE(#{termStdt},'%Y-%m-%d')
+		              AND    A.ANS_DT <![CDATA[<]]> DATE_ADD(STR_TO_DATE(#{termEddt},'%Y-%m-%d'),INTERVAL 1 DAY)
+		                  </if>
+		              </if>
+		              <if test="ansCompCd != null and ansCompCd != ''">
+		              AND    A.ANS_COMP_CD = #{ansCompCd}
+		              </if>
+		              <if test="ansStat != null and ansStat != ''">
+		              AND    A.ANS_STAT = #{ansStat}
+		              </if>
+		              ORDER  BY A.QUEST_DT DESC
+		          <include refid="getListPagingCondition_sql"/>
+	</select>
+	
+	<!-- 상품문의 카운트 -->
+	<select id="getGoodsQnaListCount" parameterType="Counsel" resultType="int">
+		/* TsaCounsel.getGoodsQnaListCount */
+		SELECT COUNT(*) AS CNT
 		FROM   TB_COUNSEL A
 		INNER JOIN TB_CUSTOMER B ON A.CUST_NO = B.CUST_NO
 		INNER JOIN TB_GOODS G ON A.REL_GOODS_CD = G.GOODS_CD
@@ -201,7 +332,6 @@
 		</if>
 		ORDER  BY A.QUEST_DT DESC
 	</select>
-	
 	<!-- 상품문의 상세 -->
 	<select id="getGoodsQna" parameterType="Counsel" resultType="Counsel">
 		/* TsaCounsel.getGoodsQna */

+ 30 - 3
src/main/java/com/style24/persistence/mybatis/shop/TsaCustomer.xml

@@ -253,8 +253,34 @@
 	</update>
 
 	<!-- 회원 주문내역 -->
-	<select id="getCustomerOrderList" parameterType="Integer" resultType="Order">
+	<select id="getCustomerOrderListCount" parameterType="CustomerSearch" resultType="int">
+		/* TsaCustomer.getCustomerOrderListCount */
+		SELECT COUNT(*) AS CNT
+		FROM   TB_CUSTOMER C
+		INNER JOIN
+		       TB_ORDER O
+		ON     C.CUST_NO = O.CUST_NO
+		INNER JOIN
+		       TB_ORDER_DETAIL OD
+		ON     O.ORD_NO = OD.ORD_NO
+		INNER JOIN
+		       TB_ORDER_DETAIL_ITEM ODI
+		ON     OD.ORD_NO = ODI.ORD_NO
+		AND    OD.ORD_DTL_NO = ODI.ORD_DTL_NO
+		INNER JOIN
+		       TB_GOODS E
+		ON     OD.GOODS_CD = E.GOODS_CD
+		INNER JOIN
+		       TB_DELIVERY_ADDR DA
+		ON     OD.DELV_ADDR_SQ = DA.DELV_ADDR_SQ
+		WHERE  C.CUST_NO = #{custNo}
+		ORDER BY O.ORD_NO DESC, OD.ORD_DTL_NO
+	</select>
+
+	<!-- 회원 주문내역 -->
+	<select id="getCustomerOrderList" parameterType="CustomerSearch" resultType="Order">
 		/* TsaCustomer.getCustomerOrderList */
+		<include refid="selectForPagingHeader"/>
 		SELECT O.SITE_CD
 		     , O.ORD_NO
 		     , O.MALL_GB
@@ -273,6 +299,7 @@
 		     , OD.CURR_PRICE
 		     , C.CUST_NO
 		     , DA.RECIP_NM
+		     , ROW_NUMBER() OVER(ORDER BY O.ORD_NO DESC, OD.ORD_DTL_NO) AS NUMB
 		FROM   TB_CUSTOMER C
 		INNER JOIN
 		       TB_ORDER O
@@ -291,7 +318,7 @@
 		       TB_DELIVERY_ADDR DA
 		ON     OD.DELV_ADDR_SQ = DA.DELV_ADDR_SQ
 		WHERE  C.CUST_NO = #{custNo}
-		ORDER BY O.ORD_NO DESC, OD.ORD_DTL_NO
+		<include refid="selectForPagingFooter"/>
 	</select>
 
 	<!--회원 쿠폰내역  -->
@@ -547,7 +574,7 @@
 		     , CS.ANS_CONTENT
 		     , CS.ANS_NO				 AS ANS_NO
 		     , FN_GET_USER_NM(CS.ANS_NO) AS ANS_NM
-		     , CS.ANS_DT
+		     , DATE_FORMAT(CS.ANS_DT, '%Y%m%d%H%i%S') AS ANS_DT
 		     , CS.SECRET_YN
 		FROM  TB_COUNSEL CS
 		INNER JOIN

+ 256 - 128
src/main/java/com/style24/persistence/mybatis/shop/TsaDsiplay.xml

@@ -559,49 +559,64 @@
 	<select id="getGoodsCategoryListCount" parameterType="GoodsCategory" resultType="int">
 		/* TsaDisplay.getGoodsCategoryListCount */
 		SELECT  COUNT(*) AS TOTCNT
-		FROM
-		<if test="searchGb == null or searchGb =='BASIC'">
-				TB_GOODS G
-			WHERE	1=1
-			<if test="searchGb == null or searchGb =='BASIC' or searchGb =='EXTEND' or searchGb =='MASTER'" >
-				<include refid="getGoodsCategoryListCondition_sql"/>
+		FROM	TB_GOODS G
+		INNER JOIN TB_BRAND B ON G.BRAND_CD = B.BRAND_CD
+		<if test="searchGb != null and searchGb =='EXCEL'">
+			INNER JOIN (
+			SELECT SEARCH_CD
+			, TMP_DISP_ORD
+			FROM (
+			SELECT SEARCH_CD
+			, MIN(DISP_ORD) AS TMP_DISP_ORD
+			FROM TB_SEARCH_DATA
+			WHERE REG_NO = #{regNo}
+			GROUP BY SEARCH_CD) T
+			) SD
+			ON ( (G.GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%')
+			OR G.SUPPLY_GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%'))
+			<if test="mdNo != null and mdNo != ''">
+				AND G.BRAND_CD IN (
+				SELECT DISTINCT BRAND_CD
+				FROM TB_BRAND_MD
+				WHERE MD_NO = CAST(#{mdNo} AS UNSIGNED)
+				)
 			</if>
+			)
 		</if>
-		<if test="searchGb != null and searchGb =='EXCEL'">
-			 (SELECT C.*
-				, TMP_DISP_ORD
-				FROM TB_GOODS C
-				, (SELECT SEARCH_CD, MIN(DISP_ORD) AS TMP_DISP_ORD
-					FROM TB_SEARCH_DATA
-					WHERE REG_NO = #{regNo}
-					GROUP BY SEARCH_CD) D
-				WHERE C.GOODS_CD LIKE CONCAT(D.SEARCH_CD,'%')
-				OR C.SUPPLY_GOODS_CD LIKE CONCAT(D.SEARCH_CD,'%')
-			) A
-			WHERE 1 = 1
+		WHERE 1=1
+		<if test="searchGb == null or searchGb =='BASIC' or searchGb =='EXTEND' or searchGb =='MASTER'" >
+			<include refid="getGoodsCategoryListCondition_sql"/>
+		</if>
+		<if test='stockQtySum != null and stockQtySum != ""'>
+		AND IFNULL((SELECT STOCK_QTY FROM TB_GOODS_STOCK WHERE GOODS_CD = G.GOODS_CD),0) <![CDATA[>]]> #{stockQtySum}
 		</if>
 	</select>
 
 	<!-- 상품별카테고리전시관리 목록 조회 -->
 	<select id="getGoodsCategoryList" parameterType="GoodsCategory" resultType="GoodsCategory">
 		/* TsaDisplay.getGoodsCategoryList */
+		SELECT  Q.*
+		, (SELECT ITEMKIND_NM FROM TB_ITEMKIND WHERE ITEMKIND_CD = Q.ITEMKIND_CD ) AS ITEMKIND_NM
+		, (SELECT MAX(SYS_IMG_NM) FROM TB_GOODS_IMG  WHERE GOODS_CD = Q.GOODS_CD AND COLOR_CD = Q.MAIN_COLOR_CD AND DEFAULT_IMG_YN = 'Y' ) AS SYS_IMG_NM
+		, CASE IFNULL((SELECT COUNT(SYS_IMG_NM) FROM TB_GOODS_IMG  WHERE GOODS_CD = Q.GOODS_CD AND COLOR_CD = Q.MAIN_COLOR_CD AND DEFAULT_IMG_YN = 'Y' ),0)
+		       WHEN 0 THEN 'N'
+		  ELSE 'Y' END AS GOODS_IMAGE_YN
+		, (SELECT CD_NM FROM TB_COMMON_CODE WHERE 1=1 AND CD = Q.GOODS_TYPE) AS GOODS_TYPE
+		FROM (
 		SELECT	Z.*
 		FROM	(
-			SELECT	@rownum := @rownum + 1 AS RNUM
-					,A.*
-				--	, CASE WHEN A.GOODS_TYPE = 'G056_S' THEN (SELECT IFNULL(SUM(CURR_STOCK_QTY), 0) - IFNULL(SUM(BASE_STOCK_QTY), 0) AS CURR_STOCK_QTY FROM VW_STOCK_COMPOSE WHERE GOODS_CD = A.GOODS_CD)
-				--	ELSE (SELECT IFNULL(SUM(CURR_STOCK_QTY), 0) - IFNULL(SUM(BASE_STOCK_QTY), 0) AS CURR_STOCK_QTY FROM VW_STOCK WHERE GOODS_CD = A.GOODS_CD)
-				--	END AS CURR_STOCK_QTY
-					, IFNULL((SELECT STOCK_QTY FROM TB_GOODS_STOCK WHERE GOODS_CD = A.GOODS_CD),0) AS CURR_STOCK_QTY
+			SELECT	A.*
+		          , IFNULL((SELECT STOCK_QTY FROM TB_GOODS_STOCK WHERE GOODS_CD = A.GOODS_CD),0) AS STOCK_QTY_SUM
 			FROM	(
 				SELECT	'카테고리확인' AS FULL_CATE_NM
 						, G.GOODS_CD
 						, G.GOODS_NM
-						, G.DC_RATE
-						, IFNULL(G.TAG_PRICE,0) AS TAG_PRICE
 						, IFNULL(G.LIST_PRICE,0) AS LIST_PRICE
 						, IFNULL(G.CURR_PRICE,0) AS CURR_PRICE
+						, ROUND((G.LIST_PRICE - G.CURR_PRICE) / (G.LIST_PRICE*1.0) *100 , 0) AS DC_RATE
 						, FN_GET_CODE_NM('G056',G.GOODS_TYPE) AS GOODS_TYPE
+						, B.BRAND_ENM
+						, B.BRAND_GRP_NM
 						, G.PNT_PRATE
 						, G.PRE_PPNT_USABLE_YN
 						, G.PNT_MRATE
@@ -615,55 +630,128 @@
 						, G.SUPPLY_COMP_CD
 						, G.BRAND_CD
 						, G.ITEMKIND_CD
+						, G.MAIN_COLOR_CD
 						, G.GOODS_STAT
 						, G.STYLE_YEAR
 						, FN_GET_CODE_NM('G006',G.SEASON_CD) AS SEASON_CD
-						, (SELECT BRAND_GRP_NM FROM TB_BRAND WHERE BRAND_CD = G.BRAND_CD) AS BRAND_GRP_NM
-						, (SELECT MAX(SYS_IMG_NM) FROM TB_GOODS_IMG  WHERE GOODS_CD = G.GOODS_CD AND COLOR_CD = G.MAIN_COLOR_CD AND DEFAULT_IMG_YN = 'Y' ) AS SYS_IMG_NM
-				FROM
-				<if test="searchGb == null or searchGb =='BASIC'">
-						TB_GOODS G
-						JOIN ( SELECT @rownum := 0) R
-						WHERE 1=1
-						<include refid="getGoodsCategoryListCondition_sql"/>
+						<choose>
+							<when test="searchGb != null and searchGb =='EXCEL'">
+								, SD.TMP_DISP_ORD
+							</when>
+							<otherwise>
+								, 0 AS TMP_DISP_ORD
+							</otherwise>
+						</choose>
+				FROM TB_GOODS G
+				INNER JOIN TB_BRAND B ON G.BRAND_CD = B.BRAND_CD
+				<if test="searchGb != null and searchGb =='EXCEL'">
+					INNER JOIN (
+					SELECT SEARCH_CD
+					, TMP_DISP_ORD
+					FROM (
+					SELECT SEARCH_CD
+					, MIN(DISP_ORD) AS TMP_DISP_ORD
+					FROM TB_SEARCH_DATA
+					WHERE REG_NO = #{regNo}
+					GROUP BY SEARCH_CD) T
+					) SD
+					ON ( (G.GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%')
+					OR G.SUPPLY_GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%'))
+					<if test="mdNo != null and mdNo != ''">
+						AND G.BRAND_CD IN (
+						SELECT DISTINCT BRAND_CD
+						FROM TB_BRAND_MD
+						WHERE MD_NO = CAST(#{mdNo} AS UNSIGNED)
+						)
+					</if>
+					)
+				</if>
+				WHERE 1=1
+				<if test="searchGb == null or searchGb =='BASIC' or searchGb =='EXTEND' or searchGb =='MASTER'" >
+					<include refid="getGoodsCategoryListCondition_sql"/>
+					ORDER BY G.REG_DT DESC, G.GOODS_CD
 				</if>
 				<if test="searchGb != null and searchGb =='EXCEL'">
-					(SELECT C.*
-						, TMP_DISP_ORD
-						FROM TB_GOODS C
-						, (SELECT SEARCH_CD, MIN(DISP_ORD) AS TMP_DISP_ORD
-							FROM TB_SEARCH_DATA
-							WHERE REG_NO = #{regNo}
-							GROUP BY SEARCH_CD
-							) D
-						WHERE C.GOODS_CD LIKE CONCAT(D.SEARCH_CD,'%')
-						OR C.SUPPLY_GOODS_CD LIKE CONCAT(D.SEARCH_CD,'%')
-					) G
-					JOIN ( SELECT @rownum := 0) R
-					WHERE 1 = 1
+					ORDER BY SD.TMP_DISP_ORD, G.GOODS_CD
 				</if>
-				ORDER BY G.REG_DT DESC, G.GOODS_CD
 			<include refid="getListPagingCondition_sql"/>
 	</select>
 
 	<sql id="getListPagingCondition_sql">
 		<choose>
 			<when test="pageable != null">
-				) A
-				)Z
-				WHERE RNUM BETWEEN  #{pageable.startRow} AND #{pageable.endRow}
+		            ) A
+		        )Z
+				<if test='stockQtySum != null and stockQtySum != ""'>
+				WHERE 1=1
+				AND Z.STOCK_QTY_SUM <![CDATA[>]]> #{stockQtySum}
+				</if>
+		        LIMIT #{pageable.limitStartRow} ,  #{pageable.pageSize}
+		    ) Q
 			</when>
 			<otherwise>
-				) A
-				)Z
+		            ) A
+		        )Z
+				<if test='stockQtySum != null and stockQtySum != ""'>
+					WHERE 1=1
+					AND Z.STOCK_QTY_SUM <![CDATA[>]]> #{stockQtySum}
+				</if>
+		    )Q
 			</otherwise>
 		</choose>
 	</sql>
 
 	<sql id="getGoodsCategoryListCondition_sql">
+		<if test='conditionList != null and conditionList.length>0'>
+			<choose>
+				<when test='search != null and search == "searchGoodsCd"'>
+					AND (
+					<foreach collection="conditionList" item="item" index="index" separator="or">
+						UPPER(G.GOODS_CD) LIKE CONCAT(UPPER(#{item}),'%')
+					</foreach>
+					)
+				</when>
+				<when test='search != null and search == "searchGoodsNm"'>
+					AND (
+					<foreach collection="conditionList" item="item" index="index" separator="or">
+						UPPER(G.GOODS_NM) LIKE CONCAT(UPPER(#{item}),'%')
+					</foreach>
+					)
+				</when>
+				<when test='search != null and search == "searchGoodsNum"'>
+					AND (
+					<foreach collection="conditionList" item="item" index="index" separator="or">
+						UPPER(G.GOODS_NUM) LIKE CONCAT(UPPER(#{item}),'%')
+					</foreach>
+					)
+				</when>
+				<when test='search != null and search == "searchSupplyGoodsCd"'>
+					AND (
+					<foreach collection="conditionList" item="item" index="index" separator="or">
+						UPPER(G.SUPPLY_GOODS_CD) LIKE CONCAT(UPPER(#{item}),'%')
+					</foreach>
+					)
+				</when>
+				<when test='search != null and search == "searchExtendGoodsCd"'>
+					AND 1 = 1
+				</when>
+				<when test='search != null and search == "searchMasterGoodsCd"'>
+					AND 1 = 1
+				</when>
+				<otherwise>
+					AND 1 = 1
+				</otherwise>
+			</choose>
+		</if>
 		<if test='goodsCd != null and goodsCd != ""'>
 			AND UPPER(G.GOODS_CD) LIKE CONCAT(UPPER(#{goodsCd}),'%')
 		</if>
+		<if test="arrGoodsCd != null and arrGoodsCd.length>0">
+			AND UPPER(G.GOODS_CD) IN
+			<foreach collection="arrGoodsCd" item="item" index="index"  open="(" close=")" separator=",">
+				UPPER(#{item})
+			</foreach>
+		</if>
 		<if test='supplyGoodsCd != null and supplyGoodsCd != ""'>
 			AND G.SUPPLY_GOODS_CD = #{supplyGoodsCd}
 		</if>
@@ -673,9 +761,21 @@
 		<if test='goodsStat != null and goodsStat != ""'>
 			AND G.GOODS_STAT = #{goodsStat}
 		</if>
+		<if test="multiGoodsStat != null and multiGoodsStat != ''">
+			AND G.GOODS_STAT IN
+			<foreach collection="multiGoodsStat" item="item" index="index"  open="(" close=")" separator=",">
+				#{item}
+			</foreach>
+		</if>
 		<if test="supplyCompCd != null and supplyCompCd != ''">
 			AND G.SUPPLY_COMP_CD = #{supplyCompCd}
 		</if>
+		<if test="multiSupplyCompCd != null and multiSupplyCompCd != ''">
+			AND G.SUPPLY_COMP_CD IN
+			<foreach collection="multiSupplyCompCd" item="item" index="index"  open="(" close=")" separator=",">
+				#{item}
+			</foreach>
+		</if>
 		<if test="mdId != null and mdId != ''">
 			AND EXISTS (
 			SELECT BRAND_CD
@@ -687,12 +787,27 @@
 		<if test="brandCd != null and brandCd != ''">
 			AND G.BRAND_CD = #{brandCd}
 		</if>
+		<if test="multiBrand != null and multiBrand != ''">
+			AND G.BRAND_CD IN
+			<foreach collection="multiBrand" item="item" index="index"  open="(" close=")" separator=",">
+				#{item}
+			</foreach>
+		</if>
 		<if test="itemkindCd != null and itemkindCd != ''">
 			AND G.ITEMKIND_CD = #{itemkindCd}
 		</if>
+		<if test="multiItemkindCd != null and multiItemkindCd != ''">
+			AND G.ITEMKIND_CD IN
+			<foreach collection="multiItemkindCd" item="item" index="index"  open="(" close=")" separator=",">
+				#{item}
+			</foreach>
+		</if>
 		<if test="formalGb != null and formalGb != ''">
 			AND G.FORMAL_GB = #{formalGb}
 		</if>
+		<if test="selfMallYn != null and selfMallYn != ''">
+			AND G.SELF_MALL_YN = #{selfMallYn}
+		</if>
 		<!--<if test="currStockQty != null and currStockQty != ''">
 			AND EXISTS (
 			SELECT 1 FROM(
@@ -705,9 +820,21 @@
 		<if test="styleYear != null and styleYear != ''">
 			AND G.STYLE_YEAR = #{styleYear}
 		</if>
+		<if test="multiStyleYear != null and multiStyleYear != ''">
+			AND G.STYLE_YEAR IN
+			<foreach collection="multiStyleYear" item="item" index="index"  open="(" close=")" separator=",">
+				#{item}
+			</foreach>
+		</if>
 		<if test="seasonCd != null and seasonCd != ''">
 			AND G.SEASON_CD = #{seasonCd}
 		</if>
+		<if test="multiSeasonCd != null and multiSeasonCd != ''">
+			AND G.SEASON_CD IN
+			<foreach collection="multiSeasonCd" item="item" index="index"  open="(" close=")" separator=",">
+				#{item}
+			</foreach>
+		</if>
 		<if test="currPriceSt != null and currPriceSt != ''">
 			AND G.CURR_PRICE >= #{currPriceSt}
 		</if>
@@ -897,82 +1024,83 @@
 
 	<select id="getCategoryGoodsList" parameterType="CategoryGoods" resultType="CategoryGoods">
 		/* TsaDisplay.getCategoryGoodsList */
-		SELECT Z.*
-		FROM ( SELECT @rownum := @rownum + 1 AS RNUM
-				, IFNULL((SELECT STOCK_QTY FROM TB_GOODS_STOCK WHERE GOODS_CD = A.GOODS_CD ),0) AS CURR_STOCK_QTY
-				, A.*
-				FROM ( SELECT G.GOODS_CD
-							, G.GOODS_TNM
-							, G.GOODS_NM
-							, (SELECT SYS_IMG_NM FROM TB_GOODS_IMG WHERE GOODS_CD = G.GOODS_CD AND COLOR_CD = G.MAIN_COLOR_CD AND DEFAULT_IMG_YN = 'Y' ORDER BY REG_DT DESC LIMIT 1) AS IMG_PATH1
-							, A.CATE_NO
-							, A.DISP_ORD
-							, FN_GET_CODE_NM('G056',G.GOODS_TYPE) AS GOODS_TYPE
-							, G.TAG_PRICE
-							, G.LIST_PRICE
-							, G.CURR_PRICE
-							, G.DC_RATE
-							, G.GOODS_STAT
-							, G.BRAND_CD
-							, A.REG_NO
-							, FN_GET_USER_NM(A.REG_NO) AS REG_NM
-							, A.REG_DT
-							, G.SUPPLY_GOODS_CD
-							, G.STYLE_YEAR
-							, FN_GET_CODE_NM('G009',IFNULL(G.FORMAL_GB,'10'))  AS FORMAL_GB
-						FROM ( SELECT A.GOODS_CD
-									, A.CATE_NO
-									, A.DISP_ORD
-									, A.REG_NO
-									, A.REG_DT
-								FROM TB_CATE_GOODS A
-								WHERE 1=1
-								AND A.CATE_NO IN ( SELECT LEAF_CATE_NO
-													FROM TB_CATE_4SRCH
-													WHERE 1=1
-												<if test='selLvl == "3"'>
-													AND CATE1_NO  = #{cate1No}
-												</if>
-												<if test='selLvl == "4"'>
-													AND CATE2_NO  = #{cate2No}
-												</if>
-												<if test='selLvl == "5"'>
-													AND CATE3_NO  = #{cate3No}
-												</if>
-												<if test='selLvl == "6"'>
-													AND CATE4_NO  = #{cate4No}
+		SELECT Q.*
+		FROM (
+			SELECT Z.*
+			FROM ( SELECT IFNULL((SELECT STOCK_QTY FROM TB_GOODS_STOCK WHERE GOODS_CD = A.GOODS_CD ),0) AS CURR_STOCK_QTY
+					, A.*
+					FROM ( SELECT G.GOODS_CD
+								, G.GOODS_TNM
+								, G.GOODS_NM
+								, (SELECT SYS_IMG_NM FROM TB_GOODS_IMG WHERE GOODS_CD = G.GOODS_CD AND COLOR_CD = G.MAIN_COLOR_CD AND DEFAULT_IMG_YN = 'Y' ORDER BY REG_DT DESC LIMIT 1) AS IMG_PATH1
+								, A.CATE_NO
+								, A.DISP_ORD
+								, FN_GET_CODE_NM('G056',G.GOODS_TYPE) AS GOODS_TYPE
+								, G.TAG_PRICE
+								, G.LIST_PRICE
+								, G.CURR_PRICE
+								, G.DC_RATE
+								, G.GOODS_STAT
+								, G.BRAND_CD
+								, (SELECT BRAND_GRP_NM FROM TB_BRAND WHERE 1=1 AND G.BRAND_CD = BRAND_CD) AS BRAND_GRP_NM
+								, A.REG_NO
+								, FN_GET_USER_NM(A.REG_NO) AS REG_NM
+								, A.REG_DT
+								, G.SUPPLY_GOODS_CD
+								, G.STYLE_YEAR
+								, FN_GET_CODE_NM('G009',IFNULL(G.FORMAL_GB,'10'))  AS FORMAL_GB
+							FROM ( SELECT A.GOODS_CD
+										, A.CATE_NO
+										, A.DISP_ORD
+										, A.REG_NO
+										, A.REG_DT
+									FROM TB_CATE_GOODS A
+									WHERE 1=1
+									AND A.CATE_NO IN ( SELECT LEAF_CATE_NO
+														FROM TB_CATE_4SRCH
+														WHERE 1=1
+													<if test='selLvl == "3"'>
+														AND CATE1_NO  = #{cate1No}
+													</if>
+													<if test='selLvl == "4"'>
+														AND CATE2_NO  = #{cate2No}
+													</if>
+													<if test='selLvl == "5"'>
+														AND CATE3_NO  = #{cate3No}
+													</if>
+													<if test='selLvl == "6"'>
+														AND CATE4_NO  = #{cate4No}
+													</if>
+												<if test="contentsLoc != null and contentsLoc !=''">
+													AND CONTENTS_LOC = #{contentsLoc}
 												</if>
-											<if test="contentsLoc != null and contentsLoc !=''">
-												AND CONTENTS_LOC = #{contentsLoc}
-											</if>
-								)
-						<if test="brandGroupNo != null and brandGroupNo !=''">
-							AND A.BRAND_GROUP_NO = #{brandGroupNo}
-						</if>
-					) A
-				<if test="searchGb == null or searchGb =='BASIC'">
-					, TB_GOODS G
-				</if>
-				<if test="searchGb != null and searchGb =='EXCEL'">
-					, (SELECT G.*
-					, TMP_DISP_ORD
-					FROM TB_GOODS G
-					, (SELECT SEARCH_CD, MIN(DISP_ORD) AS TMP_DISP_ORD
-					FROM TB_SEARCH_DATA
-					WHERE REG_NO = #{regNo}
-					GROUP BY SEARCH_CD
-					) D
-					WHERE G.GOODS_CD LIKE CONCAT(D.SEARCH_CD,'%')
-					OR G.SUPPLY_GOODS_CD LIKE CONCAT(D.SEARCH_CD,'%')
-					) G
-				</if>
-				JOIN ( SELECT @rownum := 0) R
-				WHERE A.GOODS_CD = G.GOODS_CD
-				<if test="goodsCd != null and goodsCd !='' and searchGb !='EXCEL'">
-					AND G.GOODS_CD = #{goodsCd}
-				</if>
-				ORDER BY A.DISP_ORD ASC, G.UPD_DT DESC, G.CURR_PRICE DESC, G.GOODS_CD ASC
-		<include refid="getListPagingCondition_sql"/>
+									)
+							<if test="brandGroupNo != null and brandGroupNo !=''">
+								AND A.BRAND_GROUP_NO = #{brandGroupNo}
+							</if>
+						) A
+					<if test="searchGb == null or searchGb =='BASIC'">
+						, TB_GOODS G
+					</if>
+					<if test="searchGb != null and searchGb =='EXCEL'">
+						, (SELECT G.*
+						, TMP_DISP_ORD
+						FROM TB_GOODS G
+						, (SELECT SEARCH_CD, MIN(DISP_ORD) AS TMP_DISP_ORD
+						FROM TB_SEARCH_DATA
+						WHERE REG_NO = #{regNo}
+						GROUP BY SEARCH_CD
+						) D
+						WHERE G.GOODS_CD LIKE CONCAT(D.SEARCH_CD,'%')
+						OR G.SUPPLY_GOODS_CD LIKE CONCAT(D.SEARCH_CD,'%')
+						) G
+					</if>
+					WHERE A.GOODS_CD = G.GOODS_CD
+					<if test="goodsCd != null and goodsCd !='' and searchGb !='EXCEL'">
+						AND G.GOODS_CD = #{goodsCd}
+					</if>
+					ORDER BY A.DISP_ORD ASC, G.UPD_DT DESC, G.CURR_PRICE DESC, G.GOODS_CD ASC
+			<include refid="getListPagingCondition_sql"/>
 	</select>
 
 	<select id="getCategoryGoodsListCount_old" parameterType="CategoryGoods" resultType="int">

+ 3 - 0
src/main/java/com/style24/persistence/mybatis/shop/TsaGoods.xml

@@ -16,6 +16,9 @@
 		<if test="itemkindCd != null and itemkindCd != ''">
 		AND ITEMKIND_CD = #{itemkindCd} 
 		</if>
+		<if test="itemkindNm != null and itemkindNm != ''">
+		AND ITEMKIND_NM LIKE CONCAT('%',#{itemkindNm},'%')
+		</if>
 		<if test="useYn != null and useYn != ''">
 		AND USE_YN = #{useYn} 
 		</if>

+ 7 - 3
src/main/java/com/style24/persistence/mybatis/shop/TsaPlan.xml

@@ -179,8 +179,12 @@
 		<if test="openYn != null and openYn != ''">
 		AND    OPEN_YN = #{openYn}
 		</if>
-		<if test="regNo != null and regNo != ''">
-		AND    REG_NO = #{regNo} 
+		<if test="regNm != null and regNm != ''">
+		AND    REG_NO IN (
+		                 SELECT USER_NO 
+		                 FROM TB_USER
+		                 WHERE USER_NM LIKE CONCAT('%',UPPER(#{regNm}),'%') 
+		                 )
 		</if>
 		<if test="frontGb != null and frontGb != ''">
 		AND    FRONT_GB LIKE CONCAT('%',#{frontGb},'%')
@@ -1509,7 +1513,7 @@
 		FROM TB_COUPON C
 		WHERE 1=1
 		AND C.CPN_ID = #{cpnId}
-		AND C.CPN_TYPE IN ('G230_11' ,'G230_12','G230_13','G230_30')
+		AND C.CPN_TYPE IN ('G230_11' ,'G230_12', 'G230_13', 'G230_30', 'G230_20')
 		AND C.CPN_STAT = 'G232_11'
 		AND NOW() <![CDATA[<=]]> IF (C.PD_GB = 'D', CONCAT(CURRENT_DATE + INTERVAL C.AVAIL_DAYS DAY, ' 23:59:59'), C.AVAIL_EDDT)
 	</select>

+ 2 - 2
src/main/java/com/style24/persistence/mybatis/shop/TsaReview.xml

@@ -58,10 +58,10 @@
 		       )
 		</if>
 		<if test="startDt != null and startDt != ''">
-		AND    R.REG_DT <![CDATA[>=]]> STR_TO_DATE(#{startDt},'%Y-%m-%d')
+		AND    R.REG_DT <![CDATA[<=]]> STR_TO_DATE(#{startDt},'%Y-%m-%d')
 		</if>
 		<if test="endDt != null and endDt != ''">
-		AND    R.REG_DT <![CDATA[<]]> DATE_ADD(STR_TO_DATE(#{endDt},'%Y-%m-%d'),INTERVAL 1 DAY)
+		AND    R.REG_DT <![CDATA[>]]> DATE_ADD(STR_TO_DATE(#{endDt},'%Y-%m-%d'),INTERVAL 1 DAY)
 		</if>
 		<if test="reviewGb != null and reviewGb != ''">
 		AND    R.REVIEW_GB = #{reviewGb}

+ 2 - 2
src/main/java/com/style24/persistence/mybatis/shop/TsaSocial.xml

@@ -238,8 +238,8 @@
 			AND (FRONT_GB = 'A' OR FRONT_GB = #{frontGb} )
 		</if>
 		<if test="stDate != null and stDate != '' and edDate != null and edDate != ''">
-        AND    SOCIAL_STDT <![CDATA[ >= ]]> DATE_FORMAT(#{stDate},'%Y-%m-%d %H:%i:%S')
-        AND    SOCIAL_STDT <![CDATA[ <= ]]> DATE_FORMAT(#{edDate},'%Y-%m-%d %H:%i:%S')
+        AND    SOCIAL_STDT <![CDATA[ <= ]]> DATE_FORMAT(#{stDate},'%Y-%m-%d %H:%i:%S')
+        AND    SOCIAL_EDDT <![CDATA[ >= ]]> DATE_FORMAT(#{edDate},'%Y-%m-%d %H:%i:%S')
 		</if>
 	</sql>
 	

+ 1 - 1
src/main/resources/config/application-style.yml

@@ -97,7 +97,7 @@ shoplinker:
     shoplinker_id : istyle1
     xml:
         path: /files/data/shoplinker
-        view: http://archive.style24.com/shoplinker
+        view: https://archive.style24.com/shoplinker
     url:
         option : /Product/attribute_insert.php?iteminfo_url=
         product : /Product/attribute_prod_insert.php?iteminfo_url=

+ 7 - 1
src/main/webapp/WEB-INF/views/customer/CustomerActiveListForm.html

@@ -45,6 +45,7 @@
 						<td class="dashR">
 							<select name="searchGb">
 								<option value="">선택</option>
+								<option value="custNo">회원번호</option>
 								<option value="custNm">회원명 </option>
 								<option value="email">이메일</option>
 								<option value="custId">아이디</option>
@@ -167,7 +168,7 @@
 			headerName: "회원ID", field:'maskingCustId', width:120, cellClass: 'text-left',
 			valueGetter: function (params) { return params.data.maskingCustId; }
 		},
-		{headerName: "회원NO", field: "custNo", width: 120, cellClass: 'text-center', hide: true},
+		{headerName: "회원NO", field: "custNo", width: 120, cellClass: 'text-center'},
 		{
 			headerName: "회원명", field:'maskingCustNm', width:100, cellClass: 'text-center',
 			cellRenderer: function(params) { return '<a href="javascript:void(0);">' + params.data.maskingCustNm + '</a>'; }
@@ -237,6 +238,11 @@
 		cfnCellPhonnHypen(this);
 	});
 
+	//페이지 사이즈 클릭시 재조회
+	$('#pageSize').on('click', function () {
+		fnSearch();
+	});
+
 	// 유효성 확인
 	var fnValidationCheck = function () {
 		// 입력 값 체크

+ 56 - 7
src/main/webapp/WEB-INF/views/customer/CustomerDetailForm.html

@@ -240,8 +240,29 @@
 					<li id="tab2" class="tab">
 						<!-- TAB2 PANELSTYLE -->
 						<div class="panelStyle">
-							<h4>주문내역</h4>
-							<div id="custOrderList" class="ag-theme-balham" style="width: 100%; height: 510px;"></div>
+							<form id="custOrderListFrom" name="custOrderListFrom" action="#" th:action="@{'/customer/order/list'}" method="post">
+							<input type="hidden" name="custNo" th:value="${custNo}"/>
+								<h4>주문내역</h4>
+								<ul class="panelBar">
+									<li class="right">
+										검색결과 : <strong><span id="gridOrderRowTotalCount">0</span> 건</strong>&nbsp;
+										쪽번호 <span id="ordPgNo">0</span>/ <strong id="ordEndPgNo">0</strong>&nbsp;&nbsp;
+										<select name="pageSize">
+											<option value="50" selected="selected">50개씩 보기</option>
+											<option value="100">100개씩 보기</option>
+											<option value="500">500개씩 보기</option>
+											<option value="1000">1000개씩 보기</option>
+										</select>
+										<input type="hidden" name="pageNo" id="pageNo" value ="1"/>
+									</li>
+								</ul>
+								<div id="custOrderList" class="ag-theme-balham" style="width: 100%; height: 510px;"></div>
+								<ul class="panelBar">
+									<li class="center">
+										<div class="tablePaging" id="custOrderListPagination"></div>
+									</li>
+								</ul>
+							</form>
 						</div>
 						<!-- //TAB2 PANELSTYLE -->
 					</li>
@@ -518,6 +539,7 @@
 	</div>
 </div>
 
+<script type="text/javascript" th:src="@{'/ux/plugins/gaga/gaga.paging.js?v=' + ${#calendars.format(#calendars.createNow(), 'yyyyMMddHHmmss')}}" src="/ux/plugins/gaga/gaga.paging.js"></script>
 <script th:inline="javascript">
 	/*<![CDATA[*/
 
@@ -600,7 +622,11 @@
 			}
 		},
 		{headerName: "상담상세분류", field: "counselDclsf", width: 200, cellClass: 'text-center'},
-		{headerName: "주문번호", field: "relOrdNo", width: 100, cellClass: 'text-center'},
+		{headerName: "주문번호", field: "relOrdNo", width: 100, cellClass: 'text-center',
+			cellRenderer: function (params) {
+				return gagajf.isNull(params.value)? '' : '<a href="javascript:void(0);">' + params.value + '</a>';
+			}
+		},
 		{
 			headerName: "질문제목", field: "questTitle", width: 300, cellClass: 'text-center',
 			cellRenderer: function (params) {
@@ -614,7 +640,7 @@
 			}
 		},
 		{
-			headerName: "답변일시", field: "ansTransDt", width: 150, cellClass: 'text-center',
+			headerName: "답변일시", field: "ansDt", width: 150, cellClass: 'text-center',
 			cellRenderer: function (params) {
 				return gagaAgGrid.toDateTimeFormat(params.value);
 			}
@@ -651,7 +677,11 @@
 		// {width: 40, minWidth: 40, cellClass: 'text-center', pinned: 'left', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
 		{headerName: "회원쿠폰SQ", field: "custCpnSq", width: 100, cellClass: 'text-center', hide: true},
 		{headerName: "쿠폰ID", field: "cpnId", width: 100, cellClass: 'text-center'},
-		{headerName: "쿠폰명", field: "cpnNm", width: 300, cellClass: 'text-center'},
+		{headerName: "쿠폰명", field: "cpnNm", width: 300, cellClass: 'text-center'
+			, cellRenderer: function (params) {
+				return "<a href=\"javascript:void(0);\" onclick=\"cfnCouponCreatePopup('U','" + params.data.cpnId + "');\">" + params.value + "</a>";
+			}
+		},
 		{
 			headerName: "유효기간 시작일시", field: "availStdt", width: 150, cellClass: 'text-center',
 			cellRenderer: function (params) {
@@ -1162,6 +1192,10 @@
 			let counselSq = event.data.counselSq;
 			cfnOpenOneToOneQnaDetailPopup(counselSq);
 		}
+		if (event.colDef.field === 'relOrdNo') {
+			let ordNo = event.data.relOrdNo;
+			cfnOpenOrderDetailPopup(ordNo);
+		}
 	};
 
 	// 상품문의 내역 셀 클릭 이벤트
@@ -1250,12 +1284,27 @@
 			});
 	};
 
+
+	$('#custOrderListFrom select[name=pageSize]').on('click', function () {
+		fnSearchOrder();
+	});
+
 	// 구매내역 조회
 	var fnSearchOrder = function () {
-		const actionUrl = "/customer/order/list/" + custNo;
-		gagaAgGrid.fetch(actionUrl, gridOrderOptions);
+		gagaPaging.init('custOrderListFrom', fnCustOrderListCallBack, 'custOrderListPagination', $('#custOrderListFrom select[name=pageSize]').val());
+		gagaPaging.load($('#custOrderListFrom input[name=pageNo]').val());
 	};
 
+	var fnCustOrderListCallBack = function (result) {
+		$('#gridOrderRowTotalCount').html(result.pageing.pageable.totalCount.addComma());
+		$('#custOrderListFrom input[name=pageNo]').val(result.pageing.pageable.pageNo.addComma());
+		$('#ordPgNo').html(result.pageing.pageable.pageNo.addComma());
+		$('#ordEndPgNo').html(result.pageing.pageable.totalPage.addComma());
+
+		gridOrderOptions.api.setRowData(result.custOrderList);
+		gagaPaging.createPagination(result.pageing.pageable);
+	}
+
 	// 배송지 조회
 	var fnSearchDelivery = function () {
 		const actionUrl = "/customer/delivery/list/" + custNo;

+ 5 - 0
src/main/webapp/WEB-INF/views/customer/CustomerDormantListForm.html

@@ -143,6 +143,11 @@
 
 	}
 
+	//페이지 사이즈 클릭시 재조회
+	$('#pageSize').on('click', function () {
+		fnSearch();
+	});
+
 	// 조회
 	$('#btnSearch').on('click', function() {
 		fnSearch();

+ 4 - 0
src/main/webapp/WEB-INF/views/customer/CustomerSecedeListForm.html

@@ -147,6 +147,10 @@
 	gridOptions.onCellClicked = function(event) {
 
 	}
+	//페이지 사이즈 클릭시 재조회
+	$('#pageSize').on('click', function () {
+		fnSearch();
+	});
 
 	// 조회
 	$('#btnSearch').on('click', function() {

+ 35 - 5
src/main/webapp/WEB-INF/views/customer/GoodsQnaForm.html

@@ -15,6 +15,7 @@
  *******************************************************************************
  -->
 	<div id="main">
+	<form id="searchForm" name="searchForm" action="#" th:action="@{'/customer/goods/qna/list'}" onsubmit="$('#btnSearch').trigger('click'); return false;">
 		<!-- 메인타이틀 영역 -->
 		<div class="main-title">
 		</div>
@@ -27,7 +28,6 @@
 		
 		<!-- 검색조건 영역 -->
 		<div class="panelStyle">
-			<form id="searchForm" name="searchForm" action="#" th:action="@{'/customer/goods/qna/list'}" onsubmit="$('#btnSearch').trigger('click'); return false;">
 				<table class="frmStyle" aria-describedby="검색조건">
 					<colgroup>
 						<col style="width:10%;"/>
@@ -95,17 +95,37 @@
 						<button type="button" class="btn btn-gray btn-lg" onclick="$('#searchForm')[0].reset();">초기화</button>
 					</li>
 				</ul>
-			</form>
+			
 		</div>
 		<!-- //검색조건 영역 -->
 		
 		<!-- 리스트 영역 -->
 		<div class="panelStyle">
+			<ul class="panelBar">
+				<li class="right">
+					검색결과 : <strong>
+					<span id="gridRowTotalCount">0</span> 건</strong>&nbsp; 쪽번호 <span id="pgNo">0</span>/
+					<strong id="endPgNo">0</strong>&nbsp;&nbsp; <select id="pageSize"
+					name="pageSize">
+						<option value="50" selected="selected">50개씩 보기</option>
+						<option value="100">100개씩 보기</option>
+						<option value="500">500개씩 보기</option>
+						<option value="1000">1000개씩 보기</option>
+				</select> <input type="hidden" name="pageNo" id="pageNo" value="1" />
+				</li>
+			</ul>
+			
 			<div id="gridList" style="width: 100%; height: 570px" class="ag-theme-balham lh60"></div>
+			<ul class="panelBar">
+				<li class="center">
+					<div class="tablePaging" id="goodsOnePagination"></div>
+				</li>
+			</ul>
 		</div>
 		<!-- //리스트 영역 -->
+		</form>
 	</div>
-
+<script type="text/javascript" src="/ux/plugins/gaga/gaga.paging.js"></script>
 <script th:inline="javascript">
 /*<![CDATA[*/
 	let siteList = gagajf.convertToArray([[${siteList}]]); // 사이트
@@ -213,10 +233,20 @@
 		if (!gagajf.validation('#searchForm'))
 			return false;
 		
-		// Fetch data
-		gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm');
+		gagaPaging.init('searchForm', fnSearchCallBack, 'goodsOnePagination', $('#pageSize').val());
+		gagaPaging.load($("#searchForm input[name=pageNo]").val());
 	});
 	
+	var fnSearchCallBack = function(result){
+		$('#searchForm').find('#gridRowTotalCount').html(result.pageing.pageable.totalCount.addComma());
+		$('#searchForm').find('#pageNo').val(result.pageing.pageable.pageNo.addComma());
+		$('#searchForm').find('#pgNo').html(result.pageing.pageable.pageNo.addComma());
+		$('#searchForm').find('#endPgNo').html(result.pageing.pageable.totalPage.addComma());
+		gridOptions.api.setRowData(result.counselList);
+		
+		gagaPaging.createPagination(result.pageing.pageable);
+	}
+	
 	$(document).ready(function() {
 		// 공통 달력 생성
 		cfnCreateCalendar('#terms', 'termStdt', 'termEddt', true);

+ 39 - 2
src/main/webapp/WEB-INF/views/customer/OneToOneQnaDetailForm.html

@@ -90,8 +90,8 @@
 							</td>
 							<th>첨부 이미지</th>
 							<td class="userImg">
-								<img th:if="${counselInfo.sysFileNm1 != null}" style="height: 100px;" th:src="${@environment.getProperty('domain.image') + '/' + counselInfo.sysFileNm1}" alt="" onerror='this.src="/image/no.png"'/>
-								<img th:if="${counselInfo.sysFileNm2 != null}" style="height: 100px;" th:src="${@environment.getProperty('domain.image') + '/' + counselInfo.sysFileNm2}" alt="" onerror='this.src="/image/no.png"'/>
+								<img th:if="${counselInfo.sysFileNm1 != null}" style="height: 100px;" th:src="${@environment.getProperty('domain.image') + '/' + counselInfo.sysFileNm1}" onclick="fnPopupOpen('layer_review_pic', this);" alt="" onerror='this.src="/image/no.png"'/>
+								<img th:if="${counselInfo.sysFileNm2 != null}" style="height: 100px;" th:src="${@environment.getProperty('domain.image') + '/' + counselInfo.sysFileNm2}" onclick="fnPopupOpen('layer_review_pic', this);" alt="" onerror='this.src="/image/no.png"'/>
 							</td>
 						</tr>
 					</tbody>
@@ -145,6 +145,18 @@
 	</div>
 </div>
 
+<div class="uPopupWrap off" id="layer_review_pic">
+	<div class="area reviewPic" style="width:500px; height:500px;">
+		<ul class="picList" th:object="${counselInfo}">
+			<li><div class="img"></div></li>
+		</ul>
+		<!-- <button type="button" class="btnArr prev" onclick="fnPicPrev('layer_review_pic');">이전</button>
+		<button type="button" class="btnArr next" onclick="fnPicNext('layer_review_pic');">다음</button> -->
+		<button type="button" class="btnClose">닫기</button>
+	</div>
+</div>
+
+
 <script th:inline="javascript">
 /*<![CDATA[*/
 	// 답변 저장
@@ -187,8 +199,33 @@
 		}
 	});
 	
+	// 팝업 열기
+	function fnPopupOpen(id,el,kind) {
+		$("#"+id).removeClass("off");	//레이어 Open
+		$("#"+id).find(".picList li").removeClass("on");
+		$(".picList").find("div").attr("style","background-image:url("+el.src+")");
+		let onIdx = $(el).index();
+		$("#"+id).find(".picList li").eq(onIdx).addClass("on");
+		let picTot = $("#"+id).find(".picList li").length - 1;
+		//console.log(onIdx +', '+ picTot);
+		
+		if (onIdx == 0) {
+			$("#"+id).find("button.prev").addClass("off");
+		}
+		if (onIdx == picTot) {
+			$("#"+id).find("button.next").addClass("off");
+		}
+	}
+	
+	$("#layer_review_pic .btnClose").click(function() {
+		$("#layer_review_pic").addClass("off"); //레이어 닫기
+		$("#layer_review_pic").find("button.btnArr").removeClass("off"); //버튼 초기화
+	});
+	
 	$(document).ready(function() {
 		cfnGetTextLength($('textarea[name=ansContent]'), 4000, $('#dpLocAnsContent'));
+		
+		
 	});
 /*]]>*/
 </script>

+ 36 - 4
src/main/webapp/WEB-INF/views/customer/OneToOneQnaForm.html

@@ -15,6 +15,7 @@
  *******************************************************************************
  -->
 	<div id="main">
+	<form id="searchForm" name="searchForm" action="#" th:action="@{'/customer/onetoone/qna/list'}" onsubmit="$('#btnSearch').trigger('click'); return false;">
 		<!-- 메인타이틀 영역 -->
 		<div class="main-title">
 		</div>
@@ -27,7 +28,7 @@
 		
 		<!-- 검색조건 영역 -->
 		<div class="panelStyle">
-			<form id="searchForm" name="searchForm" action="#" th:action="@{'/customer/onetoone/qna/list'}" onsubmit="$('#btnSearch').trigger('click'); return false;">
+			
 				<table class="frmStyle" aria-describedby="검색조건">
 					<colgroup>
 						<col style="width:10%;"/>
@@ -89,17 +90,38 @@
 						<button type="button" class="btn btn-gray btn-lg" onclick="$('#searchForm')[0].reset();">초기화</button>
 					</li>
 				</ul>
-			</form>
+			
 		</div>
 		<!-- //검색조건 영역 -->
 		
 		<!-- 리스트 영역 -->
 		<div class="panelStyle">
+			<ul class="panelBar">
+				<li class="right">
+					검색결과 : <strong>
+					<span id="gridRowTotalCount">0</span> 건</strong>&nbsp; 쪽번호 <span id="pgNo">0</span>/
+					<strong id="endPgNo">0</strong>&nbsp;&nbsp; <select id="pageSize"
+					name="pageSize">
+						<option value="50" selected="selected">50개씩 보기</option>
+						<option value="100">100개씩 보기</option>
+						<option value="500">500개씩 보기</option>
+						<option value="1000">1000개씩 보기</option>
+				</select> <input type="hidden" name="pageNo" id="pageNo" value="1" />
+				</li>
+			</ul>
+		
 			<div id="gridList" style="width: 100%; height: 570px" class="ag-theme-balham"></div>
+			<ul class="panelBar">
+				<li class="center">
+					<div class="tablePaging" id="onePagination"></div>
+				</li>
+			</ul>
 		</div>
 		<!-- //리스트 영역 -->
+		</form>
 	</div>
 
+<script type="text/javascript" src="/ux/plugins/gaga/gaga.paging.js"></script>
 <script th:inline="javascript">
 /*<![CDATA[*/
 	let siteList = gagajf.convertToArray([[${siteList}]]); // 사이트
@@ -180,10 +202,20 @@
 		if (!gagajf.validation('#searchForm'))
 			return false;
 		
-		// Fetch data
-		gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm');
+		gagaPaging.init('searchForm', fnSearchCallBack, 'onePagination', $('#pageSize').val());
+		gagaPaging.load($("#searchForm input[name=pageNo]").val());
 	});
 	
+	var fnSearchCallBack = function(result){
+		$('#searchForm').find('#gridRowTotalCount').html(result.pageing.pageable.totalCount.addComma());
+		$('#searchForm').find('#pageNo').val(result.pageing.pageable.pageNo.addComma());
+		$('#searchForm').find('#pgNo').html(result.pageing.pageable.pageNo.addComma());
+		$('#searchForm').find('#endPgNo').html(result.pageing.pageable.totalPage.addComma());
+		gridOptions.api.setRowData(result.counselList);
+		
+		gagaPaging.createPagination(result.pageing.pageable);
+	}
+	
 	$(document).ready(function() {
 		// 공통 달력 생성
 		cfnCreateCalendar('#terms', 'termStdt', 'termEddt', true);

+ 11 - 1
src/main/webapp/WEB-INF/views/display/CategoryForm.html

@@ -234,7 +234,7 @@
 		for (let i = 1; i <= 5; i++) {
 			$("#cateLvl" + i).html($("#selCate" + i).html());
 			$("#cateLvl" + i).val($("#selCate" + i).val());
-			if (i >= selLvl) {
+			if (i > selLvl) {
 				$("#cateLvl" + i).hide();
 			} else {
 				$("#cateLvl" + i).show();
@@ -362,6 +362,16 @@
 			return false;
 		
 		let selLvl = Number($('#detailForm input[name=selLvl]').val());
+		if (gagajf.isNull($('#detailForm select[name=cateGb]').val())) {
+			mcxDialog.alertC('카테고리구분을 선택해 주세요.', {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$('#detailForm select[name=cateGb]').focus();
+				}
+			});
+			return;
+		}
+
 		if (gagajf.isNull($('#detailForm select[name=cate1No]').val())) {
 			if (selLvl > 2) {
 				mcxDialog.alertC('카테고리1을 선택해 주세요.', {

+ 1 - 3
src/main/webapp/WEB-INF/views/display/CategoryGoodsForm.html

@@ -196,9 +196,6 @@
 		{headerName: "재고", field: "currStockQty", width: 80, cellClass: 'text-right',
 			valueFormatter: function(params) {	return params.value.addComma();}
 		},
-		{headerName: "TAG가", field: "tagPrice", width: 80, cellClass: 'text-right',
-			valueFormatter: function(params) {	return params.value.addComma();}
-		},
 		{headerName: "정상가", field: "listPrice", width: 80, cellClass: 'text-right',
 			valueFormatter: function(params) {	return params.value.addComma();}
 		},
@@ -210,6 +207,7 @@
 			,valueFormatter: function (params) { return gagaAgGrid.lookupValue(goodsStatList, params.value); }
 		},
 		{headerName: "브랜드코드", field: "brandCd", width: 80, cellClass: 'text-center'},
+		{headerName: "브랜드명", field: "brandGrpNm", width: 80, cellClass: 'text-center'},
 		{headerName: "공급업체상품코드", field: "supplyGoodsCd", width: 120, cellClass: 'text-center'},
 		{headerName: "스타일구분", field: "styleYear", width: 80, cellClass: 'text-center'},
 		{headerName: "정상/이월", field: "formalGb", width: 80, cellClass: 'text-center'},

+ 309 - 79
src/main/webapp/WEB-INF/views/display/GoodsCategoryForm.html

@@ -35,64 +35,62 @@
 			<div class="panelContent">
 				<table class="frmStyle">
 					<colgroup>
-						<col width="7%"/>
+						<col width="5%"/>
 						<col width="18%"/>
-						<col width="7%"/>
+						<col width="5%"/>
 						<col width="18%"/>
 						<col width="7%"/>
-						<col width="18%"/>
+						<col width="22%"/>
 						<col width="7%"/>
 						<col/>
 					</colgroup>
 					<tr>
-						<th>상품코드</th>
+						<th>업체<em class="required" title="필수"></em></th>
 						<td>
-							<input type="text" class="w100" name="goodsCd" id="goodsCd"/>
+							<input type="text" class="w100" name="supplyCompSearchTxt" id="supplyCompSearchTxt" maxlength="20" />
+							<button type="button" class="btn icn" id="btnSearchSupplyComp"><i class="fa fa-search"></i></button>
+							<span id="supplyCompText"></span>
+							<input type="hidden" name="supplyCompList"/>
 						</td>
-						<th>원코드</th>
+						<th>브랜드<em class="required" title="필수"></em></th>
 						<td>
-							<input type="text" class="w100" name="supplyGoodsCd" maxlength="20" required="required" data-valid-name="원코드"/>
+							<input type="text" class="w100" name="searchTxt" id="searchTxt" maxlength="20" />
+							<button type="button" class="btn icn" id="btnSearchBrand"><i class="fa fa-search"></i></button>
+							<span id="brandText"></span>
+							<input type="hidden" name="brandList"/>
 						</td>
-						<th>상품명</th>
+						<th>품목</th>
 						<td>
-							<input type="text" class="w100" name="goodsNm" maxlength="200" required="required" data-valid-name="상품명"/>
+							<div class="multiCheckBox"  style="width:300px">
+								<button type="button" class="sltBtn" data-name="[전체]">[전체]</button>
+								<ul style="overflow:auto; height:170px;" id="grpItemkind">
+									<li><label class="chkBox" onclick="uifnAllCheck(this,'grpItemkind')"><input type="checkbox" name="전체선택" >전체선택</label></li>
+									<li th:if="${itemkindList}" th:each="oneData, status : ${itemkindList}"><label class="chkBox" data-group="grpItemkind"><input type="checkbox" name="multiItemkindCd" th:id="${'itemkindCd' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+								</ul>
+							</div>
 						</td>
-						<th>상품상태</th>
-						<td>
-							<select name="goodsStat">
-								<option value=''>[전체]</option>
-								<option th:if="${goodsStatList}" th:each="oneData, status : ${goodsStatList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+						<th rowspan="4">키워드<em class="required" title="필수"></em></th>
+						<td rowspan="4">
+							<select name="search" id="search">
+								<option value="searchGoodsCd">상품코드</option>
+								<option value="searchGoodsNm">상품명</option>
+								<option value="searchGoodsNum">품번</option>
+								<option value="searchSupplyGoodsCd">업체상품코드</option>
 							</select>
+							<textarea class="textareaR3 w70p" name="condition" id="condition"></textarea>
 						</td>
 					</tr>
 					<tr>
-						<th>업체코드</th>
-						<td>
-							<select name="supplyCompCd">
-								<option value=''>[전체]</option>
-								<option th:if="${supplyCompList}" th:each="oneData, status : ${supplyCompList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-							</select>
-						</td>
-						<th>담당MD</th>
+						<th>상품상태</th>
 						<td>
-							<select name="mdId">
-								<option value=''>[전체]</option>
-								<option th:if="${mdIdList}" th:each="oneData, status : ${mdIdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-							</select>
+							<div class="multiCheckBox"  style="width:200px">
+								<button type="button" class="sltBtn" data-name="[전체]">[전체]</button>
+								<ul style="overflow:auto; height:170px" id="grpGoodsStat">
+									<li><label class="chkBox" onclick="uifnAllCheck(this,'grpGoodsStat')"><input type="checkbox" name="전체선택" >전체선택</label></li>
+									<li th:if="${goodsStatList}" th:each="oneData, status : ${goodsStatList}"><label class="chkBox" data-group="grpGoodsStat"><input type="checkbox" name="multiGoodsStat" th:id="${'goodsStat' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+								</ul>
+							</div>
 						</td>
-						<th>브랜드/품목</th>
-						<td colspan="3">
-							<select name="brandCd">
-								<option value=''>[전체]</option>
-								<!--<option th:if="${brandCdList}" th:each="oneData, status : ${brandCdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>-->
-							</select>
-							<select name="itemkindCd">
-								<option value=''>[전체]</option>
-								<option th:if="${itemkindList}" th:each="oneData, status : ${itemkindList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-							</select>
-						</td>
-					</tr>
-					<tr>
 						<th>이월구분</th>
 						<td>
 							<select name="formalGb">
@@ -100,65 +98,82 @@
 								<option th:if="${formalGbList}" th:each="oneData, status : ${formalGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 							</select>
 						</td>
-						<th>재고수량</th>
+						<th>년도/시즌</th>
 						<td>
-							<input type="text" class="w100" name="currStockQty" maxlength="11" required="required" data-valid-name="재고수량" data-valid-type="numeric"/>개 이상
+							<div class="multiCheckBox" style="width:140px;">
+								<button type="button" class="sltBtn" data-name="[전체]">[전체]</button>
+								<ul style="overflow:auto; height:140px" id="grpStyle">
+									<li><label class="chkBox" onclick="uifnAllCheck(this,'grpStyle')"><input type="checkbox" name="전체선택" id="multiStyleYear" >전체선택</label></li>
+									<li th:if="${styleYearList}" th:each="oneData, status : ${styleYearList}"><label class="chkBox" data-group="grpStyle"><input type="checkbox" name="multiStyleYear" th:id="${'styleYear' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+								</ul>
+							</div>
+							<div class="multiCheckBox" style="width:170px;">
+								<button type="button" class="sltBtn" data-name="[전체]">[전체]</button>
+								<ul style="overflow:auto; height:170px" id="grpSeason">
+									<li><label class="chkBox" onclick="uifnAllCheck(this,'grpSeason')"><input type="checkbox" name="전체선택" id="multiSeasonCd" >전체선택</label></li>
+									<li th:if="${seasonList}" th:each="oneData, status : ${seasonList}"><label class="chkBox" data-group="grpSeason"><input type="checkbox" name="multiSeasonCd" th:id="${'seasonCd' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+								</ul>
+							</div>
 						</td>
-						<th>년도/시즌</th>
+					</tr>
+					<tr>
+						<th>담당MD</th>
 						<td>
-							<select name="styleYear">
+							<select name="mdId">
 								<option value=''>[전체]</option>
-								<option th:if="${styleYearList}" th:each="oneData, status : ${styleYearList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+								<option th:if="${mdIdList}" th:each="oneData, status : ${mdIdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 							</select>
-							<select name="seasonCd">
+						</td>
+						<th>품절여부</th>
+						<td>
+							<select name="soldoutYn">
 								<option value=''>[전체]</option>
-								<option th:if="${seasonList}" th:each="oneData, status : ${seasonList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+								<option value='Y'>[Y] Yes</option>
+								<option value='N'>[N] No</option>
 							</select>
 						</td>
-						<th>판매가</th>
+						<th>재고수량</th>
 						<td>
-							<input type="text" class="w60" name="currPriceSt" required="required" data-valid-name="판매가" data-valid-type="integer"/>원 ~
-							<input type="text" class="w60" name="currPriceEd" required="required" data-valid-name="판매가" data-valid-type="integer"/>원
+							<input type="text" class="w100" name="stockQtySum" maxlength="11" required="required" data-valid-name="재고수량" data-valid-type="numeric"/>개 이상
 						</td>
 					</tr>
 					<tr>
-						<th>품절여부</th>
+						<th>자사몰노출여부</th>
 						<td>
-							<select name="soldoutYn">
+							<select name="selfMallYn">
 								<option value=''>[전체]</option>
 								<option value='Y'>[Y] Yes</option>
 								<option value='N'>[N] No</option>
 							</select>
 						</td>
-						<th>반품/교환</th>
-						<td colspan='3'>
-							<label class="chkBox"><input type="checkbox" name="changeableYn"/>반품불가</label>
-							<label class="chkBox"><input type="checkbox" name="returnableYn"/>교환불가</label>
-							<label class="chkBox"><input type="checkbox" name="returnFeeFreeYn"/>무료반품</label>
-							<label class="chkBox"><input type="checkbox" name="changeFeeFreeYn"/>무료교환</label>
-						</td>
 						<th>할인율(%)</th>
 						<td>
 							<input type="text" class="w50" name="dcRateSt" maxlength="3" required="required" data-valid-name="할인율" data-valid-type="numeric"/> ~
 							<input type="text" class="w50" name="dcRateEd" maxlength="3" required="required" data-valid-name="할인율" data-valid-type="numeric"/>
 						</td>
+						<th>판매가</th>
+						<td>
+							<input type="text" class="w60" name="currPriceSt" required="required" data-valid-name="판매가" data-valid-type="numeric"/>원 ~
+							<input type="text" class="w60" name="currPriceEd" required="required" data-valid-name="판매가" data-valid-type="numeric"/>원
+						</td>
 					</tr>
 					<tr>
-						<th>기간</th>
-						<td id="sellTerms" colspan='5'></td>
-						<th>전시여부</th>
-						<td>
-							<select name="useYn">
-								<option value=''>[전체]</option>
-								<option value='Y'>[Y] Yes</option>
-								<option value='N'>[N] No</option>
-							</select>
+						<th>반품/교환</th>
+						<td colspan='7'>
+							<label class="chkBox"><input type="checkbox" name="changeableYn" id="changeableYn"/>반품불가</label>
+							<label class="chkBox"><input type="checkbox" name="returnableYn" id="returnableYn"/>교환불가</label>
+							<label class="chkBox"><input type="checkbox" name="returnFeeFreeYn" id="returnFeeFreeYn"/>무료반품</label>
+							<label class="chkBox"><input type="checkbox" name="changeFeeFreeYn" id="changeFeeFreeYn"/>무료교환</label>
 						</td>
 					</tr>
+					<tr>
+						<th>기간</th>
+						<td id="sellTerms" colspan='7'></td>
+					</tr>
 				</table>
 				<ul class="panelBar">
 					<li class="center">
-						<button type="button" class="btn btn-gray btn-lg" onclick="$('#goodsSearchForm')[0].reset();" >초기화</button>
+						<button type="button" class="btn btn-gray btn-lg" id="btnInit" >초기화</button> <!--onclick="$('#goodsSearchForm')[0].reset();"-->
 						<button type="button" class="btn btn-info btn-lg" id="btnSearch" >조회</button>
 					</li>
 				</ul>
@@ -293,29 +308,46 @@
 			},
 			{headerName: "이미지", field: "sysImgNm", width: 100, height: 60, cellClass: 'text-center'
 				,cellRenderer: function(params) {
-					return '<img width="60" src="'+ _goodsUrl+ "/" + params.value + '" alt=""  onerror="this.src=\'/image/no.png\';"/>';
+					return '<img width="60" src="'+ _goodsUrl+ "/" + params.value + '?RS=60" alt="" onclick="cfnOpenImagePreViewPopup(\'goodsImgView\', \''+ _goodsUrl+ "/" + params.value +'\')" onerror="this.src=\'/image/no.png\';"/>';
 				}
 			},
+			{headerName: "브랜드", field: "brandCd", width: 80, cellClass: 'text-center'},
+			{headerName: "브랜드명", field: "brandEnm", width: 130, cellClass: 'text-center'},
 			{headerName: "상품코드", field: "goodsCd", width: 140, cellClass: 'text-center'},
 			{headerName: "상품명", field: "goodsNm", width: 350, cellClass: 'text-left'
 				,cellRenderer: function(params) {
 					return '<a href="javascript:void(0);">' + params.value + '</a>';
 				}
 			},
-			{headerName: "재고", field: "currStockQty", width: 80, cellClass: 'text-right',
-				valueFormatter: function(params) {return Number(params.value).addComma()}
-			},
-			{headerName: "할인율", field: "dcRate", width: 80, cellClass: 'text-right'},
-			{headerName: "TAG가", field: "tagPrice", width: 80, cellClass: 'text-right',
-				valueFormatter: function(params) {return Number(params.value).addComma()}
+			{headerName: "기존품목코드", field: "itemkindCd", width: 150, cellClass: 'text-center' },
+			{headerName: "품목", field: "itemkindNm", width: 150, cellClass: 'text-center'},
+			{headerName: "전시재고", field: "stockQtySum", width: 120, cellClass: 'text-right',
+				valueFormatter: function(params) {	return params.value.addComma();},
+				cellStyle : function(params){
+					if ("00" == params.data.goodsStat  || "10" == params.data.goodsStat || "20" == params.data.goodsStat || "30" == params.data.goodsStat) {
+						return;
+					}
+					var color = "";
+					if (params.value <= 0){
+						color = '#ff96689c';
+					}
+					return { 'background-color': color};
+				}
 			},
+			{headerName: "상품타입", field: "goodsType" , width: 100, cellClass: 'text-center'},
+			// {headerName: "년도", field: "styleYear" , width: 80, cellClass: 'text-center'},
+			// {headerName: "시즌", field: "seasonCd" , width: 80, cellClass: 'text-center',
+			// 	cellEditorParams: { values: gagaAgGrid.extractValues(seasonList) },
+			// 	valueFormatter: function (params) { return gagaAgGrid.lookupValue(seasonList, params.value); },
+			// 	valueParser: function (params) { return gagaAgGrid.lookupKey(seasonList, params.newValue); }
+			// },
 			{headerName: "정상가", field: "listPrice", width: 80, cellClass: 'text-right',
 				valueFormatter: function(params) {return Number(params.value).addComma()}
 			},
 			{headerName: "판매가", field: "currPrice", width: 80, cellClass: 'text-right',
 				valueFormatter: function(params) {return Number(params.value).addComma()}
 			},
-			{headerName: "상품타입", field: "goodsType", width: 80, cellClass: 'text-center'},
+			{headerName: "할인율", field: "dcRate", width: 80, cellClass: 'text-right'},
 			{headerName: "포인트적립율(PC)", field: "pntPrate", width: 80, cellClass: 'text-right'},
 			{headerName: "선포인트사용가능여부(PC)", field: "prePpntUsableYn", width: 80, cellClass: 'text-right'},
 			{headerName: "포인트적립율(모바일)", field: "pntMrate", width: 80, cellClass: 'text-right'},
@@ -325,10 +357,9 @@
 				cellEditorParams: { values: gagaAgGrid.extractValues(goodsStatList) },
 				valueFormatter: function (params) { return gagaAgGrid.lookupValue(goodsStatList, params.value); },
 				valueParser: function (params) { return gagaAgGrid.lookupKey(goodsStatList, params.newValue); }
-			},
+			}
 			//{headerName: "판매가능재고", field: "currStockQty", width: 100, cellClass: 'text-right'}, // 추후 추가해야함 ㅠㅠ
 			//{headerName: "품절여부", field: "soldoutYn", width: 80, cellClass: 'text-center'}, // 추후 추가해야함 ㅠㅠ
-			{headerName: "기존품목코드", field: "itemkindCd", width: 150, cellClass: 'text-center' }
 			/*{headerName: "품목명", field: "itemkindNm", width: 250, cellClass: 'text-left'},
             {headerName: "기존품목코드", field: "itemkindCd", width: 150, cellClass: 'text-center' },
             {headerName: "변경품목코드", field: "itemkindCdNew", width: 150, cellClass: 'text-center', editable : true,
@@ -376,8 +407,135 @@
 			gagaAgGrid.fetch(actionUrl, gridCategoryOptions);
 		}
 
-		// 조회
+		// 조회클릭시
 		$('#btnSearch').on('click', function() {
+			$("#goodsSearchForm input[name=pageNo]").val('1');
+			fnGoodsListSearch('BASIC');
+		});
+
+		// 조회
+		var fnGoodsListSearch = function (gbn){
+			if (typeof(gbn) != 'undefined' &&  gbn == 'EXCEL'){
+				$("#goodsSearchForm input[name=searchGb]").val("EXCEL");
+			}else{
+				$("#goodsSearchForm input[name=searchGb]").val("BASIC");
+			}
+
+			if(!fnConditionCheck()) return;
+
+			$('#goodsSearchForm input[name=changeableYn]').val($("#changeableYn").prop('checked')? 'N':'');
+			$('#goodsSearchForm input[name=returnableYn]').val($("#returnableYn").prop('checked')? 'N':'');
+			$('#goodsSearchForm input[name=returnFeeFreeYn]').val($("#returnFeeFreeYn").prop('checked')? 'Y':'');
+			$('#goodsSearchForm input[name=changeFeeFreeYn]').val($("#changeFeeFreeYn").prop('checked')? 'Y':'');
+
+			gagaPaging.init('goodsSearchForm', fnSearchCallBack, 'goodsCategoryListPagination', $('#goodsSearchForm').find('#pageSize').val());
+			gagaPaging.load($("#goodsSearchForm input[name=pageNo]").val());
+		}
+
+		//검색 조건 확인
+		var fnConditionCheck = function(){
+			var formId = '#goodsSearchForm';
+			var form = document.goodsSearchForm;
+
+			if (event.keyCode === 13) return false;
+
+			if($("#goodsSearchForm input[name=searchGb]").val() == "EXCEL") return true;
+
+			var searchFlag = false;
+			var cnt = 0;
+
+			if( !gagajf.isNull($("#goodsSearchForm input[name=supplyCompList]").val())
+					|| !gagajf.isNull($("#goodsSearchForm textarea[name=condition]").val())
+					|| (!gagajf.isNull($("#goodsSearchForm input[name=stDate]").val()) && !gagajf.isNull($("#goodsSearchForm input[name=edDate]").val()))
+					|| !gagajf.isNull($("#goodsSearchForm input[name=brandList]").val())
+			){
+				searchFlag = true;
+			}else{
+				/* for (i = 0; i < form.elements.length; i++ ) {
+                    var el = form.elements[i];
+
+                    if ($(el).prop("type") == "text" || ($(el).prop("type") == "select-one" && el.name != "search" && el.name != "pageSize")) {
+                        if (!(el.value == null || el.value == "")) {
+                            cnt++;
+                        }
+                    }
+                }
+
+                if(cnt > 0) searchFlag = true; */
+			}
+
+			if(searchFlag == false){
+				mcxDialog.alert("검색조건을 입력하세요.");
+				return false;
+			}
+
+			if(!gagajf.isNull($("#goodsSearchForm input[name=currPriceSt]").val()) && !gagajf.isNull($("#goodsSearchForm input[name=currPriceEd]").val())){
+				if (Number($("#goodsSearchForm input[name=currPriceSt]").val().removeComma()) > Number($("#goodsSearchForm input[name=currPriceEd]").val().removeComma()) ){
+					mcxDialog.alertC("판매가를 확인해 주세요.", {
+						sureBtnText: "확인",
+						sureBtnClick: function() {
+							$("#goodsSearchForm input[name=currPriceEd]").focus();
+						}
+					});
+					return false;
+				}
+			}
+
+			if(!gagajf.isNull($("#goodsSearchForm input[name=dcRateSt]").val()) && !gagajf.isNull($("#goodsSearchForm input[name=dcRateEd]").val())){
+				if (Number($("#goodsSearchForm input[name=dcRateSt]").val().removeComma()) > Number($("#goodsSearchForm input[name=dcRateEd]").val().removeComma()) ){
+					mcxDialog.alertC("할인율를 확인해 주세요.", {
+						sureBtnText: "확인",
+						sureBtnClick: function() {
+							$("#goodsSearchForm input[name=dcRateEd]").focus();
+						}
+					});
+					return false;
+				}
+			}
+
+			var fromDate = $('#goodsSearchForm input[name=stDate]').val();
+			var toDate = $('#goodsSearchForm input[name=edDate]').val();
+
+			if (!gagajf.isNull(fromDate) || !gagajf.isNull(toDate)) {
+
+				if (gagajf.isNull(fromDate) || gagajf.isNull(toDate)) {
+					mcxDialog.alertC("등록일 조회시 시작일자와 종료일자를 입력하세요.", {
+						sureBtnText: "확인",
+						sureBtnClick: function() {
+							$('#goodsSearchForm input[name=stDate]').focus();
+						}
+					});
+					return false;
+				}
+
+				if (fromDate > toDate) {
+					mcxDialog.alertC("등록 시작일자는 종료일자 보다 클 수 없습니다.", {
+						sureBtnText: "확인",
+						sureBtnClick: function() {
+							$('#goodsSearchForm input[name=stDate]').focus();
+						}
+					});
+					return false;
+				}
+			}
+
+			if (!gagajf.isNull($('#goodsSearchForm textarea[name=condition]').val())){
+				var arrData = $('#goodsSearchForm textarea[name=condition]').val().replace(/\r\n/g,"\n").split("\n");
+				if (arrData.length > 500){
+					mcxDialog.alertC("키워드 조회값을 500 이하로 조회 하세요.", {
+						sureBtnText: "확인",
+						sureBtnClick: function() {
+							$('#goodsSearchForm textarea[name=condition]').focus();
+						}
+					});
+					return false;
+				}
+			}
+			return true;
+		}
+
+		// 조회
+		$('#btnSearch2').on('click', function() {
 			if(gagajf.isNull($("#goodsSearchForm select[name=supplyCompCd]").val())
 					&& gagajf.isNull($("#goodsSearchForm input[name=goodsCd]").val())
 					&& (gagajf.isNull($("#goodsSearchForm input[name=stDate]").val()) && gagajf.isNull($("#goodsSearchForm input[name=edDate]").val()))){
@@ -607,6 +765,78 @@
 			fnSearch();
 		}
 
+		// 업체 조회 선택시
+		$('#btnSearchSupplyComp').on('click', function() {
+			cfnOpenCompanyListPopup('fnSetSupplyCompInfo', 'M');
+		});
+
+		// 업체 조회 팝업에서 호출
+		var fnSetSupplyCompInfo = function(result) {
+			var arrSupplyComp = [];
+			var supplyCompText = "";
+			var sIndex = 0;
+			$('#goodsSearchForm').find('#supplyCompText').html('');
+			$('#goodsSearchForm input[name=supplyCompSearchTxt]').val('');
+			result.forEach(function(supplyComp){
+				sIndex++;
+				arrSupplyComp.push(supplyComp.supplyCompCd);
+			});
+
+			// 조회값이 하나일 경우 화면에 코드 노출 그외는 갯수 처리
+			if (sIndex == 1) {
+				$('#goodsSearchForm input[name=supplyCompSearchTxt]').val(arrSupplyComp[0]);
+			}else{
+				supplyCompText = sIndex + " 개";
+				$('#goodsSearchForm').find('#supplyCompText').html(supplyCompText);
+			}
+			var jsonData = JSON.stringify(arrSupplyComp);
+			$("#goodsSearchForm input[name=supplyCompList]").val(jsonData);
+		}
+
+		// 브랜드 조회 선택시
+		$('#btnSearchBrand').on('click', function() {
+			cfnOpenBrandListPopup('fnSetBrandInfo', 'M');
+		});
+
+		// 브랜드 조회 팝업에서 호출
+		var fnSetBrandInfo = function(result) {
+			var arrbrandCd = [];
+			var brandText = "";
+			var bIndex = 0;
+			$('#goodsSearchForm').find('#brandText').html('');
+			$('#goodsSearchForm input[name=searchTxt]').val('');
+			result.forEach(function(brand){
+				bIndex++;
+				arrbrandCd.push(brand.brandCd);
+			});
+
+			// 조회값이 하나일 경우 화면에 코드 노출 그외는 갯수 처리
+			if (bIndex == 1) {
+				$('#goodsSearchForm input[name=searchTxt]').val(arrbrandCd[0]);
+			}else{
+				brandText = bIndex + " 개";
+				$('#goodsSearchForm').find('#brandText').html(brandText);
+			}
+			var jsonData = JSON.stringify(arrbrandCd);
+			$("#goodsSearchForm input[name=brandList]").val(jsonData);
+		}
+
+		// 초기화 클릭시
+		$('#btnInit').on('click', function() {
+
+			$('#goodsSearchForm')[0].reset();
+			//$("#searchForm input[type=radio]").removeClass("checked");
+			$("#goodsSearchForm input[type=checkbox]").removeClass("checked");
+			//$("#searchForm input[type=radio]").parent("label").removeClass("checked");
+			$("#goodsSearchForm input[type=checkbox]").parent("label").removeClass("checked");
+			$("#goodsSearchForm input[type=radio][checked]").parent("label").addClass("checked");
+			$("#multiBrand").empty();
+			$('#goodsSearchForm input[name=brandList]').val('');
+			$('#goodsSearchForm input[name=supplyCompList]').val('');
+			$('#goodsSearchForm').find('#brandText').html('');
+			$('#goodsSearchForm').find('#supplyCompText').html('');
+		});
+
 		$(document).ready(function() {
 			cfnCreateCalendar('#sellTerms', 'stDate', 'edDate', true, '기간', 'X');
 			// Create a agGrid

+ 6 - 2
src/main/webapp/WEB-INF/views/display/ItemkindCategoryForm.html

@@ -181,7 +181,10 @@
 				applyData.push(item);
 			}
 		});
-		
+		//2021-06-28 체크박스 해제 로직 추가
+		let actionUrl = $('#searchForm2').prop('action') + '/' + $('select[name=cateGb]').val();
+		gagaAgGrid.fetch(actionUrl, gridOptions2);
+
 		fnAddCategory(applyData);
 	});
 	
@@ -191,7 +194,7 @@
 		
 		cateData.forEach(function(item) {
 			isExist = false;
-			
+			console.log(item);
 			gridOptions3.api.forEachNode(function(rowNode, index) {
 				if (item.cateNo == rowNode.data.cateNo) {
 					isExist = true;
@@ -209,6 +212,7 @@
 				
 				gagaAgGrid.addRowData(gridOptions3, data, "cateNo");
 			}
+
 		});
 	}
 	

+ 3 - 3
src/main/webapp/WEB-INF/views/marketing/CouponIssuePopupForm.html

@@ -185,15 +185,15 @@
 		},
 		{
 			headerName: "할인값(PC)", field: "dcPval", width: 100, cellClass: "text-center",
-			cellRenderer: function(params) { return (!gagajf.isNull(params.value) ? gagaAgGrid.toAddComma(params.value) : '') + (params.data.dcWay == '10' ? '원' : '%'); }
+			cellRenderer: function(params) { return (!gagajf.isNull(params.value) ? gagaAgGrid.toAddComma(params.value) : '') + (params.data.dcWay == 'G240_10' ? '원' : '%'); }
 		},
 		{
 			headerName: "할인값(모바일)", field: "dcMval", width: 100, cellClass: "text-center",
-			cellRenderer: function(params) { return (!gagajf.isNull(params.value) ? gagaAgGrid.toAddComma(params.value) : '') + (params.data.dcWay == '10' ? '원' : '%'); }
+			cellRenderer: function(params) { return (!gagajf.isNull(params.value) ? gagaAgGrid.toAddComma(params.value) : '') + (params.data.dcWay == 'G240_10' ? '원' : '%'); }
 		},
 		{
 			headerName: "최고할인값", field: "maxDcAmt", width: 100, cellClass: "text-center",
-			cellRenderer: function(params) { return (!gagajf.isNull(params.value) ? gagaAgGrid.toAddComma(params.value) : '') + (params.data.dcWay == '10' ? '원' : '%'); }
+			cellRenderer: function(params) { return (!gagajf.isNull(params.value) ? gagaAgGrid.toAddComma(params.value) : '') + (params.data.dcWay == 'G240_10' ? '원' : '%'); }
 		},
 		{
 			headerName: "유효기간", field: "availPeriod", width: 300, cellClass: "text-center",

+ 7 - 3
src/main/webapp/WEB-INF/views/marketing/PlanCornerListForm.html

@@ -82,7 +82,6 @@
 					<button type="button" class="btn btn-Right btn-default btn-lg"onclick="fnGoodsExcelUpload();">엑셀상품추가</button>
 					<button type="button" class="btn btn-default btn-lg" onclick="cfnDownloadSampleFile('SF012');">엑셀상품추가 양식 다운로드</button>
 					<button type="button" class="btn btn-default btn-lg" onclick="fnOpenGoodsPopup();">상품추가</button>
-					<!-- <button type="button" class="btn btn-default btn-lg"onclick="fnDispOrdChange();">순서변경</button> -->
 					<button type="button" class="btn btn-danger btn-lg"	onclick="fnDeleteGoods();">선택삭제</button>
 				</div>
 			</div>
@@ -175,6 +174,7 @@
 	
 	// 코너 상품 조회
 	var fnConnerGoodsSearch = function() {
+		uifnPopupClose('popupGoods');
 		var actionUrl = '/marketing/planning/corner/goods/list';
 		var data = {planDtlSq:_planDtlSq};
 		var jsonData = JSON.stringify(data);
@@ -217,7 +217,6 @@
 	// 행삭제
 	$('#btnDeleteRow').on('click', function() {
 		var selectData = gagaAgGrid.selectedRowData(gridOptionsCorner);
-
 		if (selectData.length == 0) {
 			mcxDialog.alert('선택된 행이 없습니다.');
 			return;
@@ -229,7 +228,12 @@
 			sureBtnClick: function() {
 				var jsonData = JSON.stringify(selectData);
 
-				gagajf.ajaxJsonSubmit('/marketing/planning/corner/delete', jsonData, fnCornerSearch);
+				//gagajf.ajaxJsonSubmit('/marketing/planning/corner/delete', jsonData, fnCornerSearch);
+				
+				gagajf.ajaxJsonSubmit('/marketing/planning/corner/delete', jsonData, function() {
+					gridOptionsCorner.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsCorner)});
+					fnCornerSearch();
+				});
 			}
 		});
 	});

+ 11 - 13
src/main/webapp/WEB-INF/views/marketing/PlanDetailPopupForm.html

@@ -1120,20 +1120,18 @@
 			return;
 		}
 		
-		if (Number(stDate2) > Number(edDate2)) {
-			mcxDialog.alert('신규회원 종료일자는 시작일자 보다 클 수 없습니다.');
-			return;
+		if (newCustYn == "Y") {
+			if (Number(stDate2) > Number(edDate2)) {
+				mcxDialog.alert('신규회원 종료일자는 시작일자 보다 클 수 없습니다.');
+				return;
+			}
+			if (Number(edDate2) < Number(toDate) && mode == 'N') {
+				mcxDialog.alert('신규회원 종료일자는 오늘포함 이후로 등록해주세요.');
+				return;
+			}
 		}
 
-		/* if (Number(stDate2) < Number(toDate) && mode == 'N') {
-			mcxDialog.alert('신규회원 시작일자는 오늘포함 이후로 등록해주세요.');
-			return;
-		} */
-
-		if (Number(edDate2) < Number(toDate) && mode == 'N') {
-			mcxDialog.alert('신규회원 종료일자는 오늘포함 이후로 등록해주세요.');
-			return;
-		}
+		
 		
 		stDate = $(formId + ' input[name=startSearchDate]').val();
 		edDate = $(formId + ' input[name=endSearchDate]').val();
@@ -1537,7 +1535,7 @@
 	
 	// 브랜드 추가 버튼 클릭시 (복수 브랜드때 수정 필요)
 	$('#btnAddBrand').on('click', function() {
-		cfnOpenBrandGroupListPopup("fnSetPopupBrandInfo", "S", "C");
+		cfnOpenBrandGroupListPopup("fnSetPopupBrandInfo", "S", "S");
 	});
 	
 	 // 브랜드 설정 선택삭제 버튼 클릭시

+ 29 - 30
src/main/webapp/WEB-INF/views/marketing/PlanListForm.html

@@ -59,7 +59,7 @@
 									th:text="|[${oneData.cd}] ${oneData.cdNm}|"></option>
 						</select></td>
 						<th rowspan="2">등록자</th>
-						<td rowspan="2"><input type="text" name="regId" id="regId" /></td>
+						<td rowspan="2"><input type="text" name="regNm" id="regNm" /></td>
 						<th rowspan="3">키워드</th>
 						<td rowspan="3"><select name="search" id="search">
 								<option value="searchPlanNm">기획전명</option>
@@ -100,36 +100,35 @@
 			</ul>
 	</div>
 
-	<div class="panelStyle">
-		<!-- 검색결과 영역 -->
-		<!-- 상단버튼 영역  -->
-		<ul class="panelBar">
-			<li>
-				<button type="button" class="btn btn-danger btn-lg"
-					onclick="fnSelectedDelete();">삭제</button>
-			</li>
-			<li class="right">
-				<button type="button" class="btn btn-primary btn-lg"
-					onclick="fnPlanRegisterPopup();">등록</button> 검색결과 : <strong><span
-					id="gridRowTotalCount">0</span> 건</strong>&nbsp; 쪽번호 <span id="pgNo">0</span>/
-				<strong id="endPgNo">0</strong>&nbsp;&nbsp; <select id="pageSize"
-				name="pageSize">
-					<option value="50" selected="selected">50개씩 보기</option>
-					<option value="100">100개씩 보기</option>
-					<option value="500">500개씩 보기</option>
-					<option value="1000">1000개씩 보기</option>
-			</select> <input type="hidden" name="pageNo" id="pageNo" value="1" />
-			</li>
-		</ul>
+		<div class="panelStyle">
+			<!-- 검색결과 영역 -->
+			<!-- 상단버튼 영역  -->
+			<ul class="panelBar">
+				<li>
+					<button type="button" class="btn btn-danger btn-lg"
+						onclick="fnSelectedDelete();">삭제</button>
+				</li>
+				<li class="right">
+					<button type="button" class="btn btn-primary btn-lg"
+						onclick="fnPlanRegisterPopup();">등록</button> 검색결과 : <strong><span
+						id="gridRowTotalCount">0</span> 건</strong>&nbsp; 쪽번호 <span id="pgNo">0</span>/
+					<strong id="endPgNo">0</strong>&nbsp;&nbsp; <select id="pageSize"
+					name="pageSize">
+						<option value="50" selected="selected">50개씩 보기</option>
+						<option value="100">100개씩 보기</option>
+						<option value="500">500개씩 보기</option>
+						<option value="1000">1000개씩 보기</option>
+				</select> <input type="hidden" name="pageNo" id="pageNo" value="1" />
+				</li>
+			</ul>
 
-		<div id="gridList" style="width: 100%; height: 500px;"
-			class="ag-theme-balham"></div>
-		<ul class="panelBar">
-			<li class="center">
-				<div class="tablePaging" id="planListPagination"></div>
-			</li>
-		</ul>
-	</div>
+			<div id="gridList" style="width: 100%; height: 500px;" class="ag-theme-balham"></div>
+			<ul class="panelBar">
+				<li class="center">
+					<div class="tablePaging" id="planListPagination"></div>
+				</li>
+			</ul>
+		</div>
 	</form>
 </div>
 

+ 4 - 5
src/main/webapp/WEB-INF/views/marketing/PlanReplyDetailForm.html

@@ -24,9 +24,8 @@
 		<!-- //TITLE -->
 		
 		<!-- CONTENT -->
-		<div class="panelContent">
-			<form id="replyDetailForm" name="replyDetailForm" action="#" th:method="post" >
-				
+		<form id="replyDetailForm" name="replyDetailForm" action="#" th:method="post" >
+			<div class="panelContent">
 				<div class="reviewWrap">
 					<div class="user_review">
 						<!-- 리뷰 파일 -->
@@ -51,8 +50,8 @@
 						</dl>
 					</div>
 				</div>
-			</form>
-		</div>
+			</div>
+		</form>
 	</div>
 </div>
 <div class="uPopupWrap off" id="layer_review_pic">

+ 1 - 1
src/main/webapp/WEB-INF/views/marketing/PlanReplyListForm.html

@@ -115,7 +115,7 @@
 
 	// 셀 클릭 이벤트
 	gridOptionsReply.onCellClicked = function(event) {
-		if (event.colDef.field == 'maskingCustNm') {
+		if (event.colDef.field == 'maskingCustId') {
 			cfnOpenCustDetailPopup(event.data.custNo);
 		}else if(event.colDef.field == 'entryVal1'){
 			fnOpenCustReplyPopup(event.data.planEntrySq,event.data.planSq);

+ 44 - 44
src/main/webapp/WEB-INF/views/marketing/PlanTemplatePopupForm.html

@@ -42,6 +42,50 @@
 			<input type="hidden" name="goodsPlanContSq10">
 			<div class="cardArea" style="height: 700px; margin: 3px;">
 
+				<div class="panelContent">
+					<div class="panelStyle" style="margin: unset;">
+						<!-- TITLE -->
+						<div class="panelTitle">
+							<h2>HTML [상단]</h2>
+							<span class="panelControl"> <i
+								class="fa inner-fa-chevron-up"></i> <!-- 열림/닫힘 화살표 -->
+							</span>
+						</div>
+						<!-- //TITLE -->
+						<div class="inner-panelContent">
+							<div class="panelContent">
+								<table class="frmStyle">
+									<colgroup>
+										<col width="10%" />
+										<col width="90%" />
+									</colgroup>
+									<tr>
+										<th>[전시여부<label class="chkBox"><input type="checkbox" name="topFsrcDispYn" value="Y" checked/></label>]</th>	
+										<!-- <td><input type="text" name ="topFsrcDispOrd" value="" class="w100 aR" data-valid-type="numeric"></td> -->
+									</tr>
+									<tr>
+										<th>웹용소스</th>
+										<td colspan="5">
+											<div style="margin-top: 5px;">
+												<textarea class="textareaR4 summernote" name="fsrcPcTop" id="fsrcPcTop" rows="15" cols="95" style="width: 1280px;"></textarea>
+											</div>
+										</td>
+									</tr>
+									<tr>
+										<th>모바일용소스</th>
+										<td colspan="5">
+											<div style="margin-top: 5px;">
+												<textarea class="textareaR4 summernote" name="fsrcMobileTop" id="fsrcMobileTop" rows="15" cols="95" style="width: 1280px;"></textarea>
+											</div>
+										</td>
+									</tr>
+
+								</table>
+							</div>
+						</div>
+					</div>
+				</div>
+
 				<div class="panelContent">
 					<div class="panelStyle" style="margin: unset;">
 						<!-- TITLE -->
@@ -275,50 +319,6 @@
 					</div>
 				</div>
 
-				<div class="panelContent">
-					<div class="panelStyle" style="margin: unset;">
-						<!-- TITLE -->
-						<div class="panelTitle">
-							<h2>HTML [상단]</h2>
-							<span class="panelControl"> <i
-								class="fa inner-fa-chevron-up"></i> <!-- 열림/닫힘 화살표 -->
-							</span>
-						</div>
-						<!-- //TITLE -->
-						<div class="inner-panelContent">
-							<div class="panelContent">
-								<table class="frmStyle">
-									<colgroup>
-										<col width="10%" />
-										<col width="90%" />
-									</colgroup>
-									<tr>
-										<th>[전시여부<label class="chkBox"><input type="checkbox" name="topFsrcDispYn" value="Y" checked/></label>]</th>	
-										<!-- <td><input type="text" name ="topFsrcDispOrd" value="" class="w100 aR" data-valid-type="numeric"></td> -->
-									</tr>
-									<tr>
-										<th>웹용소스</th>
-										<td colspan="5">
-											<div style="margin-top: 5px;">
-												<textarea class="textareaR4 summernote" name="fsrcPcTop" id="fsrcPcTop" rows="15" cols="95" style="width: 1280px;"></textarea>
-											</div>
-										</td>
-									</tr>
-									<tr>
-										<th>모바일용소스</th>
-										<td colspan="5">
-											<div style="margin-top: 5px;">
-												<textarea class="textareaR4 summernote" name="fsrcMobileTop" id="fsrcMobileTop" rows="15" cols="95" style="width: 1280px;"></textarea>
-											</div>
-										</td>
-									</tr>
-
-								</table>
-							</div>
-						</div>
-					</div>
-				</div>
-
 				<div class="panelContent">
 					<div class="panelStyle" style="margin: unset;">
 						<!-- TITLE -->

+ 54 - 3
src/main/webapp/WEB-INF/views/marketing/PollListForm.html

@@ -19,7 +19,7 @@
 		</div>
 
 		<div class="panelStyle">
-			<form id="PollsearchForm" name="PollsearchForm" action="#" th:action="@{'/marketing/poll/list'}" onsubmit="$('#btnSearch').trigger('click'); return false;">
+			<form id="pollSearchForm" name="pollSearchForm" action="#" th:action="@{'/marketing/poll/list'}" onsubmit="$('#btnSearch').trigger('click'); return false;">
 			<input type="hidden" name="maskingYn" value="Y"/>
 				<table class="frmStyle">
 					<colgroup>
@@ -436,7 +436,7 @@
 
 	// 검색
 	var fnSearch = function() {
-		var formId = '#PollsearchForm';
+		var formId = '#pollSearchForm';
 		gagaAgGrid.fetch('/marketing/poll/list', gridOptionsPoll, formId);
 	}
 	
@@ -647,6 +647,36 @@
 						}
 
 					}); // 태그 끝
+					
+					if (dataList.length < 1) {
+						mcxDialog.alert('저장 할 문항이 없습니다.');
+						return;
+					}
+					if($('#registerForm input[name=stDate]').val() == '' || $('#registerForm input[name=edDate]').val() == '') {
+						mcxDialog.alert('투표 참여기간을 설정하세요.');
+						return;
+					}
+					
+					var stDate = $('#registerForm input[name=stDate]').val().replaceAll("-", "");
+					var edDate = $('#registerForm input[name=edDate]').val().replaceAll("-", "");
+
+					if (Number(stDate) > Number(edDate)) {
+						mcxDialog.alert('종료일자는 시작일자 보다 클 수 없습니다.');
+						return;
+					}
+
+					/* if (Number(stDate) < Number(toDate) && mode == 'N') {
+						mcxDialog.alert('시작일자는 오늘포함 이후로 등록해주세요.');
+						return;
+					} */
+					
+					if (fstComYn == 'Y') {
+						if (partiCnt == '' || partiCnt == null){
+							mcxDialog.alert('선착순 인원을 설정하세요.');
+							return;
+						}
+						
+					}
 
 					var jsonData = JSON.stringify(dataList);
 					gagajf.ajaxJsonSubmit('/marketing/poll/create', jsonData, function() {
@@ -710,6 +740,27 @@
 						return;
 					}
 					
+					var stDate = $('#registerForm input[name=stDate]').val().replaceAll("-", "");
+					var edDate = $('#registerForm input[name=edDate]').val().replaceAll("-", "");
+
+					if (Number(stDate) > Number(edDate)) {
+						mcxDialog.alert('종료일자는 시작일자 보다 클 수 없습니다.');
+						return;
+					}
+
+					/* if (Number(stDate) < Number(toDate) && mode == 'N') {
+						mcxDialog.alert('시작일자는 오늘포함 이후로 등록해주세요.');
+						return;
+					}
+					 */
+					if (fstComYn == 'Y') {
+						if (partiCnt == '' || partiCnt == null){
+							mcxDialog.alert('선착순 인원을 설정하세요.');
+							return;
+						}
+						
+					}
+					
 					var jsonData = JSON.stringify(dataList);
 					gagajf.ajaxJsonSubmit('/marketing/poll/create', jsonData, function() {
 						fnReset();
@@ -737,8 +788,8 @@
 	});
 
 	var fnReset = function() {
+		$('#pollSearchForm')[0].reset();
 		selectPoll = [];
-		$('#registerForm')[0].reset();
 		$('#registerForm input[name=pollSq]').val('');
 		$('#questionTable tr').each(function(index, tr) {
 

+ 1 - 1
src/main/webapp/WEB-INF/views/marketing/SocialShoppingListForm.html

@@ -661,7 +661,7 @@
 			}
 		}
 		mcxDialog.alert('상품이 적용되었습니다.');
-		uifnPopupClose('popupGoods')
+		uifnPopupClose('popupGoods');
 		gridOptionsGoods.api.setRowData(oldGoodsList);
 	}
 	

+ 13 - 58
src/main/webapp/WEB-INF/views/order/OrderDetailForm.html

@@ -70,7 +70,14 @@
 							<td th:text="${orderInfo[0].extmallNm}"></td>
 							<td th:text="${orderInfo[0].ordDt}"></td>
 							<td th:text="${orderInfo[0].ordNm}"></td>
-							<td th:text="${orderInfo[0].custNo}"></td>
+							<td>
+								<th:block th:if="${orderInfo[0].custNo} > 0">
+									<a href="script:void(0)" class="custDetailPop" th:attr="custNo=${orderInfo[0].custNo}"><th:block th:text="${orderInfo[0].custNo}"></a>
+								</th:block>
+								<th:block th:unless="${orderInfo[0].custNo} > 0">
+									<th:block th:text="${orderInfo[0].custNo}">
+								</th:block>
+							</td>
 							<td th:text="${orderInfo[0].ordNo}"></td>
 							<td th:text="${orderInfo[0].ordEmail}"></td>
 							<td th:text="${orderInfo[0].ordPhnno}"></td>
@@ -83,9 +90,6 @@
 				<!-- //TABLE -->
 									
 				<h4>주문상품정보</h4>
-				<!-- <button type="button" class="btn btnRight btn-base btn-sm off" id="btnExchange" style="margin-left:10px;" >교환요청</button> -->
-				<!-- <button type="button" class="btn btnRight btn-base btn-sm off" id="btnReturn">반품요청</button> -->
-				<!-- <button type="button" class="btn btnRight btn-base btn-sm off" id="btnCancel">취소요청</button> -->
 				<div id="gridOrderGoodsInfo" style="width:100%; height:200px;" class="ag-theme-balham"></div>
 				
 				<div id="wrapOrderFregift">
@@ -1033,62 +1037,13 @@ $(document).ready(function () {
 		$("#wrapRefund").addClass("off");
 	}
 	
-	// 
-	
-	// 5. 버튼처리
-	// G013_00	주문접수
-	// G013_10	입금대기
-	// G013_18	발주대기-가격차이
-	// G013_19	발주대기-우편번호상이
-	// G013_20	결제완료
-	// G013_30	상품준비중
-	// G013_40	배송준비중
-	// G013_50	배송중
-	// G013_55	출고완료
-	// G013_60	배송완료
-	// G013_98	결제전주문취소
-	// G013_99	결제후주문취소
-	
-	// G685_10	결제전취소
-	// G685_20	취소요청
-	// G685_21	취소완료
-	// G685_30	교환요청
-	// G685_31	교환요청취소
-	// G685_32	교환완료
-	// G685_40	반품요청
-	// G685_41	반품요청취소
-	// G685_42	반품완료
-	
-	/*
-	var addrBtnChkCnt = 0;
-	gridOptionsGoodsInfo.api.forEachNode(function (rowNode, index) {
-		
-		// 입금대기, 결제완료, 상품준비중, 배송준비중 일때 취소가능
-		if (rowNode.data.ordDtlStat == 'G013_10' || rowNode.data.ordDtlStat == 'G013_20' || rowNode.data.ordDtlStat == 'G013_30' || rowNode.data.ordDtlStat == 'G013_40') {
-			// 주문수량 > 취소수량 + 취소신청수량 클때 취소가능
-			if (rowNode.data.ordQty > (rowNode.data.cnclRtnQty + rowNode.data.ordReqChgQty)) {
-				$("#btnCancel").removeClass("off");	//취소요청	
-			}
-		}
-
-		// 배송중, 출고완료, 배송완료 일때 반품, 교환 가능
-		if ((rowNode.data.ordDtlStat == 'G013_50' || rowNode.data.ordDtlStat == 'G013_55' || rowNode.data.ordDtlStat == 'G013_60') && rowNode.data.ordQty > rowNode.data.ordReqChgQty) {
-			if (rowNode.data.ordQty > (rowNode.data.cnclRtnQty + rowNode.data.ordReqChgQty)) {
-				$("#btnReturn, #btnExchange").removeClass("off");
-			}
-		}
-		
-		// 입금대기, 결제완료, 상품준비중, 배송준비중 일때 취소가능
-		if (rowNode.data.ordDtlStat == 'G013_10' || rowNode.data.ordDtlStat == 'G013_20' || rowNode.data.ordDtlStat == 'G013_30' || rowNode.data.ordDtlStat == 'G013_40') {
-			addrBtnChkCnt++;
+	// 고객정보팝업
+	$(".custDetailPop").on("click", function(){
+		var custNo = $(this).attr("custNo");
+		if (roleCd.indexOf("C") < 0 && parseInt(custNo) > 0) {
+			cfnOpenCustDetailPopup(custNo);
 		}
 	});
-
-	// 주소변경 버튼 히든처리
-	if (addrBtnChkCnt > 0) {
-		$("#btnUpdateOrderAddr").removeClass("off");
-	}
-	*/
 });
 
 $(document).ready(function () {

+ 1 - 1
src/main/webapp/WEB-INF/views/shoplinker/ShoplinkerGoodsSendForm.html

@@ -47,7 +47,7 @@
 					<tr>
 						<th>상품코드<em class="required" title="필수"></em></th>
 						<td>
-							<input type="text" class="w130" name="goodsCd" id="goodsCd" maxlength="20" />
+							<textarea class="textareaR3 w20p" name="condition" id="condition"></textarea>
 						</td>
 
 						<th>브랜드</th>

+ 12 - 18
src/main/webapp/WEB-INF/views/shoplinker/ShoplinkerInvoiceSendForm.html

@@ -35,12 +35,11 @@
 				<table class="frmStyle">
 					<colgroup>
 						<col style="width:10%;"/>
-						<col style="width:30%;"/>
+						<col/>
 						<col style="width:10%;"/>
-						<col style="width:20%;"/>
+						<col style="width:13%;"/>
 						<col style="width:10%;"/>
-						<col style="width:20%;"/>
-						<col/>
+						<col style="width:22%;"/>
 					</colgroup>
 
 					<tr>
@@ -49,7 +48,7 @@
 					</tr>
 					<tr>
 						<th>벤더/제휴몰</th>
-						<td colspan="3">
+						<td>
 							<select name="vendorId" required="required" data-valid-name="벤더">
 								<option th:if="${vendorList}" th:each="oneData, status : ${vendorList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 							</select>/
@@ -60,7 +59,7 @@
 						</td>
 
 						<th>IF결과</th>
-						<td colspan="3">
+						<td>
 							<select name="apiResult" id="apiResult">
 								<option value="">[전체]</option>
 								<option value="true">전송완료</option>
@@ -68,19 +67,14 @@
 								<option value="error">오류</option>
 							</select>
 						</td>
-					</tr>
-					<tr>
-						<th>샵링커주문번호</th>
+						<th>키워드</th>
 						<td>
-							<input type="text" class="w150" name="agentOrderId" maxlength="20"/>
-						</td>
-						<th>쇼핑몰주문번호</th>
-						<td>
-							<input type="text" class="w150" name="extmallOrderId" maxlength="50" onkeyup="$(this).val($(this).val().toUpperCase());"/>
-						</td>
-						<th>주문번호</th>
-						<td>
-							<input type="text" class="w150" name="ordNo" maxlength="50"/>
+							<select name="search" id="search">
+								<option value="agentOrderId">샵링커주문번호</option>
+								<option value="extmallOrderId">쇼핑몰주문번호</option>
+								<option value="ordNo">스타일24주문번호</option>
+							</select>
+							<textarea class="textareaR3 w40p" name="condition" id="condition"></textarea>
 						</td>
 					</tr>
 				</table>

+ 23 - 19
src/main/webapp/WEB-INF/views/shoplinker/ShoplinkerOrderForm.html

@@ -34,11 +34,11 @@
 						<col/>
 					</colgroup>
 					<tr>
-						<th>샵링커 주문일<em class="required" title="필수"></em></th>
+						<th>샵링커 주문수집일<em class="required" title="필수"></em></th>
 						<td colspan="7">
 							<input name="apiStDate" id="apiStDate" type="text" class="w80 schDate" maxlength="10" required="required" data-valid-name="주문수집일" />
 							&nbsp;&nbsp;&nbsp;&nbsp;
-							<button th:if="${sessionInfo.userId == 'jsh77b'}" type="button" class="btn btn-primary btn-lg" id="btnCollection">주문수집</button>
+							<button th:if="${sessionInfo.userId == 'jmh'}" type="button" class="btn btn-primary btn-lg" id="btnCollection">주문수집</button>
 							&nbsp;<span class="runable_info"></span>
 						</td>
 					</tr>
@@ -66,12 +66,8 @@
 					</colgroup>
 
 					<tr>
-						<th>일자<em class="required" title="필수"></em></th>
-						<td colspan="7">
-							<select name="dtGb">
-								<option value="orderRegDate">주문수집일자</option>
-								<option value="orderdate">주문일자</option>
-							</select>
+						<th>주문수집일자<em class="required" title="필수"></em></th>
+						<td colspan="5">
 							<span id="terms">
 							</span>
 						</td>
@@ -103,17 +99,14 @@
 						</td>
 					</tr>
 					<tr>
-						<th>샵링커주문번호</th>
-						<td>
-							<input type="text" class="w150" name="shoplinkerOrderId" maxlength="20"/>
-						</td>
-						<th>쇼핑몰주문번호</th>
-						<td>
-							<input type="text" class="w150" name="mallOrderId" maxlength="50" onkeyup="$(this).val($(this).val().toUpperCase());"/>
-						</td>
-						<th>스타일24주문번호</th>
-						<td>
-							<input type="text" class="w150" name="ordNo" maxlength="50"/>
+						<th>키워드</th>
+						<td colspan="5">
+							<select name="search" id="search">
+								<option value="shoplinkerOrderId">샵링커주문번호</option>
+								<option value="mallOrderId">쇼핑몰주문번호</option>
+								<option value="ordNo">스타일24주문번호</option>
+							</select>
+							<textarea class="textareaR3 w20p" name="condition" id="condition"></textarea>
 						</td>
 					</tr>
 				</table>
@@ -383,6 +376,9 @@
 						var actionUrl = '/shoplinker/order/collection/receiveList/' + $('#apiStDate').val();
 						$.post(actionUrl, null, null, 'json');
 
+						$("#btnCollection").html("주문수집중");
+						$("#btnCollection").removeClass("btn-primary");
+						$("#btnCollection").addClass("btn-dark");
 						setTimeout(function(){
 							fnGetCallRunableInfo();
 						}, 20000 );
@@ -403,6 +399,10 @@
 			if( null != result  ){
 				if( 0 == result.runCnt){
 					// 재호출 안함.
+					$("#btnCollection").html("주문수집");
+					$("#btnCollection").addClass("btn-primary");
+					$("#btnCollection").removeClass("btn-dark");
+
 				}else{
 					// 현재 진행중
 					var resultTxt = result.txt;
@@ -410,6 +410,10 @@
 					resultTxt = resultTxt.replace("스타일24", "스타일24남은수 "+result.remainStyleCnt )
 					$(".runable_info").html(resultTxt);
 
+					$("#btnCollection").html("주문수집중");
+					$("#btnCollection").removeClass("btn-primary");
+					$("#btnCollection").addClass("btn-dark");
+
 					setTimeout(function(){
 						fnGetCallRunableInfo();
 					}, 20000 );

+ 1 - 1
src/main/webapp/WEB-INF/views/shoplinker/ShoplinkerStockForm.html

@@ -51,7 +51,7 @@
 					<tr>
 						<th>상품코드<em class="required" title="필수"></em></th>
 						<td>
-							<input type="text" class="w130" name="goodsCd" id="goodsCd" maxlength="20" />
+							<textarea class="textareaR3 w40p" name="condition" id="condition"></textarea>
 						</td>
 
 						<th>브랜드</th>