mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-18 01:25:28 +08:00
h5开发
This commit is contained in:
parent
17e356dded
commit
d0f1c868c6
@ -0,0 +1,31 @@
|
||||
package com.luban.api.constant;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ProjectStatus {
|
||||
Draft(1),
|
||||
Published(2);
|
||||
private final int value;
|
||||
|
||||
public static ProjectStatus valueOf(int value) {
|
||||
for (ProjectStatus status : values()) {
|
||||
if (status.value == value) {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getName(int value) {
|
||||
for (ProjectStatus status : values()) {
|
||||
if (status.value == value) {
|
||||
return status.name();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -4,6 +4,7 @@ package com.luban.api.controller;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.dromara.md.form.api.constant.BaseConstant;
|
||||
import com.dromara.md.form.utils.TenantHelper;
|
||||
import com.luban.api.constant.ProjectStatus;
|
||||
import com.luban.api.dto.H5ProjectContentDTO;
|
||||
import com.luban.api.dto.query.H5ProjectQueryDTO;
|
||||
import com.luban.api.entity.H5Project;
|
||||
@ -66,7 +67,7 @@ public class WorkController {
|
||||
h5Project.setPreviewWidth(request.getPreviewWidth());
|
||||
h5Project.setPreviewHeight(request.getPreviewHeight());
|
||||
h5Project.setContent("{}");
|
||||
h5Project.setStatus(1);
|
||||
h5Project.setStatus(ProjectStatus.Draft.getValue());
|
||||
h5Project.setCreatedBy(LoginHelper.getUserId());
|
||||
|
||||
H5ProjectContentDTO contentDTO = new H5ProjectContentDTO();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user