package com.yidian.shenghuoquan.bdemo.service

import com.yidian.bcommon.services.ZapServiceActionConstants
import com.yidian.xarc.xrouter.ResultResolver
import com.yidian.yac.core.zap.ZapService
import org.json.JSONObject

/**
 * author: yinjiacheng
 * date: 7/30/21 4:27 PM
 * description: C端客户端信息服务
 */
class ClientInfoService : ZapService() {

  override fun onAction(path: String, action: String, params: Any, options: Any, resolver: ResultResolver) {
    when (action) {
      ZapServiceActionConstants.ActionGetUserInfo -> {
        // 获取C端userId 调试时可修改为开发者自己的userId
        resolver.success(JSONObject().put("userId", "510227073302"))
      }
    }
  }

  override fun onExit() {

  }

  override fun onInit() {

  }
}
