Skip to content

Commit

Permalink
Merge pull request #280 from erupts/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
erupts authored Nov 14, 2024
2 parents 9dc38ee + 91cbb22 commit 0b1e5f1
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 36 deletions.
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

0 comments on commit 0b1e5f1

Please sign in to comment.