這是接口里的方法:public?List<BlogrollEntity>?selectByTitle(String?bTitle);? ? 這是上面方法對應的sql:<select id="selectByTitle" resultMap="BaseResultMap" parameterType="java.lang.String">? ? ? ? select? ? ? ? <include refid="Base_Column_List" />? ? ? ? from blogroll? ? ? ? where b_title = #{bTitle,jdbcType=VARCHAR}? ? </select>為什么第五行要加jdbcType=VARCHAR?還有映射文件里下面這段為什么都要加jdbcType=****?<resultMap id="BaseResultMap" type="com.portalManager.web.model.Entity.BlogrollEntity">? ? ? ? <id column="id" property="id" jdbcType="VARCHAR" />? ? ? ? <result column="b_title" property="bTitle" jdbcType="VARCHAR" />? ? ? ? <result column="b_url" property="bUrl" jdbcType="VARCHAR" />? ? ? ? <result column="b_details" property="bDetails" jdbcType="VARCHAR" />? ? ? ? <result column="b_create_time" property="bCreateTime" jdbcType="VARCHAR" />? ? ? ? <result column="b_is_deleted" property="bIsDeleted" jdbcType="BIGINT" />? ? ? ? <result column="b_web_code" property="bWebCode" jdbcType="VARCHAR" />? ? </resultMap>
添加回答
舉報
0/150
提交
取消