Browse Source

Merge branch 'develop' into bin2107

bin2107 5 years ago
parent
commit
b7f62bd3a3

+ 10 - 0
src/main/java/com/style24/front/biz/dao/TsfCustomerDao.java

@@ -169,5 +169,15 @@ public interface TsfCustomerDao {
 	 */
 	CustGrade getExpectedCustGrde(CustGrade custGrade);
 
+	/**
+	 * 고객 생년월일 저장
+	 *
+	 * @param customer - 고객번호, 생년월일
+	 * @return int - 결과
+	 * @author jsshin
+	 * @since 2021. 05. 10
+	 */
+	int saveBatchBirth(Customer customer);
+
 
 }

+ 6 - 1
src/main/java/com/style24/front/biz/service/TsfCustomerService.java

@@ -267,6 +267,7 @@ public class TsfCustomerService {
 		customer.setCustGrade(TscConstants.CustGrade.WELCOME.value());
 
 		int custCnt = customerDao.createCustomer(customer);
+		customerDao.saveBatchBirth(customer);
 
 		if (custCnt > 0) {
 			saveJoinPostProcessing(customer);
@@ -302,6 +303,7 @@ public class TsfCustomerService {
 
 		int custCnt = customerDao.createCustomer(customer);
 		customerDao.createCustomerSns(customer);
+		customerDao.saveBatchBirth(customer);
 
 		if (custCnt > 0) {
 			saveJoinPostProcessing(customer);
@@ -707,6 +709,8 @@ public class TsfCustomerService {
 		coreCustomerService.createCustomerHistory(customer);
 		// 2.CI 업데이트
 		int resultCnt = customerDao.updateCustomerCi(customer);
+		customerDao.saveBatchBirth(customer);
+
 		if (resultCnt > 0) {
 			isSuccess = true;
 		}
@@ -784,8 +788,9 @@ public class TsfCustomerService {
 		// 1. 이력쌓고
 		coreCustomerService.createCustomerHistory(customer);
 
-		// 2. 이름, 휴대전화 번호 저장
+		// 2. 이름, 휴대전화 번호, 생년월일 저장
 		int updateCnt = customerDao.updateCustomerAuth(customer);
+		customerDao.saveBatchBirth(customer);
 
 		boolean isSuccess = updateCnt > 0; // 변경 성공시 true
 

+ 10 - 4
src/main/java/com/style24/front/support/config/TsfRedisSessionConfig.java

@@ -1,8 +1,10 @@
 package com.style24.front.support.config;
 
 import org.springframework.beans.factory.BeanClassLoaderAware;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.core.env.Environment;
 import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
 import org.springframework.data.redis.serializer.RedisSerializer;
 import org.springframework.security.jackson2.SecurityJackson2Modules;
@@ -34,6 +36,9 @@ public class TsfRedisSessionConfig extends AbstractHttpSessionApplicationInitial
 
 	private ClassLoader classLoader;
 
+	@Autowired
+	private Environment env;
+
 	@Override
 	public void setBeanClassLoader(ClassLoader classLoader) {
 		this.classLoader = classLoader;
@@ -86,12 +91,13 @@ public class TsfRedisSessionConfig extends AbstractHttpSessionApplicationInitial
 		DefaultCookieSerializer serializer = new DefaultCookieSerializer();
 		serializer.setCookiePath("/");
 		serializer.setUseBase64Encoding(false);
-//		serializer.setSameSite("NONE");
+		String active = env.getProperty("spring.profiles.active");
 		// TODO : SSL 적용 후 주석 풀고 테스트 해야함 2021-04-13
 		// SSL인증서 적용 시 주석 제거
-//		serializer.setUseSecureCookie(true);
-//		serializer.setSameSite("NONE");
-
+		if ("run".equals(active)) {
+			serializer.setUseSecureCookie(true);
+			serializer.setSameSite("NONE");
+		}
 		return serializer;
 	}
 

+ 24 - 0
src/main/java/com/style24/persistence/mybatis/shop/TsfCustomer.xml

@@ -631,4 +631,28 @@
 		OR    B.SUM_REAL_ORD_AMT >= #{minBuyAmt}
 	</select>
 
+	<!--배치 생년월일 -->
+	<insert id="saveBatchBirth" parameterType="Customer">
+		/*TsfCustomer.saveBatchBirth*/
+		INSERT INTO TB_BATCH_BIRTH (
+		       CUST_NO
+		     , BIRTH_YMD
+		     , REG_DT
+		     , REG_NO
+		     , UPD_DT
+		     , UPD_NO
+		) VALUES (
+		       #{custNo}
+		     , #{birthYmd}
+		     , NOW()
+		     , #{custNo}
+		     , NOW()
+		     , #{custNo}
+		)
+		ON DUPLICATE KEY UPDATE
+		       BIRTH_YMD = #{birthYmd}
+		    ,  UPD_DT = NOW()
+		    ,  UPD_NO = #{updNo}
+	</insert>
+
 </mapper>

+ 1 - 0
src/main/java/com/style24/persistence/mybatis/shop/TsfGiftcard.xml

@@ -47,6 +47,7 @@
 													ON B.GOODS_CD = D.GOODS_CD 
 		WHERE 1=1
 		 AND A.CUST_NO = #{custNo}
+		 AND A.GFCD_AMT != 0
 		 <choose>
 		 	<when test="monthLength > 1">
 		 		AND DATE_FORMAT(A.REG_DT,'%Y%m') = #{searchDt}

+ 1 - 4
src/main/webapp/WEB-INF/views/web/mypage/MypagePointFormWeb.html

@@ -132,7 +132,7 @@
 		for (var i = 0; i < date.length; i++) {
 			$("#searchDt").append(	"<li onclick='fnChangeDate(this.value)' value='"+ date[i].year + "" + date[i].month + "'>" + date[i].year	+ "년" +  "  " + date[i].month + "월 </li>")
 		}
-		$(".select").append("<li class='selected' value='"+date[0].year+""+date[0].month+"'>"+ date[0].year + "년"  +  "  " + date[0].month + "월 </li>"); // 현재년도 선택 */ 
+		$(".select").append("<li onclick='fnChangeDate(this.value)' value='"+date[0].year+""+date[0].month+"'>"+ date[0].year + "년"  +  "  " + date[0].month + "월 </li>"); // 현재년도 선택 */ 
 	}
 	appendYear($("#searchDt"));
 
@@ -261,14 +261,11 @@
 		
 		// 마이페이지 location 설정
 		fnSetMypageLocation('STYLE24 포인트', '_PAGE_MYPAGE_POINT');
-		
-		
 
 		// 셀렉트박스 활성화
 		$('.select_custom').each(function(index) {
 			var selecter01 = new sCombo($(this));
 		});
-
 		// 셀렉트박스 데이터 설정
 		fnChangeDate();
 

+ 1 - 1
src/main/webapp/WEB-INF/views/web/mypage/MypageReviewCreateFormWeb.html

@@ -481,7 +481,7 @@ var reviewCreate = function () {
 	}
 	
 	
-	mcxDialog.confirm('리뷰를 등록하시겠습니까"?', {
+	mcxDialog.confirm('리뷰를 등록하시겠습니까?', {
         cancelBtnText: "취소",
         sureBtnText: "확인",
         sureBtnClick: function(){

+ 0 - 1
src/main/webapp/WEB-INF/views/web/planning/PlanningEventPollFormWeb.html

@@ -335,7 +335,6 @@ $(document).ready( function() {
 		var content = $(this).val();
 		$('#ans_cnt').html("(<em class='c_primary'>"+content.length+"</em>/1000자)");  
 		if (content.length > 1000){
-			alert("최대 1000자까지 입력 가능합니다.");
 			$(this).val(content.substring(0, 1000));
 			$('#ans_cnt').html("(<em class='c_primary'>1000</em>/1000자)");
 		}