|
@@ -14,14 +14,8 @@ import com.gree.mall.manager.enums.supply.BalanceTypeEnum;
|
|
|
import com.gree.mall.manager.enums.supply.RebateBillTypeEnum;
|
|
import com.gree.mall.manager.enums.supply.RebateBillTypeEnum;
|
|
|
import com.gree.mall.manager.enums.supply.ReceiptBillTypeEnum;
|
|
import com.gree.mall.manager.enums.supply.ReceiptBillTypeEnum;
|
|
|
import com.gree.mall.manager.exception.RemoteServiceException;
|
|
import com.gree.mall.manager.exception.RemoteServiceException;
|
|
|
-import com.gree.mall.manager.plus.entity.AdminCompanyWalletBalance;
|
|
|
|
|
-import com.gree.mall.manager.plus.entity.Rebate;
|
|
|
|
|
-import com.gree.mall.manager.plus.entity.RebateTypeUseRate;
|
|
|
|
|
-import com.gree.mall.manager.plus.entity.Receipt;
|
|
|
|
|
-import com.gree.mall.manager.plus.service.RebateService;
|
|
|
|
|
-import com.gree.mall.manager.plus.service.RebateTypeUseRateService;
|
|
|
|
|
-import com.gree.mall.manager.plus.service.ReceiptService;
|
|
|
|
|
-import com.gree.mall.manager.plus.service.SalesTypeService;
|
|
|
|
|
|
|
+import com.gree.mall.manager.plus.entity.*;
|
|
|
|
|
+import com.gree.mall.manager.plus.service.*;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -43,6 +37,8 @@ import java.util.stream.Collectors;
|
|
|
public class CompanyWalletLogic {
|
|
public class CompanyWalletLogic {
|
|
|
|
|
|
|
|
public final SalesTypeService salesTypeService;
|
|
public final SalesTypeService salesTypeService;
|
|
|
|
|
+ public final WalletService walletService;
|
|
|
|
|
+ public final RebateTypeService rebateTypeService;
|
|
|
public final RebateTypeUseRateService rebateTypeUseRateService;
|
|
public final RebateTypeUseRateService rebateTypeUseRateService;
|
|
|
public final ReceiptService receiptService;
|
|
public final ReceiptService receiptService;
|
|
|
public final RebateService rebateService;
|
|
public final RebateService rebateService;
|
|
@@ -261,6 +257,9 @@ public class CompanyWalletLogic {
|
|
|
for (AdminCompanyWalletBalance walletBalance : walletList) {
|
|
for (AdminCompanyWalletBalance walletBalance : walletList) {
|
|
|
CustomerWalletBean customerWalletBean = new CustomerWalletBean();
|
|
CustomerWalletBean customerWalletBean = new CustomerWalletBean();
|
|
|
BeanUtils.copyProperties(walletBalance, customerWalletBean);
|
|
BeanUtils.copyProperties(walletBalance, customerWalletBean);
|
|
|
|
|
+ Wallet wallet = walletService.getById(walletBalance.getWalletId());
|
|
|
|
|
+ customerWalletBean.setName(wallet.getName());
|
|
|
|
|
+ customerWalletBean.setCode(wallet.getCode());
|
|
|
customerWalletBeanList.add(customerWalletBean);
|
|
customerWalletBeanList.add(customerWalletBean);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -277,6 +276,10 @@ public class CompanyWalletLogic {
|
|
|
CustomerWalletBean customerWalletBean = new CustomerWalletBean();
|
|
CustomerWalletBean customerWalletBean = new CustomerWalletBean();
|
|
|
BeanUtils.copyProperties(walletBalance, customerWalletBean);
|
|
BeanUtils.copyProperties(walletBalance, customerWalletBean);
|
|
|
|
|
|
|
|
|
|
+ RebateType rebateType = rebateTypeService.getById(walletBalance.getWalletId());
|
|
|
|
|
+ customerWalletBean.setName(rebateType.getName());
|
|
|
|
|
+ customerWalletBean.setCode(rebateType.getCode());
|
|
|
|
|
+
|
|
|
// 是否存在返利钱包对应返利使用比例
|
|
// 是否存在返利钱包对应返利使用比例
|
|
|
if (typeUseGroup.containsKey(walletBalance.getWalletId())) {
|
|
if (typeUseGroup.containsKey(walletBalance.getWalletId())) {
|
|
|
final List<RebateTypeUseRate> rebateTypeUseRates = typeUseGroup.get(walletBalance.getWalletId());
|
|
final List<RebateTypeUseRate> rebateTypeUseRates = typeUseGroup.get(walletBalance.getWalletId());
|