驿站付款退款

This commit is contained in:
gaowdong 2025-04-25 16:35:45 +08:00
parent e43f3643f1
commit 31fc69c7d7
4 changed files with 6 additions and 3 deletions

View File

@ -8,10 +8,12 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;
@Data
public class StageRefundParam extends OrderRefundParam {
@NotNull(message = "交易ID不能为空")
private Long tradeId;
}

View File

@ -140,7 +140,7 @@ public class OrderInfoMobileController extends BaseController {
notes = "驿站退款"
)
public AjaxResult stageRefundMobile(@RequestHeader Map<String, String> headers,
@RequestBody StageRefundParam request) {
@RequestBody @Valid StageRefundParam request) {
String sign = HeaderFetchUtil.getSign(headers);
if(StringUtils.isBlank(sign) || !sign.equals(StageWhiteList.STAGE_SIGN_WHITE_LIST)) {
return AjaxResult.error("签名失败");

View File

@ -24,6 +24,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.Map;
@RestController
@ -140,7 +141,7 @@ public class OrderPlaceMobileController {
notes = "驿站付款"
)
public AjaxResult stageOrderPay(@RequestHeader Map<String, String> headers,
@RequestBody StagePayMobileDTO stagePayDTO) {
@RequestBody @Valid StagePayMobileDTO stagePayDTO) {
String sign = HeaderFetchUtil.getSign(headers);
if(StringUtils.isBlank(sign) || !sign.equals(StageWhiteList.STAGE_SIGN_WHITE_LIST)) {
return AjaxResult.error("签名失败");

View File

@ -14,6 +14,6 @@ import java.math.BigDecimal;
@Data
public class StagePayMobileDTO extends OrderPayMobileDTO{
@ApiModelProperty("支付金额")
private @NotNull @Min(value = 0L, message = "金额不能小于0") BigDecimal amount;
private @NotNull(message = "支付金额不能为空") @Min(value = 0L, message = "金额不能小于0") BigDecimal amount;
}