/**
* 根据用户id和部门的id来查询一条记录
* @param userid
* @param deptid
* @return
*/
public Map<String,String> load(String userid,String deptid) ;
@SuppressWarnings("unchecked")
public Map<String,String> load(String userid, String deptid) {
String sql = " select * from qxgl_user_dept where user_id=? and dept_id=? ";
return super.getJdbcTemplate().queryForMap(sql,
new Object[] { userid, deptid });
}
==========使用=====================
Map map = deptServiceDao.loadDeptUser(userid, deptid);
if (map == null) {
addActionMessage("未找到符合条件的记录!");
} else {
// userid =(String) map.get("user_id");
// deptid = (String)map.get("dept_id");
log.debug("editDeptUser--根据部门id和用户id找到记录!");
isFirst = ((Integer) map.get("is_first")).intValue();
isLeader = ((Integer) map.get("is_leader")).intValue();
headship = (String) map.get("headship");
userFlag = (String) map.get("user_flag");
remark = (String) map.get("remark");
}