From 62fc5c26cf9a96eeefc4aff8590349ba75913006 Mon Sep 17 00:00:00 2001 From: 唐耀东 <18861537@qq.com> Date: 星期二, 13 九月 2022 10:40:36 +0800 Subject: [PATCH] 配置工具修改 --- ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/BsRulesServiceImpl.java | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-) diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/BsRulesServiceImpl.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/BsRulesServiceImpl.java index 238f2ab..ca52f86 100644 --- a/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/BsRulesServiceImpl.java +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/BsRulesServiceImpl.java @@ -7,6 +7,7 @@ import com.ruoyi.common.utils.PageUtils; import com.ruoyi.common.core.page.PagePlus; import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.oa.domain.DevEquipment; import org.springframework.stereotype.Service; import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -49,6 +50,7 @@ private LambdaQueryWrapper<BsRules> buildQueryWrapper(BsRulesBo bo) { Map<String, Object> params = bo.getParams(); LambdaQueryWrapper<BsRules> lqw = Wrappers.lambdaQuery(); + lqw.like(bo.getRules() != null, BsRules::getRules, bo.getRules()); return lqw; } @@ -58,10 +60,10 @@ if (list.size() > 0) { throw new ServiceException("瑙勭珷鍒跺害閲嶅", HttpStatus.HTTP_PARTIAL); } - List<BsRules> vList = baseMapper.selectList(new LambdaQueryWrapper<BsRules>().eq(BsRules::getVersionCode, bo.getVersionCode())); - if (vList.size() > 0) { - throw new ServiceException("鍙戝竷鐗堟湰閲嶅", HttpStatus.HTTP_PARTIAL); - } +// List<BsRules> vList = baseMapper.selectList(new LambdaQueryWrapper<BsRules>().eq(BsRules::getVersionCode, bo.getVersionCode())); +// if (vList.size() > 0) { +// throw new ServiceException("鍙戝竷鐗堟湰閲嶅", HttpStatus.HTTP_PARTIAL); +// } BsRules add = BeanUtil.toBean(bo, BsRules.class); validEntityBeforeSave(add); boolean flag = save(add); @@ -79,12 +81,12 @@ if (list.size() > 0) { throw new ServiceException("瑙勭珷鍒跺害閲嶅", HttpStatus.HTTP_PARTIAL); } - List<BsRules> vList = baseMapper.selectList(new LambdaQueryWrapper<BsRules>() - .eq(BsRules::getVersionCode, bo.getVersionCode()) - .ne(BsRules::getId, bo.getId())); - if (vList.size() > 0) { - throw new ServiceException("鍙戝竷鐗堟湰閲嶅", HttpStatus.HTTP_PARTIAL); - } +// List<BsRules> vList = baseMapper.selectList(new LambdaQueryWrapper<BsRules>() +// .eq(BsRules::getVersionCode, bo.getVersionCode()) +// .ne(BsRules::getId, bo.getId())); +// if (vList.size() > 0) { +// throw new ServiceException("鍙戝竷鐗堟湰閲嶅", HttpStatus.HTTP_PARTIAL); +// } BsRules update = BeanUtil.toBean(bo, BsRules.class); validEntityBeforeSave(update); return updateById(update); -- Gitblit v1.9.1