Commit 20ae51d2 by 王宇航

1.6.1

1、調整一下,接受消息的參數
parent a79befc2
...@@ -55,7 +55,7 @@ afterEvaluate { ...@@ -55,7 +55,7 @@ afterEvaluate {
groupId = "com.gingersoft.connect" groupId = "com.gingersoft.connect"
artifactId = "Connect" artifactId = "Connect"
version = "1.6.0" version = "1.6.1"
// 添加 POM 配置 // 添加 POM 配置
// pom { // pom {
// name.set("GingerSoftConnect") // 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 { ...@@ -12,7 +12,7 @@ object MsgParser {
fun process(msgBean: MessageBean<*>?): SocketCallbackBean? { fun process(msgBean: MessageBean<*>?): SocketCallbackBean? {
return if (msgBean != null) { return if (msgBean != null) {
val result = parserMap[msgBean.action.toString()]?.sendMsg() val result = parserMap[msgBean.action.toString()]?.processMsg(msgBean.data)
if (result != null) { if (result != null) {
SocketCallbackBean( SocketCallbackBean(
result.success, result.success,
......
...@@ -7,5 +7,5 @@ interface MsgProcess { ...@@ -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