| | |
| | | package com.ots.project.exam.restcontroller; |
| | | |
| | | import com.ots.project.exam.dto.ParamsInfo; |
| | | import com.ots.project.exam.dto.RestResponse; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 评测用户访问类 |
| | | */ |
| | | @RestController |
| | | @RequestMapping(value = "/remote/member") |
| | | public interface MemberController { |
| | | |
| | | /** |
| | | * 获取人口学变量信息 |
| | | */ |
| | | @RequestMapping(value = "/param/{token}/{lang}", method = RequestMethod.GET) |
| | | RestResponse getdemographyParam(@PathVariable String token, @PathVariable String lang); |
| | | |
| | | |
| | | /** |
| | | * 查询用户的人口学信息 |
| | | * |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/paramInfo/{token}", method = RequestMethod.GET) |
| | | RestResponse queryDemographyParamInfo(@PathVariable String token); |
| | | |
| | | |
| | | /** |
| | | * 保存人口学信息 |
| | | * |
| | | * @param infos |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/save/{token}/{langType}", method = RequestMethod.POST) |
| | | RestResponse saveDemographyParamInfo(@RequestBody @Valid List<ParamsInfo> infos, @PathVariable String token, @PathVariable String langType); |
| | | |
| | | |
| | | /** |
| | | * 用户鉴权接口 |
| | | * 用户通过token获取当前可用的令牌用于后面 |
| | | * |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/auth/{token}", method = RequestMethod.GET) |
| | | RestResponse memberAuth(@PathVariable String token); |
| | | |
| | | |
| | | /** |
| | | * 获取当前支持的语言类型 |
| | | * @param token |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/langList/{token}/{reportTemplateId}", method = RequestMethod.GET) |
| | | RestResponse queryLangList(@PathVariable String token, @PathVariable String reportTemplateId); |
| | | } |