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

电影里的做视频在线观看网站软文网站推广

电影里的做视频在线观看网站,软文网站推广,网站建设的维护工作,你做网站群好朋友的作文1.删除主表相关子表所有记录 2.再保存一次前端传来的记录 3.如果子表是通过先生成空记录,再put修改模式,可以在执行1和2两步后再拿模板集合和当前现有子表集合套两个for循环对比判断,count记录模板记录和子表记录每次循环重合次数&#xff…

1.删除主表相关子表所有记录

2.再保存一次前端传来的记录

3.如果子表是通过先生成空记录,再put修改模式,可以在执行1和2两步后再拿模板集合和当前现有子表集合套两个for循环对比判断,count记录模板记录和子表记录每次循环重合次数,当发送现有子表中没有模板的情况,也就是count==0,就在一层循环再创建一个模板对象,达到效果:原有空记录不会因为进来时全删除的操作而抹去,因为空记录是页面动态效果的一部分

    /*** 更新** @param documentEntities* @return*/@PutMapping("/reference/{projectStageId}/{typeListCode}")@Transactional@Operation(summary = "更新")public ActionResult referenceUpdate(@PathVariable String projectStageId,@RequestBody @Valid List<DocumentListVO> documentEntities ) throws DataException {UserInfo userInfo = userProvider.get();//删除原有所有记录LambdaQueryWrapper<ListDocumentFileEntity> wrapper = new LambdaQueryWrapper<>();wrapper.eq(ListDocumentFileEntity::getProjectStageId,projectStageId);List<ListDocumentFileEntity> 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);}}}//获取空记录的模板与现在的子表记录对比,如果缺了空记录就补充空记录List<ListTemplate1Entity> listByTypeCode = listTemplate1Service.getListByTypeCode(typeListCode);List<ListDocumentFileEntity> list2 = listDocumentFileService.list(wrapper);for (ListTemplate1Entity listTemplate1Entity : listByTypeCode) {int integer = 0;for (ListDocumentFileEntity documentFile : list2) {if (documentFile.getFileType().equals(listTemplate1Entity.getFileType())){integer++;}}if (integer==0){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}")@Transactional@Operation(summary = "更新")public ActionResult referenceUpdate(@PathVariable String projectStageId,@RequestBody @Valid List<DocumentListVO> documentEntities ) throws DataException {UserInfo userInfo = userProvider.get();//删除原有所有记录LambdaQueryWrapper<ListDocumentFileEntity> wrapper = new LambdaQueryWrapper<>();wrapper.eq(ListDocumentFileEntity::getProjectStageId,projectStageId);List<ListDocumentFileEntity> 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 (integer==0){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.shuangfujiaoyu.com/news/52488.html

相关文章:

  • 汉堡只做网站青岛网站推广系统
  • 夜晚很晚视频免费素材网站全国疫情防控最新数据
  • 南京做征信服务的公司网站百度一下手机版网页
  • 网站的售后服务互联网营销具体做什么
  • 电子商务基础网站建设与维护单项选择题2022网络热词30个
  • 27寸显示器网站建设大数据获客系统
  • 品牌型网站制作哪湖南网站设计
  • 网站黑链怎么做的南宁网站建设服务公司
  • 专业的网站开发建设文案代写
  • 网站设计需要学什么软件seo互联网营销培训
  • 做淘宝客为什么要建网站长沙优化科技有限公司正规吗
  • 网站关键词设几个手机网络优化
  • wordpress如何设置用户登陆公司网站怎么优化
  • b2b免费发布企业网站大全百度推广客户端app
  • 做网站的图片需要多少钱网络营销的概念和特点是什么
  • 学习做网站的孛校网推资源渠道
  • 福州网站制作建设南宁关键词优化软件
  • 淘宝的好券网站怎么做百度手机助手app安卓版官方下载
  • 谁可以做网站优化排名推广餐饮培训
  • 做网站的费用怎么做账揭阳百度快照优化排名
  • 网站怎样制作 优帮云淘宝补流量平台
  • 凡科做 淘宝客网站如何做网络营销推广
  • 怎么做可以访问网站产品推广文章
  • 炫酷网站界面设计公司网站建设北京
  • 上海工程技术大学金华seo扣费
  • 百度容易收录哪些网站今日新闻最新头条
  • 大网站有哪些网上推广产品哪个网好
  • 自适应手机网站 css2021最近比较火的营销事件
  • 京粉购物网站怎么做网站seo优化外包
  • 北京网站大全平台推广策略都有哪些