From 78fffad1fffb77ada79a329fc52dcce98661e870 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期一, 24 五月 2021 06:30:37 +0800
Subject: [PATCH] 优化代码
---
service-user/src/main/java/com/java110/user/api/QuestionAnswerApi.java | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/service-user/src/main/java/com/java110/user/api/QuestionAnswerApi.java b/service-user/src/main/java/com/java110/user/api/QuestionAnswerApi.java
index cfa8d9e..606bcde 100755
--- a/service-user/src/main/java/com/java110/user/api/QuestionAnswerApi.java
+++ b/service-user/src/main/java/com/java110/user/api/QuestionAnswerApi.java
@@ -147,6 +147,7 @@
@RequestMapping(value = "/queryQuestionAnswer", method = RequestMethod.GET)
public ResponseEntity<String> queryQuestionAnswer(
@RequestHeader(value = "store-id", required = false) String storeId,
+ @RequestHeader(value = "user-id", required = false) String userId,
@RequestParam(value = "communityId", required = false) String communityId,
@RequestParam(value = "objType", required = false) String objType,
@RequestParam(value = "page") int page,
@@ -154,6 +155,7 @@
QuestionAnswerDto questionAnswerDto = new QuestionAnswerDto();
questionAnswerDto.setPage(page);
questionAnswerDto.setRow(row);
+ questionAnswerDto.setUserId(userId);
if (!StringUtil.isEmpty(objType)) {
questionAnswerDto.setObjType(objType);
questionAnswerDto.setObjId(QuestionAnswerDto.QA_TYPE_COMMUNITY.equals(objType) ? communityId : storeId);
@@ -192,7 +194,7 @@
QuestionAnswerTitlePo questionAnswerTitlePo = BeanConvertUtil.covertBean(reqJson, QuestionAnswerTitlePo.class);
- return saveQuestionAnswerTitleBMOImpl.save(questionAnswerTitlePo,titleValues);
+ return saveQuestionAnswerTitleBMOImpl.save(questionAnswerTitlePo, titleValues);
}
/**
@@ -222,7 +224,7 @@
}
QuestionAnswerTitlePo questionAnswerTitlePo = BeanConvertUtil.covertBean(reqJson, QuestionAnswerTitlePo.class);
- return updateQuestionAnswerTitleBMOImpl.update(questionAnswerTitlePo,titleValues);
+ return updateQuestionAnswerTitleBMOImpl.update(questionAnswerTitlePo, titleValues);
}
/**
@@ -254,6 +256,7 @@
*/
@RequestMapping(value = "/queryQuestionAnswerTitle", method = RequestMethod.GET)
public ResponseEntity<String> queryQuestionAnswerTitle(@RequestHeader(value = "store-id", required = false) String storeId,
+ // @RequestHeader(value = "user-id", required = false) String userId,
@RequestParam(value = "communityId", required = false) String communityId,
@RequestParam(value = "objType") String objType,
@RequestParam(value = "qaId") String qaId,
@@ -263,6 +266,7 @@
questionAnswerTitleDto.setPage(page);
questionAnswerTitleDto.setRow(row);
questionAnswerTitleDto.setQaId(qaId);
+ //questionAnswerTitleDto.setUserId(userId);
if (!StringUtil.isEmpty(objType)) {
questionAnswerTitleDto.setObjType(objType);
questionAnswerTitleDto.setObjId(QuestionAnswerDto.QA_TYPE_COMMUNITY.equals(objType) ? communityId : storeId);
--
Gitblit v1.8.0