java110 %!s(int64=2) %!d(string=hai) anos
pai
achega
29214e6116

+ 3 - 1
java110-db/src/main/resources/mapper/user/UserQuestionAnswerV1ServiceDaoImplMapper.xml

@@ -170,7 +170,9 @@
             <if test="state != null and state != ''">
                 and t.state = #{state}
             </if>
-            and qa.qa_type = #{qaType}
+            <if test="qaType != null and qaType != ''">
+                and qa.qa_type = #{qaType}
+            </if>
             and qa.state = 'C'
             and qa.start_time &lt; NOW()
             and qa.end_time &gt; NOW()

+ 1 - 1
service-user/src/main/java/com/java110/user/cmd/question/QueryOwnerQuestionAnswerCmd.java

@@ -33,7 +33,7 @@ public class QueryOwnerQuestionAnswerCmd extends Cmd {
     @Override
     public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
         Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区信息");
-        Assert.hasKeyAndValue(reqJson, "qaType", "未包含qaType");
+        //Assert.hasKeyAndValue(reqJson, "qaType", "未包含qaType");
         String userId = context.getReqHeaders().get("user-id");
         Assert.hasLength(userId, "用户未登录");
     }