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.DataDictionaryDurationTypeDetailsDao;
import com.friday.custody.entity.DataDictionaryDurationTypeDetailsEntity;
import com.friday.custody.service.basicService.DataDictionaryDurationTypeDetailsService;


@Service("dataDictionaryDurationTypeDetailsService")
public class DataDictionaryDurationTypeDetailsServiceImpl extends ServiceImpl<DataDictionaryDurationTypeDetailsDao, DataDictionaryDurationTypeDetailsEntity> implements DataDictionaryDurationTypeDetailsService {

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

        return new PageUtils(page);
    }

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