Sfoglia il codice sorgente

@
fix: InstitutionService.detail 支付宝路径补全本地DB字段

支付宝 detailinfo.query 不返回 amount/singleLimit/applicableScope/grantMode
等字段。成功时从本地 pay_expense_institution 补全,前端编辑回显不再缺数据。
@

alphaH 8 ore fa
parent
commit
5454f277c2

+ 19 - 0
java/src/main/java/com/payment/platform/module/payment/expense/institution/service/InstitutionService.java

@@ -119,6 +119,25 @@ public class InstitutionService {
                                 .atOffset(java.time.ZoneOffset.UTC));
                     }
                     vo.setConsultMode(queryResponse.getConsultMode());
+
+                    // 补全本地DB字段(支付宝不返回 amount、singleLimit、applicableScope 等)
+                    ExpenseInstitutionEntity local = institutionMapper.selectOne(
+                            new LambdaQueryWrapper<ExpenseInstitutionEntity>()
+                                    .eq(ExpenseInstitutionEntity::getInstitutionId, institutionId));
+                    if (local != null) {
+                        vo.setAmount(local.getAmount());
+                        vo.setSingleLimit(local.getSingleLimit());
+                        vo.setApplicableScope(local.getApplicableScope());
+                        vo.setGrantMode(local.getGrantMode());
+                        vo.setPeriodType(local.getPeriodType());
+                        vo.setEffectiveTimeType(local.getEffectiveTimeType());
+                        vo.setMultiEmployeeShareMode(local.getMultiEmployeeShareMode());
+                        vo.setEnterpriseId(local.getEnterpriseId());
+                        vo.setTenantId(local.getTenantId());
+                        vo.setStatus(local.getStatus());
+                        vo.setExpenseSubType(local.getExpenseSubType());
+                        vo.setCurrency(local.getCurrency());
+                    }
                     return vo;
                 }
             } catch (Exception e) {