其他
MyBatis 真坑!Integer 类型赋值 0 ,当 != '' 时无法通过判断执行 SQL 语句
开发微信小程序“Java精选面试题”后台管理系统时,遇到根据状态判断是或否发布。
<update id="updateWarehouse" parameterType="Warehouse">
update t_warehouse
<set>
<if test="title != null and title != ''">title = #{title},</if>
<if test="code != null and code != ''">code = #{code},</if>
<if test="content != null and content != ''">content = #{content},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="parentId != null and parentId != ''">parentId = #{parentId}</if>
</set>
where id = #{id}
</update>
<if test="status != null and status != ''">status = #{status},</if>
<update id="updateWarehouse" parameterType="Warehouse">
update t_warehouse
<set>
<if test="title != null and title != ''">title = #{title},</if>
<if test="code != null and code != ''">code = #{code},</if>
<if test="content != null and content != ''">content = #{content},</if>
<if test="status != null">status = #{status},</if>
<if test="parentId != null and parentId != ''">parentId = #{parentId}</if>
</set>
where id = #{id}
</update>
Spring 中 IService 有多个实现类,它是如何知道该注入哪个 ServiceImpl 类?
Spring Boot 框架中实现跨域访问的五种解决方案,你懂了吗?
面试官问:导致 Spring 事务失效的场景有哪些,如何解决失效问题?
推荐 IntelliJ IDEA 特别“养眼”的主题插件,这几款超赞,总有一款适合你!
京东面试官问:LEFT JOIN 关联表中用 ON 还是 WHERE 跟条件有什么区别?
还在用 System.out.println("") 输出日志到控制台吗?那么太 Low 了!