Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-api
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-api
Commits
f6aa86e3
Commit
f6aa86e3
authored
Dec 11, 2024
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: Agent应用数据分析看板
parent
c68bee85
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
80 changed files
with
4394 additions
and
14 deletions
+4394
-14
AgentApplicationPreviewDto.java
...poc/agent_application/dto/AgentApplicationPreviewDto.java
+13
-0
AgentApplicationInfoRestImpl.java
...t_application/rest/impl/AgentApplicationInfoRestImpl.java
+18
-6
DataAnalyzeReportService.java
.../poc/data_analyze/aggregate/DataAnalyzeReportService.java
+37
-0
DataAnalyzeReportServiceImpl.java
..._analyze/aggregate/impl/DataAnalyzeReportServiceImpl.java
+62
-0
DataAnalyzeChannelEnum.java
...om/poc/data_analyze/constants/DataAnalyzeChannelEnum.java
+51
-0
DataAnalyzeTimeDimensionEnum.java
.../data_analyze/constants/DataAnalyzeTimeDimensionEnum.java
+15
-0
DataAnalyzeTimeRangeEnum.java
.../poc/data_analyze/constants/DataAnalyzeTimeRangeEnum.java
+28
-0
DataAnalyzeTypeEnum.java
...n/com/poc/data_analyze/constants/DataAnalyzeTypeEnum.java
+22
-0
BizDataAnalyzeCollectConvert.java
...oc/data_analyze/convert/BizDataAnalyzeCollectConvert.java
+85
-0
BizDataAnalyzeDialogueRecordConvert.java
..._analyze/convert/BizDataAnalyzeDialogueRecordConvert.java
+53
-0
BizDataAnalyzePointRecordConvert.java
...ata_analyze/convert/BizDataAnalyzePointRecordConvert.java
+57
-0
ChannelDataCount.java
...java/cn/com/poc/data_analyze/domain/ChannelDataCount.java
+28
-0
DataAnalyze.java
...main/java/cn/com/poc/data_analyze/domain/DataAnalyze.java
+34
-0
DataAnalyzeInfo.java
.../java/cn/com/poc/data_analyze/domain/DataAnalyzeInfo.java
+38
-0
DataAnalyzeTimeRange.java
.../cn/com/poc/data_analyze/domain/DataAnalyzeTimeRange.java
+44
-0
BizDataAnalyzeCollectDto.java
...cn/com/poc/data_analyze/dto/BizDataAnalyzeCollectDto.java
+175
-0
BizDataAnalyzeDialogueRecordDto.java
...poc/data_analyze/dto/BizDataAnalyzeDialogueRecordDto.java
+81
-0
BizDataAnalyzePointRecordDto.java
...om/poc/data_analyze/dto/BizDataAnalyzePointRecordDto.java
+93
-0
AgentDataAnalyzeGeneralEntity.java
...oc/data_analyze/entity/AgentDataAnalyzeGeneralEntity.java
+31
-0
AgentDataAnalyzeTrendEntity.java
.../poc/data_analyze/entity/AgentDataAnalyzeTrendEntity.java
+48
-0
BizDataAnalyzeCollectEntity.java
.../poc/data_analyze/entity/BizDataAnalyzeCollectEntity.java
+175
-0
BizDataAnalyzeDialogueRecordEntity.java
...ta_analyze/entity/BizDataAnalyzeDialogueRecordEntity.java
+81
-0
BizDataAnalyzePointRecordEntity.java
.../data_analyze/entity/BizDataAnalyzePointRecordEntity.java
+93
-0
ChannelPointCountEntity.java
.../com/poc/data_analyze/entity/ChannelPointCountEntity.java
+28
-0
ChannelUsageCountEntity.java
.../com/poc/data_analyze/entity/ChannelUsageCountEntity.java
+29
-0
ChannelUsersCountEntity.java
.../com/poc/data_analyze/entity/ChannelUsersCountEntity.java
+38
-0
BizDataAnalyzeCollectModel.java
...om/poc/data_analyze/model/BizDataAnalyzeCollectModel.java
+254
-0
BizDataAnalyzeDialogueRecordModel.java
...data_analyze/model/BizDataAnalyzeDialogueRecordModel.java
+126
-0
BizDataAnalyzePointRecordModel.java
...oc/data_analyze/model/BizDataAnalyzePointRecordModel.java
+142
-0
AgentDataTrendQuery.sql
...ava/cn/com/poc/data_analyze/query/AgentDataTrendQuery.sql
+47
-0
AgentDataTrendQueryCondition.java
.../poc/data_analyze/query/AgentDataTrendQueryCondition.java
+56
-0
AgentDataTrendQueryItem.java
...n/com/poc/data_analyze/query/AgentDataTrendQueryItem.java
+79
-0
AgentUsageQuery.sql
...in/java/cn/com/poc/data_analyze/query/AgentUsageQuery.sql
+18
-0
AgentUsageQueryCondition.java
.../com/poc/data_analyze/query/AgentUsageQueryCondition.java
+35
-0
AgentUsageQueryItem.java
...va/cn/com/poc/data_analyze/query/AgentUsageQueryItem.java
+184
-0
ChannelPointsCountQuery.sql
...cn/com/poc/data_analyze/query/ChannelPointsCountQuery.sql
+18
-0
ChannelPointsCountQueryCondition.java
.../data_analyze/query/ChannelPointsCountQueryCondition.java
+34
-0
ChannelPointsCountQueryItem.java
...m/poc/data_analyze/query/ChannelPointsCountQueryItem.java
+47
-0
ChannelUsageCountQuery.sql
.../cn/com/poc/data_analyze/query/ChannelUsageCountQuery.sql
+18
-0
ChannelUsageCountQueryCondition.java
...c/data_analyze/query/ChannelUsageCountQueryCondition.java
+34
-0
ChannelUsageCountQueryItem.java
...om/poc/data_analyze/query/ChannelUsageCountQueryItem.java
+44
-0
ChannelUserCountQuery.sql
...a/cn/com/poc/data_analyze/query/ChannelUserCountQuery.sql
+18
-0
ChannelUserCountQueryCondition.java
...oc/data_analyze/query/ChannelUserCountQueryCondition.java
+56
-0
ChannelUserCountQueryItem.java
...com/poc/data_analyze/query/ChannelUserCountQueryItem.java
+44
-0
PointsUsageQuery.sql
...n/java/cn/com/poc/data_analyze/query/PointsUsageQuery.sql
+11
-0
PointsUsageQueryCondition.java
...com/poc/data_analyze/query/PointsUsageQueryCondition.java
+35
-0
PointsUsageQueryItem.java
...a/cn/com/poc/data_analyze/query/PointsUsageQueryItem.java
+100
-0
BizDataAnalyzeCollectRepository.java
...a_analyze/repository/BizDataAnalyzeCollectRepository.java
+6
-0
BizDataAnalyzeDialogueRecordRepository.java
...ze/repository/BizDataAnalyzeDialogueRecordRepository.java
+6
-0
BizDataAnalyzePointRecordRepository.java
...alyze/repository/BizDataAnalyzePointRecordRepository.java
+6
-0
BizDataAnalyzeCollectService.java
...oc/data_analyze/service/BizDataAnalyzeCollectService.java
+21
-0
BizDataAnalyzeDialogueRecordService.java
..._analyze/service/BizDataAnalyzeDialogueRecordService.java
+31
-0
BizDataAnalyzePointRecordService.java
...ata_analyze/service/BizDataAnalyzePointRecordService.java
+29
-0
BizDataAnalyzeCollectServiceImpl.java
...nalyze/service/impl/BizDataAnalyzeCollectServiceImpl.java
+121
-0
BizDataAnalyzeDialogueRecordServiceImpl.java
...service/impl/BizDataAnalyzeDialogueRecordServiceImpl.java
+114
-0
BizDataAnalyzePointRecordServiceImpl.java
...ze/service/impl/BizDataAnalyzePointRecordServiceImpl.java
+104
-0
MemberEquityServiceImpl.java
...om/poc/equity/aggregate/impl/MemberEquityServiceImpl.java
+4
-0
AgentApplicationService.java
.../cn/com/poc/expose/aggregate/AgentApplicationService.java
+2
-1
AgentDataAnalyzeService.java
.../cn/com/poc/expose/aggregate/AgentDataAnalyzeService.java
+58
-0
AgentApplicationServiceImpl.java
...oc/expose/aggregate/impl/AgentApplicationServiceImpl.java
+21
-6
AgentDataAnalyzeServiceImpl.java
...oc/expose/aggregate/impl/AgentDataAnalyzeServiceImpl.java
+274
-0
AgentApplicationDto.java
src/main/java/cn/com/poc/expose/dto/AgentApplicationDto.java
+10
-0
AgentDataAnalyzeGeneralDto.java
...se/dto/agent_data_analyze/AgentDataAnalyzeGeneralDto.java
+31
-0
AgentDataAnalyzeTrendDto.java
...pose/dto/agent_data_analyze/AgentDataAnalyzeTrendDto.java
+48
-0
AgentUsageTrendDto.java
...poc/expose/dto/agent_data_analyze/AgentUsageTrendDto.java
+28
-0
ChannelPointCountDto.java
...c/expose/dto/agent_data_analyze/ChannelPointCountDto.java
+30
-0
ChannelUsageCountDto.java
...c/expose/dto/agent_data_analyze/ChannelUsageCountDto.java
+29
-0
ChannelUsersCountDto.java
...c/expose/dto/agent_data_analyze/ChannelUsersCountDto.java
+38
-0
GetAgentDataTrendRequestDto.java
...e/dto/agent_data_analyze/GetAgentDataTrendRequestDto.java
+41
-0
UsageCountDto.java
.../com/poc/expose/dto/agent_data_analyze/UsageCountDto.java
+63
-0
AgentDataAnalyzeRest.java
...ain/java/cn/com/poc/expose/rest/AgentDataAnalyzeRest.java
+59
-0
AgentApplicationRestImpl.java
...cn/com/poc/expose/rest/impl/AgentApplicationRestImpl.java
+1
-1
AgentDataAnalyzeRestImpl.java
...cn/com/poc/expose/rest/impl/AgentDataAnalyzeRestImpl.java
+90
-0
DataAnalyzeCollectMessage.java
.../cn/com/poc/message/entity/DataAnalyzeCollectMessage.java
+94
-0
DataAnalyzeConsumerService.java
...n/com/poc/message/service/DataAnalyzeConsumerService.java
+20
-0
DataAnalyzeProducerService.java
...n/com/poc/message/service/DataAnalyzeProducerService.java
+21
-0
DataAnalyzeConsumerServiceImpl.java
.../message/service/impl/DataAnalyzeConsumerServiceImpl.java
+51
-0
DataAnalyzeProducerServiceImpl.java
.../message/service/impl/DataAnalyzeProducerServiceImpl.java
+28
-0
DataAnalyzeTopic.java
src/main/java/cn/com/poc/message/topic/DataAnalyzeTopic.java
+12
-0
AgentDataTrendQueryTest.java
...n/com/poc/data_analyze/query/AgentDataTrendQueryTest.java
+46
-0
No files found.
src/main/java/cn/com/poc/agent_application/dto/AgentApplicationPreviewDto.java
View file @
f6aa86e3
...
@@ -21,6 +21,11 @@ public class AgentApplicationPreviewDto implements Serializable {
...
@@ -21,6 +21,11 @@ public class AgentApplicationPreviewDto implements Serializable {
private
List
<
String
>
fileUrls
;
private
List
<
String
>
fileUrls
;
/**
* 渠道来源
*/
private
String
channel
;
public
List
<
String
>
getFileUrls
()
{
public
List
<
String
>
getFileUrls
()
{
return
fileUrls
;
return
fileUrls
;
}
}
...
@@ -76,4 +81,12 @@ public class AgentApplicationPreviewDto implements Serializable {
...
@@ -76,4 +81,12 @@ public class AgentApplicationPreviewDto implements Serializable {
public
void
setMessages
(
List
<
Message
>
messages
)
{
public
void
setMessages
(
List
<
Message
>
messages
)
{
this
.
messages
=
messages
;
this
.
messages
=
messages
;
}
}
public
String
getChannel
()
{
return
channel
;
}
public
void
setChannel
(
String
channel
)
{
this
.
channel
=
channel
;
}
}
}
src/main/java/cn/com/poc/agent_application/rest/impl/AgentApplicationInfoRestImpl.java
View file @
f6aa86e3
...
@@ -12,7 +12,9 @@ import cn.com.poc.agent_application.utils.AgentApplicationTools;
...
@@ -12,7 +12,9 @@ import cn.com.poc.agent_application.utils.AgentApplicationTools;
import
cn.com.poc.common.annotation.RedisLimit
;
import
cn.com.poc.common.annotation.RedisLimit
;
import
cn.com.poc.common.constant.CommonConstant
;
import
cn.com.poc.common.constant.CommonConstant
;
import
cn.com.poc.common.utils.BlContext
;
import
cn.com.poc.common.utils.BlContext
;
import
cn.com.poc.common.utils.DocumentLoad
;
import
cn.com.poc.data_analyze.aggregate.DataAnalyzeReportService
;
import
cn.com.poc.data_analyze.constants.DataAnalyzeChannelEnum
;
import
cn.com.poc.data_analyze.constants.DataAnalyzeTypeEnum
;
import
cn.com.poc.equity.aggregate.MemberEquityService
;
import
cn.com.poc.equity.aggregate.MemberEquityService
;
import
cn.com.poc.equity.aggregate.PointDeductionRulesService
;
import
cn.com.poc.equity.aggregate.PointDeductionRulesService
;
import
cn.com.poc.equity.constants.ModifyEventEnum
;
import
cn.com.poc.equity.constants.ModifyEventEnum
;
...
@@ -38,8 +40,6 @@ import org.springframework.util.Assert;
...
@@ -38,8 +40,6 @@ import org.springframework.util.Assert;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.io.PrintWriter
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.*
;
...
@@ -78,6 +78,9 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
...
@@ -78,6 +78,9 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
@Resource
@Resource
private
BizPointDeductionRulesService
bizPointDeductionRulesService
;
private
BizPointDeductionRulesService
bizPointDeductionRulesService
;
@Resource
private
DataAnalyzeReportService
dataAnalyzeReportService
;
@Override
@Override
public
AgentApplicationInfoDto
saveVariableStructure
(
String
agentId
,
List
<
Variable
>
variableStructure
)
{
public
AgentApplicationInfoDto
saveVariableStructure
(
String
agentId
,
List
<
Variable
>
variableStructure
)
{
...
@@ -255,18 +258,19 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
...
@@ -255,18 +258,19 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
agentApplicationInfoService
.
callAgentApplication
(
agentId
,
dialogueId
,
model
,
agentApplicationInfoService
.
callAgentApplication
(
agentId
,
dialogueId
,
model
,
agentSystem
,
kdIds
.
toArray
(
new
Integer
[
0
]),
infoEntity
.
getCommunicationTurn
(),
topP
,
agentSystem
,
kdIds
.
toArray
(
new
Integer
[
0
]),
infoEntity
.
getCommunicationTurn
(),
topP
,
temperature
,
dto
.
getMessages
(),
tools
,
dto
.
getFileUrls
(),
httpServletResponse
);
temperature
,
dto
.
getMessages
(),
tools
,
dto
.
getFileUrls
(),
httpServletResponse
);
//数据采集
dataReport
(
dto
,
userBaseEntity
,
agentId
,
pointDeductionNum
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
httpServletResponse
.
setContentType
(
"text/event-stream"
);
httpServletResponse
.
setContentType
(
"text/event-stream"
);
PrintWriter
writer
=
httpServletResponse
.
getWriter
();
PrintWriter
writer
=
httpServletResponse
.
getWriter
();
writer
.
write
(
"data: {\"code\":-1,\"message\":\""
+
e
.
getLocalizedMessage
()
+
"\"} \n\n"
);
writer
.
write
(
"data: {\"code\":-1,\"message\":\""
+
e
.
getLocalizedMessage
()
+
"\"} \n\n"
);
writer
.
write
(
"data: [DONE]\n\n"
);
writer
.
write
(
"data: [DONE]\n\n"
);
writer
.
flush
();
writer
.
flush
();
if
(
StringUtils
.
isNotBlank
(
reduceSn
))
{
memberEquityService
.
rollbackPoint
(
reduceSn
);
memberEquityService
.
rollbackPoint
(
reduceSn
);
}
}
}
}
}
@Override
@Override
public
List
<
BizAgentApplicationLargeModelListDto
>
getLargeModelList
()
throws
Exception
{
public
List
<
BizAgentApplicationLargeModelListDto
>
getLargeModelList
()
throws
Exception
{
List
<
BizAgentApplicationLargeModelListEntity
>
entities
=
bizAgentApplicationLargeModelListService
.
findByExample
(
new
BizAgentApplicationLargeModelListEntity
(),
null
);
List
<
BizAgentApplicationLargeModelListEntity
>
entities
=
bizAgentApplicationLargeModelListService
.
findByExample
(
new
BizAgentApplicationLargeModelListEntity
(),
null
);
...
@@ -433,4 +437,12 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
...
@@ -433,4 +437,12 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
Assert
.
notNull
(
agentId
);
Assert
.
notNull
(
agentId
);
LongMemory
.
clean
(
agentId
);
LongMemory
.
clean
(
agentId
);
}
}
private
void
dataReport
(
AgentApplicationPreviewDto
dto
,
UserBaseEntity
userBaseEntity
,
String
agentId
,
Long
pointDeductionNum
)
{
if
(
StringUtils
.
isBlank
(
dto
.
getChannel
()))
{
dto
.
setChannel
(
DataAnalyzeChannelEnum
.
PREVIEW
.
getChannel
());
}
dataAnalyzeReportService
.
dataReportByDialogue
(
userBaseEntity
.
getUserId
(),
DataAnalyzeTypeEnum
.
AGENT
,
agentId
,
DataAnalyzeChannelEnum
.
valueOf
(
dto
.
getChannel
()));
dataAnalyzeReportService
.
dataReportByPoint
(
userBaseEntity
.
getUserId
(),
new
BigDecimal
(
pointDeductionNum
),
DataAnalyzeTypeEnum
.
AGENT
,
agentId
,
DataAnalyzeChannelEnum
.
valueOf
(
dto
.
getChannel
()));
}
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/aggregate/DataAnalyzeReportService.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
aggregate
;
import
cn.com.poc.data_analyze.constants.DataAnalyzeChannelEnum
;
import
cn.com.poc.data_analyze.constants.DataAnalyzeTypeEnum
;
import
java.math.BigDecimal
;
/**
* 应用数据分析-数据上报服务
*
* @author alex.yao
* @date 2024/12/10
*/
public
interface
DataAnalyzeReportService
{
/**
* 数据上报- 积分使用情况
*
* @param memberId
* @param point
* @param type
* @param relationId
* @param channel
*/
void
dataReportByPoint
(
Long
memberId
,
BigDecimal
point
,
DataAnalyzeTypeEnum
type
,
String
relationId
,
DataAnalyzeChannelEnum
channel
);
/**
* 数据上报- 应用对话次数记录
*
* @param memberId
* @param type
* @param relationId
* @param channel
*/
void
dataReportByDialogue
(
Long
memberId
,
DataAnalyzeTypeEnum
type
,
String
relationId
,
DataAnalyzeChannelEnum
channel
);
}
src/main/java/cn/com/poc/data_analyze/aggregate/impl/DataAnalyzeReportServiceImpl.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
aggregate
.
impl
;
import
cn.com.poc.common.utils.DateUtils
;
import
cn.com.poc.data_analyze.aggregate.DataAnalyzeReportService
;
import
cn.com.poc.data_analyze.constants.DataAnalyzeChannelEnum
;
import
cn.com.poc.data_analyze.constants.DataAnalyzeTypeEnum
;
import
cn.com.poc.data_analyze.entity.*
;
import
cn.com.poc.data_analyze.service.BizDataAnalyzeDialogueRecordService
;
import
cn.com.poc.data_analyze.service.BizDataAnalyzePointRecordService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
/**
* @author alex.yao
* @date 2024/12/10
*/
@Service
public
class
DataAnalyzeReportServiceImpl
implements
DataAnalyzeReportService
{
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
DataAnalyzeReportService
.
class
);
@Resource
private
BizDataAnalyzePointRecordService
bizDataAnalyzePointRecordService
;
@Resource
private
BizDataAnalyzeDialogueRecordService
bizDataAnalyzeDialogueRecordService
;
@Override
public
void
dataReportByPoint
(
Long
memberId
,
BigDecimal
point
,
DataAnalyzeTypeEnum
type
,
String
relationId
,
DataAnalyzeChannelEnum
channel
)
{
try
{
BizDataAnalyzePointRecordEntity
entity
=
new
BizDataAnalyzePointRecordEntity
();
entity
.
setRelationId
(
relationId
);
entity
.
setType
(
type
.
getType
());
entity
.
setMemberId
(
memberId
);
entity
.
setPointNum
(
point
.
setScale
(
2
).
doubleValue
());
entity
.
setChannel
(
channel
.
getChannel
());
entity
.
setDatetime
(
DateUtils
.
getCurrDateTime
());
bizDataAnalyzePointRecordService
.
save
(
entity
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"积分使用情况-数据统计异常"
,
e
);
}
}
@Override
public
void
dataReportByDialogue
(
Long
memberId
,
DataAnalyzeTypeEnum
type
,
String
relationId
,
DataAnalyzeChannelEnum
channel
)
{
try
{
BizDataAnalyzeDialogueRecordEntity
bizDataAnalyzeDialogueRecordEntity
=
new
BizDataAnalyzeDialogueRecordEntity
();
bizDataAnalyzeDialogueRecordEntity
.
setRelationId
(
relationId
);
bizDataAnalyzeDialogueRecordEntity
.
setType
(
type
.
getType
());
bizDataAnalyzeDialogueRecordEntity
.
setMemberId
(
memberId
);
bizDataAnalyzeDialogueRecordEntity
.
setChannel
(
channel
.
getChannel
());
bizDataAnalyzeDialogueRecordEntity
.
setDatetime
(
DateUtils
.
getCurrDateTime
());
bizDataAnalyzeDialogueRecordService
.
save
(
bizDataAnalyzeDialogueRecordEntity
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"对话次数统计情况-数据统计异常"
,
e
);
}
}
}
src/main/java/cn/com/poc/data_analyze/constants/DataAnalyzeChannelEnum.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
constants
;
/**
* 数据来源渠道枚举
*
* @author alex.yao
* @date 2024/12/10
*/
public
enum
DataAnalyzeChannelEnum
{
/**
* 预览调试
*/
PREVIEW
(
"preview"
),
/**
* 多模型调试
*/
MULTI_PREVIEW
(
"multi_preview"
),
/**
* 首页
*/
INDEX
(
"index"
),
/**
* 应用广场
*/
MALL
(
"mall"
),
/**
* 链接分享
*/
LINK_SHARE
(
"link_share"
),
/**
* API调用
*/
API
(
"api"
),
;
private
String
channel
;
public
String
getChannel
()
{
return
channel
;
}
DataAnalyzeChannelEnum
(
String
channel
)
{
this
.
channel
=
channel
;
}
}
src/main/java/cn/com/poc/data_analyze/constants/DataAnalyzeTimeDimensionEnum.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
constants
;
/**
* @author alex.yao
* @date 2024/12/11
*/
public
enum
DataAnalyzeTimeDimensionEnum
{
today
,
week
,
month
,
;
}
src/main/java/cn/com/poc/data_analyze/constants/DataAnalyzeTimeRangeEnum.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
constants
;
/**
* 应用数据分析-时间范围枚举
*
* @author alex.yao
* @date 2024/12/11
*/
public
enum
DataAnalyzeTimeRangeEnum
{
CUSTOMIZE
(
"customize"
),
WEEK
(
"week"
),
MONTH
(
"month"
),
;
private
String
type
;
DataAnalyzeTimeRangeEnum
(
String
type
)
{
this
.
type
=
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getType
()
{
return
type
;
}
}
src/main/java/cn/com/poc/data_analyze/constants/DataAnalyzeTypeEnum.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
constants
;
/**
* @author alex.yao
* @date 2024/12/10
*/
public
enum
DataAnalyzeTypeEnum
{
AGENT
(
"agent"
),
;
private
String
type
;
public
String
getType
()
{
return
type
;
}
DataAnalyzeTypeEnum
(
String
type
)
{
this
.
type
=
type
;
}
}
src/main/java/cn/com/poc/data_analyze/convert/BizDataAnalyzeCollectConvert.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
convert
;
import
cn.com.poc.data_analyze.model.BizDataAnalyzeCollectModel
;
import
cn.com.poc.data_analyze.entity.BizDataAnalyzeCollectEntity
;
import
cn.com.poc.data_analyze.dto.BizDataAnalyzeCollectDto
;
public
class
BizDataAnalyzeCollectConvert
{
public
static
BizDataAnalyzeCollectEntity
modelToEntity
(
BizDataAnalyzeCollectModel
model
){
BizDataAnalyzeCollectEntity
entity
=
new
BizDataAnalyzeCollectEntity
();
entity
.
setId
(
model
.
getId
());
entity
.
setRelationId
(
model
.
getRelationId
());
entity
.
setType
(
model
.
getType
());
entity
.
setChannel
(
model
.
getChannel
());
entity
.
setTotalPoints
(
model
.
getTotalPoints
());
entity
.
setUsageCount
(
model
.
getUsageCount
());
entity
.
setUsersCount
(
model
.
getUsersCount
());
entity
.
setDataDate
(
model
.
getDataDate
());
entity
.
setIsDeleted
(
model
.
getIsDeleted
());
entity
.
setCreator
(
model
.
getCreator
());
entity
.
setCreatedTime
(
model
.
getCreatedTime
());
entity
.
setModifier
(
model
.
getModifier
());
entity
.
setModifiedTime
(
model
.
getModifiedTime
());
entity
.
setSysVersion
(
model
.
getSysVersion
());
return
entity
;
}
public
static
BizDataAnalyzeCollectModel
entityToModel
(
BizDataAnalyzeCollectEntity
entity
){
BizDataAnalyzeCollectModel
model
=
new
BizDataAnalyzeCollectModel
();
model
.
setId
(
entity
.
getId
());
model
.
setRelationId
(
entity
.
getRelationId
());
model
.
setType
(
entity
.
getType
());
model
.
setChannel
(
entity
.
getChannel
());
model
.
setTotalPoints
(
entity
.
getTotalPoints
());
model
.
setUsageCount
(
entity
.
getUsageCount
());
model
.
setUsersCount
(
entity
.
getUsersCount
());
model
.
setDataDate
(
entity
.
getDataDate
());
model
.
setIsDeleted
(
entity
.
getIsDeleted
());
model
.
setCreator
(
entity
.
getCreator
());
model
.
setCreatedTime
(
entity
.
getCreatedTime
());
model
.
setModifier
(
entity
.
getModifier
());
model
.
setModifiedTime
(
entity
.
getModifiedTime
());
model
.
setSysVersion
(
entity
.
getSysVersion
());
return
model
;
}
public
static
BizDataAnalyzeCollectDto
entityToDto
(
BizDataAnalyzeCollectEntity
entity
){
BizDataAnalyzeCollectDto
dto
=
new
BizDataAnalyzeCollectDto
();
dto
.
setId
(
entity
.
getId
());
dto
.
setRelationId
(
entity
.
getRelationId
());
dto
.
setType
(
entity
.
getType
());
dto
.
setChannel
(
entity
.
getChannel
());
dto
.
setTotalPoints
(
entity
.
getTotalPoints
());
dto
.
setUsageCount
(
entity
.
getUsageCount
());
dto
.
setUsersCount
(
entity
.
getUsersCount
());
dto
.
setDataDate
(
entity
.
getDataDate
());
dto
.
setIsDeleted
(
entity
.
getIsDeleted
());
dto
.
setCreator
(
entity
.
getCreator
());
dto
.
setCreatedTime
(
entity
.
getCreatedTime
());
dto
.
setModifier
(
entity
.
getModifier
());
dto
.
setModifiedTime
(
entity
.
getModifiedTime
());
dto
.
setSysVersion
(
entity
.
getSysVersion
());
return
dto
;
}
public
static
BizDataAnalyzeCollectEntity
dtoToEntity
(
BizDataAnalyzeCollectDto
dto
){
BizDataAnalyzeCollectEntity
entity
=
new
BizDataAnalyzeCollectEntity
();
entity
.
setId
(
dto
.
getId
());
entity
.
setRelationId
(
dto
.
getRelationId
());
entity
.
setType
(
dto
.
getType
());
entity
.
setChannel
(
dto
.
getChannel
());
entity
.
setTotalPoints
(
dto
.
getTotalPoints
());
entity
.
setUsageCount
(
dto
.
getUsageCount
());
entity
.
setUsersCount
(
dto
.
getUsersCount
());
entity
.
setDataDate
(
dto
.
getDataDate
());
entity
.
setIsDeleted
(
dto
.
getIsDeleted
());
entity
.
setCreator
(
dto
.
getCreator
());
entity
.
setCreatedTime
(
dto
.
getCreatedTime
());
entity
.
setModifier
(
dto
.
getModifier
());
entity
.
setModifiedTime
(
dto
.
getModifiedTime
());
entity
.
setSysVersion
(
dto
.
getSysVersion
());
return
entity
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/convert/BizDataAnalyzeDialogueRecordConvert.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
convert
;
import
cn.com.poc.data_analyze.model.BizDataAnalyzeDialogueRecordModel
;
import
cn.com.poc.data_analyze.entity.BizDataAnalyzeDialogueRecordEntity
;
import
cn.com.poc.data_analyze.dto.BizDataAnalyzeDialogueRecordDto
;
public
class
BizDataAnalyzeDialogueRecordConvert
{
public
static
BizDataAnalyzeDialogueRecordEntity
modelToEntity
(
BizDataAnalyzeDialogueRecordModel
model
){
BizDataAnalyzeDialogueRecordEntity
entity
=
new
BizDataAnalyzeDialogueRecordEntity
();
entity
.
setId
(
model
.
getId
());
entity
.
setRelationId
(
model
.
getRelationId
());
entity
.
setType
(
model
.
getType
());
entity
.
setMemberId
(
model
.
getMemberId
());
entity
.
setChannel
(
model
.
getChannel
());
entity
.
setDatetime
(
model
.
getDatetime
());
return
entity
;
}
public
static
BizDataAnalyzeDialogueRecordModel
entityToModel
(
BizDataAnalyzeDialogueRecordEntity
entity
){
BizDataAnalyzeDialogueRecordModel
model
=
new
BizDataAnalyzeDialogueRecordModel
();
model
.
setId
(
entity
.
getId
());
model
.
setRelationId
(
entity
.
getRelationId
());
model
.
setType
(
entity
.
getType
());
model
.
setMemberId
(
entity
.
getMemberId
());
model
.
setChannel
(
entity
.
getChannel
());
model
.
setDatetime
(
entity
.
getDatetime
());
return
model
;
}
public
static
BizDataAnalyzeDialogueRecordDto
entityToDto
(
BizDataAnalyzeDialogueRecordEntity
entity
){
BizDataAnalyzeDialogueRecordDto
dto
=
new
BizDataAnalyzeDialogueRecordDto
();
dto
.
setId
(
entity
.
getId
());
dto
.
setRelationId
(
entity
.
getRelationId
());
dto
.
setType
(
entity
.
getType
());
dto
.
setMemberId
(
entity
.
getMemberId
());
dto
.
setChannel
(
entity
.
getChannel
());
dto
.
setDatetime
(
entity
.
getDatetime
());
return
dto
;
}
public
static
BizDataAnalyzeDialogueRecordEntity
dtoToEntity
(
BizDataAnalyzeDialogueRecordDto
dto
){
BizDataAnalyzeDialogueRecordEntity
entity
=
new
BizDataAnalyzeDialogueRecordEntity
();
entity
.
setId
(
dto
.
getId
());
entity
.
setRelationId
(
dto
.
getRelationId
());
entity
.
setType
(
dto
.
getType
());
entity
.
setMemberId
(
dto
.
getMemberId
());
entity
.
setChannel
(
dto
.
getChannel
());
entity
.
setDatetime
(
dto
.
getDatetime
());
return
entity
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/convert/BizDataAnalyzePointRecordConvert.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
convert
;
import
cn.com.poc.data_analyze.model.BizDataAnalyzePointRecordModel
;
import
cn.com.poc.data_analyze.entity.BizDataAnalyzePointRecordEntity
;
import
cn.com.poc.data_analyze.dto.BizDataAnalyzePointRecordDto
;
public
class
BizDataAnalyzePointRecordConvert
{
public
static
BizDataAnalyzePointRecordEntity
modelToEntity
(
BizDataAnalyzePointRecordModel
model
){
BizDataAnalyzePointRecordEntity
entity
=
new
BizDataAnalyzePointRecordEntity
();
entity
.
setId
(
model
.
getId
());
entity
.
setRelationId
(
model
.
getRelationId
());
entity
.
setType
(
model
.
getType
());
entity
.
setMemberId
(
model
.
getMemberId
());
entity
.
setPointNum
(
model
.
getPointNum
());
entity
.
setChannel
(
model
.
getChannel
());
entity
.
setDatetime
(
model
.
getDatetime
());
return
entity
;
}
public
static
BizDataAnalyzePointRecordModel
entityToModel
(
BizDataAnalyzePointRecordEntity
entity
){
BizDataAnalyzePointRecordModel
model
=
new
BizDataAnalyzePointRecordModel
();
model
.
setId
(
entity
.
getId
());
model
.
setRelationId
(
entity
.
getRelationId
());
model
.
setType
(
entity
.
getType
());
model
.
setMemberId
(
entity
.
getMemberId
());
model
.
setPointNum
(
entity
.
getPointNum
());
model
.
setChannel
(
entity
.
getChannel
());
model
.
setDatetime
(
entity
.
getDatetime
());
return
model
;
}
public
static
BizDataAnalyzePointRecordDto
entityToDto
(
BizDataAnalyzePointRecordEntity
entity
){
BizDataAnalyzePointRecordDto
dto
=
new
BizDataAnalyzePointRecordDto
();
dto
.
setId
(
entity
.
getId
());
dto
.
setRelationId
(
entity
.
getRelationId
());
dto
.
setType
(
entity
.
getType
());
dto
.
setMemberId
(
entity
.
getMemberId
());
dto
.
setPointNum
(
entity
.
getPointNum
());
dto
.
setChannel
(
entity
.
getChannel
());
dto
.
setDatetime
(
entity
.
getDatetime
());
return
dto
;
}
public
static
BizDataAnalyzePointRecordEntity
dtoToEntity
(
BizDataAnalyzePointRecordDto
dto
){
BizDataAnalyzePointRecordEntity
entity
=
new
BizDataAnalyzePointRecordEntity
();
entity
.
setId
(
dto
.
getId
());
entity
.
setRelationId
(
dto
.
getRelationId
());
entity
.
setType
(
dto
.
getType
());
entity
.
setMemberId
(
dto
.
getMemberId
());
entity
.
setPointNum
(
dto
.
getPointNum
());
entity
.
setChannel
(
dto
.
getChannel
());
entity
.
setDatetime
(
dto
.
getDatetime
());
return
entity
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/domain/ChannelDataCount.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
domain
;
/**
* @author alex.yao
* @date 2024/12/11
*/
public
class
ChannelDataCount
{
private
String
channel
;
private
Long
count
;
public
String
getChannel
()
{
return
channel
;
}
public
void
setChannel
(
String
channel
)
{
this
.
channel
=
channel
;
}
public
Long
getCount
()
{
return
count
;
}
public
void
setCount
(
Long
count
)
{
this
.
count
=
count
;
}
}
src/main/java/cn/com/poc/data_analyze/domain/DataAnalyze.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
domain
;
/**
* @author alex.yao
* @date 2024/12/10
*/
public
class
DataAnalyze
{
/**
* 数量
*/
private
Double
num
;
/**
* 浮动 0 1
*/
private
Short
fluctuate
;
public
Double
getNum
()
{
return
num
;
}
public
void
setNum
(
Double
num
)
{
this
.
num
=
num
;
}
public
Short
getFluctuate
()
{
return
fluctuate
;
}
public
void
setFluctuate
(
Short
fluctuate
)
{
this
.
fluctuate
=
fluctuate
;
}
}
src/main/java/cn/com/poc/data_analyze/domain/DataAnalyzeInfo.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
domain
;
/**
* @author alex.yao
* @date 2024/12/10
*/
public
class
DataAnalyzeInfo
{
private
DataAnalyze
usersCount
;
private
DataAnalyze
usageCount
;
private
DataAnalyze
pointsCount
;
public
DataAnalyze
getUsersCount
()
{
return
usersCount
;
}
public
void
setUsersCount
(
DataAnalyze
usersCount
)
{
this
.
usersCount
=
usersCount
;
}
public
DataAnalyze
getUsageCount
()
{
return
usageCount
;
}
public
void
setUsageCount
(
DataAnalyze
usageCount
)
{
this
.
usageCount
=
usageCount
;
}
public
DataAnalyze
getPointsCount
()
{
return
pointsCount
;
}
public
void
setPointsCount
(
DataAnalyze
pointsCount
)
{
this
.
pointsCount
=
pointsCount
;
}
}
src/main/java/cn/com/poc/data_analyze/domain/DataAnalyzeTimeRange.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
domain
;
/**
* @author alex.yao
* @date 2024/12/11
*/
public
class
DataAnalyzeTimeRange
{
/**
* 时间范围类型
* 1:自定义 customize
* 2:最近一周 week
* 3:最近一个月 month
*/
private
String
rangType
;
private
String
startTime
;
private
String
endTime
;
public
String
getRangType
()
{
return
rangType
;
}
public
void
setRangType
(
String
rangType
)
{
this
.
rangType
=
rangType
;
}
public
String
getStartTime
()
{
return
startTime
;
}
public
void
setStartTime
(
String
startTime
)
{
this
.
startTime
=
startTime
;
}
public
String
getEndTime
()
{
return
endTime
;
}
public
void
setEndTime
(
String
endTime
)
{
this
.
endTime
=
endTime
;
}
}
src/main/java/cn/com/poc/data_analyze/dto/BizDataAnalyzeCollectDto.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
dto
;
public
class
BizDataAnalyzeCollectDto
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*
*/
private
java
.
lang
.
Long
id
;
public
java
.
lang
.
Long
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Long
id
){
this
.
id
=
id
;
}
/** relation_id
*关联id
*/
private
java
.
lang
.
String
relationId
;
public
java
.
lang
.
String
getRelationId
(){
return
this
.
relationId
;
}
public
void
setRelationId
(
java
.
lang
.
String
relationId
){
this
.
relationId
=
relationId
;
}
/** type
*
*/
private
java
.
lang
.
String
type
;
public
java
.
lang
.
String
getType
(){
return
this
.
type
;
}
public
void
setType
(
java
.
lang
.
String
type
){
this
.
type
=
type
;
}
/** channel
*渠道
*/
private
java
.
lang
.
String
channel
;
public
java
.
lang
.
String
getChannel
(){
return
this
.
channel
;
}
public
void
setChannel
(
java
.
lang
.
String
channel
){
this
.
channel
=
channel
;
}
/** total_points
*消耗积分数
*/
private
java
.
lang
.
Long
totalPoints
;
public
java
.
lang
.
Long
getTotalPoints
(){
return
this
.
totalPoints
;
}
public
void
setTotalPoints
(
java
.
lang
.
Long
totalPoints
){
this
.
totalPoints
=
totalPoints
;
}
/** usage_count
*使用量
*/
private
java
.
lang
.
Long
usageCount
;
public
java
.
lang
.
Long
getUsageCount
(){
return
this
.
usageCount
;
}
public
void
setUsageCount
(
java
.
lang
.
Long
usageCount
){
this
.
usageCount
=
usageCount
;
}
/** users_count
*使用人数
*/
private
java
.
lang
.
Integer
usersCount
;
public
java
.
lang
.
Integer
getUsersCount
(){
return
this
.
usersCount
;
}
public
void
setUsersCount
(
java
.
lang
.
Integer
usersCount
){
this
.
usersCount
=
usersCount
;
}
/** data_date
*数据日期
*/
private
java
.
util
.
Date
dataDate
;
public
java
.
util
.
Date
getDataDate
(){
return
this
.
dataDate
;
}
public
void
setDataDate
(
java
.
util
.
Date
dataDate
){
this
.
dataDate
=
dataDate
;
}
/** is_deleted
*是否删除
*/
private
java
.
lang
.
String
isDeleted
;
public
java
.
lang
.
String
getIsDeleted
(){
return
this
.
isDeleted
;
}
public
void
setIsDeleted
(
java
.
lang
.
String
isDeleted
){
this
.
isDeleted
=
isDeleted
;
}
/** CREATOR
*创建人
*/
private
java
.
lang
.
String
creator
;
public
java
.
lang
.
String
getCreator
(){
return
this
.
creator
;
}
public
void
setCreator
(
java
.
lang
.
String
creator
){
this
.
creator
=
creator
;
}
/** CREATED_TIME
*创建时间
*/
private
java
.
util
.
Date
createdTime
;
public
java
.
util
.
Date
getCreatedTime
(){
return
this
.
createdTime
;
}
public
void
setCreatedTime
(
java
.
util
.
Date
createdTime
){
this
.
createdTime
=
createdTime
;
}
/** MODIFIER
*修改人
*/
private
java
.
lang
.
String
modifier
;
public
java
.
lang
.
String
getModifier
(){
return
this
.
modifier
;
}
public
void
setModifier
(
java
.
lang
.
String
modifier
){
this
.
modifier
=
modifier
;
}
/** MODIFIED_TIME
*修改时间
*/
private
java
.
util
.
Date
modifiedTime
;
public
java
.
util
.
Date
getModifiedTime
(){
return
this
.
modifiedTime
;
}
public
void
setModifiedTime
(
java
.
util
.
Date
modifiedTime
){
this
.
modifiedTime
=
modifiedTime
;
}
/** SYS_VERSION
*版本号
*/
private
java
.
lang
.
Integer
sysVersion
;
public
java
.
lang
.
Integer
getSysVersion
(){
return
this
.
sysVersion
;
}
public
void
setSysVersion
(
java
.
lang
.
Integer
sysVersion
){
this
.
sysVersion
=
sysVersion
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/dto/BizDataAnalyzeDialogueRecordDto.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
dto
;
public
class
BizDataAnalyzeDialogueRecordDto
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*
*/
private
java
.
lang
.
Long
id
;
public
java
.
lang
.
Long
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Long
id
){
this
.
id
=
id
;
}
/** relation_id
*主体关联id
*/
private
java
.
lang
.
String
relationId
;
public
java
.
lang
.
String
getRelationId
(){
return
this
.
relationId
;
}
public
void
setRelationId
(
java
.
lang
.
String
relationId
){
this
.
relationId
=
relationId
;
}
/** type
*应用类型 agent-agent应用
*/
private
java
.
lang
.
String
type
;
public
java
.
lang
.
String
getType
(){
return
this
.
type
;
}
public
void
setType
(
java
.
lang
.
String
type
){
this
.
type
=
type
;
}
/** member_id
*用户id
*/
private
java
.
lang
.
Long
memberId
;
public
java
.
lang
.
Long
getMemberId
(){
return
this
.
memberId
;
}
public
void
setMemberId
(
java
.
lang
.
Long
memberId
){
this
.
memberId
=
memberId
;
}
/** channel
*使用渠道
应用调式: 调试、多模型调试
使用渠道: 首页、应用广场、链接分享、API调用
*/
private
java
.
lang
.
String
channel
;
public
java
.
lang
.
String
getChannel
(){
return
this
.
channel
;
}
public
void
setChannel
(
java
.
lang
.
String
channel
){
this
.
channel
=
channel
;
}
/** datetime
*对话上报时间
*/
private
java
.
util
.
Date
datetime
;
public
java
.
util
.
Date
getDatetime
(){
return
this
.
datetime
;
}
public
void
setDatetime
(
java
.
util
.
Date
datetime
){
this
.
datetime
=
datetime
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/dto/BizDataAnalyzePointRecordDto.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
dto
;
public
class
BizDataAnalyzePointRecordDto
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*
*/
private
java
.
lang
.
Long
id
;
public
java
.
lang
.
Long
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Long
id
){
this
.
id
=
id
;
}
/** relation_id
*主体关联id
*/
private
java
.
lang
.
String
relationId
;
public
java
.
lang
.
String
getRelationId
(){
return
this
.
relationId
;
}
public
void
setRelationId
(
java
.
lang
.
String
relationId
){
this
.
relationId
=
relationId
;
}
/** type
*应用类型 agent-agent应用
*/
private
java
.
lang
.
String
type
;
public
java
.
lang
.
String
getType
(){
return
this
.
type
;
}
public
void
setType
(
java
.
lang
.
String
type
){
this
.
type
=
type
;
}
/** member_id
*用户id
*/
private
java
.
lang
.
Long
memberId
;
public
java
.
lang
.
Long
getMemberId
(){
return
this
.
memberId
;
}
public
void
setMemberId
(
java
.
lang
.
Long
memberId
){
this
.
memberId
=
memberId
;
}
/** point_num
*积分使用情况 00.00
*/
private
java
.
lang
.
Double
pointNum
;
public
java
.
lang
.
Double
getPointNum
(){
return
this
.
pointNum
;
}
public
void
setPointNum
(
java
.
lang
.
Double
pointNum
){
this
.
pointNum
=
pointNum
;
}
/** channel
*使用渠道
应用调式: 调试、多模型调试
使用渠道: 首页、应用广场、链接分享、API调用
*/
private
java
.
lang
.
String
channel
;
public
java
.
lang
.
String
getChannel
(){
return
this
.
channel
;
}
public
void
setChannel
(
java
.
lang
.
String
channel
){
this
.
channel
=
channel
;
}
/** datetime
*上报时间
*/
private
java
.
util
.
Date
datetime
;
public
java
.
util
.
Date
getDatetime
(){
return
this
.
datetime
;
}
public
void
setDatetime
(
java
.
util
.
Date
datetime
){
this
.
datetime
=
datetime
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/entity/AgentDataAnalyzeGeneralEntity.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
entity
;
import
cn.com.poc.data_analyze.domain.DataAnalyzeInfo
;
import
java.io.Serializable
;
/**
* @author alex.yao
* @date 2024/12/10
*/
public
class
AgentDataAnalyzeGeneralEntity
implements
Serializable
{
private
String
timeDimension
;
private
DataAnalyzeInfo
dataAnalyzeInfo
;
public
String
getTimeDimension
()
{
return
timeDimension
;
}
public
void
setTimeDimension
(
String
timeDimension
)
{
this
.
timeDimension
=
timeDimension
;
}
public
DataAnalyzeInfo
getDataAnalyzeInfo
()
{
return
dataAnalyzeInfo
;
}
public
void
setDataAnalyzeInfo
(
DataAnalyzeInfo
dataAnalyzeInfo
)
{
this
.
dataAnalyzeInfo
=
dataAnalyzeInfo
;
}
}
src/main/java/cn/com/poc/data_analyze/entity/AgentDataAnalyzeTrendEntity.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
entity
;
/**
* @author alex.yao
* @date 2024/12/11
*/
public
class
AgentDataAnalyzeTrendEntity
{
private
String
date
;
private
Long
usersCount
;
private
Long
usageCount
;
private
Double
totalPoints
;
public
String
getDate
()
{
return
date
;
}
public
void
setDate
(
String
date
)
{
this
.
date
=
date
;
}
public
Long
getUsersCount
()
{
return
usersCount
;
}
public
void
setUsersCount
(
Long
usersCount
)
{
this
.
usersCount
=
usersCount
;
}
public
Long
getUsageCount
()
{
return
usageCount
;
}
public
void
setUsageCount
(
Long
usageCount
)
{
this
.
usageCount
=
usageCount
;
}
public
Double
getTotalPoints
()
{
return
totalPoints
;
}
public
void
setTotalPoints
(
Double
totalPoints
)
{
this
.
totalPoints
=
totalPoints
;
}
}
src/main/java/cn/com/poc/data_analyze/entity/BizDataAnalyzeCollectEntity.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
entity
;
public
class
BizDataAnalyzeCollectEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*
*/
private
java
.
lang
.
Long
id
;
public
java
.
lang
.
Long
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Long
id
){
this
.
id
=
id
;
}
/** relation_id
*关联id
*/
private
java
.
lang
.
String
relationId
;
public
java
.
lang
.
String
getRelationId
(){
return
this
.
relationId
;
}
public
void
setRelationId
(
java
.
lang
.
String
relationId
){
this
.
relationId
=
relationId
;
}
/** type
*
*/
private
java
.
lang
.
String
type
;
public
java
.
lang
.
String
getType
(){
return
this
.
type
;
}
public
void
setType
(
java
.
lang
.
String
type
){
this
.
type
=
type
;
}
/** channel
*渠道
*/
private
java
.
lang
.
String
channel
;
public
java
.
lang
.
String
getChannel
(){
return
this
.
channel
;
}
public
void
setChannel
(
java
.
lang
.
String
channel
){
this
.
channel
=
channel
;
}
/** total_points
*消耗积分数
*/
private
java
.
lang
.
Long
totalPoints
;
public
java
.
lang
.
Long
getTotalPoints
(){
return
this
.
totalPoints
;
}
public
void
setTotalPoints
(
java
.
lang
.
Long
totalPoints
){
this
.
totalPoints
=
totalPoints
;
}
/** usage_count
*使用量
*/
private
java
.
lang
.
Long
usageCount
;
public
java
.
lang
.
Long
getUsageCount
(){
return
this
.
usageCount
;
}
public
void
setUsageCount
(
java
.
lang
.
Long
usageCount
){
this
.
usageCount
=
usageCount
;
}
/** users_count
*使用人数
*/
private
java
.
lang
.
Integer
usersCount
;
public
java
.
lang
.
Integer
getUsersCount
(){
return
this
.
usersCount
;
}
public
void
setUsersCount
(
java
.
lang
.
Integer
usersCount
){
this
.
usersCount
=
usersCount
;
}
/** data_date
*数据日期
*/
private
java
.
util
.
Date
dataDate
;
public
java
.
util
.
Date
getDataDate
(){
return
this
.
dataDate
;
}
public
void
setDataDate
(
java
.
util
.
Date
dataDate
){
this
.
dataDate
=
dataDate
;
}
/** is_deleted
*是否删除
*/
private
java
.
lang
.
String
isDeleted
;
public
java
.
lang
.
String
getIsDeleted
(){
return
this
.
isDeleted
;
}
public
void
setIsDeleted
(
java
.
lang
.
String
isDeleted
){
this
.
isDeleted
=
isDeleted
;
}
/** CREATOR
*创建人
*/
private
java
.
lang
.
String
creator
;
public
java
.
lang
.
String
getCreator
(){
return
this
.
creator
;
}
public
void
setCreator
(
java
.
lang
.
String
creator
){
this
.
creator
=
creator
;
}
/** CREATED_TIME
*创建时间
*/
private
java
.
util
.
Date
createdTime
;
public
java
.
util
.
Date
getCreatedTime
(){
return
this
.
createdTime
;
}
public
void
setCreatedTime
(
java
.
util
.
Date
createdTime
){
this
.
createdTime
=
createdTime
;
}
/** MODIFIER
*修改人
*/
private
java
.
lang
.
String
modifier
;
public
java
.
lang
.
String
getModifier
(){
return
this
.
modifier
;
}
public
void
setModifier
(
java
.
lang
.
String
modifier
){
this
.
modifier
=
modifier
;
}
/** MODIFIED_TIME
*修改时间
*/
private
java
.
util
.
Date
modifiedTime
;
public
java
.
util
.
Date
getModifiedTime
(){
return
this
.
modifiedTime
;
}
public
void
setModifiedTime
(
java
.
util
.
Date
modifiedTime
){
this
.
modifiedTime
=
modifiedTime
;
}
/** SYS_VERSION
*版本号
*/
private
java
.
lang
.
Integer
sysVersion
;
public
java
.
lang
.
Integer
getSysVersion
(){
return
this
.
sysVersion
;
}
public
void
setSysVersion
(
java
.
lang
.
Integer
sysVersion
){
this
.
sysVersion
=
sysVersion
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/entity/BizDataAnalyzeDialogueRecordEntity.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
entity
;
public
class
BizDataAnalyzeDialogueRecordEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*
*/
private
java
.
lang
.
Long
id
;
public
java
.
lang
.
Long
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Long
id
){
this
.
id
=
id
;
}
/** relation_id
*主体关联id
*/
private
java
.
lang
.
String
relationId
;
public
java
.
lang
.
String
getRelationId
(){
return
this
.
relationId
;
}
public
void
setRelationId
(
java
.
lang
.
String
relationId
){
this
.
relationId
=
relationId
;
}
/** type
*应用类型 agent-agent应用
*/
private
java
.
lang
.
String
type
;
public
java
.
lang
.
String
getType
(){
return
this
.
type
;
}
public
void
setType
(
java
.
lang
.
String
type
){
this
.
type
=
type
;
}
/** member_id
*用户id
*/
private
java
.
lang
.
Long
memberId
;
public
java
.
lang
.
Long
getMemberId
(){
return
this
.
memberId
;
}
public
void
setMemberId
(
java
.
lang
.
Long
memberId
){
this
.
memberId
=
memberId
;
}
/** channel
*使用渠道
应用调式: 调试、多模型调试
使用渠道: 首页、应用广场、链接分享、API调用
*/
private
java
.
lang
.
String
channel
;
public
java
.
lang
.
String
getChannel
(){
return
this
.
channel
;
}
public
void
setChannel
(
java
.
lang
.
String
channel
){
this
.
channel
=
channel
;
}
/** datetime
*对话上报时间
*/
private
java
.
util
.
Date
datetime
;
public
java
.
util
.
Date
getDatetime
(){
return
this
.
datetime
;
}
public
void
setDatetime
(
java
.
util
.
Date
datetime
){
this
.
datetime
=
datetime
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/entity/BizDataAnalyzePointRecordEntity.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
entity
;
public
class
BizDataAnalyzePointRecordEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*
*/
private
java
.
lang
.
Long
id
;
public
java
.
lang
.
Long
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Long
id
){
this
.
id
=
id
;
}
/** relation_id
*主体关联id
*/
private
java
.
lang
.
String
relationId
;
public
java
.
lang
.
String
getRelationId
(){
return
this
.
relationId
;
}
public
void
setRelationId
(
java
.
lang
.
String
relationId
){
this
.
relationId
=
relationId
;
}
/** type
*应用类型 agent-agent应用
*/
private
java
.
lang
.
String
type
;
public
java
.
lang
.
String
getType
(){
return
this
.
type
;
}
public
void
setType
(
java
.
lang
.
String
type
){
this
.
type
=
type
;
}
/** member_id
*用户id
*/
private
java
.
lang
.
Long
memberId
;
public
java
.
lang
.
Long
getMemberId
(){
return
this
.
memberId
;
}
public
void
setMemberId
(
java
.
lang
.
Long
memberId
){
this
.
memberId
=
memberId
;
}
/** point_num
*积分使用情况 00.00
*/
private
java
.
lang
.
Double
pointNum
;
public
java
.
lang
.
Double
getPointNum
(){
return
this
.
pointNum
;
}
public
void
setPointNum
(
java
.
lang
.
Double
pointNum
){
this
.
pointNum
=
pointNum
;
}
/** channel
*使用渠道
应用调式: 调试、多模型调试
使用渠道: 首页、应用广场、链接分享、API调用
*/
private
java
.
lang
.
String
channel
;
public
java
.
lang
.
String
getChannel
(){
return
this
.
channel
;
}
public
void
setChannel
(
java
.
lang
.
String
channel
){
this
.
channel
=
channel
;
}
/** datetime
*上报时间
*/
private
java
.
util
.
Date
datetime
;
public
java
.
util
.
Date
getDatetime
(){
return
this
.
datetime
;
}
public
void
setDatetime
(
java
.
util
.
Date
datetime
){
this
.
datetime
=
datetime
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/entity/ChannelPointCountEntity.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
entity
;
/**
* @author alex.yao
* @date 2024/12/11
*/
public
class
ChannelPointCountEntity
{
private
String
channel
;
private
Double
count
;
public
String
getChannel
()
{
return
channel
;
}
public
void
setChannel
(
String
channel
)
{
this
.
channel
=
channel
;
}
public
Double
getCount
()
{
return
count
;
}
public
void
setCount
(
Double
count
)
{
this
.
count
=
count
;
}
}
src/main/java/cn/com/poc/data_analyze/entity/ChannelUsageCountEntity.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
entity
;
/**
* @author alex.yao
* @date 2024/12/11
*/
public
class
ChannelUsageCountEntity
{
private
String
channel
;
private
Long
count
;
public
String
getChannel
()
{
return
channel
;
}
public
void
setChannel
(
String
channel
)
{
this
.
channel
=
channel
;
}
public
Long
getCount
()
{
return
count
;
}
public
void
setCount
(
Long
count
)
{
this
.
count
=
count
;
}
}
src/main/java/cn/com/poc/data_analyze/entity/ChannelUsersCountEntity.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
entity
;
import
cn.com.poc.data_analyze.domain.ChannelDataCount
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @author alex.yao
* @date 2024/12/10
*/
public
class
ChannelUsersCountEntity
implements
Serializable
{
/**
* 时间范围
*/
private
String
date
;
/**
* 渠道用户使用人数
*/
private
List
<
ChannelDataCount
>
channelDataCount
;
public
String
getDate
()
{
return
date
;
}
public
void
setDate
(
String
date
)
{
this
.
date
=
date
;
}
public
List
<
ChannelDataCount
>
getChannelDataCount
()
{
return
channelDataCount
;
}
public
void
setChannelDataCount
(
List
<
ChannelDataCount
>
channelDataCount
)
{
this
.
channelDataCount
=
channelDataCount
;
}
}
src/main/java/cn/com/poc/data_analyze/model/BizDataAnalyzeCollectModel.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
model
;
import
java.io.Serializable
;
import
cn.com.yict.framemax.data.model.BaseModelClass
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
javax.persistence.Id
;
import
org.hibernate.annotations.DynamicInsert
;
import
org.hibernate.annotations.DynamicUpdate
;
import
javax.persistence.Version
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
/**
* Model class for biz_data_analyze_collect
* Agent应用数据分析汇总表
*/
@Entity
@Table
(
name
=
"biz_data_analyze_collect"
)
@DynamicInsert
@DynamicUpdate
public
class
BizDataAnalyzeCollectModel
extends
BaseModelClass
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*
*/
private
java
.
lang
.
Long
id
;
@Column
(
name
=
"id"
,
length
=
19
)
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
public
java
.
lang
.
Long
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Long
id
){
this
.
id
=
id
;
super
.
addValidField
(
"id"
);
}
/** relation_id
*关联id
*/
private
java
.
lang
.
String
relationId
;
@Column
(
name
=
"relation_id"
,
length
=
120
)
public
java
.
lang
.
String
getRelationId
(){
return
this
.
relationId
;
}
public
void
setRelationId
(
java
.
lang
.
String
relationId
){
this
.
relationId
=
relationId
;
super
.
addValidField
(
"relationId"
);
}
/** type
*
*/
private
java
.
lang
.
String
type
;
@Column
(
name
=
"type"
,
length
=
15
)
public
java
.
lang
.
String
getType
(){
return
this
.
type
;
}
public
void
setType
(
java
.
lang
.
String
type
){
this
.
type
=
type
;
super
.
addValidField
(
"type"
);
}
/** channel
*渠道
*/
private
java
.
lang
.
String
channel
;
@Column
(
name
=
"channel"
,
length
=
15
)
public
java
.
lang
.
String
getChannel
(){
return
this
.
channel
;
}
public
void
setChannel
(
java
.
lang
.
String
channel
){
this
.
channel
=
channel
;
super
.
addValidField
(
"channel"
);
}
/** total_points
*消耗积分数
*/
private
java
.
lang
.
Long
totalPoints
;
@Column
(
name
=
"total_points"
,
length
=
22
)
public
java
.
lang
.
Long
getTotalPoints
(){
return
this
.
totalPoints
;
}
public
void
setTotalPoints
(
java
.
lang
.
Long
totalPoints
){
this
.
totalPoints
=
totalPoints
;
super
.
addValidField
(
"totalPoints"
);
}
/** usage_count
*使用量
*/
private
java
.
lang
.
Long
usageCount
;
@Column
(
name
=
"usage_count"
,
length
=
19
)
public
java
.
lang
.
Long
getUsageCount
(){
return
this
.
usageCount
;
}
public
void
setUsageCount
(
java
.
lang
.
Long
usageCount
){
this
.
usageCount
=
usageCount
;
super
.
addValidField
(
"usageCount"
);
}
/** users_count
*使用人数
*/
private
java
.
lang
.
Integer
usersCount
;
@Column
(
name
=
"users_count"
,
length
=
10
)
public
java
.
lang
.
Integer
getUsersCount
(){
return
this
.
usersCount
;
}
public
void
setUsersCount
(
java
.
lang
.
Integer
usersCount
){
this
.
usersCount
=
usersCount
;
super
.
addValidField
(
"usersCount"
);
}
/** data_date
*数据日期
*/
private
java
.
util
.
Date
dataDate
;
@Column
(
name
=
"data_date"
,
length
=
10
)
public
java
.
util
.
Date
getDataDate
(){
return
this
.
dataDate
;
}
public
void
setDataDate
(
java
.
util
.
Date
dataDate
){
this
.
dataDate
=
dataDate
;
super
.
addValidField
(
"dataDate"
);
}
/** is_deleted
*是否删除
*/
private
java
.
lang
.
String
isDeleted
;
@Column
(
name
=
"is_deleted"
,
length
=
1
)
public
java
.
lang
.
String
getIsDeleted
(){
return
this
.
isDeleted
;
}
public
void
setIsDeleted
(
java
.
lang
.
String
isDeleted
){
this
.
isDeleted
=
isDeleted
;
super
.
addValidField
(
"isDeleted"
);
}
/** CREATOR
*创建人
*/
private
java
.
lang
.
String
creator
;
@Column
(
name
=
"CREATOR"
,
length
=
50
)
public
java
.
lang
.
String
getCreator
(){
return
this
.
creator
;
}
public
void
setCreator
(
java
.
lang
.
String
creator
){
this
.
creator
=
creator
;
super
.
addValidField
(
"creator"
);
}
/** CREATED_TIME
*创建时间
*/
private
java
.
util
.
Date
createdTime
;
@Column
(
name
=
"CREATED_TIME"
,
length
=
19
)
public
java
.
util
.
Date
getCreatedTime
(){
return
this
.
createdTime
;
}
public
void
setCreatedTime
(
java
.
util
.
Date
createdTime
){
this
.
createdTime
=
createdTime
;
super
.
addValidField
(
"createdTime"
);
}
/** MODIFIER
*修改人
*/
private
java
.
lang
.
String
modifier
;
@Column
(
name
=
"MODIFIER"
,
length
=
50
)
public
java
.
lang
.
String
getModifier
(){
return
this
.
modifier
;
}
public
void
setModifier
(
java
.
lang
.
String
modifier
){
this
.
modifier
=
modifier
;
super
.
addValidField
(
"modifier"
);
}
/** MODIFIED_TIME
*修改时间
*/
private
java
.
util
.
Date
modifiedTime
;
@Column
(
name
=
"MODIFIED_TIME"
,
length
=
19
)
public
java
.
util
.
Date
getModifiedTime
(){
return
this
.
modifiedTime
;
}
public
void
setModifiedTime
(
java
.
util
.
Date
modifiedTime
){
this
.
modifiedTime
=
modifiedTime
;
super
.
addValidField
(
"modifiedTime"
);
}
/** SYS_VERSION
*版本号
*/
private
java
.
lang
.
Integer
sysVersion
;
@Column
(
name
=
"SYS_VERSION"
,
length
=
10
)
@Version
public
java
.
lang
.
Integer
getSysVersion
(){
return
this
.
sysVersion
;
}
public
void
setSysVersion
(
java
.
lang
.
Integer
sysVersion
){
this
.
sysVersion
=
sysVersion
;
super
.
addValidField
(
"sysVersion"
);
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/model/BizDataAnalyzeDialogueRecordModel.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
model
;
import
java.io.Serializable
;
import
cn.com.yict.framemax.data.model.BaseModelClass
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
javax.persistence.Id
;
import
org.hibernate.annotations.DynamicInsert
;
import
org.hibernate.annotations.DynamicUpdate
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
/**
* Model class for biz_data_analyze_dialogue_record
* 数据分析记录表 - 对话记录表
*/
@Entity
@Table
(
name
=
"biz_data_analyze_dialogue_record"
)
@DynamicInsert
@DynamicUpdate
public
class
BizDataAnalyzeDialogueRecordModel
extends
BaseModelClass
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*
*/
private
java
.
lang
.
Long
id
;
@Column
(
name
=
"id"
,
length
=
19
)
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
public
java
.
lang
.
Long
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Long
id
){
this
.
id
=
id
;
super
.
addValidField
(
"id"
);
}
/** relation_id
*主体关联id
*/
private
java
.
lang
.
String
relationId
;
@Column
(
name
=
"relation_id"
,
length
=
120
)
public
java
.
lang
.
String
getRelationId
(){
return
this
.
relationId
;
}
public
void
setRelationId
(
java
.
lang
.
String
relationId
){
this
.
relationId
=
relationId
;
super
.
addValidField
(
"relationId"
);
}
/** type
*应用类型 agent-agent应用
*/
private
java
.
lang
.
String
type
;
@Column
(
name
=
"type"
,
length
=
15
)
public
java
.
lang
.
String
getType
(){
return
this
.
type
;
}
public
void
setType
(
java
.
lang
.
String
type
){
this
.
type
=
type
;
super
.
addValidField
(
"type"
);
}
/** member_id
*用户id
*/
private
java
.
lang
.
Long
memberId
;
@Column
(
name
=
"member_id"
,
length
=
19
)
public
java
.
lang
.
Long
getMemberId
(){
return
this
.
memberId
;
}
public
void
setMemberId
(
java
.
lang
.
Long
memberId
){
this
.
memberId
=
memberId
;
super
.
addValidField
(
"memberId"
);
}
/** channel
*使用渠道
应用调式: 调试、多模型调试
使用渠道: 首页、应用广场、链接分享、API调用
*/
private
java
.
lang
.
String
channel
;
@Column
(
name
=
"channel"
,
length
=
20
)
public
java
.
lang
.
String
getChannel
(){
return
this
.
channel
;
}
public
void
setChannel
(
java
.
lang
.
String
channel
){
this
.
channel
=
channel
;
super
.
addValidField
(
"channel"
);
}
/** datetime
*对话上报时间
*/
private
java
.
util
.
Date
datetime
;
@Column
(
name
=
"datetime"
,
length
=
19
)
public
java
.
util
.
Date
getDatetime
(){
return
this
.
datetime
;
}
public
void
setDatetime
(
java
.
util
.
Date
datetime
){
this
.
datetime
=
datetime
;
super
.
addValidField
(
"datetime"
);
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/model/BizDataAnalyzePointRecordModel.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
model
;
import
java.io.Serializable
;
import
cn.com.yict.framemax.data.model.BaseModelClass
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
javax.persistence.Id
;
import
org.hibernate.annotations.DynamicInsert
;
import
org.hibernate.annotations.DynamicUpdate
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
/**
* Model class for biz_data_analyze_point_record
* 应用数据分析-积分使用情况
*/
@Entity
@Table
(
name
=
"biz_data_analyze_point_record"
)
@DynamicInsert
@DynamicUpdate
public
class
BizDataAnalyzePointRecordModel
extends
BaseModelClass
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*
*/
private
java
.
lang
.
Long
id
;
@Column
(
name
=
"id"
,
length
=
19
)
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
public
java
.
lang
.
Long
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Long
id
){
this
.
id
=
id
;
super
.
addValidField
(
"id"
);
}
/** relation_id
*主体关联id
*/
private
java
.
lang
.
String
relationId
;
@Column
(
name
=
"relation_id"
,
length
=
120
)
public
java
.
lang
.
String
getRelationId
(){
return
this
.
relationId
;
}
public
void
setRelationId
(
java
.
lang
.
String
relationId
){
this
.
relationId
=
relationId
;
super
.
addValidField
(
"relationId"
);
}
/** type
*应用类型 agent-agent应用
*/
private
java
.
lang
.
String
type
;
@Column
(
name
=
"type"
,
length
=
15
)
public
java
.
lang
.
String
getType
(){
return
this
.
type
;
}
public
void
setType
(
java
.
lang
.
String
type
){
this
.
type
=
type
;
super
.
addValidField
(
"type"
);
}
/** member_id
*用户id
*/
private
java
.
lang
.
Long
memberId
;
@Column
(
name
=
"member_id"
,
length
=
19
)
public
java
.
lang
.
Long
getMemberId
(){
return
this
.
memberId
;
}
public
void
setMemberId
(
java
.
lang
.
Long
memberId
){
this
.
memberId
=
memberId
;
super
.
addValidField
(
"memberId"
);
}
/** point_num
*积分使用情况 00.00
*/
private
java
.
lang
.
Double
pointNum
;
@Column
(
name
=
"point_num"
,
length
=
22
)
public
java
.
lang
.
Double
getPointNum
(){
return
this
.
pointNum
;
}
public
void
setPointNum
(
java
.
lang
.
Double
pointNum
){
this
.
pointNum
=
pointNum
;
super
.
addValidField
(
"pointNum"
);
}
/** channel
*使用渠道
应用调式: 调试、多模型调试
使用渠道: 首页、应用广场、链接分享、API调用
*/
private
java
.
lang
.
String
channel
;
@Column
(
name
=
"channel"
,
length
=
20
)
public
java
.
lang
.
String
getChannel
(){
return
this
.
channel
;
}
public
void
setChannel
(
java
.
lang
.
String
channel
){
this
.
channel
=
channel
;
super
.
addValidField
(
"channel"
);
}
/** datetime
*上报时间
*/
private
java
.
util
.
Date
datetime
;
@Column
(
name
=
"datetime"
,
length
=
19
)
public
java
.
util
.
Date
getDatetime
(){
return
this
.
datetime
;
}
public
void
setDatetime
(
java
.
util
.
Date
datetime
){
this
.
datetime
=
datetime
;
super
.
addValidField
(
"datetime"
);
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/query/AgentDataTrendQuery.sql
0 → 100644
View file @
f6aa86e3
WITH
RECURSIVE
DateRange
AS
(
SELECT
:
startDate
AS
date_value
UNION
ALL
SELECT
DATE_ADD
(
date_value
,
INTERVAL
1
DAY
)
FROM
DateRange
WHERE
DATE_ADD
(
date_value
,
INTERVAL
1
DAY
)
<=
:
endDate
),
dialogueData
AS
(
SELECT
DATE
(
datetime
)
AS
dialogue_date
,
COUNT
(
DISTINCT
member_id
)
AS
member_count
,
COUNT
(
relation_id
)
AS
usage_count
FROM
biz_data_analyze_dialogue_record
WHERE
1
=
1
<<
and
relation_id
=
:
relationId
>>
<<
and
datetime
>=
:
startDate
and
datetime
<=
:
endDate
>>
<<
and
channel
in
(:
channels
)
>>
GROUP
BY
DATE
(
datetime
)
),
pointData
AS
(
SELECT
DATE
(
datetime
)
AS
consume_date
,
SUM
(
point_num
)
AS
total_points
FROM
biz_data_analyze_point_record
WHERE
1
=
1
<<
and
relation_id
=
:
relationId
>>
<<
and
datetime
>=
:
startDate
and
datetime
<=
:
endDate
>>
<<
and
channel
in
(:
channels
)
>>
GROUP
BY
DATE
(
datetime
)
)
SELECT
dr
.
date_value
AS
dialogue_date
,
COALESCE
(
dd
.
member_count
,
0
)
AS
member_count
,
COALESCE
(
dd
.
usage_count
,
0
)
AS
usage_count
,
COALESCE
(
pd
.
total_points
,
0
)
AS
total_points
FROM
DateRange
dr
LEFT
JOIN
dialogueData
dd
ON
dr
.
date_value
=
dd
.
dialogue_date
LEFT
JOIN
pointData
pd
ON
dr
.
date_value
=
pd
.
consume_date
ORDER
BY
dr
.
date_value
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/query/AgentDataTrendQueryCondition.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
query
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
/**
* Query Condition class for AgentDataTrendQuery
*/
public
class
AgentDataTrendQueryCondition
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
java
.
lang
.
String
startDate
;
public
java
.
lang
.
String
getStartDate
(){
return
this
.
startDate
;
}
public
void
setStartDate
(
java
.
lang
.
String
startDate
){
this
.
startDate
=
startDate
;
}
private
java
.
lang
.
String
endDate
;
public
java
.
lang
.
String
getEndDate
(){
return
this
.
endDate
;
}
public
void
setEndDate
(
java
.
lang
.
String
endDate
){
this
.
endDate
=
endDate
;
}
private
java
.
lang
.
String
relationId
;
public
java
.
lang
.
String
getRelationId
(){
return
this
.
relationId
;
}
public
void
setRelationId
(
java
.
lang
.
String
relationId
){
this
.
relationId
=
relationId
;
}
private
List
<
String
>
channels
;
public
List
<
String
>
getChannels
()
{
return
channels
;
}
public
void
setChannels
(
List
<
String
>
channels
)
{
this
.
channels
=
channels
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/query/AgentDataTrendQueryItem.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
query
;
import
java.io.Serializable
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
cn.com.yict.framemax.data.model.BaseItemClass
;
import
javax.persistence.Lob
;
/**
* Query Item class for AgentDataTrendQuery
*/
@Entity
public
class
AgentDataTrendQueryItem
extends
BaseItemClass
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* dialogue_date
* dialogue_date
*/
private
String
dialogueDate
;
@Column
(
name
=
"dialogue_date"
)
public
String
getDialogueDate
()
{
return
this
.
dialogueDate
;
}
public
void
setDialogueDate
(
String
dialogueDate
)
{
this
.
dialogueDate
=
dialogueDate
;
}
/**
* member_count
* member_count
*/
private
java
.
lang
.
Long
memberCount
;
@Column
(
name
=
"member_count"
)
public
java
.
lang
.
Long
getMemberCount
()
{
return
this
.
memberCount
;
}
public
void
setMemberCount
(
java
.
lang
.
Long
memberCount
)
{
this
.
memberCount
=
memberCount
;
}
/**
* usage_count
* usage_count
*/
private
java
.
lang
.
Long
usageCount
;
@Column
(
name
=
"usage_count"
)
public
java
.
lang
.
Long
getUsageCount
()
{
return
this
.
usageCount
;
}
public
void
setUsageCount
(
java
.
lang
.
Long
usageCount
)
{
this
.
usageCount
=
usageCount
;
}
/**
* total_points
* total_points
*/
private
java
.
lang
.
Double
totalPoints
;
@Column
(
name
=
"total_points"
)
public
java
.
lang
.
Double
getTotalPoints
()
{
return
this
.
totalPoints
;
}
public
void
setTotalPoints
(
java
.
lang
.
Double
totalPoints
)
{
this
.
totalPoints
=
totalPoints
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/query/AgentUsageQuery.sql
0 → 100644
View file @
f6aa86e3
SELECT
COUNT
(
DISTINCT
CASE
WHEN
DATE
(
datetime
)
=
CURDATE
()
THEN
member_id
END
)
AS
today_dialogue_member
,
COUNT
(
CASE
WHEN
DATE
(
datetime
)
=
CURDATE
()
THEN
1
END
)
AS
today_dialogue
,
COUNT
(
DISTINCT
CASE
WHEN
DATE
(
datetime
)
=
CURDATE
()
-
INTERVAL
1
DAY
THEN
member_id
END
)
AS
yesterday_dialogue_member
,
COUNT
(
CASE
WHEN
DATE
(
datetime
)
=
CURDATE
()
-
INTERVAL
1
DAY
THEN
1
END
)
AS
yesterday_dialogue
,
COUNT
(
DISTINCT
CASE
WHEN
YEARWEEK
(
datetime
,
1
)
=
YEARWEEK
(
CURDATE
(),
1
)
THEN
member_id
END
)
AS
week_dialogue_member
,
COUNT
(
CASE
WHEN
YEARWEEK
(
datetime
,
1
)
=
YEARWEEK
(
CURDATE
(),
1
)
THEN
1
END
)
AS
week_dialogue
,
COUNT
(
DISTINCT
CASE
WHEN
YEARWEEK
(
datetime
,
1
)
=
YEARWEEK
(
CURDATE
()
-
INTERVAL
1
WEEK
,
1
)
THEN
member_id
END
)
AS
last_week_dialogue_member
,
COUNT
(
CASE
WHEN
YEARWEEK
(
datetime
,
1
)
=
YEARWEEK
(
CURDATE
()
-
INTERVAL
1
WEEK
,
1
)
THEN
1
END
)
AS
last_week_dialogue
,
COUNT
(
DISTINCT
CASE
WHEN
YEAR
(
datetime
)
=
YEAR
(
CURRENT_DATE
)
AND
MONTH
(
datetime
)
=
MONTH
(
CURRENT_DATE
)
THEN
member_id
END
)
AS
month_dialogue_member
,
COUNT
(
CASE
WHEN
YEAR
(
datetime
)
=
YEAR
(
CURRENT_DATE
)
AND
MONTH
(
datetime
)
=
MONTH
(
CURRENT_DATE
)
THEN
1
END
)
AS
month_dialogue
,
COUNT
(
DISTINCT
CASE
WHEN
YEAR
(
datetime
)
=
YEAR
(
CURRENT_DATE
-
INTERVAL
1
MONTH
)
AND
MONTH
(
datetime
)
=
MONTH
(
CURRENT_DATE
-
INTERVAL
1
MONTH
)
THEN
member_id
END
)
AS
last_month_dialogue_member
,
COUNT
(
CASE
WHEN
YEAR
(
datetime
)
=
YEAR
(
CURRENT_DATE
-
INTERVAL
1
MONTH
)
AND
MONTH
(
datetime
)
=
MONTH
(
CURRENT_DATE
-
INTERVAL
1
MONTH
)
THEN
1
END
)
AS
last_month_dialogue
FROM
biz_data_analyze_dialogue_record
where
1
=
1
<<
and
relation_id
=
:
relationId
>>
<<
and
channel
in
(:
channels
)
>>
GROUP
BY
relation_id
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/query/AgentUsageQueryCondition.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
query
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* Query Condition class for AgentUsageQuery
*/
public
class
AgentUsageQueryCondition
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
java
.
lang
.
String
relationId
;
public
java
.
lang
.
String
getRelationId
(){
return
this
.
relationId
;
}
public
void
setRelationId
(
java
.
lang
.
String
relationId
){
this
.
relationId
=
relationId
;
}
private
List
<
String
>
channels
;
public
List
<
String
>
getChannels
(){
return
this
.
channels
;
}
public
void
setChannels
(
List
<
String
>
channels
){
this
.
channels
=
channels
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/query/AgentUsageQueryItem.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
query
;
import
java.io.Serializable
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
cn.com.yict.framemax.data.model.BaseItemClass
;
/**
* Query Item class for AgentUsageQuery
*/
@Entity
public
class
AgentUsageQueryItem
extends
BaseItemClass
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/** today_dialogue_member
*today_dialogue_member
*/
private
java
.
lang
.
Long
todayDialogueMember
;
@Column
(
name
=
"today_dialogue_member"
)
public
java
.
lang
.
Long
getTodayDialogueMember
(){
return
this
.
todayDialogueMember
;
}
public
void
setTodayDialogueMember
(
java
.
lang
.
Long
todayDialogueMember
){
this
.
todayDialogueMember
=
todayDialogueMember
;
}
/** today_dialogue
*today_dialogue
*/
private
java
.
lang
.
Long
todayDialogue
;
@Column
(
name
=
"today_dialogue"
)
public
java
.
lang
.
Long
getTodayDialogue
(){
return
this
.
todayDialogue
;
}
public
void
setTodayDialogue
(
java
.
lang
.
Long
todayDialogue
){
this
.
todayDialogue
=
todayDialogue
;
}
/** yesterday_dialogue_member
*yesterday_dialogue_member
*/
private
java
.
lang
.
Long
yesterdayDialogueMember
;
@Column
(
name
=
"yesterday_dialogue_member"
)
public
java
.
lang
.
Long
getYesterdayDialogueMember
(){
return
this
.
yesterdayDialogueMember
;
}
public
void
setYesterdayDialogueMember
(
java
.
lang
.
Long
yesterdayDialogueMember
){
this
.
yesterdayDialogueMember
=
yesterdayDialogueMember
;
}
/** yesterday_dialogue
*yesterday_dialogue
*/
private
java
.
lang
.
Long
yesterdayDialogue
;
@Column
(
name
=
"yesterday_dialogue"
)
public
java
.
lang
.
Long
getYesterdayDialogue
(){
return
this
.
yesterdayDialogue
;
}
public
void
setYesterdayDialogue
(
java
.
lang
.
Long
yesterdayDialogue
){
this
.
yesterdayDialogue
=
yesterdayDialogue
;
}
/** week_dialogue_member
*week_dialogue_member
*/
private
java
.
lang
.
Long
weekDialogueMember
;
@Column
(
name
=
"week_dialogue_member"
)
public
java
.
lang
.
Long
getWeekDialogueMember
(){
return
this
.
weekDialogueMember
;
}
public
void
setWeekDialogueMember
(
java
.
lang
.
Long
weekDialogueMember
){
this
.
weekDialogueMember
=
weekDialogueMember
;
}
/** week_dialogue
*week_dialogue
*/
private
java
.
lang
.
Long
weekDialogue
;
@Column
(
name
=
"week_dialogue"
)
public
java
.
lang
.
Long
getWeekDialogue
(){
return
this
.
weekDialogue
;
}
public
void
setWeekDialogue
(
java
.
lang
.
Long
weekDialogue
){
this
.
weekDialogue
=
weekDialogue
;
}
/** last_week_dialogue_member
*last_week_dialogue_member
*/
private
java
.
lang
.
Long
lastWeekDialogueMember
;
@Column
(
name
=
"last_week_dialogue_member"
)
public
java
.
lang
.
Long
getLastWeekDialogueMember
(){
return
this
.
lastWeekDialogueMember
;
}
public
void
setLastWeekDialogueMember
(
java
.
lang
.
Long
lastWeekDialogueMember
){
this
.
lastWeekDialogueMember
=
lastWeekDialogueMember
;
}
/** last_week_dialogue
*last_week_dialogue
*/
private
java
.
lang
.
Long
lastWeekDialogue
;
@Column
(
name
=
"last_week_dialogue"
)
public
java
.
lang
.
Long
getLastWeekDialogue
(){
return
this
.
lastWeekDialogue
;
}
public
void
setLastWeekDialogue
(
java
.
lang
.
Long
lastWeekDialogue
){
this
.
lastWeekDialogue
=
lastWeekDialogue
;
}
/** month_dialogue_member
*month_dialogue_member
*/
private
java
.
lang
.
Long
monthDialogueMember
;
@Column
(
name
=
"month_dialogue_member"
)
public
java
.
lang
.
Long
getMonthDialogueMember
(){
return
this
.
monthDialogueMember
;
}
public
void
setMonthDialogueMember
(
java
.
lang
.
Long
monthDialogueMember
){
this
.
monthDialogueMember
=
monthDialogueMember
;
}
/** month_dialogue
*month_dialogue
*/
private
java
.
lang
.
Long
monthDialogue
;
@Column
(
name
=
"month_dialogue"
)
public
java
.
lang
.
Long
getMonthDialogue
(){
return
this
.
monthDialogue
;
}
public
void
setMonthDialogue
(
java
.
lang
.
Long
monthDialogue
){
this
.
monthDialogue
=
monthDialogue
;
}
/** last_month_dialogue_member
*last_month_dialogue_member
*/
private
java
.
lang
.
Long
lastMonthDialogueMember
;
@Column
(
name
=
"last_month_dialogue_member"
)
public
java
.
lang
.
Long
getLastMonthDialogueMember
(){
return
this
.
lastMonthDialogueMember
;
}
public
void
setLastMonthDialogueMember
(
java
.
lang
.
Long
lastMonthDialogueMember
){
this
.
lastMonthDialogueMember
=
lastMonthDialogueMember
;
}
/** last_month_dialogue
*last_month_dialogue
*/
private
java
.
lang
.
Long
lastMonthDialogue
;
@Column
(
name
=
"last_month_dialogue"
)
public
java
.
lang
.
Long
getLastMonthDialogue
(){
return
this
.
lastMonthDialogue
;
}
public
void
setLastMonthDialogue
(
java
.
lang
.
Long
lastMonthDialogue
){
this
.
lastMonthDialogue
=
lastMonthDialogue
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/query/ChannelPointsCountQuery.sql
0 → 100644
View file @
f6aa86e3
SELECT
ac
.
channel
,
COALESCE
(
SUM
(
bpr
.
point_num
),
0
)
AS
total_points
FROM
(
SELECT
'index'
AS
channel
UNION
all
SELECT
'mall'
UNION
ALL
SELECT
'link_share'
UNION
ALL
SELECT
'api'
UNION
ALL
SELECT
'preview'
UNION
ALL
SELECT
'multi_preview'
)
AS
ac
LEFT
JOIN
biz_data_analyze_point_record
bpr
ON
ac
.
channel
=
bpr
.
channel
and
YEAR
(
bpr
.
datetime
)
=
YEAR
(
CURRENT_DATE
)
and
MONTH
(
bpr
.
datetime
)
=
MONTH
(
CURRENT_DATE
)
<<
AND
relation_id
=
:
relationId
>>
where
1
=
1
<<
AND
ac
.
channel
in
(:
channels
)
>>
GROUP
BY
ac
.
channel
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/query/ChannelPointsCountQueryCondition.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
query
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* Query Condition class for ChannelPointsConoutQuery
*/
public
class
ChannelPointsCountQueryCondition
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
java
.
lang
.
String
relationId
;
public
java
.
lang
.
String
getRelationId
(){
return
this
.
relationId
;
}
public
void
setRelationId
(
java
.
lang
.
String
relationId
){
this
.
relationId
=
relationId
;
}
private
List
<
String
>
channels
;
public
List
<
String
>
getChannels
()
{
return
channels
;
}
public
void
setChannels
(
List
<
String
>
channels
)
{
this
.
channels
=
channels
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/query/ChannelPointsCountQueryItem.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
query
;
import
java.io.Serializable
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
cn.com.yict.framemax.data.model.BaseItemClass
;
/**
* Query Item class for ChannelPointsConoutQuery
*/
@Entity
public
class
ChannelPointsCountQueryItem
extends
BaseItemClass
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* channel
* channel
*/
private
java
.
lang
.
String
channel
;
@Column
(
name
=
"channel"
)
public
java
.
lang
.
String
getChannel
()
{
return
this
.
channel
;
}
public
void
setChannel
(
java
.
lang
.
String
channel
)
{
this
.
channel
=
channel
;
}
/**
* total_point
* total_point
*/
private
java
.
lang
.
Double
totalPoints
;
@Column
(
name
=
"total_points"
)
public
java
.
lang
.
Double
getTotalPoints
()
{
return
this
.
totalPoints
;
}
public
void
setTotalPoints
(
java
.
lang
.
Double
totalPoint
)
{
this
.
totalPoints
=
totalPoint
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/query/ChannelUsageCountQuery.sql
0 → 100644
View file @
f6aa86e3
SELECT
ac
.
channel
,
COALESCE
(
COUNT
(
bdr
.
relation_id
),
0
)
AS
usage_count
FROM
(
SELECT
'index'
AS
channel
UNION
all
SELECT
'mall'
UNION
ALL
SELECT
'link_share'
UNION
ALL
SELECT
'api'
UNION
ALL
SELECT
'preview'
UNION
ALL
SELECT
'multi_preview'
)
AS
ac
LEFT
JOIN
biz_data_analyze_dialogue_record
bdr
ON
ac
.
channel
=
bdr
.
channel
and
YEAR
(
bdr
.
datetime
)
=
YEAR
(
CURRENT_DATE
)
and
MONTH
(
bdr
.
datetime
)
=
MONTH
(
CURRENT_DATE
)
<<
AND
relation_id
=
:
relationId
>>
where
1
=
1
<<
AND
ac
.
channel
in
(:
channels
)
>>
GROUP
BY
ac
.
channel
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/query/ChannelUsageCountQueryCondition.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
query
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* Query Condition class for ChannelUsageCountQuery
*/
public
class
ChannelUsageCountQueryCondition
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
java
.
lang
.
String
relationId
;
public
java
.
lang
.
String
getRelationId
(){
return
this
.
relationId
;
}
public
void
setRelationId
(
java
.
lang
.
String
relationId
){
this
.
relationId
=
relationId
;
}
private
List
<
String
>
channels
;
public
List
<
String
>
getChannels
()
{
return
channels
;
}
public
void
setChannels
(
List
<
String
>
channels
)
{
this
.
channels
=
channels
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/query/ChannelUsageCountQueryItem.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
query
;
import
java.io.Serializable
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
cn.com.yict.framemax.data.model.BaseItemClass
;
/**
* Query Item class for ChannelUsageCountQuery
*/
@Entity
public
class
ChannelUsageCountQueryItem
extends
BaseItemClass
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/** channel
*channel
*/
private
java
.
lang
.
String
channel
;
@Column
(
name
=
"channel"
)
public
java
.
lang
.
String
getChannel
(){
return
this
.
channel
;
}
public
void
setChannel
(
java
.
lang
.
String
channel
){
this
.
channel
=
channel
;
}
/** usage_count
*usage_count
*/
private
java
.
lang
.
Long
usageCount
;
@Column
(
name
=
"usage_count"
)
public
java
.
lang
.
Long
getUsageCount
(){
return
this
.
usageCount
;
}
public
void
setUsageCount
(
java
.
lang
.
Long
usageCount
){
this
.
usageCount
=
usageCount
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/query/ChannelUserCountQuery.sql
0 → 100644
View file @
f6aa86e3
SELECT
ac
.
channel
,
COALESCE
(
COUNT
(
DISTINCT
bdr
.
member_id
),
0
)
AS
member_count
FROM
(
SELECT
'index'
AS
channel
UNION
ALL
SELECT
'mall'
UNION
ALL
SELECT
'link_share'
UNION
ALL
SELECT
'api'
UNION
ALL
SELECT
'preview'
UNION
ALL
SELECT
'multi_preview'
)
AS
ac
LEFT
JOIN
biz_data_analyze_dialogue_record
bdr
ON
ac
.
channel
=
bdr
.
channel
<<
AND
datetime
>=
:
startDate
AND
datetime
<=
:
endDate
>>
<<
AND
relation_id
=
:
relationId
>>
where
1
=
1
<<
AND
ac
.
channel
in
(:
channels
)
>>
GROUP
BY
ac
.
channel
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/query/ChannelUserCountQueryCondition.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
query
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* Query Condition class for ChannelUserCountQuery
*/
public
class
ChannelUserCountQueryCondition
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
java
.
lang
.
String
startDate
;
public
java
.
lang
.
String
getStartDate
(){
return
this
.
startDate
;
}
public
void
setStartDate
(
java
.
lang
.
String
startDate
){
this
.
startDate
=
startDate
;
}
private
java
.
lang
.
String
endDate
;
public
java
.
lang
.
String
getEndDate
(){
return
this
.
endDate
;
}
public
void
setEndDate
(
java
.
lang
.
String
endDate
){
this
.
endDate
=
endDate
;
}
private
java
.
lang
.
String
relationId
;
public
java
.
lang
.
String
getRelationId
(){
return
this
.
relationId
;
}
public
void
setRelationId
(
java
.
lang
.
String
relationId
){
this
.
relationId
=
relationId
;
}
private
List
<
String
>
channels
;
public
List
<
String
>
getChannels
()
{
return
channels
;
}
public
void
setChannels
(
List
<
String
>
channels
)
{
this
.
channels
=
channels
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/query/ChannelUserCountQueryItem.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
query
;
import
java.io.Serializable
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
cn.com.yict.framemax.data.model.BaseItemClass
;
/**
* Query Item class for ChannelUserCountQuery
*/
@Entity
public
class
ChannelUserCountQueryItem
extends
BaseItemClass
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/** channel
*channel
*/
private
java
.
lang
.
String
channel
;
@Column
(
name
=
"channel"
)
public
java
.
lang
.
String
getChannel
(){
return
this
.
channel
;
}
public
void
setChannel
(
java
.
lang
.
String
channel
){
this
.
channel
=
channel
;
}
/** member_count
*member_count
*/
private
java
.
lang
.
Long
memberCount
;
@Column
(
name
=
"member_count"
)
public
java
.
lang
.
Long
getMemberCount
(){
return
this
.
memberCount
;
}
public
void
setMemberCount
(
java
.
lang
.
Long
memberCount
){
this
.
memberCount
=
memberCount
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/query/PointsUsageQuery.sql
0 → 100644
View file @
f6aa86e3
SELECT
COALESCE
(
SUM
(
CASE
WHEN
DATE
(
datetime
)
=
CURDATE
()
THEN
point_num
ELSE
NULL
END
),
0
)
AS
today_total_points
,
COALESCE
(
SUM
(
CASE
WHEN
DATE
(
datetime
)
=
CURDATE
()
-
INTERVAL
1
DAY
THEN
point_num
ELSE
NULL
END
),
0
)
AS
yesterday_total_points
,
COALESCE
(
SUM
(
CASE
WHEN
YEARWEEK
(
datetime
,
1
)
=
YEARWEEK
(
CURDATE
(),
1
)
THEN
point_num
ELSE
NULL
END
),
0
)
AS
week_total_points
,
COALESCE
(
SUM
(
CASE
WHEN
YEARWEEK
(
datetime
,
1
)
=
YEARWEEK
(
CURDATE
()
-
INTERVAL
1
WEEK
,
1
)
THEN
point_num
ELSE
NULL
END
),
0
)
AS
last_week_total_points
,
COALESCE
(
SUM
(
CASE
WHEN
YEAR
(
datetime
)
=
YEAR
(
CURRENT_DATE
)
AND
MONTH
(
datetime
)
=
MONTH
(
CURRENT_DATE
)
THEN
point_num
ELSE
NULL
END
),
0
)
AS
month_total_points
,
COALESCE
(
SUM
(
CASE
WHEN
YEAR
(
datetime
)
=
YEAR
(
CURRENT_DATE
-
INTERVAL
1
MONTH
)
AND
MONTH
(
datetime
)
=
MONTH
(
CURRENT_DATE
-
INTERVAL
1
MONTH
)
THEN
point_num
ELSE
NULL
END
),
0
)
AS
last_month_total_points
FROM
biz_data_analyze_point_record
WHERE
1
=
1
<<
and
relation_id
=
:
relationId
>>
<<
and
channel
in
(:
channels
)
>>
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/query/PointsUsageQueryCondition.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
query
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* Query Condition class for GetGeneralUsageDataQuery
*/
public
class
PointsUsageQueryCondition
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
List
<
String
>
channels
;
public
List
<
String
>
getChannels
(){
return
this
.
channels
;
}
public
void
setChannels
(
List
<
String
>
channels
){
this
.
channels
=
channels
;
}
private
java
.
lang
.
String
relationId
;
public
java
.
lang
.
String
getRelationId
(){
return
this
.
relationId
;
}
public
void
setRelationId
(
java
.
lang
.
String
relationId
){
this
.
relationId
=
relationId
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/query/PointsUsageQueryItem.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
query
;
import
java.io.Serializable
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
cn.com.yict.framemax.data.model.BaseItemClass
;
/**
* Query Item class for GetGeneralUsageDataQuery
*/
@Entity
public
class
PointsUsageQueryItem
extends
BaseItemClass
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/** today_total_points
*today_total_points
*/
private
java
.
lang
.
Double
todayTotalPoints
;
@Column
(
name
=
"today_total_points"
)
public
java
.
lang
.
Double
getTodayTotalPoints
(){
return
this
.
todayTotalPoints
;
}
public
void
setTodayTotalPoints
(
java
.
lang
.
Double
todayTotalPoints
){
this
.
todayTotalPoints
=
todayTotalPoints
;
}
/** yesterday_total_points
*yesterday_total_points
*/
private
java
.
lang
.
Double
yesterdayTotalPoints
;
@Column
(
name
=
"yesterday_total_points"
)
public
java
.
lang
.
Double
getYesterdayTotalPoints
(){
return
this
.
yesterdayTotalPoints
;
}
public
void
setYesterdayTotalPoints
(
java
.
lang
.
Double
yesterdayTotalPoints
){
this
.
yesterdayTotalPoints
=
yesterdayTotalPoints
;
}
/** week_total_points
*week_total_points
*/
private
java
.
lang
.
Double
weekTotalPoints
;
@Column
(
name
=
"week_total_points"
)
public
java
.
lang
.
Double
getWeekTotalPoints
(){
return
this
.
weekTotalPoints
;
}
public
void
setWeekTotalPoints
(
java
.
lang
.
Double
weekTotalPoints
){
this
.
weekTotalPoints
=
weekTotalPoints
;
}
/** last_week_total_points
*last_week_total_points
*/
private
java
.
lang
.
Double
lastWeekTotalPoints
;
@Column
(
name
=
"last_week_total_points"
)
public
java
.
lang
.
Double
getLastWeekTotalPoints
(){
return
this
.
lastWeekTotalPoints
;
}
public
void
setLastWeekTotalPoints
(
java
.
lang
.
Double
lastWeekTotalPoints
){
this
.
lastWeekTotalPoints
=
lastWeekTotalPoints
;
}
/** month_total_points
*month_total_points
*/
private
java
.
lang
.
Double
monthTotalPoints
;
@Column
(
name
=
"month_total_points"
)
public
java
.
lang
.
Double
getMonthTotalPoints
(){
return
this
.
monthTotalPoints
;
}
public
void
setMonthTotalPoints
(
java
.
lang
.
Double
monthTotalPoints
){
this
.
monthTotalPoints
=
monthTotalPoints
;
}
/** last_month_total_points
*last_month_total_points
*/
private
java
.
lang
.
Double
lastMonthTotalPoints
;
@Column
(
name
=
"last_month_total_points"
)
public
java
.
lang
.
Double
getLastMonthTotalPoints
(){
return
this
.
lastMonthTotalPoints
;
}
public
void
setLastMonthTotalPoints
(
java
.
lang
.
Double
lastMonthTotalPoints
){
this
.
lastMonthTotalPoints
=
lastMonthTotalPoints
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/repository/BizDataAnalyzeCollectRepository.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
repository
;
import
cn.com.yict.framemax.data.repository.Repository
;
import
cn.com.poc.data_analyze.model.BizDataAnalyzeCollectModel
;
public
interface
BizDataAnalyzeCollectRepository
extends
Repository
<
BizDataAnalyzeCollectModel
,
java
.
lang
.
Long
>
{
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/repository/BizDataAnalyzeDialogueRecordRepository.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
repository
;
import
cn.com.yict.framemax.data.repository.Repository
;
import
cn.com.poc.data_analyze.model.BizDataAnalyzeDialogueRecordModel
;
public
interface
BizDataAnalyzeDialogueRecordRepository
extends
Repository
<
BizDataAnalyzeDialogueRecordModel
,
java
.
lang
.
Long
>
{
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/repository/BizDataAnalyzePointRecordRepository.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
repository
;
import
cn.com.yict.framemax.data.repository.Repository
;
import
cn.com.poc.data_analyze.model.BizDataAnalyzePointRecordModel
;
public
interface
BizDataAnalyzePointRecordRepository
extends
Repository
<
BizDataAnalyzePointRecordModel
,
java
.
lang
.
Long
>
{
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/service/BizDataAnalyzeCollectService.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
service
;
import
cn.com.yict.framemax.core.service.BaseService
;
import
cn.com.poc.data_analyze.entity.BizDataAnalyzeCollectEntity
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
java.util.Collection
;
import
java.util.List
;
public
interface
BizDataAnalyzeCollectService
extends
BaseService
{
BizDataAnalyzeCollectEntity
get
(
java
.
lang
.
Long
id
)
throws
Exception
;
List
<
BizDataAnalyzeCollectEntity
>
findByExample
(
BizDataAnalyzeCollectEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
;
BizDataAnalyzeCollectEntity
save
(
BizDataAnalyzeCollectEntity
entity
)
throws
Exception
;
BizDataAnalyzeCollectEntity
update
(
BizDataAnalyzeCollectEntity
entity
)
throws
Exception
;
void
deletedById
(
java
.
lang
.
Long
id
)
throws
Exception
;
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/service/BizDataAnalyzeDialogueRecordService.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
service
;
import
cn.com.poc.data_analyze.query.*
;
import
cn.com.yict.framemax.core.service.BaseService
;
import
cn.com.poc.data_analyze.entity.BizDataAnalyzeDialogueRecordEntity
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
java.util.List
;
public
interface
BizDataAnalyzeDialogueRecordService
extends
BaseService
{
BizDataAnalyzeDialogueRecordEntity
get
(
java
.
lang
.
Long
id
)
throws
Exception
;
List
<
BizDataAnalyzeDialogueRecordEntity
>
findByExample
(
BizDataAnalyzeDialogueRecordEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
;
BizDataAnalyzeDialogueRecordEntity
save
(
BizDataAnalyzeDialogueRecordEntity
entity
)
throws
Exception
;
BizDataAnalyzeDialogueRecordEntity
update
(
BizDataAnalyzeDialogueRecordEntity
entity
)
throws
Exception
;
void
deletedById
(
java
.
lang
.
Long
id
)
throws
Exception
;
List
<
AgentUsageQueryItem
>
agentUsageQuery
(
AgentUsageQueryCondition
condition
,
PagingInfo
pagingInfo
);
List
<
AgentDataTrendQueryItem
>
agentDataTrendQuery
(
AgentDataTrendQueryCondition
condition
,
PagingInfo
pagingInfo
);
List
<
ChannelUserCountQueryItem
>
channelUserCountQuery
(
ChannelUserCountQueryCondition
condition
,
PagingInfo
pagingInfo
);
List
<
ChannelUsageCountQueryItem
>
channelUsageCountQuery
(
ChannelUsageCountQueryCondition
condition
,
PagingInfo
pagingInfo
);
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/service/BizDataAnalyzePointRecordService.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
service
;
import
cn.com.poc.data_analyze.query.ChannelPointsCountQueryCondition
;
import
cn.com.poc.data_analyze.query.ChannelPointsCountQueryItem
;
import
cn.com.poc.data_analyze.query.PointsUsageQueryCondition
;
import
cn.com.poc.data_analyze.query.PointsUsageQueryItem
;
import
cn.com.yict.framemax.core.service.BaseService
;
import
cn.com.poc.data_analyze.entity.BizDataAnalyzePointRecordEntity
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
java.util.List
;
public
interface
BizDataAnalyzePointRecordService
extends
BaseService
{
BizDataAnalyzePointRecordEntity
get
(
java
.
lang
.
Long
id
)
throws
Exception
;
List
<
BizDataAnalyzePointRecordEntity
>
findByExample
(
BizDataAnalyzePointRecordEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
;
BizDataAnalyzePointRecordEntity
save
(
BizDataAnalyzePointRecordEntity
entity
)
throws
Exception
;
BizDataAnalyzePointRecordEntity
update
(
BizDataAnalyzePointRecordEntity
entity
)
throws
Exception
;
void
deletedById
(
java
.
lang
.
Long
id
)
throws
Exception
;
List
<
PointsUsageQueryItem
>
pointsUsageQuery
(
PointsUsageQueryCondition
condition
,
PagingInfo
pagingInfo
);
List
<
ChannelPointsCountQueryItem
>
channelPointsCountQuery
(
ChannelPointsCountQueryCondition
condition
,
PagingInfo
pagingInfo
);
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/service/impl/BizDataAnalyzeCollectServiceImpl.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
service
.
impl
;
import
cn.com.yict.framemax.core.service.impl.BaseServiceImpl
;
import
cn.com.poc.data_analyze.service.BizDataAnalyzeCollectService
;
import
cn.com.poc.data_analyze.model.BizDataAnalyzeCollectModel
;
import
cn.com.poc.data_analyze.entity.BizDataAnalyzeCollectEntity
;
import
cn.com.poc.data_analyze.convert.BizDataAnalyzeCollectConvert
;
import
cn.com.poc.data_analyze.repository.BizDataAnalyzeCollectRepository
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
org.springframework.stereotype.Service
;
import
org.apache.commons.collections4.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.stream.Collectors
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
org.springframework.util.Assert
;
@Service
public
class
BizDataAnalyzeCollectServiceImpl
extends
BaseServiceImpl
implements
BizDataAnalyzeCollectService
{
@Resource
private
BizDataAnalyzeCollectRepository
repository
;
public
BizDataAnalyzeCollectEntity
get
(
java
.
lang
.
Long
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
BizDataAnalyzeCollectModel
model
=
this
.
repository
.
get
(
id
);
if
(
model
==
null
){
return
null
;
}
if
(
"Y"
.
equals
(
model
.
getIsDeleted
())){
return
null
;
}
return
BizDataAnalyzeCollectConvert
.
modelToEntity
(
model
);
}
public
List
<
BizDataAnalyzeCollectEntity
>
findByExample
(
BizDataAnalyzeCollectEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
{
List
<
BizDataAnalyzeCollectEntity
>
result
=
new
ArrayList
<
BizDataAnalyzeCollectEntity
>();
BizDataAnalyzeCollectModel
model
=
new
BizDataAnalyzeCollectModel
();
if
(
example
!=
null
){
model
=
BizDataAnalyzeCollectConvert
.
entityToModel
(
example
);
}
model
.
setIsDeleted
(
"N"
);
List
<
BizDataAnalyzeCollectModel
>
models
=
this
.
repository
.
findByExample
(
model
,
pagingInfo
);
if
(
CollectionUtils
.
isNotEmpty
(
models
))
{
result
=
models
.
stream
().
map
(
BizDataAnalyzeCollectConvert:
:
modelToEntity
).
collect
(
Collectors
.
toList
());
}
return
result
;
}
public
BizDataAnalyzeCollectEntity
save
(
BizDataAnalyzeCollectEntity
entity
)
throws
Exception
{
Assert
.
notNull
(
entity
);
entity
.
setId
(
null
);
entity
.
setIsDeleted
(
"N"
);
BizDataAnalyzeCollectModel
model
=
BizDataAnalyzeCollectConvert
.
entityToModel
(
entity
);
BizDataAnalyzeCollectModel
saveModel
=
this
.
repository
.
save
(
model
);
return
BizDataAnalyzeCollectConvert
.
modelToEntity
(
saveModel
);
}
public
BizDataAnalyzeCollectEntity
update
(
BizDataAnalyzeCollectEntity
entity
)
throws
Exception
{
Assert
.
notNull
(
entity
);
Assert
.
notNull
(
entity
.
getId
(),
"update pk can not be null"
);
BizDataAnalyzeCollectModel
model
=
this
.
repository
.
get
(
entity
.
getId
());
if
(
entity
.
getRelationId
()
!=
null
){
model
.
setRelationId
(
entity
.
getRelationId
());
}
if
(
entity
.
getType
()
!=
null
){
model
.
setType
(
entity
.
getType
());
}
if
(
entity
.
getChannel
()
!=
null
){
model
.
setChannel
(
entity
.
getChannel
());
}
if
(
entity
.
getTotalPoints
()
!=
null
){
model
.
setTotalPoints
(
entity
.
getTotalPoints
());
}
if
(
entity
.
getUsageCount
()
!=
null
){
model
.
setUsageCount
(
entity
.
getUsageCount
());
}
if
(
entity
.
getUsersCount
()
!=
null
){
model
.
setUsersCount
(
entity
.
getUsersCount
());
}
if
(
entity
.
getDataDate
()
!=
null
){
model
.
setDataDate
(
entity
.
getDataDate
());
}
if
(
entity
.
getIsDeleted
()
!=
null
){
model
.
setIsDeleted
(
entity
.
getIsDeleted
());
}
if
(
entity
.
getCreator
()
!=
null
){
model
.
setCreator
(
entity
.
getCreator
());
}
if
(
entity
.
getCreatedTime
()
!=
null
){
model
.
setCreatedTime
(
entity
.
getCreatedTime
());
}
if
(
entity
.
getModifier
()
!=
null
){
model
.
setModifier
(
entity
.
getModifier
());
}
if
(
entity
.
getModifiedTime
()
!=
null
){
model
.
setModifiedTime
(
entity
.
getModifiedTime
());
}
if
(
entity
.
getSysVersion
()
!=
null
){
model
.
setSysVersion
(
entity
.
getSysVersion
());
}
BizDataAnalyzeCollectModel
saveModel
=
this
.
repository
.
save
(
model
);
return
BizDataAnalyzeCollectConvert
.
modelToEntity
(
saveModel
);
}
public
void
deletedById
(
java
.
lang
.
Long
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
BizDataAnalyzeCollectModel
model
=
this
.
repository
.
get
(
id
);
if
(
model
!=
null
){
if
(
"N"
.
equals
(
model
.
getIsDeleted
())){
model
.
setIsDeleted
(
"Y"
);
this
.
repository
.
save
(
model
);
}
}
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/service/impl/BizDataAnalyzeDialogueRecordServiceImpl.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
service
.
impl
;
import
cn.com.poc.data_analyze.query.*
;
import
cn.com.yict.framemax.core.service.impl.BaseServiceImpl
;
import
cn.com.poc.data_analyze.service.BizDataAnalyzeDialogueRecordService
;
import
cn.com.poc.data_analyze.model.BizDataAnalyzeDialogueRecordModel
;
import
cn.com.poc.data_analyze.entity.BizDataAnalyzeDialogueRecordEntity
;
import
cn.com.poc.data_analyze.convert.BizDataAnalyzeDialogueRecordConvert
;
import
cn.com.poc.data_analyze.repository.BizDataAnalyzeDialogueRecordRepository
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
org.springframework.stereotype.Service
;
import
org.apache.commons.collections4.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.stream.Collectors
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
org.springframework.util.Assert
;
@Service
public
class
BizDataAnalyzeDialogueRecordServiceImpl
extends
BaseServiceImpl
implements
BizDataAnalyzeDialogueRecordService
{
@Resource
private
BizDataAnalyzeDialogueRecordRepository
repository
;
public
BizDataAnalyzeDialogueRecordEntity
get
(
java
.
lang
.
Long
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
BizDataAnalyzeDialogueRecordModel
model
=
this
.
repository
.
get
(
id
);
if
(
model
==
null
)
{
return
null
;
}
return
BizDataAnalyzeDialogueRecordConvert
.
modelToEntity
(
model
);
}
public
List
<
BizDataAnalyzeDialogueRecordEntity
>
findByExample
(
BizDataAnalyzeDialogueRecordEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
{
List
<
BizDataAnalyzeDialogueRecordEntity
>
result
=
new
ArrayList
<
BizDataAnalyzeDialogueRecordEntity
>();
BizDataAnalyzeDialogueRecordModel
model
=
new
BizDataAnalyzeDialogueRecordModel
();
if
(
example
!=
null
)
{
model
=
BizDataAnalyzeDialogueRecordConvert
.
entityToModel
(
example
);
}
List
<
BizDataAnalyzeDialogueRecordModel
>
models
=
this
.
repository
.
findByExample
(
model
,
pagingInfo
);
if
(
CollectionUtils
.
isNotEmpty
(
models
))
{
result
=
models
.
stream
().
map
(
BizDataAnalyzeDialogueRecordConvert:
:
modelToEntity
).
collect
(
Collectors
.
toList
());
}
return
result
;
}
public
BizDataAnalyzeDialogueRecordEntity
save
(
BizDataAnalyzeDialogueRecordEntity
entity
)
throws
Exception
{
Assert
.
notNull
(
entity
);
entity
.
setId
(
null
);
BizDataAnalyzeDialogueRecordModel
model
=
BizDataAnalyzeDialogueRecordConvert
.
entityToModel
(
entity
);
BizDataAnalyzeDialogueRecordModel
saveModel
=
this
.
repository
.
save
(
model
);
return
BizDataAnalyzeDialogueRecordConvert
.
modelToEntity
(
saveModel
);
}
public
BizDataAnalyzeDialogueRecordEntity
update
(
BizDataAnalyzeDialogueRecordEntity
entity
)
throws
Exception
{
Assert
.
notNull
(
entity
);
Assert
.
notNull
(
entity
.
getId
(),
"update pk can not be null"
);
BizDataAnalyzeDialogueRecordModel
model
=
this
.
repository
.
get
(
entity
.
getId
());
if
(
entity
.
getRelationId
()
!=
null
)
{
model
.
setRelationId
(
entity
.
getRelationId
());
}
if
(
entity
.
getType
()
!=
null
)
{
model
.
setType
(
entity
.
getType
());
}
if
(
entity
.
getMemberId
()
!=
null
)
{
model
.
setMemberId
(
entity
.
getMemberId
());
}
if
(
entity
.
getChannel
()
!=
null
)
{
model
.
setChannel
(
entity
.
getChannel
());
}
if
(
entity
.
getDatetime
()
!=
null
)
{
model
.
setDatetime
(
entity
.
getDatetime
());
}
BizDataAnalyzeDialogueRecordModel
saveModel
=
this
.
repository
.
save
(
model
);
return
BizDataAnalyzeDialogueRecordConvert
.
modelToEntity
(
saveModel
);
}
public
void
deletedById
(
java
.
lang
.
Long
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
BizDataAnalyzeDialogueRecordModel
model
=
this
.
repository
.
get
(
id
);
if
(
model
!=
null
)
{
}
}
@Override
public
List
<
AgentUsageQueryItem
>
agentUsageQuery
(
AgentUsageQueryCondition
condition
,
PagingInfo
pagingInfo
)
{
return
this
.
sqlDao
.
query
(
condition
,
AgentUsageQueryItem
.
class
,
pagingInfo
);
}
@Override
public
List
<
AgentDataTrendQueryItem
>
agentDataTrendQuery
(
AgentDataTrendQueryCondition
condition
,
PagingInfo
pagingInfo
)
{
Assert
.
notNull
(
condition
);
Assert
.
notNull
(
condition
.
getStartDate
());
Assert
.
notNull
(
condition
.
getEndDate
());
Assert
.
notNull
(
condition
.
getRelationId
());
return
this
.
sqlDao
.
query
(
condition
,
AgentDataTrendQueryItem
.
class
,
pagingInfo
);
}
@Override
public
List
<
ChannelUserCountQueryItem
>
channelUserCountQuery
(
ChannelUserCountQueryCondition
condition
,
PagingInfo
pagingInfo
)
{
return
this
.
sqlDao
.
query
(
condition
,
ChannelUserCountQueryItem
.
class
,
pagingInfo
);
}
@Override
public
List
<
ChannelUsageCountQueryItem
>
channelUsageCountQuery
(
ChannelUsageCountQueryCondition
condition
,
PagingInfo
pagingInfo
)
{
return
this
.
sqlDao
.
query
(
condition
,
ChannelUsageCountQueryItem
.
class
,
pagingInfo
);
}
}
\ No newline at end of file
src/main/java/cn/com/poc/data_analyze/service/impl/BizDataAnalyzePointRecordServiceImpl.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
service
.
impl
;
import
cn.com.poc.data_analyze.convert.BizDataAnalyzePointRecordConvert
;
import
cn.com.poc.data_analyze.entity.BizDataAnalyzePointRecordEntity
;
import
cn.com.poc.data_analyze.model.BizDataAnalyzePointRecordModel
;
import
cn.com.poc.data_analyze.query.ChannelPointsCountQueryCondition
;
import
cn.com.poc.data_analyze.query.ChannelPointsCountQueryItem
;
import
cn.com.poc.data_analyze.query.PointsUsageQueryCondition
;
import
cn.com.poc.data_analyze.query.PointsUsageQueryItem
;
import
cn.com.poc.data_analyze.repository.BizDataAnalyzePointRecordRepository
;
import
cn.com.poc.data_analyze.service.BizDataAnalyzePointRecordService
;
import
cn.com.yict.framemax.core.service.impl.BaseServiceImpl
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.Assert
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
@Service
public
class
BizDataAnalyzePointRecordServiceImpl
extends
BaseServiceImpl
implements
BizDataAnalyzePointRecordService
{
@Resource
private
BizDataAnalyzePointRecordRepository
repository
;
public
BizDataAnalyzePointRecordEntity
get
(
java
.
lang
.
Long
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
BizDataAnalyzePointRecordModel
model
=
this
.
repository
.
get
(
id
);
if
(
model
==
null
)
{
return
null
;
}
return
BizDataAnalyzePointRecordConvert
.
modelToEntity
(
model
);
}
public
List
<
BizDataAnalyzePointRecordEntity
>
findByExample
(
BizDataAnalyzePointRecordEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
{
List
<
BizDataAnalyzePointRecordEntity
>
result
=
new
ArrayList
<
BizDataAnalyzePointRecordEntity
>();
BizDataAnalyzePointRecordModel
model
=
new
BizDataAnalyzePointRecordModel
();
if
(
example
!=
null
)
{
model
=
BizDataAnalyzePointRecordConvert
.
entityToModel
(
example
);
}
List
<
BizDataAnalyzePointRecordModel
>
models
=
this
.
repository
.
findByExample
(
model
,
pagingInfo
);
if
(
CollectionUtils
.
isNotEmpty
(
models
))
{
result
=
models
.
stream
().
map
(
BizDataAnalyzePointRecordConvert:
:
modelToEntity
).
collect
(
Collectors
.
toList
());
}
return
result
;
}
public
BizDataAnalyzePointRecordEntity
save
(
BizDataAnalyzePointRecordEntity
entity
)
throws
Exception
{
Assert
.
notNull
(
entity
);
entity
.
setId
(
null
);
BizDataAnalyzePointRecordModel
model
=
BizDataAnalyzePointRecordConvert
.
entityToModel
(
entity
);
BizDataAnalyzePointRecordModel
saveModel
=
this
.
repository
.
save
(
model
);
return
BizDataAnalyzePointRecordConvert
.
modelToEntity
(
saveModel
);
}
public
BizDataAnalyzePointRecordEntity
update
(
BizDataAnalyzePointRecordEntity
entity
)
throws
Exception
{
Assert
.
notNull
(
entity
);
Assert
.
notNull
(
entity
.
getId
(),
"update pk can not be null"
);
BizDataAnalyzePointRecordModel
model
=
this
.
repository
.
get
(
entity
.
getId
());
if
(
entity
.
getRelationId
()
!=
null
)
{
model
.
setRelationId
(
entity
.
getRelationId
());
}
if
(
entity
.
getType
()
!=
null
)
{
model
.
setType
(
entity
.
getType
());
}
if
(
entity
.
getMemberId
()
!=
null
)
{
model
.
setMemberId
(
entity
.
getMemberId
());
}
if
(
entity
.
getPointNum
()
!=
null
)
{
model
.
setPointNum
(
entity
.
getPointNum
());
}
if
(
entity
.
getChannel
()
!=
null
)
{
model
.
setChannel
(
entity
.
getChannel
());
}
if
(
entity
.
getDatetime
()
!=
null
)
{
model
.
setDatetime
(
entity
.
getDatetime
());
}
BizDataAnalyzePointRecordModel
saveModel
=
this
.
repository
.
save
(
model
);
return
BizDataAnalyzePointRecordConvert
.
modelToEntity
(
saveModel
);
}
public
void
deletedById
(
java
.
lang
.
Long
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
BizDataAnalyzePointRecordModel
model
=
this
.
repository
.
get
(
id
);
if
(
model
!=
null
)
{
}
}
@Override
public
List
<
PointsUsageQueryItem
>
pointsUsageQuery
(
PointsUsageQueryCondition
condition
,
PagingInfo
pagingInfo
)
{
return
this
.
sqlDao
.
query
(
condition
,
PointsUsageQueryItem
.
class
,
pagingInfo
);
}
@Override
public
List
<
ChannelPointsCountQueryItem
>
channelPointsCountQuery
(
ChannelPointsCountQueryCondition
condition
,
PagingInfo
pagingInfo
)
{
return
this
.
sqlDao
.
query
(
condition
,
ChannelPointsCountQueryItem
.
class
,
pagingInfo
);
}
}
\ No newline at end of file
src/main/java/cn/com/poc/equity/aggregate/impl/MemberEquityServiceImpl.java
View file @
f6aa86e3
...
@@ -169,6 +169,10 @@ public class MemberEquityServiceImpl implements MemberEquityService {
...
@@ -169,6 +169,10 @@ public class MemberEquityServiceImpl implements MemberEquityService {
@Override
@Override
@Transactional
@Transactional
public
void
rollbackPoint
(
String
transactionSn
)
throws
Exception
{
public
void
rollbackPoint
(
String
transactionSn
)
throws
Exception
{
if
(
StringUtils
.
isBlank
(
transactionSn
))
{
logger
.
error
(
"-----交易号为空,无法回滚-----"
);
return
;
}
// 获取流水信息
// 获取流水信息
BizMemberPointTransactionHistoryEntity
bizMemberPointTransactionHistoryEntity
=
new
BizMemberPointTransactionHistoryEntity
();
BizMemberPointTransactionHistoryEntity
bizMemberPointTransactionHistoryEntity
=
new
BizMemberPointTransactionHistoryEntity
();
bizMemberPointTransactionHistoryEntity
.
setTransactionSn
(
transactionSn
);
bizMemberPointTransactionHistoryEntity
.
setTransactionSn
(
transactionSn
);
...
...
src/main/java/cn/com/poc/expose/aggregate/AgentApplicationService.java
View file @
f6aa86e3
...
@@ -16,8 +16,9 @@ public interface AgentApplicationService {
...
@@ -16,8 +16,9 @@ public interface AgentApplicationService {
* @param dialogsId 对话ID
* @param dialogsId 对话ID
* @param input 用户输入
* @param input 用户输入
* @param fileUrls 文件URL
* @param fileUrls 文件URL
* @param channel 渠道
*/
*/
void
callAgentApplication
(
String
agentId
,
String
dialogsId
,
String
input
,
List
<
String
>
fileUrls
,
HttpServletResponse
httpServletResponse
)
throws
Exception
;
void
callAgentApplication
(
String
agentId
,
String
dialogsId
,
String
input
,
List
<
String
>
fileUrls
,
String
channel
,
HttpServletResponse
httpServletResponse
)
throws
Exception
;
/**
/**
* 追问AI生成
* 追问AI生成
...
...
src/main/java/cn/com/poc/expose/aggregate/AgentDataAnalyzeService.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
expose
.
aggregate
;
import
cn.com.poc.data_analyze.domain.DataAnalyzeTimeRange
;
import
cn.com.poc.data_analyze.entity.*
;
import
java.util.List
;
/**
* @author alex.yao
* @date 2024/12/11
*/
public
interface
AgentDataAnalyzeService
{
/**
* 获取应用大体用量数据
*
* @param agentId 应用ID
* @param channel 渠道
* @return 应用大体用量数据
*/
List
<
AgentDataAnalyzeGeneralEntity
>
getGeneralUsageData
(
String
agentId
,
List
<
String
>
channel
);
/**
* 当月渠道使用人数占比
*
* @param agentId 应用ID
* @param channel 渠道
* @@return 当月渠道使用人数占比
*/
List
<
ChannelUsersCountEntity
>
getChannelUserCount
(
String
agentId
,
List
<
String
>
channel
);
/**
* 获取当月分渠道发送消息数占比
*
* @param agentId 应用ID
* @param channel 渠道
*/
List
<
ChannelUsageCountEntity
>
getSendMessageCount
(
String
agentId
,
List
<
String
>
channel
);
/**
* 获取当月分渠道积分消耗数占比
*
* @param agentId 应用ID
* @param channel 渠道
*/
List
<
ChannelPointCountEntity
>
getPointUsageCount
(
String
agentId
,
List
<
String
>
channel
);
/**
* 获取Agent应用数据趋势图
*
* @param agentId 应用ID
* @param channel 渠道
* @param timeRange 时间范围
*/
List
<
AgentDataAnalyzeTrendEntity
>
getAgentDataTrend
(
String
agentId
,
List
<
String
>
channel
,
DataAnalyzeTimeRange
timeRange
);
}
src/main/java/cn/com/poc/expose/aggregate/impl/AgentApplicationServiceImpl.java
View file @
f6aa86e3
...
@@ -18,8 +18,10 @@ import cn.com.poc.common.constant.CommonConstant;
...
@@ -18,8 +18,10 @@ import cn.com.poc.common.constant.CommonConstant;
import
cn.com.poc.common.constant.XLangConstant
;
import
cn.com.poc.common.constant.XLangConstant
;
import
cn.com.poc.common.service.RedisService
;
import
cn.com.poc.common.service.RedisService
;
import
cn.com.poc.common.utils.BlContext
;
import
cn.com.poc.common.utils.BlContext
;
import
cn.com.poc.common.utils.DocumentLoad
;
import
cn.com.poc.common.utils.JsonUtils
;
import
cn.com.poc.common.utils.JsonUtils
;
import
cn.com.poc.data_analyze.aggregate.DataAnalyzeReportService
;
import
cn.com.poc.data_analyze.constants.DataAnalyzeChannelEnum
;
import
cn.com.poc.data_analyze.constants.DataAnalyzeTypeEnum
;
import
cn.com.poc.equity.aggregate.MemberEquityService
;
import
cn.com.poc.equity.aggregate.MemberEquityService
;
import
cn.com.poc.equity.aggregate.PointDeductionRulesService
;
import
cn.com.poc.equity.aggregate.PointDeductionRulesService
;
import
cn.com.poc.equity.constants.ModifyEventEnum
;
import
cn.com.poc.equity.constants.ModifyEventEnum
;
...
@@ -47,7 +49,7 @@ import org.springframework.stereotype.Service;
...
@@ -47,7 +49,7 @@ import org.springframework.stereotype.Service;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.
io.File
;
import
java.
math.BigDecimal
;
import
java.security.SecureRandom
;
import
java.security.SecureRandom
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashSet
;
import
java.util.HashSet
;
...
@@ -106,9 +108,12 @@ public class AgentApplicationServiceImpl implements AgentApplicationService {
...
@@ -106,9 +108,12 @@ public class AgentApplicationServiceImpl implements AgentApplicationService {
@Resource
@Resource
private
MemberEquityService
memberEquityService
;
private
MemberEquityService
memberEquityService
;
@Resource
private
DataAnalyzeReportService
dataAnalyzeReportService
;
@Override
@Override
public
void
callAgentApplication
(
String
agentId
,
String
dialogsId
,
String
input
,
List
<
String
>
fileUrls
,
HttpServletResponse
httpServletResponse
)
throws
Exception
{
public
void
callAgentApplication
(
String
agentId
,
String
dialogsId
,
String
input
,
List
<
String
>
fileUrls
,
String
channel
,
HttpServletResponse
httpServletResponse
)
throws
Exception
{
UserBaseEntity
userBaseEntity
=
BlContext
.
getCurrentUserNotException
();
UserBaseEntity
userBaseEntity
=
BlContext
.
getCurrentUserNotException
();
if
(
userBaseEntity
==
null
)
{
if
(
userBaseEntity
==
null
)
{
...
@@ -174,10 +179,10 @@ public class AgentApplicationServiceImpl implements AgentApplicationService {
...
@@ -174,10 +179,10 @@ public class AgentApplicationServiceImpl implements AgentApplicationService {
//保存对话记录
//保存对话记录
outputRecord
.
setContent
(
output
);
outputRecord
.
setContent
(
output
);
bizAgentApplicationDialoguesRecordService
.
save
(
outputRecord
);
bizAgentApplicationDialoguesRecordService
.
save
(
outputRecord
);
//数据采集
dataReport
(
agentId
,
channel
,
userBaseEntity
,
pointDeductionNum
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
if
(
StringUtils
.
isNotBlank
(
reduceSn
))
{
memberEquityService
.
rollbackPoint
(
reduceSn
);
memberEquityService
.
rollbackPoint
(
reduceSn
);
}
throw
new
BusinessException
(
e
.
getMessage
());
throw
new
BusinessException
(
e
.
getMessage
());
}
}
}
}
...
@@ -418,4 +423,14 @@ public class AgentApplicationServiceImpl implements AgentApplicationService {
...
@@ -418,4 +423,14 @@ public class AgentApplicationServiceImpl implements AgentApplicationService {
logger
.
info
(
"--------- Build Messages dialogsId:{},agentId:{},messages:{}--------------"
,
dialogsId
,
agentId
,
messages
);
logger
.
info
(
"--------- Build Messages dialogsId:{},agentId:{},messages:{}--------------"
,
dialogsId
,
agentId
,
messages
);
return
messages
;
return
messages
;
}
}
private
void
dataReport
(
String
agentId
,
String
channel
,
UserBaseEntity
userBaseEntity
,
Long
pointDeductionNum
)
{
if
(
StringUtils
.
isBlank
(
channel
))
{
channel
=
DataAnalyzeChannelEnum
.
LINK_SHARE
.
getChannel
();
}
dataAnalyzeReportService
.
dataReportByDialogue
(
userBaseEntity
.
getUserId
(),
DataAnalyzeTypeEnum
.
AGENT
,
agentId
,
DataAnalyzeChannelEnum
.
valueOf
(
channel
));
dataAnalyzeReportService
.
dataReportByPoint
(
userBaseEntity
.
getUserId
(),
new
BigDecimal
(
pointDeductionNum
),
DataAnalyzeTypeEnum
.
AGENT
,
agentId
,
DataAnalyzeChannelEnum
.
valueOf
(
channel
));
}
}
}
src/main/java/cn/com/poc/expose/aggregate/impl/AgentDataAnalyzeServiceImpl.java
0 → 100644
View file @
f6aa86e3
This diff is collapsed.
Click to expand it.
src/main/java/cn/com/poc/expose/dto/AgentApplicationDto.java
View file @
f6aa86e3
...
@@ -43,4 +43,14 @@ public class AgentApplicationDto {
...
@@ -43,4 +43,14 @@ public class AgentApplicationDto {
public
void
setFileUrls
(
List
<
String
>
fileUrls
)
{
public
void
setFileUrls
(
List
<
String
>
fileUrls
)
{
this
.
fileUrls
=
fileUrls
;
this
.
fileUrls
=
fileUrls
;
}
}
private
String
channel
;
public
String
getChannel
()
{
return
channel
;
}
public
void
setChannel
(
String
channel
)
{
this
.
channel
=
channel
;
}
}
}
src/main/java/cn/com/poc/expose/dto/agent_data_analyze/AgentDataAnalyzeGeneralDto.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
expose
.
dto
.
agent_data_analyze
;
import
cn.com.poc.data_analyze.domain.DataAnalyzeInfo
;
import
java.io.Serializable
;
/**
* @author alex.yao
* @date 2024/12/10
*/
public
class
AgentDataAnalyzeGeneralDto
implements
Serializable
{
private
String
timeDimension
;
private
DataAnalyzeInfo
dataAnalyzeInfo
;
public
String
getTimeDimension
()
{
return
timeDimension
;
}
public
void
setTimeDimension
(
String
timeDimension
)
{
this
.
timeDimension
=
timeDimension
;
}
public
DataAnalyzeInfo
getDataAnalyzeInfo
()
{
return
dataAnalyzeInfo
;
}
public
void
setDataAnalyzeInfo
(
DataAnalyzeInfo
dataAnalyzeInfo
)
{
this
.
dataAnalyzeInfo
=
dataAnalyzeInfo
;
}
}
src/main/java/cn/com/poc/expose/dto/agent_data_analyze/AgentDataAnalyzeTrendDto.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
expose
.
dto
.
agent_data_analyze
;
/**
* @author alex.yao
* @date 2024/12/11
*/
public
class
AgentDataAnalyzeTrendDto
{
private
String
date
;
private
Long
usersCount
;
private
Long
usageCount
;
private
Double
totalPoints
;
public
String
getDate
()
{
return
date
;
}
public
void
setDate
(
String
date
)
{
this
.
date
=
date
;
}
public
Long
getUsersCount
()
{
return
usersCount
;
}
public
void
setUsersCount
(
Long
usersCount
)
{
this
.
usersCount
=
usersCount
;
}
public
Long
getUsageCount
()
{
return
usageCount
;
}
public
void
setUsageCount
(
Long
usageCount
)
{
this
.
usageCount
=
usageCount
;
}
public
Double
getTotalPoints
()
{
return
totalPoints
;
}
public
void
setTotalPoints
(
Double
totalPoints
)
{
this
.
totalPoints
=
totalPoints
;
}
}
src/main/java/cn/com/poc/expose/dto/agent_data_analyze/AgentUsageTrendDto.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
expose
.
dto
.
agent_data_analyze
;
/**
* @author alex.yao
* @date 2024/12/10
*/
public
class
AgentUsageTrendDto
{
private
Long
datetime
;
private
Long
num
;
public
Long
getDatetime
()
{
return
datetime
;
}
public
void
setDatetime
(
Long
datetime
)
{
this
.
datetime
=
datetime
;
}
public
Long
getNum
()
{
return
num
;
}
public
void
setNum
(
Long
num
)
{
this
.
num
=
num
;
}
}
src/main/java/cn/com/poc/expose/dto/agent_data_analyze/ChannelPointCountDto.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
expose
.
dto
.
agent_data_analyze
;
import
java.math.BigDecimal
;
/**
* @author alex.yao
* @date 2024/12/11
*/
public
class
ChannelPointCountDto
{
private
String
channel
;
private
Double
count
;
public
String
getChannel
()
{
return
channel
;
}
public
void
setChannel
(
String
channel
)
{
this
.
channel
=
channel
;
}
public
Double
getCount
()
{
return
count
;
}
public
void
setCount
(
Double
count
)
{
this
.
count
=
count
;
}
}
src/main/java/cn/com/poc/expose/dto/agent_data_analyze/ChannelUsageCountDto.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
expose
.
dto
.
agent_data_analyze
;
/**
* @author alex.yao
* @date 2024/12/11
*/
public
class
ChannelUsageCountDto
{
private
String
channel
;
private
Long
count
;
public
String
getChannel
()
{
return
channel
;
}
public
void
setChannel
(
String
channel
)
{
this
.
channel
=
channel
;
}
public
Long
getCount
()
{
return
count
;
}
public
void
setCount
(
Long
count
)
{
this
.
count
=
count
;
}
}
src/main/java/cn/com/poc/expose/dto/agent_data_analyze/ChannelUsersCountDto.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
expose
.
dto
.
agent_data_analyze
;
import
cn.com.poc.data_analyze.domain.ChannelDataCount
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @author alex.yao
* @date 2024/12/10
*/
public
class
ChannelUsersCountDto
implements
Serializable
{
/**
* 时间范围
*/
private
String
date
;
/**
* 渠道用户使用人数
*/
private
List
<
ChannelDataCount
>
channelDataCount
;
public
String
getDate
()
{
return
date
;
}
public
void
setDate
(
String
date
)
{
this
.
date
=
date
;
}
public
List
<
ChannelDataCount
>
getChannelDataCount
()
{
return
channelDataCount
;
}
public
void
setChannelDataCount
(
List
<
ChannelDataCount
>
channelDataCount
)
{
this
.
channelDataCount
=
channelDataCount
;
}
}
src/main/java/cn/com/poc/expose/dto/agent_data_analyze/GetAgentDataTrendRequestDto.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
expose
.
dto
.
agent_data_analyze
;
import
cn.com.poc.data_analyze.domain.DataAnalyzeTimeRange
;
import
java.util.List
;
/**
* @author alex.yao
* @date 2024/12/11
*/
public
class
GetAgentDataTrendRequestDto
{
private
String
agentId
;
private
List
<
String
>
channel
;
private
DataAnalyzeTimeRange
timeRange
;
public
String
getAgentId
()
{
return
agentId
;
}
public
void
setAgentId
(
String
agentId
)
{
this
.
agentId
=
agentId
;
}
public
List
<
String
>
getChannel
()
{
return
channel
;
}
public
void
setChannel
(
List
<
String
>
channel
)
{
this
.
channel
=
channel
;
}
public
DataAnalyzeTimeRange
getTimeRange
()
{
return
timeRange
;
}
public
void
setTimeRange
(
DataAnalyzeTimeRange
timeRange
)
{
this
.
timeRange
=
timeRange
;
}
}
src/main/java/cn/com/poc/expose/dto/agent_data_analyze/UsageCountDto.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
expose
.
dto
.
agent_data_analyze
;
/**
* @author alex.yao
* @date 2024/12/10
*/
public
class
UsageCountDto
{
private
Double
preview
;
private
Double
multiPreview
;
private
Double
index
;
private
Double
mall
;
private
Double
linkShare
;
private
Double
api
;
public
Double
getPreview
()
{
return
preview
;
}
public
void
setPreview
(
Double
preview
)
{
this
.
preview
=
preview
;
}
public
Double
getMultiPreview
()
{
return
multiPreview
;
}
public
void
setMultiPreview
(
Double
multiPreview
)
{
this
.
multiPreview
=
multiPreview
;
}
public
Double
getIndex
()
{
return
index
;
}
public
void
setIndex
(
Double
index
)
{
this
.
index
=
index
;
}
public
Double
getMall
()
{
return
mall
;
}
public
void
setMall
(
Double
mall
)
{
this
.
mall
=
mall
;
}
public
Double
getLinkShare
()
{
return
linkShare
;
}
public
void
setLinkShare
(
Double
linkShare
)
{
this
.
linkShare
=
linkShare
;
}
public
Double
getApi
()
{
return
api
;
}
public
void
setApi
(
Double
api
)
{
this
.
api
=
api
;
}
}
src/main/java/cn/com/poc/expose/rest/AgentDataAnalyzeRest.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
expose
.
rest
;
import
cn.com.poc.expose.dto.agent_data_analyze.*
;
import
cn.com.yict.framemax.core.rest.BaseRest
;
import
cn.com.yict.framemax.web.permission.Access
;
import
cn.com.yict.framemax.web.permission.Permission
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.List
;
/**
* @author alex.yao
* @date 2024/12/10
*/
@Permission
(
Access
.
Safety
)
public
interface
AgentDataAnalyzeRest
extends
BaseRest
{
/**
* 获取应用大体用量数据
*
* @param agentId 应用ID
* @param channel 渠道
* @return 应用大体用量数据
*/
List
<
AgentDataAnalyzeGeneralDto
>
getGeneralUsageData
(
@RequestParam
String
agentId
,
@RequestParam
List
<
String
>
channel
)
throws
Exception
;
/**
* 当月渠道使用人数占比
*
* @param agentId 应用ID
* @param channel 渠道
* @@return 当月渠道使用人数占比
*/
List
<
ChannelUsersCountDto
>
getChannelUsersCount
(
@RequestParam
String
agentId
,
@RequestParam
List
<
String
>
channel
);
/**
* 获取当月分渠道发送消息数占比
*
* @param agentId 应用ID
* @param channel 渠道
*/
List
<
ChannelUsageCountDto
>
getSendMessageCount
(
@RequestParam
String
agentId
,
@RequestParam
List
<
String
>
channel
);
/**
* 获取当月分渠道积分消耗数占比
*
* @param agentId 应用ID
* @param channel 渠道
*/
List
<
ChannelPointCountDto
>
getPointUsageCount
(
@RequestParam
String
agentId
,
@RequestParam
List
<
String
>
channel
);
/**
* 获取Agent应用数据趋势图
*
* @param dto 请求参数
*/
List
<
AgentDataAnalyzeTrendDto
>
getAgentDataTrend
(
@RequestBody
GetAgentDataTrendRequestDto
dto
);
}
src/main/java/cn/com/poc/expose/rest/impl/AgentApplicationRestImpl.java
View file @
f6aa86e3
...
@@ -103,7 +103,7 @@ public class AgentApplicationRestImpl implements AgentApplicationRest {
...
@@ -103,7 +103,7 @@ public class AgentApplicationRestImpl implements AgentApplicationRest {
Assert
.
notNull
(
dto
.
getAgentId
());
Assert
.
notNull
(
dto
.
getAgentId
());
Assert
.
notNull
(
dto
.
getDialogsId
());
Assert
.
notNull
(
dto
.
getDialogsId
());
try
{
try
{
agentApplicationService
.
callAgentApplication
(
dto
.
getAgentId
(),
dto
.
getDialogsId
(),
dto
.
getInput
(),
dto
.
getFileUrls
(),
httpServletResponse
);
agentApplicationService
.
callAgentApplication
(
dto
.
getAgentId
(),
dto
.
getDialogsId
(),
dto
.
getInput
(),
dto
.
getFileUrls
(),
dto
.
getChannel
(),
httpServletResponse
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
httpServletResponse
.
setContentType
(
"text/event-stream"
);
httpServletResponse
.
setContentType
(
"text/event-stream"
);
PrintWriter
writer
=
httpServletResponse
.
getWriter
();
PrintWriter
writer
=
httpServletResponse
.
getWriter
();
...
...
src/main/java/cn/com/poc/expose/rest/impl/AgentDataAnalyzeRestImpl.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
expose
.
rest
.
impl
;
import
cn.com.poc.data_analyze.entity.*
;
import
cn.com.poc.expose.aggregate.AgentDataAnalyzeService
;
import
cn.com.poc.expose.dto.agent_data_analyze.*
;
import
cn.com.poc.expose.rest.AgentDataAnalyzeRest
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @author alex.yao
* @date 2024/12/10
*/
@Component
public
class
AgentDataAnalyzeRestImpl
implements
AgentDataAnalyzeRest
{
@Resource
private
AgentDataAnalyzeService
agentDataAnalyzeService
;
@Override
public
List
<
AgentDataAnalyzeGeneralDto
>
getGeneralUsageData
(
String
agentId
,
List
<
String
>
channel
)
{
List
<
AgentDataAnalyzeGeneralDto
>
result
=
new
ArrayList
<>();
List
<
AgentDataAnalyzeGeneralEntity
>
generalUsageDataEntity
=
agentDataAnalyzeService
.
getGeneralUsageData
(
agentId
,
channel
);
for
(
AgentDataAnalyzeGeneralEntity
entity
:
generalUsageDataEntity
)
{
AgentDataAnalyzeGeneralDto
agentDataAnalyzeGeneralDto
=
new
AgentDataAnalyzeGeneralDto
();
agentDataAnalyzeGeneralDto
.
setTimeDimension
(
entity
.
getTimeDimension
());
agentDataAnalyzeGeneralDto
.
setDataAnalyzeInfo
(
entity
.
getDataAnalyzeInfo
());
result
.
add
(
agentDataAnalyzeGeneralDto
);
}
return
result
;
}
@Override
public
List
<
ChannelUsersCountDto
>
getChannelUsersCount
(
String
agentId
,
List
<
String
>
channel
)
{
List
<
ChannelUsersCountDto
>
result
=
new
ArrayList
<>();
List
<
ChannelUsersCountEntity
>
channelUsersCountEntities
=
agentDataAnalyzeService
.
getChannelUserCount
(
agentId
,
channel
);
for
(
ChannelUsersCountEntity
entity
:
channelUsersCountEntities
)
{
ChannelUsersCountDto
channelUsersCountDto
=
new
ChannelUsersCountDto
();
channelUsersCountDto
.
setDate
(
entity
.
getDate
());
channelUsersCountDto
.
setChannelDataCount
(
entity
.
getChannelDataCount
());
result
.
add
(
channelUsersCountDto
);
}
return
result
;
}
@Override
public
List
<
ChannelUsageCountDto
>
getSendMessageCount
(
String
agentId
,
List
<
String
>
channel
)
{
List
<
ChannelUsageCountDto
>
result
=
new
ArrayList
<>();
List
<
ChannelUsageCountEntity
>
sendMessageCountEntities
=
agentDataAnalyzeService
.
getSendMessageCount
(
agentId
,
channel
);
for
(
ChannelUsageCountEntity
entity
:
sendMessageCountEntities
)
{
ChannelUsageCountDto
channelUsageCountDto
=
new
ChannelUsageCountDto
();
channelUsageCountDto
.
setChannel
(
entity
.
getChannel
());
channelUsageCountDto
.
setCount
(
entity
.
getCount
());
result
.
add
(
channelUsageCountDto
);
}
return
result
;
}
@Override
public
List
<
ChannelPointCountDto
>
getPointUsageCount
(
String
agentId
,
List
<
String
>
channel
)
{
List
<
ChannelPointCountDto
>
result
=
new
ArrayList
<>();
List
<
ChannelPointCountEntity
>
pointCountEntities
=
agentDataAnalyzeService
.
getPointUsageCount
(
agentId
,
channel
);
for
(
ChannelPointCountEntity
pointCountEntity
:
pointCountEntities
)
{
ChannelPointCountDto
channelPointCountDto
=
new
ChannelPointCountDto
();
channelPointCountDto
.
setChannel
(
pointCountEntity
.
getChannel
());
channelPointCountDto
.
setCount
(
pointCountEntity
.
getCount
());
result
.
add
(
channelPointCountDto
);
}
return
result
;
}
@Override
public
List
<
AgentDataAnalyzeTrendDto
>
getAgentDataTrend
(
GetAgentDataTrendRequestDto
dto
)
{
List
<
AgentDataAnalyzeTrendDto
>
result
=
new
ArrayList
<>();
List
<
AgentDataAnalyzeTrendEntity
>
agentDataAnalyzeTrendEntities
=
agentDataAnalyzeService
.
getAgentDataTrend
(
dto
.
getAgentId
(),
dto
.
getChannel
(),
dto
.
getTimeRange
());
for
(
AgentDataAnalyzeTrendEntity
entity
:
agentDataAnalyzeTrendEntities
)
{
AgentDataAnalyzeTrendDto
agentDataAnalyzeTrendDto
=
new
AgentDataAnalyzeTrendDto
();
agentDataAnalyzeTrendDto
.
setDate
(
entity
.
getDate
());
agentDataAnalyzeTrendDto
.
setUsersCount
(
entity
.
getUsersCount
());
agentDataAnalyzeTrendDto
.
setUsageCount
(
entity
.
getUsageCount
());
agentDataAnalyzeTrendDto
.
setTotalPoints
(
entity
.
getTotalPoints
());
result
.
add
(
agentDataAnalyzeTrendDto
);
}
return
result
;
}
}
src/main/java/cn/com/poc/message/entity/DataAnalyzeCollectMessage.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
message
.
entity
;
/**
* @author alex.yao
* @date 2024/12/10
*/
public
class
DataAnalyzeCollectMessage
{
/** relation_id
*关联id
*/
private
java
.
lang
.
String
relationId
;
public
java
.
lang
.
String
getRelationId
(){
return
this
.
relationId
;
}
public
void
setRelationId
(
java
.
lang
.
String
relationId
){
this
.
relationId
=
relationId
;
}
/** type
*
*/
private
java
.
lang
.
String
type
;
public
java
.
lang
.
String
getType
(){
return
this
.
type
;
}
public
void
setType
(
java
.
lang
.
String
type
){
this
.
type
=
type
;
}
/** channel
*渠道
*/
private
java
.
lang
.
String
channel
;
public
java
.
lang
.
String
getChannel
(){
return
this
.
channel
;
}
public
void
setChannel
(
java
.
lang
.
String
channel
){
this
.
channel
=
channel
;
}
/** total_points
*消耗积分数
*/
private
java
.
lang
.
Long
totalPoints
;
public
java
.
lang
.
Long
getTotalPoints
(){
return
this
.
totalPoints
;
}
public
void
setTotalPoints
(
java
.
lang
.
Long
totalPoints
){
this
.
totalPoints
=
totalPoints
;
}
/** usage_count
*使用量
*/
private
java
.
lang
.
Long
usageCount
;
public
java
.
lang
.
Long
getUsageCount
(){
return
this
.
usageCount
;
}
public
void
setUsageCount
(
java
.
lang
.
Long
usageCount
){
this
.
usageCount
=
usageCount
;
}
/** users_count
*使用人数
*/
private
java
.
lang
.
Integer
usersCount
;
public
java
.
lang
.
Integer
getUsersCount
(){
return
this
.
usersCount
;
}
public
void
setUsersCount
(
java
.
lang
.
Integer
usersCount
){
this
.
usersCount
=
usersCount
;
}
/** data_date
*数据日期
*/
private
java
.
util
.
Date
dataDate
;
public
java
.
util
.
Date
getDataDate
(){
return
this
.
dataDate
;
}
public
void
setDataDate
(
java
.
util
.
Date
dataDate
){
this
.
dataDate
=
dataDate
;
}
}
src/main/java/cn/com/poc/message/service/DataAnalyzeConsumerService.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
message
.
service
;
import
cn.com.poc.message.entity.DataAnalyzeCollectMessage
;
import
cn.com.yict.framemax.core.service.BaseService
;
/**
* @author alex.yao
* @date 2024/12/10
*/
public
interface
DataAnalyzeConsumerService
extends
BaseService
{
/**
* 数据上报-汇总表
*
* @param message
* @return
*/
void
dataReport
(
DataAnalyzeCollectMessage
message
)
throws
Exception
;
}
src/main/java/cn/com/poc/message/service/DataAnalyzeProducerService.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
message
.
service
;
import
cn.com.poc.message.entity.DataAnalyzeCollectMessage
;
import
cn.com.yict.framemax.core.service.BaseService
;
/**
* @author alex.yao
* @date 2024/12/10
*/
public
interface
DataAnalyzeProducerService
extends
BaseService
{
/**
* 数据上报-汇总表
*
* @param message
* @return
*/
DataAnalyzeCollectMessage
dataReport
(
DataAnalyzeCollectMessage
message
);
}
src/main/java/cn/com/poc/message/service/impl/DataAnalyzeConsumerServiceImpl.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
message
.
service
.
impl
;
import
cn.com.poc.data_analyze.entity.BizDataAnalyzeCollectEntity
;
import
cn.com.poc.data_analyze.service.BizDataAnalyzeCollectService
;
import
cn.com.poc.message.entity.DataAnalyzeCollectMessage
;
import
cn.com.poc.message.service.DataAnalyzeConsumerService
;
import
cn.com.poc.message.topic.DataAnalyzeTopic
;
import
cn.com.yict.framemax.core.service.BaseService
;
import
cn.com.yict.framemax.tumbleweed.client.annotation.Consumer
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author alex.yao
* @date 2024/12/10
*/
@Service
public
class
DataAnalyzeConsumerServiceImpl
implements
DataAnalyzeConsumerService
{
@Resource
private
BizDataAnalyzeCollectService
bizDataAnalyzeCollectService
;
/**
* 数据上报-汇总表
*
* @param message
* @return
*/
@Consumer
(
topic
=
DataAnalyzeTopic
.
DATA_ANALYZE_COLLECT
,
scale
=
1
)
public
void
dataReport
(
DataAnalyzeCollectMessage
message
)
throws
Exception
{
Date
dataDate
=
message
.
getDataDate
();
String
relationId
=
message
.
getRelationId
();
String
channel
=
message
.
getChannel
();
String
type
=
message
.
getType
();
BizDataAnalyzeCollectEntity
bizDataAnalyzeCollectEntity
=
new
BizDataAnalyzeCollectEntity
();
bizDataAnalyzeCollectEntity
.
setRelationId
(
relationId
);
bizDataAnalyzeCollectEntity
.
setType
(
type
);
bizDataAnalyzeCollectEntity
.
setChannel
(
channel
);
bizDataAnalyzeCollectEntity
.
setDataDate
(
dataDate
);
List
<
BizDataAnalyzeCollectEntity
>
collectEntities
=
bizDataAnalyzeCollectService
.
findByExample
(
bizDataAnalyzeCollectEntity
,
null
);
if
(
CollectionUtils
.
isNotEmpty
(
collectEntities
))
{
//
}
}
}
\ No newline at end of file
src/main/java/cn/com/poc/message/service/impl/DataAnalyzeProducerServiceImpl.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
message
.
service
.
impl
;
import
cn.com.poc.message.entity.DataAnalyzeCollectMessage
;
import
cn.com.poc.message.service.DataAnalyzeProducerService
;
import
cn.com.poc.message.topic.DataAnalyzeTopic
;
import
cn.com.yict.framemax.tumbleweed.client.annotation.Producer
;
import
org.springframework.stereotype.Service
;
/**
* @author alex.yao
* @date 2024/12/10
*/
@Service
public
class
DataAnalyzeProducerServiceImpl
implements
DataAnalyzeProducerService
{
/**
* 数据上报-汇总表
*
* @param message
* @return
*/
@Producer
(
topic
=
DataAnalyzeTopic
.
DATA_ANALYZE_COLLECT
)
public
DataAnalyzeCollectMessage
dataReport
(
DataAnalyzeCollectMessage
message
)
{
return
message
;
}
}
src/main/java/cn/com/poc/message/topic/DataAnalyzeTopic.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
message
.
topic
;
/**
* @author alex.yao
* @date 2024/12/10
*/
public
interface
DataAnalyzeTopic
{
String
DATA_ANALYZE_COLLECT
=
"DATA_ANALYZE_COLLECT"
;
}
src/test/java/cn/com/poc/data_analyze/query/AgentDataTrendQueryTest.java
0 → 100644
View file @
f6aa86e3
package
cn
.
com
.
poc
.
data_analyze
.
query
;
import
cn.com.poc.common.utils.DateUtils
;
import
cn.com.poc.common.utils.JsonUtils
;
import
cn.com.poc.data_analyze.service.BizDataAnalyzeDialogueRecordService
;
import
cn.com.yict.framemax.core.spring.SingleContextInitializer
;
import
org.junit.runner.RunWith
;
import
org.junit.Test
;
import
org.springframework.test.context.ContextConfiguration
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.test.context.web.WebAppConfiguration
;
import
javax.annotation.Resource
;
import
java.time.DayOfWeek
;
import
java.time.LocalDate
;
import
java.time.temporal.TemporalAdjusters
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author alex.yao
* @date 2024/12/11
*/
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@ContextConfiguration
(
initializers
=
SingleContextInitializer
.
class
)
@WebAppConfiguration
public
class
AgentDataTrendQueryTest
{
@Resource
private
BizDataAnalyzeDialogueRecordService
bizDataAnalyzeDialogueRecordService
;
@Test
public
void
test
()
{
Date
currDateTime
=
DateUtils
.
getCurrDateTime
();
Date
date
=
DateUtils
.
addDays
(
currDateTime
,
-
7
);
//1. 获取本月第一周的日期范围
Date
thisWeekBegin
=
DateUtils
.
getWeekBegin2
(
currDateTime
);
Date
thisWeekEnd
=
DateUtils
.
getWeekEnd2
(
currDateTime
);
// 输出结果
System
.
out
.
println
(
"本月第一周的起始日期: "
+
DateUtils
.
formatDate
(
thisWeekBegin
,
DateUtils
.
yyyy_MM_dd_HH_mm_ss
));
System
.
out
.
println
(
"本月第一周的结束日期: "
+
DateUtils
.
formatDate
(
thisWeekEnd
,
DateUtils
.
yyyy_MM_dd_HH_mm_ss
));
System
.
out
.
println
(
"本月第一周的结束日期: "
+
DateUtils
.
formatDate
(
date
,
DateUtils
.
yyyy_MM_dd_HH_mm_ss
));
}
}
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