Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #280

Merged
merged 3 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,15 @@
---

<p align="center">
<a href="https://www.yuque.com/erupts/erupt/ggbcv9">Erupt Cloud【分布式多维配置中心】</a> &nbsp; | &nbsp;
<a href="https://www.yuque.com/erupts/erupt/sd27r9o1pex1s5xn">Erupt Flow 【工作流】</a>
<a href="https://www.yuque.com/erupts/erupt/ggbcv9">Erupt Cloud【分布式云配置】</a> &nbsp; | &nbsp;
<a href="https://www.yuque.com/erupts/erupt/hstvzf">Erupt BI 【数据分析】</a> &nbsp; | &nbsp;
<a href="https://www.yuque.com/erupts/erupt/xviwe9bimrmae26t">Erupt Tenant 【多租户】</a>
</p>

---

<p align="center">

</p>

---
Expand Down
39 changes: 10 additions & 29 deletions erupt-sample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
</parent>

<artifactId>erupt-sample</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>erupt-sample</name>
<description>erupt-sample</description>

<properties>
<java.version>1.8</java.version>
<maven.deploy.skip>true</maven.deploy.skip>
Expand All @@ -29,6 +27,7 @@
<artifactId>erupt-web</artifactId>
<version>${project.parent.version}</version>
</dependency>

<!-- optional -->
<dependency>
<groupId>xyz.erupt</groupId>
Expand All @@ -53,38 +52,20 @@
</dependencies>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>lib</directory>
<targetPath>BOOT-INF/lib/</targetPath>
<includes>
<include>*.jar</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
<plugin>
<!-- 指定maven编译的jdk版本 -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<verbose>true</verbose>
<fork>true</fork>
<source>${java.version}</source>
<target>${java.version}</target>
<mainClass>xyz.erupt.sample.EruptSampleApplication</mainClass>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
21 changes: 16 additions & 5 deletions erupt-sample/src/main/java/xyz/erupt/upms/model/EruptMenu.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package xyz.erupt.upms.model;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import xyz.erupt.annotation.Erupt;
import xyz.erupt.annotation.EruptField;
Expand Down Expand Up @@ -41,10 +42,9 @@
@EruptI18n
@Getter
@Setter
@NoArgsConstructor
public class EruptMenu extends MetaModel {

public static final String CODE = "code";

@EruptField(
views = @View(title = "名称"),
edit = @Edit(
Expand Down Expand Up @@ -125,9 +125,6 @@ public class EruptMenu extends MetaModel {
)
private String param;

public EruptMenu() {
}

public EruptMenu(String code, String name, String type, String value, Integer status, Integer sort, String icon, EruptMenu parentMenu) {
this.code = code;
this.name = name;
Expand All @@ -151,6 +148,20 @@ public EruptMenu(String code, String name, String type, String value, EruptMenu
this.setCreateTime(LocalDateTime.now());
}

public MetaMenu toMetaMenu() {
MetaMenu metaMenu = new MetaMenu();
metaMenu.setId(this.getId());
metaMenu.setCode(this.getCode());
metaMenu.setName(this.getName());
metaMenu.setType(this.getType());
metaMenu.setValue(this.getValue());
metaMenu.setStatus(null != this.getStatus() ? MenuStatus.valueOf(this.getStatus()) : MenuStatus.OPEN);
metaMenu.setSort(this.getSort());
metaMenu.setIcon(this.getIcon());
metaMenu.setParentMenu(null == this.getParentMenu() ? null : this.getParentMenu().toMetaMenu());
return metaMenu;
}

public static EruptMenu fromMetaMenu(MetaMenu metaMenu) {
if (null == metaMenu) return null;
EruptMenu eruptMenu = new EruptMenu(metaMenu.getCode(),
Expand Down
Loading