Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
T
tanpu-community
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
探普后端
tanpu-community
Commits
31325531
Commit
31325531
authored
Jul 22, 2021
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除无用方法
parent
3fdd9bb1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2 additions
and
237 deletions
+2
-237
HomePageEntity.java
.../tanpu/community/dao/entity/community/HomePageEntity.java
+0
-155
HomePageMapper.java
.../tanpu/community/dao/mapper/community/HomePageMapper.java
+0
-16
HomePageService.java
...ain/java/com/tanpu/community/service/HomePageService.java
+0
-45
RankService.java
...rc/main/java/com/tanpu/community/service/RankService.java
+2
-2
HomePageEntityMapper.xml
.../main/resources/mapper/community/HomePageEntityMapper.xml
+0
-19
No files found.
community-service/src/main/java/com/tanpu/community/dao/entity/community/HomePageEntity.java
deleted
100644 → 0
View file @
3fdd9bb1
package
com
.
tanpu
.
community
.
dao
.
entity
.
community
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.NoArgsConstructor
;
/**
* <p>
* 个人主页
* </p>
*
* @author xudong
* @since 2021-07-22
*/
@TableName
(
"home_page"
)
@ApiModel
(
value
=
"HomePageEntity对象"
,
description
=
"个人主页"
)
@Builder
@AllArgsConstructor
@NoArgsConstructor
public
class
HomePageEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"id"
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
@ApiModelProperty
(
value
=
"用户id"
)
private
String
userId
;
@ApiModelProperty
(
value
=
"头像url"
)
private
String
headImg
;
@ApiModelProperty
(
value
=
"昵称"
)
private
String
nickName
;
@ApiModelProperty
(
value
=
"个人简介"
)
private
String
introduction
;
@ApiModelProperty
(
value
=
"性别"
)
private
Integer
sex
;
@ApiModelProperty
(
value
=
"地址"
)
private
String
location
;
private
LocalDateTime
createTime
;
private
LocalDateTime
updateTime
;
private
Integer
deleteTag
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
String
userId
)
{
this
.
userId
=
userId
;
}
public
String
getHeadImg
()
{
return
headImg
;
}
public
void
setHeadImg
(
String
headImg
)
{
this
.
headImg
=
headImg
;
}
public
String
getNickName
()
{
return
nickName
;
}
public
void
setNickName
(
String
nickName
)
{
this
.
nickName
=
nickName
;
}
public
String
getIntroduction
()
{
return
introduction
;
}
public
void
setIntroduction
(
String
introduction
)
{
this
.
introduction
=
introduction
;
}
public
Integer
getSex
()
{
return
sex
;
}
public
void
setSex
(
Integer
sex
)
{
this
.
sex
=
sex
;
}
public
String
getLocation
()
{
return
location
;
}
public
void
setLocation
(
String
location
)
{
this
.
location
=
location
;
}
public
LocalDateTime
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
LocalDateTime
createTime
)
{
this
.
createTime
=
createTime
;
}
public
LocalDateTime
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
LocalDateTime
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getDeleteTag
()
{
return
deleteTag
;
}
public
void
setDeleteTag
(
Integer
deleteTag
)
{
this
.
deleteTag
=
deleteTag
;
}
@Override
public
String
toString
()
{
return
"HomePageEntity{"
+
"id="
+
id
+
", userId="
+
userId
+
", headImg="
+
headImg
+
", nickName="
+
nickName
+
", introduction="
+
introduction
+
", sex="
+
sex
+
", location="
+
location
+
", createTime="
+
createTime
+
", updateTime="
+
updateTime
+
", deleteTag="
+
deleteTag
+
"}"
;
}
}
community-service/src/main/java/com/tanpu/community/dao/mapper/community/HomePageMapper.java
deleted
100644 → 0
View file @
3fdd9bb1
package
com
.
tanpu
.
community
.
dao
.
mapper
.
community
;
import
com.tanpu.community.dao.entity.community.HomePageEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
* 个人主页 Mapper 接口
* </p>
*
* @author xudong
* @since 2021-07-22
*/
public
interface
HomePageMapper
extends
BaseMapper
<
HomePageEntity
>
{
}
community-service/src/main/java/com/tanpu/community/service/HomePageService.java
deleted
100644 → 0
View file @
3fdd9bb1
package
com
.
tanpu
.
community
.
service
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.tanpu.community.api.enums.DeleteTagEnum
;
import
com.tanpu.community.dao.entity.community.HomePageEntity
;
import
com.tanpu.community.dao.mapper.community.HomePageMapper
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.Collections
;
import
java.util.List
;
@Service
public
class
HomePageService
{
@Resource
private
HomePageMapper
homePageMapper
;
public
HomePageEntity
selectByUserId
(
String
userId
)
{
return
homePageMapper
.
selectOne
(
new
LambdaQueryWrapper
<
HomePageEntity
>()
.
eq
(
HomePageEntity:
:
getUserId
,
userId
)
.
eq
(
HomePageEntity:
:
getDeleteTag
,
DeleteTagEnum
.
NOT_DELETED
.
getCode
()));
}
public
List
<
HomePageEntity
>
selectListByUserIds
(
List
<
String
>
userIds
)
{
if
(
CollectionUtils
.
isEmpty
(
userIds
))
{
return
Collections
.
emptyList
();
}
return
homePageMapper
.
selectList
(
new
LambdaQueryWrapper
<
HomePageEntity
>()
.
eq
(
HomePageEntity:
:
getDeleteTag
,
DeleteTagEnum
.
NOT_DELETED
.
getCode
())
.
in
(
HomePageEntity:
:
getUserId
,
userIds
));
}
public
void
update
(
HomePageEntity
entity
)
{
homePageMapper
.
updateById
(
entity
);
}
public
void
insert
(
HomePageEntity
entity
)
{
homePageMapper
.
insert
(
entity
);
}
}
community-service/src/main/java/com/tanpu/community/service/RankService.java
View file @
31325531
...
...
@@ -118,7 +118,7 @@ public class RankService {
if
(
this
.
rankTopicList
.
size
()==
0
){
rankTopics
();
}
List
<
TopicRankQo
>
matchTopic
=
this
.
rankTopicList
.
stream
().
filter
(
o
->
o
.
getTopicId
().
equals
(
topicId
)).
limit
(
1
).
collect
(
Collectors
.
toList
());
List
<
TopicRankQo
>
matchTopic
=
this
.
rankTopicList
.
stream
().
filter
(
o
->
topicId
.
equals
(
o
.
getTopicId
()
)).
limit
(
1
).
collect
(
Collectors
.
toList
());
matchTopic
.
add
(
new
TopicRankQo
());
return
matchTopic
.
get
(
0
);
}
...
...
@@ -149,6 +149,6 @@ public class RankService {
if
(
this
.
rankThemeList
.
size
()==
0
){
this
.
rankThemes
();
}
return
rankThemeList
.
stream
().
filter
(
o
->
o
.
getTopicId
().
equals
(
topicId
)).
collect
(
Collectors
.
toList
());
return
rankThemeList
.
stream
().
filter
(
o
->
topicId
.
equals
(
o
.
getTopicId
()
)).
collect
(
Collectors
.
toList
());
}
}
community-service/src/main/resources/mapper/community/HomePageEntityMapper.xml
deleted
100644 → 0
View file @
3fdd9bb1
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.tanpu.community.dao.mapper.community.HomePageMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.tanpu.community.dao.entity.community.HomePageEntity"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"user_id"
property=
"userId"
/>
<result
column=
"head_img"
property=
"headImg"
/>
<result
column=
"nick_name"
property=
"nickName"
/>
<result
column=
"introduction"
property=
"introduction"
/>
<result
column=
"sex"
property=
"sex"
/>
<result
column=
"location"
property=
"location"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"delete_tag"
property=
"deleteTag"
/>
</resultMap>
</mapper>
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