@Insert("<script>" +
"insert into user_info " +
"<trim prefix='(' suffixOverrides=',' suffix= ') values '>"+
"<if test='userInfoId != null'>" + " user_info_id," + "</if>" +
"<if test='wxName != null'>" + " wx_name," + "</if>" +
"<if test='wxId != null'>" + " wx_id," + "</if>" +
"<if test='wxHead != null'>" + " wx_head," + "</if>" +
"<if test='shopType != null'>" + " shop_type," + "</if>" +
"<if test='userName != null'>" + " username," + "</if>" +
"<if test='sex != null'>" + " sex," + "</if>" +
"<if test='shopName != null'>" + " shop_name," + "</if>" +
"<if test='tel != null'>" + " tel," + "</if>" +
"<if test='address != null'>" + " address," + "</if>" +
"<if test='shopNumber != null'>" + " shop_number," + "</if>" +
"<if test='shopImg != null'>" + " shop_img," + "</if>" +
"<if test='businessLicenseImg != null'>" + " business_license_img," + "</if>" +
"</trim>"+
"<trim prefix='(' suffixOverrides=',' suffix= ')'>"+
"<if test='userInfoId != null'>" + " #{userInfoId}," + "</if>" +
"<if test='wxName != null'>" + " #{wxName}," + "</if>" +
"<if test='wxId != null'>" + " #{wxId}," + "</if>" +
"<if test='wxHead != null'>" + " #{wxHead}," + "</if>" +
"<if test='shopType != null'>" + " #{shopType}," + "</if>" +
"<if test='userName != null'>" + " #{userName}," + "</if>" +
"<if test='sex != null'>" + " #{sex}," + "</if>" +
"<if test='shopName != null'>" + " #{shopName}," + "</if>" +
"<if test='tel != null'>" + " #{tel}," + "</if>" +
"<if test='address != null'>" + " #{address}," + "</if>" +
"<if test='shopNumber != null'>" + " #{shopNumber}," + "</if>" +
"<if test='shopImg != null'>" + " #{shopImg}," + "</if>" +
"<if test='businessLicenseImg != null'>" + " #{businessLicenseImg}," + "</if>" +
"</trim>"+
"</script>"
)
Springboot 技术整合--笔记2-4--mybatis可选参数
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 关键步骤 数据库脚本表或查询对应的pojo实现表或查询对应的Mapper单元测试&运行表或查询的Mapper对应的...
- 前言 继续Springboot5 开发常用技术整合--笔记 涉及到的知识点 用navicat创建mysq数据库及表...
- 官网&技术资料 MyBatis-plus官方文档&代码生成器文档--负责人baomidou mybatis-plu...
- Springboot整合定时任务Task 涉及到的知识点 @EnableScheduling //开启定时任务@S...