/*
 * Author: wangjian
 * 生成ServiceImpl
 */
package com.tofly.feesapi.bmgl.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tofly.feesapi.bmgl.entity.SysChildCode;
import com.tofly.feesapi.bmgl.service.SysChildCodeService;
import org.springframework.stereotype.Service;
import com.tofly.feesapi.bmgl.mapper.SysChildCodeMapper;

import java.util.List;

/**
 * 子集编码表
 *
 * @author sxb
 * @date Tue Aug 08 00:00:00 CST 2023
 */
@Service("sysChildCodeService")
public class SysChildCodeServiceImpl extends ServiceImpl<SysChildCodeMapper, SysChildCode> implements SysChildCodeService {

    @Override
    public SysChildCode get(String pcid, String cccode) {
        List<SysChildCode> list = this.lambdaQuery()
                .eq(SysChildCode::getPcid, pcid)
                .eq(SysChildCode::getCccode, cccode)
                .eq(SysChildCode::getIsdisabled, "1")
                .list();
        return list.isEmpty() ? null : list.get(0);
    }
}
