diff --git a/api-admin/src/main/java/com/glxp/sale/admin/controller/sync/DirectConnectController.java b/api-admin/src/main/java/com/glxp/sale/admin/controller/sync/DirectConnectController.java index 684d4b1..9e8ca62 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/controller/sync/DirectConnectController.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/controller/sync/DirectConnectController.java @@ -12,13 +12,11 @@ import com.glxp.sale.common.res.BaseResponse; import com.glxp.sale.common.util.ResultVOUtils; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpHeaders; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.util.HashMap; +import java.util.List; import java.util.Map; @@ -141,4 +139,20 @@ public class DirectConnectController { } + @GetMapping("/udiwms/relCode/detailByParentCode") + public BaseResponse detailByParentCode(@RequestParam("parentCode") String parentCode) { + Map paramMap = new HashMap<>(2); + paramMap.put("parentCode", parentCode); + String response = UHttpClient.mipsGetHead(getSpmsUrl() + "/udiwms/relCode/detailByParentCode", paramMap, getHeaders()); + try { + BaseResponse data = JSONObject.parseObject(response, new TypeReference() { + }); + return data; + } catch (Exception e) { + e.printStackTrace(); + return ResultVOUtils.error(500, "连接失败!"); + } + } + + }