pk房完成,剩余禁止对方麦未完成
拍卖房完成 点歌房完成,音乐播放需要测试
This commit is contained in:
@@ -23,6 +23,11 @@ android {
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
ndk {
|
||||
// 移除 abiFilters 或仅保留你需要的架构
|
||||
abiFilters "armeabi-v7a", "arm64-v8a", "x86_64"
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
@@ -91,7 +96,8 @@ dependencies {
|
||||
|
||||
api(libs.databinding.runtime.v702)
|
||||
|
||||
api(libs.pictureselector.picture.library)
|
||||
// api(libs.pictureselector.picture.library)
|
||||
api('io.github.lucksiege:pictureselector:v3.11.2')
|
||||
api(libs.com.github.bumptech.glide.glide)
|
||||
// api(libs.glide.compiler)
|
||||
|
||||
@@ -150,6 +156,13 @@ dependencies {
|
||||
api("com.liulishuo.okdownload:okdownload:1.0.7")
|
||||
|
||||
api('com.zlc.glide:webpdecoder:1.6.4.9.0')
|
||||
api('com.jungly:gridPasswordView:0.3')
|
||||
api('com.cpiz.bubbleview:bubbleview:1.0.2')
|
||||
|
||||
// 集成音频 SDK声网
|
||||
// api('io.agora.rtc:voice-sdk:4.5.2')
|
||||
api( 'io.agora.rtc:agora-special-full:4.1.1.23')
|
||||
api( 'com.github.AgoraIO-Community:LyricsView:1.1.3')
|
||||
|
||||
//腾讯im
|
||||
// api project(':tuiconversation')
|
||||
@@ -158,6 +171,17 @@ dependencies {
|
||||
annotationProcessor 'com.google.auto.service:auto-service:1.1.1'
|
||||
api files('libs/WbCloudFaceLiveSdk-face-v6.6.2-8e4718fc.aar')
|
||||
api files('libs/WbCloudNormal-v5.1.10-4e3e198.aar')
|
||||
// 房间引擎
|
||||
api "io.trtc.uikit:rtc_room_engine:latest.release"
|
||||
// rtc room engine 依赖 trtc sdk 和 im sdk
|
||||
api "com.tencent.liteav:LiteAVSDK_Professional:latest.release"
|
||||
api "com.tencent.imsdk:imsdk-plus:latest.release"
|
||||
//悬浮框
|
||||
api"io.github.petterpx:floatingx:2.3.5"
|
||||
// system浮窗&&compose时需要导入 https://github.com/Petterpx/FloatingX/
|
||||
// 记得AppHelper里调用 enableComposeSupport()
|
||||
api 'io.github.petterpx:floatingx-compose:2.3.5'
|
||||
|
||||
//2. 云normal SDK,
|
||||
//aar的名称,例如:WbCloudNormal-v5.1.10-123456789.aar,填入 'WbCloudNormal-v5.1.10-123456789.aar'
|
||||
}
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
|
||||
<application android:allowBackup="true">
|
||||
<service
|
||||
android:name=".http.FloatingWindowService"
|
||||
android:enabled="true"
|
||||
android:exported="true"></service>
|
||||
|
||||
<activity
|
||||
android:name=".activity.WebViewActivity"
|
||||
android:exported="false" />
|
||||
|
||||
BIN
moduleUtil/src/main/assets/gg.mp3
Normal file
BIN
moduleUtil/src/main/assets/gg.mp3
Normal file
Binary file not shown.
BIN
moduleUtil/src/main/assets/hh.mp3
Normal file
BIN
moduleUtil/src/main/assets/hh.mp3
Normal file
Binary file not shown.
BIN
moduleUtil/src/main/assets/mmd.mp3
Normal file
BIN
moduleUtil/src/main/assets/mmd.mp3
Normal file
Binary file not shown.
BIN
moduleUtil/src/main/assets/ripple.svga
Normal file
BIN
moduleUtil/src/main/assets/ripple.svga
Normal file
Binary file not shown.
BIN
moduleUtil/src/main/assets/ripple3695.svga
Normal file
BIN
moduleUtil/src/main/assets/ripple3695.svga
Normal file
Binary file not shown.
BIN
moduleUtil/src/main/assets/xs.mp3
Normal file
BIN
moduleUtil/src/main/assets/xs.mp3
Normal file
Binary file not shown.
BIN
moduleUtil/src/main/assets/zs.mp3
Normal file
BIN
moduleUtil/src/main/assets/zs.mp3
Normal file
Binary file not shown.
@@ -0,0 +1,20 @@
|
||||
package com.qxcm.moduleutil;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RoomAutionTimeBean {
|
||||
private int days; // 天数,例如 1, 3, 5, 10, 15, 20
|
||||
private boolean isSelected;
|
||||
|
||||
public RoomAutionTimeBean(int days) {
|
||||
this.days = days;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取对应小时数(1天 = 24小时)
|
||||
*/
|
||||
public int getHours() {
|
||||
return days * 24;
|
||||
}
|
||||
}
|
||||
@@ -43,7 +43,6 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
|
||||
setContentView(getLayoutId());
|
||||
mBinding = DataBindingUtil.setContentView(this, getLayoutId());
|
||||
mBinding.setLifecycleOwner(this);
|
||||
|
||||
ARouter.getInstance().inject(this);
|
||||
BarUtils.setStatusBarLightMode(this, isLightMode());
|
||||
BarUtils.transparentStatusBar(this);
|
||||
@@ -51,16 +50,7 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
|
||||
initData();
|
||||
initCompleted();
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
if (!Settings.canDrawOverlays(this)) {
|
||||
Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
|
||||
Uri.parse("package:" + getPackageName()));
|
||||
startActivityForResult(intent, 100);
|
||||
}
|
||||
} else {
|
||||
// 对于低于 Android 6.0 的设备,无需请求悬浮窗权限
|
||||
// 可在此处添加针对旧版本的处理逻辑(如果需要)
|
||||
}
|
||||
|
||||
|
||||
// 动态判断是否包含 @Subscribe 注解的方法
|
||||
boolean hasSubscribeMethods = false;
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package com.qxcm.moduleutil.activity;
|
||||
|
||||
import android.Manifest;
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.os.Build;
|
||||
import android.view.Gravity;
|
||||
@@ -15,28 +17,40 @@ import android.view.ViewTreeObserver;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.databinding.ViewDataBinding;
|
||||
|
||||
import com.blankj.utilcode.util.FragmentUtils;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.qxcm.moduleutil.R;
|
||||
import com.qxcm.moduleutil.base.CommonAppContext;
|
||||
import com.qxcm.moduleutil.bean.UserBean;
|
||||
import com.qxcm.moduleutil.bean.UserInfo;
|
||||
import com.qxcm.moduleutil.utils.LanguageUtil;
|
||||
import com.qxcm.moduleutil.utils.location.LocationProvider;
|
||||
import com.qxcm.moduleutil.utils.location.LocationServiceFactory;
|
||||
import com.qxcm.moduleutil.utils.location.SystemLocationProvider;
|
||||
import com.tencent.imsdk.v2.V2TIMCallback;
|
||||
import com.tencent.imsdk.v2.V2TIMManager;
|
||||
import com.tencent.imsdk.v2.V2TIMUserFullInfo;
|
||||
import com.tencent.qcloud.tuicore.TUILogin;
|
||||
import com.tencent.qcloud.tuicore.interfaces.TUICallback;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
public abstract class BaseMvpActivity<P extends IPresenter, VDB extends ViewDataBinding> extends BaseAppCompatActivity<VDB> implements IView<Activity> {
|
||||
public abstract class BaseMvpActivity<P extends IPresenter, VDB extends ViewDataBinding> extends BaseAppCompatActivity<VDB> implements
|
||||
IView<Activity> , LocationProvider.LocationCallback
|
||||
{
|
||||
|
||||
protected P MvpPre;
|
||||
|
||||
protected abstract P bindPresenter();
|
||||
private String city1;
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
@@ -87,9 +101,55 @@ public abstract class BaseMvpActivity<P extends IPresenter, VDB extends ViewData
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
LogUtils.e("@@@","成功");
|
||||
|
||||
initLocation();
|
||||
}
|
||||
});
|
||||
}
|
||||
private SystemLocationProvider locationProvider;
|
||||
private void initLocation() {
|
||||
if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||
|
||||
// 请求定位权限
|
||||
ActivityCompat.requestPermissions(
|
||||
(Activity) this,
|
||||
new String[]{
|
||||
android.Manifest.permission.ACCESS_FINE_LOCATION,
|
||||
Manifest.permission.ACCESS_COARSE_LOCATION
|
||||
},
|
||||
1001 // 自定义常量,比如 1001
|
||||
);
|
||||
}
|
||||
locationProvider = new SystemLocationProvider();
|
||||
|
||||
// 请求一次性的位置信息
|
||||
locationProvider.getLastKnownLocation(this, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLocationReceived(double latitude, double longitude, String city) {
|
||||
LogUtils.e("当前位置:" + city);
|
||||
city1=city;
|
||||
EventBus.getDefault().post(city1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(String errorMessage) {
|
||||
LogUtils.e("定位失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
|
||||
if (requestCode == 1001) {
|
||||
if (locationProvider==null) {
|
||||
locationProvider = new SystemLocationProvider();
|
||||
}
|
||||
locationProvider.getLastKnownLocation(this, this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void userInfoEvent(UserInfo event) {
|
||||
@@ -174,7 +234,6 @@ public abstract class BaseMvpActivity<P extends IPresenter, VDB extends ViewData
|
||||
animator.setDuration(duration);
|
||||
animator.addUpdateListener(animation -> {
|
||||
float value = (float) animation.getAnimatedValue();
|
||||
LogUtils.d("PiaoPing", "translationX = " + value);
|
||||
});
|
||||
animator.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.qxcm.moduleutil.adapter;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.qxcm.moduleutil.R;
|
||||
import com.qxcm.moduleutil.bean.RechargeBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 充值adapter
|
||||
*/
|
||||
public class BalanceRechargeAdapter extends BaseMultiItemQuickAdapter<RechargeBean, BaseViewHolder> {
|
||||
private int selectedPosition = -1;
|
||||
private OnRechargeItemClickListener listener;
|
||||
private InputBoxVisibilityListener inputBoxVisibilityListener;
|
||||
|
||||
public static final int ITEM_TYPE_NORMAL = 0;
|
||||
public static final int ITEM_TYPE_FOOTER = 1;
|
||||
|
||||
public BalanceRechargeAdapter(@NonNull List<RechargeBean> data) {
|
||||
super(data);
|
||||
// 初始化 item 类型
|
||||
addItemType(ITEM_TYPE_NORMAL, R.layout.rv_item_balance_recharge);
|
||||
addItemType(ITEM_TYPE_FOOTER, R.layout.rv_item_footer);
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
RechargeBean item = getData().get(position);
|
||||
return item.getItemViewType(); // 使用 bean 中的 itemViewType
|
||||
}
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, RechargeBean item) {
|
||||
int type = helper.getItemViewType();
|
||||
|
||||
if (type == ITEM_TYPE_NORMAL) {
|
||||
// 正常 item 显示逻辑
|
||||
helper.setText(R.id.tv_gold_num, item.getGoldNum());
|
||||
helper.setText(R.id.tv_money, String.format("¥%s", item.getMoney()));
|
||||
if (selectedPosition == helper.getAdapterPosition()) {
|
||||
helper.setBackgroundRes(R.id.cl_item, com.qxcm.moduleutil.R.drawable.bg_10_white_sele);
|
||||
} else {
|
||||
helper.setBackgroundRes(R.id.cl_item, com.qxcm.moduleutil.R.drawable.bg_r10_white);
|
||||
}
|
||||
|
||||
helper.getView(R.id.cl_item).setOnClickListener(v -> {
|
||||
selectedPosition = helper.getAdapterPosition();
|
||||
if (listener != null) {
|
||||
listener.onClick(item);
|
||||
}
|
||||
notifyDataSetChanged();
|
||||
|
||||
// 隐藏输入框
|
||||
if (inputBoxVisibilityListener != null) {
|
||||
inputBoxVisibilityListener.onInputBoxVisibilityChanged(false);
|
||||
}
|
||||
});
|
||||
} else if (type == ITEM_TYPE_FOOTER) {
|
||||
helper.setText(R.id.tv_gold_num, "自定义");
|
||||
helper.getView(R.id.tv_gold_num).setOnClickListener(v -> {
|
||||
clearSelect(); // 清除所有选中状态
|
||||
notifyDataSetChanged();
|
||||
|
||||
// 显示输入框
|
||||
if (inputBoxVisibilityListener != null) {
|
||||
inputBoxVisibilityListener.onInputBoxVisibilityChanged(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public interface OnRechargeItemClickListener {
|
||||
void onClick(RechargeBean rechargeBean);
|
||||
}
|
||||
|
||||
public void setListener(OnRechargeItemClickListener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
public interface InputBoxVisibilityListener {
|
||||
void onInputBoxVisibilityChanged(boolean isVisible);
|
||||
}
|
||||
|
||||
public void setInputBoxVisibilityListener(InputBoxVisibilityListener listener) {
|
||||
this.inputBoxVisibilityListener = listener;
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消所有选中
|
||||
*/
|
||||
public void clearSelect() {
|
||||
selectedPosition = -1;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,7 @@ import android.view.ViewTreeObserver;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
@@ -29,6 +30,7 @@ import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.bean.HeatedBean;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.qxcm.moduleutil.utils.MeHeadView;
|
||||
import com.qxcm.moduleutil.utils.NumberFormatUtils;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
import com.qxcm.moduleutil.widget.MyGridView;
|
||||
import com.qxcm.moduleutil.widget.img.FullScreenUtil;
|
||||
@@ -37,10 +39,15 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class CirleListAdapter extends BaseQuickAdapter<CircleListBean, BaseViewHolder> {
|
||||
public CirleListAdapter() {
|
||||
super(R.layout.item_cirle_list);
|
||||
}
|
||||
|
||||
public static final int PAGE_HOME = 0; // 首页
|
||||
public static final int PAGE_SEARCH = 2; // 点击头像进入的
|
||||
private int mPageType;
|
||||
|
||||
public CirleListAdapter(int pageType) {
|
||||
super(R.layout.item_cirle_list);
|
||||
this.mPageType = pageType;
|
||||
}
|
||||
public interface OnItemClickListener {
|
||||
void onDianzanClick(CircleListBean item);
|
||||
|
||||
@@ -53,6 +60,8 @@ public class CirleListAdapter extends BaseQuickAdapter<CircleListBean, BaseViewH
|
||||
void onPinglunClick(CircleListBean item);
|
||||
|
||||
void onRelaClick(CircleListBean item);
|
||||
|
||||
void onGensui(CircleListBean item);
|
||||
}
|
||||
|
||||
private OnItemClickListener mListener;
|
||||
@@ -69,6 +78,7 @@ public class CirleListAdapter extends BaseQuickAdapter<CircleListBean, BaseViewH
|
||||
.addOnClickListener(R.id.diandian)
|
||||
.addOnClickListener(R.id.pinglun)
|
||||
.addOnClickListener(R.id.rela)
|
||||
.addOnClickListener(R.id.gensui)
|
||||
.addOnClickListener(com.qxcm.moduleutil.R.id.zs);
|
||||
|
||||
//先让单图,多图,音频的布局显示
|
||||
@@ -84,7 +94,9 @@ public class CirleListAdapter extends BaseQuickAdapter<CircleListBean, BaseViewH
|
||||
|
||||
// 设置点击回调
|
||||
helper.getView(com.qxcm.moduleutil.R.id.dianzan).setOnClickListener(v -> {
|
||||
if (mListener != null) mListener.onDianzanClick(item);
|
||||
if (mListener != null){
|
||||
mListener.onDianzanClick(item);
|
||||
}
|
||||
});
|
||||
|
||||
helper.getView(com.qxcm.moduleutil.R.id.dy_head_image).setOnClickListener(v -> {
|
||||
@@ -106,6 +118,9 @@ public class CirleListAdapter extends BaseQuickAdapter<CircleListBean, BaseViewH
|
||||
helper.getView(R.id.rela).setOnClickListener(v -> {
|
||||
if (mListener != null) mListener.onRelaClick(item);
|
||||
});
|
||||
helper.getView(R.id.gensui).setOnClickListener(v -> {
|
||||
if (mListener != null) mListener.onGensui(item);
|
||||
});
|
||||
// 为整个 item 设置点击事件
|
||||
helper.itemView.setOnClickListener(v -> {
|
||||
if (mListener != null) {
|
||||
@@ -196,28 +211,41 @@ public class CirleListAdapter extends BaseQuickAdapter<CircleListBean, BaseViewH
|
||||
|
||||
if (item.getIs_like() == 1) {
|
||||
helper.setImageResource(R.id.dianzan_image, R.mipmap.dongtai_hudong_yidianzan);
|
||||
helper.setText(R.id.dy_fabulous, String.valueOf(Integer.parseInt(item.getLike_num()) + 1));
|
||||
// helper.setText(R.id.dy_fabulous, String.valueOf(Integer.parseInt(item.getLike_num()) + 1));
|
||||
} else {
|
||||
helper.setImageResource(R.id.dianzan_image, com.qxcm.moduleutil.R.mipmap.dongtai_hudong_dianzan);
|
||||
helper.setText(R.id.dy_fabulous, item.getLike_num());
|
||||
// helper.setText(R.id.dy_fabulous, item.getLike_num());
|
||||
}
|
||||
|
||||
if (item.getIs_room() != null && item.getIs_room().equals("0")) {
|
||||
helper.setText(R.id.dy_fabulous, item.getLike_num());
|
||||
|
||||
if (mPageType==PAGE_SEARCH){
|
||||
helper.setVisible(R.id.gensui, false);
|
||||
} else if (item.getIs_room() == null) {
|
||||
helper.setVisible(R.id.gensui, false);
|
||||
} else {
|
||||
helper.setVisible(R.id.gensui, true);
|
||||
}else {
|
||||
if (item.getUser_id()==SpUtil.getUserId()){
|
||||
helper.setVisible(R.id.gensui, false);
|
||||
}else {
|
||||
helper.setVisible(R.id.gensui, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (item.getRoom_id() != null && !item.getRoom_id().equals("0")) {
|
||||
helper.setText(R.id.gensui, "跟随");
|
||||
} else if (item.getRoom_id() == null || item.getRoom_id().equals("0")){
|
||||
helper.setText(R.id.gensui, "私信");
|
||||
}
|
||||
//分享数
|
||||
helper.setText(R.id.dy_zs, item.getRewards_num() != null ? item.getRewards_num() : "0");
|
||||
// helper.setText(R.id.dy_zs, item.getRewards_num() != null ? item.getRewards_num() : "0");
|
||||
double rewardNum = item.getRewards_num() != null ? Double.parseDouble(item.getRewards_num()) : 0;
|
||||
helper.setText(R.id.dy_zs, NumberFormatUtils.formatRewardNumber(rewardNum));
|
||||
|
||||
//评论数
|
||||
helper.setText(R.id.dy_comment, item.getComment_num() + "");
|
||||
|
||||
//时间
|
||||
if (!item.getCreatetime().isEmpty()) {
|
||||
try {
|
||||
helper.setText(R.id.dy_time_text, "发布于:" + TimeUtils.millis2String(Long.parseLong(item.getCreatetime()) * 1000));
|
||||
helper.setText(R.id.dy_time_text, TimeUtils.millis2String(Long.parseLong(item.getCreatetime()) * 1000));
|
||||
} catch (NumberFormatException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -239,6 +267,8 @@ public class CirleListAdapter extends BaseQuickAdapter<CircleListBean, BaseViewH
|
||||
recyclerView.setOnItemClickListener((parent, view, position, id) -> {
|
||||
FullScreenUtil.showFullScreenDialog(mContext, position, oneImageYuanJiaoAdapter.getList_adapter());
|
||||
});
|
||||
}else {
|
||||
helper.getView(R.id.dy_image_recyc).setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (item.getLike_list() == null){
|
||||
@@ -249,11 +279,39 @@ public class CirleListAdapter extends BaseQuickAdapter<CircleListBean, BaseViewH
|
||||
helper.getView(R.id.view).setVisibility(GONE);
|
||||
RecyclerView recyclerView= helper.getView(R.id.recycle_view);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false));
|
||||
LikeUserAdapter likeUserAdapter = new LikeUserAdapter();
|
||||
LikeUserAdapter<CircleListBean.LikeList> likeUserAdapter = new LikeUserAdapter<>();
|
||||
recyclerView.setAdapter(likeUserAdapter);
|
||||
likeUserAdapter.setNewData(item.getLike_list());
|
||||
helper.setText(R.id.pinglun_tv, item.getLike_num()+"人点赞");
|
||||
}
|
||||
|
||||
}
|
||||
public static final String PAYLOAD_LIKE = "like";
|
||||
|
||||
public void updateLikeStatusOnly(int position, int isLike) {
|
||||
notifyItemChanged(position, PAYLOAD_LIKE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull BaseViewHolder holder, int position, @NonNull List<Object> payloads) {
|
||||
if (payloads.isEmpty()) {
|
||||
onBindViewHolder(holder, position); // 全量绑定
|
||||
} else {
|
||||
for (Object payload : payloads) {
|
||||
if (payload.equals(PAYLOAD_LIKE)) {
|
||||
CircleListBean item = getData().get(position);
|
||||
if (item.getIs_like() == 1) {
|
||||
holder.setImageResource(R.id.dianzan_image, R.mipmap.dongtai_hudong_yidianzan);
|
||||
holder.setText(R.id.dy_fabulous, String.valueOf(Integer.parseInt(item.getLike_num()) + 1));
|
||||
} else {
|
||||
holder.setImageResource(R.id.dianzan_image, com.qxcm.moduleutil.R.mipmap.dongtai_hudong_dianzan);
|
||||
holder.setText(R.id.dy_fabulous, item.getLike_num());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -172,11 +172,11 @@ public class CommentAdapter extends RecyclerView.Adapter<CommentAdapter.CommentV
|
||||
}
|
||||
});
|
||||
|
||||
if (comment.getUser_id()!= SpUtil.getUserId()){
|
||||
btnReply.setVisibility(GONE);
|
||||
}else {
|
||||
btnReply.setVisibility(VISIBLE);
|
||||
}
|
||||
// if (comment.getUser_id()!= SpUtil.getUserId()){
|
||||
// btnReply.setVisibility(GONE);
|
||||
// }else {
|
||||
// btnReply.setVisibility(VISIBLE);
|
||||
// }
|
||||
|
||||
// 添加长按监听
|
||||
itemView.setOnLongClickListener(v -> {
|
||||
|
||||
@@ -0,0 +1,183 @@
|
||||
package com.qxcm.moduleutil.adapter;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
import android.util.Log;
|
||||
import android.view.GestureDetector;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.qxcm.moduleutil.R;
|
||||
import com.qxcm.moduleutil.bean.RoonGiftModel;
|
||||
import com.qxcm.moduleutil.event.RoomGiftClickToEvent;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.List;
|
||||
|
||||
public class GiftRoomAdapter extends BaseAdapter {
|
||||
private final List<RoonGiftModel> mDatas;
|
||||
private final LayoutInflater inflater;
|
||||
private final Context mContext;
|
||||
private final MyGestureDetector gestureDetector;
|
||||
private final String type;
|
||||
/**
|
||||
* 页数下标,从0开始(当前是第几页)
|
||||
*/
|
||||
private final int curIndex;
|
||||
/**
|
||||
* 每一页显示的个数
|
||||
*/
|
||||
private final int pageSize = 100;
|
||||
|
||||
public GiftRoomAdapter(Context context, List<RoonGiftModel> mDatas, int curIndex, String type) {
|
||||
inflater = LayoutInflater.from(context);
|
||||
this.mDatas = mDatas;
|
||||
this.curIndex = curIndex;
|
||||
this.mContext = context;
|
||||
this.type = type;
|
||||
this.gestureDetector = new MyGestureDetector(mContext);
|
||||
}
|
||||
|
||||
/**
|
||||
* 先判断数据集的大小是否足够显示满本页?mDatas.size() > (curIndex+1)*pageSize,
|
||||
* 如果够,则直接返回每一页显示的最大条目个数pageSize,
|
||||
* 如果不够,则有几项返回几,(mDatas.size() - curIndex * pageSize);(也就是最后一页的时候就显示剩余item)
|
||||
*/
|
||||
@Override
|
||||
public int getCount() {
|
||||
return mDatas.size() > (curIndex + 1) * pageSize ? pageSize : (mDatas.size() - curIndex * pageSize);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RoonGiftModel getItem(int position) {
|
||||
return mDatas.get(position + curIndex * pageSize);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
return position + (long) curIndex * pageSize;
|
||||
}
|
||||
|
||||
private static class MyGestureDetector extends GestureDetector {
|
||||
private static WeakReference<GiftRoomAdapter> sAdapter = new WeakReference<>(null);
|
||||
private static RoonGiftModel sGiftModel;
|
||||
|
||||
public void setGiftModel(GiftRoomAdapter adapter, RoonGiftModel gift) {
|
||||
sAdapter = new WeakReference<>(adapter);
|
||||
sGiftModel = gift;
|
||||
}
|
||||
|
||||
private static final SimpleOnGestureListener sSimpleOnGestureListener = new SimpleOnGestureListener() {
|
||||
@Override
|
||||
public boolean onSingleTapConfirmed(MotionEvent e) {
|
||||
EventBus.getDefault().post(new RoomGiftClickToEvent(sAdapter.get(), sGiftModel, 1));
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onDoubleTap(MotionEvent e) {
|
||||
EventBus.getDefault().post(new RoomGiftClickToEvent(sAdapter.get(), sGiftModel, 2));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
public MyGestureDetector(Context context) {
|
||||
super(context, sSimpleOnGestureListener);
|
||||
setOnDoubleTapListener(sSimpleOnGestureListener);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressLint({"SetTextI18n", "ClickableViewAccessibility"})
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
ViewHolder viewHolder;
|
||||
RoonGiftModel giftModel = getItem(position);
|
||||
if (convertView == null) {
|
||||
convertView = inflater.inflate(R.layout.item_gift_room, parent, false);
|
||||
viewHolder = new ViewHolder();
|
||||
viewHolder.tv_gift_name = (TextView) convertView.findViewById(R.id.tv_gift_name);
|
||||
viewHolder.tv_gift_price = (TextView) convertView.findViewById(R.id.tv_gift_price);
|
||||
viewHolder.iv_gift_pic = (ImageView) convertView.findViewById(R.id.iv_gift_pic);
|
||||
viewHolder.item_layout = (ConstraintLayout) convertView.findViewById(R.id.cl_gift);
|
||||
viewHolder.ivDownOn = (ImageView) convertView.findViewById(R.id.iv_down_on);
|
||||
viewHolder.cl_iv_down_on = (ConstraintLayout) convertView.findViewById(R.id.cl_iv_down_on);
|
||||
// viewHolder.tv_gift_num = convertView.findViewById(R.id.tv_gift_num);
|
||||
// viewHolder.tv_gift_change_love_values = convertView.findViewById(R.id.tv_gift_change_love_values);
|
||||
viewHolder.item_layout.setOnTouchListener((v, event) -> {
|
||||
gestureDetector.setGiftModel(GiftRoomAdapter.this, giftModel);
|
||||
gestureDetector.onTouchEvent(event);
|
||||
|
||||
return true;
|
||||
});
|
||||
convertView.setTag(viewHolder);
|
||||
} else {
|
||||
viewHolder = (ViewHolder) convertView.getTag();
|
||||
}
|
||||
/*
|
||||
* 在给View绑定显示的数据时,计算正确的position = position + curIndex * pageSize,
|
||||
*/
|
||||
// viewHolder.tv_gift_num.setVisibility(type.equals("1") ? View.VISIBLE : View.INVISIBLE);
|
||||
// viewHolder.tv_gift_change_love_values.setVisibility(View.GONE);
|
||||
|
||||
|
||||
//设置礼物名字
|
||||
viewHolder.tv_gift_name.setText(giftModel.getGift_name());
|
||||
//设置礼物价格
|
||||
String surplusTxt = giftModel.getGift_price();
|
||||
SpannableStringBuilder stringBuilder = new SpannableStringBuilder(surplusTxt);
|
||||
//ForegroundColorSpan 为文字前景色,BackgroundColorSpan为文字背景色
|
||||
ForegroundColorSpan redSpan = new ForegroundColorSpan(mContext.getResources().getColor(R.color.color_FFA9A9A9));
|
||||
stringBuilder.setSpan(redSpan, surplusTxt.length(), surplusTxt.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);//修改最后两个字体的颜色
|
||||
viewHolder.tv_gift_price.setText(stringBuilder);
|
||||
// viewHolder.item_layout.setTag(R.id.id_gift_tag, giftModel);
|
||||
|
||||
//加载礼物图片
|
||||
ImageUtils.loadImageView(giftModel.getBase_image(), viewHolder.iv_gift_pic);
|
||||
//设置选中后的样式
|
||||
|
||||
if (giftModel.isChecked()) {//被选中
|
||||
viewHolder.cl_iv_down_on.setBackgroundResource(R.mipmap.room_gift_bjx);
|
||||
viewHolder.ivDownOn.setVisibility(View.GONE);
|
||||
} else {
|
||||
viewHolder.ivDownOn.setVisibility(View.GONE);
|
||||
viewHolder.cl_iv_down_on.setBackgroundResource(0);
|
||||
}
|
||||
//设置
|
||||
// //设置礼物心动值
|
||||
// if (giftModel.getCardiac().equals("0")) {
|
||||
// viewHolder.tv_gift_change_love_values.setBackgroundResource(R.mipmap.room_gift_xin_dong_reduce);
|
||||
// viewHolder.tv_gift_change_love_values.setText(String.format("%s", giftModel.getCardiac()));
|
||||
// } else {
|
||||
// viewHolder.tv_gift_change_love_values.setBackgroundResource(R.mipmap.room_gift_xin_dong_add);
|
||||
// viewHolder.tv_gift_change_love_values.setText(String.format("+%s", giftModel.getCardiac()));
|
||||
// }
|
||||
// if (giftModel.isManghe()) {
|
||||
// viewHolder.tv_gift_change_love_values.setVisibility(View.GONE);
|
||||
// }
|
||||
|
||||
return convertView;
|
||||
}
|
||||
|
||||
|
||||
static class ViewHolder {
|
||||
public ConstraintLayout item_layout;
|
||||
public TextView tv_gift_name, tv_gift_price, tv_gift_num;
|
||||
public ImageView iv_gift_pic;
|
||||
public TextView tv_gift_change_love_values;
|
||||
public ImageView ivDownOn;
|
||||
public ConstraintLayout cl_iv_down_on;
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,8 @@ import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.qxcm.moduleutil.R;
|
||||
import com.qxcm.moduleutil.bean.RoonGiftModel;
|
||||
import com.qxcm.moduleutil.event.RoomGiftClickEvent;
|
||||
import com.qxcm.moduleutil.event.RoomGiftClickToEvent;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@@ -83,15 +85,13 @@ public class GiftTwoAdapter extends BaseAdapter {
|
||||
private static final SimpleOnGestureListener sSimpleOnGestureListener = new SimpleOnGestureListener() {
|
||||
@Override
|
||||
public boolean onSingleTapConfirmed(MotionEvent e) {
|
||||
Log.d("@@", "sGiftModel"+sGiftModel.toString());
|
||||
// EventBus.getDefault().post(new RoomGiftClickEvent(sAdapter.get(), sGiftModel, 1));
|
||||
EventBus.getDefault().post(new RoomGiftClickEvent(sAdapter.get(), sGiftModel, 1));
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onDoubleTap(MotionEvent e) {
|
||||
Log.d("@@", "sGiftModel"+sGiftModel.toString());
|
||||
// EventBus.getDefault().post(new RoomGiftClickEvent(sAdapter.get(), sGiftModel, 2));
|
||||
EventBus.getDefault().post(new RoomGiftClickEvent(sAdapter.get(), sGiftModel, 2));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -118,8 +118,8 @@ public class GiftTwoAdapter extends BaseAdapter {
|
||||
// viewHolder.tv_gift_num = convertView.findViewById(R.id.tv_gift_num);
|
||||
// viewHolder.tv_gift_change_love_values = convertView.findViewById(R.id.tv_gift_change_love_values);
|
||||
viewHolder.item_layout.setOnTouchListener((v, event) -> {
|
||||
// gestureDetector.setGiftModel(GiftTwoAdapter.this, (RoonGiftModel) v.getTag(R.id.id_gift_tag));
|
||||
// gestureDetector.onTouchEvent(event);
|
||||
gestureDetector.setGiftModel(GiftTwoAdapter.this, (RoonGiftModel) v.getTag(R.id.id_gift_tag));
|
||||
gestureDetector.onTouchEvent(event);
|
||||
|
||||
return true;
|
||||
});
|
||||
@@ -135,9 +135,9 @@ public class GiftTwoAdapter extends BaseAdapter {
|
||||
|
||||
RoonGiftModel giftModel = getItem(position);
|
||||
//设置礼物名字
|
||||
viewHolder.tv_gift_name.setText(giftModel.getName());
|
||||
viewHolder.tv_gift_name.setText(giftModel.getGift_name());
|
||||
//设置礼物价格
|
||||
String surplusTxt = giftModel.getPrice();
|
||||
String surplusTxt = giftModel.getGift_price();
|
||||
SpannableStringBuilder stringBuilder = new SpannableStringBuilder(surplusTxt);
|
||||
//ForegroundColorSpan 为文字前景色,BackgroundColorSpan为文字背景色
|
||||
ForegroundColorSpan redSpan = new ForegroundColorSpan(mContext.getResources().getColor(R.color.color_FFA9A9A9));
|
||||
@@ -146,11 +146,11 @@ public class GiftTwoAdapter extends BaseAdapter {
|
||||
// viewHolder.item_layout.setTag(R.id.id_gift_tag, giftModel);
|
||||
|
||||
//加载礼物图片
|
||||
ImageUtils.loadImageView(giftModel.getPicture(), viewHolder.iv_gift_pic);
|
||||
ImageUtils.loadImageView(giftModel.getBase_image(), viewHolder.iv_gift_pic);
|
||||
//设置选中后的样式
|
||||
|
||||
if (giftModel.isChecked()) {//被选中
|
||||
viewHolder.cl_iv_down_on.setBackgroundResource(R.drawable.gift_x);
|
||||
viewHolder.cl_iv_down_on.setBackgroundResource(R.mipmap.room_gift_bjx);
|
||||
viewHolder.ivDownOn.setVisibility(View.GONE);
|
||||
} else {
|
||||
viewHolder.ivDownOn.setVisibility(View.GONE);
|
||||
@@ -165,9 +165,9 @@ public class GiftTwoAdapter extends BaseAdapter {
|
||||
// viewHolder.tv_gift_change_love_values.setBackgroundResource(R.mipmap.room_gift_xin_dong_add);
|
||||
// viewHolder.tv_gift_change_love_values.setText(String.format("+%s", giftModel.getCardiac()));
|
||||
// }
|
||||
if (giftModel.isManghe()) {
|
||||
viewHolder.tv_gift_change_love_values.setVisibility(View.GONE);
|
||||
}
|
||||
// if (giftModel.isManghe()) {
|
||||
// viewHolder.tv_gift_change_love_values.setVisibility(View.GONE);
|
||||
// }
|
||||
|
||||
return convertView;
|
||||
}
|
||||
|
||||
@@ -1,36 +1,51 @@
|
||||
package com.qxcm.moduleutil.adapter;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.qxcm.moduleutil.R;
|
||||
import com.qxcm.moduleutil.base.BaseMvpFragment;
|
||||
import com.qxcm.moduleutil.bean.GiftLabelBean;
|
||||
import com.qxcm.moduleutil.bean.RewardUserBean;
|
||||
import com.qxcm.moduleutil.bean.RoonGiftModel;
|
||||
import com.qxcm.moduleutil.bean.WalletBean;
|
||||
import com.qxcm.moduleutil.bean.room.RoomAuction;
|
||||
import com.qxcm.moduleutil.databinding.RoomVpGiftBinding;
|
||||
import com.qxcm.moduleutil.event.GiftDoubleClickEvent;
|
||||
import com.qxcm.moduleutil.event.GiftUserRefreshEvent;
|
||||
import com.qxcm.moduleutil.event.RoomGiftClickEvent;
|
||||
import com.qxcm.moduleutil.event.RoomGiftClickToEvent;
|
||||
import com.qxcm.moduleutil.presenter.RewardGiftContacts;
|
||||
import com.qxcm.moduleutil.presenter.RewardGiftPresenter;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter, RoomVpGiftBinding> implements RewardGiftContacts.View {
|
||||
private String id;
|
||||
private GiftTwoAdapter mAdapter;
|
||||
private GiftRoomAdapter roomAdapter;
|
||||
private String tag;
|
||||
private int pageSize = 100;//一页显示的礼物个数
|
||||
private int pageCount;//页数
|
||||
private int type;//1:房间点击进入的;2:打赏进入的
|
||||
private List<RoonGiftModel> giftList=new ArrayList<>();
|
||||
|
||||
public static GiftTwoDetailsFragment newInstance(String type) {
|
||||
public static GiftTwoDetailsFragment newInstance(String id,int type) {
|
||||
|
||||
Bundle args = new Bundle();
|
||||
args.putString("id", type);
|
||||
args.putString("id", id);
|
||||
args.putInt("type", type);
|
||||
GiftTwoDetailsFragment fragment = new GiftTwoDetailsFragment();
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
@@ -40,12 +55,13 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
|
||||
public void initArgs(Bundle arguments) {
|
||||
super.initArgs(arguments);
|
||||
id = arguments.getString("id");
|
||||
type = arguments.getInt("type");
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
// EventBus.getDefault().register(this);
|
||||
EventBus.getDefault().register(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -55,13 +71,12 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
MvpPre.getGiftList(id);
|
||||
MvpPre.getGiftList(id,type);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -70,18 +85,60 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
|
||||
}
|
||||
|
||||
|
||||
|
||||
public RoonGiftModel getGiftList() {
|
||||
if (giftList != null) {
|
||||
for (RoonGiftModel item : giftList) {
|
||||
if (item.isChecked()) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public void setGiftList(List<RoonGiftModel> data) {
|
||||
|
||||
pageCount = (int) Math.ceil(data.size() * 1.0 / pageSize);
|
||||
for (int j = 0; j < pageCount; j++) {
|
||||
mAdapter = new GiftTwoAdapter(getActivity(), data, j, "0");
|
||||
mBinding.rvGift.setAdapter(mAdapter);
|
||||
public void setGiftList(List<RoonGiftModel> data,int type) {
|
||||
if (type == 1){
|
||||
giftList=new ArrayList<>();
|
||||
giftList.addAll(data);
|
||||
pageCount = (int) Math.ceil(data.size() * 1.0 / pageSize);
|
||||
for (int j = 0; j < pageCount; j++) {
|
||||
roomAdapter = new GiftRoomAdapter(getActivity(), data, j, "0");
|
||||
mBinding.rvGift.setAdapter(roomAdapter);
|
||||
}
|
||||
}else {
|
||||
giftList=new ArrayList<>();
|
||||
giftList.addAll(data);
|
||||
pageCount = (int) Math.ceil(data.size() * 1.0 / pageSize);
|
||||
for (int j = 0; j < pageCount; j++) {
|
||||
// mAdapter = new GiftTwoAdapter(getActivity(), data, j, "0");
|
||||
// mBinding.rvGift.setAdapter(mAdapter);
|
||||
roomAdapter = new GiftRoomAdapter(getActivity(), data, j, "0");
|
||||
mBinding.rvGift.setAdapter(roomAdapter);
|
||||
}
|
||||
}
|
||||
// EventBus.getDefault().post(new RoomGiftEvent(data));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void giveGift() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void wallet(WalletBean walletBean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reward_zone() {
|
||||
ToastUtils.showShort("打赏成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void roomAuctionJoin(RoomAuction.AuctionListBean auctionListBean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getRewardList(List<RewardUserBean> rewardUserBeanList) {
|
||||
|
||||
@@ -92,5 +149,97 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
|
||||
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onGiftClicRoomkEvent(RoomGiftClickEvent event) {
|
||||
if (giftList == null){
|
||||
giftList = new ArrayList<>();
|
||||
giftList.add(event.gift);
|
||||
}
|
||||
if (event.type == 1) {
|
||||
String id = event.gift.getGift_id();
|
||||
for (int i = 0; i < giftList.size(); i++) {
|
||||
RoonGiftModel giftModel = giftList.get(i);
|
||||
if (giftModel.getGift_id().equals(id)) {
|
||||
if (!giftModel.isChecked()) {
|
||||
EventBus.getDefault().post(new GiftUserRefreshEvent(giftModel.isCan_send_self(), event.type,event.gift));
|
||||
giftModel.setChecked(true);
|
||||
}
|
||||
} else {
|
||||
giftModel.setChecked(false);
|
||||
}
|
||||
}
|
||||
if (event.adapter != null && event.adapter.get() != null) {
|
||||
event.adapter.get().notifyDataSetChanged();
|
||||
}
|
||||
} else if (event.type == 2) {
|
||||
String id = event.gift.getGift_id();
|
||||
RoonGiftModel selGift = null;
|
||||
for (int i = 0; i < giftList.size(); i++) {
|
||||
RoonGiftModel giftModel = giftList.get(i);
|
||||
if (giftModel.getGift_id().equals(id)) {
|
||||
selGift = giftModel;
|
||||
if (!giftModel.isChecked()) {
|
||||
EventBus.getDefault().post(new GiftUserRefreshEvent(giftModel.isCan_send_self(), event.type,event.gift));
|
||||
giftModel.setChecked(true);
|
||||
}
|
||||
} else {
|
||||
giftModel.setChecked(false);
|
||||
}
|
||||
}
|
||||
if (event.adapter != null && event.adapter.get() != null) {
|
||||
event.adapter.get().notifyDataSetChanged();
|
||||
}
|
||||
if (selGift != null) {
|
||||
EventBus.getDefault().post(new GiftDoubleClickEvent());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onGiftClicRoomkTEvent(RoomGiftClickToEvent event) {
|
||||
if (giftList == null){
|
||||
giftList = new ArrayList<>();
|
||||
giftList.add(event.gift);
|
||||
}
|
||||
if (event.type == 1) {
|
||||
String id = event.gift.getGift_id();
|
||||
for (int i = 0; i < giftList.size(); i++) {
|
||||
RoonGiftModel giftModel = giftList.get(i);
|
||||
if (giftModel.getGift_id().equals(id)) {
|
||||
if (!giftModel.isChecked()) {
|
||||
EventBus.getDefault().post(new GiftUserRefreshEvent(giftModel.isCan_send_self(), event.type,event.gift));
|
||||
giftModel.setChecked(true);
|
||||
}
|
||||
} else {
|
||||
giftModel.setChecked(false);
|
||||
}
|
||||
}
|
||||
if (event.adapter != null && event.adapter.get() != null) {
|
||||
event.adapter.get().notifyDataSetChanged();
|
||||
}
|
||||
} else if (event.type == 2) {
|
||||
String id = event.gift.getGift_id();
|
||||
RoonGiftModel selGift = null;
|
||||
for (int i = 0; i < giftList.size(); i++) {
|
||||
RoonGiftModel giftModel = giftList.get(i);
|
||||
if (giftModel.getGift_id().equals(id)) {
|
||||
selGift = giftModel;
|
||||
if (!giftModel.isChecked()) {
|
||||
EventBus.getDefault().post(new GiftUserRefreshEvent(giftModel.isCan_send_self(), event.type,event.gift));
|
||||
giftModel.setChecked(true);
|
||||
}
|
||||
} else {
|
||||
giftModel.setChecked(false);
|
||||
}
|
||||
}
|
||||
if (event.adapter != null && event.adapter.get() != null) {
|
||||
event.adapter.get().notifyDataSetChanged();
|
||||
}
|
||||
if (selGift != null) {
|
||||
EventBus.getDefault().post(new GiftDoubleClickEvent());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,7 +5,11 @@ import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.qxcm.moduleutil.R;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/10
|
||||
*@description: 点赞适配
|
||||
*/
|
||||
public class LikeListAdapter extends BaseQuickAdapter<CircleListBean.LikeList, BaseViewHolder> {
|
||||
public LikeListAdapter() {
|
||||
super(R.layout.item_like_list);
|
||||
|
||||
@@ -4,15 +4,25 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.qxcm.moduleutil.R;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.bean.room.RoomOnlineBean;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
|
||||
public class LikeUserAdapter extends BaseQuickAdapter<CircleListBean.LikeList, BaseViewHolder> {
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/10
|
||||
*@description: 显示用户小头像
|
||||
*/
|
||||
public class LikeUserAdapter<T> extends BaseQuickAdapter<T, BaseViewHolder> {
|
||||
public LikeUserAdapter() {
|
||||
super(R.layout.item_like_user);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, CircleListBean.LikeList item) {
|
||||
ImageUtils.loadHeadCC(item.getAvatar(), helper.getView(R.id.user_icon));
|
||||
protected void convert(BaseViewHolder helper,T item) {
|
||||
if (item instanceof CircleListBean.LikeList) {
|
||||
ImageUtils.loadHeadCC(((CircleListBean.LikeList) item).getAvatar(), helper.getView(R.id.user_icon));
|
||||
} else {
|
||||
// 可扩展:通过接口回调获取头像 URL
|
||||
ImageUtils.loadHeadCC(((RoomOnlineBean) item).getAvatar(), helper.getView(R.id.user_icon));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.qxcm.moduleutil.adapter;
|
||||
|
||||
import static android.view.View.GONE;
|
||||
import static android.view.View.VISIBLE;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -73,18 +76,19 @@ public class ReplyAdapter extends RecyclerView.Adapter<ReplyAdapter.ReplyViewHol
|
||||
return isExpanded ? replyList.size() : Math.min(2, replyList.size());
|
||||
}
|
||||
|
||||
static class ReplyViewHolder extends RecyclerView.ViewHolder {
|
||||
class ReplyViewHolder extends RecyclerView.ViewHolder {
|
||||
private TextView tvNickname;
|
||||
private TextView tvContent;
|
||||
private TextView btnReply;
|
||||
private TextView tvTime;
|
||||
|
||||
private TextView btnShowAllReplies;
|
||||
public ReplyViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
tvNickname = itemView.findViewById(R.id.tv_name);
|
||||
tvContent = itemView.findViewById(R.id.tv_reply);
|
||||
btnReply = itemView.findViewById(R.id.btn_reply);
|
||||
tvTime = itemView.findViewById(R.id.tv_time);
|
||||
// btnShowAllReplies = itemView.findViewById(R.id.btn_show_all_replies);
|
||||
}
|
||||
|
||||
public void bind(CommentBean.CommentDetailsBean.Replies reply,int position, OnReplyClickListener listener,OnReplyLongClickListener longClickListener) {
|
||||
@@ -110,7 +114,14 @@ public class ReplyAdapter extends RecyclerView.Adapter<ReplyAdapter.ReplyViewHol
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
// 控制“全部评论...”按钮的显示
|
||||
// btnShowAllReplies.setVisibility(position > 2 ? VISIBLE : GONE);
|
||||
//
|
||||
// btnShowAllReplies.setOnClickListener(v -> {
|
||||
//// replyAdapter.setExpanded(true); // 展开所有评论
|
||||
// notifyDataSetChanged(); // 刷新适配器
|
||||
// btnShowAllReplies.setVisibility(GONE); // 隐藏按钮
|
||||
// });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,6 +86,7 @@ public abstract class BaseMvpDialogFragment<P extends IPresenter, VDM extends Vi
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
window.setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT);
|
||||
window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||
if (isAnimation) {
|
||||
window.setWindowAnimations(R.style.CommonShowDialogBottom);
|
||||
}
|
||||
|
||||
@@ -34,14 +34,13 @@ import com.lahm.library.EmulatorCheckCallback;
|
||||
import com.qxcm.moduleutil.bean.UserBean;
|
||||
import com.qxcm.moduleutil.event.AppLifecycleEvent;
|
||||
import com.qxcm.moduleutil.interfaces.AppLifecycleUtil;
|
||||
import com.qxcm.moduleutil.rtc.RtcManager;
|
||||
import com.qxcm.moduleutil.utils.FloatWindowHelper;
|
||||
import com.qxcm.moduleutil.utils.SPConstants;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
import com.qxcm.moduleutil.utils.UtilConfig;
|
||||
import com.qxcm.moduleutil.utils.config.EnvironmentEnum;
|
||||
import com.qxcm.moduleutil.utils.config.EnvironmentPrefs;
|
||||
import com.qxcm.moduleutil.widget.CommonAppConfig;
|
||||
import com.qxcm.moduleutil.widget.Constants;
|
||||
import com.qxcm.moduleutil.widget.CustomRefreshHeader;
|
||||
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.api.DefaultRefreshFooterCreator;
|
||||
@@ -58,9 +57,7 @@ import java.security.MessageDigest;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import lombok.Getter;
|
||||
|
||||
|
||||
@@ -78,6 +75,14 @@ public class CommonAppContext extends MultiDexApplication {
|
||||
@Getter
|
||||
private EnvironmentEnum currentEnvironment;
|
||||
public UserBean mUserBean;
|
||||
|
||||
public boolean isShow;
|
||||
public boolean isPlaying;
|
||||
|
||||
public String playId;
|
||||
public String playCover;
|
||||
public boolean showSelf;//盲盒是否能送自己
|
||||
public String playName;
|
||||
private final ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(1);
|
||||
private ScheduledExecutorService scheduledExecutorServiceRoom = null;
|
||||
|
||||
@@ -96,6 +101,7 @@ public class CommonAppContext extends MultiDexApplication {
|
||||
UtilConfig.checkInEmulator();
|
||||
}
|
||||
}
|
||||
// RtcManager.instance(this);
|
||||
EnvironmentPrefs prefs = new EnvironmentPrefs(this);
|
||||
currentEnvironment = prefs.getSelectedEnvironment();
|
||||
}
|
||||
|
||||
@@ -1,13 +1,21 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BlackUserBean {
|
||||
private String userName;
|
||||
private String userId;
|
||||
private String userAvatar;
|
||||
|
||||
private int type;//0:关注;1:黑名单;2:粉丝
|
||||
private int status;//0:未关注 1:已关注
|
||||
|
||||
private int user_id;
|
||||
private String createTime;
|
||||
private String nickname;
|
||||
private String avatar;
|
||||
private int sex;
|
||||
private String user_code;
|
||||
private int is_online;
|
||||
private int is_follow;
|
||||
private List<String> icon;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,298 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
|
||||
import com.qxcm.moduleutil.bean.room.RankInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目名称 qipao-android
|
||||
* 包名:com.qpyy.room.bean
|
||||
* 创建人 黄强
|
||||
* 创建时间 2020/7/25 14:38
|
||||
* 描述 describe
|
||||
*/
|
||||
public class CharmRankingResp {
|
||||
private MyBean my;
|
||||
private List<ListsBean> lists;
|
||||
|
||||
public MyBean getMy() {
|
||||
return my;
|
||||
}
|
||||
|
||||
public void setMy(MyBean my) {
|
||||
this.my = my;
|
||||
}
|
||||
|
||||
public List<ListsBean> getLists() {
|
||||
return lists;
|
||||
}
|
||||
|
||||
public void setLists(List<ListsBean> lists) {
|
||||
this.lists = lists;
|
||||
}
|
||||
|
||||
public static class MyBean {
|
||||
/**
|
||||
* head_picture : https://gudao-prod.oss-cn-hangzhou.aliyuncs.com/android_images/577547/20200331141523_1585635321420.png
|
||||
* nickname : 687592
|
||||
* user_id : 577547
|
||||
* level : 55
|
||||
* number : 0
|
||||
* rank : -1
|
||||
* diff : 52474
|
||||
* rank_info : {"rank_id":"55","rank_name":1000,"nobility_id":0,"nobility_name":"","picture":""}
|
||||
*/
|
||||
|
||||
private String head_picture;
|
||||
private String nickname;
|
||||
private String user_id;
|
||||
private String level;
|
||||
private String number;
|
||||
private int rank;
|
||||
private String diff;
|
||||
private String sex;
|
||||
private String number_format;
|
||||
|
||||
public String getNumber_format() {
|
||||
return number_format;
|
||||
}
|
||||
|
||||
public void setNumber_format(String number_format) {
|
||||
this.number_format = number_format;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
private RankInfo rank_info;
|
||||
private String nobility_icon;
|
||||
private String level_icon;
|
||||
|
||||
public String getNobility_icon() {
|
||||
return nobility_icon;
|
||||
}
|
||||
|
||||
public void setNobility_icon(String nobility_icon) {
|
||||
this.nobility_icon = nobility_icon;
|
||||
}
|
||||
|
||||
public String getLevel_icon() {
|
||||
return level_icon;
|
||||
}
|
||||
|
||||
public void setLevel_icon(String level_icon) {
|
||||
this.level_icon = level_icon;
|
||||
}
|
||||
|
||||
public String getHead_picture() {
|
||||
return head_picture;
|
||||
}
|
||||
|
||||
public void setHead_picture(String head_picture) {
|
||||
this.head_picture = head_picture;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
|
||||
public String getUser_id() {
|
||||
return user_id;
|
||||
}
|
||||
|
||||
public void setUser_id(String user_id) {
|
||||
this.user_id = user_id;
|
||||
}
|
||||
|
||||
public String getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(String level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public String getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(String number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public int getRank() {
|
||||
return rank;
|
||||
}
|
||||
|
||||
public void setRank(int rank) {
|
||||
this.rank = rank;
|
||||
}
|
||||
|
||||
public String getDiff() {
|
||||
return diff;
|
||||
}
|
||||
|
||||
public void setDiff(String diff) {
|
||||
this.diff = diff;
|
||||
}
|
||||
|
||||
public RankInfo getRank_info() {
|
||||
return rank_info;
|
||||
}
|
||||
|
||||
public void setRank_info(RankInfo rank_info) {
|
||||
this.rank_info = rank_info;
|
||||
}
|
||||
}
|
||||
|
||||
public static class ListsBean {
|
||||
/**
|
||||
* user_id : 642649
|
||||
* number : 43280001
|
||||
* head_picture : https://gudao-prod.oss-cn-hangzhou.aliyuncs.com/android_images/642649/20200601132728_1590989246548.jpeg
|
||||
* nickname : 109179
|
||||
* level : 4
|
||||
* sex : 1
|
||||
* nobility_icon : http://gudao-prod.oss-cn-hangzhou.aliyuncs.com/admin_images/5e71d1ef847ba.png
|
||||
* rank : 1
|
||||
* rank_info : {"rank_id":"4","rank_name":4,"nobility_id":6,"nobility_name":"帝皇","picture":""}
|
||||
*/
|
||||
|
||||
private String user_id;
|
||||
private String number;
|
||||
private String head_picture;
|
||||
private String nickname;
|
||||
private String level;
|
||||
private String sex;
|
||||
private String nobility_icon;
|
||||
private String level_icon;
|
||||
private String user_code;
|
||||
private int rank;
|
||||
private RankInfo rank_info;
|
||||
private String number_format;
|
||||
private String good_number;
|
||||
private String id_color;
|
||||
|
||||
public String getUser_code() {
|
||||
return user_code;
|
||||
}
|
||||
|
||||
public void setUser_code(String user_code) {
|
||||
this.user_code = user_code;
|
||||
}
|
||||
|
||||
public String getNumber_format() {
|
||||
return number_format;
|
||||
}
|
||||
|
||||
public void setNumber_format(String number_format) {
|
||||
this.number_format = number_format;
|
||||
}
|
||||
|
||||
public String getLevel_icon() {
|
||||
return level_icon;
|
||||
}
|
||||
|
||||
public void setLevel_icon(String level_icon) {
|
||||
this.level_icon = level_icon;
|
||||
}
|
||||
|
||||
public String getUser_id() {
|
||||
return user_id;
|
||||
}
|
||||
|
||||
public void setUser_id(String user_id) {
|
||||
this.user_id = user_id;
|
||||
}
|
||||
|
||||
public String getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(String number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public String getHead_picture() {
|
||||
return head_picture;
|
||||
}
|
||||
|
||||
public void setHead_picture(String head_picture) {
|
||||
this.head_picture = head_picture;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
|
||||
public String getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(String level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getNobility_icon() {
|
||||
return nobility_icon;
|
||||
}
|
||||
|
||||
public void setNobility_icon(String nobility_icon) {
|
||||
this.nobility_icon = nobility_icon;
|
||||
}
|
||||
|
||||
public int getRank() {
|
||||
return rank;
|
||||
}
|
||||
|
||||
public void setRank(int rank) {
|
||||
this.rank = rank;
|
||||
}
|
||||
|
||||
public RankInfo getRank_info() {
|
||||
return rank_info;
|
||||
}
|
||||
|
||||
public void setRank_info(RankInfo rank_info) {
|
||||
this.rank_info = rank_info;
|
||||
}
|
||||
|
||||
public String getGood_number() {
|
||||
return good_number;
|
||||
}
|
||||
|
||||
public void setGood_number(String good_number) {
|
||||
this.good_number = good_number;
|
||||
}
|
||||
|
||||
public String getId_color() {
|
||||
return id_color;
|
||||
}
|
||||
|
||||
public void setId_color(String id_color) {
|
||||
this.id_color = id_color;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class ExpandColumnBean {
|
||||
private String id;
|
||||
private String user_id;
|
||||
private String sex;
|
||||
private String nickname;
|
||||
private String avatar;
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FromUserInfo {
|
||||
private String nickname;
|
||||
private String avatar;
|
||||
private String user_id;
|
||||
private List<String> icon;
|
||||
}
|
||||
@@ -1,51 +1,15 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class GiftBean {
|
||||
|
||||
private String number;
|
||||
private String gift_id;
|
||||
private String name;
|
||||
private String picture;
|
||||
private String price;
|
||||
|
||||
|
||||
public String getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(String number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public String getGift_id() {
|
||||
return gift_id;
|
||||
}
|
||||
|
||||
public void setGift_id(String gift_id) {
|
||||
this.gift_id = gift_id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPicture() {
|
||||
return picture;
|
||||
}
|
||||
|
||||
public void setPicture(String picture) {
|
||||
this.picture = picture;
|
||||
}
|
||||
|
||||
public String getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(String price) {
|
||||
this.price = price;
|
||||
}
|
||||
private String gift_name;
|
||||
private String gift_price;
|
||||
private int file_type;
|
||||
private String play_image;
|
||||
private String base_image;
|
||||
private String gift_type;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,6 @@ import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class GiftLabelBean {
|
||||
private String label;
|
||||
private String id;
|
||||
private String name;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class HostBean {
|
||||
private String id;
|
||||
private String user_id;
|
||||
private String room_id;
|
||||
private String nickname;
|
||||
private String avatar;
|
||||
private String sex;
|
||||
private String type;//类型 1:主持人 2:管理员
|
||||
private String ratio;//主持人收益比
|
||||
private List<String> icon;//
|
||||
private String earnings;//收益
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class MixerResp {
|
||||
private int id;
|
||||
private String name;
|
||||
private int imgUrtl;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import com.alibaba.fastjson.serializer.SerializeBeanInfo;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/19
|
||||
*@description: 已点歌曲实体
|
||||
*/
|
||||
@Data
|
||||
public class MusicSongBean implements Serializable {
|
||||
|
||||
private String did;//歌曲id
|
||||
private String room_id;
|
||||
private String song_code;//歌曲唯一标识
|
||||
private String song_name;//歌曲名称
|
||||
private String singer;//歌手
|
||||
private String poster;//封面
|
||||
private String duration;//播放时长
|
||||
private int sort;//
|
||||
private String user_id;
|
||||
private String nickname;
|
||||
private String avatar;
|
||||
private String dress;
|
||||
private String charm;
|
||||
private int is_hot;//是否是主持,并且是在9号麦位上
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/7/1
|
||||
*@description: cp房实体类
|
||||
*/
|
||||
@Data
|
||||
public class MyCpRoom {
|
||||
private String room_name;
|
||||
private int room_number;
|
||||
private String end_time;
|
||||
private String user1_avatar;
|
||||
private String user2_avatar;
|
||||
private int earnings;
|
||||
private String relation;
|
||||
private String room_id;
|
||||
}
|
||||
@@ -2,113 +2,27 @@ package com.qxcm.moduleutil.bean;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MyFootResp {
|
||||
|
||||
private String room_name;
|
||||
private String room_number;//房间号
|
||||
private String room_name;//房间名称
|
||||
private String room_code;
|
||||
private String popularity;
|
||||
private String label_name;
|
||||
private String label_icon;
|
||||
private String label_icon;//房间标签图标
|
||||
private String owner_picture;
|
||||
private String owner_nickname;
|
||||
private String room_id;
|
||||
private String room_id;//房间id
|
||||
private int locked;
|
||||
private String label_id; //房间标签id
|
||||
private String room_intro; //房间简介
|
||||
private String room_cover;//房间封面
|
||||
|
||||
private String cover_picture;
|
||||
private String label_id;
|
||||
private String user_count;//人数
|
||||
|
||||
public String getLabel_id() {
|
||||
return label_id;
|
||||
}
|
||||
private String room_password;//密码
|
||||
|
||||
public void setLabel_id(String label_id) {
|
||||
this.label_id = label_id;
|
||||
}
|
||||
|
||||
public String getRoomPicture() {
|
||||
if (!TextUtils.isEmpty(cover_picture)) {
|
||||
return cover_picture;
|
||||
}
|
||||
return owner_picture;
|
||||
}
|
||||
|
||||
public String getCover_picture() {
|
||||
return cover_picture;
|
||||
}
|
||||
|
||||
public void setCover_picture(String cover_picture) {
|
||||
this.cover_picture = cover_picture;
|
||||
}
|
||||
|
||||
public int getLocked() {
|
||||
return locked;
|
||||
}
|
||||
|
||||
public void setLocked(int locked) {
|
||||
this.locked = locked;
|
||||
}
|
||||
|
||||
public String getRoom_id() {
|
||||
return room_id;
|
||||
}
|
||||
|
||||
public void setRoom_id(String room_id) {
|
||||
this.room_id = room_id;
|
||||
}
|
||||
|
||||
public String getRoom_name() {
|
||||
return room_name;
|
||||
}
|
||||
|
||||
public void setRoom_name(String room_name) {
|
||||
this.room_name = room_name;
|
||||
}
|
||||
|
||||
public String getRoom_code() {
|
||||
return room_code;
|
||||
}
|
||||
|
||||
public void setRoom_code(String room_code) {
|
||||
this.room_code = room_code;
|
||||
}
|
||||
|
||||
public String getPopularity() {
|
||||
return popularity;
|
||||
}
|
||||
|
||||
public void setPopularity(String popularity) {
|
||||
this.popularity = popularity;
|
||||
}
|
||||
|
||||
public String getLabel_name() {
|
||||
return label_name;
|
||||
}
|
||||
|
||||
public void setLabel_name(String label_name) {
|
||||
this.label_name = label_name;
|
||||
}
|
||||
|
||||
public String getLabel_icon() {
|
||||
return label_icon;
|
||||
}
|
||||
|
||||
public void setLabel_icon(String label_icon) {
|
||||
this.label_icon = label_icon;
|
||||
}
|
||||
|
||||
public String getOwner_picture() {
|
||||
return owner_picture;
|
||||
}
|
||||
|
||||
public void setOwner_picture(String owner_picture) {
|
||||
this.owner_picture = owner_picture;
|
||||
}
|
||||
|
||||
public String getOwner_nickname() {
|
||||
return owner_nickname;
|
||||
}
|
||||
|
||||
public void setOwner_nickname(String owner_nickname) {
|
||||
this.owner_nickname = owner_nickname;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author qx
|
||||
* @data 2025/6/11
|
||||
* @description: 我创建的房间
|
||||
*/
|
||||
@Data
|
||||
public class MyRoomBean {
|
||||
|
||||
/*
|
||||
@@ -15,103 +25,49 @@ public class MyRoomBean {
|
||||
"today_income": 0
|
||||
*/
|
||||
|
||||
private String room_id;
|
||||
private String room_number;
|
||||
private String user_id;
|
||||
private String nickname;
|
||||
private String room_name; //房间名称
|
||||
private int room_id; //房间ID
|
||||
private String label_id; //房间类型
|
||||
private String room_cover;//房间封面
|
||||
private String apply_status;//房间状态,1:申请中,2:申请通过,3:申请被拒绝
|
||||
private String room_status;//房间状态,1:正常,2:封禁3:关闭
|
||||
private String room_password;//房间密码
|
||||
private String type_id;//房间类型id
|
||||
private String type_name;//类型名称
|
||||
private String label_icon; //分类图标
|
||||
private String label_id; //分类id
|
||||
private String is_user_code;//是否使用靓号1:是,0:否
|
||||
private String today_profit;//今日收益
|
||||
private int online_num; //房间在线人数
|
||||
private int visit_num;//访问人数
|
||||
private int follow_num;//房间关注人数
|
||||
private String ratio;//房间提成
|
||||
|
||||
private List<CpRoom> cp_room;
|
||||
|
||||
private String room_intro;//房间介绍
|
||||
private String user_count;//房间人数
|
||||
private String label_name; //房间类型名称
|
||||
private String cover_picture; //房间图片
|
||||
private String label_icon; //房间类型图标
|
||||
private String online_num; //房间在线人数
|
||||
private String favorite_count; //房间收藏数
|
||||
private String come_count; //房间进入数
|
||||
private Double today_income; //今日收益;
|
||||
private int earnings_ratio;//房间收益比例
|
||||
|
||||
public int getEarnings_ratio() {
|
||||
return earnings_ratio;
|
||||
@Data
|
||||
static class CpRoom {
|
||||
private String id;
|
||||
private String room_name;
|
||||
private String room_number;
|
||||
|
||||
private String end_time;
|
||||
|
||||
private String earnings;
|
||||
|
||||
private String user1_avatar;
|
||||
|
||||
private String user2_avatar;
|
||||
}
|
||||
|
||||
public void setEarnings_ratio(int earnings_ratio) {
|
||||
this.earnings_ratio = earnings_ratio;
|
||||
}
|
||||
|
||||
public String getRoom_name() {
|
||||
return room_name;
|
||||
}
|
||||
|
||||
public void setRoom_name(String room_name) {
|
||||
this.room_name = room_name;
|
||||
}
|
||||
|
||||
public int getRoom_id() {
|
||||
return room_id;
|
||||
}
|
||||
|
||||
public void setRoom_id(int room_id) {
|
||||
this.room_id = room_id;
|
||||
}
|
||||
|
||||
public String getLabel_id() {
|
||||
return label_id;
|
||||
}
|
||||
|
||||
public void setLabel_id(String label_id) {
|
||||
this.label_id = label_id;
|
||||
}
|
||||
|
||||
public String getLabel_name() {
|
||||
return label_name;
|
||||
}
|
||||
|
||||
public void setLabel_name(String label_name) {
|
||||
this.label_name = label_name;
|
||||
}
|
||||
|
||||
public String getCover_picture() {
|
||||
return cover_picture;
|
||||
}
|
||||
|
||||
public void setCover_picture(String cover_picture) {
|
||||
this.cover_picture = cover_picture;
|
||||
}
|
||||
|
||||
public String getLabel_icon() {
|
||||
return label_icon;
|
||||
}
|
||||
|
||||
public void setLabel_icon(String label_icon) {
|
||||
this.label_icon = label_icon;
|
||||
}
|
||||
|
||||
public String getOnline_num() {
|
||||
return online_num;
|
||||
}
|
||||
|
||||
public void setOnline_num(String online_num) {
|
||||
this.online_num = online_num;
|
||||
}
|
||||
|
||||
public String getFavorite_count() {
|
||||
return favorite_count;
|
||||
}
|
||||
|
||||
public void setFavorite_count(String favorite_count) {
|
||||
this.favorite_count = favorite_count;
|
||||
}
|
||||
|
||||
public String getCome_count() {
|
||||
return come_count;
|
||||
}
|
||||
|
||||
public void setCome_count(String come_count) {
|
||||
this.come_count = come_count;
|
||||
}
|
||||
|
||||
public Double getToday_income() {
|
||||
return today_income;
|
||||
}
|
||||
|
||||
public void setToday_income(Double today_income) {
|
||||
this.today_income = today_income;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
public class RefreshEvent {
|
||||
private String roomId;
|
||||
|
||||
public RefreshEvent(String roomId) {
|
||||
this.roomId = roomId;
|
||||
}
|
||||
|
||||
public String getRoomId() {
|
||||
return roomId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/16
|
||||
*@description: 关系信息
|
||||
*/
|
||||
@Data
|
||||
public class RelationshipBean {
|
||||
|
||||
private String nickname;
|
||||
private String avatar;
|
||||
private String relation;
|
||||
private String nickname2;
|
||||
private String avatar2;
|
||||
private String time;
|
||||
}
|
||||
@@ -9,4 +9,6 @@ public class RewardUserBean {
|
||||
private String avatar;
|
||||
private String is_online;
|
||||
private String total_price;
|
||||
private String pit_number;
|
||||
private boolean isSelect = false;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import com.chad.library.adapter.base.entity.MultiItemEntity;
|
||||
import com.qxcm.moduleutil.RoomAutionTimeBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/28
|
||||
*@description: 拍卖房中选择对应的关系和礼物、时间
|
||||
*/
|
||||
@Data
|
||||
public class RoomAuctionABean implements MultiItemEntity {
|
||||
|
||||
private int itemType;
|
||||
|
||||
private List<RoomRelationBean> roomRelationBeanList;
|
||||
private List<RoomAutionTimeBean> roomTimeBeanList;
|
||||
private List<RoonGiftModel> roomGiftBeanList;
|
||||
|
||||
@Override
|
||||
public int getItemType() {
|
||||
return itemType;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RoomBgBean {
|
||||
private List<RoomBg> public_bg;
|
||||
private List<RoomBg> private_bg;
|
||||
|
||||
|
||||
@Data
|
||||
public static class RoomBg{
|
||||
private String id;//图片id
|
||||
private String image_name;//图片名称
|
||||
private String image_url;//图片地址
|
||||
private String upload_user;//上传用户id
|
||||
private String image_size;//大小
|
||||
private String status;//状态 1 正常 2 删除
|
||||
private String createtime;//创建时间
|
||||
|
||||
private boolean isPublic; // 是否是公共背景
|
||||
private boolean isAddButton; // 是否是添加按钮项
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/20
|
||||
*@description: 房间魅力排行
|
||||
*/
|
||||
@Data
|
||||
public class RoomCharmRankBean {
|
||||
private String user_id;//用户ID
|
||||
private String nickname;//昵称
|
||||
private String avatar;//头像
|
||||
private String dress;//装扮
|
||||
private String charm;//魅力值
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RoomHostUserBean {
|
||||
|
||||
private String user_id;
|
||||
private String user_code;
|
||||
private String nickname;
|
||||
private String head_picture;
|
||||
private String sex;
|
||||
private String follow;
|
||||
private String fans_count;
|
||||
private String online_text;
|
||||
private String good_number;
|
||||
private String id_color;
|
||||
private int age;
|
||||
private String level_icon;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/12
|
||||
*@description: 输入文字,传递给聊天室PublicScreenEaseChatFragment
|
||||
*/
|
||||
public class RoomInputEvent {
|
||||
public String text;
|
||||
public RoomInputEvent(String text) {
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import com.qxcm.moduleutil.bean.room.AuctionBean;
|
||||
import com.qxcm.moduleutil.bean.room.RoomAuction;
|
||||
import com.qxcm.moduleutil.bean.room.RoomBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RoomMessageEvent {
|
||||
private int MsgType; // 消息类型,如 QXRoomMessageTypeJoin
|
||||
private String RoomId; // 房间 ID
|
||||
private T Text; // 携带的数据对象
|
||||
|
||||
public RoomMessageEvent(int msgType, String roomId, T text) {
|
||||
MsgType = msgType;
|
||||
RoomId = roomId;
|
||||
Text = text;
|
||||
}
|
||||
|
||||
|
||||
@Data
|
||||
public static class T {
|
||||
private String text;
|
||||
private String GiftNum;
|
||||
private String pit_number;
|
||||
private String jia_jia;
|
||||
private UserInfo FromUserInfo;
|
||||
private UserInfo ToUserInfo;
|
||||
private GiftBean GiftInfo;
|
||||
private int room_up_pit_type;
|
||||
private MusicSongBean songInfo;
|
||||
private MusicSongBean nextInfo;
|
||||
private int action;
|
||||
private int total;
|
||||
private RoomBean RoomInfo;
|
||||
private RoomAuction.AuctionUserBean auction_user;
|
||||
private List<RoomAuction.AuctionListBean> auction_list;
|
||||
private long duration;//时间
|
||||
private RoomAuction.AuctionListBean recipient;//是否成功,有值的是成功的,没有值的时候,是失败的
|
||||
private int type;//拍卖者,1:上麦、2:下麦
|
||||
private String hot_value;
|
||||
private String SendRoomId;//发起者所在的房间ID
|
||||
private String AcceptRoomId;//接收者所在的房间id
|
||||
private String PkId;
|
||||
private String room_id;//当type==1的时候。这个roomId是对方的房间id
|
||||
private String user_id;
|
||||
private String pk_end_times;//pk结束时间
|
||||
|
||||
private String room_id_a;//发起者房间id
|
||||
private String room_id_b;//接收者房间id
|
||||
private String create_value_a;//发起者房间值
|
||||
private String receive_value_b;//接受者房间值
|
||||
private String pk_id;
|
||||
|
||||
private String victory_name;//胜利的名称
|
||||
private String victory_cover;//胜利的头像
|
||||
private String defeated_name;//输掉的名称
|
||||
private String defeated_cover;//输掉的头像
|
||||
private String end_time;//惩罚时间
|
||||
private int is_mute;//1:静音对方 0:不静音对方
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class text {
|
||||
private long position;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import lombok.Data;
|
||||
@Data
|
||||
public class RoomMessageEvent1 {
|
||||
private int MsgType; // 消息类型,如 QXRoomMessageTypeJoin
|
||||
private String RoomId; // 房间 ID
|
||||
private RoomMessageEvent.T Text; // 携带的数据对象
|
||||
|
||||
public RoomMessageEvent1(int msgType, String roomId, RoomMessageEvent.T text) {
|
||||
MsgType = msgType;
|
||||
RoomId = roomId;
|
||||
Text = text;
|
||||
}
|
||||
|
||||
|
||||
@Data
|
||||
public static class T {
|
||||
private String text;
|
||||
private String GiftNum;
|
||||
|
||||
private UserInfo FromUserInfo;
|
||||
private UserInfo ToUserInfo;
|
||||
private GiftBean GiftInfo;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class RoomMessageManager {
|
||||
|
||||
private static final RoomMessageManager instance = new RoomMessageManager();
|
||||
|
||||
private RoomMessageManager() {}
|
||||
|
||||
public static RoomMessageManager getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* 接收原始消息,转换后发送到 EventBus
|
||||
*/
|
||||
public void onNewMessage(String roomId, int msgType, RoomMessageEvent.T data) {
|
||||
RoomMessageEvent event = new RoomMessageEvent(msgType, roomId, data);
|
||||
EventBus.getDefault().post(event);
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册监听器(如 Fragment 或 Activity)
|
||||
*/
|
||||
public void register(Object subscriber) {
|
||||
if (!EventBus.getDefault().isRegistered(subscriber)) {
|
||||
EventBus.getDefault().register(subscriber);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 反注册监听器
|
||||
*/
|
||||
public void unregister(Object subscriber) {
|
||||
if (EventBus.getDefault().isRegistered(subscriber)) {
|
||||
EventBus.getDefault().unregister(subscriber);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/28
|
||||
*@description: 房间中根据类型获取到的关系实体
|
||||
*/
|
||||
@Data
|
||||
public class RoomRelationBean {
|
||||
private String relation_id;//关系id
|
||||
private String name;//关系名称
|
||||
private String type;//1:真爱拍;2:亲密拍
|
||||
private String icon;//图标
|
||||
private boolean isSelected;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RoomSearchResp {
|
||||
private String id;
|
||||
private String name;
|
||||
private String pictrue;
|
||||
private String code;
|
||||
private List<String> icon;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/17
|
||||
*@description: 清楚消息
|
||||
*/
|
||||
@Data
|
||||
public class RoomSettingEvent {
|
||||
private String roomId;
|
||||
private String userId;
|
||||
private int type;
|
||||
private int room_up_pit_type;///// 房间当前麦位模式 2 自由模式 1 排麦
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/7/1
|
||||
*@description: 选择完礼物后,请求接口得到的时间
|
||||
*/
|
||||
@Data
|
||||
public class RoomTime {
|
||||
private String time_day;
|
||||
}
|
||||
@@ -1,5 +1,12 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/11
|
||||
*@description: 房间分类列表
|
||||
*/
|
||||
@Data
|
||||
public class RoomTypeModel {
|
||||
|
||||
|
||||
@@ -11,39 +18,8 @@ public class RoomTypeModel {
|
||||
*/
|
||||
|
||||
private String id;
|
||||
private String name;
|
||||
private String label_name;
|
||||
private String type;
|
||||
private String sort;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(String sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
public class RoomWheatEvent {
|
||||
}
|
||||
@@ -2,15 +2,22 @@ package com.qxcm.moduleutil.bean;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/12
|
||||
*@description: 礼物
|
||||
*/
|
||||
@Data
|
||||
public class RoonGiftModel {
|
||||
private String id;
|
||||
private String name;
|
||||
private String gid;//礼物id
|
||||
private String gift_name;//礼物名称
|
||||
private String base_image;//礼物图片
|
||||
private String gift_price;//礼物价格
|
||||
private String gift_id;//礼物id
|
||||
|
||||
|
||||
private String title;
|
||||
private String all_room_push;
|
||||
private String picture;
|
||||
private String price;
|
||||
private String special;
|
||||
private String sort;
|
||||
private String type;
|
||||
@@ -18,17 +25,17 @@ public class RoonGiftModel {
|
||||
private String sold;
|
||||
private String cardiac;
|
||||
private boolean isChecked;
|
||||
|
||||
private boolean isSelected;
|
||||
private boolean can_send_self;//是否能送自己
|
||||
|
||||
public boolean isCan_send_self() {
|
||||
if ( isManghe()) {
|
||||
return true;
|
||||
}
|
||||
return can_send_self;
|
||||
}
|
||||
// public boolean isCan_send_self() {
|
||||
// if ( isManghe()) {
|
||||
// return true;
|
||||
// }
|
||||
// return can_send_self;
|
||||
// }
|
||||
|
||||
public boolean isManghe() {
|
||||
return type.equals("4") || type.equals("5") || type.equals("13");
|
||||
}
|
||||
// public boolean isManghe() {
|
||||
// return type.equals("4") || type.equals("5") || type.equals("13");
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/20
|
||||
*@description: 歌曲实体类
|
||||
*/
|
||||
@Data
|
||||
public class SongMusicBean {
|
||||
private String room_song_id; // 歌曲列表ID
|
||||
private String times; // 场次
|
||||
private String times_status; // 本场次状态:1-进行中,2-结束
|
||||
private String room_id; // 房间ID
|
||||
private String user_id; // 用户ID
|
||||
private String song_name; // 歌曲名
|
||||
private String song_id; // 歌曲唯一标识
|
||||
private String song_url; // 歌曲资源地址
|
||||
private String status; // 状态:1-排队中,2-演唱中,3-演唱结束
|
||||
private String sort; // 阈值 越大越靠前
|
||||
}
|
||||
@@ -1,28 +1,33 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import com.chad.library.adapter.base.entity.MultiItemEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TopRoom {
|
||||
|
||||
private String id;
|
||||
private String user_id;
|
||||
private String room_name;
|
||||
private String label_id;
|
||||
private String cover_picture;
|
||||
private String voice;
|
||||
private String on_line;
|
||||
private String chatrooms;
|
||||
private String popularity;
|
||||
private String room_id;
|
||||
private String user_count;
|
||||
public class TopRoom implements MultiItemEntity {
|
||||
private int itemViewType;
|
||||
private String room_id;//房间id 请求接口是这个
|
||||
private String room_number;//房间号 房间展示是这个
|
||||
private String user_id; //房主id
|
||||
private String room_name; //房间名称
|
||||
private String room_cover;//房间封面
|
||||
private String room_password;//房间密码
|
||||
private String hot_value;//火热值
|
||||
private List<UserList> user_list;
|
||||
|
||||
@Override
|
||||
public int getItemType() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class UserList {
|
||||
private String head_picture;
|
||||
private String nickname;
|
||||
private String user_id;
|
||||
private String avatar;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ public class UserBean implements Serializable {
|
||||
private String tencent_im;
|
||||
private String mobile;
|
||||
private int sex;
|
||||
private int auth;
|
||||
|
||||
private List<MultiUserBean> multi_user;
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/24
|
||||
*@description: 关注列表
|
||||
*/
|
||||
@Data
|
||||
public class UserFollowBean {
|
||||
private int follow_id;
|
||||
private String createTime;
|
||||
private String nickname;
|
||||
private String avatar;
|
||||
private int sex;
|
||||
private String user_code;
|
||||
private int is_online;
|
||||
private int is_follow;
|
||||
private List<String> icon;
|
||||
|
||||
}
|
||||
@@ -1,5 +1,9 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.qxcm.moduleutil.bean.room.RoomAuction;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
@@ -9,10 +13,12 @@ import lombok.Data;
|
||||
*@description: 个人信息,点击我的获取
|
||||
*/
|
||||
@Data
|
||||
public class UserInfo {
|
||||
public class UserInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public static final String FEMALE = "2";
|
||||
public static final String MALE = "1";
|
||||
private int id; //用户id
|
||||
@SerializedName(value = "id", alternate = "user_id")
|
||||
private int user_id; //用户id
|
||||
private String user_code;//用户id码
|
||||
private String avatar;//头像
|
||||
private String nickname;//昵称
|
||||
@@ -24,15 +30,30 @@ public class UserInfo {
|
||||
private int charm_level; //魅力等级
|
||||
private int is_use_code; //是否是靓号 0否 1是
|
||||
private String tencent_im;
|
||||
|
||||
private String jia_jia;//坐骑
|
||||
private int is_in_pit;//是否在麦上,1在0不在
|
||||
private int is_open_live_remind;//是否设置开播提醒
|
||||
private String birthday;//生日
|
||||
private String profile;//简介
|
||||
private String home_bgimages;//背景图片
|
||||
private String is_follow;//是否关注
|
||||
private int is_follow;//是否关注
|
||||
private List<UserTagBean> tag_list;
|
||||
private List<GiftWall> gift_wall;
|
||||
private int age;//年龄
|
||||
private String is_room;
|
||||
private String dress;//头像框
|
||||
private String charm;//魅力值
|
||||
private String room_id;
|
||||
private String guile;//公会名称
|
||||
private String is_mute;//禁言状态 0否 1是
|
||||
private String is_mute_pit;//禁麦状态 0否 1是
|
||||
private String is_manager;//是否是管理员 0否 1是
|
||||
private String is_host;//是否是主持 0否 1是
|
||||
private String is_room_owner;//是否是房主 0否 1是
|
||||
private String pit_number;//在点击麦上用户的时候使用
|
||||
private String auction_id;//在拍卖中的拍卖序号
|
||||
|
||||
|
||||
|
||||
// @Data
|
||||
// public static class TagList{
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/28
|
||||
*@description: 多布局下的viewItem包装类
|
||||
*/
|
||||
public class ViewItem {
|
||||
// 定义四种 item 类型
|
||||
public static final int TYPE_TEXT = 0;
|
||||
public static final int TYPE_RELATION = 1;
|
||||
public static final int TYPE_GIFT = 2;
|
||||
public static final int TYPE_IMAGE_SELECTION = 3;
|
||||
|
||||
private int type;
|
||||
private Object data;
|
||||
|
||||
public ViewItem(int type, Object data) {
|
||||
this.type = type;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public Object getData() {
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/12
|
||||
*@description:钱包实体
|
||||
*/
|
||||
@Data
|
||||
public class WalletBean {
|
||||
|
||||
private String id;
|
||||
private String user_id;
|
||||
private String coin;//金币
|
||||
private String earnings;//钻石
|
||||
}
|
||||
@@ -0,0 +1,298 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
|
||||
import com.qxcm.moduleutil.bean.room.RankInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目名称 qipao-android
|
||||
* 包名:com.qpyy.room.bean
|
||||
* 创建人 黄强
|
||||
* 创建时间 2020/7/25 14:38
|
||||
* 描述 describe
|
||||
*/
|
||||
public class WealthRankingResp {
|
||||
private MyBean my;
|
||||
private List<ListsBean> lists;
|
||||
|
||||
public MyBean getMy() {
|
||||
return my;
|
||||
}
|
||||
|
||||
public void setMy(MyBean my) {
|
||||
this.my = my;
|
||||
}
|
||||
|
||||
public List<ListsBean> getLists() {
|
||||
return lists;
|
||||
}
|
||||
|
||||
public void setLists(List<ListsBean> lists) {
|
||||
this.lists = lists;
|
||||
}
|
||||
|
||||
public static class MyBean {
|
||||
/**
|
||||
* head_picture : https://gudao-prod.oss-cn-hangzhou.aliyuncs.com/android_images/577547/20200331141523_1585635321420.png
|
||||
* nickname : 687592
|
||||
* user_id : 577547
|
||||
* level : 55
|
||||
* number : 0
|
||||
* rank : -1
|
||||
* diff : 52474
|
||||
* rank_info : {"rank_id":"55","rank_name":1000,"nobility_id":0,"nobility_name":"","picture":""}
|
||||
*/
|
||||
|
||||
private String head_picture;
|
||||
private String nickname;
|
||||
private String user_id;
|
||||
private String level;
|
||||
private String number;
|
||||
private int rank;
|
||||
private String diff;
|
||||
private String sex;
|
||||
private String number_format;
|
||||
|
||||
public String getNumber_format() {
|
||||
return number_format;
|
||||
}
|
||||
|
||||
public void setNumber_format(String number_format) {
|
||||
this.number_format = number_format;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
private RankInfo rank_info;
|
||||
private String nobility_icon;
|
||||
private String level_icon;
|
||||
|
||||
public String getNobility_icon() {
|
||||
return nobility_icon;
|
||||
}
|
||||
|
||||
public void setNobility_icon(String nobility_icon) {
|
||||
this.nobility_icon = nobility_icon;
|
||||
}
|
||||
|
||||
public String getLevel_icon() {
|
||||
return level_icon;
|
||||
}
|
||||
|
||||
public void setLevel_icon(String level_icon) {
|
||||
this.level_icon = level_icon;
|
||||
}
|
||||
|
||||
public String getHead_picture() {
|
||||
return head_picture;
|
||||
}
|
||||
|
||||
public void setHead_picture(String head_picture) {
|
||||
this.head_picture = head_picture;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
|
||||
public String getUser_id() {
|
||||
return user_id;
|
||||
}
|
||||
|
||||
public void setUser_id(String user_id) {
|
||||
this.user_id = user_id;
|
||||
}
|
||||
|
||||
public String getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(String level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public String getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(String number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public int getRank() {
|
||||
return rank;
|
||||
}
|
||||
|
||||
public void setRank(int rank) {
|
||||
this.rank = rank;
|
||||
}
|
||||
|
||||
public String getDiff() {
|
||||
return diff;
|
||||
}
|
||||
|
||||
public void setDiff(String diff) {
|
||||
this.diff = diff;
|
||||
}
|
||||
|
||||
public RankInfo getRank_info() {
|
||||
return rank_info;
|
||||
}
|
||||
|
||||
public void setRank_info(RankInfo rank_info) {
|
||||
this.rank_info = rank_info;
|
||||
}
|
||||
}
|
||||
|
||||
public static class ListsBean {
|
||||
/**
|
||||
* user_id : 642649
|
||||
* number : 43280001
|
||||
* head_picture : https://gudao-prod.oss-cn-hangzhou.aliyuncs.com/android_images/642649/20200601132728_1590989246548.jpeg
|
||||
* nickname : 109179
|
||||
* level : 4
|
||||
* sex : 1
|
||||
* nobility_icon : http://gudao-prod.oss-cn-hangzhou.aliyuncs.com/admin_images/5e71d1ef847ba.png
|
||||
* rank : 1
|
||||
* rank_info : {"rank_id":"4","rank_name":4,"nobility_id":6,"nobility_name":"帝皇","picture":""}
|
||||
*/
|
||||
|
||||
private String user_id;
|
||||
private String number;
|
||||
private String head_picture;
|
||||
private String nickname;
|
||||
private String level;
|
||||
private String sex;
|
||||
private String nobility_icon;
|
||||
private String level_icon;
|
||||
private String user_code;
|
||||
private int rank;
|
||||
private RankInfo rank_info;
|
||||
private String number_format;
|
||||
private String good_number;
|
||||
private String id_color;
|
||||
|
||||
public String getGood_number() {
|
||||
return good_number;
|
||||
}
|
||||
|
||||
public void setGood_number(String good_number) {
|
||||
this.good_number = good_number;
|
||||
}
|
||||
|
||||
public String getUser_code() {
|
||||
return user_code;
|
||||
}
|
||||
|
||||
public void setUser_code(String user_code) {
|
||||
this.user_code = user_code;
|
||||
}
|
||||
|
||||
public String getNumber_format() {
|
||||
return number_format;
|
||||
}
|
||||
|
||||
public void setNumber_format(String number_format) {
|
||||
this.number_format = number_format;
|
||||
}
|
||||
|
||||
public String getLevel_icon() {
|
||||
return level_icon;
|
||||
}
|
||||
|
||||
public void setLevel_icon(String level_icon) {
|
||||
this.level_icon = level_icon;
|
||||
}
|
||||
|
||||
public String getUser_id() {
|
||||
return user_id;
|
||||
}
|
||||
|
||||
public void setUser_id(String user_id) {
|
||||
this.user_id = user_id;
|
||||
}
|
||||
|
||||
public String getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(String number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public String getHead_picture() {
|
||||
return head_picture;
|
||||
}
|
||||
|
||||
public void setHead_picture(String head_picture) {
|
||||
this.head_picture = head_picture;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
|
||||
public String getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(String level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getNobility_icon() {
|
||||
return nobility_icon;
|
||||
}
|
||||
|
||||
public void setNobility_icon(String nobility_icon) {
|
||||
this.nobility_icon = nobility_icon;
|
||||
}
|
||||
|
||||
public int getRank() {
|
||||
return rank;
|
||||
}
|
||||
|
||||
public void setRank(int rank) {
|
||||
this.rank = rank;
|
||||
}
|
||||
|
||||
public RankInfo getRank_info() {
|
||||
return rank_info;
|
||||
}
|
||||
|
||||
public void setRank_info(RankInfo rank_info) {
|
||||
this.rank_info = rank_info;
|
||||
}
|
||||
|
||||
public String getId_color() {
|
||||
return id_color;
|
||||
}
|
||||
|
||||
public void setId_color(String id_color) {
|
||||
this.id_color = id_color;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.qxcm.moduleutil.bean.room;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/28
|
||||
*@description: 拍卖序号
|
||||
*/
|
||||
@Data
|
||||
public class AuctionBean {
|
||||
private String auction_id;
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
package com.qxcm.moduleutil.bean.room;
|
||||
|
||||
import com.chad.library.adapter.base.entity.MultiItemEntity;
|
||||
import com.qxcm.moduleutil.bean.RoomMessageEvent;
|
||||
|
||||
public class EMMessageInfo implements MultiItemEntity {
|
||||
|
||||
/// 系统消息
|
||||
public static final int QXRoomMessageTypeSystem = 1000;
|
||||
/// 用户进入房间
|
||||
public static final int QXRoomMessageTypeJoin = 1001;
|
||||
/// 用户退出房间
|
||||
public static final int QXRoomMessageTypeQuit = 1002;
|
||||
/// 用户上麦
|
||||
public static final int QXRoomMessageTypeUpSeat = 1003;
|
||||
/// 用户下麦
|
||||
public static final int QXRoomMessageTypeDownSeat = 1004;
|
||||
/// 房间收到礼物
|
||||
public static final int QXRoomMessageTypeGift = 1005;
|
||||
/// 设置管理员
|
||||
public static final int QXRoomMessageTypeSetManage = 1006;
|
||||
/// 设置主持
|
||||
public static final int QXRoomMessageTypeSetCompere = 1007;
|
||||
/// 禁麦/解禁
|
||||
public static final int QXRoomMessageTypeSeatMute = 1008;
|
||||
/// 锁麦/解除锁麦
|
||||
public static final int QXRoomMessageTypeSeatLock = 1009;
|
||||
/// 踢出房间
|
||||
public static final int QXRoomMessageTypeTakeOff = 1011;
|
||||
/// 房间类型发生变化
|
||||
public static final int QXRoomMessageTypeRoomTypeChanged = 1012;
|
||||
/// 点歌/切歌/同意点歌
|
||||
public static final int QXRoomMessageTypeSwicthSong = 1013;
|
||||
|
||||
/// 上麦模式发生变化 自由麦 | 排麦
|
||||
public static final int QXRoomMessageTypeAplayPitModeDidChanged = 1014;
|
||||
/// pk房数值变化
|
||||
public static final int QXRoomMessageTypePKValueDidChanged = 1015;
|
||||
/// 房间类型发生变化
|
||||
public static final int QXRoomMessageTypeRoomTypeDidChanged = 1016;
|
||||
/// 管理员被删除
|
||||
public static final int QXRoomMessageTypeManagerIsDelete = 1017;
|
||||
/// 主持人被删除
|
||||
public static final int QXRoomMessageTypeCompereIsDelete = 1018;
|
||||
/// k歌房送礼后魅力发生变化
|
||||
public static final int QXRoomMessageTypeRoomIsClose = 1019;
|
||||
/// 修改房间信息
|
||||
public static final int QXRoomMessageTypeRoomUpdate = 1020;
|
||||
/// 清楚魅力值
|
||||
public static final int QXRoomMessageTypeRoom = 1021;
|
||||
/// 拍卖者被拉上麦
|
||||
public static final int QXRoomMessageTypeAuctionIsUp = 1022;
|
||||
/// 拍卖者拍卖开始
|
||||
public static final int QXRoomMessageTypeAuctionIsSelected = 1023;
|
||||
/// 竞拍开始,竞拍麦位发生变化
|
||||
public static final int QXRoomMessageTypeAuctionIsStart = 1024;
|
||||
/// 竞拍结束
|
||||
public static final int QXRoomMessageTypeAuctionIsEnd = 1025;
|
||||
/// 主持延时
|
||||
public static final int QXRoomMessageTypeCompereDelay = 1026;
|
||||
/// 竞拍类型变化
|
||||
public static final int QXRoomMessageTypeAuctionTypeChanged = 1027;
|
||||
/// cp房送礼物推送礼物火热值
|
||||
public static final int QXRoomMessageTypeRoomIsHostvalue = 1028;
|
||||
/// 有人向我发起pk
|
||||
public static final int QXRoomMessageTypeRoomRecieveInvitePk = 1029;
|
||||
/// 拒绝或接受pk
|
||||
public static final int QXRoomMessageTypeRoomPKAgreeOrRefuse = 1030;
|
||||
/// pk开始
|
||||
public static final int QXRoomMessageTypeRoomPKStart = 1031;
|
||||
/// pk结束 惩罚时间
|
||||
public static final int QXRoomMessageTypeRoomPKEnd = 1032;
|
||||
/// pk断开
|
||||
public static final int QXRoomMessageTypeRoomPKDisconnect = 1033;
|
||||
///关闭对方麦克风
|
||||
public static final int QXRoomMessageTypeMuteRemoteAudio = 125;
|
||||
private RoomMessageEvent emMessage;
|
||||
|
||||
private int custom = 0;
|
||||
|
||||
|
||||
/**
|
||||
* 1 系统消息、官方公告
|
||||
* 2 用户发送的消息
|
||||
* 3 加入房间 、赠送礼物、上下麦、禁言
|
||||
* 4 新用户注册
|
||||
* 5 摇签
|
||||
* 6 表情
|
||||
* 8 球球大作战
|
||||
* 9 派单需求
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int getItemType() {
|
||||
if (emMessage != null) {
|
||||
int type = emMessage.getMsgType();
|
||||
switch (type) {
|
||||
case QXRoomMessageTypeSystem:
|
||||
case QXRoomMessageTypeJoin:
|
||||
case QXRoomMessageTypeQuit:
|
||||
case QXRoomMessageTypeUpSeat:
|
||||
case QXRoomMessageTypeDownSeat:
|
||||
case QXRoomMessageTypeAplayPitModeDidChanged:
|
||||
case QXRoomMessageTypeSetCompere://设置主持
|
||||
case QXRoomMessageTypeSetManage:
|
||||
case QXRoomMessageTypeManagerIsDelete:
|
||||
case QXRoomMessageTypeCompereIsDelete:
|
||||
case QXRoomMessageTypeAuctionIsUp:
|
||||
case QXRoomMessageTypeAuctionIsSelected:
|
||||
case QXRoomMessageTypeAuctionIsStart:
|
||||
case QXRoomMessageTypeAuctionIsEnd:
|
||||
case QXRoomMessageTypeCompereDelay:
|
||||
case QXRoomMessageTypeAuctionTypeChanged:
|
||||
case QXRoomMessageTypeRoomIsHostvalue:
|
||||
case QXRoomMessageTypeRoomRecieveInvitePk:
|
||||
case QXRoomMessageTypeRoomPKAgreeOrRefuse:
|
||||
case QXRoomMessageTypeRoomPKStart:
|
||||
case QXRoomMessageTypeRoomPKEnd:
|
||||
case QXRoomMessageTypeRoomPKDisconnect:
|
||||
return 1;
|
||||
case QXRoomMessageTypeGift:
|
||||
return 3;
|
||||
case 1:
|
||||
return 2;
|
||||
case QXRoomMessageTypeRoomTypeChanged://房间类型发生变化
|
||||
return 4;
|
||||
case QXRoomMessageTypeSwicthSong://点歌/切歌/同意点歌
|
||||
return 4;
|
||||
case QXRoomMessageTypeRoomIsClose://魅力发生变化
|
||||
return 4;
|
||||
case QXRoomMessageTypeTakeOff://提出房间
|
||||
return 4;
|
||||
default:
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
public int getCustom() {
|
||||
return custom;
|
||||
}
|
||||
|
||||
public void setCustom(int custom) {
|
||||
this.custom = custom;
|
||||
}
|
||||
|
||||
public EMMessageInfo(RoomMessageEvent emMessage) {
|
||||
this.emMessage = emMessage;
|
||||
}
|
||||
|
||||
public RoomMessageEvent getEmMessage() {
|
||||
return emMessage;
|
||||
}
|
||||
|
||||
public void setEmMessage(RoomMessageEvent emMessage) {
|
||||
this.emMessage = emMessage;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查ItemType是否在范围内,避免crash
|
||||
*
|
||||
* @param action
|
||||
* @return
|
||||
*/
|
||||
public boolean checkItemType(int action) {
|
||||
return action > 0 && action < 10 && action != 7;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.qxcm.moduleutil.bean.room;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/7/3
|
||||
*@description: pk实体
|
||||
*/
|
||||
@Data
|
||||
public class PkRoomInfo {
|
||||
private String pk_room_id;//对方房间的roomId
|
||||
private String invite_pk_user_id;//pk发起者的用户id
|
||||
private String pk_id;//pkid
|
||||
private String pk_time;//剩余时间点
|
||||
private String my_room_value;//自己房间的pk值
|
||||
private String pk_room_value;//对方房间的pk值
|
||||
private String pk_part;;//2:等待开始、3:进行中、4:惩罚阶段
|
||||
private String pk_end_times;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.qxcm.moduleutil.bean.room;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RoomApplyListBean {
|
||||
|
||||
private List<Special> regular;//普通通道
|
||||
private List<Special> special;//优先通道
|
||||
private GiftInfo gift_info;
|
||||
@Data
|
||||
public static class Regular {
|
||||
private String id; //排到id
|
||||
private String user_id;//用户id
|
||||
private String rank_value;//排序值
|
||||
private String nickname;//昵称
|
||||
private String avatar;//头像
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class Special {
|
||||
private String id; //排到id
|
||||
private String user_id;//用户id
|
||||
private String rank_value;//排序值
|
||||
private String nickname;//昵称
|
||||
private String avatar;//头像
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class GiftInfo {
|
||||
private String id;//用户助力上麦礼物id
|
||||
private String user_id;//用户id,设置本次礼物的用户id
|
||||
private String room_id;//房间id
|
||||
private String gift_id;//礼物id
|
||||
private String gift_price;//礼物价格
|
||||
private String gift_name;//礼物名称
|
||||
private String base_image;//礼物图片
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.qxcm.moduleutil.bean.room;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/28
|
||||
*@description: 拍卖房信息
|
||||
*/
|
||||
@Data
|
||||
public class RoomAuction implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private List<AuctionListBean> auction_list;//拍卖房右边列表
|
||||
private AuctionUserBean auction_user;//拍卖房用户信息
|
||||
|
||||
@Data
|
||||
public static class AuctionUserBean implements Serializable{
|
||||
private String auction_id;
|
||||
private String user_id;
|
||||
private String nickname;
|
||||
private String avatar;
|
||||
private String sex;
|
||||
private String user_code;
|
||||
private String auction_type;//拍卖类型
|
||||
private String relation_id;//关系id
|
||||
private String gift_id;
|
||||
private String gift_name;//礼物名称
|
||||
private String gift_price;//礼物价值
|
||||
private String time_day;//关系拍卖时间
|
||||
private String dress;//用户头像装扮
|
||||
private String relation_name;//关系名称
|
||||
private String relation_icon;//关系图标
|
||||
private String base_image;//礼物图片
|
||||
private long duration;//时间
|
||||
}
|
||||
|
||||
@Data
|
||||
public class AuctionListBean implements Serializable {
|
||||
private String user_id;
|
||||
private String user_code;
|
||||
private String nickname;
|
||||
private String avatar;
|
||||
private String dress;
|
||||
private String sex;
|
||||
private String gift_price;
|
||||
private String charm;
|
||||
private List<String> icon;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.qxcm.moduleutil.bean.room;
|
||||
|
||||
import com.qxcm.moduleutil.bean.MusicSongBean;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@@ -67,28 +69,41 @@ public class RoomBean implements Serializable {
|
||||
* role : 3
|
||||
*/
|
||||
|
||||
private String room_id;
|
||||
private String room_id;//房间id
|
||||
private String room_number;//房间id码
|
||||
private String is_user_code;//是否使用靓号
|
||||
private String room_name;//房间名称
|
||||
private String room_cover;//房间封面
|
||||
private String room_intro;//房间公告
|
||||
private String type_id;//房间类型
|
||||
private String type_name;//房间类型名称
|
||||
private String user_id;//房主id
|
||||
private String label_id;//类型id
|
||||
private String label_icon;//房间类型图标
|
||||
private String room_background;//房间背景
|
||||
private String hot_value;//房间火热值
|
||||
private String chatrooms;//房间群组id
|
||||
private List<RoomPitBean> pit_list;//麦位信息
|
||||
private String room_up_pit_type;
|
||||
private int online_number;
|
||||
|
||||
|
||||
private String room_code;
|
||||
private String popularity;
|
||||
private String chatrooms;
|
||||
private String room_name;
|
||||
private String label_icon_room;
|
||||
private String bg_picture;
|
||||
private String cover_picture;
|
||||
private String playing;
|
||||
private String label_id;
|
||||
private String label_name;
|
||||
private String wheat;
|
||||
private String greeting;
|
||||
private String type_id;
|
||||
private String type_name;
|
||||
private int show_ball_game;
|
||||
private int is_password;
|
||||
private String official_notice;
|
||||
private String apply_count;
|
||||
private String contribution;
|
||||
private int role;
|
||||
private List<RoomPitBean> pit_list;
|
||||
|
||||
private int cardiac; // 显示心动 1开 0关
|
||||
private int is_fm;
|
||||
private int room_type;//0普通房1电台房2相亲房3派单厅"
|
||||
@@ -108,6 +123,8 @@ public class RoomBean implements Serializable {
|
||||
private int status; // 相亲状态
|
||||
private AInfo activity_img; // 相亲活动介绍图片
|
||||
private RoomFriendBean friend;
|
||||
private int is_pk; //1:接收 2:不接受
|
||||
private int last_pk_room_id;//记录上次pk的房间id
|
||||
|
||||
public int getSceneId() {
|
||||
if (sound_effect != null) {
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.qxcm.moduleutil.bean.room;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/7/1
|
||||
*@description: Cp电影房用户信息
|
||||
*/
|
||||
@Data
|
||||
public class RoomCpUserBean {
|
||||
private String time_day;
|
||||
private String user_id;
|
||||
private String nickname;
|
||||
private String avatar;
|
||||
private String cp_id;
|
||||
private String user_code;
|
||||
private String user_id1;
|
||||
private String nickname1;
|
||||
private String avatar1;
|
||||
private String user_code1;
|
||||
private String dress;
|
||||
private String dress1;
|
||||
}
|
||||
@@ -1,51 +1,61 @@
|
||||
package com.qxcm.moduleutil.bean.room;
|
||||
|
||||
import com.qxcm.moduleutil.bean.MusicSongBean;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 项目名称 qipao-android
|
||||
* 包名:com.qpyy.room.bean
|
||||
* 创建人 王欧
|
||||
* 创建时间 2020/7/24 2:58 PM
|
||||
* 描述 describe
|
||||
*@author qx
|
||||
*@data 2025/6/10
|
||||
*@description: 房间信息
|
||||
*/
|
||||
@Data
|
||||
public class RoomInfoResp implements Serializable {
|
||||
private RoomBean room_info;
|
||||
private RoomOwnerBean owner_info;
|
||||
private RoomUserBean user_info;
|
||||
private static final long serialVersionUID = 1L;
|
||||
private RoomBean room_info; //房间信息
|
||||
private RoomOwnerBean room_owner;//房主信息
|
||||
private RoomUserBean user_info;//用户信息
|
||||
private List<BannerItem> banner;
|
||||
private RoomOrderDemand demand;//嘉宾需求
|
||||
private int rejoin;
|
||||
private int is_show_self;//盲盒是否送自己
|
||||
private MusicSongBean song_user_info;
|
||||
private MusicSongBean nextInfo;
|
||||
private RoomAuction room_auction;//拍卖房信息
|
||||
private RoomCpUserBean cp_user;
|
||||
private PkRoomInfo pk_info;
|
||||
|
||||
|
||||
//弹出麦位操作弹出
|
||||
public boolean isWheatManager() {
|
||||
//是管理员且在1或者9号麦,当时房主模式时,2号麦也有管理权限
|
||||
// return isManager() && (user_info.getPit() == 1 || user_info.getPit() == 9 || (room_info.getIs_owner_model() == 1 && user_info.getPit() == 2));
|
||||
return isManager() && ( user_info.getPit() == 9 || (room_info.getIs_owner_model() == 1 && user_info.getPit() == 2));
|
||||
return isManager() && user_info.getPit_number() == 9 ;
|
||||
}
|
||||
|
||||
public boolean isPreside(){
|
||||
return user_info.getIs_preside() == 1;
|
||||
return user_info.getIs_host() == 1;
|
||||
}
|
||||
//管理权限
|
||||
public boolean isManager() {
|
||||
return room_info.getRole() == 1 || room_info.getRole() == 2 || room_info.getRole() == 5;
|
||||
return user_info.getIs_management() == 1 ;
|
||||
}
|
||||
|
||||
//管理权限
|
||||
public boolean isOwner() {
|
||||
return room_info.getRole() == 1;
|
||||
return user_info.getIs_management() == 1;
|
||||
}
|
||||
|
||||
//可查看房间流水
|
||||
public boolean isMicPlace() {
|
||||
return (room_info.getRole() == 1 || room_info.getRole() == 2 || room_info.getActual_role() == 5) && room_info.getRoom_type() != 1;
|
||||
return isManager();
|
||||
}
|
||||
|
||||
public boolean isCollect(){
|
||||
return user_info.getIs_collect() == 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +65,7 @@ public class RoomInfoResp implements Serializable {
|
||||
* @return
|
||||
*/
|
||||
public boolean isHost() {
|
||||
return (room_info.getRole() == 1 || room_info.getRole() == 2) && user_info.getPit() == 9;
|
||||
return user_info.getIs_host() == 1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -73,7 +83,7 @@ public class RoomInfoResp implements Serializable {
|
||||
* @return
|
||||
*/
|
||||
public boolean isOnWheat() {
|
||||
return user_info.getPit() != 0;
|
||||
return user_info.getPit_number() != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -81,18 +91,18 @@ public class RoomInfoResp implements Serializable {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isRowWheat() {
|
||||
return user_info.getApply_wait() == 1;
|
||||
}
|
||||
// public boolean isRowWheat() {
|
||||
// return user_info.getApply_wait() == 1;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 是否是点单排麦中
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isOrderRowWheat() {
|
||||
return isRowWheat() && user_info.getApply_wait_type() == 1;
|
||||
}
|
||||
// public boolean isOrderRowWheat() {
|
||||
// return isRowWheat() && user_info.getApply_wait_type() == 1;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 是否自由模式
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.qxcm.moduleutil.bean.room;
|
||||
|
||||
import com.chad.library.adapter.base.entity.MultiItemEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RoomOnline {
|
||||
|
||||
private List<RoomOnlineBean> on_pit;//麦上用户
|
||||
private List<RoomOnlineBean> off_pit;//麦下用户
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.qxcm.moduleutil.bean.room;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author qx
|
||||
* @data 2025/6/10
|
||||
* @description: 房间在线列表
|
||||
*/
|
||||
@Data
|
||||
public class RoomOnlineBean {
|
||||
|
||||
private int user_id;
|
||||
private String nickname;
|
||||
private String avatar;
|
||||
private int pit_number;//麦位号
|
||||
private String role;//1:房主、2:管理员、3:主持人 4:嘉宾 5:普通用户
|
||||
private List<String> icon;
|
||||
private int type;//1:麦上用户 2:麦下用户
|
||||
private int type_pit;//判断是从哪里点击进来的,确认显示不显示抱麦按钮 1:点击顶部列表,不显示抱麦按钮 2:点击麦位上的抱麦按钮,显示抱麦按钮 ,
|
||||
}
|
||||
@@ -2,6 +2,13 @@ package com.qxcm.moduleutil.bean.room;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/9
|
||||
*@description: 房主信息
|
||||
*/
|
||||
@Data
|
||||
public class RoomOwnerBean implements Serializable {
|
||||
|
||||
|
||||
@@ -15,56 +22,10 @@ public class RoomOwnerBean implements Serializable {
|
||||
|
||||
private String user_id;
|
||||
private String user_code;
|
||||
private String head_picture;
|
||||
private String avatar;
|
||||
private String sex;
|
||||
private String nickname;
|
||||
private int status;///0离开1在线
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getUser_id() {
|
||||
return user_id;
|
||||
}
|
||||
|
||||
public void setUser_id(String user_id) {
|
||||
this.user_id = user_id;
|
||||
}
|
||||
|
||||
public String getUser_code() {
|
||||
return user_code;
|
||||
}
|
||||
|
||||
public void setUser_code(String user_code) {
|
||||
this.user_code = user_code;
|
||||
}
|
||||
|
||||
public String getHead_picture() {
|
||||
return head_picture;
|
||||
}
|
||||
|
||||
public void setHead_picture(String head_picture) {
|
||||
this.head_picture = head_picture;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@ package com.qxcm.moduleutil.bean.room;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RoomPitBean implements Serializable {
|
||||
|
||||
|
||||
@@ -25,219 +28,37 @@ public class RoomPitBean implements Serializable {
|
||||
* dress_picture :
|
||||
*/
|
||||
|
||||
private String id;
|
||||
private String id;//id
|
||||
private String pit_number;//麦位号
|
||||
private String state;//麦位状态 正常 ,1封麦;3禁麦
|
||||
private int is_lock;//0未锁麦 1锁麦
|
||||
private int is_mute;//0未禁麦 1禁麦
|
||||
private int count_down;//麦位倒计时
|
||||
private String user_id;//麦位上用户id
|
||||
private String nickname;//麦位上用户昵称
|
||||
private String avatar;//用户头像
|
||||
private String sex;//性别
|
||||
private String user_code;//用户id码
|
||||
private String dress;//麦位用户头像装扮
|
||||
private String charm;//麦位上用户在当前房间的魅力值
|
||||
|
||||
|
||||
private String room_id;
|
||||
private String user_id;
|
||||
private String pit_number;
|
||||
private String voice;
|
||||
private String shutup;
|
||||
private String state;
|
||||
private String nickname;
|
||||
|
||||
private String head_picture;
|
||||
private String sex;
|
||||
private String emchat_username;
|
||||
private String rank_id;
|
||||
private String nobility;
|
||||
private String xin_dong;
|
||||
// private String xin_dong;
|
||||
private String banned;
|
||||
private String dress_picture;
|
||||
private RankInfo rank_info;
|
||||
private int count_down;
|
||||
private int ball_state;//1开球0未开球
|
||||
private int is_online;//是否在线 : 1在线 2离线
|
||||
private String to_pit_number;
|
||||
private boolean is_pk;//是否是在pk模式中
|
||||
|
||||
public String getTo_pit_number() {
|
||||
return to_pit_number;
|
||||
}
|
||||
|
||||
public void setTo_pit_number(String to_pit_number) {
|
||||
this.to_pit_number = to_pit_number;
|
||||
}
|
||||
|
||||
public int getIs_online() {
|
||||
return is_online;
|
||||
}
|
||||
|
||||
public void setIs_online(int is_online) {
|
||||
this.is_online = is_online;
|
||||
}
|
||||
|
||||
public int getBall_state() {
|
||||
return ball_state;
|
||||
}
|
||||
|
||||
public void setBall_state(int ball_state) {
|
||||
this.ball_state = ball_state;
|
||||
}
|
||||
|
||||
public int getCount_down() {
|
||||
return count_down;
|
||||
}
|
||||
|
||||
public void setCount_down(int count_down) {
|
||||
this.count_down = count_down;
|
||||
}
|
||||
|
||||
public RankInfo getRank_info() {
|
||||
return rank_info;
|
||||
}
|
||||
|
||||
public void setRank_info(RankInfo rank_info) {
|
||||
this.rank_info = rank_info;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getRoom_id() {
|
||||
return room_id;
|
||||
}
|
||||
|
||||
public void setRoom_id(String room_id) {
|
||||
this.room_id = room_id;
|
||||
}
|
||||
|
||||
public String getUser_id() {
|
||||
return user_id;
|
||||
}
|
||||
|
||||
public void setUser_id(String user_id) {
|
||||
this.user_id = user_id;
|
||||
}
|
||||
|
||||
public String getPit_number() {
|
||||
return pit_number;
|
||||
}
|
||||
|
||||
public void setPit_number(String pit_number) {
|
||||
this.pit_number = pit_number;
|
||||
}
|
||||
|
||||
public String getVoice() {
|
||||
return voice;
|
||||
}
|
||||
|
||||
public void setVoice(String voice) {
|
||||
this.voice = voice;
|
||||
}
|
||||
|
||||
public String getShutup() {
|
||||
return shutup;
|
||||
}
|
||||
|
||||
public void setShutup(String shutup) {
|
||||
this.shutup = shutup;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
|
||||
public String getHead_picture() {
|
||||
return head_picture;
|
||||
}
|
||||
|
||||
public void setHead_picture(String head_picture) {
|
||||
this.head_picture = head_picture;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getEmchat_username() {
|
||||
return emchat_username;
|
||||
}
|
||||
|
||||
public void setEmchat_username(String emchat_username) {
|
||||
this.emchat_username = emchat_username;
|
||||
}
|
||||
|
||||
public String getRank_id() {
|
||||
return rank_id;
|
||||
}
|
||||
|
||||
public void setRank_id(String rank_id) {
|
||||
this.rank_id = rank_id;
|
||||
}
|
||||
|
||||
public String getNobility() {
|
||||
return nobility;
|
||||
}
|
||||
|
||||
public void setNobility(String nobility) {
|
||||
this.nobility = nobility;
|
||||
}
|
||||
|
||||
public String getXin_dong() {
|
||||
return xin_dong;
|
||||
}
|
||||
|
||||
public void setXin_dong(String xin_dong) {
|
||||
this.xin_dong = xin_dong;
|
||||
}
|
||||
|
||||
public String getBanned() {
|
||||
return banned;
|
||||
}
|
||||
|
||||
public void setBanned(String banned) {
|
||||
this.banned = banned;
|
||||
}
|
||||
|
||||
public String getDress_picture() {
|
||||
return dress_picture;
|
||||
}
|
||||
|
||||
public void setDress_picture(String dress_picture) {
|
||||
this.dress_picture = dress_picture;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "RoomPitBean{" +
|
||||
"id='" + id + '\'' +
|
||||
", room_id='" + room_id + '\'' +
|
||||
", user_id='" + user_id + '\'' +
|
||||
", pit_number='" + pit_number + '\'' +
|
||||
", voice='" + voice + '\'' +
|
||||
", shutup='" + shutup + '\'' +
|
||||
", state='" + state + '\'' +
|
||||
", nickname='" + nickname + '\'' +
|
||||
", head_picture='" + head_picture + '\'' +
|
||||
", sex='" + sex + '\'' +
|
||||
", emchat_username='" + emchat_username + '\'' +
|
||||
", rank_id='" + rank_id + '\'' +
|
||||
", nobility='" + nobility + '\'' +
|
||||
", xin_dong='" + xin_dong + '\'' +
|
||||
", banned='" + banned + '\'' +
|
||||
", dress_picture='" + dress_picture + '\'' +
|
||||
", rank_info=" + rank_info +
|
||||
", count_down=" + count_down +
|
||||
", ball_state=" + ball_state +
|
||||
", is_online=" + is_online +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.qxcm.moduleutil.bean.room;
|
||||
|
||||
import com.chad.library.adapter.base.entity.MultiItemEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RoomSettingBean implements MultiItemEntity {
|
||||
|
||||
/// 房间类型
|
||||
/// 点唱房
|
||||
public static final int QXRoomSettingTypeRoomTypeSing = 10;
|
||||
/// 拍卖房
|
||||
public static final int QXRoomSettingTypeRoomTypeAuction = 11;
|
||||
/// 男神房
|
||||
public static final int QXRoomSettingTypeRoomTypeBoy = 12;
|
||||
/// 女神房
|
||||
public static final int QXRoomSettingTypeRoomTypeGirl = 13;
|
||||
|
||||
/// 常用工具
|
||||
/// 房间补贴
|
||||
public static final int QXRoomSettingTypeRoomSubsidy = 14;
|
||||
/// 主持设置
|
||||
public static final int QXRoomSettingTypeRoomCompere = 15;
|
||||
/// 清空消息
|
||||
public static final int QXRoomSettingTypeRoomClearMessage = 16;
|
||||
/// 麦序
|
||||
public static final int QXRoomSettingTypeRoomOrderMic = 17;
|
||||
/// 背景音乐
|
||||
public static final int QXRoomSettingTypeRoomBgMusic = 18;
|
||||
/// 背景图片
|
||||
public static final int QXRoomSettingTypeRoomBgImage = 19;
|
||||
|
||||
/// 更多操作
|
||||
/// 离开房间
|
||||
public static final int QXRoomSettingTypeRoomLeave = 20;
|
||||
/// 分享房间
|
||||
public static final int QXRoomSettingTypeRoomShare = 21;
|
||||
/// 调音台
|
||||
public static final int QXRoomSettingTypeRoomMyDress = 22;
|
||||
/// 房间设置
|
||||
public static final int QXRoomSettingTypeRoomSetting = 23;
|
||||
/// 房间欢迎语
|
||||
public static final int QXRoomSettingTypeRoomWelcome = 24;
|
||||
/// 关闭特效
|
||||
public static final int QXRoomSettingTypeRoomCloseEffects = 25;
|
||||
/// 意见反馈
|
||||
public static final int QXRoomSettingTypeRoomReport = 26;
|
||||
|
||||
public static final int ITEM_TYPE_DEFAULT = 0;
|
||||
public static final int ITEM_TYPE_WITH_ICON = 1;
|
||||
|
||||
private String name;//设置功能名称
|
||||
private String icon;//功能图片
|
||||
private String selectName;//选中后名称
|
||||
private String selectIcon;//选中后图片
|
||||
private int type;//功能类型
|
||||
private int itemType;
|
||||
private int read;//角色 1:房主 2:管理员 3:主持、4:观众
|
||||
private boolean isSelected;//是否在麦位上
|
||||
private boolean status;
|
||||
|
||||
|
||||
public RoomSettingBean(String name, String icon, String selectName, String selectIcon, int type, int read, boolean isSelected, boolean status) {
|
||||
this.name = name;
|
||||
this.icon = icon;
|
||||
this.selectName = selectName;
|
||||
this.selectIcon = selectIcon;
|
||||
this.type = type;
|
||||
this.read = read;
|
||||
this.isSelected = isSelected;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemType() {
|
||||
return itemType;
|
||||
}
|
||||
public void updateItemType() {
|
||||
if (type == -1) { // 特殊值表示标题
|
||||
this.itemType = ITEM_TYPE_DEFAULT;
|
||||
} else {
|
||||
this.itemType = ITEM_TYPE_WITH_ICON;
|
||||
}
|
||||
}
|
||||
// public void updateItemType() {
|
||||
// switch (type) {
|
||||
// case QXRoomSettingTypeRoomSubsidy:
|
||||
// case QXRoomSettingTypeRoomCompere:
|
||||
// case QXRoomSettingTypeRoomClearMessage:
|
||||
// case QXRoomSettingTypeRoomOrderMic:
|
||||
// case QXRoomSettingTypeRoomBgMusic:
|
||||
// case QXRoomSettingTypeRoomBgImage:
|
||||
// this.itemType = ITEM_TYPE_WITH_ICON;
|
||||
// break;
|
||||
// case QXRoomSettingTypeRoomLeave:
|
||||
// case QXRoomSettingTypeRoomShare:
|
||||
// case QXRoomSettingTypeRoomMyDress:
|
||||
// case QXRoomSettingTypeRoomSetting:
|
||||
// case QXRoomSettingTypeRoomWelcome:
|
||||
// case QXRoomSettingTypeRoomCloseEffects:
|
||||
// case QXRoomSettingTypeRoomReport:
|
||||
// this.itemType = ITEM_TYPE_ACTION_BUTTON;
|
||||
// break;
|
||||
// default:
|
||||
// this.itemType = ITEM_TYPE_DEFAULT;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.qxcm.moduleutil.bean.room;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RoomUpPitBean {
|
||||
private String id;
|
||||
private String room_id;
|
||||
private String user_id;
|
||||
private String pit_number;
|
||||
private String voice;
|
||||
private String shutup;
|
||||
private String state;
|
||||
private String nickname;
|
||||
private String head_picture;
|
||||
private String sex;
|
||||
private String emchat_username;
|
||||
private String rank_id;
|
||||
private String nobility;
|
||||
private String xin_dong;
|
||||
private String banned;
|
||||
private String dress_picture;
|
||||
private RankInfo rank_info;
|
||||
private int count_down;
|
||||
private int ball_state;//1开球0未开球
|
||||
private int is_online;//是否在线 : 1在线 2离线
|
||||
private String to_pit_number;
|
||||
}
|
||||
@@ -2,6 +2,14 @@ package com.qxcm.moduleutil.bean.room;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/9
|
||||
*@description:房间用户信息
|
||||
*/
|
||||
@Data
|
||||
public class RoomUserBean implements Serializable {
|
||||
|
||||
|
||||
@@ -13,196 +21,41 @@ public class RoomUserBean implements Serializable {
|
||||
* shutup : 0
|
||||
*/
|
||||
|
||||
private int banned;
|
||||
private int favorite;
|
||||
private int pit;
|
||||
private int voice;//1开 2关 麦克风
|
||||
private int shutup;
|
||||
private RankInfo rank_info;
|
||||
private int show_cat;
|
||||
private int guide;
|
||||
private int mixer;
|
||||
private int apply_wait;//是否排麦中,1是 0否
|
||||
private int role;
|
||||
private String rank_icon;
|
||||
private String nobility_icon;
|
||||
private String nickname;
|
||||
private String user_id;
|
||||
private int user_is_new;
|
||||
private int apply_wait_type;//1申请上老板位2申请上1-7号麦
|
||||
private String charm_icon;
|
||||
private String user_id;//用户id
|
||||
private String user_code;//用户id码
|
||||
private String sex;//性别1男2女
|
||||
private String nickname;//用户昵称
|
||||
private String avatar;//用户头像
|
||||
private String dress;//头像装扮
|
||||
private int is_room_owner;//是否是房主,1是;0不是
|
||||
private int pit_number;//麦位号,如果在麦位上就返回值
|
||||
private String state;//麦位状态,如果在麦位撒好难过就有返回值,正常;1:封麦;3禁麦
|
||||
private String count_down;//麦位倒计时,在麦位上就有返回值,禁麦倒计时
|
||||
private int is_collect;//是否收藏,1是;0没有
|
||||
private int is_host;//是否是主持;1是;0不是
|
||||
private int is_management;//是否是管理 ;1是;0不是
|
||||
private String agora_token;//声网的token
|
||||
private String agora_rtm_token;
|
||||
private String is_mute;//是否在本房间禁言 1是 0否
|
||||
private String is_mute_pit;//是否在本房间内禁麦 1是 0否
|
||||
|
||||
private int is_preside;//是否是主持人 1是 0否
|
||||
// private int banned;
|
||||
// private int favorite;
|
||||
// private int pit;
|
||||
// private int voice;//1开 2关 麦克风
|
||||
// private int shutup;
|
||||
// private RankInfo rank_info;
|
||||
// private int show_cat;
|
||||
// private int guide;
|
||||
// private int mixer;
|
||||
// private int apply_wait;//是否排麦中,1是 0否
|
||||
// private int role;
|
||||
// private String rank_icon;
|
||||
// private String nobility_icon;
|
||||
// private int user_is_new;
|
||||
// private int apply_wait_type;//1申请上老板位2申请上1-7号麦
|
||||
// private String charm_icon;
|
||||
|
||||
public int getIs_preside() {
|
||||
return is_preside;
|
||||
}
|
||||
|
||||
public void setIs_preside(int is_preside) {
|
||||
this.is_preside = is_preside;
|
||||
}
|
||||
|
||||
public String getCharm_icon() {
|
||||
return charm_icon;
|
||||
}
|
||||
|
||||
public void setCharm_icon(String charm_icon) {
|
||||
this.charm_icon = charm_icon;
|
||||
}
|
||||
|
||||
public int getApply_wait_type() {
|
||||
return apply_wait_type;
|
||||
}
|
||||
|
||||
public void setApply_wait_type(int apply_wait_type) {
|
||||
this.apply_wait_type = apply_wait_type;
|
||||
}
|
||||
|
||||
public int getUser_is_new() {
|
||||
return user_is_new;
|
||||
}
|
||||
|
||||
public void setUser_is_new(int user_is_new) {
|
||||
this.user_is_new = user_is_new;
|
||||
}
|
||||
|
||||
private String ball;//a1,b1,c1l
|
||||
|
||||
private String room_id;
|
||||
|
||||
public int getRole() {
|
||||
return role;
|
||||
}
|
||||
|
||||
public void setRole(int role) {
|
||||
this.role = role;
|
||||
}
|
||||
|
||||
public String getRank_icon() {
|
||||
return rank_icon;
|
||||
}
|
||||
|
||||
public void setRank_icon(String rank_icon) {
|
||||
this.rank_icon = rank_icon;
|
||||
}
|
||||
|
||||
public String getNobility_icon() {
|
||||
return nobility_icon;
|
||||
}
|
||||
|
||||
public void setNobility_icon(String nobility_icon) {
|
||||
this.nobility_icon = nobility_icon;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
|
||||
public String getUser_id() {
|
||||
return user_id;
|
||||
}
|
||||
|
||||
public void setUser_id(String user_id) {
|
||||
this.user_id = user_id;
|
||||
}
|
||||
|
||||
public String getRoom_id() {
|
||||
return room_id;
|
||||
}
|
||||
|
||||
public void setRoom_id(String room_id) {
|
||||
this.room_id = room_id;
|
||||
}
|
||||
|
||||
public String getBall() {
|
||||
return ball;
|
||||
}
|
||||
|
||||
public void setBall(String ball) {
|
||||
this.ball = ball;
|
||||
}
|
||||
|
||||
public int getApply_wait() {
|
||||
return apply_wait;
|
||||
}
|
||||
|
||||
public void setApply_wait(int apply_wait) {
|
||||
this.apply_wait = apply_wait;
|
||||
}
|
||||
|
||||
public int getMixer() {
|
||||
return mixer;
|
||||
}
|
||||
|
||||
public void setMixer(int mixer) {
|
||||
this.mixer = mixer;
|
||||
}
|
||||
|
||||
public int getGuide() {
|
||||
return guide;
|
||||
}
|
||||
|
||||
public void setGuide(int guide) {
|
||||
this.guide = guide;
|
||||
}
|
||||
|
||||
public int getShow_cat() {
|
||||
return show_cat;
|
||||
}
|
||||
|
||||
public void setShow_cat(int show_cat) {
|
||||
this.show_cat = show_cat;
|
||||
}
|
||||
|
||||
public RankInfo getRank_info() {
|
||||
return rank_info;
|
||||
}
|
||||
|
||||
public void setRank_info(RankInfo rank_info) {
|
||||
this.rank_info = rank_info;
|
||||
}
|
||||
|
||||
public int getBanned() {
|
||||
return banned;
|
||||
}
|
||||
|
||||
public void setBanned(int banned) {
|
||||
this.banned = banned;
|
||||
}
|
||||
|
||||
public int getFavorite() {
|
||||
return favorite;
|
||||
}
|
||||
|
||||
public void setFavorite(int favorite) {
|
||||
this.favorite = favorite;
|
||||
}
|
||||
|
||||
public int getPit() {
|
||||
return pit;
|
||||
}
|
||||
|
||||
public void setPit(int pit) {
|
||||
this.pit = pit;
|
||||
}
|
||||
|
||||
public int getVoice() {
|
||||
return voice;
|
||||
}
|
||||
|
||||
public void setVoice(int voice) {
|
||||
this.voice = voice;
|
||||
}
|
||||
|
||||
public int getShutup() {
|
||||
return shutup;
|
||||
}
|
||||
|
||||
public void setShutup(int shutup) {
|
||||
this.shutup = shutup;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
package com.qxcm.moduleutil.dialog;
|
||||
|
||||
import static com.liulishuo.okdownload.OkDownloadProvider.context;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.widget.Button;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.qxcm.moduleutil.R;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/16
|
||||
*@description: 确认弹框,使用在动态删除评论
|
||||
*/
|
||||
public class ConfirmDialog extends Dialog {
|
||||
|
||||
private String title;
|
||||
private String message;
|
||||
private String positiveButtonText;
|
||||
private String negativeButtonText;
|
||||
private View.OnClickListener positiveButtonClickListener;
|
||||
private View.OnClickListener negativeButtonClickListener;
|
||||
private boolean isCountdownEnabled = false; // 是否启用倒计时
|
||||
private int countdownSeconds = 0; // 倒计时秒数
|
||||
private CountDownTimer countDownTimer; // 倒计时对象
|
||||
|
||||
|
||||
public ConfirmDialog(Context context, String title, String message,
|
||||
String positiveButtonText, String negativeButtonText,
|
||||
View.OnClickListener positiveButtonClickListener,
|
||||
View.OnClickListener negativeButtonClickListener,
|
||||
boolean isCountdownEnabled, int countdownSeconds) {
|
||||
super(context);
|
||||
this.title = title;
|
||||
this.message = message;
|
||||
this.positiveButtonText = positiveButtonText;
|
||||
this.negativeButtonText = negativeButtonText;
|
||||
this.positiveButtonClickListener = positiveButtonClickListener;
|
||||
this.negativeButtonClickListener = negativeButtonClickListener;
|
||||
this.isCountdownEnabled = isCountdownEnabled;
|
||||
this.countdownSeconds = countdownSeconds;
|
||||
}
|
||||
|
||||
private void init() {
|
||||
Window window = getWindow();
|
||||
if (window != null) {
|
||||
window.setGravity(Gravity.CENTER); // 居中显示
|
||||
window.setBackgroundDrawableResource(R.drawable.bg_r16_fff); // 透明背景
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.dialog_confirm);
|
||||
init();
|
||||
// 动态设置背景
|
||||
// getWindow().setBackgroundDrawableResource(R.drawable.bg_r16_fff);
|
||||
|
||||
// 初始化视图
|
||||
TextView tvTitle = findViewById(R.id.tv_title);
|
||||
TextView tvMessage = findViewById(R.id.tv_message);
|
||||
Button btnPositive = findViewById(R.id.btn_positive);
|
||||
Button btnNegative = findViewById(R.id.btn_negative);
|
||||
@SuppressLint({"MissingInflatedId", "LocalSuppress"})
|
||||
ConstraintLayout rootView =(ConstraintLayout) findViewById(R.id.root_view);
|
||||
// 设置文本
|
||||
tvTitle.setText(title);
|
||||
tvMessage.setText(message);
|
||||
btnPositive.setText(positiveButtonText);
|
||||
btnNegative.setText(negativeButtonText);
|
||||
|
||||
// 设置点击监听器
|
||||
btnPositive.setOnClickListener(v -> {
|
||||
if (positiveButtonClickListener != null) {
|
||||
positiveButtonClickListener.onClick(v);
|
||||
}
|
||||
dismiss();
|
||||
});
|
||||
|
||||
btnNegative.setOnClickListener(v -> {
|
||||
if (negativeButtonClickListener != null) {
|
||||
negativeButtonClickListener.onClick(v);
|
||||
}
|
||||
dismiss();
|
||||
});
|
||||
// 倒计时逻辑
|
||||
if (isCountdownEnabled && countdownSeconds > 0) {
|
||||
startCountdown(btnNegative);
|
||||
}
|
||||
|
||||
// 找到根布局并应用动画
|
||||
|
||||
// if (rootView != null) {
|
||||
// Animation slideDown = AnimationUtils.loadAnimation(context, R.anim.slide_down);
|
||||
// Animation shake = AnimationUtils.loadAnimation(context, R.anim.shake);
|
||||
//
|
||||
// rootView.startAnimation(slideDown);
|
||||
// rootView.startAnimation(shake);
|
||||
// }
|
||||
}
|
||||
|
||||
private void startCountdown(Button btnNegative) {
|
||||
countDownTimer = new CountDownTimer(countdownSeconds * 1000L, 1000) {
|
||||
@Override
|
||||
public void onTick(long millisUntilFinished) {
|
||||
int secondsLeft = (int) (millisUntilFinished / 1000);
|
||||
btnNegative.setText(negativeButtonText + " (" + secondsLeft + "s)");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
btnNegative.setText(negativeButtonText);
|
||||
if (negativeButtonClickListener != null) {
|
||||
negativeButtonClickListener.onClick(btnNegative); // 自动触发取消
|
||||
}
|
||||
dismiss();
|
||||
}
|
||||
}.start();
|
||||
}
|
||||
@Override
|
||||
public void dismiss() {
|
||||
if (countDownTimer != null) {
|
||||
countDownTimer.cancel(); // 取消倒计时
|
||||
countDownTimer = null;
|
||||
}
|
||||
super.dismiss();
|
||||
}
|
||||
}
|
||||
@@ -60,7 +60,7 @@ public class PolicyDialog extends Dialog {
|
||||
ds.setUnderlineText(true);
|
||||
}
|
||||
};
|
||||
spanUtils.append("欢迎使用初梦!\n").append("在使用我们的产品和服务之前,请您先阅读并了解").append("《用户协议》").setClickSpan(clickSpan).append("和").append("《隐私协议》").setClickSpan(ysClickSpan).append("。我们将严格按照上述协议为" +
|
||||
spanUtils.append("欢迎使用羽声!\n").append("在使用我们的产品和服务之前,请您先阅读并了解").append("《用户协议》").setClickSpan(clickSpan).append("和").append("《隐私协议》").setClickSpan(ysClickSpan).append("。我们将严格按照上述协议为" +
|
||||
"您提供服务,保护您的信息安全,点" +
|
||||
"击“同意”即表示您已阅读并同意全部" +
|
||||
"条款,可以继续使用我们的产品和服" +
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
package com.qxcm.moduleutil.dialog;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import com.qxcm.moduleutil.R;
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.adapter.BalanceRechargeAdapter;
|
||||
import com.qxcm.moduleutil.base.BaseMvpDialogFragment;
|
||||
import com.qxcm.moduleutil.bean.RechargeBean;
|
||||
import com.qxcm.moduleutil.databinding.FragmentRechargeDialogBinding;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/12
|
||||
*@description: 充值弹框
|
||||
*/
|
||||
public class RechargeDialogFragment extends BaseMvpDialogFragment<IPresenter, FragmentRechargeDialogBinding> {
|
||||
private BalanceRechargeAdapter rechargeAdapter;
|
||||
private String money = "0";
|
||||
private int type = 1;
|
||||
|
||||
public static void show(String id, FragmentManager fragmentManager) {
|
||||
RechargeDialogFragment dialogFragment = new RechargeDialogFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putString("roomId", id); // 可选:传递参数
|
||||
dialogFragment.setArguments(args);
|
||||
dialogFragment.show(fragmentManager, "RoomOnlineDialogFragment");
|
||||
}
|
||||
@Override
|
||||
protected void initDialogStyle(Window window) {
|
||||
super.initDialogStyle(window);
|
||||
window.setGravity(Gravity.BOTTOM);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IPresenter bindPresenter() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
List<RechargeBean> rechargeList = new ArrayList<>();
|
||||
RechargeBean bean1 = new RechargeBean();
|
||||
bean1.setGoldNum("60");
|
||||
bean1.setMoney("6");
|
||||
bean1.setItemViewType(0);
|
||||
rechargeList.add(bean1);
|
||||
RechargeBean bean2 = new RechargeBean();
|
||||
bean2.setGoldNum("100");
|
||||
bean2.setMoney("10");
|
||||
bean2.setItemViewType(0);
|
||||
rechargeList.add(bean2);
|
||||
|
||||
RechargeBean bean3 = new RechargeBean();
|
||||
bean3.setGoldNum("300");
|
||||
bean3.setMoney("30");
|
||||
bean3.setItemViewType(0);
|
||||
rechargeList.add(bean3);
|
||||
RechargeBean bean4 = new RechargeBean();
|
||||
bean4.setGoldNum("500");
|
||||
bean4.setMoney("50");
|
||||
bean4.setItemViewType(0);
|
||||
rechargeList.add(bean4);
|
||||
|
||||
RechargeBean bean5 = new RechargeBean();
|
||||
bean5.setGoldNum("680");
|
||||
bean5.setMoney("68");
|
||||
bean5.setItemViewType(0);
|
||||
rechargeList.add(bean5);
|
||||
RechargeBean bean6 = new RechargeBean();
|
||||
bean6.setGoldNum("1280");
|
||||
bean6.setMoney("128");
|
||||
bean6.setItemViewType(0);
|
||||
rechargeList.add(bean6);
|
||||
|
||||
// 在数据源最后添加一个自定义项
|
||||
RechargeBean customItem = new RechargeBean();
|
||||
customItem.setGoldNum("自定义");
|
||||
customItem.setMoney("");
|
||||
customItem.setItemViewType(1);
|
||||
rechargeList.add(customItem);
|
||||
|
||||
rechargeAdapter = new BalanceRechargeAdapter(rechargeList);
|
||||
rechargeAdapter.setNewData(rechargeList);
|
||||
rechargeAdapter.setListener(new BalanceRechargeAdapter.OnRechargeItemClickListener() {
|
||||
@Override
|
||||
public void onClick(RechargeBean rechargeBean) {
|
||||
money = rechargeBean.getMoney();
|
||||
mBinding.tvPayment.setText(String.format("立即支付(%s元)", money));
|
||||
}
|
||||
});
|
||||
rechargeAdapter.setInputBoxVisibilityListener(new BalanceRechargeAdapter.InputBoxVisibilityListener() {
|
||||
@Override
|
||||
public void onInputBoxVisibilityChanged(boolean isVisible) {
|
||||
// 根据 isVisible 的值来显示或隐藏输入框
|
||||
mBinding.r4.setVisibility(isVisible ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
});
|
||||
mBinding.rvComment.setLayoutManager(new GridLayoutManager(getContext(), 3));
|
||||
mBinding.rvComment.setAdapter(rechargeAdapter);
|
||||
money = bean1.getMoney();
|
||||
mBinding.tvPayment.setText(String.format("立即支付(%s元)", money));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.fragment_recharge_dialog;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.qxcm.moduleutil.dialog;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.blankj.utilcode.util.ConvertUtils;
|
||||
import com.cpiz.android.bubbleview.BubbleFrameLayout;
|
||||
import com.cpiz.android.bubbleview.BubblePopupWindow;
|
||||
import com.cpiz.android.bubbleview.BubbleStyle;
|
||||
import com.qxcm.moduleutil.R;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/10
|
||||
*@description: 带有气泡的提示框
|
||||
*/
|
||||
public class RoomTipsView {
|
||||
|
||||
public static void show(Context context, View anchor, String title, String content) {
|
||||
BubbleFrameLayout bubbleView = (BubbleFrameLayout) LayoutInflater.from(context).inflate(R.layout.room_view_room_tips, null);
|
||||
TextView tvTitle = bubbleView.findViewById(R.id.tv_title);
|
||||
TextView tvContent = bubbleView.findViewById(R.id.tv_content);
|
||||
tvTitle.setText(title);
|
||||
tvContent.setText(content);
|
||||
bubbleView.setCornerRadius(ConvertUtils.dp2px(8));
|
||||
bubbleView.setFillColor(Color.WHITE);
|
||||
BubblePopupWindow window = new BubblePopupWindow(bubbleView, bubbleView);
|
||||
window.setCancelOnTouch(true);
|
||||
window.setCancelOnTouchOutside(true);
|
||||
window.setPadding(ConvertUtils.dp2px(20));
|
||||
anchor.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (window == null || anchor == null) {
|
||||
return;
|
||||
}
|
||||
window.showArrowTo(anchor, BubbleStyle.ArrowDirection.Up);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void showWithDelay(Context context, View anchor, String title, String content) {
|
||||
if (context == null || (context instanceof Activity && (((Activity) context).isDestroyed() || ((Activity) context).isFinishing()))) {
|
||||
return;
|
||||
}
|
||||
BubbleFrameLayout bubbleView = (BubbleFrameLayout) LayoutInflater.from(context).inflate(R.layout.room_view_room_tips, null);
|
||||
TextView tvTitle = bubbleView.findViewById(R.id.tv_title);
|
||||
TextView tvContent = bubbleView.findViewById(R.id.tv_content);
|
||||
tvTitle.setText(title);
|
||||
tvContent.setText(content);
|
||||
bubbleView.setCornerRadius(ConvertUtils.dp2px(8));
|
||||
bubbleView.setFillColor(Color.WHITE);
|
||||
BubblePopupWindow window = new BubblePopupWindow(bubbleView, bubbleView);
|
||||
window.setCancelOnTouch(true);
|
||||
window.setCancelOnTouchOutside(true);
|
||||
window.setPadding(ConvertUtils.dp2px(20));
|
||||
anchor.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (window == null || anchor == null) {
|
||||
return;
|
||||
}
|
||||
window.showArrowTo(anchor, BubbleStyle.ArrowDirection.Up);
|
||||
window.setCancelOnLater(2000);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.qxcm.moduleutil.event;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/23
|
||||
*@description: 特效设置
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class EffectEvent {
|
||||
private boolean effectOn;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.qxcm.moduleutil.event;
|
||||
|
||||
public class GiftDoubleClickEvent {
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.qxcm.moduleutil.event;
|
||||
|
||||
|
||||
import com.qxcm.moduleutil.bean.RoonGiftModel;
|
||||
|
||||
public class GiftUserRefreshEvent {
|
||||
public boolean addSelf;
|
||||
|
||||
public int type;
|
||||
|
||||
public RoonGiftModel gift;
|
||||
|
||||
public GiftUserRefreshEvent(boolean addSelf, int type, RoonGiftModel gift) {
|
||||
this.addSelf = addSelf;
|
||||
this.type = type;
|
||||
this.gift = gift;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.qxcm.moduleutil.event;
|
||||
|
||||
public enum MessageType {
|
||||
JOIN_ROOM(1001, true, true), // 加入房间事件(展示+广播)
|
||||
CLEAR_CHAT(123, false, false), // 清空聊天(不展示不广播)
|
||||
GIFT_MESSAGE(1012, true, false), // 礼物消息(仅展示)
|
||||
MUSIC_PLAY(124, false, true), // 播放音乐(不展示但广播)
|
||||
DEFAULT(0, true, false); // 默认处理
|
||||
|
||||
private final int code;
|
||||
private final boolean show;
|
||||
private final boolean broadcast;
|
||||
|
||||
MessageType(int code, boolean show, boolean broadcast) {
|
||||
this.code = code;
|
||||
this.show = show;
|
||||
this.broadcast = broadcast;
|
||||
}
|
||||
|
||||
public static MessageType fromCode(int code) {
|
||||
for (MessageType type : values()) {
|
||||
if (type.code == code) return type;
|
||||
}
|
||||
return DEFAULT;
|
||||
}
|
||||
|
||||
public boolean isShow() {
|
||||
return show;
|
||||
}
|
||||
|
||||
public boolean isBroadcast() {
|
||||
return broadcast;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.qxcm.moduleutil.event;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/24
|
||||
*@description: 背景音乐
|
||||
*/
|
||||
@Data
|
||||
public class MusicEvent {
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.qxcm.moduleutil.event;
|
||||
|
||||
/**
|
||||
* 项目名称 qipao-android
|
||||
* 包名:com.qpyy.room.event
|
||||
* 创建人 王欧
|
||||
* 创建时间 2020/8/11 3:40 PM
|
||||
* 描述 describe
|
||||
*/
|
||||
public class PasswordInputEvent {
|
||||
public String password;
|
||||
|
||||
public PasswordInputEvent(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.qxcm.moduleutil.event;
|
||||
|
||||
|
||||
import com.qxcm.moduleutil.adapter.GiftTwoAdapter;
|
||||
import com.qxcm.moduleutil.bean.RoonGiftModel;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
public class RoomGiftClickEvent {
|
||||
public WeakReference<GiftTwoAdapter> adapter;
|
||||
public RoonGiftModel gift;
|
||||
public int type;
|
||||
public RoomGiftClickEvent(GiftTwoAdapter adapter, RoonGiftModel gift, int type) {
|
||||
this.adapter = new WeakReference<>(adapter);
|
||||
this.gift = gift;
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.qxcm.moduleutil.event;
|
||||
|
||||
import com.qxcm.moduleutil.adapter.GiftRoomAdapter;
|
||||
import com.qxcm.moduleutil.adapter.GiftTwoAdapter;
|
||||
import com.qxcm.moduleutil.bean.RoonGiftModel;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
public class RoomGiftClickToEvent {
|
||||
public WeakReference<GiftRoomAdapter> adapter;
|
||||
public RoonGiftModel gift;
|
||||
public int type;
|
||||
public RoomGiftClickToEvent(GiftRoomAdapter adapter, RoonGiftModel gift, int type) {
|
||||
this.adapter = new WeakReference<>(adapter);
|
||||
this.gift = gift;
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.qxcm.moduleutil.event;
|
||||
|
||||
|
||||
import com.qxcm.moduleutil.bean.RoonGiftModel;
|
||||
|
||||
public class RoomGiftGiveEvent {
|
||||
public String userId;
|
||||
public String room_id;
|
||||
public String pit;
|
||||
public String num;
|
||||
public RoonGiftModel giftModel;
|
||||
public RoonGiftModel roonGiftModel;
|
||||
public int send_type;
|
||||
public RoomGiftGiveEvent(String userId, String room_id, String pit, String num, int send_type, RoonGiftModel giftModel, RoonGiftModel roonGiftModel){
|
||||
this.userId = userId;
|
||||
this.room_id = room_id;
|
||||
this.pit = pit;
|
||||
this.num = num;
|
||||
this.send_type = send_type;
|
||||
this.giftModel = giftModel;
|
||||
this.roonGiftModel = roonGiftModel;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.qxcm.moduleutil.event;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/13
|
||||
*@description: 进场特效,坐骑
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class RoomJoinMountModel {
|
||||
|
||||
private String room_id;
|
||||
private String ride_url;
|
||||
//1公屏 2全屏
|
||||
private int show_type;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.qxcm.moduleutil.event;
|
||||
|
||||
public class RoomOutEvent {
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.qxcm.moduleutil.event;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RoomOwnerLeaveEvent {
|
||||
private String room_id;
|
||||
private String user_id;
|
||||
private String emchat_username;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.qxcm.moduleutil.event;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class RoomWheatEvent {
|
||||
|
||||
private String roomId;
|
||||
private boolean isFree; //true 自由 false 排麦
|
||||
private boolean isOccupied;//true 上麦 false 下麦
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.qxcm.moduleutil.event;
|
||||
|
||||
public class ShowOnWheatDialogEvent {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.qxcm.moduleutil.event;
|
||||
|
||||
public class UserDownWheatEvent {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.qxcm.moduleutil.event;
|
||||
|
||||
public class UserInfoShowEvent {
|
||||
public String roomId;
|
||||
public String userId;
|
||||
|
||||
public UserInfoShowEvent(String roomId, String userId) {
|
||||
this.roomId = roomId;
|
||||
this.userId = userId;
|
||||
}
|
||||
}
|
||||
@@ -2,30 +2,50 @@ package com.qxcm.moduleutil.http;
|
||||
|
||||
|
||||
import com.qxcm.moduleutil.bean.AlbumBean;
|
||||
import com.qxcm.moduleutil.bean.BlackUserBean;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.bean.CommentBean;
|
||||
import com.qxcm.moduleutil.bean.ExpandColumnBean;
|
||||
import com.qxcm.moduleutil.bean.GiftLabelBean;
|
||||
import com.qxcm.moduleutil.bean.HeatedBean;
|
||||
import com.qxcm.moduleutil.bean.HostBean;
|
||||
import com.qxcm.moduleutil.bean.MusicSongBean;
|
||||
import com.qxcm.moduleutil.bean.MyCpRoom;
|
||||
import com.qxcm.moduleutil.bean.MyFootResp;
|
||||
import com.qxcm.moduleutil.bean.MyRoomBean;
|
||||
import com.qxcm.moduleutil.bean.NewsDataBean;
|
||||
import com.qxcm.moduleutil.bean.PersonaltyBean;
|
||||
import com.qxcm.moduleutil.bean.RealNameBean;
|
||||
import com.qxcm.moduleutil.bean.RewardUserBean;
|
||||
import com.qxcm.moduleutil.bean.RoomBgBean;
|
||||
import com.qxcm.moduleutil.bean.RoomCharmRankBean;
|
||||
import com.qxcm.moduleutil.bean.RoomRelationBean;
|
||||
import com.qxcm.moduleutil.bean.RoomSearchResp;
|
||||
import com.qxcm.moduleutil.bean.RoomTime;
|
||||
import com.qxcm.moduleutil.bean.RoomTypeModel;
|
||||
import com.qxcm.moduleutil.bean.RoonGiftModel;
|
||||
import com.qxcm.moduleutil.bean.SongMusicBean;
|
||||
import com.qxcm.moduleutil.bean.TopRoom;
|
||||
import com.qxcm.moduleutil.bean.UserBean;
|
||||
import com.qxcm.moduleutil.bean.UserInfo;
|
||||
import com.qxcm.moduleutil.bean.UserTagBean;
|
||||
import com.qxcm.moduleutil.bean.WalletBean;
|
||||
import com.qxcm.moduleutil.bean.room.AuctionBean;
|
||||
import com.qxcm.moduleutil.bean.room.RoomApplyListBean;
|
||||
import com.qxcm.moduleutil.bean.room.RoomAuction;
|
||||
import com.qxcm.moduleutil.bean.room.RoomBean;
|
||||
import com.qxcm.moduleutil.bean.room.RoomInfoResp;
|
||||
import com.qxcm.moduleutil.bean.room.RoomOnline;
|
||||
import com.qxcm.moduleutil.bean.zhuangb.ZhuangBanShangChengBean;
|
||||
import com.qxcm.moduleutil.widget.Constants;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
import okhttp3.ResponseBody;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Callback;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FieldMap;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.POST;
|
||||
@@ -44,14 +64,34 @@ public interface ApiServer {
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.USER_LOGIN)
|
||||
Observable<BaseModel<List<UserBean>>> userLogin(@Field("user_login") String user_login, @Field("password") String password);
|
||||
Call<BaseModel<List<UserBean>>> userLogin(@Field("user_login") String user_login, @Field("password") String password);
|
||||
|
||||
@POST(Constants.UPLOAD_NICK_NAME)
|
||||
Observable<BaseModel<String>> upUserNickname();
|
||||
Call<ResponseBody> upUserNickname();
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.ADD_BLACK_LIST)
|
||||
Call<ResponseBody> addBlackList(@Field("user_id") String user_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SEND_PK)
|
||||
Call<ResponseBody> sendPk(@Field("room_id_a") String room_id_a,@Field("create_user_id") String create_user_id,@Field("room_id_b") String room_id_b);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_REFUSE_PK)
|
||||
Call<ResponseBody> refusePk(@Field("is_pk") String is_pk,@Field("room_id") String room_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_END_PK)
|
||||
Call<ResponseBody> endPk(@Field("pk_id") String is_pk,@Field("type") String type,@Field("user_id") String user_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_START_PK)
|
||||
Call<ResponseBody> startPk(@Field("pk_id") String pk_id,@Field("pk_times") String pk_times);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.UPLOAD_USER_PIC)
|
||||
Observable<BaseModel<String>> upUserPic(@Field("sex") String sex);
|
||||
Call<BaseModel<String>> upUserPic(@Field("sex") String sex);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.SWITCH_ACCOUNTS)
|
||||
@@ -63,7 +103,7 @@ public interface ApiServer {
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.USER_UPDATE)
|
||||
Observable<BaseModel<UserBean>> userUpdate(@FieldMap Map<String, String> map);
|
||||
Observable<BaseModel<UserBean>> userUpdate(@Field("nickname")String nickname, @Field("birthday")String birthday,@Field("sex")String sex, @Field("avatar")String avatar,@Field("init_code")String init_code,@Field("user_id")String user_id);
|
||||
|
||||
@GET(Constants.AUTHORIZATION)
|
||||
Observable<BaseModel<String>> authorization();
|
||||
@@ -108,9 +148,36 @@ public interface ApiServer {
|
||||
@POST(Constants.EDIT_ALBUM)
|
||||
Call<BaseModel<String> > editAlbum(@Field("album_id") String album_id,@Field("name") String name, @Field("pwd")String pwd, @Field("image") String image);
|
||||
|
||||
@GET(Constants.GET_SJ_ROOM_NAME)
|
||||
Observable<BaseModel<String>> sjRoomName();
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_FOLLOW_LIST)
|
||||
Observable<BaseModel<List<BlackUserBean>>> getUserFollowList(@Field("page") String page, @Field("page_limit") String page_limit);
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_FANS_LIST)
|
||||
Observable<BaseModel<List<BlackUserBean>>> getUserFansList(@Field("page") String page, @Field("page_limit") String page_limit);
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_BLACK_LIST)
|
||||
Observable<BaseModel<List<BlackUserBean>>> getBlacklist(@Field("page") String page, @Field("page_limit") String page_limit);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.GET_MY_ROOM)
|
||||
Call<BaseModel<List<MyRoomBean>>> getMyRoom(@Field("type")String type,@Field("page") String page, @Field("page_limit") String page_limit);
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.GET_TOP_ROOM)
|
||||
Call<BaseModel<List<TopRoom>>> getTopRooms( @Field("page") String page, @Field("page_limit") String page_limit,@Field("is_top")String is_top,@Field("label_id")String label_id);
|
||||
|
||||
@GET(Constants.GET_ROOM_TYPE)
|
||||
Observable<BaseModel<List<RoomTypeModel>>> getRoomCategories();
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.CHECK_TXT)
|
||||
Call<BaseModel<String>> checkTxt(@Field("room_name") String room_name, @Field("room_cover") String room_cover, @Field("room_intro") String room_intro);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.GET_REWARD_LIST)
|
||||
Observable<BaseModel<List<RewardUserBean>>> getRewardList(@Field("id") String id, @Field("page") int page, @Field("page_limit") int page_limit);
|
||||
Observable<BaseModel<List<RewardUserBean>>> getRewardList(@Field("id") String id, @Field("page") String page, @Field("page_limit") String page_limit);
|
||||
|
||||
@GET(Constants.GET_GIFT_LABEL)
|
||||
Observable<BaseModel<List<GiftLabelBean>>> getGiftLabel(@Query("have_hot") String have_hot);
|
||||
@@ -133,6 +200,8 @@ public interface ApiServer {
|
||||
@POST(Constants.GET_USER_HOME_ZONE)
|
||||
Observable<BaseModel<List<CircleListBean>>> getCircleUserList(@Field("user_id") String user_id,@Field("page") String page, @Field("page_limit") String page_limit);
|
||||
|
||||
@GET(Constants.GET_MY_FOOT)
|
||||
Observable<BaseModel<List<MyFootResp>>> getMyFoot(@Query("page")String page, @Query("page_limit") String page_limit);
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.LIKE_ZONE)
|
||||
Call<BaseModel<String>> likeZone(@Field("id") String zone_id);
|
||||
@@ -157,11 +226,18 @@ public interface ApiServer {
|
||||
@POST(Constants.GET_COMMENT_LIST)
|
||||
Observable<BaseModel<CommentBean>> getCommentList(@Field("id") String id, @Field("page") String page, @Field("page_limit") String page_limit);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SONG)
|
||||
Observable<BaseModel<List<SongMusicBean>>> song(@Field("room_id")String roomId, @Field("user_id") String userId, @Field("song_code") String songCode, @Field("song_name")String songName, @Field("singer") String singer, @Field("poster") String poster, @Field("duration") String duration);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.COMMENT_ZONE)
|
||||
Call<BaseModel<String>> commentZone(@Field("id") String id, @Field("content") String content, @Field("pid") String pid, @Field("reply_to") String reply_to);
|
||||
|
||||
|
||||
@GET(Constants.GET_MY_CP_ROOM_LIST)
|
||||
Call<BaseModel<List<MyCpRoom>>> myCpRoom();
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.CLEAR_LOGIN_INFO)
|
||||
Call<BaseModel<String>> clearLoginInfo(@Field("token") String token);
|
||||
@@ -198,12 +274,19 @@ public interface ApiServer {
|
||||
@GET(Constants.GET_PERSONALTY)
|
||||
Observable<BaseModel<List<PersonaltyBean>>> getPersonaltyList();
|
||||
|
||||
@GET(Constants.GET_DECORATE)
|
||||
Observable<BaseModel<List<ZhuangBanShangChengBean>>> getDecorateList(@Query("type") String type);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_GZ)
|
||||
Call<BaseModel<String>> userGuanz(@Field("user_id") String userId,@Field("type")String type);
|
||||
|
||||
@GET(Constants.GET_DECORATE)
|
||||
Observable<BaseModel<List<ZhuangBanShangChengBean>>> getDecorateList(@Query("type") String type);
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.ACCEPT_PK)
|
||||
Call<BaseModel<String>> acceptPk(@Field("pk_id") String pk_id,@Field("type")String type);
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.REMOVE_BLACK_LIST)
|
||||
Call<BaseModel<String>> removeBlackList(@Field("uid") String userId);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.SET_USER_DECORATE)
|
||||
@@ -216,6 +299,10 @@ public interface ApiServer {
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.MOVE_ALBUM)
|
||||
Call<BaseModel<String>> moveAlbum(@Field("id") String id,@Field("new_album_id")String new_album_id);
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.JOIN_ROOM)
|
||||
Observable<BaseModel<RoomInfoResp>> roomGetIn(@Field("room_id") String roomId, @Field("password") String password);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.DELETE_ALBUM_IMAGE)
|
||||
Call<BaseModel<String>> deleteAlbumImage(@Field("id") String id);
|
||||
@@ -228,4 +315,187 @@ public interface ApiServer {
|
||||
@POST(Constants.LIKE_ALBUM)
|
||||
Call<BaseModel<String>> likeAlbum(@Field("album_id") String id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.ADDRESS_IP)
|
||||
Call<BaseModel<String>> address_ip(@Field("address_ip") String address_ip);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.UPDATEPASSWORD)
|
||||
Observable<BaseModel<String>> updatePassword(@Field("room_id") String roomId, @Field("password") String password);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.GET_ROOM_ONLINE)
|
||||
Observable<BaseModel<RoomOnline>> getRoomOnline(@Field("room_id")String roomId, @Field("page")String page, @Field("page_limit")String page_limit);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.GET_GIVE_GIFT)
|
||||
Call<BaseModel<String>> giveGift(@Field("user_id") String user_id, @Field("gid") String gid, @Field("num") String num, @Field("to_uid") String to_uid, @Field("gift_type") String gift_type);
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.GET_ROOM_GIFT)
|
||||
Call<BaseModel<String>> roomGift(@Field("room_id") String room_id, @Field("gift_id") String gift_id, @Field("gift_num") String num, @Field("to_uid") String to_uid, @Field("type") String gift_type, @Field("pit_number") String pit_number);
|
||||
|
||||
@GET(Constants.GET_WALLET)
|
||||
Observable<BaseModel<WalletBean>> wallet();
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_APPLY_LIST)
|
||||
Observable<BaseModel<RoomApplyListBean>> roomApplyListBean(@Field("room_id")String room_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.GET_ROOM_USER)
|
||||
Observable<BaseModel<UserInfo>> getRoomUserInfo(@Field("room_id") String roomId,@Field("user_id") String userId);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SONG_LIST)
|
||||
Observable<BaseModel<List<MusicSongBean>>> songList(@Field("room_id") String room_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.APPLY_PIT)
|
||||
Call<BaseModel<String>> applyPit(@Field("room_id") String room_id, @Field("pit_number") String pit_number);
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.DOWN_PIT)
|
||||
Call<BaseModel<String>> downPit(@Field("room_id") String room_id, @Field("pit_number") String pit_number);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.REWARD_ZONE)
|
||||
Call<BaseModel<String>> reward_zone(@Field("id") String id, @Field("gift_id") String gift_id, @Field("num") String num, @Field("is_pack") String is_pack);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_UP_SONG)
|
||||
Call<BaseModel<String>> upSong(@Field("did") String did,@Field("type") String type);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_CHANGE_ROOM)
|
||||
Call<BaseModel<String>> changeRoom(@Field("room_id") String room_id, @Field("user_id") String userId);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_CHANGE_ROOM_TYPE)
|
||||
Call<BaseModel<String>> changeRoomType(@Field("room_id") String room_id, @Field("type") String type);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.SET_ROOM_APPLY)
|
||||
Call<BaseModel<String>> setRoomApply(@Field("room_id") String room_id,@Field("gift_id") String gift_id,@Field("gift_price") String gift_price);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.CLEAR_APPLY)
|
||||
Call<BaseModel<String>> clearApply(@Field("room_id") String room_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.AGREE_PIT)
|
||||
Call<BaseModel<String>> agreePit(@Field("room_id") String roomId,@Field("user_id") String userId);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.REFUSE_PIT)
|
||||
Call<BaseModel<String>> refusePit(@Field("room_id") String roomId,@Field("user_id") String userId);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.HELP_APPLY)
|
||||
Call<BaseModel<String>> helpApply(@Field("room_id") String roomId, @Field("user_id") String userId);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_APPLY_SONG)
|
||||
Call<BaseModel<String>> applySong(@Field("room_id") String roomId);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_AGREE_SONG)
|
||||
Call<BaseModel<String>> agreeSong(@Field("room_id") String roomId,@Field("type") String type);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_END_SONG)
|
||||
Call<BaseModel<String>> endSong(@Field("room_id") String roomId);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_ROOM_INFO)
|
||||
Observable<BaseModel<RoomInfoResp>> postRoomInfo(@Field("room_id") String roomId);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.CHANGE_SONG)
|
||||
Call<BaseModel<String>> changeSong(@Field("room_id") String roomId,@Field("now_did") String now_did);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_HOST_LIST)
|
||||
Observable<BaseModel<List<HostBean>>> getHostList(@Query("room_id") String room_id, @Field("type") String type);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.GET_CHARM_RANK)
|
||||
Observable<BaseModel<List<RoomCharmRankBean>>> getCharmRank(@Field("room_id") String roomId);
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_ROOM_RELATION_LIST)
|
||||
Observable<BaseModel<List<RoomRelationBean>>> roomRelationList(@Field("type") String type);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_ROOM_AUCTION_LIST)
|
||||
Observable<BaseModel<List<RoomAuction.AuctionListBean>>> roomAuctionList(@Field("auction_id") String auction_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SEARCH)
|
||||
Observable<BaseModel<List<RoomSearchResp>>> getSearch(@Query("search") String room_id, @Field("type") String type);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.SET_PRESIDED_RATIO)
|
||||
Call<BaseModel<String>> setPresidedRatio(@Field("room_id") String room_id,@Field("user_id") String userId,@Field("ration") String ration);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.GET_PRESIDED_RATIO)
|
||||
Call<BaseModel<String>> getPresidedRatio(@Field("room_id") String room_id,@Field("user_id") String userId,@Field("type") String type,@Field("is_add") String is_add);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_ROOM_HOST_PIT)
|
||||
Call<BaseModel<String>> hostUserPit(@Field("room_id") String room_id,@Field("pit_number") String pit_number,@Field("user_id") String userId,@Field("type") String type);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SET_MUTE_PIT)
|
||||
Call<BaseModel<String>> setMutePit(@Field("room_id") String room_id,@Field("user_id") String user_id,@Field("is_mute") String is_mute);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SET_LOCK_PIT)
|
||||
Call<BaseModel<String>> setLockPit(@Field("room_id") String room_id,@Field("pit_number") String pit_number,@Field("is_lock") String is_lock);
|
||||
|
||||
@GET(Constants.GET_ROOM_BJ)
|
||||
Observable<BaseModel<RoomBgBean>> getBackgroundList();
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SET_UPLOAD_BG_IMG)
|
||||
Call<BaseModel<String>> setUploadBgImg(@Field("id") String id,@Field("image_url") String image_url);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_AUCTION_DELAY)
|
||||
Call<BaseModel<String>> auctionDelay(@Field("auction_id") String auction_id);
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_AUCTION_END)
|
||||
Call<BaseModel<String>> auctionEnd(@Field("auction_id") String auction_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_AUCTION_MODE)
|
||||
Call<BaseModel<String>> auctionMode(@Field("room_id") String room_id,@Field("label_id") String label_id);
|
||||
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_EDIT_ROOM)
|
||||
Call<BaseModel<String>> editRoom(@Field("room_id") String room_id,@Field("room_name") String room_name,@Field("room_cover") String room_cover,@Field("room_intro") String room_intro,@Field("room_background") String room_background);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_KICK_OUT_ROOM)
|
||||
Call<BaseModel<String>> kickOutRoom(@Field("room_id") String room_id,@Field("user_id") String user_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_QUIT_ROOM)
|
||||
Call<BaseModel<String>> quitRoom(@Field("room_id") String room_id,@Field("user_id") String user_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_ROOM_AUCTION)
|
||||
Observable<BaseModel<AuctionBean>> roomAuction(@Field("room_id") String room_id,@Field("user_id")String user_id,@Field("gift_id")String gift_id,@Field("relation_id")String relation_id,@Field("auction_type")String auction_type,@Field("time_day")String time_day);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_ROOM_AUCTION_TIME)
|
||||
Observable<BaseModel<RoomTime>> roomAuctionTime(@Field("gift_id") String gift_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_ROOM_AUCTION_JOIN)
|
||||
Observable<BaseModel<RoomAuction.AuctionListBean>> roomAuctionJoin(@Field("auction_id")String auction_id,@Field("user_id")String user_id,@Field("gift_id")String gift_id,@Field("num")String num,@Field("type")String type);
|
||||
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SEARCH_PK_ROOM)
|
||||
Observable<BaseModel<List<RoomBean>>> searchPkRoom(@Field("room_id")String room_id,@Field("page")String page,@Field("limit")String limit);
|
||||
}
|
||||
|
||||
@@ -3,9 +3,14 @@ package com.qxcm.moduleutil.http;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class BaseModel<T> implements Parcelable {
|
||||
@SerializedName("code")
|
||||
private int code;
|
||||
@SerializedName("data")
|
||||
private T data;
|
||||
@SerializedName("msg")
|
||||
private String msg;
|
||||
|
||||
public T getData() {
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.qxcm.moduleutil.http;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonToken;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class BaseModelTypeAdapter<T> extends TypeAdapter<BaseModel<T>> {
|
||||
private final Gson gson;
|
||||
private final TypeAdapter<T> dataAdapter;
|
||||
|
||||
public BaseModelTypeAdapter(Gson gson, TypeAdapter<T> dataAdapter) {
|
||||
this.gson = gson;
|
||||
this.dataAdapter = dataAdapter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(JsonWriter out, BaseModel<T> value) throws IOException {
|
||||
out.beginObject();
|
||||
out.name("code").value(value.getCode());
|
||||
out.name("msg").value(value.getMsg());
|
||||
|
||||
out.name("data");
|
||||
if (value.getData() == null) {
|
||||
out.nullValue();
|
||||
} else {
|
||||
dataAdapter.write(out, value.getData());
|
||||
}
|
||||
|
||||
out.endObject();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseModel<T> read(JsonReader reader) throws IOException {
|
||||
BaseModel<T> model = new BaseModel<>();
|
||||
reader.beginObject();
|
||||
|
||||
while (reader.hasNext()) {
|
||||
String name = reader.nextName();
|
||||
|
||||
switch (name) {
|
||||
case "code":
|
||||
model.setCode(reader.nextInt());
|
||||
break;
|
||||
case "msg":
|
||||
model.setMsg(reader.nextString());
|
||||
break;
|
||||
case "data":
|
||||
JsonToken token = reader.peek();
|
||||
Log.d("BaseModelTypeAdapter", "data token: " + token); // 打印 token 类型用于调试
|
||||
|
||||
if (token == JsonToken.NULL) {
|
||||
reader.nextNull();
|
||||
model.setData(null);
|
||||
} else if (token == JsonToken.STRING) {
|
||||
String value = reader.nextString();
|
||||
if ("null".equals(value)) {
|
||||
model.setData(null);
|
||||
} else {
|
||||
// 如果 data 是字符串类型但不是 "null",可根据业务决定是否抛异常或处理
|
||||
reader.skipValue();
|
||||
model.setData(null);
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
T data = dataAdapter.read(reader);
|
||||
model.setData(data);
|
||||
} catch (Exception e) {
|
||||
// 捕获解析异常,防止崩溃
|
||||
Log.e("BaseModelTypeAdapter", "解析 data 出错", e);
|
||||
reader.skipValue();
|
||||
model.setData(null);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
reader.skipValue();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
reader.endObject();
|
||||
return model;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.qxcm.moduleutil.http;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.TypeAdapterFactory;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.ParameterizedType;
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
public class BaseModelTypeAdapterFactory implements TypeAdapterFactory {
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@Override
|
||||
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> typeToken) {
|
||||
if (!BaseModel.class.isAssignableFrom(typeToken.getRawType())) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 获取实际类型
|
||||
Type type = typeToken.getType();
|
||||
|
||||
// 确保是 ParameterizedType 类型
|
||||
if (!(type instanceof ParameterizedType)) {
|
||||
return null; // 或者抛出异常,视业务需求而定
|
||||
}
|
||||
|
||||
// 获取泛型参数类型
|
||||
Type[] actualTypeArguments = ((ParameterizedType) type).getActualTypeArguments();
|
||||
if (actualTypeArguments.length == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Type dataType = actualTypeArguments[0];
|
||||
TypeAdapter<?> dataAdapter = gson.getAdapter(TypeToken.get(dataType));
|
||||
|
||||
return new TypeAdapter<T>() {
|
||||
private final BaseModelTypeAdapter baseModelAdapter = new BaseModelTypeAdapter(gson, dataAdapter);
|
||||
|
||||
@Override
|
||||
public void write(JsonWriter out, T value) throws IOException {
|
||||
baseModelAdapter.write(out, (BaseModel) value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public T read(JsonReader in) throws IOException {
|
||||
return (T) baseModelAdapter.read(in);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user