<?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.smartor.mapper.BaseOrganizationMapper">
|
|
<resultMap type="com.smartor.domain.BaseOrganization" id="BaseOrganizationResult">
|
<result property="ID" column="ID"/>
|
<result property="OrganizationName" column="OrganizationName"/>
|
<result property="OrganizationID" column="OrganizationID"/>
|
<result property="LogoUrl" column="LogoUrl"/>
|
<result property="RegisterTime" column="RegisterTime"/>
|
<result property="RegisterAddress" column="RegisterAddress"/>
|
<result property="OfficePlace" column="OfficePlace"/>
|
<result property="LegalPerson" column="LegalPerson"/>
|
<result property="ContactPerson" column="ContactPerson"/>
|
<result property="ContactNumber" column="ContactNumber"/>
|
<result property="Introduction" column="Introduction"/>
|
<result property="OrganizationType" column="OrganizationType"/>
|
<result property="HospitalNature" column="HospitalNature"/>
|
<result property="RegionalLevel" column="RegionalLevel"/>
|
<result property="MedicalCode" column="MedicalCode"/>
|
<result property="delFlag" column="del_flag"/>
|
<result property="createBy" column="create_by"/>
|
<result property="createTime" column="create_time"/>
|
<result property="updateBy" column="update_by"/>
|
<result property="updateTime" column="update_time"/>
|
<result property="Province" column="Province"/>
|
<result property="ProvinceName" column="ProvinceName"/>
|
<result property="City" column="City"/>
|
<result property="CityName" column="CityName"/>
|
<result property="Town" column="Town"/>
|
<result property="TownName" column="TownName"/>
|
<result property="Community" column="Community"/>
|
<result property="CommunityName" column="CommunityName"/>
|
<result property="CountyCode" column="CountyCode"/>
|
<result property="CountyName" column="CountyName"/>
|
<result property="bankname" column="bankname"/>
|
<result property="bankaccount" column="bankaccount"/>
|
<result property="pid" column="pid"/>
|
<result property="guid" column="guid"/>
|
<result property="orgid" column="orgid"/>
|
</resultMap>
|
|
<sql id="selectBaseOrganizationVo">
|
select ID,
|
OrganizationName,
|
OrganizationID,
|
LogoUrl,
|
RegisterTime,
|
RegisterAddress,
|
OfficePlace,
|
LegalPerson,
|
ContactPerson,
|
ContactNumber,
|
Introduction,
|
OrganizationType,
|
HospitalNature,
|
RegionalLevel,
|
MedicalCode,
|
del_flag,
|
create_by,
|
create_time,
|
update_by,
|
update_time,
|
Province,
|
ProvinceName,
|
City,
|
CityName,
|
Town,
|
TownName,
|
Community,
|
CommunityName,
|
CountyCode,
|
CountyName,
|
bankname,
|
bankaccount,
|
pid,
|
guid,
|
orgid
|
from base_organization
|
</sql>
|
|
<select id="selectBaseOrganizationList" parameterType="com.smartor.domain.BaseOrganization"
|
resultMap="BaseOrganizationResult">
|
<include refid="selectBaseOrganizationVo"/>
|
<where>
|
del_flag=0
|
<if test="OrganizationName != null and OrganizationName != ''">
|
and OrganizationName like concat('%', #{OrganizationName}, '%')
|
</if>
|
<if test="OrganizationID != null and OrganizationID != ''">
|
and OrganizationID = #{OrganizationID}
|
</if>
|
<if test="LogoUrl != null and LogoUrl != ''">
|
and LogoUrl = #{LogoUrl}
|
</if>
|
<if test="RegisterTime != null ">
|
and RegisterTime = #{RegisterTime}
|
</if>
|
<if test="RegisterAddress != null and RegisterAddress != ''">
|
and RegisterAddress = #{RegisterAddress}
|
</if>
|
<if test="OfficePlace != null and OfficePlace != ''">
|
and OfficePlace = #{OfficePlace}
|
</if>
|
<if test="LegalPerson != null and LegalPerson != ''">
|
and LegalPerson = #{LegalPerson}
|
</if>
|
<if test="ContactPerson != null and ContactPerson != ''">
|
and ContactPerson = #{ContactPerson}
|
</if>
|
<if test="ContactNumber != null and ContactNumber != ''">
|
and ContactNumber = #{ContactNumber}
|
</if>
|
<if test="Introduction != null and Introduction != ''">
|
and Introduction = #{Introduction}
|
</if>
|
<if test="OrganizationType != null and OrganizationType != ''">
|
and OrganizationType = #{OrganizationType}
|
</if>
|
<if test="HospitalNature != null and HospitalNature != ''">
|
and HospitalNature = #{HospitalNature}
|
</if>
|
<if test="RegionalLevel != null and RegionalLevel != ''">
|
and RegionalLevel = #{RegionalLevel}
|
</if>
|
<if test="MedicalCode != null and MedicalCode != ''">
|
and MedicalCode = #{MedicalCode}
|
</if>
|
<if test="Province != null and Province != ''">
|
and Province = #{Province}
|
</if>
|
<if test="ProvinceName != null and ProvinceName != ''">
|
and ProvinceName like concat('%', #{ProvinceName}, '%')
|
</if>
|
<if test="City != null and City != ''">
|
and City = #{City}
|
</if>
|
<if test="CityName != null and CityName != ''">
|
and CityName like concat('%', #{CityName}, '%')
|
</if>
|
<if test="Town != null and Town != ''">
|
and Town = #{Town}
|
</if>
|
<if test="TownName != null and TownName != ''">
|
and TownName like concat('%', #{TownName}, '%')
|
</if>
|
<if test="Community != null and Community != ''">
|
and Community = #{Community}
|
</if>
|
<if test="CommunityName != null and CommunityName != ''">
|
and CommunityName like concat('%', #{CommunityName}, '%')
|
</if>
|
<if test="CountyCode != null and CountyCode != ''">
|
and CountyCode = #{CountyCode}
|
</if>
|
<if test="CountyName != null and CountyName != ''">
|
and CountyName like concat('%', #{CountyName}, '%')
|
</if>
|
<if test="bankname != null and bankname != ''">
|
and bankname like concat('%', #{bankname}, '%')
|
</if>
|
<if test="bankaccount != null and bankaccount != ''">
|
and bankaccount = #{bankaccount}
|
</if>
|
<if test="pid != null ">
|
and pid = #{pid}
|
</if>
|
<if test="guid != null and guid != ''">
|
and guid = #{guid}
|
</if>
|
<if test="orgid != null ">
|
and orgid = #{orgid}
|
</if>
|
</where>
|
</select>
|
|
<select id="selectBaseOrganizationByID" parameterType="Long"
|
resultMap="BaseOrganizationResult">
|
<include refid="selectBaseOrganizationVo"/>
|
where ID = #{ID}
|
</select>
|
|
<insert id="insertBaseOrganization" parameterType="com.smartor.domain.BaseOrganization" useGeneratedKeys="true"
|
keyProperty="ID">
|
insert into base_organization
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="OrganizationName != null and OrganizationName != ''">OrganizationName,
|
</if>
|
<if test="OrganizationID != null and OrganizationID != ''">OrganizationID,
|
</if>
|
<if test="LogoUrl != null">LogoUrl,
|
</if>
|
<if test="RegisterTime != null">RegisterTime,
|
</if>
|
<if test="RegisterAddress != null">RegisterAddress,
|
</if>
|
<if test="OfficePlace != null">OfficePlace,
|
</if>
|
<if test="LegalPerson != null">LegalPerson,
|
</if>
|
<if test="ContactPerson != null">ContactPerson,
|
</if>
|
<if test="ContactNumber != null">ContactNumber,
|
</if>
|
<if test="Introduction != null">Introduction,
|
</if>
|
<if test="OrganizationType != null">OrganizationType,
|
</if>
|
<if test="HospitalNature != null">HospitalNature,
|
</if>
|
<if test="RegionalLevel != null">RegionalLevel,
|
</if>
|
<if test="MedicalCode != null">MedicalCode,
|
</if>
|
<if test="delFlag != null">del_flag,
|
</if>
|
<if test="createBy != null">create_by,
|
</if>
|
<if test="createTime != null">create_time,
|
</if>
|
<if test="updateBy != null">update_by,
|
</if>
|
<if test="updateTime != null">update_time,
|
</if>
|
<if test="Province != null">Province,
|
</if>
|
<if test="ProvinceName != null">ProvinceName,
|
</if>
|
<if test="City != null">City,
|
</if>
|
<if test="CityName != null">CityName,
|
</if>
|
<if test="Town != null">Town,
|
</if>
|
<if test="TownName != null">TownName,
|
</if>
|
<if test="Community != null">Community,
|
</if>
|
<if test="CommunityName != null">CommunityName,
|
</if>
|
<if test="CountyCode != null">CountyCode,
|
</if>
|
<if test="CountyName != null">CountyName,
|
</if>
|
<if test="bankname != null">bankname,
|
</if>
|
<if test="bankaccount != null">bankaccount,
|
</if>
|
<if test="pid != null">pid,
|
</if>
|
<if test="guid != null">guid,
|
</if>
|
<if test="orgid != null">orgid,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="OrganizationName != null and OrganizationName != ''">#{OrganizationName},
|
</if>
|
<if test="OrganizationID != null and OrganizationID != ''">#{OrganizationID},
|
</if>
|
<if test="LogoUrl != null">#{LogoUrl},
|
</if>
|
<if test="RegisterTime != null">#{RegisterTime},
|
</if>
|
<if test="RegisterAddress != null">#{RegisterAddress},
|
</if>
|
<if test="OfficePlace != null">#{OfficePlace},
|
</if>
|
<if test="LegalPerson != null">#{LegalPerson},
|
</if>
|
<if test="ContactPerson != null">#{ContactPerson},
|
</if>
|
<if test="ContactNumber != null">#{ContactNumber},
|
</if>
|
<if test="Introduction != null">#{Introduction},
|
</if>
|
<if test="OrganizationType != null">#{OrganizationType},
|
</if>
|
<if test="HospitalNature != null">#{HospitalNature},
|
</if>
|
<if test="RegionalLevel != null">#{RegionalLevel},
|
</if>
|
<if test="MedicalCode != null">#{MedicalCode},
|
</if>
|
<if test="delFlag != null">#{delFlag},
|
</if>
|
<if test="createBy != null">#{createBy},
|
</if>
|
<if test="createTime != null">#{createTime},
|
</if>
|
<if test="updateBy != null">#{updateBy},
|
</if>
|
<if test="updateTime != null">#{updateTime},
|
</if>
|
<if test="Province != null">#{Province},
|
</if>
|
<if test="ProvinceName != null">#{ProvinceName},
|
</if>
|
<if test="City != null">#{City},
|
</if>
|
<if test="CityName != null">#{CityName},
|
</if>
|
<if test="Town != null">#{Town},
|
</if>
|
<if test="TownName != null">#{TownName},
|
</if>
|
<if test="Community != null">#{Community},
|
</if>
|
<if test="CommunityName != null">#{CommunityName},
|
</if>
|
<if test="CountyCode != null">#{CountyCode},
|
</if>
|
<if test="CountyName != null">#{CountyName},
|
</if>
|
<if test="bankname != null">#{bankname},
|
</if>
|
<if test="bankaccount != null">#{bankaccount},
|
</if>
|
<if test="pid != null">#{pid},
|
</if>
|
<if test="guid != null">#{guid},
|
</if>
|
<if test="orgid != null">#{orgid},
|
</if>
|
</trim>
|
</insert>
|
|
<update id="updateBaseOrganization" parameterType="com.smartor.domain.BaseOrganization">
|
update base_organization
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="OrganizationName != null and OrganizationName != ''">OrganizationName =
|
#{OrganizationName},
|
</if>
|
<if test="OrganizationID != null and OrganizationID != ''">OrganizationID =
|
#{OrganizationID},
|
</if>
|
<if test="LogoUrl != null">LogoUrl =
|
#{LogoUrl},
|
</if>
|
<if test="RegisterTime != null">RegisterTime =
|
#{RegisterTime},
|
</if>
|
<if test="RegisterAddress != null">RegisterAddress =
|
#{RegisterAddress},
|
</if>
|
<if test="OfficePlace != null">OfficePlace =
|
#{OfficePlace},
|
</if>
|
<if test="LegalPerson != null">LegalPerson =
|
#{LegalPerson},
|
</if>
|
<if test="ContactPerson != null">ContactPerson =
|
#{ContactPerson},
|
</if>
|
<if test="ContactNumber != null">ContactNumber =
|
#{ContactNumber},
|
</if>
|
<if test="Introduction != null">Introduction =
|
#{Introduction},
|
</if>
|
<if test="OrganizationType != null">OrganizationType =
|
#{OrganizationType},
|
</if>
|
<if test="HospitalNature != null">HospitalNature =
|
#{HospitalNature},
|
</if>
|
<if test="RegionalLevel != null">RegionalLevel =
|
#{RegionalLevel},
|
</if>
|
<if test="MedicalCode != null">MedicalCode =
|
#{MedicalCode},
|
</if>
|
<if test="delFlag != null">del_flag =
|
#{delFlag},
|
</if>
|
<if test="createBy != null">create_by =
|
#{createBy},
|
</if>
|
<if test="createTime != null">create_time =
|
#{createTime},
|
</if>
|
<if test="updateBy != null">update_by =
|
#{updateBy},
|
</if>
|
<if test="updateTime != null">update_time =
|
#{updateTime},
|
</if>
|
<if test="Province != null">Province =
|
#{Province},
|
</if>
|
<if test="ProvinceName != null">ProvinceName =
|
#{ProvinceName},
|
</if>
|
<if test="City != null">City =
|
#{City},
|
</if>
|
<if test="CityName != null">CityName =
|
#{CityName},
|
</if>
|
<if test="Town != null">Town =
|
#{Town},
|
</if>
|
<if test="TownName != null">TownName =
|
#{TownName},
|
</if>
|
<if test="Community != null">Community =
|
#{Community},
|
</if>
|
<if test="CommunityName != null">CommunityName =
|
#{CommunityName},
|
</if>
|
<if test="CountyCode != null">CountyCode =
|
#{CountyCode},
|
</if>
|
<if test="CountyName != null">CountyName =
|
#{CountyName},
|
</if>
|
<if test="bankname != null">bankname =
|
#{bankname},
|
</if>
|
<if test="bankaccount != null">bankaccount =
|
#{bankaccount},
|
</if>
|
<if test="pid != null">pid =
|
#{pid},
|
</if>
|
<if test="guid != null">guid =
|
#{guid},
|
</if>
|
<if test="orgid != null">orgid =
|
#{orgid},
|
</if>
|
</trim>
|
where ID = #{ID}
|
</update>
|
|
<update id="deleteBaseOrganizationByID" parameterType="Long">
|
update base_organization
|
<trim prefix="SET" suffixOverrides=",">
|
del_flag =1
|
</trim>
|
where ID = #{ID}
|
</update>
|
|
<update id="deleteBaseOrganizationByIDs" parameterType="String">
|
update base_organization
|
<trim prefix="SET" suffixOverrides=",">
|
del_flag =1
|
</trim>
|
where ID in
|
<foreach item="ID" collection="array" open="(" separator="," close=")">
|
#{ID}
|
</foreach>
|
</update>
|
|
|
</mapper>
|