📄 sw4101serviceimpl.java
字号:
package jp.com.cost.sw.service.impl;
import java.util.List;
import jp.com.cost.dao.BookDao;
import jp.com.cost.pojo.Book;
import jp.com.cost.sw.entity.SW4101ViewEntity1List;
import jp.com.cost.sw.service.SW4101Service;
import jp.com.cost.sw.web.form.SW4102Form;
public class SW4101ServiceImpl implements SW4101Service{
private BookDao bookDao;
public BookDao getBookDao() {
return bookDao;
}
public void setBookDao(BookDao bookDao) {
this.bookDao = bookDao;
}
//调用 BookDao 的 findSWGLAll() 方法
public List<SW4101ViewEntity1List> searchAll() {
List<SW4101ViewEntity1List> list = bookDao.findSWGLAll();
return list;
}
public List<SW4101ViewEntity1List> searchByCon(String id){
List<SW4101ViewEntity1List> list = bookDao.findSWGLByCon(id);
return list;
}
public SW4102Form searchById(String id) {
SW4102Form sw4102form = new SW4102Form();
Book book = bookDao.findSWGLById(id);
sw4102form.setDealCost(book.getDealcost());
sw4102form.setWeight(book.getWeight());
sw4102form.setGain(book.getDealcost()-book.getPayrate());
sw4102form.setId(book.getId());
sw4102form.setPayRate(book.getPayrate());
sw4102form.setSendPeron(book.getSendperon());
sw4102form.setShipCName(book.getShipcname());
return sw4102form;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -