Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-api-boot-master
Commits
05709adb
Commit
05709adb
authored
Nov 08, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
竞争对手下拉框数据接口补充模糊匹配参数查询,并最多返回30条数据
parent
b207ead5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
5 deletions
+19
-5
CustomerCompetitorService.java
...service/customerCompetitor/CustomerCompetitorService.java
+7
-1
CustomerCompetitorServiceImpl.java
...ice/customerCompetitor/CustomerCompetitorServiceImpl.java
+9
-2
CustomerCompetitorController.java
...dmin/customerCompetitor/CustomerCompetitorController.java
+3
-2
No files found.
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/service/customerCompetitor/CustomerCompetitorService.java
View file @
05709adb
...
...
@@ -47,7 +47,13 @@ public interface CustomerCompetitorService extends IService<CustomerCompetitorDO
* @return 客户竞争对手列表
*/
List
<
CustomerCompetitorDO
>
getCompetitorList
(
Collection
<
Long
>
ids
);
List
<
CustomerCompetitorDO
>
getCompetitorList
();
/**
* 搜索
* @param searchKey 关键字
* @return
*/
List
<
CustomerCompetitorDO
>
getCompetitorListBySearchKey
(
String
searchKey
);
/**
* 获得客户竞争对手分页
...
...
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/service/customerCompetitor/CustomerCompetitorServiceImpl.java
View file @
05709adb
...
...
@@ -2,6 +2,10 @@ package cn.iocoder.yudao.module.customer.service.customerCompetitor;
import
java.util.*
;
import
javax.annotation.Resource
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.validation.annotation.Validated
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
...
...
@@ -76,8 +80,11 @@ public class CustomerCompetitorServiceImpl extends AbstractService<CustomerCompe
}
@Override
public
List
<
CustomerCompetitorDO
>
getCompetitorList
()
{
return
competitorMapper
.
selectList
();
public
List
<
CustomerCompetitorDO
>
getCompetitorListBySearchKey
(
String
searchKey
)
{
return
competitorMapper
.
selectList
(
new
LambdaQueryWrapper
<
CustomerCompetitorDO
>()
.
like
(
StringUtils
.
isNotBlank
(
searchKey
),
CustomerCompetitorDO:
:
getName
,
searchKey
)
.
orderDesc
(
CustomerCompetitorDO:
:
getId
)
.
last
(
"limit 30"
));
}
@Override
...
...
yudao-module-customer/yudao-module-customer-rest/src/main/java/cn/iocoder/yudao/module/customer/controller/admin/customerCompetitor/CustomerCompetitorController.java
View file @
05709adb
...
...
@@ -75,9 +75,10 @@ public class CustomerCompetitorController {
@GetMapping
(
"/listAll"
)
@ApiOperation
(
"获得所有客户竞争对手列表"
)
@ApiImplicitParam
(
name
=
"searchKey"
,
value
=
"关键字"
,
required
=
false
,
dataTypeClass
=
String
.
class
)
// @PreAuthorize("@ss.hasPermission('customer:competitor:query')")
public
CommonResult
<
List
<
CustomerCompetitorBackVO
>>
getCompetitorListAll
()
{
List
<
CustomerCompetitorDO
>
list
=
competitorService
.
getCompetitorList
(
);
public
CommonResult
<
List
<
CustomerCompetitorBackVO
>>
getCompetitorListAll
(
@RequestParam
(
"searchKey"
)
String
searchKey
)
{
List
<
CustomerCompetitorDO
>
list
=
competitorService
.
getCompetitorList
BySearchKey
(
searchKey
);
return
success
(
CustomerCompetitorConvert
.
INSTANCE
.
convertList
(
list
));
}
...
...
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