package com.sqx.modules.artificer.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sqx.common.utils.Result;
import com.sqx.modules.artificer.entity.Artificer;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


@Mapper
public interface ArtificerDao extends BaseMapper<Artificer> {

    IPage<Artificer> selectArtificerList(Page<Artificer> page,@Param("massageTypeId") Long massageTypeId,
                                         @Param("artificerName") String artificerName,@Param("longitude")String longitude,
                                         @Param("latitude")String latitude,@Param("sort") Integer sort,
                                         @Param("authentication") Integer authentication,@Param("by") Integer by,
                                         @Param("status") Integer status,@Param("city") String city,
                                         @Param("classifyId") Long classifyId,@Param("phone") String phone,
                                         Integer user,@Param("isStart") Integer isStart,@Param("technicianType")Integer technicianType,@Param("isBack")String isBack);

    Artificer selectArtificerById(@Param("userId") Long userId,@Param("artificerId") Long artificerId,@Param("longitude") String longitude,@Param("latitude") String latitude);

    Artificer selectArtificerByUserId(Long userId);

    int selectArtificerByStatus(Long userId, Integer status);

    IPage<Map<String,Object>> selectArtificerMoneyList(Page<Map<String,Object>> page,String startTime,String endTime,String title,String classifyId);

    IPage<Artificer> selectUserListByConsortiaId(Page<Artificer> page, String userName, String phone, Long consortiaId, Long shopId, Integer flag, String time);

    Integer selectArtificerMassageDuration(Long artificerId);

    IPage<Artificer> getHomeStartArtificerList(Page<Artificer> page,@Param("isStart")Integer isStart, @Param("status")Integer status, @Param("city")String city);

    /**
     * 查询有效技师
     * @return
     */
    List<Artificer> getYxjsList();

    List<Artificer> selectInlineList(Artificer artificer);

    Artificer selectByPhone(@Param("phone")String mobile);

    IPage<Map<String, Object>> getZxscList(Page<Object> objectPage,@Param("startTime") String startTime, @Param("endTime") String endTime);

    IPage<Map<String, Object>> getYejiList(Page<Object> objectPage,@Param("startTime") String startTime, @Param("endTime") String endTime);

    IPage<Map<String, Object>> getJzlList(Page<Object> objectPage, String startTime, String endTime);

    IPage<Map<String, Object>> getCzlList(Page<Object> objectPage, String startTime, String endTime);
}