package jnpf.qualifications.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import jnpf.base.service.SuperServiceImpl;
import jnpf.entity.qualifications.QualificationsFieldItem;
import jnpf.qualifications.mapper.QualificationsFieldItemMapper;
import jnpf.qualifications.service.QualificationsFieldItemService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * todo
 *
 * @author Flynn Chan
 * @create 2024-03-04
 */
@Slf4j
@Service
public class QualificationsFieldItemServiceImpl extends SuperServiceImpl<QualificationsFieldItemMapper, QualificationsFieldItem> implements QualificationsFieldItemService {
    @Override
    public Long countItem(String fieldId, String itemName) {
        return baseMapper.selectCount(new LambdaQueryWrapper<QualificationsFieldItem>()
                .eq(QualificationsFieldItem::getFieldId,fieldId)
                .eq(QualificationsFieldItem::getName,itemName));
    }
}
