From ca9c670032afe8e11a69069e0c20f4b11b33bf8f Mon Sep 17 00:00:00 2001 From: wangliwen Date: Wed, 30 Nov 2022 17:57:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E8=B5=B7=E5=82=AC=E5=8A=9E=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reminders/controller/TRemindersController.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/reminders/controller/TRemindersController.java b/renren-admin/src/main/java/io/renren/modules/reminders/controller/TRemindersController.java index a00819ee..b2f7164a 100644 --- a/renren-admin/src/main/java/io/renren/modules/reminders/controller/TRemindersController.java +++ b/renren-admin/src/main/java/io/renren/modules/reminders/controller/TRemindersController.java @@ -13,6 +13,10 @@ import io.renren.common.validator.group.UpdateGroup; import io.renren.modules.reminders.dto.TRemindersDTO; import io.renren.modules.reminders.excel.TRemindersExcel; import io.renren.modules.reminders.service.TRemindersService; +import io.renren.modules.security.user.SecurityUser; +import io.renren.modules.security.user.UserDetail; +import io.renren.modules.sys.dto.SysUserDTO; +import io.renren.modules.sys.service.SysUserService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -39,6 +43,9 @@ public class TRemindersController { @Autowired private TRemindersService tRemindersService; + @Autowired + private SysUserService sysUserService; + @GetMapping("page") @ApiOperation("分页") @ApiImplicitParams({ @@ -65,11 +72,12 @@ public class TRemindersController { @ApiOperation("保存") @LogOperation("保存") public Result save(@RequestBody TRemindersDTO dto) { + UserDetail user = SecurityUser.getUser(); + SysUserDTO userDTO = sysUserService.get(user.getId()); + dto.setRecipient(userDTO); //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - tRemindersService.save(dto); - return new Result(); }