| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- <?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="cn.com.goldenwater.dcproj.dao.ObjKeyPblmsDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.ObjKeyPblms" id="objKeyPblmsResultMap">
- <result property="id" column="ID"/>
- <result property="sn" column="SN"/>
- <result property="attachType" column="ATTACH_TYPE"/>
- <result property="pblmType" column="PBLM_TYPE"/>
- <result property="attach" column="ATTACH"/>
- <result property="sheet" column="SHEET"/>
- <result property="sheetName" column="SHEET_NAME"/>
- <result property="inspPblmsName" column="INSP_PBLMS_NAME"/>
- <result property="checkPoint" column="CHECK_POINT"/>
- <result property="pblmDesc" column="PBLM_DESC"/>
- <result property="inspPblmCate" column="INSP_PBLM_CATE"/>
- <result property="attachName" column="ATTACH_NAME"/>
- <result property="className" column="CLASS_NAME"/>
- </resultMap>
- <sql id="table_columns">
- ID,
- SN,
- ATTACH_TYPE,
- PBLM_TYPE,
- ATTACH,
- SHEET,
- SHEET_NAME,
- INSP_PBLMS_NAME,
- CHECK_POINT,
- PBLM_DESC,
- INSP_PBLM_CATE,ATTACH_NAME,CLASS_NAME
- </sql>
- <sql id="entity_properties">
- #{id},
- #{sn},
- #{attachType},
- #{pblmType},
- #{attach},
- #{sheet},
- #{sheetName},
- #{inspPblmsName},
- #{checkPoint},
- #{pblmDesc},
- #{inspPblmCate},#{attachName},#{className}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="sn != null and sn != ''">and SN = #{sn}</if>
- <if test="className != null and className != ''">and CLASS_NAME = #{className}</if>
- <if test="attachType != null and attachType != ''">and ATTACH_TYPE = #{attachType}</if>
- <if test="pblmType != null and pblmType != ''">and PBLM_TYPE = #{pblmType}</if>
- <if test="attach != null and attach != ''">and ATTACH = #{attach}</if>
- <if test="sheet != null and sheet != ''">and SHEET = #{sheet}</if>
- <if test="sheetName != null and sheetName != ''">and SHEET_NAME = #{sheetName}</if>
- <if test="inspPblmsName != null and inspPblmsName != ''">and INSP_PBLMS_NAME = #{inspPblmsName}</if>
- <if test="checkPoint != null and checkPoint != ''">and CHECK_POINT = #{checkPoint}</if>
- <if test="pblmDesc != null and pblmDesc != ''">and PBLM_DESC = #{pblmDesc}</if>
- <if test="inspPblmCate != null and inspPblmCate != ''">and INSP_PBLM_CATE = #{inspPblmCate}</if>
- <if test="attachName != null and attachName != ''">and ATTACH_NAME = #{attachName}</if>
- </trim>
- </sql>
- <select id="findKeyPblmsNew" resultType="cn.com.goldenwater.dcproj.model.ObjKeyPblms"
- parameterType="cn.com.goldenwater.dcproj.param.ObjKeyPblmsParam">
- select
- <include refid="table_columns"/>
- from obj_key_pblms where 1=1
- <if test="sn !=null and sn !=''">
- and sn in (${sn})
- </if>
- <if test="attachType != null and attachType != ''">and ATTACH_TYPE = #{attachType}</if>
- <if test="sheetName != null and sheetName != ''">and sheet_name like '%${sheetName}%'</if>
- <if test="pblmType != null and pblmType != ''">and PBLM_TYPE = #{pblmType}</if>
- <if test="attach != null and attach != ''">and trim(ATTACH) = #{attach}</if>
- <if test="checkPoint != null and checkPoint != ''">and check_Point = #{checkPoint}</if>
- <if test="sheet != null and sheet != ''">and trim(SHEET) = #{sheet}</if>
- <if test="className != null and className != ''">and CLASS_NAME = #{className}</if>
- <if test="pblmDesc != null and pblmDesc != ''">and PBLM_DESC like '%${pblmDesc}%'</if>
- order by sn
- </select>
- <select id="get" resultMap="objKeyPblmsResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from obj_key_pblms where ID = #{id}
- </select>
- <select id="getBy" resultMap="objKeyPblmsResultMap">
- select
- <include refid="table_columns"/>
- from obj_key_pblms
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="objKeyPblmsResultMap">
- select
- <include refid="table_columns"/>
- from obj_key_pblms
- </select>
- <select id="findList" resultMap="objKeyPblmsResultMap">
- select
- <include refid="table_columns"/>
- from obj_key_pblms
- <include refid="page_where"/>
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from obj_key_pblms
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.ObjKeyPblms">
- insert into obj_key_pblms(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from obj_key_pblms where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.ObjKeyPblms">
- delete from obj_key_pblms
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update obj_key_pblms set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.ObjKeyPblms">
- update obj_key_pblms
- <trim prefix="set" suffixOverrides=",">
- <if test="sn != null and sn != ''">SN = #{sn},</if>
- <if test="attachType != null and attachType != ''">ATTACH_TYPE = #{attachType},</if>
- <if test="pblmType != null and pblmType != ''">PBLM_TYPE = #{pblmType},</if>
- <if test="className != null and className != ''">CLASS_NAME = #{className},</if>
- <if test="attach != null and attach != ''">ATTACH = #{attach},</if>
- <if test="sheet != null and sheet != ''">SHEET = #{sheet},</if>
- <if test="sheetName != null and sheetName != ''">SHEET_NAME = #{sheetName},</if>
- <if test="inspPblmsName != null and inspPblmsName != ''">INSP_PBLMS_NAME = #{inspPblmsName},</if>
- <if test="checkPoint != null and checkPoint != ''">CHECK_POINT = #{checkPoint},</if>
- <if test="pblmDesc != null and pblmDesc != ''">PBLM_DESC = #{pblmDesc},</if>
- <if test="inspPblmCate != null and inspPblmCate != ''">INSP_PBLM_CATE = #{inspPblmCate},</if>
- <if test="attachName != null and attachName != ''">ATTACH_NAME = #{attachName},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.ObjKeyPblms">
- update obj_key_pblms
- <trim prefix="set" suffixOverrides=",">
- <if test="sn != null and sn != ''">SN = #{sn},</if>
- <if test="attachType != null and attachType != ''">ATTACH_TYPE = #{attachType},</if>
- <if test="pblmType != null and pblmType != ''">PBLM_TYPE = #{pblmType},</if>
- <if test="className != null and className != ''">CLASS_NAME = #{className},</if>
- <if test="attach != null and attach != ''">ATTACH = #{attach},</if>
- <if test="sheet != null and sheet != ''">SHEET = #{sheet},</if>
- <if test="sheetName != null and sheetName != ''">SHEET_NAME = #{sheetName},</if>
- <if test="inspPblmsName != null and inspPblmsName != ''">INSP_PBLMS_NAME = #{inspPblmsName},</if>
- <if test="checkPoint != null and checkPoint != ''">CHECK_POINT = #{checkPoint},</if>
- <if test="pblmDesc != null and pblmDesc != ''">PBLM_DESC = #{pblmDesc},</if>
- <if test="inspPblmCate != null and inspPblmCate != ''">INSP_PBLM_CATE = #{inspPblmCate},</if>
- <if test="attachName != null and attachName != ''">ATTACH_NAME = #{attachName},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|