Commit 4f0a11b4 by 吕明尚

Merge branch 'dev' into test

parents c0a2eb3f e067359a
......@@ -13,6 +13,7 @@ import share.common.core.domain.AjaxResult;
import share.common.core.domain.R;
import share.common.core.redis.RedisUtil;
import share.common.utils.JsonConvertUtil;
import share.system.domain.CancelPay;
import share.system.domain.SConsumer;
import share.system.domain.SOrder;
import share.system.domain.vo.FrontTokenComponent;
......@@ -121,8 +122,8 @@ public class SOrderController extends BaseController
*/
@ApiOperation(value = "取消支付")
@RequestMapping(value = "/cancelPay", method = RequestMethod.POST)
public R<Boolean> cancelPay(@RequestBody @Validated @NotBlank(message = "订单编号不能为空") String orderNo) {
return R.ok(sOrderService.cancelPay(orderNo));
public R<Boolean> cancelPay(@RequestBody @Validated(CancelPay.class) SOrder sOrder) {
return R.ok(sOrderService.cancelPay(sOrder.getOrderNo()));
}
......
package share.system.domain;
//取消支付
public interface CancelPay {
}
......@@ -12,6 +12,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.validation.annotation.Validated;
import share.common.annotation.Excel;
import share.common.core.domain.BaseEntity;
......@@ -24,6 +25,7 @@ import javax.validation.constraints.NotBlank;
* @date 2023-10-09
*/
@Data
@Validated
public class SOrder extends BaseEntity
{
private static final long serialVersionUID = 1L;
......@@ -34,6 +36,7 @@ public class SOrder extends BaseEntity
/** 订单流水号 */
@Excel(name = "订单编号")
@NotBlank(message = "订单编号不能为空", groups = {CancelPay.class})
private String orderNo;
@Excel(name = "商户订单号")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment