| | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.entity.system.Dic; |
| | | import cc.mrbird.febs.common.core.entity.system.Position; |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | | import cc.mrbird.febs.common.core.utils.SequenceUtil; |
| | | import cc.mrbird.febs.server.system.mapper.DicMapper; |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | public IPage<Dic> findDics(QueryRequest request, Dic dic) { |
| | | LambdaQueryWrapper<Dic> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(Dic::getDelFlag, 0); |
| | | if(StringUtils.isNotBlank(dic.getDicName())){ |
| | | queryWrapper.like(Dic::getDicName, dic.getDicName()); |
| | | } |
| | | Page<Dic> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | return this.page(page, queryWrapper); |
| | | } |
| | |
| | | public void deleteDic(Dic dic) { |
| | | LambdaQueryWrapper<Dic> wrapper = new LambdaQueryWrapper<>(); |
| | | // TODO 设置删除条件 |
| | | wrapper.eq(Dic::getDicId, dic.getDicId()); |
| | | this.remove(wrapper); |
| | | } |
| | | |
| | |
| | | public void logicDelDic(String ids) { |
| | | String[] str = ids.split(","); |
| | | List<String> list = new ArrayList<>(Arrays.asList(str)); |
| | | dicMapper.logicDeleteByIds(list, operatorId); |
| | | for (String str1:list){ |
| | | LambdaQueryWrapper<Dic> wrapper = new LambdaQueryWrapper<>(); |
| | | // TODO 设置删除条件 |
| | | wrapper.eq(Dic::getDicId, str1); |
| | | this.remove(wrapper); |
| | | } |
| | | } |
| | | } |