Commit 325d7be9 by 刘鹏

feat: 专家状态代码提交,网络加入请求接口日志

parent ef6058b3
......@@ -8,7 +8,6 @@ import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.data.http.ThrowableConsumer
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.mvp.base.SimplePresenter
import com.ydl.ydlcommon.utils.AnimUtils
import com.ydl.ydlcommon.utils.RxLifecycleUtils
import com.ydl.ydlcommon.utils.remind.HttpErrorUtils
import com.yidianling.common.tools.RxAppTool
......@@ -251,15 +250,28 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
fieldsMap["is_free_today"] = true
fieldsMap["display_region"] = true
fieldsMap["has_servicefree_experience"] = true
//专家头像下方文案:如 忙碌;现在有空;今日可约;最近可约;已约满;休息中
fieldsMap["consult_display_status_str"] = true
//咨询显示状态:1.忙碌;2.现在有空;3.今日可约;4.最近可约;5.已约满;6.休息中
fieldsMap["consult_display_status"] = true
//私聊下方时间描述:如 最快可约今天19:00
fieldsMap["today_time_des"] = true
//服务方式:如 当面/视频
fieldsMap["attr_combine"] = true
//是否开启代聊:1开启,2关闭
fieldsMap["open_chat_agency"] = true
//年审
fieldsMap["audit_tag"] = true
map["fields"] = fieldsMap
val optionsMap = HashMap<String, Any?>()
optionsMap["search_scene_id"] = "doctor_main_search"
optionsMap["uid"] = ModularServiceManager.provide(IUserService::class.java).getUserInfo()?.uid
optionsMap["uid"] =
ModularServiceManager.provide(IUserService::class.java).getUserInfo()?.uid
optionsMap["ffrom"] = PlatformDataManager.getRam().getChannelName()
optionsMap["version"]= RxAppTool.getAppVersionName(BaseApp.getApp())
optionsMap["os_type"]= 2
if (extras!=null){
optionsMap["version"] = RxAppTool.getAppVersionName(BaseApp.getApp())
optionsMap["os_type"] = 2
if (extras != null) {
optionsMap["extras"] = extras
}
map["options"] = optionsMap
......
......@@ -156,7 +156,13 @@ class ExpertSearchAdapter(
//姓名
holder.tvName.text = itemBean.doctor_name
//年审
if (!TextUtils.isEmpty(itemBean.audit_tag)) {
holder.audit_tag.visibility = View.VISIBLE
holder.audit_tag.text = itemBean.audit_tag
} else {
holder.audit_tag.visibility = View.GONE
}
//省市
if (!TextUtils.isEmpty(itemBean.display_region)) {
holder.tvCity.text = itemBean.display_region
......@@ -422,6 +428,9 @@ class ExpertSearchAdapter(
//专家姓名
val tvName = itemView.tvName!!
//年审
val audit_tag = itemView.audit_tag!!
//头像下方文案
val consult_display_status_str = itemView.consult_display_status_str!!
......
......@@ -81,6 +81,8 @@ data class ExpertServiceItem(
/***0:关闭代聊,1:开启代聊*/
val open_chat_agency: Int,
/***年审*/
val audit_tag: String,
) {
......@@ -107,7 +109,8 @@ data class ExpertServiceItem(
consult_display_status_str = "",
today_time_des = "",
attr_combine = "",
open_chat_agency = 0
open_chat_agency = 0,
audit_tag = ""
)
}
......
......@@ -61,14 +61,16 @@
tools:text="罗静" />
<TextView
android:id="@+id/tv_ns"
android:id="@+id/audit_tag"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:background="@drawable/consultant_ns_bg"
android:text="2021年审"
android:textColor="@color/color_62636F"
android:textSize="10dp"
tools:text="2022年审"
tools:visibility="visible"
android:visibility="gone"
app:layout_constraintBaseline_toBaselineOf="@id/tvName"
app:layout_constraintLeft_toRightOf="@id/tvName" />
......@@ -155,7 +157,7 @@
android:id="@+id/ll_tags"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginTop="10dp"
android:gravity="center_vertical"
android:orientation="horizontal"
app:layout_constraintLeft_toLeftOf="@id/tvName"
......@@ -168,6 +170,7 @@
android:layout_height="wrap_content"
android:layout_alignTop="@+id/tvName"
android:textColor="@color/color_ef8a4a"
android:layout_marginTop="12dp"
android:textSize="@dimen/platform_dp_14"
app:layout_constraintLeft_toLeftOf="@id/tvName"
app:layout_constraintTop_toBottomOf="@id/ll_tags"
......
......@@ -4,6 +4,7 @@ import android.annotation.SuppressLint
import android.content.Context
import android.os.Build
import android.text.TextUtils
import android.util.Log
import com.google.gson.Gson
import com.ydl.devicesidlib.DeviceIDHelper
import com.ydl.devicesidlib.Utils
......@@ -259,14 +260,32 @@ class HttpConfig {
}
val message = originalResponse.message()
val api = request.url().encodedPath()
ActionCountUtils.baiDuCount("ydl_user_error_business","error_log",api,params,message)
ActionCountUtils.baiDuCount(
"ydl_user_error_business",
"error_log",
api,
params,
message
)
//阿里云忽略埋点接口
if (!api.contains("maidian/writeMaiDianData")){
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.API, "error_log---api:$api---params:$params ---- message:$message")
}else{
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.API, "writeMaiDianDataError:$api---params:$params ---- message:$message")
if (!api.contains("maidian/writeMaiDianData")) {
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.API,
"error_log---api:$api---params:$params ---- message:$message"
)
} else {
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.API,
"writeMaiDianDataError:$api---params:$params ---- message:$message"
)
}
}
} else {
Log.e(
"YDL",
"\n---------------------------------------------------------------------------\n" +
"| 请求地址:" + request.url() + " |\n--------------------------------------------------------------------------\n"
)
}
originalResponse
}
......
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