puzhibing
2023-08-16 d5b3e5a413bcfccba294793ee093722f31b2448a
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCancelOrderMapper.xml
@@ -51,9 +51,29 @@
            <if test="driverName != null and driverName != ''">
                AND d.name LIKE concat('%',#{driverName},'%')
            </if>
            <if test="roleType != null and roleType == 2">
                AND o.branchOfficeId = #{objectId}
            </if>
            <if test="roleType != null and roleType == 3">
                AND o.agentId = #{objectId}
            </if>
        </where>
        ORDER BY co.createTime desc
    </select>
    <select id="userCancelOrderList" resultType="com.stylefeng.guns.modular.system.controller.resp.TOrderResp">
        select co.createTime,o.code,o.startAddress,o.endAddress
        from t_cancel_order co
        left join t_order o  on co.orderId = o.id
        <where>
            <if test="userId != null">
                AND co.userId = #{userId}
            </if>
            <if test="orderId != null">
                AND co.orderId = #{orderId}
            </if>
            AND co.userType = 1
        </where>
        ORDER BY co.createTime
        ORDER BY co.createTime DESC
    </select>
</mapper>