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

2019-06-26  本文已影响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
上一篇下一篇

猜你喜欢

热点阅读