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

import com.duowenlvshi.duowenlszp.model.Push.entity.Push;
import com.duowenlvshi.duowenlszp.app.util.UUIDUtil;
import com.duowenlvshi.duowenlszp.model.Push.dao.PushMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

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

/**
 * @author yang fang yu
 * @since 2019/8/27 11:42
 */
@Service
public class PushServer {
    @Autowired(required = false)
    PushMapper pushMapper;
    /**
     * 保存推送名单
     * */
    public int save(Push pash){
        pash.setPushId(UUIDUtil.GetUUID());
        pash.setCreatedate(new Date());
        pash.setUpdatedate(new Date());
        pash.setIsvalid("1");
        int i =pushMapper.insertSelective(pash);
        return i;
    }
    /**
     * 查询精准推送岗位列表
     * */
    public List<Map> selectByLawyerIdBList(Map map1){
        return pushMapper.selectByLawyerIdBList(map1);
    }
    public int insertMessage(Map map){
        return pushMapper.insertMessage(map);
    }

    public Integer selectByLawyerIdBListCount(String lawyerIdb){
        return pushMapper.selectByLawyerIdBListCount(lawyerIdb);
    }
    public Date selectNewTime(String selectNewTime){
        return pushMapper.selectNewTime(selectNewTime);
    }

}
