puzhibing
2023-05-16 4e8951a439c03e87568789cedeb62033884412db
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderMapper.xml
@@ -99,9 +99,6 @@
            <if test="driverName != null and driverName != ''">
                AND d.name LIKE concat('%',#{driverName},'%')
            </if>
            <if test="isException != null">
                AND a.is_exception = #{isException}
            </if>
            <if test="roleType != null and roleType == 2">
                AND o.branchOfficeId = #{objectId}
            </if>
@@ -239,8 +236,16 @@
                    #{id}
                </foreach>
            </if>
            <if test="type != null">
                AND `state` = #{type}
            <if test="type == 1">
                AND `state` = 101
            </if>
            <if test="type == 2">
                AND (`state` = 107
                OR `state` = 108
                OR `state` = 109)
            </if>
            <if test="type == 3">
                AND `state` = 301
            </if>
            <if test="localDate != null">
                AND date_format(createTime, '%Y-%m-%d') LIKE concat('',#{localDate},'%')
@@ -394,5 +399,21 @@
        </where>
        GROUP BY `month`
    </select>
    <select id="getValidOrderCount" resultType="java.lang.Integer">
        select count(id)
        from t_order
        <where>
            <if test="driverId != null">
                AND driverId = #{driverId}
            </if>
            <if test="orderMoney != null">
                AND orderMoney &gt; #{orderMoney}
            </if>
            <if test="month != null">
                AND DATE_FORMAT(createTime, '%Y-%m') = #{month}
            </if>
            AND (`state` = 107 OR `state` = 108 OR `state` = 109)
        </where>
    </select>
</mapper>