package com.persagy.server.labsl.services

import com.persagy.server.labsl.models.entities.auxiliary.CategoryCode
import com.persagy.server.labsl.services.mappers.CustomMapper
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service

/**
 * 自定义SQL 服务
 * @author  wx
 * @date  2020/9/17 12:09
 */
@Service
class CustomService {

    /** 实例化 mapper 对象 */
    @Autowired
    lateinit var customMapper: CustomMapper


    /**
     * 草稿箱 已有类型
     */
    fun draftsCategory(projectId: String): ArrayList<CategoryCode>?{
        return customMapper.calcAffected(projectId)
    }  // Fun draftsCategory()

    /**
     * 已发布 类型
     */
    fun pubCategory(projectId: String): ArrayList<CategoryCode>?{
        return customMapper.pubCategory(projectId)
    } // Fun pubCategory()


} // Class CustomService