package com.hai.service.impl; import com.hai.dao.HighAgentMapper; import com.hai.entity.HighAgent; import com.hai.entity.HighAgentExample; import com.hai.service.HighAgentService; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.List; import java.util.Map; /** * @Auther: 袁野 * @Description: * @Date: 2021/3/14 20:47 */ @Service("highAgentService") public class HighAgentServiceImpl implements HighAgentService { @Resource private HighAgentMapper highAgentMapper; @Override public List getListAgentMsg(Map map) throws Exception { HighAgentExample example = new HighAgentExample(); HighAgentExample.Criteria criteria = example.createCriteria(); if (StringUtils.isNotBlank(map.get("userName"))) { criteria.andAgentNameLike("%" + map.get("userName") + "%"); } if (StringUtils.isNotBlank(map.get("agentName"))) { criteria.andAgentNameLike("%" + map.get("agentName") + "%"); } return highAgentMapper.selectByExample(example); } @Override public HighAgent findByAgentMsgId(Long agentMsgId) { return highAgentMapper.selectByPrimaryKey(agentMsgId); } @Override public void updateAgentMsg(HighAgent highAgent) { } @Override public void insertAgentMsg(HighAgent highAgent) { } }