日照智慧社区接口服务
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.
 
 
 
 
 

46 lines
1.3 KiB

<?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.epmet.dao.AreaCodeChildDao">
<select id="selectAllChild" resultType="com.epmet.dto.AreaCodeChildDTO">
select * from area_code_child
</select>
<select id="selectByCode" resultType="com.epmet.dto.AreaCodeChildDTO">
SELECT
*
FROM
area_code_child m
WHERE
m.DEL_FLAG = '0'
and m.`CODE`=#{code}
</select>
<!-- 根据p_code、name查询社区列表 -->
<select id="selectByPCodeAndName" resultType="com.epmet.dto.AreaCodeChildDTO">
SELECT
*
FROM
area_code_child m
WHERE
m.DEL_FLAG = '0'
AND m.P_CODE = #{parentAreaCode}
and m.`NAME`=#{name}
</select>
<!-- 根据p_code查询下一级中最大的编码 -->
<select id="selectMaxChild" resultType="com.epmet.dto.AreaCodeChildDTO">
SELECT
*
FROM
area_code_child m
WHERE
m.DEL_FLAG = '0'
AND m.P_CODE = #{parentAreaCode}
ORDER BY
m.`CODE` DESC
LIMIT 1
</select>
</mapper>