瀏覽代碼

외부몰원산지관리 추가

gagamel 5 年之前
父節點
當前提交
a968c36c29

+ 72 - 62
style24.admin/src/main/java/com/style24/admin/biz/dao/TsaOcmDao.java

@@ -1,62 +1,72 @@
-package com.style24.admin.biz.dao;
-
-import java.util.Collection;
-
-import com.style24.core.support.annotation.ShopDs;
-import com.style24.persistence.domain.Extmall;
-import com.style24.persistence.domain.ExtmallNoti;
-import com.style24.persistence.domain.ExtmallPriceSync;
-
-/**
- * 영업망관리 Dao
- *
- * @author gagamel
- * @since 2020. 11. 5
- */
-@ShopDs
-public interface TsaOcmDao {
-
-	/**
-	 * 제휴몰 목록
-	 * @param extmall - 제휴몰 정보
-	 * @return
-	 * @author gagamel
-	 * @since 2020. 11. 5
-	 */
-	Collection<Extmall> getExtmallList(Extmall extmall);
-
-	/**
-	 * 제휴몰 등록/수정
-	 * @param extmall - 제휴몰 정보
-	 * @author gagamel
-	 * @since 2020. 11. 4
-	 */
-	void saveExtmall(Extmall extmall);
-
-	/**
-	 * 제휴몰 고시정보 목록
-	 * @param extmallNoti - 제휴몰고시정보
-	 * @return
-	 * @author gagamel
-	 * @since 2020. 11. 6
-	 */
-	Collection<ExtmallNoti> getExtmallNotiinfoList(ExtmallNoti extmallNoti);
-
-	/**
-	 * 제휴몰가격연계 목록
-	 * @param extmallPriceSync - 제휴몰가격연계 정보
-	 * @return
-	 * @author gagamel
-	 * @since 2020. 11. 7
-	 */
-	Collection<ExtmallPriceSync> getExtmallPriceSyncList(ExtmallPriceSync extmallPriceSync);
-
-	/**
-	 * 제휴몰가격연계 등록/수정
-	 * @param extmallPriceSync - 제휴몰가격연계 정보
-	 * @author gagamel
-	 * @since 2020. 11. 7
-	 */
-	void saveExtmallPriceSync(ExtmallPriceSync extmallPriceSync);
-
-}
+package com.style24.admin.biz.dao;
+
+import java.util.Collection;
+
+import com.style24.core.support.annotation.ShopDs;
+import com.style24.persistence.domain.Extmall;
+import com.style24.persistence.domain.ExtmallNoti;
+import com.style24.persistence.domain.ExtmallOrigin;
+import com.style24.persistence.domain.ExtmallPriceSync;
+
+/**
+ * 영업망관리 Dao
+ *
+ * @author gagamel
+ * @since 2020. 11. 5
+ */
+@ShopDs
+public interface TsaOcmDao {
+
+	/**
+	 * 제휴몰 목록
+	 * @param extmall - 제휴몰 정보
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 5
+	 */
+	Collection<Extmall> getExtmallList(Extmall extmall);
+
+	/**
+	 * 제휴몰 등록/수정
+	 * @param extmall - 제휴몰 정보
+	 * @author gagamel
+	 * @since 2020. 11. 4
+	 */
+	void saveExtmall(Extmall extmall);
+
+	/**
+	 * 제휴몰 고시정보 목록
+	 * @param extmallNoti - 제휴몰고시정보
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 6
+	 */
+	Collection<ExtmallNoti> getExtmallNotiinfoList(ExtmallNoti extmallNoti);
+
+	/**
+	 * 제휴몰 원산지 목록
+	 * @param extmallOrigin - 제휴몰원산지 정보
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 12
+	 */
+	Collection<ExtmallOrigin> getExtmallOriginList(ExtmallOrigin extmallOrigin);
+
+	/**
+	 * 제휴몰가격연계 목록
+	 * @param extmallPriceSync - 제휴몰가격연계 정보
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 7
+	 */
+	Collection<ExtmallPriceSync> getExtmallPriceSyncList(ExtmallPriceSync extmallPriceSync);
+
+	/**
+	 * 제휴몰가격연계 등록/수정
+	 * @param extmallPriceSync - 제휴몰가격연계 정보
+	 * @author gagamel
+	 * @since 2020. 11. 7
+	 */
+	void saveExtmallPriceSync(ExtmallPriceSync extmallPriceSync);
+
+}

+ 106 - 94
style24.admin/src/main/java/com/style24/admin/biz/service/TsaOcmService.java

@@ -1,94 +1,106 @@
-package com.style24.admin.biz.service;
-
-import java.util.Collection;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import com.style24.admin.biz.dao.TsaOcmDao;
-import com.style24.admin.support.security.session.TsaSession;
-import com.style24.core.support.message.TscMessageByLocale;
-import com.style24.persistence.domain.Extmall;
-import com.style24.persistence.domain.ExtmallNoti;
-import com.style24.persistence.domain.ExtmallPriceSync;
-
-import lombok.extern.slf4j.Slf4j;
-
-/**
- * 영업망관리 Service
- *
- * @author gagamel
- * @since 2020. 11. 4
- */
-@Service
-@Slf4j
-public class TsaOcmService {
-
-	@Autowired
-	private TscMessageByLocale message;
-
-	@Autowired
-	private TsaOcmDao ocmDao;
-
-	/**
-	 * 제휴몰 목록
-	 * @param extmall - 제휴몰 정보
-	 * @return
-	 * @author gagamel
-	 * @since 2020. 11. 5
-	 */
-	public Collection<Extmall> getExtmallList(Extmall extmall) {
-		return ocmDao.getExtmallList(extmall);
-	}
-
-	/**
-	 * 제휴몰 등록/수정 처리
-	 * @param extmall - 제휴몰 정보
-	 * @author gagamel
-	 * @since 2020. 11. 5
-	 */
-	@Transactional("shopTxnManager")
-	public void saveExtmall(Extmall extmall) {
-		extmall.setRegNo(TsaSession.getInfo().getUserNo());
-		extmall.setUpdNo(TsaSession.getInfo().getUserNo());
-		ocmDao.saveExtmall(extmall);
-	}
-
-	/**
-	 * 제휴몰 고시정보 목록
-	 * @param extmallNoti - 제휴몰고시정보
-	 * @return
-	 * @author gagamel
-	 * @since 2020. 11. 6
-	 */
-	public Collection<ExtmallNoti> getExtmallNotiinfoList(ExtmallNoti extmallNoti) {
-		return ocmDao.getExtmallNotiinfoList(extmallNoti);
-	}
-
-	/**
-	 * 제휴몰가격연계 목록
-	 * @param extmallPriceSync - 제휴몰가격연계 정보
-	 * @return
-	 * @author gagamel
-	 * @since 2020. 11. 7
-	 */
-	public Collection<ExtmallPriceSync> getExtmallPriceSyncList(ExtmallPriceSync extmallPriceSync) {
-		return ocmDao.getExtmallPriceSyncList(extmallPriceSync);
-	}
-
-	/**
-	 * 제휴몰가격연계 등록/수정
-	 * @param extmallPriceSyncList - 제휴몰가격연계 목록
-	 * @author gagamel
-	 * @since 2020. 11. 7
-	 */
-	public void saveExtmallPriceSync(Collection<ExtmallPriceSync> extmallPriceSyncList) {
-		for (ExtmallPriceSync extmallPriceSync : extmallPriceSyncList) {
-			extmallPriceSync.setRegNo(TsaSession.getInfo().getUserNo());
-			extmallPriceSync.setUpdNo(TsaSession.getInfo().getUserNo());
-			ocmDao.saveExtmallPriceSync(extmallPriceSync);
-		}
-	}
-
-}
+package com.style24.admin.biz.service;
+
+import java.util.Collection;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.style24.admin.biz.dao.TsaOcmDao;
+import com.style24.admin.support.security.session.TsaSession;
+import com.style24.core.support.message.TscMessageByLocale;
+import com.style24.persistence.domain.Extmall;
+import com.style24.persistence.domain.ExtmallNoti;
+import com.style24.persistence.domain.ExtmallOrigin;
+import com.style24.persistence.domain.ExtmallPriceSync;
+
+import lombok.extern.slf4j.Slf4j;
+
+/**
+ * 영업망관리 Service
+ *
+ * @author gagamel
+ * @since 2020. 11. 4
+ */
+@Service
+@Slf4j
+public class TsaOcmService {
+
+	@Autowired
+	private TscMessageByLocale message;
+
+	@Autowired
+	private TsaOcmDao ocmDao;
+
+	/**
+	 * 제휴몰 목록
+	 * @param extmall - 제휴몰 정보
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 5
+	 */
+	public Collection<Extmall> getExtmallList(Extmall extmall) {
+		return ocmDao.getExtmallList(extmall);
+	}
+
+	/**
+	 * 제휴몰 등록/수정 처리
+	 * @param extmall - 제휴몰 정보
+	 * @author gagamel
+	 * @since 2020. 11. 5
+	 */
+	@Transactional("shopTxnManager")
+	public void saveExtmall(Extmall extmall) {
+		extmall.setRegNo(TsaSession.getInfo().getUserNo());
+		extmall.setUpdNo(TsaSession.getInfo().getUserNo());
+		ocmDao.saveExtmall(extmall);
+	}
+
+	/**
+	 * 제휴몰 고시정보 목록
+	 * @param extmallNoti - 제휴몰고시정보
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 6
+	 */
+	public Collection<ExtmallNoti> getExtmallNotiinfoList(ExtmallNoti extmallNoti) {
+		return ocmDao.getExtmallNotiinfoList(extmallNoti);
+	}
+
+	/**
+	 * 제휴몰 원산지 목록
+	 * @param extmallOrigin - 제휴몰원산지 정보
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 12
+	 */
+	public Collection<ExtmallOrigin> getExtmallOriginList(ExtmallOrigin extmallOrigin) {
+		return ocmDao.getExtmallOriginList(extmallOrigin);
+	}
+
+	/**
+	 * 제휴몰가격연계 목록
+	 * @param extmallPriceSync - 제휴몰가격연계 정보
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 7
+	 */
+	public Collection<ExtmallPriceSync> getExtmallPriceSyncList(ExtmallPriceSync extmallPriceSync) {
+		return ocmDao.getExtmallPriceSyncList(extmallPriceSync);
+	}
+
+	/**
+	 * 제휴몰가격연계 등록/수정
+	 * @param extmallPriceSyncList - 제휴몰가격연계 목록
+	 * @author gagamel
+	 * @since 2020. 11. 7
+	 */
+	public void saveExtmallPriceSync(Collection<ExtmallPriceSync> extmallPriceSyncList) {
+		for (ExtmallPriceSync extmallPriceSync : extmallPriceSyncList) {
+			extmallPriceSync.setRegNo(TsaSession.getInfo().getUserNo());
+			extmallPriceSync.setUpdNo(TsaSession.getInfo().getUserNo());
+			ocmDao.saveExtmallPriceSync(extmallPriceSync);
+		}
+	}
+
+}

+ 210 - 178
style24.admin/src/main/java/com/style24/admin/biz/web/TsaOcmController.java

@@ -1,178 +1,210 @@
-package com.style24.admin.biz.web;
-
-import java.util.Collection;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.servlet.ModelAndView;
-
-import com.style24.admin.biz.service.TsaOcmService;
-import com.style24.admin.biz.service.TsaRendererService;
-import com.style24.admin.support.controller.TsaBaseController;
-import com.style24.admin.support.security.session.TsaSession;
-import com.style24.core.support.message.TscMessageByLocale;
-import com.style24.persistence.domain.Extmall;
-import com.style24.persistence.domain.ExtmallNoti;
-import com.style24.persistence.domain.ExtmallPriceSync;
-
-import lombok.extern.slf4j.Slf4j;
-
-import com.gagaframework.web.rest.server.GagaResponse;
-
-/**
- * 영업망관리 Controller
- *
- * @author gagamel
- * @since 2020. 11. 5
- */
-@Controller
-@RequestMapping("/ocm")
-@Slf4j
-public class TsaOcmController extends TsaBaseController {
-
-	@Autowired
-	private TscMessageByLocale message;
-
-	@Autowired
-	private TsaOcmService ocmService;
-
-	@Autowired
-	private TsaRendererService rendererService;
-
-	/**
-	 * 제휴몰관리 화면
-	 * @return
-	 * @author gagamel
-	 * @since 2020. 11. 5
-	 */
-	@GetMapping("/extmall/form")
-	public ModelAndView extmallForm() {
-		ModelAndView mav = new ModelAndView();
-
-		// 제휴몰벤더
-		mav.addObject("vendorList", rendererService.getCommonCodeList("G003", "Y", TsaSession.getInfo().getSupplyCompCd()));
-
-		// 공급업체
-		mav.addObject("supplyCompList", rendererService.getSupplyCompanyList(TsaSession.getInfo().getSupplyCompCd()));
-
-		mav.setViewName("ocm/ExtmallForm");
-
-		return mav;
-	}
-
-	/**
-	 * 제휴몰 목록
-	 * @param extmall - 제휴몰 정보
-	 * @return
-	 * @author gagamel
-	 * @since 2020. 11. 5
-	 */
-	@PostMapping("/extmall/list")
-	@ResponseBody
-	public Collection<Extmall> getExtmallList(@RequestBody Extmall extmall) {
-		return ocmService.getExtmallList(extmall);
-	}
-
-	/**
-	 * 제휴몰 등록/수정 처리
-	 * @param extmall - 제휴몰 정보
-	 * @return
-	 * @author gagamel
-	 * @since 2020. 11. 5
-	 */
-	@PostMapping("/extmall/save")
-	@ResponseBody
-	public GagaResponse saveExtmall(@RequestBody Extmall extmall) {
-		ocmService.saveExtmall(extmall);
-		return super.ok(message.getMessage("SUCC_0001"));
-	}
-
-	/**
-	 * 제휴몰고시정보관리 화면
-	 * @return
-	 * @author gagamel
-	 * @since 2020. 11. 6
-	 */
-	@GetMapping("/extmall/notiinfo/form")
-	public ModelAndView extmallNotiinfoForm() {
-		ModelAndView mav = new ModelAndView();
-
-		// 제휴몰벤더
-		mav.addObject("vendorList", rendererService.getCommonCodeList("G003", "Y", TsaSession.getInfo().getSupplyCompCd()));
-
-		mav.setViewName("ocm/ExtmallNotiinfoForm");
-
-		return mav;
-	}
-
-	/**
-	 * 제휴몰고시정보 목록
-	 * @param extmallNoti - 제휴몰고시정보
-	 * @return
-	 * @author gagamel
-	 * @since 2020. 11. 6
-	 */
-	@PostMapping("/extmall/notiinfo/list")
-	@ResponseBody
-	public Collection<ExtmallNoti> getExtmallNotiinfoList(@RequestBody ExtmallNoti extmallNoti) {
-		return ocmService.getExtmallNotiinfoList(extmallNoti);
-	}
-
-	/**
-	 * 제휴몰가격연계관리 화면
-	 * @return
-	 * @author gagamel
-	 * @since 2020. 11. 7
-	 */
-	@GetMapping("/extmall/price/sync/form")
-	public ModelAndView extmallPriceSyncForm() {
-		ModelAndView mav = new ModelAndView();
-
-		// 제휴몰벤더
-		mav.addObject("vendorList", rendererService.getCommonCodeList("G003", "Y", TsaSession.getInfo().getSupplyCompCd()));
-
-		// 공급업체
-		mav.addObject("supplyCompList", rendererService.getSupplyCompanyList(TsaSession.getInfo().getSupplyCompCd()));
-
-		mav.setViewName("ocm/ExtmallPriceSyncForm");
-
-		return mav;
-	}
-
-	/**
-	 * 제휴몰가격연계 목록
-	 * @param extmallPriceSync - 제휴몰가격연계 정보
-	 * @return
-	 * @author gagamel
-	 * @since 2020. 11. 7
-	 */
-	@PostMapping("/extmall/price/sync/list")
-	@ResponseBody
-	public Collection<ExtmallPriceSync> getExtmallPriceSyncList(@RequestBody ExtmallPriceSync extmallPriceSync) {
-		return ocmService.getExtmallPriceSyncList(extmallPriceSync);
-	}
-
-	/**
-	 * 제휴몰가격연계 등록/수정 처리
-	 * @param extmallPriceSyncList - 제휴몰가격연계 목록
-	 * @return
-	 * @author gagamel
-	 * @since 2020. 11. 7
-	 */
-	@PostMapping("/extmall/price/sync/save")
-	@ResponseBody
-	public GagaResponse saveExtmallPriceSync(@RequestBody Collection<ExtmallPriceSync> extmallPriceSyncList) {
-		if (extmallPriceSyncList == null || extmallPriceSyncList.isEmpty()) {
-			throw new IllegalStateException(message.getMessage("FAIL_1001"));
-		}
-
-		ocmService.saveExtmallPriceSync(extmallPriceSyncList);
-		return super.ok(message.getMessage("SUCC_0001"));
-	}
-
-}
+package com.style24.admin.biz.web;
+
+import java.util.Collection;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+
+import com.style24.admin.biz.service.TsaOcmService;
+import com.style24.admin.biz.service.TsaRendererService;
+import com.style24.admin.support.controller.TsaBaseController;
+import com.style24.admin.support.security.session.TsaSession;
+import com.style24.core.support.message.TscMessageByLocale;
+import com.style24.persistence.domain.Extmall;
+import com.style24.persistence.domain.ExtmallNoti;
+import com.style24.persistence.domain.ExtmallOrigin;
+import com.style24.persistence.domain.ExtmallPriceSync;
+
+import lombok.extern.slf4j.Slf4j;
+
+import com.gagaframework.web.rest.server.GagaResponse;
+
+/**
+ * 영업망관리 Controller
+ *
+ * @author gagamel
+ * @since 2020. 11. 5
+ */
+@Controller
+@RequestMapping("/ocm")
+@Slf4j
+public class TsaOcmController extends TsaBaseController {
+
+	@Autowired
+	private TscMessageByLocale message;
+
+	@Autowired
+	private TsaOcmService ocmService;
+
+	@Autowired
+	private TsaRendererService rendererService;
+
+	/**
+	 * 제휴몰관리 화면
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 5
+	 */
+	@GetMapping("/extmall/form")
+	public ModelAndView extmallForm() {
+		ModelAndView mav = new ModelAndView();
+
+		// 제휴몰벤더
+		mav.addObject("vendorList", rendererService.getCommonCodeList("G003", "Y", TsaSession.getInfo().getSupplyCompCd()));
+
+		// 공급업체
+		mav.addObject("supplyCompList", rendererService.getSupplyCompanyList(TsaSession.getInfo().getSupplyCompCd()));
+
+		mav.setViewName("ocm/ExtmallForm");
+
+		return mav;
+	}
+
+	/**
+	 * 제휴몰 목록
+	 * @param extmall - 제휴몰 정보
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 5
+	 */
+	@PostMapping("/extmall/list")
+	@ResponseBody
+	public Collection<Extmall> getExtmallList(@RequestBody Extmall extmall) {
+		return ocmService.getExtmallList(extmall);
+	}
+
+	/**
+	 * 제휴몰 등록/수정 처리
+	 * @param extmall - 제휴몰 정보
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 5
+	 */
+	@PostMapping("/extmall/save")
+	@ResponseBody
+	public GagaResponse saveExtmall(@RequestBody Extmall extmall) {
+		ocmService.saveExtmall(extmall);
+		return super.ok(message.getMessage("SUCC_0001"));
+	}
+
+	/**
+	 * 제휴몰고시정보관리 화면
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 6
+	 */
+	@GetMapping("/extmall/notiinfo/form")
+	public ModelAndView extmallNotiinfoForm() {
+		ModelAndView mav = new ModelAndView();
+
+		// 제휴몰벤더
+		mav.addObject("vendorList", rendererService.getCommonCodeList("G003", "Y", TsaSession.getInfo().getSupplyCompCd()));
+
+		mav.setViewName("ocm/ExtmallNotiinfoForm");
+
+		return mav;
+	}
+
+	/**
+	 * 제휴몰고시정보 목록
+	 * @param extmallNoti - 제휴몰고시정보
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 6
+	 */
+	@PostMapping("/extmall/notiinfo/list")
+	@ResponseBody
+	public Collection<ExtmallNoti> getExtmallNotiinfoList(@RequestBody ExtmallNoti extmallNoti) {
+		return ocmService.getExtmallNotiinfoList(extmallNoti);
+	}
+
+	/**
+	 * 제휴몰원산지 화면
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 12
+	 */
+	@GetMapping("/extmall/origin/form")
+	public ModelAndView extmallOriginForm() {
+		ModelAndView mav = new ModelAndView();
+
+		// 제휴몰벤더
+		mav.addObject("vendorList", rendererService.getCommonCodeList("G003", "Y", TsaSession.getInfo().getSupplyCompCd()));
+
+		mav.setViewName("ocm/ExtmallOriginForm");
+
+		return mav;
+	}
+
+	/**
+	 * 제휴몰원산지 목록
+	 * @param extmallOrigin - 제휴몰원산지 정보
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 12
+	 */
+	@PostMapping("/extmall/origin/list")
+	@ResponseBody
+	public Collection<ExtmallOrigin> getExtmallOriginList(@RequestBody ExtmallOrigin extmallOrigin) {
+		return ocmService.getExtmallOriginList(extmallOrigin);
+	}
+
+	/**
+	 * 제휴몰가격연계관리 화면
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 7
+	 */
+	@GetMapping("/extmall/price/sync/form")
+	public ModelAndView extmallPriceSyncForm() {
+		ModelAndView mav = new ModelAndView();
+
+		// 제휴몰벤더
+		mav.addObject("vendorList", rendererService.getCommonCodeList("G003", "Y", TsaSession.getInfo().getSupplyCompCd()));
+
+		// 공급업체
+		mav.addObject("supplyCompList", rendererService.getSupplyCompanyList(TsaSession.getInfo().getSupplyCompCd()));
+
+		mav.setViewName("ocm/ExtmallPriceSyncForm");
+
+		return mav;
+	}
+
+	/**
+	 * 제휴몰가격연계 목록
+	 * @param extmallPriceSync - 제휴몰가격연계 정보
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 7
+	 */
+	@PostMapping("/extmall/price/sync/list")
+	@ResponseBody
+	public Collection<ExtmallPriceSync> getExtmallPriceSyncList(@RequestBody ExtmallPriceSync extmallPriceSync) {
+		return ocmService.getExtmallPriceSyncList(extmallPriceSync);
+	}
+
+	/**
+	 * 제휴몰가격연계 등록/수정 처리
+	 * @param extmallPriceSyncList - 제휴몰가격연계 목록
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 7
+	 */
+	@PostMapping("/extmall/price/sync/save")
+	@ResponseBody
+	public GagaResponse saveExtmallPriceSync(@RequestBody Collection<ExtmallPriceSync> extmallPriceSyncList) {
+		if (extmallPriceSyncList == null || extmallPriceSyncList.isEmpty()) {
+			throw new IllegalStateException(message.getMessage("FAIL_1001"));
+		}
+
+		ocmService.saveExtmallPriceSync(extmallPriceSyncList);
+		return super.ok(message.getMessage("SUCC_0001"));
+	}
+
+}

+ 22 - 0
style24.admin/src/main/java/com/style24/persistence/domain/ExtmallOrigin.java

@@ -0,0 +1,22 @@
+package com.style24.persistence.domain;
+
+import com.style24.persistence.TscBaseDomain;
+
+import lombok.Data;
+
+/**
+ * 외부몰원산지 Domain
+ *
+ * @author gagamel
+ * @since 2020. 11. 12
+ */
+@SuppressWarnings("serial")
+@Data
+public class ExtmallOrigin extends TscBaseDomain {
+
+	private String vendorId;
+	private String extmallOriginCd;
+	private String extmallOriginNm;
+	private String selfmallOriginNm;
+
+}

+ 159 - 141
style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaOcm.xml

@@ -1,142 +1,160 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!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.TsaOcmDao">
-
-	<!-- 외부몰 목록 -->
-	<select id="getExtmallList" parameterType="Extmall" resultType="Extmall">
-		/* TsaOcm.getExtmallList */
-		SELECT VENDOR_ID         /*벤더ID*/
-		     , EXTMALL_ID        /*외부몰ID*/
-		     , EXTMALL_USER_ID   /*외부몰사용자ID*/
-		     , EXTMALL_NM        /*외부몰명*/
-		     , SUPPLY_COMP_CD    /*업체코드*/
-		     , SELL_STORE_CD     /*판매매장코드*/
-		     , STOCK_SELL_RATE   /*재고판매비율*/
-		     , PRICE_ACCEPT_RATE /*가격차이허용율*/
-		     , DWDP_YN           /*직접회수처리여부*/
-		     , USE_YN            /*사용여부*/
-		FROM   TB_EXTMALL A
-		WHERE  1 = 1
-		<if test="vendorId != null and vendorId != ''">
-		AND    VENDOR_ID = #{vendorId}
-		</if>
-		ORDER  BY VENDOR_ID, EXTMALL_ID, EXTMALL_USER_ID
-	</select>
-	
-	<!-- 외부몰 등록/수정 -->
-	<insert id="saveExtmall" parameterType="Extmall">
-		/* TsaOcm.saveExtmall */
-		INSERT INTO TB_EXTMALL (
-		       VENDOR_ID
-		     , EXTMALL_ID
-		     , EXTMALL_USER_ID
-		     , EXTMALL_NM
-		     , SUPPLY_COMP_CD
-		     , SELL_STORE_CD
-		     , STOCK_SELL_RATE
-		     , PRICE_ACCEPT_RATE
-		     , DWDP_YN
-		     , USE_YN
-		     , REG_NO
-		     , REG_DT
-		     , UPD_NO
-		     , UPD_DT
-		)
-		VALUES (
-		       #{vendorId}
-		     , #{extmallId}
-		     , #{extmallUserId}
-		     , #{extmallNm}
-		     , #{supplyCompCd}
-		     , #{sellStoreCd}
-		     , IFNULL(#{stockSellRate},0)
-		     , IFNULL(#{priceAcceptRate},0)
-		     , #{dwdpYn}
-		     , #{useYn}
-		     , #{regNo}
-		     , NOW()
-		     , #{updNo}
-		     , NOW()
-		)
-		ON DUPLICATE KEY UPDATE
-		       EXTMALL_NM = #{extmallNm}
-		     , SUPPLY_COMP_CD = #{supplyCompCd}
-		     , SELL_STORE_CD = #{sellStoreCd}
-		     , STOCK_SELL_RATE = IFNULL(#{stockSellRate},0)
-		     , PRICE_ACCEPT_RATE = IFNULL(#{priceAcceptRate},0)
-		     , DWDP_YN = #{dwdpYn}
-		     , USE_YN = #{useYn}
-		     , UPD_NO = #{updNo}
-		     , UPD_DT = NOW()
-	</insert>
-	
-	<!-- 외부몰고시정보 목록 -->
-	<select id="getExtmallNotiinfoList" parameterType="ExtmallNoti" resultType="ExtmallNoti">
-		/* TsaOcm.getExtmallNotiinfoList */
-		SELECT A.VENDOR_ID                                 /*벤더ID*/
-		     , A.EXTMALL_NI_CLSF_CD                        /*외부몰고시정보분류코드*/
-		     , A.EXTMALL_NI_CLSF_NM                        /*외부몰고시정보분류명*/
-		     , A.EXTMALL_NI_ITEM_CD                        /*외부몰고시정보항목코드*/
-		     , A.EXTMALL_NI_ITEM_NM                        /*외부몰고시정보항목명*/
-		     , CASE WHEN A.NI_CLSF_CD IS NULL THEN
-		                NULL
-		            ELSE
-		                CONCAT('[',A.NI_CLSF_CD,'] ',B.CD_NM)
-		       END                  AS SELFMALL_NI_CLSF_NM /*자사몰정보고시분류명*/
-		     , CASE WHEN A.NI_ITEM_CD IS NULL THEN
-		                NULL
-		            ELSE
-		                CONCAT('[',A.NI_ITEM_CD,'] ',C.CD_NM)
-		       END                  AS SELFMALL_NI_ITEM_NM /*자사몰정보고시항목명*/
-		FROM   TB_EXTMALL_NOTI_INFO A
-		LEFT OUTER JOIN TB_COMMON_CODE B ON A.NI_CLSF_CD = B.CD
-		                                AND B.CD_GB = 'G004'
-		LEFT OUTER JOIN TB_COMMON_CODE C ON A.NI_ITEM_CD = C.CD
-		                                AND C.CD_GB = 'G005'
-		WHERE  A.VENDOR_ID = #{vendorId}
-		ORDER  BY A.EXTMALL_NI_CLSF_CD, A.EXTMALL_NI_ITEM_CD
-	</select>
-	
-	<!-- 외부몰가격연계 목록 -->
-	<select id="getExtmallPriceSyncList" parameterType="ExtmallPriceSync" resultType="ExtmallPriceSync">
-		/* TsaOcm.getExtmallPriceSyncList */
-		SELECT #{vendorId}           AS VENDOR_ID /*벤더ID*/
-		     , A.BRAND_CD                         /*브랜드코드*/
-		     , A.BRAND_KNM                        /*브랜드국문명*/
-		     , A.BRAND_ENM                        /*브랜드영문명*/
-		     , IFNULL(B.SYNC_YN,'N') AS SYNC_YN   /*연계여부*/
-		FROM   TB_BRAND A
-		LEFT OUTER JOIN TB_EXTMALL_PRICE_SYNC B ON A.BRAND_CD = B.BRAND_CD
-		                                       AND B.VENDOR_ID = #{vendorId}
-		WHERE  A.SELF_YN = 'Y' /*자사브랜드만*/
-		ORDER  BY 1, 2
-	</select>
-	
-	<!-- 외부몰가격연계 등록/수정 -->
-	<insert id="saveExtmallPriceSync" parameterType="ExtmallPriceSync">
-		/* TsaOcm.saveExtmallPriceSync */
-		INSERT INTO TB_EXTMALL_PRICE_SYNC (
-		       VENDOR_ID
-		     , BRAND_CD
-		     , SYNC_YN
-		     , REG_NO
-		     , REG_DT
-		     , UPD_NO
-		     , UPD_DT
-		)
-		VALUES (
-		       #{vendorId}
-		     , #{brandCd}
-		     , #{syncYn}
-		     , #{regNo}
-		     , NOW()
-		     , #{updNo}
-		     , NOW()
-		)
-		ON DUPLICATE KEY UPDATE
-		       SYNC_YN = #{syncYn}
-		     , UPD_NO = #{updNo}
-		     , UPD_DT = NOW()
-	</insert>
-	
+<?xml version="1.0" encoding="UTF-8"?>
+<!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.TsaOcmDao">
+
+	<!-- 외부몰 목록 -->
+	<select id="getExtmallList" parameterType="Extmall" resultType="Extmall">
+		/* TsaOcm.getExtmallList */
+		SELECT VENDOR_ID         /*벤더ID*/
+		     , EXTMALL_ID        /*외부몰ID*/
+		     , EXTMALL_USER_ID   /*외부몰사용자ID*/
+		     , EXTMALL_NM        /*외부몰명*/
+		     , SUPPLY_COMP_CD    /*업체코드*/
+		     , SELL_STORE_CD     /*판매매장코드*/
+		     , STOCK_SELL_RATE   /*재고판매비율*/
+		     , PRICE_ACCEPT_RATE /*가격차이허용율*/
+		     , DWDP_YN           /*직접회수처리여부*/
+		     , USE_YN            /*사용여부*/
+		FROM   TB_EXTMALL A
+		WHERE  1 = 1
+		<if test="vendorId != null and vendorId != ''">
+		AND    VENDOR_ID = #{vendorId}
+		</if>
+		ORDER  BY VENDOR_ID, EXTMALL_ID, EXTMALL_USER_ID
+	</select>
+	
+	<!-- 외부몰 등록/수정 -->
+	<insert id="saveExtmall" parameterType="Extmall">
+		/* TsaOcm.saveExtmall */
+		INSERT INTO TB_EXTMALL (
+		       VENDOR_ID
+		     , EXTMALL_ID
+		     , EXTMALL_USER_ID
+		     , EXTMALL_NM
+		     , SUPPLY_COMP_CD
+		     , SELL_STORE_CD
+		     , STOCK_SELL_RATE
+		     , PRICE_ACCEPT_RATE
+		     , DWDP_YN
+		     , USE_YN
+		     , REG_NO
+		     , REG_DT
+		     , UPD_NO
+		     , UPD_DT
+		)
+		VALUES (
+		       #{vendorId}
+		     , #{extmallId}
+		     , #{extmallUserId}
+		     , #{extmallNm}
+		     , #{supplyCompCd}
+		     , #{sellStoreCd}
+		     , IFNULL(#{stockSellRate},0)
+		     , IFNULL(#{priceAcceptRate},0)
+		     , #{dwdpYn}
+		     , #{useYn}
+		     , #{regNo}
+		     , NOW()
+		     , #{updNo}
+		     , NOW()
+		)
+		ON DUPLICATE KEY UPDATE
+		       EXTMALL_NM = #{extmallNm}
+		     , SUPPLY_COMP_CD = #{supplyCompCd}
+		     , SELL_STORE_CD = #{sellStoreCd}
+		     , STOCK_SELL_RATE = IFNULL(#{stockSellRate},0)
+		     , PRICE_ACCEPT_RATE = IFNULL(#{priceAcceptRate},0)
+		     , DWDP_YN = #{dwdpYn}
+		     , USE_YN = #{useYn}
+		     , UPD_NO = #{updNo}
+		     , UPD_DT = NOW()
+	</insert>
+	
+	<!-- 외부몰고시정보 목록 -->
+	<select id="getExtmallNotiinfoList" parameterType="ExtmallNoti" resultType="ExtmallNoti">
+		/* TsaOcm.getExtmallNotiinfoList */
+		SELECT A.VENDOR_ID                                 /*벤더ID*/
+		     , A.EXTMALL_NI_CLSF_CD                        /*외부몰고시정보분류코드*/
+		     , A.EXTMALL_NI_CLSF_NM                        /*외부몰고시정보분류명*/
+		     , A.EXTMALL_NI_ITEM_CD                        /*외부몰고시정보항목코드*/
+		     , A.EXTMALL_NI_ITEM_NM                        /*외부몰고시정보항목명*/
+		     , CASE WHEN A.NI_CLSF_CD IS NULL THEN
+		                NULL
+		            ELSE
+		                CONCAT('[',A.NI_CLSF_CD,'] ',B.CD_NM)
+		       END                  AS SELFMALL_NI_CLSF_NM /*자사몰정보고시분류명*/
+		     , CASE WHEN A.NI_ITEM_CD IS NULL THEN
+		                NULL
+		            ELSE
+		                CONCAT('[',A.NI_ITEM_CD,'] ',C.CD_NM)
+		       END                  AS SELFMALL_NI_ITEM_NM /*자사몰정보고시항목명*/
+		FROM   TB_EXTMALL_NOTI_INFO A
+		LEFT OUTER JOIN TB_COMMON_CODE B ON A.NI_CLSF_CD = B.CD
+		                                AND B.CD_GB = 'G004'
+		LEFT OUTER JOIN TB_COMMON_CODE C ON A.NI_ITEM_CD = C.CD
+		                                AND C.CD_GB = 'G005'
+		WHERE  A.VENDOR_ID = #{vendorId}
+		ORDER  BY A.EXTMALL_NI_CLSF_CD, A.EXTMALL_NI_ITEM_CD
+	</select>
+	
+	<!-- 외부몰원산지 목록 -->
+	<select id="getExtmallOriginList" parameterType="ExtmallOrigin" resultType="ExtmallOrigin">
+		/* TsaOcm.getExtmallOriginList */
+		SELECT A.VENDOR_ID                                /*벤더ID*/
+		     , A.EXTMALL_ORIGIN_CD                        /*외부몰원산지코드*/
+		     , A.EXTMALL_ORIGIN_NM                        /*외부몰원산지명*/
+		     , CASE WHEN A.ORIGIN_CD IS NULL THEN
+		                NULL
+		            ELSE
+		                CONCAT('[',A.ORIGIN_CD,'] ',B.CD_NM)
+		       END                  AS SELFMALL_ORIGIN_NM /*자사몰원산지명*/
+		FROM   TB_EXTMALL_ORIGIN A
+		LEFT OUTER JOIN TB_COMMON_CODE B ON A.ORIGIN_CD = B.CD
+		                                AND B.CD_GB = 'G076'
+		WHERE  A.VENDOR_ID = #{vendorId}
+		ORDER  BY A.EXTMALL_ORIGIN_NM
+	</select>
+	
+	<!-- 외부몰가격연계 목록 -->
+	<select id="getExtmallPriceSyncList" parameterType="ExtmallPriceSync" resultType="ExtmallPriceSync">
+		/* TsaOcm.getExtmallPriceSyncList */
+		SELECT #{vendorId}           AS VENDOR_ID /*벤더ID*/
+		     , A.BRAND_CD                         /*브랜드코드*/
+		     , A.BRAND_KNM                        /*브랜드국문명*/
+		     , A.BRAND_ENM                        /*브랜드영문명*/
+		     , IFNULL(B.SYNC_YN,'N') AS SYNC_YN   /*연계여부*/
+		FROM   TB_BRAND A
+		LEFT OUTER JOIN TB_EXTMALL_PRICE_SYNC B ON A.BRAND_CD = B.BRAND_CD
+		                                       AND B.VENDOR_ID = #{vendorId}
+		WHERE  A.SELF_YN = 'Y' /*자사브랜드만*/
+		ORDER  BY 1, 2
+	</select>
+	
+	<!-- 외부몰가격연계 등록/수정 -->
+	<insert id="saveExtmallPriceSync" parameterType="ExtmallPriceSync">
+		/* TsaOcm.saveExtmallPriceSync */
+		INSERT INTO TB_EXTMALL_PRICE_SYNC (
+		       VENDOR_ID
+		     , BRAND_CD
+		     , SYNC_YN
+		     , REG_NO
+		     , REG_DT
+		     , UPD_NO
+		     , UPD_DT
+		)
+		VALUES (
+		       #{vendorId}
+		     , #{brandCd}
+		     , #{syncYn}
+		     , #{regNo}
+		     , NOW()
+		     , #{updNo}
+		     , NOW()
+		)
+		ON DUPLICATE KEY UPDATE
+		       SYNC_YN = #{syncYn}
+		     , UPD_NO = #{updNo}
+		     , UPD_DT = NOW()
+	</insert>
+	
 </mapper>

+ 104 - 0
style24.admin/src/main/webapp/WEB-INF/views/ocm/ExtmallOriginForm.html

@@ -0,0 +1,104 @@
+<!DOCTYPE html>
+<html lang="ko"
+	xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : ExtmallOriginForm.html
+ * @desc    : 제휴몰고시정보관리 Page
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2020 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2020.11.06   gagamel     최초 작성
+ *******************************************************************************
+ -->
+	<div id="main">
+		<!-- 메인타이틀 영역 -->
+		<div class="main-title">
+		</div>
+		<!-- //메인타이틀 영역 -->
+		
+		<!-- 메뉴 설명 -->
+		<div class="infoBox menu-desc">
+		</div>
+		<!-- //메뉴 설명 -->
+		
+		<!-- 검색조건 영역 -->
+		<div class="panelStyle">
+			<form id="searchForm" name="searchForm" action="#" th:action="@{'/ocm/extmall/origin/list'}" onsubmit="$('#btnSearch').trigger('click'); return false;">
+				<table class="frmStyle" aria-describedby="검색조건">
+					<colgroup>
+						<col style="width:10%;"/>
+						<col/>
+					</colgroup>
+					<tr>
+						<th>제휴몰벤더</th>
+						<td>
+							<select name="vendorId">
+								<option th:if="${vendorList}" th:each="oneData, status : ${vendorList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+					</tr>
+				</table>
+				
+				<ul class="panelBar">
+					<li class="center">
+						<button type="button" class="btn btn-base btn-lg" id="btnSearch">조회</button>
+						<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">
+					<button type="button" class="btn btn-default btn-lg" id="btnExcel">엑셀다운로드</button>
+				</li>
+			</ul>
+			<!-- //버튼 배치 영역 -->
+			
+			<div id="gridList" style="width: 100%; height: 570px" class="ag-theme-balham"></div>
+		</div>
+		<!-- //리스트 영역 -->
+	</div>
+
+<script th:inline="javascript">
+/*<![CDATA[*/
+	let vendorList = gagajf.convertToArray([[${vendorList}]]);
+
+	let columnDefs = [
+		{
+			headerName: "제휴몰벤더", field: "vendorId", width: 200, cellClass: 'text-center',
+			valueGetter: function (params) { return gagaAgGrid.lookupValue(vendorList, params.data.vendorId); }
+		},
+		{headerName: "제휴몰원산지코드", field: "extmallOriginCd", width: 200, cellClass: 'text-center'},
+		{headerName: "제휴몰원산지명", field: "extmallOriginNm", width: 200, cellClass: 'text-center'},
+		{headerName: "자사몰원산지", field: "selfmallOriginNm", width: 200, cellClass: 'text-center'}
+	];
+
+	let gridOptions = gagaAgGrid.getGridOptions(columnDefs);
+
+	// 검색
+	$('#btnSearch').on('click', function() {
+		gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm');
+	});
+	
+	// 엑셀다운로드
+	$('#btnExcel').on('click', function() {
+		gagaAgGrid.exportToExcel('제휴몰원산지 목록', gridOptions);
+	});
+
+	$(document).ready(function() {
+		// Create a agGrid
+		gagaAgGrid.createGrid('gridList', gridOptions);
+	});
+/*]]>*/
+</script>
+
+</html>