Commit fedf8cb4 by 梅存智

投票单选、投票排行榜

parent 76ad04a4
......@@ -40,7 +40,7 @@ public class ResearchController {
@ApiOperation(value = "分页查询学员能看到的调研", notes = "分两种状态", response = ResearchVo.class)
public Response<ResearchVo> listPage(
@ApiParam(name = "state", value = "状态:1已完成,2进行中", required = false) @RequestParam(name = "state", required = false) Integer state,
@ApiParam(name = "bizType", value = "业务类型:1调研(问卷、投票);2考试测验,默认1", required = true) @RequestParam(name = "bizType", defaultValue = "1") Integer bizType,
@ApiParam(name = "bizType", value = "业务类型:1调研;2投票,为空查询所有", required = false) @RequestParam(name = "bizType", required = false) Integer bizType,
@ApiParam(name = "pageNo", value = "跳转页数,默认第一页", required = true) @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@ApiParam(name = "pageSize", value = "每页条数,默认20条", required = true) @RequestParam(name = "pageSize", defaultValue = "20") Integer pageSize
) {
......
......@@ -16,6 +16,7 @@ import com.yizhi.research.application.vo.api.MyQuestion;
import com.yizhi.research.application.vo.domain.ResearchVo;
import com.yizhi.research.application.vo.domain.TrResearchAuthorizeVo;
import com.yizhi.research.application.vo.domain.TrResearchQuestionVo;
import com.yizhi.research.application.vo.domain.VoteRankingVo;
import com.yizhi.util.application.constant.ReturnCode;
import com.yizhi.util.application.domain.Response;
import com.yizhi.util.application.enums.i18n.Constants;
......@@ -239,5 +240,26 @@ public class ResearchQuestionsController {
}
/**
* 获取投票结果
* @param researchId
* @return
*/
@GetMapping("/getVoteResult")
Response<VoteRankingVo> getVoteResult(@RequestParam("researchId") Long researchId) {
VoteRankingVo result = researchQuestionClient.getVoteResult(researchId);
return Response.ok(result);
}
/**
* 获取投票排行榜
* @param researchId
* @return
*/
@GetMapping("/getVoteTop")
Response<VoteRankingVo> getVoteTop(@RequestParam("researchId") Long researchId) {
VoteRankingVo result = researchQuestionClient.getVoteTop(researchId);
return Response.ok(result);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment