Selaa lähdekoodia

同步功能bug fixed

wucl 11 kuukautta sitten
vanhempi
commit
b207ff0d1e

+ 1 - 1
biz-base/src/test/java/history/SyncHistoryTest.java

@@ -113,6 +113,6 @@ public class SyncHistoryTest {
 
     @Test
     public void getLandTargetMajorTest() throws NoSuchFieldException, IllegalAccessException {
-       dyoaHistoryService.fetchAssetsOrderProduction();
+       dyoaHistoryService.fetchRealAmount();
     }
 }

+ 1 - 1
dao/src/main/resources/mapper/DyoaRecordMapper.xml

@@ -53,7 +53,7 @@
                     mbs_type IN ( 'MAJOR_ORDER','PERSONAL_ORDER','ASSETS_ORDER' )) m
                 LEFT JOIN order_fund f ON (
                 f.business_id = m.mbs_id
-                    AND f.business_type = m.mbs_type) where f.id is not null
+                    AND f.business_type = m.mbs_type) where f.id is not null GROUP BY m.dyoa_id
     </select>
 
 

+ 3 - 1
service/src/main/java/com/dayou/dyoa/DyoaHistoryServiceImpl.java

@@ -470,7 +470,9 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
         orderFundService.updateBatchById(orderTotalAmount);
 
         //分配认领金额到产品收款表
-        List<OrderFund> majorOrderFund = orderTotalAmount.stream().filter(x -> x.getBusinessType().equals(MAJOR_BUSINESS.name())).collect(Collectors.toList());
+        List<OrderFund> majorOrderFund = orderTotalAmount.stream().filter(x ->
+                (x.getBusinessType().equals(MAJOR_BUSINESS.name())|| x.getBusinessType().equals(ASSET_BUSINESS.name())))
+                .collect(Collectors.toList());
         majorOrderFund.stream().forEach(x->{
             List<ProductionFund> prods = productionFundService.list(new LambdaQueryWrapper<ProductionFund>()
                     .eq(ProductionFund::getOrderFundId, x.getId()).select(ProductionFund::getProductionType));