Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-operate-sys-cscec
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
fulixin
dsk-operate-sys-cscec
Commits
bcdaa7ac
Commit
bcdaa7ac
authored
Aug 16, 2023
by
lcl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
33dafbda
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
3 deletions
+24
-3
CustomerOverviewController.java
...k/web/controller/customer/CustomerOverviewController.java
+1
-1
CustomerMapper.java
...m/src/main/java/com/dsk/system/mapper/CustomerMapper.java
+3
-0
ICustomerOverviewService.java
...java/com/dsk/system/service/ICustomerOverviewService.java
+3
-1
CustomerOverviewServiceImpl.java
.../dsk/system/service/impl/CustomerOverviewServiceImpl.java
+6
-0
CustomerMapper.xml
.../main/resources/mapper/system/customer/CustomerMapper.xml
+11
-1
No files found.
dsk-admin/src/main/java/com/dsk/web/controller/customer/CustomerOverviewController.java
View file @
bcdaa7ac
...
@@ -43,6 +43,6 @@ public class CustomerOverviewController extends BaseController {
...
@@ -43,6 +43,6 @@ public class CustomerOverviewController extends BaseController {
*/
*/
@GetMapping
(
"/credit/level"
)
@GetMapping
(
"/credit/level"
)
public
AjaxResult
creditLevel
(){
public
AjaxResult
creditLevel
(){
return
AjaxResult
.
success
(
baseService
.
c
ooperationTop
(
new
CustomerSearchDto
()));
return
AjaxResult
.
success
(
baseService
.
c
reditLevel
(
new
CustomerSearchDto
()));
}
}
}
}
dsk-system/src/main/java/com/dsk/system/mapper/CustomerMapper.java
View file @
bcdaa7ac
...
@@ -10,6 +10,7 @@ import org.apache.ibatis.annotations.Mapper;
...
@@ -10,6 +10,7 @@ import org.apache.ibatis.annotations.Mapper;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
...
@@ -35,5 +36,7 @@ public interface CustomerMapper extends BaseMapper<Customer> {
...
@@ -35,5 +36,7 @@ public interface CustomerMapper extends BaseMapper<Customer> {
List
<
CustomerAnalyzeVo
>
selectCooperationTop
(
CustomerSearchDto
dto
);
List
<
CustomerAnalyzeVo
>
selectCooperationTop
(
CustomerSearchDto
dto
);
List
<
Map
<
String
,
Object
>>
selectCreditLevelGroup
(
CustomerSearchDto
dto
);
}
}
dsk-system/src/main/java/com/dsk/system/service/ICustomerOverviewService.java
View file @
bcdaa7ac
...
@@ -12,8 +12,10 @@ import java.util.Map;
...
@@ -12,8 +12,10 @@ import java.util.Map;
*/
*/
public
interface
ICustomerOverviewService
{
public
interface
ICustomerOverviewService
{
Map
<
String
,
Object
>
statistics
(
CustomerSearchDto
dto
);
Map
<
String
,
Object
>
statistics
(
CustomerSearchDto
dto
);
List
<
CustomerAnalyzeVo
>
cooperationTop
(
CustomerSearchDto
dto
);
List
<
CustomerAnalyzeVo
>
cooperationTop
(
CustomerSearchDto
dto
);
List
<
Map
<
String
,
Object
>>
creditLevel
(
CustomerSearchDto
dto
);
}
}
dsk-system/src/main/java/com/dsk/system/service/impl/CustomerOverviewServiceImpl.java
View file @
bcdaa7ac
...
@@ -50,4 +50,10 @@ public class CustomerOverviewServiceImpl implements ICustomerOverviewService {
...
@@ -50,4 +50,10 @@ public class CustomerOverviewServiceImpl implements ICustomerOverviewService {
return
customerMapper
.
selectCooperationTop
(
dto
);
return
customerMapper
.
selectCooperationTop
(
dto
);
}
}
@Override
public
List
<
Map
<
String
,
Object
>>
creditLevel
(
CustomerSearchDto
dto
)
{
dto
.
setUserId
(
SecurityUtils
.
getUserId
());
return
customerMapper
.
selectCreditLevelGroup
(
dto
);
}
}
}
dsk-system/src/main/resources/mapper/system/customer/CustomerMapper.xml
View file @
bcdaa7ac
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
left join (
left join (
select count(status) num,customer_id from business_info where `status` = 2 group by customer_id
select count(status) num,customer_id from business_info where `status` = 2 group by customer_id
) bi3 on bi3.customer_id = ct.customer_id
) bi3 on bi3.customer_id = ct.customer_id
where ctu.user_id = #{
dto.userId} and ctu.status = #{dto.
status}
where ctu.user_id = #{
userId} and ctu.status = #{
status}
<if
test=
"companyName != null and companyName != '' "
>
and ct.company_name like concat('%',#{companyName},'%')
</if>
<if
test=
"companyName != null and companyName != '' "
>
and ct.company_name like concat('%',#{companyName},'%')
</if>
<if
test=
"isOn != null "
>
and ct.is_on = #{isOn}
</if>
<if
test=
"isOn != null "
>
and ct.is_on = #{isOn}
</if>
<if
test=
"provinceIds != null and provinceIds.size > 0 "
>
<if
test=
"provinceIds != null and provinceIds.size > 0 "
>
...
@@ -122,5 +122,15 @@
...
@@ -122,5 +122,15 @@
limit 10
limit 10
</select>
</select>
<select
id=
"selectCreditLevelGroup"
resultType=
"java.util.Map"
>
select
ct.credit_level creditLevel, count(ct.credit_level) customerCount
from customer ct
join customer_user ctu on ct.customer_id = ctu.customer_id
where ctu.user_id = #{userId}
group by ct.credit_level
order by ct.credit_level desc
</select>
</mapper>
</mapper>
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