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

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.DataDictionaryTypeOfRefinancingModeDetailsDao;
import com.friday.custody.entity.DataDictionaryTypeOfRefinancingModeDetailsEntity;
import com.friday.custody.service.basicService.DataDictionaryTypeOfRefinancingModeDetailsService;
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;
/*
 * 再融资方式对应
 * */

@Service("custodyDataDictionaryTypeOfRefinancingModeDetailsService")
public class DataDictionaryTypeOfRefinancingModeDetailsServiceImpl extends ServiceImpl<DataDictionaryTypeOfRefinancingModeDetailsDao, DataDictionaryTypeOfRefinancingModeDetailsEntity> implements DataDictionaryTypeOfRefinancingModeDetailsService {

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

        return new PageUtils(page);
    }

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

    }

}