Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-cr20g
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
Administrator
dsk-cr20g
Commits
db83f983
Commit
db83f983
authored
Jul 10, 2023
by
lcl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户认领相关功能
parent
29fffbba
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
1 deletion
+51
-1
CustomerController.java
...a/com/dsk/web/controller/customer/CustomerController.java
+21
-0
CustomerSearchDto.java
...com/dsk/system/domain/customer/dto/CustomerSearchDto.java
+4
-0
ICustomerService.java
...rc/main/java/com/dsk/system/service/ICustomerService.java
+4
-0
CustomerServiceImpl.java
...java/com/dsk/system/service/impl/CustomerServiceImpl.java
+21
-0
CustomerMapper.xml
.../main/resources/mapper/system/customer/CustomerMapper.xml
+1
-1
No files found.
dsk-admin/src/main/java/com/dsk/web/controller/customer/CustomerController.java
View file @
db83f983
...
...
@@ -125,6 +125,8 @@ public class CustomerController extends BaseController {
}
}
/**
* 编辑客户
*/
...
...
@@ -190,4 +192,23 @@ public class CustomerController extends BaseController {
success
.
put
(
"successCount"
,
successCount
);
return
success
;
}
/**
* 取消认领
*/
@PutMapping
(
"/cancelClaim/{customerId}"
)
@RepeatSubmit
public
AjaxResult
cancelClaim
(
@PathVariable
String
customerId
)
{
return
toAjax
(
baseService
.
cancelClaim
(
customerId
));
}
/**
* 历史认领
*/
@PutMapping
(
"/historyClaim/{customerId}"
)
@RepeatSubmit
public
AjaxResult
historyClaim
(
@PathVariable
String
customerId
)
{
return
toAjax
(
baseService
.
historyClaim
(
customerId
));
}
}
dsk-system/src/main/java/com/dsk/system/domain/customer/dto/CustomerSearchDto.java
View file @
db83f983
...
...
@@ -18,5 +18,9 @@ public class CustomerSearchDto implements Serializable {
* 用户id
*/
private
Long
userId
;
/**
* 客户状态 0:正常 1:历史
*/
private
Integer
status
;
}
dsk-system/src/main/java/com/dsk/system/service/ICustomerService.java
View file @
db83f983
...
...
@@ -31,4 +31,8 @@ public interface ICustomerService {
List
<
String
>
selectUipIdList
(
List
<
String
>
uipIds
);
boolean
cancelClaim
(
String
customerId
);
boolean
historyClaim
(
String
customerId
);
}
dsk-system/src/main/java/com/dsk/system/service/impl/CustomerServiceImpl.java
View file @
db83f983
...
...
@@ -48,6 +48,7 @@ public class CustomerServiceImpl implements ICustomerService {
@Override
public
List
<
CustomerListVo
>
selectList
(
CustomerSearchDto
dto
)
{
dto
.
setUserId
(
SecurityUtils
.
getUserId
());
dto
.
setStatus
(
ObjectUtils
.
isEmpty
(
dto
.
getStatus
())
?
0
:
dto
.
getStatus
());
return
baseMapper
.
selectList
(
dto
);
}
...
...
@@ -124,4 +125,24 @@ public class CustomerServiceImpl implements ICustomerService {
return
baseMapper
.
selectUipIdList
(
uipIds
,
SecurityUtils
.
getUserId
());
}
@Override
public
boolean
cancelClaim
(
String
customerId
)
{
return
updateClaimStatus
(
customerId
,
1
);
}
@Override
public
boolean
historyClaim
(
String
customerId
)
{
return
updateClaimStatus
(
customerId
,
0
);
}
//修改客户认领状态
private
boolean
updateClaimStatus
(
String
customerId
,
Integer
status
)
{
CustomerUser
customerUser
=
customerUserMapper
.
selectOne
(
Wrappers
.<
CustomerUser
>
lambdaQuery
()
.
eq
(
CustomerUser:
:
getCustomerId
,
customerId
)
.
eq
(
CustomerUser:
:
getUserId
,
SecurityUtils
.
getUserId
()));
customerUser
.
setStatus
(
status
);
return
customerUserMapper
.
updateById
(
customerUser
)
==
1
;
}
}
dsk-system/src/main/resources/mapper/system/customer/CustomerMapper.xml
View file @
db83f983
...
...
@@ -26,7 +26,7 @@
left join (
select count(status) num,customer_id from business_info where `status` = 2 group by customer_id
) bi3 on bi3.customer_id = ct.customer_id
where ctu.user_id = #{dto.userId}
where ctu.user_id = #{dto.userId}
and ctu.status = #{dto.status}
<if
test=
"dto.companyName != null and dto.companyName != '' "
>
and ct.company_name like concat('%',#{dto.companyName},'%')
</if>
order by ct.create_time desc
</select>
...
...
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