Commit 7cfcca3b by Wangmin

bugfix

parent 481f00d6
...@@ -64,12 +64,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -64,12 +64,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectEmployees" resultType="com.pz.merchant.domain.vo.EmployeesVo"> <select id="selectEmployees" resultType="com.pz.merchant.domain.vo.EmployeesVo">
SELECT e.id, SELECT e.id,
s.avatar as avatar, s.avatar as avatar,
e.name, e.name,
e.start_year, e.start_year,
e.working_hours, 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 concat(round((sum(if(o.is_satisfaction = 1, 1, 0)) / count(o.id)) * 100, 2)) AS satisfaction_rate
FROM employees e FROM employees e
left join total_order o on o.em_id = e.id left 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment