Merge branch 'master' into docker_package
This commit is contained in:
commit
d2dcacd3a0
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue