<select id="queryCategoryAttribute1ById" resultType="java.util.Map" parameterType="java.lang.Long"> select attribute_varchar1, attribute_varchar2 from smdm_item_category where category_id = #{categoryId} </select>
Map<String, Object> attributeMap = cuxItemMapper.queryCategoryAttribute1ById(itemCategoryId);
mybatis返回map类型若字段都为null则map为null,虽然有一条结果