package cn.flightfeather.supervision.lightshare.service.Impl
|
|
import cn.flightfeather.supervision.domain.entity.Evaluationsubrule
|
import cn.flightfeather.supervision.domain.mapper.EvaluationsubruleMapper
|
import cn.flightfeather.supervision.lightshare.service.EvaluationsubruleService
|
import org.springframework.stereotype.Service
|
import tk.mybatis.mapper.entity.Example
|
|
@Service
|
class EvaluationsubruleServiceImpl (val evaluationsubruleMapper: EvaluationsubruleMapper):EvaluationsubruleService {
|
|
override fun findOne(id: String): Evaluationsubrule = evaluationsubruleMapper.selectByPrimaryKey(id)
|
|
override fun findAll(): MutableList<Evaluationsubrule> = evaluationsubruleMapper.selectAll()
|
|
override fun save(evaluationsubrule: Evaluationsubrule): Int = evaluationsubruleMapper.insert(evaluationsubrule)
|
|
override fun update(evaluationsubrule: Evaluationsubrule): Int = evaluationsubruleMapper.updateByPrimaryKey(evaluationsubrule)
|
|
override fun delete(id: String): Int = evaluationsubruleMapper.deleteByPrimaryKey(id)
|
|
override fun findByRuleId(erguid: String): List<Evaluationsubrule> {
|
val example = Example(Evaluationsubrule::class.java)
|
val criteria = example.createCriteria()
|
criteria.andEqualTo("erguid", erguid)
|
return evaluationsubruleMapper.selectByExample(example)
|
}
|
}
|