2025-02-15 16:52:57 +08:00
|
|
|
<?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.yanzhu.manage.mapper.SmzSspAuditinfoMapper">
|
|
|
|
|
|
|
|
<resultMap type="SmzSspAuditinfo" id="SmzSspAuditinfoResult">
|
|
|
|
<result property="id" column="id" />
|
|
|
|
<result property="mainId" column="mainId" />
|
|
|
|
<result property="processState" column="processState" />
|
|
|
|
<result property="opinion" column="opinion" />
|
|
|
|
<result property="isDel" column="isDel" />
|
|
|
|
<result property="createUser" column="createUser" />
|
|
|
|
<result property="createTime" column="createTime" />
|
2025-03-05 00:14:39 +08:00
|
|
|
<collection property="files" ofType="com.yanzhu.manage.domain.SmzSspFileinfo">
|
|
|
|
<id property="id" column="fileId"/>
|
|
|
|
<result property="fileUrl" column="fileUrl"/>
|
|
|
|
</collection>
|
2025-02-15 16:52:57 +08:00
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="selectSmzSspAuditinfoVo">
|
|
|
|
select id, mainId, processState, opinion, isDel, createUser, createTime from smz_ssp_auditinfo
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
<select id="selectSmzSspAuditinfoList" parameterType="SmzSspAuditinfo" resultMap="SmzSspAuditinfoResult">
|
2025-03-05 00:14:39 +08:00
|
|
|
select a.id, a.mainId, a.processState, a.opinion, a.isDel, a.createUser, a.createTime,b.id fileId,b.fileUrl
|
|
|
|
from smz_ssp_auditinfo a
|
|
|
|
left join smz_ssp_fileinfo b on a.id=b.auditId
|
2025-02-15 16:52:57 +08:00
|
|
|
<where>
|
|
|
|
<if test="mainId != null "> and mainId = #{mainId}</if>
|
|
|
|
<if test="processState != null and processState != ''"> and processState = #{processState}</if>
|
|
|
|
<if test="opinion != null and opinion != ''"> and opinion = #{opinion}</if>
|
|
|
|
<if test="isDel != null "> and isDel = #{isDel}</if>
|
|
|
|
<if test="createUser != null and createUser != ''"> and createUser = #{createUser}</if>
|
|
|
|
<if test="createTime != null "> and createTime = #{createTime}</if>
|
|
|
|
</where>
|
2025-03-05 00:14:39 +08:00
|
|
|
order by createTime desc
|
2025-02-15 16:52:57 +08:00
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectSmzSspAuditinfoById" parameterType="Long" resultMap="SmzSspAuditinfoResult">
|
|
|
|
<include refid="selectSmzSspAuditinfoVo"/>
|
|
|
|
where id = #{id}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<insert id="insertSmzSspAuditinfo" parameterType="SmzSspAuditinfo" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
insert into smz_ssp_auditinfo
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="mainId != null">mainId,</if>
|
|
|
|
<if test="processState != null">processState,</if>
|
|
|
|
<if test="opinion != null">opinion,</if>
|
|
|
|
<if test="isDel != null">isDel,</if>
|
|
|
|
<if test="createUser != null">createUser,</if>
|
|
|
|
<if test="createTime != null">createTime,</if>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="mainId != null">#{mainId},</if>
|
|
|
|
<if test="processState != null">#{processState},</if>
|
|
|
|
<if test="opinion != null">#{opinion},</if>
|
|
|
|
<if test="isDel != null">#{isDel},</if>
|
|
|
|
<if test="createUser != null">#{createUser},</if>
|
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
|
</trim>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
<update id="updateSmzSspAuditinfo" parameterType="SmzSspAuditinfo">
|
|
|
|
update smz_ssp_auditinfo
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
<if test="mainId != null">mainId = #{mainId},</if>
|
|
|
|
<if test="processState != null">processState = #{processState},</if>
|
|
|
|
<if test="opinion != null">opinion = #{opinion},</if>
|
|
|
|
<if test="isDel != null">isDel = #{isDel},</if>
|
|
|
|
<if test="createUser != null">createUser = #{createUser},</if>
|
|
|
|
<if test="createTime != null">createTime = #{createTime},</if>
|
|
|
|
</trim>
|
|
|
|
where id = #{id}
|
|
|
|
</update>
|
|
|
|
|
|
|
|
<delete id="deleteSmzSspAuditinfoById" parameterType="Long">
|
|
|
|
delete from smz_ssp_auditinfo where id = #{id}
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
<delete id="deleteSmzSspAuditinfoByIds" parameterType="String">
|
|
|
|
delete from smz_ssp_auditinfo where id in
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
#{id}
|
|
|
|
</foreach>
|
|
|
|
</delete>
|
|
|
|
</mapper>
|