mapper的前后缀
- <insert id="insert" parameterType="com.tortuousroad.groupon.cart.entity.Cart">
- insert into cart
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="userId != null">
- user_id,
- </if>
- <if test="dealId != null">
- deal_id,
- </if>
- <if test="dealSkuId != null">
- deal_sku_id,
- </if>
- <if test="count != null">
- count,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="updateTime != null">
- update_time,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=BIGINT},
- </if>
- <if test="userId != null">
- #{userId,jdbcType=BIGINT},
- </if>
- <if test="dealId != null">
- #{dealId,jdbcType=BIGINT},
- </if>
- <if test="dealSkuId != null">
- #{dealSkuId,jdbcType=BIGINT},
- </if>
- <if test="count != null">
- #{count,jdbcType=INTEGER},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- suffixOverrides=","
执行的sql语句也许是这样的:insert into cart (id,user_id,deal_id,) values(1,2,1,);显然是错误的
mapper的前后缀的更多相关文章
- codeforces 579D D. "Or" Game(前后缀+贪心)
题目链接: D. "Or" Game time limit per test 2 seconds memory limit per test 256 megabytes input ...
- Objective-C 【NSString-字符串比较&前后缀检查及搜索】
———————————————————————————————————————————NSString 字符串比较 #import <Foundation/Foundation.h> vo ...
- poj 2752 Seek the Name, Seek the Fame【KMP算法分析记录】【求前后缀相同的子串的长度】
Seek the Name, Seek the Fame Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 14106 Ac ...
- [LeetCode] Prefix and Suffix Search 前后缀搜索
Given many words, words[i] has weight i. Design a class WordFilter that supports one function, WordF ...
- Hibernate给表和字段设置前后缀及分隔符
在<一口一口吃掉Hibernate(一)--使用SchemaExport生成数据表>中介绍了如何生成数据表.但是这只是最基本的.hibernate在生成或者操作数据库时,会受一些限制.比如 ...
- HDU 2594(求最长公共前后缀 kmp)
题意是在所给的两个字符串中找最长的公共前后缀,即第一个字符串前缀和第二个字符串后缀的最长相等串. 思路是将两个字符串拼接在一起,然后直接套用 kmp 算法即可. 要注意用 next 会报编译错误,改成 ...
- poj 2752 求一个字符串所有的相同前后缀
求一个字符串所有的相同前后缀Sample Input ababcababababcababaaaaaSample Output 2 4 9 181 2 3 4 5 #include <iostr ...
- HDU 2594 最长相同前后缀
Sample Inputclintonhomerriemannmarjorie Sample Output0rie 3 输入两个字符串 ,求最长相同前后缀直接把两个字符串连接在一起求next就行了,唯 ...
- python 删除2天前后缀为.log的文件
python脚本 删除2天前后缀为.log的文件 #!/usr/local/python/bin/python #-*-coding=utf8 -*- import time import os,sy ...
随机推荐
- 下落的树叶 (The Falling Leaves UVA - 699)
题目描述: 原题:https://vjudge.net/problem/UVA-699 题目思路: 1.依旧二叉树的DFS 2.建树过程中开个数组统计 //紫书源代码WA AC代码: #include ...
- 十分钟掌握pandas(pandas官方文档翻译)
十分钟掌握pandas 文档版本:0.20.3 这是一个对pandas简短的介绍,适合新用户.你可以在Cookbook中查看更详细的内容. 通常,我们要像下面一样导入一些包. In [1]: impo ...
- leetcode个人题解——#15 3sums
class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { sor ...
- POJ 3714 Raid(计算几何の最近点对)
Description After successive failures in the battles against the Union, the Empire retreated to its ...
- js随机数算法
function rnd( seed ){ seed = ( seed * 9301 + 49297 ) % 233280; //为何使用这三个数? return seed / ( 233280.0 ...
- 声明变量&定义变量
从编译原理上来说,声明是仅仅告诉编译器,有个某类型的变量会被使用,但是编译器并不会为它分配任何内存.而定义就是分配了内存.这对于以关键字extern进行声明是一定成立的,而对声明格式“ ...
- Thunder团队第一次Scrum会议
Scrum会议1 小组名称:Thunder 项目名称:待定 参会成员: 王航(Master):http://www.cnblogs.com/wangh013/ 李传康:http://www.cnblo ...
- activiti工作流已办和待办查询sql
最近项目中遇到一个问题,需要activiti的工作流表和业务表关联分页查询,然而我对于工作流的查询并不太熟悉,所以学习并总结如下. 想看看activiti到底怎么查询的待认领和待办.已办的查询sql, ...
- c#笔记整理 关于继承与多态等
[ 塔 · 第 二 条 约 定 ] c#面向对象基础 整理private.protected.public.abstract等的异同 public 公有访问.不受任何限制. private 私有访问. ...
- 《剑指offer》---顺时针打印矩阵
本文算法使用python3实现 1. 问题1 1.1 题目描述: 输入一个矩阵,按照从外向里以顺时针的顺序依次打印出每一个数字,例如,如果输入如下矩阵: 1 2 3 4 5 6 7 8 9 10 ...