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.DataDictionaryDurationCurrencyDetailsDao;
import com.friday.custody.entity.DataDictionaryDurationCurrencyDetailsEntity;
import com.friday.custody.service.basicService.DataDictionaryDurationCurrencyDetailsService;


@Service("dataDictionaryDurationCurrencyDetailsService")
public class DataDictionaryDurationCurrencyDetailsServiceImpl extends ServiceImpl<DataDictionaryDurationCurrencyDetailsDao, DataDictionaryDurationCurrencyDetailsEntity> implements DataDictionaryDurationCurrencyDetailsService {

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

        return new PageUtils(page);
    }

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