驿站付款退款
This commit is contained in:
parent
e43f3643f1
commit
31fc69c7d7
|
|
@ -8,10 +8,12 @@ import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.Min;
|
import javax.validation.constraints.Min;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class StageRefundParam extends OrderRefundParam {
|
public class StageRefundParam extends OrderRefundParam {
|
||||||
|
@NotNull(message = "交易ID不能为空")
|
||||||
private Long tradeId;
|
private Long tradeId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ public class OrderInfoMobileController extends BaseController {
|
||||||
notes = "驿站退款"
|
notes = "驿站退款"
|
||||||
)
|
)
|
||||||
public AjaxResult stageRefundMobile(@RequestHeader Map<String, String> headers,
|
public AjaxResult stageRefundMobile(@RequestHeader Map<String, String> headers,
|
||||||
@RequestBody StageRefundParam request) {
|
@RequestBody @Valid StageRefundParam request) {
|
||||||
String sign = HeaderFetchUtil.getSign(headers);
|
String sign = HeaderFetchUtil.getSign(headers);
|
||||||
if(StringUtils.isBlank(sign) || !sign.equals(StageWhiteList.STAGE_SIGN_WHITE_LIST)) {
|
if(StringUtils.isBlank(sign) || !sign.equals(StageWhiteList.STAGE_SIGN_WHITE_LIST)) {
|
||||||
return AjaxResult.error("签名失败");
|
return AjaxResult.error("签名失败");
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
|
|
@ -140,7 +141,7 @@ public class OrderPlaceMobileController {
|
||||||
notes = "驿站付款"
|
notes = "驿站付款"
|
||||||
)
|
)
|
||||||
public AjaxResult stageOrderPay(@RequestHeader Map<String, String> headers,
|
public AjaxResult stageOrderPay(@RequestHeader Map<String, String> headers,
|
||||||
@RequestBody StagePayMobileDTO stagePayDTO) {
|
@RequestBody @Valid StagePayMobileDTO stagePayDTO) {
|
||||||
String sign = HeaderFetchUtil.getSign(headers);
|
String sign = HeaderFetchUtil.getSign(headers);
|
||||||
if(StringUtils.isBlank(sign) || !sign.equals(StageWhiteList.STAGE_SIGN_WHITE_LIST)) {
|
if(StringUtils.isBlank(sign) || !sign.equals(StageWhiteList.STAGE_SIGN_WHITE_LIST)) {
|
||||||
return AjaxResult.error("签名失败");
|
return AjaxResult.error("签名失败");
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,6 @@ import java.math.BigDecimal;
|
||||||
@Data
|
@Data
|
||||||
public class StagePayMobileDTO extends OrderPayMobileDTO{
|
public class StagePayMobileDTO extends OrderPayMobileDTO{
|
||||||
@ApiModelProperty("支付金额")
|
@ApiModelProperty("支付金额")
|
||||||
private @NotNull @Min(value = 0L, message = "金额不能小于0") BigDecimal amount;
|
private @NotNull(message = "支付金额不能为空") @Min(value = 0L, message = "金额不能小于0") BigDecimal amount;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue