File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
src/main/java/me/smartstore/customer Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -32,18 +32,18 @@ public void refreshCustomersGroup() {
32
32
int totalAmount = currentCustomer .getTotalAmount ();
33
33
34
34
for (int j = 0 ; j < groupList .size () - 1 ; j ++) {
35
- int currentMinimumHours = groupList .get (i ).getParameter ().getMinimumHours ();
36
- int currentMinimumTotalAmount = groupList .get (i ).getParameter ().getMinimumTotalAmount ();
37
- int nextMinimumHours = groupList .get (i + 1 ).getParameter ().getMinimumHours ();
38
- int nextMinimumTotalAmount = groupList .get (i + 1 ).getParameter ().getMinimumTotalAmount ();
35
+ int currentMinimumHours = groupList .get (j ).getParameter ().getMinimumHours ();
36
+ int currentMinimumTotalAmount = groupList .get (j ).getParameter ().getMinimumTotalAmount ();
37
+ int nextMinimumHours = groupList .get (j + 1 ).getParameter ().getMinimumHours ();
38
+ int nextMinimumTotalAmount = groupList .get (j + 1 ).getParameter ().getMinimumTotalAmount ();
39
39
//어떤 기준도 충족 못시킬 때
40
40
if (hours <= currentMinimumHours || totalAmount <= currentMinimumTotalAmount ) {
41
- currentCustomer .setGroup (GroupType .getGroupType (0 ));
42
- return ;
41
+ currentCustomer .setGroup (GroupType .getGroupType (j ));
42
+ break ;
43
43
}
44
44
if (hours <= nextMinimumHours && totalAmount <= nextMinimumTotalAmount ) {
45
- currentCustomer .setGroup (GroupType .getGroupType (i ));
46
- return ;
45
+ currentCustomer .setGroup (GroupType .getGroupType (j ));
46
+ break ;
47
47
}
48
48
}
49
49
currentCustomer .setGroup (GroupType .getGroupType (groupList .size () - 1 ));
You can’t perform that action at this time.
0 commit comments