Project

General

Profile

New Function #100

Updated by Deca Park about 1 year ago

<p>1.description<br /> 
 &nbsp; 1) crontab<br /> 
 &nbsp; &nbsp; - <strong>everyday 4 AM</strong><br /> 
 &nbsp; &nbsp; - get store / store product data from KRS DB<br /> 
 &nbsp; 2) <strong>KRS DB info (define as properties)</strong><br /> 
 &nbsp; &nbsp; - IP : 222.108.149.24<br /> 
 &nbsp; &nbsp; - DBMS : Oracle11g<br /> 
 &nbsp; &nbsp; - SID : orahi<br /> 
 &nbsp; &nbsp; - USER : US_STORYAPP<br /> 
 &nbsp; &nbsp; - PW : sApp8800!</p> 

 <p>2<strong>.Scheduler -&nbsp;KRS Store DB </strong><br /> 
 &nbsp; 1) logic<br /> 
 &nbsp; &nbsp; a) SELECT KRS DB (VI_APP_STORE_STORY)<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp;columns: set according to&nbsp;following mapping info (not use *)<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp;condition:<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-&nbsp;BSNS_SE_CD &nbsp;condition: BSNS_SE_CD IN (&#39;102&#39;,&#39;002&#39;) // 102: 편의점, 002: 전문점<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- <span style="color:#e74c3c;">TRANS_YN = &#39;N&#39;</span><br /> 
 &nbsp; &nbsp; b) mapping<br /> 
 &nbsp; &nbsp; &nbsp; KRS: VI_APP_STORE_STORY -&gt; KORAIL: st_mall<br /> 
 &nbsp; &nbsp; &nbsp; ------------------------------------------------------------<br /> 
 &nbsp; &nbsp; &nbsp; DEPT_CD -&gt; mall_code<br /> 
 &nbsp; &nbsp; &nbsp; DEPT_NM -&gt; mall_name<br /> 
 &nbsp; &nbsp; &nbsp; APP_STATN_CD -&gt; station_code<br /> 
 &nbsp; &nbsp; &nbsp; STORE_LCLAS_CD -&gt; store_category_code<br /> 
 &nbsp; &nbsp; &nbsp; STORE_LC_NM -&gt; mall_location<br /> 
 &nbsp; &nbsp; &nbsp; CTTPC_NO -&gt; mall_phone<br /> 
 &nbsp; &nbsp; &nbsp; IMG_URL -&gt; <span style="color:#e74c3c;"><s>image_url</s>&nbsp; -&gt; krs_img_url </span>(NEW)<br image_url (NEW)<br /> 
 &nbsp; &nbsp; &nbsp; BSNS_SE_CD -&gt; <span style="color:#e74c3c;"><s>bsns_se_cd</s> -&gt;&nbsp;krs_bsns_se_cd</span> bsns_se_cd (NEW)</p> 

 <p>&nbsp; &nbsp; &nbsp; KRS: VI_APP_STORE_STORY -&gt; KORAIL: st_mall_hour<br /> 
 &nbsp; &nbsp; &nbsp; ------------------------------------------------------------<br /> 
 &nbsp; &nbsp; &nbsp; START_TM -&gt; start_hour (convert: 0600 -&gt; 06:00)<br /> 
 &nbsp; &nbsp; &nbsp; END_TM -&gt; end_hour (convert: 0600 -&gt; 06:00)</p> 

 <p>&nbsp; 06:00)<br /> 
 &nbsp; &nbsp; c) INSERT/UPDATE KORAIL DB (st_mall)<br /> 
 &nbsp; &nbsp; &nbsp; c-1) if data is NOT existed (with mall_code) , existed, INSERT st_mall<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - <strong>mall_type : &#39;store&#39;</strong><br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - reg_date : current date<br /> 
 &nbsp; &nbsp; &nbsp; c-2) if data is existed, UPDATE st_mall<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - mod_date : current date<br /> 
 &nbsp; &nbsp; c) INSERT/UPDATE KORAIL DB (st_mall_hour)<br /> 
 &nbsp; &nbsp; &nbsp; c-1) if data is NOT existed, INSERT st_mall_hour<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - sort_no : 1<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - hour_type : &#39;HT01&#39;<br /> 
 &nbsp; &nbsp; &nbsp; c-2) if data is existed, UPDATE st_mall_hour<br /> 
 &nbsp; &nbsp; <span style="color:#e74c3c;">d) if KRS data s committed into KORAIL DB (st_mall/st_mall_hour)<br /> 
 &nbsp; &nbsp; &nbsp; - UPDATE&nbsp;VI_APP_STORE_STORY<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; SET&nbsp;TRANS_YN = &#39;Y&#39;&nbsp;<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; WHERE&nbsp;DEPT_CD = {mall_code}<br /> 
 &nbsp; &nbsp; &nbsp; - if&nbsp;TRANS_YN = &#39;Y&#39;, this data is excluded on next time</span></p> &nbsp;&nbsp;</p> 

 <p>3<strong>.Scheduler -&nbsp;KRS Store Product DB</strong></p> 

Back