Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
PS
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBizPOC_20003
PS
提交
e3dd3484
提交
e3dd3484
编写于
4月 08, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibizdev提交
上级
96e5da7a
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
157 行增加
和
16 行删除
+157
-16
healthcheckFeignClient.java
...va/com/ibiz/client/htsc/feign/healthcheckFeignClient.java
+24
-8
healthcheckImpl.java
...main/java/com/ibiz/client/htsc/model/healthcheckImpl.java
+33
-0
healthcheckClientServiceImpl.java
...biz/client/htsc/service/healthcheckClientServiceImpl.java
+86
-8
Ihealthcheck.java
...rc/main/java/com/ibiz/core/client/model/Ihealthcheck.java
+14
-0
未找到文件。
ps-client/ps-client-htsc/src/main/java/com/ibiz/client/htsc/feign/healthcheckFeignClient.java
浏览文件 @
e3dd3484
!!!!
模版产生代码错误
:----
Tip:
If
the
failing
expression
is
known
to
be
legally
refer
to
something
that
'
s
sometimes
null
or
missing
,
either
specify
a
default
value
like
myOptionalVar
!
myDefault
,
or
use
<
#
if
myOptionalVar
??>
when
-
present
<
#
else
>
when
-
missing
</
#
if
>.
(
These
only
cover
the
last
step
of
the
expression
;
to
cover
the
whole
expression
,
use
parenthesis:
(
myOptionalVar
.
foo
)!
myDefault
,
(
myOptionalVar
.
foo
)??
----
----
FTL
stack
trace
(
"~"
means
nesting
-
related
):
-
Failed
at:
$
{
item
.
getKeyDEField
().
getCodeName
()?...
[
in
template
"CODETEMPL_zh_CN"
at
line
68
,
column
152
]
----
\ No newline at end of file
package
com
.
ibiz
.
client
.
htsc
.
feign
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.HashMap
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.web.bind.annotation.*
;
import
com.ibiz.core.client.model.Ihealthcheck
;
import
com.ibiz.client.htsc.model.healthcheckImpl
;
import
com.ibiz.util.SearchContext
;
/**
* 实体[healthcheck] 服务对象接口
*/
public
interface
healthcheckFeignClient
{
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/htsc-pos-nms/api//healthchecks/{healthcheckid}/test"
)
public
healthcheckImpl
test
(
@PathVariable
(
"healthcheckid"
)
String
healthcheckid
,
@RequestBody
healthcheckImpl
healthcheck
);
}
ps-client/ps-client-htsc/src/main/java/com/ibiz/client/htsc/model/healthcheckImpl.java
浏览文件 @
e3dd3484
...
...
@@ -20,4 +20,37 @@ import com.fasterxml.jackson.annotation.JsonFormat;
*/
public
class
healthcheckImpl
implements
Ihealthcheck
,
Serializable
{
/**
*
*/
public
String
hEALTHCHECKID
;
@JsonIgnore
public
boolean
hEALTHCHECKIDDirtyFlag
;
/**
* 获取 []
*/
@JsonProperty
(
"healthcheckid"
)
public
String
getHEALTHCHECKID
(){
return
this
.
hEALTHCHECKID
;
}
/**
* 设置 []
*/
@JsonProperty
(
"healthcheckid"
)
public
void
setHEALTHCHECKID
(
String
hEALTHCHECKID
){
this
.
hEALTHCHECKID
=
hEALTHCHECKID
;
this
.
hEALTHCHECKIDDirtyFlag
=
true
;
}
/**
* 获取 []脏标记
*/
@JsonIgnore
public
boolean
getHEALTHCHECKIDDirtyFlag
(){
return
this
.
hEALTHCHECKIDDirtyFlag
;
}
}
ps-client/ps-client-htsc/src/main/java/com/ibiz/client/htsc/service/healthcheckClientServiceImpl.java
浏览文件 @
e3dd3484
!!!!
模版产生代码错误
:----
Tip:
If
the
failing
expression
is
known
to
be
legally
refer
to
something
that
'
s
sometimes
null
or
missing
,
either
specify
a
default
value
like
myOptionalVar
!
myDefault
,
or
use
<
#
if
myOptionalVar
??>
when
-
present
<
#
else
>
when
-
missing
</
#
if
>.
(
These
only
cover
the
last
step
of
the
expression
;
to
cover
the
whole
expression
,
use
parenthesis:
(
myOptionalVar
.
foo
)!
myDefault
,
(
myOptionalVar
.
foo
)??
----
----
FTL
stack
trace
(
"~"
means
nesting
-
related
):
-
Failed
at:
$
{
item
.
getKeyDEField
().
getCodeName
()?...
[
in
template
"CODETEMPL_zh_CN"
at
line
137
,
column
151
]
----
\ No newline at end of file
package
com
.
ibiz
.
client
.
htsc
.
service
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.HashMap
;
import
lombok.extern.slf4j.Slf4j
;
import
feign.Client
;
import
feign.Contract
;
import
feign.Feign
;
import
feign.codec.Decoder
;
import
feign.codec.Encoder
;
import
org.springframework.cglib.beans.BeanCopier
;
import
org.springframework.stereotype.Service
;
import
com.ibiz.core.client.model.Ihealthcheck
;
import
com.ibiz.client.htsc.config.htscClientProperties
;
import
com.ibiz.core.client.service.IhealthcheckClientService
;
import
com.ibiz.client.htsc.model.healthcheckImpl
;
import
com.ibiz.client.htsc.feign.healthcheckFeignClient
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.cloud.openfeign.ribbon.LoadBalancerFeignClient
;
import
com.ibiz.util.feign.FeignRequestInterceptor
;
import
com.ibiz.util.SearchContext
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.Pageable
;
import
com.ibiz.util.feign.suport.SearchContextFeignEncode
;
import
com.ibiz.util.log.IBIZLog
;
/**
* 实体[healthcheck] 服务对象接口
*/
@Slf4j
@IBIZLog
@Service
public
class
healthcheckClientServiceImpl
implements
IhealthcheckClientService
{
healthcheckFeignClient
healthcheckFeignClient
;
@Autowired
public
healthcheckClientServiceImpl
(
Decoder
decoder
,
Encoder
encoder
,
Client
client
,
Contract
contract
,
FeignRequestInterceptor
feignRequestInterceptor
,
htscClientProperties
htscClientProperties
)
{
if
(
htscClientProperties
.
getServiceId
()!=
null
)
{
Feign
.
Builder
nameBuilder
=
Feign
.
builder
()
.
client
(
client
)
.
encoder
(
new
SearchContextFeignEncode
(
encoder
))
.
decoder
(
decoder
)
.
contract
(
contract
)
.
requestInterceptor
(
feignRequestInterceptor
)
;
this
.
healthcheckFeignClient
=
nameBuilder
.
target
(
healthcheckFeignClient
.
class
,
"http://"
+
htscClientProperties
.
getServiceId
()+
"/"
)
;
}
else
if
(
htscClientProperties
.
getServiceUrl
()!=
null
)
{
if
(
client
instanceof
LoadBalancerFeignClient
)
{
client
=
((
LoadBalancerFeignClient
)
client
).
getDelegate
();
}
Feign
.
Builder
nameBuilder
=
Feign
.
builder
()
.
client
(
client
)
.
encoder
(
new
SearchContextFeignEncode
(
encoder
))
.
decoder
(
decoder
)
.
contract
(
contract
)
.
requestInterceptor
(
feignRequestInterceptor
)
;
this
.
healthcheckFeignClient
=
nameBuilder
.
target
(
healthcheckFeignClient
.
class
,
"http://"
+
htscClientProperties
.
getServiceUrl
()+
"/"
)
;
}
}
@Override
public
Ihealthcheck
createModel
()
{
return
new
healthcheckImpl
();
}
public
void
test
(
Ihealthcheck
healthcheck
){
Ihealthcheck
clientModel
=
healthcheckFeignClient
.
test
(
healthcheck
.
getHEALTHCHECKID
(),(
healthcheckImpl
)
healthcheck
)
;
BeanCopier
copier
=
BeanCopier
.
create
(
clientModel
.
getClass
(),
healthcheck
.
getClass
(),
false
);
copier
.
copy
(
clientModel
,
healthcheck
,
null
);
}
}
ps-core/src/main/java/com/ibiz/core/client/model/Ihealthcheck.java
浏览文件 @
e3dd3484
...
...
@@ -13,4 +13,18 @@ import java.math.BigInteger;
*/
public
interface
Ihealthcheck
{
/**
* 获取 []
*/
public
void
setHEALTHCHECKID
(
String
hEALTHCHECKID
);
/**
* 设置 []
*/
public
String
getHEALTHCHECKID
();
/**
* 获取 []脏标记
*/
public
boolean
getHEALTHCHECKIDDirtyFlag
();
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录