package com.gs.simple.service.impl;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.gs.simple.common.ResultDto;
|
import com.gs.simple.domain.BiView;
|
import com.gs.simple.mapper.BiViewMapper;
|
import com.gs.simple.service.BiViewService;
|
import lombok.RequiredArgsConstructor;
|
import org.springframework.stereotype.Service;
|
import org.springframework.transaction.annotation.Transactional;
|
|
import java.util.List;
|
|
/**
|
* @author 28567
|
* @description 针对表【MES_SIMPLE_CCB(BiView表)】的数据库操作Service实现
|
* @createDate 2023-11-08 14:19:52
|
*/
|
@Service
|
@Transactional(rollbackFor = Exception.class)
|
@RequiredArgsConstructor
|
public class BiViewServiceImpl extends ServiceImpl<BiViewMapper, BiView> implements BiViewService {
|
|
@Override
|
public ResultDto<List<BiView>> getListByPid(Integer pid) {
|
LambdaQueryWrapper<BiView> wrapper = new LambdaQueryWrapper<>();
|
wrapper.eq(BiView::getPid, pid);
|
List<BiView> list = list(wrapper);
|
return ResultDto.ok(list, list.size());
|
}
|
|
@Override
|
public ResultDto<List<BiView>> getListByPidWithHref(Integer pid) {
|
LambdaQueryWrapper<BiView> wrapper = new LambdaQueryWrapper<>();
|
wrapper.eq(BiView::getPid, pid)
|
.isNotNull(BiView::getHref);
|
List<BiView> list = list(wrapper);
|
return ResultDto.ok(list, list.size());
|
}
|
}
|