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
0781adb6
Commit
0781adb6
authored
Dec 03, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
联系人下拉框搜索补充电话搜索参数查询业务
parent
2b49ea4c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
8 deletions
+18
-8
CustomerContactsMapper.java
...er/dal/mysql/customerContacts/CustomerContactsMapper.java
+5
-0
CustomerContactsService.java
...mer/service/customerContacts/CustomerContactsService.java
+2
-2
CustomerContactsServiceImpl.java
...service/customerContacts/CustomerContactsServiceImpl.java
+4
-3
CustomerContactsController.java
...er/admin/customerContacts/CustomerContactsController.java
+7
-3
No files found.
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/dal/mysql/customerContacts/CustomerContactsMapper.java
View file @
0781adb6
...
...
@@ -83,6 +83,9 @@ public interface CustomerContactsMapper extends BaseMapperX<CustomerContactsDO>
"<when test = 'searchKey != null and searchKey != \"\" '>"
,
"and CONCAT(IFNULL(cc.`name`,''),IFNULL(cc.`name_en`,''),IFNULL(cc.`phone_new`,''),IFNULL(cc.`email`,''),IFNULL(c.`company`,''),IFNULL(c.`company_en`,'')) like concat('%', concat(#{searchKey}, '%'))"
,
"</when>"
,
"<when test = 'phone != null and phone != \"\" '>"
,
"and IFNULL(cc.`phone_new`,'') like concat('%', concat(#{phone}, '%'))"
,
"</when>"
,
"<when test = 'type != null and type != \"\" '>"
,
"and FIND_IN_SET(#{type}, c.type) "
,
"</when>"
,
...
...
@@ -98,6 +101,7 @@ public interface CustomerContactsMapper extends BaseMapperX<CustomerContactsDO>
})
IPage
<
CustomerContactsDto
>
selectBySearchKey
(
IPage
page
,
@Param
(
"searchKey"
)
String
searchKey
,
@Param
(
"phone"
)
String
phone
,
@Param
(
"type"
)
String
type
,
@Param
(
"ids"
)
Collection
<
Long
>
ids
,
@Param
(
"customerId"
)
Long
customerId
);
...
...
@@ -145,6 +149,7 @@ public interface CustomerContactsMapper extends BaseMapperX<CustomerContactsDO>
//过滤客户经理函数
IPage
<
CustomerContactsDto
>
selectBySearchKey2
(
IPage
page
,
@Param
(
"searchKey"
)
String
searchKey
,
@Param
(
"phone"
)
String
phone
,
@Param
(
"type"
)
String
type
,
@Param
(
"ids"
)
Collection
<
Long
>
ids
,
@Param
(
"customerId"
)
Long
customerId
,
...
...
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/service/customerContacts/CustomerContactsService.java
View file @
0781adb6
...
...
@@ -107,14 +107,14 @@ public interface CustomerContactsService extends IService<CustomerContactsDO> {
* @param customerId 客户ID
* @return 联系人列表
*/
PageResult
<
CustomerContactsDto
>
selectBySearchKey
(
String
searchKey
,
String
type
,
Collection
<
Long
>
ids
,
Long
customerId
,
PageParam
page
);
PageResult
<
CustomerContactsDto
>
selectBySearchKey
(
String
searchKey
,
String
phone
,
String
type
,
Collection
<
Long
>
ids
,
Long
customerId
,
PageParam
page
);
/*
添加的客户选择函数
*/
PageResult
<
CustomerContactsDto
>
selectBySearchKey2
(
String
searchKey
,
String
type
,
Collection
<
Long
>
ids
,
String
searchKey
,
String
phone
,
String
type
,
Collection
<
Long
>
ids
,
Long
customerId
,
PageParam
page
,
Long
UserId
);
...
...
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/service/customerContacts/CustomerContactsServiceImpl.java
View file @
0781adb6
...
...
@@ -146,9 +146,9 @@ public class CustomerContactsServiceImpl extends AbstractService<CustomerContact
}
@Override
public
PageResult
<
CustomerContactsDto
>
selectBySearchKey
(
String
searchKey
,
String
type
,
Collection
<
Long
>
ids
,
Long
customerId
,
PageParam
page
)
{
public
PageResult
<
CustomerContactsDto
>
selectBySearchKey
(
String
searchKey
,
String
phone
,
String
type
,
Collection
<
Long
>
ids
,
Long
customerId
,
PageParam
page
)
{
IPage
<
CustomerContactsDto
>
mpPage
=
MyBatisUtils
.
buildPage
(
page
);
customerContactsMapper
.
selectBySearchKey
(
mpPage
,
searchKey
,
customerContactsMapper
.
selectBySearchKey
(
mpPage
,
searchKey
,
phone
,
type
,
ids
,
customerId
);
return
PageResult
.
of
(
mpPage
);
...
...
@@ -157,13 +157,14 @@ public class CustomerContactsServiceImpl extends AbstractService<CustomerContact
@Override
public
PageResult
<
CustomerContactsDto
>
selectBySearchKey2
(
String
searchKey
,
String
phone
,
String
type
,
Collection
<
Long
>
ids
,
Long
customerId
,
PageParam
page
,
Long
UserId
)
{
IPage
<
CustomerContactsDto
>
mpPage
=
MyBatisUtils
.
buildPage
(
page
);
customerContactsMapper
.
selectBySearchKey2
(
mpPage
,
searchKey
,
customerContactsMapper
.
selectBySearchKey2
(
mpPage
,
searchKey
,
phone
,
type
,
ids
,
customerId
,
UserId
);
return
PageResult
.
of
(
mpPage
);
...
...
yudao-module-customer/yudao-module-customer-rest/src/main/java/cn/iocoder/yudao/module/customer/controller/admin/customerContacts/CustomerContactsController.java
View file @
0781adb6
...
...
@@ -164,19 +164,21 @@ public class CustomerContactsController {
@ApiOperation
(
"获得客户联系人下拉框列表(单次最多显示20条,请输入联系人电话、联系人姓名、客户名称搜索)"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"searchKey"
,
value
=
"请输入联系人电话、联系人姓名、客户名称搜索"
,
example
=
"姓名或电话"
,
dataTypeClass
=
String
.
class
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"客户类型"
,
example
=
"姓名或电话"
,
dataTypeClass
=
String
.
class
),
@ApiImplicitParam
(
name
=
"phone"
,
value
=
"请输入联系人电话搜索"
,
example
=
"电话"
,
dataTypeClass
=
String
.
class
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"客户类型"
,
example
=
"1"
,
dataTypeClass
=
String
.
class
),
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"编号列表"
,
example
=
"1024,2048"
,
dataTypeClass
=
List
.
class
),
@ApiImplicitParam
(
name
=
"customerId"
,
value
=
"客户ID"
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
})
public
CommonResult
<
PageResult
<
CustomerContactsDto
>>
selectBySearchKey
(
@RequestParam
(
value
=
"searchKey"
,
required
=
false
)
String
searchKey
,
@RequestParam
(
value
=
"phone"
,
required
=
false
)
String
phone
,
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
,
@RequestParam
(
value
=
"ids"
,
required
=
false
)
Collection
<
Long
>
ids
,
@RequestParam
(
value
=
"customerId"
,
required
=
false
)
Long
customerId
,
PageParam
page
)
{
Long
loginUserId
=
SecurityFrameworkUtils
.
getLoginUserId
();
return
success
(
customerContactsService
.
selectBySearchKey
(
searchKey
,
return
success
(
customerContactsService
.
selectBySearchKey
(
searchKey
,
phone
,
type
,
ids
,
customerId
,
page
));
}
...
...
@@ -188,12 +190,14 @@ public class CustomerContactsController {
@ApiOperation
(
"获得客户联系人下拉框列表(单次最多显示20条,请输入联系人电话、联系人姓名、客户名称搜索)"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"searchKey"
,
value
=
"请输入联系人电话、联系人姓名、客户名称搜索"
,
example
=
"姓名或电话"
,
dataTypeClass
=
String
.
class
),
@ApiImplicitParam
(
name
=
"phone"
,
value
=
"请输入联系人电话搜索"
,
example
=
"电话"
,
dataTypeClass
=
String
.
class
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"客户类型"
,
example
=
"姓名或电话"
,
dataTypeClass
=
String
.
class
),
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"编号列表"
,
example
=
"1024,2048"
,
dataTypeClass
=
List
.
class
),
@ApiImplicitParam
(
name
=
"customerId"
,
value
=
"客户ID"
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
})
public
CommonResult
<
PageResult
<
CustomerContactsDto
>>
selectBySearchKey2
(
@RequestParam
(
value
=
"searchKey"
,
required
=
false
)
String
searchKey
,
@RequestParam
(
value
=
"phone"
,
required
=
false
)
String
phone
,
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
,
@RequestParam
(
value
=
"ids"
,
required
=
false
)
Collection
<
Long
>
ids
,
@RequestParam
(
value
=
"customerId"
,
required
=
false
)
Long
customerId
...
...
@@ -205,7 +209,7 @@ public class CustomerContactsController {
type, ids, customerId, page));*/
//当前用户ID
Long
loginUserId
=
SecurityFrameworkUtils
.
getLoginUserId
();
return
success
(
customerContactsService
.
selectBySearchKey2
(
searchKey
,
return
success
(
customerContactsService
.
selectBySearchKey2
(
searchKey
,
phone
,
type
,
ids
,
customerId
,
page
,
loginUserId
));
}
...
...
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