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

网站开发是什么环境wordpress 头条采集

网站开发是什么环境,wordpress 头条采集,做网站美工的前途怎么样,网站建设中的风险风险1.删除主表相关子表所有记录 2.再保存一次前端传来的记录 3.如果子表是通过先生成空记录#xff0c;再put修改模式#xff0c;可以在执行1和2两步后再拿模板集合和当前现有子表集合套两个for循环对比判断#xff0c;count记录模板记录和子表记录每次循环重合次数#xff…1.删除主表相关子表所有记录 2.再保存一次前端传来的记录 3.如果子表是通过先生成空记录再put修改模式可以在执行1和2两步后再拿模板集合和当前现有子表集合套两个for循环对比判断count记录模板记录和子表记录每次循环重合次数当发送现有子表中没有模板的情况也就是count0就在一层循环再创建一个模板对象达到效果原有空记录不会因为进来时全删除的操作而抹去因为空记录是页面动态效果的一部分 /*** 更新** param documentEntities* return*/PutMapping(/reference/{projectStageId}/{typeListCode})TransactionalOperation(summary 更新)public ActionResult referenceUpdate(PathVariable String projectStageId,RequestBody Valid ListDocumentListVO documentEntities ) throws DataException {UserInfo userInfo userProvider.get();//删除原有所有记录LambdaQueryWrapperListDocumentFileEntity wrapper new LambdaQueryWrapper();wrapper.eq(ListDocumentFileEntity::getProjectStageId,projectStageId);ListListDocumentFileEntity list listDocumentFileService.list(wrapper);listDocumentFileService.removeBatchByIds(list);//新增此次传来的记录for (DocumentListVO drawingListVO : documentEntities) {for (DocumentVO documentVO : drawingListVO.getChildren()) {ListDocumentFileEntity documentFile new ListDocumentFileEntity(RandomUtil.uuId(),drawingListVO.getProjectStageId(),drawingListVO.getTypeListCode(),drawingListVO.getFSort(),drawingListVO.getFileType(),null,documentVO.getDocumentNumber(), documentVO.getIssuanceDate(),0,userInfo.getUserName(), DateTime.now(),null,null,null,documentVO.getFileId(),documentVO.getSequence(),documentVO.getFileName());if (listDocumentFileService.getInfo(documentVO.getId())null){listDocumentFileService.save(documentFile);}else {documentFile.setId(documentVO.getId());listDocumentFileService.updateById(documentFile);}}}//获取空记录的模板与现在的子表记录对比如果缺了空记录就补充空记录ListListTemplate1Entity listByTypeCode listTemplate1Service.getListByTypeCode(typeListCode);ListListDocumentFileEntity list2 listDocumentFileService.list(wrapper);for (ListTemplate1Entity listTemplate1Entity : listByTypeCode) {int integer 0;for (ListDocumentFileEntity documentFile : list2) {if (documentFile.getFileType().equals(listTemplate1Entity.getFileType())){integer;}}if (integer0){ListDocumentFileEntity listDocumentFileEntity new ListDocumentFileEntity();listDocumentFileEntity.setId(RandomUtil.uuId());listDocumentFileEntity.setProjectStageId(projectStageId);listDocumentFileEntity.setFileType(listTemplate1Entity.getFileType());listDocumentFileEntity.setTypeListCode(listTemplate1Entity.getListTypeCode());listDocumentFileEntity.setFSort(listTemplate1Entity.getFSort());listDocumentFileEntity.setRemark(listTemplate1Entity.getRemark());listDocumentFileEntity.setRequired(listTemplate1Entity.getRequired());listDocumentFileService.save(listDocumentFileEntity);}}return ActionResult.success(更新成功);}方法二 后来想了下直接在第一次的时候判断有没有生成模板的记录如果没生成就生一个这样就避免了第二次遍历 /*** 编辑** param documentEntities* return*/PutMapping(/reference/{projectStageId})TransactionalOperation(summary 更新)public ActionResult referenceUpdate(PathVariable String projectStageId,RequestBody Valid ListDocumentListVO documentEntities ) throws DataException {UserInfo userInfo userProvider.get();//删除原有所有记录LambdaQueryWrapperListDocumentFileEntity wrapper new LambdaQueryWrapper();wrapper.eq(ListDocumentFileEntity::getProjectStageId,projectStageId);ListListDocumentFileEntity list listDocumentFileService.list(wrapper);listDocumentFileService.removeBatchByIds(list);//新增此次传来的记录for (DocumentListVO drawingListVO : documentEntities) {int integer 0;for (DocumentVO documentVO : drawingListVO.getChildren()) {ListDocumentFileEntity documentFile new ListDocumentFileEntity(RandomUtil.uuId(),drawingListVO.getProjectStageId(),drawingListVO.getTypeListCode(),drawingListVO.getFSort(),drawingListVO.getFileType(),null,documentVO.getDocumentNumber(), documentVO.getIssuanceDate(),0,userInfo.getUserName(), DateTime.now(),null,null,null,documentVO.getFileId(),documentVO.getSequence(),documentVO.getFileName());if (listDocumentFileService.getInfo(documentVO.getId())null){listDocumentFileService.save(documentFile);integer;}}//没有就生一个if (integer0){ListDocumentFileEntity listDocumentFileEntity new ListDocumentFileEntity();listDocumentFileEntity.setId(RandomUtil.uuId());listDocumentFileEntity.setProjectStageId(projectStageId);listDocumentFileEntity.setFileType(drawingListVO.getFileType());listDocumentFileEntity.setTypeListCode(drawingListVO.getTypeListCode());listDocumentFileEntity.setFSort(drawingListVO.getFSort());listDocumentFileEntity.setRemark(null);listDocumentFileEntity.setRequired(null);listDocumentFileService.save(listDocumentFileEntity);}}return ActionResult.success(更新成功);} 摸鱼的同志可以看看代码很粗糙应该只是思维符合很多人但实际情况几乎不符
http://www.pierceye.com/news/459281/

相关文章:

  • 二手网站专业做附近人的有吗免费申请网站永久
  • 校园二手市场网站开发网站文章优化流程方案
  • 手机网站的必要性衡水网站设计费用
  • 厦门市建设安全管理协会网站网站登录模板下载
  • 江苏启安建设集团有限公司网站wordpress图标字体不显示不出来
  • 网络营销网站规划建设实训作业免费云空间
  • 杭州建设网站官网想学做宝宝食谱上什么网站
  • 用自己服务器做网站乡镇信息公开网站建设制度
  • 网站建设平台简介电子商务网站模版
  • 广州做网站怎么样安监网站如何做紧急预案备案
  • 自己做的网站怎样才有网址浏览oa软件多少钱一套
  • 旅游电子商务网站的建设深圳华强北赛格大厦最新消息
  • 视觉设计网站建设有没有做.net面试题的网站
  • 上海资格证报名网站惠州抖音seo
  • 网页设计作品html辽宁做网站和优化哪家好
  • 做门户网站 cms山东济南网站建设优化
  • 网站美工怎么做wordpress论坛化插件
  • 怎样建设自己的视频网站首页电子商务网站开发教程论文6
  • 推荐一个做照片书的网站湛江网站建设招聘
  • 厦门建网站网址ai自动设计logo
  • 蓝色织梦cms企业网站模板全站源码招聘类网站如何做
  • 郑州建设银行网站wordpress数据库怎么设置
  • 电子商务网站实例php网站建设哪家好
  • 网站开发课程报告心得简单的网页设计作品欣赏
  • 网站建设用什么系统华为弹性云做网站
  • 莱芜高端网站建设报价网站色彩策划
  • 房地产项目网站做网站互联网公司有哪些
  • 凡科做网站友情链接怎么做wordpress广告位设置
  • org已经备案的网站wap网站建设服务
  • 企业网站模板免费下载企业网站模板免费完整版的网站模板