Commit 018badf8 by 刘鹏

feat: 组件阿里云埋点改用platform增加丰富参数埋点,方便后续定位问题

parent cb4f68c6
......@@ -8,9 +8,9 @@ ext {
"m-confide" : "0.0.49.05",
"m-consultant" : "0.0.59.68",
"m-fm" : "0.0.30.01",
"m-user" : "0.0.61.24",
"m-user" : "0.0.61.25",
"m-home" : "0.0.22.59",
"m-im" : "0.0.18.46",
"m-im" : "0.0.18.47",
"m-dynamic" : "0.0.7.19",
"m-article" : "0.0.0.6",
......@@ -33,13 +33,13 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform" : "0.0.39.97",
"ydl-platform" : "0.0.39.99",
//第二步 若干
"ydl-webview" : "0.0.38.38",
"ydl-webview" : "0.0.38.40",
"ydl-media" : "0.0.21.6",
"ydl-pay" : "0.0.18.16",
"m-audioim" : "0.0.49.29.34",
"ydl-pay" : "0.0.18.17",
"m-audioim" : "0.0.49.29.35",
"ydl-flutter-base": "0.0.14.20",
//以下 几乎不会动
......@@ -88,12 +88,12 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.49.04",
"m-confide" : "0.0.49.05",
"m-consultant" : "0.0.59.68",
"m-fm" : "0.0.30.01",
"m-user" : "0.0.61.24",
"m-user" : "0.0.61.25",
"m-home" : "0.0.22.59",
"m-im" : "0.0.18.46",
"m-im" : "0.0.18.47",
"m-dynamic" : "0.0.7.19",
"m-article" : "0.0.0.6",
......@@ -115,13 +115,13 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform" : "0.0.39.97",
"ydl-platform" : "0.0.39.99",
//第二步 若干
"ydl-webview" : "0.0.38.38",
"ydl-webview" : "0.0.38.40",
"ydl-media" : "0.0.21.6",
"ydl-pay" : "0.0.18.16",
"m-audioim" : "0.0.49.29.34",
"ydl-pay" : "0.0.18.17",
"m-audioim" : "0.0.49.29.35",
"ydl-flutter-base": "0.0.14.20",
//以下 几乎不会动
......
......@@ -47,10 +47,10 @@ import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.StatusBarUtils
import com.ydl.ydlcommon.utils.Utils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.log.LogHelper
import com.ydl.ydlcommon.utils.remind.ToastHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.user.api.service.IUserService
import de.greenrobot.event.EventBus
import io.agora.rtc.Constants
......@@ -139,7 +139,7 @@ class ConsultantAudioHomeActivity :
super.onJoinChannelSuccess(channel, uid, elapsed)
LogUtil.e("[agora]$uid 加入频道回调")
writeAgoraLog("被叫(用户)加入声网($channel)频道成功")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "被叫(用户)加入声网($channel)频道成功")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "被叫(用户)加入声网($channel)频道成功")
runOnUiThread {
// 加入频道后再通知用户已接受
// YDLRTMClient.instances.acceptCall(mAudioMessageBean?.channelId)
......@@ -167,8 +167,8 @@ class ConsultantAudioHomeActivity :
super.onRejoinChannelSuccess(channel, uid, elapsed)
LogUtil.e("[agora]$uid 重新加入频道回调")
writeAgoraLog("被叫(用户)重新加入声网频道($channel)成功")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "被叫(用户)重新加入声网频道($channel)成功")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "被叫(用户)重新加入声网频道($channel)成功")
runOnUiThread {
if (!isConnectSuccess) {
......@@ -187,7 +187,7 @@ class ConsultantAudioHomeActivity :
super.onUserJoined(uid, elapsed)
LogUtil.e("[agora]远端用户加入频道回调")
writeAgoraLog("主叫(专家)加入声网频道成功")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "主叫(专家)加入声网频道成功")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "主叫(专家)加入声网频道成功")
//另一方加入频道成功
runOnUiThread {
......@@ -230,7 +230,7 @@ class ConsultantAudioHomeActivity :
override fun onLeaveChannel(stats: IRtcEngineEventHandler.RtcStats?) {
super.onLeaveChannel(stats)
LogUtil.e("[agora]自己离开频道回调")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "自己离开频道回调")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "自己离开频道回调")
//通知php 通话已结束
close(RESULT_ANSWERED_CODE, "")
......@@ -258,7 +258,7 @@ class ConsultantAudioHomeActivity :
)
showToast("对方已挂断")
writeAgoraLog("通话接通后挂断:主叫(专家)离开频道")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "通话接通后挂断:主叫(专家)离开频道")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "通话接通后挂断:主叫(专家)离开频道")
if (null != totalDisposable) {
totalDisposable!!.dispose()
......@@ -276,7 +276,7 @@ class ConsultantAudioHomeActivity :
}
LogUtil.e("[agora]发生警告回调=$warn")
writeAgoraLog("声网警告回调码:($warn)")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "声网警告回调码:($warn)")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "声网警告回调码:($warn)")
//103:没有可用的频道资源。可能是因为服务端没法分配频道资源
//104:查找频道超时。在加入频道时 SDK 先要查找指定的频道,出现该警告一般是因为网络太差,连接不到服务器
......@@ -303,7 +303,7 @@ class ConsultantAudioHomeActivity :
uploadException("mRtcEventHandler-onError:errorCode--%${err}")
LogUtil.e("[agora] 发生错误回调 =$err")
writeAgoraLog("声网错误回调errorCode--%${err}")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "声网错误回调errorCode--%${err}")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "声网错误回调errorCode--%${err}")
//3:SDK 初始化失败。Agora 建议尝试以下处理方法
//7:SDK 尚未初始化,就调用其 API。请确认在调用 API 之前已创建 RtcEngine 对象并完成初始化
......@@ -524,7 +524,7 @@ class ConsultantAudioHomeActivity :
override fun channelTokenResponse(token: String?, needJoinChannel: Boolean) {
if (TextUtils.isEmpty(token)) {
LogUtil.e("[agora]token not null")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "token isEmpty ")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "token isEmpty ")
showToast("通话频道不存在")
finish()
......@@ -599,7 +599,7 @@ class ConsultantAudioHomeActivity :
val account = YdlCommonRouterManager.getYdlCommonRoute().getUid()
if (!TextUtils.isEmpty(mAudioMessageBean?.channelId)) {
LogUtil.e("[agora] joinChannel:$account")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "joinChannel:$account")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "joinChannel:$account")
voiceManage?.getVoiceApi()?.joinChannel(
channelToken
......@@ -825,8 +825,8 @@ class ConsultantAudioHomeActivity :
fun close(code: Int, msg: String) {
runOnUiThread {
LogUtil.e("[agora]close(code:$code,msg:$msg)")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "close(code:$code,msg:$msg)")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "close(code:$code,msg:$msg)")
//上传日志文件
uploadLog()
......@@ -858,7 +858,7 @@ class ConsultantAudioHomeActivity :
}
ActivityManager.getInstance().removeStack(activity = this)
LogUtil.e("[agora]页面移除")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "页面移除")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "页面移除")
finish()
}
}
......
......@@ -10,8 +10,8 @@ import com.netease.nimlib.sdk.avchat.AVChatManager;
import com.netease.nimlib.sdk.avchat.constant.AVChatControlCommand;
import com.netease.nimlib.sdk.avchat.model.AVChatData;
import com.ydl.ydlcommon.base.BaseActivityMgr;
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper;
import com.ydl.ydlnet.utils.log.AliYunLogConfig;
import com.ydl.ydlnet.utils.log.AliYunLogHelper;
import com.yidianling.avchatkit.activity.AVChatActivity;
import com.yidianling.avchatkit.common.log.ILogUtil;
import com.yidianling.avchatkit.common.log.LogUtil;
......@@ -151,7 +151,7 @@ public class AVChatKit {
*/
public static void outgoingCall(Context context, String account, String displayName, int callType, int source) {
AVChatActivity.outgoingCall(context, account, displayName, callType, source);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"outgoingCall 发起音视频通话呼叫");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN,"outgoingCall 发起音视频通话呼叫");
}
......@@ -166,7 +166,7 @@ public class AVChatKit {
*/
public static void outgoingTeamCall(Context context, boolean receivedCall, String teamId, String roomId, ArrayList<String> accounts, String teamName) {
TeamAVChatActivity.startActivity(context, receivedCall, teamId, roomId, accounts, teamName);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"outgoingTeamCall 发起群组音视频通话呼叫");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN,"outgoingTeamCall 发起群组音视频通话呼叫");
}
/**
......
......@@ -11,8 +11,8 @@ import android.os.Build;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper;
import com.ydl.ydlnet.utils.log.AliYunLogConfig;
import com.ydl.ydlnet.utils.log.AliYunLogHelper;
import com.yidianling.avchatkit.common.log.LogUtil;
public class NetworkUtil {
......@@ -148,7 +148,7 @@ public class NetworkUtil {
}
}
curNetworkType = type;
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.NETSTATUS, "网络类型:" + type);
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.NETSTATUS, "网络类型:" + type);
return type;
}
......@@ -274,10 +274,10 @@ public class NetworkUtil {
NetworkInfo ni = cm.getActiveNetworkInfo();
if (ni != null) {
if (ni.getType() == ConnectivityManager.TYPE_WIFI) {
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.NETSTATUS, "网络类型:TYPE_WIFI");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.NETSTATUS, "网络类型:TYPE_WIFI");
return true;
} else {
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.NETSTATUS, "网络类型:非WIFI环境");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.NETSTATUS, "网络类型:非WIFI环境");
return false;
}
......
......@@ -35,8 +35,8 @@ import com.netease.nimlib.sdk.avchat.model.AVChatParameters;
import com.netease.nimlib.sdk.avchat.video.AVChatCameraCapturer;
import com.netease.nimlib.sdk.avchat.video.AVChatVideoCapturerFactory;
import com.netease.nrtc.video.render.IVideoRender;
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper;
import com.ydl.ydlnet.utils.log.AliYunLogConfig;
import com.ydl.ydlnet.utils.log.AliYunLogHelper;
import com.yidianling.avchatkit.AVChatKit;
import com.yidianling.avchatkit.TeamAVChatProfile;
import com.yidianling.avchatkit.common.activity.AVChatBaseUI;
......@@ -438,7 +438,7 @@ public class TeamAVChatActivity extends AVChatBaseUI {
public void onSuccess(AVChatData data) {
chatId = data.getChatId();
LogUtil.i(TAG, "join room success, roomId=" + roomId + ", chatId=" + chatId);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"join room success, roomId=" + roomId + ", chatId=" + chatId);
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN,"join room success, roomId=" + roomId + ", chatId=" + chatId);
}
@Override
......@@ -461,16 +461,16 @@ public class TeamAVChatActivity extends AVChatBaseUI {
startLocalPreview();
startTimerForCheckReceivedCall();
LogUtil.i(TAG, "team avchat running..." + ", roomId=" + roomId);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"onJoinRoomSuccess 进入房间成功");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN,"onJoinRoomSuccess 进入房间成功");
}
private void onJoinRoomFailed(int code, Throwable e) {
if (code == ResponseCode.RES_ENONEXIST) {
showToast(getString(R.string.im_t_avchat_join_fail_not_exist));
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"startRtc 进入房间失败 房间不存在 code:"+code);
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN,"startRtc 进入房间失败 房间不存在 code:"+code);
} else {
showToast("join room failed, code=" + code + ", e=" + (e == null ? "" : e.getMessage()));
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"join room failed, code=" + code + ", e=" + (e == null ? "" : e.getMessage()));
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN,"join room failed, code=" + code + ", e=" + (e == null ? "" : e.getMessage()));
}
}
......@@ -490,7 +490,7 @@ public class TeamAVChatActivity extends AVChatBaseUI {
updateAudioMuteButtonState();
LogUtil.i(TAG, "on user joined, account=" + account);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"on user joined, account=" + account);
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN,"on user joined, account=" + account);
}
public void onAVChatUserLeave(String account) {
......@@ -504,7 +504,7 @@ public class TeamAVChatActivity extends AVChatBaseUI {
updateAudioMuteButtonState();
LogUtil.i(TAG, "on user leave, account=" + account);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"on user leave, account=" + account);
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN,"on user leave, account=" + account);
}
private void startLocalPreview() {
......
......@@ -17,10 +17,10 @@ import com.ydl.ydlcommon.ui.LoadingDialogFragment
import com.ydl.ydlcommon.ui.LoadingDialogFragment.Companion.newInstance
import com.ydl.ydlcommon.utils.NetworkParamsUtils
import com.ydl.ydlcommon.utils.UserInfoCache
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.remind.HttpErrorUtils.Companion.handleError
import com.ydl.ydlcommon.view.dialog.CommonDialog
import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper.Companion.getInstance
import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.ToastUtil
import com.yidianling.im.R
......@@ -196,7 +196,7 @@ object IMChatUtil {
isFromQingShu: Int,
context: AppCompatActivity
) {
getInstance().sendLog(AliYunLogConfig.YUNXIN, "startChatSession 开启聊天会话")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "startChatSession 开启聊天会话")
val p2PCustomActionHandlerImpl = P2PCustomActionHandlerImpl(toUid, expertInfo)
p2PCustomActionHandlerImpl.isFromQingShu = isFromQingShu
SessionHelper.startP2PSession(
......
......@@ -5,8 +5,8 @@ import android.content.Context;
import com.netease.nimlib.sdk.msg.attachment.MsgAttachment;
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum;
import com.netease.nimlib.sdk.msg.model.IMMessage;
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper;
import com.ydl.ydlnet.utils.log.AliYunLogConfig;
import com.ydl.ydlnet.utils.log.AliYunLogHelper;
import com.yidianling.nimbase.api.BaseNimUIKit;
import com.yidianling.nimbase.api.model.session.SessionCustomization;
import com.yidianling.uikit.business.contact.selector.activity.ContactSelectActivity;
......@@ -32,7 +32,7 @@ public class NimUIKit extends BaseNimUIKit {
*/
public static void startYDLChatting(Context context, String id, SessionTypeEnum sessionType, SessionCustomization
customization, IMMessage anchor, IP2PCustomActionHandler handler) {
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "startYDLChatting 打开壹点灵定制聊天窗口,开始聊天");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "startYDLChatting 打开壹点灵定制聊天窗口,开始聊天");
NimUIKitImpl.startChatting(context, id, sessionType, customization, anchor, handler);
}
......
......@@ -16,8 +16,8 @@ import com.netease.nimlib.sdk.msg.MsgServiceObserve;
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum;
import com.netease.nimlib.sdk.msg.model.CustomNotification;
import com.netease.nimlib.sdk.msg.model.IMMessage;
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper;
import com.ydl.ydlnet.utils.log.AliYunLogConfig;
import com.ydl.ydlnet.utils.log.AliYunLogHelper;
import com.yidianling.common.tools.ToastUtil;
import com.yidianling.im.R;
import com.yidianling.im.api.bean.IMRegisterObserverCustomNotificationCallBack;
......@@ -151,7 +151,7 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
registerObservers(false);
super.onDestroy();
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"退出聊天页面");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN,"退出聊天页面");
}
@Override
......
......@@ -49,11 +49,11 @@ import com.ydl.ydlcommon.utils.LogUtil;
import com.ydl.ydlcommon.utils.SharedPreferencesEditor;
import com.ydl.ydlcommon.utils.YdlBuryPointUtil;
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils;
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper;
import com.ydl.ydlcommon.utils.log.LogHelper;
import com.ydl.ydlcommon.view.CircleImageView;
import com.ydl.ydlcommon.view.dialog.CommonDialog;
import com.ydl.ydlnet.utils.log.AliYunLogConfig;
import com.ydl.ydlnet.utils.log.AliYunLogHelper;
import com.yidianling.common.tools.ToastUtil;
import com.yidianling.im.R;
import com.yidianling.im.helper.IMChatUtil;
......@@ -1184,14 +1184,14 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
}
});
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"sendMessage 该消息发送成功");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "sendMessage 该消息发送成功 sessionId:" + sessionId);
} else {
// 替换成tip
message = MessageBuilder.createTipMessage(message.getSessionId(), message.getSessionType());
message.setContent("该消息无法发送");
message.setStatus(MsgStatusEnum.success);
NIMClient.getService(MsgService.class).saveMessageToLocal(message, false);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"sendMessage 该消息无法发送");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "sendMessage 该消息无法发送 sessionId:" + sessionId);
}
messageListPanel.onMsgSend(message);
......@@ -1219,11 +1219,11 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
LogHelper.Companion.getInstance().writeLogSync("发送消息失败:已被对方拉黑");
ToastUtil.toastLong(getActivity(), "您已被对方拉黑!");
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"sendFailWithBlackList 发送消息失败:已被对方拉黑");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "sendFailWithBlackList 发送消息失败:已被对方拉黑 sessionId:" + sessionId);
} else if (code == 404) {
LogHelper.Companion.getInstance().writeLogSync("发送消息失败:对象不见了");
ToastUtil.toastLong(getActivity(), "对象不见了!");
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"sendFailWithBlackList 发送消息失败:对象不见了 404");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "sendFailWithBlackList 发送消息失败:对象不见了 404 sessionId:" + sessionId);
} else {
//上传至后台
......
......@@ -6,8 +6,8 @@ import com.tencent.bugly.crashreport.CrashReport
import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.utils.ActivityManager
import com.ydl.ydlcommon.utils.BuryPointUtils
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.common.tools.LogUtil
import com.yidianling.im.api.bean.IMLoginInfo
import com.yidianling.im.api.bean.IMRequestCallback
......@@ -61,19 +61,19 @@ object LoginUtils {
override fun onSuccess(t: IMLoginInfo?) {
LogUtil.e("IM登录成功:" + "info.account:" + info.account + "info.passWord" + info.passWord)
UserIn.imSetAccount(userInfo?.uid ?: "")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.LOGIN, "IM登录成功")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.LOGIN, "IM登录成功")
}
override fun onFailed(i: Int) {
LogUtil.e("IM登录失败:$i" + "info.account:" + info.account + "info.passWord" + info.passWord)
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.LOGIN, "IM登录失败")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.LOGIN, "IM登录失败")
}
override fun onException(throwable: Throwable?) {
LogUtil.e("IM登录onException:${throwable?.message}")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, "IM登录onException:${throwable?.message}")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.LOGIN, "IM登录onException:${throwable?.message}")
}
}
......@@ -98,7 +98,7 @@ object LoginUtils {
@JvmStatic
fun logoutClearLocal() {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.LOGIN, "退出登录")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.LOGIN, "退出登录")
UserIn.imLogout()
UserIn.closePlayer()
UserIn.clearImData()
......
......@@ -14,9 +14,9 @@ import com.ydl.ydlcommon.router.YdlCommonOut
import com.ydl.ydlcommon.utils.ActivityManager
import com.ydl.ydlcommon.utils.UserInfoCache
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.remind.ToastHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.im.api.bean.IMLoginInfo
import com.yidianling.im.api.bean.IMRequestCallback
import com.yidianling.user.LoginUtils
......@@ -171,14 +171,14 @@ class SmsLoginActivity : BaseActivity() {
// finish()
LoginUtils.loginSuccessOperate(this)
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, "短信验证码 成功")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.LOGIN, "短信验证码 成功")
}, object : ThrowableConsumer() {
override fun accept(msg: String) {
dismissProgressDialog()
YdlCommonOut.showToast(msg)
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, "短信验证码 失败 msg:$msg ")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.LOGIN, "短信验证码 失败 msg:$msg ")
}
})
}
......
......@@ -26,9 +26,9 @@ import com.ydl.ydlcommon.utils.JPushUtils
import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.log.LogHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.common.tools.RxAppTool
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool
......@@ -430,7 +430,7 @@ object OneKeyLoginHelp {
.observeOn(AndroidSchedulers.mainThread())
.subscribe({
if (it.code == 200) {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.LOGIN,"一键登录成功")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.LOGIN,"一键登录成功")
ToastUtil.toastShort("登录成功")
saveUserData(it.data)
if (it.data.firstLogin == 1) {//第一次登录:是注册
......@@ -464,12 +464,12 @@ object OneKeyLoginHelp {
LoginUtils.loginSuccessOperate(mActivity)
}
} else {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.LOGIN,"一键登录失败 msg:${it.msg}")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.LOGIN,"一键登录失败 msg:${it.msg}")
ToastUtil.toastShort(it.msg)
mPhoneNumberAuthHelper?.hideLoginLoading()
}
}, {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.LOGIN,"一键登录Error msg:${it.message}")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.LOGIN,"一键登录Error msg:${it.message}")
ToastUtil.toastShort(it.message)
mPhoneNumberAuthHelper?.hideLoginLoading()
})
......
......@@ -34,8 +34,6 @@ import com.ydl.ydlcommon.utils.StatusBarUtils
import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.view.dialog.CommonDialog
import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.RxAppTool
import com.yidianling.common.tools.RxKeyboardTool
......
......@@ -7,9 +7,9 @@ import com.ydl.ydlcommon.router.YdlCommonOut
import com.ydl.ydlcommon.utils.StringUtils
import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.log.LogHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.common.tools.ToastUtil
import com.yidianling.user.LoginUtils
import com.yidianling.user.StatusUtils
......@@ -111,8 +111,8 @@ class InputPassWordPresenterImpl :
.doAfterTerminate { mView.showLoading(false) }
.subscribe({
if (it?.data == null) {
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, "手机号密码 登录失败 msg: ${it.msg}")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.LOGIN, "手机号密码 登录失败 msg: ${it.msg}")
ToastUtil.toastShort(it.msg)
mView.startAnim()
} else {
......@@ -132,13 +132,13 @@ class InputPassWordPresenterImpl :
}
mView.closeActivity()
}
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.LOGIN, "手机号密码 登录成功")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.LOGIN, "手机号密码 登录成功")
}
}, {
YdlCommonOut.showToast(it.message!!)
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, "手机号密码 Error msg: ${it.message}")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.LOGIN, "手机号密码 Error msg: ${it.message}")
})
}
......
......@@ -9,9 +9,9 @@ import com.ydl.ydlcommon.mvp.base.BasePresenter
import com.ydl.ydlcommon.router.YdlCommonOut
import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.log.LogHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.common.tools.ToastUtil
import com.yidianling.user.LoginUtils
import com.yidianling.user.StatusUtils
......@@ -91,21 +91,21 @@ class LoginPresenterImpl(view: ILoginContract.View) :
)
}
mView.autoLoginSuccess()
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, "通过一键认证服务登录成功")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.LOGIN, "通过一键认证服务登录成功")
} else {
// ToastUtil.toastShort(it.msg)
mView.aliAuthFailed()
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, "通过一键认证服务登陆 失败 msg: ${it.msg}")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.LOGIN, "通过一键认证服务登陆 失败 msg: ${it.msg}")
}
}, {
//走验证码、密码登录
mView.aliAuthFailed()
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, "通过一键认证服务登陆 Error msg: ${it.message}")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.LOGIN, "通过一键认证服务登陆 Error msg: ${it.message}")
})
}
......@@ -263,14 +263,14 @@ class LoginPresenterImpl(view: ILoginContract.View) :
if (media == SHARE_MEDIA.QQ) "qq" else "weixin"
)
LogHelper.getInstance().writeLogSync(media.getName() + "登录成功")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, media.getName() + "登录成功")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.LOGIN, media.getName() + "登录成功")
}, {
mView.dismissProgressView()
YdlCommonOut.showToast(it.message!!)
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, media.getName() + "登录失败")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.LOGIN, media.getName() + "登录失败")
})
}
......
......@@ -14,8 +14,8 @@ import android.widget.LinearLayout
import com.alipay.sdk.app.PayTask
import com.tencent.mm.opensdk.modelpay.PayReq
import com.tencent.mm.opensdk.openapi.WXAPIFactory
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.common.tools.RxImageTool
import com.yidianling.ydl_pay.R
import com.yidianling.ydl_pay.common.bean.*
......@@ -211,7 +211,7 @@ class CommonPayDialog : Dialog {
private fun getOrderInfo() {
if (!NetUtils.isConnected(activity)) {
ToastHelper.show(activity, activity.getString(R.string.net_error))
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "获取下单信息,无网络")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "获取下单信息,无网络")
// progress.visibility = View.GONE
dismissProgressDialog()
return
......@@ -230,18 +230,18 @@ class CommonPayDialog : Dialog {
progress_layout.visibility = View.GONE
view_pager.visibility = View.VISIBLE
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "获取下单信息,成功")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "获取下单信息,成功")
updateDataOnView(it.data)
} else {
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.PAY, "获取下单信息data=null msg: ${it.msg}")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.PAY, "获取下单信息data=null msg: ${it.msg}")
ToastHelper.show(activity, it.msg)
// progress.visibility = View.GONE
}
} else {
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.PAY, "获取下单信息code!=200 msg: ${it.msg}")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.PAY, "获取下单信息code!=200 msg: ${it.msg}")
ToastHelper.show(activity, it.msg)
// progress.visibility = View.GONE
}
......@@ -249,8 +249,8 @@ class CommonPayDialog : Dialog {
dismissProgressDialog()
// progress.visibility = View.GONE
ToastHelper.show(activity, e.message!!)
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.PAY, "获取下单信息error e:${e.message}")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.PAY, "获取下单信息error e:${e.message}")
})
}
......@@ -436,7 +436,7 @@ class CommonPayDialog : Dialog {
}
bean.orderType = payBusinessType.toString()
bean.payType = useMoneyType.toString()
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"创建订单,支付方式payWay:$payWay---payMoney:$payMoney----useMoneyType:$useMoneyType"
)
......@@ -449,7 +449,7 @@ class CommonPayDialog : Dialog {
if (it.code == 200) {
if (it.data != null) {
if (it.data.payStatus) {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"创建订单,支付成功"
)
......@@ -494,7 +494,7 @@ class CommonPayDialog : Dialog {
@SuppressLint("CheckResult")
private fun getAliPayOrderId(payId: String, isThreePay: Int) {
if (!NetUtils.isConnected(activity)) {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"支付宝支付:无网络"
)
......@@ -509,13 +509,13 @@ class CommonPayDialog : Dialog {
.subscribeOn(Schedulers.io())
.subscribe({
if (it.data != null) {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"支付宝支付:无网络"
)
aliPay(it.data.aliSign)
} else {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"支付宝支付:data = null msg: ${it.msg} "
)
......@@ -525,7 +525,7 @@ class CommonPayDialog : Dialog {
dismissProgressDialog()
}
}, {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"支付宝支付:error message: ${it.message} localizedMessage: ${it.localizedMessage}"
)
......@@ -541,7 +541,7 @@ class CommonPayDialog : Dialog {
val result = alipay.payV2(aliSign, true)
val payResult = PayResult(result)
if ("9000" == payResult.resultStatus) {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"支付宝支付:支付成功"
)
......@@ -552,7 +552,7 @@ class CommonPayDialog : Dialog {
}
dismissProgressDialog()
} else {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"支付宝支付:resultStatus != 9000 memo${payResult.memo} "
)
......@@ -569,7 +569,7 @@ class CommonPayDialog : Dialog {
@SuppressLint("CheckResult")
private fun getWeiXinPayOrderId(payId: String, isThreePay: Int, merchantType: String) {
if (!NetUtils.isConnected(activity)) {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"微信支付,无网络"
)
......@@ -586,7 +586,7 @@ class CommonPayDialog : Dialog {
if (it.data != null) {
weixinPay(it.data.option)
} else {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"微信支付data=null ${it.msg}"
)
......@@ -596,7 +596,7 @@ class CommonPayDialog : Dialog {
dismissProgressDialog()
}
}, {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"微信支付,异常:message:${it.message}----localizedMessage:${it.localizedMessage}"
)
......@@ -633,7 +633,7 @@ class CommonPayDialog : Dialog {
.subscribe({
dismissProgressDialog()
if (it.data != null && it.code == 0) {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"余额支付:成功"
)
......@@ -642,7 +642,7 @@ class CommonPayDialog : Dialog {
dismiss()
}
} else {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"余额支付:失败 msg:${it.msg}"
)
......@@ -651,7 +651,7 @@ class CommonPayDialog : Dialog {
}
}
}, {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"余额支付:ERROR message:${it.message} localizedMessage: ${it.localizedMessage}"
)
......@@ -666,7 +666,7 @@ class CommonPayDialog : Dialog {
fun onEvent(event: WeiXinPayStatusEvent) {
dismissProgressDialog()
if (event.success) {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"微信支付成功"
)
......@@ -674,7 +674,7 @@ class CommonPayDialog : Dialog {
listener!!.onSuccesed()
dismiss()
} else {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"微信支付:失败 msg:${event.msg}"
)
......
......@@ -18,9 +18,9 @@ import com.ydl.ydlcommon.data.PlatformDataManager
import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.data.http.ThrowableConsumer
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.log.LogHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.ToastUtil
import com.yidianling.im.api.service.IImService
......@@ -553,7 +553,7 @@ class PayActivity : BaseActivity() {
* 点击支付
*/
private fun onClickPay() {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "点击支付")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "点击支付")
when (inlet) {
INLET_NORMAL -> {
//正常入口
......@@ -619,7 +619,7 @@ class PayActivity : BaseActivity() {
if (null == payParams) {
return
}
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "进入充值, 0微信充值,其他支付宝充值:$select")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "进入充值, 0微信充值,其他支付宝充值:$select")
HttpUtils.recharge(RechargeParam(payParams!!.needPay.toInt().toString()))
.subscribeOn(Schedulers.io())
......@@ -639,7 +639,7 @@ class PayActivity : BaseActivity() {
.doOnSubscribe { showProgressDialog("") }
.doAfterTerminate { dismissProgressDialog() }
.subscribe(Consumer {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "支付成功")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "支付成功")
LogHelper.getInstance().writeLogSync("支付成功")
ToastUtil.toastShort("支付成功")
......@@ -652,7 +652,7 @@ class PayActivity : BaseActivity() {
override fun accept(msg: String) {
ToastUtil.toastShort(msg)
LogHelper.getInstance().writeLogSync("支付失败$msg")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "支付失败$msg")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "支付失败$msg")
}
})
......@@ -665,18 +665,18 @@ class PayActivity : BaseActivity() {
when (inlet) {
INLET_NORMAL -> {
//正常入口
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "余额支付 正常入口")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "余额支付 正常入口")
balancePayById(payParams!!.payId)
}
INLET_TEST -> {
//测评入口
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "余额支付 测评入口")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "余额支付 测评入口")
balancePayById(testAddOrderBean!!.payId!!)
}
else -> {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "余额支付")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "余额支付")
balancePayById(payParams!!.payId)
}
......@@ -700,7 +700,7 @@ class PayActivity : BaseActivity() {
.doAfterTerminate { dismissProgressDialog() }
.subscribe(Consumer {
LogHelper.getInstance().writeLogSync("支付成功")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "余额支付:支付成功")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "余额支付:支付成功")
ToastUtil.toastShort("支付成功")
setResult(Activity.RESULT_OK)
finish()
......@@ -708,7 +708,7 @@ class PayActivity : BaseActivity() {
override fun accept(msg: String) {
ToastUtil.toastShort(msg)
LogHelper.getInstance().writeLogSync("支付失败:$msg")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "余额支付:支付失败:$msg")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "余额支付:支付失败:$msg")
}
})
......@@ -719,7 +719,7 @@ class PayActivity : BaseActivity() {
*/
@SuppressLint("CheckResult")
private fun appPay() {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "微信支付 0 其他支付宝支付 select:${select}")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "微信支付 0 其他支付宝支付 select:${select}")
Observable.just(select)
.subscribeOn(Schedulers.io())
......@@ -737,7 +737,7 @@ class PayActivity : BaseActivity() {
.doOnSubscribe { showProgressDialog("") }
.doAfterTerminate { dismissProgressDialog() }
.subscribe(Consumer {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "支付成功")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "支付成功")
LogHelper.getInstance().writeLogSync("支付成功")
setResult(Activity.RESULT_OK)
finish()
......@@ -745,7 +745,7 @@ class PayActivity : BaseActivity() {
override fun accept(msg: String) {
ToastUtil.toastShort(msg)
LogHelper.getInstance().writeLogSync("支付失败:$msg")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "支付失败:$msg")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "支付失败:$msg")
}
})
......@@ -758,20 +758,20 @@ class PayActivity : BaseActivity() {
return when (inlet) {
INLET_NORMAL -> {
//正常入口
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "微信支付:正常入口")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "微信支付:正常入口")
wxPayById(payParams!!.payId, payParams?.merchantType.toString())
}
INLET_TEST -> {
//测评入口
if (null != testAddOrderBean && !TextUtils.isEmpty(testAddOrderBean!!.payId!!)) {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "微信支付:测评入口")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "微信支付:测评入口")
wxPayById(testAddOrderBean!!.payId!!, payParams?.merchantType.toString())
} else {
null
}
}
else -> {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "微信支付")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "微信支付")
wxPayById(payParams!!.payId, payParams?.merchantType.toString())
}
}
......@@ -797,14 +797,14 @@ class PayActivity : BaseActivity() {
return when (inlet) {
INLET_NORMAL -> {
//正常入口
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "支付宝支付:正常入口")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "支付宝支付:正常入口")
aliPayById(payParams!!.payId)
}
INLET_TEST -> {
//测评入口
if (null != testAddOrderBean && !TextUtils.isEmpty(testAddOrderBean!!.payId!!)) {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "支付宝支付:测评入口")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "支付宝支付:测评入口")
aliPayById(testAddOrderBean!!.payId!!)
} else {
......@@ -812,7 +812,7 @@ class PayActivity : BaseActivity() {
}
}
else -> {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "支付宝支付")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "支付宝支付")
aliPayById(payParams!!.payId)
}
......
......@@ -7,8 +7,8 @@ import com.tencent.mm.opensdk.constants.Build
import com.tencent.mm.opensdk.modelpay.PayReq
import com.tencent.mm.opensdk.openapi.WXAPIFactory
import com.ydl.ydlcommon.data.http.CustomThrowable
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.ydl_pay.common.bean.CommonWXPayBean
import com.yidianling.ydl_pay.common.bean.PayResult
import com.yidianling.ydl_pay.pay.bean.PayStatus
......@@ -64,13 +64,13 @@ object RxPay {
"9000" == payResult.resultStatus -> {
it.onNext(PayStatus(true))
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "支付宝支付成功")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "支付宝支付成功")
}
else -> {
it.onError(CustomThrowable(payResult.memo))
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.PAY, "支付宝支付失败 memo:${payResult.memo}")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.PAY, "支付宝支付失败 memo:${payResult.memo}")
}
}
......
......@@ -9,10 +9,10 @@ import android.support.v7.app.AlertDialog
import android.view.*
import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.utils.StringUtils
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.log.LogHelper
import com.ydl.ydlcommon.utils.remind.ToastHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.ydl_pay.R
import com.yidianling.ydl_pay.common.bean.params.AliPayParam
import com.yidianling.ydl_pay.common.bean.params.WxPayParam
......@@ -162,7 +162,7 @@ class PayDialog : Dialog {
if (data?.payId == null) {
ToastHelper.show("支付id有误,请返回重试")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY,"支付id有误,请返回重试")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY,"支付id有误,请返回重试")
return
}
......@@ -190,12 +190,12 @@ class PayDialog : Dialog {
this.callBack?.onSuccess()
}
LogHelper.getInstance().writeLogSync("支付成功")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY,"支付成功")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY,"支付成功")
this.callBack?.onSuccess()
dismiss()
}, {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY,"支付失败:${it.message}")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY,"支付失败:${it.message}")
ToastHelper.show(it.message ?: "支付失败")
LogHelper.getInstance().writeLogSync("支付失败:${it.message}")
})
......@@ -206,7 +206,7 @@ class PayDialog : Dialog {
* @param payId 支付id
*/
private fun wxPayById(payId: String,merchantType:String): Observable<PayStatus> {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY,"微信支付")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY,"微信支付")
val bean = WxPayParam(payId, 1,merchantType)
return HttpUtils.wxPay(bean)
.compose(RxUtils.resultData())
......@@ -219,7 +219,7 @@ class PayDialog : Dialog {
* @param payId 支付Id
*/
private fun aliPayById(payId: String): Observable<PayStatus> {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY,"支付宝支付")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY,"支付宝支付")
var bean = AliPayParam(payId, 1)
return HttpUtils.getAliPayOrderId(bean)
......
......@@ -48,11 +48,11 @@ import com.ydl.ydlcommon.utils.LogUtil;
import com.ydl.ydlcommon.utils.NetWorkSpeedUtils;
import com.ydl.ydlcommon.utils.StatusBarUtils;
import com.ydl.ydlcommon.utils.URLUtils;
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper;
import com.ydl.ydlcommon.view.TitleBar;
import com.ydl.ydlcommon.view.dialog.YDLCommonDialog;
import com.ydl.ydlcommon.view.dialog.YDLShareDialog;
import com.ydl.ydlnet.utils.log.AliYunLogConfig;
import com.ydl.ydlnet.utils.log.AliYunLogHelper;
import com.yidianling.common.tools.RxDeviceTool;
import com.yidianling.common.tools.RxImageTool;
import com.yidianling.common.tools.ToastUtil;
......@@ -376,7 +376,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
rightText = getIntent().getStringExtra("rightText");
if (h5Params == null) {
ToastUtil.toastShort("参数错误");
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.WEB, "参数错误 Params == null");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.WEB, "参数错误 Params == null");
finish();
return;
}
......@@ -691,8 +691,8 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
safeTipView.setLocation("orderList");
}
if (title.contains("404") || title.contains("500") || title.contains("Error")) {
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.WEB, "页面错误 : url:" + view.getUrl() + "title:" + title);
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.WEB, "页面错误 : url:" + view.getUrl() + "title:" + title);
}
}
......@@ -784,8 +784,8 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
@Override
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
super.onReceivedError(view, errorCode, description, failingUrl);
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.WEB, "onReceivedError---- errorCode: " + errorCode + "----failingUrl:" + failingUrl);
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.WEB, "onReceivedError---- errorCode: " + errorCode + "----failingUrl:" + failingUrl);
loadFailed = true;
tb_title.setTitle("加载中");
if (wv_content != null) {
......@@ -895,8 +895,8 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
@Override
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
super.onReceivedError(view, errorCode, description, failingUrl);
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.WEB, "onReceivedError---- errorCode: " + errorCode + "----failingUrl:" + failingUrl);
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.WEB, "onReceivedError---- errorCode: " + errorCode + "----failingUrl:" + failingUrl);
tb_title.setTitle("加载中");
loadFailed = true;
if (wv_content != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment