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

做网站给不给源代码老闵行是指哪里

做网站给不给源代码,老闵行是指哪里,百度关键词分析工具,wordpress 4.8教程今天要有个功能#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/14405287/

相关文章:

  • 网站建设要花多少钱毕业设计代做的网站
  • 网站开发总结简写wordpress菜谱主题
  • 贞丰县住房和城乡建设局网站建设工程合同包括
  • 友点企业网站管理系统忘记密码像芥末堆做内容的网站
  • 织梦自动生成手机网站门户网站建设技术要求
  • 学php网站开发多钱wordpress自动分类插件
  • 离职模板网重庆高端seo
  • WordPress的站内地图中文网站建设
  • 做棋牌网站建设哪家便宜安装网站模版视频
  • 做网站需要花费那方面的钱沭阳网站建设多少钱
  • 招聘网站入职分析表怎么做在中国如何推广外贸平台
  • 山东住房城乡建设部网站电商运营怎么做如何从零开始
  • 蒙城做网站制作网页用什么语言
  • 如何建设学校门户网站设计素材网站哪个好
  • 泰州企业做网站温州网站开发服务商
  • 做代理的网站如何做搞笑的视频视频网站
  • 如何在手机上搭建网站网站建设小组五类成员
  • 正规的网站建设工作室免费网站建设服务
  • 多品牌网站建设wordpress增加知识共享协议
  • 网站运营与管理实验报告设计方案构思和设计过程
  • 物流营销型网站案例平面设计需要用到的软件
  • 西安市城乡建设厅网站动画素材库免费下载
  • dw做网站的导航栏怎么做搭建网站 开源软件
  • 最基本的网络营销站点dede织梦做的网站 栏目页有切换js 怎么循环子栏目 调子栏目
  • 适用于手机的网站怎么建设国家高新区网站建设
  • 如何用wordpress建一个网站百度网站公司信息推广怎么做
  • 电商网站seo公司域名网站做优化外链
  • 如何自己做网站推广淘宝客从零开始网站开发
  • 手机网站生成app客户端东莞大岭山中学
  • 凡科平台网站怎么建设江阴公司做网站