Skip to content

Commit

Permalink
🐛导入新建修改时校验国际化标识不允许为空
Browse files Browse the repository at this point in the history
  • Loading branch information
evil0th authored and Hccake committed Apr 30, 2024
1 parent dc3fe00 commit f5900d8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package org.ballcat.business.i18n.model.dto;

import javax.validation.constraints.NotEmpty;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

Expand All @@ -33,18 +35,21 @@ public class I18nDataDTO {
/**
* 语言标签
*/
@NotEmpty(message = "{i18nMessage.message}:{}")
@Schema(title = "语言标签")
private String languageTag;

/**
* 唯一标识 = 业务:关键词
*/
@NotEmpty(message = "{i18nMessage.message}:{}")
@Schema(title = "唯一标识 = 业务:关键词")
private String code;

/**
* 文本值,可以使用 { } 加角标,作为占位符
*/
@NotEmpty(message = "{i18nMessage.message}:{}")
@Schema(title = "文本值,可以使用 { } 加角标,作为占位符")
private String message;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package org.ballcat.business.i18n.model.vo;

import javax.validation.constraints.NotEmpty;

import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
Expand All @@ -34,20 +36,23 @@ public class I18nDataExcelVO {
/**
* 语言标签
*/
@NotEmpty(message = "{i18nMessage.message}:{}")
@ExcelProperty(value = "{i18nMessage.languageTag}", index = 0)
@Schema(title = "语言标签")
private String languageTag;

/**
* 国际化标识
*/
@NotEmpty(message = "{i18nMessage.message}:{}")
@ExcelProperty(value = "{i18nMessage.code}", index = 1)
@Schema(title = "国际化标识")
private String code;

/**
* 文本值,可以使用 { } 加角标,作为占位符
*/
@NotEmpty(message = "{i18nMessage.message}:{}")
@ExcelProperty(value = "{i18nMessage.message}", index = 2)
@Schema(title = "文本值,可以使用 { } 加角标,作为占位符")
private String message;
Expand Down

0 comments on commit f5900d8

Please sign in to comment.