Crunchy
2024-05-08 2e770d5ad27afd5cec0ea8759ca37504a883b42f
performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml
@@ -8,15 +8,16 @@
        GROUP_CONCAT(s.work_time, ':', s.shift, ':', s.id SEPARATOR ';') AS shiftTime
        FROM performance_shift s
        LEFT JOIN user u on u.id = s.user_id
        GROUP BY u.id
        <where>
            <if test="time != null and time != ''">
                and s.work_time in DATE_FORMAT(#{time}, '%Y-%m-%d')
                and DATE_FORMAT(s.work_time, '%Y-%m') = DATE_FORMAT(#{time}, '%Y-%m' )
            </if>
            <if test="userName != null and userName != ''">
                and s.name concat('%', #{userName}, '%')
                and u.name like concat('%', #{userName}, '%')
            </if>
            <if test="laboratory != null and laboratory != ''"></if>
            <if test="laboratory != null and laboratory != ''">
            </if>
        </where>
        GROUP BY u.id
    </select>
</mapper>