You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
147 lines
4.5 KiB
XML
147 lines
4.5 KiB
XML
3 years ago
|
<?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.engine.organization.mapper.hrmresource.ResourceBasicInfoMapper">
|
||
|
|
||
|
<resultMap id="ItemResultMap" type="com.engine.organization.entity.hrmresource.po.ResourceItemPO">
|
||
|
<result column="fid" property="fid"/>
|
||
|
<result column="fclassid" property="fclassid"/>
|
||
|
<result column="fno" property="fno"/>
|
||
|
<result column="fname" property="fname"/>
|
||
|
<result column="fmemo" property="fmemo"/>
|
||
|
<result column="fdelete" property="fdelete"/>
|
||
|
</resultMap>
|
||
|
|
||
|
<resultMap id="TreeResultMap" type="com.engine.organization.entity.TreeData">
|
||
|
<result column="id" property="key"/>
|
||
|
<result column="scheme_name" property="title"/>
|
||
|
</resultMap>
|
||
|
|
||
|
<select id="getTreeData" resultMap="TreeResultMap">
|
||
|
select fid, fname
|
||
|
from jcl_org_itemclass
|
||
|
</select>
|
||
|
|
||
|
<select id="browserDatas" resultType="java.util.Map">
|
||
|
select
|
||
|
fid as `id`,
|
||
|
fname as `name`
|
||
|
from jcl_org_itemclass
|
||
|
AND id IN
|
||
|
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||
|
#{id}
|
||
|
</foreach>
|
||
|
</select>
|
||
|
|
||
|
|
||
|
|
||
|
<select id="getResourceItemByFid" resultType="com.engine.organization.entity.hrmresource.po.ResourceItemPO">
|
||
|
select fid,fclassid,fno,fname,fmemo,fdelete,creator,create_time,update_time
|
||
|
from jcl_org_item
|
||
|
where fdelete = 0 and fid = #{fid}
|
||
|
</select>
|
||
|
|
||
|
|
||
|
<select id="selectItemByIds" resultMap="ItemResultMap">
|
||
|
select fid,fclassid,fno,fname,fmemo,fdelete,creator,create_time,update_time
|
||
|
from jcl_org_item
|
||
|
where fdelete = 0
|
||
|
AND fid IN
|
||
|
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||
|
#{id}
|
||
|
</foreach>
|
||
|
</select>
|
||
|
|
||
|
|
||
|
<select id="selectItemByFNo" resultMap="ItemResultMap">
|
||
|
select fid,fclassid,fno,fname,fmemo,fdelete,creator,create_time,update_time
|
||
|
from jcl_org_item
|
||
|
where fdelete = 0
|
||
|
AND fno = #{fno}
|
||
|
</select>
|
||
|
|
||
|
<update id="deleteByIds">
|
||
|
UPDATE jcl_org_item
|
||
|
SET fdelete = 1
|
||
|
WHERE fdelete = 0
|
||
|
AND fid IN
|
||
|
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||
|
#{id}
|
||
|
</foreach>
|
||
|
</update>
|
||
|
|
||
|
|
||
|
<update id="recoverByIds">
|
||
|
UPDATE jcl_org_item
|
||
|
SET fdelete = 0
|
||
|
WHERE fdelete = 1
|
||
|
AND fid IN
|
||
|
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||
|
#{id}
|
||
|
</foreach>
|
||
|
</update>
|
||
|
|
||
|
|
||
|
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.hrmresource.po.ResourceItemPO" keyProperty="id"
|
||
|
keyColumn="id" useGeneratedKeys="true">
|
||
|
INSERT INTO jcl_org_item
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="fclassid != null">
|
||
|
fclassid,
|
||
|
</if>
|
||
|
<if test="fno != null">
|
||
|
fno,
|
||
|
</if>
|
||
|
<if test="fname != null">
|
||
|
fname,
|
||
|
</if>
|
||
|
<if test="fmemo != null">
|
||
|
fmemo,
|
||
|
</if>
|
||
|
<if test="fdelete != null">
|
||
|
fdelete,
|
||
|
</if>
|
||
|
<if test="creator != null">
|
||
|
creator,
|
||
|
</if>
|
||
|
<if test="createTime != null">
|
||
|
create_time,
|
||
|
</if>
|
||
|
<if test="updateTime != null">
|
||
|
update_time,
|
||
|
</if>
|
||
|
</trim>
|
||
|
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||
|
<if test="fclassid != null">
|
||
|
#{fclassid},
|
||
|
</if>
|
||
|
<if test="fno != null">
|
||
|
#{fno},
|
||
|
</if>
|
||
|
<if test="fname != null">
|
||
|
#{fname},
|
||
|
</if>
|
||
|
<if test="fmemo != null">
|
||
|
#{fmemo},
|
||
|
</if>
|
||
|
<if test="fdelete != null">
|
||
|
#{fdelete},
|
||
|
</if>
|
||
|
<if test="creator != null">
|
||
|
#{creator},
|
||
|
</if>
|
||
|
<if test="createTime != null">
|
||
|
#{createTime},
|
||
|
</if>
|
||
|
<if test="updateTime != null">
|
||
|
#{updateTime},
|
||
|
</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<!--oracle未处理-->
|
||
|
<!--<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.hrmresource.po.ResourceItemPO"-->
|
||
|
<!--databaseId="oracle">-->
|
||
|
<!--</insert>-->
|
||
|
|
||
|
|
||
|
</mapper>
|