fix(linkzo): 修复SQL

This commit is contained in:
zhansihu 2023-08-23 10:21:46 +08:00
parent a69ef41d33
commit 807308647d

View File

@ -202,13 +202,13 @@
from message_record AS record
where to_id=#{req.toId}
<if test="req.msgType != null and req.msgType > 0">
type = #{req.msgType}
AND type = #{req.msgType}
</if>
<if test="req.fromId != null and req.fromId > 0">
from_id = #{req.fromId}
AND from_id = #{req.fromId}
</if>
<if test="req.tenantId != null and req.tenantId > 0">
tenant_id = #{req.tenantId}
AND tenant_id = #{req.tenantId}
</if>
and module_id = #{req.moduleId}
and state in (2,3)
@ -234,16 +234,16 @@
from message_record AS record
where to_id=#{req.toId}
<if test="req.msgType != null and req.msgType > 0">
type = #{req.msgType}
AND type = #{req.msgType}
</if>
<if test="req.fromId != null and req.fromId > 0">
from_id = #{req.fromId}
AND from_id = #{req.fromId}
</if>
<if test="req.tenantId != null and req.tenantId > 0">
tenant_id = #{req.tenantId}
AND tenant_id = #{req.tenantId}
</if>
<if test="req.moduleId != null and req.moduleId > 0">
module_id = #{req.moduleId}
AND module_id = #{req.moduleId}
</if>
and state=2
and is_delete = 0