<?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.javaweb.geo.mapper.HandleOpinionMapper">
|
|
<resultMap type="HandleOpinion" id="HandleOpinionResult">
|
<result property="ids" column="ids" />
|
<result property="exceptionId" column="exception_id" />
|
<result property="projectId" column="project_id" />
|
<result property="companyId" column="company_id" />
|
<result property="groupname" column="groupName" />
|
<result property="opinion" column="opinion" />
|
<result property="username" column="userName" />
|
<result property="isDelete" column="is_delete" />
|
</resultMap>
|
|
<sql id="selectHandleOpinionVo">
|
select ids, exception_id, project_id, company_id, groupName, opinion, userName, is_delete from js_handle_opinion
|
</sql>
|
|
<select id="selectHandleOpinionList" parameterType="HandleOpinion" resultMap="HandleOpinionResult">
|
<include refid="selectHandleOpinionVo"/>
|
<where>
|
<if test="exceptionId != null and exceptionId != ''"> and exception_id = #{exceptionId}</if>
|
<if test="projectId != null and projectId != ''"> and project_id = #{projectId}</if>
|
<if test="companyId != null and companyId != ''"> and company_id = #{companyId}</if>
|
<if test="groupname != null and groupname != ''"> and groupName like concat('%', #{groupname}, '%')</if>
|
<if test="opinion != null and opinion != ''"> and opinion = #{opinion}</if>
|
<if test="username != null and username != ''"> and userName like concat('%', #{username}, '%')</if>
|
<if test="isDelete != null and isDelete != ''"> and is_delete = #{isDelete}</if>
|
</where>
|
</select>
|
|
<select id="selectHandleOpinionById" parameterType="String" resultMap="HandleOpinionResult">
|
<include refid="selectHandleOpinionVo"/>
|
where ids = #{ids}
|
</select>
|
|
<insert id="insertHandleOpinion" parameterType="HandleOpinion">
|
insert into js_handle_opinion
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="ids != null and ids != ''">ids,</if>
|
<if test="exceptionId != null and exceptionId != ''">exception_id,</if>
|
<if test="projectId != null and projectId != ''">project_id,</if>
|
<if test="companyId != null and companyId != ''">company_id,</if>
|
<if test="groupname != null and groupname != ''">groupName,</if>
|
<if test="opinion != null and opinion != ''">opinion,</if>
|
<if test="username != null and username != ''">userName,</if>
|
<if test="isDelete != null and isDelete != ''">is_delete,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="ids != null and ids != ''">#{ids},</if>
|
<if test="exceptionId != null and exceptionId != ''">#{exceptionId},</if>
|
<if test="projectId != null and projectId != ''">#{projectId},</if>
|
<if test="companyId != null and companyId != ''">#{companyId},</if>
|
<if test="groupname != null and groupname != ''">#{groupname},</if>
|
<if test="opinion != null and opinion != ''">#{opinion},</if>
|
<if test="username != null and username != ''">#{username},</if>
|
<if test="isDelete != null and isDelete != ''">#{isDelete},</if>
|
</trim>
|
</insert>
|
|
<update id="updateHandleOpinion" parameterType="HandleOpinion">
|
update js_handle_opinion
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="exceptionId != null and exceptionId != ''">exception_id = #{exceptionId},</if>
|
<if test="projectId != null and projectId != ''">project_id = #{projectId},</if>
|
<if test="companyId != null and companyId != ''">company_id = #{companyId},</if>
|
<if test="groupname != null and groupname != ''">groupName = #{groupname},</if>
|
<if test="opinion != null and opinion != ''">opinion = #{opinion},</if>
|
<if test="username != null and username != ''">userName = #{username},</if>
|
<if test="isDelete != null and isDelete != ''">is_delete = #{isDelete},</if>
|
</trim>
|
where ids = #{ids}
|
</update>
|
|
<delete id="deleteHandleOpinionById" parameterType="String">
|
delete from js_handle_opinion where ids = #{ids}
|
</delete>
|
|
<delete id="deleteHandleOpinionByIds" parameterType="String">
|
delete from js_handle_opinion where ids in
|
<foreach item="ids" collection="array" open="(" separator="," close=")">
|
#{ids}
|
</foreach>
|
</delete>
|
|
</mapper>
|