yeg
2026-08-29 76f9639e3c0e14cc6a4e05d3a3212799ea1c48fb
ruoyi-system/src/main/resources/mapper/system/TBatteryGroupFieldMapper.xml
@@ -95,4 +95,12 @@
        where field_id = #{fieldId}
          and del_flag = 0
    </update>
    <select id="countFieldReferences" resultType="int">
        select
            (select count(1) from t_battery_group_template_field
             where field_id = #{fieldId} and del_flag = 0)
          + (select count(1) from t_battery_group_relation_field
             where battery_group_field_id = #{fieldId} and del_flag = '0')
    </select>
</mapper>