package com.xxfc.platform.user.behavior.mapper;

import com.xxfc.platform.user.behavior.dto.ActivityBehaviorRelationDTO;
import com.xxfc.platform.user.behavior.entity.ActivityBehaviorRelation;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * @author libin
 * @version 1.0
 * @description
 * @data 2019/8/13 17:11
 */
public interface ActivityBehaviorRelationMapper extends Mapper<ActivityBehaviorRelation> {

    @Select("select `type`,`biz_id`,`activity_id` from `activity_behavior_relation` where `activity_id`=#{activityId}")
    @Results(value = {
            @Result(property = "type",column = "type"),
            @Result(property = "bizId",column = "biz_id"),
            @Result(property = "activityId",column = "activity_id")
    })
    List<ActivityBehaviorRelationDTO> selectAllByActivityId(@Param("activityId") Integer activityId);
}
