Commit aa2969e1 authored by jim's avatar jim

invite code

parent 3ad8d2b4
...@@ -393,8 +393,8 @@ public class AccountServiceImpl implements AccountService { ...@@ -393,8 +393,8 @@ public class AccountServiceImpl implements AccountService {
current.setQueryIpUrlList(queryIpUrlList); current.setQueryIpUrlList(queryIpUrlList);
current.setWhiteList(whiteList); current.setWhiteList(whiteList);
if (account.getPromotion() != null) {
int invitedUsers = repository.countByPromotionCodeAndParentIsNull(account.getPromotion().getCode()); int invitedUsers = repository.countByPromotionCodeAndParentIsNull(account.getPromotion().getCode());
String code = account.getPromotion().getCode(); String code = account.getPromotion().getCode();
List<Account> promotes = repository.findByPromotionCode(code); List<Account> promotes = repository.findByPromotionCode(code);
double totalCommission = 0; double totalCommission = 0;
...@@ -408,8 +408,8 @@ public class AccountServiceImpl implements AccountService { ...@@ -408,8 +408,8 @@ public class AccountServiceImpl implements AccountService {
account.getPromotion().setCommission((int) totalCommission); account.getPromotion().setCommission((int) totalCommission);
account.getPromotion().setInvitedUsers(invitedUsers); account.getPromotion().setInvitedUsers(invitedUsers);
repository.save(account); repository.save(account);
}
resultDto.setStatus(0); resultDto.setStatus(0);
resultDto.setData(current); resultDto.setData(current);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment