Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Kwan的解忧杂货铺@新空间代码工作室
SpringBoot-kwan
提交
fcafd617
S
SpringBoot-kwan
项目概览
Kwan的解忧杂货铺@新空间代码工作室
/
SpringBoot-kwan
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SpringBoot-kwan
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
fcafd617
编写于
10月 29, 2023
作者:
Kwan的解忧杂货铺@新空间代码工作室
🐭
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:优化代码
上级
cf38da15
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
88 addition
and
66 deletion
+88
-66
README.md
README.md
+1
-1
src/main/java/com/kwan/springbootkwan/constant/CsdnConstant.java
...n/java/com/kwan/springbootkwan/constant/CsdnConstant.java
+16
-0
src/main/java/com/kwan/springbootkwan/controller/CsdnArticleInfoController.java
.../springbootkwan/controller/CsdnArticleInfoController.java
+2
-5
src/main/java/com/kwan/springbootkwan/controller/CsdnController.java
...va/com/kwan/springbootkwan/controller/CsdnController.java
+2
-9
src/main/java/com/kwan/springbootkwan/service/CsdnUserInfoService.java
.../com/kwan/springbootkwan/service/CsdnUserInfoService.java
+21
-0
src/main/java/com/kwan/springbootkwan/service/impl/CsdnAutoReplyServiceImpl.java
...springbootkwan/service/impl/CsdnAutoReplyServiceImpl.java
+1
-5
src/main/java/com/kwan/springbootkwan/service/impl/CsdnServiceImpl.java
...com/kwan/springbootkwan/service/impl/CsdnServiceImpl.java
+3
-6
src/main/java/com/kwan/springbootkwan/service/impl/CsdnUserInfoServiceImpl.java
.../springbootkwan/service/impl/CsdnUserInfoServiceImpl.java
+42
-40
未找到文件。
README.md
浏览文件 @
fcafd617
## 一.说明
## 一.说明
主要是SpringBoot学习
主要是SpringBoot学习
,一键部署
### 二.主要集成
### 二.主要集成
...
...
src/main/java/com/kwan/springbootkwan/constant/CsdnConstant.java
0 → 100644
浏览文件 @
fcafd617
package
com.kwan.springbootkwan.constant
;
/**
* csdn常量管理
*
* @author : qinyingjie
* @version : 2.2.0
* @date : 2023/10/29 10:12
*/
public
class
CsdnConstant
{
/**
* 文章类型
*/
public
static
final
String
ARTICLE_TYPE
=
"blog"
;
}
src/main/java/com/kwan/springbootkwan/controller/CsdnArticleInfoController.java
浏览文件 @
fcafd617
...
@@ -142,15 +142,12 @@ public class CsdnArticleInfoController {
...
@@ -142,15 +142,12 @@ public class CsdnArticleInfoController {
final
CsdnArticleInfo
one
=
this
.
csdnArticleInfoService
.
getOne
(
wrapper
);
final
CsdnArticleInfo
one
=
this
.
csdnArticleInfoService
.
getOne
(
wrapper
);
if
(
one
!=
null
)
{
if
(
one
!=
null
)
{
final
String
userName
=
one
.
getUserName
();
final
String
userName
=
one
.
getUserName
();
QueryWrapper
<
CsdnUserInfo
>
wrapperUser
=
new
QueryWrapper
<>();
CsdnUserInfo
csdnUserInfo
=
csdnUserInfoService
.
getUserByUserName
(
userName
);
wrapperUser
.
eq
(
"user_name"
,
userName
);
wrapperUser
.
eq
(
"is_delete"
,
0
);
final
CsdnUserInfo
userInfo
=
this
.
csdnUserInfoService
.
getOne
(
wrapperUser
);
BusinessInfoResponse
.
ArticleData
.
Article
article
=
new
BusinessInfoResponse
.
ArticleData
.
Article
();
BusinessInfoResponse
.
ArticleData
.
Article
article
=
new
BusinessInfoResponse
.
ArticleData
.
Article
();
article
.
setDescription
(
one
.
getArticleDescription
());
article
.
setDescription
(
one
.
getArticleDescription
());
article
.
setTitle
(
one
.
getArticleTitle
());
article
.
setTitle
(
one
.
getArticleTitle
());
article
.
setUrl
(
one
.
getArticleUrl
());
article
.
setUrl
(
one
.
getArticleUrl
());
csdnService
.
tripletByArticle
(
u
serInfo
,
article
,
one
);
csdnService
.
tripletByArticle
(
csdnU
serInfo
,
article
,
one
);
}
}
return
Result
.
ok
(
"单篇文章三连完成"
);
return
Result
.
ok
(
"单篇文章三连完成"
);
}
}
...
...
src/main/java/com/kwan/springbootkwan/controller/CsdnController.java
浏览文件 @
fcafd617
package
com.kwan.springbootkwan.controller
;
package
com.kwan.springbootkwan.controller
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.kwan.springbootkwan.entity.CsdnUserInfo
;
import
com.kwan.springbootkwan.entity.CsdnUserInfo
;
import
com.kwan.springbootkwan.entity.Result
;
import
com.kwan.springbootkwan.entity.Result
;
import
com.kwan.springbootkwan.service.CsdnAutoReplyService
;
import
com.kwan.springbootkwan.service.CsdnAutoReplyService
;
...
@@ -33,10 +32,7 @@ public class CsdnController {
...
@@ -33,10 +32,7 @@ public class CsdnController {
@ApiOperation
(
value
=
"单人三连"
,
nickname
=
"单人三连"
)
@ApiOperation
(
value
=
"单人三连"
,
nickname
=
"单人三连"
)
@GetMapping
(
"/singleTriplet"
)
@GetMapping
(
"/singleTriplet"
)
public
Result
singleTriplet
(
@Param
(
"username"
)
String
username
)
{
public
Result
singleTriplet
(
@Param
(
"username"
)
String
username
)
{
QueryWrapper
<
CsdnUserInfo
>
wrapper
=
new
QueryWrapper
<>();
CsdnUserInfo
csdnUserInfo
=
csdnUserInfoService
.
getUserByUserName
(
username
);
wrapper
.
eq
(
"is_delete"
,
0
);
wrapper
.
eq
(
"user_name"
,
username
).
last
(
"limit 1"
);
final
CsdnUserInfo
csdnUserInfo
=
csdnUserInfoService
.
getOne
(
wrapper
);
if
(
Objects
.
nonNull
(
csdnUserInfo
))
{
if
(
Objects
.
nonNull
(
csdnUserInfo
))
{
csdnService
.
singleArticle
(
csdnUserInfo
);
csdnService
.
singleArticle
(
csdnUserInfo
);
}
}
...
@@ -67,10 +63,7 @@ public class CsdnController {
...
@@ -67,10 +63,7 @@ public class CsdnController {
@ApiOperation
(
value
=
"重置指定人员新博客状态"
,
nickname
=
"重置指定人员新博客状态"
)
@ApiOperation
(
value
=
"重置指定人员新博客状态"
,
nickname
=
"重置指定人员新博客状态"
)
@GetMapping
(
"/resetCsdnUserInfo"
)
@GetMapping
(
"/resetCsdnUserInfo"
)
public
Result
resetCsdnUserInfo
(
@Param
(
"username"
)
String
username
)
{
public
Result
resetCsdnUserInfo
(
@Param
(
"username"
)
String
username
)
{
QueryWrapper
<
CsdnUserInfo
>
wrapper
=
new
QueryWrapper
<>();
CsdnUserInfo
csdnUserInfo
=
csdnUserInfoService
.
getUserByUserName
(
username
);
wrapper
.
eq
(
"is_delete"
,
0
);
wrapper
.
eq
(
"user_name"
,
username
).
last
(
"limit 1"
);
final
CsdnUserInfo
csdnUserInfo
=
csdnUserInfoService
.
getOne
(
wrapper
);
if
(
Objects
.
nonNull
(
csdnUserInfo
))
{
if
(
Objects
.
nonNull
(
csdnUserInfo
))
{
csdnUserInfoService
.
resetCsdnUserInfo
(
csdnUserInfo
);
csdnUserInfoService
.
resetCsdnUserInfo
(
csdnUserInfo
);
}
}
...
...
src/main/java/com/kwan/springbootkwan/service/CsdnUserInfoService.java
浏览文件 @
fcafd617
...
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
com.kwan.springbootkwan.entity.CsdnUserInfo
;
import
com.kwan.springbootkwan.entity.CsdnUserInfo
;
import
com.kwan.springbootkwan.entity.query.CsdnUserInfoQuery
;
import
com.kwan.springbootkwan.entity.query.CsdnUserInfoQuery
;
import
java.util.List
;
/**
/**
* csdn用户信息(CsdnUserInfo)表服务接口
* csdn用户信息(CsdnUserInfo)表服务接口
*
*
...
@@ -11,6 +13,23 @@ import com.kwan.springbootkwan.entity.query.CsdnUserInfoQuery;
...
@@ -11,6 +13,23 @@ import com.kwan.springbootkwan.entity.query.CsdnUserInfoQuery;
* @since 2023-10-23 16:03:14
* @since 2023-10-23 16:03:14
*/
*/
public
interface
CsdnUserInfoService
extends
IService
<
CsdnUserInfo
>
{
public
interface
CsdnUserInfoService
extends
IService
<
CsdnUserInfo
>
{
/**
* 通过用户名获取user信息
*
* @return
*/
CsdnUserInfo
getUserByUserName
(
String
username
);
/**
* 通过用户名获取user信息
*
* @return
*/
List
<
CsdnUserInfo
>
getAllUser
();
/**
/**
* 重置新文章的状态
* 重置新文章的状态
*/
*/
...
@@ -20,6 +39,7 @@ public interface CsdnUserInfoService extends IService<CsdnUserInfo> {
...
@@ -20,6 +39,7 @@ public interface CsdnUserInfoService extends IService<CsdnUserInfo> {
* 重置新一天的状态
* 重置新一天的状态
*/
*/
void
resetUserDayStatus
();
void
resetUserDayStatus
();
/**
/**
* 重置某个人某一天的状态
* 重置某个人某一天的状态
*
*
...
@@ -29,6 +49,7 @@ public interface CsdnUserInfoService extends IService<CsdnUserInfo> {
...
@@ -29,6 +49,7 @@ public interface CsdnUserInfoService extends IService<CsdnUserInfo> {
/**
/**
* 新增用户
* 新增用户
*
* @param addInfo
* @param addInfo
*/
*/
void
add
(
CsdnUserInfoQuery
addInfo
);
void
add
(
CsdnUserInfoQuery
addInfo
);
...
...
src/main/java/com/kwan/springbootkwan/service/impl/CsdnAutoReplyServiceImpl.java
浏览文件 @
fcafd617
...
@@ -3,7 +3,6 @@ package com.kwan.springbootkwan.service.impl;
...
@@ -3,7 +3,6 @@ package com.kwan.springbootkwan.service.impl;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.http.HttpResponse
;
import
cn.hutool.http.HttpResponse
;
import
cn.hutool.http.HttpUtil
;
import
cn.hutool.http.HttpUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.kwan.springbootkwan.entity.CsdnUserInfo
;
import
com.kwan.springbootkwan.entity.CsdnUserInfo
;
...
@@ -93,10 +92,7 @@ public class CsdnAutoReplyServiceImpl implements CsdnAutoReplyService {
...
@@ -93,10 +92,7 @@ public class CsdnAutoReplyServiceImpl implements CsdnAutoReplyService {
log
.
info
(
reply
.
toString
());
log
.
info
(
reply
.
toString
());
}
}
//三连此评论人
//三连此评论人
QueryWrapper
<
CsdnUserInfo
>
wrapper
=
new
QueryWrapper
<>();
CsdnUserInfo
csdnUserInfo
=
csdnUserInfoService
.
getUserByUserName
(
userName
);
wrapper
.
eq
(
"is_delete"
,
0
);
wrapper
.
eq
(
"user_name"
,
userName
).
last
(
"limit 1"
);
CsdnUserInfo
csdnUserInfo
=
csdnUserInfoService
.
getOne
(
wrapper
);
if
(
Objects
.
isNull
(
csdnUserInfo
))
{
if
(
Objects
.
isNull
(
csdnUserInfo
))
{
//新增用户
//新增用户
csdnUserInfo
=
new
CsdnUserInfo
();
csdnUserInfo
=
new
CsdnUserInfo
();
...
...
src/main/java/com/kwan/springbootkwan/service/impl/CsdnServiceImpl.java
浏览文件 @
fcafd617
...
@@ -135,12 +135,9 @@ public class CsdnServiceImpl implements CsdnService {
...
@@ -135,12 +135,9 @@ public class CsdnServiceImpl implements CsdnService {
@Override
@Override
public
void
multiTriplet
()
{
public
void
multiTriplet
()
{
QueryWrapper
<
CsdnUserInfo
>
wrapper
=
new
QueryWrapper
<>();
final
List
<
CsdnUserInfo
>
allUser
=
csdnUserInfoService
.
getAllUser
();
wrapper
.
eq
(
"is_delete"
,
0
);
if
(
CollectionUtil
.
isNotEmpty
(
allUser
))
{
wrapper
.
orderByDesc
(
"user_weight"
);
for
(
CsdnUserInfo
csdnUserInfo
:
allUser
)
{
final
List
<
CsdnUserInfo
>
list
=
csdnUserInfoService
.
list
(
wrapper
);
if
(
CollectionUtil
.
isNotEmpty
(
list
))
{
for
(
CsdnUserInfo
csdnUserInfo
:
list
)
{
singleArticle
(
csdnUserInfo
);
singleArticle
(
csdnUserInfo
);
}
}
}
}
...
...
src/main/java/com/kwan/springbootkwan/service/impl/CsdnUserInfoServiceImpl.java
浏览文件 @
fcafd617
...
@@ -3,6 +3,7 @@ package com.kwan.springbootkwan.service.impl;
...
@@ -3,6 +3,7 @@ package com.kwan.springbootkwan.service.impl;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.kwan.springbootkwan.constant.CsdnConstant
;
import
com.kwan.springbootkwan.entity.CsdnUserInfo
;
import
com.kwan.springbootkwan.entity.CsdnUserInfo
;
import
com.kwan.springbootkwan.entity.query.CsdnUserInfoQuery
;
import
com.kwan.springbootkwan.entity.query.CsdnUserInfoQuery
;
import
com.kwan.springbootkwan.entity.resp.BusinessInfoResponse
;
import
com.kwan.springbootkwan.entity.resp.BusinessInfoResponse
;
...
@@ -28,20 +29,33 @@ import java.util.List;
...
@@ -28,20 +29,33 @@ import java.util.List;
*/
*/
@Service
(
"csdnUserInfoService"
)
@Service
(
"csdnUserInfoService"
)
public
class
CsdnUserInfoServiceImpl
extends
ServiceImpl
<
CsdnUserInfoMapper
,
CsdnUserInfo
>
implements
CsdnUserInfoService
{
public
class
CsdnUserInfoServiceImpl
extends
ServiceImpl
<
CsdnUserInfoMapper
,
CsdnUserInfo
>
implements
CsdnUserInfoService
{
@Autowired
@Autowired
private
CsdnCollectService
csdnCollectService
;
private
CsdnCollectService
csdnCollectService
;
@Autowired
@Autowired
private
CsdnArticleInfoService
csdnArticleInfoService
;
private
CsdnArticleInfoService
csdnArticleInfoService
;
@Override
@Override
public
void
resetAllCurrentStatus
()
{
public
CsdnUserInfo
getUserByUserName
(
String
username
)
{
QueryWrapper
<
CsdnUserInfo
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
"is_delete"
,
0
);
wrapper
.
eq
(
"user_name"
,
username
)
.
last
(
"limit 1"
);
return
this
.
getOne
(
wrapper
);
}
@Override
public
List
<
CsdnUserInfo
>
getAllUser
()
{
QueryWrapper
<
CsdnUserInfo
>
wrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
CsdnUserInfo
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
"is_delete"
,
0
);
wrapper
.
eq
(
"is_delete"
,
0
);
final
List
<
CsdnUserInfo
>
list
=
this
.
list
(
wrapper
);
wrapper
.
orderByAsc
(
"rand()"
);
if
(
CollectionUtil
.
isNotEmpty
(
list
))
{
return
this
.
list
(
wrapper
);
for
(
CsdnUserInfo
csdnUserInfo
:
list
)
{
}
@Override
public
void
resetAllCurrentStatus
()
{
final
List
<
CsdnUserInfo
>
allUser
=
this
.
getAllUser
();
if
(
CollectionUtil
.
isNotEmpty
(
allUser
))
{
for
(
CsdnUserInfo
csdnUserInfo
:
allUser
)
{
this
.
resetCsdnUserInfo
(
csdnUserInfo
);
this
.
resetCsdnUserInfo
(
csdnUserInfo
);
}
}
}
}
...
@@ -49,16 +63,15 @@ public class CsdnUserInfoServiceImpl extends ServiceImpl<CsdnUserInfoMapper, Csd
...
@@ -49,16 +63,15 @@ public class CsdnUserInfoServiceImpl extends ServiceImpl<CsdnUserInfoMapper, Csd
@Override
@Override
public
void
resetCsdnUserInfo
(
CsdnUserInfo
csdnUserInfo
)
{
public
void
resetCsdnUserInfo
(
CsdnUserInfo
csdnUserInfo
)
{
final
String
userName
=
csdnUserInfo
.
getUserName
();
final
Integer
commentStatus
=
csdnUserInfo
.
getCommentStatus
();
final
Integer
commentStatus
=
csdnUserInfo
.
getCommentStatus
();
final
String
userName
=
csdnUserInfo
.
getUserName
();
final
String
articleType
=
csdnUserInfo
.
getArticleType
();
final
String
articleType
=
csdnUserInfo
.
getArticleType
();
final
List
<
BusinessInfoResponse
.
ArticleData
.
Article
>
articles
=
csdnArticleInfoService
.
getArticles
(
userName
);
final
List
<
BusinessInfoResponse
.
ArticleData
.
Article
>
articles
=
csdnArticleInfoService
.
getArticles
(
userName
);
if
(
CollectionUtil
.
isNotEmpty
(
articles
))
{
if
(
CollectionUtil
.
isNotEmpty
(
articles
))
{
final
BusinessInfoResponse
.
ArticleData
.
Article
article
=
articles
.
get
(
0
);
final
BusinessInfoResponse
.
ArticleData
.
Article
article
=
articles
.
get
(
0
);
final
String
type
=
article
.
getType
();
final
String
type
=
article
.
getType
();
if
(
StringUtils
.
equals
(
type
,
"blog"
))
{
if
(
StringUtils
.
equals
(
type
,
CsdnConstant
.
ARTICLE_TYPE
))
{
final
String
urlInfo
=
article
.
getUrl
();
final
String
articleId
=
article
.
getArticleId
().
toString
();
String
articleId
=
urlInfo
.
substring
(
urlInfo
.
lastIndexOf
(
"/"
)
+
1
);
final
Boolean
collect
=
csdnCollectService
.
isCollect
(
articleId
,
csdnUserInfo
);
final
Boolean
collect
=
csdnCollectService
.
isCollect
(
articleId
,
csdnUserInfo
);
if
(!
collect
||
CommentStatus
.
COMMENT_TOO_FAST
.
getCode
().
equals
(
commentStatus
)
||
!
StringUtils
.
equals
(
articleType
,
type
))
{
if
(!
collect
||
CommentStatus
.
COMMENT_TOO_FAST
.
getCode
().
equals
(
commentStatus
)
||
!
StringUtils
.
equals
(
articleType
,
type
))
{
csdnUserInfo
.
setLikeStatus
(
LikeStatus
.
UN_PROCESSED
.
getCode
());
csdnUserInfo
.
setLikeStatus
(
LikeStatus
.
UN_PROCESSED
.
getCode
());
...
@@ -88,44 +101,35 @@ public class CsdnUserInfoServiceImpl extends ServiceImpl<CsdnUserInfoMapper, Csd
...
@@ -88,44 +101,35 @@ public class CsdnUserInfoServiceImpl extends ServiceImpl<CsdnUserInfoMapper, Csd
for
(
String
str
:
split
)
{
for
(
String
str
:
split
)
{
str
=
str
.
trim
();
str
=
str
.
trim
();
if
(
StringUtils
.
isNotEmpty
(
str
))
{
if
(
StringUtils
.
isNotEmpty
(
str
))
{
CsdnUserInfo
csdnUserInfo
=
this
.
getUserByUserName
(
str
);
QueryWrapper
<
CsdnUserInfo
>
wrapper
=
new
QueryWrapper
<>();
if
(
csdnUserInfo
==
null
)
{
wrapper
.
eq
(
"user_name"
,
str
);
csdnUserInfo
=
new
CsdnUserInfo
();
wrapper
.
eq
(
"is_delete"
,
0
);
BeanUtils
.
copyProperties
(
addInfo
,
csdnUserInfo
);
CsdnUserInfo
one
=
this
.
getOne
(
wrapper
);
csdnUserInfo
.
setUserName
(
str
);
if
(
one
==
null
)
{
csdnUserInfo
.
setUserHomeUrl
(
"https://blog.csdn.net/"
+
str
);
one
=
new
CsdnUserInfo
();
this
.
save
(
csdnUserInfo
);
BeanUtils
.
copyProperties
(
addInfo
,
one
);
one
.
setUserName
(
str
);
one
.
setUserHomeUrl
(
"https://blog.csdn.net/"
+
str
);
this
.
save
(
one
);
}
}
addInfo
.
setNickName
(
one
.
getNickName
());
addInfo
.
setNickName
(
csdnUserInfo
.
getNickName
());
}
}
}
}
}
else
{
}
else
{
QueryWrapper
<
CsdnUserInfo
>
wrapper
=
new
QueryWrapper
<>();
CsdnUserInfo
csdnUserInfo
=
this
.
getUserByUserName
(
userName
);
wrapper
.
eq
(
"user_name"
,
userName
);
if
(
csdnUserInfo
==
null
)
{
wrapper
.
eq
(
"is_delete"
,
0
);
csdnUserInfo
=
new
CsdnUserInfo
();
CsdnUserInfo
one
=
this
.
getOne
(
wrapper
);
BeanUtils
.
copyProperties
(
addInfo
,
csdnUserInfo
);
if
(
one
==
null
)
{
csdnUserInfo
.
setUserHomeUrl
(
"https://blog.csdn.net/"
+
userName
);
one
=
new
CsdnUserInfo
();
this
.
save
(
csdnUserInfo
);
BeanUtils
.
copyProperties
(
addInfo
,
one
);
one
.
setUserHomeUrl
(
"https://blog.csdn.net/"
+
userName
);
this
.
save
(
one
);
}
}
addInfo
.
setNickName
(
one
.
getNickName
());
addInfo
.
setNickName
(
csdnUserInfo
.
getNickName
());
}
}
}
}
}
}
@Override
@Override
public
void
resetUserDayStatus
()
{
public
void
resetUserDayStatus
()
{
QueryWrapper
<
CsdnUserInfo
>
wrapper
=
new
QueryWrapper
<>();
final
List
<
CsdnUserInfo
>
allUser
=
this
.
getAllUser
();
wrapper
.
eq
(
"is_delete"
,
0
);
if
(
CollectionUtil
.
isNotEmpty
(
allUser
))
{
final
List
<
CsdnUserInfo
>
list
=
this
.
list
(
wrapper
);
for
(
CsdnUserInfo
csdnUserInfo
:
allUser
)
{
if
(
CollectionUtil
.
isNotEmpty
(
list
))
{
for
(
CsdnUserInfo
csdnUserInfo
:
list
)
{
final
String
userName
=
csdnUserInfo
.
getUserName
();
final
String
userName
=
csdnUserInfo
.
getUserName
();
final
List
<
BusinessInfoResponse
.
ArticleData
.
Article
>
articles
=
csdnArticleInfoService
.
getArticles
(
userName
);
final
List
<
BusinessInfoResponse
.
ArticleData
.
Article
>
articles
=
csdnArticleInfoService
.
getArticles
(
userName
);
if
(
CollectionUtil
.
isNotEmpty
(
articles
))
{
if
(
CollectionUtil
.
isNotEmpty
(
articles
))
{
...
@@ -151,6 +155,4 @@ public class CsdnUserInfoServiceImpl extends ServiceImpl<CsdnUserInfoMapper, Csd
...
@@ -151,6 +155,4 @@ public class CsdnUserInfoServiceImpl extends ServiceImpl<CsdnUserInfoMapper, Csd
}
}
}
}
}
}
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录