新增获取授权信息相关SPI

20230922-ljl-fixBug
qiushengjie 1 year ago
parent c09176993e
commit 93348ee21d

@ -0,0 +1,19 @@
package com.ms.api.order;
import lombok.Data;
import java.util.Date;
import java.util.List;
/*
* 1688
*/
@Data
public class GetAuthShopMemberInfosRequestDTO {
/*
* id
*/
private String userId;
}

@ -5,6 +5,7 @@ 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.ItemDTO;
import com.ms.api.order.GetAuthShopMemberInfosRequestDTO;
import com.ms.api.spi.DsFormRequestTemplate;
import com.ms.api.util.UniqueKeyMultiValueMap;
import lombok.extern.slf4j.Slf4j;
@ -16,14 +17,20 @@ import org.springframework.util.MultiValueMap;
*/
@ExtensionService("order/getAuthShopMemberInfos")
@Slf4j
public class GetAuthShopMemberInfosService implements ExtensionServiceHandler<ItemDTO, String> {
public class GetAuthShopMemberInfosService implements ExtensionServiceHandler<GetAuthShopMemberInfosRequestDTO, String> {
@Autowired
private DsFormRequestTemplate dsFormRequestTemplate;
@Override
public BaseResponse<String> handle(BaseRequest<ItemDTO> req) {
public BaseResponse<String> handle(BaseRequest<GetAuthShopMemberInfosRequestDTO> req) {
// ----参数校验----
MultiValueMap<String, String> params = new UniqueKeyMultiValueMap<>();
params.add("userId",req.getUserId());
// ----逻辑校验----
// ----业务处理----
String res = null;
try {
res = dsFormRequestTemplate.execute("/order/getAuthShopMemberInfos", params);
@ -32,11 +39,13 @@ public class GetAuthShopMemberInfosService implements ExtensionServiceHandler<It
e.printStackTrace();
log.error(e.getMessage());
}
// ----结果返回----
return BaseResponse.<String>builder()
.success(true)
.message("success")
.data(res)
.code("10000")
.code("0")
.build();
}
}

Loading…
Cancel
Save