| | |
| | | <result property="channelCount" column="channel_count" /> |
| | | <result property="onlineStatus" column="online_status" /> |
| | | <result property="testStatus" column="test_status" /> |
| | | <result property="currentTest" column="current_test" /> |
| | | <result property="status" column="status" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | |
| | | <result property="remark" column="remark" /> |
| | | <result property="delFlag" column="del_flag" /> |
| | | <result property="registrationStatus" column="registration_status" /> |
| | | <collection property="relatedTests" column="cabinet_id" |
| | | select="com.battery.business.mapper.DeviceRelatedTestMapper.selectCabinetRelatedTests" /> |
| | | </resultMap> |
| | | |
| | | <sql id="activeCabinetTestExists"> |
| | |
| | | manufacturer, model, capacity, channel_count, |
| | | case when upper(online_status) = 'ONLINE' or online_status = '0' then '0' else '1' end as online_status, |
| | | case when <include refid="activeCabinetTestExists"/> then '1' else '0' end as test_status, |
| | | case when <include refid="activeCabinetTestExists"/> then '待确认' else null end as current_test, |
| | | status, create_by, create_time, update_by, update_time, remark, del_flag, registration_status |
| | | from t_detection_cabinet |
| | | </sql> |
| | |
| | | when 'RUNNING' then 'RUNNING' |
| | | else 'UNOBSERVABLE' end, |
| | | update_time = sysdate() |
| | | <if test="displayNo != null">, display_no = #{displayNo}</if> |
| | | <if test="updateLastSeen">, last_seen_at_utc = #{lastSeenAtUtc}</if> |
| | | where adapter_code = #{adapterCode} |
| | | and devtype = #{devtype} and devid = #{devid} |