Orders.java 3.14 KB
package com.diligrp.rider.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.math.BigDecimal;

/**
 * 订单主表
 */
@Data
@TableName("orders")
public class Orders {

    @TableId(type = IdType.AUTO)
    private Long id;

    /** 订单号 */
    private String orderNo;

    /** 用户ID */
    private Long uid;

    /** 骑手ID */
    private Long riderId;

    /** 原始骑手ID(转单前) */
    private Long oldRiderId;

    /** 城市ID */
    private Long cityId;

    /** 订单类型:6=外卖配送 */
    private Integer type;

    /**
     * 状态:1=待支付 2=已支付 3=已接单 4=服务中
     * 6=已完成 7=退款申请 8=退款成功 9=退款拒绝 10=已取消
     */
    private Integer status;

    /** 支付类型:1=支付宝 2=微信 */
    private Integer payType;

    /** 订单金额 */
    private BigDecimal money;

    /** 配送费 */
    private BigDecimal moneyDelivery;

    /** 总金额 */
    private BigDecimal moneyTotal;

    /** 骑手收入 */
    private BigDecimal riderIncome;

    /** 站点收入 */
    private BigDecimal substationIncome;

    /** 结算状态:0=未结算 1=待结算 2=已结算 */
    private Integer isIncome;

    /** 转单状态:0=未转单 1=通过 2=申请中 3=拒绝 */
    private Integer isTrans;

    /** 完成码(用户给骑手输入确认完成) */
    private String code;

    /** 起点名称 */
    private String fName;

    /** 起点地址 */
    private String fAddr;

    /** 起点经度 */
    private String fLng;

    /** 起点纬度 */
    private String fLat;

    /** 终点名称 */
    private String tName;

    /** 终点地址 */
    private String tAddr;

    /** 终点经度 */
    private String tLng;

    /** 终点纬度 */
    private String tLat;

    /** 收件人姓名 */
    private String recipName;

    /** 收件人电话 */
    private String recipPhone;

    /** 附加信息JSON */
    private String extra;

    /** 取件照片JSON数组 */
    private String thumbs;

    /** 关联店铺订单ID */
    private Long storeOid;

    /** 外部业务系统订单号(接入方传入,用于回调对账) */
    private String outOrderNo;

    /** 接入方 AppKey */
    private String appKey;

    /** 状态变更回调地址(接入方提供,覆盖应用级 webhookUrl) */
    private String callbackUrl;

    /**
     * 货物清单快照(JSON数组,接入方推单时传入,不耦合业务商品表)
     * 格式:[{"name":"宫保鸡丁","quantity":2,"spec":"大份","remark":""}]
     */
    private String itemsJson;

    /** 货物整单备注(如:放门口、不要辣) */
    private String itemRemark;

    /** 关联外部门店ID(接入方在平台注册的门店) */
    private Long extStoreId;

    /** 是否删除 */
    @TableLogic
    private Integer isDel;

    /** 下单时间 */
    private Long addTime;

    /** 支付时间 */
    private Long payTime;

    /** 接单时间 */
    private Long grapTime;

    /** 取件时间 */
    private Long pickTime;

    /** 完成时间 */
    private Long completeTime;

    /** 转单时间 */
    private Long transTime;
}