feiyu02
2022-07-04 c93ad66797e4830ccf4de81c1e8787ab90b22791
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package cn.flightfeather.supervision.lightshare.web
 
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接口"])
@RestController
@RequestMapping("/consultation")
class ConsultationController(val onLineQuestionService: OnLineQuestionService) {
 
    @ApiOperation(value = "提出咨询问题")
    @PostMapping("/add/{userId}")
    fun add(
        @ApiParam(value = "用户id") @PathVariable userId: String,
        @ApiParam(value = "咨询问题") @RequestBody questions: List<OnLineQuestion>
    ) = onLineQuestionService.addQuestions(userId, questions)
}