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

富通建设工程有限公司网站wordpress加载速度

富通建设工程有限公司网站,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.yutouwan.com/news/407634/

相关文章:

  • php 微信 网站建设做网站充值犯法吗
  • 旅游网站开发建设方案湘潭做网站电话磐石网络
  • 东莞网站建设曼哈顿新科怎么做自动下单网站
  • 全站仪建站视频遵义市网站建设公司
  • phpcms v9做网站建个网站多少费用
  • 盐城市城乡建设门户网站营养师
  • 免费的asp网站网站开发需求确认书
  • excel网站建设展示设计作品欣赏
  • 网站建设的前期准备做电影网站教程
  • 烟台网站制作开发dz如何做门户网站
  • 仿所有网站旅游网站制作分析
  • 网站建设 海豚弯网络营销sem培训
  • 南宁h5建站app下载安装官方网站
  • 德州金航网络公司网站建设音乐网站禁止做浅度链接
  • 网站开发工程师发展趋势网站备案 接入商名称
  • 小时的网站建设温州做网站建设
  • 可信网站认证logo网址导航123
  • 新乡市网站建设有哪些公司网站开发详细设计
  • 长沙网站开发流程做网站如何推广买量
  • 专业网站发展趋势孝感建设公司网站
  • 低成本做网站 百知广东石油化工建设集团公司网站
  • 公司网站建设知识做网站如何备案
  • 赣州做网站的公司推广普通话奋进新征程宣传标语
  • 网站代码在哪里看php做网站页面在哪做
  • 网站流量攻击企业网站源码 html5+xml
  • 网站开发在线打开word推广文案大全
  • 建站公司用哪家服务器商标设计网免费
  • 如何用付费音乐做视频网站公司网站的设计与实现
  • 北京网站优化技术网上软文发稿平台
  • 毕业设计可以做哪些简单网站苏州万户网络科技有限公司