mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-18 01:25:28 +08:00
表单创建和提交
This commit is contained in:
parent
75b9a2edc2
commit
ecc03127bc
@ -11,6 +11,8 @@ import com.luban.api.entity.H5Project;
|
||||
import com.luban.api.service.H5ProjectService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -84,7 +86,7 @@ public class H5ProjectController {
|
||||
*/
|
||||
@Operation(summary = "创建或更新H5项目")
|
||||
@PostMapping("/saveOrUpdate")
|
||||
public Long saveOrUpdate(@RequestParam(required = false) Long id, @RequestBody CreateH5ProjectRequest request) {
|
||||
public Long saveOrUpdate(@RequestParam(required = false) Long id, @RequestBody @Valid CreateH5ProjectRequest request) {
|
||||
H5Project h5Project;
|
||||
boolean isUpdate = id != null;
|
||||
|
||||
@ -158,15 +160,22 @@ public class H5ProjectController {
|
||||
@Getter
|
||||
@Setter
|
||||
public static class CreateH5ProjectRequest {
|
||||
@NotNull(message = "项目类型不能为空")
|
||||
private String type;
|
||||
@NotNull(message = "项目标题不能为空")
|
||||
private String title;
|
||||
@NotNull(message = "项目内容不能为空")
|
||||
private H5ProjectContentDTO content;
|
||||
private Long contentUpdatedAt;
|
||||
private String description;
|
||||
@NotNull(message = "预览URL不能为空")
|
||||
private String previewUrl;
|
||||
@NotNull(message = "预览水印不能为空")
|
||||
private String previewUrlWatermark;
|
||||
@NotNull(message = "预览宽度不能为空")
|
||||
private Integer previewWidth;
|
||||
@NotNull(message = "预览高度不能为空")
|
||||
private Integer previewHeight;
|
||||
private List<Long> groupIds;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user