Merge branch 'master' of codeup.aliyun.com:64d9c5feeceb191898f636d7/honor-dd-light-ds-java

20230922-ljl-fixBug
cxxxxxxx详 1 year ago
commit 6a0b7e8a30

@ -26,40 +26,42 @@ public class TestSignService implements ExtensionServiceHandler<ItemDTO, String>
public BaseResponse<String> handle(BaseRequest<ItemDTO> req) {
HashMap<String, Object> params = new HashMap<>();
// List<String> arrayString = new ArrayList<>();
// arrayString.add("arrayString1");
// arrayString.add("arrayString2");
// params.put("arrayString", arrayString);
////
// HashMap<String, String> mapStringString = new HashMap<>();
// mapStringString.put("A","mapStringString1");
// mapStringString.put("B","mapStringString2");
// params.put("mapStringString", mapStringString);
////
// List<Integer> arrayInt64 = new ArrayList<>();
// arrayInt64.add(10000);
// arrayInt64.add(10000);
// params.put("arrayInt64", arrayInt64);
////
// params.put("int16", 10000);
// params.put("int32", 10000);
// params.put("int64", 10000);
// params.put("double", 10.1);
// params.put("string", "test");
List<String> arrayString = new ArrayList<>();
arrayString.add("arrayString1");
arrayString.add("arrayString2");
params.put("arrayString", arrayString);
HashMap<String, String> mapStringString = new HashMap<>();
mapStringString.put("A","mapStringString1");
mapStringString.put("B","mapStringString2");
params.put("mapStringString", mapStringString);
List<Integer> arrayInt64 = new ArrayList<>();
arrayInt64.add(10000);
arrayInt64.add(10000);
params.put("arrayInt64", arrayInt64);
params.put("int16", 10000);
params.put("int32", 10000);
params.put("int64", 10000);
params.put("double", 10.1);
params.put("string", "test");
params.put("struct1", new GetCurrentShopMoveSettingRequestDTO());
params.put("struct2", new GetMoveHistoryProductListRequestDTO());
params.put("struct3", new SaveBatchMoveTaskRequestDTO());
// params.put("struct", new GetCurrentShopMoveSettingRequestDTO());
//
List<Object> arrayStruct = new LinkedList<>();
arrayStruct.add(new GetCurrentShopMoveSettingRequestDTO());
arrayStruct.add(new GetMoveHistoryProductListRequestDTO());
arrayStruct.add(new SaveBatchMoveTaskRequestDTO());
params.put("arrayStruct", arrayStruct);
//
// Map<String,Object> mapStringStruct = new HashMap<>();
// mapStringStruct.put("mapstruct1", new GetCurrentShopMoveSettingRequestDTO());
// mapStringStruct.put("mapstruct2", new GetMoveHistoryProductListRequestDTO());
// mapStringStruct.put("mapstruct3", new SaveBatchMoveTaskRequestDTO());
// params.put("mapStringStruct", mapStringStruct);
Map<String,Object> mapStringStruct = new HashMap<>();
mapStringStruct.put("mapstruct1", new GetCurrentShopMoveSettingRequestDTO());
mapStringStruct.put("mapstruct2", new GetMoveHistoryProductListRequestDTO());
mapStringStruct.put("mapstruct3", new SaveBatchMoveTaskRequestDTO());
params.put("mapStringStruct", mapStringStruct);
String res = null;
try {

@ -2,6 +2,7 @@ package com.ms.api.tool;
import cn.hutool.crypto.SecureUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@ -72,9 +73,9 @@ public class DsJsonRequestTemplate {
sb.append(s).append(value);
}
sb.append(dsToken);
log.info("row sign sb:" + sb);
log.info("row str:" + sb);
String sign = SecureUtil.md5(sb.toString());
log.info("sign:" + sign);
log.info("sign str:" + sign);
headers.set("x-dd-micro-app-sign", sign);
return cloudRequestTemplate.executePost(dsHost + url, JSON.toJSONString(params), headers);

Loading…
Cancel
Save