29 lines
1.0 KiB
Java
29 lines
1.0 KiB
Java
|
|
package com.gunshi.project.hsz.service;
|
||
|
|
|
||
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||
|
|
import com.gunshi.project.hsz.mapper.WarningConditionMapper;
|
||
|
|
import com.gunshi.project.hsz.mapper.WarningRuleMapper;
|
||
|
|
import com.gunshi.project.hsz.model.WarningCondition;
|
||
|
|
import com.gunshi.project.hsz.model.WarningRule;
|
||
|
|
import lombok.extern.slf4j.Slf4j;
|
||
|
|
import org.springframework.stereotype.Service;
|
||
|
|
import org.springframework.transaction.annotation.Transactional;
|
||
|
|
|
||
|
|
import java.io.Serializable;
|
||
|
|
import java.util.List;
|
||
|
|
|
||
|
|
@Service
|
||
|
|
@Slf4j
|
||
|
|
@Transactional(rollbackFor = Exception.class)
|
||
|
|
public class WarningConditionService extends ServiceImpl<WarningConditionMapper, WarningCondition> {
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
public List<WarningCondition> getListByRuleId(Serializable id){
|
||
|
|
LambdaQueryWrapper<WarningCondition> queryWrapper = new LambdaQueryWrapper<WarningCondition>();
|
||
|
|
queryWrapper.eq(WarningCondition::getRuleId,id);
|
||
|
|
return this.list(queryWrapper);
|
||
|
|
}
|
||
|
|
}
|