feat:机器核销
This commit is contained in:
1 parent
89384d07f4
commit
bfd1659bdb
16 files changed
+339
-4
No files matched your search
+27
@@ -0,0 +1,27 @@
|
||||
package com.bsd.pjcloud.hard.api.dto.hard;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 预约菜单单笔核销参数。
|
||||
*
|
||||
* 核销目标只能由订单 ID 确定,禁止客户端附带日期、餐段、设备或识别身份参与订单选择。
|
||||
*/
|
||||
@Data
|
||||
public class ReservationMenuCancelDto {
|
||||
|
||||
@NotNull(message = "预约订单ID不能为空")
|
||||
@Schema(description = "待核销预约订单ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* Spring 默认可能忽略未知 JSON 字段,这里显式拒绝,保证请求体只能包含 orderId。
|
||||
*/
|
||||
@JsonAnySetter
|
||||
public void rejectUnknownField(String fieldName, Object value) {
|
||||
throw new IllegalArgumentException("预约核销接口不支持参数:" + fieldName);
|
||||
}
|
||||
}
|
||||
+3
@@ -39,5 +39,8 @@ public class ReservationMenuQueryVo {
|
||||
private String mealTitle;
|
||||
|
||||
private List<String> items;
|
||||
|
||||
/** 同一日期餐段可能合并多笔预约,终端按订单逐笔确认核销。 */
|
||||
private List<Long> orderIds;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user