package com.persagy.server.service

import com.persagy.database.SQueryBuilder
import com.persagy.mybatis.SMybatisDao
import com.persagy.server.datacenter.models.entities.objects.Equipment
import com.persagy.server.service.base.Service

/**
 * 设备或部件
 *
 * @author 张维新
 */
object EquipmentORComService  : Service<Equipment>(SMybatisDao(Equipment::class.java)){

    /**
     * 查询之前操作
     */
    override fun onQueryBefore(queryBuilder: SQueryBuilder<Equipment>) {
        queryBuilder.tableName = "v_equip_property_component"
        return
    }

    /**
     * 查询统计之前的操作
     */
    override fun onCountBefore(queryBuilder: SQueryBuilder<Equipment>) {
        queryBuilder.tableName = "v_equip_property_component"
        return
    }
} // Object EquipmentORComService