消息服务,增加异常提示信息
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
package com.chinaunicom.mall.ebtp.extend.bizmessage.dto;
|
package com.chinaunicom.mall.ebtp.extend.bizmessage.dto;
|
||||||
|
|
||||||
import org.springframework.lang.NonNull;
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@ -11,10 +11,12 @@ import lombok.Data;
|
|||||||
public class BizMessageCategoryAddDTO {
|
public class BizMessageCategoryAddDTO {
|
||||||
|
|
||||||
@ApiModelProperty(required = true, value = "类别编码")
|
@ApiModelProperty(required = true, value = "类别编码")
|
||||||
private @NonNull String code;
|
@NotEmpty(message = "类别编码不能为空")
|
||||||
|
private String code;
|
||||||
|
|
||||||
@ApiModelProperty(required = true, value = "类别名称")
|
@ApiModelProperty(required = true, value = "类别名称")
|
||||||
private @NonNull String name;
|
@NotEmpty(message = "类别名称不能为空")
|
||||||
|
private String name;
|
||||||
|
|
||||||
@ApiModelProperty("描述")
|
@ApiModelProperty("描述")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.chinaunicom.mall.ebtp.extend.bizmessage.dto;
|
package com.chinaunicom.mall.ebtp.extend.bizmessage.dto;
|
||||||
|
|
||||||
import org.springframework.lang.NonNull;
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@ -11,13 +11,16 @@ import lombok.Data;
|
|||||||
public class BizMessageCategoryUpdateDTO {
|
public class BizMessageCategoryUpdateDTO {
|
||||||
|
|
||||||
@ApiModelProperty(required = true, value = "类别id")
|
@ApiModelProperty(required = true, value = "类别id")
|
||||||
private @NonNull String id;
|
@NotEmpty(message = "类别id不能为空")
|
||||||
|
private String id;
|
||||||
|
|
||||||
@ApiModelProperty(required = true, value = "类别编码")
|
@ApiModelProperty(required = true, value = "类别编码")
|
||||||
private @NonNull String code;
|
@NotEmpty(message = "类别编码不能为空")
|
||||||
|
private String code;
|
||||||
|
|
||||||
@ApiModelProperty(required = true, value = "类别名称")
|
@ApiModelProperty(required = true, value = "类别名称")
|
||||||
private @NonNull String name;
|
@NotEmpty(message = "类别名称不能为空")
|
||||||
|
private String name;
|
||||||
|
|
||||||
@ApiModelProperty("描述")
|
@ApiModelProperty("描述")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
@ -3,8 +3,8 @@ package com.chinaunicom.mall.ebtp.extend.bizmessage.dto;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.validation.constraints.NotEmpty;
|
||||||
import javax.annotation.Nullable;
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@ -20,21 +20,26 @@ import lombok.Data;
|
|||||||
public class BizMessageRawDTO {
|
public class BizMessageRawDTO {
|
||||||
|
|
||||||
@ApiModelProperty(required = true, value = "消息标题")
|
@ApiModelProperty(required = true, value = "消息标题")
|
||||||
private @Nonnull String title;
|
@NotEmpty(message = "消息标题不能为空")
|
||||||
|
private String title;
|
||||||
|
|
||||||
@ApiModelProperty(required = true, value = "消息类别")
|
@ApiModelProperty(required = true, value = "消息类别")
|
||||||
private @Nonnull String category;
|
@NotEmpty(message = "消息类别不能为空")
|
||||||
|
private String category;
|
||||||
|
|
||||||
@ApiModelProperty(required = true, value = "消息模板编码")
|
@ApiModelProperty(required = true, value = "消息模板编码")
|
||||||
private @Nonnull String templateCode;
|
@NotEmpty(message = "消息模板编码不能为空")
|
||||||
|
private String templateCode;
|
||||||
|
|
||||||
@ApiModelProperty(required = true, value = "消息内容对象")
|
@ApiModelProperty(required = true, value = "消息内容对象")
|
||||||
private @Nonnull Map<String, Object> body;
|
@NotNull(message = "消息内容对象不能为空")
|
||||||
|
private Map<String, Object> body;
|
||||||
|
|
||||||
@ApiModelProperty(required = true, value = "消息附加参数")
|
@ApiModelProperty(required = true, value = "消息附加参数")
|
||||||
private @Nonnull Map<String, Object> extra;
|
@NotNull(message = "消息附加参数不能为空")
|
||||||
|
private Map<String, Object> extra;
|
||||||
|
|
||||||
@ApiModelProperty(required = true, value = "授权用户列表")
|
@ApiModelProperty(required = true, value = "授权用户列表")
|
||||||
private @Nullable List<String> users;
|
private List<String> users;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.chinaunicom.mall.ebtp.extend.bizmessage.dto;
|
package com.chinaunicom.mall.ebtp.extend.bizmessage.dto;
|
||||||
|
|
||||||
import org.springframework.lang.NonNull;
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@ -11,10 +11,12 @@ import lombok.Data;
|
|||||||
public class BizMessageTemplateAddDTO {
|
public class BizMessageTemplateAddDTO {
|
||||||
|
|
||||||
@ApiModelProperty(required = true, value = "模板编码")
|
@ApiModelProperty(required = true, value = "模板编码")
|
||||||
private @NonNull String code;
|
@NotEmpty(message = "模板编码不能为空")
|
||||||
|
private String code;
|
||||||
|
|
||||||
@ApiModelProperty(required = true, value = "模板内容")
|
@ApiModelProperty(required = true, value = "模板内容")
|
||||||
private @NonNull String body;
|
@NotEmpty(message = "模板内容不能为空")
|
||||||
|
private String body;
|
||||||
|
|
||||||
@ApiModelProperty("路由")
|
@ApiModelProperty("路由")
|
||||||
private String router;
|
private String router;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.chinaunicom.mall.ebtp.extend.bizmessage.dto;
|
package com.chinaunicom.mall.ebtp.extend.bizmessage.dto;
|
||||||
|
|
||||||
import org.springframework.lang.NonNull;
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@ -11,13 +11,16 @@ import lombok.Data;
|
|||||||
public class BizMessageTemplateUpdateDTO {
|
public class BizMessageTemplateUpdateDTO {
|
||||||
|
|
||||||
@ApiModelProperty(required = true, value = "模板id")
|
@ApiModelProperty(required = true, value = "模板id")
|
||||||
private @NonNull String id;
|
@NotEmpty(message = "模板id不能为空")
|
||||||
|
private String id;
|
||||||
|
|
||||||
@ApiModelProperty(required = true, value = "模板编码")
|
@ApiModelProperty(required = true, value = "模板编码")
|
||||||
private @NonNull String code;
|
@NotEmpty(message = "模板编码不能为空")
|
||||||
|
private String code;
|
||||||
|
|
||||||
@ApiModelProperty(required = true, value = "模板内容")
|
@ApiModelProperty(required = true, value = "模板内容")
|
||||||
private @NonNull String body;
|
@NotEmpty(message = "模板内容不能为空")
|
||||||
|
private String body;
|
||||||
|
|
||||||
@ApiModelProperty("路由")
|
@ApiModelProperty("路由")
|
||||||
private String router;
|
private String router;
|
||||||
|
@ -33,7 +33,7 @@ public class BizMessageTemplateServiceImpl implements BizMessageTemplateService
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean update(BizMessageTemplate tempalte) {
|
public boolean update(BizMessageTemplate tempalte) {
|
||||||
return mapper.updateById(tempalte.setUpdatetime(new Timestamp(System.nanoTime()))) > 0;
|
return mapper.updateById(tempalte.setUpdatetime(new Timestamp(System.currentTimeMillis()))) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user