mybatis 通过实体类进行查询

如果使用实体类进行查询, 不管会不会使用到 主键, 都必须设置主键, 才能查询

<select id="selectByAppidAndServerCode" resultMap="BaseResultMap" parameterType="com.ictpaas.pojo.AppidAppkey">
      select * from t_appid_appkey where server_code = #{serverCode} and appkey = #{appkey}
  </select>

猜你喜欢

转载自www.cnblogs.com/huanggy/p/9693202.html