From a472fa1f44b9976ce7e2b502814b130ec72e0f29 Mon Sep 17 00:00:00 2001 From: yuxc <653031404@qq.com> Date: 星期三, 19 七月 2023 11:31:11 +0800 Subject: [PATCH] 1、主要解决在批量插入的时候通过业务类型去获取字段信息,对比字段没有的则不进行插入。 --- Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/wrapper/DeptWrapper.java | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/wrapper/DeptWrapper.java b/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/wrapper/DeptWrapper.java index f1d71a2..2a64087 100644 --- a/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/wrapper/DeptWrapper.java +++ b/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/wrapper/DeptWrapper.java @@ -16,6 +16,9 @@ */ package com.vci.ubcs.system.wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.vci.ubcs.common.utils.PageDO2PageVO; import org.springblade.core.mp.support.BaseEntityWrapper; import org.springblade.core.tool.constant.BladeConstant; import org.springblade.core.tool.node.ForestNodeMerger; @@ -75,4 +78,14 @@ return ForestNodeMerger.merge(collect); } + public IPage<DeptVO> pageNodeLazyVO(IPage<DeptVO> page) { + List<DeptVO> deptVOS = page.getRecords().stream().peek(dept -> { + String category = DictCache.getValue(DictEnum.ORG_CATEGORY, dept.getDeptCategory()); + Objects.requireNonNull(dept).setDeptCategoryName(category); + }).collect(Collectors.toList()); + List<DeptVO> list = ForestNodeMerger.merge(deptVOS); + page.setRecords(list); + return page; + } + } -- Gitblit v1.9.3