| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- package com.kede.visitingCustomers.service.impl;
- import java.util.HashMap;
- import java.util.Map;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Service;
- import com.kede.common.dao.VisitingCustomersMapper;
- import com.kede.common.model.VisitingCustomers;
- import com.kede.core.mybatis.BaseMybatisDao;
- import com.kede.core.mybatis.page.Pagination;
- import com.kede.recruitment.bo.OutRecruitment;
- import com.kede.visitingCustomers.bo.InputVisitingCustomers;
- import com.kede.visitingCustomers.bo.OutVisitingCustomers;
- import com.kede.visitingCustomers.service.VisitingCustomersService;
- @Service
- public class VisitingCustomersServiceImpl extends BaseMybatisDao<VisitingCustomersMapper> implements VisitingCustomersService {
-
-
- @Autowired
- private VisitingCustomersMapper visitingCustomersMapper;
-
- @Override
- public int addVisitingCustomers(VisitingCustomers vc) {
-
- return visitingCustomersMapper.insertSelective(vc);
- }
- @Override
- public int updateVisitingCustomers(VisitingCustomers vc) {
- VisitingCustomers v=new VisitingCustomers();
- v.setId(vc.getId());
- v.setStatus(vc.getStatus());
- v.setRemark(vc.getRemark());
- return visitingCustomersMapper.updateByPrimaryKeySelective(v);
- }
- @Override
- public int deleteVisitingCustomers(Integer id) {
- return visitingCustomersMapper.deleteByPrimaryKey(id);
- }
- @SuppressWarnings("unchecked")
- @Override
- public Pagination<OutVisitingCustomers> listVisitingCustomers(InputVisitingCustomers vc) {
- Map<String, Object> params=new HashMap<>();
- params.put("startTime", vc.getStartTime());
- params.put("endTime", vc.getEndTime()+" 23:59:59");
- params.put("name", vc.getName());
- return (Pagination<OutVisitingCustomers>) findPage("findVisitingCustomersList", "findVisitingCustomersCount", params, vc.getPageNo(), vc.getPageSize());
- }
- }
|