package com.autumnframework.common.dao.bomapper;

import com.autumnframework.common.model.po.Plugin;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface PluginMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table af_plugin
     *
     * @mbg.generated Mon Oct 30 21:05:07 CST 2017
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table af_plugin
     *
     * @mbg.generated Mon Oct 30 21:05:07 CST 2017
     */
    int insert(Plugin record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table af_plugin
     *
     * @mbg.generated Mon Oct 30 21:05:07 CST 2017
     */
    int insertSelective(Plugin record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table af_plugin
     *
     * @mbg.generated Mon Oct 30 21:05:07 CST 2017
     */
    Plugin selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table af_plugin
     *
     * @mbg.generated Mon Oct 30 21:05:07 CST 2017
     */
    int updateByPrimaryKeySelective(Plugin record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table af_plugin
     *
     * @mbg.generated Mon Oct 30 21:05:07 CST 2017
     */
    int updateByPrimaryKey(Plugin record);

    /**
     *
     * @return
     */
    List<Plugin> selectAllStatus1Plugin();

    /**
     * 根据用户id获取插件
     * @param userId
     * @return
     */
    List<Plugin> selectPluginByUserId(@Param("userId") Integer userId);
}