ruoyi-system/src/main/resources/mapper/system/TContractMapper.xml
@@ -132,7 +132,7 @@ FROM t_contract tc <where> -- 筛选本月签订的合同 DATE_FORMAT(tc.sign_time, '%Y%m') = DATE_FORMAT(CURDATE(), '%Y%m') AND tc.status IN ("4", "5", "6", "7", "8", "9") DATE_FORMAT(tc.sign_time, '%Y%m') = DATE_FORMAT(CURDATE(), '%Y%m') AND tc.status IN ("4", "5", "6", "7", "8", "9") AND tc.pay_type = 2 -- 且租户在本月前从未签订过任何合同 AND NOT EXISTS ( SELECT 1