feiyu02
2022-07-04 c93ad66797e4830ccf4de81c1e8787ab90b22791
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ConsultationController.kt
@@ -3,6 +3,8 @@
import cn.flightfeather.supervision.domain.entity.OnLineQuestion
import cn.flightfeather.supervision.lightshare.service.OnLineQuestionService
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import io.swagger.annotations.ApiParam
import org.springframework.web.bind.annotation.*
@Api(tags = ["在线咨询API接口"])
@@ -10,9 +12,10 @@
@RequestMapping("/consultation")
class ConsultationController(val onLineQuestionService: OnLineQuestionService) {
    @ApiOperation(value = "提出咨询问题")
    @PostMapping("/add/{userId}")
    fun add(
            @PathVariable userId: String,
            @RequestBody questions: List<OnLineQuestion>
        @ApiParam(value = "用户id") @PathVariable userId: String,
        @ApiParam(value = "咨询问题") @RequestBody questions: List<OnLineQuestion>
    ) = onLineQuestionService.addQuestions(userId, questions)
}