package com.persagy.meiku.services.pic

import com.persagy.meiku.models.pic.Picture
import com.persagy.meiku.services.mapper.CustomSql
import com.persagy.mybatis.SMybatisDao
import com.persagy.service.SObjectService
import com.persagy.service.utils.SSpringContextUtil
import java.util.*

/**
 *
 * @author  wx
 * @date  2020/9/9 16:28
 */
object PictureService :  SObjectService<Picture>(SMybatisDao(Picture::class.java)) {

    /** MQ消息对象 */
    val customSql by lazy {
        SSpringContextUtil.getBean(CustomSql::class.java) as CustomSql
    }

    override fun onCreateBefore(entity: Picture): Boolean {
        entity.id = UUID.randomUUID().toString().replace("-","")
        return super.onCreateBefore(entity)
    } // Fun





} // Object PictureService