|
|
@@ -3,6 +3,7 @@ package com.sqx.modules.lovers.service.impl;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
@@ -73,6 +74,16 @@ public class LoversSetRuleServiceImpl extends ServiceImpl<LoversSetRuleDao, Love
|
|
|
this.updateById(entity);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<LoversSetRule> useList() {
|
|
|
+ LambdaQueryWrapper<LoversSetRule> wrapper=new LambdaQueryWrapper<>();
|
|
|
+ wrapper.eq(LoversSetRule::getDelFlag,0)
|
|
|
+ .eq(LoversSetRule::getStatus,1)
|
|
|
+ .orderByAsc(LoversSetRule::getSort);
|
|
|
+ List<LoversSetRule> list = this.list(wrapper);
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
private void checkNameUnique(Long id, String name) {
|
|
|
LambdaQueryWrapper<LoversSetRule> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
queryWrapper.ne(ObjectUtil.isNotNull(id), LoversSetRule::getId, id);
|