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

import com.friday.custody.service.basicService.TenantEmailVersionMapService;
import com.friday.custody.utils.PageUtils;
import com.friday.custody.utils.Query;
import org.springframework.stereotype.Service;
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.dao.TenantEmailVersionMapDao;
import com.friday.custody.entity.TenantEmailVersionMapEntity;


@Service("tenantEmailVersionMapService")
public class TenantEmailVersionMapServiceImpl extends ServiceImpl<TenantEmailVersionMapDao, TenantEmailVersionMapEntity> implements TenantEmailVersionMapService {

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

        return new PageUtils(page);
    }

    @Override
    public String getVersionByTrustNo(String trustNo) {
        String versionByTrustNo = baseMapper.getVersionByTrustNo(trustNo);
/*        if (!ObjectUtils.isEmpty(versionByTrustNo)){
            return versionByTrustNo;
        }*/
        return versionByTrustNo;
    }

}