Commit 20ae51d2 by 王宇航

1.6.1

1、調整一下,接受消息的參數
parent a79befc2
......@@ -55,7 +55,7 @@ afterEvaluate {
groupId = "com.gingersoft.connect"
artifactId = "Connect"
version = "1.6.0"
version = "1.6.1"
// 添加 POM 配置
// pom {
// name.set("GingerSoftConnect")
......
package com.gingersoft.connect.bean
import com.gingersoft.connect.utils.MsgProcess
interface GetFoodInfoProcess : MsgProcess
\ No newline at end of file
package com.gingersoft.connect.bean
import com.gingersoft.connect.utils.MsgProcess
interface GetSoldOutInfoProcess : MsgProcess
......@@ -12,7 +12,7 @@ object MsgParser {
fun process(msgBean: MessageBean<*>?): SocketCallbackBean? {
return if (msgBean != null) {
val result = parserMap[msgBean.action.toString()]?.sendMsg()
val result = parserMap[msgBean.action.toString()]?.processMsg(msgBean.data)
if (result != null) {
SocketCallbackBean(
result.success,
......
......@@ -7,5 +7,5 @@ interface MsgProcess {
/**
* 消息處理
*/
fun sendMsg(): ResultBean
fun <T> processMsg(data: T): ResultBean
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment