From aed297a5fbc8df9dab01b28da21f872ee546b43c Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期一, 13 十月 2025 16:15:11 +0800
Subject: [PATCH] 2025.10.13 1. 统一调整controller层的返回类型,通过添加全局响应增强器GlobalResponseAdvice来管理返回结果; 2. 新增mybatis-generator自定义插件,实现给数据库实体entity自动添加swagger注解@ApiModel和@ApiModelProperty
---
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/EvaluationsubruleServiceImpl.kt | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/EvaluationsubruleServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/EvaluationsubruleServiceImpl.kt
index 1c53c7b..0d3ba73 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/EvaluationsubruleServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/EvaluationsubruleServiceImpl.kt
@@ -2,6 +2,7 @@
import cn.flightfeather.supervision.common.exception.BizException
import cn.flightfeather.supervision.domain.ds1.entity.Evaluationrule
+import cn.flightfeather.supervision.domain.ds1.entity.Evaluationsubrule
import cn.flightfeather.supervision.domain.ds1.entity.Evaluationsubrule2
import cn.flightfeather.supervision.domain.ds1.mapper.EvaluationruleMapper
import cn.flightfeather.supervision.domain.ds1.mapper.EvaluationsubruleMapper
@@ -16,23 +17,24 @@
@Service
class EvaluationsubruleServiceImpl(
- val evaluationsubruleMapper: EvaluationsubruleMapper2,
+ val evaluationsubruleMapper2: EvaluationsubruleMapper2,
+ val evaluationsubruleMapper: EvaluationsubruleMapper,
val evaluationruleMapper: EvaluationruleMapper,
private val evaluationRep: EvaluationRep,
private val evaluationRuleRep: EvaluationRuleRep,
private val sceneRep: SceneRep,
) : EvaluationsubruleService {
- override fun findOne(id: String): Evaluationsubrule2 = evaluationsubruleMapper.selectByPrimaryKey(id)
+ override fun findOne(id: String): Evaluationsubrule2 = evaluationsubruleMapper2.selectByPrimaryKey(id)
- override fun findAll(): MutableList<Evaluationsubrule2> = evaluationsubruleMapper.selectAll()
+ override fun findAll(): MutableList<Evaluationsubrule> = evaluationsubruleMapper.selectAll()
- override fun save(evaluationsubrule: Evaluationsubrule2): Int = evaluationsubruleMapper.insert(evaluationsubrule)
+ override fun save(evaluationsubrule: Evaluationsubrule2): Int = evaluationsubruleMapper2.insert(evaluationsubrule)
override fun update(evaluationsubrule: Evaluationsubrule2): Int =
- evaluationsubruleMapper.updateByPrimaryKey(evaluationsubrule)
+ evaluationsubruleMapper2.updateByPrimaryKey(evaluationsubrule)
- override fun delete(id: String): Int = evaluationsubruleMapper.deleteByPrimaryKey(id)
+ override fun delete(id: String): Int = evaluationsubruleMapper2.deleteByPrimaryKey(id)
override fun findByRuleId(erguid: String): List<Evaluationsubrule2> {
return evaluationRuleRep.findSubRule(erguid)
@@ -44,7 +46,7 @@
createCriteria().andEqualTo("districtcode", districtCode)
.andEqualTo("scensetypeid", sceneTypeId)
}).takeIf { it.isNotEmpty() }?.get(0)?.let { rule ->
- evaluationsubruleMapper.selectByExample(Example(Evaluationsubrule2::class.java).apply {
+ evaluationsubruleMapper2.selectByExample(Example(Evaluationsubrule2::class.java).apply {
createCriteria().andEqualTo("erguid", rule.guid)
})
}?.also {
--
Gitblit v1.9.3