package com.friday.custody.service.basicService.impl;

import com.friday.custody.utils.PageUtils;
import com.friday.custody.utils.Query;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.friday.custody.dao.DataDictionaryTypeCertificateCsdcDetailsDao;
import com.friday.custody.entity.DataDictionaryTypeCertificateCsdcDetailsEntity;
import com.friday.custody.service.basicService.DataDictionaryTypeCertificateCsdcDetailsService;


@Service("dataDictionaryTypeCertificateCsdcDetailsService")
public class DataDictionaryTypeCertificateCsdcDetailsServiceImpl extends ServiceImpl<DataDictionaryTypeCertificateCsdcDetailsDao, DataDictionaryTypeCertificateCsdcDetailsEntity>
        implements DataDictionaryTypeCertificateCsdcDetailsService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<DataDictionaryTypeCertificateCsdcDetailsEntity> page = this.page(
                new Query<DataDictionaryTypeCertificateCsdcDetailsEntity>().getPage(params),
                new QueryWrapper<DataDictionaryTypeCertificateCsdcDetailsEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<DataDictionaryTypeCertificateCsdcDetailsEntity> selectVByTrustNo(String trustNo) {
        return baseMapper.selectList(new QueryWrapper<DataDictionaryTypeCertificateCsdcDetailsEntity>().eq("trust_no", trustNo));
    }
}