New Function #51
closed[Common] 적립금 처리 (Save money process)
Description
[Save Money process logic]
1.when POST signup API is done
1) if save money was already created, SKIP
- DB: st_user_save_money
- conditions: user_seq = {the user_seq} AND save_money_type = 'SM02'
2) create save money
a) if st_money_coupon.money_signup > 0 (NOT NULL)
a-1) INSERT st_user_save_money
user_seq = {signup user_seq}, save_money_type = 'SM02'
save_money = {st_money_coupon.money_signup}
, save_date={signup datetime}, reg_date/reg_user_seq
2.when POST /api/review API is done
1) if save money was already created, SKIP
- DB: st_user_save_money
- conditions: review_code= {the review_code} AND save_money_type = 'SM03'
2) create save money
a) if st_money_coupon.money_review_text > 0 (NOT NULL) OR
st_money_coupon.money_review_image > 0 (NOT NULL)
a-1) INSERT st_user_save_money
user_seq = {write user_seq}, save_money_type = 'SM03'
if attach_file exists
- save_money = {st_money_coupon.money_review_image}
else
- save_money = {st_money_coupon.money_review_text}
save_date={signup datetime}, reg_date/reg_user_seq
3.when st_order.order_status is updated with 'OS04' (구매확정: purchase confirmation) on ADMIN
OR when st_order.order_status is updated with 'SS04' (수령완료: Receipt complete) on ADMIN
- set status code by constant bcz the status code coube be changed
1) if save money was already created, SKIP
- DB: st_user_save_money
- conditions: order_no = {the order_no} AND save_money_type = 'SM01'
2) create save money
a) if st_money_coupon.money_grant_ratio > 0 (NOT NULL)
a-1) INSERT st_user_save_money
user_seq = {write user_seq}, save_money_type = 'SM01'
mall_code = {the mall_code} , order_no = {the order_no}
save_money = {st_order.payment_amount} * {money_grant_ratio} (%)
- truncate on first number (ex: 1001 -> 1000)
save_date={signup datetime}
reg_date/reg_user_seq
Related issues
Updated by Deca Park almost 2 years ago
- Subject changed from [Common] Save money service to [Common] Save money process
Updated by bryant bryant almost 2 years ago
- Status changed from New to Resolved
- Assignee changed from bryant bryant to Deca Park
Updated by Deca Park almost 2 years ago
- Copied to New Function #52: [Common] Regular Coupon (정기쿠폰) process added
Updated by Deca Park over 1 year ago
- Subject changed from [Common] Save money process to [Common] 적립금 처리 (Save money process)