package com.persagy.server.services.base

import com.persagy.database.SAbstractDao
import com.persagy.server.datacenter.models.entities.base.RBaseInfo
import com.persagy.server.synchronize.MessageHandler
import com.persagy.service.SObjectService
import com.persagy.service.utils.SSpringContextUtil

/**
 * 关系处理服务基类
 *
 * @author 张维新
 */
open class RService<ENTITY : RBaseInfo>(daoClass: SAbstractDao<ENTITY>) : SObjectService<ENTITY>(daoClass) {
    companion object {
        /** 日志 */
//        private val logger = LoggerFactory.getLogger(ProjectController::class.java)

        /** MQ消息对象 */
        val messageHandler by lazy {
            SSpringContextUtil.getBean(MessageHandler::class.java) as MessageHandler
        }
        /** kafka消息对象 */
//        val kafkaService by lazy {
//            SSpringContextUtil.getBean(KafkaService::class.java) as KafkaService
//        }
    } // Companion object


} // Class Service
