| | |
| | | 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 |
| | |
| | | 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)) |
| | |
| | | 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 { |
| | |
| | | andEqualTo("lrResourcefiletype", it) |
| | | } |
| | | } |
| | | // baseInfo?.biDistrictCode?.let { |
| | | // andEqualTo("biDistrictCode", it) |
| | | // } |
| | | } |
| | | condition.sceneTypeId?.let { |
| | | if (it != SceneType.NoType.value) { |