package com.yidian.shenghuoquan.bgeneralbusiness.app

import com.yidian.bcommon.app.YdBaseApplication
import com.yidian.bcommon.services.ZapServiceNameConstants
import com.yidian.news.util.ProcessUtil
import com.yidian.shenghuoquan.bgeneralbusiness.service.EncryptService
import com.yidian.shenghuoquan.bgeneralbusiness.service.GeneralAbilityService
import com.yidian.shenghuoquan.bgeneralbusiness.service.net.BNAHttpReqService
import com.yidian.yac.core.core.YacModuleSpec
import com.yidian.yac.core.zap.Zap

@YacModuleSpec
class BGeneralBusinessApplication : YdBaseApplication() {

  override fun onCreate() {
    super.onCreate()
    if (ProcessUtil.isMainProcess(this)) {
      initService()
    }
  }

  private fun initService() {
    Zap.addService(ZapServiceNameConstants.BNAHttpReq, BNAHttpReqService())
    Zap.addService(ZapServiceNameConstants.GeneralAbilityService, GeneralAbilityService())
    Zap.addService(ZapServiceNameConstants.EncryptService, EncryptService())
  }

}
