123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- <?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.business.slfh.manager.dailymanager.mapper.TBusDailyMapper">
-
- <resultMap type="TBusDaily" id="TBusDailyResult">
- <result property="id" column="id" />
- <result property="status" column="status" />
- <result property="remark" column="remark" />
- <result property="delFlag" column="del_flag" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- <result property="dailyType" column="daily_type" />
- <result property="userId" column="user_id" />
- <result property="userName" column="user_name" />
- <result property="dailyTime" column="daily_time" />
- <result property="title" column="title" />
- <result property="content" column="content" />
- <result property="ishaveRes" column="ishave_res" />
- <result property="ishaveReply" column="ishave_reply" />
- <result property="replyContent" column="reply_content" />
- <result property="replyUser" column="reply_user" />
- <result property="replyTime" column="reply_time" />
- </resultMap>
- <sql id="selectTBusDailyVo">
- select id, status, remark, del_flag, create_by, create_time, update_by, update_time, daily_type, user_id, user_name, daily_time, title, content, ishave_res, ishave_reply, reply_content, reply_user, reply_time from t_bus_daily
- </sql>
- <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>
- <if test="params.beginDailyTime != null and params.beginDailyTime != ''"><!-- 开始时间检索 -->
- AND date_format(daily_time,'%y%m%d') >= date_format(#{params.beginDailyTime},'%y%m%d')
- </if>
- <if test="params.endDailyTime != null and params.endDailyTime != ''"><!-- 结束时间检索 -->
- AND date_format(daily_time,'%y%m%d') <= date_format(#{params.endDailyTime},'%y%m%d')
- </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>
- </where>
- </select>
-
- <select id="selectTBusDailyById" parameterType="String" resultMap="TBusDailyResult">
- <include refid="selectTBusDailyVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertTBusDaily" parameterType="TBusDaily">
- insert into t_bus_daily
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null and id != ''">id,</if>
- <if test="status != null">status,</if>
- <if test="remark != null">remark,</if>
- <if test="delFlag != null">del_flag,</if>
- <if test="createBy != null">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="dailyType != null">daily_type,</if>
- <if test="userId != null">user_id,</if>
- <if test="userName != null">user_name,</if>
- <if test="dailyTime != null">daily_time,</if>
- <if test="title != null">title,</if>
- <if test="content != null">content,</if>
- <if test="ishaveRes != null">ishave_res,</if>
- <if test="ishaveReply != null">ishave_reply,</if>
- <if test="replyContent != null">reply_content,</if>
- <if test="replyUser != null">reply_user,</if>
- <if test="replyTime != null">reply_time,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null and id != ''">#{id},</if>
- <if test="status != null">#{status},</if>
- <if test="remark != null">#{remark},</if>
- <if test="delFlag != null">#{delFlag},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="dailyType != null">#{dailyType},</if>
- <if test="userId != null">#{userId},</if>
- <if test="userName != null">#{userName},</if>
- <if test="dailyTime != null">#{dailyTime},</if>
- <if test="title != null">#{title},</if>
- <if test="content != null">#{content},</if>
- <if test="ishaveRes != null">#{ishaveRes},</if>
- <if test="ishaveReply != null">#{ishaveReply},</if>
- <if test="replyContent != null">#{replyContent},</if>
- <if test="replyUser != null">#{replyUser},</if>
- <if test="replyTime != null">#{replyTime},</if>
- </trim>
- </insert>
- <update id="updateTBusDaily" parameterType="TBusDaily">
- update t_bus_daily
- <trim prefix="SET" suffixOverrides=",">
- <if test="status != null">status = #{status},</if>
- <if test="remark != null">remark = #{remark},</if>
- <if test="delFlag != null">del_flag = #{delFlag},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="dailyType != null">daily_type = #{dailyType},</if>
- <if test="userId != null">user_id = #{userId},</if>
- <if test="userName != null">user_name = #{userName},</if>
- <if test="dailyTime != null">daily_time = #{dailyTime},</if>
- <if test="title != null">title = #{title},</if>
- <if test="content != null">content = #{content},</if>
- <if test="ishaveRes != null">ishave_res = #{ishaveRes},</if>
- <if test="ishaveReply != null">ishave_reply = #{ishaveReply},</if>
- <if test="replyContent != null">reply_content = #{replyContent},</if>
- <if test="replyUser != null">reply_user = #{replyUser},</if>
- <if test="replyTime != null">reply_time = #{replyTime},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteTBusDailyById" parameterType="String">
- delete from t_bus_daily where id = #{id}
- </delete>
- <delete id="deleteTBusDailyByIds" parameterType="String">
- delete from t_bus_daily where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|