feat:正元远程调用
This commit is contained in:
1 parent
41bab57295
commit
00d159c8c0
20 files changed
+322
-45
No files matched your search
+93
@@ -0,0 +1,93 @@
|
||||
package com.bsd.pjcloud.thirdparty.api.feign;
|
||||
|
||||
import com.bsd.pjcloud.common.core.constant.ServiceNameConstants;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.feign.annotation.NoToken;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.foreign.ZyForeignSyncNativeCardTradeInfoDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.stride.ZyStrideAuthenticationDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.stride.ZyStrideConsumptionDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.stride.ZyStrideCorrectDto;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.foreign.ZyForeignSyncNativeCardTradeInfoVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.mer.ZyMerSyncAccClassInfoVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.mer.ZyMerSyncAccountInfoVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.mer.ZyMerSyncDealerInfoVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.mer.ZyMerSyncEnterpriseInfoVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.stride.ZyStrideAuthenticationVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.stride.ZyStrideConsumptionVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.stride.ZyStrideCorrectVo;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@FeignClient(contextId = "remoterThirdZyService", value = ServiceNameConstants.THIRDPARTY_SERVICE)
|
||||
public interface RemoterThirdZyService {
|
||||
|
||||
/* ************************************* start 正元本地一卡通交易数据同步 start ************************************* */
|
||||
|
||||
/**
|
||||
* 本地一卡通交易数据同步
|
||||
*/
|
||||
@NoToken
|
||||
@GetMapping("/third-zy-foreign/sync-native-card")
|
||||
R<ZyForeignSyncNativeCardTradeInfoVo> syncNativeCardTradeInfoApi(@RequestBody ZyForeignSyncNativeCardTradeInfoDto dto);
|
||||
|
||||
/* ************************************* end 正元本地一卡通交易数据同步 end ************************************* */
|
||||
|
||||
|
||||
/* ************************************* start 数据同步 start ************************************* */
|
||||
|
||||
/**
|
||||
* 商户信息同步
|
||||
*/
|
||||
@NoToken
|
||||
@GetMapping("/third-zy-mer/sync-dealer-info")
|
||||
R<ZyMerSyncDealerInfoVo> syncDealerInfo(@RequestBody ZyForeignSyncNativeCardTradeInfoDto dto);
|
||||
|
||||
/**
|
||||
* 记账单位同步
|
||||
*/
|
||||
@NoToken
|
||||
@GetMapping("/third-zy-mer/sync-enterprise-info")
|
||||
R<ZyMerSyncEnterpriseInfoVo> syncEnterpriseInfoApi(@RequestBody ZyForeignSyncNativeCardTradeInfoDto dto);
|
||||
|
||||
/**
|
||||
* 账户信息同步
|
||||
*/
|
||||
@NoToken
|
||||
@GetMapping("/third-zy-mer/sync-account-info")
|
||||
R<ZyMerSyncAccountInfoVo> syncAccountInfoApi(@RequestBody ZyForeignSyncNativeCardTradeInfoDto dto);
|
||||
|
||||
/**
|
||||
* 身份信息同步
|
||||
*/
|
||||
@NoToken
|
||||
@GetMapping("/third-zy-mer/sync-acc-class-info")
|
||||
R<ZyMerSyncAccClassInfoVo> syncAccClassInfoApi(@RequestBody ZyForeignSyncNativeCardTradeInfoDto dto);
|
||||
|
||||
/* ************************************* end 数据同步 end ************************************* */
|
||||
|
||||
/* ************************************* start 数据同步 start ************************************* */
|
||||
|
||||
/**
|
||||
* 统一身份验证功能
|
||||
*/
|
||||
@NoToken
|
||||
@GetMapping("/third-zy-stride/authentication")
|
||||
R<ZyStrideAuthenticationVo> authenticationApi(@RequestBody ZyStrideAuthenticationDto dto);
|
||||
|
||||
/**
|
||||
* 智慧园区通刷平台提供消费接口
|
||||
*/
|
||||
@NoToken
|
||||
@GetMapping("/third-zy-stride/consumption")
|
||||
R<ZyStrideConsumptionVo> consumptionApi(@RequestBody ZyStrideConsumptionDto dto);
|
||||
|
||||
/**
|
||||
* 智慧园区通刷平台提供冲正接口
|
||||
*/
|
||||
@NoToken
|
||||
@GetMapping("/third-zy-stride/correct")
|
||||
R<ZyStrideCorrectVo> correctApi(@RequestBody ZyStrideCorrectDto dto);
|
||||
|
||||
/* ************************************* end 数据同步 end ************************************* */
|
||||
}
|
||||
+1
@@ -1 +1,2 @@
|
||||
com.bsd.pjcloud.thirdparty.api.feign.RemoterThirdPartyAuthService
|
||||
com.bsd.pjcloud.thirdparty.api.feign.RemoterThirdZyService
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.bsd.pjcloud.thirdparty.controller.zy;
|
||||
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.security.annotation.Inner;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.foreign.ZyForeignSyncNativeCardTradeInfoDto;
|
||||
import com.bsd.pjcloud.thirdparty.service.impl.ThirdZyForeignService;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.foreign.ZyForeignSyncNativeCardTradeInfoVo;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/third-zy-foreign")
|
||||
@Tag(description = "third-zy-foreign", name = "正元本地一卡通交易数据同步")
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class ThirdZyForeignController {
|
||||
|
||||
private final ThirdZyForeignService zyForeignService;
|
||||
|
||||
/* ************************************* start 原创调用 start ************************************* */
|
||||
|
||||
@Inner
|
||||
@Operation(summary = "本地一卡通交易数据同步")
|
||||
@GetMapping("/sync-native-card")
|
||||
public R<ZyForeignSyncNativeCardTradeInfoVo> syncNativeCardTradeInfoApi(@RequestBody ZyForeignSyncNativeCardTradeInfoDto dto) {
|
||||
return R.ok(zyForeignService.syncNativeCardTradeInfoApi(dto));
|
||||
}
|
||||
|
||||
/* ************************************* end 原创调用 end ************************************* */
|
||||
|
||||
}
|
||||
+1
-1
@@ -30,7 +30,7 @@ import java.util.List;
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/third-zy-log")
|
||||
@Tag(description = "thirdZyLog", name = "正元日志表管理")
|
||||
@Tag(description = "third-zy-log", name = "正元日志表管理")
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class ThirdZyLogController {
|
||||
|
||||
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package com.bsd.pjcloud.thirdparty.controller.zy;
|
||||
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.security.annotation.Inner;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.foreign.ZyForeignSyncNativeCardTradeInfoDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.mer.ZyMerSyncAccClassInfoDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.mer.ZyMerSyncAccountInfoDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.mer.ZyMerSyncDealerInfoDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.mer.ZyMerSyncEnterpriseInfoDto;
|
||||
import com.bsd.pjcloud.thirdparty.service.impl.ThirdZyMerService;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.foreign.ZyForeignSyncNativeCardTradeInfoVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.mer.ZyMerSyncAccClassInfoVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.mer.ZyMerSyncAccountInfoVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.mer.ZyMerSyncDealerInfoVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.mer.ZyMerSyncEnterpriseInfoVo;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/third-zy-mer")
|
||||
@Tag(description = "third-zy-mer", name = "数据同步")
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class ThirdZyMerController {
|
||||
|
||||
private final ThirdZyMerService thirdZyMerService;
|
||||
|
||||
/* ************************************* start 原创调用 start ************************************* */
|
||||
|
||||
@Inner
|
||||
@Operation(summary = "商户信息同步")
|
||||
@GetMapping("/sync-dealer-info")
|
||||
public R<ZyMerSyncDealerInfoVo> syncDealerInfo(@RequestBody List<ZyMerSyncDealerInfoDto> dto) {
|
||||
return R.ok(thirdZyMerService.syncDealerInfoApi(dto));
|
||||
}
|
||||
|
||||
@Inner
|
||||
@Operation(summary = "记账单位同步")
|
||||
@GetMapping("/sync-enterprise-info")
|
||||
public R<ZyMerSyncEnterpriseInfoVo> syncEnterpriseInfoApi(@RequestBody List<ZyMerSyncEnterpriseInfoDto> dto) {
|
||||
return R.ok(thirdZyMerService.syncEnterpriseInfoApi(dto));
|
||||
}
|
||||
|
||||
@Inner
|
||||
@Operation(summary = "账户信息同步")
|
||||
@GetMapping("/sync-account-info")
|
||||
public R<ZyMerSyncAccountInfoVo> syncAccountInfoApi(@RequestBody List<ZyMerSyncAccountInfoDto> dto) {
|
||||
return R.ok(thirdZyMerService.syncAccountInfoApi(dto));
|
||||
}
|
||||
|
||||
@Inner
|
||||
@Operation(summary = "身份信息同步")
|
||||
@GetMapping("/sync-acc-class-info")
|
||||
public R<ZyMerSyncAccClassInfoVo> syncAccClassInfoApi(@RequestBody List<ZyMerSyncAccClassInfoDto> dto) {
|
||||
return R.ok(thirdZyMerService.syncAccClassInfoApi(dto));
|
||||
}
|
||||
|
||||
/* ************************************* end 原创调用 end ************************************* */
|
||||
|
||||
}
|
||||
+5
-5
@@ -4,7 +4,7 @@ import com.bsd.pjcloud.common.idempotent.annotation.Idempotent;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.self.ZySelfCorrectDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.self.ZySelfGetTokenDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.self.ZySelfPayDto;
|
||||
import com.bsd.pjcloud.thirdparty.service.impl.ZySelfService;
|
||||
import com.bsd.pjcloud.thirdparty.service.impl.ThirdZySelfService;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.self.ZySelfCorrectVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.self.ZySelfGetTokenVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.self.ZySelfPayVo;
|
||||
@@ -19,12 +19,12 @@ import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/third/zy")
|
||||
@Tag(description = "thirdPartyDept", name = "正元接口对接")
|
||||
@RequestMapping("/third-zy-self")
|
||||
@Tag(description = "/third-zy-self", name = "正元接口对接")
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class ZySelfController {
|
||||
public class ThirdZySelfController {
|
||||
|
||||
private final ZySelfService zySelfService;
|
||||
private final ThirdZySelfService zySelfService;
|
||||
|
||||
@GetMapping("/checkSystemStatus")
|
||||
@Operation(summary = "第三方url健康探测", description = "第三方url健康探测")
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
package com.bsd.pjcloud.thirdparty.controller.zy;
|
||||
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.security.annotation.Inner;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.stride.ZyStrideAuthenticationDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.stride.ZyStrideConsumptionDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.stride.ZyStrideCorrectDto;
|
||||
import com.bsd.pjcloud.thirdparty.service.impl.ThirdZyStrideService;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.stride.ZyStrideAuthenticationVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.stride.ZyStrideConsumptionVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.stride.ZyStrideCorrectVo;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/third-zy-stride")
|
||||
@Tag(description = "third/zy/stride", name = "跨单位交易")
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class ThirdZyStrideController {
|
||||
|
||||
private final ThirdZyStrideService thirdZyStrideService;
|
||||
|
||||
/* ************************************* start 原创调用 start ************************************* */
|
||||
|
||||
@Inner
|
||||
@Operation(summary = "统一身份验证功能")
|
||||
@GetMapping("/authentication")
|
||||
public R<ZyStrideAuthenticationVo> authenticationApi(@RequestBody ZyStrideAuthenticationDto dto) {
|
||||
return R.ok(thirdZyStrideService.authenticationApi(dto));
|
||||
}
|
||||
|
||||
@Inner
|
||||
@Operation(summary = "智慧园区通刷平台提供消费接口")
|
||||
@GetMapping("/consumption")
|
||||
public R<ZyStrideConsumptionVo> syncDealerInfo(@RequestBody ZyStrideConsumptionDto dto) {
|
||||
return R.ok(thirdZyStrideService.consumptionApi(dto));
|
||||
}
|
||||
|
||||
@Inner
|
||||
@Operation(summary = "智慧园区通刷平台提供冲正接口")
|
||||
@GetMapping("/correct")
|
||||
public R<ZyStrideCorrectVo> correctApi(@RequestBody ZyStrideCorrectDto dto) {
|
||||
return R.ok(thirdZyStrideService.correctApi(dto));
|
||||
}
|
||||
|
||||
/* ************************************* end 原创调用 end ************************************* */
|
||||
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package com.bsd.pjcloud.thirdparty.service;
|
||||
|
||||
public interface ZyDoForeignService {
|
||||
public interface ThirdZyDoForeignService {
|
||||
|
||||
// 本地一卡通交易数据同步
|
||||
void syncNativeCardTradeInfo();
|
||||
+1
-2
@@ -1,11 +1,10 @@
|
||||
package com.bsd.pjcloud.thirdparty.service.impl;
|
||||
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.foreign.ZyForeignGetRegionIdByTokenDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.foreign.ZyForeignSyncNativeCardTradeInfoDto;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.foreign.ZyForeignGetRegionIdByTokenVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.foreign.ZyForeignSyncNativeCardTradeInfoVo;
|
||||
|
||||
public interface ZyForeignService {
|
||||
public interface ThirdZyForeignService {
|
||||
|
||||
/**
|
||||
* 本地一卡通交易数据同步
|
||||
+4
-4
@@ -8,7 +8,7 @@ import com.bsd.pjcloud.thirdparty.vo.zy.mer.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ZyMerService {
|
||||
public interface ThirdZyMerService {
|
||||
|
||||
/**
|
||||
* 商户信息同步
|
||||
@@ -18,16 +18,16 @@ public interface ZyMerService {
|
||||
/**
|
||||
* 记账单位同步
|
||||
*/
|
||||
ZyMerSyncEnterpriseInfoVo syncEnterpriseInfoApi(ZyMerSyncEnterpriseInfoDto dto);
|
||||
ZyMerSyncEnterpriseInfoVo syncEnterpriseInfoApi(List<ZyMerSyncEnterpriseInfoDto> dto);
|
||||
|
||||
/**
|
||||
* 账户信息同步
|
||||
*/
|
||||
ZyMerSyncAccountInfoVo syncAccountInfoApi(ZyMerSyncAccountInfoDto dto);
|
||||
ZyMerSyncAccountInfoVo syncAccountInfoApi(List<ZyMerSyncAccountInfoDto> dto);
|
||||
|
||||
/**
|
||||
* 身份信息同步
|
||||
*/
|
||||
ZyMerSyncAccClassInfoVo syncAccClassInfoApi(ZyMerSyncAccClassInfoDto dto);
|
||||
ZyMerSyncAccClassInfoVo syncAccClassInfoApi(List<ZyMerSyncAccClassInfoDto> dto);
|
||||
|
||||
}
|
||||
+1
-1
@@ -9,7 +9,7 @@ import com.bsd.pjcloud.thirdparty.vo.zy.self.ZySelfPayVo;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface ZySelfService {
|
||||
public interface ThirdZySelfService {
|
||||
|
||||
/**
|
||||
* 第三方url健康探测
|
||||
+1
-1
@@ -7,7 +7,7 @@ import com.bsd.pjcloud.thirdparty.vo.zy.stride.ZyStrideAuthenticationVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.stride.ZyStrideConsumptionVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.stride.ZyStrideCorrectVo;
|
||||
|
||||
public interface ZyStrideService {
|
||||
public interface ThirdZyStrideService {
|
||||
|
||||
/**
|
||||
* 统一身份验证功能
|
||||
+3
-3
@@ -2,7 +2,7 @@ package com.bsd.pjcloud.thirdparty.service.impl.zy;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.foreign.ZyForeignSyncNativeCardTradeInfoDto;
|
||||
import com.bsd.pjcloud.thirdparty.service.ZyDoForeignService;
|
||||
import com.bsd.pjcloud.thirdparty.service.ThirdZyDoForeignService;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.foreign.ZyForeignGetRegionIdByTokenVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.foreign.ZyForeignSyncNativeCardTradeInfoVo;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -14,9 +14,9 @@ import org.springframework.validation.annotation.Validated;
|
||||
@Validated
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class ZyDoForeignServiceImpl implements ZyDoForeignService {
|
||||
public class ThirdZyDoForeignServiceImpl implements ThirdZyDoForeignService {
|
||||
|
||||
private final ZyForeignServiceImpl zyForeignServiceImpl;
|
||||
private final ThirdZyForeignServiceImpl zyForeignServiceImpl;
|
||||
|
||||
@Override
|
||||
public void syncNativeCardTradeInfo() {
|
||||
+2
-2
@@ -7,7 +7,7 @@ import cn.hutool.json.JSONUtil;
|
||||
import com.bsd.pjcloud.thirdparty.config.ZyConfig;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.foreign.ZyForeignSyncNativeCardTradeInfoDto;
|
||||
import com.bsd.pjcloud.thirdparty.entity.zy.ThirdZyLogEntity;
|
||||
import com.bsd.pjcloud.thirdparty.service.impl.ZyForeignService;
|
||||
import com.bsd.pjcloud.thirdparty.service.impl.ThirdZyForeignService;
|
||||
import com.bsd.pjcloud.thirdparty.utils.zy.api.ZyApi;
|
||||
import com.bsd.pjcloud.thirdparty.utils.zy.api.ZyApiTool;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.ZyBaseEncryptVo;
|
||||
@@ -26,7 +26,7 @@ import java.util.Map;
|
||||
@Validated
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class ZyForeignServiceImpl implements ZyForeignService {
|
||||
public class ThirdZyForeignServiceImpl implements ThirdZyForeignService {
|
||||
|
||||
private final String TAG = "正元跨部门api";
|
||||
|
||||
+5
-5
@@ -10,7 +10,7 @@ import com.bsd.pjcloud.thirdparty.dto.zy.mer.ZyMerSyncAccountInfoDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.mer.ZyMerSyncDealerInfoDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.mer.ZyMerSyncEnterpriseInfoDto;
|
||||
import com.bsd.pjcloud.thirdparty.entity.zy.ThirdZyLogEntity;
|
||||
import com.bsd.pjcloud.thirdparty.service.impl.ZyMerService;
|
||||
import com.bsd.pjcloud.thirdparty.service.impl.ThirdZyMerService;
|
||||
import com.bsd.pjcloud.thirdparty.utils.zy.api.ZyApi;
|
||||
import com.bsd.pjcloud.thirdparty.utils.zy.api.ZyApiTool;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.mer.*;
|
||||
@@ -25,7 +25,7 @@ import java.util.*;
|
||||
@Validated
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class ZyMerServiceImpl implements ZyMerService {
|
||||
public class ThirdZyMerServiceImpl implements ThirdZyMerService {
|
||||
|
||||
private final String TAG = "正元商户api";
|
||||
|
||||
@@ -89,7 +89,7 @@ public class ZyMerServiceImpl implements ZyMerService {
|
||||
* 记账单位同步
|
||||
*/
|
||||
@Override
|
||||
public ZyMerSyncEnterpriseInfoVo syncEnterpriseInfoApi(ZyMerSyncEnterpriseInfoDto dto) {
|
||||
public ZyMerSyncEnterpriseInfoVo syncEnterpriseInfoApi(List<ZyMerSyncEnterpriseInfoDto> dto) {
|
||||
ThirdZyLogEntity entity = new ThirdZyLogEntity();
|
||||
long startTime = System.currentTimeMillis();
|
||||
String url = zyConfig.getBaseUrl() + ZyApi.Mer.SYNC_ENTERPRISE_INFO;
|
||||
@@ -131,7 +131,7 @@ public class ZyMerServiceImpl implements ZyMerService {
|
||||
* 账户信息同步
|
||||
*/
|
||||
@Override
|
||||
public ZyMerSyncAccountInfoVo syncAccountInfoApi(ZyMerSyncAccountInfoDto dto) {
|
||||
public ZyMerSyncAccountInfoVo syncAccountInfoApi(List<ZyMerSyncAccountInfoDto> dto) {
|
||||
ThirdZyLogEntity entity = new ThirdZyLogEntity();
|
||||
long startTime = System.currentTimeMillis();
|
||||
String url = zyConfig.getBaseUrl() + ZyApi.Mer.SYNC_ACCOUNT_INFO;
|
||||
@@ -173,7 +173,7 @@ public class ZyMerServiceImpl implements ZyMerService {
|
||||
* 身份信息同步
|
||||
*/
|
||||
@Override
|
||||
public ZyMerSyncAccClassInfoVo syncAccClassInfoApi(ZyMerSyncAccClassInfoDto dto) {
|
||||
public ZyMerSyncAccClassInfoVo syncAccClassInfoApi(List<ZyMerSyncAccClassInfoDto> dto) {
|
||||
ThirdZyLogEntity entity = new ThirdZyLogEntity();
|
||||
long startTime = System.currentTimeMillis();
|
||||
String url = zyConfig.getBaseUrl() + ZyApi.Mer.SYNC_ACC_CLASS_INFO;
|
||||
+2
-2
@@ -11,7 +11,7 @@ import com.bsd.pjcloud.thirdparty.dto.zy.self.ZySelfGetTokenDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.self.ZySelfPayDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.self.ZySelfTokenDto;
|
||||
import com.bsd.pjcloud.thirdparty.entity.zy.ThirdZyLogEntity;
|
||||
import com.bsd.pjcloud.thirdparty.service.impl.ZySelfService;
|
||||
import com.bsd.pjcloud.thirdparty.service.impl.ThirdZySelfService;
|
||||
import com.bsd.pjcloud.thirdparty.utils.zy.api.ZyApi;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.ZyBaseVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.self.ZySelfCorrectVo;
|
||||
@@ -36,7 +36,7 @@ import java.util.concurrent.TimeUnit;
|
||||
@Validated
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class ZySelfServiceImpl implements ZySelfService {
|
||||
public class ThirdZySelfServiceImpl implements ThirdZySelfService {
|
||||
|
||||
private final String TAG = "第三方需提供的接口api";
|
||||
|
||||
+2
-3
@@ -8,10 +8,9 @@ import com.bsd.pjcloud.thirdparty.dto.zy.stride.ZyStrideAuthenticationDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.stride.ZyStrideConsumptionDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.stride.ZyStrideCorrectDto;
|
||||
import com.bsd.pjcloud.thirdparty.entity.zy.ThirdZyLogEntity;
|
||||
import com.bsd.pjcloud.thirdparty.service.impl.ZyStrideService;
|
||||
import com.bsd.pjcloud.thirdparty.service.impl.ThirdZyStrideService;
|
||||
import com.bsd.pjcloud.thirdparty.utils.zy.api.ZyApi;
|
||||
import com.bsd.pjcloud.thirdparty.utils.zy.api.ZyApiTool;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.mer.ZyMerSyncDealerInfoVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.stride.ZyStrideAuthenticationVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.stride.ZyStrideConsumptionVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.stride.ZyStrideCorrectVo;
|
||||
@@ -28,7 +27,7 @@ import java.util.Map;
|
||||
@Validated
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class ZyStrideServiceImpl implements ZyStrideService {
|
||||
public class ThirdZyStrideServiceImpl implements ThirdZyStrideService {
|
||||
|
||||
private final String TAG = "正元外来人员api";
|
||||
|
||||
+9
-14
@@ -1,9 +1,7 @@
|
||||
package com.bsd.pjcloud.admin;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.bsd.pjcloud.thirdparty.ThirdPartyApp;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.foreign.ZyForeignGetRegionIdByTokenDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.foreign.ZyForeignSyncNativeCardTradeInfoDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.mer.ZyMerSyncAccClassInfoDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.mer.ZyMerSyncAccountInfoDto;
|
||||
@@ -12,9 +10,9 @@ import com.bsd.pjcloud.thirdparty.dto.zy.mer.ZyMerSyncEnterpriseInfoDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.stride.ZyStrideAuthenticationDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.stride.ZyStrideConsumptionDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.zy.stride.ZyStrideCorrectDto;
|
||||
import com.bsd.pjcloud.thirdparty.service.impl.ZyForeignService;
|
||||
import com.bsd.pjcloud.thirdparty.service.impl.ZyMerService;
|
||||
import com.bsd.pjcloud.thirdparty.service.impl.ZyStrideService;
|
||||
import com.bsd.pjcloud.thirdparty.service.impl.ThirdZyForeignService;
|
||||
import com.bsd.pjcloud.thirdparty.service.impl.ThirdZyMerService;
|
||||
import com.bsd.pjcloud.thirdparty.service.impl.ThirdZyStrideService;
|
||||
import com.bsd.pjcloud.thirdparty.utils.zy.api.ZyApiTool;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.foreign.ZyForeignGetRegionIdByTokenVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.foreign.ZyForeignSyncNativeCardTradeInfoVo;
|
||||
@@ -22,7 +20,6 @@ import com.bsd.pjcloud.thirdparty.vo.zy.mer.*;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.stride.ZyStrideAuthenticationVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.stride.ZyStrideConsumptionVo;
|
||||
import com.bsd.pjcloud.thirdparty.vo.zy.stride.ZyStrideCorrectVo;
|
||||
import io.undertow.security.idm.DigestAlgorithm;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
@@ -30,9 +27,7 @@ import org.springframework.boot.test.context.SpringBootTest;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.MessageDigest;
|
||||
import java.util.Base64;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@SpringBootTest(classes = ThirdPartyApp.class)
|
||||
public class ZyTest {
|
||||
@@ -41,11 +36,11 @@ public class ZyTest {
|
||||
private ZyApiTool zyApiTool;
|
||||
|
||||
@Resource
|
||||
private ZyMerService zyMerService;
|
||||
private ThirdZyMerService zyMerService;
|
||||
@Resource
|
||||
private ZyForeignService zyForeignService;
|
||||
private ThirdZyForeignService zyForeignService;
|
||||
@Resource
|
||||
private ZyStrideService zyStrideService;
|
||||
private ThirdZyStrideService zyStrideService;
|
||||
|
||||
/************************** start mer start **************************/
|
||||
|
||||
@@ -83,7 +78,7 @@ public class ZyTest {
|
||||
@Test
|
||||
public void merSyncEnterpriseInfo() {
|
||||
ZyMerSyncEnterpriseInfoDto dto = new ZyMerSyncEnterpriseInfoDto();
|
||||
ZyMerSyncEnterpriseInfoVo vo = zyMerService.syncEnterpriseInfoApi(dto);
|
||||
ZyMerSyncEnterpriseInfoVo vo = zyMerService.syncEnterpriseInfoApi(List.of(dto));
|
||||
System.out.println(vo);
|
||||
}
|
||||
|
||||
@@ -93,7 +88,7 @@ public class ZyTest {
|
||||
@Test
|
||||
public void merSyncAccountInfoApi() {
|
||||
ZyMerSyncAccountInfoDto dto = new ZyMerSyncAccountInfoDto();
|
||||
ZyMerSyncAccountInfoVo vo = zyMerService.syncAccountInfoApi(dto);
|
||||
ZyMerSyncAccountInfoVo vo = zyMerService.syncAccountInfoApi(List.of(dto));
|
||||
System.out.println(vo);
|
||||
}
|
||||
|
||||
@@ -103,7 +98,7 @@ public class ZyTest {
|
||||
@Test
|
||||
public void merSyncAccClassInfo() {
|
||||
ZyMerSyncAccClassInfoDto dto = new ZyMerSyncAccClassInfoDto();
|
||||
ZyMerSyncAccClassInfoVo vo = zyMerService.syncAccClassInfoApi(dto);
|
||||
ZyMerSyncAccClassInfoVo vo = zyMerService.syncAccClassInfoApi(List.of(dto));
|
||||
System.out.println(vo);
|
||||
}
|
||||
|
||||
|
||||
@@ -210,6 +210,12 @@
|
||||
<version>5.7.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.bsd</groupId>
|
||||
<artifactId>pjcloud-thirdparty-api</artifactId>
|
||||
<version>5.7.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
+22
-1
@@ -1,4 +1,25 @@
|
||||
package com.bsd.pjcloud.admin.service.impl.third;
|
||||
|
||||
public class SysThirdZyServiceImpl {
|
||||
import com.bsd.pjcloud.admin.service.SysThirdZyService;
|
||||
import com.bsd.pjcloud.thirdparty.api.feign.RemoterThirdZyService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class SysThirdZyServiceImpl implements SysThirdZyService {
|
||||
|
||||
|
||||
private RemoterThirdZyService thirdZyService;
|
||||
|
||||
private void syncRole() {
|
||||
|
||||
}
|
||||
|
||||
private void syncUser() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user