| | |
| | | c.have_patent, |
| | | c.have_soft_works, |
| | | c.real_registered_capital as newRegisteredCapital, |
| | | c.high_tech_enterprise_technology as highTechEnterpriseTechnology, |
| | | info.need_rename, |
| | | info.new_district, |
| | | publish.user_name as publishName, |
| | |
| | | </select> |
| | | <select id="financeTop" resultType="com.ruoyi.system.pojo.vo.FinanceFlowsTopVO"> |
| | | SELECT |
| | | SUM(price) AS totalIncome, |
| | | SUM(price) AS total, |
| | | SUM(commission_platform) AS totalProfit, |
| | | SUM(commission_price) AS totalCommission, |
| | | SUM(price - commission_platform - commission_price) AS sellerIncome |
| | | SUM(commission_price) AS superior, |
| | | SUM(price - commission_platform - commission_price) AS seller |
| | | FROM tb_order |
| | | WHERE status IN (4, 5, 6) |
| | | AND is_refund = 0 |
| | |
| | | WHERE |
| | | ((status IN (4, 5, 6)) -- 只查询已支付订单 |
| | | or |
| | | (status=-1 and is_refund =1)) -- 已取消且已退款的订单 |
| | | (status!=-1 and is_refund =1)) -- 已取消且已退款的订单 |
| | | <if test="null != dto.orderNo and '' != dto.orderNo"> |
| | | and order_no LIKE CONCAT('%', #{dto.orderNo}, '%') |
| | | </if> |
| | |
| | | and pay_time between #{dto.operateTimeStart} and #{dto.operateTimeEnd} |
| | | </if> |
| | | AND ( #{dto.type} IS NULL OR 1 = #{dto.type} ) |
| | | UNION ALL |
| | | select 1 |
| | | FROM tb_order |
| | | WHERE is_refund = 1 -- 只查询已退款订单 |
| | | <if test="null != dto.orderNo and '' != dto.orderNo"> |
| | | and order_no LIKE CONCAT('%', #{dto.orderNo}, '%') |
| | | </if> |
| | | <if test="null != dto.operateTimeStart and null != dto.operateTimeEnd"> |
| | | and refund_time between #{dto.operateTimeStart} and #{dto.operateTimeEnd} |
| | | </if> |
| | | AND ( #{dto.type} IS NULL OR 2 = #{dto.type} ) |
| | | <!-- UNION ALL--> |
| | | <!-- select 1--> |
| | | <!-- FROM tb_order--> |
| | | <!-- WHERE is_refund = 1 -- 只查询已退款订单--> |
| | | <!-- <if test="null != dto.orderNo and '' != dto.orderNo">--> |
| | | <!-- and order_no LIKE CONCAT('%', #{dto.orderNo}, '%')--> |
| | | <!-- </if>--> |
| | | <!-- <if test="null != dto.operateTimeStart and null != dto.operateTimeEnd">--> |
| | | <!-- and refund_time between #{dto.operateTimeStart} and #{dto.operateTimeEnd}--> |
| | | <!-- </if>--> |
| | | <!-- AND ( #{dto.type} IS NULL OR 2 = #{dto.type} )--> |
| | | ) AS t |
| | | </select> |
| | | </mapper> |