Commit 819e4bf2 by guojuxing

商户规则sql修复:链接查询错误

parent 649b60c7
......@@ -117,12 +117,12 @@
select t1.enterprise_rule_id enterpriseRuleId, t1.rule_name ruleName, count(DISTINCT t2.enterprise_id) countEnterpriseId
from tab_config_rule_enterprise t1
left join tab_config_rule_enterprise_rel t2 on t1.enterprise_rule_id = t2.enterprise_rule_id
and t2.status = 1
and t2.enterprise_id != -1
<if test="search != null and search != '' ">
left join tab_enterprise t3 on t2.enterprise_id = t3.enterprise_id
</if>
where t1.status = 1
and t2.status = 1
and t2.enterprise_id != -1
<if test="search != null and search != '' ">
and ( t1.rule_name like concat('%', #{search}, '%')
or t3.enterprise_name like concat('%', #{search}, '%')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment