grail-patient-interrogation/grail-patient-interrogation.../src/main/resources/mapper/interrogation/HomepageMapper.xml

20 lines
839 B
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.grail.interrogation.mapper.HomepageMapper">
<resultMap id="homepage" type="com.grail.interrogation.domain.Homepage">
<id property="id" column="id"></id>
<result property="homepage" column="homepage"></result>
<result property="picture" column="picture"></result>
<result property="pid" column="pid"></result>
</resultMap>
<select id="homepageList" resultMap="homepage">
SELECT id , homepage , picture , pid from t_homepage where pid = 0
</select>
<select id="homepageSubquery" resultType="com.grail.interrogation.domain.ListHomepage">
SELECT id , homepage , picture , pid FROM t_homepage WHERE pid = #{id}
</select>
</mapper>