package com.yolo.keyboard.dal.mysql.tag;

import java.util.*;

import com.yolo.keyboard.dal.dataobject.tag.TagI18nDO;
import com.yolo.keyboard.framework.common.pojo.PageResult;
import com.yolo.keyboard.framework.common.pojo.PageParam;
import com.yolo.keyboard.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.yolo.keyboard.framework.mybatis.core.mapper.BaseMapperX;
import org.apache.ibatis.annotations.Mapper;

/**
 * 人设标签国际化 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface TagI18nMapper extends BaseMapperX<TagI18nDO> {

    default PageResult<TagI18nDO> selectPage(PageParam reqVO, Integer tagId) {
        return selectPage(reqVO, new LambdaQueryWrapperX<TagI18nDO>()
            .eq(TagI18nDO::getTagId, tagId)
            .orderByDesc(TagI18nDO::getId));
    }

    default int deleteByTagId(Integer tagId) {
        return delete(TagI18nDO::getTagId, tagId);
    }

	default int deleteByTagIds(List<Integer> tagIds) {
	    return deleteBatch(TagI18nDO::getTagId, tagIds);
	}

}