package cn.flightfeather.supervision.lightshare.web
|
|
import cn.flightfeather.supervision.domain.entity.Company
|
import cn.flightfeather.supervision.domain.entity.PersonalInfo
|
import cn.flightfeather.supervision.lightshare.service.AuthService
|
import cn.flightfeather.supervision.lightshare.vo.AuthSceneVo
|
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("/auth")
|
class AuthController(val authService: AuthService) {
|
|
@ApiOperation(value = "企业信息认证")
|
@PostMapping("/company")
|
fun authCompany(
|
@ApiParam("用户微信id") @RequestParam("wxUserId") wxUserId: String,
|
@ApiParam("企业信息") @RequestBody company: Company,
|
) = authService.authCompany(wxUserId, company)
|
|
@ApiOperation(value = "场景信息认证")
|
@PostMapping("/scene")
|
fun authScene(
|
@ApiParam("用户微信id") @RequestParam("wxUserId") wxUserId: String,
|
@ApiParam("用户场景类型编号") @RequestParam("sceneType") sceneType: Int,
|
@ApiParam("场景信息") @RequestBody sceneInfo: String,
|
) = authService.authScene(wxUserId, sceneType, sceneInfo)
|
|
@ApiOperation(value = "个人信息认证")
|
@PostMapping("/personal")
|
fun authPersonal(
|
@ApiParam("用户微信id") @RequestParam("wxUserId") wxUserId: String,
|
@ApiParam("个人信息") @RequestBody personalInfo: PersonalInfo
|
) = authService.authPersonal(wxUserId, personalInfo)
|
|
@ApiOperation(value = "获取用户认证状态")
|
@GetMapping("/status")
|
fun authStatus(
|
@ApiParam("用户微信id") @RequestParam(value = "wxUserId", required = false) wxUserId: String?,
|
@ApiParam("用户场景id") @RequestParam(value = "userId", required = false) userId: String?,
|
) = authService.authStatus(wxUserId, userId)
|
}
|