| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- <?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.xunmei.system.mapper.SysPhysicalDefenseConstructionMapper">
- <resultMap type="com.xunmei.system.domain.SysPhysicalDefenseConstruction" id="SysOrgPhysicalDefenseConstructionResult">
- <result property="id" column="id"/>
- <result property="standard" column="standard"/>
- <result property="dateOfCompliance" column="date_of_compliance"/>
- <result property="certificateEvidence" column="certificate_evidence"/>
- <result property="certificate" column="certificate"/>
- <result property="evidence" column="evidence"/>
- <result property="createTime" column="create_time"/>
- <result property="updateTime" column="update_time"/>
- <result property="createBy" column="create_by"/>
- <result property="updateBy" column="update_by"/>
- <result property="orgId" column="org_id"/>
- </resultMap>
- <sql id="selectSysOrgPhysicalDefenseConstructionVo">
- select id, standard, date_of_compliance, certificate_evidence, certificate, evidence, create_time, update_time, create_by, update_by, org_id
- from sys_org_physical_defense_construction
- </sql>
- <select id="selectSysOrgPhysicalDefenseConstructionList" parameterType="com.xunmei.system.domain.SysPhysicalDefenseConstruction"
- resultMap="SysOrgPhysicalDefenseConstructionResult">
- <include refid="selectSysOrgPhysicalDefenseConstructionVo"/>
- <where>
- <if test="standard != null and standard != ''">
- and standard = #{standard}
- </if>
- <if test="dateOfCompliance != null ">
- and date_of_compliance = #{dateOfCompliance}
- </if>
- <if test="certificateEvidence != null ">
- and certificate_evidence = #{certificateEvidence}
- </if>
- <if test="certificate != null and certificate != ''">
- and certificate = #{certificate}
- </if>
- <if test="evidence != null and evidence != ''">
- and evidence = #{evidence}
- </if>
- <if test="orgId != null ">
- and org_id = #{orgId}
- </if>
- </where>
- </select>
- <select id="selectListByPath" resultType="com.xunmei.system.dto.SysPhysicalDefenseConstructionDTO">
- select op.*,o.path as orgPath from sys_org o INNER JOIN sys_org_physical_defense_construction op ON o.id = op.org_id
- where o.is_lock != 1 and o.deleted = 0 and o.type = 4
- <if test="type != null and type != ''">
- and op.type = #{type}
- </if>
- <if test="orgPath != null and orgPath != ''">
- and o.path LIKE concat(#{orgPath}, '%')
- </if>
- </select>
- <select id="selectSysOrgPhysicalDefenseConstructionById" parameterType="Long"
- resultMap="SysOrgPhysicalDefenseConstructionResult">
- <include refid="selectSysOrgPhysicalDefenseConstructionVo"/>
- where id = #{id}
- </select>
- <insert id="insertSysOrgPhysicalDefenseConstruction" parameterType="com.xunmei.system.domain.SysPhysicalDefenseConstruction">
- insert into sys_org_physical_defense_construction
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,
- </if>
- <if test="standard != null">standard,
- </if>
- <if test="dateOfCompliance != null">date_of_compliance,
- </if>
- <if test="certificateEvidence != null">certificate_evidence,
- </if>
- <if test="certificate != null">certificate,
- </if>
- <if test="evidence != null">evidence,
- </if>
- <if test="createTime != null">create_time,
- </if>
- <if test="updateTime != null">update_time,
- </if>
- <if test="createBy != null">create_by,
- </if>
- <if test="updateBy != null">update_by,
- </if>
- <if test="orgId != null">org_id,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id},
- </if>
- <if test="standard != null">#{standard},
- </if>
- <if test="dateOfCompliance != null">#{dateOfCompliance},
- </if>
- <if test="certificateEvidence != null">#{certificateEvidence},
- </if>
- <if test="certificate != null">#{certificate},
- </if>
- <if test="evidence != null">#{evidence},
- </if>
- <if test="createTime != null">#{createTime},
- </if>
- <if test="updateTime != null">#{updateTime},
- </if>
- <if test="createBy != null">#{createBy},
- </if>
- <if test="updateBy != null">#{updateBy},
- </if>
- <if test="orgId != null">#{orgId},
- </if>
- </trim>
- </insert>
- <update id="updateSysOrgPhysicalDefenseConstruction" parameterType="com.xunmei.system.domain.SysPhysicalDefenseConstruction">
- update sys_org_physical_defense_construction
- <trim prefix="SET" suffixOverrides=",">
- <if test="standard != null">standard =
- #{standard},
- </if>
- <if test="dateOfCompliance != null">date_of_compliance =
- #{dateOfCompliance},
- </if>
- <if test="certificateEvidence != null">certificate_evidence =
- #{certificateEvidence},
- </if>
- <if test="certificate != null">certificate =
- #{certificate},
- </if>
- <if test="evidence != null">evidence =
- #{evidence},
- </if>
- <if test="createTime != null">create_time =
- #{createTime},
- </if>
- <if test="updateTime != null">update_time =
- #{updateTime},
- </if>
- <if test="createBy != null">create_by =
- #{createBy},
- </if>
- <if test="updateBy != null">update_by =
- #{updateBy},
- </if>
- <if test="orgId != null">org_id =
- #{orgId},
- </if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteSysOrgPhysicalDefenseConstructionById" parameterType="Long">
- delete
- from sys_org_physical_defense_construction where id = #{id}
- </delete>
- <delete id="deleteSysOrgPhysicalDefenseConstructionByIds" parameterType="String">
- delete from sys_org_physical_defense_construction where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|