فهرست منبع

Merge branch 'test' into dev

yzc 2 سال پیش
والد
کامیت
9ec311a305
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      hx-common/src/main/java/com/fjhx/common/service/coding/impl/CodingRuleServiceImpl.java

+ 2 - 0
hx-common/src/main/java/com/fjhx/common/service/coding/impl/CodingRuleServiceImpl.java

@@ -241,9 +241,11 @@ public class CodingRuleServiceImpl extends ServiceImpl<CodingRuleMapper, CodingR
     }
 
     private String getCountryCode(Long countryId) {
+        DynamicDataSourceContextHolder.push(SourceConstant.BASE);
         CustomizeArea customizeArea = customizeAreaService.getOne(q -> q
                 .eq(BaseIdPo::getId, countryId)
                 .eq(CustomizeArea::getLevelCode, 1));
+        DynamicDataSourceContextHolder.poll();
 
         if (customizeArea == null) {
             throw new ServiceException("国家为空");