From cef87e5c90c5551df2f98047e113530d79270e9f Mon Sep 17 00:00:00 2001 From: 44323 <443237572@qq.com> Date: 星期三, 17 一月 2024 14:30:51 +0800 Subject: [PATCH] 修改附近方圆报错 --- guns-management/src/main/java/com/stylefeng/guns/modular/code/controller/HostController.java | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/guns-management/src/main/java/com/stylefeng/guns/modular/code/controller/HostController.java b/guns-management/src/main/java/com/stylefeng/guns/modular/code/controller/HostController.java index f39ab26..2b89c0a 100644 --- a/guns-management/src/main/java/com/stylefeng/guns/modular/code/controller/HostController.java +++ b/guns-management/src/main/java/com/stylefeng/guns/modular/code/controller/HostController.java @@ -53,6 +53,12 @@ @ApiOperation(value = "编辑前获取用户信息", tags = {"后台-用户管理"}) public Host preupdate(Integer id){ AppUser appUser = appUserService.selectById(id); + if (appUser.getWatchApp1()!=null){ + appUser.setWatchApp(appUser.getWatchApp1()); + } + if (appUser.getWechatQrCode1()!=null){ + appUser.setWechatQRCode(appUser.getWechatQrCode1()); + } Host host = new Host(); BeanUtils.copyProperties(appUser,host); return host; @@ -64,7 +70,10 @@ @ApiOperation(value = "编辑用户信息", tags = {"后台-用户管理"}) public ResultUtil update(@RequestBody Host host){ AppUser appUser =new AppUser(); + BeanUtils.copyProperties(host,appUser); + appUser.setWechatQrCode1(host.getWechatQRCode()); + appUser.setWatchApp1(host.getWatchApp()); appUserService.updateById(appUser); return ResultUtil.success("编辑成功"); } -- Gitblit v1.7.1