Commit 92ba35f0 by 章家宝

Merge remote-tracking branch 'refs/remotes/origin/main' into v1.1.0

# Conflicts:
#	aus-admin/build.gradle
#	aus-api/build.gradle
#	aus-core/build.gradle
#	aus-framework/build.gradle
#	aus-front/admin/src/router/FinanceRouter.ts
#	aus-task/build.gradle
#	build.gradle
2 parents 58e053e3 c0ce3a04
Showing 458 changed files with 1811 additions and 479 deletions
...@@ -15,3 +15,8 @@ ...@@ -15,3 +15,8 @@
/aus-task/build/ /aus-task/build/
/LOG_DIR_IS_UNDEFINED/ /LOG_DIR_IS_UNDEFINED/
/aus-framework/build/ /aus-framework/build/
/aus-admin/src/main/resources/static/main/assets/
/aus-admin/src/main/resources/static/main/favicon/
/aus-admin/src/main/resources/static/main/main/assets/
/aus-admin/src/main/resources/static/main/tinymce/
/aus-admin/src/main/resources/static/main/index.html
...@@ -133,4 +133,8 @@ gitee帐号: ...@@ -133,4 +133,8 @@ gitee帐号:
【金山文档 | WPS云文档】 微信支付流程调整 【金山文档 | WPS云文档】 微信支付流程调整
https://www.kdocs.cn/l/cqSXe4WVE94M https://www.kdocs.cn/l/cqSXe4WVE94M
分批退款接口 分批退款接口
https://pay.weixin.qq.com/doc/v3/merchant/4012791862
\ No newline at end of file \ No newline at end of file
https://pay.weixin.qq.com/doc/v3/merchant/4012791862
https://www.yuque.com/runhoutang-6m1me/nkb887/bps7fkelyxfeoq7l?singleDoc# 《20260115 生产体验问题》
\ No newline at end of file \ No newline at end of file
...@@ -14,6 +14,7 @@ import org.springframework.security.authorization.AuthorizationManager; ...@@ -14,6 +14,7 @@ import org.springframework.security.authorization.AuthorizationManager;
import org.springframework.security.config.ObjectPostProcessor; import org.springframework.security.config.ObjectPostProcessor;
import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityCustomizer;
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
import org.springframework.security.config.annotation.web.configurers.HeadersConfigurer; import org.springframework.security.config.annotation.web.configurers.HeadersConfigurer;
import org.springframework.security.web.AuthenticationEntryPoint; import org.springframework.security.web.AuthenticationEntryPoint;
...@@ -34,6 +35,8 @@ public class SecurityConfig { ...@@ -34,6 +35,8 @@ public class SecurityConfig {
"/payment**" "/payment**"
}; };
private final String[] publicUrls = {"/rest/account/accountTagQrCode**"};
/** /**
* *
*/ */
...@@ -76,6 +79,8 @@ public class SecurityConfig { ...@@ -76,6 +79,8 @@ public class SecurityConfig {
http.headers(httpSecurityHeadersConfigurer -> httpSecurityHeadersConfigurer.frameOptions(HeadersConfigurer.FrameOptionsConfig::sameOrigin).disable()); http.headers(httpSecurityHeadersConfigurer -> httpSecurityHeadersConfigurer.frameOptions(HeadersConfigurer.FrameOptionsConfig::sameOrigin).disable());
http http
.authorizeHttpRequests((authorize) -> authorize .authorizeHttpRequests((authorize) -> authorize
// 配置不受管理的 URL,允许所有访问
.requestMatchers(publicUrls).permitAll()
.requestMatchers(protectedUrls).access(authorManagerImpl) .requestMatchers(protectedUrls).access(authorManagerImpl)
.anyRequest().permitAll() .anyRequest().permitAll()
) )
...@@ -112,6 +117,11 @@ public class SecurityConfig { ...@@ -112,6 +117,11 @@ public class SecurityConfig {
return http.build(); return http.build();
} }
// @Bean
// public WebSecurityCustomizer webSecurityCustomizer() {
// return (web) -> web.ignoring().requestMatchers("/ignore/**", "/public/**");
// }
// // 跟踪/查询会话所需 // // 跟踪/查询会话所需
// @Bean // @Bean
// public SessionRegistry sessionRegistry() { // public SessionRegistry sessionRegistry() {
......
...@@ -8,16 +8,20 @@ import com.glsx.usedcar.export.converter.AccountTypeConverter; ...@@ -8,16 +8,20 @@ import com.glsx.usedcar.export.converter.AccountTypeConverter;
import com.glsx.usedcar.export.converter.BooleanConverter; import com.glsx.usedcar.export.converter.BooleanConverter;
import com.glsx.usedcar.export.converter.CertifiedStateConverter; import com.glsx.usedcar.export.converter.CertifiedStateConverter;
import com.glsx.usedcar.module.account.entity.Account; import com.glsx.usedcar.module.account.entity.Account;
import com.glsx.usedcar.module.account.entity.AccountTag;
import jakarta.persistence.*; import jakarta.persistence.*;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size; import jakarta.validation.constraints.Size;
import lombok.Data; import lombok.Data;
import org.springframework.util.CollectionUtils;
import org.summerframework.orm.validator.CreateValidGroup; import org.summerframework.orm.validator.CreateValidGroup;
import org.summerframework.orm.validator.UpdateValidGroup; import org.summerframework.orm.validator.UpdateValidGroup;
import org.summerframework.storage.converter.FileInfoConverter; import org.summerframework.storage.converter.FileInfoConverter;
import org.summerframework.storage.domain.FileInfo; import org.summerframework.storage.domain.FileInfo;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Collections;
import java.util.List;
import static jakarta.persistence.GenerationType.IDENTITY; import static jakarta.persistence.GenerationType.IDENTITY;
...@@ -87,8 +91,13 @@ public class AccountBean { ...@@ -87,8 +91,13 @@ public class AccountBean {
@ExcelProperty(value = "账户类型", converter = AccountTypeConverter.class) @ExcelProperty(value = "账户类型", converter = AccountTypeConverter.class)
@ColumnWidth(15)
private Account.AccountType accountType; private Account.AccountType accountType;
@ExcelProperty("用户标签")
@ColumnWidth(30)
private String tags;
public AccountBean(Account account) { public AccountBean(Account account) {
this.accountId = account.getAccountId(); this.accountId = account.getAccountId();
this.accountName = account.getAccountName(); this.accountName = account.getAccountName();
...@@ -105,6 +114,12 @@ public class AccountBean { ...@@ -105,6 +114,12 @@ public class AccountBean {
this.bankMobile = account.getBankMobile(); this.bankMobile = account.getBankMobile();
this.accountType = account.getAccountType(); this.accountType = account.getAccountType();
this.frozenDeposit = account.getFrozenDeposit(); this.frozenDeposit = account.getFrozenDeposit();
if (!CollectionUtils.isEmpty(account.getAccountTags())) {
List<String> list = new java.util.ArrayList<>(account.getAccountTags().stream().map(AccountTag::getTagName).toList());
// 1. 基础排序(自然顺序,大小写敏感)
Collections.sort(list);
tags = String.join("、", list);
}
} }
......
...@@ -22,6 +22,7 @@ import org.summerframework.orm.validator.UpdateValidGroup; ...@@ -22,6 +22,7 @@ import org.summerframework.orm.validator.UpdateValidGroup;
import org.summerframework.storage.converter.FileInfosConverter; import org.summerframework.storage.converter.FileInfosConverter;
import org.summerframework.storage.domain.FileInfo; import org.summerframework.storage.domain.FileInfo;
import java.time.LocalDateTime;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
...@@ -45,7 +46,8 @@ public class AppealBean { ...@@ -45,7 +46,8 @@ public class AppealBean {
@ExcelProperty("关联订单编号") @ExcelProperty("关联订单编号")
@ColumnWidth(20) @ColumnWidth(20)
private String orderCode; private String orderCode;
@ExcelProperty("车源号(平台唯一识别编号)")
private String sourceNo;
@ExcelProperty("车系名字") @ExcelProperty("车系名字")
@ColumnWidth(15) @ColumnWidth(15)
private String carSeriesName; private String carSeriesName;
...@@ -54,13 +56,22 @@ public class AppealBean { ...@@ -54,13 +56,22 @@ public class AppealBean {
@ColumnWidth(30) @ColumnWidth(30)
private String carTypeName; private String carTypeName;
@ExcelProperty("用户名") @ExcelProperty("车架号")
private String vin;
@ExcelProperty("车牌号")
private String licensePlate;
@ExcelProperty("所属门店")
@ColumnWidth(30)
private String venueName;
@ExcelProperty("付款方姓名")
private String accountName; private String accountName;
@ExcelProperty("手机号") @ExcelProperty("付款方手机号")
private String mobile; private String mobile;
@ExcelProperty(value = "申诉原因", converter = DictionConverter.class) @ExcelProperty(value = "申诉原因", converter = DictionConverter.class)
@ColumnWidth(30) @ColumnWidth(30)
private Diction appealReason; private Diction appealReason;
...@@ -68,7 +79,9 @@ public class AppealBean { ...@@ -68,7 +79,9 @@ public class AppealBean {
@ExcelProperty("补充描述") @ExcelProperty("补充描述")
@ColumnWidth(30) @ColumnWidth(30)
private String appealContent; private String appealContent;
@ExcelProperty("申诉时间")
@ColumnWidth(16)
private LocalDateTime createTime;
/** /**
* 附件 * 附件
...@@ -77,7 +90,7 @@ public class AppealBean { ...@@ -77,7 +90,7 @@ public class AppealBean {
private List<FileInfo> attachments; private List<FileInfo> attachments;
@ExcelProperty(value = "申诉状态", converter = AppealStateConverter.class) @ExcelProperty(value = "工单状态", converter = AppealStateConverter.class)
private Appeal.AppealState appealState; private Appeal.AppealState appealState;
...@@ -124,6 +137,12 @@ public class AppealBean { ...@@ -124,6 +137,12 @@ public class AppealBean {
this.solution = appeal.getSolution(); this.solution = appeal.getSolution();
this.solutionDesc = appeal.getSolutionDesc(); this.solutionDesc = appeal.getSolutionDesc();
this.compensationAmount = appeal.getCompensationAmount(); this.compensationAmount = appeal.getCompensationAmount();
this.sourceNo = vehicle.getBaseInfo().getSourceNo();
this.vin = vehicle.getBaseInfo().getVin();
this.licensePlate = vehicle.getBaseInfo().getLicensePlate();
this.venueName = vehicle.getVenue().getVenueName();
this.createTime = appeal.getCreateTime();
} }
......
...@@ -44,11 +44,11 @@ public class AuctionOrderBean { ...@@ -44,11 +44,11 @@ public class AuctionOrderBean {
private String auctionName; private String auctionName;
@ExcelProperty("用户名") @ExcelProperty("中拍人姓名")
private String accountName; private String accountName;
@ExcelProperty("手机号") @ExcelProperty("中拍人电话")
private String mobile; private String mobile;
@ExcelProperty("车源号") @ExcelProperty("车源号")
...@@ -63,8 +63,14 @@ public class AuctionOrderBean { ...@@ -63,8 +63,14 @@ public class AuctionOrderBean {
@ColumnWidth(30) @ColumnWidth(30)
private String carTypeName; private String carTypeName;
@ExcelProperty("新车牌号") @ExcelProperty("原车牌号")
private String newPlateNumber; private String licensePlate;
@ExcelProperty("所属门店")
@ColumnWidth(30)
private String venueName;
@ExcelIgnore @ExcelIgnore
@ExcelProperty("机动车登记证书") @ExcelProperty("机动车登记证书")
private List<FileInfo> registrationCertificate; private List<FileInfo> registrationCertificate;
...@@ -81,6 +87,10 @@ public class AuctionOrderBean { ...@@ -81,6 +87,10 @@ public class AuctionOrderBean {
@ExcelProperty("佣金") @ExcelProperty("佣金")
private double commissionPrice; private double commissionPrice;
@ExcelProperty("买家应付车款")
private double totalPrice;
@ExcelIgnore @ExcelIgnore
@ExcelProperty("支付凭证") @ExcelProperty("支付凭证")
private List<FileInfo> payVouchers; private List<FileInfo> payVouchers;
...@@ -102,17 +112,24 @@ public class AuctionOrderBean { ...@@ -102,17 +112,24 @@ public class AuctionOrderBean {
private Contract deliveryContract; private Contract deliveryContract;
@ExcelProperty(value = "审核状态", converter = AuditStateConverter.class) // @ExcelProperty(value = "审核状态", converter = AuditStateConverter.class)
private AuditState auditState; // private AuditState auditState;
@ExcelProperty(value = "订单状态", converter = AuctionOrderStateConverter.class) @ExcelProperty(value = "订单状态", converter = AuctionOrderStateConverter.class)
private AuctionOrder.OrderState orderState; private AuctionOrder.OrderState orderState;
@ExcelProperty("负责人")
private String realName;
@ExcelProperty("新车牌号")
private String newPlateNumber;
@ExcelProperty("过户时间") @ExcelProperty("过户时间")
private LocalDateTime transferredTime; private LocalDateTime transferredTime;
@ExcelProperty("中拍时间")
private LocalDateTime createTime;
@ExcelProperty("订单更新时间")
private LocalDateTime updateTime;
@ExcelProperty(value = "是否在申诉中", converter = BooleanConverter.class) @ExcelProperty(value = "是否在申诉中", converter = BooleanConverter.class)
private boolean onAppeal; private boolean onAppeal;
...@@ -139,10 +156,16 @@ public class AuctionOrderBean { ...@@ -139,10 +156,16 @@ public class AuctionOrderBean {
this.settlement = auctionOrder.isSettlement(); this.settlement = auctionOrder.isSettlement();
this.contract = auctionOrder.getContract(); this.contract = auctionOrder.getContract();
this.deliveryContract = auctionOrder.getDeliveryContract(); this.deliveryContract = auctionOrder.getDeliveryContract();
this.auditState = auctionOrder.getAuditState();
this.orderState = auctionOrder.getOrderState(); this.orderState = auctionOrder.getOrderState();
this.transferredTime = auctionOrder.getTransferredTime(); this.transferredTime = auctionOrder.getTransferredTime();
this.onAppeal = auctionOrder.isOnAppeal(); this.onAppeal = auctionOrder.isOnAppeal();
this.realName = auction.getUser().getRealName();
this.createTime = auctionOrder.getCreateTime();
this.updateTime = auctionOrder.getUpdateTime();
this.totalPrice = auctionOrder.getOrderPrice() + auctionOrder.getCommissionPrice();
this.licensePlate = vehicle.getBaseInfo().getLicensePlate();
this.venueName = vehicle.getVenue().getVenueName();
} }
} }
...@@ -3,8 +3,10 @@ package com.glsx.usedcar.export; ...@@ -3,8 +3,10 @@ package com.glsx.usedcar.export;
import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.glsx.usedcar.export.converter.AuctionOrderStateConverter;
import com.glsx.usedcar.export.converter.BooleanConverter; import com.glsx.usedcar.export.converter.BooleanConverter;
import com.glsx.usedcar.export.converter.DeliveryOrderStateConverter; import com.glsx.usedcar.export.converter.DeliveryOrderStateConverter;
import com.glsx.usedcar.module.account.entity.Account;
import com.glsx.usedcar.module.auction.entity.AuctionOrder; import com.glsx.usedcar.module.auction.entity.AuctionOrder;
import com.glsx.usedcar.module.auction.entity.DeliveryOrder; import com.glsx.usedcar.module.auction.entity.DeliveryOrder;
import com.glsx.usedcar.module.security.entity.User; import com.glsx.usedcar.module.security.entity.User;
...@@ -34,6 +36,8 @@ public class DeliveryOrderBean { ...@@ -34,6 +36,8 @@ public class DeliveryOrderBean {
@ExcelProperty("工单编号") @ExcelProperty("工单编号")
@ColumnWidth(20) @ColumnWidth(20)
private String orderCode; private String orderCode;
@ExcelProperty("车源号(平台唯一识别编号)")
private String sourceNo;
@ExcelProperty("车系名字") @ExcelProperty("车系名字")
@ColumnWidth(15) @ColumnWidth(15)
...@@ -43,30 +47,50 @@ public class DeliveryOrderBean { ...@@ -43,30 +47,50 @@ public class DeliveryOrderBean {
@ColumnWidth(30) @ColumnWidth(30)
private String carTypeName; private String carTypeName;
@ExcelProperty("车架号")
private String vin;
@ExcelProperty("车牌号")
private String licensePlate;
@ExcelProperty("所属门店")
@ColumnWidth(30)
private String venueName;
@ExcelProperty("中拍人姓名")
private String accountName;
@ExcelProperty("中拍人电话")
private String accountMobile;
@ExcelProperty("指派专员") @ExcelProperty("交付专员")
private String realName; private String realName;
@ExcelProperty("指派专员手机号") @ExcelProperty("交付专员联系方式")
private String mobile; private String mobile;
/**
* 工单状态
*/
@ExcelProperty(value = "工单状态", converter = DeliveryOrderStateConverter.class)
private DeliveryOrder.OrderState orderState;
@ExcelProperty("备注") @ExcelProperty("备注")
private String remark; private String remark;
@ExcelIgnore // @ExcelIgnore
@ExcelProperty("预约时间") // @ExcelProperty("预约时间")
private LocalDateTime appointmentTime; // private LocalDateTime appointmentTime;
// @ExcelProperty("指派时间")
// private LocalDateTime assignedTime;
@ExcelProperty("指派时间") @ExcelProperty("中拍时间")
private LocalDateTime assignedTime; private LocalDateTime orderCreateTime;
@ExcelProperty("订单更新时间")
private LocalDateTime orderUpdateTime;
@ExcelProperty(value = "订单状态", converter = AuctionOrderStateConverter.class)
private AuctionOrder.OrderState auctionOrderState;
/**
* 工单状态
*/
@ExcelProperty(value = "工单状态", converter = DeliveryOrderStateConverter.class)
private DeliveryOrder.OrderState orderState;
/** /**
* 凭证 * 凭证
*/ */
...@@ -74,26 +98,26 @@ public class DeliveryOrderBean { ...@@ -74,26 +98,26 @@ public class DeliveryOrderBean {
private List<FileInfo> vouchers; private List<FileInfo> vouchers;
@ExcelProperty(value = "核验买家身份证原件", converter = BooleanConverter.class) // @ExcelProperty(value = "核验买家身份证原件", converter = BooleanConverter.class)
private boolean checkIdCard; // private boolean checkIdCard;
//
//
@ExcelProperty(value = "签署车辆交接确认单", converter = BooleanConverter.class) // @ExcelProperty(value = "签署车辆交接确认单", converter = BooleanConverter.class)
private boolean checkHandover; // private boolean checkHandover;
//
//
@ExcelProperty(value = "交付车辆钥匙", converter = BooleanConverter.class) // @ExcelProperty(value = "交付车辆钥匙", converter = BooleanConverter.class)
private boolean checkKey; // private boolean checkKey;
//
//
@ExcelProperty(value = "交付车辆所有权证及登记证", converter = BooleanConverter.class) // @ExcelProperty(value = "交付车辆所有权证及登记证", converter = BooleanConverter.class)
private boolean checkCertificate; // private boolean checkCertificate;
/** /**
* 交付工单的当前状态:准备交付/交付中/过户中/已完成/已取消 * 交付工单的当前状态:准备交付/交付中/过户中/已完成/已取消
*/ */
@ExcelProperty("当前状态") // @ExcelProperty("状态")
private int orderStatus; // private int orderStatus;
@ExcelProperty("状态描述") @ExcelProperty("状态描述")
...@@ -111,6 +135,7 @@ public class DeliveryOrderBean { ...@@ -111,6 +135,7 @@ public class DeliveryOrderBean {
AuctionOrder auctionOrder = deliveryOrder.getAuctionOrder(); AuctionOrder auctionOrder = deliveryOrder.getAuctionOrder();
Vehicle vehicle = auctionOrder.getVehicle(); Vehicle vehicle = auctionOrder.getVehicle();
User user = deliveryOrder.getUser(); User user = deliveryOrder.getUser();
Account account = auctionOrder.getAccount();
this.deliveryOrderId = deliveryOrder.getDeliveryOrderId(); this.deliveryOrderId = deliveryOrder.getDeliveryOrderId();
this.orderCode = auctionOrder.getOrderCode(); this.orderCode = auctionOrder.getOrderCode();
this.carSeriesName = vehicle.getBaseInfo().getCarSeriesName(); this.carSeriesName = vehicle.getBaseInfo().getCarSeriesName();
...@@ -122,16 +147,20 @@ public class DeliveryOrderBean { ...@@ -122,16 +147,20 @@ public class DeliveryOrderBean {
this.orderState = deliveryOrder.getOrderState(); this.orderState = deliveryOrder.getOrderState();
this.remark = deliveryOrder.getRemark(); this.remark = deliveryOrder.getRemark();
this.appointmentTime = deliveryOrder.getAppointmentTime();
this.assignedTime = deliveryOrder.getAssignedTime();
this.vouchers = deliveryOrder.getVouchers(); this.vouchers = deliveryOrder.getVouchers();
this.checkIdCard = deliveryOrder.isCheckIdCard(); // this.orderStatus = deliveryOrder.getOrderStatus();
this.checkHandover = deliveryOrder.isCheckHandover();
this.checkKey = deliveryOrder.isCheckKey();
this.checkCertificate = deliveryOrder.isCheckCertificate();
this.orderStatus = deliveryOrder.getOrderStatus();
this.statusText = deliveryOrder.getStatusText(); this.statusText = deliveryOrder.getStatusText();
this.remarks = deliveryOrder.getRemarks(); this.remarks = deliveryOrder.getRemarks();
this.cancelReason = deliveryOrder.getCancelReason(); this.cancelReason = deliveryOrder.getCancelReason();
this.orderCreateTime = auctionOrder.getCreateTime();
this.orderUpdateTime = auctionOrder.getUpdateTime();
this.accountMobile = account.getMobile();
this.accountName = account.getAccountName();
this.venueName = vehicle.getVenue().getVenueName();
this.vin = vehicle.getBaseInfo().getVin();
this.licensePlate = vehicle.getBaseInfo().getLicensePlate();
this.sourceNo = vehicle.getBaseInfo().getSourceNo();
this.orderCode = auctionOrder.getOrderCode();
} }
} }
package com.glsx.usedcar.export;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.glsx.usedcar.export.converter.RefundStateConverter;
import com.glsx.usedcar.module.account.entity.Account;
import com.glsx.usedcar.module.finance.entity.Deposit;
import com.glsx.usedcar.module.vehicle.entity.BaseInfo;
import jakarta.persistence.Column;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.Objects;
@Data
public class DepositRefundBean {
@ExcelProperty("用户ID")
@ColumnWidth(10)
private int accountId;
@ExcelProperty("用户手机号")
@ColumnWidth(20)
private String mobile;
@ExcelProperty("用户昵称")
@ColumnWidth(20)
private String nickName;
@ExcelProperty("拍场ID")
@ColumnWidth(10)
private int auctionId;
@ExcelProperty("拍场名称")
@ColumnWidth(30)
private String auctionName;
@ExcelProperty("参拍车源号")
@ColumnWidth(20)
private String sourceNo;
@ExcelProperty("参拍车型名称")
@ColumnWidth(30)
private String carTypeName;
@ExcelProperty("商户订单号")
@ColumnWidth(25)
private String outTradeNo;
@ExcelProperty("微信支付订单号")
@ColumnWidth(25)
private String transactionId;
@ExcelProperty("支付金额(元)")
@ColumnWidth(15)
private double transactionAmount;
@ExcelProperty("支付状态")
@ColumnWidth(15)
private String paymentState;
@ExcelProperty("支付时间")
@ColumnWidth(20)
private LocalDateTime paymentTime;
@ExcelProperty("支付渠道")
@ColumnWidth(15)
private String paymentType;
@ExcelProperty("是否中拍")
@ColumnWidth(15)
private String orderState;
@ExcelProperty(value = "退款状态",converter = RefundStateConverter.class)
@ColumnWidth(15)
private Deposit.RefundState refundState;
@ExcelProperty("退款类型")
@ColumnWidth(15)
private String refundType;
@ExcelProperty("退款金额(元)")
@ColumnWidth(15)
private double refundAmount;
@ExcelProperty("微信退款订单号")
@ColumnWidth(25)
private String outRefundNo;
@ExcelProperty("退款申请时间")
@ColumnWidth(20)
private LocalDateTime refundTime;
@ExcelProperty("退款成功时间")
@ColumnWidth(20)
private LocalDateTime refundSuccessTime;
@ExcelProperty("手动退款备注")
@ColumnWidth(35)
private String refundRemark;
@ExcelProperty("退款操作人")
@ColumnWidth(15)
private String refundOperator;
public DepositRefundBean(Deposit deposit) {
Account account = deposit.getAccount();
this.accountId = account.getAccountId();
this.mobile = account.getMobile();
this.nickName = account.getNickName();
this.auctionId = deposit.getAuctionVehicle().getAuction().getAuctionId();
this.auctionName = deposit.getAuctionVehicle().getAuction().getAuctionName();
BaseInfo baseInfo = deposit.getAuctionVehicle().getVehicle().getBaseInfo();
this.sourceNo = baseInfo.getSourceNo();
this.carTypeName = baseInfo.getCarSeriesName() + " "+baseInfo.getCarTypeName();
// this.outTradeNo = deposit.getOutTradeNo();
// this.transactionId = deposit.getTransactionId();
// this.transactionAmount = Math.abs(deposit.getTransaction().getAmount());
// this.paymentState = Objects.nonNull(deposit.getPaymentTime()) ? "已支付" : "已关闭";
// this.paymentTime = deposit.getPaymentTime();
// this.paymentType = "微信支付";
// this.orderState = Objects.nonNull(deposit.getAuctionOrder()) ? "是" : "否";
// this.refundType = deposit.getRefundType();
// this.refundAmount = Objects.nonNull(deposit.getRefundSuccessTime()) ? deposit.getAmount() : 0;
// this.outRefundNo = deposit.getOutRefundNo();
// this.refundTime = deposit.getRefundTime();
// this.refundSuccessTime = deposit.getRefundSuccessTime();
// this.refundState = deposit.getRefundState();
// this.refundRemark = deposit.getRefundRemark();
// this.refundOperator = deposit.getRefundOperator();
}
}
...@@ -33,6 +33,10 @@ public class OrderTransactionBean { ...@@ -33,6 +33,10 @@ public class OrderTransactionBean {
@ColumnWidth(20) @ColumnWidth(20)
private String transactionCode; private String transactionCode;
@ExcelProperty("交易时间")
@ColumnWidth(20)
private LocalDateTime transactionTime;
@ExcelProperty("订单编号") @ExcelProperty("订单编号")
@ColumnWidth(20) @ColumnWidth(20)
private String orderCode; private String orderCode;
...@@ -46,6 +50,9 @@ public class OrderTransactionBean { ...@@ -46,6 +50,9 @@ public class OrderTransactionBean {
@ColumnWidth(15) @ColumnWidth(15)
private String mobile; private String mobile;
@ExcelProperty("车源号(平台唯一识别编号)")
private String sourceNo;
@ExcelProperty("车系名字") @ExcelProperty("车系名字")
@ColumnWidth(15) @ColumnWidth(15)
private String carSeriesName; private String carSeriesName;
...@@ -54,6 +61,14 @@ public class OrderTransactionBean { ...@@ -54,6 +61,14 @@ public class OrderTransactionBean {
@ColumnWidth(30) @ColumnWidth(30)
private String carTypeName; private String carTypeName;
@ExcelProperty("车辆保管人姓名")
private String custodianName;
@ExcelProperty("车辆保管人联系方式")
private String custodianPhone;
@ExcelProperty("车辆停放地址信息")
private String handoverAddress;
@ExcelProperty("交易说明") @ExcelProperty("交易说明")
@ColumnWidth(35) @ColumnWidth(35)
...@@ -66,16 +81,20 @@ public class OrderTransactionBean { ...@@ -66,16 +81,20 @@ public class OrderTransactionBean {
private List<FileInfo> payVouchers; private List<FileInfo> payVouchers;
@ExcelProperty(value = "审核状态", converter = AuditStateConverter.class) @ExcelProperty(value = "工单状态", converter = AuditStateConverter.class)
private AuditState auditState; private AuditState auditState;
@ExcelProperty("应付金额")
@ColumnWidth(15)
private double totalAmount;
@ExcelProperty("实际到账金额") @ExcelProperty("实际到账金额")
@ColumnWidth(15) @ColumnWidth(15)
private double amount; private double amount;
@ExcelProperty(value = "支付类型", converter = PaymentTypeConverter.class) @ExcelProperty(value = "支付方式", converter = PaymentTypeConverter.class)
@ColumnWidth(10) @ColumnWidth(10)
private OrderTransaction.PaymentType paymentType; private OrderTransaction.PaymentType paymentType;
...@@ -95,6 +114,10 @@ public class OrderTransactionBean { ...@@ -95,6 +114,10 @@ public class OrderTransactionBean {
private LocalDateTime auditTime; private LocalDateTime auditTime;
@ExcelProperty("创建时间")
@ColumnWidth(20)
private LocalDateTime createTime;
public OrderTransactionBean(OrderTransaction transaction) { public OrderTransactionBean(OrderTransaction transaction) {
Account account = transaction.getAuctionOrder().getAccount(); Account account = transaction.getAuctionOrder().getAccount();
Vehicle vehicle = transaction.getAuctionOrder().getVehicle(); Vehicle vehicle = transaction.getAuctionOrder().getVehicle();
...@@ -110,6 +133,13 @@ public class OrderTransactionBean { ...@@ -110,6 +133,13 @@ public class OrderTransactionBean {
this.auditState = transaction.getAuditState(); this.auditState = transaction.getAuditState();
this.amount = transaction.getAmount(); this.amount = transaction.getAmount();
this.paymentType = transaction.getPaymentType(); this.paymentType = transaction.getPaymentType();
this.totalAmount = transaction.getAuctionOrder().getOrderPrice() + transaction.getAuctionOrder().getCommissionPrice();
this.createTime = transaction.getCreateTime();
this.transactionTime = transaction.getCreateTime();
this.sourceNo = vehicle.getBaseInfo().getSourceNo();
this.custodianName = vehicle.getCustodianInfo().getCustodianName();
this.custodianPhone = vehicle.getCustodianInfo().getCustodianPhone();
this.handoverAddress = vehicle.getCustodianInfo().getHandoverAddress();
} }
public void setApproveHistory(ApproveHistory approveHistory) { public void setApproveHistory(ApproveHistory approveHistory) {
......
...@@ -4,10 +4,13 @@ import com.alibaba.excel.annotation.ExcelIgnore; ...@@ -4,10 +4,13 @@ import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.glsx.usedcar.export.converter.ListConverter; import com.glsx.usedcar.export.converter.ListConverter;
import com.glsx.usedcar.export.converter.VehicleStateConverter;
import com.glsx.usedcar.module.vehicle.entity.*; import com.glsx.usedcar.module.vehicle.entity.*;
import jakarta.persistence.Column;
import lombok.Data; import lombok.Data;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List; import java.util.List;
@Data @Data
...@@ -72,12 +75,15 @@ public class VehicleBean { ...@@ -72,12 +75,15 @@ public class VehicleBean {
// 从LicenseInfo补充的属性 // 从LicenseInfo补充的属性
@ExcelProperty("年检到期") @ExcelProperty("年检到期")
@ColumnWidth(15)
private LocalDate annualInspectionExpiry; private LocalDate annualInspectionExpiry;
@ExcelProperty("交强险到期") @ExcelProperty("交强险到期")
@ColumnWidth(15)
private LocalDate compulsoryInsuranceExpiry; private LocalDate compulsoryInsuranceExpiry;
@ExcelProperty("商业险到期日") @ExcelProperty("商业险到期日")
@ColumnWidth(15)
private LocalDate commercialInsuranceExpiry; private LocalDate commercialInsuranceExpiry;
@ExcelProperty("钥匙数") @ExcelProperty("钥匙数")
...@@ -137,12 +143,14 @@ public class VehicleBean { ...@@ -137,12 +143,14 @@ public class VehicleBean {
private String carCityName; private String carCityName;
@ExcelProperty("首次上牌时间") @ExcelProperty("首次上牌时间")
@ColumnWidth(15)
private LocalDate registrationDate; private LocalDate registrationDate;
@ExcelProperty("过户次数") @ExcelProperty("过户次数")
private int transferCount; private int transferCount;
@ExcelProperty("最近过户时间") @ExcelProperty("最近过户时间")
@ColumnWidth(15)
private LocalDate lastTransferDate; private LocalDate lastTransferDate;
@ExcelProperty("使用性质:1-非营运/2-营运/3-营转非") @ExcelProperty("使用性质:1-非营运/2-营运/3-营转非")
...@@ -196,6 +204,32 @@ public class VehicleBean { ...@@ -196,6 +204,32 @@ public class VehicleBean {
@ExcelProperty("车况描述") @ExcelProperty("车况描述")
private String conditionDescription; private String conditionDescription;
@ExcelProperty("起拍价")
@ColumnWidth(12)
private double startingBidPrice;
@ExcelProperty("保留价")
@ColumnWidth(12)
private double reservePrice;
@ExcelProperty("创建时间")
@ColumnWidth(15)
private LocalDateTime createTime;
@ExcelProperty("入库时间")
@ColumnWidth(15)
private LocalDateTime warehousingTime;
@ExcelProperty("更新时间")
@ColumnWidth(15)
private LocalDateTime updateTime;
@ExcelProperty(value = "车辆状态", converter = VehicleStateConverter.class)
@ColumnWidth(15)
private Vehicle.VehicleState vehicleState;
// 无参构造方法(EasyExcel需要) // 无参构造方法(EasyExcel需要)
public VehicleBean() { public VehicleBean() {
} }
...@@ -205,6 +239,14 @@ public class VehicleBean { ...@@ -205,6 +239,14 @@ public class VehicleBean {
public VehicleBean(Vehicle vehicle) { public VehicleBean(Vehicle vehicle) {
// 基础属性 // 基础属性
this.vehicleId = vehicle.getVehicleId(); this.vehicleId = vehicle.getVehicleId();
this.createTime = vehicle.getCreateTime();
this.updateTime = vehicle.getUpdateTime();
this.warehousingTime = vehicle.getWarehousingTime();
this.vehicleState = vehicle.getVehicleState();
this.startingBidPrice = vehicle.getStartingBidPrice();
this.reservePrice = vehicle.getReservePrice();
BaseInfo baseInfo = vehicle.getBaseInfo(); BaseInfo baseInfo = vehicle.getBaseInfo();
OwnerInfo ownerInfo = vehicle.getOwnerInfo(); OwnerInfo ownerInfo = vehicle.getOwnerInfo();
LicenseInfo licenseInfo = vehicle.getLicenseInfo(); LicenseInfo licenseInfo = vehicle.getLicenseInfo();
......
...@@ -2,6 +2,7 @@ package com.glsx.usedcar.export; ...@@ -2,6 +2,7 @@ package com.glsx.usedcar.export;
import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.github.binarywang.wxpay.constant.WxPayConstants; import com.github.binarywang.wxpay.constant.WxPayConstants;
import com.glsx.usedcar.export.converter.AuditStateConverter; import com.glsx.usedcar.export.converter.AuditStateConverter;
import com.glsx.usedcar.export.converter.WithdrawStateConverter; import com.glsx.usedcar.export.converter.WithdrawStateConverter;
...@@ -31,59 +32,60 @@ public class WithdrawBean { ...@@ -31,59 +32,60 @@ public class WithdrawBean {
private int withdrawId; private int withdrawId;
@ExcelProperty("用户名") @ExcelProperty("用户名")
@ColumnWidth(15)
private String accountName; private String accountName;
@ExcelProperty("手机号") @ExcelProperty("手机号")
@ColumnWidth(15)
private String mobile; private String mobile;
@ExcelProperty("流水号") @ExcelProperty("流水号")
@ColumnWidth(15)
private String withdrawCode; private String withdrawCode;
@ExcelProperty("审核备注") @ExcelProperty("审核备注")
@ColumnWidth(30)
private String auditRemark; private String auditRemark;
@ExcelProperty("申请时间") @ExcelProperty("申请时间")
@ColumnWidth(15)
private LocalDateTime applyWithdrawTime; private LocalDateTime applyWithdrawTime;
@ExcelProperty("审核时间") @ExcelProperty("审核时间")
@ColumnWidth(15)
private LocalDateTime auditTime; private LocalDateTime auditTime;
@ExcelProperty("提现金额") @ExcelProperty("提现金额")
@ColumnWidth(15)
private double amount; private double amount;
@ExcelProperty(value = "审核状态", converter = AuditStateConverter.class) @ExcelProperty(value = "审核状态", converter = AuditStateConverter.class)
@ColumnWidth(15)
private AuditState auditState; private AuditState auditState;
@ExcelProperty("付款单号") @ExcelProperty("已退款金额")
private String transferBillNo; @ColumnWidth(15)
private Double refundAmount;
@ExcelProperty(value = "付款状态", converter = WithdrawStateConverter.class)
private String state;
@ExcelProperty("失败原因") // @ExcelProperty("发起付款时间")
private String failReason; // private LocalDateTime paymentTime;
@ExcelProperty("付款金额")
private Double paymentAmount;
@ExcelProperty("发起付款时间")
private LocalDateTime paymentTime;
@ExcelProperty("转账成功时间") @ExcelProperty("转账成功时间")
@ColumnWidth(15)
private LocalDateTime transferTime; private LocalDateTime transferTime;
@ExcelProperty("付款备注") @ExcelProperty("付款备注")
@ColumnWidth(30)
private String transferRemark; private String transferRemark;
public WithdrawBean(Withdraw withdraw) { public WithdrawBean(Withdraw withdraw) {
...@@ -96,11 +98,8 @@ public class WithdrawBean { ...@@ -96,11 +98,8 @@ public class WithdrawBean {
this.auditTime = withdraw.getAuditTime(); this.auditTime = withdraw.getAuditTime();
this.amount = withdraw.getAmount(); this.amount = withdraw.getAmount();
this.auditState = withdraw.getAuditState(); this.auditState = withdraw.getAuditState();
this.transferBillNo = withdraw.getTransferBillNo(); this.refundAmount = withdraw.getRefundAmount();
this.state = withdraw.getState(); // this.paymentTime = withdraw.getPaymentTime();
this.failReason = withdraw.getFailReason();
this.paymentAmount = withdraw.getPaymentAmount();
this.paymentTime = withdraw.getPaymentTime();
this.transferTime = withdraw.getTransferTime(); this.transferTime = withdraw.getTransferTime();
this.transferRemark = withdraw.getTransferRemark(); this.transferRemark = withdraw.getTransferRemark();
} }
......
package com.glsx.usedcar.export.converter;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.converters.WriteConverterContext;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.data.ReadCellData;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import com.glsx.usedcar.module.account.entity.Account;
import com.glsx.usedcar.module.finance.entity.Deposit;
import org.summerframework.core.i18n.EnumMessage;
public class RefundStateConverter implements Converter<Deposit.RefundState> {
@Override
public Deposit.RefundState convertToJavaData(ReadCellData<?> cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
return Converter.super.convertToJavaData(cellData, contentProperty, globalConfiguration);
}
@Override
public WriteCellData<?> convertToExcelData(WriteConverterContext<Deposit.RefundState> context) {
Deposit.RefundState auditState = context.getValue();
String i18nMessage = EnumMessage.getI18nMessage("Deposit.RefundState.", auditState);
return new WriteCellData<>(i18nMessage);
}
}
package com.glsx.usedcar.export.converter;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.converters.WriteConverterContext;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.data.ReadCellData;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import com.glsx.usedcar.module.meta.AuditState;
import com.glsx.usedcar.module.vehicle.entity.Vehicle;
import org.summerframework.core.i18n.EnumMessage;
public class VehicleStateConverter implements Converter<Vehicle.VehicleState> {
@Override
public CellDataTypeEnum supportExcelTypeKey() {
return CellDataTypeEnum.STRING;
}
@Override
public Vehicle.VehicleState convertToJavaData(ReadCellData<?> cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
return Converter.super.convertToJavaData(cellData, contentProperty, globalConfiguration);
}
@Override
public WriteCellData<?> convertToExcelData(WriteConverterContext<Vehicle.VehicleState> context) {
Vehicle.VehicleState auditState = context.getValue();
String i18nMessage = EnumMessage.getI18nMessage(auditState);
return new WriteCellData<>(i18nMessage);
}
}
...@@ -5,6 +5,7 @@ import com.glsx.usedcar.export.DeliveryOrderBean; ...@@ -5,6 +5,7 @@ import com.glsx.usedcar.export.DeliveryOrderBean;
import com.glsx.usedcar.export.ExcelExporter; import com.glsx.usedcar.export.ExcelExporter;
import com.glsx.usedcar.module.auction.entity.*; import com.glsx.usedcar.module.auction.entity.*;
import com.glsx.usedcar.module.auction.service.AppealService; import com.glsx.usedcar.module.auction.service.AppealService;
import com.glsx.usedcar.module.vehicle.entity.Vehicle_;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import jakarta.persistence.criteria.Fetch; import jakarta.persistence.criteria.Fetch;
import jakarta.persistence.criteria.JoinType; import jakarta.persistence.criteria.JoinType;
...@@ -99,7 +100,9 @@ public class AppealController { ...@@ -99,7 +100,9 @@ public class AppealController {
@PostMapping("exportAppeal") @PostMapping("exportAppeal")
public void exportAppeal(@RequestBody Pagination<Appeal> pagination, HttpServletResponse response) throws IOException { public void exportAppeal(@RequestBody Pagination<Appeal> pagination, HttpServletResponse response) throws IOException {
pagination.setLimit(9999); pagination.setLimit(9999);
pagination.addFetch(root -> root.fetch(Appeal_.auctionOrder, JoinType.LEFT).fetch(AuctionOrder_.vehicle, JoinType.LEFT).fetch(Vehicle_.venue, JoinType.LEFT));
List<Appeal> vehicles = pageAppeal(pagination).getContent(); List<Appeal> vehicles = pageAppeal(pagination).getContent();
List<AppealBean> vehicleBeans = vehicles.stream().map(AppealBean::new).toList(); List<AppealBean> vehicleBeans = vehicles.stream().map(AppealBean::new).toList();
ExcelExporter.exportExcel(response, "交付工单列表", "交付工单列表", AppealBean.class, vehicleBeans); ExcelExporter.exportExcel(response, "交付工单列表", "交付工单列表", AppealBean.class, vehicleBeans);
} }
......
package com.glsx.usedcar.web.rest.account; package com.glsx.usedcar.web.rest.account;
import cn.binarywang.wx.miniapp.api.WxMaQrcodeService;
import cn.binarywang.wx.miniapp.api.WxMaService;
import com.glsx.usedcar.export.AccountBean; import com.glsx.usedcar.export.AccountBean;
import com.glsx.usedcar.export.ExcelExporter; import com.glsx.usedcar.export.ExcelExporter;
import com.glsx.usedcar.module.account.domain.*; import com.glsx.usedcar.module.account.domain.*;
...@@ -22,8 +24,10 @@ import jakarta.persistence.criteria.Predicate; ...@@ -22,8 +24,10 @@ import jakarta.persistence.criteria.Predicate;
import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.Valid; import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.error.WxErrorException;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication; import org.springframework.security.core.Authentication;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -60,6 +64,8 @@ public class AccountController { ...@@ -60,6 +64,8 @@ public class AccountController {
private BidService bidService; private BidService bidService;
@Resource @Resource
private DepositService depositService; private DepositService depositService;
@Resource
private WxMaService wxMaService;
/** /**
* 分页查询个人账户 * 分页查询个人账户
...@@ -205,6 +211,12 @@ public class AccountController { ...@@ -205,6 +211,12 @@ public class AccountController {
return true; return true;
} }
@PostMapping("setTagAccounts")
public boolean setTagAccounts(@RequestBody TagAccount tagAccount) {
accountService.setTagAccounts(tagAccount);
return true;
}
/** /**
* 审核用户申请 * 审核用户申请
* *
...@@ -284,8 +296,20 @@ public class AccountController { ...@@ -284,8 +296,20 @@ public class AccountController {
@PostMapping("exportAccount") @PostMapping("exportAccount")
public void exportAccount(@RequestBody Pagination<Account> pagination, HttpServletResponse response) throws IOException { public void exportAccount(@RequestBody Pagination<Account> pagination, HttpServletResponse response) throws IOException {
pagination.setLimit(9999); pagination.setLimit(9999);
pagination.addFetch(root -> root.fetch(Account_.accountTags, JoinType.LEFT));
List<Account> vehicles = pageAccount(pagination).getContent(); List<Account> vehicles = pageAccount(pagination).getContent();
List<AccountBean> vehicleBeans = vehicles.stream().map(AccountBean::new).toList(); List<AccountBean> vehicleBeans = vehicles.stream().map(AccountBean::new).toList();
ExcelExporter.exportExcel(response, "用户列表", "用户列表", AccountBean.class, vehicleBeans); ExcelExporter.exportExcel(response, "用户列表", "用户列表", AccountBean.class, vehicleBeans);
} }
@GetMapping("accountTagQrCode")
public ResponseEntity<byte[]> accountTagQrCode(@RequestParam String code, HttpServletResponse response) throws WxErrorException {
WxMaQrcodeService qrcodeService = wxMaService.getQrcodeService();
byte[] releases = qrcodeService.createWxaCodeUnlimitBytes(code, "pages/tabbar/HomePage", false, "release", 430, true, null, false);
//设置页面不缓存
response.setHeader("Pragma", "No-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0);
return ResponseEntity.ok(releases);
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -2,6 +2,7 @@ package com.glsx.usedcar.web.rest.auction; ...@@ -2,6 +2,7 @@ package com.glsx.usedcar.web.rest.auction;
import com.glsx.usedcar.module.analysis.domain.AuctionVehicleRate; import com.glsx.usedcar.module.analysis.domain.AuctionVehicleRate;
import com.glsx.usedcar.module.auction.domain.AuctionControl; import com.glsx.usedcar.module.auction.domain.AuctionControl;
import com.glsx.usedcar.module.auction.domain.AuctionVehicleAddon;
import com.glsx.usedcar.module.auction.domain.PendingAuction; import com.glsx.usedcar.module.auction.domain.PendingAuction;
import com.glsx.usedcar.module.auction.entity.*; import com.glsx.usedcar.module.auction.entity.*;
import com.glsx.usedcar.module.auction.service.AuctionChangeService; import com.glsx.usedcar.module.auction.service.AuctionChangeService;
...@@ -46,8 +47,6 @@ public class AuctionController { ...@@ -46,8 +47,6 @@ public class AuctionController {
private TrackService trackService; private TrackService trackService;
@Resource @Resource
private AuctionOrderService auctionOrderService;
@Resource
private AuctionChangeService auctionChangeService; private AuctionChangeService auctionChangeService;
/** /**
...@@ -272,4 +271,9 @@ public class AuctionController { ...@@ -272,4 +271,9 @@ public class AuctionController {
return auctionService.getAuctionStateCountByType(auctionType); return auctionService.getAuctionStateCountByType(auctionType);
} }
@PostMapping("addAuctionVehicles")
public int addAuctionVehicles(@RequestBody AuctionVehicleAddon auctionVehicleAddon) throws FieldException {
auctionService.addAuctionVehicles(auctionVehicleAddon);
return auctionVehicleAddon.getAuctionId();
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -10,6 +10,7 @@ import com.glsx.usedcar.module.auction.service.AuctionOrderService; ...@@ -10,6 +10,7 @@ import com.glsx.usedcar.module.auction.service.AuctionOrderService;
import com.glsx.usedcar.module.auction.service.AuctionService; import com.glsx.usedcar.module.auction.service.AuctionService;
import com.glsx.usedcar.module.security.entity.User; import com.glsx.usedcar.module.security.entity.User;
import com.glsx.usedcar.module.track.entity.ApproveHistory; import com.glsx.usedcar.module.track.entity.ApproveHistory;
import com.glsx.usedcar.module.vehicle.entity.Vehicle_;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import jakarta.persistence.criteria.JoinType; import jakarta.persistence.criteria.JoinType;
import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponse;
...@@ -147,6 +148,7 @@ public class AuctionOrderController { ...@@ -147,6 +148,7 @@ public class AuctionOrderController {
public void exportAuctionOrder(@RequestBody Pagination<AuctionOrder> pagination, HttpServletResponse response) throws IOException { public void exportAuctionOrder(@RequestBody Pagination<AuctionOrder> pagination, HttpServletResponse response) throws IOException {
pagination.setLimit(9999); pagination.setLimit(9999);
pagination.addFetch(root -> root.fetch(AuctionOrder_.auction, JoinType.LEFT)); pagination.addFetch(root -> root.fetch(AuctionOrder_.auction, JoinType.LEFT));
pagination.addFetch(root -> root.fetch(AuctionOrder_.vehicle, JoinType.LEFT).fetch(Vehicle_.venue, JoinType.LEFT));
List<AuctionOrder> vehicles = pageAuctionOrder(pagination).getContent(); List<AuctionOrder> vehicles = pageAuctionOrder(pagination).getContent();
List<AuctionOrderBean> vehicleBeans = vehicles.stream().map(AuctionOrderBean::new).toList(); List<AuctionOrderBean> vehicleBeans = vehicles.stream().map(AuctionOrderBean::new).toList();
ExcelExporter.exportExcel(response, "订单列表", "订单列表", AuctionOrderBean.class, vehicleBeans); ExcelExporter.exportExcel(response, "订单列表", "订单列表", AuctionOrderBean.class, vehicleBeans);
......
package com.glsx.usedcar.web.rest.finance; package com.glsx.usedcar.web.rest.finance;
import com.github.binarywang.wxpay.bean.request.WxPayRefundV3Request;
import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderV3Request;
import com.github.binarywang.wxpay.bean.result.WxPayRefundV3Result;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.github.binarywang.wxpay.service.WxPayService;
import com.glsx.usedcar.export.DepositBean; import com.glsx.usedcar.export.DepositBean;
import com.glsx.usedcar.export.DepositRefundBean;
import com.glsx.usedcar.export.ExcelExporter; import com.glsx.usedcar.export.ExcelExporter;
import com.glsx.usedcar.export.WithdrawBean; import com.glsx.usedcar.export.WithdrawBean;
import com.glsx.usedcar.module.auction.entity.AuctionVehicle; import com.glsx.usedcar.module.account.entity.Account;
import com.glsx.usedcar.module.auction.entity.AuctionVehicle_; import com.glsx.usedcar.module.account.entity.Account_;
import com.glsx.usedcar.module.auction.entity.*;
import com.glsx.usedcar.module.auction.service.AuctionOrderService;
import com.glsx.usedcar.module.finance.domain.DepositStat; import com.glsx.usedcar.module.finance.domain.DepositStat;
import com.glsx.usedcar.module.finance.entity.Deposit; import com.glsx.usedcar.module.finance.entity.Deposit;
import com.glsx.usedcar.module.finance.entity.DepositRule; import com.glsx.usedcar.module.finance.entity.DepositRule;
import com.glsx.usedcar.module.finance.entity.Deposit_; import com.glsx.usedcar.module.finance.entity.Deposit_;
import com.glsx.usedcar.module.finance.entity.Withdraw; import com.glsx.usedcar.module.finance.entity.Withdraw;
import com.glsx.usedcar.module.finance.service.DepositService; import com.glsx.usedcar.module.finance.service.DepositService;
import com.glsx.usedcar.module.finance.service.TransactionService;
import com.glsx.usedcar.module.finance.service.WithdrawService; import com.glsx.usedcar.module.finance.service.WithdrawService;
import com.glsx.usedcar.module.security.entity.User;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import jakarta.persistence.criteria.Fetch; import jakarta.persistence.criteria.*;
import jakarta.persistence.criteria.JoinType;
import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.Valid; import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.summerframework.orm.paging.Pagination; import org.summerframework.orm.paging.Pagination;
...@@ -44,6 +55,11 @@ public class DepositController { ...@@ -44,6 +55,11 @@ public class DepositController {
@Resource @Resource
private WithdrawService withdrawService; private WithdrawService withdrawService;
@Resource
private AuctionOrderService auctionOrderService;
@Resource
private TransactionService transactionService;
/** /**
* 分页查询保证金规则 * 分页查询保证金规则
* *
...@@ -67,6 +83,17 @@ public class DepositController { ...@@ -67,6 +83,17 @@ public class DepositController {
return depositService.pageDeposit(pagination); return depositService.pageDeposit(pagination);
} }
@PostMapping("pageDepositFetchOrder")
public Page<Deposit> pageDepositFetchOrder(@RequestBody Pagination<Deposit> pagination) {
// pagination.addCondition((root, query, builder) -> root.get(Deposit_.paymentTime).isNotNull());
Page<Deposit> depositPage = pageDeposit(pagination);
for (Deposit deposit : depositPage) {
AuctionOrder auctionOrder = auctionOrderService.getAuctionOrderByAccountAndAuctionVehicle(deposit.getAccount(), deposit.getAuctionVehicle());
deposit.setAuctionOrder(auctionOrder);
}
return depositPage;
}
/** /**
* 根据id查询保证金规则 * 根据id查询保证金规则
...@@ -170,9 +197,18 @@ public class DepositController { ...@@ -170,9 +197,18 @@ public class DepositController {
ExcelExporter.exportExcel(response, "保证金列表", "保证金列表", DepositBean.class, vehicleBeans); ExcelExporter.exportExcel(response, "保证金列表", "保证金列表", DepositBean.class, vehicleBeans);
} }
@PostMapping("exportDepositRefund")
public void exportDepositRefund(@RequestBody Pagination<Deposit> pagination, HttpServletResponse response) throws IOException {
pagination.setLimit(9999);
List<Deposit> vehicles = pageDepositFetchOrder(pagination).getContent();
List<DepositRefundBean> vehicleBeans = vehicles.stream().map(DepositRefundBean::new).toList();
ExcelExporter.exportExcel(response, "微信支付流水详情", "微信支付流水详情", DepositRefundBean.class, vehicleBeans);
}
@GetMapping("getFreezeAmountByAccount") @GetMapping("getFreezeAmountByAccount")
public double getFreezeAmountByAccount(@RequestParam int accountId) { public double getFreezeAmountByAccount(@RequestParam int accountId) {
return depositService.getFreezeAmountByAccount(accountId); return depositService.getFreezeAmountByAccount(accountId);
} }
} }
\ No newline at end of file \ No newline at end of file
package com.glsx.usedcar.web.rest.finance;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.glsx.usedcar.module.account.entity.Account;
import com.glsx.usedcar.module.finance.entity.Recharge;
import com.glsx.usedcar.module.finance.entity.Recharge_;
import com.glsx.usedcar.module.finance.entity.Refund;
import com.glsx.usedcar.module.finance.entity.Withdraw;
import com.glsx.usedcar.module.finance.service.TransactionService;
import com.glsx.usedcar.module.meta.AuditState;
import com.glsx.usedcar.module.security.entity.User;
import com.glsx.usedcar.module.track.entity.ApproveHistory;
import jakarta.annotation.Resource;
import jakarta.persistence.criteria.JoinType;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.domain.Page;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.*;
import org.summerframework.core.exception.FieldException;
import org.summerframework.orm.paging.Pagination;
import java.util.List;
import java.util.Map;
@Slf4j
@RestController
@RequestMapping("/rest/recharge")
public class RechargeController {
@Resource
private TransactionService transactionService;
@PostMapping("pageRecharge")
public Page<Recharge> pageRecharge(@RequestBody Pagination<Recharge> pagination) {
// pagination.addFilter(account, Recharge_.account);
pagination.addFetch(root -> root.fetch(Recharge_.account, JoinType.LEFT));
pagination.addCondition((root, query, builder) -> root.get(Recharge_.paymentTime).isNotNull());
return transactionService.pageRecharge(pagination);
}
// @GetMapping("getRechargesByAccountId")
// public List<Recharge> getRechargesByAccountId(@RequestParam int accountId) {
// List<Recharge> recharges = transactionService.getRechargesByAccountId(accountId, AuditState.REJECTED);
// return recharges;
// }
@GetMapping("getRechargeById")
public Recharge getRechargeById(@RequestParam int rechargeId) {
return transactionService.getRechargeById(rechargeId);
}
@GetMapping("getRefundsByRechargeId")
public List<Refund> getRefundsByRechargeId(@RequestParam int rechargeId) {
return transactionService.getRefundsByRechargeId(rechargeId);
}
}
...@@ -7,10 +7,7 @@ import com.glsx.usedcar.module.auction.entity.AuctionOrder_; ...@@ -7,10 +7,7 @@ import com.glsx.usedcar.module.auction.entity.AuctionOrder_;
import com.glsx.usedcar.module.auction.service.BreachService; import com.glsx.usedcar.module.auction.service.BreachService;
import com.glsx.usedcar.module.finance.domain.OrderTransactionAmountStat; import com.glsx.usedcar.module.finance.domain.OrderTransactionAmountStat;
import com.glsx.usedcar.module.finance.domain.OrderTransactionStat; import com.glsx.usedcar.module.finance.domain.OrderTransactionStat;
import com.glsx.usedcar.module.finance.entity.OrderTransaction; import com.glsx.usedcar.module.finance.entity.*;
import com.glsx.usedcar.module.finance.entity.OrderTransaction_;
import com.glsx.usedcar.module.finance.entity.Transaction;
import com.glsx.usedcar.module.finance.entity.Transaction_;
import com.glsx.usedcar.module.finance.service.TransactionService; import com.glsx.usedcar.module.finance.service.TransactionService;
import com.glsx.usedcar.module.meta.AuditState; import com.glsx.usedcar.module.meta.AuditState;
import com.glsx.usedcar.module.security.entity.User; import com.glsx.usedcar.module.security.entity.User;
...@@ -163,6 +160,13 @@ public class TransactionController { ...@@ -163,6 +160,13 @@ public class TransactionController {
return transactionService.getOrderTransactionCountByAuditState(); return transactionService.getOrderTransactionCountByAuditState();
} }
@GetMapping("getRefundsByWithdrawId")
public List<Refund> getRefundsByWithdrawId(@RequestParam int withdrawId) {
return transactionService.getRefundsByWithdrawId(withdrawId);
}
@PostMapping("updateOrderTransactionDesc") @PostMapping("updateOrderTransactionDesc")
public OrderTransaction updateOrderTransactionDesc(@RequestBody OrderTransaction orderTransaction) throws FieldException { public OrderTransaction updateOrderTransactionDesc(@RequestBody OrderTransaction orderTransaction) throws FieldException {
return transactionService.updateOrderTransactionDesc(orderTransaction.getTransactionId(), orderTransaction.getTransactionDesc()); return transactionService.updateOrderTransactionDesc(orderTransaction.getTransactionId(), orderTransaction.getTransactionDesc());
......
...@@ -18,6 +18,7 @@ import lombok.extern.slf4j.Slf4j; ...@@ -18,6 +18,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.security.core.Authentication; import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.summerframework.core.exception.FieldException;
import org.summerframework.orm.paging.Pagination; import org.summerframework.orm.paging.Pagination;
import java.io.IOException; import java.io.IOException;
...@@ -85,7 +86,7 @@ public class WithdrawController { ...@@ -85,7 +86,7 @@ public class WithdrawController {
* @return * @return
*/ */
@PostMapping("auditWithdraw") @PostMapping("auditWithdraw")
public Withdraw auditWithdraw(@Valid @RequestBody ApproveHistory approveHistory, Authentication authentication) throws WxPayException { public Withdraw auditWithdraw(@Valid @RequestBody ApproveHistory approveHistory, Authentication authentication) throws WxPayException, FieldException {
approveHistory.setUser((User) authentication.getPrincipal()); approveHistory.setUser((User) authentication.getPrincipal());
return withdrawService.auditWithdraw(approveHistory); return withdrawService.auditWithdraw(approveHistory);
} }
......
...@@ -7,6 +7,7 @@ import com.glsx.usedcar.module.auction.entity.AuctionOrder_; ...@@ -7,6 +7,7 @@ import com.glsx.usedcar.module.auction.entity.AuctionOrder_;
import com.glsx.usedcar.module.auction.entity.DeliveryOrder; import com.glsx.usedcar.module.auction.entity.DeliveryOrder;
import com.glsx.usedcar.module.auction.entity.DeliveryOrder_; import com.glsx.usedcar.module.auction.entity.DeliveryOrder_;
import com.glsx.usedcar.module.auction.service.DeliveryOrderService; import com.glsx.usedcar.module.auction.service.DeliveryOrderService;
import com.glsx.usedcar.module.vehicle.entity.Vehicle_;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import jakarta.persistence.criteria.Fetch; import jakarta.persistence.criteria.Fetch;
import jakarta.persistence.criteria.JoinType; import jakarta.persistence.criteria.JoinType;
...@@ -142,6 +143,7 @@ public class DeliveryOrderController { ...@@ -142,6 +143,7 @@ public class DeliveryOrderController {
public void exportDeliveryOrder(@RequestBody Pagination<DeliveryOrder> pagination, HttpServletResponse response) throws IOException { public void exportDeliveryOrder(@RequestBody Pagination<DeliveryOrder> pagination, HttpServletResponse response) throws IOException {
pagination.setLimit(9999); pagination.setLimit(9999);
pagination.addFetch(root -> root.fetch(DeliveryOrder_.user, JoinType.LEFT)); pagination.addFetch(root -> root.fetch(DeliveryOrder_.user, JoinType.LEFT));
pagination.addFetch(root -> root.fetch(DeliveryOrder_.auctionOrder, JoinType.LEFT).fetch(AuctionOrder_.vehicle, JoinType.LEFT).fetch(Vehicle_.venue, JoinType.LEFT));
List<DeliveryOrder> vehicles = pageDeliveryOrder(pagination).getContent(); List<DeliveryOrder> vehicles = pageDeliveryOrder(pagination).getContent();
List<DeliveryOrderBean> vehicleBeans = vehicles.stream().map(DeliveryOrderBean::new).toList(); List<DeliveryOrderBean> vehicleBeans = vehicles.stream().map(DeliveryOrderBean::new).toList();
ExcelExporter.exportExcel(response, "交付工单列表", "交付工单列表", DeliveryOrderBean.class, vehicleBeans); ExcelExporter.exportExcel(response, "交付工单列表", "交付工单列表", DeliveryOrderBean.class, vehicleBeans);
......
...@@ -1455,6 +1455,27 @@ ...@@ -1455,6 +1455,27 @@
] ]
}, },
{ {
"code": "deposit_refund",
"name": "微信支付流水管理",
"type": "MENU",
"enabled": false,
"value": "/finance/deposit/refund",
"children": [
{
"code": "deposit_refund_1",
"name": "导出数据",
"type": "BUTTON",
"enabled": true
},
{
"code": "deposit_refund_2",
"name": "手动退款",
"type": "BUTTON",
"enabled": true
}
]
},
{
"code": "finance_withdraw", "code": "finance_withdraw",
"name": "提现审核", "name": "提现审核",
"type": "MENU", "type": "MENU",
...@@ -1530,6 +1551,39 @@ ...@@ -1530,6 +1551,39 @@
] ]
}, },
{ {
"code": "finance_recharge",
"name": "微信支付流水",
"type": "MENU",
"enabled": true,
"value": "/finance/recharge",
"children": [
{
"code": "recharge_1",
"name": "查看提现详情页",
"type": "BUTTON",
"enabled": true
},
{
"code": "recharge_2",
"name": "查看完整的申请人账号",
"type": "BUTTON",
"enabled": true
},
{
"code": "recharge_3",
"name": "查看完整的收款账户信息",
"type": "BUTTON",
"enabled": true
},
{
"code": "recharge_4",
"name": "查看退款明细",
"type": "BUTTON",
"enabled": false
}
]
},
{
"code": "reports", "code": "reports",
"name": "财务报表", "name": "财务报表",
"type": "MENU", "type": "MENU",
...@@ -1707,7 +1761,27 @@ ...@@ -1707,7 +1761,27 @@
"name": "标签管理", "name": "标签管理",
"type": "MENU", "type": "MENU",
"enabled": true, "enabled": true,
"value": "/account/tag" "value": "/account/tag",
"children": [
{
"code": "tag_1",
"name": "新建标签",
"type": "BUTTON",
"enabled": true
},
{
"code": "tag_2",
"name": "修改标签",
"type": "BUTTON",
"enabled": true
},
{
"code": "tag_3",
"name": "删除标签",
"type": "BUTTON",
"enabled": true
}
]
}, },
{ {
"code": "deposit", "code": "deposit",
...@@ -1813,7 +1887,27 @@ ...@@ -1813,7 +1887,27 @@
"name": "轮播图管理", "name": "轮播图管理",
"type": "MENU", "type": "MENU",
"enabled": true, "enabled": true,
"value": "/business/carousel" "value": "/business/carousel",
"children": [
{
"code": "carousel_1",
"name": "新建轮播图",
"type": "BUTTON",
"enabled": true
},
{
"code": "carousel_2",
"name": "修改轮播图",
"type": "BUTTON",
"enabled": true
},
{
"code": "carousel_3",
"name": "删除轮播图",
"type": "BUTTON",
"enabled": true
}
]
}, },
{ {
"code": "price_rule", "code": "price_rule",
...@@ -1999,6 +2093,24 @@ ...@@ -1999,6 +2093,24 @@
"enabled": true, "enabled": true,
"value": "/business/notice", "value": "/business/notice",
"children": [ "children": [
{
"code": "notice_template_1",
"name": "新建消息通知模板",
"type": "BUTTON",
"enabled": true
},
{
"code": "notice_template_2",
"name": "编辑消息通知模板",
"type": "BUTTON",
"enabled": true
},
{
"code": "notice_template_3",
"name": "查看消息通知模板",
"type": "BUTTON",
"enabled": true
}
] ]
}, },
{ {
......
...@@ -3,10 +3,11 @@ ...@@ -3,10 +3,11 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="icon" href="/admin/main/favicon/favicon.ico" type="image/x-icon">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>广联二手车</title> <title>专电优拍</title>
<script type="module" crossorigin src="/main/assets/index-DO3wyqf-.js"></script> <script type="module" crossorigin src="/admin/main/assets/index-DPDYQjyF.js"></script>
<link rel="stylesheet" crossorigin href="/main/assets/index-BQFCVsDg.css"> <link rel="stylesheet" crossorigin href="/admin/main/assets/index-CZnIm2LY.css">
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
......
...@@ -136,11 +136,12 @@ public class LoginController extends LoginCommonController { ...@@ -136,11 +136,12 @@ public class LoginController extends LoginCommonController {
account.setOpenId(openid); account.setOpenId(openid);
account.setAccountName(phoneNumber); account.setAccountName(phoneNumber);
account.setMobile(phoneNumber); account.setMobile(phoneNumber);
account.setNickName(NameUtil.getName()); // account.setNickName(NameUtil.getName());
account.setNickName("车商" + phoneNumber.substring(phoneNumber.length() - 4));
account.setEnabled(true); account.setEnabled(true);
account.setCertifiedState(Account.CertifiedState.UNCERTIFIED); account.setCertifiedState(Account.CertifiedState.UNCERTIFIED);
account.setAccountType(Account.AccountType.COMMON); account.setAccountType(Account.AccountType.COMMON);
account = accountService.addAccount(account); account = accountService.addAccount(account, maLoginRequest.getRecommendCode());
} else { } else {
if (!account.isEnabled()) { if (!account.isEnabled()) {
accountInfo.setStatus(403); accountInfo.setStatus(403);
......
...@@ -10,13 +10,11 @@ import com.glsx.usedcar.module.auction.entity.AuctionVehicle_; ...@@ -10,13 +10,11 @@ import com.glsx.usedcar.module.auction.entity.AuctionVehicle_;
import com.glsx.usedcar.module.auction.entity.Auction_; import com.glsx.usedcar.module.auction.entity.Auction_;
import com.glsx.usedcar.module.auction.service.AuctionService; import com.glsx.usedcar.module.auction.service.AuctionService;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import jakarta.persistence.criteria.Expression; import jakarta.persistence.criteria.*;
import jakarta.persistence.criteria.Join;
import jakarta.persistence.criteria.JoinType;
import jakarta.persistence.criteria.Predicate;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.summerframework.orm.paging.Operator; import org.summerframework.orm.paging.Operator;
import org.summerframework.orm.paging.Pagination; import org.summerframework.orm.paging.Pagination;
...@@ -113,9 +111,17 @@ public class AuctionController { ...@@ -113,9 +111,17 @@ public class AuctionController {
*/ */
@PostMapping("pageRandomAuctionVehicle") @PostMapping("pageRandomAuctionVehicle")
public Page<AuctionVehicle> pageRandomAuctionVehicle(@RequestBody Pagination<AuctionVehicle> pagination, @RequestAttribute(value = LOGIN_ACCOUNT, required = false) Account account) { public Page<AuctionVehicle> pageRandomAuctionVehicle(@RequestBody Pagination<AuctionVehicle> pagination, @RequestAttribute(value = LOGIN_ACCOUNT, required = false) Account account) {
String cityCode = (String) pagination.getDataValue("cities");
pagination.addCondition((root, query, builder) -> { pagination.addCondition((root, query, builder) -> {
Expression<Double> randomExp = builder.function("RAND", Double.class); // MySQL 用 RAND() Expression<Double> randomExp = builder.function("RAND", Double.class); // MySQL 用 RAND()
query.orderBy(builder.asc(randomExp)); // 按随机值升序(或降序,效果相同) if (StringUtils.hasText(cityCode)) {
CriteriaBuilder.Case<Number> caseExpr = builder.selectCase();
caseExpr.when(builder.like(root.get(AuctionVehicle_.auction).get(Auction_.cities), "%" + cityCode + "%"), 1).otherwise(0);
query.orderBy(builder.desc(caseExpr), builder.asc(randomExp)); // 按随机值升序(或降序,效果相同)
} else {
query.orderBy(builder.asc(randomExp)); // 按随机值升序(或降序,效果相同)
}
return null; // 无过滤条件,返回所有数据并随机排序 return null; // 无过滤条件,返回所有数据并随机排序
}); });
return pageAuctionVehicle(pagination, account); return pageAuctionVehicle(pagination, account);
......
...@@ -6,13 +6,17 @@ import com.github.binarywang.wxpay.bean.result.enums.TradeTypeEnum; ...@@ -6,13 +6,17 @@ import com.github.binarywang.wxpay.bean.result.enums.TradeTypeEnum;
import com.github.binarywang.wxpay.exception.WxPayException; import com.github.binarywang.wxpay.exception.WxPayException;
import com.github.binarywang.wxpay.service.WxPayService; import com.github.binarywang.wxpay.service.WxPayService;
import com.glsx.usedcar.module.account.entity.Account; import com.glsx.usedcar.module.account.entity.Account;
import com.glsx.usedcar.module.finance.entity.Deposit_;
import com.glsx.usedcar.module.finance.entity.Recharge; import com.glsx.usedcar.module.finance.entity.Recharge;
import com.glsx.usedcar.module.finance.entity.Recharge_;
import com.glsx.usedcar.module.finance.service.TransactionService; import com.glsx.usedcar.module.finance.service.TransactionService;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.summerframework.core.exception.FieldException; import org.summerframework.core.exception.FieldException;
import org.summerframework.orm.paging.Pagination;
import static com.glsx.usedcar.web.WebConstants.LOGIN_ACCOUNT; import static com.glsx.usedcar.web.WebConstants.LOGIN_ACCOUNT;
...@@ -31,18 +35,19 @@ public class RechargeController { ...@@ -31,18 +35,19 @@ public class RechargeController {
private String notifyUrl; private String notifyUrl;
/** /**
* 充值接口 * 充值接口 (过时接口,不再使用)
* 详见:https://pay.weixin.qq.com/doc/v3/merchant/4012791856 * 详见:https://pay.weixin.qq.com/doc/v3/merchant/4012791856
* *
* @param recharge * @param recharge
* @param account * @param account
* @return * @return
*/ */
@Deprecated
@PostMapping("addRecharge") @PostMapping("addRecharge")
public WxPayUnifiedOrderV3Result.JsapiResult addRecharge(@RequestBody Recharge recharge, @RequestAttribute(LOGIN_ACCOUNT) Account account) throws WxPayException, FieldException { public WxPayUnifiedOrderV3Result.JsapiResult addRecharge(@RequestBody Recharge recharge, @RequestAttribute(LOGIN_ACCOUNT) Account account) throws WxPayException, FieldException {
recharge = transactionService.addRecharge(account.getAccountId(), recharge); recharge = transactionService.addRecharge(account.getAccountId(), recharge);
WxPayUnifiedOrderV3Request request = new WxPayUnifiedOrderV3Request(); WxPayUnifiedOrderV3Request request = new WxPayUnifiedOrderV3Request();
request.setDescription("充值"); request.setDescription("拍卖平台充值");
request.setOutTradeNo(recharge.getOutTradeNo()); request.setOutTradeNo(recharge.getOutTradeNo());
request.setNotifyUrl(notifyUrl); request.setNotifyUrl(notifyUrl);
request.setSupportFapiao(false); request.setSupportFapiao(false);
...@@ -58,14 +63,22 @@ public class RechargeController { ...@@ -58,14 +63,22 @@ public class RechargeController {
return result; return result;
} }
/** @PostMapping("pageRecharge")
* 调用统一下单接口(JSAPI) public Page<Recharge> pageRecharge(@RequestBody Pagination<Recharge> pagination, @RequestAttribute(LOGIN_ACCOUNT) Account account) {
* 详见:https://pay.weixin.qq.com/doc/v3/merchant/4012791856 pagination.addFilter(account, Recharge_.account);
*/ pagination.addCondition((root, query, builder) -> root.get(Recharge_.paymentTime).isNotNull());
@PostMapping("createOrder") return transactionService.pageRecharge(pagination);
public WxPayUnifiedOrderV3Result.JsapiResult createOrder(@RequestBody WxPayUnifiedOrderV3Request request) throws WxPayException {
return this.wxService.createOrderV3(TradeTypeEnum.JSAPI, request);
} }
// /**
// * 调用统一下单接口(JSAPI)
// * 详见:https://pay.weixin.qq.com/doc/v3/merchant/4012791856
// */
// @PostMapping("createOrder")
// public WxPayUnifiedOrderV3Result.JsapiResult createOrder(@RequestBody WxPayUnifiedOrderV3Request request) throws WxPayException {
// return this.wxService.createOrderV3(TradeTypeEnum.JSAPI, request);
// }
} }
...@@ -67,7 +67,11 @@ public class TransactionController { ...@@ -67,7 +67,11 @@ public class TransactionController {
public Page<Transaction> pageTransaction(@RequestBody Pagination<Transaction> pagination, @RequestAttribute(LOGIN_ACCOUNT) Account account) { public Page<Transaction> pageTransaction(@RequestBody Pagination<Transaction> pagination, @RequestAttribute(LOGIN_ACCOUNT) Account account) {
pagination.addFilter(account, Transaction_.account); pagination.addFilter(account, Transaction_.account);
pagination.addSortOrder(new SortOrder(Sort.Direction.DESC, Transaction_.createTime)); pagination.addSortOrder(new SortOrder(Sort.Direction.DESC, Transaction_.createTime));
return transactionService.pageTransaction(pagination); Page<Transaction> transactions = transactionService.pageTransaction(pagination);
// for (Transaction transaction : transactions) {
// transaction.setDeposit(depositService.getDepositByTransaction(transaction));
// }
return transactions;
} }
/** /**
......
...@@ -71,10 +71,10 @@ public class WithdrawController { ...@@ -71,10 +71,10 @@ public class WithdrawController {
return withdrawService.addWithdraw(withdraw); return withdrawService.addWithdraw(withdraw);
} }
@GetMapping("getWithdrawsByWaitUserConfirm") // @GetMapping("getWithdrawsByWaitUserConfirm")
public List<Withdraw> getWithdrawsByWaitUserConfirm(@RequestAttribute(LOGIN_ACCOUNT) Account account) { // public List<Withdraw> getWithdrawsByWaitUserConfirm(@RequestAttribute(LOGIN_ACCOUNT) Account account) {
return withdrawService.getWithdrawsByWaitUserConfirm(account); // return withdrawService.getWithdrawsByWaitUserConfirm(account);
} // }
@GetMapping("getWxPayMchId") @GetMapping("getWxPayMchId")
public String getWxPayMchId() { public String getWxPayMchId() {
...@@ -82,9 +82,9 @@ public class WithdrawController { ...@@ -82,9 +82,9 @@ public class WithdrawController {
} }
@PostMapping("updateWithdrawStateById") // @PostMapping("updateWithdrawStateById")
public int updateWithdrawStateById(@RequestParam int withdrawId) { // public int updateWithdrawStateById(@RequestParam int withdrawId) {
withdrawService.updateWithdrawStateById(withdrawId); // withdrawService.updateWithdrawStateById(withdrawId);
return withdrawId; // return withdrawId;
} // }
} }
\ No newline at end of file \ No newline at end of file
...@@ -4,6 +4,7 @@ import cn.hutool.json.JSONUtil; ...@@ -4,6 +4,7 @@ import cn.hutool.json.JSONUtil;
import com.github.binarywang.wxpay.bean.notify.SignatureHeader; import com.github.binarywang.wxpay.bean.notify.SignatureHeader;
import com.github.binarywang.wxpay.bean.notify.WxPayNotifyV3Response; import com.github.binarywang.wxpay.bean.notify.WxPayNotifyV3Response;
import com.github.binarywang.wxpay.bean.notify.WxPayNotifyV3Result; import com.github.binarywang.wxpay.bean.notify.WxPayNotifyV3Result;
import com.github.binarywang.wxpay.bean.notify.WxPayRefundNotifyV3Result;
import com.github.binarywang.wxpay.bean.transfer.TransferBillsNotifyResult; import com.github.binarywang.wxpay.bean.transfer.TransferBillsNotifyResult;
import com.github.binarywang.wxpay.constant.WxPayConstants; import com.github.binarywang.wxpay.constant.WxPayConstants;
import com.github.binarywang.wxpay.exception.WxPayException; import com.github.binarywang.wxpay.exception.WxPayException;
...@@ -14,6 +15,7 @@ import jakarta.annotation.Resource; ...@@ -14,6 +15,7 @@ import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -69,7 +71,7 @@ public class WxpayController { ...@@ -69,7 +71,7 @@ public class WxpayController {
transactionService.notifyRecharge(outTradeNo, openid, transactionId); transactionService.notifyRecharge(outTradeNo, openid, transactionId);
} else if ("order".equals(attach)) { } else if ("order".equals(attach)) {
// 车款支付成功通知 // 车款支付成功通知
transactionService.notifyAuctionOrder(outTradeNo, decryptRes.getAmount().getTotal() * 100, transactionId); transactionService.notifyAuctionOrder(outTradeNo, decryptRes.getAmount().getTotal() / 100D, transactionId);
} }
} }
//成功返回200/204,body无需有内容 //成功返回200/204,body无需有内容
...@@ -88,6 +90,41 @@ public class WxpayController { ...@@ -88,6 +90,41 @@ public class WxpayController {
} }
} }
/**
* <pre>
* 退款回调通知处理
* 详见 https://pay.weixin.qq.com/doc/v3/merchant/4012791865
* </pre>
*
* @param notifyData
* @param request
* @return
* @throws WxPayException
*/
@PostMapping("notify/refund")
public ResponseEntity<String> parseRefundNotifyResult(@RequestBody String notifyData, HttpServletRequest request) {
SignatureHeader header = getRequestHeader(request);
try {
WxPayRefundNotifyV3Result res = this.wxService.parseRefundNotifyV3Result(notifyData, header);
WxPayRefundNotifyV3Result.DecryptNotifyResult decryptRes = res.getResult();
log.info("回调退款通知notify/refund开始");
log.info("回调退款OutRefundNo:" + decryptRes.getOutRefundNo());
// 根据自己业务场景需要构造返回对象
if (WxPayConstants.RefundStatus.SUCCESS.equals(decryptRes.getRefundStatus())) {
transactionService.notifyRechargeRefund(decryptRes);
//成功返回200/204,body无需有内容
return ResponseEntity.status(200).body("");
} else {
//失败返回4xx或5xx,且需要构造body信息
return ResponseEntity.status(500).body(WxPayNotifyV3Response.fail("错误原因"));
}
} catch (WxPayException e) {
//失败返回4xx或5xx,且需要构造body信息
return ResponseEntity.status(500).body(WxPayNotifyV3Response.fail("错误原因"));
}
}
@Nullable @Nullable
@RequestMapping("transfer_notify") @RequestMapping("transfer_notify")
public String transfer_notify(@RequestBody String notifyData, HttpServletRequest request) { public String transfer_notify(@RequestBody String notifyData, HttpServletRequest request) {
......
...@@ -68,8 +68,8 @@ spring: ...@@ -68,8 +68,8 @@ spring:
data: data:
redis: redis:
database: 6 database: 6
host: 120.237.107.125 host: 192.168.0.20
port: 16379 port: 6379
password: Ml1234.. password: Ml1234..
# 连接超时时间 单位 ms(毫秒) # 连接超时时间 单位 ms(毫秒)
timeout: 3000ms timeout: 3000ms
......
...@@ -17,7 +17,7 @@ import java.util.List; ...@@ -17,7 +17,7 @@ import java.util.List;
public interface CommissionRuleDao extends BaseRepository<CommissionRule, Integer>, JpaSpecificationExecutor<CommissionRule> { public interface CommissionRuleDao extends BaseRepository<CommissionRule, Integer>, JpaSpecificationExecutor<CommissionRule> {
@EntityGraph(attributePaths = {"accounts", "accountTags"}) @EntityGraph(attributePaths = {"accounts", "accountTags"})
List<CommissionRule> findByEnabledIsTrueAndEffectiveDateLessThanEqualAndExpireDateGreaterThanEqualOrderByApplicableTypeAsc(LocalDate effectiveDate, LocalDate expireDate); List<CommissionRule> findByEnabledIsTrueAndMinPriceLessThanEqualAndMaxPriceGreaterThanAndEffectiveDateLessThanEqualAndExpireDateGreaterThanEqualOrderByApplicableTypeAsc(double price, double price2, LocalDate effectiveDate, LocalDate expireDate);
@EntityGraph(attributePaths = {"accounts", "accountTags"}) @EntityGraph(attributePaths = {"accounts", "accountTags"})
CommissionRule findByRuleId(int ruleId); CommissionRule findByRuleId(int ruleId);
......
...@@ -56,6 +56,18 @@ public class CommissionRule extends AuditingEntity implements Serializable { ...@@ -56,6 +56,18 @@ public class CommissionRule extends AuditingEntity implements Serializable {
private String ruleName; private String ruleName;
/** /**
* 最低成交价
*/
@Column(nullable = false)
private double minPrice;
/**
* 最高成交价
*/
@Column(nullable = false)
private double maxPrice;
/**
* 规则详情 * 规则详情
*/ */
@Column(nullable = true, length = 255) @Column(nullable = true, length = 255)
......
...@@ -92,9 +92,17 @@ public class AccountService extends AbstractAuctionService { ...@@ -92,9 +92,17 @@ public class AccountService extends AbstractAuctionService {
* @return 个人账户实例对象 * @return 个人账户实例对象
*/ */
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public Account addAccount(Account account) { public Account addAccount(Account account, String recommendCode) {
account.setLastLoginTime(LocalDateTime.now()); account.setLastLoginTime(LocalDateTime.now());
return accountDao.save(account);
Account save = accountDao.save(account);
if (StringUtils.hasText(recommendCode)) {
accountTagDao.findTopByRecommendCode(recommendCode).ifPresent(accountTag -> {
save.getAccountTags().add(accountTag);
accountTagDao.updateAccountCount();
});
}
return save;
} }
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
...@@ -238,6 +246,23 @@ public class AccountService extends AbstractAuctionService { ...@@ -238,6 +246,23 @@ public class AccountService extends AbstractAuctionService {
} }
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public void setTagAccounts(TagAccount tagAccount) {
List<Account> accounts = accountDao.findAllById(tagAccount.getAccountIds());
if (!CollectionUtils.isEmpty(tagAccount.getTagIds())) {
List<AccountTag> tags = accountTagDao.findAllById(tagAccount.getTagIds());
for (Account account : accounts) {
account.getAccountTags().clear();
account.getAccountTags().addAll(tags);
}
} else {
for (Account account : accounts) {
account.getAccountTags().clear();
}
}
accountTagDao.updateAccountCount();
}
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public Account updateMobile(Account customer) throws FieldException { public Account updateMobile(Account customer) throws FieldException {
accountDao.checkExists("手机号码已存在用户绑定", customer, Account_.mobile); accountDao.checkExists("手机号码已存在用户绑定", customer, Account_.mobile);
return accountDao.updateById(customer.getAccountId(), UpdateField.of(Account_.mobile, customer.getMobile())); return accountDao.updateById(customer.getAccountId(), UpdateField.of(Account_.mobile, customer.getMobile()));
...@@ -262,6 +287,7 @@ public class AccountService extends AbstractAuctionService { ...@@ -262,6 +287,7 @@ public class AccountService extends AbstractAuctionService {
if (StringUtils.hasText(recommendCode)) { if (StringUtils.hasText(recommendCode)) {
accountTagDao.findTopByRecommendCode(recommendCode).ifPresent(accountTag -> { accountTagDao.findTopByRecommendCode(recommendCode).ifPresent(accountTag -> {
account.getAccountTags().add(accountTag); account.getAccountTags().add(accountTag);
accountTagDao.updateAccountCount();
}); });
} }
} else if (account.getAccountType() == Account.AccountType.PERSON) { } else if (account.getAccountType() == Account.AccountType.PERSON) {
...@@ -361,7 +387,7 @@ public class AccountService extends AbstractAuctionService { ...@@ -361,7 +387,7 @@ public class AccountService extends AbstractAuctionService {
// 参拍车商 // 参拍车商
long bidCount = bidDao.countAccountByCreateTimeBetween(startTime, endTime); long bidCount = bidDao.countAccountByCreateTimeBetween(startTime, endTime);
//新增中拍车商 //新增中拍车商
long newDealCount = auctionOrderDao.countNewAccountByOrderStateAndTransferredTime(AuctionOrder.OrderState.CANCELED, startTime, endTime); long newDealCount = auctionOrderDao.countNewAccountByOrderStateAndCreateTime(AuctionOrder.OrderState.CANCELED, startTime, endTime);
AccountDateStat accountTotalStat = new AccountDateStat(); AccountDateStat accountTotalStat = new AccountDateStat();
accountTotalStat.setAccountCount((int) accountCount); accountTotalStat.setAccountCount((int) accountCount);
accountTotalStat.setActiveCount((int) activeCount); accountTotalStat.setActiveCount((int) activeCount);
......
...@@ -81,6 +81,8 @@ public class CommissionRuleService { ...@@ -81,6 +81,8 @@ public class CommissionRuleService {
public CommissionRule updateCommissionRule(CommissionRule commissionRule) { public CommissionRule updateCommissionRule(CommissionRule commissionRule) {
CommissionRule commissionRuleDB = commissionRuleDao.updateById(commissionRule, CommissionRule commissionRuleDB = commissionRuleDao.updateById(commissionRule,
CommissionRule_.ruleName, CommissionRule_.ruleName,
CommissionRule_.maxPrice,
CommissionRule_.minPrice,
CommissionRule_.remark, CommissionRule_.remark,
CommissionRule_.enabled, CommissionRule_.enabled,
CommissionRule_.ruleType, CommissionRule_.ruleType,
......
...@@ -3,7 +3,9 @@ package com.glsx.usedcar.module.auction.dao; ...@@ -3,7 +3,9 @@ package com.glsx.usedcar.module.auction.dao;
import com.glsx.usedcar.module.account.entity.Account; import com.glsx.usedcar.module.account.entity.Account;
import com.glsx.usedcar.module.analysis.domain.IndexValue; import com.glsx.usedcar.module.analysis.domain.IndexValue;
import com.glsx.usedcar.module.analysis.domain.ProfitRadioProjection; import com.glsx.usedcar.module.analysis.domain.ProfitRadioProjection;
import com.glsx.usedcar.module.auction.entity.Auction;
import com.glsx.usedcar.module.auction.entity.AuctionOrder; import com.glsx.usedcar.module.auction.entity.AuctionOrder;
import com.glsx.usedcar.module.vehicle.entity.Vehicle;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.EntityGraph; import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
...@@ -29,6 +31,8 @@ public interface AuctionOrderDao extends BaseRepository<AuctionOrder, Integer>, ...@@ -29,6 +31,8 @@ public interface AuctionOrderDao extends BaseRepository<AuctionOrder, Integer>,
@EntityGraph(attributePaths = {"vehicle", "account", "auction"}) @EntityGraph(attributePaths = {"vehicle", "account", "auction"})
AuctionOrder findByOrderId(int orderId); AuctionOrder findByOrderId(int orderId);
AuctionOrder findTopByAccountAndVehicleAndAuction(Account account, Vehicle vehicle, Auction auction);
AuctionOrder findTopByVehicle_VehicleIdOrderByCreateTimeDesc(int vehicleId); AuctionOrder findTopByVehicle_VehicleIdOrderByCreateTimeDesc(int vehicleId);
AuctionOrder findTopByVehicle_VehicleIdAndAccount_AccountIdAndOrderStateOrderByCreateTimeDesc(int vehicleId, int accountId, AuctionOrder.OrderState orderState); AuctionOrder findTopByVehicle_VehicleIdAndAccount_AccountIdAndOrderStateOrderByCreateTimeDesc(int vehicleId, int accountId, AuctionOrder.OrderState orderState);
...@@ -49,10 +53,10 @@ public interface AuctionOrderDao extends BaseRepository<AuctionOrder, Integer>, ...@@ -49,10 +53,10 @@ public interface AuctionOrderDao extends BaseRepository<AuctionOrder, Integer>,
long countAccountByOrderStateAndTransferredTime(AuctionOrder.OrderState orderState, LocalDateTime startTime, LocalDateTime endTime); long countAccountByOrderStateAndTransferredTime(AuctionOrder.OrderState orderState, LocalDateTime startTime, LocalDateTime endTime);
@Query(""" @Query("""
select count(distinct o.account) from AuctionOrder o where o.orderState !=?1 and o.transferredTime between ?2 and ?3 and select count(distinct o.account) from AuctionOrder o where o.orderState !=?1 and o.createTime between ?2 and ?3 and
not exists (select 1 from AuctionOrder o2 where o2.account = o.account and o2.orderState = ?1 and o2.transferredTime < ?2) not exists (select 1 from AuctionOrder o2 where o2.account = o.account and o2.orderState = ?1 and o2.createTime < ?2)
""") """)
long countNewAccountByOrderStateAndTransferredTime(AuctionOrder.OrderState orderState, LocalDateTime startTime, LocalDateTime endTime); long countNewAccountByOrderStateAndCreateTime(AuctionOrder.OrderState orderState, LocalDateTime startTime, LocalDateTime endTime);
long countByOrderState(AuctionOrder.OrderState orderState); long countByOrderState(AuctionOrder.OrderState orderState);
......
...@@ -30,7 +30,7 @@ public interface AuctionVehicleDao extends BaseRepository<AuctionVehicle, Intege ...@@ -30,7 +30,7 @@ public interface AuctionVehicleDao extends BaseRepository<AuctionVehicle, Intege
AuctionVehicle findTopByVehicle_VehicleIdOrderByAuctionStartTimeDesc(int vehicleId); AuctionVehicle findTopByVehicle_VehicleIdOrderByAuctionStartTimeDesc(int vehicleId);
@EntityGraph(attributePaths = {"auction"}) @EntityGraph(attributePaths = {"auction"})
List<AuctionVehicle> findByVehicle_VehicleIdOrderByAuctionStartTimeDesc(int vehicleId); List<AuctionVehicle> findByVehicle_VehicleIdOrderByAuctionStartTimeDescAuction_CreateTimeDesc(int vehicleId);
@EntityGraph(attributePaths = {"vehicle", "auction"}) @EntityGraph(attributePaths = {"vehicle", "auction"})
List<AuctionVehicle> findByAuction_AuctionIdOrderByAuctionStartTimeAsc(int auctionId); List<AuctionVehicle> findByAuction_AuctionIdOrderByAuctionStartTimeAsc(int auctionId);
...@@ -52,6 +52,8 @@ public interface AuctionVehicleDao extends BaseRepository<AuctionVehicle, Intege ...@@ -52,6 +52,8 @@ public interface AuctionVehicleDao extends BaseRepository<AuctionVehicle, Intege
@EntityGraph(attributePaths = {"vehicle", "auction"}) @EntityGraph(attributePaths = {"vehicle", "auction"})
List<AuctionVehicle> findByAuctionStateAndAuctionEndTimeIsBefore(AuctionVehicle.AuctionState auctionState, LocalDateTime endTime); List<AuctionVehicle> findByAuctionStateAndAuctionEndTimeIsBefore(AuctionVehicle.AuctionState auctionState, LocalDateTime endTime);
long countByAuction(Auction auction);
long countByAuctionStateAndAuction(AuctionVehicle.AuctionState auctionState, Auction auction); long countByAuctionStateAndAuction(AuctionVehicle.AuctionState auctionState, Auction auction);
@Query("select count(distinct av.vehicle) from AuctionVehicle av where av.auditState = ?1 ") @Query("select count(distinct av.vehicle) from AuctionVehicle av where av.auditState = ?1 ")
......
package com.glsx.usedcar.module.auction.domain;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Getter
@Setter
public class AuctionVehicleAddon {
private int auctionId;
private List<Integer> vehicleIds;
}
package com.glsx.usedcar.module.auction.service; package com.glsx.usedcar.module.auction.service;
import com.github.binarywang.wxpay.bean.request.WxPayRefundV3Request;
import com.github.binarywang.wxpay.bean.result.WxPayRefundV3Result;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.github.binarywang.wxpay.service.WxPayService;
import com.glsx.usedcar.module.account.entity.Account; import com.glsx.usedcar.module.account.entity.Account;
import com.glsx.usedcar.module.auction.entity.AuctionOrder; import com.glsx.usedcar.module.auction.entity.AuctionOrder;
import com.glsx.usedcar.module.auction.entity.AuctionVehicle; import com.glsx.usedcar.module.auction.entity.AuctionVehicle;
...@@ -15,8 +19,10 @@ import com.sayalala.wework.wehook.config.MessagesenderProperties; ...@@ -15,8 +19,10 @@ import com.sayalala.wework.wehook.config.MessagesenderProperties;
import com.sayalala.wework.wehook.entity.WeWorkWebhookMessage; import com.sayalala.wework.wehook.entity.WeWorkWebhookMessage;
import com.sayalala.wework.wehook.service.MessageService; import com.sayalala.wework.wehook.service.MessageService;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestParam;
import org.summerframework.core.util.DateTimeUtils; import org.summerframework.core.util.DateTimeUtils;
import java.time.LocalDateTime; import java.time.LocalDateTime;
...@@ -40,6 +46,7 @@ public abstract class AbstractAuctionService { ...@@ -40,6 +46,7 @@ public abstract class AbstractAuctionService {
@Resource @Resource
protected MessagesenderProperties messagesenderProperties; protected MessagesenderProperties messagesenderProperties;
/** /**
* 通过订单查询用户的保证金 * 通过订单查询用户的保证金
* *
...@@ -73,6 +80,11 @@ public abstract class AbstractAuctionService { ...@@ -73,6 +80,11 @@ public abstract class AbstractAuctionService {
if (Objects.nonNull(deposit)) { if (Objects.nonNull(deposit)) {
// 解冻保证金 // 解冻保证金
if (deposit.getDepositState() == Deposit.DepositState.FREEZE) { if (deposit.getDepositState() == Deposit.DepositState.FREEZE) {
// try {
// refund(deposit, "自动退款");
// } catch (WxPayException e) {
// e.printStackTrace();
// }
deposit.setDepositState(Deposit.DepositState.UNFREEZE); deposit.setDepositState(Deposit.DepositState.UNFREEZE);
// 计算应该从保证金中扣除多少金额,扣除来源于违约金 // 计算应该从保证金中扣除多少金额,扣除来源于违约金
double depositDeduct = deposit.getAmount() + deposit.getTransaction().getAmount(); double depositDeduct = deposit.getAmount() + deposit.getTransaction().getAmount();
...@@ -85,6 +97,8 @@ public abstract class AbstractAuctionService { ...@@ -85,6 +97,8 @@ public abstract class AbstractAuctionService {
} }
} }
/** /**
* 发送通知消息 * 发送通知消息
* *
......
...@@ -96,6 +96,10 @@ public class AuctionOrderService extends AbstractAuctionService { ...@@ -96,6 +96,10 @@ public class AuctionOrderService extends AbstractAuctionService {
return auctionOrderDao.sumOrderPriceByAuctionId(auctionId, AuctionOrder.OrderState.CANCELED).orElse(0.0); return auctionOrderDao.sumOrderPriceByAuctionId(auctionId, AuctionOrder.OrderState.CANCELED).orElse(0.0);
} }
public AuctionOrder getAuctionOrderByAccountAndAuctionVehicle(Account account, AuctionVehicle auctionVehicle) {
return auctionOrderDao.findTopByAccountAndVehicleAndAuction(account, auctionVehicle.getVehicle(), auctionVehicle.getAuction());
}
/** /**
* 分页查询 * 分页查询
* *
...@@ -340,9 +344,10 @@ public class AuctionOrderService extends AbstractAuctionService { ...@@ -340,9 +344,10 @@ public class AuctionOrderService extends AbstractAuctionService {
*/ */
private double calculateCommissionPrice(LocalDateTime now, Bid bid) { private double calculateCommissionPrice(LocalDateTime now, Bid bid) {
Account account = bid.getAccount(); Account account = bid.getAccount();
double commissionPrice = 0;
LocalDate today = now.toLocalDate(); LocalDate today = now.toLocalDate();
List<CommissionRule> commissionRules = commissionRuleDao.findByEnabledIsTrueAndEffectiveDateLessThanEqualAndExpireDateGreaterThanEqualOrderByApplicableTypeAsc(today, today); double bidPrice = bid.getBidPrice();
double commissionPrice = 0;
List<CommissionRule> commissionRules = commissionRuleDao.findByEnabledIsTrueAndMinPriceLessThanEqualAndMaxPriceGreaterThanAndEffectiveDateLessThanEqualAndExpireDateGreaterThanEqualOrderByApplicableTypeAsc(bidPrice, bidPrice, today, today);
CommissionRule commissionRule = null; CommissionRule commissionRule = null;
if (!commissionRules.isEmpty()) { if (!commissionRules.isEmpty()) {
for (CommissionRule rule : commissionRules) { for (CommissionRule rule : commissionRules) {
...@@ -369,7 +374,7 @@ public class AuctionOrderService extends AbstractAuctionService { ...@@ -369,7 +374,7 @@ public class AuctionOrderService extends AbstractAuctionService {
} }
} }
if (Objects.nonNull(commissionRule)) { if (Objects.nonNull(commissionRule)) {
commissionPrice = commissionRule.calCommissionPrice(bid.getBidPrice()); commissionPrice = commissionRule.calCommissionPrice(bidPrice);
} }
return commissionPrice; return commissionPrice;
} }
......
...@@ -10,6 +10,7 @@ import com.glsx.usedcar.module.account.entity.FavoriteId; ...@@ -10,6 +10,7 @@ import com.glsx.usedcar.module.account.entity.FavoriteId;
import com.glsx.usedcar.module.analysis.domain.AuctionVehicleRate; import com.glsx.usedcar.module.analysis.domain.AuctionVehicleRate;
import com.glsx.usedcar.module.auction.dao.AuctionDao; import com.glsx.usedcar.module.auction.dao.AuctionDao;
import com.glsx.usedcar.module.auction.dao.AuctionVehicleDao; import com.glsx.usedcar.module.auction.dao.AuctionVehicleDao;
import com.glsx.usedcar.module.auction.domain.AuctionVehicleAddon;
import com.glsx.usedcar.module.auction.domain.PendingAuction; import com.glsx.usedcar.module.auction.domain.PendingAuction;
import com.glsx.usedcar.module.auction.entity.Auction; import com.glsx.usedcar.module.auction.entity.Auction;
import com.glsx.usedcar.module.auction.entity.AuctionVehicle; import com.glsx.usedcar.module.auction.entity.AuctionVehicle;
...@@ -92,7 +93,7 @@ public class AuctionService extends AbstractAuctionService { ...@@ -92,7 +93,7 @@ public class AuctionService extends AbstractAuctionService {
} }
public List<AuctionVehicle> getAuctionVehiclesByVehicleId(int vehicleId) { public List<AuctionVehicle> getAuctionVehiclesByVehicleId(int vehicleId) {
return auctionVehicleDao.findByVehicle_VehicleIdOrderByAuctionStartTimeDesc(vehicleId); return auctionVehicleDao.findByVehicle_VehicleIdOrderByAuctionStartTimeDescAuction_CreateTimeDesc(vehicleId);
} }
/** /**
...@@ -207,6 +208,49 @@ public class AuctionService extends AbstractAuctionService { ...@@ -207,6 +208,49 @@ public class AuctionService extends AbstractAuctionService {
return auctionDb; return auctionDb;
} }
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public void addAuctionVehicles(AuctionVehicleAddon auctionVehicleAddon) throws FieldException {
Auction auction = auctionDao.findById(auctionVehicleAddon.getAuctionId()).orElseThrow();
if (auction.getAuctionState() == Auction.AuctionState.CLOSED) {
throw new FieldException("auctionState", Auction.AuctionState.CLOSED, "拍场已经结束");
}
if (auction.getAuctionState() == Auction.AuctionState.CANCELLED) {
throw new FieldException("auctionState", Auction.AuctionState.CANCELLED, "拍场已经取消");
}
List<Integer> vehicleIds = auctionVehicleAddon.getVehicleIds();
if (!vehicleIds.isEmpty()) {
List<String> sourceNos = vehicleDao.findBySourceNoVehicleStateNot(vehicleIds, Vehicle.VehicleState.PRICED);
if (!CollectionUtils.isEmpty(sourceNos)) {
String join = String.join(",", sourceNos);
throw new FieldException("sourceNos", sourceNos, "车源号:" + join + "的车辆状态不是待关联拍卖状态,请重新选择车辆");
}
}
List<Vehicle> vehicles = vehicleDao.findByIds(vehicleIds);
for (Vehicle vehicle : vehicles) {
AuctionVehicle av = new AuctionVehicle(auction, vehicle);
av.setPreviewStartTime(auction.getPreviewStartTime());
av.setAuctionStartTime(auction.getAuctionStartTime());
av.setAuctionEndTime(auction.getAuctionEndTime());
switch (auction.getAuctionState()) {
case WAIT_AUCTION -> {
av.setAuctionState(AuctionVehicle.AuctionState.WAIT_AUCTION);
vehicle.setVehicleState(Vehicle.VehicleState.WAIT_AUCTION);
}
case PREVIEW -> {
av.setAuctionState(AuctionVehicle.AuctionState.PREVIEW);
vehicle.setVehicleState(Vehicle.VehicleState.PREVIEW);
}
case AUCTIONING -> {
av.setAuctionState(AuctionVehicle.AuctionState.AUCTIONING);
vehicle.setVehicleState(Vehicle.VehicleState.AUCTIONING);
}
}
auctionVehicleDao.save(av);
}
auction.setVehicleCount((int) auctionVehicleDao.countByAuction(auction));
}
/** /**
* 通过拍卖场次主键删除数据 * 通过拍卖场次主键删除数据
* *
......
...@@ -127,6 +127,7 @@ public class BidService { ...@@ -127,6 +127,7 @@ public class BidService {
if (Objects.isNull(deposit)) { if (Objects.isNull(deposit)) {
//需要交的保证金 //需要交的保证金
int depositAmount = auctionVehicle.getAuction().getDeposit(); int depositAmount = auctionVehicle.getAuction().getDeposit();
// 查询已经交过的冻结的保证金 // 查询已经交过的冻结的保证金
double freezeAmount = Math.abs(depositDao.sumFreezeByAccountId(accountId, Deposit.DepositState.FREEZE).orElse(0.0)); double freezeAmount = Math.abs(depositDao.sumFreezeByAccountId(accountId, Deposit.DepositState.FREEZE).orElse(0.0));
// 申请提现中的金额 // 申请提现中的金额
...@@ -183,6 +184,8 @@ public class BidService { ...@@ -183,6 +184,8 @@ public class BidService {
auction.setAccountCount((int) bidDao.countAccountByAuction(auction)); auction.setAccountCount((int) bidDao.countAccountByAuction(auction));
auctionVehicle.setBidCount((int) bidDao.countByAuctionVehicle(auctionVehicle)); auctionVehicle.setBidCount((int) bidDao.countByAuctionVehicle(auctionVehicle));
// 更新最后活跃时间
account.setLastLoginTime(LocalDateTime.now());
return bid; return bid;
} }
......
...@@ -4,6 +4,7 @@ import com.glsx.usedcar.module.account.entity.Account; ...@@ -4,6 +4,7 @@ import com.glsx.usedcar.module.account.entity.Account;
import com.glsx.usedcar.module.auction.entity.Auction; import com.glsx.usedcar.module.auction.entity.Auction;
import com.glsx.usedcar.module.auction.entity.AuctionVehicle; import com.glsx.usedcar.module.auction.entity.AuctionVehicle;
import com.glsx.usedcar.module.finance.entity.Deposit; import com.glsx.usedcar.module.finance.entity.Deposit;
import com.glsx.usedcar.module.finance.entity.Transaction;
import com.glsx.usedcar.module.vehicle.entity.Vehicle; import com.glsx.usedcar.module.vehicle.entity.Vehicle;
import org.springframework.data.jpa.repository.EntityGraph; import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
...@@ -20,6 +21,9 @@ public interface DepositDao extends BaseRepository<Deposit, Integer>, JpaSpecifi ...@@ -20,6 +21,9 @@ public interface DepositDao extends BaseRepository<Deposit, Integer>, JpaSpecifi
Deposit findByAccountAndAuctionVehicle(Account account, AuctionVehicle auctionVehicle); Deposit findByAccountAndAuctionVehicle(Account account, AuctionVehicle auctionVehicle);
@EntityGraph(attributePaths = {"auctionVehicle.vehicle"})
Deposit findTopByTransaction(Transaction transaction);
Deposit findByAuctionVehicle_AuctionAndAuctionVehicle_VehicleAndDepositStateAndAccount(Auction auction, Vehicle vehicle, Deposit.DepositState depositState, Account account); Deposit findByAuctionVehicle_AuctionAndAuctionVehicle_VehicleAndDepositStateAndAccount(Auction auction, Vehicle vehicle, Deposit.DepositState depositState, Account account);
List<Deposit> findByAuctionVehicleAndDepositStateAndAccountNot(AuctionVehicle auctionVehicle, Deposit.DepositState depositState, Account account); List<Deposit> findByAuctionVehicleAndDepositStateAndAccountNot(AuctionVehicle auctionVehicle, Deposit.DepositState depositState, Account account);
...@@ -27,12 +31,15 @@ public interface DepositDao extends BaseRepository<Deposit, Integer>, JpaSpecifi ...@@ -27,12 +31,15 @@ public interface DepositDao extends BaseRepository<Deposit, Integer>, JpaSpecifi
@EntityGraph(attributePaths = {"account"}) @EntityGraph(attributePaths = {"account"})
List<Deposit> findByAuctionVehicleAndDepositState(AuctionVehicle auctionVehicle, Deposit.DepositState depositState); List<Deposit> findByAuctionVehicleAndDepositState(AuctionVehicle auctionVehicle, Deposit.DepositState depositState);
@Query("SELECT SUM(d.amount) FROM Deposit d") @Query("SELECT SUM(ts.amount) FROM Deposit d left join d.transaction ts ")
Optional<Double> sumAll(); Optional<Double> sumAll();
@Query("SELECT SUM(ts.amount) FROM Deposit d left join d.transaction ts where d.depositState =?1") @Query("SELECT SUM(ts.amount) FROM Deposit d left join d.transaction ts where d.depositState =?1 ")
Optional<Double> sumByDepositState(Deposit.DepositState depositState); Optional<Double> sumByDepositState(Deposit.DepositState depositState);
@Query("SELECT SUM(d.amount) FROM Deposit d where d.depositState =?1 ")
Optional<Double> sumAccountByDepositState(Deposit.DepositState depositState);
@Query("select d from Deposit d left join fetch d.transaction left join d.auctionVehicle av where d.account.accountId =?1 and av.vehicle.vehicleId =?2 and av.auction.auctionId =?3") @Query("select d from Deposit d left join fetch d.transaction left join d.auctionVehicle av where d.account.accountId =?1 and av.vehicle.vehicleId =?2 and av.auction.auctionId =?3")
Deposit findByAccountAndVehicleAndAuction(int accountId, int vehicleId, int auctionId); Deposit findByAccountAndVehicleAndAuction(int accountId, int vehicleId, int auctionId);
......
package com.glsx.usedcar.module.finance.dao; package com.glsx.usedcar.module.finance.dao;
import com.glsx.usedcar.module.account.entity.Account;
import com.glsx.usedcar.module.finance.entity.Deposit;
import com.glsx.usedcar.module.finance.entity.Recharge; import com.glsx.usedcar.module.finance.entity.Recharge;
import com.glsx.usedcar.module.finance.entity.Withdraw;
import com.glsx.usedcar.module.meta.AuditState;
import org.springframework.data.jpa.repository.EntityGraph; import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query; import org.springframework.data.jpa.repository.Query;
import org.summerframework.orm.BaseRepository; import org.summerframework.orm.BaseRepository;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Optional; import java.util.Optional;
public interface RechargeDao extends BaseRepository<Recharge, Long>, JpaSpecificationExecutor<Recharge> { public interface RechargeDao extends BaseRepository<Recharge, Long>, JpaSpecificationExecutor<Recharge> {
...@@ -13,5 +19,10 @@ public interface RechargeDao extends BaseRepository<Recharge, Long>, JpaSpecific ...@@ -13,5 +19,10 @@ public interface RechargeDao extends BaseRepository<Recharge, Long>, JpaSpecific
@EntityGraph(attributePaths = {"account"}) @EntityGraph(attributePaths = {"account"})
Optional<Recharge> findTopByOutTradeNoAndOpenId(String outTradeNo, String openId); Optional<Recharge> findTopByOutTradeNoAndOpenId(String outTradeNo, String openId);
Optional<Recharge> findTopByOutTradeNoAndTransactionId(String outTradeNo, String transactionId);
@EntityGraph(attributePaths = {"account"})
Optional<Recharge> findByRechargeId(long rechargeId);
List<Recharge> findByAccountAndPaymentTimeNotNullAndOutTradeNoNotNullAndPaymentTimeAfterAndRefundableAmountGreaterThanOrderByPaymentTimeAsc(Account account, LocalDateTime paymentTime, double refundableAmount);
} }
package com.glsx.usedcar.module.finance.dao;
import com.glsx.usedcar.module.finance.entity.Recharge;
import com.glsx.usedcar.module.finance.entity.Refund;
import com.glsx.usedcar.module.finance.entity.Withdraw;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.summerframework.orm.BaseRepository;
import java.util.List;
import java.util.Optional;
public interface RefundDao extends BaseRepository<Refund, Long>, JpaSpecificationExecutor<Refund> {
@EntityGraph(attributePaths = {"recharge", "withdraw"})
Optional<Refund> findTopByRecharge_OutTradeNoAndRecharge_TransactionIdAndOutRefundNo(String outTradeNo, String transactionId, String outRefundNo);
@EntityGraph(attributePaths = {"recharge"})
List<Refund> findByWithdraw_WithdrawIdOrderByRefundTimeAsc(int withdrawId);
List<Refund> findByRecharge_RechargeIdOrderByRefundTimeAsc(int rechargeId);
@Query("select sum(r.refundAmount) from Refund r where r.withdraw =?1 and r.refundSuccessTime is not null")
Optional<Double> sumByWithdraw(Withdraw withdraw);
}
...@@ -36,13 +36,12 @@ public interface WithdrawDao extends BaseRepository<Withdraw, Integer>, JpaSpeci ...@@ -36,13 +36,12 @@ public interface WithdrawDao extends BaseRepository<Withdraw, Integer>, JpaSpeci
* @param auditState * @param auditState
* @return * @return
*/ */
@Query("select sum(w.amount) from Withdraw w where w.account.accountId =?1 and w.auditState =?2 or (w.auditState =com.glsx.usedcar.module.meta.AuditState.AUDITED and w.state not in ('SUCCESS','FAIL'))") @Query("select sum(w.amount) from Withdraw w where w.account.accountId =?1 and w.auditState =?2")
Optional<Double> sumWithdrawByAccountAuditState(int accountId, AuditState auditState); Optional<Double> sumWithdrawByAccountAuditState(int accountId, AuditState auditState);
List<Withdraw> findByAuditStateAndAuditTimeIsAfterAndStateNotIn(AuditState auditState, LocalDateTime auditTime, List<String> status);
@EntityGraph(attributePaths = {"account"}) // @EntityGraph(attributePaths = {"account"})
List<Withdraw> findByAccountAndStateOrderByPaymentTimeDesc(Account account, String state); // List<Withdraw> findByAccountAndStateOrderByPaymentTimeDesc(Account account, String state);
List<Withdraw> findByAccount_AccountIdAndAuditStateOrderByCreateTimeDesc(int accountId, AuditState auditState); List<Withdraw> findByAccount_AccountIdAndAuditStateOrderByCreateTimeDesc(int accountId, AuditState auditState);
......
...@@ -11,6 +11,11 @@ public class DepositStat { ...@@ -11,6 +11,11 @@ public class DepositStat {
* 总金额 * 总金额
*/ */
private double totalAmount; private double totalAmount;
/**
* 可用金额
*/
private double depositAmount;
/** /**
* 冻结金额 * 冻结金额
*/ */
......
package com.glsx.usedcar.module.finance.entity; package com.glsx.usedcar.module.finance.entity;
import com.glsx.usedcar.module.account.entity.Account; import com.glsx.usedcar.module.account.entity.Account;
import com.glsx.usedcar.module.auction.entity.AuctionOrder;
import com.glsx.usedcar.module.auction.entity.AuctionVehicle; import com.glsx.usedcar.module.auction.entity.AuctionVehicle;
import jakarta.persistence.*; import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
...@@ -12,6 +13,8 @@ import org.hibernate.annotations.DynamicUpdate; ...@@ -12,6 +13,8 @@ import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener; import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import org.summerframework.orm.entity.AuditingTimeEntity; import org.summerframework.orm.entity.AuditingTimeEntity;
import java.time.LocalDateTime;
import static jakarta.persistence.GenerationType.IDENTITY; import static jakarta.persistence.GenerationType.IDENTITY;
@Entity @Entity
...@@ -66,6 +69,65 @@ public class Deposit extends AuditingTimeEntity { ...@@ -66,6 +69,65 @@ public class Deposit extends AuditingTimeEntity {
@Column(nullable = false) @Column(nullable = false)
private double amount; private double amount;
// /**
// * 商户订单号
// */
// @Column(unique = true, nullable = false)
// private String outTradeNo;
//
// @Column
// private LocalDateTime paymentTime;
//
//
// /**
// * 退款备注
// */
// @Column
// private String refundRemark;
//
// /**
// * 微信支付订单号
// */
// @Column(name = "WXTRANSACTION_ID")
// private String transactionId;
//
// /**
// * 微信退款订单号
// */
// @Column
// private String outRefundNo;
//
// /**
// * 退款时间
// */
// @Column
// private LocalDateTime refundTime;
//
// /**
// * 退款成功时间
// */
// @Column
// private LocalDateTime refundSuccessTime;
//
// /**
// * 退款类型
// */
// @Column
// private String refundType;
//
// /**
// * 退款操作人
// */
// @Column
// private String refundOperator;
//
// /**
// * 退款状态
// */
// @Enumerated(EnumType.STRING)
// @Column(nullable = false, length = 32)
// private RefundState refundState;
/** /**
* 保证金状态 * 保证金状态
*/ */
...@@ -74,6 +136,12 @@ public class Deposit extends AuditingTimeEntity { ...@@ -74,6 +136,12 @@ public class Deposit extends AuditingTimeEntity {
@Column(nullable = false, length = 32) @Column(nullable = false, length = 32)
private DepositState depositState; private DepositState depositState;
/**
* 关联的订单
*/
@Transient
private AuctionOrder auctionOrder;
public enum DepositState { public enum DepositState {
/** /**
* 冻结中 * 冻结中
...@@ -85,10 +153,27 @@ public class Deposit extends AuditingTimeEntity { ...@@ -85,10 +153,27 @@ public class Deposit extends AuditingTimeEntity {
UNFREEZE; UNFREEZE;
} }
public enum RefundState {
/**
* 未退款
*/
UNREFUND,
/**
* 退款中
*/
REFUNDING,
/**
* 已退款
*/
REFUNDED,
}
public Deposit(Account account, AuctionVehicle auctionVehicle, Transaction transaction) { public Deposit(Account account, AuctionVehicle auctionVehicle, Transaction transaction) {
this.account = account; this.account = account;
this.auctionVehicle = auctionVehicle; this.auctionVehicle = auctionVehicle;
this.transaction = transaction; this.transaction = transaction;
this.depositState = DepositState.FREEZE; this.depositState = DepositState.FREEZE;
} }
} }
package com.glsx.usedcar.module.finance.entity; package com.glsx.usedcar.module.finance.entity;
import com.glsx.usedcar.module.account.entity.Account; import com.glsx.usedcar.module.account.entity.Account;
import com.glsx.usedcar.module.meta.AuditState;
import jakarta.persistence.*; import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
import lombok.Getter; import lombok.Getter;
...@@ -12,6 +13,8 @@ import org.springframework.data.annotation.CreatedDate; ...@@ -12,6 +13,8 @@ import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener; import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.HashSet;
import java.util.Set;
import static jakarta.persistence.GenerationType.IDENTITY; import static jakarta.persistence.GenerationType.IDENTITY;
...@@ -42,11 +45,19 @@ public class Recharge implements java.io.Serializable { ...@@ -42,11 +45,19 @@ public class Recharge implements java.io.Serializable {
@Column(nullable = false, length = 64) @Column(nullable = false, length = 64)
private String openId; private String openId;
/**
* 充值金额
*/
@Column(nullable = false) @Column(nullable = false)
private double amount; private double amount;
/** /**
* 可退款金额
*/
@Column(nullable = false)
private double refundableAmount;
/**
* 付款类型 * 付款类型
*/ */
@NotNull @NotNull
...@@ -58,6 +69,9 @@ public class Recharge implements java.io.Serializable { ...@@ -58,6 +69,9 @@ public class Recharge implements java.io.Serializable {
@Column @Column
private LocalDateTime createTime; private LocalDateTime createTime;
/**
* 支付成功时间
*/
@Column @Column
private LocalDateTime paymentTime; private LocalDateTime paymentTime;
...@@ -67,6 +81,24 @@ public class Recharge implements java.io.Serializable { ...@@ -67,6 +81,24 @@ public class Recharge implements java.io.Serializable {
@Column @Column
private String transactionId; private String transactionId;
// /**
// * 退款状态
// */
// @Enumerated(EnumType.STRING)
// @Column(nullable = false, length = 32)
// private Deposit.RefundState refundState;
/**
* 退款记录
*/
@OneToMany(cascade = {CascadeType.REMOVE}, fetch = FetchType.LAZY, mappedBy = "recharge")
private Set<Refund> refunds = new HashSet<>();
public Recharge(Account account, String openId, double amount) { public Recharge(Account account, String openId, double amount) {
this.account = account; this.account = account;
this.openId = openId; this.openId = openId;
......
package com.glsx.usedcar.module.finance.entity;
import com.glsx.usedcar.module.account.entity.Account;
import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import java.time.LocalDateTime;
import static jakarta.persistence.GenerationType.IDENTITY;
/**
* 退款
*/
@Entity
@DynamicInsert
@DynamicUpdate
@Table
@EntityListeners(AuditingEntityListener.class)
@Getter
@Setter
@NoArgsConstructor
public class Refund implements java.io.Serializable {
@Id
@GeneratedValue(strategy = IDENTITY)
@Column(unique = true, nullable = false)
private long refundId;
@NotNull
@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
@JoinColumns({@JoinColumn(name = "RECHARGE_ID", nullable = false)})
private Recharge recharge;
@NotNull
@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
@JoinColumns({@JoinColumn(name = "WITHDRAW_ID", nullable = false)})
private Withdraw withdraw;
/**
* 微信退款订单号
*/
@Column
private String outRefundNo;
/**
* 退款金额
*/
@Column
private double refundAmount;
/**
* 退款时间
*/
@Column
private LocalDateTime refundTime;
/**
* 退款成功时间
*/
@Column
private LocalDateTime refundSuccessTime;
public Refund(Withdraw withdraw, Recharge recharge, String outRefundNo, double refundAmount, LocalDateTime refundTime) {
this.withdraw = withdraw;
this.recharge = recharge;
this.outRefundNo = outRefundNo;
this.refundAmount = refundAmount;
this.refundTime = refundTime;
}
}
...@@ -90,6 +90,12 @@ public class Transaction extends AuditingTimeEntity implements Serializable { ...@@ -90,6 +90,12 @@ public class Transaction extends AuditingTimeEntity implements Serializable {
@Column(nullable = false, length = 16) @Column(nullable = false, length = 16)
private double surplus; private double surplus;
/**
* 关联的保证金信息
*/
@Transient
private Deposit deposit;
public Transaction(Account account, String transactionName, TransactionType transactionType, double amount, double surplus) { public Transaction(Account account, String transactionName, TransactionType transactionType, double amount, double surplus) {
this.account = account; this.account = account;
this.transactionName = transactionName; this.transactionName = transactionName;
......
...@@ -79,10 +79,16 @@ public class Withdraw extends AuditingEntity implements Serializable { ...@@ -79,10 +79,16 @@ public class Withdraw extends AuditingEntity implements Serializable {
/** /**
* 审核时间 * 审核时间
*/ */
@Column(nullable = false) @Column
private LocalDateTime auditTime; private LocalDateTime auditTime;
/** /**
* 审核人
*/
@Column
private String auditor;
/**
* 收款账户 * 收款账户
*/ */
...@@ -110,55 +116,62 @@ public class Withdraw extends AuditingEntity implements Serializable { ...@@ -110,55 +116,62 @@ public class Withdraw extends AuditingEntity implements Serializable {
@Column @Column
private String rejectReason; private String rejectReason;
/**
* 付款单号
*/
@Column
private String transferBillNo;
/** /**
* 【单据状态】 * 已退款金额
* 可选取值
* ACCEPTED: 转账已受理
* PROCESSING: 转账处理中,转账结果尚未明确,如一直处于此状态,建议检查账户余额是否足够
* WAIT_USER_CONFIRM: 待收款用户确认,可拉起微信收款确认页面进行收款确认
* TRANSFERING: 转账结果尚未明确,可拉起微信收款确认页面再次重试确认收款
* SUCCESS: 转账成功
* FAIL: 转账失败
* CANCELING: 商户撤销请求受理成功,该笔转账正在撤销中
* CANCELLED: 转账撤销完成
*
* @see WxPayConstants.TransformBillState
*/
@Column
private String state;
/**
* 失败原因
*/ */
@Column @Column(nullable = false, length = 16)
private String failReason; private double refundAmount;
/**
* 收款用户姓名 // /**
*/ // * 付款单号
@Column // */
private String transferName; // @Column
/** // private String transferBillNo;
* 付款金额 //
*/ // /**
@Column // * 【单据状态】
private Double paymentAmount; // * 可选取值
// * ACCEPTED: 转账已受理
/** // * PROCESSING: 转账处理中,转账结果尚未明确,如一直处于此状态,建议检查账户余额是否足够
* 用户确认时间 // * WAIT_USER_CONFIRM: 待收款用户确认,可拉起微信收款确认页面进行收款确认
*/ // * TRANSFERING: 转账结果尚未明确,可拉起微信收款确认页面再次重试确认收款
@Column // * SUCCESS: 转账成功
private LocalDateTime confirmTime; // * FAIL: 转账失败
// * CANCELING: 商户撤销请求受理成功,该笔转账正在撤销中
/** // * CANCELLED: 转账撤销完成
* 发起付款时间 // *
*/ // * @see WxPayConstants.TransformBillState
@Column // */
private LocalDateTime paymentTime; // @Column
// private String state;
// /**
// * 失败原因
// */
// @Column
// private String failReason;
// /**
// * 收款用户姓名
// */
// @Column
// private String transferName;
// /**
// * 付款金额
// */
// @Column
// private Double paymentAmount;
//
// /**
// * 用户确认时间
// */
// @Column
// private LocalDateTime confirmTime;
//
// /**
// * 发起付款时间
// */
// @Column
// private LocalDateTime paymentTime;
/** /**
* 转账成功时间 * 转账成功时间
*/ */
...@@ -171,22 +184,5 @@ public class Withdraw extends AuditingEntity implements Serializable { ...@@ -171,22 +184,5 @@ public class Withdraw extends AuditingEntity implements Serializable {
@Column @Column
private String transferRemark; private String transferRemark;
/**
* 【微信支付】转账单号
*/
@Column
private String packageInfo;
public void setPayResult(TransferBillsGetResult result) {
double paymentAmount = Long.parseLong(result.getTransferAmount()) * 0.0 / 100;
LocalDateTime transferTime = DateTimeUtils.attemptParseLocalDateTime(result.getUpdateTime());
this.transferBillNo = result.getTransferBillNo();
this.state = result.getState();
this.failReason = result.getFailReason();
// this.transferName = result.getUserName();
this.paymentAmount = paymentAmount;
this.transferTime = transferTime;
this.transferRemark = result.getTransferRemark();
}
} }
\ No newline at end of file \ No newline at end of file
package com.glsx.usedcar.module.finance.service; package com.glsx.usedcar.module.finance.service;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.glsx.usedcar.module.account.dao.AccountDao; import com.glsx.usedcar.module.account.dao.AccountDao;
import com.glsx.usedcar.module.account.entity.Account;
import com.glsx.usedcar.module.auction.dao.AuctionVehicleDao;
import com.glsx.usedcar.module.auction.entity.AuctionVehicle;
import com.glsx.usedcar.module.auction.service.AbstractAuctionService;
import com.glsx.usedcar.module.finance.dao.DepositDao; import com.glsx.usedcar.module.finance.dao.DepositDao;
import com.glsx.usedcar.module.finance.dao.DepositRuleDao; import com.glsx.usedcar.module.finance.dao.DepositRuleDao;
import com.glsx.usedcar.module.finance.dao.TransactionDao;
import com.glsx.usedcar.module.finance.domain.DepositStat; import com.glsx.usedcar.module.finance.domain.DepositStat;
import com.glsx.usedcar.module.finance.entity.Deposit; import com.glsx.usedcar.module.finance.entity.Deposit;
import com.glsx.usedcar.module.finance.entity.DepositRule; import com.glsx.usedcar.module.finance.entity.DepositRule;
import com.glsx.usedcar.module.finance.entity.DepositRule_; import com.glsx.usedcar.module.finance.entity.DepositRule_;
import com.glsx.usedcar.module.finance.entity.Transaction;
import com.glsx.usedcar.module.meta.AuditState;
import com.glsx.usedcar.module.security.entity.User;
import com.glsx.usedcar.util.CoderGenerator;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import org.hibernate.ObjectNotFoundException; import org.hibernate.ObjectNotFoundException;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import org.summerframework.core.exception.FieldException;
import org.summerframework.orm.UpdateField; import org.summerframework.orm.UpdateField;
import org.summerframework.orm.paging.Pagination; import org.summerframework.orm.paging.Pagination;
import java.util.List; import java.util.List;
import java.util.Objects;
import java.util.Optional; import java.util.Optional;
/** /**
...@@ -26,7 +39,7 @@ import java.util.Optional; ...@@ -26,7 +39,7 @@ import java.util.Optional;
*/ */
@Service @Service
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true) @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public class DepositService { public class DepositService extends AbstractAuctionService {
@Resource @Resource
private DepositRuleDao depositRuleDao; private DepositRuleDao depositRuleDao;
...@@ -36,6 +49,12 @@ public class DepositService { ...@@ -36,6 +49,12 @@ public class DepositService {
@Resource @Resource
private AccountDao accountDao; private AccountDao accountDao;
@Resource
private AuctionVehicleDao auctionVehicleDao;
@Resource
private TransactionDao transactionDao;
/** /**
* 通过ID查询一个保证金规则 * 通过ID查询一个保证金规则
* *
...@@ -50,6 +69,7 @@ public class DepositService { ...@@ -50,6 +69,7 @@ public class DepositService {
return depositDao.findByDepositId(depositId); return depositDao.findByDepositId(depositId);
} }
/** /**
* 分页查询 * 分页查询
* *
...@@ -78,6 +98,7 @@ public class DepositService { ...@@ -78,6 +98,7 @@ public class DepositService {
return depositDao.sumFreezeByAccountId(accountId, Deposit.DepositState.FREEZE).orElse(0.0); return depositDao.sumFreezeByAccountId(accountId, Deposit.DepositState.FREEZE).orElse(0.0);
} }
/** /**
* 修改保证金规则 * 修改保证金规则
* *
...@@ -139,12 +160,19 @@ public class DepositService { ...@@ -139,12 +160,19 @@ public class DepositService {
return depositRuleDao.findAll(); return depositRuleDao.findAll();
} }
public Deposit getDepositByTransaction(Transaction transaction) {
return depositDao.findTopByTransaction(transaction);
}
public DepositStat getDepositStat() { public DepositStat getDepositStat() {
DepositStat depositStat = new DepositStat(); DepositStat depositStat = new DepositStat();
Optional<Double> totalAmount = accountDao.sumAllSurplus(); Optional<Double> totalAmount = accountDao.sumAllSurplus();
// Optional<Double> totalAmount = depositDao.sumAll();
Optional<Double> depositAmount = depositDao.sumAccountByDepositState(Deposit.DepositState.FREEZE);
Optional<Double> freezeAmount = depositDao.sumByDepositState(Deposit.DepositState.FREEZE); Optional<Double> freezeAmount = depositDao.sumByDepositState(Deposit.DepositState.FREEZE);
depositStat.setTotalAmount(totalAmount.orElse(0.0)); depositStat.setTotalAmount(Math.abs(totalAmount.orElse(0.0)));
depositStat.setFreezeAmount(freezeAmount.orElse(0.0)); depositStat.setDepositAmount(depositAmount.orElse(0.0));
depositStat.setFreezeAmount(Math.abs(freezeAmount.orElse(0.0)));
return depositStat; return depositStat;
} }
......
package com.glsx.usedcar.module.finance.service; package com.glsx.usedcar.module.finance.service;
import com.github.binarywang.wxpay.bean.notify.WxPayRefundNotifyV3Result;
import com.github.binarywang.wxpay.bean.request.WxPayRefundV3Request;
import com.github.binarywang.wxpay.bean.result.WxPayRefundV3Result;
import com.github.binarywang.wxpay.bean.transfer.TransferBillsRequest;
import com.github.binarywang.wxpay.bean.transfer.TransferBillsResult;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.glsx.usedcar.gsc.GscApiInvoker; import com.glsx.usedcar.gsc.GscApiInvoker;
import com.glsx.usedcar.gsc.GscInvoker; import com.glsx.usedcar.gsc.GscInvoker;
import com.glsx.usedcar.module.account.dao.AccountDao; import com.glsx.usedcar.module.account.dao.AccountDao;
...@@ -9,15 +15,10 @@ import com.glsx.usedcar.module.auction.entity.AuctionOrder; ...@@ -9,15 +15,10 @@ import com.glsx.usedcar.module.auction.entity.AuctionOrder;
import com.glsx.usedcar.module.auction.service.AbstractAuctionService; import com.glsx.usedcar.module.auction.service.AbstractAuctionService;
import com.glsx.usedcar.module.business.entity.NoticeTemplate; import com.glsx.usedcar.module.business.entity.NoticeTemplate;
import com.glsx.usedcar.module.business.service.NoticeField; import com.glsx.usedcar.module.business.service.NoticeField;
import com.glsx.usedcar.module.finance.dao.OrderTransactionDao; import com.glsx.usedcar.module.finance.dao.*;
import com.glsx.usedcar.module.finance.dao.RechargeDao;
import com.glsx.usedcar.module.finance.dao.TransactionDao;
import com.glsx.usedcar.module.finance.domain.OrderTransactionAmountStat; import com.glsx.usedcar.module.finance.domain.OrderTransactionAmountStat;
import com.glsx.usedcar.module.finance.domain.OrderTransactionStat; import com.glsx.usedcar.module.finance.domain.OrderTransactionStat;
import com.glsx.usedcar.module.finance.entity.OrderTransaction; import com.glsx.usedcar.module.finance.entity.*;
import com.glsx.usedcar.module.finance.entity.OrderTransaction_;
import com.glsx.usedcar.module.finance.entity.Recharge;
import com.glsx.usedcar.module.finance.entity.Transaction;
import com.glsx.usedcar.module.meta.AuditState; import com.glsx.usedcar.module.meta.AuditState;
import com.glsx.usedcar.module.track.dao.ApproveHistoryDao; import com.glsx.usedcar.module.track.dao.ApproveHistoryDao;
import com.glsx.usedcar.module.track.entity.ApproveHistory; import com.glsx.usedcar.module.track.entity.ApproveHistory;
...@@ -34,6 +35,7 @@ import org.springframework.data.jpa.domain.Specification; ...@@ -34,6 +35,7 @@ import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import org.summerframework.core.exception.FieldException; import org.summerframework.core.exception.FieldException;
import org.summerframework.core.util.DateTimeUtils; import org.summerframework.core.util.DateTimeUtils;
import org.summerframework.orm.UpdateField; import org.summerframework.orm.UpdateField;
...@@ -41,10 +43,7 @@ import org.summerframework.orm.paging.Pagination; ...@@ -41,10 +43,7 @@ import org.summerframework.orm.paging.Pagination;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List; import java.util.*;
import java.util.Locale;
import java.util.Map;
import java.util.Optional;
/** /**
* 交易明细(Transaction) 服务实现类 * 交易明细(Transaction) 服务实现类
...@@ -71,11 +70,16 @@ public class TransactionService extends AbstractAuctionService { ...@@ -71,11 +70,16 @@ public class TransactionService extends AbstractAuctionService {
@Resource @Resource
private RechargeDao rechargeDao; private RechargeDao rechargeDao;
@Resource @Resource
private RefundDao refundDao;
@Resource
private GscInvoker gscInvoker; private GscInvoker gscInvoker;
@Resource @Resource
private GscApiInvoker gscApiInvoker; private GscApiInvoker gscApiInvoker;
@Resource @Resource
private MessageSource messageSource; private MessageSource messageSource;
@Resource
private WithdrawDao withdrawDao;
/** /**
* 通过ID查询一个交易明细 * 通过ID查询一个交易明细
...@@ -96,6 +100,14 @@ public class TransactionService extends AbstractAuctionService { ...@@ -96,6 +100,14 @@ public class TransactionService extends AbstractAuctionService {
return transactionDao.findAll(pagination, pagination.getPageRequest()); return transactionDao.findAll(pagination, pagination.getPageRequest());
} }
public Page<Recharge> pageRecharge(Pagination<Recharge> pagination) {
return rechargeDao.findAll(pagination, pagination.getPageRequest());
}
public Recharge getRechargeById(long rechargeId) {
return rechargeDao.findByRechargeId(rechargeId).orElseThrow(() -> new ObjectNotFoundException(rechargeId, Recharge.class.getSimpleName()));
}
/** /**
* 通过ID查询一个订单交易 * 通过ID查询一个订单交易
...@@ -144,13 +156,7 @@ public class TransactionService extends AbstractAuctionService { ...@@ -144,13 +156,7 @@ public class TransactionService extends AbstractAuctionService {
OrderTransaction save = orderTransactionDao.save(orderTransaction); OrderTransaction save = orderTransactionDao.save(orderTransaction);
// 发送通知消息 // 发送通知消息
sendNoticeMessage(NoticeTemplate.TemplateType.ORDER_TRANSACTION, Map.of( sendNoticeMessage(NoticeTemplate.TemplateType.ORDER_TRANSACTION, Map.of(NoticeField.ORDER_CODE, auctionOrder.getOrderCode(), NoticeField.VEHICLE_NAME, auctionOrder.getVehicle().toVehicleName(), NoticeField.AMOUNT, auctionOrder.getOrderPrice() + auctionOrder.getCommissionPrice(), NoticeField.ORDER_ACCOUNT_NAME, auctionOrder.getAccount().getAccountName(), NoticeField.ORDER_TRANSACTION_TIME, auctionOrder.getCreateTime()));
NoticeField.ORDER_CODE, auctionOrder.getOrderCode(),
NoticeField.VEHICLE_NAME, auctionOrder.getVehicle().toVehicleName(),
NoticeField.AMOUNT, auctionOrder.getOrderPrice() + auctionOrder.getCommissionPrice(),
NoticeField.ORDER_ACCOUNT_NAME, auctionOrder.getAccount().getAccountName(),
NoticeField.ORDER_TRANSACTION_TIME, auctionOrder.getCreateTime()
));
return save; return save;
} }
} }
...@@ -231,6 +237,7 @@ public class TransactionService extends AbstractAuctionService { ...@@ -231,6 +237,7 @@ public class TransactionService extends AbstractAuctionService {
return rechargeDao.save(recharge); return rechargeDao.save(recharge);
} }
/** /**
* 充值结果通知 * 充值结果通知
* *
...@@ -246,6 +253,7 @@ public class TransactionService extends AbstractAuctionService { ...@@ -246,6 +253,7 @@ public class TransactionService extends AbstractAuctionService {
recharge.setPaymentTime(LocalDateTime.now()); recharge.setPaymentTime(LocalDateTime.now());
recharge.setTransactionId(transactionId); recharge.setTransactionId(transactionId);
double amount = recharge.getAmount(); double amount = recharge.getAmount();
recharge.setRefundableAmount(amount);
Account account = recharge.getAccount(); Account account = recharge.getAccount();
account.setSurplus(account.getSurplus() + amount); account.setSurplus(account.getSurplus() + amount);
Transaction transaction = new Transaction(account, "充值成功,交易号:" + outTradeNo, Transaction.TransactionType.RECHARGE, amount, account.getSurplus()); Transaction transaction = new Transaction(account, "充值成功,交易号:" + outTradeNo, Transaction.TransactionType.RECHARGE, amount, account.getSurplus());
...@@ -253,6 +261,7 @@ public class TransactionService extends AbstractAuctionService { ...@@ -253,6 +261,7 @@ public class TransactionService extends AbstractAuctionService {
} }
} }
/** /**
* 订单支付结果通知 * 订单支付结果通知
* *
...@@ -283,6 +292,33 @@ public class TransactionService extends AbstractAuctionService { ...@@ -283,6 +292,33 @@ public class TransactionService extends AbstractAuctionService {
} }
} }
/**
* 退款回调
*
* @param decryptRes
*/
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public void notifyRechargeRefund(WxPayRefundNotifyV3Result.DecryptNotifyResult decryptRes) {
Optional<Refund> refundOptional = refundDao.findTopByRecharge_OutTradeNoAndRecharge_TransactionIdAndOutRefundNo(decryptRes.getOutTradeNo(), decryptRes.getTransactionId(), decryptRes.getOutRefundNo());
if (refundOptional.isPresent()) {
Refund refund = refundOptional.get();
Recharge recharge = refund.getRecharge();
refund.setRefundSuccessTime(DateTimeUtils.attemptParseLocalDateTime(decryptRes.getSuccessTime()));
double refundAmount = refund.getRefundAmount();
Account account = recharge.getAccount();
account.setSurplus(account.getSurplus() - refundAmount);
recharge.setRefundableAmount(recharge.getRefundableAmount() - refundAmount);
Transaction transaction = new Transaction(account, "提现", Transaction.TransactionType.WITHDRAW, -refundAmount, account.getSurplus());
transactionDao.save(transaction);
refundDao.flush();
Withdraw withdraw = refund.getWithdraw();
withdraw.setRefundAmount(refundDao.sumByWithdraw(withdraw).orElse(0.0));
withdraw.setTransferTime(LocalDateTime.now());
}
}
public OrderTransaction getOrderTransactionByOrderId(int orderId) { public OrderTransaction getOrderTransactionByOrderId(int orderId) {
return orderTransactionDao.findTopByAuctionOrder_OrderIdOrderByCreateTimeDesc(orderId); return orderTransactionDao.findTopByAuctionOrder_OrderIdOrderByCreateTimeDesc(orderId);
} }
...@@ -319,4 +355,12 @@ public class TransactionService extends AbstractAuctionService { ...@@ -319,4 +355,12 @@ public class TransactionService extends AbstractAuctionService {
return orderTransaction; return orderTransaction;
} }
public List<Refund> getRefundsByWithdrawId(int withdrawId) {
return refundDao.findByWithdraw_WithdrawIdOrderByRefundTimeAsc(withdrawId);
}
public List<Refund> getRefundsByRechargeId(int rechargeId) {
return refundDao.findByRecharge_RechargeIdOrderByRefundTimeAsc(rechargeId);
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -32,6 +32,11 @@ public class MaLoginRequest { ...@@ -32,6 +32,11 @@ public class MaLoginRequest {
private String openId; private String openId;
/**
* 推荐码
*/
private String recommendCode;
// /** // /**
// * 历史缓存自动token登录 // * 历史缓存自动token登录
// */ // */
......
...@@ -57,4 +57,7 @@ Account.CertifiedState.CERTIFY_FAILED=\u8BA4\u8BC1\u5931\u8D25 ...@@ -57,4 +57,7 @@ Account.CertifiedState.CERTIFY_FAILED=\u8BA4\u8BC1\u5931\u8D25
Account.CertifiedState.CERTIFIED=\u8BA4\u8BC1\u6210\u529F Account.CertifiedState.CERTIFIED=\u8BA4\u8BC1\u6210\u529F
Account.AccountType.COMMON=\u672A\u8BA4\u8BC1\u7528\u6237 Account.AccountType.COMMON=\u672A\u8BA4\u8BC1\u7528\u6237
Account.AccountType.PERSON=\u4E2A\u4EBA\u7528\u6237 Account.AccountType.PERSON=\u4E2A\u4EBA\u7528\u6237
Account.AccountType.COMPANY=\u8F66\u5546\u7528\u6237" Account.AccountType.COMPANY=\u8F66\u5546\u7528\u6237
Deposit.RefundState.UNREFUND=\u672A\u9000\u6B3E
Deposit.RefundState.REFUNDING=\u9000\u6B3E\u4E2D
Deposit.RefundState.REFUNDED=\u5DF2\u9000\u6B3E
package org.summerframework.storage.platform; package org.summerframework.storage.platform;
import com.aspose.cells.*;
import com.aspose.words.*;
import com.aspose.words.ImageSaveOptions;
import com.aspose.words.ImageType;
import com.aspose.words.SaveFormat;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
...@@ -189,26 +185,6 @@ public abstract class AbstractStorageService implements StorageService { ...@@ -189,26 +185,6 @@ public abstract class AbstractStorageService implements StorageService {
} }
protected void thumbWord(String sourceFilePath, String targetFilePath) throws Exception {
// 加载 Word 文档
Document doc = new Document(sourceFilePath);
// 渲染第一页为图片
ImageSaveOptions options = new ImageSaveOptions(SaveFormat.PNG);
// 从第0页开始 仅渲染一页
options.setPageSet(new PageSet(0, 1));
// 分辨率
options.setResolution(150);
String outputImagePath = sourceFilePath.substring(0, sourceFilePath.lastIndexOf(".")) + ".png";
doc.save(outputImagePath, options);
// 生成缩略图(可选)
File outputImageFile = new File(outputImagePath);
BufferedImage image = ImageIO.read(outputImageFile);
BufferedImage thumbnail = resizeImage(image, thumbnailsWidth, thumbnailsHeight); // 你可以指定缩略图大小
ImageIO.write(thumbnail, "png", new File(targetFilePath));
outputImageFile.delete();
}
protected void thumbPdf(String sourceFilePath, String targetFilePath) throws IOException { protected void thumbPdf(String sourceFilePath, String targetFilePath) throws IOException {
// 加载 PDF 文件 // 加载 PDF 文件
FileInputStream file = new FileInputStream(sourceFilePath); FileInputStream file = new FileInputStream(sourceFilePath);
...@@ -227,30 +203,6 @@ public abstract class AbstractStorageService implements StorageService { ...@@ -227,30 +203,6 @@ public abstract class AbstractStorageService implements StorageService {
document.close(); document.close();
} }
protected void thumbExcel(String sourceFilePath, String targetFilePath) throws Exception {
// 加载 Excel 文件
Workbook workbook = new Workbook(sourceFilePath);
// 获取第一个工作表
Worksheet sheet = workbook.getWorksheets().get(0);
// 渲染选项
ImageOrPrintOptions options = new ImageOrPrintOptions();
options.setImageType(ImageType.PNG);
options.setOnePagePerSheet(true); // 将整张表渲染为一页
options.setOnlyArea(false); // 如果只想渲染有内容的区域,设置为 true
options.setPrintingPage(PrintingPageType.DEFAULT);
// 渲染器
SheetRender render = new SheetRender(sheet, options);
String outputImagePath = sourceFilePath.substring(0, sourceFilePath.lastIndexOf(".")) + ".png";
// 渲染第一页(通常每个 sheet 只有一页)
render.toImage(0, outputImagePath);
// 生成缩略图(可选)
File outputImageFile = new File(outputImagePath);
BufferedImage image = ImageIO.read(outputImageFile);
BufferedImage thumbnail = resizeImage(image, thumbnailsWidth, thumbnailsHeight); // 你可以指定缩略图大小
ImageIO.write(thumbnail, "png", new File(targetFilePath));
outputImageFile.delete();
}
protected void thumbPpt(String sourceFilePath, String targetFilePath) throws IOException { protected void thumbPpt(String sourceFilePath, String targetFilePath) throws IOException {
// 1. 加载 PPTX 文件 // 1. 加载 PPTX 文件
......
...@@ -202,7 +202,7 @@ public class LocalFileService extends AbstractStorageService implements StorageS ...@@ -202,7 +202,7 @@ public class LocalFileService extends AbstractStorageService implements StorageS
@Override @Override
public void removeFileInfo(@Nullable FileInfo fileInfo) { public void removeFileInfo(@Nullable FileInfo fileInfo) {
if(Objects.nonNull(fileInfo)){ if (Objects.nonNull(fileInfo)) {
removeFile(fileInfo.getFilePath()); removeFile(fileInfo.getFilePath());
} }
} }
...@@ -318,9 +318,7 @@ public class LocalFileService extends AbstractStorageService implements StorageS ...@@ -318,9 +318,7 @@ public class LocalFileService extends AbstractStorageService implements StorageS
thumbPath = thumbDir + this.getRandomFileName(filename); thumbPath = thumbDir + this.getRandomFileName(filename);
Thumbnails.of(sourceFile).size(thumbnailsWidth, thumbnailsHeight).crop(Positions.CENTER).toFile(absoluteDir + thumbPath); Thumbnails.of(sourceFile).size(thumbnailsWidth, thumbnailsHeight).crop(Positions.CENTER).toFile(absoluteDir + thumbPath);
} else if ("doc".equals(suffix) || "docx".equals(suffix)) { } else if ("doc".equals(suffix) || "docx".equals(suffix)) {
thumbWord(sourceFile.getAbsolutePath(), absoluteDir + thumbPath);
} else if ("xls".equals(suffix) || "xlsx".equals(suffix)) { } else if ("xls".equals(suffix) || "xlsx".equals(suffix)) {
thumbExcel(sourceFile.getAbsolutePath(), absoluteDir + thumbPath);
} else if ("ppt".equals(suffix) || "pptx".equals(suffix)) { } else if ("ppt".equals(suffix) || "pptx".equals(suffix)) {
thumbPpt(sourceFile.getAbsolutePath(), absoluteDir + thumbPath); thumbPpt(sourceFile.getAbsolutePath(), absoluteDir + thumbPath);
} else if ("pdf".equals(suffix)) { } else if ("pdf".equals(suffix)) {
......
...@@ -13,9 +13,8 @@ ...@@ -13,9 +13,8 @@
"@tinymce/tinymce-vue": "^6.3.0", "@tinymce/tinymce-vue": "^6.3.0",
"@types/lodash-es": "^4.17.12", "@types/lodash-es": "^4.17.12",
"ant-design-vue": "~4.2.1", "ant-design-vue": "~4.2.1",
"autumn-antv": "~0.0.24",
"autumn-vue": "~0.4.47",
"axios": "~1.7.6", "axios": "~1.7.6",
"image-conversion": "^2.1.1",
"china-area-data": "^5.0.1", "china-area-data": "^5.0.1",
"clipboard": "^2.0.11", "clipboard": "^2.0.11",
"core-js": "^3.6.5", "core-js": "^3.6.5",
...@@ -58,8 +57,6 @@ ...@@ -58,8 +57,6 @@
"less-loader": "^6.0.0", "less-loader": "^6.0.0",
"typescript": "~4.5.2", "typescript": "~4.5.2",
"vite": "^5.3.3", "vite": "^5.3.3",
"vite-plugin-electron": "^0.28.7",
"vite-plugin-electron-renderer": "^0.14.5",
"vite-svg-loader": "^5.1.0" "vite-svg-loader": "^5.1.0"
}, },
"volta":{ "volta":{
......
...@@ -102,13 +102,13 @@ import { ...@@ -102,13 +102,13 @@ import {
import 'dayjs/locale/zh-cn'; import 'dayjs/locale/zh-cn';
import zhCN from 'ant-design-vue/es/locale/zh_CN'; import zhCN from 'ant-design-vue/es/locale/zh_CN';
import lightTheme from '@/assets/style/theme/light'; import lightTheme from '@/assets/style/theme/light';
import {Privilege} from "autumn-vue/lib/core/security/Privilege"; import {Privilege} from "lib/src/core/security/Privilege";
import BreadcrumbBar from "@/components/BreadcrumbBar.vue"; import BreadcrumbBar from "@/components/BreadcrumbBar.vue";
import {Getter} from "vuex-facing-decorator"; import {Getter} from "vuex-facing-decorator";
import PrivilegeMenu from "@/views/PrivilegeMenu.vue"; import PrivilegeMenu from "@/views/PrivilegeMenu.vue";
import {createVNode} from "vue"; import {createVNode} from "vue";
import {message, Modal} from "ant-design-vue"; import {message, Modal} from "ant-design-vue";
import Authenticity from "autumn-vue/lib/core/security/Authenticity"; import Authenticity from "lib/src/core/security/Authenticity";
@Component({ @Component({
components: { components: {
......
...@@ -4,43 +4,55 @@ import dayjs,{Dayjs} from 'dayjs'; ...@@ -4,43 +4,55 @@ import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {Account} from "lib/src/entity/account/entity/Account"; import {Account} from "lib/src/entity/account/entity/Account";
import {AccountTag} from "lib/src/entity/account/entity/AccountTag"; import {AccountTag} from "lib/src/entity/account/entity/AccountTag";
import {Page} from "autumn-vue/lib/core/page/Page"; import {Page} from "lib/src/core/page/Page";
import {ApproveHistory} from "lib/src/entity/track/entity/ApproveHistory"; import {ApproveHistory} from "lib/src/entity/track/entity/ApproveHistory";
import {AccountTotalStat} from "lib/src/entity/account/domain/AccountTotalStat"; import {AccountTotalStat} from "lib/src/entity/account/domain/AccountTotalStat";
import {NameCount} from "lib/src/entity/analysis/domain/NameCount"; import {NameCount} from "lib/src/entity/analysis/domain/NameCount";
import {AccountProjection} from "lib/src/entity/account/domain/AccountProjection"; import {AccountProjection} from "lib/src/entity/account/domain/AccountProjection";
import {ProvinceCount} from "lib/src/entity/account/domain/ProvinceCount"; import {ProvinceCount} from "lib/src/entity/account/domain/ProvinceCount";
import {AccountDateStat} from "lib/src/entity/account/domain/AccountDateStat"; import {AccountDateStat} from "lib/src/entity/account/domain/AccountDateStat";
import {Pagination} from "lib/src/core/page/Pagination";
import {ResponseEntity} from "lib/src/domain/ResponseEntity";
import {TagAccount} from "lib/src/entity/account/domain/TagAccount";
// endregion // endregion
/** /**
* 个人账户(Account) PI接口 * 个人账户(Account) PI接口
* @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class AccountController{ export class AccountController{
/** /**
*/
static accountTagQrCode(axios:AxiosStatic, code: string, config?:any): Promise<AxiosResponse<ResponseEntity<byte[]>>> {
return axios.get('account/accountTagQrCode', {params: {code: code}}, config);
}
/**
* 新增用户分组 * 新增用户分组
* @param accountTag * @param accountTag
* @return AccountTag * @return AccountTag
*/ */
static addAccountTag(axios:AxiosStatic, accountTag: any): Promise<AxiosResponse<AccountTag>> { static addAccountTag(axios:AxiosStatic, accountTag: AccountTag): Promise<AxiosResponse<AccountTag>> {
return axios.post('account/addAccountTag', accountTag); return axios.post('account/addAccountTag', accountTag);
} }
/** /**
*/ */
static addTagAccounts(axios:AxiosStatic, tagAccount: any): Promise<AxiosResponse<boolean>> { static addTagAccounts(axios:AxiosStatic, tagAccount: TagAccount): Promise<AxiosResponse<boolean>> {
return axios.post('account/addTagAccounts', tagAccount); return axios.post('account/addTagAccounts', tagAccount);
} }
static setTagAccounts(axios:AxiosStatic, tagAccount: TagAccount): Promise<AxiosResponse<boolean>> {
return axios.post('account/setTagAccounts', tagAccount);
}
/** /**
* 审核用户申请 * 审核用户申请
* @param approveHistory * @param approveHistory
* @return ApproveHistory * @return ApproveHistory
*/ */
static auditAccount(axios:AxiosStatic, approveHistory: any): Promise<AxiosResponse<ApproveHistory>> { static auditAccount(axios:AxiosStatic, approveHistory: ApproveHistory): Promise<AxiosResponse<ApproveHistory>> {
return axios.post('account/auditAccount', approveHistory); return axios.post('account/auditAccount', approveHistory);
} }
...@@ -50,19 +62,19 @@ export class AccountController{ ...@@ -50,19 +62,19 @@ export class AccountController{
* @param authentication * @param authentication
* @return ApproveHistory * @return ApproveHistory
*/ */
static auditAccounts(axios:AxiosStatic, approveHistory: any): Promise<AxiosResponse<ApproveHistory>> { static auditAccounts(axios:AxiosStatic, approveHistory: ApproveHistory): Promise<AxiosResponse<ApproveHistory>> {
return axios.post('account/auditAccounts', approveHistory); return axios.post('account/auditAccounts', approveHistory);
} }
/** /**
*/ */
static enableAccount(axios:AxiosStatic, disableReason: any, accountId: number, enabled: boolean): Promise<AxiosResponse<boolean>> { static enableAccount(axios:AxiosStatic, disableReason: string, accountId: number, enabled: boolean): Promise<AxiosResponse<boolean>> {
return axios.post('account/enableAccount', disableReason, {params: {accountId: accountId,enabled: enabled}}); return axios.post('account/enableAccount', disableReason, {params: {accountId: accountId,enabled: enabled}});
} }
/** /**
*/ */
static exportAccount(axios:AxiosStatic, pagination: any, config?:any): Promise<AxiosResponse<void>> { static exportAccount(axios:AxiosStatic, pagination: Pagination<Account>, config?:any): Promise<AxiosResponse<void>> {
return axios.post('account/exportAccount', pagination, config); return axios.post('account/exportAccount', pagination, config);
} }
...@@ -146,7 +158,7 @@ export class AccountController{ ...@@ -146,7 +158,7 @@ export class AccountController{
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageAccount(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Account>>> { static pageAccount(axios:AxiosStatic, pagination: Pagination<Account>): Promise<AxiosResponse<Page<Account>>> {
return axios.post('account/pageAccount', pagination); return axios.post('account/pageAccount', pagination);
} }
...@@ -157,7 +169,7 @@ export class AccountController{ ...@@ -157,7 +169,7 @@ export class AccountController{
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageAccountTag(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<AccountTag>>> { static pageAccountTag(axios:AxiosStatic, pagination: Pagination<AccountTag>): Promise<AxiosResponse<Page<AccountTag>>> {
return axios.post('account/pageAccountTag', pagination); return axios.post('account/pageAccountTag', pagination);
} }
...@@ -165,7 +177,7 @@ export class AccountController{ ...@@ -165,7 +177,7 @@ export class AccountController{
/** /**
*/ */
static pageAuctionAccount(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Account>>> { static pageAuctionAccount(axios:AxiosStatic, pagination: Pagination<Account>): Promise<AxiosResponse<Page<Account>>> {
return axios.post('account/pageAuctionAccount', pagination); return axios.post('account/pageAuctionAccount', pagination);
} }
...@@ -194,7 +206,7 @@ export class AccountController{ ...@@ -194,7 +206,7 @@ export class AccountController{
* @param account * @param account
* @return Account * @return Account
*/ */
static updateAccount(axios:AxiosStatic, account: any): Promise<AxiosResponse<Account>> { static updateAccount(axios:AxiosStatic, account: Account): Promise<AxiosResponse<Account>> {
return axios.post('account/updateAccount', account); return axios.post('account/updateAccount', account);
} }
...@@ -203,7 +215,7 @@ export class AccountController{ ...@@ -203,7 +215,7 @@ export class AccountController{
* @param accountTag * @param accountTag
* @return AccountTag * @return AccountTag
*/ */
static updateAccountTag(axios:AxiosStatic, accountTag: any): Promise<AxiosResponse<AccountTag>> { static updateAccountTag(axios:AxiosStatic, accountTag: AccountTag): Promise<AxiosResponse<AccountTag>> {
return axios.post('account/updateAccountTag', accountTag); return axios.post('account/updateAccountTag', accountTag);
} }
......
...@@ -3,12 +3,12 @@ import {AxiosResponse, AxiosStatic} from 'axios'; ...@@ -3,12 +3,12 @@ import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs'; import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {Agreement} from "lib/src/entity/business/entity/Agreement"; import {Agreement} from "lib/src/entity/business/entity/Agreement";
import {Page} from "autumn-vue/lib/core/page/Page"; import {Page} from "lib/src/core/page/Page";
import {Pagination} from "lib/src/core/page/Pagination";
// endregion // endregion
/** /**
* 协议管理(Agreement) PI接口 * 协议管理(Agreement) PI接口
* @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class AgreementController{ export class AgreementController{
...@@ -18,7 +18,7 @@ export class AgreementController{ ...@@ -18,7 +18,7 @@ export class AgreementController{
* @param agreement * @param agreement
* @return Agreement * @return Agreement
*/ */
static addAgreement(axios:AxiosStatic, agreement: any): Promise<AxiosResponse<Agreement>> { static addAgreement(axios:AxiosStatic, agreement: Agreement): Promise<AxiosResponse<Agreement>> {
return axios.post('agreement/addAgreement', agreement); return axios.post('agreement/addAgreement', agreement);
} }
...@@ -42,7 +42,7 @@ export class AgreementController{ ...@@ -42,7 +42,7 @@ export class AgreementController{
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageAgreement(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Agreement>>> { static pageAgreement(axios:AxiosStatic, pagination: Pagination<Agreement>): Promise<AxiosResponse<Page<Agreement>>> {
return axios.post('agreement/pageAgreement', pagination); return axios.post('agreement/pageAgreement', pagination);
} }
...@@ -62,7 +62,7 @@ export class AgreementController{ ...@@ -62,7 +62,7 @@ export class AgreementController{
* @param agreement * @param agreement
* @return Agreement * @return Agreement
*/ */
static updateAgreement(axios:AxiosStatic, agreement: any): Promise<AxiosResponse<Agreement>> { static updateAgreement(axios:AxiosStatic, agreement: Agreement): Promise<AxiosResponse<Agreement>> {
return axios.post('agreement/updateAgreement', agreement); return axios.post('agreement/updateAgreement', agreement);
} }
......
...@@ -3,12 +3,12 @@ import {AxiosResponse, AxiosStatic} from 'axios'; ...@@ -3,12 +3,12 @@ import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs'; import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {Appeal} from "lib/src/entity/auction/entity/Appeal"; import {Appeal} from "lib/src/entity/auction/entity/Appeal";
import {Page} from "autumn-vue/lib/core/page/Page"; import {Page} from "lib/src/core/page/Page";
import {Pagination} from "lib/src/core/page/Pagination";
// endregion // endregion
/** /**
* 申诉(Appeal) PI接口 * 申诉(Appeal) PI接口
* @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class AppealController{ export class AppealController{
...@@ -18,13 +18,13 @@ export class AppealController{ ...@@ -18,13 +18,13 @@ export class AppealController{
* @param appeal * @param appeal
* @return Appeal * @return Appeal
*/ */
static acceptanceAppeal(axios:AxiosStatic, appeal: any): Promise<AxiosResponse<Appeal>> { static acceptanceAppeal(axios:AxiosStatic, appeal: Appeal): Promise<AxiosResponse<Appeal>> {
return axios.post('appeal/acceptanceAppeal', appeal); return axios.post('appeal/acceptanceAppeal', appeal);
} }
/** /**
*/ */
static exportAppeal(axios:AxiosStatic, pagination: any, config?:any): Promise<AxiosResponse<void>> { static exportAppeal(axios:AxiosStatic, pagination: Pagination<Appeal>, config?:any): Promise<AxiosResponse<void>> {
return axios.post('appeal/exportAppeal', pagination, config); return axios.post('appeal/exportAppeal', pagination, config);
} }
...@@ -48,7 +48,7 @@ export class AppealController{ ...@@ -48,7 +48,7 @@ export class AppealController{
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageAppeal(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Appeal>>> { static pageAppeal(axios:AxiosStatic, pagination: Pagination<Appeal>): Promise<AxiosResponse<Page<Appeal>>> {
return axios.post('appeal/pageAppeal', pagination); return axios.post('appeal/pageAppeal', pagination);
} }
...@@ -56,7 +56,7 @@ export class AppealController{ ...@@ -56,7 +56,7 @@ export class AppealController{
/** /**
*/ */
static processingAppeal(axios:AxiosStatic, appeal: any): Promise<AxiosResponse<Appeal>> { static processingAppeal(axios:AxiosStatic, appeal: Appeal): Promise<AxiosResponse<Appeal>> {
return axios.post('appeal/processingAppeal', appeal); return axios.post('appeal/processingAppeal', appeal);
} }
......
...@@ -3,7 +3,9 @@ import {AxiosResponse, AxiosStatic} from 'axios'; ...@@ -3,7 +3,9 @@ import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs'; import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {AppraisePrice} from "lib/src/entity/auction/entity/AppraisePrice"; import {AppraisePrice} from "lib/src/entity/auction/entity/AppraisePrice";
import {Page} from "autumn-vue/lib/core/page/Page"; import {Page} from "lib/src/core/page/Page";
import {ApproveHistory} from "lib/src/entity/track/entity/ApproveHistory";
import {Pagination} from "lib/src/core/page/Pagination";
// endregion // endregion
/** /**
...@@ -12,13 +14,13 @@ export class AppraiseController{ ...@@ -12,13 +14,13 @@ export class AppraiseController{
/** /**
*/ */
static addAppraisePrice(axios:AxiosStatic, appraisePrice: any): Promise<AxiosResponse<AppraisePrice>> { static addAppraisePrice(axios:AxiosStatic, appraisePrice: AppraisePrice): Promise<AxiosResponse<AppraisePrice>> {
return axios.post('appraise/addAppraisePrice', appraisePrice); return axios.post('appraise/addAppraisePrice', appraisePrice);
} }
/** /**
*/ */
static auditAppraisePrice(axios:AxiosStatic, appraisePrice: any): Promise<AxiosResponse<AppraisePrice>> { static auditAppraisePrice(axios:AxiosStatic, appraisePrice: ApproveHistory): Promise<AxiosResponse<AppraisePrice>> {
return axios.post('appraise/auditAppraisePrice', appraisePrice); return axios.post('appraise/auditAppraisePrice', appraisePrice);
} }
...@@ -30,7 +32,7 @@ export class AppraiseController{ ...@@ -30,7 +32,7 @@ export class AppraiseController{
/** /**
*/ */
static pageAppraisePrice(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<AppraisePrice>>> { static pageAppraisePrice(axios:AxiosStatic, pagination: Pagination<AppraisePrice>): Promise<AxiosResponse<Page<AppraisePrice>>> {
return axios.post('appraise/pageAppraisePrice', pagination); return axios.post('appraise/pageAppraisePrice', pagination);
} }
......
...@@ -4,7 +4,9 @@ import dayjs,{Dayjs} from 'dayjs'; ...@@ -4,7 +4,9 @@ import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {AuctionChange} from "lib/src/entity/auction/entity/AuctionChange"; import {AuctionChange} from "lib/src/entity/auction/entity/AuctionChange";
import {AuctionVehicleChange} from "lib/src/entity/auction/entity/AuctionVehicleChange"; import {AuctionVehicleChange} from "lib/src/entity/auction/entity/AuctionVehicleChange";
import {Page} from "autumn-vue/lib/core/page/Page"; import {Page} from "lib/src/core/page/Page";
import {ApproveHistory} from "lib/src/entity/track/entity/ApproveHistory";
import {Pagination} from "lib/src/core/page/Pagination";
// endregion // endregion
/** /**
...@@ -16,31 +18,31 @@ export class AuctionChangeController{ ...@@ -16,31 +18,31 @@ export class AuctionChangeController{
* @param auctionChange * @param auctionChange
* @return AuctionChange * @return AuctionChange
*/ */
static addAuctionChange(axios:AxiosStatic, auctionChange: any): Promise<AxiosResponse<AuctionChange>> { static addAuctionChange(axios:AxiosStatic, auctionChange: AuctionChange): Promise<AxiosResponse<AuctionChange>> {
return axios.post('auction/change/addAuctionChange', auctionChange); return axios.post('auction/change/addAuctionChange', auctionChange);
} }
/** /**
*/ */
static addAuctionVehicleChange(axios:AxiosStatic, auctionVehicleChange: any): Promise<AxiosResponse<AuctionVehicleChange>> { static addAuctionVehicleChange(axios:AxiosStatic, auctionVehicleChange: AuctionVehicleChange): Promise<AxiosResponse<AuctionVehicleChange>> {
return axios.post('auction/change/addAuctionVehicleChange', auctionVehicleChange); return axios.post('auction/change/addAuctionVehicleChange', auctionVehicleChange);
} }
/** /**
*/ */
static auditAuctionChange(axios:AxiosStatic, approveHistory: any): Promise<AxiosResponse<AuctionChange>> { static auditAuctionChange(axios:AxiosStatic, approveHistory: ApproveHistory): Promise<AxiosResponse<AuctionChange>> {
return axios.post('auction/change/auditAuctionChange', approveHistory); return axios.post('auction/change/auditAuctionChange', approveHistory);
} }
/** /**
*/ */
static auditAuctionVehicleChange(axios:AxiosStatic, approveHistory: any): Promise<AxiosResponse<AuctionVehicleChange>> { static auditAuctionVehicleChange(axios:AxiosStatic, approveHistory: ApproveHistory): Promise<AxiosResponse<AuctionVehicleChange>> {
return axios.post('auction/change/auditAuctionVehicleChange', approveHistory); return axios.post('auction/change/auditAuctionVehicleChange', approveHistory);
} }
/** /**
*/ */
static pageAuctionChange(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<AuctionChange>>> { static pageAuctionChange(axios:AxiosStatic, pagination: Pagination<AuctionChange>): Promise<AxiosResponse<Page<AuctionChange>>> {
return axios.post('auction/change/pageAuctionChange', pagination); return axios.post('auction/change/pageAuctionChange', pagination);
} }
...@@ -48,7 +50,7 @@ export class AuctionChangeController{ ...@@ -48,7 +50,7 @@ export class AuctionChangeController{
/** /**
*/ */
static pageAuctionVehicleChange(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<AuctionVehicleChange>>> { static pageAuctionVehicleChange(axios:AxiosStatic, pagination: Pagination<AuctionVehicleChange>): Promise<AxiosResponse<Page<AuctionVehicleChange>>> {
return axios.post('auction/change/pageAuctionVehicleChange', pagination); return axios.post('auction/change/pageAuctionVehicleChange', pagination);
} }
......
...@@ -3,12 +3,14 @@ import {AxiosResponse, AxiosStatic} from 'axios'; ...@@ -3,12 +3,14 @@ import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs'; import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {AuctionOrder} from "lib/src/entity/auction/entity/AuctionOrder"; import {AuctionOrder} from "lib/src/entity/auction/entity/AuctionOrder";
import {Page} from "autumn-vue/lib/core/page/Page"; import {Page} from "lib/src/core/page/Page";
import {BidOrder} from "lib/src/entity/auction/domain/BidOrder";
import {ApproveHistory} from "lib/src/entity/track/entity/ApproveHistory";
import {Pagination} from "lib/src/core/page/Pagination";
// endregion // endregion
/** /**
* 拍卖订单(AuctionOrder) PI接口 * 拍卖订单(AuctionOrder) PI接口
* @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class AuctionOrderController{ export class AuctionOrderController{
...@@ -18,7 +20,7 @@ export class AuctionOrderController{ ...@@ -18,7 +20,7 @@ export class AuctionOrderController{
* @param bidOrder * @param bidOrder
* @return AuctionOrder * @return AuctionOrder
*/ */
static addAuctionOrder(axios:AxiosStatic, bidOrder: any): Promise<AxiosResponse<AuctionOrder>> { static addAuctionOrder(axios:AxiosStatic, bidOrder: BidOrder): Promise<AxiosResponse<AuctionOrder>> {
return axios.post('auctionOrder/addAuctionOrder', bidOrder); return axios.post('auctionOrder/addAuctionOrder', bidOrder);
} }
...@@ -28,7 +30,7 @@ export class AuctionOrderController{ ...@@ -28,7 +30,7 @@ export class AuctionOrderController{
* @return AuctionOrder * @return AuctionOrder
* @throws FieldException * @throws FieldException
*/ */
static auditTransferAuctionOrder(axios:AxiosStatic, approveHistory: any): Promise<AxiosResponse<AuctionOrder>> { static auditTransferAuctionOrder(axios:AxiosStatic, approveHistory: ApproveHistory): Promise<AxiosResponse<AuctionOrder>> {
return axios.post('auctionOrder/auditTransferAuctionOrder', approveHistory); return axios.post('auctionOrder/auditTransferAuctionOrder', approveHistory);
} }
...@@ -37,13 +39,13 @@ export class AuctionOrderController{ ...@@ -37,13 +39,13 @@ export class AuctionOrderController{
* @param auctionOrder * @param auctionOrder
* @return AuctionOrder * @return AuctionOrder
*/ */
static cancelAuctionOrder(axios:AxiosStatic, auctionOrder: any): Promise<AxiosResponse<AuctionOrder>> { static cancelAuctionOrder(axios:AxiosStatic, auctionOrder: AuctionOrder): Promise<AxiosResponse<AuctionOrder>> {
return axios.post('auctionOrder/cancelAuctionOrder', auctionOrder); return axios.post('auctionOrder/cancelAuctionOrder', auctionOrder);
} }
/** /**
*/ */
static exportAuctionOrder(axios:AxiosStatic, pagination: any, config?:any): Promise<AxiosResponse<void>> { static exportAuctionOrder(axios:AxiosStatic, pagination: Pagination<AuctionOrder>, config?:any): Promise<AxiosResponse<void>> {
return axios.post('auctionOrder/exportAuctionOrder', pagination, config); return axios.post('auctionOrder/exportAuctionOrder', pagination, config);
} }
...@@ -91,7 +93,7 @@ export class AuctionOrderController{ ...@@ -91,7 +93,7 @@ export class AuctionOrderController{
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageAuctionOrder(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<AuctionOrder>>> { static pageAuctionOrder(axios:AxiosStatic, pagination: Pagination<AuctionOrder>): Promise<AxiosResponse<Page<AuctionOrder>>> {
return axios.post('auctionOrder/pageAuctionOrder', pagination); return axios.post('auctionOrder/pageAuctionOrder', pagination);
} }
......
...@@ -2,11 +2,13 @@ ...@@ -2,11 +2,13 @@
import {AxiosResponse, AxiosStatic} from 'axios'; import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs'; import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {BankAccount} from "lib/src/entity/finance/entity/BankAccount";
import {Pagination} from "lib/src/core/page/Pagination";
import {Page} from "lib/src/core/page/Page";
// endregion // endregion
/** /**
* 银行账户(BankAccount) PI接口 * 银行账户(BankAccount) PI接口
* @author gonglei
* @since 2025-10-19 11:05:09 * @since 2025-10-19 11:05:09
*/ */
export class BankAccountController{ export class BankAccountController{
...@@ -16,7 +18,7 @@ export class BankAccountController{ ...@@ -16,7 +18,7 @@ export class BankAccountController{
* @param bankAccount * @param bankAccount
* @return BankAccount * @return BankAccount
*/ */
static addBankAccount(axios:AxiosStatic, bankAccount: any): Promise<AxiosResponse<BankAccount>> { static addBankAccount(axios:AxiosStatic, bankAccount: BankAccount): Promise<AxiosResponse<BankAccount>> {
return axios.post('bankAccount/addBankAccount', bankAccount); return axios.post('bankAccount/addBankAccount', bankAccount);
} }
...@@ -59,7 +61,7 @@ export class BankAccountController{ ...@@ -59,7 +61,7 @@ export class BankAccountController{
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageBankAccount(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<BankAccount>>> { static pageBankAccount(axios:AxiosStatic, pagination: Pagination<BankAccount>): Promise<AxiosResponse<Page<BankAccount>>> {
return axios.post('bankAccount/pageBankAccount', pagination); return axios.post('bankAccount/pageBankAccount', pagination);
} }
...@@ -79,7 +81,7 @@ export class BankAccountController{ ...@@ -79,7 +81,7 @@ export class BankAccountController{
* @param bankAccount * @param bankAccount
* @return BankAccount * @return BankAccount
*/ */
static updateBankAccount(axios:AxiosStatic, bankAccount: any): Promise<AxiosResponse<BankAccount>> { static updateBankAccount(axios:AxiosStatic, bankAccount: BankAccount): Promise<AxiosResponse<BankAccount>> {
return axios.post('bankAccount/updateBankAccount', bankAccount); return axios.post('bankAccount/updateBankAccount', bankAccount);
} }
......
...@@ -3,14 +3,14 @@ import {AxiosResponse, AxiosStatic} from 'axios'; ...@@ -3,14 +3,14 @@ import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs'; import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {Bid} from "lib/src/entity/auction/entity/Bid"; import {Bid} from "lib/src/entity/auction/entity/Bid";
import {Page} from "autumn-vue/lib/core/page/Page"; import {Page} from "lib/src/core/page/Page";
import {IndexValue} from "lib/src/entity/analysis/domain/IndexValue"; import {IndexValue} from "lib/src/entity/analysis/domain/IndexValue";
import {ProvinceRate} from "lib/src/entity/analysis/domain/ProvinceRate"; import {ProvinceRate} from "lib/src/entity/analysis/domain/ProvinceRate";
import {Pagination} from "lib/src/core/page/Pagination";
// endregion // endregion
/** /**
* 投标竞价(Bid) PI接口 * 投标竞价(Bid) PI接口
* @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class BidController{ export class BidController{
...@@ -43,7 +43,7 @@ export class BidController{ ...@@ -43,7 +43,7 @@ export class BidController{
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageBid(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Bid>>> { static pageBid(axios:AxiosStatic, pagination: Pagination<Bid>): Promise<AxiosResponse<Page<Bid>>> {
return axios.post('bid/pageBid', pagination); return axios.post('bid/pageBid', pagination);
} }
......
...@@ -11,7 +11,7 @@ export class BreachController{ ...@@ -11,7 +11,7 @@ export class BreachController{
/** /**
*/ */
static addBreachRecord(axios:AxiosStatic, breachRecord: any): Promise<AxiosResponse<BreachRecord>> { static addBreachRecord(axios:AxiosStatic, breachRecord: BreachRecord): Promise<AxiosResponse<BreachRecord>> {
return axios.post('breach/addBreachRecord', breachRecord); return axios.post('breach/addBreachRecord', breachRecord);
} }
......
...@@ -3,12 +3,12 @@ import {AxiosResponse, AxiosStatic} from 'axios'; ...@@ -3,12 +3,12 @@ import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs'; import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {Carousel} from "lib/src/entity/business/entity/Carousel"; import {Carousel} from "lib/src/entity/business/entity/Carousel";
import {Page} from "autumn-vue/lib/core/page/Page"; import {Page} from "lib/src/core/page/Page";
import {Pagination} from "lib/src/core/page/Pagination";
// endregion // endregion
/** /**
* 轮播图(Carousel) PI接口 * 轮播图(Carousel) PI接口
* @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class CarouselController{ export class CarouselController{
...@@ -18,7 +18,7 @@ export class CarouselController{ ...@@ -18,7 +18,7 @@ export class CarouselController{
* @param carousel * @param carousel
* @return Carousel * @return Carousel
*/ */
static addCarousel(axios:AxiosStatic, carousel: any): Promise<AxiosResponse<Carousel>> { static addCarousel(axios:AxiosStatic, carousel: Carousel): Promise<AxiosResponse<Carousel>> {
return axios.post('carousel/addCarousel', carousel); return axios.post('carousel/addCarousel', carousel);
} }
...@@ -36,7 +36,7 @@ export class CarouselController{ ...@@ -36,7 +36,7 @@ export class CarouselController{
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageCarousel(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Carousel>>> { static pageCarousel(axios:AxiosStatic, pagination: Pagination<Carousel>): Promise<AxiosResponse<Page<Carousel>>> {
return axios.post('carousel/pageCarousel', pagination); return axios.post('carousel/pageCarousel', pagination);
} }
...@@ -56,7 +56,7 @@ export class CarouselController{ ...@@ -56,7 +56,7 @@ export class CarouselController{
* @param carousel * @param carousel
* @return Carousel * @return Carousel
*/ */
static updateCarousel(axios:AxiosStatic, carousel: any): Promise<AxiosResponse<Carousel>> { static updateCarousel(axios:AxiosStatic, carousel: Carousel): Promise<AxiosResponse<Carousel>> {
return axios.post('carousel/updateCarousel', carousel); return axios.post('carousel/updateCarousel', carousel);
} }
......
...@@ -3,12 +3,12 @@ import {AxiosResponse, AxiosStatic} from 'axios'; ...@@ -3,12 +3,12 @@ import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs'; import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {CommissionRule} from "lib/src/entity/account/entity/CommissionRule"; import {CommissionRule} from "lib/src/entity/account/entity/CommissionRule";
import {Page} from "autumn-vue/lib/core/page/Page"; import {Page} from "lib/src/core/page/Page";
import {Pagination} from "lib/src/core/page/Pagination";
// endregion // endregion
/** /**
* 佣金规则(CommissionRule) PI接口 * 佣金规则(CommissionRule) PI接口
* @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class CommissionRuleController{ export class CommissionRuleController{
...@@ -18,7 +18,7 @@ export class CommissionRuleController{ ...@@ -18,7 +18,7 @@ export class CommissionRuleController{
* @param commissionRule * @param commissionRule
* @return CommissionRule * @return CommissionRule
*/ */
static addCommissionRule(axios:AxiosStatic, commissionRule: any): Promise<AxiosResponse<CommissionRule>> { static addCommissionRule(axios:AxiosStatic, commissionRule: CommissionRule): Promise<AxiosResponse<CommissionRule>> {
return axios.post('commissionRule/addCommissionRule', commissionRule); return axios.post('commissionRule/addCommissionRule', commissionRule);
} }
...@@ -61,7 +61,7 @@ export class CommissionRuleController{ ...@@ -61,7 +61,7 @@ export class CommissionRuleController{
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageCommissionRule(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<CommissionRule>>> { static pageCommissionRule(axios:AxiosStatic, pagination: Pagination<CommissionRule>): Promise<AxiosResponse<Page<CommissionRule>>> {
return axios.post('commissionRule/pageCommissionRule', pagination); return axios.post('commissionRule/pageCommissionRule', pagination);
} }
...@@ -81,7 +81,7 @@ export class CommissionRuleController{ ...@@ -81,7 +81,7 @@ export class CommissionRuleController{
* @param commissionRule * @param commissionRule
* @return CommissionRule * @return CommissionRule
*/ */
static updateCommissionRule(axios:AxiosStatic, commissionRule: any): Promise<AxiosResponse<CommissionRule>> { static updateCommissionRule(axios:AxiosStatic, commissionRule: CommissionRule): Promise<AxiosResponse<CommissionRule>> {
return axios.post('commissionRule/updateCommissionRule', commissionRule); return axios.post('commissionRule/updateCommissionRule', commissionRule);
} }
......
import {AxiosResponse, AxiosStatic} from 'axios'; import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs, {Dayjs} from 'dayjs'; import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {BusinessConfig} from "lib/src/entity/business/domain/BusinessConfig"; import {BusinessConfig} from "lib/src/entity/business/domain/BusinessConfig";
import {ESignPartAConfig} from "lib/src/domain/ESignPartAConfig"; import {ESignPartAConfig} from "lib/src/domain/ESignPartAConfig";
import {DarkBidPriceRange} from "lib/src/entity/business/domain/DarkBidPriceRange"; import {DarkBidPriceRange} from "lib/src/entity/business/domain/DarkBidPriceRange";
import {LightBidPriceRange} from "lib/src/entity/business/domain/LightBidPriceRange"; import {LightBidPriceRange} from "lib/src/entity/business/domain/LightBidPriceRange";
// endregion // endregion
/** /**
*/ */
export class ConfigController { export class ConfigController{
/** /**
* 查询SystemConfig * 查询SystemConfig
* @return BusinessConfig * @return BusinessConfig
*/ */
static getBusinessConfig(axios: AxiosStatic): Promise<AxiosResponse<BusinessConfig>> { static getBusinessConfig(axios:AxiosStatic): Promise<AxiosResponse<BusinessConfig>> {
return axios.get('config/getBusinessConfig'); return axios.get('config/getBusinessConfig');
} }
/** /**
*/ */
static getDarkBidPriceRange(axios: AxiosStatic): Promise<AxiosResponse<DarkBidPriceRange>> { static getDarkBidPriceRange(axios:AxiosStatic): Promise<AxiosResponse<DarkBidPriceRange>> {
return axios.get('config/getDarkBidPriceRange'); return axios.get('config/getDarkBidPriceRange');
} }
/** /**
*/ */
static getESignPartAConfig(axios: AxiosStatic): Promise<AxiosResponse<ESignPartAConfig>> { static getESignPartAConfig(axios:AxiosStatic): Promise<AxiosResponse<ESignPartAConfig>> {
return axios.get('config/getESignPartAConfig'); return axios.get('config/getESignPartAConfig');
} }
/** /**
*/ */
static getLightBidPriceRange(axios: AxiosStatic): Promise<AxiosResponse<LightBidPriceRange>> { static getLightBidPriceRange(axios:AxiosStatic): Promise<AxiosResponse<LightBidPriceRange>> {
return axios.get('config/getLightBidPriceRange'); return axios.get('config/getLightBidPriceRange');
} }
/** /**
* 更新InspectConfig * 更新InspectConfig
* @param businessConfig * @param businessConfig
* @return boolean * @return boolean
*/ */
static updateBusinessConfig(axios: AxiosStatic, businessConfig: any): Promise<AxiosResponse<boolean>> { static updateBusinessConfig(axios:AxiosStatic, businessConfig: BusinessConfig): Promise<AxiosResponse<boolean>> {
return axios.post('config/updateBusinessConfig', businessConfig); return axios.post('config/updateBusinessConfig', businessConfig);
} }
/** /**
*/ */
static updateDarkBidPriceRange(axios: AxiosStatic, darkBidPriceRange: any): Promise<AxiosResponse<boolean>> { static updateDarkBidPriceRange(axios:AxiosStatic, darkBidPriceRange: DarkBidPriceRange): Promise<AxiosResponse<boolean>> {
return axios.post('config/updateDarkBidPriceRange', darkBidPriceRange); return axios.post('config/updateDarkBidPriceRange', darkBidPriceRange);
} }
/** /**
*/ */
static updateESignPartAConfig(axios: AxiosStatic, businessConfig: any): Promise<AxiosResponse<boolean>> { static updateESignPartAConfig(axios:AxiosStatic, businessConfig: ESignPartAConfig): Promise<AxiosResponse<boolean>> {
return axios.post('config/updateESignPartAConfig', businessConfig); return axios.post('config/updateESignPartAConfig', businessConfig);
} }
/** /**
*/ */
static updateLightBidPriceRange(axios: AxiosStatic, lightBidPriceRange: any): Promise<AxiosResponse<boolean>> { static updateLightBidPriceRange(axios:AxiosStatic, lightBidPriceRange: LightBidPriceRange): Promise<AxiosResponse<boolean>> {
return axios.post('config/updateLightBidPriceRange', lightBidPriceRange); return axios.post('config/updateLightBidPriceRange', lightBidPriceRange);
} }
......
...@@ -4,12 +4,12 @@ import dayjs,{Dayjs} from 'dayjs'; ...@@ -4,12 +4,12 @@ import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {Contract} from "lib/src/entity/auction/entity/Contract"; import {Contract} from "lib/src/entity/auction/entity/Contract";
import {ContractTemplate} from "lib/src/entity/auction/entity/ContractTemplate"; import {ContractTemplate} from "lib/src/entity/auction/entity/ContractTemplate";
import {Page} from "autumn-vue/lib/core/page/Page"; import {Page} from "lib/src/core/page/Page";
import {Pagination} from "lib/src/core/page/Pagination";
// endregion // endregion
/** /**
* 合同(Contract) PI接口 * 合同(Contract) PI接口
* @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class ContractController{ export class ContractController{
...@@ -19,7 +19,7 @@ export class ContractController{ ...@@ -19,7 +19,7 @@ export class ContractController{
* @param contract * @param contract
* @return Contract * @return Contract
*/ */
static addContract(axios:AxiosStatic, contract: any): Promise<AxiosResponse<Contract>> { static addContract(axios:AxiosStatic, contract: Contract): Promise<AxiosResponse<Contract>> {
return axios.post('contract/addContract', contract); return axios.post('contract/addContract', contract);
} }
...@@ -28,7 +28,7 @@ export class ContractController{ ...@@ -28,7 +28,7 @@ export class ContractController{
* @param contractTemplate * @param contractTemplate
* @return ContractTemplate * @return ContractTemplate
*/ */
static addContractTemplate(axios:AxiosStatic, contractTemplate: any): Promise<AxiosResponse<ContractTemplate>> { static addContractTemplate(axios:AxiosStatic, contractTemplate: ContractTemplate): Promise<AxiosResponse<ContractTemplate>> {
return axios.post('contract/addContractTemplate', contractTemplate); return axios.post('contract/addContractTemplate', contractTemplate);
} }
...@@ -86,7 +86,7 @@ export class ContractController{ ...@@ -86,7 +86,7 @@ export class ContractController{
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageContract(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Contract>>> { static pageContract(axios:AxiosStatic, pagination: Pagination<Contract>): Promise<AxiosResponse<Page<Contract>>> {
return axios.post('contract/pageContract', pagination); return axios.post('contract/pageContract', pagination);
} }
...@@ -97,7 +97,7 @@ export class ContractController{ ...@@ -97,7 +97,7 @@ export class ContractController{
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageContractTemplate(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<ContractTemplate>>> { static pageContractTemplate(axios:AxiosStatic, pagination: Pagination<ContractTemplate>): Promise<AxiosResponse<Page<ContractTemplate>>> {
return axios.post('contract/pageContractTemplate', pagination); return axios.post('contract/pageContractTemplate', pagination);
} }
...@@ -135,7 +135,7 @@ export class ContractController{ ...@@ -135,7 +135,7 @@ export class ContractController{
* @param contractTemplate * @param contractTemplate
* @return ContractTemplate * @return ContractTemplate
*/ */
static updateContractTemplate(axios:AxiosStatic, contractTemplate: any): Promise<AxiosResponse<ContractTemplate>> { static updateContractTemplate(axios:AxiosStatic, contractTemplate: ContractTemplate): Promise<AxiosResponse<ContractTemplate>> {
return axios.post('contract/updateContractTemplate', contractTemplate); return axios.post('contract/updateContractTemplate', contractTemplate);
} }
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
import {AxiosResponse, AxiosStatic} from 'axios'; import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs'; import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {Vehicle} from "lib/src/entity/vehicle/entity/Vehicle";
import {DeliveryStatus} from "lib/src/entity/auction/domain/DeliveryStatus";
// endregion // endregion
/** /**
...@@ -10,13 +12,13 @@ export class DataSyncController{ ...@@ -10,13 +12,13 @@ export class DataSyncController{
/** /**
*/ */
static pushCarData(axios:AxiosStatic, vehicle: any): Promise<AxiosResponse<ResponseResult>> { static pushCarData(axios:AxiosStatic, vehicle: Vehicle): Promise<AxiosResponse<ResponseResult>> {
return axios.post('//pushCarData', vehicle); return axios.post('//pushCarData', vehicle);
} }
/** /**
*/ */
static syncDeliveryStatus(axios:AxiosStatic, deliveryStatus: any): Promise<AxiosResponse<ResponseResult>> { static syncDeliveryStatus(axios:AxiosStatic, deliveryStatus: DeliveryStatus): Promise<AxiosResponse<ResponseResult>> {
return axios.post('//syncDeliveryStatus', deliveryStatus); return axios.post('//syncDeliveryStatus', deliveryStatus);
} }
......
...@@ -3,12 +3,12 @@ import {AxiosResponse, AxiosStatic} from 'axios'; ...@@ -3,12 +3,12 @@ import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs'; import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {DeliveryOrder} from "lib/src/entity/auction/entity/DeliveryOrder"; import {DeliveryOrder} from "lib/src/entity/auction/entity/DeliveryOrder";
import {Page} from "autumn-vue/lib/core/page/Page"; import {Page} from "lib/src/core/page/Page";
import {Pagination} from "lib/src/core/page/Pagination";
// endregion // endregion
/** /**
* 交付订单(DeliveryOrder) PI接口 * 交付订单(DeliveryOrder) PI接口
* @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class DeliveryOrderController{ export class DeliveryOrderController{
...@@ -18,13 +18,13 @@ export class DeliveryOrderController{ ...@@ -18,13 +18,13 @@ export class DeliveryOrderController{
* @param deliveryOrder * @param deliveryOrder
* @return DeliveryOrder * @return DeliveryOrder
*/ */
static assignDeliveryOrder(axios:AxiosStatic, deliveryOrder: any): Promise<AxiosResponse<DeliveryOrder>> { static assignDeliveryOrder(axios:AxiosStatic, deliveryOrder: DeliveryOrder): Promise<AxiosResponse<DeliveryOrder>> {
return axios.post('deliveryOrder/assignDeliveryOrder', deliveryOrder); return axios.post('deliveryOrder/assignDeliveryOrder', deliveryOrder);
} }
/** /**
*/ */
static cancelDeliveryOrder(axios:AxiosStatic, deliveryOrder: any): Promise<AxiosResponse<DeliveryOrder>> { static cancelDeliveryOrder(axios:AxiosStatic, deliveryOrder: DeliveryOrder): Promise<AxiosResponse<DeliveryOrder>> {
return axios.post('deliveryOrder/cancelDeliveryOrder', deliveryOrder); return axios.post('deliveryOrder/cancelDeliveryOrder', deliveryOrder);
} }
...@@ -36,7 +36,7 @@ export class DeliveryOrderController{ ...@@ -36,7 +36,7 @@ export class DeliveryOrderController{
/** /**
*/ */
static exportDeliveryOrder(axios:AxiosStatic, pagination: any, config?:any): Promise<AxiosResponse<void>> { static exportDeliveryOrder(axios:AxiosStatic, pagination: Pagination<DeliveryOrder>, config?:any): Promise<AxiosResponse<void>> {
return axios.post('deliveryOrder/exportDeliveryOrder', pagination, config); return axios.post('deliveryOrder/exportDeliveryOrder', pagination, config);
} }
...@@ -84,7 +84,7 @@ export class DeliveryOrderController{ ...@@ -84,7 +84,7 @@ export class DeliveryOrderController{
* @param deliveryOrder * @param deliveryOrder
* @return DeliveryOrder * @return DeliveryOrder
*/ */
static handleDeliveryOrder(axios:AxiosStatic, deliveryOrder: any): Promise<AxiosResponse<DeliveryOrder>> { static handleDeliveryOrder(axios:AxiosStatic, deliveryOrder: DeliveryOrder): Promise<AxiosResponse<DeliveryOrder>> {
return axios.post('deliveryOrder/handleDeliveryOrder', deliveryOrder); return axios.post('deliveryOrder/handleDeliveryOrder', deliveryOrder);
} }
...@@ -93,7 +93,7 @@ export class DeliveryOrderController{ ...@@ -93,7 +93,7 @@ export class DeliveryOrderController{
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageDeliveryOrder(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<DeliveryOrder>>> { static pageDeliveryOrder(axios:AxiosStatic, pagination: Pagination<DeliveryOrder>): Promise<AxiosResponse<Page<DeliveryOrder>>> {
return axios.post('deliveryOrder/pageDeliveryOrder', pagination); return axios.post('deliveryOrder/pageDeliveryOrder', pagination);
} }
......
...@@ -3,14 +3,14 @@ import {AxiosResponse, AxiosStatic} from 'axios'; ...@@ -3,14 +3,14 @@ import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs'; import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {DepositRule} from "lib/src/entity/finance/entity/DepositRule"; import {DepositRule} from "lib/src/entity/finance/entity/DepositRule";
import {Page} from "autumn-vue/lib/core/page/Page"; import {Page} from "lib/src/core/page/Page";
import {Deposit} from "lib/src/entity/finance/entity/Deposit"; import {Deposit} from "lib/src/entity/finance/entity/Deposit";
import {DepositStat} from "lib/src/entity/finance/domain/DepositStat"; import {DepositStat} from "lib/src/entity/finance/domain/DepositStat";
import {Pagination} from "lib/src/core/page/Pagination";
// endregion // endregion
/** /**
* 保证金规则(DepositRule) PI接口 * 保证金规则(DepositRule) PI接口
* @author gonglei
* @since 2025-10-13 12:18:10 * @since 2025-10-13 12:18:10
*/ */
export class DepositController{ export class DepositController{
...@@ -20,7 +20,7 @@ export class DepositController{ ...@@ -20,7 +20,7 @@ export class DepositController{
* @param depositRule * @param depositRule
* @return DepositRule * @return DepositRule
*/ */
static addDepositRule(axios:AxiosStatic, depositRule: any): Promise<AxiosResponse<DepositRule>> { static addDepositRule(axios:AxiosStatic, depositRule: DepositRule): Promise<AxiosResponse<DepositRule>> {
return axios.post('depositRule/addDepositRule', depositRule); return axios.post('depositRule/addDepositRule', depositRule);
} }
...@@ -35,11 +35,17 @@ export class DepositController{ ...@@ -35,11 +35,17 @@ export class DepositController{
/** /**
*/ */
static exportDeposit(axios:AxiosStatic, pagination: any, config?:any): Promise<AxiosResponse<void>> { static exportDeposit(axios:AxiosStatic, pagination: Pagination<Deposit>, config?:any): Promise<AxiosResponse<void>> {
return axios.post('depositRule/exportDeposit', pagination, config); return axios.post('depositRule/exportDeposit', pagination, config);
} }
/** /**
*/
static exportDepositRefund(axios:AxiosStatic, pagination: Pagination<Deposit>, config?:any): Promise<AxiosResponse<void>> {
return axios.post('depositRule/exportDepositRefund', pagination, config);
}
/**
* 查询全部$保证金规则 * 查询全部$保证金规则
* @return List * @return List
*/ */
...@@ -90,18 +96,26 @@ export class DepositController{ ...@@ -90,18 +96,26 @@ export class DepositController{
/** /**
*/ */
static pageDeposit(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Deposit>>> { static pageDeposit(axios:AxiosStatic, pagination: Pagination<Deposit>): Promise<AxiosResponse<Page<Deposit>>> {
return axios.post('depositRule/pageDeposit', pagination); return axios.post('depositRule/pageDeposit', pagination);
} }
static PAGE_DEPOSIT = 'depositRule/pageDeposit'; static PAGE_DEPOSIT = 'depositRule/pageDeposit';
/** /**
*/
static pageDepositFetchOrder(axios:AxiosStatic, pagination: Pagination<Deposit>): Promise<AxiosResponse<Page<Deposit>>> {
return axios.post('depositRule/pageDepositFetchOrder', pagination);
}
static PAGE_DEPOSIT_FETCH_ORDER = 'depositRule/pageDepositFetchOrder';
/**
* 分页查询保证金规则 * 分页查询保证金规则
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageDepositRule(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<DepositRule>>> { static pageDepositRule(axios:AxiosStatic, pagination: Pagination<DepositRule>): Promise<AxiosResponse<Page<DepositRule>>> {
return axios.post('depositRule/pageDepositRule', pagination); return axios.post('depositRule/pageDepositRule', pagination);
} }
...@@ -121,7 +135,7 @@ export class DepositController{ ...@@ -121,7 +135,7 @@ export class DepositController{
* @param depositRule * @param depositRule
* @return DepositRule * @return DepositRule
*/ */
static updateDepositRule(axios:AxiosStatic, depositRule: any): Promise<AxiosResponse<DepositRule>> { static updateDepositRule(axios:AxiosStatic, depositRule: DepositRule): Promise<AxiosResponse<DepositRule>> {
return axios.post('depositRule/updateDepositRule', depositRule); return axios.post('depositRule/updateDepositRule', depositRule);
} }
......
...@@ -2,11 +2,12 @@ ...@@ -2,11 +2,12 @@
import {AxiosResponse, AxiosStatic} from 'axios'; import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs'; import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {Dictionary} from "lib/src/core/dictionary/Dictionary";
import {Diction} from "lib/src/core/dictionary/Diction";
// endregion // endregion
/** /**
* 字典表(Dictionary) 控制层 * 字典表(Dictionary) 控制层
* @author gonglei
* @since 2022-04-18 16:06:57 * @since 2022-04-18 16:06:57
*/ */
export class DictionaryController{ export class DictionaryController{
...@@ -16,7 +17,7 @@ export class DictionaryController{ ...@@ -16,7 +17,7 @@ export class DictionaryController{
* @param dictionary * @param dictionary
* @return Dictionary * @return Dictionary
*/ */
static addDictionary(axios:AxiosStatic, dictionary: any): Promise<AxiosResponse<Dictionary>> { static addDictionary(axios:AxiosStatic, dictionary: Dictionary): Promise<AxiosResponse<Dictionary>> {
return axios.post('dictionary/addDictionary', dictionary); return axios.post('dictionary/addDictionary', dictionary);
} }
...@@ -68,7 +69,7 @@ export class DictionaryController{ ...@@ -68,7 +69,7 @@ export class DictionaryController{
* @param dictionary * @param dictionary
* @return Dictionary * @return Dictionary
*/ */
static updateDictionary(axios:AxiosStatic, dictionary: any): Promise<AxiosResponse<Dictionary>> { static updateDictionary(axios:AxiosStatic, dictionary: Dictionary): Promise<AxiosResponse<Dictionary>> {
return axios.post('dictionary/updateDictionary', dictionary); return axios.post('dictionary/updateDictionary', dictionary);
} }
......
...@@ -3,12 +3,12 @@ import {AxiosResponse, AxiosStatic} from 'axios'; ...@@ -3,12 +3,12 @@ import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs'; import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {Favorite} from "lib/src/entity/account/entity/Favorite"; import {Favorite} from "lib/src/entity/account/entity/Favorite";
import {Page} from "autumn-vue/lib/core/page/Page"; import {Page} from "lib/src/core/page/Page";
import {Pagination} from "lib/src/core/page/Pagination";
// endregion // endregion
/** /**
* 收藏(Favorite) PI接口 * 收藏(Favorite) PI接口
* @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class FavoriteController{ export class FavoriteController{
...@@ -18,7 +18,7 @@ export class FavoriteController{ ...@@ -18,7 +18,7 @@ export class FavoriteController{
* @param favorite * @param favorite
* @return Favorite * @return Favorite
*/ */
static addFavorite(axios:AxiosStatic, favorite: any): Promise<AxiosResponse<Favorite>> { static addFavorite(axios:AxiosStatic, favorite: Favorite): Promise<AxiosResponse<Favorite>> {
return axios.post('favorite/addFavorite', favorite); return axios.post('favorite/addFavorite', favorite);
} }
...@@ -27,7 +27,7 @@ export class FavoriteController{ ...@@ -27,7 +27,7 @@ export class FavoriteController{
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageFavorite(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Favorite>>> { static pageFavorite(axios:AxiosStatic, pagination: Pagination<Favorite>): Promise<AxiosResponse<Page<Favorite>>> {
return axios.post('favorite/pageFavorite', pagination); return axios.post('favorite/pageFavorite', pagination);
} }
......
...@@ -4,12 +4,12 @@ import dayjs,{Dayjs} from 'dayjs'; ...@@ -4,12 +4,12 @@ import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {NoticeMessage} from "lib/src/entity/business/entity/NoticeMessage"; import {NoticeMessage} from "lib/src/entity/business/entity/NoticeMessage";
import {NoticeTemplate} from "lib/src/entity/business/entity/NoticeTemplate"; import {NoticeTemplate} from "lib/src/entity/business/entity/NoticeTemplate";
import {Page} from "autumn-vue/lib/core/page/Page"; import {Page} from "lib/src/core/page/Page";
import {Pagination} from "lib/src/core/page/Pagination";
// endregion // endregion
/** /**
* 通知模板(NoticeTemplate) PI接口 * 通知模板(NoticeTemplate) PI接口
* @author gonglei
* @since 2025-10-13 12:18:10 * @since 2025-10-13 12:18:10
*/ */
export class NoticeController{ export class NoticeController{
...@@ -19,7 +19,7 @@ export class NoticeController{ ...@@ -19,7 +19,7 @@ export class NoticeController{
* @param noticeTemplate * @param noticeTemplate
* @return NoticeTemplate * @return NoticeTemplate
*/ */
static addNoticeTemplate(axios:AxiosStatic, noticeTemplate: any): Promise<AxiosResponse<NoticeTemplate>> { static addNoticeTemplate(axios:AxiosStatic, noticeTemplate: NoticeTemplate): Promise<AxiosResponse<NoticeTemplate>> {
return axios.post('notice/addNoticeTemplate', noticeTemplate); return axios.post('notice/addNoticeTemplate', noticeTemplate);
} }
...@@ -49,7 +49,7 @@ export class NoticeController{ ...@@ -49,7 +49,7 @@ export class NoticeController{
/** /**
*/ */
static pageNoticeMessage(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<NoticeMessage>>> { static pageNoticeMessage(axios:AxiosStatic, pagination: Pagination<NoticeMessage>): Promise<AxiosResponse<Page<NoticeMessage>>> {
return axios.post('notice/pageNoticeMessage', pagination); return axios.post('notice/pageNoticeMessage', pagination);
} }
...@@ -60,7 +60,7 @@ export class NoticeController{ ...@@ -60,7 +60,7 @@ export class NoticeController{
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageNoticeTemplate(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<NoticeTemplate>>> { static pageNoticeTemplate(axios:AxiosStatic, pagination: Pagination<NoticeTemplate>): Promise<AxiosResponse<Page<NoticeTemplate>>> {
return axios.post('notice/pageNoticeTemplate', pagination); return axios.post('notice/pageNoticeTemplate', pagination);
} }
...@@ -80,7 +80,7 @@ export class NoticeController{ ...@@ -80,7 +80,7 @@ export class NoticeController{
* @param noticeTemplate * @param noticeTemplate
* @return NoticeTemplate * @return NoticeTemplate
*/ */
static updateNoticeTemplate(axios:AxiosStatic, noticeTemplate: any): Promise<AxiosResponse<NoticeTemplate>> { static updateNoticeTemplate(axios:AxiosStatic, noticeTemplate: NoticeTemplate): Promise<AxiosResponse<NoticeTemplate>> {
return axios.post('notice/updateNoticeTemplate', noticeTemplate); return axios.post('notice/updateNoticeTemplate', noticeTemplate);
} }
......
...@@ -3,12 +3,12 @@ import {AxiosResponse, AxiosStatic} from 'axios'; ...@@ -3,12 +3,12 @@ import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs'; import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {PriceRule} from "lib/src/entity/vehicle/entity/PriceRule"; import {PriceRule} from "lib/src/entity/vehicle/entity/PriceRule";
import {Page} from "autumn-vue/lib/core/page/Page"; import {Page} from "lib/src/core/page/Page";
import {Pagination} from "lib/src/core/page/Pagination";
// endregion // endregion
/** /**
* 价格规则(PriceRule) PI接口 * 价格规则(PriceRule) PI接口
* @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class PriceRuleController{ export class PriceRuleController{
...@@ -18,7 +18,7 @@ export class PriceRuleController{ ...@@ -18,7 +18,7 @@ export class PriceRuleController{
* @param priceRule * @param priceRule
* @return PriceRule * @return PriceRule
*/ */
static addPriceRule(axios:AxiosStatic, priceRule: any): Promise<AxiosResponse<PriceRule>> { static addPriceRule(axios:AxiosStatic, priceRule: PriceRule): Promise<AxiosResponse<PriceRule>> {
return axios.post('priceRule/addPriceRule', priceRule); return axios.post('priceRule/addPriceRule', priceRule);
} }
...@@ -42,7 +42,7 @@ export class PriceRuleController{ ...@@ -42,7 +42,7 @@ export class PriceRuleController{
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pagePriceRule(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<PriceRule>>> { static pagePriceRule(axios:AxiosStatic, pagination: Pagination<PriceRule>): Promise<AxiosResponse<Page<PriceRule>>> {
return axios.post('priceRule/pagePriceRule', pagination); return axios.post('priceRule/pagePriceRule', pagination);
} }
...@@ -62,7 +62,7 @@ export class PriceRuleController{ ...@@ -62,7 +62,7 @@ export class PriceRuleController{
* @param priceRule * @param priceRule
* @return PriceRule * @return PriceRule
*/ */
static updatePriceRule(axios:AxiosStatic, priceRule: any): Promise<AxiosResponse<PriceRule>> { static updatePriceRule(axios:AxiosStatic, priceRule: PriceRule): Promise<AxiosResponse<PriceRule>> {
return axios.post('priceRule/updatePriceRule', priceRule); return axios.post('priceRule/updatePriceRule', priceRule);
} }
......
import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包
import {Page} from "lib/src/core/page/Page";
import {Recharge} from "lib/src/entity/finance/entity/Recharge";
import {Pagination} from "lib/src/core/page/Pagination";
import {Refund} from "lib/src/entity/finance/entity/Refund";
// endregion
/**
*/
export class RechargeController{
/**
*/
static getRechargeById(axios:AxiosStatic, rechargeId: number): Promise<AxiosResponse<Recharge>> {
return axios.get('recharge/getRechargeById', {params: {rechargeId: rechargeId}});
}
/**
*/
static getRefundsByRechargeId(axios:AxiosStatic, rechargeId: number): Promise<AxiosResponse<Refund[]>> {
return axios.get('recharge/getRefundsByRechargeId', {params: {rechargeId: rechargeId}});
}
/**
*/
static pageRecharge(axios:AxiosStatic, pagination: Pagination<Recharge>): Promise<AxiosResponse<Page<Recharge>>> {
return axios.post('recharge/pageRecharge', pagination);
}
static PAGE_RECHARGE = 'recharge/pageRecharge';
// region 前端扩展代码区
// endregion
}
...@@ -3,12 +3,12 @@ import {AxiosResponse, AxiosStatic} from 'axios'; ...@@ -3,12 +3,12 @@ import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs'; import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {ReleaseOrder} from "lib/src/entity/auction/entity/ReleaseOrder"; import {ReleaseOrder} from "lib/src/entity/auction/entity/ReleaseOrder";
import {Page} from "autumn-vue/lib/core/page/Page"; import {Page} from "lib/src/core/page/Page";
import {Pagination} from "lib/src/core/page/Pagination";
// endregion // endregion
/** /**
* 解押订单(ReleaseOrder) PI接口 * 解押订单(ReleaseOrder) PI接口
* @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class ReleaseOrderController{ export class ReleaseOrderController{
...@@ -18,7 +18,7 @@ export class ReleaseOrderController{ ...@@ -18,7 +18,7 @@ export class ReleaseOrderController{
* @param releaseOrder * @param releaseOrder
* @return ReleaseOrder * @return ReleaseOrder
*/ */
static addReleaseOrder(axios:AxiosStatic, releaseOrder: any): Promise<AxiosResponse<ReleaseOrder>> { static addReleaseOrder(axios:AxiosStatic, releaseOrder: ReleaseOrder): Promise<AxiosResponse<ReleaseOrder>> {
return axios.post('order/addReleaseOrder', releaseOrder); return axios.post('order/addReleaseOrder', releaseOrder);
} }
...@@ -36,7 +36,7 @@ export class ReleaseOrderController{ ...@@ -36,7 +36,7 @@ export class ReleaseOrderController{
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageReleaseOrder(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<ReleaseOrder>>> { static pageReleaseOrder(axios:AxiosStatic, pagination: Pagination<ReleaseOrder>): Promise<AxiosResponse<Page<ReleaseOrder>>> {
return axios.post('order/pageReleaseOrder', pagination); return axios.post('order/pageReleaseOrder', pagination);
} }
...@@ -56,7 +56,7 @@ export class ReleaseOrderController{ ...@@ -56,7 +56,7 @@ export class ReleaseOrderController{
* @param releaseOrder * @param releaseOrder
* @return ReleaseOrder * @return ReleaseOrder
*/ */
static updateReleaseOrder(axios:AxiosStatic, releaseOrder: any): Promise<AxiosResponse<ReleaseOrder>> { static updateReleaseOrder(axios:AxiosStatic, releaseOrder: ReleaseOrder): Promise<AxiosResponse<ReleaseOrder>> {
return axios.post('order/updateReleaseOrder', releaseOrder); return axios.post('order/updateReleaseOrder', releaseOrder);
} }
......
...@@ -4,12 +4,12 @@ import dayjs,{Dayjs} from 'dayjs'; ...@@ -4,12 +4,12 @@ import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {Outbound} from "lib/src/entity/venue/entity/Outbound"; import {Outbound} from "lib/src/entity/venue/entity/Outbound";
import {Warehousing} from "lib/src/entity/venue/entity/Warehousing"; import {Warehousing} from "lib/src/entity/venue/entity/Warehousing";
import {Page} from "autumn-vue/lib/core/page/Page"; import {Page} from "lib/src/core/page/Page";
import {Pagination} from "lib/src/core/page/Pagination";
// endregion // endregion
/** /**
* 出库(Outbound) PI接口 * 出库(Outbound) PI接口
* @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class RelocationController{ export class RelocationController{
...@@ -19,7 +19,7 @@ export class RelocationController{ ...@@ -19,7 +19,7 @@ export class RelocationController{
* @param outbound * @param outbound
* @return Outbound * @return Outbound
*/ */
static addOutbound(axios:AxiosStatic, outbound: any): Promise<AxiosResponse<Outbound>> { static addOutbound(axios:AxiosStatic, outbound: Outbound): Promise<AxiosResponse<Outbound>> {
return axios.post('outbound/addOutbound', outbound); return axios.post('outbound/addOutbound', outbound);
} }
...@@ -28,7 +28,7 @@ export class RelocationController{ ...@@ -28,7 +28,7 @@ export class RelocationController{
* @param warehousing * @param warehousing
* @return Warehousing * @return Warehousing
*/ */
static addWarehousing(axios:AxiosStatic, warehousing: any): Promise<AxiosResponse<Warehousing>> { static addWarehousing(axios:AxiosStatic, warehousing: Warehousing): Promise<AxiosResponse<Warehousing>> {
return axios.post('outbound/addWarehousing', warehousing); return axios.post('outbound/addWarehousing', warehousing);
} }
...@@ -55,7 +55,7 @@ export class RelocationController{ ...@@ -55,7 +55,7 @@ export class RelocationController{
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageOutbound(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Outbound>>> { static pageOutbound(axios:AxiosStatic, pagination: Pagination<Outbound>): Promise<AxiosResponse<Page<Outbound>>> {
return axios.post('outbound/pageOutbound', pagination); return axios.post('outbound/pageOutbound', pagination);
} }
...@@ -66,7 +66,7 @@ export class RelocationController{ ...@@ -66,7 +66,7 @@ export class RelocationController{
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageWarehousing(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Warehousing>>> { static pageWarehousing(axios:AxiosStatic, pagination: Pagination<Warehousing>): Promise<AxiosResponse<Page<Warehousing>>> {
return axios.post('outbound/pageWarehousing', pagination); return axios.post('outbound/pageWarehousing', pagination);
} }
...@@ -95,7 +95,7 @@ export class RelocationController{ ...@@ -95,7 +95,7 @@ export class RelocationController{
* @param outbound * @param outbound
* @return Outbound * @return Outbound
*/ */
static updateOutbound(axios:AxiosStatic, outbound: any): Promise<AxiosResponse<Outbound>> { static updateOutbound(axios:AxiosStatic, outbound: Outbound): Promise<AxiosResponse<Outbound>> {
return axios.post('outbound/updateOutbound', outbound); return axios.post('outbound/updateOutbound', outbound);
} }
...@@ -104,7 +104,7 @@ export class RelocationController{ ...@@ -104,7 +104,7 @@ export class RelocationController{
* @param warehousing * @param warehousing
* @return Warehousing * @return Warehousing
*/ */
static updateWarehousing(axios:AxiosStatic, warehousing: any): Promise<AxiosResponse<Warehousing>> { static updateWarehousing(axios:AxiosStatic, warehousing: Warehousing): Promise<AxiosResponse<Warehousing>> {
return axios.post('outbound/updateWarehousing', warehousing); return axios.post('outbound/updateWarehousing', warehousing);
} }
......
import {AxiosResponse, AxiosStatic} from 'axios'; import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs, {Dayjs} from 'dayjs'; import dayjs, {Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {TreeItem} from "autumn-vue/lib/core/bean/TreeItem"; import {TreeItem} from "lib/src/core/bean/TreeItem";
import {Page} from "autumn-vue/lib/core/page/Page"; import {Page} from "lib/src/core/page/Page";
import {Role} from 'lib/src/entity/security/entity/Role'; import {Role} from 'lib/src/entity/security/entity/Role';
import {User} from "lib/src/entity/security/entity/User"; import {User} from "lib/src/entity/security/entity/User";
......
...@@ -20,7 +20,7 @@ export class StorageController{ ...@@ -20,7 +20,7 @@ export class StorageController{
* @param vehicle * @param vehicle
* @return int * @return int
*/ */
static updateVehicleAlbums(axios:AxiosStatic, vehicle: any): Promise<AxiosResponse<number>> { static updateVehicleAlbums(axios:AxiosStatic, vehicle: Vehicle): Promise<AxiosResponse<number>> {
return axios.post('upload/updateVehicleAlbums', vehicle); return axios.post('upload/updateVehicleAlbums', vehicle);
} }
......
...@@ -3,7 +3,8 @@ import {AxiosResponse, AxiosStatic} from 'axios'; ...@@ -3,7 +3,8 @@ import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs'; import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {VehicleBrowserHistory} from "lib/src/entity/track/entity/VehicleBrowserHistory"; import {VehicleBrowserHistory} from "lib/src/entity/track/entity/VehicleBrowserHistory";
import {Page} from "autumn-vue/lib/core/page/Page"; import {Page} from "lib/src/core/page/Page";
import {Pagination} from "lib/src/core/page/Pagination";
// endregion // endregion
/** /**
...@@ -12,7 +13,7 @@ export class TrackController{ ...@@ -12,7 +13,7 @@ export class TrackController{
/** /**
*/ */
static pageVehicleBrowserHistory(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<VehicleBrowserHistory>>> { static pageVehicleBrowserHistory(axios:AxiosStatic, pagination: Pagination<VehicleBrowserHistory>): Promise<AxiosResponse<Page<VehicleBrowserHistory>>> {
return axios.post('track/pageVehicleBrowserHistory', pagination); return axios.post('track/pageVehicleBrowserHistory', pagination);
} }
......
...@@ -3,15 +3,17 @@ import {AxiosResponse, AxiosStatic} from 'axios'; ...@@ -3,15 +3,17 @@ import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs'; import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {Transaction} from "lib/src/entity/finance/entity/Transaction"; import {Transaction} from "lib/src/entity/finance/entity/Transaction";
import {Page} from "autumn-vue/lib/core/page/Page"; import {Page} from "lib/src/core/page/Page";
import {OrderTransaction} from "lib/src/entity/finance/entity/OrderTransaction"; import {OrderTransaction} from "lib/src/entity/finance/entity/OrderTransaction";
import {OrderTransactionStat} from "lib/src/entity/finance/domain/OrderTransactionStat"; import {OrderTransactionStat} from "lib/src/entity/finance/domain/OrderTransactionStat";
import {OrderTransactionAmountStat} from "lib/src/entity/finance/domain/OrderTransactionAmountStat"; import {OrderTransactionAmountStat} from "lib/src/entity/finance/domain/OrderTransactionAmountStat";
import {ApproveHistory} from "lib/src/entity/track/entity/ApproveHistory";
import {Pagination} from "lib/src/core/page/Pagination";
import {Refund} from "lib/src/entity/finance/entity/Refund";
// endregion // endregion
/** /**
* 交易明细(Transaction) PI接口 * 交易明细(Transaction) PI接口
* @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class TransactionController{ export class TransactionController{
...@@ -22,19 +24,19 @@ export class TransactionController{ ...@@ -22,19 +24,19 @@ export class TransactionController{
* @return OrderTransaction * @return OrderTransaction
* @throws FieldException * @throws FieldException
*/ */
static auditOrderTransaction(axios:AxiosStatic, approveHistory: any): Promise<AxiosResponse<OrderTransaction>> { static auditOrderTransaction(axios:AxiosStatic, approveHistory: ApproveHistory): Promise<AxiosResponse<OrderTransaction>> {
return axios.post('transaction/auditOrderTransaction', approveHistory); return axios.post('transaction/auditOrderTransaction', approveHistory);
} }
/** /**
*/ */
static exportOrderTransaction(axios:AxiosStatic, pagination: any, config?:any): Promise<AxiosResponse<void>> { static exportOrderTransaction(axios:AxiosStatic, pagination: Pagination<OrderTransaction>, config?:any): Promise<AxiosResponse<void>> {
return axios.post('transaction/exportOrderTransaction', pagination, config); return axios.post('transaction/exportOrderTransaction', pagination, config);
} }
/** /**
*/ */
static exportOrderTransactionAudit(axios:AxiosStatic, pagination: any, config?:any): Promise<AxiosResponse<void>> { static exportOrderTransactionAudit(axios:AxiosStatic, pagination: Pagination<OrderTransaction>, config?:any): Promise<AxiosResponse<void>> {
return axios.post('transaction/exportOrderTransactionAudit', pagination, config); return axios.post('transaction/exportOrderTransactionAudit', pagination, config);
} }
...@@ -78,6 +80,12 @@ export class TransactionController{ ...@@ -78,6 +80,12 @@ export class TransactionController{
} }
/** /**
*/
static getRefundsByWithdrawId(axios:AxiosStatic, withdrawId: number): Promise<AxiosResponse<Refund[]>> {
return axios.get('transaction/getRefundsByWithdrawId', {params: {withdrawId: withdrawId}});
}
/**
* 根据id查询交易明细 * 根据id查询交易明细
* @param transactionId * @param transactionId
* @return Transaction * @return Transaction
...@@ -91,7 +99,7 @@ export class TransactionController{ ...@@ -91,7 +99,7 @@ export class TransactionController{
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageOrderTransaction(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<OrderTransaction>>> { static pageOrderTransaction(axios:AxiosStatic, pagination: Pagination<OrderTransaction>): Promise<AxiosResponse<Page<OrderTransaction>>> {
return axios.post('transaction/pageOrderTransaction', pagination); return axios.post('transaction/pageOrderTransaction', pagination);
} }
...@@ -102,7 +110,7 @@ export class TransactionController{ ...@@ -102,7 +110,7 @@ export class TransactionController{
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageTransaction(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Transaction>>> { static pageTransaction(axios:AxiosStatic, pagination: Pagination<Transaction>): Promise<AxiosResponse<Page<Transaction>>> {
return axios.post('transaction/pageTransaction', pagination); return axios.post('transaction/pageTransaction', pagination);
} }
...@@ -119,7 +127,7 @@ export class TransactionController{ ...@@ -119,7 +127,7 @@ export class TransactionController{
/** /**
*/ */
static updateOrderTransactionDesc(axios:AxiosStatic, orderTransaction: any): Promise<AxiosResponse<OrderTransaction>> { static updateOrderTransactionDesc(axios:AxiosStatic, orderTransaction: OrderTransaction): Promise<AxiosResponse<OrderTransaction>> {
return axios.post('transaction/updateOrderTransactionDesc', orderTransaction); return axios.post('transaction/updateOrderTransactionDesc', orderTransaction);
} }
......
...@@ -3,15 +3,16 @@ import {AxiosResponse, AxiosStatic} from 'axios'; ...@@ -3,15 +3,16 @@ import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs'; import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {Vehicle} from "lib/src/entity/vehicle/entity/Vehicle"; import {Vehicle} from "lib/src/entity/vehicle/entity/Vehicle";
import {Page} from "autumn-vue/lib/core/page/Page"; import {Page} from "lib/src/core/page/Page";
import {VehicleHistoryProjection} from "lib/src/entity/vehicle/domain/VehicleHistoryProjection"; import {VehicleHistoryProjection} from "lib/src/entity/vehicle/domain/VehicleHistoryProjection";
import {NameCount} from "lib/src/entity/analysis/domain/NameCount"; import {NameCount} from "lib/src/entity/analysis/domain/NameCount";
import {FileInfo} from "autumn-vue/lib/core/bean/FileInfo"; import {FileInfo} from "lib/src/core/bean/FileInfo";
import {Pagination} from "lib/src/core/page/Pagination";
import {VehicleVenue} from "lib/src/entity/vehicle/domain/VehicleVenue";
// endregion // endregion
/** /**
* 库存车辆(Vehicle) PI接口 * 库存车辆(Vehicle) PI接口
* @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class VehicleController{ export class VehicleController{
...@@ -21,19 +22,19 @@ export class VehicleController{ ...@@ -21,19 +22,19 @@ export class VehicleController{
* @param vehicle * @param vehicle
* @return Vehicle * @return Vehicle
*/ */
static addVehicle(axios:AxiosStatic, vehicle: any): Promise<AxiosResponse<Vehicle>> { static addVehicle(axios:AxiosStatic, vehicle: Vehicle): Promise<AxiosResponse<Vehicle>> {
return axios.post('vehicle/addVehicle', vehicle); return axios.post('vehicle/addVehicle', vehicle);
} }
/** /**
*/ */
static exportCheckedVehicles(axios:AxiosStatic, vehicleIds: any, config?:any): Promise<AxiosResponse<void>> { static exportCheckedVehicles(axios:AxiosStatic, vehicleIds: number[], config?:any): Promise<AxiosResponse<void>> {
return axios.post('vehicle/exportCheckedVehicles', vehicleIds, config); return axios.post('vehicle/exportCheckedVehicles', vehicleIds, config);
} }
/** /**
*/ */
static exportPriceVehicles(axios:AxiosStatic, pagination: any, config?:any): Promise<AxiosResponse<void>> { static exportPriceVehicles(axios:AxiosStatic, pagination: Pagination<Vehicle>, config?:any): Promise<AxiosResponse<void>> {
return axios.post('vehicle/exportPriceVehicles', pagination, config); return axios.post('vehicle/exportPriceVehicles', pagination, config);
} }
...@@ -43,7 +44,7 @@ export class VehicleController{ ...@@ -43,7 +44,7 @@ export class VehicleController{
* @param response * @param response
* @throws IOException * @throws IOException
*/ */
static exportVehicles(axios:AxiosStatic, pagination: any, config?:any): Promise<AxiosResponse<void>> { static exportVehicles(axios:AxiosStatic, pagination: Pagination<Vehicle>, config?:any): Promise<AxiosResponse<void>> {
return axios.post('vehicle/exportVehicles', pagination, config); return axios.post('vehicle/exportVehicles', pagination, config);
} }
...@@ -117,7 +118,7 @@ export class VehicleController{ ...@@ -117,7 +118,7 @@ export class VehicleController{
/** /**
*/ */
static pagePriceVehicle(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Vehicle>>> { static pagePriceVehicle(axios:AxiosStatic, pagination: Pagination<Vehicle>): Promise<AxiosResponse<Page<Vehicle>>> {
return axios.post('vehicle/pagePriceVehicle', pagination); return axios.post('vehicle/pagePriceVehicle', pagination);
} }
...@@ -128,7 +129,7 @@ export class VehicleController{ ...@@ -128,7 +129,7 @@ export class VehicleController{
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageVehicle(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Vehicle>>> { static pageVehicle(axios:AxiosStatic, pagination: Pagination<Vehicle>): Promise<AxiosResponse<Page<Vehicle>>> {
return axios.post('vehicle/pageVehicle', pagination); return axios.post('vehicle/pageVehicle', pagination);
} }
...@@ -148,7 +149,7 @@ export class VehicleController{ ...@@ -148,7 +149,7 @@ export class VehicleController{
* @param vehicle * @param vehicle
* @return Vehicle * @return Vehicle
*/ */
static updateVehicle(axios:AxiosStatic, vehicle: any): Promise<AxiosResponse<Vehicle>> { static updateVehicle(axios:AxiosStatic, vehicle: Vehicle): Promise<AxiosResponse<Vehicle>> {
return axios.post('vehicle/updateVehicle', vehicle); return axios.post('vehicle/updateVehicle', vehicle);
} }
...@@ -157,14 +158,14 @@ export class VehicleController{ ...@@ -157,14 +158,14 @@ export class VehicleController{
* @param vehicleVenue * @param vehicleVenue
* @return Vehicle * @return Vehicle
*/ */
static updateVehicleVenue(axios:AxiosStatic, vehicleVenue: any): Promise<AxiosResponse<Vehicle>> { static updateVehicleVenue(axios:AxiosStatic, vehicleVenue: VehicleVenue): Promise<AxiosResponse<Vehicle>> {
return axios.post('vehicle/updateVehicleVenue', vehicleVenue); return axios.post('vehicle/updateVehicleVenue', vehicleVenue);
} }
/** /**
* 更新车辆封面 * 更新车辆封面
*/ */
static uploadVehicleCover(axios:AxiosStatic, fileInfo: any, vehicleId: number): Promise<AxiosResponse<FileInfo>> { static uploadVehicleCover(axios:AxiosStatic, fileInfo: FileInfo, vehicleId: number): Promise<AxiosResponse<FileInfo>> {
return axios.post('vehicle/uploadVehicleCover', fileInfo, {params: {vehicleId: vehicleId}}); return axios.post('vehicle/uploadVehicleCover', fileInfo, {params: {vehicleId: vehicleId}});
} }
...@@ -173,7 +174,7 @@ export class VehicleController{ ...@@ -173,7 +174,7 @@ export class VehicleController{
* @param vehicle * @param vehicle
* @return Vehicle * @return Vehicle
*/ */
static warehousingVehicle(axios:AxiosStatic, vehicle: any): Promise<AxiosResponse<Vehicle>> { static warehousingVehicle(axios:AxiosStatic, vehicle: Vehicle): Promise<AxiosResponse<Vehicle>> {
return axios.post('vehicle/warehousingVehicle', vehicle); return axios.post('vehicle/warehousingVehicle', vehicle);
} }
......
...@@ -5,15 +5,15 @@ import dayjs,{Dayjs} from 'dayjs'; ...@@ -5,15 +5,15 @@ import dayjs,{Dayjs} from 'dayjs';
import {Area} from "lib/src/entity/venue/entity/Area"; import {Area} from "lib/src/entity/venue/entity/Area";
import {ParkingSpace} from "lib/src/entity/venue/entity/ParkingSpace"; import {ParkingSpace} from "lib/src/entity/venue/entity/ParkingSpace";
import {Venue} from "lib/src/entity/venue/entity/Venue"; import {Venue} from "lib/src/entity/venue/entity/Venue";
import {Page} from "autumn-vue/lib/core/page/Page"; import {Page} from "lib/src/core/page/Page";
import {CascaderOption} from "lib/src/domain/CascaderOption"; import {CascaderOption} from "lib/src/domain/CascaderOption";
import {User} from "lib/src/entity/security/entity/User"; import {User} from "lib/src/entity/security/entity/User";
import {VenueOption} from "lib/src/entity/venue/domain/VenueOption"; import {VenueOption} from "lib/src/entity/venue/domain/VenueOption";
import {Pagination} from "lib/src/core/page/Pagination";
// endregion // endregion
/** /**
* 车辆场地(Venue) PI接口 * 车辆场地(Venue) PI接口
* @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class VenueController{ export class VenueController{
...@@ -23,7 +23,7 @@ export class VenueController{ ...@@ -23,7 +23,7 @@ export class VenueController{
* @param area * @param area
* @return Area * @return Area
*/ */
static addArea(axios:AxiosStatic, area: any): Promise<AxiosResponse<Area>> { static addArea(axios:AxiosStatic, area: Area): Promise<AxiosResponse<Area>> {
return axios.post('venue/addArea', area); return axios.post('venue/addArea', area);
} }
...@@ -32,7 +32,7 @@ export class VenueController{ ...@@ -32,7 +32,7 @@ export class VenueController{
* @param parkingSpace * @param parkingSpace
* @return ParkingSpace * @return ParkingSpace
*/ */
static addParkingSpace(axios:AxiosStatic, parkingSpace: any): Promise<AxiosResponse<ParkingSpace>> { static addParkingSpace(axios:AxiosStatic, parkingSpace: ParkingSpace): Promise<AxiosResponse<ParkingSpace>> {
return axios.post('venue/addParkingSpace', parkingSpace); return axios.post('venue/addParkingSpace', parkingSpace);
} }
...@@ -41,13 +41,13 @@ export class VenueController{ ...@@ -41,13 +41,13 @@ export class VenueController{
* @param venue * @param venue
* @return Venue * @return Venue
*/ */
static addVenue(axios:AxiosStatic, venue: any): Promise<AxiosResponse<Venue>> { static addVenue(axios:AxiosStatic, venue: Venue): Promise<AxiosResponse<Venue>> {
return axios.post('venue/addVenue', venue); return axios.post('venue/addVenue', venue);
} }
/** /**
*/ */
static addVenueUsers(axios:AxiosStatic, users: any, venueId: number): Promise<AxiosResponse<number>> { static addVenueUsers(axios:AxiosStatic, users: User[], venueId: number): Promise<AxiosResponse<number>> {
return axios.post('venue/addVenueUsers', users, {params: {venueId: venueId}}); return axios.post('venue/addVenueUsers', users, {params: {venueId: venueId}});
} }
...@@ -137,7 +137,7 @@ export class VenueController{ ...@@ -137,7 +137,7 @@ export class VenueController{
* 分页查询区域 * 分页查询区域
* @param pagination * @param pagination
*/ */
static pageArea(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Area>>> { static pageArea(axios:AxiosStatic, pagination: Pagination<Area>): Promise<AxiosResponse<Page<Area>>> {
return axios.post('venue/pageArea', pagination); return axios.post('venue/pageArea', pagination);
} }
...@@ -148,7 +148,7 @@ export class VenueController{ ...@@ -148,7 +148,7 @@ export class VenueController{
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageParkingSpace(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<ParkingSpace>>> { static pageParkingSpace(axios:AxiosStatic, pagination: Pagination<ParkingSpace>): Promise<AxiosResponse<Page<ParkingSpace>>> {
return axios.post('venue/pageParkingSpace', pagination); return axios.post('venue/pageParkingSpace', pagination);
} }
...@@ -159,7 +159,7 @@ export class VenueController{ ...@@ -159,7 +159,7 @@ export class VenueController{
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageVenue(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Venue>>> { static pageVenue(axios:AxiosStatic, pagination: Pagination<Venue>): Promise<AxiosResponse<Page<Venue>>> {
return axios.post('venue/pageVenue', pagination); return axios.post('venue/pageVenue', pagination);
} }
...@@ -167,7 +167,7 @@ export class VenueController{ ...@@ -167,7 +167,7 @@ export class VenueController{
/** /**
*/ */
static pageVenueUser(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<User>>> { static pageVenueUser(axios:AxiosStatic, pagination: Pagination<User>): Promise<AxiosResponse<Page<User>>> {
return axios.post('venue/pageVenueUser', pagination); return axios.post('venue/pageVenueUser', pagination);
} }
...@@ -205,7 +205,7 @@ export class VenueController{ ...@@ -205,7 +205,7 @@ export class VenueController{
* @param area * @param area
* @return Area * @return Area
*/ */
static updateArea(axios:AxiosStatic, area: any): Promise<AxiosResponse<Area>> { static updateArea(axios:AxiosStatic, area: Area): Promise<AxiosResponse<Area>> {
return axios.post('venue/updateArea', area); return axios.post('venue/updateArea', area);
} }
...@@ -214,7 +214,7 @@ export class VenueController{ ...@@ -214,7 +214,7 @@ export class VenueController{
* @param parkingSpace * @param parkingSpace
* @return ParkingSpace * @return ParkingSpace
*/ */
static updateParkingSpace(axios:AxiosStatic, parkingSpace: any): Promise<AxiosResponse<ParkingSpace>> { static updateParkingSpace(axios:AxiosStatic, parkingSpace: ParkingSpace): Promise<AxiosResponse<ParkingSpace>> {
return axios.post('venue/updateParkingSpace', parkingSpace); return axios.post('venue/updateParkingSpace', parkingSpace);
} }
...@@ -223,7 +223,7 @@ export class VenueController{ ...@@ -223,7 +223,7 @@ export class VenueController{
* @param venue * @param venue
* @return Venue * @return Venue
*/ */
static updateVenue(axios:AxiosStatic, venue: any): Promise<AxiosResponse<Venue>> { static updateVenue(axios:AxiosStatic, venue: Venue): Promise<AxiosResponse<Venue>> {
return axios.post('venue/updateVenue', venue); return axios.post('venue/updateVenue', venue);
} }
......
...@@ -3,12 +3,13 @@ import {AxiosResponse, AxiosStatic} from 'axios'; ...@@ -3,12 +3,13 @@ import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs'; import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {Withdraw} from "lib/src/entity/finance/entity/Withdraw"; import {Withdraw} from "lib/src/entity/finance/entity/Withdraw";
import {Page} from "autumn-vue/lib/core/page/Page"; import {Page} from "lib/src/core/page/Page";
import {ApproveHistory} from "lib/src/entity/track/entity/ApproveHistory";
import {Pagination} from "lib/src/core/page/Pagination";
// endregion // endregion
/** /**
* 提现申请(Withdraw) PI接口 * 提现申请(Withdraw) PI接口
* @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class WithdrawController{ export class WithdrawController{
...@@ -18,13 +19,13 @@ export class WithdrawController{ ...@@ -18,13 +19,13 @@ export class WithdrawController{
* @param approveHistory * @param approveHistory
* @return Withdraw * @return Withdraw
*/ */
static auditWithdraw(axios:AxiosStatic, approveHistory: any): Promise<AxiosResponse<Withdraw>> { static auditWithdraw(axios:AxiosStatic, approveHistory: ApproveHistory): Promise<AxiosResponse<Withdraw>> {
return axios.post('withdraw/auditWithdraw', approveHistory); return axios.post('withdraw/auditWithdraw', approveHistory);
} }
/** /**
*/ */
static exportWithdraw(axios:AxiosStatic, pagination: any, config?:any): Promise<AxiosResponse<void>> { static exportWithdraw(axios:AxiosStatic, pagination: Pagination<Withdraw>, config?:any): Promise<AxiosResponse<void>> {
return axios.post('withdraw/exportWithdraw', pagination, config); return axios.post('withdraw/exportWithdraw', pagination, config);
} }
...@@ -54,7 +55,7 @@ export class WithdrawController{ ...@@ -54,7 +55,7 @@ export class WithdrawController{
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageWithdraw(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Withdraw>>> { static pageWithdraw(axios:AxiosStatic, pagination: Pagination<Withdraw>): Promise<AxiosResponse<Page<Withdraw>>> {
return axios.post('withdraw/pageWithdraw', pagination); return axios.post('withdraw/pageWithdraw', pagination);
} }
......
...@@ -192,6 +192,11 @@ export default { ...@@ -192,6 +192,11 @@ export default {
"depositState": { "depositState": {
"FREEZE": "冻结中", "FREEZE": "冻结中",
"UNFREEZE": "已解冻" "UNFREEZE": "已解冻"
},
"refundState": {
"UNREFUND": "未退款",
"REFUNDING": "退款中",
"REFUNDED": "已退款"
} }
}, },
"depositRule": { "depositRule": {
......
import {AuthenticationManager} from "autumn-vue/lib/core/security/AuthenticationManager"; // import {AuthenticationManager} from "lib/src/core/security/AuthenticationManager";
import {AuthenticationManager} from "lib/src/core/security/AuthenticationManager";
export class AuthService extends AuthenticationManager { export class AuthService extends AuthenticationManager {
......
import {AxiosInstance} from 'axios'; import {AxiosInstance} from 'axios';
import {message} from 'ant-design-vue'; import {message} from 'ant-design-vue';
import {AuthenticationManager} from "autumn-vue/lib/core/security/AuthenticationManager"; import {AuthenticationManager} from "lib/src/core/security/AuthenticationManager";
import {DefaultTokenInterceptor} from "autumn-vue/lib/core/http/DefaultTokenInterceptor"; import {DefaultTokenInterceptor} from "lib/src/core/http/DefaultTokenInterceptor";
import {AutumnConfig} from "autumn-vue/lib/core/config/AutumnConfig"; import {AutumnConfig} from "lib/src/core/config/AutumnConfig";
import dayjs, {Dayjs} from "dayjs"; import dayjs, {Dayjs} from "dayjs";
export class CustomTokenInterceptor { export class CustomTokenInterceptor {
...@@ -136,7 +136,7 @@ export class CustomTokenInterceptor { ...@@ -136,7 +136,7 @@ export class CustomTokenInterceptor {
* @param error 响应回调,根据不同响应进行不同操作 * @param error 响应回调,根据不同响应进行不同操作
*/ */
private handleError(error: any) { private handleError(error: any) {
if(!error.response){ if (!error.response) {
return; return;
} }
console.log(error); console.log(error);
......
import {Modal} from "ant-design-vue/es";
import _extends from "@babel/runtime/helpers/esm/extends";
import _defaults from "@babel/runtime/helpers/esm/defaults";
import {ModalFuncProps} from 'ant-design-vue/lib/modal/Modal';
import {createVNode} from "vue";
import {VNodeProps, VNodeTypes} from '@vue/runtime-core';
import {Data} from 'ant-design-vue/lib/_util/type';
import type {ButtonProps as ButtonPropsType} from "ant-design-vue/lib/button/buttonTypes";
export default interface ModalProps extends ModalFuncProps {
component: VNodeTypes;
props?: (Data & VNodeProps) | null;
emits?: { [event: string]: (...args: any[]) => void }
}
const DEFAULT_MODAL_PROPS: ModalFuncProps = {
open: false,
width: 1024,
okText: '确定',
cancelText: '取消',
closable: true,
maskClosable: false,
mask: true,
keyboard: true,
icon: null,
class: 'dynamic-modal'
}
export class ModalService {
/**
* 适用于表单,有确认和关闭按钮
* @param modalProps
*/
public static confirm(modalProps: ModalProps) {
modalProps = _defaults(modalProps, DEFAULT_MODAL_PROPS);
const vNode = modalProps.content = createVNode(modalProps.component, modalProps.props);
if (!modalProps.onOk) {
// @ts-ignore
modalProps.okButtonProps = {style: {display: 'none'}};
}
const configs = _extends(_extends({}, modalProps), {
onOk: (...args: any[]) => {
if (modalProps.onOk) {
modalProps.onOk(vNode.component.proxy, args);
}
// 禁止确定时关闭弹窗
return new Promise((resolve, reject) => reject());
},
onCancel: (...args: any[]) => {
if (modalProps.onCancel) {
return modalProps.onCancel(vNode.component.proxy);
}
}
});
const modal = Modal.confirm(configs);
if (modalProps.emits) {
vNode.component.emit = ((event, args) => {
if (modalProps.emits[event]) {
modalProps.emits[event](args);
}
});
}
return modal;
}
/**
* 适用于信息弹框,单个按钮
* @param modalProps
*/
public static info(modalProps: ModalProps) {
modalProps = _defaults(modalProps, DEFAULT_MODAL_PROPS);
const vNode = modalProps.content = createVNode(modalProps.component, modalProps.props);
const configs = _extends(_extends({}, modalProps), {
onOk: (...args: any[]) => {
if (modalProps.onOk) {
modalProps.onOk(vNode.component.proxy, args);
}
},
onCancel: (...args: any[]) => {
if (modalProps.onCancel) {
return modalProps.onCancel(vNode.component.proxy);
}
}
});
const modal = Modal.info(configs);
if (modalProps.emits) {
vNode.component.emit = ((event, args) => {
if (modalProps.emits[event]) {
modalProps.emits[event](args);
}
});
}
return modal;
}
}
<template>
<a-modal v-model:visible="showModal" width="780px" :title="$t('common.add')" @ok="submitForm" :ok-text="$t('common.ok')"
:cancel-text="$t('common.cancel')" :mask-closable="false">
<a-spin :spinning="submitted">
<a-form v-if="formState" :model="formState" :label-col="labelCol" :wrapper-col="wrapperCol" ref="formRef">
<a-form-item :label="this.$t('common.name')" name="optionName" has-feedback :rules="[rule_required(),rule_max(64)]">
<a-input v-model:value="formState.optionName" :placeholder="$t('common.please_enter')" :maxlength="64"/>
</a-form-item>
<a-form-item :label="$t('common.enabled')" name="enabled">
<a-switch v-model:checked="formState.enabled" :checked-children="$t('common.enabled_true')" :un-checked-children="$t('common.enabled_false')"/>
</a-form-item>
<a-form-item :label="$t('common.remark')" name="remark" :rules="[rule_max(255)]">
<a-textarea v-model:value="formState.remark" rows="6" :placeholder="$t('common.please_enter')"/>
</a-form-item>
</a-form>
</a-spin>
</a-modal>
</template>
<script lang="ts">
import {message} from 'ant-design-vue';
import {reactive} from 'vue';
import {Component, Prop} from 'vue-facing-decorator';
import {Dictionary} from "lib/src/core/dictionary/Dictionary";
import {FormComponent} from '@/core/form/FormComponent';
@Component({
components: {},
})
export default class CreateDictionary extends FormComponent<Dictionary> {
@Prop()
dictionaryName: string;
/**
* 初始化配置
*/
created(): void {
const dictionary = new Dictionary();
dictionary.enabled = true;
this.formState = reactive<Dictionary>(dictionary);
}
/**
* 成功回调
* @param formValue
*/
onValidSuccess(formValue: Dictionary): void {
formValue.dictionaryName = this.dictionaryName;
// @ts-ignore
this.axios.post('dictionary/addDictionary', formValue).then(response => {
message.success(this.$t('common.save_success'));
this.$emit('handleOk');
this.showModal = false;
});
}
}
</script>
<style scoped>
</style>
No preview for this file type
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!