美文网首页
Springboot 技术整合--笔记2-4--mybatis可

Springboot 技术整合--笔记2-4--mybatis可

作者: 牵手生活 | 来源:发表于2019-06-26 15:13 被阅读0次
    @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>"
    )
    
    image.png

    相关文章

      网友评论

          本文标题:Springboot 技术整合--笔记2-4--mybatis可

          本文链接:https://www.haomeiwen.com/subject/eupccctx.html