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 IN (&#39;102&#39;,&#39;002&#39;) // 102: 편의점, 002: 전문점<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- TRANS_YN = &#39;N&#39;<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp;sort:&nbsp;DEPT_CD ASC<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; <strong><span style="color:#e74c3c;">DEPT_NM_PR&nbsp;</span>-</strong><span style="color:#e74c3c;"><strong>&gt; mall_name&nbsp; (if&nbsp;</strong></span><strong><span style="color:#e74c3c;">DEPT_NM_PR is NULL, mall_name&nbsp;</strong><br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<s>if BSNS_SE_CD = &#39;102&#39;,&nbsp;set &quot;storyway 편의점&quot;<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else set&nbsp;DEPT_NM_PR<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-&gt; mall_detail_name<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if BSNS_SE_CD = &#39;102&#39;,&nbsp;set&nbsp;DEPT_NM_PR<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else, set by DEPT_NM)</span></strong><br NULL</s></span><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; krs_img_url (NEW)<br /> 
 &nbsp; &nbsp; &nbsp; BSNS_SE_CD -&gt; krs_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; &nbsp; c) INSERT/UPDATE KORAIL DB (st_mall)<br /> 
 &nbsp; &nbsp; &nbsp; c-1) if data is NOT existed (with mall_code) , INSERT st_mall<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - <strong>mall_type : &#39;store&#39;&nbsp;</strong>(when UPDATE, SKIP)<br /> 
 <strong>&nbsp; &nbsp; &nbsp; &nbsp; -&nbsp;</strong>product_receive_method : &#39;PR01,PR02&#39; (when UPDATE, SKIP)<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; 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</p> 

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

Back