Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
szpt
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
以墨为白
szpt
Commits
74406928
Commit
74406928
authored
Jan 03, 2025
by
wangjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增信息员代码服务
parent
108148b4
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
672 additions
and
4 deletions
+672
-4
src/main/java/com/zksy/szpt/controller/IndexController.java
src/main/java/com/zksy/szpt/controller/IndexController.java
+15
-0
src/main/java/com/zksy/szpt/domain/dto/XxShxxyDTO.java
src/main/java/com/zksy/szpt/domain/dto/XxShxxyDTO.java
+464
-0
src/main/java/com/zksy/szpt/domain/dto/XxShxxyDwDTO.java
src/main/java/com/zksy/szpt/domain/dto/XxShxxyDwDTO.java
+71
-0
src/main/java/com/zksy/szpt/domain/po/XxShxxy.java
src/main/java/com/zksy/szpt/domain/po/XxShxxy.java
+10
-0
src/main/java/com/zksy/szpt/domain/po/XxShxxyDw.java
src/main/java/com/zksy/szpt/domain/po/XxShxxyDw.java
+8
-0
src/main/java/com/zksy/szpt/mapper/XxShxxyDwMapper.java
src/main/java/com/zksy/szpt/mapper/XxShxxyDwMapper.java
+3
-2
src/main/java/com/zksy/szpt/mapper/XxShxxyMapper.java
src/main/java/com/zksy/szpt/mapper/XxShxxyMapper.java
+3
-2
src/main/java/com/zksy/szpt/service/IndexService.java
src/main/java/com/zksy/szpt/service/IndexService.java
+16
-0
src/test/java/com/zksy/szpt/MainTest.java
src/test/java/com/zksy/szpt/MainTest.java
+82
-0
No files found.
src/main/java/com/zksy/szpt/controller/IndexController.java
View file @
74406928
...
...
@@ -94,4 +94,19 @@ public class IndexController {
public
Integer
addXxYjdwdm
(
@RequestBody
@Validated
XxYjdwdmDTO
dto
){
return
indexService
.
addXxYjdwdm
(
dto
);
}
@ApiOperation
(
value
=
"新增义警队伍代码信息数据"
)
@PostMapping
(
"/addXxShxxyDw"
)
public
Integer
XxShxxyDw
(
@RequestBody
@Validated
XxShxxyDwDTO
dto
){
return
indexService
.
addXxShxxyDw
(
dto
);
}
@ApiOperation
(
value
=
"社会信息员信息数据"
)
@PostMapping
(
"/addXxShxxy"
)
public
Integer
addXxShxxy
(
@RequestBody
@Validated
XxShxxyDTO
dto
){
return
indexService
.
addXxShxxy
(
dto
);
}
}
src/main/java/com/zksy/szpt/domain/dto/XxShxxyDTO.java
0 → 100644
View file @
74406928
package
com
.
zksy
.
szpt
.
domain
.
dto
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
javax.validation.constraints.NotBlank
;
import
java.util.Date
;
public
class
XxShxxyDTO
{
/**
* 社会信息员ID;l
*/
@NotBlank
(
message
=
"社会信息员ID不能为空"
)
private
String
xxyid
;
/**
* 信息员编号;l,q
*/
private
String
xxybh
;
/**
* 信息员类型;cslb=1021,l,q
*/
private
String
xxylx
;
/**
* 姓名;l,q
*/
private
String
xm
;
/**
* 身份证号;l,q
*/
private
String
sfzh
;
/**
* 等级;cslb=1031,l,q
*/
private
String
dj
;
/**
* 发送情报总数;l
*/
private
String
fsqbzs
;
/**
* 联系电话;l,q
*/
private
String
lxdh
;
/**
* 联系电话2
*/
private
String
lxdh2
;
/**
* 联系电话3
*/
private
String
lxdh3
;
/**
* 职业类型;cslb=1022,l
*/
private
String
zylx
;
/**
* 其他职业类型
*/
private
String
qtzylx
;
/**
* 户籍地址
*/
private
String
hjdz
;
/**
* 暂住地址
*/
private
String
zzdz
;
/**
* 服务处所
*/
private
String
fwcs
;
/**
* 物建人ID
*/
private
String
wjrid
;
/**
* 物建人姓名;l,q
*/
private
String
wjrxm
;
/**
* 物建时间;l,q
*/
private
Date
wjsj
;
/**
* 所属部门编码;l,q
*/
private
String
ssbmbm
;
/**
* 原物件民警
*/
private
String
ywjrxm
;
/**
* 上报发送状态;cslb=1037
*/
@NotBlank
(
message
=
"上报发送状态不能为空"
)
private
String
sbfszt
;
/**
* 上报发送时间
*/
private
Date
sbfssj
;
/**
* 上报发送结果
*/
private
String
sbfsjg
;
/**
* 回访标志;cslb=1152,l,q
*/
private
String
hfbz
;
/**
* 情报分类ID
*/
private
String
qbflid
;
/**
* 运营单位ID
*/
private
String
mchid
;
/**
* 座右铭
*/
private
String
zym
;
/**
* 状态;cslb=1008,l,q
*/
@NotBlank
(
message
=
"状态不能为空"
)
private
String
zt
;
/**
* 义警队伍;cslb=3210
*/
private
String
yjdw
;
/**
* 审核时间
*/
private
Date
shsj
;
/**
* 审核人姓名
*/
private
String
shrxm
;
/**
* 审核人id
*/
@NotBlank
(
message
=
"审核人ID不能为空"
)
private
String
shrid
;
/**
* 审核说明
*/
private
String
shsm
;
/**
* 审核标志;cslb=3209
*/
private
String
shbz
;
public
String
getXxyid
()
{
return
xxyid
;
}
public
void
setXxyid
(
String
xxyid
)
{
this
.
xxyid
=
xxyid
==
null
?
null
:
xxyid
.
trim
();
}
public
String
getXxybh
()
{
return
xxybh
;
}
public
void
setXxybh
(
String
xxybh
)
{
this
.
xxybh
=
xxybh
==
null
?
null
:
xxybh
.
trim
();
}
public
String
getXxylx
()
{
return
xxylx
;
}
public
void
setXxylx
(
String
xxylx
)
{
this
.
xxylx
=
xxylx
==
null
?
null
:
xxylx
.
trim
();
}
public
String
getXm
()
{
return
xm
;
}
public
void
setXm
(
String
xm
)
{
this
.
xm
=
xm
==
null
?
null
:
xm
.
trim
();
}
public
String
getSfzh
()
{
return
sfzh
;
}
public
void
setSfzh
(
String
sfzh
)
{
this
.
sfzh
=
sfzh
==
null
?
null
:
sfzh
.
trim
();
}
public
String
getDj
()
{
return
dj
;
}
public
void
setDj
(
String
dj
)
{
this
.
dj
=
dj
==
null
?
null
:
dj
.
trim
();
}
public
String
getFsqbzs
()
{
return
fsqbzs
;
}
public
void
setFsqbzs
(
String
fsqbzs
)
{
this
.
fsqbzs
=
fsqbzs
==
null
?
null
:
fsqbzs
.
trim
();
}
public
String
getLxdh
()
{
return
lxdh
;
}
public
void
setLxdh
(
String
lxdh
)
{
this
.
lxdh
=
lxdh
==
null
?
null
:
lxdh
.
trim
();
}
public
String
getLxdh2
()
{
return
lxdh2
;
}
public
void
setLxdh2
(
String
lxdh2
)
{
this
.
lxdh2
=
lxdh2
==
null
?
null
:
lxdh2
.
trim
();
}
public
String
getLxdh3
()
{
return
lxdh3
;
}
public
void
setLxdh3
(
String
lxdh3
)
{
this
.
lxdh3
=
lxdh3
==
null
?
null
:
lxdh3
.
trim
();
}
public
String
getZylx
()
{
return
zylx
;
}
public
void
setZylx
(
String
zylx
)
{
this
.
zylx
=
zylx
==
null
?
null
:
zylx
.
trim
();
}
public
String
getQtzylx
()
{
return
qtzylx
;
}
public
void
setQtzylx
(
String
qtzylx
)
{
this
.
qtzylx
=
qtzylx
==
null
?
null
:
qtzylx
.
trim
();
}
public
String
getHjdz
()
{
return
hjdz
;
}
public
void
setHjdz
(
String
hjdz
)
{
this
.
hjdz
=
hjdz
==
null
?
null
:
hjdz
.
trim
();
}
public
String
getZzdz
()
{
return
zzdz
;
}
public
void
setZzdz
(
String
zzdz
)
{
this
.
zzdz
=
zzdz
==
null
?
null
:
zzdz
.
trim
();
}
public
String
getFwcs
()
{
return
fwcs
;
}
public
void
setFwcs
(
String
fwcs
)
{
this
.
fwcs
=
fwcs
==
null
?
null
:
fwcs
.
trim
();
}
public
String
getWjrid
()
{
return
wjrid
;
}
public
void
setWjrid
(
String
wjrid
)
{
this
.
wjrid
=
wjrid
==
null
?
null
:
wjrid
.
trim
();
}
public
String
getWjrxm
()
{
return
wjrxm
;
}
public
void
setWjrxm
(
String
wjrxm
)
{
this
.
wjrxm
=
wjrxm
==
null
?
null
:
wjrxm
.
trim
();
}
public
Date
getWjsj
()
{
return
wjsj
;
}
public
void
setWjsj
(
Date
wjsj
)
{
this
.
wjsj
=
wjsj
;
}
public
String
getSsbmbm
()
{
return
ssbmbm
;
}
public
void
setSsbmbm
(
String
ssbmbm
)
{
this
.
ssbmbm
=
ssbmbm
==
null
?
null
:
ssbmbm
.
trim
();
}
public
String
getYwjrxm
()
{
return
ywjrxm
;
}
public
void
setYwjrxm
(
String
ywjrxm
)
{
this
.
ywjrxm
=
ywjrxm
==
null
?
null
:
ywjrxm
.
trim
();
}
public
String
getSbfszt
()
{
return
sbfszt
;
}
public
void
setSbfszt
(
String
sbfszt
)
{
this
.
sbfszt
=
sbfszt
==
null
?
null
:
sbfszt
.
trim
();
}
public
Date
getSbfssj
()
{
return
sbfssj
;
}
public
void
setSbfssj
(
Date
sbfssj
)
{
this
.
sbfssj
=
sbfssj
;
}
public
String
getSbfsjg
()
{
return
sbfsjg
;
}
public
void
setSbfsjg
(
String
sbfsjg
)
{
this
.
sbfsjg
=
sbfsjg
==
null
?
null
:
sbfsjg
.
trim
();
}
public
String
getHfbz
()
{
return
hfbz
;
}
public
void
setHfbz
(
String
hfbz
)
{
this
.
hfbz
=
hfbz
==
null
?
null
:
hfbz
.
trim
();
}
public
String
getQbflid
()
{
return
qbflid
;
}
public
void
setQbflid
(
String
qbflid
)
{
this
.
qbflid
=
qbflid
==
null
?
null
:
qbflid
.
trim
();
}
public
String
getMchid
()
{
return
mchid
;
}
public
void
setMchid
(
String
mchid
)
{
this
.
mchid
=
mchid
==
null
?
null
:
mchid
.
trim
();
}
public
String
getZym
()
{
return
zym
;
}
public
void
setZym
(
String
zym
)
{
this
.
zym
=
zym
==
null
?
null
:
zym
.
trim
();
}
public
String
getZt
()
{
return
zt
;
}
public
void
setZt
(
String
zt
)
{
this
.
zt
=
zt
==
null
?
null
:
zt
.
trim
();
}
public
String
getYjdw
()
{
return
yjdw
;
}
public
void
setYjdw
(
String
yjdw
)
{
this
.
yjdw
=
yjdw
==
null
?
null
:
yjdw
.
trim
();
}
public
Date
getShsj
()
{
return
shsj
;
}
public
void
setShsj
(
Date
shsj
)
{
this
.
shsj
=
shsj
;
}
public
String
getShrxm
()
{
return
shrxm
;
}
public
void
setShrxm
(
String
shrxm
)
{
this
.
shrxm
=
shrxm
==
null
?
null
:
shrxm
.
trim
();
}
public
String
getShrid
()
{
return
shrid
;
}
public
void
setShrid
(
String
shrid
)
{
this
.
shrid
=
shrid
==
null
?
null
:
shrid
.
trim
();
}
public
String
getShsm
()
{
return
shsm
;
}
public
void
setShsm
(
String
shsm
)
{
this
.
shsm
=
shsm
==
null
?
null
:
shsm
.
trim
();
}
public
String
getShbz
()
{
return
shbz
;
}
public
void
setShbz
(
String
shbz
)
{
this
.
shbz
=
shbz
==
null
?
null
:
shbz
.
trim
();
}
}
\ No newline at end of file
src/main/java/com/zksy/szpt/domain/dto/XxShxxyDwDTO.java
0 → 100644
View file @
74406928
package
com
.
zksy
.
szpt
.
domain
.
dto
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
javax.validation.constraints.NotBlank
;
import
java.util.Date
;
public
class
XxShxxyDwDTO
{
/**
* 信息员队伍ID
*/
@NotBlank
(
message
=
"信息员队伍ID不能为空"
)
private
String
id
;
/**
* 社会信息员ID
*/
@NotBlank
(
message
=
"社会信息员ID不能为空"
)
private
String
shxxyid
;
/**
* 队伍编码
*/
@NotBlank
(
message
=
"队伍编码不能为空"
)
private
String
dwdm
;
/**
* 义警队伍编码
*/
private
String
yjdwdm
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
==
null
?
null
:
id
.
trim
();
}
public
String
getShxxyid
()
{
return
shxxyid
;
}
public
void
setShxxyid
(
String
shxxyid
)
{
this
.
shxxyid
=
shxxyid
==
null
?
null
:
shxxyid
.
trim
();
}
public
String
getDwdm
()
{
return
dwdm
;
}
public
void
setDwdm
(
String
dwdm
)
{
this
.
dwdm
=
dwdm
==
null
?
null
:
dwdm
.
trim
();
}
public
String
getYjdwdm
()
{
return
yjdwdm
;
}
public
void
setYjdwdm
(
String
yjdwdm
)
{
this
.
yjdwdm
=
yjdwdm
==
null
?
null
:
yjdwdm
.
trim
();
}
}
\ No newline at end of file
src/main/java/com/zksy/szpt/domain/po/XxShxxy.java
View file @
74406928
package
com
.
zksy
.
szpt
.
domain
.
po
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.util.Date
;
public
class
XxShxxy
{
/**
* IID
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
private
Long
iid
;
/**
...
...
@@ -181,16 +187,19 @@ public class XxShxxy {
/**
* 创建人id
*/
@TableField
(
fill
=
FieldFill
.
INSERT
)
private
String
cjrid
;
/**
* 创建人姓名
*/
@TableField
(
fill
=
FieldFill
.
INSERT
)
private
String
cjrxm
;
/**
* 创建时间
*/
@TableField
(
fill
=
FieldFill
.
INSERT
)
private
Date
cjsj
;
/**
...
...
@@ -206,6 +215,7 @@ public class XxShxxy {
/**
* 更新时间
*/
@TableField
(
fill
=
FieldFill
.
INSERT
)
private
Date
gxsj
;
public
Long
getIid
()
{
...
...
src/main/java/com/zksy/szpt/domain/po/XxShxxyDw.java
View file @
74406928
package
com
.
zksy
.
szpt
.
domain
.
po
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.util.Date
;
public
class
XxShxxyDw
{
/**
* IID
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
private
Long
iid
;
/**
...
...
@@ -31,11 +37,13 @@ public class XxShxxyDw {
/**
* 创建时间
*/
@TableField
(
fill
=
FieldFill
.
INSERT
)
private
Date
cjsj
;
/**
* 更新时间
*/
@TableField
(
fill
=
FieldFill
.
INSERT
)
private
Date
gxsj
;
public
Long
getIid
()
{
...
...
src/main/java/com/zksy/szpt/mapper/XxShxxyDwMapper.java
View file @
74406928
package
com
.
zksy
.
szpt
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.zksy.szpt.domain.po.XxShxxyDw
;
import
com.zksy.szpt.domain.po.XxShxxyDwExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
XxShxxyDwMapper
{
public
interface
XxShxxyDwMapper
extends
BaseMapper
<
XxShxxyDw
>
{
long
countByExample
(
XxShxxyDwExample
example
);
int
deleteByExample
(
XxShxxyDwExample
example
);
int
deleteByPrimaryKey
(
Long
iid
);
int
insert
(
XxShxxyDw
record
);
//
int insert(XxShxxyDw record);
int
insertSelective
(
XxShxxyDw
record
);
...
...
src/main/java/com/zksy/szpt/mapper/XxShxxyMapper.java
View file @
74406928
package
com
.
zksy
.
szpt
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.zksy.szpt.domain.po.XxShxxy
;
import
com.zksy.szpt.domain.po.XxShxxyExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
XxShxxyMapper
{
public
interface
XxShxxyMapper
extends
BaseMapper
<
XxShxxy
>
{
long
countByExample
(
XxShxxyExample
example
);
int
deleteByExample
(
XxShxxyExample
example
);
int
deleteByPrimaryKey
(
Long
iid
);
int
insert
(
XxShxxy
record
);
//
int insert(XxShxxy record);
int
insertSelective
(
XxShxxy
record
);
...
...
src/main/java/com/zksy/szpt/service/IndexService.java
View file @
74406928
...
...
@@ -107,5 +107,21 @@ public class IndexService {
return
xxYjdwdmMapper
.
insert
(
xxYjdwdm
);
}
@Resource
private
XxShxxyDwMapper
xxShxxyDwMapper
;
public
Integer
addXxShxxyDw
(
XxShxxyDwDTO
dto
)
{
XxShxxyDw
xxShxxyDw
=
BeanMapperUtil
.
map
(
dto
,
XxShxxyDw
.
class
);
return
xxShxxyDwMapper
.
insert
(
xxShxxyDw
);
}
@Resource
private
XxShxxyMapper
xxShxxyMapper
;
public
Integer
addXxShxxy
(
XxShxxyDTO
dto
)
{
XxShxxy
xxShxxy
=
BeanMapperUtil
.
map
(
dto
,
XxShxxy
.
class
);
return
xxShxxyMapper
.
insert
(
xxShxxy
);
}
}
src/test/java/com/zksy/szpt/MainTest.java
View file @
74406928
...
...
@@ -6,6 +6,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import
com.zksy.szpt.domain.ListImageType
;
import
com.zksy.szpt.domain.UploadImageDTO
;
import
com.zksy.szpt.domain.dto.*
;
import
com.zksy.szpt.domain.po.XxShxxyDw
;
import
com.zksy.szpt.service.AppStoreService
;
import
com.zksy.szpt.util.EncryptUtil
;
import
com.zksy.szpt.util.SignatureUtil
;
...
...
@@ -308,4 +309,85 @@ public class MainTest {
.
block
();
System
.
out
.
println
(
response
);
}
@Test
@DisplayName
(
"任务完成情况"
)
public
void
test6
()
{
timestampStr
=
String
.
valueOf
(
System
.
currentTimeMillis
()
/
1000
);
nonce
=
String
.
valueOf
(
System
.
currentTimeMillis
()
/
1000
);
String
secretKey
=
this
.
appStoreService
.
getAppSecretByAppKey
(
appId
);
Assertions
.
assertNotNull
(
secretKey
,
"appId不存在"
);
//断言appId存在,为空直接抛出异常不进行下一步测试,提高测试效率
//请求参数
XxShxxyDwDTO
dto
=
new
XxShxxyDwDTO
();
dto
.
setId
(
"123456"
);
dto
.
setDwdm
(
"123456"
);
dto
.
setShxxyid
(
"123456"
);
String
json
=
null
;
try
{
json
=
objectMapper
.
writeValueAsString
(
dto
);
}
catch
(
JsonProcessingException
e
)
{
Assertions
.
fail
(
"json序列化失败"
);
}
//请求体加密
json
=
EncryptUtil
.
getInstance
().
AESEncode
(
json
,
secretKey
);
//签名appId+nonce+timestampStr+aes(body)
String
data
=
String
.
format
(
"%s%s%s%s"
,
appId
,
nonce
,
timestampStr
,
json
);
String
generatedSignature
=
DigestUtil
.
md5Hex
(
data
);
//请求
WebClient
webClient
=
WebClient
.
builder
()
.
baseUrl
(
"http://localhost:8086"
)
.
defaultHeader
(
"Content-Type"
,
"application/json"
)
.
build
();
String
response
=
webClient
.
post
().
uri
(
"/rest/index/addXxShxxyDw"
)
.
header
(
SignatureUtil
.
APPID
,
appId
)
.
header
(
SignatureUtil
.
NONCE
,
nonce
)
.
header
(
SignatureUtil
.
TIMESTAMP
,
timestampStr
)
.
header
(
SignatureUtil
.
SIGNATURE
,
generatedSignature
)
.
body
(
Mono
.
just
(
dto
),
XxShxxyDw
.
class
)
.
retrieve
()
.
bodyToMono
(
String
.
class
)
.
block
();
System
.
out
.
println
(
response
);
}
@Test
@DisplayName
(
"任务完成情况"
)
public
void
test7
()
{
timestampStr
=
String
.
valueOf
(
System
.
currentTimeMillis
()
/
1000
);
nonce
=
String
.
valueOf
(
System
.
currentTimeMillis
()
/
1000
);
String
secretKey
=
this
.
appStoreService
.
getAppSecretByAppKey
(
appId
);
Assertions
.
assertNotNull
(
secretKey
,
"appId不存在"
);
//断言appId存在,为空直接抛出异常不进行下一步测试,提高测试效率
//请求参数
XxShxxyDTO
dto
=
new
XxShxxyDTO
();
dto
.
setXxyid
(
"123456"
);
dto
.
setZt
(
"1"
);
dto
.
setSbfszt
(
"1"
);
dto
.
setShrid
(
"1"
);
String
json
=
null
;
try
{
json
=
objectMapper
.
writeValueAsString
(
dto
);
}
catch
(
JsonProcessingException
e
)
{
Assertions
.
fail
(
"json序列化失败"
);
}
//请求体加密
json
=
EncryptUtil
.
getInstance
().
AESEncode
(
json
,
secretKey
);
//签名appId+nonce+timestampStr+aes(body)
String
data
=
String
.
format
(
"%s%s%s%s"
,
appId
,
nonce
,
timestampStr
,
json
);
String
generatedSignature
=
DigestUtil
.
md5Hex
(
data
);
//请求
WebClient
webClient
=
WebClient
.
builder
()
.
baseUrl
(
"http://localhost:8086"
)
.
defaultHeader
(
"Content-Type"
,
"application/json"
)
.
build
();
String
response
=
webClient
.
post
().
uri
(
"/rest/index/addXxShxxy"
)
.
header
(
SignatureUtil
.
APPID
,
appId
)
.
header
(
SignatureUtil
.
NONCE
,
nonce
)
.
header
(
SignatureUtil
.
TIMESTAMP
,
timestampStr
)
.
header
(
SignatureUtil
.
SIGNATURE
,
generatedSignature
)
.
body
(
Mono
.
just
(
dto
),
XxShxxyDTO
.
class
)
.
retrieve
()
.
bodyToMono
(
String
.
class
)
.
block
();
System
.
out
.
println
(
response
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment