Ver código fonte

fix(app):修复商户分账查询逻辑与微信支付通知地址

- 调整机构类型为2时使用父级机构ID查询分账配置
- 更新微信支付V3支付通知回调地址
- 更新微信支付V3退款通知回调地址
wzq 3 dias atrás
pai
commit
57fff54e24

+ 5 - 1
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppCoureseServiceImpl.java

@@ -86,8 +86,12 @@ public class AppCoureseServiceImpl extends ServiceImpl<AppCoursesMapper, AppCour
     public Boolean saveWitchPriceRules(AppCoursesDTO appCoursesDTO) {
         LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         SysDepart depart = sysDepartMapper.selectOne(Wrappers.lambdaQuery(SysDepart.class).eq(SysDepart::getOrgCode, loginUser.getOrgCode()).last("limit 1"));
+        String deptId = depart.getId();
+        if(depart.getSystemType() == 2){
+            deptId = depart.getParentId();
+        }
         if (depart.getSystemType() != 0) {
-            SeparateAccounts separateAccounts = separateAccountsMapper.selectOne(Wrappers.lambdaQuery(SeparateAccounts.class).eq(SeparateAccounts::getDeptId, depart.getId()));
+            SeparateAccounts separateAccounts = separateAccountsMapper.selectOne(Wrappers.lambdaQuery(SeparateAccounts.class).eq(SeparateAccounts::getDeptId, deptId));
             if (ObjectUtil.isEmpty(separateAccounts)) {
                 throw new JeecgBootException("商户分账比例信息未配置!");
             }