新增调用DS请求相关工具类
parent
06a18a94c5
commit
e84d3b5dd5
@ -0,0 +1,36 @@
|
||||
package com.ms.api;
|
||||
|
||||
import com.jinritemai.cloud.base.api.BaseRequest;
|
||||
import com.jinritemai.cloud.base.api.BaseResponse;
|
||||
import com.jinritemai.cloud.base.api.ExtensionService;
|
||||
import com.jinritemai.cloud.base.api.ExtensionServiceHandler;
|
||||
import com.ms.api.spi.DsRequestTemplate;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@ExtensionService("dsRequest")
|
||||
@Slf4j
|
||||
public class DsRequestService implements ExtensionServiceHandler<ItemDTO, Integer> {
|
||||
|
||||
@Autowired
|
||||
private DsRequestTemplate dsRequestTemplate;
|
||||
|
||||
@Override
|
||||
public BaseResponse<Integer> handle(BaseRequest<ItemDTO> req) {
|
||||
Map params = new HashMap<>();
|
||||
params.put("userId", "2332");
|
||||
params.put("platform", "ddMicroApp");
|
||||
params.put("platformOrders", "sdsdsdsd");
|
||||
params.put("operateInfo", "123,123.123.123.123");
|
||||
params.put("purchaseSource", "dsfsdfsdf");
|
||||
try {
|
||||
dsRequestTemplate.execute("/order/batchAddPurchaseConfirmLog", params);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue