update
This commit is contained in:
@@ -0,0 +1,108 @@
|
||||
package com.shayu.onetoone.activity;
|
||||
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.webkit.ValueCallback;
|
||||
import android.webkit.WebChromeClient;
|
||||
import android.webkit.WebResourceRequest;
|
||||
import android.webkit.WebResourceResponse;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.utils.AndroidBug5497Workaround;
|
||||
import com.yunbao.common.utils.JavascriptInterfaceUtils;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
@Route(path = RouteManager.ACTIVITY_WEB_VIEW)
|
||||
public class WebViewActivity extends AbsOTOActivity {
|
||||
WebView webView;
|
||||
String titleString;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_webview;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void main(Bundle savedInstanceState) {
|
||||
webView = findViewById(R.id.webView);
|
||||
titleString = getIntent().getStringExtra("title");
|
||||
if (!StringUtil.isEmpty(titleString)) {
|
||||
setTitle(titleString);
|
||||
}
|
||||
initWebView();
|
||||
}
|
||||
|
||||
private void initWebView() {
|
||||
WebSettings settings = webView.getSettings();
|
||||
settings.setJavaScriptEnabled(true); // 是否开启JS支持
|
||||
settings.setJavaScriptCanOpenWindowsAutomatically(true); // 是否允许JS打开新窗口
|
||||
settings.setDomStorageEnabled(true);
|
||||
webView.addJavascriptInterface(JavascriptInterfaceUtils.getInstance().setmContext(this, webView)
|
||||
.setPageClose(true)
|
||||
.setLiveZhuangBana(false), "androidObject");
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
}
|
||||
webView.loadUrl(getIntent().getStringExtra("url"));
|
||||
AndroidBug5497Workaround.assistActivity(this);
|
||||
|
||||
webView.setWebViewClient(new WebViewClient() {
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
L.e("H5-------->" + url);
|
||||
if (url.startsWith(Constants.COPY_PREFIX)) {
|
||||
String content = url.substring(Constants.COPY_PREFIX.length());
|
||||
if (!TextUtils.isEmpty(content)) {
|
||||
copy(content);
|
||||
}
|
||||
} else {
|
||||
view.loadUrl(url);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
if (TextUtils.isEmpty(titleString)) {
|
||||
setTitle(view.getTitle());
|
||||
} else {
|
||||
setTitle(titleString);
|
||||
}
|
||||
int height = view.getMeasuredHeight();
|
||||
Log.e("网页高度", height + "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceivedHttpError(WebView view, WebResourceRequest request, WebResourceResponse errorResponse) {
|
||||
super.onReceivedHttpError(view, request, errorResponse);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制到剪贴板
|
||||
*/
|
||||
private void copy(String content) {
|
||||
ClipboardManager cm = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
|
||||
ClipData clipData = ClipData.newPlainText("text", content);
|
||||
cm.setPrimaryClip(clipData);
|
||||
ToastUtil.show(getString(R.string.copy_success));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
package com.shayu.onetoone.activity.fragments.message;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.GestureDetector;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.shayu.onetoone.R;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import androidx.annotation.IdRes;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import io.rong.common.RLog;
|
||||
import io.rong.imkit.conversation.ConversationFragment;
|
||||
import io.rong.imkit.conversation.extension.RongExtension;
|
||||
import io.rong.imkit.model.UiMessage;
|
||||
import io.rong.imkit.widget.FixedLinearLayoutManager;
|
||||
import io.rong.imkit.widget.adapter.BaseAdapter;
|
||||
import io.rong.imkit.widget.adapter.ViewHolder;
|
||||
import io.rong.imkit.widget.refresh.SmartRefreshLayout;
|
||||
import io.rong.imkit.widget.refresh.wrapper.RongRefreshHeader;
|
||||
|
||||
public abstract class AbsConversationFragment extends ConversationFragment {
|
||||
private final String TAG = AbsConversationFragment.class.getSimpleName();
|
||||
private LinearLayout mNotificationContainer;
|
||||
public Context mContext;
|
||||
View rootView;
|
||||
|
||||
public void setTitle(String title) {
|
||||
TextView view = findViewById(R.id.title);
|
||||
if (view != null) {
|
||||
view.setText(title);
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
rootView = getLayoutView(inflater, container, savedInstanceState);
|
||||
mContext = getActivity();
|
||||
this.mList = (RecyclerView) rootView.findViewById(io.rong.imkit.R.id.rc_message_list);
|
||||
this.mRongExtension = (RongExtension) rootView.findViewById(io.rong.imkit.R.id.rc_extension);
|
||||
this.mRefreshLayout = (SmartRefreshLayout) rootView.findViewById(io.rong.imkit.R.id.rc_refresh);
|
||||
this.mNewMessageNum = (TextView) rootView.findViewById(io.rong.imkit.R.id.rc_new_message_number);
|
||||
this.mUnreadHistoryMessageNum = (TextView) rootView.findViewById(io.rong.imkit.R.id.rc_unread_message_count);
|
||||
this.mUnreadMentionMessageNum = (TextView) rootView.findViewById(io.rong.imkit.R.id.rc_mention_message_count);
|
||||
this.mNotificationContainer = (LinearLayout) rootView.findViewById(io.rong.imkit.R.id.rc_notification_container);
|
||||
this.mNewMessageNum.setOnClickListener(this);
|
||||
this.mUnreadHistoryMessageNum.setOnClickListener(this);
|
||||
this.mUnreadMentionMessageNum.setOnClickListener(this);
|
||||
this.mLinearLayoutManager = this.createLayoutManager();
|
||||
if (this.mList != null) {
|
||||
this.mList.setLayoutManager(this.mLinearLayoutManager);
|
||||
}
|
||||
|
||||
this.mRefreshLayout.setOnTouchListener(new View.OnTouchListener() {
|
||||
@SuppressLint({"ClickableViewAccessibility"})
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
AbsConversationFragment.this.closeExpand();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
this.mAdapter.setItemClickListener(new BaseAdapter.OnItemClickListener() {
|
||||
public void onItemClick(View view, ViewHolder holder, int position) {
|
||||
AbsConversationFragment.this.closeExpand();
|
||||
}
|
||||
|
||||
public boolean onItemLongClick(View view, ViewHolder holder, int position) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
if (this.mList != null) {
|
||||
this.mList.setAdapter(this.mAdapter);
|
||||
this.mList.addOnScrollListener(this.mScrollListener);
|
||||
this.mList.setItemAnimator((RecyclerView.ItemAnimator) null);
|
||||
final GestureDetector gd = new GestureDetector(this.getContext(), new GestureDetector.SimpleOnGestureListener() {
|
||||
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
|
||||
AbsConversationFragment.this.closeExpand();
|
||||
return super.onScroll(e1, e2, distanceX, distanceY);
|
||||
}
|
||||
});
|
||||
this.mList.addOnItemTouchListener(new RecyclerView.OnItemTouchListener() {
|
||||
public boolean onInterceptTouchEvent(@NonNull RecyclerView rv, @NonNull MotionEvent e) {
|
||||
return gd.onTouchEvent(e);
|
||||
}
|
||||
|
||||
public void onTouchEvent(@NonNull RecyclerView rv, @NonNull MotionEvent e) {
|
||||
}
|
||||
|
||||
public void onRequestDisallowInterceptTouchEvent(boolean disallowIntercept) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.mRefreshLayout.setNestedScrollingEnabled(false);
|
||||
this.mRefreshLayout.setRefreshHeader(new RongRefreshHeader(this.getContext()));
|
||||
this.mRefreshLayout.setRefreshFooter(new RongRefreshHeader(this.getContext()));
|
||||
this.mRefreshLayout.setEnableRefresh(true);
|
||||
this.mRefreshLayout.setOnRefreshListener(this);
|
||||
this.mRefreshLayout.setOnLoadMoreListener(this);
|
||||
return rootView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
mContext = getActivity();
|
||||
mRongExtension.setVisibility(View.GONE);
|
||||
main();
|
||||
View back = findViewById(R.id.btn_back);
|
||||
if (back != null) {
|
||||
back.setOnClickListener(v -> getActivity().finish());
|
||||
}
|
||||
}
|
||||
|
||||
private RecyclerView.LayoutManager createLayoutManager() {
|
||||
LinearLayoutManager linearLayoutManager = new FixedLinearLayoutManager(this.getContext());
|
||||
linearLayoutManager.setStackFromEnd(true);
|
||||
return linearLayoutManager;
|
||||
}
|
||||
|
||||
private void closeExpand() {
|
||||
if (this.mRongExtensionViewModel != null) {
|
||||
this.mRongExtensionViewModel.collapseExtensionBoard();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private final RecyclerView.OnScrollListener mScrollListener = new RecyclerView.OnScrollListener() {
|
||||
public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
|
||||
super.onScrolled(recyclerView, dx, dy);
|
||||
AbsConversationFragment.this.mMessageViewModel.onScrolled(recyclerView, dx, dy, AbsConversationFragment.this.mAdapter.getHeadersCount(), AbsConversationFragment.this.mAdapter.getFootersCount());
|
||||
}
|
||||
|
||||
public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {
|
||||
if (newState == 0 && AbsConversationFragment.this.onScrollStopRefreshList) {
|
||||
AbsConversationFragment.this.onScrollStopRefreshList = false;
|
||||
RLog.d(AbsConversationFragment.this.TAG, "onScrollStateChanged refresh List");
|
||||
AbsConversationFragment.this.refreshList((List) AbsConversationFragment.this.mMessageViewModel.getUiMessageLiveData().getValue());
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
private void refreshList(final List<UiMessage> data) {
|
||||
if (!this.mList.isComputingLayout() && this.mList.getScrollState() == 0) {
|
||||
this.mAdapter.setDataCollection(data);
|
||||
} else {
|
||||
this.onScrollStopRefreshList = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public abstract View getLayoutView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState);
|
||||
|
||||
public abstract void main();
|
||||
|
||||
public Intent getIntent() {
|
||||
return getActivity().getIntent();
|
||||
}
|
||||
|
||||
public <T extends View> T findViewById(@IdRes int id) {
|
||||
return rootView.findViewById(id);
|
||||
}
|
||||
}
|
||||
@@ -4,8 +4,10 @@ import android.annotation.SuppressLint;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowInsets;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
@@ -17,11 +19,13 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.bean.MessageChatTipsContent;
|
||||
import com.shayu.onetoone.bean.UserBean;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.interfaces.ImageResultCallback;
|
||||
import com.yunbao.common.utils.ProcessImageUtil;
|
||||
@@ -36,6 +40,7 @@ import io.rong.imkit.IMCenter;
|
||||
import io.rong.imkit.conversation.ConversationFragment;
|
||||
import io.rong.imkit.manager.AudioPlayManager;
|
||||
import io.rong.imkit.manager.AudioRecordManager;
|
||||
import io.rong.imkit.model.UiMessage;
|
||||
import io.rong.imkit.utils.PermissionCheckUtil;
|
||||
import io.rong.imkit.utils.RongOperationPermissionUtils;
|
||||
import io.rong.imlib.IRongCallback;
|
||||
@@ -47,7 +52,7 @@ import io.rong.message.ImageMessage;
|
||||
/**
|
||||
* 融云聊天UI
|
||||
*/
|
||||
public class ChatMessageFragment extends ConversationFragment {
|
||||
public class ChatMessageFragment extends AbsConversationFragment {
|
||||
Button mSendBtn;
|
||||
View mInputPanel;
|
||||
ImageView img, call, video, gift;
|
||||
@@ -61,18 +66,30 @@ public class ChatMessageFragment extends ConversationFragment {
|
||||
private float mLastTouchY;
|
||||
private boolean mUpDirection;
|
||||
|
||||
|
||||
RoundedImageView avatar;
|
||||
TextView uname;
|
||||
TextView sign;
|
||||
TextView home;
|
||||
ImageView sex;
|
||||
ImageView status;
|
||||
Button follow;
|
||||
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
initBtn();
|
||||
initChat();
|
||||
targetId = getActivity().getIntent().getStringExtra("targetId");
|
||||
cameraUtil = new ProcessImageUtil(getActivity(), "com.shayu.onetoone.fileprovider");
|
||||
mSendBtn.setOnClickListener(v -> sendText());
|
||||
mRongExtension.setVisibility(View.VISIBLE);
|
||||
img.setOnClickListener(v -> cameraUtil.getImageByCamera());
|
||||
initCamera();
|
||||
|
||||
call.setOnClickListener(v -> {
|
||||
MessageChatTipsContent bean = MessageChatTipsContent.obtain(WordUtil.getString(R.string.message_chat_tip1));
|
||||
MessageChatTipsContent bean = MessageChatTipsContent.obtain(WordUtil.getNewString(R.string.message_chat_tip1));
|
||||
IMCenter.getInstance().insertOutgoingMessage(conversationType, targetId, Message.SentStatus.SENT, bean, System.currentTimeMillis(), new RongIMClient.ResultCallback<Message>() {
|
||||
@Override
|
||||
public void onSuccess(Message message) {
|
||||
@@ -90,6 +107,16 @@ public class ChatMessageFragment extends ConversationFragment {
|
||||
updateMyInfo();
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getLayoutView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.rc_conversation_fragment,container,false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void main() {
|
||||
|
||||
}
|
||||
|
||||
private void initCamera() {
|
||||
cameraUtil.setImageResultCallback(new ImageResultCallback() {
|
||||
@Override
|
||||
@@ -258,4 +285,58 @@ public class ChatMessageFragment extends ConversationFragment {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void initChat() {
|
||||
avatar = findViewById(R.id.avatar);
|
||||
uname = findViewById(R.id.user_name);
|
||||
sign = findViewById(R.id.signature);
|
||||
sex = findViewById(R.id.sex);
|
||||
status = findViewById(R.id.status);
|
||||
home = findViewById(R.id.home);
|
||||
follow = findViewById(R.id.follow);
|
||||
targetId = getIntent().getStringExtra("targetId");
|
||||
updateUserInfo();
|
||||
follow.setOnClickListener(v -> {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
private void updateUserInfo() {
|
||||
OTONetManager.getInstance(mContext)
|
||||
.getTargetUserInfo(Integer.parseInt(targetId), new HttpCallback<UserBean>() {
|
||||
@Override
|
||||
public void onSuccess(UserBean data) {
|
||||
ImgLoader.display(mContext, data.getUser().getAvatar(), avatar);
|
||||
uname.setText(data.getUser().getUserNicename());
|
||||
sign.setText(data.getUser().getSignature());
|
||||
if (data.getUser().getSex() == 1) {
|
||||
sex.setImageResource(R.mipmap.ic_message_tab_man);
|
||||
} else {
|
||||
sex.setImageResource(R.mipmap.ic_message_tab_woman);
|
||||
}
|
||||
|
||||
switch (Integer.parseInt(data.getUser().getOnline())) {
|
||||
case 0:
|
||||
status.setImageResource(R.mipmap.ic_message_msg_status_online);
|
||||
break;
|
||||
case 2:
|
||||
status.setImageResource(R.mipmap.ic_message_msg_status_busy);
|
||||
break;
|
||||
default:
|
||||
status.setImageResource(R.mipmap.ic_message_msg_status_offline);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onViewLongClick(int clickType, UiMessage data) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.shayu.onetoone.activity.fragments.message;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.adapter.MessageInteractionConversationListAdapter;
|
||||
import com.shayu.onetoone.bean.OfficialNoticeBean;
|
||||
import com.shayu.onetoone.bean.SystemMessageBean;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.shayu.onetoone.view.SystemNoticeUiMessage;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import io.rong.imkit.conversation.MessageListAdapter;
|
||||
import io.rong.imkit.model.UiMessage;
|
||||
import io.rong.imlib.model.Message;
|
||||
|
||||
public class MessageInteractiveFragment extends AbsConversationFragment {
|
||||
private OfficialNoticeBean noticeBean;
|
||||
|
||||
public MessageInteractiveFragment(String data) {
|
||||
super();
|
||||
noticeBean = JSONObject.parseObject(data, OfficialNoticeBean.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getLayoutView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.fragment_interaction, container, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void main() {
|
||||
setTitle(noticeBean.getTitle());
|
||||
|
||||
initData();
|
||||
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
OTONetManager.getInstance(mContext)
|
||||
.getSystemMessageList(noticeBean.getType(), new HttpCallback<List<SystemMessageBean>>() {
|
||||
@Override
|
||||
public void onSuccess(List<SystemMessageBean> data) {
|
||||
List<UiMessage> list = new ArrayList<>();
|
||||
for (SystemMessageBean item : data) {
|
||||
SystemNoticeUiMessage message = new SystemNoticeUiMessage(new Message());
|
||||
message.setBean(item);
|
||||
list.add(message);
|
||||
}
|
||||
mAdapter.setDataCollection(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MessageListAdapter onResolveAdapter() {
|
||||
return new MessageInteractionConversationListAdapter(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.shayu.onetoone.activity.fragments.message;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.adapter.MessageNoticeConversationListAdapter;
|
||||
import com.shayu.onetoone.bean.OfficialNoticeBean;
|
||||
import com.shayu.onetoone.bean.SystemMessageBean;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.shayu.onetoone.view.SystemNoticeUiMessage;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import io.rong.imkit.conversation.MessageListAdapter;
|
||||
import io.rong.imkit.model.UiMessage;
|
||||
import io.rong.imlib.model.Message;
|
||||
|
||||
public class MessageNoticeFragment extends AbsConversationFragment {
|
||||
private OfficialNoticeBean noticeBean;
|
||||
|
||||
public MessageNoticeFragment(String data) {
|
||||
super();
|
||||
noticeBean = JSONObject.parseObject(data, OfficialNoticeBean.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getLayoutView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.fragment_notice, container, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void main() {
|
||||
setTitle(noticeBean.getTitle());
|
||||
initData();
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
OTONetManager.getInstance(mContext)
|
||||
.getSystemMessageList(noticeBean.getType(), new HttpCallback<List<SystemMessageBean>>() {
|
||||
@Override
|
||||
public void onSuccess(List<SystemMessageBean> data) {
|
||||
List<UiMessage> list = new ArrayList<>();
|
||||
for (SystemMessageBean item : data) {
|
||||
SystemNoticeUiMessage message = new SystemNoticeUiMessage(new Message());
|
||||
message.setBean(item);
|
||||
list.add(message);
|
||||
}
|
||||
mAdapter.setDataCollection(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MessageListAdapter onResolveAdapter() {
|
||||
return new MessageNoticeConversationListAdapter(this);
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,7 @@ import com.shayu.onetoone.bean.OfficialNoticeBean;
|
||||
import com.shayu.onetoone.bean.TargetUserInfoBean;
|
||||
import com.shayu.onetoone.event.MessageMsgBusEvent;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.yanzhenjie.recyclerview.OnItemMenuClickListener;
|
||||
import com.yanzhenjie.recyclerview.OnItemMenuStateListener;
|
||||
import com.yanzhenjie.recyclerview.SwipeMenuBridge;
|
||||
@@ -454,7 +455,6 @@ public class MsgMessageFragment extends BaseFragment implements BaseAdapter.OnIt
|
||||
try {
|
||||
int type = Integer.parseInt(targetId);
|
||||
if (type < 100) {
|
||||
ToastUtil.showDebug("还没做");
|
||||
startSystem(JSONObject.parseObject(mAdapter.getSystemItem(type).mCore.getLatestMessageExtra(), OfficialNoticeBean.class), baseUiConversation.getConversationIdentifier());
|
||||
return;
|
||||
}
|
||||
@@ -484,7 +484,7 @@ public class MsgMessageFragment extends BaseFragment implements BaseAdapter.OnIt
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putInt("model", noticeBean.getType());
|
||||
bundle.putString("data", JSONObject.toJSONString(noticeBean));
|
||||
RouteUtils.routeToConversationActivity(getContext(), conversationIdentifier, bundle);
|
||||
RouteUtils.routeToConversationActivity(getContext(), conversationIdentifier,bundle);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,35 +1,64 @@
|
||||
package com.shayu.onetoone.activity.fragments.message;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
import android.content.res.Resources;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.bean.OfficialNoticeBean;
|
||||
import com.shayu.onetoone.bean.SystemMessageBean;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import io.rong.imkit.IMCenter;
|
||||
import io.rong.imkit.config.RongConfigCenter;
|
||||
import io.rong.imkit.conversation.ConversationFragment;
|
||||
import io.rong.imkit.conversation.MessageListAdapter;
|
||||
import io.rong.imkit.model.UiMessage;
|
||||
import io.rong.imkit.widget.adapter.BaseAdapter;
|
||||
import io.rong.imkit.widget.adapter.ViewHolder;
|
||||
import io.rong.imlib.RongIMClient;
|
||||
import io.rong.imlib.model.Conversation;
|
||||
import io.rong.imlib.model.Message;
|
||||
import io.rong.imlib.model.UserInfo;
|
||||
import io.rong.message.TextMessage;
|
||||
|
||||
public class SystemMessageFragment extends ConversationFragment {
|
||||
public class SystemMessageFragment extends AbsConversationFragment {
|
||||
View mInputPanel;
|
||||
|
||||
View titleBar;
|
||||
Button callService;
|
||||
OfficialNoticeBean noticeBean;
|
||||
|
||||
public SystemMessageFragment(String data) {
|
||||
super();
|
||||
noticeBean = JSONObject.parseObject(data, OfficialNoticeBean.class);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
init();
|
||||
initData();
|
||||
initSystemMessage();
|
||||
}
|
||||
|
||||
private void init() {
|
||||
@@ -45,6 +74,20 @@ public class SystemMessageFragment extends ConversationFragment {
|
||||
}
|
||||
}
|
||||
|
||||
private void initSystemMessage() {
|
||||
titleBar = findViewById(R.id.include);
|
||||
callService = findViewById(R.id.call_service);
|
||||
titleBar.setVisibility(View.VISIBLE);
|
||||
setTitle(noticeBean.getTitle());
|
||||
callService.setOnClickListener(v -> {
|
||||
String value = SpUtil.getStringValue("customerService");
|
||||
if (!StringUtil.isEmpty(value)) {
|
||||
OfficialNoticeBean service = JSONObject.parseObject(value, OfficialNoticeBean.class);
|
||||
RouteManager.forwardWebViewActivity(service.getTitle(), service.getLink());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
OTONetManager.getInstance(getContext())
|
||||
.getSystemMessageList(SystemMessageBean.TYPE_SYSTEM, new HttpCallback<List<SystemMessageBean>>() {
|
||||
@@ -65,10 +108,42 @@ public class SystemMessageFragment extends ConversationFragment {
|
||||
private void sendMessage(SystemMessageBean item) {
|
||||
TextMessage content = TextMessage.obtain(item.getContent());
|
||||
UiMessage message = new UiMessage(Message.obtain("4", Conversation.ConversationType.PRIVATE, content));
|
||||
message.setSentStatus(Message.SentStatus.SENT);
|
||||
UserInfo userInfo = new UserInfo(item.getId() + "", item.getTitle(), mipmapToUri(R.mipmap.icon_vip_gold));
|
||||
message.setUserInfo(userInfo);
|
||||
message.setMessageDirection(Message.MessageDirection.RECEIVE);
|
||||
message.setState(0);
|
||||
message.setTargetId("4");
|
||||
mAdapter.add(message);
|
||||
}
|
||||
|
||||
private Uri mipmapToUri(int resId) {
|
||||
Resources r = getResources();
|
||||
return Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://"
|
||||
+ r.getResourcePackageName(resId) + "/"
|
||||
+ r.getResourceTypeName(resId) + "/"
|
||||
+ r.getResourceEntryName(resId) + "/"
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public View getLayoutView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.view_conversation_system_fragment, container, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onViewLongClick(int clickType, UiMessage data) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void main() {
|
||||
String data = getIntent().getStringExtra("data");
|
||||
if (!StringUtil.isEmpty(data)) {
|
||||
noticeBean = JSONObject.parseObject(data, OfficialNoticeBean.class);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.activity.AbsOTOActivity;
|
||||
import com.shayu.onetoone.activity.fragments.message.ChatMessageFragment;
|
||||
import com.shayu.onetoone.activity.fragments.message.MessageInteractiveFragment;
|
||||
import com.shayu.onetoone.activity.fragments.message.MessageNoticeFragment;
|
||||
import com.shayu.onetoone.activity.fragments.message.SystemMessageFragment;
|
||||
import com.shayu.onetoone.bean.OfficialNoticeBean;
|
||||
import com.shayu.onetoone.bean.SystemMessageBean;
|
||||
@@ -34,120 +36,40 @@ import io.rong.imkit.conversation.ConversationFragment;
|
||||
*/
|
||||
@Route(path = RouteManager.ACTIVITY_MSG_CHAT)
|
||||
public class ChatActivity extends AbsOTOActivity {
|
||||
String targetId;
|
||||
RoundedImageView avatar;
|
||||
TextView uname;
|
||||
TextView sign;
|
||||
TextView home;
|
||||
ImageView sex;
|
||||
ImageView status;
|
||||
Button follow;
|
||||
OfficialNoticeBean noticeBean;
|
||||
|
||||
View titleBar;
|
||||
int model;
|
||||
Button callService;
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
model = getIntent().getIntExtra("model", 0);
|
||||
String data = getIntent().getStringExtra("data");
|
||||
if (!StringUtil.isEmpty(data)) {
|
||||
noticeBean = JSONObject.parseObject(data, OfficialNoticeBean.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
switch (model) {
|
||||
case SystemMessageBean.TYPE_SYSTEM:
|
||||
return R.layout.activity_msg_message;
|
||||
}
|
||||
return R.layout.activity_msg_chat;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void main(Bundle savedInstanceState) {
|
||||
|
||||
|
||||
int type = getIntent().getIntExtra("model", 0);
|
||||
ConversationFragment conversationFragment;
|
||||
switch (model) {
|
||||
case SystemMessageBean.TYPE_SYSTEM:
|
||||
conversationFragment = new SystemMessageFragment();
|
||||
initSystemMessage();
|
||||
break;
|
||||
default:
|
||||
conversationFragment = new ChatMessageFragment();
|
||||
initChat();
|
||||
}
|
||||
if (type == 4) {
|
||||
conversationFragment = new SystemMessageFragment(getIntent().getStringExtra("data"));
|
||||
} else if (type == 1) {
|
||||
conversationFragment = new MessageNoticeFragment(getIntent().getStringExtra("data"));
|
||||
} else if (type == 2) {
|
||||
conversationFragment=new MessageInteractiveFragment(getIntent().getStringExtra("data"));
|
||||
} else {
|
||||
conversationFragment = new ChatMessageFragment();
|
||||
|
||||
}
|
||||
FragmentManager manager = getSupportFragmentManager();
|
||||
FragmentTransaction transaction = manager.beginTransaction();
|
||||
transaction.replace(R.id.container, conversationFragment);
|
||||
transaction.commit();
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void initSystemMessage() {
|
||||
titleBar = findViewById(R.id.include);
|
||||
callService=findViewById(R.id.call_service);
|
||||
titleBar.setVisibility(View.VISIBLE);
|
||||
setTitle(noticeBean.getTitle());
|
||||
callService.setOnClickListener(v -> {
|
||||
String value = SpUtil.getStringValue("customerService");
|
||||
if(!StringUtil.isEmpty(value)) {
|
||||
OfficialNoticeBean service=JSONObject.parseObject(value, OfficialNoticeBean.class);
|
||||
RouteUtil.forwardZhuangBanActivity(service.getTitle(),service.getLink());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initChat() {
|
||||
avatar = findViewById(R.id.avatar);
|
||||
uname = findViewById(R.id.user_name);
|
||||
sign = findViewById(R.id.signature);
|
||||
sex = findViewById(R.id.sex);
|
||||
status = findViewById(R.id.status);
|
||||
home = findViewById(R.id.home);
|
||||
follow = findViewById(R.id.follow);
|
||||
targetId = getIntent().getStringExtra("targetId");
|
||||
updateUserInfo();
|
||||
follow.setOnClickListener(v -> {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
private void updateUserInfo() {
|
||||
OTONetManager.getInstance(mContext)
|
||||
.getTargetUserInfo(Integer.parseInt(targetId), new HttpCallback<UserBean>() {
|
||||
@Override
|
||||
public void onSuccess(UserBean data) {
|
||||
ImgLoader.display(mContext, data.getUser().getAvatar(), avatar);
|
||||
uname.setText(data.getUser().getUserNicename());
|
||||
sign.setText(data.getUser().getSignature());
|
||||
if (data.getUser().getSex() == 1) {
|
||||
sex.setImageResource(R.mipmap.ic_message_tab_man);
|
||||
} else {
|
||||
sex.setImageResource(R.mipmap.ic_message_tab_woman);
|
||||
}
|
||||
|
||||
switch (Integer.parseInt(data.getUser().getOnline())) {
|
||||
case 0:
|
||||
status.setImageResource(R.mipmap.ic_message_msg_status_online);
|
||||
break;
|
||||
case 2:
|
||||
status.setImageResource(R.mipmap.ic_message_msg_status_busy);
|
||||
break;
|
||||
default:
|
||||
status.setImageResource(R.mipmap.ic_message_msg_status_offline);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.shayu.onetoone.adapter;
|
||||
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.bean.SystemMessageBean;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.shayu.onetoone.view.SystemNoticeUiMessage;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import io.rong.imkit.conversation.MessageListAdapter;
|
||||
import io.rong.imkit.model.UiMessage;
|
||||
import io.rong.imkit.widget.adapter.IViewProviderListener;
|
||||
import io.rong.imkit.widget.adapter.ViewHolder;
|
||||
|
||||
public class MessageInteractionConversationListAdapter extends MessageListAdapter {
|
||||
|
||||
public MessageInteractionConversationListAdapter(IViewProviderListener<UiMessage> listener) {
|
||||
super(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return ViewHolder.createViewHolder(parent.getContext(), parent, R.layout.item_interaction_msg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDataCollection(List<UiMessage> data) {
|
||||
super.setDataCollection(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||
SystemMessageBean bean = ((SystemNoticeUiMessage) getData().get(position)).getBean();
|
||||
holder.setText(R.id.content, bean.getContent());
|
||||
holder.setText(R.id.text, bean.getUser_nicename());
|
||||
holder.setText(R.id.time, new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault()).format(new Date(bean.getAddtime() * 1000)));
|
||||
ImgLoader.display(holder.getContext(), bean.getAvatar(), holder.getView(R.id.ico));
|
||||
ImgLoader.display(holder.getContext(), bean.getAvatar(), holder.getView(R.id.img_item_interaction));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.shayu.onetoone.adapter;
|
||||
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.bean.SystemMessageBean;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.shayu.onetoone.view.SystemNoticeUiMessage;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import io.rong.imkit.conversation.MessageListAdapter;
|
||||
import io.rong.imkit.model.UiMessage;
|
||||
import io.rong.imkit.widget.adapter.IViewProviderListener;
|
||||
import io.rong.imkit.widget.adapter.ViewHolder;
|
||||
|
||||
public class MessageNoticeConversationListAdapter extends MessageListAdapter {
|
||||
|
||||
public MessageNoticeConversationListAdapter(IViewProviderListener<UiMessage> listener) {
|
||||
super(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return ViewHolder.createViewHolder(parent.getContext(), parent, R.layout.item_sys_msg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDataCollection(List<UiMessage> data) {
|
||||
super.setDataCollection(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||
SystemMessageBean bean = ((SystemNoticeUiMessage) getData().get(position)).getBean();
|
||||
holder.setText(R.id.content, bean.getContent());
|
||||
holder.setText(R.id.text, bean.getTitle());
|
||||
holder.setText(R.id.time, new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault()).format(new Date(bean.getAddtime() * 1000)));
|
||||
|
||||
if (StringUtil.isEmpty(bean.getBanner())) {
|
||||
holder.setVisible(R.id.cv_img_content, false);
|
||||
} else {
|
||||
holder.setVisible(R.id.cv_img_content, true);
|
||||
ImgLoader.display(holder.getContext(), bean.getBanner(), holder.getView(R.id.img_content));
|
||||
}
|
||||
holder.setOnClickListener(R.id.bg, new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
RouteManager.forwardWebViewActivity(bean.getTitle(), bean.getLink());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -52,6 +52,7 @@ public class MsgMessageRecyclerViewAdapter extends ConversationListAdapter {
|
||||
List<BaseUiConversation> top = new ArrayList<>();
|
||||
List<BaseUiConversation> data2 = new ArrayList<>();
|
||||
for (BaseUiConversation datum : data) {
|
||||
System.out.println("接收到的Tid="+datum.mCore.getTargetId());
|
||||
try {
|
||||
int parseInt = Integer.parseInt(datum.mCore.getTargetId());
|
||||
if (parseInt < 100) {
|
||||
@@ -59,6 +60,7 @@ public class MsgMessageRecyclerViewAdapter extends ConversationListAdapter {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
continue;
|
||||
}
|
||||
if (datum.mCore.getConversationType() == Conversation.ConversationType.PRIVATE || datum.mCore.getConversationType() == Conversation.ConversationType.SYSTEM) {
|
||||
if (datum.mCore.isTop()) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.shayu.onetoone.manager;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
|
||||
/**
|
||||
@@ -11,6 +13,7 @@ public class RouteManager {
|
||||
public static final String ACTIVITY_MSG_CHAT = "/activity/ChatActivity";//聊天页面
|
||||
public static final String ACTIVITY_ENTRY = "/activity/EntryActivity";
|
||||
public static final String ACTIVITY_LOGIN = "/activity/LoginActivity";
|
||||
public static final String ACTIVITY_WEB_VIEW = "/activity/WebViewActivity";
|
||||
|
||||
public static void forwardMainActivity() {
|
||||
ARouter.getInstance().build(ACTIVITY_MAIN)
|
||||
@@ -31,8 +34,17 @@ public class RouteManager {
|
||||
ARouter.getInstance().build(ACTIVITY_ENTRY)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
public static void forwardLoginActivity() {
|
||||
ARouter.getInstance().build(ACTIVITY_LOGIN)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
public static void forwardWebViewActivity(String title, String url) {
|
||||
ARouter.getInstance().build(ACTIVITY_WEB_VIEW)
|
||||
.withString("title", title)
|
||||
.withString("url", url)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.shayu.onetoone.view;
|
||||
|
||||
import com.shayu.onetoone.bean.SystemMessageBean;
|
||||
|
||||
import io.rong.imkit.model.UiMessage;
|
||||
import io.rong.imlib.model.Message;
|
||||
|
||||
public class SystemNoticeUiMessage extends UiMessage {
|
||||
SystemMessageBean bean;
|
||||
|
||||
public SystemMessageBean getBean() {
|
||||
return bean;
|
||||
}
|
||||
|
||||
public void setBean(SystemMessageBean bean) {
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
public SystemNoticeUiMessage(Message message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user