可信空间修改
Showing
45 changed files
with
2896 additions
and
57 deletions
1 | package com.csbr.qingcloud.portal.controller; | ||
2 | |||
3 | import com.csbr.cloud.common.response.CommonRes; | ||
4 | import csbr.cloud.entity.annotation.SystemLog; | ||
5 | import csbr.cloud.entity.domain.base.vo.PageListVO; | ||
6 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityQueryVO; | ||
7 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityRQVO; | ||
8 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityRSVO; | ||
9 | import com.csbr.qingcloud.portal.service.TdsConnectorIdentityService; | ||
10 | import io.swagger.v3.oas.annotations.Operation; | ||
11 | import io.swagger.v3.oas.annotations.Parameter; | ||
12 | import io.swagger.v3.oas.annotations.tags.Tag; | ||
13 | import jakarta.annotation.Resource; | ||
14 | import jakarta.validation.Valid; | ||
15 | import org.springframework.web.bind.annotation.*; | ||
16 | |||
17 | import java.util.List; | ||
18 | |||
19 | /** | ||
20 | * @program: | ||
21 | * @description: 连接器身份信息-控制器 | ||
22 | * @author: xup | ||
23 | * @create: 2025-08-20 15:13 | ||
24 | **/ | ||
25 | @RestController | ||
26 | @RequestMapping("/tds-connector-identity") | ||
27 | @Tag(name = "连接器身份信息-控制器") | ||
28 | public class TdsConnectorIdentityController { | ||
29 | |||
30 | @Resource | ||
31 | private TdsConnectorIdentityService tdsConnectorIdentityService; | ||
32 | |||
33 | //region 基本操作 | ||
34 | |||
35 | @PostMapping("/save") | ||
36 | @SystemLog(value = "连接器身份信息-新增") | ||
37 | @Operation(summary = "连接器身份信息-新增") | ||
38 | public CommonRes<Boolean> saveTdsConnectorIdentity(@RequestBody @Valid TdsConnectorIdentityRQVO vo) { | ||
39 | tdsConnectorIdentityService.saveTdsConnectorIdentity(vo); | ||
40 | return CommonRes.success(true); | ||
41 | } | ||
42 | |||
43 | @PutMapping("/update") | ||
44 | @SystemLog(value = "连接器身份信息-修改") | ||
45 | @Operation(summary = "连接器身份信息-修改") | ||
46 | public CommonRes<Boolean> updateTdsConnectorIdentity(@RequestBody @Valid TdsConnectorIdentityRQVO vo) { | ||
47 | tdsConnectorIdentityService.updateTdsConnectorIdentity(vo); | ||
48 | return CommonRes.success(true); | ||
49 | } | ||
50 | |||
51 | @DeleteMapping("/delete") | ||
52 | @SystemLog(value = "连接器身份信息-批量删除") | ||
53 | @Operation(summary = "连接器身份信息-批量删除") | ||
54 | public CommonRes<Boolean> removeByGuids(@RequestBody List<String> guids) { | ||
55 | tdsConnectorIdentityService.removeByGuids(guids); | ||
56 | return CommonRes.success(true); | ||
57 | } | ||
58 | |||
59 | @PostMapping("/page-list") | ||
60 | @SystemLog(value = "连接器身份信息-分页") | ||
61 | @Operation(summary = "连接器身份信息-分页") | ||
62 | public CommonRes<PageListVO<TdsConnectorIdentityRSVO>> pageList(@RequestBody @Valid TdsConnectorIdentityQueryVO queryVO) { | ||
63 | PageListVO<TdsConnectorIdentityRSVO> pageVO = tdsConnectorIdentityService.pageList(queryVO); | ||
64 | return CommonRes.success(pageVO); | ||
65 | } | ||
66 | |||
67 | @GetMapping("/detail") | ||
68 | @SystemLog(value = "连接器身份信息-详情") | ||
69 | @Operation( | ||
70 | summary = "连接器身份信息-详情", | ||
71 | parameters = { | ||
72 | @Parameter(name = "guid", description = "连接器身份信息唯一标识", required = true)} | ||
73 | ) | ||
74 | public CommonRes<TdsConnectorIdentityRSVO> getTdsConnectorIdentityDetail(@RequestParam String guid) { | ||
75 | TdsConnectorIdentityRSVO vo = tdsConnectorIdentityService.getTdsConnectorIdentityDetail(guid); | ||
76 | return CommonRes.success(vo); | ||
77 | } | ||
78 | |||
79 | //endregion | ||
80 | |||
81 | } |
1 | package com.csbr.qingcloud.portal.domain.vo; | ||
2 | |||
3 | import csbr.cloud.entity.domain.base.dto.BasePageDTO; | ||
4 | import io.swagger.v3.oas.annotations.media.Schema; | ||
5 | import lombok.EqualsAndHashCode; | ||
6 | import lombok.Data; | ||
7 | import java.util.Date; | ||
8 | |||
9 | /** | ||
10 | * @program: | ||
11 | * @description: 连接器附加信息查询参数 | ||
12 | * @author: xup | ||
13 | * @create: 2025-08-20 15:13 | ||
14 | **/ | ||
15 | @EqualsAndHashCode(callSuper = true) | ||
16 | @Data | ||
17 | @Schema(title = "连接器附加信息查询参数") | ||
18 | public class TdsConnectorAdditionalQueryVO extends BasePageDTO { | ||
19 | |||
20 | } |
1 | package com.csbr.qingcloud.portal.domain.vo; | ||
2 | |||
3 | import io.swagger.v3.oas.annotations.media.Schema; | ||
4 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
5 | import jakarta.validation.constraints.Size; | ||
6 | import lombok.Data; | ||
7 | import java.util.Date; | ||
8 | |||
9 | /** | ||
10 | * @program: | ||
11 | * @description: 连接器附加信息新增、修改参数 | ||
12 | * @author: xup | ||
13 | * @create: 2025-08-20 15:13 | ||
14 | **/ | ||
15 | @Data | ||
16 | @Schema(title = "连接器附加信息新增、修改参数") | ||
17 | public class TdsConnectorAdditionalRQVO { | ||
18 | |||
19 | /** | ||
20 | * 系统唯一标识 | ||
21 | */ | ||
22 | @Schema(description = "系统唯一标识") | ||
23 | private String guid; | ||
24 | |||
25 | /** | ||
26 | * 连接器Guid | ||
27 | */ | ||
28 | @Schema(description = "连接器Guid") | ||
29 | private String connectorGuid; | ||
30 | |||
31 | /** | ||
32 | * 可验证身份签发单位 | ||
33 | */ | ||
34 | @Schema(description = "可验证身份签发单位") | ||
35 | @Size(max = 100, message = "可验证身份签发单位长度超过100") | ||
36 | private String identityIssuingUnit; | ||
37 | |||
38 | /** | ||
39 | * 供应商名称 | ||
40 | */ | ||
41 | @Schema(description = "供应商名称") | ||
42 | @Size(max = 100, message = "供应商名称长度超过100") | ||
43 | private String supplierName; | ||
44 | |||
45 | /** | ||
46 | * 供应商代码 | ||
47 | */ | ||
48 | @Schema(description = "供应商代码") | ||
49 | @Size(max = 50, message = "供应商代码长度超过50") | ||
50 | private String supplierCode; | ||
51 | |||
52 | /** | ||
53 | * 产品SN号 | ||
54 | */ | ||
55 | @Schema(description = "产品SN号") | ||
56 | @Size(max = 20, message = "产品SN号长度超过20") | ||
57 | private String productSn; | ||
58 | |||
59 | /** | ||
60 | * 产品版本号 | ||
61 | */ | ||
62 | @Schema(description = "产品版本号") | ||
63 | @Size(max = 20, message = "产品版本号长度超过20") | ||
64 | private String productVersion; | ||
65 | |||
66 | /** | ||
67 | * 连接器类型(0 标准型;1 全功能型) | ||
68 | */ | ||
69 | @Schema(description = "连接器类型(0 标准型;1 全功能型)") | ||
70 | private Integer connectorType; | ||
71 | |||
72 | /** | ||
73 | * 设备MAC地址 | ||
74 | */ | ||
75 | @Schema(description = "设备MAC地址") | ||
76 | @Size(max = 50, message = "设备MAC地址长度超过50") | ||
77 | private String deviceMacAddress; | ||
78 | |||
79 | /******** 库表存储属性 需处理 *****/ | ||
80 | |||
81 | /******** 自定义扩展 *****/ | ||
82 | |||
83 | /******** 子对象 *****/ | ||
84 | |||
85 | } |
1 | package com.csbr.qingcloud.portal.domain.vo; | ||
2 | |||
3 | import io.swagger.v3.oas.annotations.media.Schema; | ||
4 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
5 | import lombok.Data; | ||
6 | import java.util.Date; | ||
7 | |||
8 | /** | ||
9 | * @program: | ||
10 | * @description: 连接器附加信息返回参数 | ||
11 | * @author: xup | ||
12 | * @create: 2025-08-20 15:13 | ||
13 | **/ | ||
14 | @Data | ||
15 | @Schema(title = "连接器附加信息返回参数") | ||
16 | public class TdsConnectorAdditionalRSVO { | ||
17 | |||
18 | /** | ||
19 | * 系统唯一标识 | ||
20 | */ | ||
21 | @Schema(description = "系统唯一标识") | ||
22 | private String guid; | ||
23 | |||
24 | /** | ||
25 | * 会员Guid | ||
26 | */ | ||
27 | @Schema(description = "会员Guid") | ||
28 | private String tenantGuid; | ||
29 | |||
30 | /** | ||
31 | * 连接器Guid | ||
32 | */ | ||
33 | @Schema(description = "连接器Guid") | ||
34 | private String connectorGuid; | ||
35 | |||
36 | /** | ||
37 | * 可验证身份签发单位 | ||
38 | */ | ||
39 | @Schema(description = "可验证身份签发单位") | ||
40 | private String identityIssuingUnit; | ||
41 | |||
42 | /** | ||
43 | * 供应商名称 | ||
44 | */ | ||
45 | @Schema(description = "供应商名称") | ||
46 | private String supplierName; | ||
47 | |||
48 | /** | ||
49 | * 供应商代码 | ||
50 | */ | ||
51 | @Schema(description = "供应商代码") | ||
52 | private String supplierCode; | ||
53 | |||
54 | /** | ||
55 | * 产品SN号 | ||
56 | */ | ||
57 | @Schema(description = "产品SN号") | ||
58 | private String productSn; | ||
59 | |||
60 | /** | ||
61 | * 产品版本号 | ||
62 | */ | ||
63 | @Schema(description = "产品版本号") | ||
64 | private String productVersion; | ||
65 | |||
66 | /** | ||
67 | * 连接器类型(0 标准型;1 全功能型) | ||
68 | */ | ||
69 | @Schema(description = "连接器类型(0 标准型;1 全功能型)") | ||
70 | private Integer connectorType; | ||
71 | |||
72 | /** | ||
73 | * 设备MAC地址 | ||
74 | */ | ||
75 | @Schema(description = "设备MAC地址") | ||
76 | private String deviceMacAddress; | ||
77 | |||
78 | /******** 库表存储属性 需处理 *****/ | ||
79 | |||
80 | /******** 自定义扩展 *****/ | ||
81 | |||
82 | /******** 子对象 *****/ | ||
83 | |||
84 | } |
1 | package com.csbr.qingcloud.portal.domain.vo; | ||
2 | |||
3 | import csbr.cloud.entity.domain.base.dto.BasePageDTO; | ||
4 | import io.swagger.v3.oas.annotations.media.Schema; | ||
5 | import lombok.EqualsAndHashCode; | ||
6 | import lombok.Data; | ||
7 | import java.util.Date; | ||
8 | |||
9 | /** | ||
10 | * @program: | ||
11 | * @description: 连接器身份信息查询参数 | ||
12 | * @author: xup | ||
13 | * @create: 2025-08-20 15:13 | ||
14 | **/ | ||
15 | @EqualsAndHashCode(callSuper = true) | ||
16 | @Data | ||
17 | @Schema(title = "连接器身份信息查询参数") | ||
18 | public class TdsConnectorIdentityQueryVO extends BasePageDTO { | ||
19 | |||
20 | } |
1 | package com.csbr.qingcloud.portal.domain.vo; | ||
2 | |||
3 | import io.swagger.v3.oas.annotations.media.Schema; | ||
4 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
5 | import jakarta.validation.constraints.NotBlank; | ||
6 | import jakarta.validation.constraints.NotNull; | ||
7 | import jakarta.validation.constraints.Size; | ||
8 | import lombok.Data; | ||
9 | import java.util.Date; | ||
10 | import java.util.List; | ||
11 | import java.util.Map; | ||
12 | |||
13 | /** | ||
14 | * @program: | ||
15 | * @description: 连接器身份信息新增、修改参数 | ||
16 | * @author: xup | ||
17 | * @create: 2025-08-20 15:13 | ||
18 | **/ | ||
19 | @Data | ||
20 | @Schema(title = "连接器身份信息新增、修改参数") | ||
21 | public class TdsConnectorIdentityRQVO { | ||
22 | |||
23 | /** | ||
24 | * 系统唯一标识 | ||
25 | */ | ||
26 | @Schema(description = "系统唯一标识") | ||
27 | private String guid; | ||
28 | |||
29 | /** | ||
30 | * 接入连接器名称 | ||
31 | */ | ||
32 | @Schema(description = "接入连接器名称") | ||
33 | @Size(max = 50, message = "接入连接器名称长度超过50") | ||
34 | private String connectorName; | ||
35 | |||
36 | /** | ||
37 | * 接入连接器身份标识(由区域/行业功能节点下发,唯一标识连接器身份) | ||
38 | */ | ||
39 | @Schema(description = "接入连接器身份标识(由区域/行业功能节点下发,唯一标识连接器身份)") | ||
40 | private String connectorIdentity; | ||
41 | |||
42 | /** | ||
43 | * IP地址列表 | ||
44 | */ | ||
45 | @Schema(description = "IP地址列表") | ||
46 | @NotNull(message = "IP地址列表为空。") | ||
47 | private List<String> ipAddressList; | ||
48 | |||
49 | /** | ||
50 | * 域名列表 | ||
51 | */ | ||
52 | @Schema(description = "域名列表") | ||
53 | @NotNull(message = "域名列表为空。") | ||
54 | private List<String> domainList; | ||
55 | |||
56 | /** | ||
57 | * 接入方式(1 专线;2 互联网(固定公网IP);3 互联网(无固定公网IP);4 高速数据网;5 其他) | ||
58 | */ | ||
59 | @Schema(description = "接入方式(1 专线;2 互联网(固定公网IP);3 互联网(无固定公网IP);4 高速数据网;5 其他)") | ||
60 | @NotNull(message = "接入方式为空。") | ||
61 | private Integer accessMethod; | ||
62 | |||
63 | /** | ||
64 | * 所属法人或其他组织名称 | ||
65 | */ | ||
66 | @Schema(description = "所属法人或其他组织名称") | ||
67 | @Size(max = 50, message = "所属法人或其他组织名称长度超过50") | ||
68 | @NotBlank(message = "所属法人或其他组织名称为空。") | ||
69 | private String legalEntity; | ||
70 | |||
71 | /** | ||
72 | * 所属法人或其他组织统一社会信用代码 | ||
73 | */ | ||
74 | @Schema(description = "所属法人或其他组织统一社会信用代码") | ||
75 | @Size(max = 18, message = "所属法人或其他组织统一社会信用代码长度超过18") | ||
76 | @NotBlank(message = "所属法人或其他组织统一社会信用代码为空。") | ||
77 | private String legalSocialCreditCode; | ||
78 | |||
79 | /** | ||
80 | * 可信身份凭证 | ||
81 | */ | ||
82 | @Schema(description = "可信身份凭证") | ||
83 | private Map<String,String> trustedIdentityCredential; | ||
84 | |||
85 | /** | ||
86 | * 凭证颁发日期 | ||
87 | */ | ||
88 | @Schema(description = "凭证颁发日期") | ||
89 | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | ||
90 | private Date credentialTime; | ||
91 | |||
92 | /******** 库表存储属性 需处理 *****/ | ||
93 | |||
94 | /******** 自定义扩展 *****/ | ||
95 | |||
96 | /******** 子对象 *****/ | ||
97 | @Schema(description = "连接器附加信息参数") | ||
98 | private TdsConnectorAdditionalRQVO tdsConnectorAdditional; | ||
99 | |||
100 | @Schema(description = "连接器可验信息参数") | ||
101 | private TdsConnectorVerifiableRQVO tdsConnectorVerifiable; | ||
102 | |||
103 | } |
1 | package com.csbr.qingcloud.portal.domain.vo; | ||
2 | |||
3 | import io.swagger.v3.oas.annotations.media.Schema; | ||
4 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
5 | import lombok.Data; | ||
6 | import java.util.Date; | ||
7 | import java.util.List; | ||
8 | import java.util.Map; | ||
9 | |||
10 | /** | ||
11 | * @program: | ||
12 | * @description: 连接器身份信息返回参数 | ||
13 | * @author: xup | ||
14 | * @create: 2025-08-20 15:13 | ||
15 | **/ | ||
16 | @Data | ||
17 | @Schema(title = "连接器身份信息返回参数") | ||
18 | public class TdsConnectorIdentityRSVO { | ||
19 | |||
20 | /** | ||
21 | * 系统唯一标识 | ||
22 | */ | ||
23 | @Schema(description = "系统唯一标识") | ||
24 | private String guid; | ||
25 | |||
26 | /** | ||
27 | * 接入连接器名称 | ||
28 | */ | ||
29 | @Schema(description = "接入连接器名称") | ||
30 | private String connectorName; | ||
31 | |||
32 | /** | ||
33 | * 接入连接器身份标识(由区域/行业功能节点下发,唯一标识连接器身份) | ||
34 | */ | ||
35 | @Schema(description = "接入连接器身份标识(由区域/行业功能节点下发,唯一标识连接器身份)") | ||
36 | private String connectorIdentity; | ||
37 | |||
38 | /** | ||
39 | * IP地址列表 | ||
40 | */ | ||
41 | @Schema(description = "IP地址列表") | ||
42 | private List<String> ipAddressList; | ||
43 | |||
44 | /** | ||
45 | * 域名列表 | ||
46 | */ | ||
47 | @Schema(description = "域名列表") | ||
48 | private List<String> domainList; | ||
49 | |||
50 | /** | ||
51 | * 接入方式(1 专线;2 互联网(固定公网IP);3 互联网(无固定公网IP);4 高速数据网;5 其他) | ||
52 | */ | ||
53 | @Schema(description = "接入方式(1 专线;2 互联网(固定公网IP);3 互联网(无固定公网IP);4 高速数据网;5 其他)") | ||
54 | private Integer accessMethod; | ||
55 | |||
56 | /** | ||
57 | * 所属法人或其他组织名称 | ||
58 | */ | ||
59 | @Schema(description = "所属法人或其他组织名称") | ||
60 | private String legalEntity; | ||
61 | |||
62 | /** | ||
63 | * 所属法人或其他组织统一社会信用代码 | ||
64 | */ | ||
65 | @Schema(description = "所属法人或其他组织统一社会信用代码") | ||
66 | private String legalSocialCreditCode; | ||
67 | |||
68 | /** | ||
69 | * 可信身份凭证 | ||
70 | */ | ||
71 | @Schema(description = "可信身份凭证") | ||
72 | private Map<String,String> trustedIdentityCredential; | ||
73 | |||
74 | /** | ||
75 | * 凭证颁发日期 | ||
76 | */ | ||
77 | @Schema(description = "凭证颁发日期") | ||
78 | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | ||
79 | private Date credentialTime; | ||
80 | |||
81 | /******** 库表存储属性 需处理 *****/ | ||
82 | |||
83 | /******** 自定义扩展 *****/ | ||
84 | |||
85 | /******** 子对象 *****/ | ||
86 | @Schema(description = "连接器附加信息返回参数") | ||
87 | private TdsConnectorAdditionalRSVO tdsConnectorAdditional; | ||
88 | |||
89 | @Schema(description = "连接器可验信息返回参数") | ||
90 | private TdsConnectorVerifiableRSVO tdsConnectorVerifiable; | ||
91 | } |
1 | package com.csbr.qingcloud.portal.domain.vo; | ||
2 | |||
3 | import csbr.cloud.entity.domain.base.dto.BasePageDTO; | ||
4 | import io.swagger.v3.oas.annotations.media.Schema; | ||
5 | import lombok.EqualsAndHashCode; | ||
6 | import lombok.Data; | ||
7 | import java.util.Date; | ||
8 | |||
9 | /** | ||
10 | * @program: | ||
11 | * @description: 连接器可验信息查询参数 | ||
12 | * @author: xup | ||
13 | * @create: 2025-08-20 15:13 | ||
14 | **/ | ||
15 | @EqualsAndHashCode(callSuper = true) | ||
16 | @Data | ||
17 | @Schema(title = "连接器可验信息查询参数") | ||
18 | public class TdsConnectorVerifiableQueryVO extends BasePageDTO { | ||
19 | |||
20 | } |
1 | package com.csbr.qingcloud.portal.domain.vo; | ||
2 | |||
3 | import io.swagger.v3.oas.annotations.media.Schema; | ||
4 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
5 | import jakarta.validation.constraints.Size; | ||
6 | import lombok.Data; | ||
7 | import java.util.Date; | ||
8 | import java.util.Map; | ||
9 | |||
10 | /** | ||
11 | * @program: | ||
12 | * @description: 连接器可验信息新增、修改参数 | ||
13 | * @author: xup | ||
14 | * @create: 2025-08-20 15:13 | ||
15 | **/ | ||
16 | @Data | ||
17 | @Schema(title = "连接器可验信息新增、修改参数") | ||
18 | public class TdsConnectorVerifiableRQVO { | ||
19 | |||
20 | /** | ||
21 | * 系统唯一标识 | ||
22 | */ | ||
23 | @Schema(description = "系统唯一标识") | ||
24 | private String guid; | ||
25 | |||
26 | /** | ||
27 | * 连接器Guid | ||
28 | */ | ||
29 | @Schema(description = "连接器Guid") | ||
30 | private String connectorGuid; | ||
31 | |||
32 | /** | ||
33 | * 网络接入资质认证 | ||
34 | */ | ||
35 | @Schema(description = "网络接入资质认证") | ||
36 | private Map<String,String> networkAccessQualification; | ||
37 | |||
38 | /** | ||
39 | * 等级保护测评结果 | ||
40 | */ | ||
41 | @Schema(description = "等级保护测评结果") | ||
42 | @Size(max = 200, message = "等级保护测评结果长度超过200") | ||
43 | private String levelProtectionEvaluationResults; | ||
44 | |||
45 | /** | ||
46 | * 网络安全产品备案证明 | ||
47 | */ | ||
48 | @Schema(description = "网络安全产品备案证明") | ||
49 | private Map<String,String> networkSecurityFilingCertificate; | ||
50 | |||
51 | /** | ||
52 | * 加密模块认证 | ||
53 | */ | ||
54 | @Schema(description = "加密模块认证") | ||
55 | private Map<String,String> encryptionModuleAuthentication; | ||
56 | |||
57 | /** | ||
58 | * 软件供应链合规声明 | ||
59 | */ | ||
60 | @Schema(description = "软件供应链合规声明") | ||
61 | private Map<String,String> softwareScmStatemen; | ||
62 | |||
63 | /** | ||
64 | * 安全漏洞修复声明 | ||
65 | */ | ||
66 | @Schema(description = "安全漏洞修复声明") | ||
67 | private Map<String,String> securityLoopholeRepairStatement; | ||
68 | |||
69 | /** | ||
70 | * 通信协议兼容性认证 | ||
71 | */ | ||
72 | @Schema(description = "通信协议兼容性认证") | ||
73 | private Map<String,String> communicationProtocolCompatibilityCertification; | ||
74 | |||
75 | /** | ||
76 | * 硬件可信执行环境(TEE)认证 | ||
77 | */ | ||
78 | @Schema(description = "硬件可信执行环境(TEE)认证") | ||
79 | private Map<String,String> teeCertification; | ||
80 | |||
81 | /** | ||
82 | * 接入行为审计合规报告 | ||
83 | */ | ||
84 | @Schema(description = "接入行为审计合规报告") | ||
85 | private Map<String,String> accessAuditReport; | ||
86 | |||
87 | /** | ||
88 | * 第三方认证声明 | ||
89 | */ | ||
90 | @Schema(description = "第三方认证声明") | ||
91 | private Map<String,String> thirdPartyCertification; | ||
92 | |||
93 | /******** 库表存储属性 需处理 *****/ | ||
94 | |||
95 | /******** 自定义扩展 *****/ | ||
96 | |||
97 | /******** 子对象 *****/ | ||
98 | |||
99 | } |
1 | package com.csbr.qingcloud.portal.domain.vo; | ||
2 | |||
3 | import io.swagger.v3.oas.annotations.media.Schema; | ||
4 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
5 | import jakarta.validation.constraints.Size; | ||
6 | import lombok.Data; | ||
7 | import java.util.Date; | ||
8 | import java.util.Map; | ||
9 | |||
10 | /** | ||
11 | * @program: | ||
12 | * @description: 连接器可验信息返回参数 | ||
13 | * @author: xup | ||
14 | * @create: 2025-08-20 15:13 | ||
15 | **/ | ||
16 | @Data | ||
17 | @Schema(title = "连接器可验信息返回参数") | ||
18 | public class TdsConnectorVerifiableRSVO { | ||
19 | |||
20 | /** | ||
21 | * 系统唯一标识 | ||
22 | */ | ||
23 | @Schema(description = "系统唯一标识") | ||
24 | private String guid; | ||
25 | |||
26 | /** | ||
27 | * 连接器Guid | ||
28 | */ | ||
29 | @Schema(description = "连接器Guid") | ||
30 | private String connectorGuid; | ||
31 | |||
32 | /** | ||
33 | * 网络接入资质认证 | ||
34 | */ | ||
35 | @Schema(description = "网络接入资质认证") | ||
36 | private Map<String,String> networkAccessQualification; | ||
37 | |||
38 | /** | ||
39 | * 等级保护测评结果 | ||
40 | */ | ||
41 | @Schema(description = "等级保护测评结果") | ||
42 | @Size(max = 200, message = "等级保护测评结果长度超过200") | ||
43 | private String levelProtectionEvaluationResults; | ||
44 | |||
45 | /** | ||
46 | * 网络安全产品备案证明 | ||
47 | */ | ||
48 | @Schema(description = "网络安全产品备案证明") | ||
49 | private Map<String,String> networkSecurityFilingCertificate; | ||
50 | |||
51 | /** | ||
52 | * 加密模块认证 | ||
53 | */ | ||
54 | @Schema(description = "加密模块认证") | ||
55 | private Map<String,String> encryptionModuleAuthentication; | ||
56 | |||
57 | /** | ||
58 | * 软件供应链合规声明 | ||
59 | */ | ||
60 | @Schema(description = "软件供应链合规声明") | ||
61 | private Map<String,String> softwareScmStatemen; | ||
62 | |||
63 | /** | ||
64 | * 安全漏洞修复声明 | ||
65 | */ | ||
66 | @Schema(description = "安全漏洞修复声明") | ||
67 | private Map<String,String> securityLoopholeRepairStatement; | ||
68 | |||
69 | /** | ||
70 | * 通信协议兼容性认证 | ||
71 | */ | ||
72 | @Schema(description = "通信协议兼容性认证") | ||
73 | private Map<String,String> communicationProtocolCompatibilityCertification; | ||
74 | |||
75 | /** | ||
76 | * 硬件可信执行环境(TEE)认证 | ||
77 | */ | ||
78 | @Schema(description = "硬件可信执行环境(TEE)认证") | ||
79 | private Map<String,String> teeCertification; | ||
80 | |||
81 | /** | ||
82 | * 接入行为审计合规报告 | ||
83 | */ | ||
84 | @Schema(description = "接入行为审计合规报告") | ||
85 | private Map<String,String> accessAuditReport; | ||
86 | |||
87 | /** | ||
88 | * 第三方认证声明 | ||
89 | */ | ||
90 | @Schema(description = "第三方认证声明") | ||
91 | private Map<String,String> thirdPartyCertification; | ||
92 | |||
93 | /******** 库表存储属性 需处理 *****/ | ||
94 | |||
95 | /******** 自定义扩展 *****/ | ||
96 | |||
97 | /******** 子对象 *****/ | ||
98 | |||
99 | } |
... | @@ -20,21 +20,12 @@ public class TdsCorporationAdditionalRQVO { | ... | @@ -20,21 +20,12 @@ public class TdsCorporationAdditionalRQVO { |
20 | * 系统唯一标识 | 20 | * 系统唯一标识 |
21 | */ | 21 | */ |
22 | @Schema(description = "系统唯一标识") | 22 | @Schema(description = "系统唯一标识") |
23 | @Size(max = 32, message = "系统唯一标识长度超过32") | ||
24 | private String guid; | 23 | private String guid; |
25 | 24 | ||
26 | /** | 25 | /** |
27 | * 会员Guid | ||
28 | */ | ||
29 | @Schema(description = "会员Guid") | ||
30 | @Size(max = 32, message = "会员Guid长度超过32") | ||
31 | private String tenantGuid; | ||
32 | |||
33 | /** | ||
34 | * 法人Guid | 26 | * 法人Guid |
35 | */ | 27 | */ |
36 | @Schema(description = "法人Guid") | 28 | @Schema(description = "法人Guid") |
37 | @Size(max = 32, message = "法人Guid长度超过32") | ||
38 | private String corporationGuid; | 29 | private String corporationGuid; |
39 | 30 | ||
40 | /** | 31 | /** | ... | ... |
... | @@ -2,6 +2,7 @@ package com.csbr.qingcloud.portal.domain.vo; | ... | @@ -2,6 +2,7 @@ package com.csbr.qingcloud.portal.domain.vo; |
2 | 2 | ||
3 | import io.swagger.v3.oas.annotations.media.Schema; | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
4 | import com.fasterxml.jackson.annotation.JsonFormat; | 4 | import com.fasterxml.jackson.annotation.JsonFormat; |
5 | import jakarta.validation.constraints.NotBlank; | ||
5 | import jakarta.validation.constraints.Size; | 6 | import jakarta.validation.constraints.Size; |
6 | import lombok.Data; | 7 | import lombok.Data; |
7 | import java.util.Date; | 8 | import java.util.Date; |
... | @@ -20,28 +21,20 @@ public class TdsCorporationIdentityRQVO { | ... | @@ -20,28 +21,20 @@ public class TdsCorporationIdentityRQVO { |
20 | * 系统唯一标识 | 21 | * 系统唯一标识 |
21 | */ | 22 | */ |
22 | @Schema(description = "系统唯一标识") | 23 | @Schema(description = "系统唯一标识") |
23 | @Size(max = 32, message = "系统唯一标识长度超过32") | ||
24 | private String guid; | 24 | private String guid; |
25 | 25 | ||
26 | /** | 26 | /** |
27 | * 会员Guid | ||
28 | */ | ||
29 | @Schema(description = "会员Guid") | ||
30 | @Size(max = 32, message = "会员Guid长度超过32") | ||
31 | private String tenantGuid; | ||
32 | |||
33 | /** | ||
34 | * 法人或其他组织名称 | 27 | * 法人或其他组织名称 |
35 | */ | 28 | */ |
36 | @Schema(description = "法人或其他组织名称") | 29 | @Schema(description = "法人或其他组织名称") |
37 | @Size(max = 50, message = "法人或其他组织名称长度超过50") | 30 | @Size(max = 50, message = "法人或其他组织名称长度超过50") |
31 | @NotBlank(message = "法人或其他组织名称为空。") | ||
38 | private String corporationName; | 32 | private String corporationName; |
39 | 33 | ||
40 | /** | 34 | /** |
41 | * 法人或其他组织身份标识(平台生成的唯一标识法人或其他组织身份) | 35 | * 法人或其他组织身份标识(平台生成的唯一标识法人或其他组织身份) |
42 | */ | 36 | */ |
43 | @Schema(description = "法人或其他组织身份标识(平台生成的唯一标识法人或其他组织身份)") | 37 | @Schema(description = "法人或其他组织身份标识(平台生成的唯一标识法人或其他组织身份)") |
44 | @Size(max = 32, message = "法人或其他组织身份标识(平台生成的唯一标识法人或其他组织身份)长度超过32") | ||
45 | private String corporationIdentity; | 38 | private String corporationIdentity; |
46 | 39 | ||
47 | /** | 40 | /** |
... | @@ -49,6 +42,7 @@ public class TdsCorporationIdentityRQVO { | ... | @@ -49,6 +42,7 @@ public class TdsCorporationIdentityRQVO { |
49 | */ | 42 | */ |
50 | @Schema(description = "统一社会信用代码") | 43 | @Schema(description = "统一社会信用代码") |
51 | @Size(max = 20, message = "统一社会信用代码长度超过20") | 44 | @Size(max = 20, message = "统一社会信用代码长度超过20") |
45 | @NotBlank(message = "统一社会信用代码为空。") | ||
52 | private String socialCreditCode; | 46 | private String socialCreditCode; |
53 | 47 | ||
54 | /** | 48 | /** |
... | @@ -127,5 +121,10 @@ public class TdsCorporationIdentityRQVO { | ... | @@ -127,5 +121,10 @@ public class TdsCorporationIdentityRQVO { |
127 | /******** 自定义扩展 *****/ | 121 | /******** 自定义扩展 *****/ |
128 | 122 | ||
129 | /******** 子对象 *****/ | 123 | /******** 子对象 *****/ |
124 | @Schema(description = "法人用户附加信息新增、修改参数") | ||
125 | private TdsCorporationAdditionalRQVO tdsCorporationAdditional; | ||
126 | |||
127 | @Schema(description = "法人用户可验信息新增、修改参数") | ||
128 | private TdsCorporationVerifiableRQVO tdsCorporationVerifiable; | ||
130 | 129 | ||
131 | } | 130 | } | ... | ... |
... | @@ -119,5 +119,9 @@ public class TdsCorporationIdentityRSVO { | ... | @@ -119,5 +119,9 @@ public class TdsCorporationIdentityRSVO { |
119 | /******** 自定义扩展 *****/ | 119 | /******** 自定义扩展 *****/ |
120 | 120 | ||
121 | /******** 子对象 *****/ | 121 | /******** 子对象 *****/ |
122 | @Schema(description = "法人用户附加信息返回参数") | ||
123 | private TdsCorporationAdditionalRSVO tdsCorporationAdditional; | ||
122 | 124 | ||
125 | @Schema(title = "法人用户可验信息返回参数") | ||
126 | private TdsCorporationVerifiableRSVO tdsCorporationVerifiable; | ||
123 | } | 127 | } | ... | ... |
... | @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; | ... | @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; |
5 | import jakarta.validation.constraints.Size; | 5 | import jakarta.validation.constraints.Size; |
6 | import lombok.Data; | 6 | import lombok.Data; |
7 | import java.util.Date; | 7 | import java.util.Date; |
8 | import java.util.Map; | ||
8 | 9 | ||
9 | /** | 10 | /** |
10 | * @program: | 11 | * @program: |
... | @@ -27,7 +28,6 @@ public class TdsOperatorAdditionalRQVO { | ... | @@ -27,7 +28,6 @@ public class TdsOperatorAdditionalRQVO { |
27 | * 会员Guid | 28 | * 会员Guid |
28 | */ | 29 | */ |
29 | @Schema(description = "会员Guid") | 30 | @Schema(description = "会员Guid") |
30 | @Size(max = 32, message = "会员Guid长度超过32") | ||
31 | private String tenantGuid; | 31 | private String tenantGuid; |
32 | 32 | ||
33 | /** | 33 | /** |
... | @@ -48,8 +48,7 @@ public class TdsOperatorAdditionalRQVO { | ... | @@ -48,8 +48,7 @@ public class TdsOperatorAdditionalRQVO { |
48 | * 电子营业执照 | 48 | * 电子营业执照 |
49 | */ | 49 | */ |
50 | @Schema(description = "电子营业执照") | 50 | @Schema(description = "电子营业执照") |
51 | @Size(max = -1, message = "电子营业执照长度超过-1") | 51 | private Map<String,String> businessLicense; |
52 | private String businessLicense; | ||
53 | 52 | ||
54 | /** | 53 | /** |
55 | * 社保卡卡号 | 54 | * 社保卡卡号 | ... | ... |
... | @@ -2,6 +2,7 @@ package com.csbr.qingcloud.portal.domain.vo; | ... | @@ -2,6 +2,7 @@ package com.csbr.qingcloud.portal.domain.vo; |
2 | 2 | ||
3 | import io.swagger.v3.oas.annotations.media.Schema; | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
4 | import com.fasterxml.jackson.annotation.JsonFormat; | 4 | import com.fasterxml.jackson.annotation.JsonFormat; |
5 | import jakarta.validation.constraints.NotBlank; | ||
5 | import jakarta.validation.constraints.Size; | 6 | import jakarta.validation.constraints.Size; |
6 | import lombok.Data; | 7 | import lombok.Data; |
7 | import java.util.Date; | 8 | import java.util.Date; |
... | @@ -20,14 +21,12 @@ public class TdsOperatorIdentityRQVO { | ... | @@ -20,14 +21,12 @@ public class TdsOperatorIdentityRQVO { |
20 | * 系统唯一标识 | 21 | * 系统唯一标识 |
21 | */ | 22 | */ |
22 | @Schema(description = "系统唯一标识") | 23 | @Schema(description = "系统唯一标识") |
23 | @Size(max = 32, message = "系统唯一标识长度超过32") | ||
24 | private String guid; | 24 | private String guid; |
25 | 25 | ||
26 | /** | 26 | /** |
27 | * 会员Guid | 27 | * 会员Guid |
28 | */ | 28 | */ |
29 | @Schema(description = "会员Guid") | 29 | @Schema(description = "会员Guid") |
30 | @Size(max = 32, message = "会员Guid长度超过32") | ||
31 | private String tenantGuid; | 30 | private String tenantGuid; |
32 | 31 | ||
33 | /** | 32 | /** |
... | @@ -35,20 +34,21 @@ public class TdsOperatorIdentityRQVO { | ... | @@ -35,20 +34,21 @@ public class TdsOperatorIdentityRQVO { |
35 | */ | 34 | */ |
36 | @Schema(description = "经办人姓名") | 35 | @Schema(description = "经办人姓名") |
37 | @Size(max = 50, message = "经办人姓名长度超过50") | 36 | @Size(max = 50, message = "经办人姓名长度超过50") |
37 | @NotBlank(message = "经办人姓名为空。") | ||
38 | private String operatorName; | 38 | private String operatorName; |
39 | 39 | ||
40 | /** | 40 | /** |
41 | * 经办人身份标识(由区域/行业功能节点生成,唯一标识经办人身份) | 41 | * 经办人身份标识(由区域/行业功能节点生成,唯一标识经办人身份) |
42 | */ | 42 | */ |
43 | @Schema(description = "经办人身份标识(由区域/行业功能节点生成,唯一标识经办人身份)") | 43 | @Schema(description = "经办人身份标识(由区域/行业功能节点生成,唯一标识经办人身份)") |
44 | @Size(max = 32, message = "经办人身份标识(由区域/行业功能节点生成,唯一标识经办人身份)长度超过32") | ||
45 | private String operatorIdentity; | 44 | private String operatorIdentity; |
46 | 45 | ||
47 | /** | 46 | /** |
48 | * 经办人证件类型(来之数据字典证件类型) | 47 | * 经办人证件类型(来之数据字典证件类型) |
49 | */ | 48 | */ |
50 | @Schema(description = "经办人证件类型(来之数据字典证件类型)") | 49 | @Schema(description = "经办人证件类型(来之数据字典证件类型)") |
51 | @Size(max = 20, message = "经办人证件类型(来之数据字典证件类型)长度超过20") | 50 | @Size(max = 20, message = "经办人证件类型长度超过20") |
51 | @NotBlank(message = "经办人证件类型为空。") | ||
52 | private String idTypeCode; | 52 | private String idTypeCode; |
53 | 53 | ||
54 | /** | 54 | /** |
... | @@ -56,6 +56,7 @@ public class TdsOperatorIdentityRQVO { | ... | @@ -56,6 +56,7 @@ public class TdsOperatorIdentityRQVO { |
56 | */ | 56 | */ |
57 | @Schema(description = "经办人证件号码") | 57 | @Schema(description = "经办人证件号码") |
58 | @Size(max = 50, message = "经办人证件号码长度超过50") | 58 | @Size(max = 50, message = "经办人证件号码长度超过50") |
59 | @NotBlank(message = "经办人证件号码为空。") | ||
59 | private String idNumber; | 60 | private String idNumber; |
60 | 61 | ||
61 | /** | 62 | /** |
... | @@ -87,7 +88,7 @@ public class TdsOperatorIdentityRQVO { | ... | @@ -87,7 +88,7 @@ public class TdsOperatorIdentityRQVO { |
87 | * 认证日期 | 88 | * 认证日期 |
88 | */ | 89 | */ |
89 | @Schema(description = "认证日期") | 90 | @Schema(description = "认证日期") |
90 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | 91 | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
91 | private Date authenticationTime; | 92 | private Date authenticationTime; |
92 | 93 | ||
93 | /** | 94 | /** |
... | @@ -101,5 +102,10 @@ public class TdsOperatorIdentityRQVO { | ... | @@ -101,5 +102,10 @@ public class TdsOperatorIdentityRQVO { |
101 | /******** 自定义扩展 *****/ | 102 | /******** 自定义扩展 *****/ |
102 | 103 | ||
103 | /******** 子对象 *****/ | 104 | /******** 子对象 *****/ |
105 | @Schema(description = "经办人用户附加信息新增、修改参数") | ||
106 | private TdsOperatorAdditionalRQVO tdsOperatorAdditional; | ||
107 | |||
108 | @Schema(description = "经办人用户可验信息新增、修改参数") | ||
109 | private TdsOperatorVerifiableRQVO tdsOperatorVerifiable; | ||
104 | 110 | ||
105 | } | 111 | } | ... | ... |
... | @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; | ... | @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; |
5 | import jakarta.validation.constraints.Size; | 5 | import jakarta.validation.constraints.Size; |
6 | import lombok.Data; | 6 | import lombok.Data; |
7 | import java.util.Date; | 7 | import java.util.Date; |
8 | import java.util.Map; | ||
8 | 9 | ||
9 | /** | 10 | /** |
10 | * @program: | 11 | * @program: |
... | @@ -41,29 +42,25 @@ public class TdsOperatorVerifiableRQVO { | ... | @@ -41,29 +42,25 @@ public class TdsOperatorVerifiableRQVO { |
41 | * 授权书/委托书 | 42 | * 授权书/委托书 |
42 | */ | 43 | */ |
43 | @Schema(description = "授权书/委托书") | 44 | @Schema(description = "授权书/委托书") |
44 | @Size(max = -1, message = "授权书/委托书长度超过-1") | 45 | private Map<String,String> letterOfAuthorization; |
45 | private String letterOfAuthorization; | ||
46 | 46 | ||
47 | /** | 47 | /** |
48 | * 公证处出具的代理声明 | 48 | * 公证处出具的代理声明 |
49 | */ | 49 | */ |
50 | @Schema(description = "公证处出具的代理声明") | 50 | @Schema(description = "公证处出具的代理声明") |
51 | @Size(max = -1, message = "公证处出具的代理声明长度超过-1") | 51 | private Map<String,String> notaryOfficeStatement; |
52 | private String notaryOfficeStatement; | ||
53 | 52 | ||
54 | /** | 53 | /** |
55 | * 行业资质类委托备案证明 | 54 | * 行业资质类委托备案证明 |
56 | */ | 55 | */ |
57 | @Schema(description = "行业资质类委托备案证明") | 56 | @Schema(description = "行业资质类委托备案证明") |
58 | @Size(max = -1, message = "行业资质类委托备案证明长度超过-1") | 57 | private Map<String,String> filingCertificate; |
59 | private String filingCertificate; | ||
60 | 58 | ||
61 | /** | 59 | /** |
62 | * 其他第三方可信声明 | 60 | * 其他第三方可信声明 |
63 | */ | 61 | */ |
64 | @Schema(description = "其他第三方可信声明") | 62 | @Schema(description = "其他第三方可信声明") |
65 | @Size(max = -1, message = "其他第三方可信声明长度超过-1") | 63 | private Map<String,String> thirdPartyCertification; |
66 | private String thirdPartyCertification; | ||
67 | 64 | ||
68 | /******** 库表存储属性 需处理 *****/ | 65 | /******** 库表存储属性 需处理 *****/ |
69 | 66 | ... | ... |
1 | package com.csbr.qingcloud.portal.mybatis.entity; | ||
2 | |||
3 | import com.baomidou.mybatisplus.annotation.FieldStrategy; | ||
4 | import com.baomidou.mybatisplus.annotation.TableField; | ||
5 | import csbr.cloud.entity.domain.base.dao.BaseDO; | ||
6 | import jdk.jfr.Name; | ||
7 | import lombok.Data; | ||
8 | import lombok.EqualsAndHashCode; | ||
9 | import lombok.experimental.Accessors; | ||
10 | import java.util.Date; | ||
11 | |||
12 | /** | ||
13 | * @program: | ||
14 | * @description: 连接器附加信息实体 | ||
15 | * @author: xup | ||
16 | * @create: 2025-08-20 15:13 | ||
17 | **/ | ||
18 | @Data | ||
19 | @EqualsAndHashCode(callSuper = true) | ||
20 | @Accessors(chain = true) | ||
21 | @Name("连接器附加信息") | ||
22 | public class MfTdsConnectorAdditional extends BaseDO { | ||
23 | |||
24 | /** | ||
25 | * 会员Guid | ||
26 | */ | ||
27 | @Name("会员Guid") | ||
28 | private String tenantGuid; | ||
29 | |||
30 | /** | ||
31 | * 连接器Guid | ||
32 | */ | ||
33 | @Name("连接器Guid") | ||
34 | private String connectorGuid; | ||
35 | |||
36 | /** | ||
37 | * 可验证身份签发单位 | ||
38 | */ | ||
39 | @Name("可验证身份签发单位") | ||
40 | private String identityIssuingUnit; | ||
41 | |||
42 | /** | ||
43 | * 供应商名称 | ||
44 | */ | ||
45 | @Name("供应商名称") | ||
46 | private String supplierName; | ||
47 | |||
48 | /** | ||
49 | * 供应商代码 | ||
50 | */ | ||
51 | @Name("供应商代码") | ||
52 | private String supplierCode; | ||
53 | |||
54 | /** | ||
55 | * 产品SN号 | ||
56 | */ | ||
57 | @Name("产品SN号") | ||
58 | private String productSn; | ||
59 | |||
60 | /** | ||
61 | * 产品版本号 | ||
62 | */ | ||
63 | @Name("产品版本号") | ||
64 | private String productVersion; | ||
65 | |||
66 | /** | ||
67 | * 连接器类型(0 标准型;1 全功能型) | ||
68 | */ | ||
69 | @Name("连接器类型(0 标准型;1 全功能型)") | ||
70 | private Integer connectorType; | ||
71 | |||
72 | /** | ||
73 | * 设备MAC地址 | ||
74 | */ | ||
75 | @Name("设备MAC地址") | ||
76 | private String deviceMacAddress; | ||
77 | |||
78 | } |
1 | package com.csbr.qingcloud.portal.mybatis.entity; | ||
2 | |||
3 | import com.baomidou.mybatisplus.annotation.FieldStrategy; | ||
4 | import com.baomidou.mybatisplus.annotation.TableField; | ||
5 | import csbr.cloud.entity.domain.base.dao.BaseDO; | ||
6 | import jdk.jfr.Name; | ||
7 | import lombok.Data; | ||
8 | import lombok.EqualsAndHashCode; | ||
9 | import lombok.experimental.Accessors; | ||
10 | import java.util.Date; | ||
11 | |||
12 | /** | ||
13 | * @program: | ||
14 | * @description: 连接器身份信息实体 | ||
15 | * @author: xup | ||
16 | * @create: 2025-08-20 15:13 | ||
17 | **/ | ||
18 | @Data | ||
19 | @EqualsAndHashCode(callSuper = true) | ||
20 | @Accessors(chain = true) | ||
21 | @Name("连接器身份信息") | ||
22 | public class MfTdsConnectorIdentity extends BaseDO { | ||
23 | |||
24 | /** | ||
25 | * 会员Guid | ||
26 | */ | ||
27 | @Name("会员Guid") | ||
28 | private String tenantGuid; | ||
29 | |||
30 | /** | ||
31 | * 接入连接器名称 | ||
32 | */ | ||
33 | @Name("接入连接器名称") | ||
34 | private String connectorName; | ||
35 | |||
36 | /** | ||
37 | * 接入连接器身份标识(由区域/行业功能节点下发,唯一标识连接器身份) | ||
38 | */ | ||
39 | @Name("接入连接器身份标识(由区域/行业功能节点下发,唯一标识连接器身份)") | ||
40 | private String connectorIdentity; | ||
41 | |||
42 | /** | ||
43 | * IP地址列表 | ||
44 | */ | ||
45 | @Name("IP地址列表") | ||
46 | private String ipAddressList; | ||
47 | |||
48 | /** | ||
49 | * 域名列表 | ||
50 | */ | ||
51 | @Name("域名列表") | ||
52 | private String domainList; | ||
53 | |||
54 | /** | ||
55 | * 接入方式(1 专线;2 互联网(固定公网IP);3 互联网(无固定公网IP);4 高速数据网;5 其他) | ||
56 | */ | ||
57 | @Name("接入方式(1 专线;2 互联网(固定公网IP);3 互联网(无固定公网IP);4 高速数据网;5 其他)") | ||
58 | private Integer accessMethod; | ||
59 | |||
60 | /** | ||
61 | * 所属法人或其他组织名称 | ||
62 | */ | ||
63 | @Name("所属法人或其他组织名称") | ||
64 | private String legalEntity; | ||
65 | |||
66 | /** | ||
67 | * 所属法人或其他组织统一社会信用代码 | ||
68 | */ | ||
69 | @Name("所属法人或其他组织统一社会信用代码") | ||
70 | private String legalSocialCreditCode; | ||
71 | |||
72 | /** | ||
73 | * 可信身份凭证 | ||
74 | */ | ||
75 | @Name("可信身份凭证") | ||
76 | private String trustedIdentityCredential; | ||
77 | |||
78 | /** | ||
79 | * 凭证颁发日期 | ||
80 | */ | ||
81 | @Name("凭证颁发日期") | ||
82 | private Date credentialTime; | ||
83 | |||
84 | } |
1 | package com.csbr.qingcloud.portal.mybatis.entity; | ||
2 | |||
3 | import com.baomidou.mybatisplus.annotation.FieldStrategy; | ||
4 | import com.baomidou.mybatisplus.annotation.TableField; | ||
5 | import csbr.cloud.entity.domain.base.dao.BaseDO; | ||
6 | import jdk.jfr.Name; | ||
7 | import lombok.Data; | ||
8 | import lombok.EqualsAndHashCode; | ||
9 | import lombok.experimental.Accessors; | ||
10 | import java.util.Date; | ||
11 | |||
12 | /** | ||
13 | * @program: | ||
14 | * @description: 连接器可验信息实体 | ||
15 | * @author: xup | ||
16 | * @create: 2025-08-20 15:13 | ||
17 | **/ | ||
18 | @Data | ||
19 | @EqualsAndHashCode(callSuper = true) | ||
20 | @Accessors(chain = true) | ||
21 | @Name("连接器可验信息") | ||
22 | public class MfTdsConnectorVerifiable extends BaseDO { | ||
23 | |||
24 | /** | ||
25 | * 会员Guid | ||
26 | */ | ||
27 | @Name("会员Guid") | ||
28 | private String tenantGuid; | ||
29 | |||
30 | /** | ||
31 | * 连接器Guid | ||
32 | */ | ||
33 | @Name("连接器Guid") | ||
34 | private String connectorGuid; | ||
35 | |||
36 | /** | ||
37 | * 网络接入资质认证 | ||
38 | */ | ||
39 | @Name("网络接入资质认证") | ||
40 | private String networkAccessQualification; | ||
41 | |||
42 | /** | ||
43 | * 等级保护测评结果 | ||
44 | */ | ||
45 | @Name("等级保护测评结果") | ||
46 | private String levelProtectionEvaluationResults; | ||
47 | |||
48 | /** | ||
49 | * 网络安全产品备案证明 | ||
50 | */ | ||
51 | @Name("网络安全产品备案证明") | ||
52 | private String networkSecurityFilingCertificate; | ||
53 | |||
54 | /** | ||
55 | * 加密模块认证 | ||
56 | */ | ||
57 | @Name("加密模块认证") | ||
58 | private String encryptionModuleAuthentication; | ||
59 | |||
60 | /** | ||
61 | * 软件供应链合规声明 | ||
62 | */ | ||
63 | @Name("软件供应链合规声明") | ||
64 | private String softwareScmStatemen; | ||
65 | |||
66 | /** | ||
67 | * 安全漏洞修复声明 | ||
68 | */ | ||
69 | @Name("安全漏洞修复声明") | ||
70 | private String securityLoopholeRepairStatement; | ||
71 | |||
72 | /** | ||
73 | * 通信协议兼容性认证 | ||
74 | */ | ||
75 | @Name("通信协议兼容性认证") | ||
76 | private String communicationProtocolCompatibilityCertification; | ||
77 | |||
78 | /** | ||
79 | * 硬件可信执行环境(TEE)认证 | ||
80 | */ | ||
81 | @Name("硬件可信执行环境(TEE)认证") | ||
82 | private String teeCertification; | ||
83 | |||
84 | /** | ||
85 | * 接入行为审计合规报告 | ||
86 | */ | ||
87 | @Name("接入行为审计合规报告") | ||
88 | private String accessAuditReport; | ||
89 | |||
90 | /** | ||
91 | * 第三方认证声明 | ||
92 | */ | ||
93 | @Name("第三方认证声明") | ||
94 | private String thirdPartyCertification; | ||
95 | |||
96 | } |
src/main/java/com/csbr/qingcloud/portal/mybatis/mapper/MfTdsConnectorAdditionalMapper.java
0 → 100644
1 | package com.csbr.qingcloud.portal.mybatis.mapper; | ||
2 | |||
3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
4 | import org.apache.ibatis.annotations.Mapper; | ||
5 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorAdditional; | ||
6 | |||
7 | /** | ||
8 | * @program: | ||
9 | * @description: 连接器附加信息 Mapper 接口 | ||
10 | * @author: xup | ||
11 | * @create: 2025-08-20 15:13 | ||
12 | **/ | ||
13 | @Mapper | ||
14 | public interface MfTdsConnectorAdditionalMapper extends BaseMapper<MfTdsConnectorAdditional> { | ||
15 | |||
16 | } |
1 | package com.csbr.qingcloud.portal.mybatis.mapper; | ||
2 | |||
3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
4 | import org.apache.ibatis.annotations.Mapper; | ||
5 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorIdentity; | ||
6 | |||
7 | /** | ||
8 | * @program: | ||
9 | * @description: 连接器身份信息 Mapper 接口 | ||
10 | * @author: xup | ||
11 | * @create: 2025-08-20 15:13 | ||
12 | **/ | ||
13 | @Mapper | ||
14 | public interface MfTdsConnectorIdentityMapper extends BaseMapper<MfTdsConnectorIdentity> { | ||
15 | |||
16 | } |
src/main/java/com/csbr/qingcloud/portal/mybatis/mapper/MfTdsConnectorVerifiableMapper.java
0 → 100644
1 | package com.csbr.qingcloud.portal.mybatis.mapper; | ||
2 | |||
3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
4 | import org.apache.ibatis.annotations.Mapper; | ||
5 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorVerifiable; | ||
6 | |||
7 | /** | ||
8 | * @program: | ||
9 | * @description: 连接器可验信息 Mapper 接口 | ||
10 | * @author: xup | ||
11 | * @create: 2025-08-20 15:13 | ||
12 | **/ | ||
13 | @Mapper | ||
14 | public interface MfTdsConnectorVerifiableMapper extends BaseMapper<MfTdsConnectorVerifiable> { | ||
15 | |||
16 | } |
src/main/java/com/csbr/qingcloud/portal/mybatis/service/MfTdsConnectorAdditionalService.java
0 → 100644
1 | package com.csbr.qingcloud.portal.mybatis.service; | ||
2 | |||
3 | import com.csbr.cloud.base.service.CsbrService; | ||
4 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorAdditional; | ||
5 | |||
6 | /** | ||
7 | * @program: | ||
8 | * @description: 连接器附加信息逻辑层接口 | ||
9 | * @author: xup | ||
10 | * @create: 2025-08-20 15:13 | ||
11 | **/ | ||
12 | public interface MfTdsConnectorAdditionalService extends CsbrService<MfTdsConnectorAdditional> { | ||
13 | |||
14 | } |
src/main/java/com/csbr/qingcloud/portal/mybatis/service/MfTdsConnectorIdentityService.java
0 → 100644
1 | package com.csbr.qingcloud.portal.mybatis.service; | ||
2 | |||
3 | import com.csbr.cloud.base.service.CsbrService; | ||
4 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorIdentity; | ||
5 | |||
6 | /** | ||
7 | * @program: | ||
8 | * @description: 连接器身份信息逻辑层接口 | ||
9 | * @author: xup | ||
10 | * @create: 2025-08-20 15:13 | ||
11 | **/ | ||
12 | public interface MfTdsConnectorIdentityService extends CsbrService<MfTdsConnectorIdentity> { | ||
13 | |||
14 | } |
src/main/java/com/csbr/qingcloud/portal/mybatis/service/MfTdsConnectorVerifiableService.java
0 → 100644
1 | package com.csbr.qingcloud.portal.mybatis.service; | ||
2 | |||
3 | import com.csbr.cloud.base.service.CsbrService; | ||
4 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorVerifiable; | ||
5 | |||
6 | /** | ||
7 | * @program: | ||
8 | * @description: 连接器可验信息逻辑层接口 | ||
9 | * @author: xup | ||
10 | * @create: 2025-08-20 15:13 | ||
11 | **/ | ||
12 | public interface MfTdsConnectorVerifiableService extends CsbrService<MfTdsConnectorVerifiable> { | ||
13 | |||
14 | } |
1 | package com.csbr.qingcloud.portal.mybatis.service.impl; | ||
2 | |||
3 | import com.csbr.cloud.mybatis.service.impl.CsbrServiceImpl; | ||
4 | import com.csbr.qingcloud.portal.mybatis.mapper.MfTdsConnectorAdditionalMapper; | ||
5 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorAdditional; | ||
6 | import com.csbr.qingcloud.portal.mybatis.service.MfTdsConnectorAdditionalService; | ||
7 | import jakarta.annotation.Resource; | ||
8 | import org.springframework.stereotype.Service; | ||
9 | |||
10 | /** | ||
11 | * @program: | ||
12 | * @description: 连接器附加信息逻辑层接口实现 | ||
13 | * @author: xup | ||
14 | * @create: 2025-08-20 15:13 | ||
15 | **/ | ||
16 | @Service | ||
17 | public class MfTdsConnectorAdditionalServiceImpl extends CsbrServiceImpl<MfTdsConnectorAdditionalMapper, MfTdsConnectorAdditional> implements MfTdsConnectorAdditionalService { | ||
18 | |||
19 | @Resource | ||
20 | private MfTdsConnectorAdditionalMapper mfTdsConnectorAdditionalMapper; | ||
21 | |||
22 | } |
src/main/java/com/csbr/qingcloud/portal/mybatis/service/impl/MfTdsConnectorIdentityServiceImpl.java
0 → 100644
1 | package com.csbr.qingcloud.portal.mybatis.service.impl; | ||
2 | |||
3 | import com.csbr.cloud.mybatis.service.impl.CsbrServiceImpl; | ||
4 | import com.csbr.qingcloud.portal.mybatis.mapper.MfTdsConnectorIdentityMapper; | ||
5 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorIdentity; | ||
6 | import com.csbr.qingcloud.portal.mybatis.service.MfTdsConnectorIdentityService; | ||
7 | import jakarta.annotation.Resource; | ||
8 | import org.springframework.stereotype.Service; | ||
9 | |||
10 | /** | ||
11 | * @program: | ||
12 | * @description: 连接器身份信息逻辑层接口实现 | ||
13 | * @author: xup | ||
14 | * @create: 2025-08-20 15:13 | ||
15 | **/ | ||
16 | @Service | ||
17 | public class MfTdsConnectorIdentityServiceImpl extends CsbrServiceImpl<MfTdsConnectorIdentityMapper, MfTdsConnectorIdentity> implements MfTdsConnectorIdentityService { | ||
18 | |||
19 | @Resource | ||
20 | private MfTdsConnectorIdentityMapper mfTdsConnectorIdentityMapper; | ||
21 | |||
22 | } |
1 | package com.csbr.qingcloud.portal.mybatis.service.impl; | ||
2 | |||
3 | import com.csbr.cloud.mybatis.service.impl.CsbrServiceImpl; | ||
4 | import com.csbr.qingcloud.portal.mybatis.mapper.MfTdsConnectorVerifiableMapper; | ||
5 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorVerifiable; | ||
6 | import com.csbr.qingcloud.portal.mybatis.service.MfTdsConnectorVerifiableService; | ||
7 | import jakarta.annotation.Resource; | ||
8 | import org.springframework.stereotype.Service; | ||
9 | |||
10 | /** | ||
11 | * @program: | ||
12 | * @description: 连接器可验信息逻辑层接口实现 | ||
13 | * @author: xup | ||
14 | * @create: 2025-08-20 15:13 | ||
15 | **/ | ||
16 | @Service | ||
17 | public class MfTdsConnectorVerifiableServiceImpl extends CsbrServiceImpl<MfTdsConnectorVerifiableMapper, MfTdsConnectorVerifiable> implements MfTdsConnectorVerifiableService { | ||
18 | |||
19 | @Resource | ||
20 | private MfTdsConnectorVerifiableMapper mfTdsConnectorVerifiableMapper; | ||
21 | |||
22 | } |
1 | package com.csbr.qingcloud.portal.service; | ||
2 | |||
3 | import csbr.cloud.entity.domain.base.vo.PageListVO; | ||
4 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorAdditionalQueryVO; | ||
5 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorAdditionalRQVO; | ||
6 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorAdditionalRSVO; | ||
7 | |||
8 | import java.util.List; | ||
9 | |||
10 | /** | ||
11 | * @program: | ||
12 | * @description: 连接器附加信息业务逻辑接口 | ||
13 | * @author: xup | ||
14 | * @create: 2025-08-20 15:13 | ||
15 | **/ | ||
16 | public interface TdsConnectorAdditionalService { | ||
17 | |||
18 | /** | ||
19 | * 连接器附加信息分页查询 | ||
20 | * @author xup | ||
21 | * @date 2025-08-20 15:13 | ||
22 | * @param queryVO | ||
23 | * @return com.csbr.cloud.mybatis.entity.PageListVO<com.csbr.qingcloud.portal.domain.vo.TdsConnectorAdditionalRSVO> | ||
24 | */ | ||
25 | PageListVO<TdsConnectorAdditionalRSVO> pageList(TdsConnectorAdditionalQueryVO queryVO); | ||
26 | |||
27 | /** | ||
28 | * 连接器附加信息获取详情数据 | ||
29 | * @author xup | ||
30 | * @date 2025-08-20 15:13 | ||
31 | * @param guid | ||
32 | * @return com.csbr.qingcloud.portal.domain.vo.TdsConnectorAdditionalRSVO | ||
33 | */ | ||
34 | TdsConnectorAdditionalRSVO getTdsConnectorAdditionalDetail(String guid); | ||
35 | |||
36 | /** | ||
37 | * 连接器附加信息数据新增 | ||
38 | * @author xup | ||
39 | * @date 2025-08-20 15:13 | ||
40 | * @param rqVO | ||
41 | * @return boolean | ||
42 | */ | ||
43 | void saveTdsConnectorAdditional(TdsConnectorAdditionalRQVO rqVO); | ||
44 | |||
45 | /** | ||
46 | * 连接器附加信息数据修改 | ||
47 | * @author xup | ||
48 | * @date 2025-08-20 15:13 | ||
49 | * @param rqVO | ||
50 | * @return boolean | ||
51 | */ | ||
52 | void updateTdsConnectorAdditional(TdsConnectorAdditionalRQVO rqVO); | ||
53 | |||
54 | /** | ||
55 | * 连接器附加信息数据删除 | ||
56 | * @author xup | ||
57 | * @date 2025-08-20 15:13 | ||
58 | * @param guids | ||
59 | * @return void | ||
60 | */ | ||
61 | void removeByGuids(List<String> guids); | ||
62 | |||
63 | /** | ||
64 | * 连接器附加信息数据删除、并有相关的处理操作 | ||
65 | * @author xup | ||
66 | * @date 2025-08-20 15:13 | ||
67 | * @param guids | ||
68 | * @return void | ||
69 | */ | ||
70 | void removeHandleByGuids(List<String> guids); | ||
71 | |||
72 | } |
1 | package com.csbr.qingcloud.portal.service; | ||
2 | |||
3 | import csbr.cloud.entity.domain.base.vo.PageListVO; | ||
4 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityQueryVO; | ||
5 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityRQVO; | ||
6 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityRSVO; | ||
7 | |||
8 | import java.util.List; | ||
9 | |||
10 | /** | ||
11 | * @program: | ||
12 | * @description: 连接器身份信息业务逻辑接口 | ||
13 | * @author: xup | ||
14 | * @create: 2025-08-20 15:13 | ||
15 | **/ | ||
16 | public interface TdsConnectorIdentityService { | ||
17 | |||
18 | /** | ||
19 | * 连接器身份信息分页查询 | ||
20 | * @author xup | ||
21 | * @date 2025-08-20 15:13 | ||
22 | * @param queryVO | ||
23 | * @return com.csbr.cloud.mybatis.entity.PageListVO<com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityRSVO> | ||
24 | */ | ||
25 | PageListVO<TdsConnectorIdentityRSVO> pageList(TdsConnectorIdentityQueryVO queryVO); | ||
26 | |||
27 | /** | ||
28 | * 连接器身份信息获取详情数据 | ||
29 | * @author xup | ||
30 | * @date 2025-08-20 15:13 | ||
31 | * @param guid | ||
32 | * @return com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityRSVO | ||
33 | */ | ||
34 | TdsConnectorIdentityRSVO getTdsConnectorIdentityDetail(String guid); | ||
35 | |||
36 | /** | ||
37 | * 连接器身份信息数据新增 | ||
38 | * @author xup | ||
39 | * @date 2025-08-20 15:13 | ||
40 | * @param rqVO | ||
41 | * @return boolean | ||
42 | */ | ||
43 | void saveTdsConnectorIdentity(TdsConnectorIdentityRQVO rqVO); | ||
44 | |||
45 | /** | ||
46 | * 连接器身份信息数据修改 | ||
47 | * @author xup | ||
48 | * @date 2025-08-20 15:13 | ||
49 | * @param rqVO | ||
50 | * @return boolean | ||
51 | */ | ||
52 | void updateTdsConnectorIdentity(TdsConnectorIdentityRQVO rqVO); | ||
53 | |||
54 | /** | ||
55 | * 连接器身份信息数据删除 | ||
56 | * @author xup | ||
57 | * @date 2025-08-20 15:13 | ||
58 | * @param guids | ||
59 | * @return void | ||
60 | */ | ||
61 | void removeByGuids(List<String> guids); | ||
62 | |||
63 | /** | ||
64 | * 连接器身份信息数据删除、并有相关的处理操作 | ||
65 | * @author xup | ||
66 | * @date 2025-08-20 15:13 | ||
67 | * @param guids | ||
68 | * @return void | ||
69 | */ | ||
70 | void removeHandleByGuids(List<String> guids); | ||
71 | |||
72 | } |
1 | package com.csbr.qingcloud.portal.service; | ||
2 | |||
3 | import csbr.cloud.entity.domain.base.vo.PageListVO; | ||
4 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorVerifiableQueryVO; | ||
5 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorVerifiableRQVO; | ||
6 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorVerifiableRSVO; | ||
7 | |||
8 | import java.util.List; | ||
9 | |||
10 | /** | ||
11 | * @program: | ||
12 | * @description: 连接器可验信息业务逻辑接口 | ||
13 | * @author: xup | ||
14 | * @create: 2025-08-20 15:13 | ||
15 | **/ | ||
16 | public interface TdsConnectorVerifiableService { | ||
17 | |||
18 | /** | ||
19 | * 连接器可验信息分页查询 | ||
20 | * @author xup | ||
21 | * @date 2025-08-20 15:13 | ||
22 | * @param queryVO | ||
23 | * @return com.csbr.cloud.mybatis.entity.PageListVO<com.csbr.qingcloud.portal.domain.vo.TdsConnectorVerifiableRSVO> | ||
24 | */ | ||
25 | PageListVO<TdsConnectorVerifiableRSVO> pageList(TdsConnectorVerifiableQueryVO queryVO); | ||
26 | |||
27 | /** | ||
28 | * 连接器可验信息获取详情数据 | ||
29 | * @author xup | ||
30 | * @date 2025-08-20 15:13 | ||
31 | * @param guid | ||
32 | * @return com.csbr.qingcloud.portal.domain.vo.TdsConnectorVerifiableRSVO | ||
33 | */ | ||
34 | TdsConnectorVerifiableRSVO getTdsConnectorVerifiableDetail(String guid); | ||
35 | |||
36 | /** | ||
37 | * 连接器可验信息数据新增 | ||
38 | * @author xup | ||
39 | * @date 2025-08-20 15:13 | ||
40 | * @param rqVO | ||
41 | * @return boolean | ||
42 | */ | ||
43 | void saveTdsConnectorVerifiable(TdsConnectorVerifiableRQVO rqVO); | ||
44 | |||
45 | /** | ||
46 | * 连接器可验信息数据修改 | ||
47 | * @author xup | ||
48 | * @date 2025-08-20 15:13 | ||
49 | * @param rqVO | ||
50 | * @return boolean | ||
51 | */ | ||
52 | void updateTdsConnectorVerifiable(TdsConnectorVerifiableRQVO rqVO); | ||
53 | |||
54 | /** | ||
55 | * 连接器可验信息数据删除 | ||
56 | * @author xup | ||
57 | * @date 2025-08-20 15:13 | ||
58 | * @param guids | ||
59 | * @return void | ||
60 | */ | ||
61 | void removeByGuids(List<String> guids); | ||
62 | |||
63 | /** | ||
64 | * 连接器可验信息数据删除、并有相关的处理操作 | ||
65 | * @author xup | ||
66 | * @date 2025-08-20 15:13 | ||
67 | * @param guids | ||
68 | * @return void | ||
69 | */ | ||
70 | void removeHandleByGuids(List<String> guids); | ||
71 | |||
72 | } |
... | @@ -69,4 +69,16 @@ public interface TdsCorporationAdditionalService { | ... | @@ -69,4 +69,16 @@ public interface TdsCorporationAdditionalService { |
69 | */ | 69 | */ |
70 | void removeHandleByGuids(List<String> guids); | 70 | void removeHandleByGuids(List<String> guids); |
71 | 71 | ||
72 | /** | ||
73 | * 法人用户附加信息查询 | ||
74 | * @param corporationGuid | ||
75 | * @return | ||
76 | */ | ||
77 | TdsCorporationAdditionalRSVO getTdsCorporationAdditionalByCorporationGuid(String corporationGuid); | ||
78 | |||
79 | /** | ||
80 | * 根据法人删除法人用户附加信息查询 | ||
81 | * @param corporationGuids | ||
82 | */ | ||
83 | void removeByCorporationGuids(List<String> corporationGuids); | ||
72 | } | 84 | } | ... | ... |
... | @@ -69,4 +69,16 @@ public interface TdsCorporationVerifiableService { | ... | @@ -69,4 +69,16 @@ public interface TdsCorporationVerifiableService { |
69 | */ | 69 | */ |
70 | void removeHandleByGuids(List<String> guids); | 70 | void removeHandleByGuids(List<String> guids); |
71 | 71 | ||
72 | /** | ||
73 | * 法人用户可验信息查询 | ||
74 | * @param corporationGuid | ||
75 | * @return | ||
76 | */ | ||
77 | TdsCorporationVerifiableRSVO getTdsCorporationVerifiableByCorporationGuid(String corporationGuid); | ||
78 | |||
79 | /** | ||
80 | * 根据法人删除法人用户可验信息 | ||
81 | * @param corporationGuids | ||
82 | */ | ||
83 | void removeByCorporationGuids(List<String> corporationGuids); | ||
72 | } | 84 | } | ... | ... |
... | @@ -69,4 +69,9 @@ public interface TdsOperatorAdditionalService { | ... | @@ -69,4 +69,9 @@ public interface TdsOperatorAdditionalService { |
69 | */ | 69 | */ |
70 | void removeHandleByGuids(List<String> guids); | 70 | void removeHandleByGuids(List<String> guids); |
71 | 71 | ||
72 | /** | ||
73 | * 根据经办人Guid删除经办人用户附加信息 | ||
74 | * @param operatorGuids | ||
75 | */ | ||
76 | void removeByOperatorGuids(List<String> operatorGuids); | ||
72 | } | 77 | } | ... | ... |
... | @@ -69,4 +69,9 @@ public interface TdsOperatorVerifiableService { | ... | @@ -69,4 +69,9 @@ public interface TdsOperatorVerifiableService { |
69 | */ | 69 | */ |
70 | void removeHandleByGuids(List<String> guids); | 70 | void removeHandleByGuids(List<String> guids); |
71 | 71 | ||
72 | /** | ||
73 | * 根据经办人Guid删除经办人用户可验信息 | ||
74 | * @param operatorGuids | ||
75 | */ | ||
76 | void removeByOperatorGuids(List<String> operatorGuids); | ||
72 | } | 77 | } | ... | ... |
src/main/java/com/csbr/qingcloud/portal/service/impl/TdsConnectorAdditionalServiceImpl.java
0 → 100644
1 | package com.csbr.qingcloud.portal.service.impl; | ||
2 | |||
3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
4 | import com.csbr.cloud.common.enums.SystemError; | ||
5 | import com.csbr.cloud.common.exception.CsbrSystemException; | ||
6 | import com.csbr.cloud.common.util.CommonUtil; | ||
7 | import com.csbr.cloud.common.util.CsbrBeanUtil; | ||
8 | import com.csbr.cloud.common.util.MessageSourceUtil; | ||
9 | import csbr.cloud.entity.domain.base.vo.PageListVO; | ||
10 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorAdditionalQueryVO; | ||
11 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorAdditionalRQVO; | ||
12 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorAdditionalRSVO; | ||
13 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorAdditional; | ||
14 | import com.csbr.qingcloud.portal.mybatis.service.MfTdsConnectorAdditionalService; | ||
15 | import com.csbr.qingcloud.portal.service.TdsConnectorAdditionalService; | ||
16 | import jakarta.annotation.Resource; | ||
17 | import lombok.extern.slf4j.Slf4j; | ||
18 | import org.apache.commons.collections.CollectionUtils; | ||
19 | import org.apache.commons.lang3.StringUtils; | ||
20 | import org.springframework.stereotype.Service; | ||
21 | import org.springframework.transaction.annotation.Transactional; | ||
22 | |||
23 | import java.util.ArrayList; | ||
24 | import java.util.Collections; | ||
25 | import java.util.List; | ||
26 | |||
27 | /** | ||
28 | * @program: | ||
29 | * @description: 连接器附加信息业务逻辑实现 | ||
30 | * @author: xup | ||
31 | * @create: 2025-08-20 15:13 | ||
32 | **/ | ||
33 | @Slf4j | ||
34 | @Service | ||
35 | public class TdsConnectorAdditionalServiceImpl implements TdsConnectorAdditionalService { | ||
36 | |||
37 | /** | ||
38 | * 功能名称 | ||
39 | */ | ||
40 | private static final String FUNCTION_NAME = "连接器附加信息"; | ||
41 | |||
42 | @Resource | ||
43 | private MfTdsConnectorAdditionalService mfTdsConnectorAdditionalService; | ||
44 | |||
45 | @Resource | ||
46 | private CsbrBeanUtil csbrBeanUtil; | ||
47 | |||
48 | @Resource | ||
49 | private MessageSourceUtil messageSourceUtil; | ||
50 | |||
51 | /** | ||
52 | * 连接器附加信息分页查询 | ||
53 | * @author xup | ||
54 | * @date 2025-08-20 15:13 | ||
55 | * @param queryVO | ||
56 | * @return com.csbr.cloud.mybatis.entity.PageListVO<com.csbr.qingcloud.portal.domain.vo.TdsConnectorAdditionalRSVO> | ||
57 | */ | ||
58 | @Override | ||
59 | public PageListVO<TdsConnectorAdditionalRSVO> pageList(TdsConnectorAdditionalQueryVO queryVO) { | ||
60 | beforeQuery(queryVO); | ||
61 | LambdaQueryWrapper<MfTdsConnectorAdditional> queryWrapper = mfTdsConnectorAdditionalService.csbrQueryWrapper(queryVO, MfTdsConnectorAdditional.class); | ||
62 | queryWrapper.orderByDesc(MfTdsConnectorAdditional::getCreateTime); | ||
63 | PageListVO<MfTdsConnectorAdditional> pageList = mfTdsConnectorAdditionalService.csbrPageList(queryVO, queryWrapper); | ||
64 | PageListVO<TdsConnectorAdditionalRSVO> rsPageList = csbrBeanUtil.convert(pageList, PageListVO.class); | ||
65 | afterQuery(pageList, rsPageList); | ||
66 | return rsPageList; | ||
67 | } | ||
68 | |||
69 | /** | ||
70 | * 连接器附加信息获取详情数据 | ||
71 | * @author xup | ||
72 | * @date 2025-08-20 15:13 | ||
73 | * @param guid | ||
74 | * @return com.csbr.qingcloud.portal.domain.vo.TdsConnectorAdditionalRSVO | ||
75 | */ | ||
76 | @Override | ||
77 | public TdsConnectorAdditionalRSVO getTdsConnectorAdditionalDetail(String guid) { | ||
78 | if (StringUtils.isBlank(guid)) { | ||
79 | // W00012 = {0}:参数[{1}]不能为空! | ||
80 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00010", | ||
81 | String.format("获取%s详情数据", FUNCTION_NAME), "数据唯一标识")); | ||
82 | } | ||
83 | MfTdsConnectorAdditional entity = mfTdsConnectorAdditionalService.getById(guid); | ||
84 | if (entity == null) { | ||
85 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToSelectMessage(String.format("获取%s详情数据", FUNCTION_NAME))); | ||
86 | } | ||
87 | return convertToVO(entity); | ||
88 | } | ||
89 | |||
90 | /** | ||
91 | * 连接器附加信息数据新增 | ||
92 | * @author xup | ||
93 | * @date 2025-08-20 15:13 | ||
94 | * @param rqVO | ||
95 | * @return boolean | ||
96 | */ | ||
97 | @Transactional(rollbackFor = Exception.class) | ||
98 | @Override | ||
99 | public void saveTdsConnectorAdditional(TdsConnectorAdditionalRQVO rqVO) { | ||
100 | beforeSave(rqVO); | ||
101 | MfTdsConnectorAdditional entity = convertToEntity(rqVO); | ||
102 | mfTdsConnectorAdditionalService.csbrAddEntity(entity); | ||
103 | boolean flag = mfTdsConnectorAdditionalService.save(entity); | ||
104 | if (!flag) { | ||
105 | throw new CsbrSystemException(SystemError.DATA_ADD_ERROR, messageSourceUtil.addMessage(FUNCTION_NAME)); | ||
106 | } | ||
107 | afterSave(rqVO); | ||
108 | } | ||
109 | |||
110 | /** | ||
111 | * 连接器附加信息数据修改 | ||
112 | * @author xup | ||
113 | * @date 2025-08-20 15:13 | ||
114 | * @param rqVO | ||
115 | * @return boolean | ||
116 | */ | ||
117 | @Transactional(rollbackFor = Exception.class) | ||
118 | @Override | ||
119 | public void updateTdsConnectorAdditional(TdsConnectorAdditionalRQVO rqVO) { | ||
120 | // 将修改前数据查出来缓存下来,传入到修改后方法中,用于一些特殊逻辑处理,如某个值变化才进行 | ||
121 | // MfTdsConnectorAdditional oldEntity = mfTdsConnectorAdditionalService.getById(rqVO.getGuid()); | ||
122 | MfTdsConnectorAdditional oldEntity = null; | ||
123 | beforeUpdate(rqVO); | ||
124 | MfTdsConnectorAdditional entity = convertToEntity(rqVO); | ||
125 | mfTdsConnectorAdditionalService.csbrUpdateEntity(entity); | ||
126 | boolean flag = mfTdsConnectorAdditionalService.updateById(entity); | ||
127 | if (!flag) { | ||
128 | throw new CsbrSystemException(SystemError.DATA_UPDATE_ERROR, messageSourceUtil.updateMessage(FUNCTION_NAME)); | ||
129 | } | ||
130 | afterUpdate(rqVO, oldEntity); | ||
131 | } | ||
132 | |||
133 | /** | ||
134 | * 连接器附加信息数据删除 | ||
135 | * @author xup | ||
136 | * @date 2025-08-20 15:13 | ||
137 | * @param guids | ||
138 | * @return void | ||
139 | */ | ||
140 | @Transactional(rollbackFor = Exception.class) | ||
141 | @Override | ||
142 | public void removeByGuids(List<String> guids) { | ||
143 | if (CollectionUtils.isEmpty(guids)) { | ||
144 | // W00012 = {0}:参数[{1}]不能为空! | ||
145 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00012", | ||
146 | String.format("删除%s数据", FUNCTION_NAME), "数据唯一标识")); | ||
147 | } | ||
148 | if (!mfTdsConnectorAdditionalService.isExistsData(guids, MfTdsConnectorAdditional.class)) { | ||
149 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.notExistsToDelMessage(FUNCTION_NAME)); | ||
150 | } | ||
151 | boolean flag = mfTdsConnectorAdditionalService.removeByIds(guids); | ||
152 | if (!flag) { | ||
153 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.delMessage(FUNCTION_NAME)); | ||
154 | } | ||
155 | } | ||
156 | |||
157 | /** | ||
158 | * 连接器附加信息数据删除、并有相关的处理操作 | ||
159 | * @author xup | ||
160 | * @date 2025-08-20 15:13 | ||
161 | * @param guids | ||
162 | * @return void | ||
163 | */ | ||
164 | @Transactional(rollbackFor = Exception.class) | ||
165 | @Override | ||
166 | public void removeHandleByGuids(List<String> guids) { | ||
167 | if (CollectionUtils.isEmpty(guids)) { | ||
168 | // W00012 = {0}:参数[{1}]不能为空! | ||
169 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00012", | ||
170 | String.format("删除%s数据", FUNCTION_NAME), "数据唯一标识")); | ||
171 | } | ||
172 | for (String guid : guids) { | ||
173 | MfTdsConnectorAdditional entity = mfTdsConnectorAdditionalService.getById(guid); | ||
174 | beforeRemove(entity); | ||
175 | boolean flag = mfTdsConnectorAdditionalService.removeById(guid); | ||
176 | if (!flag) { | ||
177 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.delMessage(FUNCTION_NAME)); | ||
178 | } | ||
179 | afterRemove(entity); | ||
180 | } | ||
181 | } | ||
182 | |||
183 | /** | ||
184 | * 连接器附加信息新新增前置处理 | ||
185 | * @author xup | ||
186 | * @date 2025-08-20 15:13 | ||
187 | * @param rqVO | ||
188 | * @return void | ||
189 | */ | ||
190 | private void beforeSave(TdsConnectorAdditionalRQVO rqVO) { | ||
191 | //region 1.输入基础验证 | ||
192 | //endregion | ||
193 | |||
194 | //region 2.数据验证特殊处理 | ||
195 | //region 2.1.业务合规性验证 | ||
196 | //endregion 2.1.业务合规性验证 | ||
197 | |||
198 | //region 2.2.业务数据验证 | ||
199 | //endregion 2.2.业务数据验证 | ||
200 | |||
201 | //endregion 2.数据验证特殊处理 | ||
202 | |||
203 | //region 3.数据转换处理 | ||
204 | |||
205 | //region 3.1.数据过程转换 | ||
206 | //endregion 3.1.数据过程转换 | ||
207 | |||
208 | //endregion 3.数据转换处理 | ||
209 | |||
210 | //region 4.数据过滤与补充处理 | ||
211 | |||
212 | //endregion 4.数据过滤与补充处理 | ||
213 | |||
214 | //region 5.过程处理 | ||
215 | |||
216 | //region 5.1.计算逻辑处理 | ||
217 | //endregion 5.1.计算逻辑处理 | ||
218 | |||
219 | //region 5.2.业务逻辑处理 | ||
220 | //endregion 5.2.业务逻辑处理 | ||
221 | |||
222 | //endregion 5.过程处理 | ||
223 | } | ||
224 | |||
225 | /** | ||
226 | * 连接器附加信息新增后置处理 | ||
227 | * @author xup | ||
228 | * @date 2025-08-20 15:13 | ||
229 | * @param rqVO | ||
230 | * @return void | ||
231 | */ | ||
232 | private void afterSave(TdsConnectorAdditionalRQVO rqVO) { | ||
233 | //region 1.输出特殊转换 | ||
234 | |||
235 | //region 1.1.输出过滤与补充处理 | ||
236 | //endregion 1.1.输出过滤与补充处理 | ||
237 | |||
238 | //endregion 1.输出特殊转换 | ||
239 | } | ||
240 | |||
241 | /** | ||
242 | * 连接器附加信息修改前置校验、处理 | ||
243 | * @author xup | ||
244 | * @date 2025-08-20 15:13 | ||
245 | * @param rqVO | ||
246 | * @return void | ||
247 | */ | ||
248 | private void beforeUpdate(TdsConnectorAdditionalRQVO rqVO) { | ||
249 | //region 1.输入基础验证 | ||
250 | if (StringUtils.isBlank(rqVO.getGuid())) { | ||
251 | // W00012 = {0}:参数[{1}]不能为空! | ||
252 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00010", String.format("修改%s数据",FUNCTION_NAME), "数据唯一标识")); | ||
253 | } | ||
254 | //endregion | ||
255 | |||
256 | //region 2.数据验证特殊处理 | ||
257 | //region 2.1.业务合规性验证 | ||
258 | //endregion 2.1.业务合规性验证 | ||
259 | |||
260 | //region 2.2.业务数据验证 | ||
261 | if (!mfTdsConnectorAdditionalService.isExistsData(Collections.singletonList(rqVO.getGuid()), MfTdsConnectorAdditional.class)) { | ||
262 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.notExistsToUpdateMessage(FUNCTION_NAME)); | ||
263 | } | ||
264 | //endregion 2.2.业务数据验证 | ||
265 | |||
266 | //endregion 2.数据验证特殊处理 | ||
267 | |||
268 | //region 3.数据转换处理 | ||
269 | |||
270 | //region 3.1.数据过程转换 | ||
271 | //endregion 3.1.数据过程转换 | ||
272 | |||
273 | //endregion 3.数据转换处理 | ||
274 | |||
275 | //region 4.数据过滤与补充处理 | ||
276 | //endregion 4.数据过滤与补充处理 | ||
277 | |||
278 | //region 5.过程处理 | ||
279 | |||
280 | //region 5.1.计算逻辑处理 | ||
281 | //endregion 5.1.计算逻辑处理 | ||
282 | |||
283 | //region 5.2.业务逻辑处理 | ||
284 | //endregion 5.2.业务逻辑处理 | ||
285 | |||
286 | //endregion 5.过程处理 | ||
287 | } | ||
288 | |||
289 | /** | ||
290 | * 连接器附加信息修改后置处理 | ||
291 | * @author xup | ||
292 | * @date 2025-08-20 15:13 | ||
293 | * @param rqVO | ||
294 | * @param entity | ||
295 | * @return void | ||
296 | */ | ||
297 | protected void afterUpdate(TdsConnectorAdditionalRQVO rqVO, MfTdsConnectorAdditional entity) { | ||
298 | //region 1.输出特殊转换 | ||
299 | |||
300 | //region 1.1.输出过滤与补充处理 | ||
301 | //endregion 1.1.输出过滤与补充处理 | ||
302 | |||
303 | //endregion 1.输出特殊转换 | ||
304 | } | ||
305 | |||
306 | |||
307 | /** | ||
308 | * 连接器附加信息删除前置处理 | ||
309 | * @author xup | ||
310 | * @date 2025-08-20 15:13 | ||
311 | * @param entity | ||
312 | * @return void | ||
313 | */ | ||
314 | private void beforeRemove(MfTdsConnectorAdditional entity) { | ||
315 | if (entity == null) { | ||
316 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.notExistsToDelMessage(FUNCTION_NAME)); | ||
317 | } | ||
318 | } | ||
319 | |||
320 | /** | ||
321 | * 连接器附加信息删除后置处理 | ||
322 | * @author xup | ||
323 | * @date 2025-08-20 15:13 | ||
324 | * @param entity | ||
325 | * @return void | ||
326 | */ | ||
327 | private void afterRemove(MfTdsConnectorAdditional entity) { | ||
328 | |||
329 | } | ||
330 | |||
331 | /** | ||
332 | * 连接器附加信息查询方法前置验证、处理 | ||
333 | * @author xup | ||
334 | * @date 2025-08-20 15:13 | ||
335 | * @param rqQueryVO | ||
336 | * @return void | ||
337 | */ | ||
338 | private void beforeQuery(TdsConnectorAdditionalQueryVO rqQueryVO) { | ||
339 | |||
340 | } | ||
341 | |||
342 | /** | ||
343 | * 连接器附加信息查询方法后置数据转换、处理 | ||
344 | * @author xup | ||
345 | * @date 2025-08-20 15:13 | ||
346 | * @param pageList 数据库查询数据 | ||
347 | * @param rsPageList 返回的最终数据 | ||
348 | * @return void | ||
349 | */ | ||
350 | private void afterQuery(PageListVO<MfTdsConnectorAdditional> pageList, PageListVO<TdsConnectorAdditionalRSVO> rsPageList) { | ||
351 | if (CollectionUtils.isNotEmpty(pageList.getRecords())) { | ||
352 | rsPageList.setRecords(convertToVO(pageList.getRecords())); | ||
353 | } | ||
354 | // 需要特殊处理数据时使用 | ||
355 | /*if(CollectionUtils.isNotEmpty(pageList.getRecords())){ | ||
356 | List<TdsConnectorAdditionalRSVO> results = new ArrayList<>(); | ||
357 | for (MfTdsConnectorAdditional item : pageList.getRecords()){ | ||
358 | TdsConnectorAdditionalRSVO vo = convertToVO(item); | ||
359 | results.add(vo); | ||
360 | } | ||
361 | rsPageList.setRecords(results); | ||
362 | }*/ | ||
363 | } | ||
364 | |||
365 | //region 辅助操作 | ||
366 | |||
367 | /** | ||
368 | * 连接器附加信息实体数据转换为视图对象数据(多个) | ||
369 | * @author xup | ||
370 | * @date 2025-08-20 15:13 | ||
371 | * @param entityList 实体数据列表 | ||
372 | * @return java.util.List<com.csbr.qingcloud.portal.domain.vo.TdsConnectorAdditionalRSVO> 视图对象列表 | ||
373 | */ | ||
374 | private List<TdsConnectorAdditionalRSVO> convertToVO(List<MfTdsConnectorAdditional> entityList) { | ||
375 | if (CollectionUtils.isEmpty(entityList)) { | ||
376 | // W00012 = {0}:参数[{1}]不能为空! | ||
377 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00012", | ||
378 | "实体数据转换为视图对象实体数据", "实体数据")); | ||
379 | } | ||
380 | List<TdsConnectorAdditionalRSVO> voList = new ArrayList<>(entityList.size()); | ||
381 | for (MfTdsConnectorAdditional item : entityList) { | ||
382 | TdsConnectorAdditionalRSVO vo = convertToVO(item); | ||
383 | voList.add(vo); | ||
384 | } | ||
385 | return voList; | ||
386 | } | ||
387 | |||
388 | /** | ||
389 | * 连接器附加信息实体数据转换为视图对象数据 | ||
390 | * @author xup | ||
391 | * @date 2025-08-20 15:13 | ||
392 | * @param entity | ||
393 | * @return com.csbr.qingcloud.portal.domain.vo.TdsConnectorAdditionalRSVO | ||
394 | */ | ||
395 | private TdsConnectorAdditionalRSVO convertToVO(MfTdsConnectorAdditional entity) { | ||
396 | TdsConnectorAdditionalRSVO vo = csbrBeanUtil.convert(entity, TdsConnectorAdditionalRSVO.class); | ||
397 | return vo; | ||
398 | } | ||
399 | |||
400 | /** | ||
401 | * 连接器附加信息新增、修改和其他情况的参数转换为实体 | ||
402 | * @author xup | ||
403 | * @date 2025-08-20 15:13 | ||
404 | * @param vo | ||
405 | * @return com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorAdditional | ||
406 | */ | ||
407 | private MfTdsConnectorAdditional convertToEntity(TdsConnectorAdditionalRQVO vo) { | ||
408 | MfTdsConnectorAdditional entity = csbrBeanUtil.convert(vo, MfTdsConnectorAdditional.class); | ||
409 | // 新增时数据默认guid赋值,转换后该guid可能别使用 | ||
410 | if (StringUtils.isBlank(vo.getGuid())) { | ||
411 | entity.setGuid(CommonUtil.newGuid()); | ||
412 | } | ||
413 | return entity; | ||
414 | } | ||
415 | |||
416 | //endregion | ||
417 | |||
418 | } |
src/main/java/com/csbr/qingcloud/portal/service/impl/TdsConnectorIdentityServiceImpl.java
0 → 100644
1 | package com.csbr.qingcloud.portal.service.impl; | ||
2 | |||
3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
4 | import com.csbr.cloud.common.enums.SystemError; | ||
5 | import com.csbr.cloud.common.exception.CsbrSystemException; | ||
6 | import com.csbr.cloud.common.util.CommonUtil; | ||
7 | import com.csbr.cloud.common.util.CsbrBeanUtil; | ||
8 | import com.csbr.cloud.common.util.MessageSourceUtil; | ||
9 | import csbr.cloud.entity.domain.base.vo.PageListVO; | ||
10 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityQueryVO; | ||
11 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityRQVO; | ||
12 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityRSVO; | ||
13 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorIdentity; | ||
14 | import com.csbr.qingcloud.portal.mybatis.service.MfTdsConnectorIdentityService; | ||
15 | import com.csbr.qingcloud.portal.service.TdsConnectorIdentityService; | ||
16 | import jakarta.annotation.Resource; | ||
17 | import lombok.extern.slf4j.Slf4j; | ||
18 | import org.apache.commons.collections.CollectionUtils; | ||
19 | import org.apache.commons.lang3.StringUtils; | ||
20 | import org.springframework.stereotype.Service; | ||
21 | import org.springframework.transaction.annotation.Transactional; | ||
22 | |||
23 | import java.util.ArrayList; | ||
24 | import java.util.Collections; | ||
25 | import java.util.List; | ||
26 | |||
27 | /** | ||
28 | * @program: | ||
29 | * @description: 连接器身份信息业务逻辑实现 | ||
30 | * @author: xup | ||
31 | * @create: 2025-08-20 15:13 | ||
32 | **/ | ||
33 | @Slf4j | ||
34 | @Service | ||
35 | public class TdsConnectorIdentityServiceImpl implements TdsConnectorIdentityService { | ||
36 | |||
37 | /** | ||
38 | * 功能名称 | ||
39 | */ | ||
40 | private static final String FUNCTION_NAME = "连接器身份信息"; | ||
41 | |||
42 | @Resource | ||
43 | private MfTdsConnectorIdentityService mfTdsConnectorIdentityService; | ||
44 | |||
45 | @Resource | ||
46 | private CsbrBeanUtil csbrBeanUtil; | ||
47 | |||
48 | @Resource | ||
49 | private MessageSourceUtil messageSourceUtil; | ||
50 | |||
51 | /** | ||
52 | * 连接器身份信息分页查询 | ||
53 | * @author xup | ||
54 | * @date 2025-08-20 15:13 | ||
55 | * @param queryVO | ||
56 | * @return com.csbr.cloud.mybatis.entity.PageListVO<com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityRSVO> | ||
57 | */ | ||
58 | @Override | ||
59 | public PageListVO<TdsConnectorIdentityRSVO> pageList(TdsConnectorIdentityQueryVO queryVO) { | ||
60 | beforeQuery(queryVO); | ||
61 | LambdaQueryWrapper<MfTdsConnectorIdentity> queryWrapper = mfTdsConnectorIdentityService.csbrQueryWrapper(queryVO, MfTdsConnectorIdentity.class); | ||
62 | queryWrapper.orderByDesc(MfTdsConnectorIdentity::getCreateTime); | ||
63 | PageListVO<MfTdsConnectorIdentity> pageList = mfTdsConnectorIdentityService.csbrPageList(queryVO, queryWrapper); | ||
64 | PageListVO<TdsConnectorIdentityRSVO> rsPageList = csbrBeanUtil.convert(pageList, PageListVO.class); | ||
65 | afterQuery(pageList, rsPageList); | ||
66 | return rsPageList; | ||
67 | } | ||
68 | |||
69 | /** | ||
70 | * 连接器身份信息获取详情数据 | ||
71 | * @author xup | ||
72 | * @date 2025-08-20 15:13 | ||
73 | * @param guid | ||
74 | * @return com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityRSVO | ||
75 | */ | ||
76 | @Override | ||
77 | public TdsConnectorIdentityRSVO getTdsConnectorIdentityDetail(String guid) { | ||
78 | if (StringUtils.isBlank(guid)) { | ||
79 | // W00012 = {0}:参数[{1}]不能为空! | ||
80 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00010", | ||
81 | String.format("获取%s详情数据", FUNCTION_NAME), "数据唯一标识")); | ||
82 | } | ||
83 | MfTdsConnectorIdentity entity = mfTdsConnectorIdentityService.getById(guid); | ||
84 | if (entity == null) { | ||
85 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToSelectMessage(String.format("获取%s详情数据", FUNCTION_NAME))); | ||
86 | } | ||
87 | return convertToVO(entity); | ||
88 | } | ||
89 | |||
90 | /** | ||
91 | * 连接器身份信息数据新增 | ||
92 | * @author xup | ||
93 | * @date 2025-08-20 15:13 | ||
94 | * @param rqVO | ||
95 | * @return boolean | ||
96 | */ | ||
97 | @Transactional(rollbackFor = Exception.class) | ||
98 | @Override | ||
99 | public void saveTdsConnectorIdentity(TdsConnectorIdentityRQVO rqVO) { | ||
100 | beforeSave(rqVO); | ||
101 | MfTdsConnectorIdentity entity = convertToEntity(rqVO); | ||
102 | mfTdsConnectorIdentityService.csbrAddEntity(entity); | ||
103 | boolean flag = mfTdsConnectorIdentityService.save(entity); | ||
104 | if (!flag) { | ||
105 | throw new CsbrSystemException(SystemError.DATA_ADD_ERROR, messageSourceUtil.addMessage(FUNCTION_NAME)); | ||
106 | } | ||
107 | afterSave(rqVO); | ||
108 | } | ||
109 | |||
110 | /** | ||
111 | * 连接器身份信息数据修改 | ||
112 | * @author xup | ||
113 | * @date 2025-08-20 15:13 | ||
114 | * @param rqVO | ||
115 | * @return boolean | ||
116 | */ | ||
117 | @Transactional(rollbackFor = Exception.class) | ||
118 | @Override | ||
119 | public void updateTdsConnectorIdentity(TdsConnectorIdentityRQVO rqVO) { | ||
120 | // 将修改前数据查出来缓存下来,传入到修改后方法中,用于一些特殊逻辑处理,如某个值变化才进行 | ||
121 | // MfTdsConnectorIdentity oldEntity = mfTdsConnectorIdentityService.getById(rqVO.getGuid()); | ||
122 | MfTdsConnectorIdentity oldEntity = null; | ||
123 | beforeUpdate(rqVO); | ||
124 | MfTdsConnectorIdentity entity = convertToEntity(rqVO); | ||
125 | mfTdsConnectorIdentityService.csbrUpdateEntity(entity); | ||
126 | boolean flag = mfTdsConnectorIdentityService.updateById(entity); | ||
127 | if (!flag) { | ||
128 | throw new CsbrSystemException(SystemError.DATA_UPDATE_ERROR, messageSourceUtil.updateMessage(FUNCTION_NAME)); | ||
129 | } | ||
130 | afterUpdate(rqVO, oldEntity); | ||
131 | } | ||
132 | |||
133 | /** | ||
134 | * 连接器身份信息数据删除 | ||
135 | * @author xup | ||
136 | * @date 2025-08-20 15:13 | ||
137 | * @param guids | ||
138 | * @return void | ||
139 | */ | ||
140 | @Transactional(rollbackFor = Exception.class) | ||
141 | @Override | ||
142 | public void removeByGuids(List<String> guids) { | ||
143 | if (CollectionUtils.isEmpty(guids)) { | ||
144 | // W00012 = {0}:参数[{1}]不能为空! | ||
145 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00012", | ||
146 | String.format("删除%s数据", FUNCTION_NAME), "数据唯一标识")); | ||
147 | } | ||
148 | if (!mfTdsConnectorIdentityService.isExistsData(guids, MfTdsConnectorIdentity.class)) { | ||
149 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.notExistsToDelMessage(FUNCTION_NAME)); | ||
150 | } | ||
151 | boolean flag = mfTdsConnectorIdentityService.removeByIds(guids); | ||
152 | if (!flag) { | ||
153 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.delMessage(FUNCTION_NAME)); | ||
154 | } | ||
155 | } | ||
156 | |||
157 | /** | ||
158 | * 连接器身份信息数据删除、并有相关的处理操作 | ||
159 | * @author xup | ||
160 | * @date 2025-08-20 15:13 | ||
161 | * @param guids | ||
162 | * @return void | ||
163 | */ | ||
164 | @Transactional(rollbackFor = Exception.class) | ||
165 | @Override | ||
166 | public void removeHandleByGuids(List<String> guids) { | ||
167 | if (CollectionUtils.isEmpty(guids)) { | ||
168 | // W00012 = {0}:参数[{1}]不能为空! | ||
169 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00012", | ||
170 | String.format("删除%s数据", FUNCTION_NAME), "数据唯一标识")); | ||
171 | } | ||
172 | for (String guid : guids) { | ||
173 | MfTdsConnectorIdentity entity = mfTdsConnectorIdentityService.getById(guid); | ||
174 | beforeRemove(entity); | ||
175 | boolean flag = mfTdsConnectorIdentityService.removeById(guid); | ||
176 | if (!flag) { | ||
177 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.delMessage(FUNCTION_NAME)); | ||
178 | } | ||
179 | afterRemove(entity); | ||
180 | } | ||
181 | } | ||
182 | |||
183 | /** | ||
184 | * 连接器身份信息新新增前置处理 | ||
185 | * @author xup | ||
186 | * @date 2025-08-20 15:13 | ||
187 | * @param rqVO | ||
188 | * @return void | ||
189 | */ | ||
190 | private void beforeSave(TdsConnectorIdentityRQVO rqVO) { | ||
191 | //region 1.输入基础验证 | ||
192 | //endregion | ||
193 | |||
194 | //region 2.数据验证特殊处理 | ||
195 | //region 2.1.业务合规性验证 | ||
196 | //endregion 2.1.业务合规性验证 | ||
197 | |||
198 | //region 2.2.业务数据验证 | ||
199 | //endregion 2.2.业务数据验证 | ||
200 | |||
201 | //endregion 2.数据验证特殊处理 | ||
202 | |||
203 | //region 3.数据转换处理 | ||
204 | |||
205 | //region 3.1.数据过程转换 | ||
206 | //endregion 3.1.数据过程转换 | ||
207 | |||
208 | //endregion 3.数据转换处理 | ||
209 | |||
210 | //region 4.数据过滤与补充处理 | ||
211 | |||
212 | //endregion 4.数据过滤与补充处理 | ||
213 | |||
214 | //region 5.过程处理 | ||
215 | |||
216 | //region 5.1.计算逻辑处理 | ||
217 | //endregion 5.1.计算逻辑处理 | ||
218 | |||
219 | //region 5.2.业务逻辑处理 | ||
220 | //endregion 5.2.业务逻辑处理 | ||
221 | |||
222 | //endregion 5.过程处理 | ||
223 | } | ||
224 | |||
225 | /** | ||
226 | * 连接器身份信息新增后置处理 | ||
227 | * @author xup | ||
228 | * @date 2025-08-20 15:13 | ||
229 | * @param rqVO | ||
230 | * @return void | ||
231 | */ | ||
232 | private void afterSave(TdsConnectorIdentityRQVO rqVO) { | ||
233 | //region 1.输出特殊转换 | ||
234 | |||
235 | //region 1.1.输出过滤与补充处理 | ||
236 | //endregion 1.1.输出过滤与补充处理 | ||
237 | |||
238 | //endregion 1.输出特殊转换 | ||
239 | } | ||
240 | |||
241 | /** | ||
242 | * 连接器身份信息修改前置校验、处理 | ||
243 | * @author xup | ||
244 | * @date 2025-08-20 15:13 | ||
245 | * @param rqVO | ||
246 | * @return void | ||
247 | */ | ||
248 | private void beforeUpdate(TdsConnectorIdentityRQVO rqVO) { | ||
249 | //region 1.输入基础验证 | ||
250 | if (StringUtils.isBlank(rqVO.getGuid())) { | ||
251 | // W00012 = {0}:参数[{1}]不能为空! | ||
252 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00010", String.format("修改%s数据",FUNCTION_NAME), "数据唯一标识")); | ||
253 | } | ||
254 | //endregion | ||
255 | |||
256 | //region 2.数据验证特殊处理 | ||
257 | //region 2.1.业务合规性验证 | ||
258 | //endregion 2.1.业务合规性验证 | ||
259 | |||
260 | //region 2.2.业务数据验证 | ||
261 | if (!mfTdsConnectorIdentityService.isExistsData(Collections.singletonList(rqVO.getGuid()), MfTdsConnectorIdentity.class)) { | ||
262 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.notExistsToUpdateMessage(FUNCTION_NAME)); | ||
263 | } | ||
264 | //endregion 2.2.业务数据验证 | ||
265 | |||
266 | //endregion 2.数据验证特殊处理 | ||
267 | |||
268 | //region 3.数据转换处理 | ||
269 | |||
270 | //region 3.1.数据过程转换 | ||
271 | //endregion 3.1.数据过程转换 | ||
272 | |||
273 | //endregion 3.数据转换处理 | ||
274 | |||
275 | //region 4.数据过滤与补充处理 | ||
276 | //endregion 4.数据过滤与补充处理 | ||
277 | |||
278 | //region 5.过程处理 | ||
279 | |||
280 | //region 5.1.计算逻辑处理 | ||
281 | //endregion 5.1.计算逻辑处理 | ||
282 | |||
283 | //region 5.2.业务逻辑处理 | ||
284 | //endregion 5.2.业务逻辑处理 | ||
285 | |||
286 | //endregion 5.过程处理 | ||
287 | } | ||
288 | |||
289 | /** | ||
290 | * 连接器身份信息修改后置处理 | ||
291 | * @author xup | ||
292 | * @date 2025-08-20 15:13 | ||
293 | * @param rqVO | ||
294 | * @param entity | ||
295 | * @return void | ||
296 | */ | ||
297 | protected void afterUpdate(TdsConnectorIdentityRQVO rqVO, MfTdsConnectorIdentity entity) { | ||
298 | //region 1.输出特殊转换 | ||
299 | |||
300 | //region 1.1.输出过滤与补充处理 | ||
301 | //endregion 1.1.输出过滤与补充处理 | ||
302 | |||
303 | //endregion 1.输出特殊转换 | ||
304 | } | ||
305 | |||
306 | |||
307 | /** | ||
308 | * 连接器身份信息删除前置处理 | ||
309 | * @author xup | ||
310 | * @date 2025-08-20 15:13 | ||
311 | * @param entity | ||
312 | * @return void | ||
313 | */ | ||
314 | private void beforeRemove(MfTdsConnectorIdentity entity) { | ||
315 | if (entity == null) { | ||
316 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.notExistsToDelMessage(FUNCTION_NAME)); | ||
317 | } | ||
318 | } | ||
319 | |||
320 | /** | ||
321 | * 连接器身份信息删除后置处理 | ||
322 | * @author xup | ||
323 | * @date 2025-08-20 15:13 | ||
324 | * @param entity | ||
325 | * @return void | ||
326 | */ | ||
327 | private void afterRemove(MfTdsConnectorIdentity entity) { | ||
328 | |||
329 | } | ||
330 | |||
331 | /** | ||
332 | * 连接器身份信息查询方法前置验证、处理 | ||
333 | * @author xup | ||
334 | * @date 2025-08-20 15:13 | ||
335 | * @param rqQueryVO | ||
336 | * @return void | ||
337 | */ | ||
338 | private void beforeQuery(TdsConnectorIdentityQueryVO rqQueryVO) { | ||
339 | |||
340 | } | ||
341 | |||
342 | /** | ||
343 | * 连接器身份信息查询方法后置数据转换、处理 | ||
344 | * @author xup | ||
345 | * @date 2025-08-20 15:13 | ||
346 | * @param pageList 数据库查询数据 | ||
347 | * @param rsPageList 返回的最终数据 | ||
348 | * @return void | ||
349 | */ | ||
350 | private void afterQuery(PageListVO<MfTdsConnectorIdentity> pageList, PageListVO<TdsConnectorIdentityRSVO> rsPageList) { | ||
351 | if (CollectionUtils.isNotEmpty(pageList.getRecords())) { | ||
352 | rsPageList.setRecords(convertToVO(pageList.getRecords())); | ||
353 | } | ||
354 | // 需要特殊处理数据时使用 | ||
355 | /*if(CollectionUtils.isNotEmpty(pageList.getRecords())){ | ||
356 | List<TdsConnectorIdentityRSVO> results = new ArrayList<>(); | ||
357 | for (MfTdsConnectorIdentity item : pageList.getRecords()){ | ||
358 | TdsConnectorIdentityRSVO vo = convertToVO(item); | ||
359 | results.add(vo); | ||
360 | } | ||
361 | rsPageList.setRecords(results); | ||
362 | }*/ | ||
363 | } | ||
364 | |||
365 | //region 辅助操作 | ||
366 | |||
367 | /** | ||
368 | * 连接器身份信息实体数据转换为视图对象数据(多个) | ||
369 | * @author xup | ||
370 | * @date 2025-08-20 15:13 | ||
371 | * @param entityList 实体数据列表 | ||
372 | * @return java.util.List<com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityRSVO> 视图对象列表 | ||
373 | */ | ||
374 | private List<TdsConnectorIdentityRSVO> convertToVO(List<MfTdsConnectorIdentity> entityList) { | ||
375 | if (CollectionUtils.isEmpty(entityList)) { | ||
376 | // W00012 = {0}:参数[{1}]不能为空! | ||
377 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00012", | ||
378 | "实体数据转换为视图对象实体数据", "实体数据")); | ||
379 | } | ||
380 | List<TdsConnectorIdentityRSVO> voList = new ArrayList<>(entityList.size()); | ||
381 | for (MfTdsConnectorIdentity item : entityList) { | ||
382 | TdsConnectorIdentityRSVO vo = convertToVO(item); | ||
383 | voList.add(vo); | ||
384 | } | ||
385 | return voList; | ||
386 | } | ||
387 | |||
388 | /** | ||
389 | * 连接器身份信息实体数据转换为视图对象数据 | ||
390 | * @author xup | ||
391 | * @date 2025-08-20 15:13 | ||
392 | * @param entity | ||
393 | * @return com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityRSVO | ||
394 | */ | ||
395 | private TdsConnectorIdentityRSVO convertToVO(MfTdsConnectorIdentity entity) { | ||
396 | TdsConnectorIdentityRSVO vo = csbrBeanUtil.convert(entity, TdsConnectorIdentityRSVO.class); | ||
397 | return vo; | ||
398 | } | ||
399 | |||
400 | /** | ||
401 | * 连接器身份信息新增、修改和其他情况的参数转换为实体 | ||
402 | * @author xup | ||
403 | * @date 2025-08-20 15:13 | ||
404 | * @param vo | ||
405 | * @return com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorIdentity | ||
406 | */ | ||
407 | private MfTdsConnectorIdentity convertToEntity(TdsConnectorIdentityRQVO vo) { | ||
408 | MfTdsConnectorIdentity entity = csbrBeanUtil.convert(vo, MfTdsConnectorIdentity.class); | ||
409 | // 新增时数据默认guid赋值,转换后该guid可能别使用 | ||
410 | if (StringUtils.isBlank(vo.getGuid())) { | ||
411 | entity.setGuid(CommonUtil.newGuid()); | ||
412 | } | ||
413 | return entity; | ||
414 | } | ||
415 | |||
416 | //endregion | ||
417 | |||
418 | } |
src/main/java/com/csbr/qingcloud/portal/service/impl/TdsConnectorVerifiableServiceImpl.java
0 → 100644
1 | package com.csbr.qingcloud.portal.service.impl; | ||
2 | |||
3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
4 | import com.csbr.cloud.common.enums.SystemError; | ||
5 | import com.csbr.cloud.common.exception.CsbrSystemException; | ||
6 | import com.csbr.cloud.common.util.CommonUtil; | ||
7 | import com.csbr.cloud.common.util.CsbrBeanUtil; | ||
8 | import com.csbr.cloud.common.util.MessageSourceUtil; | ||
9 | import csbr.cloud.entity.domain.base.vo.PageListVO; | ||
10 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorVerifiableQueryVO; | ||
11 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorVerifiableRQVO; | ||
12 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorVerifiableRSVO; | ||
13 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorVerifiable; | ||
14 | import com.csbr.qingcloud.portal.mybatis.service.MfTdsConnectorVerifiableService; | ||
15 | import com.csbr.qingcloud.portal.service.TdsConnectorVerifiableService; | ||
16 | import jakarta.annotation.Resource; | ||
17 | import lombok.extern.slf4j.Slf4j; | ||
18 | import org.apache.commons.collections.CollectionUtils; | ||
19 | import org.apache.commons.lang3.StringUtils; | ||
20 | import org.springframework.stereotype.Service; | ||
21 | import org.springframework.transaction.annotation.Transactional; | ||
22 | |||
23 | import java.util.ArrayList; | ||
24 | import java.util.Collections; | ||
25 | import java.util.List; | ||
26 | |||
27 | /** | ||
28 | * @program: | ||
29 | * @description: 连接器可验信息业务逻辑实现 | ||
30 | * @author: xup | ||
31 | * @create: 2025-08-20 15:13 | ||
32 | **/ | ||
33 | @Slf4j | ||
34 | @Service | ||
35 | public class TdsConnectorVerifiableServiceImpl implements TdsConnectorVerifiableService { | ||
36 | |||
37 | /** | ||
38 | * 功能名称 | ||
39 | */ | ||
40 | private static final String FUNCTION_NAME = "连接器可验信息"; | ||
41 | |||
42 | @Resource | ||
43 | private MfTdsConnectorVerifiableService mfTdsConnectorVerifiableService; | ||
44 | |||
45 | @Resource | ||
46 | private CsbrBeanUtil csbrBeanUtil; | ||
47 | |||
48 | @Resource | ||
49 | private MessageSourceUtil messageSourceUtil; | ||
50 | |||
51 | /** | ||
52 | * 连接器可验信息分页查询 | ||
53 | * @author xup | ||
54 | * @date 2025-08-20 15:13 | ||
55 | * @param queryVO | ||
56 | * @return com.csbr.cloud.mybatis.entity.PageListVO<com.csbr.qingcloud.portal.domain.vo.TdsConnectorVerifiableRSVO> | ||
57 | */ | ||
58 | @Override | ||
59 | public PageListVO<TdsConnectorVerifiableRSVO> pageList(TdsConnectorVerifiableQueryVO queryVO) { | ||
60 | beforeQuery(queryVO); | ||
61 | LambdaQueryWrapper<MfTdsConnectorVerifiable> queryWrapper = mfTdsConnectorVerifiableService.csbrQueryWrapper(queryVO, MfTdsConnectorVerifiable.class); | ||
62 | queryWrapper.orderByDesc(MfTdsConnectorVerifiable::getCreateTime); | ||
63 | PageListVO<MfTdsConnectorVerifiable> pageList = mfTdsConnectorVerifiableService.csbrPageList(queryVO, queryWrapper); | ||
64 | PageListVO<TdsConnectorVerifiableRSVO> rsPageList = csbrBeanUtil.convert(pageList, PageListVO.class); | ||
65 | afterQuery(pageList, rsPageList); | ||
66 | return rsPageList; | ||
67 | } | ||
68 | |||
69 | /** | ||
70 | * 连接器可验信息获取详情数据 | ||
71 | * @author xup | ||
72 | * @date 2025-08-20 15:13 | ||
73 | * @param guid | ||
74 | * @return com.csbr.qingcloud.portal.domain.vo.TdsConnectorVerifiableRSVO | ||
75 | */ | ||
76 | @Override | ||
77 | public TdsConnectorVerifiableRSVO getTdsConnectorVerifiableDetail(String guid) { | ||
78 | if (StringUtils.isBlank(guid)) { | ||
79 | // W00012 = {0}:参数[{1}]不能为空! | ||
80 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00010", | ||
81 | String.format("获取%s详情数据", FUNCTION_NAME), "数据唯一标识")); | ||
82 | } | ||
83 | MfTdsConnectorVerifiable entity = mfTdsConnectorVerifiableService.getById(guid); | ||
84 | if (entity == null) { | ||
85 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToSelectMessage(String.format("获取%s详情数据", FUNCTION_NAME))); | ||
86 | } | ||
87 | return convertToVO(entity); | ||
88 | } | ||
89 | |||
90 | /** | ||
91 | * 连接器可验信息数据新增 | ||
92 | * @author xup | ||
93 | * @date 2025-08-20 15:13 | ||
94 | * @param rqVO | ||
95 | * @return boolean | ||
96 | */ | ||
97 | @Transactional(rollbackFor = Exception.class) | ||
98 | @Override | ||
99 | public void saveTdsConnectorVerifiable(TdsConnectorVerifiableRQVO rqVO) { | ||
100 | beforeSave(rqVO); | ||
101 | MfTdsConnectorVerifiable entity = convertToEntity(rqVO); | ||
102 | mfTdsConnectorVerifiableService.csbrAddEntity(entity); | ||
103 | boolean flag = mfTdsConnectorVerifiableService.save(entity); | ||
104 | if (!flag) { | ||
105 | throw new CsbrSystemException(SystemError.DATA_ADD_ERROR, messageSourceUtil.addMessage(FUNCTION_NAME)); | ||
106 | } | ||
107 | afterSave(rqVO); | ||
108 | } | ||
109 | |||
110 | /** | ||
111 | * 连接器可验信息数据修改 | ||
112 | * @author xup | ||
113 | * @date 2025-08-20 15:13 | ||
114 | * @param rqVO | ||
115 | * @return boolean | ||
116 | */ | ||
117 | @Transactional(rollbackFor = Exception.class) | ||
118 | @Override | ||
119 | public void updateTdsConnectorVerifiable(TdsConnectorVerifiableRQVO rqVO) { | ||
120 | // 将修改前数据查出来缓存下来,传入到修改后方法中,用于一些特殊逻辑处理,如某个值变化才进行 | ||
121 | // MfTdsConnectorVerifiable oldEntity = mfTdsConnectorVerifiableService.getById(rqVO.getGuid()); | ||
122 | MfTdsConnectorVerifiable oldEntity = null; | ||
123 | beforeUpdate(rqVO); | ||
124 | MfTdsConnectorVerifiable entity = convertToEntity(rqVO); | ||
125 | mfTdsConnectorVerifiableService.csbrUpdateEntity(entity); | ||
126 | boolean flag = mfTdsConnectorVerifiableService.updateById(entity); | ||
127 | if (!flag) { | ||
128 | throw new CsbrSystemException(SystemError.DATA_UPDATE_ERROR, messageSourceUtil.updateMessage(FUNCTION_NAME)); | ||
129 | } | ||
130 | afterUpdate(rqVO, oldEntity); | ||
131 | } | ||
132 | |||
133 | /** | ||
134 | * 连接器可验信息数据删除 | ||
135 | * @author xup | ||
136 | * @date 2025-08-20 15:13 | ||
137 | * @param guids | ||
138 | * @return void | ||
139 | */ | ||
140 | @Transactional(rollbackFor = Exception.class) | ||
141 | @Override | ||
142 | public void removeByGuids(List<String> guids) { | ||
143 | if (CollectionUtils.isEmpty(guids)) { | ||
144 | // W00012 = {0}:参数[{1}]不能为空! | ||
145 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00012", | ||
146 | String.format("删除%s数据", FUNCTION_NAME), "数据唯一标识")); | ||
147 | } | ||
148 | if (!mfTdsConnectorVerifiableService.isExistsData(guids, MfTdsConnectorVerifiable.class)) { | ||
149 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.notExistsToDelMessage(FUNCTION_NAME)); | ||
150 | } | ||
151 | boolean flag = mfTdsConnectorVerifiableService.removeByIds(guids); | ||
152 | if (!flag) { | ||
153 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.delMessage(FUNCTION_NAME)); | ||
154 | } | ||
155 | } | ||
156 | |||
157 | /** | ||
158 | * 连接器可验信息数据删除、并有相关的处理操作 | ||
159 | * @author xup | ||
160 | * @date 2025-08-20 15:13 | ||
161 | * @param guids | ||
162 | * @return void | ||
163 | */ | ||
164 | @Transactional(rollbackFor = Exception.class) | ||
165 | @Override | ||
166 | public void removeHandleByGuids(List<String> guids) { | ||
167 | if (CollectionUtils.isEmpty(guids)) { | ||
168 | // W00012 = {0}:参数[{1}]不能为空! | ||
169 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00012", | ||
170 | String.format("删除%s数据", FUNCTION_NAME), "数据唯一标识")); | ||
171 | } | ||
172 | for (String guid : guids) { | ||
173 | MfTdsConnectorVerifiable entity = mfTdsConnectorVerifiableService.getById(guid); | ||
174 | beforeRemove(entity); | ||
175 | boolean flag = mfTdsConnectorVerifiableService.removeById(guid); | ||
176 | if (!flag) { | ||
177 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.delMessage(FUNCTION_NAME)); | ||
178 | } | ||
179 | afterRemove(entity); | ||
180 | } | ||
181 | } | ||
182 | |||
183 | /** | ||
184 | * 连接器可验信息新新增前置处理 | ||
185 | * @author xup | ||
186 | * @date 2025-08-20 15:13 | ||
187 | * @param rqVO | ||
188 | * @return void | ||
189 | */ | ||
190 | private void beforeSave(TdsConnectorVerifiableRQVO rqVO) { | ||
191 | //region 1.输入基础验证 | ||
192 | //endregion | ||
193 | |||
194 | //region 2.数据验证特殊处理 | ||
195 | //region 2.1.业务合规性验证 | ||
196 | //endregion 2.1.业务合规性验证 | ||
197 | |||
198 | //region 2.2.业务数据验证 | ||
199 | //endregion 2.2.业务数据验证 | ||
200 | |||
201 | //endregion 2.数据验证特殊处理 | ||
202 | |||
203 | //region 3.数据转换处理 | ||
204 | |||
205 | //region 3.1.数据过程转换 | ||
206 | //endregion 3.1.数据过程转换 | ||
207 | |||
208 | //endregion 3.数据转换处理 | ||
209 | |||
210 | //region 4.数据过滤与补充处理 | ||
211 | |||
212 | //endregion 4.数据过滤与补充处理 | ||
213 | |||
214 | //region 5.过程处理 | ||
215 | |||
216 | //region 5.1.计算逻辑处理 | ||
217 | //endregion 5.1.计算逻辑处理 | ||
218 | |||
219 | //region 5.2.业务逻辑处理 | ||
220 | //endregion 5.2.业务逻辑处理 | ||
221 | |||
222 | //endregion 5.过程处理 | ||
223 | } | ||
224 | |||
225 | /** | ||
226 | * 连接器可验信息新增后置处理 | ||
227 | * @author xup | ||
228 | * @date 2025-08-20 15:13 | ||
229 | * @param rqVO | ||
230 | * @return void | ||
231 | */ | ||
232 | private void afterSave(TdsConnectorVerifiableRQVO rqVO) { | ||
233 | //region 1.输出特殊转换 | ||
234 | |||
235 | //region 1.1.输出过滤与补充处理 | ||
236 | //endregion 1.1.输出过滤与补充处理 | ||
237 | |||
238 | //endregion 1.输出特殊转换 | ||
239 | } | ||
240 | |||
241 | /** | ||
242 | * 连接器可验信息修改前置校验、处理 | ||
243 | * @author xup | ||
244 | * @date 2025-08-20 15:13 | ||
245 | * @param rqVO | ||
246 | * @return void | ||
247 | */ | ||
248 | private void beforeUpdate(TdsConnectorVerifiableRQVO rqVO) { | ||
249 | //region 1.输入基础验证 | ||
250 | if (StringUtils.isBlank(rqVO.getGuid())) { | ||
251 | // W00012 = {0}:参数[{1}]不能为空! | ||
252 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00010", String.format("修改%s数据",FUNCTION_NAME), "数据唯一标识")); | ||
253 | } | ||
254 | //endregion | ||
255 | |||
256 | //region 2.数据验证特殊处理 | ||
257 | //region 2.1.业务合规性验证 | ||
258 | //endregion 2.1.业务合规性验证 | ||
259 | |||
260 | //region 2.2.业务数据验证 | ||
261 | if (!mfTdsConnectorVerifiableService.isExistsData(Collections.singletonList(rqVO.getGuid()), MfTdsConnectorVerifiable.class)) { | ||
262 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.notExistsToUpdateMessage(FUNCTION_NAME)); | ||
263 | } | ||
264 | //endregion 2.2.业务数据验证 | ||
265 | |||
266 | //endregion 2.数据验证特殊处理 | ||
267 | |||
268 | //region 3.数据转换处理 | ||
269 | |||
270 | //region 3.1.数据过程转换 | ||
271 | //endregion 3.1.数据过程转换 | ||
272 | |||
273 | //endregion 3.数据转换处理 | ||
274 | |||
275 | //region 4.数据过滤与补充处理 | ||
276 | //endregion 4.数据过滤与补充处理 | ||
277 | |||
278 | //region 5.过程处理 | ||
279 | |||
280 | //region 5.1.计算逻辑处理 | ||
281 | //endregion 5.1.计算逻辑处理 | ||
282 | |||
283 | //region 5.2.业务逻辑处理 | ||
284 | //endregion 5.2.业务逻辑处理 | ||
285 | |||
286 | //endregion 5.过程处理 | ||
287 | } | ||
288 | |||
289 | /** | ||
290 | * 连接器可验信息修改后置处理 | ||
291 | * @author xup | ||
292 | * @date 2025-08-20 15:13 | ||
293 | * @param rqVO | ||
294 | * @param entity | ||
295 | * @return void | ||
296 | */ | ||
297 | protected void afterUpdate(TdsConnectorVerifiableRQVO rqVO, MfTdsConnectorVerifiable entity) { | ||
298 | //region 1.输出特殊转换 | ||
299 | |||
300 | //region 1.1.输出过滤与补充处理 | ||
301 | //endregion 1.1.输出过滤与补充处理 | ||
302 | |||
303 | //endregion 1.输出特殊转换 | ||
304 | } | ||
305 | |||
306 | |||
307 | /** | ||
308 | * 连接器可验信息删除前置处理 | ||
309 | * @author xup | ||
310 | * @date 2025-08-20 15:13 | ||
311 | * @param entity | ||
312 | * @return void | ||
313 | */ | ||
314 | private void beforeRemove(MfTdsConnectorVerifiable entity) { | ||
315 | if (entity == null) { | ||
316 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.notExistsToDelMessage(FUNCTION_NAME)); | ||
317 | } | ||
318 | } | ||
319 | |||
320 | /** | ||
321 | * 连接器可验信息删除后置处理 | ||
322 | * @author xup | ||
323 | * @date 2025-08-20 15:13 | ||
324 | * @param entity | ||
325 | * @return void | ||
326 | */ | ||
327 | private void afterRemove(MfTdsConnectorVerifiable entity) { | ||
328 | |||
329 | } | ||
330 | |||
331 | /** | ||
332 | * 连接器可验信息查询方法前置验证、处理 | ||
333 | * @author xup | ||
334 | * @date 2025-08-20 15:13 | ||
335 | * @param rqQueryVO | ||
336 | * @return void | ||
337 | */ | ||
338 | private void beforeQuery(TdsConnectorVerifiableQueryVO rqQueryVO) { | ||
339 | |||
340 | } | ||
341 | |||
342 | /** | ||
343 | * 连接器可验信息查询方法后置数据转换、处理 | ||
344 | * @author xup | ||
345 | * @date 2025-08-20 15:13 | ||
346 | * @param pageList 数据库查询数据 | ||
347 | * @param rsPageList 返回的最终数据 | ||
348 | * @return void | ||
349 | */ | ||
350 | private void afterQuery(PageListVO<MfTdsConnectorVerifiable> pageList, PageListVO<TdsConnectorVerifiableRSVO> rsPageList) { | ||
351 | if (CollectionUtils.isNotEmpty(pageList.getRecords())) { | ||
352 | rsPageList.setRecords(convertToVO(pageList.getRecords())); | ||
353 | } | ||
354 | // 需要特殊处理数据时使用 | ||
355 | /*if(CollectionUtils.isNotEmpty(pageList.getRecords())){ | ||
356 | List<TdsConnectorVerifiableRSVO> results = new ArrayList<>(); | ||
357 | for (MfTdsConnectorVerifiable item : pageList.getRecords()){ | ||
358 | TdsConnectorVerifiableRSVO vo = convertToVO(item); | ||
359 | results.add(vo); | ||
360 | } | ||
361 | rsPageList.setRecords(results); | ||
362 | }*/ | ||
363 | } | ||
364 | |||
365 | //region 辅助操作 | ||
366 | |||
367 | /** | ||
368 | * 连接器可验信息实体数据转换为视图对象数据(多个) | ||
369 | * @author xup | ||
370 | * @date 2025-08-20 15:13 | ||
371 | * @param entityList 实体数据列表 | ||
372 | * @return java.util.List<com.csbr.qingcloud.portal.domain.vo.TdsConnectorVerifiableRSVO> 视图对象列表 | ||
373 | */ | ||
374 | private List<TdsConnectorVerifiableRSVO> convertToVO(List<MfTdsConnectorVerifiable> entityList) { | ||
375 | if (CollectionUtils.isEmpty(entityList)) { | ||
376 | // W00012 = {0}:参数[{1}]不能为空! | ||
377 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00012", | ||
378 | "实体数据转换为视图对象实体数据", "实体数据")); | ||
379 | } | ||
380 | List<TdsConnectorVerifiableRSVO> voList = new ArrayList<>(entityList.size()); | ||
381 | for (MfTdsConnectorVerifiable item : entityList) { | ||
382 | TdsConnectorVerifiableRSVO vo = convertToVO(item); | ||
383 | voList.add(vo); | ||
384 | } | ||
385 | return voList; | ||
386 | } | ||
387 | |||
388 | /** | ||
389 | * 连接器可验信息实体数据转换为视图对象数据 | ||
390 | * @author xup | ||
391 | * @date 2025-08-20 15:13 | ||
392 | * @param entity | ||
393 | * @return com.csbr.qingcloud.portal.domain.vo.TdsConnectorVerifiableRSVO | ||
394 | */ | ||
395 | private TdsConnectorVerifiableRSVO convertToVO(MfTdsConnectorVerifiable entity) { | ||
396 | TdsConnectorVerifiableRSVO vo = csbrBeanUtil.convert(entity, TdsConnectorVerifiableRSVO.class); | ||
397 | return vo; | ||
398 | } | ||
399 | |||
400 | /** | ||
401 | * 连接器可验信息新增、修改和其他情况的参数转换为实体 | ||
402 | * @author xup | ||
403 | * @date 2025-08-20 15:13 | ||
404 | * @param vo | ||
405 | * @return com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorVerifiable | ||
406 | */ | ||
407 | private MfTdsConnectorVerifiable convertToEntity(TdsConnectorVerifiableRQVO vo) { | ||
408 | MfTdsConnectorVerifiable entity = csbrBeanUtil.convert(vo, MfTdsConnectorVerifiable.class); | ||
409 | // 新增时数据默认guid赋值,转换后该guid可能别使用 | ||
410 | if (StringUtils.isBlank(vo.getGuid())) { | ||
411 | entity.setGuid(CommonUtil.newGuid()); | ||
412 | } | ||
413 | return entity; | ||
414 | } | ||
415 | |||
416 | //endregion | ||
417 | |||
418 | } |
1 | package com.csbr.qingcloud.portal.service.impl; | 1 | package com.csbr.qingcloud.portal.service.impl; |
2 | 2 | ||
3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | ||
5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
4 | import com.csbr.cloud.common.enums.SystemError; | 6 | import com.csbr.cloud.common.enums.SystemError; |
5 | import com.csbr.cloud.common.exception.CsbrSystemException; | 7 | import com.csbr.cloud.common.exception.CsbrSystemException; |
6 | import com.csbr.cloud.common.util.CommonUtil; | 8 | import com.csbr.cloud.common.util.CommonUtil; |
... | @@ -16,6 +18,7 @@ import com.csbr.qingcloud.portal.service.TdsCorporationAdditionalService; | ... | @@ -16,6 +18,7 @@ import com.csbr.qingcloud.portal.service.TdsCorporationAdditionalService; |
16 | import jakarta.annotation.Resource; | 18 | import jakarta.annotation.Resource; |
17 | import lombok.extern.slf4j.Slf4j; | 19 | import lombok.extern.slf4j.Slf4j; |
18 | import org.apache.commons.collections.CollectionUtils; | 20 | import org.apache.commons.collections.CollectionUtils; |
21 | import org.apache.commons.lang3.ObjectUtils; | ||
19 | import org.apache.commons.lang3.StringUtils; | 22 | import org.apache.commons.lang3.StringUtils; |
20 | import org.springframework.stereotype.Service; | 23 | import org.springframework.stereotype.Service; |
21 | import org.springframework.transaction.annotation.Transactional; | 24 | import org.springframework.transaction.annotation.Transactional; |
... | @@ -180,6 +183,30 @@ public class TdsCorporationAdditionalServiceImpl implements TdsCorporationAdditi | ... | @@ -180,6 +183,30 @@ public class TdsCorporationAdditionalServiceImpl implements TdsCorporationAdditi |
180 | } | 183 | } |
181 | } | 184 | } |
182 | 185 | ||
186 | @Override | ||
187 | public TdsCorporationAdditionalRSVO getTdsCorporationAdditionalByCorporationGuid(String corporationGuid) { | ||
188 | if(ObjectUtils.isEmpty(corporationGuid)){ | ||
189 | return new TdsCorporationAdditionalRSVO(); | ||
190 | } | ||
191 | LambdaQueryWrapper<MfTdsCorporationAdditional> queryWrapper = Wrappers.lambdaQuery(); | ||
192 | queryWrapper.eq(MfTdsCorporationAdditional::getCorporationGuid,corporationGuid); | ||
193 | List<MfTdsCorporationAdditional> list = mfTdsCorporationAdditionalService.list(queryWrapper); | ||
194 | if(ObjectUtils.isEmpty(list)){ | ||
195 | return new TdsCorporationAdditionalRSVO(); | ||
196 | } | ||
197 | return convertToVO(list.get(0)); | ||
198 | } | ||
199 | |||
200 | @Override | ||
201 | public void removeByCorporationGuids(List<String> corporationGuids) { | ||
202 | if(ObjectUtils.isEmpty(corporationGuids)){ | ||
203 | return; | ||
204 | } | ||
205 | LambdaUpdateWrapper<MfTdsCorporationAdditional> removeWrapper = Wrappers.lambdaUpdate(); | ||
206 | removeWrapper.in(MfTdsCorporationAdditional::getCorporationGuid,corporationGuids); | ||
207 | mfTdsCorporationAdditionalService.remove(removeWrapper); | ||
208 | } | ||
209 | |||
183 | /** | 210 | /** |
184 | * 法人用户附加信息新新增前置处理 | 211 | * 法人用户附加信息新新增前置处理 |
185 | * @author xup | 212 | * @author xup | ... | ... |
1 | package com.csbr.qingcloud.portal.service.impl; | 1 | package com.csbr.qingcloud.portal.service.impl; |
2 | 2 | ||
3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
4 | import com.csbr.cloud.common.enums.SystemError; | 5 | import com.csbr.cloud.common.enums.SystemError; |
5 | import com.csbr.cloud.common.exception.CsbrSystemException; | 6 | import com.csbr.cloud.common.exception.CsbrSystemException; |
6 | import com.csbr.cloud.common.util.CommonUtil; | 7 | import com.csbr.cloud.common.util.CommonUtil; |
7 | import com.csbr.cloud.common.util.CsbrBeanUtil; | 8 | import com.csbr.cloud.common.util.CsbrBeanUtil; |
8 | import com.csbr.cloud.common.util.MessageSourceUtil; | 9 | import com.csbr.cloud.common.util.MessageSourceUtil; |
10 | import com.csbr.qingcloud.portal.domain.vo.*; | ||
11 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsUserIdentity; | ||
12 | import com.csbr.qingcloud.portal.service.TdsCorporationAdditionalService; | ||
13 | import com.csbr.qingcloud.portal.service.TdsCorporationVerifiableService; | ||
9 | import csbr.cloud.entity.domain.base.vo.PageListVO; | 14 | import csbr.cloud.entity.domain.base.vo.PageListVO; |
10 | import com.csbr.qingcloud.portal.domain.vo.TdsCorporationIdentityQueryVO; | ||
11 | import com.csbr.qingcloud.portal.domain.vo.TdsCorporationIdentityRQVO; | ||
12 | import com.csbr.qingcloud.portal.domain.vo.TdsCorporationIdentityRSVO; | ||
13 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsCorporationIdentity; | 15 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsCorporationIdentity; |
14 | import com.csbr.qingcloud.portal.mybatis.service.MfTdsCorporationIdentityService; | 16 | import com.csbr.qingcloud.portal.mybatis.service.MfTdsCorporationIdentityService; |
15 | import com.csbr.qingcloud.portal.service.TdsCorporationIdentityService; | 17 | import com.csbr.qingcloud.portal.service.TdsCorporationIdentityService; |
16 | import jakarta.annotation.Resource; | 18 | import jakarta.annotation.Resource; |
17 | import lombok.extern.slf4j.Slf4j; | 19 | import lombok.extern.slf4j.Slf4j; |
18 | import org.apache.commons.collections.CollectionUtils; | 20 | import org.apache.commons.collections.CollectionUtils; |
21 | import org.apache.commons.lang3.ObjectUtils; | ||
19 | import org.apache.commons.lang3.StringUtils; | 22 | import org.apache.commons.lang3.StringUtils; |
20 | import org.springframework.stereotype.Service; | 23 | import org.springframework.stereotype.Service; |
21 | import org.springframework.transaction.annotation.Transactional; | 24 | import org.springframework.transaction.annotation.Transactional; |
... | @@ -48,6 +51,12 @@ public class TdsCorporationIdentityServiceImpl implements TdsCorporationIdentity | ... | @@ -48,6 +51,12 @@ public class TdsCorporationIdentityServiceImpl implements TdsCorporationIdentity |
48 | @Resource | 51 | @Resource |
49 | private MessageSourceUtil messageSourceUtil; | 52 | private MessageSourceUtil messageSourceUtil; |
50 | 53 | ||
54 | @Resource | ||
55 | private TdsCorporationAdditionalService tdsCorporationAdditionalService; | ||
56 | |||
57 | @Resource | ||
58 | private TdsCorporationVerifiableService tdsCorporationVerifiableService; | ||
59 | |||
51 | /** | 60 | /** |
52 | * 法人用户身份信息分页查询 | 61 | * 法人用户身份信息分页查询 |
53 | * @author xup | 62 | * @author xup |
... | @@ -84,7 +93,10 @@ public class TdsCorporationIdentityServiceImpl implements TdsCorporationIdentity | ... | @@ -84,7 +93,10 @@ public class TdsCorporationIdentityServiceImpl implements TdsCorporationIdentity |
84 | if (entity == null) { | 93 | if (entity == null) { |
85 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToSelectMessage(String.format("获取%s详情数据", FUNCTION_NAME))); | 94 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToSelectMessage(String.format("获取%s详情数据", FUNCTION_NAME))); |
86 | } | 95 | } |
87 | return convertToVO(entity); | 96 | TdsCorporationIdentityRSVO vo = convertToVO(entity); |
97 | vo.setTdsCorporationAdditional(tdsCorporationAdditionalService.getTdsCorporationAdditionalByCorporationGuid(vo.getGuid())); | ||
98 | vo.setTdsCorporationVerifiable(tdsCorporationVerifiableService.getTdsCorporationVerifiableByCorporationGuid(vo.getGuid())); | ||
99 | return vo; | ||
88 | } | 100 | } |
89 | 101 | ||
90 | /** | 102 | /** |
... | @@ -99,6 +111,7 @@ public class TdsCorporationIdentityServiceImpl implements TdsCorporationIdentity | ... | @@ -99,6 +111,7 @@ public class TdsCorporationIdentityServiceImpl implements TdsCorporationIdentity |
99 | public void saveTdsCorporationIdentity(TdsCorporationIdentityRQVO rqVO) { | 111 | public void saveTdsCorporationIdentity(TdsCorporationIdentityRQVO rqVO) { |
100 | beforeSave(rqVO); | 112 | beforeSave(rqVO); |
101 | MfTdsCorporationIdentity entity = convertToEntity(rqVO); | 113 | MfTdsCorporationIdentity entity = convertToEntity(rqVO); |
114 | rqVO.setGuid(entity.getGuid()); | ||
102 | mfTdsCorporationIdentityService.csbrAddEntity(entity); | 115 | mfTdsCorporationIdentityService.csbrAddEntity(entity); |
103 | boolean flag = mfTdsCorporationIdentityService.save(entity); | 116 | boolean flag = mfTdsCorporationIdentityService.save(entity); |
104 | if (!flag) { | 117 | if (!flag) { |
... | @@ -152,6 +165,9 @@ public class TdsCorporationIdentityServiceImpl implements TdsCorporationIdentity | ... | @@ -152,6 +165,9 @@ public class TdsCorporationIdentityServiceImpl implements TdsCorporationIdentity |
152 | if (!flag) { | 165 | if (!flag) { |
153 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.delMessage(FUNCTION_NAME)); | 166 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.delMessage(FUNCTION_NAME)); |
154 | } | 167 | } |
168 | //删除附加信息和验证信息 | ||
169 | tdsCorporationAdditionalService.removeByCorporationGuids(guids); | ||
170 | tdsCorporationVerifiableService.removeByCorporationGuids(guids); | ||
155 | } | 171 | } |
156 | 172 | ||
157 | /** | 173 | /** |
... | @@ -189,10 +205,15 @@ public class TdsCorporationIdentityServiceImpl implements TdsCorporationIdentity | ... | @@ -189,10 +205,15 @@ public class TdsCorporationIdentityServiceImpl implements TdsCorporationIdentity |
189 | */ | 205 | */ |
190 | private void beforeSave(TdsCorporationIdentityRQVO rqVO) { | 206 | private void beforeSave(TdsCorporationIdentityRQVO rqVO) { |
191 | //region 1.输入基础验证 | 207 | //region 1.输入基础验证 |
208 | if(ObjectUtils.isEmpty(rqVO)){ | ||
209 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, String.format("%s参数为空。", FUNCTION_NAME)); | ||
210 | } | ||
192 | //endregion | 211 | //endregion |
193 | 212 | ||
194 | //region 2.数据验证特殊处理 | 213 | //region 2.数据验证特殊处理 |
195 | //region 2.1.业务合规性验证 | 214 | //region 2.1.业务合规性验证 |
215 | //验证统一社会信用代码唯一性和法人 | ||
216 | verifyUniqueness(rqVO); | ||
196 | //endregion 2.1.业务合规性验证 | 217 | //endregion 2.1.业务合规性验证 |
197 | 218 | ||
198 | //region 2.2.业务数据验证 | 219 | //region 2.2.业务数据验证 |
... | @@ -223,6 +244,35 @@ public class TdsCorporationIdentityServiceImpl implements TdsCorporationIdentity | ... | @@ -223,6 +244,35 @@ public class TdsCorporationIdentityServiceImpl implements TdsCorporationIdentity |
223 | } | 244 | } |
224 | 245 | ||
225 | /** | 246 | /** |
247 | * 验证统一社会信用代码唯一性和法人 | ||
248 | * @param rqVO | ||
249 | */ | ||
250 | private void verifyUniqueness(TdsCorporationIdentityRQVO rqVO) { | ||
251 | if(ObjectUtils.isEmpty(rqVO)){ | ||
252 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, String.format("%s参数为空。", FUNCTION_NAME)); | ||
253 | } | ||
254 | LambdaQueryWrapper<MfTdsCorporationIdentity> queryWrapper = Wrappers.lambdaQuery(); | ||
255 | if(ObjectUtils.isNotEmpty(rqVO.getGuid())){ | ||
256 | queryWrapper.ne(MfTdsCorporationIdentity::getGuid,rqVO.getGuid()); | ||
257 | } | ||
258 | queryWrapper.eq(MfTdsCorporationIdentity::getCorporationName, | ||
259 | rqVO.getCorporationName()) | ||
260 | .or(or->or.eq(MfTdsCorporationIdentity::getSocialCreditCode, | ||
261 | rqVO.getSocialCreditCode())); | ||
262 | List<MfTdsCorporationIdentity> list = mfTdsCorporationIdentityService.list(queryWrapper); | ||
263 | if(ObjectUtils.isNotEmpty(list)){ | ||
264 | for (MfTdsCorporationIdentity mfTdsCorporationIdentity : list) { | ||
265 | if(rqVO.getCorporationName().equals(mfTdsCorporationIdentity.getCorporationName())){ | ||
266 | throw new CsbrSystemException(SystemError.DATA_ALREADY_EXISTS,"法人或其他组织名称重复。"); | ||
267 | } | ||
268 | if(rqVO.getSocialCreditCode().equals(mfTdsCorporationIdentity.getSocialCreditCode())){ | ||
269 | throw new CsbrSystemException(SystemError.DATA_ALREADY_EXISTS,"统一社会信用代码重复。"); | ||
270 | } | ||
271 | } | ||
272 | } | ||
273 | } | ||
274 | |||
275 | /** | ||
226 | * 法人用户身份信息新增后置处理 | 276 | * 法人用户身份信息新增后置处理 |
227 | * @author xup | 277 | * @author xup |
228 | * @date 2025-08-14 17:30 | 278 | * @date 2025-08-14 17:30 |
... | @@ -231,7 +281,14 @@ public class TdsCorporationIdentityServiceImpl implements TdsCorporationIdentity | ... | @@ -231,7 +281,14 @@ public class TdsCorporationIdentityServiceImpl implements TdsCorporationIdentity |
231 | */ | 281 | */ |
232 | private void afterSave(TdsCorporationIdentityRQVO rqVO) { | 282 | private void afterSave(TdsCorporationIdentityRQVO rqVO) { |
233 | //region 1.输出特殊转换 | 283 | //region 1.输出特殊转换 |
234 | 284 | if(ObjectUtils.isNotEmpty(rqVO.getTdsCorporationAdditional())){ | |
285 | rqVO.getTdsCorporationAdditional().setCorporationGuid(rqVO.getGuid()); | ||
286 | tdsCorporationAdditionalService.saveTdsCorporationAdditional(rqVO.getTdsCorporationAdditional()); | ||
287 | } | ||
288 | if(ObjectUtils.isNotEmpty(rqVO.getTdsCorporationVerifiable())){ | ||
289 | rqVO.getTdsCorporationVerifiable().setCorporationGuid(rqVO.getGuid()); | ||
290 | tdsCorporationVerifiableService.saveTdsCorporationVerifiable(rqVO.getTdsCorporationVerifiable()); | ||
291 | } | ||
235 | //region 1.1.输出过滤与补充处理 | 292 | //region 1.1.输出过滤与补充处理 |
236 | //endregion 1.1.输出过滤与补充处理 | 293 | //endregion 1.1.输出过滤与补充处理 |
237 | 294 | ||
... | @@ -262,7 +319,7 @@ public class TdsCorporationIdentityServiceImpl implements TdsCorporationIdentity | ... | @@ -262,7 +319,7 @@ public class TdsCorporationIdentityServiceImpl implements TdsCorporationIdentity |
262 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.notExistsToUpdateMessage(FUNCTION_NAME)); | 319 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.notExistsToUpdateMessage(FUNCTION_NAME)); |
263 | } | 320 | } |
264 | //endregion 2.2.业务数据验证 | 321 | //endregion 2.2.业务数据验证 |
265 | 322 | verifyUniqueness(rqVO); | |
266 | //endregion 2.数据验证特殊处理 | 323 | //endregion 2.数据验证特殊处理 |
267 | 324 | ||
268 | //region 3.数据转换处理 | 325 | //region 3.数据转换处理 |
... | @@ -296,7 +353,24 @@ public class TdsCorporationIdentityServiceImpl implements TdsCorporationIdentity | ... | @@ -296,7 +353,24 @@ public class TdsCorporationIdentityServiceImpl implements TdsCorporationIdentity |
296 | */ | 353 | */ |
297 | protected void afterUpdate(TdsCorporationIdentityRQVO rqVO, MfTdsCorporationIdentity entity) { | 354 | protected void afterUpdate(TdsCorporationIdentityRQVO rqVO, MfTdsCorporationIdentity entity) { |
298 | //region 1.输出特殊转换 | 355 | //region 1.输出特殊转换 |
299 | 356 | TdsCorporationAdditionalRQVO tdsCorporationAdditional = rqVO.getTdsCorporationAdditional(); | |
357 | if(ObjectUtils.isNotEmpty(tdsCorporationAdditional)){ | ||
358 | tdsCorporationAdditional.setCorporationGuid(rqVO.getGuid()); | ||
359 | if(ObjectUtils.isNotEmpty(tdsCorporationAdditional.getGuid())) { | ||
360 | tdsCorporationAdditionalService.updateTdsCorporationAdditional(tdsCorporationAdditional); | ||
361 | }else{ | ||
362 | tdsCorporationAdditionalService.saveTdsCorporationAdditional(tdsCorporationAdditional); | ||
363 | } | ||
364 | } | ||
365 | TdsCorporationVerifiableRQVO tdsCorporationVerifiable = rqVO.getTdsCorporationVerifiable(); | ||
366 | if(ObjectUtils.isNotEmpty(tdsCorporationVerifiable)){ | ||
367 | tdsCorporationVerifiable.setCorporationGuid(rqVO.getGuid()); | ||
368 | if(ObjectUtils.isNotEmpty(tdsCorporationVerifiable.getGuid())) { | ||
369 | tdsCorporationVerifiableService.updateTdsCorporationVerifiable(tdsCorporationVerifiable); | ||
370 | }else{ | ||
371 | tdsCorporationVerifiableService.saveTdsCorporationVerifiable(tdsCorporationVerifiable); | ||
372 | } | ||
373 | } | ||
300 | //region 1.1.输出过滤与补充处理 | 374 | //region 1.1.输出过滤与补充处理 |
301 | //endregion 1.1.输出过滤与补充处理 | 375 | //endregion 1.1.输出过滤与补充处理 |
302 | 376 | ... | ... |
1 | package com.csbr.qingcloud.portal.service.impl; | 1 | package com.csbr.qingcloud.portal.service.impl; |
2 | 2 | ||
3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | ||
5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
4 | import com.csbr.cloud.common.enums.SystemError; | 6 | import com.csbr.cloud.common.enums.SystemError; |
5 | import com.csbr.cloud.common.exception.CsbrSystemException; | 7 | import com.csbr.cloud.common.exception.CsbrSystemException; |
6 | import com.csbr.cloud.common.util.CommonUtil; | 8 | import com.csbr.cloud.common.util.CommonUtil; |
... | @@ -16,6 +18,7 @@ import com.csbr.qingcloud.portal.service.TdsCorporationVerifiableService; | ... | @@ -16,6 +18,7 @@ import com.csbr.qingcloud.portal.service.TdsCorporationVerifiableService; |
16 | import jakarta.annotation.Resource; | 18 | import jakarta.annotation.Resource; |
17 | import lombok.extern.slf4j.Slf4j; | 19 | import lombok.extern.slf4j.Slf4j; |
18 | import org.apache.commons.collections.CollectionUtils; | 20 | import org.apache.commons.collections.CollectionUtils; |
21 | import org.apache.commons.lang3.ObjectUtils; | ||
19 | import org.apache.commons.lang3.StringUtils; | 22 | import org.apache.commons.lang3.StringUtils; |
20 | import org.springframework.stereotype.Service; | 23 | import org.springframework.stereotype.Service; |
21 | import org.springframework.transaction.annotation.Transactional; | 24 | import org.springframework.transaction.annotation.Transactional; |
... | @@ -180,6 +183,30 @@ public class TdsCorporationVerifiableServiceImpl implements TdsCorporationVerifi | ... | @@ -180,6 +183,30 @@ public class TdsCorporationVerifiableServiceImpl implements TdsCorporationVerifi |
180 | } | 183 | } |
181 | } | 184 | } |
182 | 185 | ||
186 | @Override | ||
187 | public TdsCorporationVerifiableRSVO getTdsCorporationVerifiableByCorporationGuid(String corporationGuid) { | ||
188 | if(ObjectUtils.isEmpty(corporationGuid)){ | ||
189 | return new TdsCorporationVerifiableRSVO(); | ||
190 | } | ||
191 | LambdaQueryWrapper<MfTdsCorporationVerifiable> queryWrapper = Wrappers.lambdaQuery(); | ||
192 | queryWrapper.eq(MfTdsCorporationVerifiable::getCorporationGuid,corporationGuid); | ||
193 | List<MfTdsCorporationVerifiable> list = mfTdsCorporationVerifiableService.list(queryWrapper); | ||
194 | if(ObjectUtils.isEmpty(list)){ | ||
195 | return new TdsCorporationVerifiableRSVO(); | ||
196 | } | ||
197 | return convertToVO(list.get(0)); | ||
198 | } | ||
199 | |||
200 | @Override | ||
201 | public void removeByCorporationGuids(List<String> corporationGuids) { | ||
202 | if(ObjectUtils.isEmpty(corporationGuids)){ | ||
203 | return; | ||
204 | } | ||
205 | LambdaUpdateWrapper<MfTdsCorporationVerifiable> removeWrapper = Wrappers.lambdaUpdate(); | ||
206 | removeWrapper.in(MfTdsCorporationVerifiable::getCorporationGuid,corporationGuids); | ||
207 | mfTdsCorporationVerifiableService.remove(removeWrapper); | ||
208 | } | ||
209 | |||
183 | /** | 210 | /** |
184 | * 法人用户可验信息新新增前置处理 | 211 | * 法人用户可验信息新新增前置处理 |
185 | * @author xup | 212 | * @author xup | ... | ... |
1 | package com.csbr.qingcloud.portal.service.impl; | 1 | package com.csbr.qingcloud.portal.service.impl; |
2 | 2 | ||
3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | ||
5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
4 | import com.csbr.cloud.common.enums.SystemError; | 6 | import com.csbr.cloud.common.enums.SystemError; |
5 | import com.csbr.cloud.common.exception.CsbrSystemException; | 7 | import com.csbr.cloud.common.exception.CsbrSystemException; |
6 | import com.csbr.cloud.common.util.CommonUtil; | 8 | import com.csbr.cloud.common.util.CommonUtil; |
... | @@ -16,6 +18,7 @@ import com.csbr.qingcloud.portal.service.TdsOperatorAdditionalService; | ... | @@ -16,6 +18,7 @@ import com.csbr.qingcloud.portal.service.TdsOperatorAdditionalService; |
16 | import jakarta.annotation.Resource; | 18 | import jakarta.annotation.Resource; |
17 | import lombok.extern.slf4j.Slf4j; | 19 | import lombok.extern.slf4j.Slf4j; |
18 | import org.apache.commons.collections.CollectionUtils; | 20 | import org.apache.commons.collections.CollectionUtils; |
21 | import org.apache.commons.lang3.ObjectUtils; | ||
19 | import org.apache.commons.lang3.StringUtils; | 22 | import org.apache.commons.lang3.StringUtils; |
20 | import org.springframework.stereotype.Service; | 23 | import org.springframework.stereotype.Service; |
21 | import org.springframework.transaction.annotation.Transactional; | 24 | import org.springframework.transaction.annotation.Transactional; |
... | @@ -180,6 +183,16 @@ public class TdsOperatorAdditionalServiceImpl implements TdsOperatorAdditionalSe | ... | @@ -180,6 +183,16 @@ public class TdsOperatorAdditionalServiceImpl implements TdsOperatorAdditionalSe |
180 | } | 183 | } |
181 | } | 184 | } |
182 | 185 | ||
186 | @Override | ||
187 | public void removeByOperatorGuids(List<String> operatorGuids) { | ||
188 | if(ObjectUtils.isEmpty(operatorGuids)){ | ||
189 | return; | ||
190 | } | ||
191 | LambdaUpdateWrapper<MfTdsOperatorAdditional> removeWrapper = Wrappers.lambdaUpdate(); | ||
192 | removeWrapper.in(MfTdsOperatorAdditional::getOperatorGuid,operatorGuids); | ||
193 | mfTdsOperatorAdditionalService.remove(removeWrapper); | ||
194 | } | ||
195 | |||
183 | /** | 196 | /** |
184 | * 经办人用户附加信息新新增前置处理 | 197 | * 经办人用户附加信息新新增前置处理 |
185 | * @author xup | 198 | * @author xup | ... | ... |
1 | package com.csbr.qingcloud.portal.service.impl; | 1 | package com.csbr.qingcloud.portal.service.impl; |
2 | 2 | ||
3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
4 | import com.csbr.cloud.common.enums.SystemError; | 5 | import com.csbr.cloud.common.enums.SystemError; |
5 | import com.csbr.cloud.common.exception.CsbrSystemException; | 6 | import com.csbr.cloud.common.exception.CsbrSystemException; |
6 | import com.csbr.cloud.common.util.CommonUtil; | 7 | import com.csbr.cloud.common.util.CommonUtil; |
7 | import com.csbr.cloud.common.util.CsbrBeanUtil; | 8 | import com.csbr.cloud.common.util.CsbrBeanUtil; |
8 | import com.csbr.cloud.common.util.MessageSourceUtil; | 9 | import com.csbr.cloud.common.util.MessageSourceUtil; |
10 | import com.csbr.qingcloud.portal.domain.vo.*; | ||
11 | import com.csbr.qingcloud.portal.service.TdsOperatorAdditionalService; | ||
12 | import com.csbr.qingcloud.portal.service.TdsOperatorVerifiableService; | ||
9 | import csbr.cloud.entity.domain.base.vo.PageListVO; | 13 | import csbr.cloud.entity.domain.base.vo.PageListVO; |
10 | import com.csbr.qingcloud.portal.domain.vo.TdsOperatorIdentityQueryVO; | ||
11 | import com.csbr.qingcloud.portal.domain.vo.TdsOperatorIdentityRQVO; | ||
12 | import com.csbr.qingcloud.portal.domain.vo.TdsOperatorIdentityRSVO; | ||
13 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsOperatorIdentity; | 14 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsOperatorIdentity; |
14 | import com.csbr.qingcloud.portal.mybatis.service.MfTdsOperatorIdentityService; | 15 | import com.csbr.qingcloud.portal.mybatis.service.MfTdsOperatorIdentityService; |
15 | import com.csbr.qingcloud.portal.service.TdsOperatorIdentityService; | 16 | import com.csbr.qingcloud.portal.service.TdsOperatorIdentityService; |
16 | import jakarta.annotation.Resource; | 17 | import jakarta.annotation.Resource; |
17 | import lombok.extern.slf4j.Slf4j; | 18 | import lombok.extern.slf4j.Slf4j; |
18 | import org.apache.commons.collections.CollectionUtils; | 19 | import org.apache.commons.collections.CollectionUtils; |
20 | import org.apache.commons.lang3.ObjectUtils; | ||
19 | import org.apache.commons.lang3.StringUtils; | 21 | import org.apache.commons.lang3.StringUtils; |
20 | import org.springframework.stereotype.Service; | 22 | import org.springframework.stereotype.Service; |
21 | import org.springframework.transaction.annotation.Transactional; | 23 | import org.springframework.transaction.annotation.Transactional; |
... | @@ -48,6 +50,12 @@ public class TdsOperatorIdentityServiceImpl implements TdsOperatorIdentityServic | ... | @@ -48,6 +50,12 @@ public class TdsOperatorIdentityServiceImpl implements TdsOperatorIdentityServic |
48 | @Resource | 50 | @Resource |
49 | private MessageSourceUtil messageSourceUtil; | 51 | private MessageSourceUtil messageSourceUtil; |
50 | 52 | ||
53 | @Resource | ||
54 | private TdsOperatorAdditionalService tdsOperatorAdditionalService; | ||
55 | |||
56 | @Resource | ||
57 | private TdsOperatorVerifiableService tdsOperatorVerifiableService; | ||
58 | |||
51 | /** | 59 | /** |
52 | * 经办人用户身份信息分页查询 | 60 | * 经办人用户身份信息分页查询 |
53 | * @author xup | 61 | * @author xup |
... | @@ -99,6 +107,7 @@ public class TdsOperatorIdentityServiceImpl implements TdsOperatorIdentityServic | ... | @@ -99,6 +107,7 @@ public class TdsOperatorIdentityServiceImpl implements TdsOperatorIdentityServic |
99 | public void saveTdsOperatorIdentity(TdsOperatorIdentityRQVO rqVO) { | 107 | public void saveTdsOperatorIdentity(TdsOperatorIdentityRQVO rqVO) { |
100 | beforeSave(rqVO); | 108 | beforeSave(rqVO); |
101 | MfTdsOperatorIdentity entity = convertToEntity(rqVO); | 109 | MfTdsOperatorIdentity entity = convertToEntity(rqVO); |
110 | rqVO.setGuid(entity.getGuid()); | ||
102 | mfTdsOperatorIdentityService.csbrAddEntity(entity); | 111 | mfTdsOperatorIdentityService.csbrAddEntity(entity); |
103 | boolean flag = mfTdsOperatorIdentityService.save(entity); | 112 | boolean flag = mfTdsOperatorIdentityService.save(entity); |
104 | if (!flag) { | 113 | if (!flag) { |
... | @@ -152,6 +161,9 @@ public class TdsOperatorIdentityServiceImpl implements TdsOperatorIdentityServic | ... | @@ -152,6 +161,9 @@ public class TdsOperatorIdentityServiceImpl implements TdsOperatorIdentityServic |
152 | if (!flag) { | 161 | if (!flag) { |
153 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.delMessage(FUNCTION_NAME)); | 162 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.delMessage(FUNCTION_NAME)); |
154 | } | 163 | } |
164 | //删除附加信心和验证信息 | ||
165 | tdsOperatorAdditionalService.removeByOperatorGuids(guids); | ||
166 | tdsOperatorVerifiableService.removeByOperatorGuids(guids); | ||
155 | } | 167 | } |
156 | 168 | ||
157 | /** | 169 | /** |
... | @@ -189,6 +201,9 @@ public class TdsOperatorIdentityServiceImpl implements TdsOperatorIdentityServic | ... | @@ -189,6 +201,9 @@ public class TdsOperatorIdentityServiceImpl implements TdsOperatorIdentityServic |
189 | */ | 201 | */ |
190 | private void beforeSave(TdsOperatorIdentityRQVO rqVO) { | 202 | private void beforeSave(TdsOperatorIdentityRQVO rqVO) { |
191 | //region 1.输入基础验证 | 203 | //region 1.输入基础验证 |
204 | if(ObjectUtils.isEmpty(rqVO)){ | ||
205 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, String.format("%s参数为空。",FUNCTION_NAME)); | ||
206 | } | ||
192 | //endregion | 207 | //endregion |
193 | 208 | ||
194 | //region 2.数据验证特殊处理 | 209 | //region 2.数据验证特殊处理 |
... | @@ -197,7 +212,8 @@ public class TdsOperatorIdentityServiceImpl implements TdsOperatorIdentityServic | ... | @@ -197,7 +212,8 @@ public class TdsOperatorIdentityServiceImpl implements TdsOperatorIdentityServic |
197 | 212 | ||
198 | //region 2.2.业务数据验证 | 213 | //region 2.2.业务数据验证 |
199 | //endregion 2.2.业务数据验证 | 214 | //endregion 2.2.业务数据验证 |
200 | 215 | //验证证件唯一性 | |
216 | verifyUniqueness(rqVO); | ||
201 | //endregion 2.数据验证特殊处理 | 217 | //endregion 2.数据验证特殊处理 |
202 | 218 | ||
203 | //region 3.数据转换处理 | 219 | //region 3.数据转换处理 |
... | @@ -223,6 +239,24 @@ public class TdsOperatorIdentityServiceImpl implements TdsOperatorIdentityServic | ... | @@ -223,6 +239,24 @@ public class TdsOperatorIdentityServiceImpl implements TdsOperatorIdentityServic |
223 | } | 239 | } |
224 | 240 | ||
225 | /** | 241 | /** |
242 | * 验证证件唯一性 | ||
243 | * @param rqVO | ||
244 | */ | ||
245 | private void verifyUniqueness(TdsOperatorIdentityRQVO rqVO) { | ||
246 | if(ObjectUtils.isEmpty(rqVO)){ | ||
247 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, String.format("%s参数为空。",FUNCTION_NAME)); | ||
248 | } | ||
249 | LambdaQueryWrapper<MfTdsOperatorIdentity> queryWrapper = Wrappers.lambdaQuery(); | ||
250 | if(ObjectUtils.isNotEmpty(rqVO.getGuid())){ | ||
251 | queryWrapper.ne(MfTdsOperatorIdentity::getGuid,rqVO.getGuid()); | ||
252 | } | ||
253 | queryWrapper.eq(MfTdsOperatorIdentity::getIdNumber,rqVO.getIdNumber()); | ||
254 | if(mfTdsOperatorIdentityService.count(queryWrapper)>0){ | ||
255 | throw new CsbrSystemException(SystemError.DATA_ALREADY_EXISTS,"经办人证件号码已存在。"); | ||
256 | } | ||
257 | } | ||
258 | |||
259 | /** | ||
226 | * 经办人用户身份信息新增后置处理 | 260 | * 经办人用户身份信息新增后置处理 |
227 | * @author xup | 261 | * @author xup |
228 | * @date 2025-08-14 17:31 | 262 | * @date 2025-08-14 17:31 |
... | @@ -231,7 +265,16 @@ public class TdsOperatorIdentityServiceImpl implements TdsOperatorIdentityServic | ... | @@ -231,7 +265,16 @@ public class TdsOperatorIdentityServiceImpl implements TdsOperatorIdentityServic |
231 | */ | 265 | */ |
232 | private void afterSave(TdsOperatorIdentityRQVO rqVO) { | 266 | private void afterSave(TdsOperatorIdentityRQVO rqVO) { |
233 | //region 1.输出特殊转换 | 267 | //region 1.输出特殊转换 |
234 | 268 | TdsOperatorAdditionalRQVO tdsOperatorAdditional = rqVO.getTdsOperatorAdditional(); | |
269 | if(ObjectUtils.isNotEmpty(tdsOperatorAdditional)){ | ||
270 | tdsOperatorAdditional.setOperatorGuid(tdsOperatorAdditional.getGuid()); | ||
271 | tdsOperatorAdditionalService.saveTdsOperatorAdditional(tdsOperatorAdditional); | ||
272 | } | ||
273 | TdsOperatorVerifiableRQVO tdsOperatorVerifiable = rqVO.getTdsOperatorVerifiable(); | ||
274 | if(ObjectUtils.isNotEmpty(tdsOperatorVerifiable)){ | ||
275 | tdsOperatorVerifiable.setOperatorGuid(tdsOperatorVerifiable.getGuid()); | ||
276 | tdsOperatorVerifiableService.saveTdsOperatorVerifiable(tdsOperatorVerifiable); | ||
277 | } | ||
235 | //region 1.1.输出过滤与补充处理 | 278 | //region 1.1.输出过滤与补充处理 |
236 | //endregion 1.1.输出过滤与补充处理 | 279 | //endregion 1.1.输出过滤与补充处理 |
237 | 280 | ||
... | @@ -262,7 +305,8 @@ public class TdsOperatorIdentityServiceImpl implements TdsOperatorIdentityServic | ... | @@ -262,7 +305,8 @@ public class TdsOperatorIdentityServiceImpl implements TdsOperatorIdentityServic |
262 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.notExistsToUpdateMessage(FUNCTION_NAME)); | 305 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.notExistsToUpdateMessage(FUNCTION_NAME)); |
263 | } | 306 | } |
264 | //endregion 2.2.业务数据验证 | 307 | //endregion 2.2.业务数据验证 |
265 | 308 | //验证证件唯一性 | |
309 | verifyUniqueness(rqVO); | ||
266 | //endregion 2.数据验证特殊处理 | 310 | //endregion 2.数据验证特殊处理 |
267 | 311 | ||
268 | //region 3.数据转换处理 | 312 | //region 3.数据转换处理 |
... | @@ -296,7 +340,24 @@ public class TdsOperatorIdentityServiceImpl implements TdsOperatorIdentityServic | ... | @@ -296,7 +340,24 @@ public class TdsOperatorIdentityServiceImpl implements TdsOperatorIdentityServic |
296 | */ | 340 | */ |
297 | protected void afterUpdate(TdsOperatorIdentityRQVO rqVO, MfTdsOperatorIdentity entity) { | 341 | protected void afterUpdate(TdsOperatorIdentityRQVO rqVO, MfTdsOperatorIdentity entity) { |
298 | //region 1.输出特殊转换 | 342 | //region 1.输出特殊转换 |
299 | 343 | TdsOperatorAdditionalRQVO tdsOperatorAdditional = rqVO.getTdsOperatorAdditional(); | |
344 | if(ObjectUtils.isNotEmpty(tdsOperatorAdditional)){ | ||
345 | tdsOperatorAdditional.setOperatorGuid(tdsOperatorAdditional.getGuid()); | ||
346 | if(ObjectUtils.isEmpty(tdsOperatorAdditional.getGuid())) { | ||
347 | tdsOperatorAdditionalService.saveTdsOperatorAdditional(tdsOperatorAdditional); | ||
348 | }else{ | ||
349 | tdsOperatorAdditionalService.updateTdsOperatorAdditional(tdsOperatorAdditional); | ||
350 | } | ||
351 | } | ||
352 | TdsOperatorVerifiableRQVO tdsOperatorVerifiable = rqVO.getTdsOperatorVerifiable(); | ||
353 | if(ObjectUtils.isNotEmpty(tdsOperatorVerifiable)){ | ||
354 | tdsOperatorVerifiable.setOperatorGuid(tdsOperatorVerifiable.getGuid()); | ||
355 | if(ObjectUtils.isEmpty(tdsOperatorVerifiable.getGuid())) { | ||
356 | tdsOperatorVerifiableService.saveTdsOperatorVerifiable(tdsOperatorVerifiable); | ||
357 | }else{ | ||
358 | tdsOperatorVerifiableService.updateTdsOperatorVerifiable(tdsOperatorVerifiable); | ||
359 | } | ||
360 | } | ||
300 | //region 1.1.输出过滤与补充处理 | 361 | //region 1.1.输出过滤与补充处理 |
301 | //endregion 1.1.输出过滤与补充处理 | 362 | //endregion 1.1.输出过滤与补充处理 |
302 | 363 | ... | ... |
1 | package com.csbr.qingcloud.portal.service.impl; | 1 | package com.csbr.qingcloud.portal.service.impl; |
2 | 2 | ||
3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | ||
5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
4 | import com.csbr.cloud.common.enums.SystemError; | 6 | import com.csbr.cloud.common.enums.SystemError; |
5 | import com.csbr.cloud.common.exception.CsbrSystemException; | 7 | import com.csbr.cloud.common.exception.CsbrSystemException; |
6 | import com.csbr.cloud.common.util.CommonUtil; | 8 | import com.csbr.cloud.common.util.CommonUtil; |
... | @@ -16,6 +18,7 @@ import com.csbr.qingcloud.portal.service.TdsOperatorVerifiableService; | ... | @@ -16,6 +18,7 @@ import com.csbr.qingcloud.portal.service.TdsOperatorVerifiableService; |
16 | import jakarta.annotation.Resource; | 18 | import jakarta.annotation.Resource; |
17 | import lombok.extern.slf4j.Slf4j; | 19 | import lombok.extern.slf4j.Slf4j; |
18 | import org.apache.commons.collections.CollectionUtils; | 20 | import org.apache.commons.collections.CollectionUtils; |
21 | import org.apache.commons.lang3.ObjectUtils; | ||
19 | import org.apache.commons.lang3.StringUtils; | 22 | import org.apache.commons.lang3.StringUtils; |
20 | import org.springframework.stereotype.Service; | 23 | import org.springframework.stereotype.Service; |
21 | import org.springframework.transaction.annotation.Transactional; | 24 | import org.springframework.transaction.annotation.Transactional; |
... | @@ -180,6 +183,16 @@ public class TdsOperatorVerifiableServiceImpl implements TdsOperatorVerifiableSe | ... | @@ -180,6 +183,16 @@ public class TdsOperatorVerifiableServiceImpl implements TdsOperatorVerifiableSe |
180 | } | 183 | } |
181 | } | 184 | } |
182 | 185 | ||
186 | @Override | ||
187 | public void removeByOperatorGuids(List<String> operatorGuids) { | ||
188 | if(ObjectUtils.isEmpty(operatorGuids)){ | ||
189 | return; | ||
190 | } | ||
191 | LambdaUpdateWrapper<MfTdsOperatorVerifiable> removeWrapper = Wrappers.lambdaUpdate(); | ||
192 | removeWrapper.in(MfTdsOperatorVerifiable::getOperatorGuid,operatorGuids); | ||
193 | mfTdsOperatorVerifiableService.remove(removeWrapper); | ||
194 | } | ||
195 | |||
183 | /** | 196 | /** |
184 | * 经办人用户可验信息新新增前置处理 | 197 | * 经办人用户可验信息新新增前置处理 |
185 | * @author xup | 198 | * @author xup | ... | ... |
... | @@ -7,12 +7,10 @@ import com.csbr.cloud.common.exception.CsbrSystemException; | ... | @@ -7,12 +7,10 @@ import com.csbr.cloud.common.exception.CsbrSystemException; |
7 | import com.csbr.cloud.common.util.CommonUtil; | 7 | import com.csbr.cloud.common.util.CommonUtil; |
8 | import com.csbr.cloud.common.util.CsbrBeanUtil; | 8 | import com.csbr.cloud.common.util.CsbrBeanUtil; |
9 | import com.csbr.cloud.common.util.MessageSourceUtil; | 9 | import com.csbr.cloud.common.util.MessageSourceUtil; |
10 | import com.csbr.qingcloud.portal.domain.vo.*; | ||
10 | import com.csbr.qingcloud.portal.service.TdsUserAdditionalService; | 11 | import com.csbr.qingcloud.portal.service.TdsUserAdditionalService; |
11 | import com.csbr.qingcloud.portal.service.TdsUserVerifiableService; | 12 | import com.csbr.qingcloud.portal.service.TdsUserVerifiableService; |
12 | import csbr.cloud.entity.domain.base.vo.PageListVO; | 13 | import csbr.cloud.entity.domain.base.vo.PageListVO; |
13 | import com.csbr.qingcloud.portal.domain.vo.TdsUserIdentityQueryVO; | ||
14 | import com.csbr.qingcloud.portal.domain.vo.TdsUserIdentityRQVO; | ||
15 | import com.csbr.qingcloud.portal.domain.vo.TdsUserIdentityRSVO; | ||
16 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsUserIdentity; | 14 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsUserIdentity; |
17 | import com.csbr.qingcloud.portal.mybatis.service.MfTdsUserIdentityService; | 15 | import com.csbr.qingcloud.portal.mybatis.service.MfTdsUserIdentityService; |
18 | import com.csbr.qingcloud.portal.service.TdsUserIdentityService; | 16 | import com.csbr.qingcloud.portal.service.TdsUserIdentityService; |
... | @@ -365,15 +363,25 @@ public class TdsUserIdentityServiceImpl implements TdsUserIdentityService { | ... | @@ -365,15 +363,25 @@ public class TdsUserIdentityServiceImpl implements TdsUserIdentityService { |
365 | //region 1.输出特殊转换 | 363 | //region 1.输出特殊转换 |
366 | 364 | ||
367 | //region 1.1.输出过滤与补充处理 | 365 | //region 1.1.输出过滤与补充处理 |
368 | if(ObjectUtils.isNotEmpty(rqVO.getTdsUserAdditional())){ | 366 | TdsUserAdditionalRQVO tdsUserAdditional = rqVO.getTdsUserAdditional(); |
369 | rqVO.getTdsUserAdditional().setUserGuid(rqVO.getGuid()); | 367 | if(ObjectUtils.isNotEmpty(tdsUserAdditional)){ |
368 | tdsUserAdditional.setUserGuid(rqVO.getGuid()); | ||
370 | //保存个人用户附加信息 | 369 | //保存个人用户附加信息 |
371 | tdsUserAdditionalService.updateTdsUserAdditional(rqVO.getTdsUserAdditional()); | 370 | if(ObjectUtils.isNotEmpty(tdsUserAdditional.getGuid())) { |
371 | tdsUserAdditionalService.updateTdsUserAdditional(tdsUserAdditional); | ||
372 | }else { | ||
373 | tdsUserAdditionalService.saveTdsUserAdditional(tdsUserAdditional); | ||
372 | } | 374 | } |
373 | if(ObjectUtils.isNotEmpty(rqVO.getTdsUserVerifiable())){ | 375 | } |
374 | rqVO.getTdsUserVerifiable().setUserGuid(rqVO.getGuid()); | 376 | TdsUserVerifiableRQVO tdsUserVerifiable = rqVO.getTdsUserVerifiable(); |
377 | if(ObjectUtils.isNotEmpty(tdsUserVerifiable)){ | ||
378 | tdsUserVerifiable.setUserGuid(rqVO.getGuid()); | ||
375 | //保存个人用户可验信息 | 379 | //保存个人用户可验信息 |
376 | tdsUserVerifiableService.updateTdsUserVerifiable(rqVO.getTdsUserVerifiable()); | 380 | if(ObjectUtils.isNotEmpty(tdsUserVerifiable.getGuid())) { |
381 | tdsUserVerifiableService.updateTdsUserVerifiable(tdsUserVerifiable); | ||
382 | }else{ | ||
383 | tdsUserVerifiableService.saveTdsUserVerifiable(tdsUserVerifiable); | ||
384 | } | ||
377 | } | 385 | } |
378 | //endregion 1.1.输出过滤与补充处理 | 386 | //endregion 1.1.输出过滤与补充处理 |
379 | 387 | ... | ... |
-
Please register or sign in to post a comment