package com.lzl.service;
import com.github.pagehelper.PageInfo;
import com.lzl.pojo.Mingxi;
import com.lzl.pojo.Wuliao;
public interface MingxiService {
PageInfo<Mingxi> select(Integer pageNum, Integer pageSize,String ctime1, String ctime2, String cqid, String cname,
String ctel);
void addWuliao(Wuliao wuliao);
void addMingxi(Mingxi mingxi);
}
------------------------------------
package com.lzl.service.impl;
import java.util.List;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.lzl.dao.MingxiDao;
import com.lzl.pojo.Mingxi;
import com.lzl.pojo.Wuliao;
import com.lzl.service.MingxiService;
@Service
public class MingxiServiceImpl implements MingxiService {
@Autowired
MingxiDao dao;
@Override
public PageInfo<Mingxi> select(Integer pageNum, Integer pageSize,String ctime1, String ctime2,
String cqid, String cname, String ctel) {
PageHelper.startPage(pageNum, pageSize);
List<Mingxi> list = dao.select(ctime1,ctime2,cqid,cname,ctel);
return new PageInfo<Mingxi>(list);
}
@Override
public void addWuliao(Wuliao wuliao) {
// TODO Auto-generated method stub
dao.addWuliao(wuliao);
}
@Override
public void addMingxi(Mingxi mingxi) {
// TODO Auto-generated method stub
dao.addMingxi(mingxi);
}
}