|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
|
|
<mapper namespace="com.lzbi.special.mapper.DcBaseWorkSpecialMapper"> |
|
|
|
|
|
|
|
<resultMap type="com.lzbi.special.domain.DcBaseWorkSpecialDao" id="DcBaseWorkSpecialResult"> |
|
|
|
<resultMap type="com.lzbi.special.domain.DcBaseWorkSpecial" id="DcBaseWorkSpecialResult"> |
|
|
|
<result property="tenantId" column="TENANT_ID" /> |
|
|
|
<result property="REVISION" column="REVISION" /> |
|
|
|
<result property="createdBy" column="CREATED_BY" /> |
|
|
@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
select TENANT_ID, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETE_BY, DELETE_TIME, id, special_code, special_name from dc_base_work_special |
|
|
|
</sql> |
|
|
|
|
|
|
|
<select id="selectDcBaseWorkSpecialDaoList" parameterType="DcBaseWorkSpecialDao" resultMap="DcBaseWorkSpecialResult"> |
|
|
|
<select id="selectDcBaseWorkSpecialList" parameterType="DcBaseWorkSpecial" resultMap="DcBaseWorkSpecialResult"> |
|
|
|
<include refid="selectDcBaseWorkSpecialVo"/> |
|
|
|
<where> |
|
|
|
<if test="tenantId != null">and TENANT_ID = #{tenantId},</if> |
|
|
@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="specialName != null and specialName != ''"> and special_name like concat('%', #{specialName}, '%')</if> |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
<select id="selectDcBaseWorkSpecialDaoDictList" parameterType="DcBaseWorkSpecialDao" resultMap="DcBaseWorkSpecialResult"> |
|
|
|
<select id="selectDcBaseWorkSpecialDictList" parameterType="DcBaseWorkSpecial" resultMap="DcBaseWorkSpecialResult"> |
|
|
|
select special_code, special_name from dc_base_work_special |
|
|
|
<where> |
|
|
|
<if test="tenantId != null">and TENANT_ID = #{tenantId},</if> |
|
|
@ -38,12 +38,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="specialName != null and specialName != ''"> and special_name like concat('%', #{specialName}, '%')</if> |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
<select id="selectDcBaseWorkSpecialDaoById" parameterType="Long" resultMap="DcBaseWorkSpecialResult"> |
|
|
|
<select id="selectDcBaseWorkSpecialDictList" parameterType="DcBaseWorkSpecial" resultMap="DcBaseWorkSpecialResult"> |
|
|
|
select special_code, special_name from dc_base_work_special |
|
|
|
<where> |
|
|
|
<if test="tenantId != null">and TENANT_ID = #{tenantId},</if> |
|
|
|
<if test="specialCode != null and specialCode != ''"> and special_code = #{specialCode}</if> |
|
|
|
<if test="specialName != null and specialName != ''"> and special_name like concat('%', #{specialName}, '%')</if> |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
<select id="selectDcBaseWorkSpecialById" parameterType="Long" resultMap="DcBaseWorkSpecialResult"> |
|
|
|
<include refid="selectDcBaseWorkSpecialVo"/> |
|
|
|
where id = #{id} |
|
|
|
</select> |
|
|
|
|
|
|
|
<insert id="insertDcBaseWorkSpecialDao" parameterType="DcBaseWorkSpecialDao" useGeneratedKeys="true" keyProperty="id"> |
|
|
|
<insert id="insertDcBaseWorkSpecial" parameterType="DcBaseWorkSpecial" useGeneratedKeys="true" keyProperty="id"> |
|
|
|
insert into dc_base_work_special |
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
|
|
<if test="tenantId != null">TENANT_ID,</if> |
|
|
@ -71,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
</trim> |
|
|
|
</insert> |
|
|
|
|
|
|
|
<update id="updateDcBaseWorkSpecialDao" parameterType="DcBaseWorkSpecialDao"> |
|
|
|
<update id="updateDcBaseWorkSpecial" parameterType="DcBaseWorkSpecial"> |
|
|
|
update dc_base_work_special |
|
|
|
<trim prefix="SET" suffixOverrides=","> |
|
|
|
<if test="tenantId != null">TENANT_ID = #{tenantId},</if> |
|
|
@ -88,11 +96,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
where id = #{id} |
|
|
|
</update> |
|
|
|
|
|
|
|
<delete id="deleteDcBaseWorkSpecialDaoById" parameterType="Long"> |
|
|
|
<delete id="deleteDcBaseWorkSpecialById" parameterType="Long"> |
|
|
|
delete from dc_base_work_special where id = #{id} |
|
|
|
</delete> |
|
|
|
|
|
|
|
<delete id="deleteDcBaseWorkSpecialDaoByIds" parameterType="String"> |
|
|
|
<delete id="deleteDcBaseWorkSpecialByIds" parameterType="String"> |
|
|
|
delete from dc_base_work_special where id in |
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
|
|
#{id} |
|
|
|