Upload
woo-seok-lee
View
495
Download
1
Embed Size (px)
Citation preview
CONFIDENTIALThis material, which contains business secrets and confidential information, is a property owned by ionglobal. This materialshall not be used, reproduced, copied, disclosed, or transmitted, as a whole or a part, without a proper consent of ionglobal.
CMSOrder
Seq
MemberSeq
Optician
Brand
Product
unitPrice
diopter
baseCurve
Pattern
Color
AddPower
Cylinder
Axis
Uom
Quantity
Point
OrderDate
DelYN
Description
1.1 포인트 이력관리 관련 Table Schema
CMSOrderPoint
Seq
MemberSeq
Optician
GrandPoint
UsePoint
ExpPoint
TotalPoint
TotalPointOld
StartDate
EndDate
CMSPointHistory
Seq
CmsOrder_seq
CmsOrderPoint_Seq
MemberSeq
Optician
AddPoint
AddDate
DedPoint
DedDate
extPoint
extDate
expPoint
AccumPoint
DelYN
CMSPointDedHistory
Seq
CmsOrder_Seq
BfrPoint
DedPoint
AftPoint
OrderDate
DedDate
DelYN
구매 Table 고객 Point Table Point 생성이력 Table Point 차감이력 Table
CONFIDENTIALThis material, which contains business secrets and confidential information, is a property owned by ionglobal. This materialshall not be used, reproduced, copied, disclosed, or transmitted, as a whole or a part, without a proper consent of ionglobal.
CMSOrder CMSOrderPoint
MemberSeq Optician
GrandPoint UsePoint ExpPoint TotalPoint
A AAA 73 0 0 73
1.2 포인트 처리 Process
CMSPointHistory
OrderSeq Seq Date AddPoint DedPoint ExtPoint DedDate ExtDate
1 1 2006.7.1
73 0 73 2008.7.1
2006.7.1 : 1 차 고객 구매
총발생 Point
총사용 Point
총소멸 Point총잔여 Point
발생 Point 차감 Point 잔여 Point
Seq Date MemberSeq UnitPrice Point
1 2006.7.1 A 73,000 73
①구매
②이력생성
③포인트 반영
CONFIDENTIALThis material, which contains business secrets and confidential information, is a property owned by ionglobal. This materialshall not be used, reproduced, copied, disclosed, or transmitted, as a whole or a part, without a proper consent of ionglobal.
CMSOrder CMSOrderPoint
1.2 포인트 처리 Process
CMSPointHistory
2006.8.1 : 2 차 고객 구매
73 + 73
OrderSeq Seq Date AddPoint DedPoint ExtPoint DedDate ExtDate
1 1 2006.7.1
73 0 73 2008.7.1
2 2 2006.8.1
73 0 73 2008.8.1
Seq Date MemberSeq UnitPrice Point
1 2006.7.1 A 73,000 73
2 2006.8.1 A 73,000 73①구매
②이력생성
③포인트 반영
73 + 73
MemberSeq Optician
GrandPoint UsePoint ExpPoint TotalPoint
A AAA 146 0 0 146
CONFIDENTIALThis material, which contains business secrets and confidential information, is a property owned by ionglobal. This materialshall not be used, reproduced, copied, disclosed, or transmitted, as a whole or a part, without a proper consent of ionglobal.
CMSOrder CMSOrderPoint
1.2 포인트 처리 Process
CMSPointHistory
2006.12.24 : 3 차 고객 구매
OrderSeq Seq Date AddPoint DedPoint ExtPoint DedDate ExtDate
1 1 2006.7.1 73 0 73 2008.7.1
2 2 2006.8.1 73 0 73 2008.8.1
3 3 2006.12.24
154 0 73 2008.12.24
Seq Date MemberSeq UnitPrice Point
1 2006.7.1 A 73,000 73
2 2006.8.1 A 73,000 73
3 2006.12.24
A 154,000 154
146 + 73①
구매
②이력생성
③포인트 반영
146 + 73
MemberSeq Optician
GrandPoint UsePoint ExpPoint TotalPoint
A AAA 300 0 0 300
CONFIDENTIALThis material, which contains business secrets and confidential information, is a property owned by ionglobal. This materialshall not be used, reproduced, copied, disclosed, or transmitted, as a whole or a part, without a proper consent of ionglobal.
CMSOrder CMSOrderPoint
1.2 포인트 처리 Process
CMSPointHistory
2007.1.15 : 포인트에 의한 고객 구매 ( 증정 )
FIFO( 선입선출 ) 로직에 의해 만료되지 않은 건에 대해 날짜역순으로 차감처리
CMSPointDedHistory
Seq HisSeq BfrPoint DedPoint AftPoint OrderDate DedDate
4 1 73 73 0 2007.1.15
4 2 73 73 0 2007.1.15
4 3 154 54 100 2007.1.15
OrderSeq Seq Date AddPoint DedPoint ExtPoint DedDate ExtDate
1 1 2006.7.1 73 73 0 2007.1.15
2008.7.1
2 2 2006.8.1 73 73 0 2007.1.15
2008.8.1
3 3 2006.12.24
154 54 100 2007.1.15
2008.12.24
차감에 대한 History 를 생성한다 이를 생성하는 이유는 한 포인트가 2 개 이상으로 나뉘어 질 수 있으므로 이를 추적하기 위해 필요하다
Seq Date MemberSeq UnitPrice Point
1 2006.7.1 A 73,000 73
2 2006.8.1 A 73,000 73
3 2006.12.24
A 154,000 154
4 2007.1.15
A 0 -200
①포인트구매
②포인트차감처리
③포인트차감이력 생성
④ 포인트 반영 300-200 0+200
MemberSeq Optician
GrandPoint UsePoint ExpPoint TotalPoint
A AAA 300 200 0 100
CONFIDENTIALThis material, which contains business secrets and confidential information, is a property owned by ionglobal. This materialshall not be used, reproduced, copied, disclosed, or transmitted, as a whole or a part, without a proper consent of ionglobal.
CMSOrder CMSOrderPoint
1.2 포인트 처리 Process
CMSPointHistory
2007.2.10 : 4 차 고객 구매
OrderSeq Seq Date AddPoint DedPoint ExtPoint DedDate ExtDate
1 1 2006.7.1 73 73 0 2008.1.15
2008.7.1
2 2 2006.8.1 73 73 0 2008.1.15
2008.8.1
3 3 2006.12.24
154 54 100 2008.1.15
2008.12.24
5 4 2007.2.10 130 0 130 2009.2.10
Seq Date MemberSeq UnitPrice Point
1 2006.7.1 A 73,000 73
2 2006.8.1 A 73,000 73
3 2006.12.24
A 154,000 154
4 2007.1.15 A 0 -200
5 2007.2.10 A 130,000 130
300+130
①구매
②이력생성
③포인트 반영
100+130
MemberSeq Optician
GrandPoint UsePoint ExpPoint TotalPoint
A AAA 430 200 0 230
CONFIDENTIALThis material, which contains business secrets and confidential information, is a property owned by ionglobal. This materialshall not be used, reproduced, copied, disclosed, or transmitted, as a whole or a part, without a proper consent of ionglobal.
CMSOrder CMSOrderPoint
Seq Date MemberSeq UnitPrice Point
1 2007.3.1 A 73,000 73
2 2007.7.1 A 73,000 73
3 2007.12.24
A 154,000 154
4 2008.1.15 A 0 -200
5 2008.2.10 A 130,000 130
6 2008.2.20
A 0 -150
1.2 포인트 처리 Process
CMSPointHistory
2008.2.20 : 포인트에 의한 고객 구매 ( 증정 )
CMSPointDedHistory
Seq HisSeq BfrPoint DedPoint AftPoint OrderDate DedDate
4 1 73 73 0 2008.1.15
4 2 73 73 0 2008.1.15
4 3 154 54 100 2008.1.15
6 3 100 100 0 2008.2.10
6 4 130 50 80 2008.2.10
OrderSeq Seq Date AddPoint DedPoint ExtPoint DedDate ExtDate
1 1 2007.3.1 73 73 0 2008.1.15
2008.7.1
2 2 2007.7.1 73 73 0 2008.1.15
2008.8.1
3 3 2007.12.24
154 154 0 2008.2.20
2008.12.24
5 4 2008.2.10 130 50 80 2008.2.20
2010.2.10
각 포인트에 의한 차감건에 대해서 어느 포인트를 어떻게 차감하였는지 확인이 가능 하다 4 번 포인트 구매에 대한 차감이력 확인 가능 6 번 포인트 구매에 대한 차감이력 확인 가능
①포인트구매
②포인트차감
③포인트차감이력 생성
④ 포인트 반영 230-150200+150
MemberSeq Optician
GrandPoint UsePoint ExpPoint TotalPoint
A AAA 430 350 0 80
CONFIDENTIALThis material, which contains business secrets and confidential information, is a property owned by ionglobal. This materialshall not be used, reproduced, copied, disclosed, or transmitted, as a whole or a part, without a proper consent of ionglobal.
CMSOrder CMSOrderPoint
Seq Date MemberSeq UnitPrice Point
1 2007.3.1 A 73,000 73
2 2007.7.1 A 73,000 73
3 2007.12.24
A 154,000 154
4 2008.1.15 A 0 -200
5 2008.2.10 A 130,000 130
6 2008.2.20 A 0 -150
7 2008.3.20 A 80,000 80
1.2 포인트 처리 Process
CMSPointHistory
2008.3.20 : 5 차 고객 구매
OrderSeq Seq Date AddPoint DedPoint ExtPoint DedDate ExtDate
1 1 2007.3.1 73 73 0 2008.1.15
2008.7.1
2 2 2007.7.1 73 73 0 2008.1.15
2008.8.1
3 3 2007.12.24
154 154 0 2008.2.20
2008.12.24
5 4 2008.2.10 130 50 80 2008.2.20
2010.2.10
7 5 2008.3.20 80 0 80 2010.3.20
430+80
①구매
②이력생성
③포인트 반영
80+80
MemberSeq Optician
GrandPoint UsePoint ExpPoint TotalPoint
A AAA 510 350 0 160
CONFIDENTIALThis material, which contains business secrets and confidential information, is a property owned by ionglobal. This materialshall not be used, reproduced, copied, disclosed, or transmitted, as a whole or a part, without a proper consent of ionglobal.
CMSOrder CMSOrderPoint
Seq Date MemberSeq UnitPrice Point
1 2007.3.1 A 73,000 73
2 2007.7.1 A 73,000 73
3 2007.12.24
A 154,000 154
4 2008.1.15 A 0 -200
5 2008.2.10 A 130,000 130
6 2008.2.20 A 0 -150
7 2008.3.20 A 80,000 80
1.2 포인트 처리 Process
CMSPointHistory
2010.2.10 : 만료기간 도래시 처리 (4 번 구매이력 건 만료 기간 도래 )
OrderSeq Seq Date AddPoint DedPoint ExtPoint ExpPoint DedDate ExtDate
1 1 2007.3.1 73 73 0 0 2008.1.15
2008.7.1
2 2 2007.7.1 73 73 0 0 2008.1.15
2008.8.1
3 3 2007.12.24
154 154 0 0 2008.2.20
2008.12.24
5 4 2008.2.10 130 50 80->0 0->80 2008.2.20
2010.2.10
7 5 2008.3.20 80 0 80 2010.3.20
① 이력상에 만료일에 해당하는 건 체크 ( 매일 배치작업에 의한 처리 )
② 만료일이며 , 잔여포인트가 남아있으면 , => 잔여포인트 -> 만료포인트 , 잔여포인트 = 0 처리
③ 만료포인트 합산 반영
0+80 160-80
MemberSeq Optician
GrandPoint UsePoint ExpPoint TotalPoint
A AAA 510 350 80 80
CONFIDENTIALThis material, which contains business secrets and confidential information, is a property owned by ionglobal. This materialshall not be used, reproduced, copied, disclosed, or transmitted, as a whole or a part, without a proper consent of ionglobal.
CMSOrder CMSOrderPoint
1.2 포인트 처리 Process
CMSPointHistory
2007.2.10 : 구매취소
OrderSeq Seq Date AddPoint DedPoint ExtPoint DedDate ExtDate
1 1 2006.7.1 73 73 0 2008.1.15
2008.7.1
2 2 2006.8.1 73 73 0 2008.1.15
2008.8.1
3 3 2006.12.24
154 54 100 2008.1.15
2008.12.24
5 4 2007.2.10 130 0 130 2009.2.10
Seq Date MemberSeq UnitPrice Point
1 2006.7.1 A 73,000 73
2 2006.8.1 A 73,000 73
3 2006.12.24
A 154,000 154
4 2007.1.15 A 0 -200
5 2007.2.10 A 130,000 130
430-130
①구매취소
②이력취소
③포인트 반영
230-130
MemberSeq Optician
GrandPoint UsePoint ExpPoint TotalPoint
A AAA 300 200 0 100
DelYN = ‘Y’
DelYN = ‘Y’
CONFIDENTIALThis material, which contains business secrets and confidential information, is a property owned by ionglobal. This materialshall not be used, reproduced, copied, disclosed, or transmitted, as a whole or a part, without a proper consent of ionglobal.
CMSOrder CMSOrderPoint
1.2 포인트 처리 Process
CMSPointHistory
2007.3.10 : 안경원 변경에 의한 구매 (AAA 안경원 -> BBB 안경원 이전 )
OrderSeq Seq Date AddPoint DedPoint ExtPoint DedDate ExtDate
1 1 2006.7.1 73 73 0 2008.1.15
2008.7.1
2 2 2006.8.1 73 73 0 2008.1.15
2008.8.1
3 3 2006.12.24
154 54 100 2008.1.15
2008.12.24
5 4 2007.2.10 130 0 130 2009.2.10
6 5 2007.3.10 87 0 87 2009.3.10
Seq Date MemberSeq UnitPrice Point
1 2006.7.1 A 73,000 73
2 2006.8.1 A 73,000 73
3 2006.12.24
A 154,000 154
4 2007.1.15 A 0 -200
5 2007.2.10 A 130,000 130
6 2007.3.10
A 87,000 87
①구매
②이력취소
③포인트 반영
MemberSeq Optician
GrandPoint UsePoint ExpPoint TotalPoint
A AAA 300 200 0 100
A BBB 87 0 0 87
DelYN = ‘Y’
DelYN = ‘Y’
BBB 안경원
BBB 안경원으로 포인트내역 추가고객 : AAA,BBB 안경원 두 내역을 같이 SUM 해서 보게 된다
CONFIDENTIALThis material, which contains business secrets and confidential information, is a property owned by ionglobal. This materialshall not be used, reproduced, copied, disclosed, or transmitted, as a whole or a part, without a proper consent of ionglobal.
CMSOrder CMSOrderPoint
Seq Date MemberSeq UnitPrice Point
1 2007.3.1 A 73,000 73
2 2007.7.1 A 73,000 73
3 2007.12.24
A 154,000 154
4 2008.1.15 A 0 -200
5 2008.2.10 A 130,000 130
6 2008.2.20 A 0 -150
7 2008.3.20 A 80,000 80
MemberSeq GrandPoint UsePoint ExpPoint TotalPoint
A 510 350 80 80
1.3 포인트 관련 테이블간 데이터 검증
CMSPointHistory
OrderSeq Seq Date AddPoint DedPoint ExtPoint ExpPoint DedDate ExtDate
1 1 2007.3.1 73 73 0 0 2008.1.15
2008.7.1
2 2 2007.7.1 73 73 0 0 2008.1.15
2008.8.1
3 3 2007.12.24
154 154 0 0 2008.2.20
2008.12.24
5 4 2008.2.10 130 50 0 80 2008.2.20
2010.2.10
7 5 2008.3.20 80 0 80 0 2010.3.20
GrandPoint = UsePoint + ExpPoint + TotalPoint
AddPoint = DedPoint + ExtPoint + ExpPoint
DelYN = ‘Y’ 인 건은 제외 (CMSOrder, CMSPointHistory)
CONFIDENTIALThis material, which contains business secrets and confidential information, is a property owned by ionglobal. This materialshall not be used, reproduced, copied, disclosed, or transmitted, as a whole or a part, without a proper consent of ionglobal.
Step 내용 관련 Table
1 구매등록 1. CMSOrder 테이블에 데이터 생성 (INSERT)2. CMSOrderPoint 테이블에 해당고객 포인트데이터가 있는지 확인3. 없으면 , INSERT4. 있으면 , UPDATE5. CMSPointHistory 테이블에 구매이력 Data 생성 (INSERT)
CMSOrderCMSOrderPointCMSPointHistory
2 구매수정 1. CMSOrder 테이블에 데이터 수정 (UPDATE)2. CMSOrderPoint 테이블에 포인트 수정 (UPDATE)3. CMSOrderPointHistory 테이블 포인트 수정 (UPDATE)
3 구매취소 1. CMSOrder 테이블에서 해당구매취소건 이후에 포인트 구매건 있는지 체크
2. 있으면 , 구매취소 불가3. 없으면 , 구매취소 (DELETE ??? DelYN = ‘Y’)
4 포인트구매 (증정 ) 1. CMSOrder 테이블에 데이터 생성 (INSERT)2. CMSPointHistory 테이블 포인트 차감 (UPDATE)3. CMSPointDedHistory 테이블에 차감이력 생성 (INSERT)4. CMSOrderPoint 테이블에 포인트 수정 (UPDATE)
2. 포인트 스키마 변경에 따른 로직 처리