|
@@ -1,26 +1,40 @@
|
|
|
package com.style24.admin.biz.web;
|
|
package com.style24.admin.biz.web;
|
|
|
|
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
|
+import java.util.Collection;
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+import java.io.InputStream;
|
|
|
|
|
+import java.lang.reflect.Array;
|
|
|
|
|
+import java.lang.reflect.Type;
|
|
|
|
|
+
|
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.core.env.Environment;
|
|
|
|
|
+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.RequestParam;
|
|
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
+import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
+
|
|
|
import com.fasterxml.jackson.core.type.TypeReference;
|
|
import com.fasterxml.jackson.core.type.TypeReference;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
-import com.gagaframework.web.parameter.GagaMap;
|
|
|
|
|
-import com.gagaframework.web.rest.server.GagaResponse;
|
|
|
|
|
import com.style24.admin.biz.service.*;
|
|
import com.style24.admin.biz.service.*;
|
|
|
import com.style24.admin.support.controller.TsaBaseController;
|
|
import com.style24.admin.support.controller.TsaBaseController;
|
|
|
import com.style24.admin.support.security.session.TsaSession;
|
|
import com.style24.admin.support.security.session.TsaSession;
|
|
|
import com.style24.core.support.message.TscMessageByLocale;
|
|
import com.style24.core.support.message.TscMessageByLocale;
|
|
|
import com.style24.persistence.TsaPageRequest;
|
|
import com.style24.persistence.TsaPageRequest;
|
|
|
import com.style24.persistence.domain.*;
|
|
import com.style24.persistence.domain.*;
|
|
|
|
|
+
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
-import org.springframework.core.env.Environment;
|
|
|
|
|
-import org.springframework.stereotype.Controller;
|
|
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
|
|
-import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
|
|
|
|
-import java.lang.reflect.Array;
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
|
|
-import java.util.Collection;
|
|
|
|
|
-import java.util.List;
|
|
|
|
|
|
|
+import com.gagaframework.web.parameter.GagaMap;
|
|
|
|
|
+import com.gagaframework.web.rest.server.GagaResponse;
|
|
|
|
|
+import com.google.gson.Gson;
|
|
|
|
|
+import com.google.gson.JsonElement;
|
|
|
|
|
+import com.google.gson.reflect.TypeToken;
|
|
|
/**
|
|
/**
|
|
|
* 마케팅 Controller
|
|
* 마케팅 Controller
|
|
|
* @author xodud1202
|
|
* @author xodud1202
|
|
@@ -81,7 +95,7 @@ public class TsaMarketingController extends TsaBaseController {
|
|
|
public GagaMap getFreeGoodsPromotionList(@RequestBody FreeGoodsPromotion param) {
|
|
public GagaMap getFreeGoodsPromotionList(@RequestBody FreeGoodsPromotion param) {
|
|
|
GagaMap result = new GagaMap();
|
|
GagaMap result = new GagaMap();
|
|
|
|
|
|
|
|
- List<FreeGoodsPromotion> marketingList = (ArrayList<FreeGoodsPromotion>) marketingService.getFreeGoodsPromotionList(param);
|
|
|
|
|
|
|
+ List<FreeGoodsPromotion> marketingList = (ArrayList<FreeGoodsPromotion>)marketingService.getFreeGoodsPromotionList(param);
|
|
|
|
|
|
|
|
param.setRegNo(TsaSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
|
|
param.setRegNo(TsaSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
|
|
|
param.setPageable(new TsaPageRequest(param.getPageNo() - 1, param.getPageSize()));
|
|
param.setPageable(new TsaPageRequest(param.getPageNo() - 1, param.getPageSize()));
|
|
@@ -124,15 +138,15 @@ public class TsaMarketingController extends TsaBaseController {
|
|
|
* @since 2020-12-21
|
|
* @since 2020-12-21
|
|
|
*/
|
|
*/
|
|
|
@GetMapping("/coupon/form")
|
|
@GetMapping("/coupon/form")
|
|
|
- public ModelAndView couponListForm(){
|
|
|
|
|
|
|
+ public ModelAndView couponListForm() {
|
|
|
ModelAndView mav = new ModelAndView();
|
|
ModelAndView mav = new ModelAndView();
|
|
|
|
|
|
|
|
// 쿠폰 유형 조회
|
|
// 쿠폰 유형 조회
|
|
|
- mav.addObject("cpnTypeList" , rendererService.getCommonCodeList("G230"));
|
|
|
|
|
|
|
+ mav.addObject("cpnTypeList", rendererService.getCommonCodeList("G230"));
|
|
|
// 할인 유형 조회
|
|
// 할인 유형 조회
|
|
|
- mav.addObject("dcWayList" , rendererService.getCommonCodeList("G240"));
|
|
|
|
|
|
|
+ mav.addObject("dcWayList", rendererService.getCommonCodeList("G240"));
|
|
|
// 사이트 조회
|
|
// 사이트 조회
|
|
|
- mav.addObject("siteCdList" , rendererService.getCommonCodeList("G000"));
|
|
|
|
|
|
|
+ mav.addObject("siteCdList", rendererService.getCommonCodeList("G000"));
|
|
|
// 사용가능 고객구분 조회
|
|
// 사용가능 고객구분 조회
|
|
|
mav.addObject("usableCustGbList", rendererService.getCommonCodeList("G100"));
|
|
mav.addObject("usableCustGbList", rendererService.getCommonCodeList("G100"));
|
|
|
|
|
|
|
@@ -150,8 +164,8 @@ public class TsaMarketingController extends TsaBaseController {
|
|
|
*/
|
|
*/
|
|
|
@PostMapping("/coupon/list")
|
|
@PostMapping("/coupon/list")
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
- public GagaMap getCouponList(@RequestBody Coupon param){
|
|
|
|
|
- GagaMap result = new GagaMap();
|
|
|
|
|
|
|
+ public GagaMap getCouponList(@RequestBody Coupon param) {
|
|
|
|
|
+ GagaMap result = new GagaMap();
|
|
|
|
|
|
|
|
ArrayList<Coupon> cpnList = couponService.getCouponList(param);
|
|
ArrayList<Coupon> cpnList = couponService.getCouponList(param);
|
|
|
int cpnTotCnt = couponService.getCouponListCnt(param);
|
|
int cpnTotCnt = couponService.getCouponListCnt(param);
|
|
@@ -160,9 +174,9 @@ public class TsaMarketingController extends TsaBaseController {
|
|
|
param.setPageable(new TsaPageRequest(param.getPageNo() - 1, param.getPageSize()));
|
|
param.setPageable(new TsaPageRequest(param.getPageNo() - 1, param.getPageSize()));
|
|
|
param.getPageable().setTotalCount(cpnTotCnt);
|
|
param.getPageable().setTotalCount(cpnTotCnt);
|
|
|
|
|
|
|
|
- result.set("pageing" , param);
|
|
|
|
|
- result.set("cpnTotCnt" , cpnTotCnt);
|
|
|
|
|
- result.set("cpnList" , cpnList);
|
|
|
|
|
|
|
+ result.set("pageing", param);
|
|
|
|
|
+ result.set("cpnTotCnt", cpnTotCnt);
|
|
|
|
|
+ result.set("cpnList", cpnList);
|
|
|
|
|
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
@@ -181,10 +195,10 @@ public class TsaMarketingController extends TsaBaseController {
|
|
|
|
|
|
|
|
// 일시 시 리스트 세팅
|
|
// 일시 시 리스트 세팅
|
|
|
Collection<CommonCode> hhList = new ArrayList<CommonCode>();
|
|
Collection<CommonCode> hhList = new ArrayList<CommonCode>();
|
|
|
- for(int i = 0; i < 24; i++) {
|
|
|
|
|
|
|
+ for (int i = 0; i < 24; i++) {
|
|
|
num = "";
|
|
num = "";
|
|
|
CommonCode temp = new CommonCode();
|
|
CommonCode temp = new CommonCode();
|
|
|
- if(i < 10) {
|
|
|
|
|
|
|
+ if (i < 10) {
|
|
|
num = "0" + i;
|
|
num = "0" + i;
|
|
|
} else {
|
|
} else {
|
|
|
num = String.valueOf(i);
|
|
num = String.valueOf(i);
|
|
@@ -195,50 +209,50 @@ public class TsaMarketingController extends TsaBaseController {
|
|
|
mav.addObject("goodsStatList", rendererService.getCommonCodeList("G008", "Y", exceptCds));
|
|
mav.addObject("goodsStatList", rendererService.getCommonCodeList("G008", "Y", exceptCds));
|
|
|
|
|
|
|
|
temp.setCd(num);
|
|
temp.setCd(num);
|
|
|
- temp.setCdNm(num+"시");
|
|
|
|
|
|
|
+ temp.setCdNm(num + "시");
|
|
|
|
|
|
|
|
hhList.add(temp);
|
|
hhList.add(temp);
|
|
|
}
|
|
}
|
|
|
// 일시 분 리스트 세팅
|
|
// 일시 분 리스트 세팅
|
|
|
Collection<CommonCode> mmList = new ArrayList<CommonCode>();
|
|
Collection<CommonCode> mmList = new ArrayList<CommonCode>();
|
|
|
- for(int i = 0 ; i < 60; i++) {
|
|
|
|
|
|
|
+ for (int i = 0; i < 60; i++) {
|
|
|
num = "";
|
|
num = "";
|
|
|
CommonCode temp = new CommonCode();
|
|
CommonCode temp = new CommonCode();
|
|
|
- if(i < 10) {
|
|
|
|
|
|
|
+ if (i < 10) {
|
|
|
num = "0" + i;
|
|
num = "0" + i;
|
|
|
} else {
|
|
} else {
|
|
|
num = String.valueOf(i);
|
|
num = String.valueOf(i);
|
|
|
}
|
|
}
|
|
|
temp.setCd(num);
|
|
temp.setCd(num);
|
|
|
- temp.setCdNm(num+"분");
|
|
|
|
|
|
|
+ temp.setCdNm(num + "분");
|
|
|
|
|
|
|
|
mmList.add(temp);
|
|
mmList.add(temp);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 쿠폰 유형 조회
|
|
// 쿠폰 유형 조회
|
|
|
- mav.addObject("cpnTypeList" , rendererService.getCommonCodeList("G230"));
|
|
|
|
|
|
|
+ mav.addObject("cpnTypeList", rendererService.getCommonCodeList("G230"));
|
|
|
// 사용가능 고객구분 조회
|
|
// 사용가능 고객구분 조회
|
|
|
mav.addObject("usableCustGbList", rendererService.getCommonCodeList("G100"));
|
|
mav.addObject("usableCustGbList", rendererService.getCommonCodeList("G100"));
|
|
|
// 사용가능 고객등급 조회
|
|
// 사용가능 고객등급 조회
|
|
|
mav.addObject("usableCustGradeList", rendererService.getCommonCodeList("G101"));
|
|
mav.addObject("usableCustGradeList", rendererService.getCommonCodeList("G101"));
|
|
|
// 사이트코드 조회
|
|
// 사이트코드 조회
|
|
|
- mav.addObject("siteCdList" , rendererService.getCommonCodeList("G000"));
|
|
|
|
|
|
|
+ mav.addObject("siteCdList", rendererService.getCommonCodeList("G000"));
|
|
|
// 재발급 여부 조회
|
|
// 재발급 여부 조회
|
|
|
- mav.addObject("reissuanceList" , rendererService.getCommonCodeList("G231"));
|
|
|
|
|
|
|
+ mav.addObject("reissuanceList", rendererService.getCommonCodeList("G231"));
|
|
|
// 할인방식 조회
|
|
// 할인방식 조회
|
|
|
- mav.addObject("dcWayList" , rendererService.getCommonCodeList("G240"));
|
|
|
|
|
|
|
+ mav.addObject("dcWayList", rendererService.getCommonCodeList("G240"));
|
|
|
// 쿠폰다운로드 방식 조회
|
|
// 쿠폰다운로드 방식 조회
|
|
|
- mav.addObject("dnGbList" , rendererService.getCommonCodeList("G058"));
|
|
|
|
|
|
|
+ mav.addObject("dnGbList", rendererService.getCommonCodeList("G058"));
|
|
|
// 결제수단 조회
|
|
// 결제수단 조회
|
|
|
- mav.addObject("payTypeList" , rendererService.getCommonCodeList("G015"));
|
|
|
|
|
|
|
+ mav.addObject("payTypeList", rendererService.getCommonCodeList("G015"));
|
|
|
// 쿠폰상태 조회
|
|
// 쿠폰상태 조회
|
|
|
- mav.addObject("cpnStatList" , rendererService.getCommonCodeList("G232"));
|
|
|
|
|
|
|
+ mav.addObject("cpnStatList", rendererService.getCommonCodeList("G232"));
|
|
|
// 시간 분 리스트 세팅
|
|
// 시간 분 리스트 세팅
|
|
|
- mav.addObject("mmList" , mmList);
|
|
|
|
|
|
|
+ mav.addObject("mmList", mmList);
|
|
|
// 시간 시 리스트 세팅
|
|
// 시간 시 리스트 세팅
|
|
|
- mav.addObject("hhList" , hhList);
|
|
|
|
|
|
|
+ mav.addObject("hhList", hhList);
|
|
|
// 입점업체 조회
|
|
// 입점업체 조회
|
|
|
- mav.addObject("ibSupplyCompList" , rendererService.getSupplyCompanyList("","N"));
|
|
|
|
|
|
|
+ mav.addObject("ibSupplyCompList", rendererService.getSupplyCompanyList("", "N"));
|
|
|
|
|
|
|
|
mav.setViewName("marketing/CouponCreatePopupForm");
|
|
mav.setViewName("marketing/CouponCreatePopupForm");
|
|
|
return mav;
|
|
return mav;
|
|
@@ -254,7 +268,7 @@ public class TsaMarketingController extends TsaBaseController {
|
|
|
@PostMapping("/coupon/save")
|
|
@PostMapping("/coupon/save")
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
public GagaResponse couponSave(@RequestBody Coupon coupon) {
|
|
public GagaResponse couponSave(@RequestBody Coupon coupon) {
|
|
|
- log.info("couponSave : {}" , coupon);
|
|
|
|
|
|
|
+ log.info("couponSave : {}", coupon);
|
|
|
|
|
|
|
|
couponService.couponSave(coupon);
|
|
couponService.couponSave(coupon);
|
|
|
|
|
|
|
@@ -286,7 +300,7 @@ public class TsaMarketingController extends TsaBaseController {
|
|
|
public GagaMap getMorebetterList(@RequestBody MoreBetter param) {
|
|
public GagaMap getMorebetterList(@RequestBody MoreBetter param) {
|
|
|
GagaMap result = new GagaMap();
|
|
GagaMap result = new GagaMap();
|
|
|
|
|
|
|
|
- List<MoreBetter> tmtbList = (ArrayList<MoreBetter>) morebetterService.getMorebetterList(param);
|
|
|
|
|
|
|
+ List<MoreBetter> tmtbList = (ArrayList<MoreBetter>)morebetterService.getMorebetterList(param);
|
|
|
|
|
|
|
|
param.setRegNo(TsaSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
|
|
param.setRegNo(TsaSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
|
|
|
param.setPageable(new TsaPageRequest(param.getPageNo() - 1, param.getPageSize()));
|
|
param.setPageable(new TsaPageRequest(param.getPageNo() - 1, param.getPageSize()));
|
|
@@ -307,8 +321,8 @@ public class TsaMarketingController extends TsaBaseController {
|
|
|
* @since 2020. 12. 29
|
|
* @since 2020. 12. 29
|
|
|
*/
|
|
*/
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
- @GetMapping("/morebetterRegPopup/form")
|
|
|
|
|
- public ModelAndView morebetterRegForm(@RequestParam(value = "mode") String mode, @RequestParam(value = "tmtbSeq", required = false) Integer tmtbSeq,MoreBetter tmtb) {
|
|
|
|
|
|
|
+ @GetMapping("/morebetterPopup/form")
|
|
|
|
|
+ public ModelAndView morebetterRegForm(@RequestParam(value = "mode") String mode, @RequestParam(value = "tmtbSeq", required = false) Integer tmtbSeq,MoreBetter moreBetter) {
|
|
|
ModelAndView mav = new ModelAndView();
|
|
ModelAndView mav = new ModelAndView();
|
|
|
|
|
|
|
|
// 상품상태 : 등록일때는 '대기'
|
|
// 상품상태 : 등록일때는 '대기'
|
|
@@ -322,7 +336,7 @@ public class TsaMarketingController extends TsaBaseController {
|
|
|
mav.addObject("dcWayList", rendererService.getAvailCommonCodeList("G240"));
|
|
mav.addObject("dcWayList", rendererService.getAvailCommonCodeList("G240"));
|
|
|
|
|
|
|
|
// 적용 상품구분 목록
|
|
// 적용 상품구분 목록
|
|
|
- String[] exceptGoodsCds = {"G800_30","G800_40"};
|
|
|
|
|
|
|
+ String[] exceptGoodsCds = {"G800_30", "G800_40"};
|
|
|
mav.addObject("applyGoodsGbList", rendererService.getCommonCodeList("G800", "Y", exceptGoodsCds));
|
|
mav.addObject("applyGoodsGbList", rendererService.getCommonCodeList("G800", "Y", exceptGoodsCds));
|
|
|
|
|
|
|
|
// 제외 상품구분 목록
|
|
// 제외 상품구분 목록
|
|
@@ -335,19 +349,19 @@ public class TsaMarketingController extends TsaBaseController {
|
|
|
Integer tmtbSq;
|
|
Integer tmtbSq;
|
|
|
if("N".equals(mode)){
|
|
if("N".equals(mode)){
|
|
|
tmtbSq = commonService.getNextSequence("SEQ_TMTB");
|
|
tmtbSq = commonService.getNextSequence("SEQ_TMTB");
|
|
|
- tmtb.setTmtbSq(tmtbSq);
|
|
|
|
|
|
|
+ moreBetter.setTmtbSq(tmtbSq);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if("U".equals(mode)){
|
|
|
|
|
|
|
+ if ("U".equals(mode)) {
|
|
|
// 다다익선 정보
|
|
// 다다익선 정보
|
|
|
mav.addObject("tmtbMstInfo", morebetterService.getMorebetterMstInfo(tmtbSeq));
|
|
mav.addObject("tmtbMstInfo", morebetterService.getMorebetterMstInfo(tmtbSeq));
|
|
|
- mav.addObject("tmtbSupplyCompList", morebetterService.getMorebetterSupplyCompList(tmtbSeq,"G260_13"));
|
|
|
|
|
- mav.addObject("tmtbBrandList", morebetterService.getMorebetterBrandList(tmtbSeq,"G260_12"));
|
|
|
|
|
- mav.addObject("tmtbApplyGoodsList", morebetterService.getMorebetterApplyGoodsList(tmtbSeq,"G260_10"));
|
|
|
|
|
- mav.addObject("tmtbExceptGoodsList", morebetterService.getMorebetterExceptGoodsList(tmtbSeq,"G260_10"));
|
|
|
|
|
|
|
+ mav.addObject("tmtbSupplyCompList", morebetterService.getMorebetterSupplyCompList(tmtbSeq, "G260_13"));
|
|
|
|
|
+ mav.addObject("tmtbBrandList", morebetterService.getMorebetterBrandList(tmtbSeq, "G260_12"));
|
|
|
|
|
+ mav.addObject("tmtbApplyGoodsList", morebetterService.getMorebetterApplyGoodsList(tmtbSeq, "G260_10"));
|
|
|
|
|
+ mav.addObject("tmtbExceptGoodsList", morebetterService.getMorebetterExceptGoodsList(tmtbSeq, "G260_10"));
|
|
|
mav.addObject("tmtbSectionValList", morebetterService.getMorebetterSectionValList(tmtbSeq));
|
|
mav.addObject("tmtbSectionValList", morebetterService.getMorebetterSectionValList(tmtbSeq));
|
|
|
mav.addObject("tmtbBurdenList", morebetterService.getMorebetterBurdenList(tmtbSeq));
|
|
mav.addObject("tmtbBurdenList", morebetterService.getMorebetterBurdenList(tmtbSeq));
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
mav.addObject("tmtbMstInfo", new MoreBetter());
|
|
mav.addObject("tmtbMstInfo", new MoreBetter());
|
|
|
mav.addObject("tmtbSupplyCompList", new MoreBetterGoods());
|
|
mav.addObject("tmtbSupplyCompList", new MoreBetterGoods());
|
|
|
mav.addObject("tmtbBrandList", new MoreBetterGoods());
|
|
mav.addObject("tmtbBrandList", new MoreBetterGoods());
|
|
@@ -359,9 +373,9 @@ public class TsaMarketingController extends TsaBaseController {
|
|
|
|
|
|
|
|
mav.addObject("mode", mode);
|
|
mav.addObject("mode", mode);
|
|
|
mav.addObject("tmtbSeq", tmtbSeq);
|
|
mav.addObject("tmtbSeq", tmtbSeq);
|
|
|
- mav.addObject("params", tmtb);
|
|
|
|
|
- log.info("CHECK param tmtbSq::{}", tmtb.getTmtbSq());
|
|
|
|
|
- mav.setViewName("marketing/MorebetterRegForm");
|
|
|
|
|
|
|
+ mav.addObject("params", moreBetter);
|
|
|
|
|
+ log.info("CHECK param tmtbSq::{}", moreBetter.getTmtbSq());
|
|
|
|
|
+ mav.setViewName("marketing/MorebetterPopupForm");
|
|
|
return mav;
|
|
return mav;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -375,85 +389,8 @@ public class TsaMarketingController extends TsaBaseController {
|
|
|
*/
|
|
*/
|
|
|
@PostMapping("/morebetter/save")
|
|
@PostMapping("/morebetter/save")
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
- public GagaResponse saveMorebetterDetail(@RequestBody MoreBetter tmtb) {
|
|
|
|
|
- Collection<MoreBetterGoods> tmtbSupplyCompList = null;
|
|
|
|
|
- Collection<MoreBetterGoods> tmtbBrandList = null;
|
|
|
|
|
- Collection<MoreBetterGoods> tmtbApplyGoodsList = null;
|
|
|
|
|
- Collection<MoreBetterGoods> tmtbExceptGoodsList = null;
|
|
|
|
|
- Collection<MoreBetterBurden> tmtbBurdenList = null;
|
|
|
|
|
- Collection<MoreBetterSection> tmtbSectionGbList = null;
|
|
|
|
|
- ObjectMapper mapper = new ObjectMapper();
|
|
|
|
|
-
|
|
|
|
|
- // 공급업체
|
|
|
|
|
- try {
|
|
|
|
|
- if (tmtb.getSupplyCompList() != null) {
|
|
|
|
|
- tmtbSupplyCompList = mapper.readValue(tmtb.getSupplyCompList(), new TypeReference<Collection<MoreBetterGoods>>() {
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- } catch (Exception e) {
|
|
|
|
|
- e.printStackTrace();
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 브랜드
|
|
|
|
|
- try {
|
|
|
|
|
- if (tmtb.getBrandList() != null) {
|
|
|
|
|
- tmtbBrandList = mapper.readValue(tmtb.getBrandList(), new TypeReference<Collection<MoreBetterGoods>>() {
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- } catch (Exception e) {
|
|
|
|
|
- e.printStackTrace();
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 적용상품
|
|
|
|
|
- try {
|
|
|
|
|
- if (tmtb.getApplyGoodsList() != null) {
|
|
|
|
|
- tmtbApplyGoodsList = mapper.readValue(tmtb.getApplyGoodsList(), new TypeReference<Collection<MoreBetterGoods>>() {
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- } catch (Exception e) {
|
|
|
|
|
- e.printStackTrace();
|
|
|
|
|
- }
|
|
|
|
|
- // 적용상품
|
|
|
|
|
- try {
|
|
|
|
|
- if (tmtb.getExceptGoodsList() != null) {
|
|
|
|
|
- tmtbExceptGoodsList = mapper.readValue(tmtb.getExceptGoodsList(), new TypeReference<Collection<MoreBetterGoods>>() {
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- } catch (Exception e) {
|
|
|
|
|
- e.printStackTrace();
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 할인구간
|
|
|
|
|
- try {
|
|
|
|
|
- if (tmtb.getSectionGbList() != null) {
|
|
|
|
|
- tmtbSectionGbList = mapper.readValue(tmtb.getSectionGbList(), new TypeReference<Collection<MoreBetterSection>>() {
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- } catch (Exception e) {
|
|
|
|
|
- e.printStackTrace();
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 업체분담율
|
|
|
|
|
- try {
|
|
|
|
|
- if (tmtb.getBurdenList() != null) {
|
|
|
|
|
- tmtbBurdenList = mapper.readValue(tmtb.getBurdenList(), new TypeReference<Collection<MoreBetterBurden>>() {
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- } catch (Exception e) {
|
|
|
|
|
- e.printStackTrace();
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- log.info("tmtb::{}", tmtb);
|
|
|
|
|
-
|
|
|
|
|
- tmtb.setSupplyCompListNew(tmtbSupplyCompList);
|
|
|
|
|
- tmtb.setBrandListNew(tmtbBrandList);
|
|
|
|
|
- tmtb.setApplyGoodsListNew(tmtbApplyGoodsList);
|
|
|
|
|
- tmtb.setExceptGoodsListNew(tmtbExceptGoodsList);
|
|
|
|
|
- tmtb.setSectionGbListNew(tmtbSectionGbList);
|
|
|
|
|
- tmtb.setBurdenListNew(tmtbBurdenList);
|
|
|
|
|
-
|
|
|
|
|
- morebetterService.saveMoreBetterDetail(tmtb);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ public GagaResponse saveMorebetterDetail(@RequestBody MoreBetter moreBetter) {
|
|
|
|
|
+ morebetterService.saveMoreBetterDetail(moreBetter);
|
|
|
return super.ok(message.getMessage("SUCC_0001"));
|
|
return super.ok(message.getMessage("SUCC_0001"));
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
@@ -546,4 +483,52 @@ public class TsaMarketingController extends TsaBaseController {
|
|
|
return super.ok(message.getMessage("SUCC_0003"));
|
|
return super.ok(message.getMessage("SUCC_0003"));
|
|
|
}
|
|
}
|
|
|
/* // CSB 진행 */
|
|
/* // CSB 진행 */
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 쿠폰조회 팝업
|
|
|
|
|
+ * @param returnCode - 반환할코드. 필수
|
|
|
|
|
+ * @param returnName - 반환할명칭. 필수
|
|
|
|
|
+ * @param cpnNm - 쿠폰명. 옵션
|
|
|
|
|
+ * @return
|
|
|
|
|
+ * @author gagamel
|
|
|
|
|
+ * @since 2021. 1. 8
|
|
|
|
|
+ */
|
|
|
|
|
+ @GetMapping("/coupon/retrieve/form")
|
|
|
|
|
+ @ResponseBody
|
|
|
|
|
+ public ModelAndView couponRetrieveForm(@RequestParam(value = "returnCode") String returnCode, @RequestParam(value = "returnName") String returnName, @RequestParam(value = "cpnNm", required = false) String cpnNm) {
|
|
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
|
|
+
|
|
|
|
|
+ mav.addObject("returnCode", returnCode);
|
|
|
|
|
+ mav.addObject("returnName", returnName);
|
|
|
|
|
+ mav.addObject("cpnNm", StringUtils.defaultString(cpnNm, ""));
|
|
|
|
|
+
|
|
|
|
|
+ // 사이트 목록
|
|
|
|
|
+ mav.addObject("siteList", rendererService.getAvailCommonCodeList("G000"));
|
|
|
|
|
+
|
|
|
|
|
+ // 사용가능고객구분 목록
|
|
|
|
|
+ mav.addObject("usableCustGbList", rendererService.getAvailCommonCodeList("G100"));
|
|
|
|
|
+
|
|
|
|
|
+ // 쿠폰유형 목록
|
|
|
|
|
+ mav.addObject("cpnTypeList", rendererService.getAvailCommonCodeList("G230"));
|
|
|
|
|
+
|
|
|
|
|
+ // 할인방식 목록
|
|
|
|
|
+ mav.addObject("dcWayList", rendererService.getAvailCommonCodeList("G240"));
|
|
|
|
|
+
|
|
|
|
|
+ mav.setViewName("marketing/CouponRetrieveForm");
|
|
|
|
|
+
|
|
|
|
|
+ return mav;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 쿠폰조회 목록
|
|
|
|
|
+ * @param coupon - 쿠폰 정보
|
|
|
|
|
+ * @return
|
|
|
|
|
+ * @author gagamel
|
|
|
|
|
+ * @since 2021. 1. 8
|
|
|
|
|
+ */
|
|
|
|
|
+ @PostMapping("/coupon/retrieve/list")
|
|
|
|
|
+ @ResponseBody
|
|
|
|
|
+ public Collection<Coupon> getCouponRetrieveList(@RequestBody Coupon coupon) {
|
|
|
|
|
+ return couponService.getCouponRetrieveList(coupon);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|