From 3e2159e45e12b2b8af058b68eafeaf082cf3fe85 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期四, 15 九月 2022 09:30:31 +0800 Subject: [PATCH] 2022.9.15 1. 根据微信小程序前端需求,添加各对应后台逻辑 --- src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ConsultationController.kt | 91 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 91 insertions(+), 0 deletions(-) diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ConsultationController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ConsultationController.kt index a21506b..70e309e 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ConsultationController.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ConsultationController.kt @@ -18,4 +18,95 @@ @ApiParam(value = "鐢ㄦ埛id") @PathVariable userId: String, @ApiParam(value = "鍜ㄨ闂") @RequestBody questions: List<OnLineQuestion> ) = onLineQuestionService.addQuestions(userId, questions) + + @ApiOperation(value = "鏍规嵁鍏抽敭瀛楁悳绱㈡硶寰嬫硶瑙�") + @GetMapping("/search/law") + fun searchLaw( + @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String, + @ApiParam(value = "鍏抽敭瀛�") @RequestParam keyword: String, + @ApiParam(value = "鎼滅储缁撴灉鐨勭被鍨�", required = false) @RequestParam type: Byte?, + @ApiParam(value = "椤电爜") @RequestParam page: Int, + @ApiParam(value = "鍗曢〉鏁版嵁閲�") @RequestParam perPage: Int, + ) = onLineQuestionService.searchLaw(userId, keyword, type, page, perPage) + + @ApiOperation(value = "鑾峰彇鐑棬娉曞緥娉曡") + @GetMapping("/topic/law") + fun getTopicLaw( + @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String, + ) = onLineQuestionService.getTopicLaw(userId) + + @ApiOperation(value = "鑾峰彇鐑棬娉曞緥娉曡鏉$洰") + @GetMapping("/topic/item") + fun getTopicMgtItems( + @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String, + ) = onLineQuestionService.getTopicMgtItems(userId) + + @ApiOperation(value = "鑾峰彇鐑棬闂瓟") + @GetMapping("/topic/qa") + fun getTopicQA( + @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String, + ) = onLineQuestionService.getTopicQA(userId) + + @ApiOperation(value = "鑾峰彇鐑棬妗堜緥") + @GetMapping("/topic/case") + fun getTopicCase( + @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String, + ) = onLineQuestionService.getTopicCase(userId) + + @ApiOperation(value = "鑾峰彇娉曞緥娉曡鏂囦欢") + @GetMapping("/law/file") + fun getMgtFile( + @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String, + @ApiParam(value = "鏂囦欢id") @RequestParam fileId: String, + ) = onLineQuestionService.getMgtFile(userId, fileId) + + @ApiOperation(value = "鑾峰彇娉曞緥娉曡鏉$洰") + @GetMapping("/law/item") + fun getMgtItem( + @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String, + @ApiParam(value = "鏉$洰id") @RequestParam itemId: String, + ) = onLineQuestionService.getMgtItem(userId, itemId) + + @ApiOperation(value = "鑾峰彇闂") + @GetMapping("/law/question") + fun getQuestion( + @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String, + @ApiParam(value = "闂id") @RequestParam qId: String, + ) = onLineQuestionService.getQuestion(userId, qId) + + @ApiOperation(value = "鑾峰彇绛旀") + @GetMapping("/law/answer") + fun getAnswers( + @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String, + @ApiParam(value = "闂id") @RequestParam qId: String, + ) = onLineQuestionService.getAnswers(userId, qId) + + @ApiOperation(value = "鑾峰彇妗堜緥") + @GetMapping("/law/case") + fun getCase( + @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String, + @ApiParam(value = "妗堜緥id") @RequestParam caseId: String, + ) = onLineQuestionService.getCase(userId, caseId) + + @ApiOperation(value = "鑾峰彇闂") + @GetMapping("/question/type") + fun getQuestionsByType( + @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String, + @ApiParam(value = "瑕佺礌澶х被", required = false) @RequestParam kind: Byte?, + @ApiParam(value = "瑕佺礌灏忕被", required = false) @RequestParam subKind: Byte?, + @ApiParam(value = "椤电爜") @RequestParam page: Int, + @ApiParam(value = "鍗曢〉鏁版嵁閲�") @RequestParam perPage: Int, + ) = onLineQuestionService.getQuestionsByType(userId, kind, subKind, page, perPage) + + @ApiOperation(value = "鑾峰彇鐜繚瑕佺礌澶х被") + @GetMapping("/elementtype") + fun getEnElementTypes( + @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String, + ) = onLineQuestionService.getEnElementTypes(userId) + + @ApiOperation(value = "鑾峰彇鐜繚瑕佺礌灏忕被") + @GetMapping("/elementsubtype") + fun getEnElementSubTypes( + @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String, + ) = onLineQuestionService.getEnElementSubTypes(userId) } \ No newline at end of file -- Gitblit v1.9.3