From 23bd719cebe5feeff4e48fde925b0b39755eea93 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期二, 15 十一月 2022 10:59:50 +0800 Subject: [PATCH] 2022.11.15 --- src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/LawServiceImpl.kt | 28 +++++++++++++++++++++++++--- 1 files changed, 25 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 3b29091..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 { @@ -67,7 +76,13 @@ } andEqualTo("lrIsopen", isOpen) andEqualTo("lrIsuse", isUsing) + fileType?.let { + andEqualTo("lrResourcefiletype", it) + } } +// baseInfo?.biDistrictCode?.let { +// andEqualTo("biDistrictCode", it) +// } } condition.sceneTypeId?.let { if (it != SceneType.NoType.value) { @@ -96,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