package com.yeejoin.amos.boot.module.hygf.api.mapper;

import com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower;
import com.yeejoin.amos.boot.module.hygf.api.dto.MaintenanceDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.Maintenance;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * 运维人员 Mapper 接口
 *
 * @author system_generator
 * @date 2024-03-11
 */
public interface MaintenanceMapper extends BaseMapper<Maintenance> {


    public  void updateTraining(String userId);

    public  void updateTrainingAgreement(String userId);

    //验证平台手机号验证平台账号

    public Integer selectauthLogininfo(@Param("telephone")String telephone,@Param("adminLoginName")String adminLoginName);

    //验证运维人员手机号账号

    public Integer selectMaintenance(@Param("telephone")String telephone,@Param("adminLoginName")String adminLoginName);

    //列表
   // @UserEmpower(field ={"ph.regional_companies_code"} ,fieldConditions ={"in"} ,relationship="and")
    List<MaintenanceDto> Maintenancepage(@Param("name")String name, @Param("maintenanceTypeCode")String maintenanceTypeCode,
                                         @Param("lockStatus")String lockStatus, @Param("reviewStatus")String reviewStatus,
                                         @Param("regionalCompaniesSeq")Long regionalCompaniesSeq, @Param("dealerId") Long dealerId,@Param("maintenanceType")String maintenanceType,
                                         @Param("maintenanceAreaAddress")String maintenanceAreaAddress,
                                         @Param("regionalCompaniesCode")String regionalCompaniesCode, @Param("dealerCode") String dealerCode);


    //详情
    MaintenanceDto  selectOneById( @Param("sequenceNbr")Long sequenceNbr  );


    //验证账号是否签协议

    MaintenanceDto getTrainingAgreement( @Param("userId")String userId  );

    List<MaintenanceDto> queryList(
            @Param("name")String name, //运维人员类型
            @Param("maintenanceType")String maintenanceType //运维人员类型code
    );
}
