123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- package com.ygj.yuemum.service.customer;
- import com.github.pagehelper.PageHelper;
- import com.ygj.yuemum.dao.customer.CustomerInfoBasicDao;
- import com.ygj.yuemum.domain.customer.CustomerInfoBasic;
- import com.ygj.yuemum.domain.customer.dto.CustomerInfoBasicDto;
- import org.springframework.stereotype.Service;
- import javax.annotation.Resource;
- import java.util.HashMap;
- import java.util.List;
- import java.util.Map;
- /**
- * customer_info_basic
- * @author zrz
- * @date 2020/06/17
- */
- @Service
- public class CustomerInfoBasicService {
- @Resource
- private CustomerInfoBasicDao customerInfoBasicDao;
- public int insert(CustomerInfoBasic customerInfoBasic) {
- return customerInfoBasicDao.insert(customerInfoBasic);
- }
- public int delete(int id) {
- int ret = customerInfoBasicDao.delete(id);
- return ret;
- }
- public int update(CustomerInfoBasic customerInfoBasic) {
- int ret = customerInfoBasicDao.update(customerInfoBasic);
- return ret;
- }
- public CustomerInfoBasic load(int id) {
- return customerInfoBasicDao.load(id);
- }
- public Map<String,Object> pageList(int offset, int pagesize) {
- List<CustomerInfoBasic> pageList = customerInfoBasicDao.pageList(offset, pagesize);
- int totalCount = customerInfoBasicDao.pageListCount(offset, pagesize);
- // result
- Map<String, Object> result = new HashMap<String, Object>();
- result.put("pageList", pageList);
- result.put("totalCount", totalCount);
- return result;
- }
- public List<CustomerInfoBasic> selectByPageNumSize(CustomerInfoBasicDto customerInfoBasic) {
- PageHelper.startPage(customerInfoBasic.getPage(), customerInfoBasic.getLimit());
- return customerInfoBasicDao.selectByPageNumSize(customerInfoBasic);
- }
- }
|