Project

General

Profile

Non-Function #124

Updated by Deca Park 12 months ago

<p>[Scheduler - kakao send message]</p> 

 <p>1.kakao send message</p> 

 <ul> 
	 <li>crontab: 2 AM (every day)</li> 
 </ul> 

 <p>[process logic]</p> 

 <p>1.dormant user (msg_template_id = &#39;ap0003&#39;) case</p> 

 <p>&nbsp; 1) get target dormant user list<br /> 
 &nbsp; &nbsp; [logic]<br /> 
 &nbsp; &nbsp; DB:&nbsp;st_user<br /> 
 &nbsp; &nbsp; conditions:<br /> 
 &nbsp; &nbsp; &nbsp; - auth=&#39;AU02&#39; AND&nbsp;user_status != &#39;US04&#39; AND&nbsp;last_login_date (Date) <strong><span style="color:#e74c3c;">&lt;=</span></strong>&nbsp;{curren Date - 335 days} // because message is sent before 30days from 1 year</p> 

 <p>&nbsp; 2) send message process<br /> 
 &nbsp; &nbsp; a) if {hp} of target user_no is empty(NULL), SKIP<br /> 
 &nbsp; &nbsp; <span style="color:#e74c3c;">a-1) if kakao message was sent into taget user within recent 30 days, SKIP<br /> 
 &nbsp; &nbsp; &nbsp; [check logic]<br /> 
 &nbsp; &nbsp; &nbsp; DB: st_kakao_message_send<br /> 
 &nbsp; &nbsp; &nbsp; conditions:&nbsp;msg_template_id=&#39;ap0003&#39; AND receive_user_seq = {taget user_seq} AND current DATE &lt;= user_dormant_date&nbsp;</span><br /> 
 &nbsp; &nbsp; b) get message template&nbsp;<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - DB: st_kakao_message_template<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - conditions: msg_template_id=&#39;ap0003&#39;<br /> 
 &nbsp; &nbsp; c) call kakao message send<br /> 
 &nbsp; &nbsp; &nbsp; c-1) get message after set values of {st_kakao_message_template.msg_content}<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - &quot;userName&quot; : user name of target user_no<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - &quot;dormantDate&quot; :&nbsp;last_login_date (yyyymmdd) + 365 days&nbsp;(format: &#39;yyyy-mm-dd&#39;)<br /> 
 &nbsp; &nbsp; &nbsp; c-2) call ORACLE procedure<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- refer to attach txt file&nbsp;<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- use ORACLE DB properites of config<br /> 
 &nbsp; &nbsp; d) INSERT DB (<span style="color:#e74c3c;">st_kakao_message_send</span>)<br (st_kakao_message)<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - msg_template_id: &#39;ap0003&#39;<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - <span style="color:#e74c3c;">receive_user_seq</span>: target user_no<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - receive_tel_no: {hp} of target user_no<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - msg_send_date : current datetime<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - msg_content : send message content<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; -&nbsp;<span style="color:#e74c3c;">user_dormant_date : {dormantDate}<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; -&nbsp;user_dormant_proc_yn: &#39;N&#39;</span></p> 

 <p><span style="color:#e74c3c;">&nbsp; 3) server log<br /> 
 &nbsp; &nbsp; - level: INFO<br /> 
 &nbsp; &nbsp; - message: &quot;[Scheduler] 알림톡 -&nbsp;휴면회원안내(ap0003) &quot; + &quot;total Kakao message send count: {total count}&quot;</span></p> 

Back