|
@@ -1,10 +1,13 @@
|
|
|
package com.sqx.modules.reconciliation.mapper;
|
|
package com.sqx.modules.reconciliation.mapper;
|
|
|
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.sqx.modules.reconciliation.model.PlatformBill;
|
|
import com.sqx.modules.reconciliation.model.PlatformBill;
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
|
-import org.apache.ibatis.annotations.Mapper;
|
|
|
|
|
-import org.apache.ibatis.annotations.Param;
|
|
|
|
|
-import org.apache.ibatis.annotations.Select;
|
|
|
|
|
|
|
+import com.sqx.modules.reconciliation.model.PlatformBillDto;
|
|
|
|
|
+import com.sqx.modules.reconciliation.model.RiderBillVo;
|
|
|
|
|
+import com.sqx.modules.reconciliation.model.ShopBillVo;
|
|
|
|
|
+import org.apache.ibatis.annotations.*;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* <p>
|
|
* <p>
|
|
@@ -17,7 +20,7 @@ import org.apache.ibatis.annotations.Select;
|
|
|
@Mapper
|
|
@Mapper
|
|
|
public interface PlatformBillMapper extends BaseMapper<PlatformBill> {
|
|
public interface PlatformBillMapper extends BaseMapper<PlatformBill> {
|
|
|
|
|
|
|
|
- @Select("INSERT INTO `tcwm2.5`.platform_bill \n" +
|
|
|
|
|
|
|
+ @Insert("INSERT INTO `tcwm2.5`.platform_bill \n" +
|
|
|
"(day_id, user_id, shop_name, `type`, start_money, revenue, revenue_count, \n" +
|
|
"(day_id, user_id, shop_name, `type`, start_money, revenue, revenue_count, \n" +
|
|
|
"shop_payouts, shop_payouts_rates, shop_payouts_count, rider_payouts, rider_payouts_rates,\n" +
|
|
"shop_payouts, shop_payouts_rates, shop_payouts_count, rider_payouts, rider_payouts_rates,\n" +
|
|
|
"rider_payouts_count, refund_money, refund_count, end_money,sys_gift_amount, platform_rates,total_income,pay_money,create_time,update_time)\n" +
|
|
"rider_payouts_count, refund_money, refund_count, end_money,sys_gift_amount, platform_rates,total_income,pay_money,create_time,update_time)\n" +
|
|
@@ -66,11 +69,11 @@ public interface PlatformBillMapper extends BaseMapper<PlatformBill> {
|
|
|
"group by tu.user_id ")
|
|
"group by tu.user_id ")
|
|
|
Integer insertPlatformBill(@Param("dayId") String dayId,@Param("startTime") String startTime, @Param("endTime")String endTime, @Param("now") String now);
|
|
Integer insertPlatformBill(@Param("dayId") String dayId,@Param("startTime") String startTime, @Param("endTime")String endTime, @Param("now") String now);
|
|
|
|
|
|
|
|
- @Select("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\n" +
|
|
|
|
|
|
|
+ @Update("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\n" +
|
|
|
"where a.day_id =#{dayId} ")
|
|
"where a.day_id =#{dayId} ")
|
|
|
Integer updateStartMoney(@Param("dayId") String dayId);
|
|
Integer updateStartMoney(@Param("dayId") String dayId);
|
|
|
|
|
|
|
|
- @Select("INSERT INTO `tcwm2.5`.platform_bill \n" +
|
|
|
|
|
|
|
+ @Insert("INSERT INTO `tcwm2.5`.platform_bill \n" +
|
|
|
"(day_id, user_id, shop_name, `type`, start_money, revenue, revenue_count, \n" +
|
|
"(day_id, user_id, shop_name, `type`, start_money, revenue, revenue_count, \n" +
|
|
|
"shop_payouts, shop_payouts_rates, shop_payouts_count, rider_payouts, rider_payouts_rates,\n" +
|
|
"shop_payouts, shop_payouts_rates, shop_payouts_count, rider_payouts, rider_payouts_rates,\n" +
|
|
|
"rider_payouts_count, refund_money, refund_count, end_money,sys_gift_amount, platform_rates,total_income,pay_money,create_time,update_time)\n" +
|
|
"rider_payouts_count, refund_money, refund_count, end_money,sys_gift_amount, platform_rates,total_income,pay_money,create_time,update_time)\n" +
|
|
@@ -82,4 +85,10 @@ public interface PlatformBillMapper extends BaseMapper<PlatformBill> {
|
|
|
"sum(if(type=1, platform_rates ,0)),null,null,max(create_time) ,max(update_time) \n" +
|
|
"sum(if(type=1, platform_rates ,0)),null,null,max(create_time) ,max(update_time) \n" +
|
|
|
"from platform_bill pb where day_id =#{dayId}\n")
|
|
"from platform_bill pb where day_id =#{dayId}\n")
|
|
|
Integer insertTotalPlatformBill(@Param("dayId") String dayId);
|
|
Integer insertTotalPlatformBill(@Param("dayId") String dayId);
|
|
|
|
|
+
|
|
|
|
|
+ IPage<PlatformBill> platformBill(@Param("page")Page<PlatformBill> pages, @Param("params")PlatformBillDto platformBillDto);
|
|
|
|
|
+
|
|
|
|
|
+ IPage<ShopBillVo> shopBill(@Param("page")Page<ShopBillVo> pages, @Param("params")PlatformBillDto platformBillDto);
|
|
|
|
|
+
|
|
|
|
|
+ IPage<RiderBillVo> riderBill(@Param("page")Page<RiderBillVo> pages, @Param("params")PlatformBillDto platformBillDto);
|
|
|
}
|
|
}
|