Project

General

Profile

New Function #52

Updated by Deca Park over 1 year ago

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

 <p>1.when POST signup API is done</p> 

 <p>&nbsp; 1) if <strong>signup coupon </strong>was already created, SKIP&nbsp;<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - DB: st_user_coupon<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - conditions: user_seq = {the user_seq} AND regular_coupon_type = <strong>&#39;RC01&#39;</strong><br /> 
 &nbsp; 2) create signup coupon<br /> 
 &nbsp; &nbsp; a) if st_money_coupon.signup_coupon_code is NOT NULL<br /> 
 &nbsp; &nbsp; &nbsp; a-1) INSERT st_user_coupon<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - user_seq = {signup user_seq}, coupon_code = {signup_coupon_code}<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - regular_coupon_type = <strong>&#39;RC01&#39;</strong><br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; if st_coupon.use_period_limit_yn = &#39;Y&#39; AND expire_days &gt; 0 (with signup_coupon_code)<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - <strong>use_start_date = {current date}<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - use_end_date = {current date} + expire_days</strong><br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - reg_date<br /> 
 &nbsp; 3)<span style="color:#ff0000;"> if user&#39;s birth_day is NOT NULL AND birth_day(MMDD)&nbsp;is {today&#39;s MMDD}<br /> 
 &nbsp; &nbsp; &nbsp;- create&nbsp;birthday coupon</span></p> reg_date</p> 

 <p>2.if user.birth_day is NOT NULL AND <span style="color:#ff0000;">birth_day(MMDD)&nbsp;is birth_day is {current date&#39;s MMDD} (just check MMDD except year)</span></p> date}</p> 

 <p>&nbsp; 1) <span style="color:#ff0000;"><s>if if <strong>birthday coupon</strong> was already created, SKIP</s>&nbsp; (remove this because birthday coupon can be created every year)</span><br SKIP&nbsp;<br /> 
 <s>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - DB: st_user_coupon<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - conditions: user_seq = {the user_seq} AND regular_coupon_type = <strong>&#39;RC02&#39;</strong></s><br <strong>&#39;RC02&#39;</strong><br /> 
 &nbsp; 2) create birthday coupon<br /> 
 &nbsp; &nbsp; a) if st_money_coupon.birthday_coupon_code is NOT NULL<br /> 
 &nbsp; &nbsp; &nbsp; a-1) INSERT st_user_coupon<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - user_seq = {signup user_seq}, coupon_code = {birthday_coupon_code}<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - regular_coupon_type =<strong> &#39;RC02&#39;</strong><br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; if st_coupon.use_period_limit_yn = &#39;Y&#39; AND expire_days &gt; 0 (with birthday_coupon_code)<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - <strong>use_start_date = {current date}<br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - use_end_date = {current date} + expire_days</strong><br /> 
 &nbsp; &nbsp; &nbsp; &nbsp; - reg_date</p> 

Back