package com.xhkjedu.sapi.mapper.research;

import com.xhkjedu.sapi.base.TkMapper;
import com.xhkjedu.sapi.model.research.TResearchUser;
import com.xhkjedu.sapi.vo.research.ResearchUserVo;
import com.xhkjedu.sapi.vo.research.ResearchVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ClassName ResearchUserMapper
 * Description 教研用户
 * Author WN
 * Date 2020/6/11 18:05
 **/
@Repository
public interface ResearchUserMapper extends TkMapper<TResearchUser> {

    /**
     *功能描述  批量保存教研用户
     * @author WN
     * @date 2020/6/11
     * @param  * @param list
     * @return void
     */
    void saveBatchResearchUser(@Param("list") List<TResearchUser> list);

    /**
     *功能描述 删除--教研用户
     * @author WN
     * @date 2020/6/11
     * @param  * @param researchid
     * @return void
     */
    void delByResearchid(@Param("researchid") Integer researchid);

    /**
     *功能描述 参与教研所有用户id集合
     * @author WN
     * @date 2020/6/12
     * @param  * @param researchid
     * @return java.util.List<com.xhkjedu.model.research.TResearchUser>
     */
    List<TResearchUser> listRuserIdByResearchid(@Param("researchid") Integer researchid);

    /**
     *功能描述 教研参与评论集合
     * @author WN
     * @date 2020/6/11
     * @param  * @param researchid
     * @return java.util.List<com.xhkjedu.model.research.TResearchUser>
     */
    List<TResearchUser> listRusersByReaearchid(@Param("researchid") Integer researchid);


    /**
     *功能描述 教师--参与教研集合
     * @author WN
     * @date 2020/6/12
     * @param  * @param userid
     * @param rorder
     * @return java.util.List<com.xhkjedu.vo.research.ResearchVo>
     */
    List<ResearchVo> listUserResearchs(@Param("userid") Integer userid, @Param("rorder") String rorder, @Param("rustate") Integer rustate);

    /**
     *功能描述 教师--教研详情
     * @author WN
     * @date 2020/6/12
     * @param  * @param researchid
     * @param userid
     * @return com.xhkjedu.vo.research.ResearchUserVo
     */
    ResearchUserVo getResearchUserDetail(@Param("researchid") Integer researchid, @Param("userid") Integer userid);

    /**
     *功能描述  教师--保存评价
     * @author WN
     * @date 2020/6/12
     * @param  * @param ru
     * @return java.lang.Integer
     */
    Integer updateUserResearch(@Param("ru") TResearchUser ru);

    /**
     * 其他教研活动列表
     * @Param [research]
     * @Author ywx
     * @Date 2020/6/23 14:24
     * @return java.util.List<com.xhkjedu.vo.research.ResearchVo>
     **/
    List<ResearchVo> otherList(@Param("research") TResearchUser research);

    /**
     * 教师未评价教研数量
     * @Param [userid]
     * @Author ywx
     * @Date 2020/7/24 10:45
     * @return java.lang.Integer
     **/
    Integer noEvaluatedNum(Integer userid);
}
