增加业务参数
This commit is contained in:
@ -41,4 +41,8 @@ public class BizMessageRawDTO {
|
||||
@ApiModelProperty(required = true, value = "授权用户列表")
|
||||
private List<String> users;
|
||||
|
||||
@ApiModelProperty(required = true, value = "业务参数json")
|
||||
@NotNull(message = "业务参数json")
|
||||
private Map<String, Object> servicecode;
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ public class BizMessage {
|
||||
private String url;
|
||||
private String params;
|
||||
private Timestamp createtime;
|
||||
private String templatecode;
|
||||
private String servicecode;
|
||||
|
||||
/* 该值为1则标识开启授权控制,只有授权列表( biz_message_authorize )内的用户可见 */
|
||||
private Integer authorize;
|
||||
|
@ -17,7 +17,6 @@ public class BizMessageTemplate {
|
||||
private String remark;
|
||||
private String router;
|
||||
private Timestamp createtime;
|
||||
private String type;
|
||||
private Timestamp updatetime;
|
||||
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ public class BizMessageConsumerServiceImpl implements BizMessageConsumerService
|
||||
public IBizMessagePage<DescribeSiteMsgVO> listOutline(PageDTO page) {
|
||||
page = createPageCondition(page);
|
||||
|
||||
IPage<BizMessageVo> pageEntity = mapper.findMessageVo(new Page<BizMessageVo>(page.getPageNo(), page.getPageSize()),
|
||||
IPage<BizMessage> pageEntity = mapper.findMessage(new Page<BizMessage>(page.getPageNo(), page.getPageSize()),
|
||||
service.getCacheUser().getUserId());
|
||||
|
||||
// DAT -> VO 转换
|
||||
@ -50,8 +50,7 @@ public class BizMessageConsumerServiceImpl implements BizMessageConsumerService
|
||||
result.setRecords(pageEntity.getRecords().stream().map(source -> {
|
||||
DescribeSiteMsgVO vo = new DescribeSiteMsgVO();
|
||||
vo.setMsgId(source.getId());
|
||||
vo.setTemplatetype(source.getTemplatetype());
|
||||
vo.setAuthorizestate(source.getAuthorizestate());
|
||||
vo.setServicecode(source.getServicecode());
|
||||
BeanUtils.copyProperties(source, vo);
|
||||
return vo;
|
||||
}).collect(Collectors.toList()));
|
||||
|
@ -85,7 +85,7 @@ public class BizMessageProducerServiceImpl implements BizMessageProducerService
|
||||
bizmessage.setContent(fill(dao.getBody(), messageRaw.getBody()));
|
||||
bizmessage.setUrl(fill(dao.getRouter(), messageRaw.getExtra()));
|
||||
bizmessage.setParams(toJson(messageRaw.getExtra()));
|
||||
bizmessage.setTemplatecode(messageRaw.getTemplateCode());
|
||||
bizmessage.setServicecode(toJson(messageRaw.getServicecode()));
|
||||
|
||||
Optional.ofNullable(messageRaw.getUsers()).ifPresent(users -> {
|
||||
log.debug("if user list {} is not emtpy, then grant current message to them.", users);
|
||||
|
@ -16,8 +16,7 @@ public class DescribeSiteMsgVO {
|
||||
private String msgId;
|
||||
private String title;
|
||||
private String category;
|
||||
private String templatetype;
|
||||
private String authorizestate;
|
||||
private String servicecode;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Timestamp createtime;
|
||||
|
||||
|
Reference in New Issue
Block a user