Skip to content

Commit f9fb692

Browse files
committed
Add get notice feature.
1 parent 321ca7c commit f9fb692

File tree

10 files changed

+210
-11
lines changed

10 files changed

+210
-11
lines changed

assembly/dss-package/pom.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,28 @@
123123
<groupId>org.apache.linkis</groupId>
124124
<artifactId>linkis-mybatis</artifactId>
125125
<version>${linkis.version}</version>
126+
<exclusions>
127+
<exclusion>
128+
<groupId>org.springframework.boot</groupId>
129+
<artifactId>spring-boot-starter</artifactId>
130+
</exclusion>
131+
<exclusion>
132+
<groupId>org.springframework.boot</groupId>
133+
<artifactId>spring-boot-autoconfigure</artifactId>
134+
</exclusion>
135+
<exclusion>
136+
<groupId>org.springframework</groupId>
137+
<artifactId>spring-beans</artifactId>
138+
</exclusion>
139+
<exclusion>
140+
<groupId>org.springframework</groupId>
141+
<artifactId>spring-jdbc</artifactId>
142+
</exclusion>
143+
<exclusion>
144+
<groupId>com.zaxxer</groupId>
145+
<artifactId>HikariCP</artifactId>
146+
</exclusion>
147+
</exclusions>
126148
</dependency>
127149
<dependency>
128150
<groupId>org.apache.linkis</groupId>

dss-appconn/linkis-appconn-engineplugin/pom.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,28 @@
106106
<groupId>org.apache.linkis</groupId>
107107
<artifactId>linkis-mybatis</artifactId>
108108
<version>${linkis.version}</version>
109+
<exclusions>
110+
<exclusion>
111+
<groupId>org.springframework.boot</groupId>
112+
<artifactId>spring-boot-starter</artifactId>
113+
</exclusion>
114+
<exclusion>
115+
<groupId>org.springframework.boot</groupId>
116+
<artifactId>spring-boot-autoconfigure</artifactId>
117+
</exclusion>
118+
<exclusion>
119+
<groupId>org.springframework</groupId>
120+
<artifactId>spring-beans</artifactId>
121+
</exclusion>
122+
<exclusion>
123+
<groupId>org.springframework</groupId>
124+
<artifactId>spring-jdbc</artifactId>
125+
</exclusion>
126+
<exclusion>
127+
<groupId>com.zaxxer</groupId>
128+
<artifactId>HikariCP</artifactId>
129+
</exclusion>
130+
</exclusions>
109131
</dependency>
110132

111133
<dependency>

dss-apps/dss-data-governance/dss-data-asset-server/pom.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,28 @@
107107
<groupId>org.apache.linkis</groupId>
108108
<artifactId>linkis-mybatis</artifactId>
109109
<version>${linkis.version}</version>
110+
<exclusions>
111+
<exclusion>
112+
<groupId>org.springframework.boot</groupId>
113+
<artifactId>spring-boot-starter</artifactId>
114+
</exclusion>
115+
<exclusion>
116+
<groupId>org.springframework.boot</groupId>
117+
<artifactId>spring-boot-autoconfigure</artifactId>
118+
</exclusion>
119+
<exclusion>
120+
<groupId>org.springframework</groupId>
121+
<artifactId>spring-beans</artifactId>
122+
</exclusion>
123+
<exclusion>
124+
<groupId>org.springframework</groupId>
125+
<artifactId>spring-jdbc</artifactId>
126+
</exclusion>
127+
<exclusion>
128+
<groupId>com.zaxxer</groupId>
129+
<artifactId>HikariCP</artifactId>
130+
</exclusion>
131+
</exclusions>
110132
</dependency>
111133
<dependency>
112134
<groupId>com.webank.wedatasphere.dss</groupId>

dss-apps/dss-data-governance/dss-data-classification-server/pom.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,28 @@
107107
<groupId>org.apache.linkis</groupId>
108108
<artifactId>linkis-mybatis</artifactId>
109109
<version>${linkis.version}</version>
110+
<exclusions>
111+
<exclusion>
112+
<groupId>org.springframework.boot</groupId>
113+
<artifactId>spring-boot-starter</artifactId>
114+
</exclusion>
115+
<exclusion>
116+
<groupId>org.springframework.boot</groupId>
117+
<artifactId>spring-boot-autoconfigure</artifactId>
118+
</exclusion>
119+
<exclusion>
120+
<groupId>org.springframework</groupId>
121+
<artifactId>spring-beans</artifactId>
122+
</exclusion>
123+
<exclusion>
124+
<groupId>org.springframework</groupId>
125+
<artifactId>spring-jdbc</artifactId>
126+
</exclusion>
127+
<exclusion>
128+
<groupId>com.zaxxer</groupId>
129+
<artifactId>HikariCP</artifactId>
130+
</exclusion>
131+
</exclusions>
110132
</dependency>
111133
<dependency>
112134
<groupId>com.webank.wedatasphere.dss</groupId>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package com.webank.wedatasphere.dss.common.dao;
2+
3+
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4+
import com.webank.wedatasphere.dss.common.entity.NoticeContent;
5+
import org.apache.ibatis.annotations.Mapper;
6+
7+
@Mapper
8+
public interface NoticeMapper extends BaseMapper<NoticeContent> {
9+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
package com.webank.wedatasphere.dss.common.entity;
2+
3+
import com.baomidou.mybatisplus.annotation.TableName;
4+
5+
import java.io.Serializable;
6+
import java.util.Date;
7+
8+
/**
9+
* 首页公告
10+
* Author: xlinliu
11+
* Date: 2023/3/13
12+
*/
13+
@TableName(value = "dss_notice")
14+
public class NoticeContent implements Serializable {
15+
/**
16+
* 公告内容
17+
*/
18+
private String content;
19+
/**
20+
* 公告生效时间
21+
*/
22+
private Date startTime;
23+
/**
24+
* 公告失效时间
25+
*/
26+
private Date endTime;
27+
28+
29+
30+
public String getContent() {
31+
return content;
32+
}
33+
34+
public void setContent(String content) {
35+
this.content = content;
36+
}
37+
38+
public Date getStartTime() {
39+
return startTime;
40+
}
41+
42+
public void setStartTime(Date startTime) {
43+
this.startTime = startTime;
44+
}
45+
46+
public Date getEndTime() {
47+
return endTime;
48+
}
49+
50+
public void setEndTime(Date endTime) {
51+
this.endTime = endTime;
52+
}
53+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.webank.wedatasphere.dss.common.service;
2+
3+
import com.webank.wedatasphere.dss.common.entity.NoticeContent;
4+
5+
import java.util.List;
6+
7+
public interface NoticeService {
8+
9+
List<NoticeContent> getNoticeContent();
10+
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package com.webank.wedatasphere.dss.common.service.impl;
2+
3+
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4+
import com.webank.wedatasphere.dss.common.dao.NoticeMapper;
5+
import com.webank.wedatasphere.dss.common.entity.NoticeContent;
6+
import com.webank.wedatasphere.dss.common.service.NoticeService;
7+
import org.springframework.beans.factory.annotation.Autowired;
8+
import org.springframework.stereotype.Service;
9+
10+
import java.util.Date;
11+
import java.util.List;
12+
13+
@Service
14+
public class NoticeServiceImpl implements NoticeService {
15+
16+
@Autowired
17+
private NoticeMapper noticeMapper;
18+
19+
@Override
20+
public List<NoticeContent> getNoticeContent() {
21+
QueryWrapper<NoticeContent> queryWrapper = new QueryWrapper<>();
22+
Date now = new Date();
23+
queryWrapper.gt("end_time", now);
24+
queryWrapper.orderByDesc("id");
25+
return noticeMapper.selectList(queryWrapper);
26+
}
27+
}

dss-framework/dss-framework-workspace-server/src/main/java/com/webank/wedatasphere/dss/framework/workspace/restful/DSSWorkspaceRestful.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@
1818

1919
import com.webank.wedatasphere.dss.common.auditlog.OperateTypeEnum;
2020
import com.webank.wedatasphere.dss.common.auditlog.TargetTypeEnum;
21+
import com.webank.wedatasphere.dss.common.entity.NoticeContent;
2122
import com.webank.wedatasphere.dss.common.exception.DSSErrorException;
23+
import com.webank.wedatasphere.dss.common.service.NoticeService;
2224
import com.webank.wedatasphere.dss.common.utils.AuditLogUtils;
2325
import com.webank.wedatasphere.dss.common.utils.DSSCommonUtils;
2426
import com.webank.wedatasphere.dss.framework.admin.service.DssAdminUserService;
25-
import com.webank.wedatasphere.dss.framework.common.exception.DSSFrameworkErrorException;
2627
import com.webank.wedatasphere.dss.framework.workspace.bean.DSSWorkspace;
2728
import com.webank.wedatasphere.dss.framework.workspace.bean.dto.response.WorkspaceFavoriteVo;
2829
import com.webank.wedatasphere.dss.framework.workspace.bean.dto.response.WorkspaceMenuVo;
@@ -73,6 +74,9 @@ public class DSSWorkspaceRestful {
7374
@Autowired
7475
private HttpServletResponse httpServletResponse;
7576

77+
@Autowired
78+
private NoticeService noticeService;
79+
7680
@RequestMapping(path = "createWorkspace", method = RequestMethod.POST)
7781
public Message createWorkspace(@RequestBody CreateWorkspaceRequest createWorkspaceRequest) throws ErrorException {
7882
String userName = SecurityFilter.getLoginUsername(httpServletRequest);
@@ -332,6 +336,11 @@ public Message deleteFavorite(@PathVariable("workspaceId") Long workspaceId, @Pa
332336
return Message.ok().data("favoriteId", favoriteId);
333337
}
334338

339+
@GetMapping("getNotice")
340+
public Message getNotice(){
341+
List<NoticeContent> noticeContent= noticeService.getNoticeContent();
342+
return Message.ok("公告获取成功").data("notices", noticeContent);
343+
}
335344

336345
}
337346

pom.xml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@
3939
<module>plugins/dolphinscheduler</module>
4040
</modules>
4141

42-
<repositories>
43-
<repository>
44-
<id>apache.snapshots</id>
45-
<name>Apache Snapshot Repository</name>
46-
<url>https://repository.apache.org/content/repositories/snapshots/</url>
47-
<snapshots>
48-
<enabled>true</enabled>
49-
</snapshots>
50-
</repository>
51-
</repositories>
42+
<!-- <repositories>-->
43+
<!-- <repository>-->
44+
<!-- <id>apache.snapshots</id>-->
45+
<!-- <name>Apache Snapshot Repository</name>-->
46+
<!-- <url>https://repository.apache.org/content/repositories/snapshots/</url>-->
47+
<!-- <snapshots>-->
48+
<!-- <enabled>true</enabled>-->
49+
<!-- </snapshots>-->
50+
<!-- </repository>-->
51+
<!-- </repositories>-->
5252

5353
<properties>
5454
<dss.version>1.1.2</dss.version>
@@ -73,6 +73,7 @@
7373
<commons.lang.version>2.6</commons.lang.version>
7474
<xstream.version>1.4.19</xstream.version>
7575
<jersey.version>2.30.1</jersey.version>
76+
<spring.native.version>0.10.2</spring.native.version>
7677
</properties>
7778

7879
<dependencyManagement>
@@ -127,6 +128,7 @@
127128
<groupId>com.thoughtworks.xstream</groupId>
128129
<version>${xstream.version}</version>
129130
</dependency>
131+
130132
</dependencies>
131133
</dependencyManagement>
132134
<build>

0 commit comments

Comments
 (0)