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

import com.xxfc.platform.user.behavior.dto.ActivityBehaviorDTO;
import com.xxfc.platform.user.behavior.entity.ActivityBehavior;
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 14:10
 */
public interface ActivityBehaviorMapper extends Mapper<ActivityBehavior> {
    @Select("select `activity_id`,`behavior_type_id` from `activity_behavior` where `activity_id`=#{activityId}")
    @Results(value = {
            @Result(column = "activity_id",property = "activityId"),
            @Result(column = "behavior_type_id",property = "behaviorTypeId")
    })
    List<ActivityBehaviorDTO> selectbyActivityId(@Param("activityId") Integer activityId);
}
