随笔分类 - mybatis
摘要:mapper.xml 简化技巧insert 可复用 <sql id="setField"> <set> <if test="taskVersionId != null">task_version_id = #{taskVersionId},</if> <if test="uid != null">u
阅读全文
摘要:1. Orace 存在更新,不存在插入的写法 【MERGE INTO】-【when not matched then insert】-【when matched then update】 <insert id="updateUserRole" > MERGE INTO SVC_ROLE_USER R
阅读全文
摘要:1.我们希望返回的实体对象结构如下: @Data public class OrderPaymentInfoRetDTO { private Integer id;//id字段必须要写,他作为过层级1对多的重要滤条件存在的 RespOrderListDTO respOrderListDTO;//一个
阅读全文
摘要:在事务发生错误时进行异常回滚,而且,Spring会将产生的MyBatis异常转换成适当的 DataAccessExceptions,从而提供具体的异常信息。
阅读全文

浙公网安备 33010602011771号