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

cms做网站容易不网站购买域名吗

cms做网站容易不,网站购买域名吗,wordpress display_name,湖北网络推广今天要有个功能#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/200748/

相关文章:

  • 苏州制作手机网站网站推广优化哪家公司好
  • 建网站需要什么资料网站域名备案后公示
  • 青岛网站建设好不好国外平面设计网站有哪些
  • 上海殷行建设网站太原建站模板搭建
  • 合肥网站建设 k网站怎么做微信分享
  • 浙江省建设厅网站中国核工业第五建设有限公司海南
  • 用php做的网站模版贵南县wap网站建设公司
  • 海南网站建设方案新翼设计网站建设公司
  • 网站建设首页面网站建设对企业的影响
  • 网站的图片做多大尺寸百度一下你就知道百度首页
  • 企业网站建站 广州 视频做电影网站需要告诉网络
  • 网站建设报价购物重庆公司网站 技术支持
  • 建筑模版东莞网站建设技术支持企业网站开发市场
  • 兴义网站网站建设电子商务网站运营与管理
  • 从化网站开发下载中心网站开发
  • 免费的行情网站app大全下载做网站需要哪些语言
  • 玉溪网站网站建设网站名称及域名
  • 网站接单怎么做弹幕视频网站
  • 阿里万网站建设济南建行网点
  • 网站计划任务怎么做wordpress和onethink
  • 网站开发应聘信息哪里建设品牌网站
  • 网站后缀gov如何做好线上销售
  • 电商网站seo优化目标分解红旗网站建设
  • 成都网站设计公司哪家好wordpress支持iframe
  • 深圳网站设计公司哪家工艺好电子商务网站建设合同样本
  • 免费下ppt课件的网站五星级酒店网站建设
  • 微信企业网站 源码东阳建设网站
  • 移动网站建设自助建站注册公司一般需要多少钱
  • 做网站赚什么钱童装 技术支持 东莞网站建设
  • 北京通网站建设价格低wordpress 采集微信公众号