摘要: 1.if+where <select id="getgoods" resultType="Goods" > select * from goods <where> <if test="name!=null and name!=' ' "> and name concat('%',#{name},'% 阅读全文
posted @ 2017-11-12 21:43 暴走耶哈 阅读(682) 评论(0) 推荐(0) 编辑
摘要: 映射文件的sql属性: id:标识符(一般都是dao层方法名) resultType:sql返回类型 resultMap:放回的映射类型 parameterType:参数类型 useGeneratedKeys="true" keyProperty="id":执行完添加操作放回最后一次自增长id(备注 阅读全文
posted @ 2017-11-12 17:54 暴走耶哈 阅读(1354) 评论(0) 推荐(0) 编辑
摘要: mybatis核心配置文件 <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"> <configuration> <prop 阅读全文
posted @ 2017-11-12 16:35 暴走耶哈 阅读(110) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2017-11-12 16:29 暴走耶哈 阅读(0) 评论(0) 推荐(0) 编辑