package com.fdkankan.ucenter.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.fdkankan.ucenter.entity.SpaceSdk;
import com.fdkankan.ucenter.mapper.ISpaceSdkMapper;
import com.fdkankan.ucenter.service.ISpaceSdkService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.xmlbeans.xml.stream.Space;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * space sdk表 服务实现类
 * </p>
 *
 * @author 
 * @since 2022-07-29
 */
@Service
public class SpaceSdkServiceImpl extends ServiceImpl<ISpaceSdkMapper, SpaceSdk> implements ISpaceSdkService {

    @Override
    public List<SpaceSdk> getList(Integer platformType, Integer status) {
        LambdaQueryWrapper<SpaceSdk> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(SpaceSdk::getStatus,status);
        wrapper.eq(SpaceSdk::getPlatformType,platformType);
        wrapper.orderByDesc(SpaceSdk::getIsTop);
        wrapper.orderByDesc(SpaceSdk::getPublishTime);
        return this.list(wrapper);
    }
}
