Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
peizhen-java
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PeiZhen-Java
peizhen-java
Commits
d79e7805
Commit
d79e7805
authored
Oct 10, 2023
by
sdif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
机构品牌数据统计区分
parent
4bd3a612
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
pz-system/src/main/resources/mapper/merchant/EmployeesMapper.xml
+1
-1
pz-system/src/main/resources/mapper/system/TotalOrderMapper.xml
+10
-5
No files found.
pz-system/src/main/resources/mapper/merchant/EmployeesMapper.xml
View file @
d79e7805
...
...
@@ -148,7 +148,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join company on company.id = employees.company_id
WHERE employees.`status` = 1 or employees.`status` = 2
<if
test=
"dataViewBo.userId != null"
>
and company.id = #{dataViewBo.userId}
and company.
u
id = #{dataViewBo.userId}
</if>
<if
test=
"dataViewBo.condition == 2"
>
and employees.create_time >= DATE_SUB(CURDATE(), INTERVAL 7 DAY) -- 近7天
...
...
pz-system/src/main/resources/mapper/system/TotalOrderMapper.xml
View file @
d79e7805
...
...
@@ -98,15 +98,20 @@
</if>
</select>
<select
id=
"selectOrderQuantity"
resultType=
"com.pz.system.domain.vo.DataOrderVo"
>
SELECT count(*) as dataSum FROM total_order WHERE `status` != 0 and refund_amount = 0
SELECT count(total_order.id) as dataSum FROM total_order left join employees on employees.id = total_order.em_id
left join company on company.id = employees.company_id
WHERE total_order.`status` != 0 and total_order.refund_amount = 0 and total_order.em_id !=0
<if
test=
"dataViewBo.userId != null"
>
and company.uid = #{dataViewBo.userId}
</if>
<if
test=
"dataViewBo.condition == 2"
>
and finish_time >= DATE_SUB(CURDATE(), INTERVAL 7 DAY) -- 近7天
and
total_order.
finish_time >= DATE_SUB(CURDATE(), INTERVAL 7 DAY) -- 近7天
</if>
<if
test=
"dataViewBo.condition == 3"
>
and finish_time >= DATE_SUB(CURDATE(), INTERVAL 30 DAY) -- 近30天
and
total_order.
finish_time >= DATE_SUB(CURDATE(), INTERVAL 30 DAY) -- 近30天
</if>
<if
test=
"dataViewBo.condition == 1"
>
and DATE(finish_time) = CURDATE()
and DATE(
total_order.
finish_time) = CURDATE()
</if>
</select>
...
...
@@ -145,7 +150,7 @@
SELECT IFNULL(ROUND(SUM(employees_divide.divide_price), 2),0) as dataSum FROM
employees_divide
left join total_order on total_order.order_sn = employees_divide.order_id WHERE total_order.`status` = 2 and
refund_amount = 0
refund_amount = 0
and company_id = #{dataViewBo.userId}
<if
test=
"dataViewBo.condition == 2"
>
and employees_divide.create_time >= DATE_SUB(CURDATE(), INTERVAL 7 DAY) -- 近7天
</if>
...
...
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