Files
faw-report-library-boot/adc-da-sys/target/classes/mybatis/mapper/sys/mysql/OrgEOMapper.xml
T

61 lines
2.2 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.adc.da.sys.dao.mysql.OrgEODao">
<!-- 查询条件 -->
<sql id="Base_Where_Clause">
<if test="pageVO.orgCode != null and pageVO.orgCode !=''">
and org_code = #{pageVO.orgCode}
</if>
<if test="pageVO.UUID != null and pageVO.UUID != ''">
and UUID = #{pageVO.UUID}
</if>
<if test="pageVO.orgName != null and pageVO.orgName != ''">
and ORG_NAME LIKE CONCAT(CONCAT('%',#{pageVO.orgName}) ,'%')
</if>
<if test="pageVO.orgLevel != null">
and ORG_LEVEL = #{pageVO.orgLevel}
</if>
<if test="pageVO.supOrgCode != null and pageVO.supOrgCode !=''">
and SUP_ORG_CODE = #{pageVO.supOrgCode}
</if>
<if test="pageVO.orgShortName != null and pageVO.orgShortName != ''">
and ORG_SHORT_NAME = #{pageVO.orgShortName}
</if>
<if test="pageVO.attribution != null and pageVO.attribution != ''">
and ATTRIBUTION = #{pageVO.attribution}
</if>
<if test="pageVO.bmdm14 != null and pageVO.bmdm14 != ''">
and BMDM_14 = #{pageVO.bmdm14}
</if>
<if test="pageVO.status != null">
and STATUS = #{pageVO.status}
</if>
</sql>
<select id="selectListByVO" resultType="com.adc.da.sys.entity.OrgEO">
select * from TS_ORG
<where>
<include refid="Base_Where_Clause"/>
</where>
</select>
<select id="selectPageByVO" resultType="com.adc.da.sys.entity.OrgEO">
select * from TS_ORG
<where>
<include refid="Base_Where_Clause"/>
</where>
</select>
<select id="selectCountByOrgCode" resultType="java.lang.Long">
select count(1) from TS_ORG
<where>
status = 1
<if test="pageVO.orgCode != null and pageVO.orgCode != ''">
and org_code = #{pageVO.orgCode}
</if>
<if test="pageVO.id != null and pageVO.id != ''">
and id != #{pageVO.id}
</if>
</where>
</select>
</mapper>