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.
weaver-hrm-organization/src/com/engine/organization/mapper/comp/CompMapper.xml

74 lines
2.5 KiB
XML

<?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.comp.CompMapper">
<resultMap id="BaseResultMap" type="com.engine.organization.entity.comp.po.CompPO">
<result column="id" property="id"/>
<result column="comp_no" property="compNo"/>
<result column="comp_name" property="compName"/>
<result column="comp_name_short" property="compNameShort"/>
<result column="parent_company" property="parentCompany"/>
<result column="org_code" property="orgCode"/>
<result column="industry" property="industry"/>
<result column="comp_principal" property="compPrincipal"/>
<result column="description" property="description"/>
<result column="forbidden_tag" property="forbiddenTag"/>
<result column="creator" property="creator"/>
<result column="delete_type" property="deleteType"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
</resultMap>
<!-- 表字段 -->
<sql id="baseColumns">
t
.
id
, t.comp_no
, t.comp_name
, t.comp_name_short
, t.parent_company
, t.org_code
, t.industry
, t.comp_principal
, t.description
, t.forbidden_tag
, t.creator
, t.delete_type
, t.create_time
, t.update_time
</sql>
<select id="list" resultMap="BaseResultMap" parameterType="com.engine.organization.entity.comp.po.CompPO">
SELECT
<include refid="baseColumns"/>
FROM
jcl_org_comp t
WHERE t.delete_type = 0
</select>
<select id="listByNo" parameterType="com.engine.organization.entity.comp.po.CompPO" resultMap="BaseResultMap">
select
<include refid="baseColumns"/>
from jcl_org_comp t where comp_no = #{compNo} AND delete_type = 0
</select>
<update id="updateForbiddenTagById" parameterType="com.engine.organization.entity.sequence.po.SequencePO">
update jcl_org_comp
<set>
forbidden_tag=#{forbiddenTag},
</set>
WHERE id = #{id} AND delete_type = 0
</update>
<update id="deleteByIds">
UPDATE jcl_org_comp
SET delete_type = 1
WHERE delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>