|
|
|
@ -1,5 +1,7 @@
|
|
|
|
|
package com.ms.biz.spi.callback;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.jinritemai.cloud.base.api.BaseRequest;
|
|
|
|
|
import com.jinritemai.cloud.base.api.BaseResponse;
|
|
|
|
|
import com.jinritemai.cloud.base.api.ExtensionService;
|
|
|
|
@ -15,18 +17,18 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
@ExtensionService("querySupplyPlatformAuth")
|
|
|
|
|
@Slf4j
|
|
|
|
|
@AllArgsConstructor
|
|
|
|
|
public class QuerySupplyPlatformAuthService extends SPIBaseService implements ExtensionServiceHandler<QuerySupplyPlatformAuthParam, QuerySupplyPlatformAuthData> {
|
|
|
|
|
public class QuerySupplyPlatformAuthService extends SPIBaseService implements ExtensionServiceHandler<QuerySupplyPlatformAuthParam, JSONObject> {
|
|
|
|
|
private ShopService shopService;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public BaseResponse<QuerySupplyPlatformAuthData> handle(BaseRequest<QuerySupplyPlatformAuthParam> req) {
|
|
|
|
|
public BaseResponse<JSONObject> handle(BaseRequest<QuerySupplyPlatformAuthParam> req) {
|
|
|
|
|
try {
|
|
|
|
|
QuerySupplyPlatformAuthParam param = req.getData();
|
|
|
|
|
QuerySupplyPlatformAuthData data = new QuerySupplyPlatformAuthData();
|
|
|
|
|
shopService.querySupplyPlatformAuth(param, data);
|
|
|
|
|
return BaseResponse.<QuerySupplyPlatformAuthData>builder().success(true).message("success").code("0").data(data).build();
|
|
|
|
|
return BaseResponse.<JSONObject>builder().success(true).message("success").code("0").data(JSON.parseObject(JSON.toJSONString(data))).build();
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
return BaseResponse.<QuerySupplyPlatformAuthData>builder().success(true).message(e.getMessage()).code("100003").build();
|
|
|
|
|
return BaseResponse.<JSONObject>builder().success(true).message(e.getMessage()).code("100003").build();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|