puzhibing
2023-05-16 ccefd07a68bcf22a4240a62440c39e646de5aa8b
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderMapper.xml
@@ -236,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},'%')
@@ -391,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>