[Modify]声音签名功能完善
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
package com.yizhuan.xchat_android_core.sound.model
|
||||
|
||||
import com.yizhuan.xchat_android_core.base.BaseModel
|
||||
import com.yizhuan.xchat_android_core.bean.response.ServiceResult
|
||||
import com.yizhuan.xchat_android_core.earn.bean.*
|
||||
import com.yizhuan.xchat_android_core.home.bean.*
|
||||
import com.yizhuan.xchat_android_core.utils.net.launchRequest
|
||||
import com.yizhuan.xchat_android_library.net.rxnet.RxNet
|
||||
import retrofit2.http.POST
|
||||
import retrofit2.http.Query
|
||||
|
||||
object SoundModel : BaseModel() {
|
||||
|
||||
private val api = RxNet.create(Api::class.java)
|
||||
|
||||
suspend fun saveRecord(audioUrl: String, second: Int): String? =
|
||||
launchRequest {
|
||||
api.saveRecord(audioUrl, second)
|
||||
}
|
||||
|
||||
suspend fun deleteRecord(): String? =
|
||||
launchRequest {
|
||||
api.deleteRecord()
|
||||
}
|
||||
|
||||
private interface Api {
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
@POST("/audioCard/save")
|
||||
suspend fun saveRecord(
|
||||
@Query("audioUrl") audioUrl: String,
|
||||
@Query("second") second: Int
|
||||
): ServiceResult<String>
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
@POST("/audioCard/del")
|
||||
suspend fun deleteRecord(): ServiceResult<String>
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -876,7 +876,6 @@ public final class UserModel extends BaseModel implements IUserModel {
|
||||
@Field("shareChannel") String shareChannel,
|
||||
@Field("shareUid") String shareUid,
|
||||
@Field("roomUid") String roomUid,
|
||||
|
||||
@Field("signture") String signture,
|
||||
@Field("userVoice") String userVoice,
|
||||
@Field("voiceDura") String voiceDura,
|
||||
|
@@ -288,6 +288,13 @@ public class UserInfo implements Serializable {
|
||||
@Setter
|
||||
private boolean banAccount;
|
||||
|
||||
/**
|
||||
* 声音签名
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
private SoundBean soundBean;
|
||||
|
||||
/**
|
||||
* "用户自己的房间是否牌照房"
|
||||
*/
|
||||
@@ -809,5 +816,17 @@ public class UserInfo implements Serializable {
|
||||
private String iconPic;
|
||||
private String fixedWord;
|
||||
}
|
||||
|
||||
/**
|
||||
* 声音签名
|
||||
*/
|
||||
@Data
|
||||
public static class SoundBean {
|
||||
private long uid;
|
||||
private String audioUrl;//音频七牛云url
|
||||
private Integer second;//时间
|
||||
private Integer status;//(0=初始状态,1=审核中, 2=审核通过,3=审核不通过,4=被下架)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user