New Function #52
Updated by Deca Park almost 2 years 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 expire_date = {current date}<br /> - use_end_date = {current date} + expire_days</strong><br expire_days<br /> - reg_date</p> <p>2.if user.birth_day is NOT NULL AND birth_day is {current date}</p> <p> 1) if <strong>birthday coupon</strong> was already created, SKIP <br /> - DB: st_user_coupon<br /> - conditions: user_seq = {the user_seq} AND regular_coupon_type = <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 expire_date = {current date}<br date} + expire_days<br /> - use_end_date = {current date} + expire_days</strong><br reg_date<br /> - reg_date</p> </p>