|
@@ -13,23 +13,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTDeptInfoVo">
|
|
|
- select d.id, d.dept_info, d.dept_id, sd.dept_name , d.year from t_dept_info d
|
|
|
- left join sys_dept sd on d.dept_id = sd.dept_id
|
|
|
+ select i.id, i.dept_info, i.dept_id, d.dept_name , i.year from t_dept_info i
|
|
|
+ left join sys_dept d on i.dept_id = d.dept_id
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectTDeptInfoList" parameterType="TDeptInfo" resultMap="TDeptInfoResult">
|
|
|
<include refid="selectTDeptInfoVo"/>
|
|
|
<where>
|
|
|
- <if test="year != null and year != ''"> and d.year = #{year}</if>
|
|
|
-
|
|
|
- <if test="deptInfo != null and deptInfo != ''"> and d.dept_info = #{deptInfo}</if>
|
|
|
- <if test="deptId != null "> and d.dept_id like concat(concat('%', #{deptId}), '%')</if>
|
|
|
+ <if test="year != null and year != ''"> and i.year = #{year}</if>
|
|
|
+ <if test="deptInfo != null and deptInfo != ''"> and i.dept_info = #{deptInfo}</if>
|
|
|
+ <if test="deptId != null "> and i.dept_id like concat(concat('%', #{deptId}), '%')</if>
|
|
|
+ ${params.dataScope}
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
<select id="selectTDeptInfoById" parameterType="Long" resultMap="TDeptInfoResult">
|
|
|
<include refid="selectTDeptInfoVo"/>
|
|
|
- where d.id = #{id}
|
|
|
+ where i.id = #{id}
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertTDeptInfo" parameterType="TDeptInfo" useGeneratedKeys="true" keyProperty="id">
|
|
@@ -57,11 +57,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</update>
|
|
|
|
|
|
<delete id="deleteTDeptInfoById" parameterType="Long">
|
|
|
- delete from t_dept_info where d.id = #{id}
|
|
|
+ delete from t_dept_info where id = #{id}
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteTDeptInfoByIds" parameterType="String">
|
|
|
- delete from t_dept_info where d.id in
|
|
|
+ delete from t_dept_info where id in
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
#{id}
|
|
|
</foreach>
|