You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aggregation-platform/src/com/dao/mapper/SystemCodeMapper.xml

42 lines
1.3 KiB

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
"http://ibatis.apache.org/dtd/ibatis-3-mapper.dtd">
<mapper namespace="com.platform.dao.ISystemCodeDao">
<resultMap id="getEntityByText" type="com.platform.entities.SystemEntity">
<id property="code" column="code" jdbcType="INTEGER" />
<result property="systemName" column="system_name" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List">
code,system_name
</sql>
<!-- 获取数据全部记录信息 -->
<select id="findAllSystem" resultMap="getEntityByText">
SELECT
<include refid="Base_Column_List" />
FROM system_info
order by code
</select>
<select id="findSubSystem" parameterType="com.platform.entities.SystemEntity" resultMap="getEntityByText">
SELECT
<include refid="Base_Column_List" />
FROM system_info
<where>
<if test="code > 0">
AND code = #{code}
</if>
<if test="cityName != null and cityName != ''">
AND city_name LIKE CONCAT(CONCAT('%', #{cityName}), '%')
</if>
<if test="districtName != null and districtName != ''">
AND district_name LIKE CONCAT(CONCAT('%', #{districtName}), '%')
</if>
</where>
order by code
</select>
</mapper>