<?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.ruoyi.project.tr.baseCheckPoint.mapper.BaseCheckPointMapper">
|
|
<resultMap type="com.ruoyi.project.tr.baseCheckPoint.domain.BaseCheckPoint" id="BaseCheckPointResult">
|
<result property="checkPointId" column="check_point_id" />
|
<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="remark" column="remark" />
|
<result property="checkContent" column="check_content" />
|
<result property="checkResult" column="check_result" />
|
<result property="riskId" column="risk_id" />
|
<result property="checkType" column="check_type" />
|
</resultMap>
|
|
<sql id="selectBaseCheckPointVo">
|
select check_point_id, create_by, create_time, update_by, update_time, remark,
|
check_content, check_result, risk_id,check_type from tr_base_check_point
|
</sql>
|
|
<select id="selectBaseCheckPointList" parameterType="BaseCheckPoint" resultMap="BaseCheckPointResult">
|
<include refid="selectBaseCheckPointVo"/>
|
<where>
|
<if test="checkPointId != null "> and check_point_id = #{checkPointId}</if>
|
<if test="remark != null and remark != ''"> and remark = #{remark}</if>
|
<if test="checkContent != null and checkContent != ''"> and check_content = #{checkContent}</if>
|
<if test="checkResult != null and checkResult != ''"> and check_result = #{checkResult}</if>
|
<if test="riskId != null "> and risk_id = #{riskId}</if>
|
<if test="checkType != null and checkType != ''"> and check_type = #{checkType}</if>
|
</where>
|
</select>
|
|
<select id="selectBaseCheckPointById" parameterType="Long" resultMap="BaseCheckPointResult">
|
<include refid="selectBaseCheckPointVo"/>
|
where check_point_id = #{checkPointId}
|
</select>
|
|
<insert id="insertBaseCheckPoint" parameterType="BaseCheckPoint" useGeneratedKeys="true" keyProperty="checkPointId">
|
insert into tr_base_check_point
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="checkPointId != null ">check_point_id,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createTime != null ">create_time,</if>
|
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
<if test="updateTime != null ">update_time,</if>
|
<if test="remark != null and remark != ''">remark,</if>
|
<if test="checkContent != null and checkContent != ''">check_content,</if>
|
<if test="checkResult != null and checkResult != ''">check_result,</if>
|
<if test="riskId != null ">risk_id,</if>
|
<if test="checkType != null and checkType != ''">check_type,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="checkPointId != null ">#{checkPointId},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createTime != null ">#{createTime},</if>
|
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
<if test="updateTime != null ">#{updateTime},</if>
|
<if test="remark != null and remark != ''">#{remark},</if>
|
<if test="checkContent != null and checkContent != ''">#{checkContent},</if>
|
<if test="checkResult != null and checkResult != ''">#{checkResult},</if>
|
<if test="riskId != null ">#{riskId},</if>
|
<if test="checkType != null and checkType != ''">#{checkType},</if>
|
</trim>
|
</insert>
|
|
<update id="updateBaseCheckPoint" parameterType="BaseCheckPoint">
|
update tr_base_check_point
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
<if test="createTime != null ">create_time = #{createTime},</if>
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
<if test="checkContent != null and checkContent != ''">check_content = #{checkContent},</if>
|
<if test="checkResult != null and checkResult != ''">check_result = #{checkResult},</if>
|
<if test="riskId != null ">risk_id = #{riskId},</if>
|
<if test="checkType != null and checkType != ''">check_type = #{checkType},</if>
|
</trim>
|
where check_point_id = #{checkPointId}
|
</update>
|
|
<delete id="deleteBaseCheckPointById" parameterType="Long">
|
delete from tr_base_check_point where check_point_id = #{checkPointId}
|
</delete>
|
|
<delete id="deleteBaseCheckPointByIds" parameterType="String">
|
delete from tr_base_check_point where check_point_id in
|
<foreach item="checkPointId" collection="array" open="(" separator="," close=")">
|
#{checkPointId}
|
</foreach>
|
</delete>
|
|
|
<!-- BaseCheckPoint getBaseCheckPointById(Long checkPointId);-->
|
<select id="getBaseCheckPointById" resultType="com.ruoyi.project.tr.baseCheckPoint.domain.BaseCheckPoint">
|
select * from tr_base_check_point where check_point_id = #{checkPointId}
|
</select>
|
</mapper>
|