码迷,mamicode.com
首页 > 其他好文 > 详细

双向表-service+impl

时间:2020-05-27 12:24:43      阅读:64      评论:0      收藏:0      [点我收藏+]

标签:ati   ram   poj   git   ack   cti   inf   addm   return   

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);
}

}

双向表-service+impl

标签:ati   ram   poj   git   ack   cti   inf   addm   return   

原文地址:https://www.cnblogs.com/liuzhaolong/p/12971435.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!