From 027bf7da7a012fa36f8835b2419c74da8b2f1c28 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期二, 15 十一月 2022 11:00:21 +0800
Subject: [PATCH] 2022.11.15
---
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/LawServiceImpl.kt | 25 ++++++++++++++++++++++---
1 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/LawServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/LawServiceImpl.kt
index 6040849..a024872 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/LawServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/LawServiceImpl.kt
@@ -3,8 +3,10 @@
import cn.flightfeather.supervision.domain.entity.Law
import cn.flightfeather.supervision.domain.entity.LawsRegulations
import cn.flightfeather.supervision.domain.enumeration.SceneType
+import cn.flightfeather.supervision.domain.mapper.BaseInfoMapper
import cn.flightfeather.supervision.domain.mapper.LawMapper
import cn.flightfeather.supervision.domain.mapper.LawsRegulationsMapper
+import cn.flightfeather.supervision.domain.mapper.UserinfoMapper
import cn.flightfeather.supervision.lightshare.service.LawService
import cn.flightfeather.supervision.lightshare.vo.LawVo
import cn.flightfeather.supervision.lightshare.vo.LawsRegulationsCondition
@@ -14,7 +16,12 @@
import javax.servlet.http.HttpServletResponse
@Service
-class LawServiceImpl(val lawMapper: LawMapper, val lawsRegulationsMapper: LawsRegulationsMapper) : LawService {
+class LawServiceImpl(
+ val lawMapper: LawMapper,
+ val lawsRegulationsMapper: LawsRegulationsMapper,
+ val userinfoMapper: UserinfoMapper,
+ val baseInfoMapper: BaseInfoMapper
+) : LawService {
override fun getLaws(page: Int, per_page: Int, response: HttpServletResponse): ArrayList<LawVo> {
val counts = lawMapper.selectCountByExample(Example(Law::class.java))
@@ -50,8 +57,10 @@
return law.laText
}
- override fun getLawsRegulations(
- condition: LawsRegulationsCondition, page: Int, per_page: Int, response: HttpServletResponse): List<LawsRegulations> {
+ override fun getLawsRegulations(userId: String,
+ condition: LawsRegulationsCondition, page: Int, per_page: Int, response: HttpServletResponse): List<LawsRegulations> {
+// val userInfo = userinfoMapper.selectByPrimaryKey(userId)
+ val baseInfo = baseInfoMapper.selectByPrimaryKey(userId)
val example = Example(LawsRegulations::class.java).apply {
createCriteria().apply {
condition.apply {
@@ -71,6 +80,9 @@
andEqualTo("lrResourcefiletype", it)
}
}
+// baseInfo?.biDistrictCode?.let {
+// andEqualTo("biDistrictCode", it)
+// }
}
condition.sceneTypeId?.let {
if (it != SceneType.NoType.value) {
@@ -99,4 +111,11 @@
condition.isForeign, condition.category, condition.keywords,
condition.isOpen, condition.isUsing, condition.count, condition.sceneTypeId)
}
+
+ override fun getSeries(userId: String, seriesId: String): List<LawsRegulations> {
+ return lawsRegulationsMapper.selectByExample(Example(LawsRegulations::class.java).apply {
+ createCriteria().andEqualTo("lrExtension2", seriesId)
+ orderBy("lrExtension3")
+ })
+ }
}
\ No newline at end of file
--
Gitblit v1.9.3