新增内部消息站内信功能。
This commit is contained in:
@@ -18,6 +18,6 @@ public interface MsgInnerRecordDao extends CrudDao<MsgInnerRecord> {
|
|||||||
/**
|
/**
|
||||||
* 根据消息编号和接受者用户名更新读取状态
|
* 根据消息编号和接受者用户名更新读取状态
|
||||||
*/
|
*/
|
||||||
public void updateReadStatus(MsgInnerRecord msgInnerRecord);
|
public long updateReadStatus(MsgInnerRecord msgInnerRecord);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -158,7 +158,7 @@ public class MsgInnerService extends CrudService<MsgInnerDao, MsgInner> {
|
|||||||
BaseMsgContent msgContent = null;
|
BaseMsgContent msgContent = null;
|
||||||
if (MsgPush.TYPE_PC.equals(type)){
|
if (MsgPush.TYPE_PC.equals(type)){
|
||||||
msgContent = new PcMsgContent();
|
msgContent = new PcMsgContent();
|
||||||
msgContent.setContent("你有一条内部消息,请点击“详情”进行查阅。");
|
msgContent.setContent("你有一条内部消息,点击“详情”进行查阅。");
|
||||||
((PcMsgContent)msgContent).addButton(new String[]{
|
((PcMsgContent)msgContent).addButton(new String[]{
|
||||||
"详情", "/a/msg/msgInner/view?id="+msgInner.getId()});
|
"详情", "/a/msg/msgInner/view?id="+msgInner.getId()});
|
||||||
}else if (MsgPush.TYPE_APP.equals(type)){
|
}else if (MsgPush.TYPE_APP.equals(type)){
|
||||||
@@ -170,7 +170,7 @@ public class MsgInnerService extends CrudService<MsgInnerDao, MsgInner> {
|
|||||||
}
|
}
|
||||||
if (msgContent != null){
|
if (msgContent != null){
|
||||||
msgContent.setTitle(msgInner.getMsgTitle());
|
msgContent.setTitle(msgInner.getMsgTitle());
|
||||||
if (msgContent.getContent() != null){
|
if (msgContent.getContent() == null){
|
||||||
msgContent.setContent("你有一条内部消息请查阅:"
|
msgContent.setContent("你有一条内部消息请查阅:"
|
||||||
+ StringUtils.abbr(msgInner.getMsgTitle(), 30));
|
+ StringUtils.abbr(msgInner.getMsgTitle(), 30));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,4 +12,13 @@
|
|||||||
ORDER BY ${sqlMap.order.toSql()}
|
ORDER BY ${sqlMap.order.toSql()}
|
||||||
</select> -->
|
</select> -->
|
||||||
|
|
||||||
|
<update id="updateReadStatus">
|
||||||
|
UPDATE ${_prefix}sys_msg_inner_record SET
|
||||||
|
read_status = #{readStatus},
|
||||||
|
read_date = #{readDate}
|
||||||
|
WHERE msg_inner_id = #{msgInnerId}
|
||||||
|
AND receive_user_code = #{receiveUserCode}
|
||||||
|
AND read_date is null
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user