From a3c7b3f7a4778a777a78a72c968b0e172488df03 Mon Sep 17 00:00:00 2001 From: yuxc <653031404@qq.com> Date: 星期二, 06 六月 2023 17:13:05 +0800 Subject: [PATCH] 1、对MDM服务的接口测试改动 --- Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeSrchCondConfigServiceImpl.java | 107 +++++++++++++++++++++++++++++++++++------------------ 1 files changed, 71 insertions(+), 36 deletions(-) diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeSrchCondConfigServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeSrchCondConfigServiceImpl.java index 320bb99..274b050 100644 --- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeSrchCondConfigServiceImpl.java +++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeSrchCondConfigServiceImpl.java @@ -1,14 +1,42 @@ package com.vci.ubcs.code.service.impl; +<<<<<<< Updated upstream +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +======= +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.vci.ubcs.code.entity.CodeShowFieldConfig; +>>>>>>> Stashed changes import com.vci.ubcs.code.entity.CodeSrchCondConfig; +import com.vci.ubcs.code.mapper.CodeShowFieldConfigMapper; import com.vci.ubcs.code.mapper.CodeSrchCondConfigMapper; +<<<<<<< Updated upstream +import com.vci.ubcs.code.service.ICodeSrchCondConfigService; +import com.vci.ubcs.code.vo.CodeSrchCondConfigVO; +import com.vci.ubcs.code.wrapper.CodeSrchCondConfigWraper; +======= import com.vci.ubcs.code.service.CodeSrchCondConfigService; +import com.vci.ubcs.code.vo.CodeSrchCondConfigVO; +import com.vci.ubcs.code.wrapper.CodeSrchCondConfigWraper; +import org.apache.cxf.endpoint.ServerImpl; +>>>>>>> Stashed changes import org.springframework.stereotype.Service; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.PageImpl; -import org.springframework.data.domain.PageRequest; +import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; +<<<<<<< Updated upstream +import java.util.List; +======= +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.function.Function; +>>>>>>> Stashed changes /** * 寮曠敤鐮佹锛屽弬鐓ч厤缃晫闈紝鏌ヨ鏉′欢閰嶇疆琛�(CodeSrchCondConfigService)琛ㄦ湇鍔″疄鐜扮被 @@ -17,34 +45,14 @@ * @since 2023-05-19 17:58:56 */ @Service("CodeSrchCondConfigService") -public class CodeSrchCondConfigServiceImpl implements CodeSrchCondConfigService { +<<<<<<< Updated upstream +public class CodeSrchCondConfigServiceImpl extends ServiceImpl<CodeSrchCondConfigMapper, CodeSrchCondConfig> implements ICodeSrchCondConfigService { +======= +public class CodeSrchCondConfigServiceImpl extends ServiceImpl<CodeSrchCondConfigMapper, CodeSrchCondConfig> implements CodeSrchCondConfigService { +>>>>>>> Stashed changes @Resource private CodeSrchCondConfigMapper codeSrchcondconfigMapper; - - /** - * 閫氳繃ID鏌ヨ鍗曟潯鏁版嵁 - * codeSrchcondconfig - * @param oid 涓婚敭 - * @return 瀹炰緥瀵硅薄 - */ - @Override - public CodeSrchCondConfig queryById(String oid) { - return this.codeSrchcondconfigMapper.queryById(oid); - } - - /** - * 鍒嗛〉鏌ヨ - * - * @param codeSrchcondconfig 绛涢�夋潯浠� - * @param pageRequest 鍒嗛〉瀵硅薄 - * @return 鏌ヨ缁撴灉 - */ - @Override - public Page<CodeSrchCondConfig> queryByPage(CodeSrchCondConfig codeSrchcondconfig, PageRequest pageRequest) { - long total = this.codeSrchcondconfigMapper.count(codeSrchcondconfig); - return new PageImpl<>(this.codeSrchcondconfigMapper.queryAllByLimit(codeSrchcondconfig, pageRequest), pageRequest, total); - } /** * 鏂板鏁版嵁 @@ -53,24 +61,42 @@ * @return 瀹炰緥瀵硅薄 */ @Override - public CodeSrchCondConfig insert(CodeSrchCondConfig codeSrchcondconfig) { - this.codeSrchcondconfigMapper.insert(codeSrchcondconfig); - return codeSrchcondconfig; + public boolean insert(CodeSrchCondConfig codeSrchcondconfig) { + return this.codeSrchcondconfigMapper.insert(codeSrchcondconfig)>0; } - /** + @Override +<<<<<<< Updated upstream + @Transactional(rollbackFor = Exception.class) + public boolean insertBatch(List<CodeSrchCondConfigVO> codeSrchCondConfigVOS, String oid) { + List<CodeSrchCondConfig> codeSrchCondConfigs = CodeSrchCondConfigWraper.build().listDO(codeSrchCondConfigVOS,oid); + return this.saveOrUpdateBatch(codeSrchCondConfigs); + } +======= + public boolean insertBatch(List<CodeSrchCondConfigVO> codeSrchCondConfigVOS) { + List<CodeSrchCondConfig> codeSrchCondConfigs = CodeSrchCondConfigWraper.build().listDO(codeSrchCondConfigVOS); + return this.saveOrUpdateBatch(codeSrchCondConfigs); + } + + /** * 淇敼鏁版嵁 * * @param codeSrchcondconfig 瀹炰緥瀵硅薄 * @return 瀹炰緥瀵硅薄 */ @Override - public CodeSrchCondConfig update(CodeSrchCondConfig codeSrchcondconfig) { - this.codeSrchcondconfigMapper.update(codeSrchcondconfig); - return this.queryById(codeSrchcondconfig.getOid()); + public boolean update(CodeSrchCondConfig codeSrchcondconfig) { + return this.codeSrchcondconfigMapper.update(codeSrchcondconfig)>0; } +>>>>>>> Stashed changes - /** + @Override + public boolean updateBatch(List<CodeSrchCondConfigVO> codeSrchCondConfigVOS) { + List<CodeSrchCondConfig> codeSrchCondConfigs = CodeSrchCondConfigWraper.build().listDO(codeSrchCondConfigVOS); + return this.saveOrUpdateBatch(codeSrchCondConfigs); + } + + /** * 閫氳繃涓婚敭鍒犻櫎鏁版嵁 * * @param oid 涓婚敭 @@ -80,4 +106,13 @@ public boolean deleteById(String oid) { return this.codeSrchcondconfigMapper.deleteById(oid) > 0; } + + @Override + public boolean deleteByReferConfigOid(String oid) { + LambdaQueryWrapper<CodeSrchCondConfig> lambdaQueryWrapper = Wrappers.<CodeSrchCondConfig>query() + .lambda() + .eq(CodeSrchCondConfig::getReferConfigOid, oid); + return this.codeSrchcondconfigMapper.delete(lambdaQueryWrapper) > 0; + } + } -- Gitblit v1.9.3