use of org.springframework.web.bind.annotation.GetMapping in project tesla by linking12.
the class MenuController method edit.
@Log("编辑菜单")
@RequiresPermissions("sys:menu:edit")
@GetMapping("/edit/{id}")
String edit(Model model, @PathVariable("id") Long id) {
MenuDO mdo = menuService.get(id);
Long pId = mdo.getParentId();
model.addAttribute("pId", pId);
if (pId == 0) {
model.addAttribute("pName", "根目录");
} else {
model.addAttribute("pName", menuService.get(pId).getName());
}
model.addAttribute("menu", mdo);
return prefix + "/edit";
}
use of org.springframework.web.bind.annotation.GetMapping in project tesla by linking12.
the class Oauth2Controller method listTokens.
@ResponseBody
@GetMapping("/listToken")
@RequiresPermissions("sys:oauth2:listToken")
PageDO<AccessToken> listTokens(@RequestParam Map<String, Object> params) {
Query query = new Query(params);
PageDO<AccessToken> page = oauth2Service.queryTokenList(query);
return page;
}
use of org.springframework.web.bind.annotation.GetMapping in project tesla by linking12.
the class UserController method list.
@GetMapping("/list")
@ResponseBody
Pageable list(@RequestParam Map<String, Object> params) {
// 查询列表数据
Query query = new Query(params);
List<UserDO> sysUserList = userService.list(query);
int total = userService.count(query);
Pageable pageUtil = new Pageable(sysUserList, total);
return pageUtil;
}
use of org.springframework.web.bind.annotation.GetMapping in project tesla by linking12.
the class UserController method edit.
@RequiresPermissions("sys:user:edit")
@Log("编辑用户")
@GetMapping("/edit/{id}")
String edit(Model model, @PathVariable("id") Long id) {
UserDO userDO = userService.get(id);
model.addAttribute("user", userDO);
List<RoleDO> roles = roleService.list(id);
model.addAttribute("roles", roles);
return prefix + "/edit";
}
use of org.springframework.web.bind.annotation.GetMapping in project zhcet-web by zhcet-amu.
the class StudentAttendanceController method attendance.
@GetMapping
public String attendance(Model model) {
Student student = studentService.getLoggedInStudent().orElseThrow(StudentNotFoundException::new);
model.addAttribute("page_title", "Attendance");
model.addAttribute("page_subtitle", "Attendance Panel for " + student.getEnrolmentNumber() + " | " + student.getUser().getName());
model.addAttribute("page_description", "View attendance of floated courses this session");
model.addAttribute("attendances", attendanceService.getAttendanceByStudent(student));
return "student/attendance";
}
Aggregations