Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
707cc622
Commit
707cc622
authored
May 29, 2023
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产品应用列表接口增加返回字段
parent
e2468355
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
5 deletions
+63
-5
portal-manager/src/main/java/com/mortals/xhx/module/product/model/vo/ProductAppsVo.java
...om/mortals/xhx/module/product/model/vo/ProductAppsVo.java
+23
-2
portal-manager/src/main/java/com/mortals/xhx/module/product/service/impl/ProductAppsServiceImpl.java
...x/module/product/service/impl/ProductAppsServiceImpl.java
+40
-3
No files found.
portal-manager/src/main/java/com/mortals/xhx/module/product/model/vo/ProductAppsVo.java
View file @
707cc622
package
com.mortals.xhx.module.product.model.vo
;
package
com.mortals.xhx.module.product.model.vo
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.xhx.module.product.model.ProductAppsEntity
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
/**
/**
* 协议管理视图对象
* 协议管理视图对象
...
@@ -10,5 +9,27 @@ import java.util.List;
...
@@ -10,5 +9,27 @@ import java.util.List;
* @date 2023-02-22
* @date 2023-02-22
*/
*/
public
class
ProductAppsVo
extends
BaseEntityLong
{
public
class
ProductAppsVo
extends
BaseEntityLong
{
/**
* 产品名称
*/
private
String
productName
;
/** 产品id列表 */
private
List
<
Long
>
productIdList
;
public
String
getProductName
()
{
return
productName
;
}
public
void
setProductName
(
String
productName
)
{
this
.
productName
=
productName
;
}
public
List
<
Long
>
getProductIdList
()
{
return
productIdList
;
}
public
void
setProductIdList
(
List
<
Long
>
productIdList
)
{
this
.
productIdList
=
productIdList
;
}
}
}
\ No newline at end of file
portal-manager/src/main/java/com/mortals/xhx/module/product/service/impl/ProductAppsServiceImpl.java
View file @
707cc622
package
com.mortals.xhx.module.product.service.impl
;
package
com.mortals.xhx.module.product.service.impl
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.xhx.module.product.dao.ProductAppsDao
;
import
com.mortals.xhx.module.product.dao.ProductAppsDao
;
import
com.mortals.xhx.module.product.model.ProductAppsEntity
;
import
com.mortals.xhx.module.product.model.ProductAppsEntity
;
import
com.mortals.xhx.module.product.model.ProductEntity
;
import
com.mortals.xhx.module.product.model.ProductQuery
;
import
com.mortals.xhx.module.product.service.ProductAppsService
;
import
com.mortals.xhx.module.product.service.ProductAppsService
;
import
com.mortals.xhx.module.product.service.ProductService
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
/**
* ProductAppsService
* ProductAppsService
* 产品应用 service实现
* 产品应用 service实现
...
@@ -16,4 +26,31 @@ import com.mortals.xhx.module.product.service.ProductAppsService;
...
@@ -16,4 +26,31 @@ import com.mortals.xhx.module.product.service.ProductAppsService;
@Service
(
"productAppsService"
)
@Service
(
"productAppsService"
)
public
class
ProductAppsServiceImpl
extends
AbstractCRUDServiceImpl
<
ProductAppsDao
,
ProductAppsEntity
,
Long
>
implements
ProductAppsService
{
public
class
ProductAppsServiceImpl
extends
AbstractCRUDServiceImpl
<
ProductAppsDao
,
ProductAppsEntity
,
Long
>
implements
ProductAppsService
{
@Autowired
private
ProductService
productService
;
@Override
protected
ProductAppsEntity
findBefore
(
ProductAppsEntity
params
,
PageInfo
pageInfo
,
Context
context
)
throws
AppException
{
if
(
params
.
getProductId
()==
null
)
{
List
<
ProductEntity
>
productList
=
productService
.
find
(
new
ProductQuery
());
List
<
Long
>
productIdList
=
new
ArrayList
<>();
for
(
ProductEntity
item
:
productList
)
{
productIdList
.
add
(
item
.
getId
());
}
params
.
setProductIdList
(
productIdList
);
}
return
params
;
}
@Override
protected
void
findAfter
(
ProductAppsEntity
params
,
PageInfo
pageInfo
,
Context
context
,
List
<
ProductAppsEntity
>
list
)
throws
AppException
{
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
for
(
ProductAppsEntity
item:
list
){
ProductEntity
productEntity
=
productService
.
get
(
item
.
getProductId
());
if
(
productEntity
!=
null
){
item
.
setProductName
(
productEntity
.
getProductName
());
}
}
}
}
}
}
\ 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