提交 11c7ca4f 编写于 作者: minghao.wu's avatar minghao.wu

feature:新增返回type类型

上级 6c1c7d3d
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
<dependency> <dependency>
<groupId>com.pica.cloud.online.exam</groupId> <groupId>com.pica.cloud.online.exam</groupId>
<artifactId>pica-cloud-analysis-common</artifactId> <artifactId>pica-cloud-analysis-common</artifactId>
<version>1.0.1</version> <version>1.0.2</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
......
...@@ -156,6 +156,12 @@ public class AnalysisController { ...@@ -156,6 +156,12 @@ public class AnalysisController {
examTitleId, user.getId())); examTitleId, user.getId()));
} }
/**
* 设置类型
*/
CHCAnalysis analysis = analysisService.getAnalysisById(analysisRoundExamTitle.getAnalysisId());
examTitleReplyDto.setType(analysis.getType().intValue());
builder.setData(examTitleReplyDto); builder.setData(examTitleReplyDto);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
...@@ -201,6 +207,12 @@ public class AnalysisController { ...@@ -201,6 +207,12 @@ public class AnalysisController {
reply.getAnalysisRoundExamTitleId(), user.getId())); reply.getAnalysisRoundExamTitleId(), user.getId()));
} }
/**
* 设置类型
*/
CHCAnalysis analysis = analysisService.getAnalysisById(analysisRoundExamTitle.getAnalysisId());
examTitleReplyDetailDto.setType(analysis.getType().intValue());
builder.setData(examTitleReplyDetailDto); builder.setData(examTitleReplyDetailDto);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
...@@ -253,7 +265,7 @@ public class AnalysisController { ...@@ -253,7 +265,7 @@ public class AnalysisController {
@RequestMapping(value = "/starReply/{replyId}/analysis/{analysisId}/round/{roundId}/examTitle/{examTitleId}", method = RequestMethod.GET, produces = "application/json;charset=UTF-8") @RequestMapping(value = "/starReply/{replyId}/analysis/{analysisId}/round/{roundId}/examTitle/{examTitleId}", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
public PicaResponse starReply(@PathVariable("analysisId") Integer analysisId, @PathVariable("roundId") Integer roundId, public PicaResponse starReply(@PathVariable("analysisId") Integer analysisId, @PathVariable("roundId") Integer roundId,
@PathVariable("examTitleId") Integer examTitleId, @PathVariable("replyId") Integer replyId, @PathVariable("examTitleId") Integer examTitleId, @PathVariable("replyId") Integer replyId,
@RequestParam(required = false) String token) { @RequestHeader(required = false) String token) {
if (token == null) { if (token == null) {
return ReturnUtil.getPicaResponse(PicaResultCode.SYSTEM_NO_TOKEN); return ReturnUtil.getPicaResponse(PicaResultCode.SYSTEM_NO_TOKEN);
} }
...@@ -294,7 +306,8 @@ public class AnalysisController { ...@@ -294,7 +306,8 @@ public class AnalysisController {
@ApiOperation(value = "取消点赞", response = PicaResponse.class) @ApiOperation(value = "取消点赞", response = PicaResponse.class)
@RequestMapping(value = "/cancelStar/{replyId}", method = RequestMethod.GET, produces = "application/json;charset=UTF-8") @RequestMapping(value = "/cancelStar/{replyId}", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
public PicaResponse cancelStar( @PathVariable("replyId") Integer replyId, @RequestParam(required = false) String token) { public PicaResponse cancelStar( @PathVariable("replyId") Integer replyId,
@RequestHeader(required = false) String token) {
if (token == null) { if (token == null) {
return ReturnUtil.getPicaResponse(PicaResultCode.SYSTEM_NO_TOKEN); return ReturnUtil.getPicaResponse(PicaResultCode.SYSTEM_NO_TOKEN);
} }
...@@ -349,6 +362,12 @@ public class AnalysisController { ...@@ -349,6 +362,12 @@ public class AnalysisController {
examTitleId, user.getId())); examTitleId, user.getId()));
} }
/**
* 设置类型
*/
CHCAnalysis analysis = analysisService.getAnalysisById(analysisRoundExamTitle.getAnalysisId());
examTitleReplyDto.setType(analysis.getType().intValue());
builder.setData(examTitleReplyDto); builder.setData(examTitleReplyDto);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
...@@ -395,6 +414,12 @@ public class AnalysisController { ...@@ -395,6 +414,12 @@ public class AnalysisController {
reply.getAnalysisRoundExamTitleId(), user.getId())); reply.getAnalysisRoundExamTitleId(), user.getId()));
} }
/**
* 设置类型
*/
CHCAnalysis analysis = analysisService.getAnalysisById(analysisRoundExamTitle.getAnalysisId());
examTitleReplyDetailDto.setType(analysis.getType().intValue());
builder.setData(examTitleReplyDetailDto); builder.setData(examTitleReplyDetailDto);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册