| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.dto.questionAnswer.QuestionAnswerDto; |
| | | import com.java110.dto.questionAnswerTitle.QuestionAnswerTitleDto; |
| | | import com.java110.dto.questionAnswerTitleValue.QuestionAnswerTitleValueDto; |
| | | import com.java110.po.questionAnswer.QuestionAnswerPo; |
| | | import com.java110.po.questionAnswerTitle.QuestionAnswerTitlePo; |
| | | import com.java110.po.questionAnswerTitleValue.QuestionAnswerTitleValuePo; |
| | | import com.java110.dto.question.QuestionAnswerDto; |
| | | import com.java110.dto.question.QuestionAnswerTitleDto; |
| | | import com.java110.dto.question.QuestionAnswerTitleValueDto; |
| | | import com.java110.po.question.QuestionAnswerPo; |
| | | import com.java110.po.question.QuestionAnswerTitlePo; |
| | | import com.java110.po.question.QuestionAnswerTitleValuePo; |
| | | import com.java110.user.bmo.questionAnswer.IDeleteQuestionAnswerBMO; |
| | | import com.java110.user.bmo.questionAnswer.IGetQuestionAnswerBMO; |
| | | import com.java110.user.bmo.questionAnswer.ISaveQuestionAnswerBMO; |
| | |
| | | Assert.hasKeyAndValue(reqJson, "endTime", "请求报文中未包含endTime"); |
| | | Assert.hasKeyAndValue(reqJson, "objType", "请求报文中未包含objType"); |
| | | |
| | | if (QuestionAnswerDto.QA_TYPE_STORE.equals(reqJson.getString("objType"))) { |
| | | reqJson.put("objId", storeId); |
| | | } |
| | | Assert.hasKeyAndValue(reqJson, "objId", "请求报文中未包含objId"); |
| | | |
| | | QuestionAnswerPo questionAnswerPo = BeanConvertUtil.covertBean(reqJson, QuestionAnswerPo.class); |
| | |
| | | QuestionAnswerDto questionAnswerDto = new QuestionAnswerDto(); |
| | | questionAnswerDto.setPage(page); |
| | | questionAnswerDto.setRow(row); |
| | | questionAnswerDto.setUserId(userId); |
| | | questionAnswerDto.setQaType(qaType); |
| | | questionAnswerDto.setQaName(qaName); |
| | | questionAnswerDto.setQaId(qaId); |
| | | if (!StringUtil.isEmpty(objType)) { |
| | | questionAnswerDto.setObjType(objType); |
| | | questionAnswerDto.setObjId(QuestionAnswerDto.QA_TYPE_COMMUNITY.equals(objType) ? communityId : storeId); |
| | | } else { |
| | | questionAnswerDto.setObjIds(new String[]{storeId, communityId}); |
| | | } |
| | | return getQuestionAnswerBMOImpl.get(questionAnswerDto); |
| | | } |
| | | |
| | |
| | | //questionAnswerTitleDto.setUserId(userId); |
| | | if (!StringUtil.isEmpty(objType)) { |
| | | questionAnswerTitleDto.setObjType(objType); |
| | | questionAnswerTitleDto.setObjId(QuestionAnswerDto.QA_TYPE_COMMUNITY.equals(objType) ? communityId : storeId); |
| | | questionAnswerTitleDto.setObjId(communityId); |
| | | } else { |
| | | questionAnswerTitleDto.setObjIds(new String[]{storeId, communityId}); |
| | | } |
| | |
| | | questionAnswerTitleValueDto.setPage(page); |
| | | questionAnswerTitleValueDto.setRow(row); |
| | | questionAnswerTitleValueDto.setObjType(objType); |
| | | questionAnswerTitleValueDto.setObjId(QuestionAnswerDto.QA_TYPE_COMMUNITY.equals(objType) ? communityId : storeId); |
| | | questionAnswerTitleValueDto.setObjId(communityId); |
| | | return getQuestionAnswerTitleValueBMOImpl.get(questionAnswerTitleValueDto); |
| | | } |
| | | |
| | |
| | | questionAnswerTitleValueDto.setRow(row); |
| | | questionAnswerTitleValueDto.setObjType(objType); |
| | | questionAnswerTitleValueDto.setTitleId(titleId); |
| | | questionAnswerTitleValueDto.setObjId(QuestionAnswerDto.QA_TYPE_COMMUNITY.equals(objType) ? communityId : storeId); |
| | | questionAnswerTitleValueDto.setObjId(communityId); |
| | | return getQuestionAnswerTitleValueBMOImpl.queryQuestionAnswerTitleValueResult(questionAnswerTitleValueDto); |
| | | } |
| | | } |