package com.persagy.labsl.services.planar

import com.persagy.labsl.models.entities.pbs.PlanarQbsRule
import com.persagy.labsl.utils.IdUtils
import com.persagy.mybatis.SMybatisDao
import com.persagy.service.SObjectService
import com.persagy.service.models.requests.SCreateRequest
import com.persagy.service.models.responses.SCreateResponse
import org.springframework.transaction.annotation.Transactional

/**
 * 规则
 *
 * @author wx  <zhangweixin@sagacloud.com>
 * @date  2020/12/13 9:34
 */
object PlanarQbsRuleService : SObjectService<PlanarQbsRule>(SMybatisDao(PlanarQbsRule::class.java)),PlanarQbsLogicService {


    override fun onCreateBefore(entity: PlanarQbsRule): Boolean {
//        if (entity.id.isNullOrEmpty()) {
//            entity.id = IdUtils.uuidCreate()
//        }

        return super.onCreateBefore(entity)
    }
    /**
     * 创建qbs列表
     * @author : lijie
     * Update By 2022/6/1 12:57
     */
    @Transactional
    override fun createListLogic(request: SCreateRequest<PlanarQbsRule>): SCreateResponse<PlanarQbsRule>{
        return createList(request)
    }


}