java110 лет назад: 5
Родитель
Сommit
1d75356eec

+ 27 - 0
java110-bean/src/main/java/com/java110/dto/userQuestionAnswerValue/UserQuestionAnswerValueDto.java

@@ -20,6 +20,7 @@ public class UserQuestionAnswerValueDto extends PageDto implements Serializable
     private String titleId;
     private String answerType;
     private String objId;
+    private String[] objIds;
     private String userQaId;
     private String valueContent;
     private String personId;
@@ -32,6 +33,8 @@ public class UserQuestionAnswerValueDto extends PageDto implements Serializable
     private String qaTitle;
     private String qaValue;
     private String qaType;
+    private String startTime;
+    private String endTime;
 
 
     private Date createTime;
@@ -191,4 +194,28 @@ public class UserQuestionAnswerValueDto extends PageDto implements Serializable
     public void setQaType(String qaType) {
         this.qaType = qaType;
     }
+
+    public String[] getObjIds() {
+        return objIds;
+    }
+
+    public void setObjIds(String[] objIds) {
+        this.objIds = objIds;
+    }
+
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
 }

+ 30 - 0
java110-db/src/main/resources/mapper/report/ReportUserQuestionAnswerValueServiceDaoImplMapper.xml

@@ -30,6 +30,12 @@
         <if test="objId !=null and objId != ''">
             and t.obj_id= #{objId}
         </if>
+        <if test="objIds !=null">
+            and t.obj_id in
+            <foreach collection="objIds" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
         <if test="userQaId !=null and userQaId != ''">
             and t.user_qa_id= #{userQaId}
         </if>
@@ -51,6 +57,15 @@
         <if test="qaId !=null and qaId != ''">
             and t.qa_id= #{qaId}
         </if>
+        <if test="qaType !=null and qaType != ''">
+            and qa.qa_type= #{qaType}
+        </if>
+        <if test="startTime != null">
+            and t.create_time &gt; #{startTime}
+        </if>
+        <if test="endTime != null">
+            and t.create_time &lt; #{endTime}
+        </if>
         order by t.create_time desc
         <if test="page != -1 and page != null ">
             limit #{page}, #{row}
@@ -84,6 +99,12 @@
         <if test="objId !=null and objId != ''">
             and t.obj_id= #{objId}
         </if>
+        <if test="objIds !=null">
+            and t.obj_id in
+            <foreach collection="objIds" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
         <if test="userQaId !=null and userQaId != ''">
             and t.user_qa_id= #{userQaId}
         </if>
@@ -102,6 +123,15 @@
         <if test="userTitleId !=null and userTitleId != ''">
             and t.user_title_id= #{userTitleId}
         </if>
+        <if test="qaType !=null and qaType != ''">
+            and qa.qa_type= #{qaType}
+        </if>
+        <if test="startTime != null">
+            and t.create_time &gt; #{startTime}
+        </if>
+        <if test="endTime != null">
+            and t.create_time &lt; #{endTime}
+        </if>
         <if test="qaId !=null and qaId != ''">
             and t.qa_id= #{qaId}
         </if>

+ 10 - 15
service-report/src/main/java/com/java110/report/api/ReportQuestionAnswerApi.java

@@ -1,17 +1,7 @@
 package com.java110.report.api;
 
-import com.alibaba.fastjson.JSONObject;
-import com.java110.dto.reportOweFee.ReportOweFeeDto;
 import com.java110.dto.userQuestionAnswerValue.UserQuestionAnswerValueDto;
-import com.java110.po.reportOweFee.ReportOweFeePo;
-import com.java110.report.bmo.reportOweFee.IDeleteReportOweFeeBMO;
-import com.java110.report.bmo.reportOweFee.IGetReportOweFeeBMO;
-import com.java110.report.bmo.reportOweFee.ISaveReportOweFeeBMO;
-import com.java110.report.bmo.reportOweFee.IUpdateReportOweFeeBMO;
 import com.java110.report.bmo.reportQuestionAnswer.IGetReportQuestionAnswerBMO;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.utils.util.StringUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
@@ -28,7 +18,6 @@ public class ReportQuestionAnswerApi {
     private IGetReportQuestionAnswerBMO getReportQuestionAnswerBMOImpl;
 
 
-
     /**
      * 微信删除消息模板
      *
@@ -38,13 +27,19 @@ public class ReportQuestionAnswerApi {
      * @path /app/reportQuestionAnswer/queryUserQuestionAnswerValue
      */
     @RequestMapping(value = "/queryUserQuestionAnswerValue", method = RequestMethod.GET)
-    public ResponseEntity<String> queryUserQuestionAnswerValue(@RequestParam(value = "communityId") String communityId,
-                                                               @RequestParam(value = "page") int page,
-                                                               @RequestParam(value = "row") int row) {
+    public ResponseEntity<String> queryUserQuestionAnswerValue(
+            @RequestHeader(value = "store-id") String storeId,
+            @RequestParam(value = "communityId") String communityId,
+            @RequestParam(value = "qaType",required = false) String qaType,
+            @RequestParam(value = "startTime",required = false) String startTime,
+            @RequestParam(value = "endTime",required = false) String endTime,
+            @RequestParam(value = "page") int page,
+            @RequestParam(value = "row") int row) {
         UserQuestionAnswerValueDto userQuestionAnswerValueDto = new UserQuestionAnswerValueDto();
         userQuestionAnswerValueDto.setPage(page);
         userQuestionAnswerValueDto.setRow(row);
-        userQuestionAnswerValueDto.setObjId(communityId);
+        userQuestionAnswerValueDto.setObjIds(new String[]{storeId, communityId});
+        userQuestionAnswerValueDto.setQaType(qaType);
         return getReportQuestionAnswerBMOImpl.get(userQuestionAnswerValueDto);
     }
 }