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
3b48016a
Commit
3b48016a
authored
Aug 25, 2023
by
lcl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
8a089c53
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
BusinessInfoMapper.xml
...src/main/resources/mapper/business/BusinessInfoMapper.xml
+5
-1
CustomerMapper.xml
.../main/resources/mapper/system/customer/CustomerMapper.xml
+1
-0
No files found.
dsk-system/src/main/resources/mapper/business/BusinessInfoMapper.xml
View file @
3b48016a
...
@@ -391,14 +391,17 @@
...
@@ -391,14 +391,17 @@
<select
id=
"selectAmountAnalyze"
resultType=
"com.dsk.system.domain.business.vo.BusinessAnalyzeVo"
>
<select
id=
"selectAmountAnalyze"
resultType=
"com.dsk.system.domain.business.vo.BusinessAnalyzeVo"
>
select
select
bi.amount_source,count(bi.id) businessCount, ROUND(sum(bi.investment_amount), 4) totalAmount
bi.amount_source,count(bi.id) businessCount, ROUND(sum(bi.investment_amount), 4) totalAmount
<include
refid=
"businessSearchSql"
/>
<include
refid=
"businessSearchSql"
/>
and bi.amount_source is not null
group by bi.amount_source
group by bi.amount_source
having businessCount > 0
</select>
</select>
<select
id=
"selectTypeAnalyze"
resultType=
"com.dsk.system.domain.business.vo.BusinessAnalyzeVo"
>
<select
id=
"selectTypeAnalyze"
resultType=
"com.dsk.system.domain.business.vo.BusinessAnalyzeVo"
>
select
select
bi.project_type,count(bi.id) businessCount, ROUND(sum(bi.investment_amount), 4) totalAmount
bi.project_type,count(bi.id) businessCount, ROUND(sum(bi.investment_amount), 4) totalAmount
<include
refid=
"businessSearchSql"
/>
<include
refid=
"businessSearchSql"
/>
and bi.project_type is not null
group by bi.project_type
group by bi.project_type
<if
test=
"status != null and status == 0 "
>
order by businessCount desc
</if>
<if
test=
"status != null and status == 0 "
>
order by businessCount desc
</if>
<if
test=
"status != null and status == 2 "
>
order by totalAmount desc
</if>
<if
test=
"status != null and status == 2 "
>
order by totalAmount desc
</if>
...
@@ -408,6 +411,7 @@
...
@@ -408,6 +411,7 @@
select
select
bi.project_category,count(bi.id) businessCount, ROUND(sum(bi.investment_amount), 4) totalAmount
bi.project_category,count(bi.id) businessCount, ROUND(sum(bi.investment_amount), 4) totalAmount
<include
refid=
"businessSearchSql"
/>
<include
refid=
"businessSearchSql"
/>
and bi.project_category is not null
group by bi.project_category
group by bi.project_category
<if
test=
"status != null and status == 0 "
>
order by businessCount desc
</if>
<if
test=
"status != null and status == 0 "
>
order by businessCount desc
</if>
<if
test=
"status != null and status == 2 "
>
order by totalAmount desc
</if>
<if
test=
"status != null and status == 2 "
>
order by totalAmount desc
</if>
...
...
dsk-system/src/main/resources/mapper/system/customer/CustomerMapper.xml
View file @
3b48016a
...
@@ -118,6 +118,7 @@
...
@@ -118,6 +118,7 @@
left join business_info bi on (bi.customer_id = ct.customer_id and bi.status = 2)
left join business_info bi on (bi.customer_id = ct.customer_id and bi.status = 2)
where ctu.status = 0 and ctu.user_id = #{userId}
where ctu.status = 0 and ctu.user_id = #{userId}
group by ct.customer_id
group by ct.customer_id
having businessCount > 0
order by totalAmount desc
order by totalAmount desc
limit 10
limit 10
</select>
</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