package com.iailab.module.data.ind.data.service.impl;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.iailab.framework.common.pojo.PageResult;
|
import com.iailab.framework.common.service.impl.BaseServiceImpl;
|
import com.iailab.framework.common.util.object.BeanUtils;
|
import com.iailab.module.data.ind.data.dao.IndDataSetFieldDao;
|
import com.iailab.module.data.ind.data.entity.IndDataSetFieldEntity;
|
import com.iailab.module.data.ind.data.service.IndDataSetFieldService;
|
import com.iailab.module.data.ind.data.vo.IndDataSetFieldPageReqVO;
|
import com.iailab.module.data.ind.data.vo.IndDataSetFieldSaveReqVO;
|
import org.springframework.stereotype.Service;
|
|
import java.util.List;
|
import java.util.UUID;
|
|
/**
|
* @author PanZhibao
|
* @Description
|
* @createTime 2024年09月10日
|
*/
|
@Service
|
public class IndDataSetFieldServiceImpl extends BaseServiceImpl<IndDataSetFieldDao, IndDataSetFieldEntity>
|
implements IndDataSetFieldService {
|
|
@Override
|
public PageResult<IndDataSetFieldEntity> page(IndDataSetFieldPageReqVO reqVO) {
|
return baseDao.selectPage(reqVO);
|
}
|
|
@Override
|
public void create(IndDataSetFieldSaveReqVO createReqVO) {
|
IndDataSetFieldEntity entity = BeanUtils.toBean(createReqVO, IndDataSetFieldEntity.class);
|
entity.setId(UUID.randomUUID().toString());
|
baseDao.insert(entity);
|
}
|
|
@Override
|
public void update(IndDataSetFieldSaveReqVO updateReqVO) {
|
IndDataSetFieldEntity entity = BeanUtils.toBean(updateReqVO, IndDataSetFieldEntity.class);
|
baseDao.updateById(entity);
|
}
|
|
@Override
|
public IndDataSetFieldEntity get(String id) {
|
return baseDao.selectById(id);
|
}
|
|
@Override
|
public void delete(String id) {
|
baseDao.deleteById(id);
|
}
|
|
@Override
|
public List<IndDataSetFieldEntity> list(String dataSetId) {
|
QueryWrapper<IndDataSetFieldEntity> queryWrapper = new QueryWrapper<>();
|
queryWrapper.eq("data_set_id", dataSetId).orderByAsc("sort");
|
return baseDao.selectList(queryWrapper);
|
}
|
}
|