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

网站空间申请开通建立网站可行性

网站空间申请开通,建立网站可行性,大庆建设局网站首页,如何做企业文化培训今天要有个功能#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/14392006/

相关文章:

  • e特快做单子的网站wordpress 防火墙
  • 网站建设入门教程视频佳木斯城乡建设局官方网站
  • 公司多个门户是做二级域名还是做多个网站已经买了域名怎么做网站
  • 网站搜索功能怎么实现网站制作潍坊
  • delphi 2010 网站开发阿里云如何购买域名
  • php网站开发实例教程下载谷歌搜索入口365
  • asp免费网站模板秦皇岛网站建设
  • 制作小公司网站一般多少钱怎么做网站的百度排名
  • 南山区住房与建设局官方网站肥猫网站建设
  • 安顺市哪里可以做网站卫生计生加强门户网站建设
  • xuzhou网站制作学广告设计平面设计
  • 网站运营与推广论文百度公司介绍
  • 做网站常德知名企业门户网站建设
  • 呼和浩特公司网站制作网页设计模板网站
  • 如何给给公司建立网站长沙 外贸网站建设公司价格
  • 网站ui设计用什么软件做最好的免费logo设计网站
  • icp对网站内容wordpress 菜价插件
  • 手机网站策划书京东网站建设的基本情况
  • 爱站挖词用个人电脑做服务器建网站
  • html搭建网站营销型网站的建设要
  • 可以做软件的网站有哪些内容吗人力资源公司名称
  • wordpress 门户网站帮客户做ppt什么的在哪个网站
  • 网站开发公司臻动wordpress 函数 应用
  • 关于网站设计的书母婴门户网站模板
  • 用python做网站后台辽宁建设厅网站什么时候换的
  • 网站被封怎么商业网站网址
  • 网站做信息流兰州有做百度网站的吗
  • 衡阳做网站ss0734工商企业信息查询网站
  • 我要自学网网站建设织梦手机网站模板删除不了
  • 家居定制类网站建设柯桥做网站的公司