Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
afanti-open-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
java-ms
afanti-open-api
Commits
46f79797
Commit
46f79797
authored
Sep 13, 2024
by
陈炎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🎨
红旗活动数据接口
parent
83cbdfb6
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
702 additions
and
25 deletions
+702
-25
BaseController.java
...om/afanticar/afantiopenapi/controller/BaseController.java
+34
-0
FawOpenController.java
...afanticar/afantiopenapi/controller/FawOpenController.java
+59
-17
DwdDouyinAuthorInfoMapper.java
...ticar/afantiopenapi/mapper/DwdDouyinAuthorInfoMapper.java
+203
-0
FawActivityDTO.java
...com/afanticar/afantiopenapi/model/dto/FawActivityDTO.java
+36
-0
DwdDouyinAuthorInfo.java
...ticar/afantiopenapi/model/entity/DwdDouyinAuthorInfo.java
+256
-0
HongqiActivityAwemeVO.java
...anticar/afantiopenapi/model/vo/HongqiActivityAwemeVO.java
+38
-0
HongqiActivityLiveVO.java
...fanticar/afantiopenapi/model/vo/HongqiActivityLiveVO.java
+38
-0
FawOpenService.java
...a/com/afanticar/afantiopenapi/service/FawOpenService.java
+36
-7
bootstrap.yml
src/main/resources/bootstrap.yml
+2
-1
No files found.
src/main/java/com/afanticar/afantiopenapi/controller/BaseController.java
View file @
46f79797
package
com
.
afanticar
.
afantiopenapi
.
controller
;
package
com
.
afanticar
.
afantiopenapi
.
controller
;
import
cn.hutool.core.date.DateException
;
import
cn.hutool.core.date.DateUnit
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.afanticar.afantiopenapi.model.BaseResponse
;
import
com.afanticar.afantiopenapi.model.BaseResponse
;
import
com.afanticar.afantiopenapi.model.dto.FawActivityDTO
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Iterator
;
import
java.util.Iterator
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -76,4 +82,32 @@ public class BaseController {
...
@@ -76,4 +82,32 @@ public class BaseController {
}
}
return
params
;
return
params
;
}
}
public
static
Date
parseDate
(
String
publishDateStr
)
{
Date
publishDate
=
null
;
try
{
publishDate
=
DateUtil
.
parse
(
publishDateStr
,
"yyyy-MM-dd"
);
}
catch
(
DateException
ignore
)
{
}
return
publishDate
;
}
int
dateNum
=
31
;
public
BaseResponse
activityRequestDTO
(
FawActivityDTO
dto
)
{
Date
publishDateEnd
=
StrUtil
.
isNotBlank
(
dto
.
getPublishDateEnd
())
?
DateUtil
.
endOfDay
(
parseDate
(
dto
.
getPublishDateEnd
()))
:
DateUtil
.
endOfDay
(
DateUtil
.
yesterday
()),
publishDateStart
=
StrUtil
.
isNotBlank
(
dto
.
getPublishDateStart
())
?
parseDate
(
dto
.
getPublishDateStart
())
:
DateUtil
.
beginOfDay
(
DateUtil
.
offsetDay
(
publishDateEnd
,
-
dateNum
));
if
(
publishDateEnd
.
after
(
DateUtil
.
date
()))
{
return
BaseController
.
error
(
"10010"
,
"时间右端点日期最大为昨日!"
);
}
if
(
DateUtil
.
between
(
publishDateEnd
,
publishDateStart
,
DateUnit
.
DAY
)
>
dateNum
)
{
return
BaseController
.
error
(
"10010"
,
"时间跨度最大为31天!"
);
}
dto
.
setEnd
(
publishDateEnd
);
dto
.
setStart
(
publishDateStart
);
dto
.
setPageNum
(
dto
.
getPageNum
()
==
null
?
1
:
dto
.
getPageNum
());
dto
.
setPageSize
(
dto
.
getPageSize
()
==
null
?
500
:
dto
.
getPageSize
());
return
null
;
}
}
}
src/main/java/com/afanticar/afantiopenapi/controller/FawOpenController.java
View file @
46f79797
package
com
.
afanticar
.
afantiopenapi
.
controller
;
package
com
.
afanticar
.
afantiopenapi
.
controller
;
import
cn.hutool.core.date.DateException
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
com.afanticar.afantiopenapi.model.BaseResponse
;
import
com.afanticar.afantiopenapi.model.BaseResponse
;
import
com.afanticar.afantiopenapi.model.vo.BasePageVO
;
import
com.afanticar.afantiopenapi.model.dto.FawActivityDTO
;
import
com.afanticar.afantiopenapi.model.vo.HongqiAwemeIncentiveVO
;
import
com.afanticar.afantiopenapi.model.vo.*
;
import
com.afanticar.afantiopenapi.model.vo.HongqiLiveIncentiveVO
;
import
com.afanticar.afantiopenapi.service.BaseService
;
import
com.afanticar.afantiopenapi.service.BaseService
;
import
com.afanticar.afantiopenapi.service.FawOpenService
;
import
com.afanticar.afantiopenapi.service.FawOpenService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -16,10 +14,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -16,10 +14,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.validation.constraints.Max
;
import
javax.validation.constraints.Max
;
...
@@ -50,7 +45,7 @@ public class FawOpenController extends BaseController {
...
@@ -50,7 +45,7 @@ public class FawOpenController extends BaseController {
@Value
(
"${faw.limit.period:60}"
)
@Value
(
"${faw.limit.period:60}"
)
Integer
limitPeriod
;
Integer
limitPeriod
;
@Value
(
"${faw.limit.threshold:
3
}"
)
@Value
(
"${faw.limit.threshold:
5
}"
)
Integer
limit
;
Integer
limit
;
static
String
dataType
=
"faw"
;
static
String
dataType
=
"faw"
;
...
@@ -108,17 +103,64 @@ public class FawOpenController extends BaseController {
...
@@ -108,17 +103,64 @@ public class FawOpenController extends BaseController {
return
success
(
fawOpenService
.
lives
(
publishDateStart
,
publishDateEnd
,
type
,
pageNum
,
pageSize
));
return
success
(
fawOpenService
.
lives
(
publishDateStart
,
publishDateEnd
,
type
,
pageNum
,
pageSize
));
}
}
private
static
Date
parseDate
(
String
publishDateStr
)
{
private
Date
endTime
(
Date
endDate
)
{
Date
publishDate
=
null
;
return
DateUtil
.
endOfDay
(
endDate
);
try
{
}
publishDate
=
DateUtil
.
parse
(
publishDateStr
,
"yyyy-MM-dd"
);
}
catch
(
DateException
ignore
)
{
@ApiOperation
(
value
=
"抖音活动视频数据信息"
,
notes
=
"抖音活动视频数据"
,
produces
=
"application/json"
)
@PostMapping
(
"/activity/douyin/aweme/list"
)
public
BaseResponse
<
BasePageVO
<
HongqiActivityAwemeVO
>>
getDouyinActivityAwemeData
(
@RequestBody
@Validated
FawActivityDTO
dto
)
{
BaseResponse
check
=
baseService
.
baseLimit
(
dataType
,
limit
,
limitPeriod
);
if
(
check
!=
null
)
{
return
check
;
}
check
=
activityRequestDTO
(
dto
);
if
(
check
!=
null
)
{
return
check
;
}
}
return
publishDate
;
return
success
(
fawOpenService
.
douyinActivityAwemes
(
dto
))
;
}
}
private
Date
endTime
(
Date
endDate
)
{
@ApiOperation
(
value
=
"抖音活动直播数据信息"
,
notes
=
"抖音活动直播数据"
,
produces
=
"application/json"
)
return
DateUtil
.
endOfDay
(
endDate
);
@PostMapping
(
"/activity/douyin/live/list"
)
public
BaseResponse
<
BasePageVO
<
HongqiActivityLiveVO
>>
getDouyinActivityLiveData
(
@RequestBody
@Validated
FawActivityDTO
dto
)
{
BaseResponse
check
=
baseService
.
baseLimit
(
dataType
,
limit
,
limitPeriod
);
if
(
check
!=
null
)
{
return
check
;
}
check
=
activityRequestDTO
(
dto
);
if
(
check
!=
null
)
{
return
check
;
}
return
success
(
fawOpenService
.
douyinActivityLives
(
dto
));
}
@ApiOperation
(
value
=
"快手活动视频数据信息"
,
notes
=
"快手活动视频数据"
,
produces
=
"application/json"
)
@PostMapping
(
"/activity/kuaishou/aweme/list"
)
public
BaseResponse
<
BasePageVO
<
HongqiActivityAwemeVO
>>
getKuaishouActivityAwemeData
(
@RequestBody
@Validated
FawActivityDTO
dto
)
{
BaseResponse
check
=
baseService
.
baseLimit
(
dataType
,
limit
,
limitPeriod
);
if
(
check
!=
null
)
{
return
check
;
}
check
=
activityRequestDTO
(
dto
);
if
(
check
!=
null
)
{
return
check
;
}
return
success
(
fawOpenService
.
kuaishouActivityAwemes
(
dto
));
}
@ApiOperation
(
value
=
"快手活动直播数据信息"
,
notes
=
"快手活动直播数据"
,
produces
=
"application/json"
)
@PostMapping
(
"/activity/kuaishou/live/list"
)
public
BaseResponse
<
BasePageVO
<
HongqiActivityLiveVO
>>
getKuaishouActivityLiveData
(
@RequestBody
@Validated
FawActivityDTO
dto
)
{
BaseResponse
check
=
baseService
.
baseLimit
(
dataType
,
limit
,
limitPeriod
);
if
(
check
!=
null
)
{
return
check
;
}
check
=
activityRequestDTO
(
dto
);
if
(
check
!=
null
)
{
return
check
;
}
return
success
(
fawOpenService
.
kuaishouActivityLives
(
dto
));
}
}
}
}
src/main/java/com/afanticar/afantiopenapi/mapper/DwdDouyinAuthorInfoMapper.java
0 → 100644
View file @
46f79797
This diff is collapsed.
Click to expand it.
src/main/java/com/afanticar/afantiopenapi/model/dto/FawActivityDTO.java
0 → 100644
View file @
46f79797
package
com
.
afanticar
.
afantiopenapi
.
model
.
dto
;
import
com.alibaba.fastjson.annotation.JSONType
;
import
com.fasterxml.jackson.databind.annotation.JsonNaming
;
import
lombok.Data
;
import
javax.validation.constraints.Max
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author chin
* @contact chenyan@afanticar.com
* @since 2024/9/13/013
*/
@Data
@JsonNaming
(
value
=
com
.
fasterxml
.
jackson
.
databind
.
PropertyNamingStrategy
.
SnakeCaseStrategy
.
class
)
@JSONType
(
naming
=
com
.
alibaba
.
fastjson
.
PropertyNamingStrategy
.
SnakeCase
)
public
class
FawActivityDTO
{
@Max
(
value
=
500
,
message
=
"单页数据page_size过大"
)
private
Integer
pageSize
;
private
Integer
pageNum
;
private
String
publishDateStart
;
private
Date
start
;
private
String
publishDateEnd
;
private
Date
end
;
private
List
<
String
>
activityIds
;
}
src/main/java/com/afanticar/afantiopenapi/model/entity/DwdDouyinAuthorInfo.java
0 → 100644
View file @
46f79797
package
com
.
afanticar
.
afantiopenapi
.
model
.
entity
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
/**
* <p>
* 抖音主播信息
* </p>
*
* @author Wsr
* @since 2023-02-09
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName
(
"dwd_douyin_author_info"
)
@ApiModel
(
value
=
"DwdDouyinAuthorInfo对象"
,
description
=
"抖音主播信息"
)
public
class
DwdDouyinAuthorInfo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"主播ID"
)
@TableId
(
"author_id"
)
private
String
authorId
;
@ApiModelProperty
(
"主播抖音号"
)
@TableField
(
"code"
)
private
String
code
;
@ApiModelProperty
(
"主播性别"
)
@TableField
(
"gender"
)
private
Integer
gender
;
@ApiModelProperty
(
"主播签名"
)
@TableField
(
"signature"
)
private
String
signature
;
@ApiModelProperty
(
"主播生日"
)
@TableField
(
"birthday"
)
private
String
birthday
;
@ApiModelProperty
(
"主播认证名称"
)
@TableField
(
"verify_name"
)
private
String
verifyName
;
@ApiModelProperty
(
"主播昵称"
)
@TableField
(
"nickname"
)
private
String
nickname
;
@ApiModelProperty
(
"抖音主播认证类型"
)
@TableField
(
"verification_type"
)
private
String
verificationType
;
@ApiModelProperty
(
"抖音主播认证名称"
)
@TableField
(
"verification_name"
)
private
String
verificationName
;
@ApiModelProperty
(
"主播头像"
)
@TableField
(
"avatar"
)
private
String
avatar
;
@ApiModelProperty
(
"主播爬虫字段,一般使用该字段发送爬取该主播信息指令"
)
@TableField
(
"sec_author_id"
)
private
String
secAuthorId
;
@ApiModelProperty
(
"主播所在城市code"
)
@TableField
(
"author_city_code"
)
private
String
authorCityCode
;
@ApiModelProperty
(
"主播所在城市名称"
)
@TableField
(
"author_city_name"
)
private
String
authorCityName
;
@ApiModelProperty
(
"主播所在省code"
)
@TableField
(
"author_province_code"
)
private
String
authorProvinceCode
;
@ApiModelProperty
(
"主播所在省名称"
)
@TableField
(
"author_province_name"
)
private
String
authorProvinceName
;
@ApiModelProperty
(
"经销商id"
)
@TableField
(
"dealer_id"
)
private
String
dealerId
;
@ApiModelProperty
(
"经销商名称"
)
@TableField
(
"dealer_name"
)
private
String
dealerName
;
@ApiModelProperty
(
"经销商城市code"
)
@TableField
(
"dealer_city_code"
)
private
Long
dealerCityCode
;
@ApiModelProperty
(
"经销商城市名称"
)
@TableField
(
"dealer_city_name"
)
private
String
dealerCityName
;
@ApiModelProperty
(
"经销商地区code"
)
@TableField
(
"dealer_county_code"
)
private
Long
dealerCountyCode
;
@ApiModelProperty
(
"经销商地区名称"
)
@TableField
(
"dealer_county_name"
)
private
String
dealerCountyName
;
@ApiModelProperty
(
"经销商省份code"
)
@TableField
(
"dealer_province_code"
)
private
Long
dealerProvinceCode
;
@ApiModelProperty
(
"经销商省份名称"
)
@TableField
(
"dealer_province_name"
)
private
String
dealerProvinceName
;
@ApiModelProperty
(
"主机厂ids"
)
@TableField
(
"manufactor_ids"
)
private
String
manufactorIds
;
@ApiModelProperty
(
"主机厂名称"
)
@TableField
(
"manufactor_names"
)
private
String
manufactorNames
;
@ApiModelProperty
(
"品牌ids"
)
@TableField
(
"brand_ids"
)
private
String
brandIds
;
@ApiModelProperty
(
"主体ids"
)
@TableField
(
"principal_ids"
)
private
String
principalIds
;
@ApiModelProperty
(
"主体名称"
)
@TableField
(
"principal_names"
)
private
String
principalNames
;
@ApiModelProperty
(
"主播总点赞数"
)
@TableField
(
"like_count_total"
)
private
Integer
likeCountTotal
;
@ApiModelProperty
(
"主播总视频数"
)
@TableField
(
"aweme_count_total"
)
private
Integer
awemeCountTotal
;
@ApiModelProperty
(
"主播总粉丝数"
)
@TableField
(
"fans_count_total"
)
private
Integer
fansCountTotal
;
@ApiModelProperty
(
"主播抖音粉丝数"
)
@TableField
(
"fans_dy_count"
)
private
Integer
fansDyCount
;
@ApiModelProperty
(
"主播头条粉丝数"
)
@TableField
(
"fans_tt_count"
)
private
Integer
fansTtCount
;
@ApiModelProperty
(
"主播火山粉丝数"
)
@TableField
(
"fans_hs_count"
)
private
Integer
fansHsCount
;
@ApiModelProperty
(
"主播总动态数"
)
@TableField
(
"dongtai_count_total"
)
private
Integer
dongtaiCountTotal
;
@ApiModelProperty
(
"更新时间"
)
@TableField
(
value
=
"mtime"
,
fill
=
FieldFill
.
INSERT_UPDATE
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
mtime
;
@ApiModelProperty
(
"经销商大区id,多列值"
)
@TableField
(
"dealer_area_ids"
)
private
String
dealerAreaIds
;
@ApiModelProperty
(
"经销商大区名称,多列值"
)
@TableField
(
"dealer_area_names"
)
private
String
dealerAreaNames
;
@TableField
(
"dealer_company_name"
)
private
String
dealerCompanyName
;
@TableField
(
"dealer_store_code"
)
private
String
dealerStoreCode
;
@ApiModelProperty
(
"账号类型:10经销商未分类,11经销商官号,12经销商个人号,13经销商营销号;20主机厂号未分类;21主机厂官号,22主机厂营销号;41汽车KOL,14:经销商售后,15:经销商二手车,30:经销商大区号 ; NULL 既不是品牌主播号,也不是经销商主播号,又不是汽车分类主播号的主播号"
)
@TableField
(
"account_type"
)
private
Integer
accountType
;
@ApiModelProperty
(
"主播状态, 0正常;1删除"
)
@TableField
(
"author_status"
)
private
Integer
authorStatus
;
@ApiModelProperty
(
"数据同步更新的时间点"
)
@TableField
(
"data_update_time"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
dataUpdateTime
;
@ApiModelProperty
(
"团队编号"
)
@TableField
(
"team_id"
)
private
String
teamId
;
@ApiModelProperty
(
"账号收录时间"
)
@TableField
(
"included_time"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
includedTime
;
@ApiModelProperty
(
"主播主页背景图链接"
)
@TableField
(
"cover_url"
)
private
String
coverUrl
;
@ApiModelProperty
(
"排序权重"
)
@TableField
(
"sort_weight"
)
private
String
sortWeight
;
@ApiModelProperty
(
"懂车帝主播id"
)
@TableField
(
"dongchedi_author_id"
)
private
String
dongchediAuthorId
;
@ApiModelProperty
(
"创建时间"
)
@TableField
(
value
=
"ctime"
,
fill
=
FieldFill
.
INSERT
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
ctime
;
@ApiModelProperty
(
"运营主体:1:品牌,2:主机厂,3:主体大区,4:经销商,5:KOIP,6:二手车商"
)
@TableField
(
"operate_type"
)
private
String
operateType
;
@ApiModelProperty
(
"阿凡提总后台定义主播是否继续采集(是否删除,0正常;1删除)"
)
@TableField
(
"is_deleted"
)
private
Integer
isDeleted
;
@ApiModelProperty
(
"品牌名称"
)
@TableField
(
"brand_names"
)
private
String
brandNames
;
@ApiModelProperty
(
"抖音返回的主播状态,0正常、1注销、2封禁"
)
@TableField
(
"platform_author_status"
)
private
Integer
platformAuthorStatus
;
@ApiModelProperty
(
"门店原始编码"
)
@TableField
(
"origin_store_code"
)
private
String
originStoreCode
;
@ApiModelProperty
(
"成员ids"
)
private
List
<
String
>
matrixMemberIds
;
}
src/main/java/com/afanticar/afantiopenapi/model/vo/HongqiActivityAwemeVO.java
0 → 100644
View file @
46f79797
package
com
.
afanticar
.
afantiopenapi
.
model
.
vo
;
import
com.alibaba.fastjson.annotation.JSONType
;
import
com.fasterxml.jackson.databind.annotation.JsonNaming
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author chin
* @contact chenyan@afanticar.com
* @since 2024/9/13/013
*/
@Data
@JsonNaming
(
value
=
com
.
fasterxml
.
jackson
.
databind
.
PropertyNamingStrategy
.
SnakeCaseStrategy
.
class
)
@JSONType
(
naming
=
com
.
alibaba
.
fastjson
.
PropertyNamingStrategy
.
SnakeCase
)
public
class
HongqiActivityAwemeVO
{
private
String
awemeId
;
private
String
awemeTitle
;
private
String
platform
;
private
String
areaName
;
private
String
dealerCode
;
private
String
dealerName
;
private
String
nickname
;
private
Date
publishTime
;
private
Integer
playVolume
;
private
Integer
pollingCount
;
private
Integer
diggCount
;
private
Integer
commentCount
;
private
Integer
shareCount
;
private
String
shareUrl
;
private
Date
dataUpdateTime
;
private
List
<
String
>
activityIdList
;
private
List
<
String
>
keywordList
;
}
src/main/java/com/afanticar/afantiopenapi/model/vo/HongqiActivityLiveVO.java
0 → 100644
View file @
46f79797
package
com
.
afanticar
.
afantiopenapi
.
model
.
vo
;
import
com.alibaba.fastjson.annotation.JSONType
;
import
com.fasterxml.jackson.databind.annotation.JsonNaming
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author chin
* @contact chenyan@afanticar.com
* @since 2024/9/13/013
*/
@Data
@JsonNaming
(
value
=
com
.
fasterxml
.
jackson
.
databind
.
PropertyNamingStrategy
.
SnakeCaseStrategy
.
class
)
@JSONType
(
naming
=
com
.
alibaba
.
fastjson
.
PropertyNamingStrategy
.
SnakeCase
)
public
class
HongqiActivityLiveVO
{
private
String
roomId
;
private
String
title
;
private
String
platform
;
private
String
areaName
;
private
String
dealerCode
;
private
String
dealerName
;
private
String
nickname
;
private
Date
publishTime
;
private
Integer
statisticsTotalWatchUserCount
;
private
Double
statisticsLiveTime
;
private
Integer
pollingCnt
;
private
Integer
likeCnt
;
private
Integer
commentCnt
;
private
Integer
giftCnt
;
private
Integer
statisticsFansAdd
;
private
List
<
String
>
activityIdList
;
private
List
<
String
>
keywordList
;
}
src/main/java/com/afanticar/afantiopenapi/service/FawOpenService.java
View file @
46f79797
package
com
.
afanticar
.
afantiopenapi
.
service
;
package
com
.
afanticar
.
afantiopenapi
.
service
;
import
com.afanticar.afantiopenapi.mapper.HongqiAwemeIncentiveMonthlyMapper
;
import
com.afanticar.afantiopenapi.mapper.*
;
import
com.afanticar.afantiopenapi.mapper.HongqiAwemeIncentiveQuarterMapper
;
import
com.afanticar.afantiopenapi.mapper.HongqiLiveIncentiveMonthlyMapper
;
import
com.afanticar.afantiopenapi.mapper.HongqiLiveIncentiveQuarterMapper
;
import
com.afanticar.afantiopenapi.mapper.struct.HongqiAwemeIncentiveStructMapper
;
import
com.afanticar.afantiopenapi.mapper.struct.HongqiAwemeIncentiveStructMapper
;
import
com.afanticar.afantiopenapi.mapper.struct.HongqiLiveIncentiveStructMapper
;
import
com.afanticar.afantiopenapi.mapper.struct.HongqiLiveIncentiveStructMapper
;
import
com.afanticar.afantiopenapi.model.dto.FawActivityDTO
;
import
com.afanticar.afantiopenapi.model.entity.HongqiAwemeIncentiveMonthly
;
import
com.afanticar.afantiopenapi.model.entity.HongqiAwemeIncentiveMonthly
;
import
com.afanticar.afantiopenapi.model.entity.HongqiAwemeIncentiveQuarter
;
import
com.afanticar.afantiopenapi.model.entity.HongqiAwemeIncentiveQuarter
;
import
com.afanticar.afantiopenapi.model.entity.HongqiLiveIncentiveMonthly
;
import
com.afanticar.afantiopenapi.model.entity.HongqiLiveIncentiveMonthly
;
import
com.afanticar.afantiopenapi.model.entity.HongqiLiveIncentiveQuarter
;
import
com.afanticar.afantiopenapi.model.entity.HongqiLiveIncentiveQuarter
;
import
com.afanticar.afantiopenapi.model.vo.BasePageVO
;
import
com.afanticar.afantiopenapi.model.vo.*
;
import
com.afanticar.afantiopenapi.model.vo.HongqiAwemeIncentiveVO
;
import
com.afanticar.afantiopenapi.model.vo.HongqiLiveIncentiveVO
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -45,6 +41,9 @@ public class FawOpenService {
...
@@ -45,6 +41,9 @@ public class FawOpenService {
@Resource
@Resource
HongqiLiveIncentiveQuarterMapper
hongqiLiveIncentiveQuarterMapper
;
HongqiLiveIncentiveQuarterMapper
hongqiLiveIncentiveQuarterMapper
;
@Resource
DwdDouyinAuthorInfoMapper
douyinAuthorInfoMapper
;
static
String
monthly
=
"monthly"
;
static
String
monthly
=
"monthly"
;
static
String
quarter
=
"quarter"
;
static
String
quarter
=
"quarter"
;
...
@@ -102,4 +101,34 @@ public class FawOpenService {
...
@@ -102,4 +101,34 @@ public class FawOpenService {
return
new
BasePageVO
<>();
return
new
BasePageVO
<>();
}
}
}
}
public
BasePageVO
<
HongqiActivityAwemeVO
>
douyinActivityAwemes
(
FawActivityDTO
dto
)
{
PageHelper
.
orderBy
(
" publish_time DESC "
);
IPage
<
HongqiActivityAwemeVO
>
page
=
new
Page
<>(
dto
.
getPageNum
(),
dto
.
getPageSize
());
IPage
<
HongqiActivityAwemeVO
>
awemePage
=
douyinAuthorInfoMapper
.
douyinActivityAwemes
(
page
,
dto
);
return
BasePageVO
.
restPage
(
dto
.
getPageNum
(),
(
int
)
awemePage
.
getSize
(),
(
int
)
awemePage
.
getTotal
(),
(
int
)
awemePage
.
getPages
(),
awemePage
.
getRecords
());
}
public
BasePageVO
<
HongqiActivityLiveVO
>
douyinActivityLives
(
FawActivityDTO
dto
)
{
PageHelper
.
orderBy
(
" publish_time DESC "
);
IPage
<
HongqiActivityLiveVO
>
page
=
new
Page
<>(
dto
.
getPageNum
(),
dto
.
getPageSize
());
IPage
<
HongqiActivityLiveVO
>
livePage
=
douyinAuthorInfoMapper
.
douyinActivityLives
(
page
,
dto
);
return
BasePageVO
.
restPage
(
dto
.
getPageNum
(),
(
int
)
livePage
.
getSize
(),
(
int
)
livePage
.
getTotal
(),
(
int
)
livePage
.
getPages
(),
livePage
.
getRecords
());
}
public
BasePageVO
<
HongqiActivityAwemeVO
>
kuaishouActivityAwemes
(
FawActivityDTO
dto
)
{
PageHelper
.
orderBy
(
" publish_time DESC "
);
IPage
<
HongqiActivityAwemeVO
>
page
=
new
Page
<>(
dto
.
getPageNum
(),
dto
.
getPageSize
());
IPage
<
HongqiActivityAwemeVO
>
awemePage
=
douyinAuthorInfoMapper
.
kuaishouActivityAwemes
(
page
,
dto
);
return
BasePageVO
.
restPage
(
dto
.
getPageNum
(),
(
int
)
awemePage
.
getSize
(),
(
int
)
awemePage
.
getTotal
(),
(
int
)
awemePage
.
getPages
(),
awemePage
.
getRecords
());
}
public
BasePageVO
<
HongqiActivityLiveVO
>
kuaishouActivityLives
(
FawActivityDTO
dto
)
{
PageHelper
.
orderBy
(
" publish_time DESC "
);
IPage
<
HongqiActivityLiveVO
>
page
=
new
Page
<>(
dto
.
getPageNum
(),
dto
.
getPageSize
());
IPage
<
HongqiActivityLiveVO
>
livePage
=
douyinAuthorInfoMapper
.
kuaishouActivityLives
(
page
,
dto
);
return
BasePageVO
.
restPage
(
dto
.
getPageNum
(),
(
int
)
livePage
.
getSize
(),
(
int
)
livePage
.
getTotal
(),
(
int
)
livePage
.
getPages
(),
livePage
.
getRecords
());
}
}
}
src/main/resources/bootstrap.yml
View file @
46f79797
...
@@ -12,6 +12,7 @@ spring:
...
@@ -12,6 +12,7 @@ spring:
maxRetry
:
3
maxRetry
:
3
namespace
:
09c8e0f2-6c67-4cd4-b167-5883a98a7a4f
#local
namespace
:
09c8e0f2-6c67-4cd4-b167-5883a98a7a4f
#local
ext-config
:
ext-config
:
-
data-id
:
dynamic-db-afanti-bi-app-vault.yml
-
data-id
:
dynamic-db-afanti-vault.yml
-
data-id
:
dynamic-db-afanti-vault.yml
-
data-id
:
dynamic-db-afanti-tmp-vault.yml
-
data-id
:
dynamic-db-afanti-tmp-vault.yml
-
data-id
:
common-redis.yml
-
data-id
:
common-redis.yml
...
@@ -35,7 +36,7 @@ spring:
...
@@ -35,7 +36,7 @@ spring:
secret-key-property
:
spring.rocket-mq.secretKey
secret-key-property
:
spring.rocket-mq.secretKey
# adb链接
# adb链接
kv
:
kv
:
enabled
:
fals
e
enabled
:
tru
e
backend
:
${spring.profiles.active}
backend
:
${spring.profiles.active}
default-context
:
etladb
default-context
:
etladb
databases
:
databases
:
...
...
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