发起催办业务

This commit is contained in:
wangliwen 2022-11-30 17:57:42 +08:00
parent 58b14ce45e
commit ca9c670032
1 changed files with 10 additions and 2 deletions

View File

@ -13,6 +13,10 @@ import io.renren.common.validator.group.UpdateGroup;
import io.renren.modules.reminders.dto.TRemindersDTO; import io.renren.modules.reminders.dto.TRemindersDTO;
import io.renren.modules.reminders.excel.TRemindersExcel; import io.renren.modules.reminders.excel.TRemindersExcel;
import io.renren.modules.reminders.service.TRemindersService; 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.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
@ -39,6 +43,9 @@ public class TRemindersController {
@Autowired @Autowired
private TRemindersService tRemindersService; private TRemindersService tRemindersService;
@Autowired
private SysUserService sysUserService;
@GetMapping("page") @GetMapping("page")
@ApiOperation("分页") @ApiOperation("分页")
@ApiImplicitParams({ @ApiImplicitParams({
@ -65,11 +72,12 @@ public class TRemindersController {
@ApiOperation("保存") @ApiOperation("保存")
@LogOperation("保存") @LogOperation("保存")
public Result save(@RequestBody TRemindersDTO dto) { 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); ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
tRemindersService.save(dto); tRemindersService.save(dto);
return new Result(); return new Result();
} }