Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sequoia_score
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mark
sequoia_score
Commits
ae1a9b36
Commit
ae1a9b36
authored
Aug 06, 2021
by
Lem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PC首页资讯
parent
8b4d0ec0
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
155 additions
and
17 deletions
+155
-17
GetArticleListByPCResponse.java
...ive/common/domain/dto/api/GetArticleListByPCResponse.java
+27
-0
Article.java
.../src/main/java/com/live/common/domain/entity/Article.java
+3
-0
SystemConfigEnum.java
...src/main/java/com/live/common/enums/SystemConfigEnum.java
+1
-1
ArticleService.java
...src/main/java/com/live/common/service/ArticleService.java
+2
-0
ArticleServiceImpl.java
...java/com/live/common/service/impl/ArticleServiceImpl.java
+94
-4
CrawlMatchService.java
...src/main/java/com/live/job/service/CrawlMatchService.java
+1
-1
ScheduledService.java
.../src/main/java/com/live/job/service/ScheduledService.java
+3
-3
Crawl24ZBWServiceImpl.java
...java/com/live/job/service/impl/Crawl24ZBWServiceImpl.java
+4
-3
CrawlAlStatServiceImpl.java
...ava/com/live/job/service/impl/CrawlAlStatServiceImpl.java
+1
-1
CrawlSequoiaServiceImpl.java
...va/com/live/job/service/impl/CrawlSequoiaServiceImpl.java
+1
-1
CrawlSportLive360ServiceImpl.java
...m/live/job/service/impl/CrawlSportLive360ServiceImpl.java
+1
-1
CrawlUUQiuServiceImpl.java
...java/com/live/job/service/impl/CrawlUUQiuServiceImpl.java
+1
-1
IntercaptorConfig.java
...c/main/java/com/live/server/config/IntercaptorConfig.java
+3
-1
ArticleController.java
...in/java/com/live/server/controller/ArticleController.java
+13
-0
No files found.
score-common/src/main/java/com/live/common/domain/dto/api/GetArticleListByPCResponse.java
0 → 100644
View file @
ae1a9b36
package
com
.
live
.
common
.
domain
.
dto
.
api
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
GetArticleListByPCResponse
{
private
String
tagName
;
private
List
<
GetArticleListByPCInfo
>
articles
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
static
class
GetArticleListByPCInfo
{
private
Integer
id
;
private
String
title
;
}
}
score-common/src/main/java/com/live/common/domain/entity/Article.java
View file @
ae1a9b36
...
@@ -47,6 +47,9 @@ public class Article extends BaseEntity {
...
@@ -47,6 +47,9 @@ public class Article extends BaseEntity {
private
String
tagId
;
private
String
tagId
;
//0足球 1篮球
private
Integer
sportsId
;
private
int
fakeLike
;
private
int
fakeLike
;
}
}
score-common/src/main/java/com/live/common/enums/SystemConfigEnum.java
View file @
ae1a9b36
...
@@ -15,7 +15,7 @@ public enum SystemConfigEnum {
...
@@ -15,7 +15,7 @@ public enum SystemConfigEnum {
BASKETBALL_LEAGUE_RANK_COMPETITION
(
"BASKETBALL_LEAGUE_RANK_COMPETITION"
,
"篮球积分榜更新赛事"
),
BASKETBALL_LEAGUE_RANK_COMPETITION
(
"BASKETBALL_LEAGUE_RANK_COMPETITION"
,
"篮球积分榜更新赛事"
),
PC_HOME_ARTICLE
(
"PC_HOME_ARTICLE"
,
"PC首页资讯类型ID"
),
;
;
@Getter
@Getter
...
...
score-common/src/main/java/com/live/common/service/ArticleService.java
View file @
ae1a9b36
...
@@ -14,6 +14,8 @@ public interface ArticleService {
...
@@ -14,6 +14,8 @@ public interface ArticleService {
ResponseData
<?>
getArticleType
();
ResponseData
<?>
getArticleType
();
ResponseData
<?>
getArticleListByPC
(
HttpServletRequest
request
);
ResponseData
<?>
getTopArticleList
(
HttpServletRequest
request
);
ResponseData
<?>
getTopArticleList
(
HttpServletRequest
request
);
ResponseData
<?>
getArticleListByTagId
(
ArticleByTagIdRequest
tagIdRequest
,
HttpServletRequest
request
);
ResponseData
<?>
getArticleListByTagId
(
ArticleByTagIdRequest
tagIdRequest
,
HttpServletRequest
request
);
...
...
score-common/src/main/java/com/live/common/service/impl/ArticleServiceImpl.java
View file @
ae1a9b36
...
@@ -14,6 +14,7 @@ import com.live.common.domain.request.*;
...
@@ -14,6 +14,7 @@ import com.live.common.domain.request.*;
import
com.live.common.domain.request.back.ArticleListRequest
;
import
com.live.common.domain.request.back.ArticleListRequest
;
import
com.live.common.domain.request.back.EditArticleInfoRequest
;
import
com.live.common.domain.request.back.EditArticleInfoRequest
;
import
com.live.common.enums.StatusEnum
;
import
com.live.common.enums.StatusEnum
;
import
com.live.common.enums.SystemConfigEnum
;
import
com.live.common.mapper.*
;
import
com.live.common.mapper.*
;
import
com.live.common.service.ArticleService
;
import
com.live.common.service.ArticleService
;
import
com.live.common.service.RedisUtilsService
;
import
com.live.common.service.RedisUtilsService
;
...
@@ -50,6 +51,8 @@ public class ArticleServiceImpl implements ArticleService {
...
@@ -50,6 +51,8 @@ public class ArticleServiceImpl implements ArticleService {
private
RedisUtilsService
redisUtilsService
;
private
RedisUtilsService
redisUtilsService
;
@Resource
@Resource
private
ArticleLikeMapper
articleLikeMapper
;
private
ArticleLikeMapper
articleLikeMapper
;
@Resource
private
SystemConfigMapper
systemConfigMapper
;
@Override
@Override
public
ResponseData
<?>
getArticleTopTagList
()
{
public
ResponseData
<?>
getArticleTopTagList
()
{
...
@@ -89,6 +92,93 @@ public class ArticleServiceImpl implements ArticleService {
...
@@ -89,6 +92,93 @@ public class ArticleServiceImpl implements ArticleService {
}
}
@Override
@Override
public
ResponseData
<?>
getArticleListByPC
(
HttpServletRequest
request
)
{
List
<
SystemConfig
>
systemConfigs
=
systemConfigMapper
.
selectList
(
Wrappers
.<
SystemConfig
>
lambdaQuery
()
.
eq
(
SystemConfig:
:
getConfigName
,
SystemConfigEnum
.
PC_HOME_ARTICLE
.
getTitle
())
.
eq
(
SystemConfig:
:
getDeleted
,
0
)
);
List
<
GetArticleListByPCResponse
>
articleResponses
=
new
LinkedList
<>();
for
(
SystemConfig
config
:
systemConfigs
)
{
Tag
tag
=
tagMapper
.
selectById
(
config
.
getConfigValue
());
if
(
tag
==
null
)
continue
;
QueryWrapper
<
Article
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
"deleted"
,
StatusEnum
.
ENABLE
.
getCode
());
wrapper
.
eq
(
"content_type"
,
0
);
wrapper
.
apply
(
"FIND_IN_SET({0},tag_id)"
,
config
.
getConfigValue
());
wrapper
.
orderByDesc
(
"create_time"
);
wrapper
.
last
(
String
.
format
(
" limit %s,%s"
,
0
,
10
));
List
<
Article
>
articles
=
articleMapper
.
selectList
(
wrapper
);
articleResponses
.
add
(
GetArticleListByPCResponse
.
builder
()
.
tagName
(
tag
.
getTagName
())
.
articles
(
articles
.
stream
().
map
(
b
->
GetArticleListByPCResponse
.
GetArticleListByPCInfo
.
builder
()
.
id
(
b
.
getId
())
.
title
(
b
.
getTitle
())
.
build
()).
collect
(
Collectors
.
toList
()))
.
build
());
}
//足球
QueryWrapper
<
Article
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
"deleted"
,
StatusEnum
.
ENABLE
.
getCode
());
wrapper
.
eq
(
"content_type"
,
0
);
wrapper
.
eq
(
"sports_id"
,
0
);
wrapper
.
orderByDesc
(
"create_time"
);
wrapper
.
last
(
String
.
format
(
" limit %s,%s"
,
0
,
10
));
List
<
Article
>
articles
=
articleMapper
.
selectList
(
wrapper
);
articleResponses
.
add
(
GetArticleListByPCResponse
.
builder
()
.
tagName
(
"足球"
)
.
articles
(
articles
.
stream
().
map
(
b
->
GetArticleListByPCResponse
.
GetArticleListByPCInfo
.
builder
()
.
id
(
b
.
getId
())
.
title
(
b
.
getTitle
())
.
build
()).
collect
(
Collectors
.
toList
()))
.
build
());
//篮球
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
"deleted"
,
StatusEnum
.
ENABLE
.
getCode
());
wrapper
.
eq
(
"content_type"
,
0
);
wrapper
.
eq
(
"sports_id"
,
1
);
wrapper
.
orderByDesc
(
"create_time"
);
wrapper
.
last
(
String
.
format
(
" limit %s,%s"
,
0
,
10
));
articles
=
articleMapper
.
selectList
(
wrapper
);
articleResponses
.
add
(
GetArticleListByPCResponse
.
builder
()
.
tagName
(
"篮球"
)
.
articles
(
articles
.
stream
().
map
(
b
->
GetArticleListByPCResponse
.
GetArticleListByPCInfo
.
builder
()
.
id
(
b
.
getId
())
.
title
(
b
.
getTitle
())
.
build
()).
collect
(
Collectors
.
toList
()))
.
build
());
//热门
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
"deleted"
,
StatusEnum
.
ENABLE
.
getCode
());
wrapper
.
eq
(
"content_type"
,
0
);
wrapper
.
eq
(
"hot_news"
,
1
);
wrapper
.
orderByDesc
(
"create_time"
);
wrapper
.
last
(
String
.
format
(
" limit %s,%s"
,
0
,
10
));
articles
=
articleMapper
.
selectList
(
wrapper
);
articleResponses
.
add
(
GetArticleListByPCResponse
.
builder
()
.
tagName
(
"热门"
)
.
articles
(
articles
.
stream
().
map
(
b
->
GetArticleListByPCResponse
.
GetArticleListByPCInfo
.
builder
()
.
id
(
b
.
getId
())
.
title
(
b
.
getTitle
())
.
build
()).
collect
(
Collectors
.
toList
()))
.
build
());
return
ResponseData
.
successResponse
(
articleResponses
);
}
@Override
public
ResponseData
<?>
getTopArticleList
(
HttpServletRequest
request
)
{
public
ResponseData
<?>
getTopArticleList
(
HttpServletRequest
request
)
{
List
<
Article
>
articles
=
articleMapper
.
selectList
(
Wrappers
.<
Article
>
lambdaQuery
()
List
<
Article
>
articles
=
articleMapper
.
selectList
(
Wrappers
.<
Article
>
lambdaQuery
()
.
eq
(
Article:
:
getDeleted
,
StatusEnum
.
ENABLE
.
getCode
())
.
eq
(
Article:
:
getDeleted
,
StatusEnum
.
ENABLE
.
getCode
())
...
@@ -423,7 +513,7 @@ public class ArticleServiceImpl implements ArticleService {
...
@@ -423,7 +513,7 @@ public class ArticleServiceImpl implements ArticleService {
@Override
@Override
public
ResponseData
<?>
articleSearch
(
ArticleSearchRequest
commonPage
,
HttpServletRequest
request
)
{
public
ResponseData
<?>
articleSearch
(
ArticleSearchRequest
commonPage
,
HttpServletRequest
request
)
{
if
(
StringUtils
.
isBlank
(
commonPage
.
getSearchContent
()))
if
(
StringUtils
.
isBlank
(
commonPage
.
getSearchContent
()))
return
ResponseData
.
fail400Response
(
"请输入搜索内容"
);
return
ResponseData
.
fail400Response
(
"请输入搜索内容"
);
int
jumpNum
=
(
commonPage
.
getPageNum
()
-
1
)
*
commonPage
.
getPageSize
();
int
jumpNum
=
(
commonPage
.
getPageNum
()
-
1
)
*
commonPage
.
getPageSize
();
...
@@ -469,7 +559,7 @@ public class ArticleServiceImpl implements ArticleService {
...
@@ -469,7 +559,7 @@ public class ArticleServiceImpl implements ArticleService {
public
ResponseData
<?>
collectArticle
(
CommonIntId
commonIntId
,
int
type
,
HttpServletRequest
request
)
{
public
ResponseData
<?>
collectArticle
(
CommonIntId
commonIntId
,
int
type
,
HttpServletRequest
request
)
{
try
{
try
{
Article
article
=
articleMapper
.
selectById
(
commonIntId
.
getId
());
Article
article
=
articleMapper
.
selectById
(
commonIntId
.
getId
());
if
(
article
==
null
)
if
(
article
==
null
)
return
ResponseData
.
fail400Response
(
"文章不存在"
);
return
ResponseData
.
fail400Response
(
"文章不存在"
);
String
phone
=
CommonMethod
.
getUserPhone
(
request
);
String
phone
=
CommonMethod
.
getUserPhone
(
request
);
...
@@ -477,13 +567,13 @@ public class ArticleServiceImpl implements ArticleService {
...
@@ -477,13 +567,13 @@ public class ArticleServiceImpl implements ArticleService {
.
eq
(
User:
:
getPhone
,
phone
)
.
eq
(
User:
:
getPhone
,
phone
)
);
);
if
(
type
==
0
)
{
if
(
type
==
0
)
{
userReserveMapper
.
insert
(
UserReserve
.
builder
()
userReserveMapper
.
insert
(
UserReserve
.
builder
()
.
userId
(
account
.
getId
())
.
userId
(
account
.
getId
())
.
matchId
(
String
.
valueOf
(
article
.
getId
()))
.
matchId
(
String
.
valueOf
(
article
.
getId
()))
.
type
(
2
)
.
type
(
2
)
.
build
());
.
build
());
}
else
if
(
type
==
1
)
{
}
else
if
(
type
==
1
)
{
userReserveMapper
.
delete
(
Wrappers
.<
UserReserve
>
lambdaQuery
()
userReserveMapper
.
delete
(
Wrappers
.<
UserReserve
>
lambdaQuery
()
.
eq
(
UserReserve:
:
getUserId
,
account
.
getId
())
.
eq
(
UserReserve:
:
getUserId
,
account
.
getId
())
.
eq
(
UserReserve:
:
getType
,
2
)
.
eq
(
UserReserve:
:
getType
,
2
)
...
...
score-job/src/main/java/com/live/job/service/CrawlMatchService.java
View file @
ae1a9b36
...
@@ -13,7 +13,7 @@ public interface CrawlMatchService {
...
@@ -13,7 +13,7 @@ public interface CrawlMatchService {
void
crawlMatchStageScore
(
String
url
);
void
crawlMatchStageScore
(
String
url
);
void
crawlScheduleArticle
(
String
url
);
void
crawlScheduleArticle
(
String
url
,
Integer
sportsId
);
void
updateMatchList
();
void
updateMatchList
();
...
...
score-job/src/main/java/com/live/job/service/ScheduledService.java
View file @
ae1a9b36
...
@@ -155,13 +155,13 @@ public class ScheduledService {
...
@@ -155,13 +155,13 @@ public class ScheduledService {
.
build
());
.
build
());
crawStrategyFactory
.
getCrawMatchService
(
CrawlPlatformEnum
.
ARTICLE24BWZ
.
getCode
())
crawStrategyFactory
.
getCrawMatchService
(
CrawlPlatformEnum
.
ARTICLE24BWZ
.
getCode
())
.
crawlScheduleArticle
(
"https://www.24zbw.com/news/lanqiu/"
);
.
crawlScheduleArticle
(
"https://www.24zbw.com/news/lanqiu/"
,
1
);
taskScheduler
.
schedule
(()
->
crawStrategyFactory
.
getCrawMatchService
(
CrawlPlatformEnum
.
ARTICLE24BWZ
.
getCode
())
taskScheduler
.
schedule
(()
->
crawStrategyFactory
.
getCrawMatchService
(
CrawlPlatformEnum
.
ARTICLE24BWZ
.
getCode
())
.
crawlScheduleArticle
(
"https://www.24zbw.com/news/zuqiu/"
),
Instant
.
now
().
plusSeconds
(
2
*
60
));
.
crawlScheduleArticle
(
"https://www.24zbw.com/news/zuqiu/"
,
0
),
Instant
.
now
().
plusSeconds
(
2
*
60
));
taskScheduler
.
schedule
(()
->
crawStrategyFactory
.
getCrawMatchService
(
CrawlPlatformEnum
.
ARTICLE24BWZ
.
getCode
())
taskScheduler
.
schedule
(()
->
crawStrategyFactory
.
getCrawMatchService
(
CrawlPlatformEnum
.
ARTICLE24BWZ
.
getCode
())
.
crawlScheduleArticle
(
"https://www.24zbw.com/news/tag/shenshuiqu/"
),
Instant
.
now
().
plusSeconds
(
4
*
60
));
.
crawlScheduleArticle
(
"https://www.24zbw.com/news/tag/shenshuiqu/"
,
null
),
Instant
.
now
().
plusSeconds
(
4
*
60
));
}
}
// /**
// /**
...
...
score-job/src/main/java/com/live/job/service/impl/Crawl24ZBWServiceImpl.java
View file @
ae1a9b36
...
@@ -68,7 +68,7 @@ public class Crawl24ZBWServiceImpl implements CrawlMatchService {
...
@@ -68,7 +68,7 @@ public class Crawl24ZBWServiceImpl implements CrawlMatchService {
}
}
@Override
@Override
public
void
crawlScheduleArticle
(
String
jUrl
)
{
public
void
crawlScheduleArticle
(
String
jUrl
,
Integer
sportsId
)
{
try
{
try
{
Map
<
String
,
TemporarilyInfo
>
coverMap
=
new
HashMap
<>();
Map
<
String
,
TemporarilyInfo
>
coverMap
=
new
HashMap
<>();
for
(
int
i
=
1
;
i
<
51
;
i
++)
{
for
(
int
i
=
1
;
i
<
51
;
i
++)
{
...
@@ -110,7 +110,7 @@ public class Crawl24ZBWServiceImpl implements CrawlMatchService {
...
@@ -110,7 +110,7 @@ public class Crawl24ZBWServiceImpl implements CrawlMatchService {
threadPoolExecutor
.
execute
(()
->
{
threadPoolExecutor
.
execute
(()
->
{
try
{
try
{
dealWithPcInfo
(
infoUrl
,
coverMap
.
get
(
infoUrl
));
dealWithPcInfo
(
infoUrl
,
coverMap
.
get
(
infoUrl
)
,
sportsId
);
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
log
.
error
(
"爬取失败链接:{} errorInfo:{}"
,
infoUrl
,
e
.
getMessage
());
log
.
error
(
"爬取失败链接:{} errorInfo:{}"
,
infoUrl
,
e
.
getMessage
());
}
}
...
@@ -121,7 +121,7 @@ public class Crawl24ZBWServiceImpl implements CrawlMatchService {
...
@@ -121,7 +121,7 @@ public class Crawl24ZBWServiceImpl implements CrawlMatchService {
}
}
}
}
private
void
dealWithPcInfo
(
String
url
,
TemporarilyInfo
temporarilyInfo
)
throws
RuntimeException
,
IOException
{
private
void
dealWithPcInfo
(
String
url
,
TemporarilyInfo
temporarilyInfo
,
Integer
sportsId
)
throws
RuntimeException
,
IOException
{
Document
doc
=
Jsoup
.
connect
(
url
)
Document
doc
=
Jsoup
.
connect
(
url
)
.
timeout
(
30000
)
.
timeout
(
30000
)
.
userAgent
(
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36"
)
.
userAgent
(
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36"
)
...
@@ -214,6 +214,7 @@ public class Crawl24ZBWServiceImpl implements CrawlMatchService {
...
@@ -214,6 +214,7 @@ public class Crawl24ZBWServiceImpl implements CrawlMatchService {
.
tagId
(
tagId
.
toString
())
.
tagId
(
tagId
.
toString
())
.
createTime
(
new
Date
())
.
createTime
(
new
Date
())
.
contentType
(
contentType
)
.
contentType
(
contentType
)
.
sportsId
(
sportsId
)
.
releaseTime
(
DateUtil
.
parse
(
temporarilyInfo
.
getReleaseTime
(),
DateUtil
.
YMDHM_
))
.
releaseTime
(
DateUtil
.
parse
(
temporarilyInfo
.
getReleaseTime
(),
DateUtil
.
YMDHM_
))
.
fakeLike
(
IdGen
.
generatorNum
(
30
,
900
))
.
fakeLike
(
IdGen
.
generatorNum
(
30
,
900
))
.
build
());
.
build
());
...
...
score-job/src/main/java/com/live/job/service/impl/CrawlAlStatServiceImpl.java
View file @
ae1a9b36
...
@@ -1675,7 +1675,7 @@ public class CrawlAlStatServiceImpl implements CrawlMatchService {
...
@@ -1675,7 +1675,7 @@ public class CrawlAlStatServiceImpl implements CrawlMatchService {
}
}
@Override
@Override
public
void
crawlScheduleArticle
(
String
Url
)
{
public
void
crawlScheduleArticle
(
String
Url
,
Integer
sportsId
)
{
}
}
@Override
@Override
...
...
score-job/src/main/java/com/live/job/service/impl/CrawlSequoiaServiceImpl.java
View file @
ae1a9b36
...
@@ -146,7 +146,7 @@ public class CrawlSequoiaServiceImpl implements CrawlMatchService {
...
@@ -146,7 +146,7 @@ public class CrawlSequoiaServiceImpl implements CrawlMatchService {
}
}
@Override
@Override
public
void
crawlScheduleArticle
(
String
url
)
{
public
void
crawlScheduleArticle
(
String
url
,
Integer
sportsId
)
{
}
}
...
...
score-job/src/main/java/com/live/job/service/impl/CrawlSportLive360ServiceImpl.java
View file @
ae1a9b36
...
@@ -148,7 +148,7 @@ public class CrawlSportLive360ServiceImpl implements CrawlMatchService {
...
@@ -148,7 +148,7 @@ public class CrawlSportLive360ServiceImpl implements CrawlMatchService {
}
}
@Override
@Override
public
void
crawlScheduleArticle
(
String
url
)
{
public
void
crawlScheduleArticle
(
String
url
,
Integer
sportsId
)
{
}
}
...
...
score-job/src/main/java/com/live/job/service/impl/CrawlUUQiuServiceImpl.java
View file @
ae1a9b36
...
@@ -143,7 +143,7 @@ public class CrawlUUQiuServiceImpl implements CrawlMatchService {
...
@@ -143,7 +143,7 @@ public class CrawlUUQiuServiceImpl implements CrawlMatchService {
}
}
@Override
@Override
public
void
crawlScheduleArticle
(
String
url
)
{
public
void
crawlScheduleArticle
(
String
url
,
Integer
sportsId
)
{
}
}
...
...
score-server/src/main/java/com/live/server/config/IntercaptorConfig.java
View file @
ae1a9b36
...
@@ -43,7 +43,9 @@ public class IntercaptorConfig implements WebMvcConfigurer {
...
@@ -43,7 +43,9 @@ public class IntercaptorConfig implements WebMvcConfigurer {
"/article/getTopArticleList"
,
"/article/getTopArticleList"
,
"/article/getArticleListByTagId"
,
"/article/getArticleListByTagId"
,
"/article/getArticleInfoById"
,
"/article/getArticleInfoById"
,
"/article/articleSearch"
)
"/article/articleSearch"
,
"/article/getArticleListByPC"
)
;
;
}
}
...
...
score-server/src/main/java/com/live/server/controller/ArticleController.java
View file @
ae1a9b36
...
@@ -47,6 +47,19 @@ public class ArticleController {
...
@@ -47,6 +47,19 @@ public class ArticleController {
return
articleService
.
getArticleType
();
return
articleService
.
getArticleType
();
}
}
@GetMapping
(
value
=
"/getArticleListByPC"
)
@ApiOperation
(
value
=
"PC获取首页"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"成功处理请求"
),
@ApiResponse
(
code
=
401
,
message
=
"没有权限访问该服务"
),
@ApiResponse
(
code
=
403
,
message
=
"权限不足无法访问该服务"
),
@ApiResponse
(
code
=
404
,
message
=
"未发现该服务"
),
@ApiResponse
(
code
=
500
,
message
=
"服务器内部错误"
)
})
public
ResponseData
<?>
getArticleListByPC
(
HttpServletRequest
request
)
{
return
articleService
.
getArticleListByPC
(
request
);
}
@GetMapping
(
value
=
"/getTopArticleList"
)
@GetMapping
(
value
=
"/getTopArticleList"
)
@ApiOperation
(
value
=
"获取资讯首页头部轮播文章"
)
@ApiOperation
(
value
=
"获取资讯首页头部轮播文章"
)
@ApiResponses
({
@ApiResponses
({
...
...
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