فهرست منبع

고객 관련 히스토리 추가

jsshin 5 سال پیش
والد
کامیت
214f8a32af

+ 37 - 0
src/main/java/com/style24/core/biz/dao/TscCustomerDao.java

@@ -0,0 +1,37 @@
+package com.style24.core.biz.dao;
+
+import com.style24.core.support.annotation.ShopDs;
+import com.style24.persistence.domain.CustContactHst;
+import com.style24.persistence.domain.Customer;
+import org.springframework.stereotype.Repository;
+
+
+/**
+ * 회원 Dao
+ * 
+ * @author jsshin
+ * @since 2020. 1. 20
+ */
+@ShopDs
+@Repository
+public interface TscCustomerDao {
+
+
+	/**
+	 * 고객이력 생성
+	 *
+	 * @param value - 고객번호 또는 사용자번호
+	 * @author jsshin
+	 * @since 2021. 1. 20
+	 */
+	void createCustomerHistory(String value);
+
+	/**
+	 * 회원접촉이력 생성
+	 *
+	 * @param custContactHst - 고객접촉이력
+	 * @author jsshin
+	 * @since 2020. 01. 20
+	 */
+	void createCustomerContactHistory(CustContactHst custContactHst);
+}

+ 36 - 0
src/main/java/com/style24/persistence/mybatis/shop/TscCustomer.xml

@@ -0,0 +1,36 @@
+<?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.core.biz.dao.TscCustomerDao">
+
+	<!-- 고객이력 생성 -->
+	<insert id="createCustomerHistory" parameterType="String">
+		/* TsfCustomer.createCustomerHistory */
+		SELECT 1
+	</insert>
+
+	<!-- 회원접촉이력 생성 -->
+	<insert id="createCustomerContactHistory" parameterType="TsfCustomer">
+		/* TsfCustomer.createCustomerContactHistory */
+		INSERT INTO TB_CUST_CONTACT_HST (
+		       CONTACT_TYPE
+		     , CONTACT_METHOD
+		     , CONTACT_CONTENTS
+		     , SENDER_NO
+		     , SEND_DT
+		     , RECEIVER_NO
+		     , REG_NO
+		     , REG_DT
+		)
+		VALUES (
+		       #{contactType}
+		     , #{contactMethod}
+		     , #{contactContents}
+		     , IFNULL(#{senderNo}, 0)
+		     , NOW()
+		     , #{receiverNo}
+		     , IFNULL(#{regNo}, 0)
+		     , NOW()
+		)
+	</insert>
+
+</mapper>