Project

General

Profile

Non-Function #124

Updated by Deca Park 12 months ago

<p><strong>[scheduler]</strong></p> 

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

 <ul> 
	 <li>crontab: Not Define</li> 
 </ul> 

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

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

 <p>&nbsp; 1) if DB(st_user).last_login_date is before 1 year AND user_status != &#39;US04&#39;<br /> 
 &nbsp; &nbsp; a) if {hp} of target user_no is empty(NULL), SKIP<br /> 
 &nbsp; &nbsp; b) if kakao send message is already sent, SKIP<br /> 
 &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}<br /> 
 &nbsp; &nbsp; c) else<br /> 
 &nbsp; &nbsp; &nbsp; b-1) 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; &nbsp; b-1) call kakao message send (NOT Defined)<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; b-1-1) get message after set values of {st_kakao_message_template.msg_content}<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &quot;userName&quot; : user name of target user_no<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &quot;dormantDate&quot; : set by current date + 7 (format: &#39;yyyy-mm-dd&#39;)<br /> 
 &nbsp; &nbsp; &nbsp; b-2) 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 msg_value : send message content</p> set values of {st_kakao_message_template.msg_content} (JSON)<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {&quot;userName&quot;: , &quot;dormantDate&quot;:}</p> 

Back