Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beyond-clouds
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
段启岩
beyond-clouds
Commits
0043994e
Commit
0043994e
authored
Jan 31, 2020
by
段启岩
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/humingsen'
parents
c9cd4ffe
45eefffe
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
24 deletions
+5
-24
src/main/java/cn/meteor/beyondclouds/modules/topic/api/TopicApi.java
+1
-1
src/main/java/cn/meteor/beyondclouds/modules/topic/form/CreateTopicForm.java
+0
-12
src/main/java/cn/meteor/beyondclouds/modules/topic/service/ITopicService.java
+2
-6
src/main/java/cn/meteor/beyondclouds/modules/topic/service/impl/TopicServiceImpl.java
+2
-5
No files found.
src/main/java/cn/meteor/beyondclouds/modules/topic/api/TopicApi.java
View file @
0043994e
...
@@ -41,7 +41,7 @@ public class TopicApi {
...
@@ -41,7 +41,7 @@ public class TopicApi {
@PostMapping
(
"/topic"
)
@PostMapping
(
"/topic"
)
public
Response
createTopic
(
@RequestBody
@Valid
CreateTopicForm
createTopicForm
,
@CurrentSubject
Subject
subject
){
public
Response
createTopic
(
@RequestBody
@Valid
CreateTopicForm
createTopicForm
,
@CurrentSubject
Subject
subject
){
iTopicService
.
createTopic
(
String
.
valueOf
(
subject
.
getId
()),
createTopicForm
.
getTopicName
()
,
createTopicForm
.
getTopicIcon
(),
createTopicForm
.
getCover
(),
createTopicForm
.
getTopicDescrption
(),
createTopicForm
.
getReferenceCount
()
);
iTopicService
.
createTopic
(
String
.
valueOf
(
subject
.
getId
()),
createTopicForm
.
getTopicName
());
return
Response
.
success
();
return
Response
.
success
();
}
}
...
...
src/main/java/cn/meteor/beyondclouds/modules/topic/form/CreateTopicForm.java
View file @
0043994e
...
@@ -18,16 +18,4 @@ public class CreateTopicForm {
...
@@ -18,16 +18,4 @@ public class CreateTopicForm {
@NotEmpty
(
message
=
"话题名称不能为空"
)
@NotEmpty
(
message
=
"话题名称不能为空"
)
private
String
topicName
;
private
String
topicName
;
@ApiModelProperty
(
"话题图标"
)
private
String
topicIcon
;
@ApiModelProperty
(
"封面图"
)
private
String
cover
;
@ApiModelProperty
(
"话题描述"
)
private
String
topicDescrption
;
@ApiModelProperty
(
"话题被引用的次数"
)
private
int
referenceCount
;
}
}
src/main/java/cn/meteor/beyondclouds/modules/topic/service/ITopicService.java
View file @
0043994e
...
@@ -16,14 +16,10 @@ public interface ITopicService extends IService<Topic> {
...
@@ -16,14 +16,10 @@ public interface ITopicService extends IService<Topic> {
/**
/**
* 创建话题
* 创建话题
* @param
i
d
* @param
userI
d
* @param topicName
* @param topicName
* @param topicIcon
* @param cover
* @param topicDescrption
* @param referenceCount
*/
*/
void
createTopic
(
String
id
,
String
topicName
,
String
topicIcon
,
String
cover
,
String
topicDescrption
,
int
referenceCount
);
void
createTopic
(
String
userId
,
String
topicName
);
/**
/**
* 检索话题
* 检索话题
...
...
src/main/java/cn/meteor/beyondclouds/modules/topic/service/impl/TopicServiceImpl.java
View file @
0043994e
...
@@ -35,15 +35,12 @@ public class TopicServiceImpl extends ServiceImpl<TopicMapper, Topic> implements
...
@@ -35,15 +35,12 @@ public class TopicServiceImpl extends ServiceImpl<TopicMapper, Topic> implements
}
}
@Override
@Override
public
void
createTopic
(
String
id
,
String
topicName
,
String
topicIcon
,
String
cover
,
String
topicDescrption
,
int
referenceCount
)
{
public
void
createTopic
(
String
userId
,
String
topicName
)
{
//1. 创建话题
//1. 创建话题
Topic
topic
=
new
Topic
();
Topic
topic
=
new
Topic
();
topic
.
setUserId
(
i
d
);
topic
.
setUserId
(
userI
d
);
topic
.
setTopicName
(
topicName
);
topic
.
setTopicName
(
topicName
);
topic
.
setTopicIcon
(
topicIcon
);
topic
.
setCover
(
cover
);
topic
.
setTopicDescrption
(
topicDescrption
);
iTopicService
.
save
(
topic
);
iTopicService
.
save
(
topic
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment