This commit is contained in:
lizhicheng 2022-10-17 17:56:53 +08:00
parent 5b85df5010
commit 9961970fb1
1 changed files with 2 additions and 1 deletions

View File

@ -84,7 +84,7 @@
<select id="selectInfrastructureCarGroupByDept" resultType="java.util.Map">
SELECT
IFNULL(dept.id, -1) AS "deptId",
IFNULL(ANY_VALUE(dept.id), -1) AS "deptId",
car.dept_name AS "deptName",
COUNT(car.id) AS "count"
FROM
@ -94,6 +94,7 @@
left join sys_dept dept on car.dept_name=dept.name
WHERE car.user_id = #{userId}
AND car.del_flag = 0
AND car.dept_name IS NOT NULL
<if test="name != null and name != ''">
AND car.name LIKE CONCAT('%',#{name},'%')
</if>