📄 placeservice.java.svn-base
字号:
package cn.kmp.accommodation.service;
import com.littleQworks.commons.dao.ibatis.spring.CommonDaoGenericImpl;
import java.util.*;
import cn.kmp.accommodation.domain.*;
public class PlaceService {
private CommonDaoGenericImpl commonDao;
public CommonDaoGenericImpl getCommonDao() {
return commonDao;
}
public void setCommonDao(CommonDaoGenericImpl commonDao) {
this.commonDao = commonDao;
}
public Place getPlaceById(int placeNum,int departmentNum,int type,int roomNum){
HashMap<String,Object> hashmap=new HashMap<String,Object>();
hashmap.put("placeNum",placeNum);
hashmap.put("departmentNum",departmentNum);
hashmap.put("type",type);
hashmap.put("roomNum",roomNum);
return commonDao.getByParamter(hashmap, "getPlaceById");
}
public List<Place> getPlacesByMonthRentOrder(){
return commonDao.getList("getPlacesByMonthRentOrder");
}
public List<Place> getPlacesByDepartmentNumAndType(int departmentNum,int type){
HashMap<String,Object> hashmap=new HashMap<String,Object>();
hashmap.put("departmentNum",departmentNum);
hashmap.put("type",type);
return commonDao.getListByParameter(hashmap, "getPlacesByDepartmentNumAndType");
}
public double getHallAvgMonthRent(){
return commonDao.get("getHallAvgMonthRent");
}
public boolean updatePlace(Place p){
return commonDao.updateByParameter(p, "updatePlace");
}
public boolean deletePlaceById(int placeNum,int type,int departmentNum,int roomNum){
HashMap<String,Object> hashmap=new HashMap<String,Object>();
hashmap.put("placeNum",placeNum);
hashmap.put("departmentNum",departmentNum);
hashmap.put("type",type);
hashmap.put("roomNum",roomNum);
return commonDao.deleteByParameter(hashmap, "deletePlaceById");
}
public boolean insertPlace(Place p){
return commonDao.insertByParameter(p, "insertPlace");
}
public List<Place> searchPlace(int departmentNum,int type,int roomNum){
HashMap<String,Object> hashmap=new HashMap<String,Object>();
hashmap.put("departmentNum",departmentNum);
hashmap.put("type",type);
hashmap.put("roomNum",roomNum);
return commonDao.getListByParameter(hashmap, "searchPlace");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -