Aias00 opened a new issue, #6873: URL: https://github.com/apache/shenyu/issues/6873
## Description `BaseResultMap` maps id/date_created/date_updated/instance_ip/instance_port/instance_type/instance_info/namespace_id but NOT `instance_state`, even though `Base_Column_List` (line 41) includes `instance_state` and `insert`/`updateById` write it. Every resultMap-based SELECT (`selectAll`, `findAllByNamespaceId`, `selectByQuery`) returns `instanceState = null` for rows that have a non-null state. (`selectById`/`selectOneByQuery` use `resultType` auto-mapping and are unaffected.) Also `Base_Column_List` lists `date_created`/`date_updated` twice (lines 35-36, 43-44) — a copy-paste defect. ## Location - `shenyu-admin/src/main/resources/mappers/instance-info-sqlmap.xml:21-30,35-36,43-44` ## Impact Instance-state reads via the resultMap path silently return null state; this is the upstream root cause of the `InstanceCheckService` null-state autoboxing NPEs (N37). ## Suggested fix Add `<result column="instance_state" jdbcType="INTEGER" property="instanceState"/>` to `BaseResultMap`; remove the duplicate date columns from `Base_Column_List`. ## Related existing Distinct from N37 (#6706, `InstanceCheckService` doCheck/collectStateData NPE on null instanceState) — N37 is the service-level autoboxing symptom; this is the mapper-level root cause (missing resultMap column). Fixing the resultMap populates the field and prevents the N37 unboxing for the resultMap-read path. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
