瀏覽代碼

managew 产品调整

master
chenchaod 1 月之前
父節點
當前提交
a99c569214

+ 5
- 0
zhywpt-app-managew/src/main/java/cn/com/taiji/managew/dto/product/product/ProductDetailResponseDTO.java 查看文件

import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;

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


/** /**
@ApiModelProperty(value = "办理费 信息列表") @ApiModelProperty(value = "办理费 信息列表")
private List<ProcessingFee> processingFeeList; private List<ProcessingFee> processingFeeList;


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

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



+ 1
- 0
zhywpt-app-managew/src/main/java/cn/com/taiji/managew/manager/product/ProductManagerImpl.java 查看文件

//办理费 //办理费
List<ProcessingFee> processingFeeList = getProcessingFees(issueProduct); List<ProcessingFee> processingFeeList = getProcessingFees(issueProduct);
responseDTO.setProcessingFeeList(processingFeeList); responseDTO.setProcessingFeeList(processingFeeList);
responseDTO.setAmount(issueProduct.getAmount());
//售后费 //售后费
List<AfterSaleFee> afterSaleFeeList = getAfterSaleFees(issueProduct); List<AfterSaleFee> afterSaleFeeList = getAfterSaleFees(issueProduct);
responseDTO.setAfterSaleFees(afterSaleFeeList); responseDTO.setAfterSaleFees(afterSaleFeeList);

+ 6
- 4
zhywpt-app-managew/src/main/java/cn/com/taiji/managew/manager/product/PromotionManagerImpl.java 查看文件

package cn.com.taiji.managew.manager.product; 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.manager.ManagerException;
import cn.com.taiji.common.model.dao.Pagination; import cn.com.taiji.common.model.dao.Pagination;
import cn.com.taiji.core.entity.comm.CommonPayConfig; import cn.com.taiji.core.entity.comm.CommonPayConfig;
import cn.com.taiji.core.repo.jpa.issue.IssueProductUseFeeRepo; import cn.com.taiji.core.repo.jpa.issue.IssueProductUseFeeRepo;
import cn.com.taiji.core.repo.jpa.user.StaffRepo; 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.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.ProductSelectResponseDTO;
import cn.com.taiji.managew.dto.product.product.ProductSelectResquestDTO; import cn.com.taiji.managew.dto.product.product.ProductSelectResquestDTO;
import cn.com.taiji.managew.dto.product.promotion.*; import cn.com.taiji.managew.dto.product.promotion.*;
import cn.com.taiji.managew.tools.StringUtils; import cn.com.taiji.managew.tools.StringUtils;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import org.apache.poi.ss.formula.functions.Column;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;

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

+ 24
- 0
zhywpt-app-managew/src/test/java/cn/com/taiji/managew/manager/TestSampleRepo.java 查看文件





import cn.com.taiji.common.manager.ManagerException; 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.AtsQueryPayResultV2Request;
import cn.com.taiji.core.model.comm.protocol.ats.weiXin.AtsQueryPayResultV2Response; 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 cn.com.taiji.managew.Application;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import cn.com.taiji.managew.repo.jpa.request.SamplePageRequest1; import cn.com.taiji.managew.repo.jpa.request.SamplePageRequest1;
import cn.com.taiji.managew.repo.jpa.request.SamplePageRequest2; import cn.com.taiji.managew.repo.jpa.request.SamplePageRequest2;


import java.util.List;

@SpringBootTest(classes = Application.class) @SpringBootTest(classes = Application.class)
public class TestSampleRepo extends AbstractCommManager { 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…
取消
儲存