Jinquan_Ou
2023-03-30 27d48268c5384c8e809c2d37f3da851e92d96c3a
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZInfoUserController.java
@@ -54,8 +54,7 @@
//    @PreAuthorize("@ss.hasPermi('system:property:export')")
    @Log(title = "个人详细信息记录", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, ZInfoUser zInfoUser)
    {
    public void export(HttpServletResponse response, ZInfoUser zInfoUser) {
        SysUser user = SecurityUtils.getLoginUser().getUser();
        Long userId = user.getUserId();
        zInfoUser.setUserId(userId);
@@ -70,8 +69,7 @@
     */
    @Log(title = "用户管理", businessType = BusinessType.IMPORT)
    @PostMapping("/importData")
    public AjaxResult importData(@RequestParam("excelImport") MultipartFile file) throws Exception
    {
    public AjaxResult importData(@RequestParam("excelImport") MultipartFile file) throws Exception {
        SysUser user = SecurityUtils.getLoginUser().getUser();
        Long userId = user.getUserId();
        ExcelUtil<ZInfoUser> util = new ExcelUtil<>(ZInfoUser.class);
@@ -96,21 +94,21 @@
     */
//    @PreAuthorize("@ss.hasPermi('system:property:query')")
    @GetMapping()
    public AjaxResult getInfo()
    {
    public AjaxResult getInfo() {
        SysUser user = SecurityUtils.getLoginUser().getUser();
        Long userId = user.getUserId();
        return success(zInfoUserService.getById(userId));
        return AjaxResult.success(zInfoUserService.getById(userId));
    }
//
    /**
     * 新增、修改个人详细信息记录
     */
//    @PreAuthorize("@ss.hasPermi('system:property:add')")
    @Log(title = "个人详细信息记录", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody ZInfoUser zInfoUser)
    {
    public AjaxResult add(@RequestBody ZInfoUser zInfoUser) {
        SysUser user = SecurityUtils.getLoginUser().getUser();
        Long userId = user.getUserId();
        zInfoUser.setUserId(userId);
@@ -128,14 +126,14 @@
//        return toAjax(zInfoUserService.updateById(zInfoUser));
//    }
//
    /**
     * 删除个人详细信息记录
     */
//    @PreAuthorize("@ss.hasPermi('system:property:remove')")
    @Log(title = "个人详细信息记录", businessType = BusinessType.DELETE)
    @DeleteMapping()
    public AjaxResult remove()
    {
    public AjaxResult remove() {
        SysUser user = SecurityUtils.getLoginUser().getUser();
        Long userId = user.getUserId();
        return toAjax(zInfoUserService.removeById(userId));
@@ -152,9 +150,6 @@
        Long userId = user.getUserId();
        return zInfoUserService.searchMyRelation(userId);
    }
}