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
15a4155d
Commit
15a4155d
authored
Oct 22, 2024
by
jennie chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.配置【已发布的应用】发布至【应用广场】
2.获取【应用广场】的应用列表 3.收藏/取消收藏应用
parent
bd61062e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
AgentApplicationMallServiceImpl.java
...ation/aggregate/impl/AgentApplicationMallServiceImpl.java
+4
-4
No files found.
src/main/java/cn/com/poc/agent_application/aggregate/impl/AgentApplicationMallServiceImpl.java
View file @
15a4155d
...
@@ -32,7 +32,7 @@ public class AgentApplicationMallServiceImpl implements AgentApplicationMallServ
...
@@ -32,7 +32,7 @@ public class AgentApplicationMallServiceImpl implements AgentApplicationMallServ
if
(
userBaseEntity
==
null
)
{
if
(
userBaseEntity
==
null
)
{
throw
new
BusinessException
(
"用户未登录"
);
throw
new
BusinessException
(
"用户未登录"
);
}
}
//
todo
先判断当前应用被收藏了吗
// 先判断当前应用被收藏了吗
BizMemberAgentApplicationCollectEntity
collectEntity
=
bizMemberAgentApplicationCollectService
.
getByAgentMallId
(
agentMallId
);
BizMemberAgentApplicationCollectEntity
collectEntity
=
bizMemberAgentApplicationCollectService
.
getByAgentMallId
(
agentMallId
);
BizAgentApplicationMallEntity
mallEntity
=
bizAgentApplicationMallService
.
get
(
agentMallId
);
BizAgentApplicationMallEntity
mallEntity
=
bizAgentApplicationMallService
.
get
(
agentMallId
);
if
(
mallEntity
==
null
){
if
(
mallEntity
==
null
){
...
@@ -42,7 +42,7 @@ public class AgentApplicationMallServiceImpl implements AgentApplicationMallServ
...
@@ -42,7 +42,7 @@ public class AgentApplicationMallServiceImpl implements AgentApplicationMallServ
// 收藏该应用
// 收藏该应用
// 说明从来没收藏过
// 说明从来没收藏过
if
(
collectEntity
==
null
){
if
(
collectEntity
==
null
){
//
todo
在用户收藏表中添加数据
// 在用户收藏表中添加数据
BizMemberAgentApplicationCollectEntity
entity
=
new
BizMemberAgentApplicationCollectEntity
();
BizMemberAgentApplicationCollectEntity
entity
=
new
BizMemberAgentApplicationCollectEntity
();
entity
.
setIsCollect
(
CommonConstant
.
IsDeleted
.
Y
);
entity
.
setIsCollect
(
CommonConstant
.
IsDeleted
.
Y
);
entity
.
setMemberId
(
userBaseEntity
.
getUserId
().
intValue
());
entity
.
setMemberId
(
userBaseEntity
.
getUserId
().
intValue
());
...
@@ -52,13 +52,13 @@ public class AgentApplicationMallServiceImpl implements AgentApplicationMallServ
...
@@ -52,13 +52,13 @@ public class AgentApplicationMallServiceImpl implements AgentApplicationMallServ
collectEntity
.
setIsCollect
(
CommonConstant
.
IsDeleted
.
Y
);
collectEntity
.
setIsCollect
(
CommonConstant
.
IsDeleted
.
Y
);
bizMemberAgentApplicationCollectService
.
update
(
collectEntity
);
bizMemberAgentApplicationCollectService
.
update
(
collectEntity
);
}
}
//
todo
在应用广场的应用中 添加收藏数
// 在应用广场的应用中 添加收藏数
mallEntity
.
setCollectNumber
(
mallEntity
.
getCollectNumber
()
+
1
);
mallEntity
.
setCollectNumber
(
mallEntity
.
getCollectNumber
()
+
1
);
}
else
{
}
else
{
// 取消收藏该应用
// 取消收藏该应用
collectEntity
.
setIsCollect
(
CommonConstant
.
IsDeleted
.
N
);
collectEntity
.
setIsCollect
(
CommonConstant
.
IsDeleted
.
N
);
bizMemberAgentApplicationCollectService
.
update
(
collectEntity
);
bizMemberAgentApplicationCollectService
.
update
(
collectEntity
);
//
todo
在应用广场的应用中 取消收藏数
// 在应用广场的应用中 取消收藏数
mallEntity
.
setCollectNumber
(
mallEntity
.
getCollectNumber
()
-
1
);
mallEntity
.
setCollectNumber
(
mallEntity
.
getCollectNumber
()
-
1
);
}
}
bizAgentApplicationMallService
.
update
(
mallEntity
);
bizAgentApplicationMallService
.
update
(
mallEntity
);
...
...
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