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.DataDictionaryTypeCustomerCsdcDetailsDao;
import com.friday.custody.entity.DataDictionaryTypeCustomerCsdcDetailsEntity;
import com.friday.custody.service.basicService.DataDictionaryTypeCustomerCsdcDetailsService;


@Service("dataDictionaryTypeCustomerCsdcDetailsService")
public class DataDictionaryTypeCustomerCsdcDetailsServiceImpl extends ServiceImpl<DataDictionaryTypeCustomerCsdcDetailsDao, DataDictionaryTypeCustomerCsdcDetailsEntity> implements DataDictionaryTypeCustomerCsdcDetailsService {

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

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