From 594563629a879d0ae6af2a3bda7eba1c8b3f9fbb Mon Sep 17 00:00:00 2001 From: xiejun <xj@2023> Date: 星期五, 13 十月 2023 12:23:55 +0800 Subject: [PATCH] 接口免密登录获取缓存租户接口. --- Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/StatusServiceImpl.java | 47 ++++++++++++++++++++++++++++++++++------------- 1 files changed, 34 insertions(+), 13 deletions(-) diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/StatusServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/StatusServiceImpl.java index 5193ccc..d87ce3d 100644 --- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/StatusServiceImpl.java +++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/StatusServiceImpl.java @@ -1,17 +1,20 @@ package com.vci.ubcs.omd.service.impl; import com.alibaba.cloud.commons.lang.StringUtils; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.vci.ubcs.omd.constant.BtmTypeConstant; -import com.vci.ubcs.omd.entity.Status; -import com.vci.ubcs.omd.mapper.StatusMapper; +import com.vci.ubcs.omd.entity.*; +import com.vci.ubcs.omd.mapper.*; import com.vci.ubcs.omd.service.IStatusService; +import com.vci.ubcs.omd.vo.BtmTypeVO; import com.vci.ubcs.omd.vo.StatusVO; +import com.vci.ubcs.omd.wrapper.BtmTypeWrapper; +import com.vci.ubcs.omd.wrapper.LifeCycleRuleWrapper; import com.vci.ubcs.omd.wrapper.StatusWrapper; import com.vci.ubcs.starter.exception.VciBaseException; -import com.vci.ubcs.starter.web.pagemodel.PageHelper; import com.vci.ubcs.starter.web.util.BeanUtil; import com.vci.ubcs.starter.web.util.VciBaseUtil; import org.springblade.core.mp.support.Condition; @@ -22,6 +25,7 @@ import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; +import javax.annotation.Resource; import java.util.*; import java.util.regex.Pattern; import java.util.stream.Collectors; @@ -36,7 +40,10 @@ public class StatusServiceImpl extends ServiceImpl<StatusMapper, Status> implements IStatusService { private final String REGEXP = "^[A-Za-z]+$"; - + @Resource + private BtmTypeMapper btmTypeMapper; + @Resource + private LifeCycleNodeMapper lifeCycleNodeMapper; /** * 鑾峰彇鐘舵�佸垪琛� * @@ -46,14 +53,8 @@ * @throws VciBaseException 鏌ヨ鍑洪敊鏃朵細鎶涘嚭寮傚父 */ @Override - public IPage<StatusVO> listStatus(Map<String, String> conditionMap, PageHelper pageHelper) throws VciBaseException { - Query query = new Query(); - query.setCurrent(pageHelper.getPage()); - query.setSize(pageHelper.getLimit()); - query.setAscs("id"); - Status queryVO = new Status(); - BeanMap.create(queryVO).putAll(conditionMap); - return StatusWrapper.build().pageVO(baseMapper.selectPage(Condition.getPage(query), Condition.getQueryWrapper(queryVO).lambda().orderByAsc(Status::getId))); + public IPage<StatusVO> listStatus(Map<String, Object> conditionMap, Query pageHelper) throws VciBaseException { + return StatusWrapper.build().pageVO(baseMapper.selectPage(Condition.getPage(pageHelper), Condition.getQueryWrapper(conditionMap,Status.class).lambda().orderByAsc(Status::getId))); } /** @@ -203,7 +204,10 @@ Collection<Collection<String>> idCollections = VciBaseUtil.switchCollectionForOracleIn(idCollection); if(!CollectionUtils.isEmpty(idCollections)) { idCollections.forEach(s -> { - List<Status> queryResult = baseMapper.selectList(Wrappers.<Status>query().lambda().in(Status::getId,s)); + QueryWrapper<Status> wrapper = new QueryWrapper<>(); + wrapper.in("id",s); + List<Status> queryResult = baseMapper.selectList(wrapper); + if(!CollectionUtils.isEmpty(queryResult)){ statusDOList.addAll(queryResult); } @@ -456,4 +460,21 @@ public boolean checkStatusUsed(String pkStatus) throws VciBaseException { return false; } + + /** + * 鏌ョ湅搴旂敤鑼冨洿 + * + * @param id id + * @return 鎵ц缁撴灉 + */ + @Override + public List<BtmTypeVO> getApplyRange(String id) { + VciBaseUtil.alertNotNull(id,"鐘舵�佽嫳鏂囧悕绉�"); + List<LifeCycleNode> selectList = lifeCycleNodeMapper.selectList(Wrappers.<LifeCycleNode>query().lambda().eq(LifeCycleNode::getId,id)); + List<String>lifeCycleOidList = new ArrayList<>(); + if(!CollectionUtils.isEmpty(selectList)){ + lifeCycleOidList = selectList.stream().map(LifeCycleNode::getLifeCycleOid).collect(Collectors.toList()); + } + return BtmTypeWrapper.build().listEntityVO(btmTypeMapper.selectList(Wrappers.<BtmType>query().lambda().in(BtmType::getOid,lifeCycleOidList))); + } } -- Gitblit v1.9.3