1、bug#565 登录校验优化;2、发送短信只在修改手机时校验用户登录;

This commit is contained in:
gaoqr
2024-10-15 17:44:57 +08:00
parent fb7f1575e2
commit 1c3dcab0db
4 changed files with 10 additions and 6 deletions
@@ -42,6 +42,7 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.io.OutputStream;
import java.util.HashMap;
@@ -106,7 +107,7 @@ public class ReportTemplateController {
@GetMapping("/templates")
@Operation(summary = "获取报表模板信息列表")
@PreAuthorize("@ss.hasPermission('report:design')")
public CommonResult<List<ReportTemplateRespVO>> getTemplatePage(@RequestParam(value = "name", required = false) String name) {
public CommonResult<List<ReportTemplateRespVO>> getTemplatePage(@RequestParam(value = "name", required = false) @Size(max = 64, message = "模板名称长度不能超过64个字符") String name) {
ReportTemplateReqVO reqVO = new ReportTemplateReqVO(name, null);
return success(BeanUtils.toBean(templateService.getReportTemplateList(reqVO), ReportTemplateRespVO.class));
}
@@ -8,6 +8,7 @@ import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.Set;
/**
@@ -33,11 +34,14 @@ public class ReportTemplateSaveReqVO {
private String content;
@Schema(description = "备注", example = "该模板仅供生产使用")
@Length(max = 64, message = "备注长度不能超过64个字符")
private String remark;
@Schema(description = "数据源id列表")
@Size(max = 20, message = "数据源数量不能超过20个")
private Set<Long> datasourceIds;
@Schema(description = "数据集id列表")
@Size(max = 20, message = "数据集数量不能超过20个")
private Set<Long> datasetIds;
}