首页>代码>基于ssm(spring+springmvc+mybatis)的餐厅员工管理系统>/z_sias/src/com/sias/ll/controller/AttendanceController.java
package com.sias.ll.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import com.sias.ll.pojo.Attendance; import com.sias.ll.service.AttendanceService; @Controller @RequestMapping("attendance") public class AttendanceController { @Autowired private AttendanceService attendanceService; @RequestMapping("attendance") public String showAttendance(){ return "attendance"; } //根据主键查询 @RequestMapping("/selectById") public String selectById(Model model,Integer leaveid) { Attendance attendance = attendanceService.selectByPrimaryKey(leaveid); model.addAttribute("attendance", attendance); return "UpdateAttendance"; } //查询所有员工信息 @RequestMapping("/selectAll") public String selectAllattendance(Model model) { List<Attendance> attendances = attendanceService.selectAll(); model.addAttribute("attendances", attendances); return "ShowAttendance"; } //模糊查询 @RequestMapping("/selectName") public List<Attendance> selectByName(String name) { List<Attendance> attendances = attendanceService.selectByName(name); return attendances; } //添加 @RequestMapping("/insert") public String insertEmployee(Attendance attendance) { attendanceService.insertAttendance(attendance); return "attendanceRe"; } //删除 @RequestMapping("/delete") public String deleteEmployee(Integer leaveid) { attendanceService.deleteAttendance(leaveid); return "attendanceRe"; } //修改 @RequestMapping("/update") public String updateEmployee(Attendance attendance) { attendanceService.updateAttendance(attendance); return "attendanceRe"; } }
最近下载更多
海棠花瘦 LV9
2023年5月9日
LCL10086 LV3
2023年1月15日
001128wxw LV3
2022年12月15日
微信网友_6108289352863744 LV4
2022年9月16日
and123456 LV11
2022年7月15日
Hsy605 LV9
2022年6月22日
zzwwjjmm LV2
2022年6月7日
qwer123546 LV13
2022年5月12日
ferrymen LV6
2022年4月20日
591231555 LV20
2022年4月18日
最近浏览更多
13188866605 LV12
3月26日
jiangxiaohia
3月1日
暂无贡献等级
小海脑洞大开 LV11
2月4日
Camellia-while LV1
1月2日
微信网友_6786501704093696
2023年12月20日
暂无贡献等级
123456lxw
2023年12月17日
暂无贡献等级
shuangfu LV24
2023年12月2日
付怼怼
2023年11月19日
暂无贡献等级
jkjfdgbkl LV2
2023年11月2日
爽朗的凯 LV2
2023年10月30日