//mapper中
<resultMap id="BaseResultMap"
type="com.faceshow.modules.app.entity.AppActivityInfoEntity">
<id column="id" property="id" jdbcType="INTEGER"/>
<result column="is_deleted" property="deleted" jdbcType="TINYINT"
typeHandler="com.faceshow.common.dao.TinyIntBooleanTypeHandler"/>
<result column="share_img_url" property="shareImgUrl" jdbcType="VARCHAR"/>
<result column="share_text_cn" property="shareTextCn" jdbcType="VARCHAR"/>
<result column="share_text_en" property="shareTextEn" jdbcType="VARCHAR"/>
<result column="float_icon_url" property="floatIconUrl" jdbcType="VARCHAR"/>
//使用collention标签 映射 property 是表拆线呢出来的别名
//column是下边对应方法传入的值
//ofType是返回值的类型List<String>
//select 是定要执行的方法 结果集为实体类中定义的List<String>类型
<collection property="likeImgUrl" column="id" ofType="java.lang.String"
select="com.faceshow.modules.app.dao.AppLikeImgInfoDao.getAppActivityLikeImgUrl">
</collection>
</resultMap>
//collection-select指定要执行的接口
/**
* @Author qkb
* @Description // 查询活动对应的点赞图标
* @Date 10:47 2018/11/21
* @Param [activityId]
* @return java.util.List<java.lang.String>
**/
List<String> getAppActivityLikeImgUrl(Integer activityId);
//指定执行的sql
//#{activityId}是collection-column 传递的参数
<!-- 查询获得东对应的点赞图标 -->
<select id="getAppActivityLikeImgUrl" resultType="java.lang.String">
SELECT like_img_url FROM app_activity_like_img WHERE activity_id = #{activityId}
</select>
n" property="shareTextEn" jdbcType="VARCHAR"/>
<result column="float_icon_url" property="floatIconUrl" jdbcType="VARCHAR"/>
//使用collention标签 映射 property 是表拆线呢出来的别名
//column是下边对应方法传入的值
//ofType是返回值的类型List<String>
//select 是定要执行的方法 结果集为实体类中定义的List<String>类型
<collection property="likeImgUrl" column="id" ofType="java.lang.String"
select="com.faceshow.modules.app.dao.AppLikeImgInfoDao.getAppActivityLikeImgUrl">
</collection>
</resultMap>
//collection-select指定要执行的接口
/**
* @Author qkb
* @Description // 查询活动对应的点赞图标
* @Date 10:47 2018/11/21
* @Param [activityId]
* @return java.util.List<java.lang.String>
**/
List<String> getAppActivityLikeImgUrl(Integer activityId);
//指定执行的sql
//#{activityId}是collection-column 传递的参数
<!-- 查询获得东对应的点赞图标 -->
<select id="getAppActivityLikeImgUrl" resultType="java.lang.String">
SELECT like_img_url FROM app_activity_like_img WHERE activity_id = #{activityId}
</select>