From d7eba1786ed1fba2b3674f9da3af4fbf1a3f8692 Mon Sep 17 00:00:00 2001 From: fujunling <2984387807@qq.com> Date: 星期四, 01 六月 2023 18:49:05 +0800 Subject: [PATCH] 解决冲突 --- Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/feign/MdmEngineClient.java | 82 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 82 insertions(+), 0 deletions(-) diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/feign/MdmEngineClient.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/feign/MdmEngineClient.java new file mode 100644 index 0000000..e4b173e --- /dev/null +++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/feign/MdmEngineClient.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 搴勯獮 (smallchill@163.com) + */ +package com.vci.ubcs.code.feign; + + +import com.vci.ubcs.code.service.MdmEngineService; +import com.vci.ubcs.starter.revision.model.BaseModel; +import lombok.AllArgsConstructor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springblade.core.tool.api.R; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import java.beans.IntrospectionException; +import java.lang.reflect.InvocationTargetException; +import java.sql.SQLException; +import java.util.List; + +/** + * 缂栫爜淇℃伅 Feign瀹炵幇绫� + * + * @author yuxc + * @since 2023-05-05 + */ +@ApiIgnore() +@RestController +@AllArgsConstructor +public class MdmEngineClient implements IMdmEngineClient { + private final MdmEngineService mdmEngineService; + /** + * 浼犲叆涓氬姟绫诲瀷浠ュ強鐩竜id闆嗗悎鏌ヨ鏁版嵁杩涜杩斿洖 + * + * @param btmType 涓氬姟绫诲瀷 + * @param oids 闇�瑕佹煡璇㈢殑oid闆嗗悎 閫楀彿鍒嗗紑 + * @return 鏌ヨ鍑虹殑鏁版嵁 + */ + @Override + @GetMapping(SELECT_BY_TYPE_OID) + public R<List<BaseModel>> selectByTypeAndOid(String btmType, String oids) { + try { + return R.data(mdmEngineService.selectByTypeAndOid(btmType, oids)); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + /** + * 浼犲叆涓氬姟绫诲瀷浠ュ強鐩稿叧鏁版嵁杩涜鎵归噺鎻掑叆鎿嶄綔 + * + * @param btmType 涓氬姟绫诲瀷 + * @param baseModels 澶勭悊鏁版嵁 + * @return 澶勭悊鎴愬姛鏁版嵁鏉℃暟 + */ + @Override + @PostMapping(INSERT_BATCH_BY_TYPE) + public R<Integer> insertBatchByType(String btmType, List<BaseModel> baseModels) { + try { + return R.data(mdmEngineService.insertBatchByType(btmType,baseModels)); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + +} -- Gitblit v1.9.3