| | |
| | | * 返回特定时期的个人自传 |
| | | */ |
| | | @GetMapping("/byTerm") |
| | | public AjaxResult listByTerm(@PathParam("termId")Integer termId){ |
| | | public AjaxResult listByTerm(@PathParam("term")String term){ |
| | | SysUser user = SecurityUtils.getLoginUser().getUser(); |
| | | Long userId = user.getUserId(); |
| | | List<ZAutobiography> zAutobiographys=zAutobiographyService.listByTerm(userId,termId); |
| | | List<ZAutobiography> zAutobiographys=zAutobiographyService.listByTerm(userId,term); |
| | | return AjaxResult.success(zAutobiographys); |
| | | } |
| | | |
| | |
| | | // } |
| | | |
| | | /** |
| | | * 新增或者修改个人自传记录 |
| | | * 新增个人自传记录 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:property:add')") |
| | | @Log(title = "个人自传记录", businessType = BusinessType.INSERT) |
| | |
| | | SysUser user = SecurityUtils.getLoginUser().getUser(); |
| | | Long userId = user.getUserId(); |
| | | zAutobiography.setUserId(userId); |
| | | return toAjax(zAutobiographyService.saveOrUpdate(zAutobiography)); |
| | | return toAjax(zAutobiographyService.save(zAutobiography)); |
| | | } |
| | | |
| | | // /** |
| | | // * 修改个人自传记录 |
| | | // */ |
| | | //// @PreAuthorize("@ss.hasPermi('system:property:edit')") |
| | | // @Log(title = "个人自传记录", businessType = BusinessType.UPDATE) |
| | | // @PutMapping |
| | | // public AjaxResult edit(@RequestBody ZAutobiography zAutobiography) |
| | | // { |
| | | // return toAjax(zAutobiographyService.updateById(zAutobiography)); |
| | | // } |
| | | /** |
| | | * 修改个人自传记录 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:property:edit')") |
| | | @Log(title = "个人自传记录", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ZAutobiography zAutobiography) |
| | | { |
| | | return toAjax(zAutobiographyService.updateById(zAutobiography)); |
| | | } |
| | | // |
| | | /** |
| | | * 批量删除个人自传记录 |