发布网友 发布时间:2022-04-07 22:10
共1个回答
热心网友 时间:2022-04-07 23:40
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <mapper namespace="com.mzj..BizGovInfoMapper" > <resultMap id="BaseResultMap" type="com.mzj.model.BizGovInfo" > <id column="ID" property="id" jdbcType="CHAR" /> <result column="BAR_ID" property="bar_id" jdbcType="CHAR" /> <result column="INDEX_NUM" property="index_num" jdbcType="VARCHAR" /> <result column="PUB_UNIT" property="pub_unit" jdbcType="VARCHAR" /> <result column="INFO_NAME" property="info_name" jdbcType="VARCHAR" /> <result column="MENO" property="meno" javaType="string" jdbcType="CLOB" /> <result column="FILE_NUM" property="file_num" jdbcType="VARCHAR" /> <result column="CREATE_TIME" property="create_time" jdbcType="TIMESTAMP" /> <result column="STATE" property="state" jdbcType="CHAR" /> <result column="OPEN_LIMIT" property="open_limit" jdbcType="CHAR" /> <result column="INFO_ID" property="info_id" jdbcType="CHAR" /> </resultMap> <select id="findDataGrid" resultMap="BaseResultMap" parameterType="com.mzj.model.BizGovInfo"> select * from BIZ_GOV_INFO t <where> <if test="id != null and id !='' "> t.id = #{id} </if> </where> </select> </mapper>追问主要是不想返回一个对象。查询结果就是一个字段。可以请教一下为什么不能像resultType="String"一样,写resultType="oracle.sql