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
35f422f2
Commit
35f422f2
authored
Dec 17, 2024
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:首页应用积分数
parent
6fe27791
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
1 deletion
+27
-1
SearchAgentApplicationDto.java
...java/cn/com/poc/expose/dto/SearchAgentApplicationDto.java
+15
-1
AgentApplicationRestImpl.java
...cn/com/poc/expose/rest/impl/AgentApplicationRestImpl.java
+12
-0
No files found.
src/main/java/cn/com/poc/expose/dto/SearchAgentApplicationDto.java
View file @
35f422f2
package
cn
.
com
.
poc
.
expose
.
dto
;
package
cn
.
com
.
poc
.
expose
.
dto
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
public
class
SearchAgentApplicationDto
implements
Serializable
{
public
class
SearchAgentApplicationDto
implements
Serializable
{
...
@@ -36,6 +37,11 @@ public class SearchAgentApplicationDto implements Serializable {
...
@@ -36,6 +37,11 @@ public class SearchAgentApplicationDto implements Serializable {
*/
*/
private
String
creator
;
private
String
creator
;
/**
* 积分数
*/
private
BigDecimal
points
;
public
String
getAgentId
()
{
public
String
getAgentId
()
{
return
agentId
;
return
agentId
;
}
}
...
@@ -83,4 +89,12 @@ public class SearchAgentApplicationDto implements Serializable {
...
@@ -83,4 +89,12 @@ public class SearchAgentApplicationDto implements Serializable {
public
void
setCreator
(
String
creator
)
{
public
void
setCreator
(
String
creator
)
{
this
.
creator
=
creator
;
this
.
creator
=
creator
;
}
}
public
BigDecimal
getPoints
()
{
return
points
;
}
public
void
setPoints
(
BigDecimal
points
)
{
this
.
points
=
points
;
}
}
}
src/main/java/cn/com/poc/expose/rest/impl/AgentApplicationRestImpl.java
View file @
35f422f2
...
@@ -16,6 +16,9 @@ import cn.com.poc.common.utils.Assert;
...
@@ -16,6 +16,9 @@ import cn.com.poc.common.utils.Assert;
import
cn.com.poc.common.utils.BlContext
;
import
cn.com.poc.common.utils.BlContext
;
import
cn.com.poc.common.utils.StringUtils
;
import
cn.com.poc.common.utils.StringUtils
;
import
cn.com.poc.common.utils.UUIDTool
;
import
cn.com.poc.common.utils.UUIDTool
;
import
cn.com.poc.equity.aggregate.PointDeductionRulesService
;
import
cn.com.poc.equity.entity.BizPointDeductionRulesEntity
;
import
cn.com.poc.equity.service.BizPointDeductionRulesService
;
import
cn.com.poc.expose.aggregate.AgentApplicationService
;
import
cn.com.poc.expose.aggregate.AgentApplicationService
;
import
cn.com.poc.expose.dto.*
;
import
cn.com.poc.expose.dto.*
;
import
cn.com.poc.expose.rest.AgentApplicationRest
;
import
cn.com.poc.expose.rest.AgentApplicationRest
;
...
@@ -34,6 +37,8 @@ import javax.servlet.http.HttpServletRequest;
...
@@ -34,6 +37,8 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.io.PrintWriter
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -58,6 +63,9 @@ public class AgentApplicationRestImpl implements AgentApplicationRest {
...
@@ -58,6 +63,9 @@ public class AgentApplicationRestImpl implements AgentApplicationRest {
@Resource
@Resource
private
AgentApplicationProducerService
agentApplicationProducerService
;
private
AgentApplicationProducerService
agentApplicationProducerService
;
@Resource
private
PointDeductionRulesService
pointDeductionRulesService
;
@Override
@Override
public
List
<
String
>
getRecommendQuestions
(
HttpServletRequest
httpServletRequest
)
throws
Exception
{
public
List
<
String
>
getRecommendQuestions
(
HttpServletRequest
httpServletRequest
)
throws
Exception
{
UserBaseEntity
userBaseEntity
=
BlContext
.
getCurrentUserNotException
();
UserBaseEntity
userBaseEntity
=
BlContext
.
getCurrentUserNotException
();
...
@@ -144,8 +152,11 @@ public class AgentApplicationRestImpl implements AgentApplicationRest {
...
@@ -144,8 +152,11 @@ public class AgentApplicationRestImpl implements AgentApplicationRest {
publishEntity
.
setMemberId
(
0
);
publishEntity
.
setMemberId
(
0
);
publishEntity
.
setIsDeleted
(
CommonConstant
.
IsDeleted
.
N
);
publishEntity
.
setIsDeleted
(
CommonConstant
.
IsDeleted
.
N
);
List
<
BizAgentApplicationPublishEntity
>
entities
=
bizAgentApplicationPublishService
.
findByExample
(
publishEntity
,
pagingInfo
);
List
<
BizAgentApplicationPublishEntity
>
entities
=
bizAgentApplicationPublishService
.
findByExample
(
publishEntity
,
pagingInfo
);
BizPointDeductionRulesEntity
bizPointDeductionRulesEntity
=
new
BizPointDeductionRulesEntity
();
bizPointDeductionRulesEntity
.
setIsDeleted
(
CommonConstant
.
IsDeleted
.
N
);
if
(
CollectionUtils
.
isNotEmpty
(
entities
))
{
if
(
CollectionUtils
.
isNotEmpty
(
entities
))
{
result
=
entities
.
stream
().
map
(
value
->
{
result
=
entities
.
stream
().
map
(
value
->
{
Long
pointDeductionNum
=
pointDeductionRulesService
.
calculatePointDeductionNum
(
value
.
getLargeModel
(),
value
.
getCommunicationTurn
(),
null
);
SearchAgentApplicationDto
searchAgentApplicationDto
=
new
SearchAgentApplicationDto
();
SearchAgentApplicationDto
searchAgentApplicationDto
=
new
SearchAgentApplicationDto
();
searchAgentApplicationDto
.
setAgentId
(
value
.
getAgentId
());
searchAgentApplicationDto
.
setAgentId
(
value
.
getAgentId
());
searchAgentApplicationDto
.
setAgentTitle
(
value
.
getAgentTitle
());
searchAgentApplicationDto
.
setAgentTitle
(
value
.
getAgentTitle
());
...
@@ -153,6 +164,7 @@ public class AgentApplicationRestImpl implements AgentApplicationRest {
...
@@ -153,6 +164,7 @@ public class AgentApplicationRestImpl implements AgentApplicationRest {
searchAgentApplicationDto
.
setAgentAvatar
(
value
.
getAgentAvatar
());
searchAgentApplicationDto
.
setAgentAvatar
(
value
.
getAgentAvatar
());
searchAgentApplicationDto
.
setPublishedTime
(
value
.
getModifiedTime
());
searchAgentApplicationDto
.
setPublishedTime
(
value
.
getModifiedTime
());
searchAgentApplicationDto
.
setCreator
(
"官方"
);
searchAgentApplicationDto
.
setCreator
(
"官方"
);
searchAgentApplicationDto
.
setPoints
(
new
BigDecimal
(
pointDeductionNum
).
divide
(
new
BigDecimal
(
100
),
2
,
RoundingMode
.
HALF_UP
));
return
searchAgentApplicationDto
;
return
searchAgentApplicationDto
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
}
}
...
...
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