package com.tuoheng.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tuoheng.model.dto.Platform;
import com.tuoheng.service.PlatformService;
import com.tuoheng.mapper.PlatformMapper;
import com.tuoheng.until.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 小影
* @description 针对表【platform(平台表)】的数据库操作Service实现
* @createDate 2023-01-09 11:09:18
*/
@Service
public class PlatformServiceImpl extends ServiceImpl<PlatformMapper, Platform>
    implements PlatformService{

    @Autowired
    private PlatformMapper platformMapper;

    /**
     * 查询
     *
     * @return
     */
    @Override
    public JsonResult findAll() {

        List<Platform> platforms = platformMapper.selectList(Wrappers.<Platform>lambdaQuery()
                .eq(Platform::getMark, 1));

        return JsonResult.success(platforms);
    }
}




