zqy
5 天以前 b02beccf4567068cb47a3f1181a00039456c872d
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZAutobiographyController.java
@@ -52,10 +52,10 @@
     * 返回特定时期的个人自传
     */
    @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);
    }
@@ -95,7 +95,7 @@
//    }
    /**
     * 新增或者修改个人自传记录
     * 新增个人自传记录
     */
//    @PreAuthorize("@ss.hasPermi('system:property:add')")
    @Log(title = "个人自传记录", businessType = BusinessType.INSERT)
@@ -105,19 +105,19 @@
        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));
    }
//
    /**
     * 批量删除个人自传记录