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.DataDictionaryServiceModelDetailsDao;
import com.friday.custody.entity.DataDictionaryServiceModelDetailsEntity;
import com.friday.custody.service.basicService.DataDictionaryServiceModelDetailsService;


@Service("dataDictionaryServiceModelDetailsService")
public class DataDictionaryServiceModelDetailsServiceImpl extends ServiceImpl<DataDictionaryServiceModelDetailsDao, DataDictionaryServiceModelDetailsEntity> implements DataDictionaryServiceModelDetailsService {

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

        return new PageUtils(page);
    }

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