package com.sptg.estate.biz.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.sptg.estate.api.entity.ServerUserDetail;
import com.sptg.estate.biz.mapper.ServerUserDetailMapper;
import com.sptg.estate.biz.service.ServerUserDetailServiceInterface;
import org.springframework.stereotype.Service;

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

/**
 * title: ServerUserDetailServiceImpl
 * package: com.sptg.estate.biz.service.impl
 * description: 服务人员管理接口实现类
 *
 *             
 *                
 */
@Service
public class ServerUserDetailServiceImpl extends ServiceImpl<ServerUserDetailMapper, ServerUserDetail> implements ServerUserDetailServiceInterface {


    @Override
    public List<ServerUserDetail> findServerUserDetailList(long serverUserId) {
        EntityWrapper<ServerUserDetail> wrapper = new EntityWrapper<>();
        wrapper.eq("l_server_user_id",serverUserId);
        return this.selectList(wrapper);
    }

    @Override
    public boolean deleteByServerUserId(long serverUserId) {
        Map<String,Object> map = new HashMap<>(1);
        map.put("l_server_user_id",serverUserId);
        return this.deleteByMap(map);
    }
}
