package com.ruoyi.ems.service.impl;

import com.ruoyi.ems.domain.ObjTagRel;
import com.ruoyi.ems.mapper.ObjTagRelMapper;
import com.ruoyi.ems.service.IObjTagRelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 对象&标签关系Service业务层处理
 *
 * @author ruoyi
 * @date 2024-08-27
 */
@Service
public class ObjTagRelServiceImpl implements IObjTagRelService {
    @Autowired
    private ObjTagRelMapper objTagRelMapper;

    @Override
    public int save(ObjTagRel objTagRel) {
        return objTagRelMapper.insert(objTagRel);
    }

    @Override
    public int remove(ObjTagRel objTagRel) {
        return objTagRelMapper.delete(objTagRel);
    }

    @Override
    public List<ObjTagRel> selectListByType(int objType) {
        return objTagRelMapper.selectListByType(objType);
    }

    @Override
    public List<ObjTagRel> selectListByTagCode(int objType, String tagCode) {
        return objTagRelMapper.selectListByTagCode(objType, tagCode);
    }

    @Override
    public List<ObjTagRel> selectListByObjCode(int objType, String objCode) {
        return objTagRelMapper.selectListByObjCode(objType, objCode);
    }

    @Override
    public int deleteByObjCode(int objType, String objCode) {
        return objTagRelMapper.deleteByObjCode(objType, objCode);
    }
}
