| package com.matrix.system.hive.service.imp; | 
|   | 
| import com.matrix.core.pojo.PaginationVO; | 
| import com.matrix.system.hive.bean.ServiceRecord; | 
| import com.matrix.system.hive.dao.ServiceRecordDao; | 
| import com.matrix.system.hive.service.ServiceRecordService; | 
| import org.springframework.beans.factory.annotation.Autowired; | 
| import org.springframework.stereotype.Service; | 
|   | 
| import java.util.List; | 
|   | 
|   | 
|   | 
| /** | 
|  * | 
|  * @date 2016-08-06 16:15 | 
|  */ | 
| @Service("serviceRecordService") | 
| public class  ServiceRecordServiceImpl implements ServiceRecordService { | 
|   | 
|      | 
|     @Autowired | 
|     private ServiceRecordDao serviceRecordDao; | 
|      | 
|      | 
|     @Override | 
|     public int add(ServiceRecord serviceRecord){ | 
| //        Date now=new Date(); | 
| //        if(DateUtil.isAffterDate( serviceRecord.getCreateTime(),now)){ | 
| //            throw new GlobleException("跟进时间必须大于当前时间"); | 
| //        } | 
|   | 
|         return serviceRecordDao.insert(serviceRecord); | 
|     } | 
|         | 
|     @Override | 
|     public int modify(ServiceRecord serviceRecord){ | 
|      | 
|         return serviceRecordDao.update(serviceRecord); | 
|      | 
|     } | 
|      | 
|     @Override | 
|     public int remove(List<Long> list){ | 
|      | 
|         return serviceRecordDao.deleteByIds(list); | 
|      | 
|     } | 
|   | 
|     @Override | 
|     public int removeById(Long id){ | 
|      | 
|         return serviceRecordDao.deleteById(id); | 
|      | 
|     } | 
|      | 
|     @Override | 
|     public List<ServiceRecord> findInPage(ServiceRecord serviceRecord,  PaginationVO pageVo){ | 
|      | 
|         return serviceRecordDao.selectInPage(serviceRecord , pageVo); | 
|      | 
|     } | 
|      | 
|     @Override | 
|     public List<ServiceRecord> findByModel(ServiceRecord serviceRecord){ | 
|      | 
|         return serviceRecordDao.selectByModel(serviceRecord); | 
|      | 
|     } | 
|      | 
|     @Override | 
|     public int  findTotal(ServiceRecord serviceRecord){ | 
|      | 
|         return serviceRecordDao.selectTotalRecord(serviceRecord); | 
|      | 
|     } | 
|      | 
|     @Override | 
|     public ServiceRecord  findById(Long id){ | 
|      | 
|         return serviceRecordDao.selectById(id); | 
|      | 
|     } | 
|   | 
|         | 
|      | 
|      | 
| } |