Commit 4511959e authored by chengkun's avatar chengkun

add bpush application

parent 533a0249
package com.yidian.shenghuoquan.bpush.app
import com.yidian.bcommon.app.YdBaseApplication
import com.yidian.bcommon.services.ZapServiceNameConstants
import com.yidian.news.util.ProcessUtil
import com.yidian.shenghuoquan.bpush.service.PushService
import com.yidian.yac.core.zap.Zap
class BPushApplication: YdBaseApplication() {
override fun onCreate() {
super.onCreate()
if (ProcessUtil.isMainProcess(this)) {
registerXpage()
initServie()
}
}
private fun registerXpage() {
}
private fun initServie() {
Zap.addService(ZapServiceNameConstants.BPush, PushService())
}
}
package com.yidian.shenghuoquan.bpush.service
import com.yidian.bcommon.services.ZapServiceActionConstants
import com.yidian.xarc.xrouter.ResultResolver
import com.yidian.yac.core.zap.ZapService
import org.json.JSONObject
class PushService : ZapService() {
private lateinit var resolver: ResultResolver
override fun onAction(path: String, action: String, params: Any, options: Any, resolver: ResultResolver) {
this.resolver = resolver
params as JSONObject
when(action) {
ZapServiceActionConstants.ActionPushMessage -> pushMessage()
}
}
override fun onExit() {
}
override fun onInit() {
}
private fun pushMessage() {
}
}
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