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
f25f9330
Commit
f25f9330
authored
Sep 18, 2023
by
Wangmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
02c8be32
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
pz-system/src/main/resources/mapper/merchant/EmployeesMapper.xml
+12
-7
No files found.
pz-system/src/main/resources/mapper/merchant/EmployeesMapper.xml
View file @
f25f9330
...
@@ -88,17 +88,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -88,17 +88,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ORDER BY satisfaction_rate desc
ORDER BY satisfaction_rate desc
</select>
</select>
<select
id=
"selectEmployeesById"
resultType=
"com.pz.merchant.domain.vo.EmployeesVo"
>
<select
id=
"selectEmployeesById"
resultType=
"com.pz.merchant.domain.vo.EmployeesVo"
>
SELECT e.id, s.avatar ,e.name,e.working_hours,(SUM(CASE WHEN o.is_satisfaction = 1 THEN 1 ELSE 0 END) / NULLIF(COUNT(o.is_satisfaction), 0)) * 100 AS satisfaction_rate
SELECT e.id,
s.avatar,
e.name,
e.working_hours,
concat(round((sum(if(o.is_satisfaction = 1, 1, 0)) / count(o.id)) * 100, 2)) AS satisfaction_rate
FROM employees e
FROM employees e
INNER join total_order o on o.em_id = e.id
INNER join total_order o on o.em_id = e.id
left join company c on c.id = e.company_id
left join company c on c.id = e.company_id
left join sys_user s on s.user_id = e.uid
left join sys_user s on s.user_id = e.uid
WHERE e.`status` = 1 and e.now_type= 1 and e.del_flag= 0 and e.id = #{id}
WHERE e.`status` = 1
GROUP BY
and e.now_type = 1
e.id,
and e.del_flag = 0
e.`name`
and e.id = #{id}
HAVING
GROUP BY e.id,
satisfaction_rate >= #{favorableRate};
e.`name`
HAVING satisfaction_rate >= #{favorableRate};
</select>
</select>
<select
id=
"selectOrder"
resultType=
"com.pz.merchant.domain.vo.OrderInfoVO"
>
<select
id=
"selectOrder"
resultType=
"com.pz.merchant.domain.vo.OrderInfoVO"
>
...
...
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