Explorar el Código

修改用户服务商列表sql关联

LiFei hace 5 años
padre
commit
27321762ca

+ 1 - 1
happy-cloud-wisdom/happy-cloud-wisdom-biz/src/main/java/org/jeecg/modules/hlwsubcontractor/mapper/xml/HlwSubcontractorMapper.xml

@@ -109,8 +109,8 @@
 		case when hpd.id is not null then true else false end as "isPayment"
         FROM hlw_subcontractor a
         inner join hlw_application_subcontractor has on has.subcontractor_id=a.id
-        left join hlw_user_subcontractor hs on hs.subcontractor_id=a.id
         left join hlw_user hu on  hu.user_code=#{userCode}
+        left join hlw_user_subcontractor hs on hs.subcontractor_id=a.id and hu.id=hs.user_id
         left join hlw_payment hp on hp.subcontractor_id=a.id and hp.application_id = #{applicationId}
         left join hlw_payment_detail hpd on hpd.idcard_number=hu.idcard_number and hp.id=hpd.payment_id
         WHERE has.application_id = #{applicationId}