Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 752f40e5
由
LN
编写于
2024-07-03 10:43:36 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
重复入库处理修改
1 个父辈
90e9e111
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
11 行增加
和
6 行删除
src/main/java/com/neotel/smfcore/custom/micron1053/api/MicronApi.java
src/main/java/com/neotel/smfcore/custom/micron1053/bean/MicronResult.java
src/main/java/com/neotel/smfcore/custom/micron1053/api/MicronApi.java
查看文件 @
752f40e
...
...
@@ -179,6 +179,8 @@ public class MicronApi {
barcode
.
setToXray
(
true
);
}
return
barcode
;
// 2023-08-29 14:45:35.971 INFO [HttpHelper.java:339] - Request to [http://istio-ingressgateway-istio-system.apps.ose-dev45.micron.com/material/validation/label] response: code=500,responseContent={
// "transactionId": "2810c627-d3b6-4200-ba7c-f8e3eddf47f6",
// "error": 102,
...
...
@@ -187,7 +189,7 @@ public class MicronApi {
// }
}
else
{
String
errmsg
=
result
.
getResult
(
"description"
);
String
errmsg
=
result
.
getResult
(
"description"
,
false
);
if
(
ObjectUtil
.
isEmpty
(
errmsg
)){
errmsg
=
errorMsg
;
}
...
...
@@ -198,14 +200,13 @@ public class MicronApi {
throw
new
ApiException
(
"smfcore.api.fail"
,
"{0} Failed to get data"
,
new
String
[]{
"API001"
});
}
return
barcode
;
}
catch
(
ApiException
e
)
{
throw
e
;
}
catch
(
Exception
e
)
{
log
.
error
(
url
+
"出错"
,
e
);
}
return
barcode
;
return
null
;
}
private
static
String
getDErrorMsg
(
MicronResult
result
)
throws
ApiException
{
...
...
src/main/java/com/neotel/smfcore/custom/micron1053/bean/MicronResult.java
查看文件 @
752f40e
...
...
@@ -58,9 +58,11 @@ public class MicronResult implements Serializable {
public
<
T
>
T
getResult
(
String
key
,
boolean
needCheck
)
throws
ApiException
{
if
(
ObjectUtil
.
isEmpty
(
responseData
))
{
throw
new
ApiException
(
"smfcore.api.fail"
,
"{0} Failed to get data"
,
new
String
[]{
"API"
});
// return null;
if
(
ObjectUtil
.
isEmpty
(
responseData
)
)
{
if
(
needCheck
){
throw
new
ApiException
(
"smfcore.api.fail"
,
"{0} Failed to get data"
,
new
String
[]{
"API"
});
}
return
null
;
}
if
(
resultMap
==
null
)
{
resultMap
=
JsonUtil
.
toMap
(
responseData
);
...
...
@@ -81,6 +83,8 @@ public class MicronResult implements Serializable {
}
}
else
if
(
resultMap
==
null
){
return
null
;
}
if
(
key
!=
null
&&
!
key
.
isEmpty
())
{
Object
value
=
resultMap
.
get
(
key
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论