File tree Expand file tree Collapse file tree
src/main/java/me/smartstore/customer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,18 +32,18 @@ public void refreshCustomersGroup() {
3232 int totalAmount = currentCustomer .getTotalAmount ();
3333
3434 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 ();
3939 //어떤 기준도 충족 못시킬 때
4040 if (hours <= currentMinimumHours || totalAmount <= currentMinimumTotalAmount ) {
41- currentCustomer .setGroup (GroupType .getGroupType (0 ));
42- return ;
41+ currentCustomer .setGroup (GroupType .getGroupType (j ));
42+ break ;
4343 }
4444 if (hours <= nextMinimumHours && totalAmount <= nextMinimumTotalAmount ) {
45- currentCustomer .setGroup (GroupType .getGroupType (i ));
46- return ;
45+ currentCustomer .setGroup (GroupType .getGroupType (j ));
46+ break ;
4747 }
4848 }
4949 currentCustomer .setGroup (GroupType .getGroupType (groupList .size () - 1 ));
You can’t perform that action at this time.
0 commit comments