Mr.qian 1 هفته پیش
والد
کامیت
5348b684c9
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      cif-service/src/main/resources/mapper/RedEnvelopeMapper.xml

+ 3 - 1
cif-service/src/main/resources/mapper/RedEnvelopeMapper.xml

@@ -81,6 +81,8 @@
             and biz_type = #{bizType}
         </if>
         and create_time >= #{startTime} and #{endTime} >= create_time
-        and user_id = #{userId} <!-- 添加分片键确保查询正确路由 -->
+        <if test="userId != null">
+            and user_id = #{userId}
+        </if>
     </select>
 </mapper>