47 lines
2.1 KiB
XML
47 lines
2.1 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.hcy.common.mapper.staff.StaffFeedbackMapper">
|
|
<!-- 通用查询映射结果 -->
|
|
<resultMap id="BaseResultMap" type="com.hcy.common.entity.staff.StaffFeedback">
|
|
<!-- <id column="id" property="id"/>
|
|
<result column="create_id" property="createId"/>
|
|
<result column="create_time" property="createTime"/>
|
|
<result column="update_id" property="updateId"/>
|
|
<result column="update_time" property="updateTime"/>
|
|
<result column="company_id" property="companyId"/>
|
|
<result column="account_id" property="accountId"/>
|
|
<result column="account_chart_id" property="accountChartId"/>
|
|
<result column="is_add_next_level" property="isAddNextLevel"/>
|
|
<result column="is_reallocate" property="isReallocate"/>
|
|
<result column="tenant_id" property="tenantId"/>-->
|
|
</resultMap>
|
|
|
|
<select id="list" resultType="com.hcy.common.dto.result.StaffFeedbackResultDto">
|
|
SELECT
|
|
sf.*,
|
|
s.sn as staffSn,
|
|
s.`name` as staffName,
|
|
s.head_portrait as headPortrait
|
|
FROM
|
|
la_staff_feedback AS sf
|
|
LEFT JOIN la_staff AS s ON s.id = sf.staff_id
|
|
<where>
|
|
sf.is_delete = 0
|
|
<if test="form.status != null">
|
|
and sf.status = #{form.status}
|
|
</if>
|
|
<if test="form.createTimeStart != null">
|
|
and sf.create_time >= #{form.createTimeStart}
|
|
</if>
|
|
<if test="form.createTimeEnd != null">
|
|
and sf.create_time <= #{form.createTimeEnd}
|
|
</if>
|
|
<if test="form.staffInfo != null and form.staffInfo != ''">
|
|
and (s.sn like concat('%', #{form.staffInfo}, '%')
|
|
or s.name like concat('%', #{form.staffInfo}, '%'))
|
|
</if>
|
|
</where>
|
|
order by sf.create_time desc
|
|
</select>
|
|
</mapper>
|