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

import com.friday.custody.service.basicService.TempAuthorizationInfoService;
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;
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.TempAuthorizationInfoDao;
import com.friday.custody.entity.TempAuthorizationInfoEntity;



@Service("tempAuthorizationInfoService")
public class TempAuthorizationInfoServiceImpl extends ServiceImpl<TempAuthorizationInfoDao, TempAuthorizationInfoEntity> implements TempAuthorizationInfoService {

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

        return new PageUtils(page);
    }

    public List<TempAuthorizationInfoEntity> queryListByTrustNo(String trustNo, String version){
        return baseMapper.queryListByTrustNo(trustNo, version);
    }

    public int update(TempAuthorizationInfoEntity entity) {
        return baseMapper.updateOne(entity);
    }
}