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> 1) if <strong>signup coupon </strong>was already created, SKIP <br /> - DB: st_user_coupon<br /> - conditions: user_seq = {the user_seq} AND regular_coupon_type = <strong>'RC01'</strong><br /> 2) create signup coupon<br /> a) if st_money_coupon.signup_coupon_code is NOT NULL<br /> a-1) INSERT st_user_coupon<br /> - user_seq = {signup user_seq}, coupon_code = {signup_coupon_code}<br /> - regular_coupon_type = <strong>'RC01'</strong><br /> if st_coupon.use_period_limit_yn = 'Y' AND expire_days > 0 (with signup_coupon_code)<br /> - <strong>use_start_date = {current date}<br /> - use_end_date = {current date} + expire_days</strong><br /> - reg_date<br /> 3)<span style="color:#ff0000;"> if user's birth_day is NOT NULL AND birth_day(MMDD) is {today's MMDD}<br /> - create birthday coupon</span></p> reg_date</p> <p>2.if user.birth_day is NOT NULL AND <span style="color:#ff0000;">birth_day(MMDD) is birth_day is {current date's MMDD} (just check MMDD except year)</span></p> date}</p> <p> 1) <span style="color:#ff0000;"><s>if if <strong>birthday coupon</strong> was already created, SKIP</s> (remove this because birthday coupon can be created every year)</span><br SKIP <br /> <s> - DB: st_user_coupon<br /> - conditions: user_seq = {the user_seq} AND regular_coupon_type = <strong>'RC02'</strong></s><br <strong>'RC02'</strong><br /> 2) create birthday coupon<br /> a) if st_money_coupon.birthday_coupon_code is NOT NULL<br /> a-1) INSERT st_user_coupon<br /> - user_seq = {signup user_seq}, coupon_code = {birthday_coupon_code}<br /> - regular_coupon_type =<strong> 'RC02'</strong><br /> if st_coupon.use_period_limit_yn = 'Y' AND expire_days > 0 (with birthday_coupon_code)<br /> - <strong>use_start_date = {current date}<br /> - use_end_date = {current date} + expire_days</strong><br /> - reg_date</p>