当前位置: 首页 > news >正文

南昌专业网站建设公司哪家好企业模板免费下载

南昌专业网站建设公司哪家好,企业模板免费下载,公司网站做百度推广需要交费吗,wordpress注册按钮今天要有个功能#xff0c;要进行一批数据的插入和修改#xff0c;为了不频繁调用数据库#xff0c;所以想到了批量插入和修改#xff0c;因为从毕业后#xff0c;就没写过批量插入和批量修改#xff0c;所以在这里记录一下#xff0c;避免后续再遇到忘记怎么写了 批量…今天要有个功能要进行一批数据的插入和修改为了不频繁调用数据库所以想到了批量插入和修改因为从毕业后就没写过批量插入和批量修改所以在这里记录一下避免后续再遇到忘记怎么写了 批量插入(传入的参数是List实体list) insert idinsertList keyColumnid keyPropertyid useGeneratedKeystrue parameterTypejava.util.Listinsert into xhs_collection_data (note_id,status,title,desc,time,user_id,nickname,liked_count,collected_count,comment_count,share_count,image_list,tag_list,batch_number,file_name) valuesforeach collectionlist separator, itemitem( #{item.noteId,jdbcTypeVARCHAR}, #{item.status,jdbcTypeINTEGER},#{item.title,jdbcTypeVARCHAR},#{item.desc,jdbcTypeVARCHAR},#{item.time,jdbcTypeTIMESTAMP},#{item.userId,jdbcTypeVARCHAR}, #{item.nickname,jdbcTypeVARCHAR},#{item.likedCount,jdbcTypeVARCHAR},#{item.collectedCount,jdbcTypeVARCHAR},#{item.commentCount,jdbcTypeTIMESTAMP},#{item.shareCount,jdbcTypeVARCHAR},#{item.imageList,jdbcTypeVARCHAR},#{item.tagList,jdbcTypeVARCHAR},#{item.batchNumber,jdbcTypeBIGINT},#{item.fileName,jdbcTypeVARCHAR})/foreach /insert批量修改(传入的参数是List实体list) sql原理语句update table set 要修改的表字段A case when 表字段 实体数据字段 then 实体数据字段 when 表字段 实体数据字段 then 实体数据字段 when … then… end, 要修改的表字段B case when 表字段 实体数据字段 then 实体数据字段 when 表字段 实体数据字段 then 实体数据字段 when … then… end where 条件 注意这里踩过一个坑因为当时不会写批量修改的语句所以让文心一言帮忙生成了一个批量修改的sql后续我忘记是不是手动给foreach标签手动加的separator“,”这个属性结果报错了排查了半天这个sql哪里错了最后还是放到数据库执行了一下看到了错误原因当时我还让温馨一样帮忙检查了下我修改后的sql结果还说没sql没问题只是可能在拼接时报错 update idupdateList parameterTypejava.util.Listupdate xhs_collection_datatrim prefixset suffixOverrides,trim prefixstatus case suffixend,foreach collectionlist indexindex itemitem when note_id #{item.noteId,jdbcTypeVARCHAR} then #{item.status,jdbcTypeINTEGER}/foreach/trimtrim prefixtitle case suffixend,foreach collectionlist indexindex itemitemwhen note_id #{item.noteId,jdbcTypeVARCHAR} then #{item.title,jdbcTypeVARCHAR}/foreach/trimtrim prefixdesc case suffixend,foreach collectionlist indexindex itemitemwhen note_id #{item.noteId,jdbcTypeVARCHAR} then #{item.desc,jdbcTypeVARCHAR}/foreach/trimtrim prefixtime case suffixend,foreach collectionlist indexindex itemitemwhen note_id #{item.noteId,jdbcTypeVARCHAR} then #{item.time,jdbcTypeTIMESTAMP}/foreach/trimtrim prefixuser_id case suffixend,foreach collectionlist indexindex itemitemwhen note_id #{item.noteId,jdbcTypeVARCHAR} then #{item.userId,jdbcTypeVARCHAR}/foreach/trimtrim prefixnickname case suffixend,foreach collectionlist indexindex itemitemwhen note_id #{item.noteId,jdbcTypeVARCHAR} then #{item.nickname,jdbcTypeVARCHAR}/foreach/trimtrim prefixliked_count case suffixend,foreach collectionlist indexindex itemitemwhen note_id #{item.noteId,jdbcTypeVARCHAR} then #{item.likedCount,jdbcTypeVARCHAR}/foreach/trimtrim prefixcollected_count case suffixend,foreach collectionlist indexindex itemitemwhen note_id #{item.noteId,jdbcTypeVARCHAR} then #{item.collectedCount,jdbcTypeVARCHAR}/foreach/trimtrim prefixcomment_count case suffixend,foreach collectionlist indexindex itemitemwhen note_id #{item.noteId,jdbcTypeVARCHAR} then #{item.commentCount,jdbcTypeVARCHAR}/foreach/trimtrim prefixshare_count case suffixend,foreach collectionlist indexindex itemitemwhen note_id #{item.noteId,jdbcTypeVARCHAR} then #{item.shareCount,jdbcTypeVARCHAR}/foreach/trimtrim prefiximage_list case suffixend,foreach collectionlist indexindex itemitemwhen note_id #{item.noteId,jdbcTypeVARCHAR} then #{item.imageList,jdbcTypeVARCHAR}/foreach/trimtrim prefixtag_list case suffixend,foreach collectionlist indexindex itemitemwhen note_id #{item.noteId,jdbcTypeVARCHAR} then #{item.tagList,jdbcTypeVARCHAR}/foreach/trimtrim prefixbatch_number case suffixend,foreach collectionlist indexindex itemitemif testitem.batchNumber ! nullwhen note_id #{item.noteId,jdbcTypeVARCHAR} then #{item.batchNumber,jdbcTypeBIGINT}/if/foreach/trimtrim prefixfile_name case suffixend,foreach collectionlist indexindex itemitemif testitem.fileName ! nullwhen note_id #{item.noteId,jdbcTypeVARCHAR} then #{item.fileName,jdbcTypeVARCHAR}/if/foreach/trim/trimwhere note_id inforeach close) collectionlist itemitem open( separator, #{item.noteId,jdbcTypeVARCHAR}/foreach /update
http://www.hkea.cn/news/14540279/

相关文章:

  • 东莞网站建设 织梦厦门企业网站公司
  • 商城类网站建设篇wordpress使用cdn图片不显示
  • 外语网站开发深圳建设网站
  • 北京中小型网站建设sem网站推广怎么做
  • 炉火建站好用的企业邮箱
  • 海口专业的网站开发陕西省建设工程信息网官网
  • 免费自助网站建站珲春建设局网站
  • 成都网站建设 城免费招聘网站招聘
  • 免费做网站app东莞网站建设-拥有多年专业
  • 网站出现 503怎么了线上代运营
  • 网站开发毕设答辩网站建设推广唯心磁遁8
  • 网站制作开发 杭州h5手机网站实例
  • 网站流量超标推荐几个安全免费的网站
  • 十大网站app软件介绍产品的营销推文
  • 绵阳高新区建设局网站谁告诉你j2ee是做网站的
  • 专业做网站推广的公司网站 服务器 带宽 估算 网站流量
  • 珠宝网站制作的理念企业网站开发制作费入那里
  • 企业站官方网站平面设计好找工作不
  • 青岛网站seo收费设计说明书模板
  • 宜昌做网站公司有哪些方法2008iis7建立网站
  • 临安网站seo网站建设全网营销
  • 响应式企业网站开发所用的平台智云鸟网站建设
  • 网站域名的分类wordpress多站点好吗
  • 怀化三中网站angularjs 做的网站
  • 网站架构设计师是做什么的个人网站备案备注
  • 洪涛怎么样海城市建设网站e语言可以做网站吗
  • 北京网站建设公司什么软件推广比较赚钱
  • wordpress sportsline太原seo代理商
  • 动漫做暧视频在线观看网站查询别人用的wordpress主题
  • 邢台网络公司网站建设ppt制作模板与素材免费下载