New Function #52
closed[Common] Regular Coupon (정기쿠폰) process
Description
[Regular Coupon process logic]
1.when POST signup API is done
1) if signup coupon was already created, SKIP
- DB: st_user_coupon
- conditions: user_seq = {the user_seq} AND regular_coupon_type = 'RC01'
2) create signup coupon
a) if st_money_coupon.signup_coupon_code is NOT NULL
a-1) INSERT st_user_coupon
- user_seq = {signup user_seq}, coupon_code = {signup_coupon_code}
- regular_coupon_type = 'RC01'
if st_coupon.use_period_limit_yn = 'Y' AND expire_days > 0 (with signup_coupon_code)
- use_start_date = {current date}
- use_end_date = {current date} + expire_days
- reg_date
3) if user's birth_day is NOT NULL AND birth_day(MMDD) is {today's MMDD}
- create birthday coupon
2.if user.birth_day is NOT NULL AND birth_day(MMDD) is {current date's MMDD} (just check MMDD except year)
1) if birthday coupon was already created, SKIP (remove this because birthday coupon can be created every year)
- DB: st_user_coupon
- conditions: user_seq = {the user_seq} AND regular_coupon_type = 'RC02'
2) create birthday coupon
a) if st_money_coupon.birthday_coupon_code is NOT NULL
a-1) INSERT st_user_coupon
- user_seq = {signup user_seq}, coupon_code = {birthday_coupon_code}
- regular_coupon_type = 'RC02'
if st_coupon.use_period_limit_yn = 'Y' AND expire_days > 0 (with birthday_coupon_code)
- use_start_date = {current date}
- use_end_date = {current date} + expire_days
- reg_date
Related issues