package com.tuoheng.admin.service.dspserviceinst;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.tuoheng.admin.entity.domain.DspServiceInst;
import com.tuoheng.admin.enums.MarkEnum;
import com.tuoheng.admin.mapper.DspServiceInstMapper;
import com.tuoheng.common.core.common.BaseEntity;
import com.tuoheng.common.core.common.BaseServiceImpl;
import com.tuoheng.common.core.utils.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author ChengWang
 * @Date 2023/3/2
 */
@Service
@Slf4j
public class DspServiceInstServiceImpl extends BaseServiceImpl<DspServiceInstMapper, DspServiceInst> implements IDspServiceInstService {

    @Autowired
    private DspServiceInstMapper dspServiceInstMapper;

    /**
     * 查询算法实例列表
     *
     * @return
     */
    @Override
    public JsonResult findList() {
        List<DspServiceInst> dspServiceInstList = dspServiceInstMapper.selectList(Wrappers.<DspServiceInst>lambdaQuery().
                eq(BaseEntity::getMark, MarkEnum.VALID.getCode()));
        return JsonResult.success(dspServiceInstList);
    }
}

