package com.duowenlvshi.duowenlszp.model.lawyer.server;

import com.duowenlvshi.duowenlszp.model.lawyer.entity.Lawyer;
import com.duowenlvshi.duowenlszp.model.lawyer.dao.LawyerMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;


/**
 * @author yang fang yu
 * @since 2019/8/20 13:49
 */
@Service
public class LawyerServer {
    @Autowired(required = false)
    LawyerMapper lawyerMapper;
    /**
     * 根据id查询律师主体信息
     * */
    public Lawyer selectLawyer(String id){
        return lawyerMapper.selectByPrimaryKey(id);
    }

    /**
     * 查询身份证号
     * */
    public String selectSex(String id){
        return lawyerMapper.selectSex(id);
    }
    /**
     * 查询华为pushToken
     * */
    public Map selectPushToken(String id){
        return lawyerMapper.selectPushToken(id);
    }

    /**
     * 查询手机类型
     * */
    public String selectDeviceType(String id){
        return lawyerMapper.selectDeviceType(id);
    }

    /**
     * 查询律师名字
     * */
    public Map selectName(String id){
        return lawyerMapper.selectName(id);
    }

    /**
     * 设置背景图
     * */
    public int updateBackgroundMap(Map map){
        return lawyerMapper.updateBackgroundMap(map);
    }
    /**
     * 查看背景图
     * */
    public String selectBackgroundMap(Map map){
        return lawyerMapper.selectBackgroundMap(map);
    }
}
