<?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.srs.dormitory.mapper.DmsPhotosMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.srs.dormitory.domain.DmsPhotos">
        <id column="id" property="id" />
        <result column="repair_record_id" property="repairRecordId" />
        <result column="url" property="url" />
        <result column="create_time" property="createTime" />
        <result column="update_time" property="updateTime" />
    </resultMap>
    <resultMap id="photoResultMap" type="com.srs.dormitory.domain.Vo.PhotoVO">
        <id property="id" column="photoId"/>
        <result property="url" column="photoUrl"/>
    </resultMap>
    <select id="selectByDormId" resultType="com.srs.dormitory.domain.Vo.PhotoVO">
        select p.id,p.url
        from dms_photos p
        where p.dorm_id = #{dormId}
    </select>

</mapper>
