package com.github.wxiaoqi.security.admin.mapper;

import com.github.wxiaoqi.security.admin.entity.AppShareholderDetail;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * @author zuoyihang
 * @version 1.0
 * @description
 * @data 2019/12/21 18:30
 */
public interface AppShareholderDetailMapper extends Mapper<AppShareholderDetail> {

    Integer selectShareHolderByUserIdOrPhone(@Param("userId") Integer userId,
                                             @Param("phone") String phone);


    List<AppShareholderDetail> findPage(@Param("name") String name,
                                        @Param("phone") String phone,
                                        @Param("positionId") Integer positionId,
                                        @Param("companyId") Integer companyId);


    void updShareHolderIsQuit(@Param("phone") String phone, @Param("companyId") Integer companyId,@Param("isQuit") Integer isQuit);

    Integer selectMaxShareHolderByUserIdOrPhone(
            @Param("phone") String phone,
            @Param("userId") Integer userId);
}
