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
356b7c83
Commit
356b7c83
authored
Nov 08, 2024
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:新增接口,获取应用上架信息
parent
bb8fa032
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
139 additions
and
0 deletions
+139
-0
AgentApplicationMallService.java
...nt_application/aggregate/AgentApplicationMallService.java
+9
-0
AgentApplicationMallServiceImpl.java
...ation/aggregate/impl/AgentApplicationMallServiceImpl.java
+10
-0
BizAgentApplicationMallConvert.java
...t_application/convert/BizAgentApplicationMallConvert.java
+1
-0
BizAgentApplicationPublishConvert.java
...pplication/convert/BizAgentApplicationPublishConvert.java
+1
-0
AgentApplicationMallInfoDto.java
...oc/agent_application/dto/AgentApplicationMallInfoDto.java
+70
-0
BizAgentApplicationPublishDto.java
.../agent_application/dto/BizAgentApplicationPublishDto.java
+21
-0
BizAgentApplicationMallRest.java
...c/agent_application/rest/BizAgentApplicationMallRest.java
+9
-0
BizAgentApplicationMallRestImpl.java
...pplication/rest/impl/BizAgentApplicationMallRestImpl.java
+18
-0
No files found.
src/main/java/cn/com/poc/agent_application/aggregate/AgentApplicationMallService.java
View file @
356b7c83
package
cn
.
com
.
poc
.
agent_application
.
aggregate
;
package
cn
.
com
.
poc
.
agent_application
.
aggregate
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationMallEntity
;
public
interface
AgentApplicationMallService
{
public
interface
AgentApplicationMallService
{
/**
/**
* 收藏/取消收藏应用广场中的应用
* 收藏/取消收藏应用广场中的应用
...
@@ -14,4 +16,11 @@ public interface AgentApplicationMallService {
...
@@ -14,4 +16,11 @@ public interface AgentApplicationMallService {
*/
*/
void
addClickNumber
(
Integer
agentPublishId
)
throws
Exception
;
void
addClickNumber
(
Integer
agentPublishId
)
throws
Exception
;
/**
* 获取应用发布信息
*
* @param agentId 应用id
*/
BizAgentApplicationMallEntity
getAgentPublishInfo
(
String
agentId
)
throws
Exception
;
}
}
src/main/java/cn/com/poc/agent_application/aggregate/impl/AgentApplicationMallServiceImpl.java
View file @
356b7c83
...
@@ -93,4 +93,14 @@ public class AgentApplicationMallServiceImpl implements AgentApplicationMallServ
...
@@ -93,4 +93,14 @@ public class AgentApplicationMallServiceImpl implements AgentApplicationMallServ
mallEntity
.
setClickNumber
(
mallEntity
.
getClickNumber
()
+
1
);
mallEntity
.
setClickNumber
(
mallEntity
.
getClickNumber
()
+
1
);
bizAgentApplicationMallService
.
update
(
mallEntity
);
bizAgentApplicationMallService
.
update
(
mallEntity
);
}
}
@Override
public
BizAgentApplicationMallEntity
getAgentPublishInfo
(
String
agentId
)
throws
Exception
{
BizAgentApplicationPublishEntity
agentApplicationPublishEntity
=
bizAgentApplicationPublishService
.
getByAgentId
(
agentId
);
if
(
agentApplicationPublishEntity
==
null
)
{
return
null
;
}
Integer
publishId
=
agentApplicationPublishEntity
.
getId
();
return
bizAgentApplicationMallService
.
getByAgentPublishId
(
publishId
);
}
}
}
src/main/java/cn/com/poc/agent_application/convert/BizAgentApplicationMallConvert.java
View file @
356b7c83
...
@@ -34,6 +34,7 @@ public class BizAgentApplicationMallConvert {
...
@@ -34,6 +34,7 @@ public class BizAgentApplicationMallConvert {
entity
.
setIsCopy
(
model
.
getIsCopy
());
entity
.
setIsCopy
(
model
.
getIsCopy
());
entity
.
setIsSale
(
model
.
getIsSale
());
entity
.
setIsSale
(
model
.
getIsSale
());
entity
.
setPopularity
(
model
.
getPopularity
());
entity
.
setPopularity
(
model
.
getPopularity
());
entity
.
setCreatedTime
(
model
.
getCreatedTime
());
return
entity
;
return
entity
;
}
}
...
...
src/main/java/cn/com/poc/agent_application/convert/BizAgentApplicationPublishConvert.java
View file @
356b7c83
...
@@ -35,6 +35,7 @@ public class BizAgentApplicationPublishConvert {
...
@@ -35,6 +35,7 @@ public class BizAgentApplicationPublishConvert {
entity
.
setAgentSystem
(
model
.
getAgentSystem
());
entity
.
setAgentSystem
(
model
.
getAgentSystem
());
entity
.
setPreamble
(
model
.
getPreamble
());
entity
.
setPreamble
(
model
.
getPreamble
());
entity
.
setIsLongMemory
(
model
.
getIsLongMemory
());
entity
.
setIsLongMemory
(
model
.
getIsLongMemory
());
entity
.
setPublishTime
(
model
.
getCreatedTime
());
if
(
StringUtils
.
isNotBlank
(
model
.
getVariableStructure
()))
{
if
(
StringUtils
.
isNotBlank
(
model
.
getVariableStructure
()))
{
entity
.
setVariableStructure
(
JsonUtils
.
deSerialize
(
model
.
getVariableStructure
(),
new
TypeReference
<
List
<
Variable
>>()
{
entity
.
setVariableStructure
(
JsonUtils
.
deSerialize
(
model
.
getVariableStructure
(),
new
TypeReference
<
List
<
Variable
>>()
{
}.
getType
()));
}.
getType
()));
...
...
src/main/java/cn/com/poc/agent_application/dto/AgentApplicationMallInfoDto.java
0 → 100644
View file @
356b7c83
package
cn
.
com
.
poc
.
agent_application
.
dto
;
import
java.util.Date
;
/**
* Agent应用上架信息
*/
public
class
AgentApplicationMallInfoDto
{
private
String
agentId
;
private
Integer
agentPublishId
;
private
Integer
categoryId
;
private
String
isCopy
;
private
String
isSale
;
private
Date
launchTime
;
public
String
getAgentId
()
{
return
agentId
;
}
public
void
setAgentId
(
String
agentId
)
{
this
.
agentId
=
agentId
;
}
public
Integer
getAgentPublishId
()
{
return
agentPublishId
;
}
public
void
setAgentPublishId
(
Integer
agentPublishId
)
{
this
.
agentPublishId
=
agentPublishId
;
}
public
Integer
getCategoryId
()
{
return
categoryId
;
}
public
void
setCategoryId
(
Integer
categoryId
)
{
this
.
categoryId
=
categoryId
;
}
public
String
getIsCopy
()
{
return
isCopy
;
}
public
void
setIsCopy
(
String
isCopy
)
{
this
.
isCopy
=
isCopy
;
}
public
String
getIsSale
()
{
return
isSale
;
}
public
void
setIsSale
(
String
isSale
)
{
this
.
isSale
=
isSale
;
}
public
Date
getLaunchTime
()
{
return
launchTime
;
}
public
void
setLaunchTime
(
Date
launchTime
)
{
this
.
launchTime
=
launchTime
;
}
}
src/main/java/cn/com/poc/agent_application/dto/BizAgentApplicationPublishDto.java
View file @
356b7c83
...
@@ -3,4 +3,25 @@ package cn.com.poc.agent_application.dto;
...
@@ -3,4 +3,25 @@ package cn.com.poc.agent_application.dto;
public
class
BizAgentApplicationPublishDto
extends
AgentApplicationInfoDto
{
public
class
BizAgentApplicationPublishDto
extends
AgentApplicationInfoDto
{
private
String
isSale
;
private
String
isCopy
;
@Override
public
String
getIsSale
()
{
return
isSale
;
}
@Override
public
void
setIsSale
(
String
isSale
)
{
this
.
isSale
=
isSale
;
}
public
String
getIsCopy
()
{
return
isCopy
;
}
public
void
setIsCopy
(
String
isCopy
)
{
this
.
isCopy
=
isCopy
;
}
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/rest/BizAgentApplicationMallRest.java
View file @
356b7c83
package
cn
.
com
.
poc
.
agent_application
.
rest
;
package
cn
.
com
.
poc
.
agent_application
.
rest
;
import
cn.com.poc.agent_application.dto.AgentApplicationMallCategoryDto
;
import
cn.com.poc.agent_application.dto.AgentApplicationMallCategoryDto
;
import
cn.com.poc.agent_application.dto.AgentApplicationMallInfoDto
;
import
cn.com.poc.agent_application.dto.AgentApplicationMallQueryDto
;
import
cn.com.poc.agent_application.dto.AgentApplicationMallQueryDto
;
import
cn.com.yict.framemax.core.rest.BaseRest
;
import
cn.com.yict.framemax.core.rest.BaseRest
;
import
cn.com.poc.agent_application.dto.BizAgentApplicationMallDto
;
import
cn.com.poc.agent_application.dto.BizAgentApplicationMallDto
;
...
@@ -58,4 +59,12 @@ public interface BizAgentApplicationMallRest extends BaseRest {
...
@@ -58,4 +59,12 @@ public interface BizAgentApplicationMallRest extends BaseRest {
*/
*/
List
<
AgentApplicationMallCategoryDto
>
getMallCategoryList
(
HttpServletRequest
httpServletRequest
)
throws
Exception
;
List
<
AgentApplicationMallCategoryDto
>
getMallCategoryList
(
HttpServletRequest
httpServletRequest
)
throws
Exception
;
/**
* 获取应用上架信息
*
* @param agentId 应用id
*/
@Permission
(
Access
.
Anonymous
)
AgentApplicationMallInfoDto
getMallInfoByAgentId
(
@RequestParam
String
agentId
)
throws
Exception
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/rest/impl/BizAgentApplicationMallRestImpl.java
View file @
356b7c83
...
@@ -3,6 +3,7 @@ package cn.com.poc.agent_application.rest.impl;
...
@@ -3,6 +3,7 @@ package cn.com.poc.agent_application.rest.impl;
import
cn.com.poc.agent_application.aggregate.AgentApplicationMallService
;
import
cn.com.poc.agent_application.aggregate.AgentApplicationMallService
;
import
cn.com.poc.agent_application.convert.BizAgentApplicationMallConvert
;
import
cn.com.poc.agent_application.convert.BizAgentApplicationMallConvert
;
import
cn.com.poc.agent_application.dto.AgentApplicationMallCategoryDto
;
import
cn.com.poc.agent_application.dto.AgentApplicationMallCategoryDto
;
import
cn.com.poc.agent_application.dto.AgentApplicationMallInfoDto
;
import
cn.com.poc.agent_application.dto.AgentApplicationMallQueryDto
;
import
cn.com.poc.agent_application.dto.AgentApplicationMallQueryDto
;
import
cn.com.poc.agent_application.dto.BizAgentApplicationMallDto
;
import
cn.com.poc.agent_application.dto.BizAgentApplicationMallDto
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationCategoryEntity
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationCategoryEntity
;
...
@@ -192,4 +193,21 @@ public class BizAgentApplicationMallRestImpl implements BizAgentApplicationMallR
...
@@ -192,4 +193,21 @@ public class BizAgentApplicationMallRestImpl implements BizAgentApplicationMallR
}
}
return
result
;
return
result
;
}
}
@Override
public
AgentApplicationMallInfoDto
getMallInfoByAgentId
(
String
agentId
)
throws
Exception
{
Assert
.
notNull
(
agentId
);
BizAgentApplicationMallEntity
agentPublishInfo
=
agentApplicationMallService
.
getAgentPublishInfo
(
agentId
);
if
(
agentPublishInfo
==
null
)
{
return
null
;
}
AgentApplicationMallInfoDto
dto
=
new
AgentApplicationMallInfoDto
();
dto
.
setAgentId
(
agentId
);
dto
.
setAgentPublishId
(
agentPublishInfo
.
getAgentPublishId
());
dto
.
setCategoryId
(
agentPublishInfo
.
getCategoryId
());
dto
.
setIsCopy
(
agentPublishInfo
.
getIsCopy
());
dto
.
setIsSale
(
agentPublishInfo
.
getIsSale
());
dto
.
setLaunchTime
(
agentPublishInfo
.
getCreatedTime
());
return
dto
;
}
}
}
\ No newline at end of file
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