Commit 70ef5110 authored by wangjinjing's avatar wangjinjing

新增服务

parent 29d98378
...@@ -70,4 +70,16 @@ public class IndexController { ...@@ -70,4 +70,16 @@ public class IndexController {
public Integer addSzptGdXx(@RequestBody @Validated SzptGdXxDTO szptGdXxDTO){ public Integer addSzptGdXx(@RequestBody @Validated SzptGdXxDTO szptGdXxDTO){
return indexService.addSzptGdXx(szptGdXxDTO); return indexService.addSzptGdXx(szptGdXxDTO);
} }
@ApiOperation(value="新增账号信息数据")
@PostMapping("/addXxZhxx")
public Integer addXxZhxx(@RequestBody @Validated XxZhxxDTO xxZhxxDTO){
return indexService.addXxZhxx(xxZhxxDTO);
}
@ApiOperation(value="新增账户积分变更信息数据")
@PostMapping("/addXxZhjfbg")
public Integer addXxZhjfbg(@RequestBody @Validated XxZhjfbgDTO dto){
return indexService.addXxZhjfbg(dto);
}
} }
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 com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
public class XxZhjfbgDTO {
/**
* 兑换ID
*/
@NotBlank(message = "兑换ID不能为空")
private String dhid;
/**
* 账户ID
*/
private String zhid;
/**
* 情报ID
*/
@NotBlank(message = "情报ID不能为空")
private String qbid;
/**
* 情报奖励ID
*/
private String qbjlid;
/**
* 变更类型;cslb=1019
*/
private String bglx;
/**
* 变更积分
*/
private Long bgjf;
/**
* 变更前积分
*/
private Long bgqjf;
/**
* 变更后积分
*/
private Long bghjf;
/**
* 变更时间
*/
@NotNull(message = "情报ID不能为空")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date bgsj;
/**
* 备注
*/
private String bz;
/**
* 更新时间
*/
private Date gxsj;
public String getDhid() {
return dhid;
}
public void setDhid(String dhid) {
this.dhid = dhid == null ? null : dhid.trim();
}
public String getZhid() {
return zhid;
}
public void setZhid(String zhid) {
this.zhid = zhid == null ? null : zhid.trim();
}
public String getQbid() {
return qbid;
}
public void setQbid(String qbid) {
this.qbid = qbid == null ? null : qbid.trim();
}
public String getQbjlid() {
return qbjlid;
}
public void setQbjlid(String qbjlid) {
this.qbjlid = qbjlid == null ? null : qbjlid.trim();
}
public String getBglx() {
return bglx;
}
public void setBglx(String bglx) {
this.bglx = bglx == null ? null : bglx.trim();
}
public Long getBgjf() {
return bgjf;
}
public void setBgjf(Long bgjf) {
this.bgjf = bgjf;
}
public Long getBgqjf() {
return bgqjf;
}
public void setBgqjf(Long bgqjf) {
this.bgqjf = bgqjf;
}
public Long getBghjf() {
return bghjf;
}
public void setBghjf(Long bghjf) {
this.bghjf = bghjf;
}
public Date getBgsj() {
return bgsj;
}
public void setBgsj(Date bgsj) {
this.bgsj = bgsj;
}
public String getBz() {
return bz;
}
public void setBz(String bz) {
this.bz = bz == null ? null : bz.trim();
}
public Date getGxsj() {
return gxsj;
}
public void setGxsj(Date gxsj) {
this.gxsj = gxsj;
}
}
\ No newline at end of file
package com.zksy.szpt.domain.dto;
import javax.validation.constraints.NotBlank;
import java.util.Date;
public class XxZhxxDTO {
/**
* 账户ID
*/
@NotBlank(message = "账户ID不能为空")
private String zhid;
/**
* 账户类型;cslb=1004
*/
private String zhlx;
/**
* 社会信息员ID
*/
private String xxyid;
/**
* 姓名
*/
private String xm;
/**
* 身份证号
*/
private String sfzh;
/**
* 联系电话
*/
private String lxdh;
/**
* OPENID
*/
private String openid;
/**
* 昵称
*/
private String nc;
/**
* UNIONID
*/
private String unionid;
/**
* 发送情报数
*/
private String fsqbs;
/**
* 小程序ID
*/
private String accountid;
/**
* 前端权限,默认空,支持多个,逗号分隔
*/
private String roles;
/**
* 邀请码
*/
private String yqm;
/**
* 邀请码ID
*/
private String yqmid;
/**
* 处理标志;cslb=1017
*/
@NotBlank(message = "处理标志不能为空")
private String clbz;
/**
* 处理时间
*/
private Date clsj;
/**
* 处理结果
*/
private String cljg;
/**
* 返回时间
*/
private Date fhsj;
/**
* OCUUID
*/
private String ocuuid;
/**
* 帐号参数JSON
*/
private String zhcs;
/**
* 运营商户ID
*/
private String mchid;
/**
* 状态;cslb=1008
*/
@NotBlank(message = "状态不能为空")
private String zt;
/**
* 头像
*/
private String avatar;
public String getZhid() {
return zhid;
}
public void setZhid(String zhid) {
this.zhid = zhid == null ? null : zhid.trim();
}
public String getZhlx() {
return zhlx;
}
public void setZhlx(String zhlx) {
this.zhlx = zhlx == null ? null : zhlx.trim();
}
public String getXxyid() {
return xxyid;
}
public void setXxyid(String xxyid) {
this.xxyid = xxyid == null ? null : xxyid.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 getLxdh() {
return lxdh;
}
public void setLxdh(String lxdh) {
this.lxdh = lxdh == null ? null : lxdh.trim();
}
public String getOpenid() {
return openid;
}
public void setOpenid(String openid) {
this.openid = openid == null ? null : openid.trim();
}
public String getNc() {
return nc;
}
public void setNc(String nc) {
this.nc = nc == null ? null : nc.trim();
}
public String getUnionid() {
return unionid;
}
public void setUnionid(String unionid) {
this.unionid = unionid == null ? null : unionid.trim();
}
public String getFsqbs() {
return fsqbs;
}
public void setFsqbs(String fsqbs) {
this.fsqbs = fsqbs == null ? null : fsqbs.trim();
}
public String getAccountid() {
return accountid;
}
public void setAccountid(String accountid) {
this.accountid = accountid == null ? null : accountid.trim();
}
public String getRoles() {
return roles;
}
public void setRoles(String roles) {
this.roles = roles == null ? null : roles.trim();
}
public String getYqm() {
return yqm;
}
public void setYqm(String yqm) {
this.yqm = yqm == null ? null : yqm.trim();
}
public String getYqmid() {
return yqmid;
}
public void setYqmid(String yqmid) {
this.yqmid = yqmid == null ? null : yqmid.trim();
}
public String getClbz() {
return clbz;
}
public void setClbz(String clbz) {
this.clbz = clbz == null ? null : clbz.trim();
}
public Date getClsj() {
return clsj;
}
public void setClsj(Date clsj) {
this.clsj = clsj;
}
public String getCljg() {
return cljg;
}
public void setCljg(String cljg) {
this.cljg = cljg == null ? null : cljg.trim();
}
public Date getFhsj() {
return fhsj;
}
public void setFhsj(Date fhsj) {
this.fhsj = fhsj;
}
public String getOcuuid() {
return ocuuid;
}
public void setOcuuid(String ocuuid) {
this.ocuuid = ocuuid == null ? null : ocuuid.trim();
}
public String getZhcs() {
return zhcs;
}
public void setZhcs(String zhcs) {
this.zhcs = zhcs == null ? null : zhcs.trim();
}
public String getMchid() {
return mchid;
}
public void setMchid(String mchid) {
this.mchid = mchid == null ? null : mchid.trim();
}
public String getZt() {
return zt;
}
public void setZt(String zt) {
this.zt = zt == null ? null : zt.trim();
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar == null ? null : avatar.trim();
}
}
\ No newline at end of file
package com.zksy.szpt.domain.po; 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; import java.util.Date;
public class XxZhjfbg { public class XxZhjfbg {
/** /**
* IID * IID
*/ */
@TableId(type = IdType.ASSIGN_ID)
private Long iid; private Long iid;
/** /**
...@@ -61,11 +67,13 @@ public class XxZhjfbg { ...@@ -61,11 +67,13 @@ public class XxZhjfbg {
/** /**
* 创建时间 * 创建时间
*/ */
@TableField(fill = FieldFill.INSERT)
private Date cjsj; private Date cjsj;
/** /**
* 更新时间 * 更新时间
*/ */
@TableField(fill = FieldFill.INSERT)
private Date gxsj; private Date gxsj;
public Long getIid() { public Long getIid() {
......
package com.zksy.szpt.domain.po; 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; import java.util.Date;
public class XxZhxx { public class XxZhxx {
/** /**
* IID * IID
*/ */
@TableId(type = IdType.ASSIGN_ID)
private Long iid; private Long iid;
/** /**
...@@ -121,11 +127,13 @@ public class XxZhxx { ...@@ -121,11 +127,13 @@ public class XxZhxx {
/** /**
* 创建时间 * 创建时间
*/ */
@TableField(fill = FieldFill.INSERT)
private Date cjsj; private Date cjsj;
/** /**
* 更新时间 * 更新时间
*/ */
@TableField(fill = FieldFill.INSERT)
private Date gxsj; private Date gxsj;
/** /**
......
...@@ -22,6 +22,7 @@ public class SzptMetaObjectHandler implements MetaObjectHandler { ...@@ -22,6 +22,7 @@ public class SzptMetaObjectHandler implements MetaObjectHandler {
List<StrictFill> fields = Arrays.asList( List<StrictFill> fields = Arrays.asList(
StrictFill.of("createTime", Date.class, new Date()), StrictFill.of("createTime", Date.class, new Date()),
StrictFill.of("cjsj", Date.class, new Date()), StrictFill.of("cjsj", Date.class, new Date()),
StrictFill.of("gxsj", Date.class, new Date()),
StrictFill.of("updateTime", Date.class, new Date()), StrictFill.of("updateTime", Date.class, new Date()),
StrictFill.of("sjgsdwdm", String.class, "1"), StrictFill.of("sjgsdwdm", String.class, "1"),
StrictFill.of("sjgsdwmc", String.class, "1"), StrictFill.of("sjgsdwmc", String.class, "1"),
......
package com.zksy.szpt.mapper; package com.zksy.szpt.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zksy.szpt.domain.po.XxZhjfbg; import com.zksy.szpt.domain.po.XxZhjfbg;
import com.zksy.szpt.domain.po.XxZhjfbgExample; import com.zksy.szpt.domain.po.XxZhjfbgExample;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
public interface XxZhjfbgMapper { public interface XxZhjfbgMapper extends BaseMapper<XxZhjfbg> {
long countByExample(XxZhjfbgExample example); long countByExample(XxZhjfbgExample example);
int deleteByExample(XxZhjfbgExample example); int deleteByExample(XxZhjfbgExample example);
int deleteByPrimaryKey(Long iid); int deleteByPrimaryKey(Long iid);
int insert(XxZhjfbg record); // int insert(XxZhjfbg record);
int insertSelective(XxZhjfbg record); int insertSelective(XxZhjfbg record);
......
package com.zksy.szpt.mapper; package com.zksy.szpt.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zksy.szpt.domain.po.XxZhxx; import com.zksy.szpt.domain.po.XxZhxx;
import com.zksy.szpt.domain.po.XxZhxxExample; import com.zksy.szpt.domain.po.XxZhxxExample;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
public interface XxZhxxMapper { public interface XxZhxxMapper extends BaseMapper<XxZhxx> {
long countByExample(XxZhxxExample example); long countByExample(XxZhxxExample example);
int deleteByExample(XxZhxxExample example); int deleteByExample(XxZhxxExample example);
int deleteByPrimaryKey(Long iid); int deleteByPrimaryKey(Long iid);
int insert(XxZhxx record); // int insert(XxZhxx record);
int insertSelective(XxZhxx record); int insertSelective(XxZhxx record);
......
...@@ -21,50 +21,74 @@ public class IndexService { ...@@ -21,50 +21,74 @@ public class IndexService {
@Resource @Resource
private SzptClockInMapper szptClockInMapper; private SzptClockInMapper szptClockInMapper;
public Integer addSzptClockIn(SzptClockInDTO szptClockInDTO){
SzptClockIn szptClockIn = BeanMapperUtil.map(szptClockInDTO,SzptClockIn.class); public Integer addSzptClockIn(SzptClockInDTO szptClockInDTO) {
SzptClockIn szptClockIn = BeanMapperUtil.map(szptClockInDTO, SzptClockIn.class);
return szptClockInMapper.insert(szptClockIn); return szptClockInMapper.insert(szptClockIn);
} }
@Resource @Resource
private SzptClockInRulesMapper szptClockInRulesMapper; private SzptClockInRulesMapper szptClockInRulesMapper;
public Integer addSzptClockInRules(SzptClockInRulesDTO szptClockInRulesDTO){
SzptClockInRules szptClockInRules = BeanMapperUtil.map(szptClockInRulesDTO,SzptClockInRules.class); public Integer addSzptClockInRules(SzptClockInRulesDTO szptClockInRulesDTO) {
SzptClockInRules szptClockInRules = BeanMapperUtil.map(szptClockInRulesDTO, SzptClockInRules.class);
return szptClockInRulesMapper.insert(szptClockInRules); return szptClockInRulesMapper.insert(szptClockInRules);
} }
@Resource @Resource
private SzptFwxxMapper szptFwxxMapper; private SzptFwxxMapper szptFwxxMapper;
public Integer addSzptFwxx(SzptFwxxDTO szptFwxxDTO){
SzptFwxx szptFwxx = BeanMapperUtil.map(szptFwxxDTO,SzptFwxx.class); public Integer addSzptFwxx(SzptFwxxDTO szptFwxxDTO) {
SzptFwxx szptFwxx = BeanMapperUtil.map(szptFwxxDTO, SzptFwxx.class);
return szptFwxxMapper.insert(szptFwxx); return szptFwxxMapper.insert(szptFwxx);
} }
@Resource @Resource
private SzptGdCsyjhldxMapper szptGdCsyjhldxMapper; private SzptGdCsyjhldxMapper szptGdCsyjhldxMapper;
public Integer addSzptGdCsyjhldx(SzptGdCsyjhldxDTO szptGdCsyjhldxDTO){
SzptGdCsyjhldx szptGdCsyjhldx = BeanMapperUtil.map(szptGdCsyjhldxDTO,SzptGdCsyjhldx.class); public Integer addSzptGdCsyjhldx(SzptGdCsyjhldxDTO szptGdCsyjhldxDTO) {
SzptGdCsyjhldx szptGdCsyjhldx = BeanMapperUtil.map(szptGdCsyjhldxDTO, SzptGdCsyjhldx.class);
return szptGdCsyjhldxMapper.insert(szptGdCsyjhldx); return szptGdCsyjhldxMapper.insert(szptGdCsyjhldx);
} }
@Resource @Resource
private SzptGdRyxxMapper szptGdRyxxMapper; private SzptGdRyxxMapper szptGdRyxxMapper;
public Integer addSzptGdRyxx(SzptGdRyxxDTO szptGdRyxxDTO){
SzptGdRyxx szptGdRyxx = BeanMapperUtil.map(szptGdRyxxDTO,SzptGdRyxx.class); public Integer addSzptGdRyxx(SzptGdRyxxDTO szptGdRyxxDTO) {
SzptGdRyxx szptGdRyxx = BeanMapperUtil.map(szptGdRyxxDTO, SzptGdRyxx.class);
return szptGdRyxxMapper.insert(szptGdRyxx); return szptGdRyxxMapper.insert(szptGdRyxx);
} }
@Resource @Resource
private SzptGdSbxxMapper szptGdSbxxMapper; private SzptGdSbxxMapper szptGdSbxxMapper;
public Integer addSzptGdSbxx(SzptGdSbxxDTO szptGdSbxxDTO){
SzptGdSbxx szptGdSbxx = BeanMapperUtil.map(szptGdSbxxDTO,SzptGdSbxx.class); public Integer addSzptGdSbxx(SzptGdSbxxDTO szptGdSbxxDTO) {
SzptGdSbxx szptGdSbxx = BeanMapperUtil.map(szptGdSbxxDTO, SzptGdSbxx.class);
return szptGdSbxxMapper.insert(szptGdSbxx); return szptGdSbxxMapper.insert(szptGdSbxx);
} }
@Resource @Resource
private SzptGdXxMapper szptGdXxMapper; private SzptGdXxMapper szptGdXxMapper;
public Integer addSzptGdXx(SzptGdXxDTO szptGdXxDTO){
SzptGdXx szptGdXx = BeanMapperUtil.map(szptGdXxDTO,SzptGdXx.class); public Integer addSzptGdXx(SzptGdXxDTO szptGdXxDTO) {
SzptGdXx szptGdXx = BeanMapperUtil.map(szptGdXxDTO, SzptGdXx.class);
return szptGdXxMapper.insert(szptGdXx); return szptGdXxMapper.insert(szptGdXx);
} }
@Resource
private XxZhxxMapper xxZhxxMapper;
public Integer addXxZhxx(XxZhxxDTO xxZhxxDTO) {
XxZhxx xxZhxx = BeanMapperUtil.map(xxZhxxDTO, XxZhxx.class);
return xxZhxxMapper.insert(xxZhxx);
}
@Resource
private XxZhjfbgMapper xxZhjfbgMapper;
public Integer addXxZhjfbg(XxZhjfbgDTO dto) {
XxZhjfbg xxZhjfbg = BeanMapperUtil.map(dto, XxZhjfbg.class);
return xxZhjfbgMapper.insert(xxZhjfbg);
}
} }
...@@ -3,18 +3,22 @@ package com.zksy.szpt; ...@@ -3,18 +3,22 @@ package com.zksy.szpt;
import cn.hutool.crypto.digest.DigestUtil; import cn.hutool.crypto.digest.DigestUtil;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.zksy.szpt.domain.dto.XxRwwcqkDTO; import com.zksy.szpt.domain.dto.XxZhjfbgDTO;
import com.zksy.szpt.domain.dto.XxZhxxDTO;
import com.zksy.szpt.service.AppStoreService; import com.zksy.szpt.service.AppStoreService;
import com.zksy.szpt.util.EncryptUtil; import com.zksy.szpt.util.EncryptUtil;
import com.zksy.szpt.util.SignatureUtil; import com.zksy.szpt.util.SignatureUtil;
import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.platform.commons.util.StringUtils;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.web.reactive.function.client.WebClient; import org.springframework.web.reactive.function.client.WebClient;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.sql.Struct;
import java.util.Date;
/** /**
* A simple unit test * A simple unit test
...@@ -22,7 +26,7 @@ import javax.annotation.Resource; ...@@ -22,7 +26,7 @@ import javax.annotation.Resource;
@SpringBootTest() @SpringBootTest()
public class MainTest { public class MainTest {
String nonce = "2"; String nonce = "2121";
String timestampStr = "21"; String timestampStr = "21";
String appId = "1"; String appId = "1";
...@@ -40,20 +44,64 @@ public class MainTest { ...@@ -40,20 +44,64 @@ public class MainTest {
@DisplayName("任务完成情况") @DisplayName("任务完成情况")
public void xxRwwcqkTest() { public void xxRwwcqkTest() {
timestampStr = String.valueOf(System.currentTimeMillis() / 1000); timestampStr = String.valueOf(System.currentTimeMillis() / 1000);
nonce=String.valueOf(System.currentTimeMillis() / 1000);
String secretKey = this.appStoreService.getAppSecretByAppKey(appId);
Assertions.assertNotNull(secretKey, "appId不存在");//断言appId存在,为空直接抛出异常不进行下一步测试,提高测试效率
// Assertions.fail(secretKey);
//请求参数
XxZhxxDTO dto = new XxZhxxDTO();
// dto.setZhid("123456");
dto.setXxyid("123456");
dto.setZt("1");
dto.setClbz("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/addXxZhxx")
.header(SignatureUtil.APPID, appId)
.header(SignatureUtil.NONCE, nonce)
.header(SignatureUtil.TIMESTAMP, timestampStr)
.header(SignatureUtil.SIGNATURE, generatedSignature)
.body(Mono.just(dto), XxZhxxDTO.class)
.retrieve()
.bodyToMono(String.class)
.block();
System.out.println(response);
}
/**
* 任务完成情况
*/
@Test
@DisplayName("任务完成情况")
public void test1() {
timestampStr = String.valueOf(System.currentTimeMillis() / 1000);
nonce=String.valueOf(System.currentTimeMillis() / 1000);
String secretKey = this.appStoreService.getAppSecretByAppKey(appId); String secretKey = this.appStoreService.getAppSecretByAppKey(appId);
Assertions.assertNotNull(secretKey, "appId不存在");//断言appId存在,为空直接抛出异常不进行下一步测试,提高测试效率 Assertions.assertNotNull(secretKey, "appId不存在");//断言appId存在,为空直接抛出异常不进行下一步测试,提高测试效率
// Assertions.fail(secretKey); // Assertions.fail(secretKey);
//请求参数 //请求参数
XxRwwcqkDTO xxRwwcqkDTO = new XxRwwcqkDTO(); XxZhjfbgDTO dto = new XxZhjfbgDTO();
xxRwwcqkDTO.setRwid("123456"); // dto.setZhid("123456");
xxRwwcqkDTO.setXxyid("123456"); dto.setDhid("123456");
xxRwwcqkDTO.setShrid("123456"); dto.setQbid("1");
xxRwwcqkDTO.setWczt("1"); dto.setBgsj(new Date());
xxRwwcqkDTO.setBmzt("1");
String json = null; String json = null;
try { try {
json = objectMapper.writeValueAsString(xxRwwcqkDTO); json = objectMapper.writeValueAsString(dto);
} catch (JsonProcessingException e) { } catch (JsonProcessingException e) {
Assertions.fail("json序列化失败"); Assertions.fail("json序列化失败");
} }
...@@ -67,12 +115,12 @@ public class MainTest { ...@@ -67,12 +115,12 @@ public class MainTest {
.baseUrl("http://localhost:8086") .baseUrl("http://localhost:8086")
.defaultHeader("Content-Type", "application/json") .defaultHeader("Content-Type", "application/json")
.build(); .build();
String response = webClient.post().uri("/rest/index/addXxRwwcqk") String response = webClient.post().uri("/rest/index/addXxZhjfbg")
.header(SignatureUtil.APPID, appId) .header(SignatureUtil.APPID, appId)
.header(SignatureUtil.NONCE, nonce) .header(SignatureUtil.NONCE, nonce)
.header(SignatureUtil.TIMESTAMP, timestampStr) .header(SignatureUtil.TIMESTAMP, timestampStr)
.header(SignatureUtil.SIGNATURE, generatedSignature) .header(SignatureUtil.SIGNATURE, generatedSignature)
.body(Mono.just(xxRwwcqkDTO), XxRwwcqkDTO.class) .body(Mono.just(dto), XxZhjfbgDTO.class)
.retrieve() .retrieve()
.bodyToMono(String.class) .bodyToMono(String.class)
.block(); .block();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment