Commit 54f93ab8 authored by hanfeng's avatar hanfeng

修改订单统计

parent 9d0ed535
......@@ -16,15 +16,6 @@
</select>
<select id="monthOrderTotal" resultType="com.xxfc.platform.order.entity.OrderStatistics">
-- SELECT
-- IFNULL(sum(gmv),0) as totalGmv
-- FROM
-- daily_members_order_statistics
-- WHERE
-- branch_company_id =#{companyId}
-- -- and
-- -- DATE_FORMAT(one_day,'%Y-%c')=DATE_FORMAT(DATE_SUB(NOW(),interval 1 day),'%Y-%c')
SELECT
IFNULL(sum(gmv),0) as totalGmv
FROM
......@@ -43,4 +34,15 @@
WHERE
branch_company_id =#{companyId}
</select>
<!-- <select id="updateByExampleSelective">-->
<!-- SELECT-->
<!-- IFNULL(sum(gmv),0) as totalGmv-->
<!-- FROM-->
<!-- daily_members_order_statistics-->
<!-- WHERE-->
<!-- branch_company_id =#{companyId}-->
<!-- and-->
<!-- DATE_FORMAT(one_day,'%Y-%c')=DATE_FORMAT(DATE_SUB(NOW(),interval 1 day),'%Y-%c')-->
<!-- </select>-->
</mapper>
\ No newline at end of file
......@@ -50,19 +50,7 @@
</select>
<select id="monthOrderTotal" resultType="com.xxfc.platform.order.entity.OrderStatistics">
-- SELECT
--
-- IFNULL(sum(gmv),0) as totalGmv,
-- IFNULL(sum(penal_sum) ,0) as totalPenalSum
-- FROM
-- daily_travel_order_statistics
-- WHERE
-- branch_company_id =#{branchCompanyId}
-- AND
-- DATE_FORMAT(one_day,'%Y-%c')=DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 DAY),'%Y-%c')
SELECT
IFNULL(sum(gmv),0) as totalGmv,
IFNULL(sum(penal_sum) ,0) as totalPenalSum
FROM
......@@ -74,11 +62,24 @@
ANY_VALUE(gmv) AS gmv,
ANY_VALUE(penal_sum) AS penal_sum,
ANY_VALUE(crt_time) AS crt_time
FROM daily_travel_order_statistics
FROM
daily_travel_order_statistics
GROUP BY
one_day,branch_company_id
) o
WHERE
branch_company_id =#{companyId}
</select>
<!-- <select id="updateByExampleSelective">-->
<!-- SELECT-->
<!-- IFNULL(sum(gmv),0) as totalGmv,-->
<!-- IFNULL(sum(penal_sum) ,0) as totalPenalSum-->
<!-- FROM-->
<!-- daily_travel_order_statistics-->
<!-- WHERE-->
<!-- branch_company_id =#{branchCompanyId}-->
<!-- AND-->
<!-- DATE_FORMAT(one_day,'%Y-%c')=DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 DAY),'%Y-%c')-->
<!-- </select>-->
</mapper>
\ No newline at end of file
......@@ -138,23 +138,7 @@
<select id="monthOrderTotal" resultType="com.xxfc.platform.order.entity.OrderStatistics">
-- SELECT
-- IFNULL(sum(gmv),0) as totalGmv,
-- (IFNULL(sum(security_deposit),0)-IFNULL(sum(refund_security_deposit) ,0)) as totalSecurityDeposit,
-- IFNULL(sum(refund_security_deposit) ,0) as totalRefundSecurityDeposit,
-- IFNULL(sum(compensation) ,0) as totalCompensation,
-- IFNULL(sum(forfeit) ,0) as totalForfeit,
-- IFNULL(sum(penal_sum) ,0) as totalPenalSum,
-- IFNULL(sum(postpone) ,0) as totalPostpone
-- FROM
-- daily_vehicle_order_statistics
-- WHERE
-- branch_company_id =#{companyId}
-- and
-- DATE_FORMAT(one_day,'%Y-%c')=DATE_FORMAT(DATE_SUB(NOW(),interval 1 day),'%Y-%c')
SELECT
SELECT
IFNULL(sum(gmv),0) as totalGmv,
(IFNULL(sum(security_deposit),0)-IFNULL(sum(refund_security_deposit) ,0)) as totalSecurityDeposit,
IFNULL(sum(refund_security_deposit) ,0) as totalRefundSecurityDeposit,
......@@ -175,11 +159,28 @@ SELECT
ANY_VALUE(postpone) AS postpone,ANY_VALUE(crt_time) AS crt_time,
ANY_VALUE(compensation) AS compensation
FROM
`daily_vehicle_order_statistics`
daily_vehicle_order_statistics
GROUP BY
one_day,branch_company_id
) a
WHERE
branch_company_id =#{companyId}
branch_company_id = #{companyId}
</select>
<!-- <select id="updateByExampleSelective">-->
<!-- SELECT-->
<!-- IFNULL(sum(gmv),0) as totalGmv,-->
<!-- (IFNULL(sum(security_deposit),0)-IFNULL(sum(refund_security_deposit) ,0)) as totalSecurityDeposit,-->
<!-- IFNULL(sum(refund_security_deposit) ,0) as totalRefundSecurityDeposit,-->
<!-- IFNULL(sum(compensation) ,0) as totalCompensation,-->
<!-- IFNULL(sum(forfeit) ,0) as totalForfeit,-->
<!-- IFNULL(sum(penal_sum) ,0) as totalPenalSum,-->
<!-- IFNULL(sum(postpone) ,0) as totalPostpone-->
<!-- FROM-->
<!-- daily_vehicle_order_statistics-->
<!-- WHERE-->
<!-- branch_company_id =#{companyId}-->
<!-- and-->
<!-- DATE_FORMAT(one_day,'%Y-%c')=DATE_FORMAT(DATE_SUB(NOW(),interval 1 day),'%Y-%c')-->
<!-- </select>-->
</mapper>
\ No newline at end of file
......@@ -24,7 +24,6 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@tk.mybatis.spring.annotation.MapperScan(basePackages = "com.xxfc.platform.universal.mapper")
@EnableFeignClients(value = {"com.xxfc.platform","com.github.wxiaoqi.security"},defaultConfiguration = HeaderConfig.class)
public class UniversalApplication {
public static void main(String[] args) {
SpringApplication.run(UniversalApplication.class, args);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment