| | |
| | | package com.ruoyi.generator.service; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import cn.hutool.core.convert.Convert; |
| | | import com.ruoyi.generator.domain.GenTableColumn; |
| | | import com.ruoyi.generator.mapper.GenTableColumnMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 业务字段 服务层实现 |
| | |
| | | * @author ruoyi |
| | | */ |
| | | @Service |
| | | public class GenTableColumnServiceImpl extends ServiceImpl<GenTableColumnMapper, GenTableColumn> implements IGenTableColumnService |
| | | { |
| | | @Autowired |
| | | private GenTableColumnMapper genTableColumnMapper; |
| | | public class GenTableColumnServiceImpl extends ServiceImpl<GenTableColumnMapper, GenTableColumn> implements IGenTableColumnService { |
| | | |
| | | /** |
| | | * 查询业务字段列表 |
| | |
| | | * @return 业务字段集合 |
| | | */ |
| | | @Override |
| | | public List<GenTableColumn> selectGenTableColumnListByTableId(Long tableId) |
| | | { |
| | | return genTableColumnMapper.selectGenTableColumnListByTableId(tableId); |
| | | public List<GenTableColumn> selectGenTableColumnListByTableId(Long tableId) { |
| | | return list(new LambdaQueryWrapper<GenTableColumn>() |
| | | .eq(GenTableColumn::getTableId,tableId) |
| | | .orderByAsc(GenTableColumn::getSort)); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int insertGenTableColumn(GenTableColumn genTableColumn) |
| | | { |
| | | return genTableColumnMapper.insertGenTableColumn(genTableColumn); |
| | | public int insertGenTableColumn(GenTableColumn genTableColumn) { |
| | | return baseMapper.insert(genTableColumn); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int updateGenTableColumn(GenTableColumn genTableColumn) |
| | | { |
| | | return genTableColumnMapper.updateGenTableColumn(genTableColumn); |
| | | public int updateGenTableColumn(GenTableColumn genTableColumn) { |
| | | return baseMapper.updateById(genTableColumn); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteGenTableColumnByIds(String ids) |
| | | { |
| | | return genTableColumnMapper.deleteGenTableColumnByIds(Convert.toLongArray(ids)); |
| | | public int deleteGenTableColumnByIds(String ids) { |
| | | return baseMapper.deleteBatchIds(Arrays.asList(ids.split(","))); |
| | | } |
| | | } |