Browse Source

managew 产品调整

master
chenchaod 1 month ago
parent
commit
a99c569214

+ 5
- 0
zhywpt-app-managew/src/main/java/cn/com/taiji/managew/dto/product/product/ProductDetailResponseDTO.java View File

@@ -9,6 +9,8 @@ import cn.com.taiji.managew.model.product.ProcessingFee;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import java.util.List;

/**
@@ -97,6 +99,9 @@ public class ProductDetailResponseDTO {
@ApiModelProperty(value = "办理费 信息列表")
private List<ProcessingFee> processingFeeList;

@ApiModelProperty(value = "办理费总金额")
private Long amount;//办理费总金额

@ApiModelProperty(value = "欠费月收比例")
private Integer monthlyRate;


+ 1
- 0
zhywpt-app-managew/src/main/java/cn/com/taiji/managew/manager/product/ProductManagerImpl.java View File

@@ -309,6 +309,7 @@ public class ProductManagerImpl extends AbstractManagewManager implements Produc
//办理费
List<ProcessingFee> processingFeeList = getProcessingFees(issueProduct);
responseDTO.setProcessingFeeList(processingFeeList);
responseDTO.setAmount(issueProduct.getAmount());
//售后费
List<AfterSaleFee> afterSaleFeeList = getAfterSaleFees(issueProduct);
responseDTO.setAfterSaleFees(afterSaleFeeList);

+ 6
- 4
zhywpt-app-managew/src/main/java/cn/com/taiji/managew/manager/product/PromotionManagerImpl.java View File

@@ -1,6 +1,5 @@
package cn.com.taiji.managew.manager.product;

import cn.com.taiji.common.manager.AbstractManager;
import cn.com.taiji.common.manager.ManagerException;
import cn.com.taiji.common.model.dao.Pagination;
import cn.com.taiji.core.entity.comm.CommonPayConfig;
@@ -24,7 +23,6 @@ import cn.com.taiji.core.repo.jpa.issue.IssueProductRepo;
import cn.com.taiji.core.repo.jpa.issue.IssueProductUseFeeRepo;
import cn.com.taiji.core.repo.jpa.user.StaffRepo;
import cn.com.taiji.managew.dto.product.product.GetReleaseIdRequestDTO;
import cn.com.taiji.managew.dto.product.product.ProductDetailRequestDTO;
import cn.com.taiji.managew.dto.product.product.ProductSelectResponseDTO;
import cn.com.taiji.managew.dto.product.product.ProductSelectResquestDTO;
import cn.com.taiji.managew.dto.product.promotion.*;
@@ -37,12 +35,10 @@ import cn.com.taiji.managew.repo.jpa.request.IssueProductPromotionPageRequest;
import cn.com.taiji.managew.tools.StringUtils;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import org.apache.poi.ss.formula.functions.Column;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
@@ -131,6 +127,7 @@ public class PromotionManagerImpl extends AbstractManagewManager implements Prom
processFeeModel.setFee(prestoreFee);
//如果支付方式表有信息,则赋值
payHandleMap.map(m -> m.get(ProcessingFeeType.PRESTORE.name())).ifPresent(m -> copyProperties(m, processFeeModel));
processFeeModel.setReleaseId(promotion.getReleaseId());
processFeeModelList.add(processFeeModel);
}
//权益金
@@ -141,6 +138,7 @@ public class PromotionManagerImpl extends AbstractManagewManager implements Prom
processFeeModel.setFee(equityFee);
//如果支付方式表有信息,则赋值
payHandleMap.map(m -> m.get(ProcessingFeeType.HANDLE.name())).ifPresent(m -> copyProperties(m, processFeeModel));
processFeeModel.setReleaseId(promotion.getReleaseId());
processFeeModelList.add(processFeeModel);
}
//保证金
@@ -151,6 +149,7 @@ public class PromotionManagerImpl extends AbstractManagewManager implements Prom
processFeeModel.setFee(ensureFee);
//如果支付方式表有信息,则赋值
payHandleMap.map(m -> m.get(ProcessingFeeType.MARGIN.name())).ifPresent(m -> copyProperties(m, processFeeModel));
processFeeModel.setReleaseId(promotion.getReleaseId());
processFeeModelList.add(processFeeModel);
}
//之所以判断下,再赋值,因为如果processFeeModelList是空集合,就返给前端null,而不是空集合对象
@@ -183,6 +182,7 @@ public class PromotionManagerImpl extends AbstractManagewManager implements Prom
afterSaleFeeModel.setFeeType(ProductAfterType.CHANGECARD);
afterSaleFeeModel.setFee(changeCardFee);
payAfterMap.map(m -> m.get(ProductAfterType.CHANGECARD.name())).ifPresent(m -> copyProperties(m, afterSaleFeeModel));
afterSaleFeeModel.setReleaseId(promotion.getReleaseId());
afterSaleFeeModelList.add(afterSaleFeeModel);
}
// 售后更换签费
@@ -192,6 +192,7 @@ public class PromotionManagerImpl extends AbstractManagewManager implements Prom
afterSaleFeeModel.setFeeType(ProductAfterType.CHANGEOBU);
afterSaleFeeModel.setFee(changeObuFee);
payAfterMap.map(m -> m.get(ProductAfterType.CHANGEOBU.name())).ifPresent(m -> copyProperties(m, afterSaleFeeModel));
afterSaleFeeModel.setReleaseId(promotion.getReleaseId());
afterSaleFeeModelList.add(afterSaleFeeModel);
}
// 售后更换卡签费
@@ -201,6 +202,7 @@ public class PromotionManagerImpl extends AbstractManagewManager implements Prom
afterSaleFeeModel.setFeeType(ProductAfterType.CHANGEALL);
afterSaleFeeModel.setFee(changeAllFee);
payAfterMap.map(m -> m.get(ProductAfterType.CHANGEALL.name())).ifPresent(m -> copyProperties(m, afterSaleFeeModel));
afterSaleFeeModel.setReleaseId(promotion.getReleaseId());
afterSaleFeeModelList.add(afterSaleFeeModel);
}
//之所以判断下,再赋值,因为如果afterSaleFeeModelList是空集合,就返给前端null,而不是空集合对象

+ 24
- 0
zhywpt-app-managew/src/test/java/cn/com/taiji/managew/manager/TestSampleRepo.java View File

@@ -2,8 +2,12 @@ package cn.com.taiji.managew.manager;


import cn.com.taiji.common.manager.ManagerException;
import cn.com.taiji.core.entity.basic.QtkServiceHall;
import cn.com.taiji.core.entity.issue.IssueOrderPay;
import cn.com.taiji.core.model.comm.protocol.ats.weiXin.AtsQueryPayResultV2Request;
import cn.com.taiji.core.model.comm.protocol.ats.weiXin.AtsQueryPayResultV2Response;
import cn.com.taiji.core.repo.jpa.basic.QtkServicehallRepo;
import cn.com.taiji.core.repo.jpa.issue.IssueOrderPayRepo;
import cn.com.taiji.managew.Application;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
@@ -14,6 +18,8 @@ import cn.com.taiji.managew.repo.jpa.SampleRepo;
import cn.com.taiji.managew.repo.jpa.request.SamplePageRequest1;
import cn.com.taiji.managew.repo.jpa.request.SamplePageRequest2;

import java.util.List;

@SpringBootTest(classes = Application.class)
public class TestSampleRepo extends AbstractCommManager {

@@ -69,4 +75,22 @@ public class TestSampleRepo extends AbstractCommManager {
// }
}

@Autowired
private QtkServicehallRepo qtkServicehallRepo;
@Test
public void test(){
QtkServiceHall serviceHallId = qtkServicehallRepo.findByServiceHallId("5201010600401140003");
System.out.println(serviceHallId.toJson(true));
}

@Autowired
private IssueOrderPayRepo orderPayRepo;
@Test
public void te(){
List<IssueOrderPay> pays = orderPayRepo.listByOrderNo("20250701213433520101060047900994");
System.out.println(pays.toString());
}



}

Loading…
Cancel
Save