Merge branch 'dev' into uat
This commit is contained in:
@ -3,15 +3,18 @@
|
||||
<mapper namespace="com.chinaunicom.mall.ebtp.extend.bizmessage.dao.BizMessageMapper">
|
||||
|
||||
<select id="findMessage" resultType="com.chinaunicom.mall.ebtp.extend.bizmessage.entity.BizMessage">
|
||||
SELECT *
|
||||
SELECT *,biz_message_template.type as templatetype
|
||||
FROM biz_message
|
||||
left join biz_message_template on biz_message.templatecode = biz_message_template.code
|
||||
WHERE authorize = 0
|
||||
|
||||
<if test="userId!=null and userId!=''">
|
||||
UNION ALL
|
||||
|
||||
SELECT a.*
|
||||
FROM ( SELECT * FROM biz_message WHERE authorize = 1) a
|
||||
FROM ( SELECT *,biz_message_template.type templatetype FROM biz_message
|
||||
left join biz_message_template on biz_message.templatecode = biz_message_template.code
|
||||
WHERE authorize = 1) a
|
||||
INNER JOIN
|
||||
( SELECT * FROM biz_message_authorize WHERE user_id = #{userId}) b ON a.id = b.message_id
|
||||
</if>
|
||||
|
@ -16,6 +16,8 @@ public class BizMessage {
|
||||
private String url;
|
||||
private String params;
|
||||
private Timestamp createtime;
|
||||
private String templatecode;
|
||||
private String templatetype;
|
||||
|
||||
/* 该值为1则标识开启授权控制,只有授权列表( biz_message_authorize )内的用户可见 */
|
||||
private Integer authorize;
|
||||
|
@ -17,6 +17,7 @@ public class BizMessageTemplate {
|
||||
private String remark;
|
||||
private String router;
|
||||
private Timestamp createtime;
|
||||
private String type;
|
||||
private Timestamp updatetime;
|
||||
|
||||
}
|
||||
|
@ -48,6 +48,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());
|
||||
BeanUtils.copyProperties(source, vo);
|
||||
|
||||
return vo;
|
||||
|
@ -85,6 +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());
|
||||
|
||||
Optional.ofNullable(messageRaw.getUsers()).ifPresent(users -> {
|
||||
log.debug("if user list {} is not emtpy, then grant current message to them.", users);
|
||||
|
@ -16,6 +16,7 @@ public class DescribeSiteMsgVO {
|
||||
private String msgId;
|
||||
private String title;
|
||||
private String category;
|
||||
private String templatetype;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Timestamp createtime;
|
||||
|
||||
|
Reference in New Issue
Block a user