package com.xxfc.platform.im.repos;

        import com.xxfc.platform.im.entity.CustomerService;
        import org.springframework.data.mongodb.repository.MongoRepository;
        import org.springframework.data.mongodb.repository.Query;
        import org.springframework.stereotype.Repository;

        import java.util.List;

/**
 * @author libin
 * @version 1.0
 * @description
 * @data 2019/9/5 10:55
 */
@Repository
public interface CustomerServiceRepository extends MongoRepository<CustomerService,String> {

    /**
     * 查询客服
     * * @param isDel 删除状态
     * @return
     */
    List<CustomerService> findByIsDelEquals(Boolean isDel);
    List<CustomerService> findByIsDel(Boolean isDel);
    //    @Query(value = "{'is_del':?0}",fields ="{'telphone':1}",sort = "{'create_time':-1}")
    @Query(value = "{'is_del':?#{[0]}}",fields ="{'name':1}",sort = "{'create_time':-1}")
    List<CustomerService> findByIsDelState(Boolean isDel);

}
