Commit fa200799 authored by renjie's avatar renjie

推广礼金

parent adcd6742
......@@ -13,6 +13,7 @@ public class Promotion {
private int invitedUsers;
private int commission;
private boolean isSale;
private double gift;
public int getCommission() {
return commission;
......@@ -45,4 +46,12 @@ public class Promotion {
public void setSale(boolean sale) {
isSale = sale;
}
public double getGift() {
return gift;
}
public void setGift(double gift) {
this.gift = gift;
}
}
......@@ -1112,7 +1112,6 @@ public class AccountServiceImpl implements AccountService {
if (companyAuthorize == null)
return null;
File companyLicense = companyAuthorizeRepository.getFile(companyAuthorize.getCompanyLicenseId());
log.error("3");
File coporationLicense_Front = companyAuthorizeRepository.getFile(companyAuthorize.getCoporationLicenseFront());
File coporationLicense_Back = companyAuthorizeRepository.getFile(companyAuthorize.getCoporationLicenseBack());
File agencyLicense_Front = null;
......
......@@ -42,6 +42,7 @@ public class PromotionTask {
totalCommission += userPrePaidBillings.stream().mapToDouble(UserPrePaidBilling::getTotal).sum();
}
account.getPromotion().setCommission((int)totalCommission);
account.getPromotion().setGift(totalCommission * 8/100);
accountRepository.save(account);
}
}
......
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