Project

General

Profile

Non-Function #124

Updated by Deca Park 12 months ago

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

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

 <ul> 
	 <li>crontab:<span style="color:#e74c3c;"> 2 AM (every day)</span></li> 
 </ul> 

 <p><strong>[process logic]</strong></p> 

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

 <p>&nbsp; <span style="color:#e74c3c;">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; - <strong>auth=&#39;AU02&#39; </strong>AND&nbsp;user_status -&nbsp;user_status != &#39;US04&#39; AND&nbsp;<strong>last_login_date (yyyymmdd)&nbsp;=&nbsp;{curren_date - 335 days}</strong> // because message is sent before 30days from 1 year</span></p> 

 <p>&nbsp; <span style="color:#e74c3c;">2) send message process</span><br /> 
 &nbsp; &nbsp; a) if {hp} of target user_no is empty(NULL), SKIP<br /> 
 &nbsp; &nbsp; <s><span style="color:#e74c3c;">b) if kakao send message is already sent, SKIP</span></s><span style="color:#e74c3c;"> (REMOVE)</span><br /> 
 <s>&nbsp; &nbsp; &nbsp; [check logic]<br /> 
 &nbsp; &nbsp; &nbsp; DB: st_kakao_message<br /> 
 &nbsp; &nbsp; &nbsp; conditions:&nbsp;<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - msg_template_id=&#39;ap0003&#39; AND receive_user_no={target user_no}<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; -&nbsp;msg_send_date &gt; {currrent date - 30days}</s><br /> 
 &nbsp; &nbsp; c) 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; <span style="color:#e74c3c;">d) call kakao message send (NOT Defined)<br /> 
 &nbsp; &nbsp; &nbsp; d-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;<strong>last_login_date (yyyymmdd) + 365 days</strong>&nbsp;(format: &#39;yyyy-mm-dd&#39;)<br /> 
 &nbsp; &nbsp; &nbsp; d-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</span><br /> 
 &nbsp; &nbsp; e) INSERT DB (st_kakao_message)<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - msg_template_id: &#39;ap0003&#39;<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - receive_user_no: 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</p> 

Back