Commit 15a4155d authored by jennie chen's avatar jennie chen

1.配置【已发布的应用】发布至【应用广场】

2.获取【应用广场】的应用列表
3.收藏/取消收藏应用
parent bd61062e
......@@ -32,7 +32,7 @@ public class AgentApplicationMallServiceImpl implements AgentApplicationMallServ
if (userBaseEntity == null) {
throw new BusinessException("用户未登录");
}
// todo 先判断当前应用被收藏了吗
// 先判断当前应用被收藏了吗
BizMemberAgentApplicationCollectEntity collectEntity = bizMemberAgentApplicationCollectService.getByAgentMallId(agentMallId);
BizAgentApplicationMallEntity mallEntity = bizAgentApplicationMallService.get(agentMallId);
if(mallEntity == null){
......@@ -42,7 +42,7 @@ public class AgentApplicationMallServiceImpl implements AgentApplicationMallServ
// 收藏该应用
// 说明从来没收藏过
if(collectEntity == null){
// todo 在用户收藏表中添加数据
// 在用户收藏表中添加数据
BizMemberAgentApplicationCollectEntity entity = new BizMemberAgentApplicationCollectEntity();
entity.setIsCollect(CommonConstant.IsDeleted.Y);
entity.setMemberId(userBaseEntity.getUserId().intValue());
......@@ -52,13 +52,13 @@ public class AgentApplicationMallServiceImpl implements AgentApplicationMallServ
collectEntity.setIsCollect(CommonConstant.IsDeleted.Y);
bizMemberAgentApplicationCollectService.update(collectEntity);
}
// todo 在应用广场的应用中 添加收藏数
// 在应用广场的应用中 添加收藏数
mallEntity.setCollectNumber(mallEntity.getCollectNumber() + 1);
}else {
// 取消收藏该应用
collectEntity.setIsCollect(CommonConstant.IsDeleted.N);
bizMemberAgentApplicationCollectService.update(collectEntity);
// todo 在应用广场的应用中 取消收藏数
// 在应用广场的应用中 取消收藏数
mallEntity.setCollectNumber(mallEntity.getCollectNumber() - 1);
}
bizAgentApplicationMallService.update(mallEntity);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment