ref 一些接口参数的修改

This commit is contained in:
DaxPay
2024-10-21 20:00:31 +08:00
parent 3c1c446c18
commit 34ea035c2b
23 changed files with 72 additions and 66 deletions

View File

@@ -11,9 +11,9 @@ import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.constraints.NotBlank;
import lombok.RequiredArgsConstructor;
import org.dromara.daxpay.service.param.allocation.receiver.AllocReceiverAddParam;
import org.dromara.daxpay.core.param.allocation.AllocReceiverAddParam;
import org.dromara.daxpay.service.param.allocation.receiver.AllocReceiverQuery;
import org.dromara.daxpay.service.param.allocation.receiver.AllocReceiverRemoveParam;
import org.dromara.daxpay.core.param.allocation.AllocReceiverRemoveParam;
import org.dromara.daxpay.service.result.allocation.AllocReceiverResult;
import org.dromara.daxpay.service.service.allocation.AllocReceiverService;
import org.dromara.daxpay.service.service.assist.PaymentAssistService;

View File

@@ -37,8 +37,8 @@ public class ChannelCashierController {
private final ChannelCashierConfigService cashierConfigService;
@Operation(summary = "获取收银台信息")
@GetMapping("/getCashierType")
public Result<ChannelCashierConfigResult> getCashierType(String cashierType,String appId){
@GetMapping("/getCashierInfo")
public Result<ChannelCashierConfigResult> getCashierInfo(String cashierType,String appId){
paymentAssistService.initMchApp(appId);
return Res.ok(cashierConfigService.findByCashierType(cashierType));
}
@@ -52,7 +52,7 @@ public class ChannelCashierController {
return Res.ok(channelCashierService.generateAuthUrl(param));
}
@Operation(summary = "获取授权结果")
@Operation(summary = "授权获取结果")
@PostMapping("/auth")
public Result<AuthResult> auth(@RequestBody CashierAuthCodeParam param){
ValidationUtil.validateParam(param);

View File

@@ -1,13 +1,18 @@
package org.dromara.daxpay.service.controller.unipay;
import cn.bootx.platform.core.annotation.IgnoreAuth;
import org.dromara.daxpay.core.param.PaymentCommonParam;
import org.dromara.daxpay.core.result.DaxResult;
import org.dromara.daxpay.core.util.DaxRes;
import org.dromara.daxpay.service.common.anno.PaymentVerify;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.dromara.daxpay.core.param.allocation.AllocReceiverAddParam;
import org.dromara.daxpay.core.param.allocation.AllocReceiverRemoveParam;
import org.dromara.daxpay.service.service.allocation.AllocReceiverService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -23,6 +28,7 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping("/unipay/alloc")
@RequiredArgsConstructor
public class UniAllocationController {
private final AllocReceiverService allocReceiverService;
@Operation(summary = "发起分账接口")
@PostMapping("/start")
@@ -36,15 +42,23 @@ public class UniAllocationController {
return DaxRes.ok();
}
@Operation(summary = "分账接收方查询接口")
@PostMapping("/receiver/list")
public DaxResult<Void> receiverList(@RequestBody PaymentCommonParam param){
return DaxRes.ok();
}
@Operation(summary = "分账接收方添加接口")
@PostMapping("/receiver/add")
public DaxResult<Void> receiverAdd(){
public DaxResult<Void> receiverAdd(@RequestBody AllocReceiverAddParam param){
allocReceiverService.addAndSync(param);
return DaxRes.ok();
}
@Operation(summary = "分账接收方删除接口")
@PostMapping("/receiver/remove")
public DaxResult<Void> receiverRemove(){
public DaxResult<Void> receiverRemove(@RequestBody AllocReceiverRemoveParam param){
allocReceiverService.removeAndSync(param);
return DaxRes.ok();
}

View File

@@ -53,8 +53,8 @@ public class UniSyncController {
return DaxRes.ok(refundSyncService.sync(param));
}
@Operation(summary = "账订单同步接口")
@PostMapping("/allocation")
@Operation(summary = "账订单同步接口")
@PostMapping("/transfer")
public DaxResult<TransferSyncResult> allocation(@RequestBody TransferSyncParam param){
return DaxRes.ok(transferSyncService.sync(param));
}

View File

@@ -1,7 +1,7 @@
package org.dromara.daxpay.service.convert.allocation;
import org.dromara.daxpay.service.entity.allocation.receiver.AllocReceiver;
import org.dromara.daxpay.service.param.allocation.receiver.AllocReceiverAddParam;
import org.dromara.daxpay.core.param.allocation.AllocReceiverAddParam;
import org.dromara.daxpay.service.result.allocation.AllocReceiverResult;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

View File

@@ -5,8 +5,8 @@ import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import java.util.List;
/**

View File

@@ -7,8 +7,8 @@ import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.Min;
import jakarta.validation.constraints.DecimalMax;
import jakarta.validation.constraints.Min;
import java.math.BigDecimal;
/**

View File

@@ -5,7 +5,7 @@ import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;
import java.util.List;
/**

View File

@@ -1,75 +0,0 @@
package org.dromara.daxpay.service.param.allocation.receiver;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.experimental.Accessors;
import org.dromara.daxpay.core.enums.AllocReceiverTypeEnum;
import org.dromara.daxpay.core.enums.AllocRelationTypeEnum;
import org.dromara.daxpay.core.enums.ChannelEnum;
import javax.validation.constraints.Size;
/**
* 分账接收者添加参数
* @author xxm
* @since 2024/5/20
*/
@Data
@Accessors(chain = true)
@Schema(title = "分账接收者添加参数")
public class AllocReceiverAddParam{
@Schema(description = "接收者编号, 需要保证唯一")
@NotBlank(message = "接收者编号必填")
@Size(max = 32, message = "接收者编号不可超过32位")
private String receiverNo;
/**
* 所属通道
* @see ChannelEnum
*/
@Schema(description = "所属通道")
@NotBlank(message = "所属通道必填")
@Size(max = 20, message = "所属通道不可超过20位")
private String channel;
/**
* 分账接收方类型 根据不同类型的通道进行传输
* @see AllocReceiverTypeEnum
*/
@Schema(description = "分账接收方类型")
@NotBlank(message = "分账接收方类型必填")
@Size(max = 20, message = "分账接收方类型不可超过20位")
private String receiverType;
/** 接收方账号 */
@Schema(description = "接收方账号")
@NotBlank(message = "接收方账号必填")
@Size(max = 100, message = "接收方账号不可超过100位")
private String receiverAccount;
/** 接收方姓名 */
@Schema(description = "接收方姓名")
@Size(max = 100, message = "接收方姓名不可超过50位")
private String receiverName;
/**
* 分账关系类型
* @see AllocRelationTypeEnum
*/
@Schema(description = "分账关系类型")
@NotBlank(message = "分账关系类型必填")
@Size(max = 20, message = "分账关系类型不可超过20位")
private String relationType;
/** 关系名称 关系类型为自定义是填写 */
@Schema(description = "关系名称")
@Size(max = 50, message = "关系名称不可超过50位")
private String relationName;
@Schema(description = "商户应用ID")
@NotBlank(message = "商户应用ID必填")
@Size(max = 32, message = "商户应用ID不可超过32位")
private String appId;
}

View File

@@ -1,29 +0,0 @@
package org.dromara.daxpay.service.param.allocation.receiver;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.Size;
/**
* 分账接收者删除参数
* @author xxm
* @since 2024/5/20
*/
@Data
@Accessors(chain = true)
@Schema(title = "分账接收者删除参数")
public class AllocReceiverRemoveParam {
@Schema(description = "接收者编号")
@NotBlank(message = "接收者编号必填")
@Size(max = 32, message = "接收者编号不可超过32位")
private String receiverNo;
@Schema(description = "商户应用ID")
@NotBlank(message = "商户应用ID必填")
@Size(max = 32, message = "商户应用ID不可超过32位")
private String appId;
}

View File

@@ -19,9 +19,6 @@ import org.dromara.daxpay.core.result.MchAppResult;
@Schema(title = "分账接收方")
public class AllocReceiverResult extends MchAppResult {
@Schema(description = "账号别名")
private String name;
@Schema(description = "接收方编号")
private String receiverNo;

View File

@@ -18,18 +18,10 @@ public class PlatformConfigResult {
@Schema(description = "支付网关地址")
private String gatewayServiceUrl;
/** 网关移动端是否为嵌入式 */
@Schema(description = "网关移动端是否为嵌入式")
private boolean mobileEmbedded;
/** 网关移动端地址 */
@Schema(description = "网关移动端地址")
private String gatewayMobileUrl;
/** 网关PC端是否为嵌入式 */
@Schema(description = "网关PC端是否为嵌入式")
private boolean pcEmbedded;
/** 网关PC端地址 */
@Schema(description = "网关PC端地址")
private String gatewayPcUrl;

View File

@@ -15,7 +15,7 @@ import lombok.experimental.Accessors;
public class ApiConstResult {
/** 接口编码 */
@Schema(description = "编码")
private String channel;
private String code;
/** 接口名称 */
@Schema(description = "接口名称")

View File

@@ -50,12 +50,14 @@ public class TradeCallbackRecordResult extends MchAppResult {
@Schema(description = "回调处理状态")
private String status;
@Schema(description = "调整号")
private String adjustNo;
/** 错误码 */
@Schema(description = "错误码")
private String errorCode;
/** 提示信息 */
@Schema(description = "提示信息")
private String errorMsg;
}

View File

@@ -1,11 +1,11 @@
package org.dromara.daxpay.service.result.record.sync;
import org.dromara.daxpay.core.enums.ChannelEnum;
import org.dromara.daxpay.core.result.MchAppResult;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.dromara.daxpay.core.enums.ChannelEnum;
import org.dromara.daxpay.core.result.MchAppResult;
/**
* 支付同步记录
@@ -62,10 +62,6 @@ public class TradeSyncRecordResult extends MchAppResult {
@Schema(description = "是否进行调整")
private boolean adjust;
/** 调整单号 */
@Schema(description = "调整单号")
private String adjustNo;
/** 错误码 */
@Schema(description = "错误码")
private String errorCode;

View File

@@ -20,9 +20,9 @@ import org.dromara.daxpay.service.convert.allocation.AllocReceiverConvert;
import org.dromara.daxpay.service.dao.allocation.receiver.AllocGroupReceiverManager;
import org.dromara.daxpay.service.dao.allocation.receiver.AllocReceiverManager;
import org.dromara.daxpay.service.entity.allocation.receiver.AllocReceiver;
import org.dromara.daxpay.service.param.allocation.receiver.AllocReceiverAddParam;
import org.dromara.daxpay.core.param.allocation.AllocReceiverAddParam;
import org.dromara.daxpay.service.param.allocation.receiver.AllocReceiverQuery;
import org.dromara.daxpay.service.param.allocation.receiver.AllocReceiverRemoveParam;
import org.dromara.daxpay.core.param.allocation.AllocReceiverRemoveParam;
import org.dromara.daxpay.service.result.allocation.AllocReceiverResult;
import org.dromara.daxpay.service.strategy.AbsAllocReceiverStrategy;
import org.dromara.daxpay.service.strategy.PaymentStrategy;