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

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.utils.PageUtils;
import com.friday.custody.utils.Query;

import com.friday.custody.dao.DataDictionaryShareSourceDetailsDao;
import com.friday.custody.entity.DataDictionaryShareSourceDetailsEntity;
import com.friday.custody.service.basicService.DataDictionaryShareSourceDetailsService;


@Service("dataDictionaryShareSourceDetailsService")
public class DataDictionaryShareSourceDetailsServiceImpl extends ServiceImpl<DataDictionaryShareSourceDetailsDao, DataDictionaryShareSourceDetailsEntity> implements DataDictionaryShareSourceDetailsService {

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

        return new PageUtils(page);
    }

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