Просмотр исходного кода

平台对账增加期初金额

wanxl 1 год назад
Родитель
Сommit
047c9d51dc

+ 1 - 1
src/main/java/com/sqx/modules/reconciliation/mapper/PlatformBillMapper.java

@@ -24,7 +24,7 @@ public interface PlatformBillMapper extends BaseMapper<PlatformBill> {
 
     Integer insertPlatformBill(@Param("dayId") String dayId,@Param("startTime") String startTime, @Param("endTime")String endTime, @Param("now") String now);
 
-    Integer updateShopStartMoney(@Param("dayId") String dayId);
+    Integer updatePlatFormStartMoney(@Param("dayId") String dayId);
 
     Integer insertTotalPlatformBill(@Param("dayId") String dayId);
 

+ 3 - 3
src/main/java/com/sqx/modules/reconciliation/service/impl/PlatformBillServiceImpl.java

@@ -55,10 +55,10 @@ public class PlatformBillServiceImpl extends ServiceImpl<PlatformBillMapper, Pla
         log.info("导入商家和骑手对账:{}条",count1);
         //导入平台对账
         Integer count3 =baseMapper.insertTotalPlatformBill(dayId);
-        //导入商户账期开始金额
-        Integer count2=baseMapper.updateShopStartMoney(dayId);
+        //导入平台账期开始金额
+        Integer count2=baseMapper.updatePlatFormStartMoney(dayId);
         log.info("导入商户账期开始金额:{}条",count2);
-        //导入骑手账期开始金额
+        //导入商家骑手账期开始金额
         Integer count4=baseMapper.updateRiderStartMoney(dayId);
         log.info("导入骑手、平台账期开始金额:{}条",count2);
 

+ 4 - 4
src/main/resources/mapper/reconciliation/PlatformBillMapper.xml

@@ -125,16 +125,16 @@
         order by pb.bill_id desc
     </select>
 
-    <update id="updateShopStartMoney">
-        update platform_bill a join platform_bill b on a.user_id =b.user_id and a.type =b.type and  TO_DAYS(a.day_id)-TO_DAYS(b.day_id)= 1
+    <update id="updatePlatFormStartMoney">
+        update platform_bill a join platform_bill b on a.type =b.type and  TO_DAYS(a.day_id)-TO_DAYS(b.day_id)= 1
         set a.start_money=b.end_money
-        where a.day_id =#{dayId} and a.type = 1
+        where a.day_id =#{dayId} and a.type = 0
     </update>
 
     <update id="updateRiderStartMoney">
         update platform_bill a join platform_bill b on a.user_id =b.user_id and a.type =b.type and  TO_DAYS(a.day_id)-TO_DAYS(b.day_id)= 1
         set a.start_money=b.end_money
-        where a.day_id =#{dayId} and a.type in(0,2)
+        where a.day_id =#{dayId} and a.type in(1,2)
     </update>
 
     <insert id="insertPlatformBill">