|
@@ -3,7 +3,7 @@
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.business.slfh.manager.dailymanager.mapper.TBusDailyMapper">
|
|
<mapper namespace="com.business.slfh.manager.dailymanager.mapper.TBusDailyMapper">
|
|
-
|
|
|
|
|
|
+
|
|
<resultMap type="TBusDaily" id="TBusDailyResult">
|
|
<resultMap type="TBusDaily" id="TBusDailyResult">
|
|
<result property="id" column="id" />
|
|
<result property="id" column="id" />
|
|
<result property="status" column="status" />
|
|
<result property="status" column="status" />
|
|
@@ -31,34 +31,57 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="selectTBusDailyList" parameterType="TBusDaily" resultMap="TBusDailyResult">
|
|
<select id="selectTBusDailyList" parameterType="TBusDaily" resultMap="TBusDailyResult">
|
|
- <include refid="selectTBusDailyVo"/>
|
|
|
|
- <where>
|
|
|
|
- <if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
|
- <if test="dailyType != null and dailyType != ''"> and daily_type = #{dailyType}</if>
|
|
|
|
- <if test="userId != null "> and user_id = #{userId}</if>
|
|
|
|
- <if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
|
|
|
|
|
+ select
|
|
|
|
+ y.id as id,
|
|
|
|
+ y.status as status,
|
|
|
|
+ y.remark as remark,
|
|
|
|
+ y.del_flag as del_flag,
|
|
|
|
+ y.create_by as create_by,
|
|
|
|
+ y.create_time as create_time,
|
|
|
|
+ y.update_by as update_by,
|
|
|
|
+ y.update_time as update_time,
|
|
|
|
+ y.daily_type as daily_type ,
|
|
|
|
+ y.user_id as user_id,
|
|
|
|
+ y.user_name as user_name,
|
|
|
|
+ y.daily_time as daily_time,
|
|
|
|
+ y.title as title,
|
|
|
|
+ y.content as content,
|
|
|
|
+ y.ishave_res as ishave_res,
|
|
|
|
+ y.ishave_reply as ishave_reply,
|
|
|
|
+ y.reply_content as reply_content,
|
|
|
|
+ y.reply_user as reply_user,
|
|
|
|
+ y.reply_time as reply_time
|
|
|
|
+ from t_bus_daily y,sys_dept d
|
|
|
|
+
|
|
|
|
+ <where>
|
|
|
|
+ y.dept_id = d.dept_id
|
|
|
|
+ <if test="status != null and status != ''"> and y.status = #{status}</if>
|
|
|
|
+ <if test="dailyType != null and dailyType != ''"> and y.daily_type = #{dailyType}</if>
|
|
|
|
+ <if test="userId != null "> and y.user_id = #{userId}</if>
|
|
|
|
+ <if test="userName != null and userName != ''"> and y.user_name like concat('%', #{userName}, '%')</if>
|
|
<if test="params.beginDailyTime != null and params.beginDailyTime != ''"><!-- 开始时间检索 -->
|
|
<if test="params.beginDailyTime != null and params.beginDailyTime != ''"><!-- 开始时间检索 -->
|
|
- AND date_format(daily_time,'%y%m%d') >= date_format(#{params.beginDailyTime},'%y%m%d')
|
|
|
|
|
|
+ AND date_format(y.daily_time,'%y%m%d') >= date_format(#{params.beginDailyTime},'%y%m%d')
|
|
</if>
|
|
</if>
|
|
<if test="params.endDailyTime != null and params.endDailyTime != ''"><!-- 结束时间检索 -->
|
|
<if test="params.endDailyTime != null and params.endDailyTime != ''"><!-- 结束时间检索 -->
|
|
- AND date_format(daily_time,'%y%m%d') <= date_format(#{params.endDailyTime},'%y%m%d')
|
|
|
|
|
|
+ AND date_format(y.daily_time,'%y%m%d') <= date_format(#{params.endDailyTime},'%y%m%d')
|
|
</if>
|
|
</if>
|
|
<!--<if test="dailyTime != null "> and daily_time = #{dailyTime}</if>-->
|
|
<!--<if test="dailyTime != null "> and daily_time = #{dailyTime}</if>-->
|
|
- <if test="title != null and title != ''"> and title = #{title}</if>
|
|
|
|
- <if test="content != null and content != ''"> and content = #{content}</if>
|
|
|
|
- <if test="ishaveRes != null "> and ishave_res = #{ishaveRes}</if>
|
|
|
|
- <if test="ishaveReply != null "> and ishave_reply = #{ishaveReply}</if>
|
|
|
|
- <if test="replyContent != null and replyContent != ''"> and reply_content = #{replyContent}</if>
|
|
|
|
- <if test="replyUser != null and replyUser != ''"> and reply_user = #{replyUser}</if>
|
|
|
|
- <if test="replyTime != null "> and reply_time = #{replyTime}</if>
|
|
|
|
|
|
+ <if test="title != null and title != ''"> and y.title = #{title}</if>
|
|
|
|
+ <if test="content != null and content != ''"> and y.content = #{content}</if>
|
|
|
|
+ <if test="ishaveRes != null "> and y.ishave_res = #{ishaveRes}</if>
|
|
|
|
+ <if test="ishaveReply != null "> and y.ishave_reply = #{ishaveReply}</if>
|
|
|
|
+ <if test="replyContent != null and replyContent != ''"> and y.reply_content = #{replyContent}</if>
|
|
|
|
+ <if test="replyUser != null and replyUser != ''"> and y.reply_user = #{replyUser}</if>
|
|
|
|
+ <if test="replyTime != null "> and y.reply_time = #{replyTime}</if>
|
|
</where>
|
|
</where>
|
|
|
|
+ ${params.dataScope}
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<select id="selectTBusDailyById" parameterType="String" resultMap="TBusDailyResult">
|
|
<select id="selectTBusDailyById" parameterType="String" resultMap="TBusDailyResult">
|
|
<include refid="selectTBusDailyVo"/>
|
|
<include refid="selectTBusDailyVo"/>
|
|
where id = #{id}
|
|
where id = #{id}
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<insert id="insertTBusDaily" parameterType="TBusDaily">
|
|
<insert id="insertTBusDaily" parameterType="TBusDaily">
|
|
insert into t_bus_daily
|
|
insert into t_bus_daily
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
@@ -81,6 +104,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="replyContent != null">reply_content,</if>
|
|
<if test="replyContent != null">reply_content,</if>
|
|
<if test="replyUser != null">reply_user,</if>
|
|
<if test="replyUser != null">reply_user,</if>
|
|
<if test="replyTime != null">reply_time,</if>
|
|
<if test="replyTime != null">reply_time,</if>
|
|
|
|
+ <if test="deptId != null">dept_id,</if>
|
|
|
|
+ <if test="deptName != null">dept_name,</if>
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null and id != ''">#{id},</if>
|
|
<if test="id != null and id != ''">#{id},</if>
|
|
@@ -102,6 +127,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="replyContent != null">#{replyContent},</if>
|
|
<if test="replyContent != null">#{replyContent},</if>
|
|
<if test="replyUser != null">#{replyUser},</if>
|
|
<if test="replyUser != null">#{replyUser},</if>
|
|
<if test="replyTime != null">#{replyTime},</if>
|
|
<if test="replyTime != null">#{replyTime},</if>
|
|
|
|
+ <if test="deptId != null">#{deptId},</if>
|
|
|
|
+ <if test="deptName != null">#{deptName},</if>
|
|
</trim>
|
|
</trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
@@ -135,10 +162,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteTBusDailyByIds" parameterType="String">
|
|
<delete id="deleteTBusDailyByIds" parameterType="String">
|
|
- delete from t_bus_daily where id in
|
|
|
|
|
|
+ delete from t_bus_daily where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
#{id}
|
|
</foreach>
|
|
</foreach>
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
-</mapper>
|
|
|
|
|
|
+</mapper>
|