diff --git a/src/main/resources/mapper/sys/InterfaceLogDao.xml b/src/main/resources/mapper/sys/InterfaceLogDao.xml index 4a5bae8..d21a3c8 100644 --- a/src/main/resources/mapper/sys/InterfaceLogDao.xml +++ b/src/main/resources/mapper/sys/InterfaceLogDao.xml @@ -6,66 +6,71 @@ SELECT COUNT(*) - FROM api_log + FROM api_log as a + left join api_Interface as b on a.interface_name = b.interface_name AND a.site = b.site + a.site in (select site from AccessSite where userID = #{userName}) + and a.bu_no in (select bu_no from AccessBu where username = #{userName}) + and type = 'Interface' - AND interface_name LIKE '%' + #{interfaceName} + '%' + AND a.interface_name LIKE '%' + #{interfaceName} + '%' - AND request_id = #{requestId} + AND a.request_id = #{requestId} - AND re_document_no LIKE '%' + #{reDocumentNo} + '%' + AND a.re_document_no LIKE '%' + #{reDocumentNo} + '%' - AND re_document_type LIKE '%' + #{reDocumentType} + '%' + AND a.re_document_type LIKE '%' + #{reDocumentType} + '%' - AND status_code = #{statusCode} + AND a.status_code = #{statusCode} - AND source_system = #{sourceSystem} + AND a.source_system = #{sourceSystem} - AND target_system = #{targetSystem} + AND a.target_system = #{targetSystem} - AND need_retry_flag = #{needRetryFlag} + AND a.need_retry_flag = #{needRetryFlag} - AND warehouse_id = #{warehouseId} + AND a.warehouse_id = #{warehouseId} - AND CONVERT(varchar(10), created_date, 23) >= #{startDate} + AND CONVERT(varchar(10), a.created_date, 23) >= #{startDate} - AND CONVERT(varchar(10), created_date, 23) <= #{endDate} + AND CONVERT(varchar(10), a.created_date, 23) <= #{endDate}