Commit 71e77ffe authored by wangjinjing's avatar wangjinjing

del bug修复

parent 0f90d6fb
package com.zksy.szpt.controller; package com.zksy.szpt.controller;
import com.zksy.szpt.domain.dto.CommonDelDTO;
import com.zksy.szpt.domain.dto.XxShxxyDTO; import com.zksy.szpt.domain.dto.XxShxxyDTO;
import com.zksy.szpt.domain.dto.XxShxxyDwDTO; import com.zksy.szpt.domain.dto.XxShxxyDwDTO;
import com.zksy.szpt.domain.dto.XxYjrwDTO; import com.zksy.szpt.domain.dto.XxYjrwDTO;
...@@ -37,8 +38,8 @@ public class XxShxxyController { ...@@ -37,8 +38,8 @@ public class XxShxxyController {
@ApiOperation(value = "删除社会信息员数据") @ApiOperation(value = "删除社会信息员数据")
@PostMapping("/delete") @PostMapping("/delete")
public Integer delete(@RequestParam(name = "xxyid") String xxyid) { public Integer delete(@RequestBody @Validated CommonDelDTO dto) {
return service.delete(xxyid); return service.delete(dto);
} }
} }
package com.zksy.szpt.controller; package com.zksy.szpt.controller;
import com.zksy.szpt.domain.dto.CommonDelDTO;
import com.zksy.szpt.domain.dto.XxShxxyDwDTO; import com.zksy.szpt.domain.dto.XxShxxyDwDTO;
import com.zksy.szpt.service.XxShxxyDwService; import com.zksy.szpt.service.XxShxxyDwService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -33,8 +34,8 @@ public class XxShxxyDwController { ...@@ -33,8 +34,8 @@ public class XxShxxyDwController {
@ApiOperation(value = "删除社会信息员队伍数据") @ApiOperation(value = "删除社会信息员队伍数据")
@PostMapping("/delete") @PostMapping("/delete")
public Integer delete(@RequestParam(name = "id") String id) { public Integer delete(@RequestBody @Validated CommonDelDTO dto) {
return service.delete(id); return service.delete(dto);
} }
} }
package com.zksy.szpt.controller; package com.zksy.szpt.controller;
import com.zksy.szpt.domain.dto.CommonDelDTO;
import com.zksy.szpt.domain.dto.XxYjdwdmDTO; import com.zksy.szpt.domain.dto.XxYjdwdmDTO;
import com.zksy.szpt.service.XxYjdwdmService; import com.zksy.szpt.service.XxYjdwdmService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -32,8 +33,8 @@ public class XxYjdwdmController { ...@@ -32,8 +33,8 @@ public class XxYjdwdmController {
@ApiOperation(value = "删除义警队伍数据") @ApiOperation(value = "删除义警队伍数据")
@PostMapping("/delete") @PostMapping("/delete")
public Integer delete(@RequestParam(name = "id") String id) { public Integer delete(@RequestBody @Validated CommonDelDTO dto) {
return service.delete(id); return service.delete(dto);
} }
} }
package com.zksy.szpt.controller; package com.zksy.szpt.controller;
import com.zksy.szpt.domain.dto.CommonDelDTO;
import com.zksy.szpt.domain.dto.XxYjrwDTO; import com.zksy.szpt.domain.dto.XxYjrwDTO;
import com.zksy.szpt.service.XxYjrwService; import com.zksy.szpt.service.XxYjrwService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -32,8 +33,8 @@ public class XxYjrwController { ...@@ -32,8 +33,8 @@ public class XxYjrwController {
@ApiOperation(value = "删除义警任务信息数据") @ApiOperation(value = "删除义警任务信息数据")
@PostMapping("/delete") @PostMapping("/delete")
public Integer delete(@RequestParam(name = "rwid") String rwid) { public Integer delete(@RequestBody @Validated CommonDelDTO dto) {
return service.delete(rwid); return service.delete(dto);
} }
} }
package com.zksy.szpt.controller; package com.zksy.szpt.controller;
import com.zksy.szpt.domain.dto.CommonDelDTO;
import com.zksy.szpt.domain.dto.XxZhjfbgDTO; import com.zksy.szpt.domain.dto.XxZhjfbgDTO;
import com.zksy.szpt.service.XxZhjfbgService; import com.zksy.szpt.service.XxZhjfbgService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -33,8 +34,8 @@ public class XxZhjfbgController { ...@@ -33,8 +34,8 @@ public class XxZhjfbgController {
@ApiOperation(value = "删除账户积分变更数据") @ApiOperation(value = "删除账户积分变更数据")
@PostMapping("/delete") @PostMapping("/delete")
public Integer delete(@RequestParam(name = "dhid") String dhid) { public Integer delete(@RequestBody @Validated CommonDelDTO dto) {
return service.delete(dhid); return service.delete(dto);
} }
} }
...@@ -33,8 +33,8 @@ public class XxZhxxController { ...@@ -33,8 +33,8 @@ public class XxZhxxController {
@ApiOperation(value = "删除账号信息数据") @ApiOperation(value = "删除账号信息数据")
@PostMapping("/delete") @PostMapping("/delete")
public Integer delete(@RequestParam(name = "zhid") String zhid) { public Integer delete(@RequestBody @Validated CommonDelDTO dto) {
return service.delete(zhid); return service.delete(dto);
} }
} }
package com.zksy.szpt.domain.dto;
import javax.validation.constraints.NotEmpty;
import java.util.List;
public class CommonDelDTO {
/**
* 账户ID
*/
@NotEmpty(message = "账户ID不能为空")
private List<String> ids;
public @NotEmpty(message = "账户ID不能为空") List<String> getIds() {
return ids;
}
public void setIds(@NotEmpty(message = "账户ID不能为空") List<String> ids) {
this.ids = ids;
}
}
\ No newline at end of file
...@@ -2,6 +2,7 @@ package com.zksy.szpt.service; ...@@ -2,6 +2,7 @@ package com.zksy.szpt.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.zksy.szpt.domain.dto.CommonDelDTO;
import com.zksy.szpt.domain.dto.XxShxxyDwDTO; import com.zksy.szpt.domain.dto.XxShxxyDwDTO;
import com.zksy.szpt.domain.po.XxShxxyDw; import com.zksy.szpt.domain.po.XxShxxyDw;
import com.zksy.szpt.mapper.XxShxxyDwMapper; import com.zksy.szpt.mapper.XxShxxyDwMapper;
...@@ -30,9 +31,9 @@ public class XxShxxyDwService { ...@@ -30,9 +31,9 @@ public class XxShxxyDwService {
} }
public Integer delete(String id) { public Integer delete(CommonDelDTO dto) {
LambdaQueryWrapper<XxShxxyDw> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<XxShxxyDw> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(XxShxxyDw::getId, id); wrapper.in(XxShxxyDw::getId, dto.getIds());
return xxShxxyDwMapper.delete(wrapper); return xxShxxyDwMapper.delete(wrapper);
} }
} }
...@@ -2,6 +2,7 @@ package com.zksy.szpt.service; ...@@ -2,6 +2,7 @@ package com.zksy.szpt.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.zksy.szpt.domain.dto.CommonDelDTO;
import com.zksy.szpt.domain.dto.XxShxxyDTO; import com.zksy.szpt.domain.dto.XxShxxyDTO;
import com.zksy.szpt.domain.po.XxShxxy; import com.zksy.szpt.domain.po.XxShxxy;
import com.zksy.szpt.mapper.XxShxxyMapper; import com.zksy.szpt.mapper.XxShxxyMapper;
...@@ -30,9 +31,9 @@ public class XxShxxyService { ...@@ -30,9 +31,9 @@ public class XxShxxyService {
} }
public Integer delete(String id) { public Integer delete(CommonDelDTO dto ) {
LambdaQueryWrapper<XxShxxy> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<XxShxxy> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(XxShxxy::getXxyid, id); wrapper.in(XxShxxy::getXxyid, dto.getIds());
return xxShxxyMapper.delete(wrapper); return xxShxxyMapper.delete(wrapper);
} }
} }
...@@ -2,6 +2,7 @@ package com.zksy.szpt.service; ...@@ -2,6 +2,7 @@ package com.zksy.szpt.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.zksy.szpt.domain.dto.CommonDelDTO;
import com.zksy.szpt.domain.dto.XxYjdwdmDTO; import com.zksy.szpt.domain.dto.XxYjdwdmDTO;
import com.zksy.szpt.domain.po.XxYjdwdm; import com.zksy.szpt.domain.po.XxYjdwdm;
import com.zksy.szpt.mapper.XxYjdwdmMapper; import com.zksy.szpt.mapper.XxYjdwdmMapper;
...@@ -29,9 +30,9 @@ public class XxYjdwdmService { ...@@ -29,9 +30,9 @@ public class XxYjdwdmService {
} }
public Integer delete(String id) { public Integer delete(CommonDelDTO dto) {
LambdaQueryWrapper<XxYjdwdm> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<XxYjdwdm> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(XxYjdwdm::getId, id); wrapper.in(XxYjdwdm::getId, dto.getIds());
return xxYjdwdmMapper.delete(wrapper); return xxYjdwdmMapper.delete(wrapper);
} }
} }
...@@ -2,6 +2,7 @@ package com.zksy.szpt.service; ...@@ -2,6 +2,7 @@ package com.zksy.szpt.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.zksy.szpt.domain.dto.CommonDelDTO;
import com.zksy.szpt.domain.dto.XxYjrwDTO; import com.zksy.szpt.domain.dto.XxYjrwDTO;
import com.zksy.szpt.domain.po.XxYjrw; import com.zksy.szpt.domain.po.XxYjrw;
import com.zksy.szpt.mapper.XxYjrwMapper; import com.zksy.szpt.mapper.XxYjrwMapper;
...@@ -29,9 +30,9 @@ public class XxYjrwService { ...@@ -29,9 +30,9 @@ public class XxYjrwService {
} }
public Integer delete(String id) { public Integer delete(CommonDelDTO dto) {
LambdaQueryWrapper<XxYjrw> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<XxYjrw> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(XxYjrw::getRwid, id); wrapper.in(XxYjrw::getRwid, dto.getIds());
return xxYjrwMapper.delete(wrapper); return xxYjrwMapper.delete(wrapper);
} }
} }
...@@ -2,11 +2,13 @@ package com.zksy.szpt.service; ...@@ -2,11 +2,13 @@ package com.zksy.szpt.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.zksy.szpt.domain.dto.CommonDelDTO;
import com.zksy.szpt.domain.dto.XxZhjfbgDTO; import com.zksy.szpt.domain.dto.XxZhjfbgDTO;
import com.zksy.szpt.domain.po.XxZhjfbg; import com.zksy.szpt.domain.po.XxZhjfbg;
import com.zksy.szpt.mapper.XxZhjfbgMapper; import com.zksy.szpt.mapper.XxZhjfbgMapper;
import com.zksy.szpt.util.BeanMapperUtil; import com.zksy.szpt.util.BeanMapperUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import javax.annotation.Resource; import javax.annotation.Resource;
...@@ -29,9 +31,9 @@ public class XxZhjfbgService { ...@@ -29,9 +31,9 @@ public class XxZhjfbgService {
} }
public Integer delete(String id) { public Integer delete(CommonDelDTO dto) {
LambdaQueryWrapper<XxZhjfbg> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<XxZhjfbg> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(XxZhjfbg::getDhid, id); wrapper.in(XxZhjfbg::getDhid, dto.getIds());
return xxZhjfbgMapper.delete(wrapper); return xxZhjfbgMapper.delete(wrapper);
} }
} }
...@@ -28,9 +28,9 @@ public class XxZhxxService { ...@@ -28,9 +28,9 @@ public class XxZhxxService {
} }
public Integer delete(String zhid) { public Integer delete(CommonDelDTO dto) {
LambdaQueryWrapper<XxZhxx> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<XxZhxx> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(XxZhxx::getZhid, zhid); wrapper.in(XxZhxx::getZhid, dto.getIds());
return xxZhxxMapper.delete(wrapper); return xxZhxxMapper.delete(wrapper);
} }
} }
...@@ -14,13 +14,11 @@ import org.junit.jupiter.api.Assertions; ...@@ -14,13 +14,11 @@ 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.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.web.reactive.function.BodyInserters;
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.util.Date; import java.util.*;
import java.util.UUID;
/** /**
* A simple unit test * A simple unit test
...@@ -38,6 +36,7 @@ public class MainTest { ...@@ -38,6 +36,7 @@ public class MainTest {
@Resource @Resource
private AppStoreService appStoreService; private AppStoreService appStoreService;
/** /**
* 任务完成情况 * 任务完成情况
*/ */
...@@ -90,7 +89,7 @@ public class MainTest { ...@@ -90,7 +89,7 @@ public class MainTest {
@DisplayName("任务完成情况") @DisplayName("任务完成情况")
public void xxRwwcqkTest1() { public void xxRwwcqkTest1() {
timestampStr = String.valueOf(System.currentTimeMillis() / 1000); timestampStr = String.valueOf(System.currentTimeMillis() / 1000);
nonce=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);
...@@ -135,7 +134,7 @@ public class MainTest { ...@@ -135,7 +134,7 @@ public class MainTest {
@DisplayName("任务完成情况") @DisplayName("任务完成情况")
public void test1() { public void test1() {
timestampStr = String.valueOf(System.currentTimeMillis() / 1000); timestampStr = String.valueOf(System.currentTimeMillis() / 1000);
nonce=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);
...@@ -224,7 +223,7 @@ public class MainTest { ...@@ -224,7 +223,7 @@ public class MainTest {
@DisplayName("任务完成情况") @DisplayName("任务完成情况")
public void test4() { public void test4() {
timestampStr = String.valueOf(System.currentTimeMillis() / 1000); timestampStr = String.valueOf(System.currentTimeMillis() / 1000);
nonce=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);
...@@ -264,6 +263,7 @@ public class MainTest { ...@@ -264,6 +263,7 @@ public class MainTest {
.block(); .block();
System.out.println(response); System.out.println(response);
} }
/** /**
* 任务完成情况 * 任务完成情况
*/ */
...@@ -271,7 +271,7 @@ public class MainTest { ...@@ -271,7 +271,7 @@ public class MainTest {
@DisplayName("任务完成情况") @DisplayName("任务完成情况")
public void test5() { public void test5() {
timestampStr = String.valueOf(System.currentTimeMillis() / 1000); timestampStr = String.valueOf(System.currentTimeMillis() / 1000);
nonce=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);
...@@ -315,7 +315,7 @@ public class MainTest { ...@@ -315,7 +315,7 @@ public class MainTest {
@DisplayName("任务完成情况") @DisplayName("任务完成情况")
public void test6() { public void test6() {
timestampStr = String.valueOf(System.currentTimeMillis() / 1000); timestampStr = String.valueOf(System.currentTimeMillis() / 1000);
nonce=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存在,为空直接抛出异常不进行下一步测试,提高测试效率
//请求参数 //请求参数
...@@ -355,7 +355,7 @@ public class MainTest { ...@@ -355,7 +355,7 @@ public class MainTest {
@DisplayName("任务完成情况") @DisplayName("任务完成情况")
public void test7() { public void test7() {
timestampStr = String.valueOf(System.currentTimeMillis() / 1000); timestampStr = String.valueOf(System.currentTimeMillis() / 1000);
nonce=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存在,为空直接抛出异常不进行下一步测试,提高测试效率
//请求参数 //请求参数
...@@ -397,36 +397,51 @@ public class MainTest { ...@@ -397,36 +397,51 @@ public class MainTest {
@DisplayName("任务完成情况") @DisplayName("任务完成情况")
public void testdelete() { public void testdelete() {
timestampStr = String.valueOf(System.currentTimeMillis() / 1000); timestampStr = String.valueOf(System.currentTimeMillis() / 1000);
nonce=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存在,为空直接抛出异常不进行下一步测试,提高测试效率
//请求参数 //请求参数
String json = ""; String number = "1";
String[] str = new String[1];
str[0] = number;
String json = null;
List<String> ids = new ArrayList<>();
ids.add("1");
CommonDelDTO dto=new CommonDelDTO();
dto.setIds(ids);
try {
json = objectMapper.writeValueAsString(dto);
} catch (JsonProcessingException e) {
Assertions.fail("json序列化失败");
}
//请求体加密 //请求体加密
json = EncryptUtil.getInstance().AESEncode(json, secretKey); String json1 = EncryptUtil.getInstance().AESEncode(json, secretKey);
//签名appId+nonce+timestampStr+aes(body) //签名appId+nonce+timestampStr+aes(body)
String data = String.format("%s%s%s%s", appId, nonce, timestampStr, json); String data = String.format("%s%s%s%s", appId, nonce, timestampStr, json1);
String generatedSignature = DigestUtil.md5Hex(data); String generatedSignature = DigestUtil.md5Hex(data);
//请求 //请求
WebClient webClient = WebClient.builder() WebClient webClient = WebClient.builder()
.baseUrl("http://localhost:8086") .baseUrl("http://localhost:8086")
.defaultHeader("Content-Type", "application/json") .defaultHeader("Content-Type", "application/json")
.build(); .build();
String url="xxShxxyDw/delete?id=1"; // String url="xxShxxyDw/delete";
// String url="xxShxxy/delete?xxyid=1"; // String url="xxShxxy/delete";
// String url="xxYjdwdm/delete?xxyid=1"; // String url="xxYjdwdm/delete";
// String url="xxYjrw/delete?rwid=1"; // String url="xxYjrw/delete";
// //
// String url="xxZhjfbg/delete?dhid=1"; String url="xxZhjfbg/delete";
// //
// String url="xxZhxx/delete?zhid=1";
String response = webClient.post().uri("/rest/"+url) // String url = "xxZhxx/delete";
String response = webClient.post().uri("/rest/" + url)
.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(BodyInserters.empty()) .body(Mono.just(dto), CommonDelDTO.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