order-api-map.js 7.98 KB
const API = require('./api-constants');

module.exports = {
  '/api/ufo/invite/friendList': {
    ufo: true,
    api: 'ufo.invite.code',
    params: {},
  },
  '/api/ufo/invite/recordDetailList': {
    ufo: true,
    api: 'ufo.invite.getInviteSettlementItemList',
    params: {},
  },
  '/api/yoho/resource': {
    service: true,
    api: 'operations/api/v5/resource/get',
    params: {
      content_code: { type: String },
    },
  },
  '/api/union/inviteList': {
    api: 'app.union.shareOrder.queryInviteYohoList',
    params: {
      page: { type: Number },
      size: { type: Number },
    },
  },
  '/api/union/queryUnion': {
    api: 'app.union.shareOrder.queryUnionTypeByUid',
    params: {},
  },

  // 获取调价商品及尺码信息
  '/api/ufo/seller/entryGoodsSizeList': {
    auth: true,
    accessLog: true,
    checkSign: true,
    ufo: true,
    api: 'ufo.seller.entryGoodsSizeList',
    params: {
      productId: { type: Number },
      limit: { type: Number },
      page: { type: Number },
    },
  },

  // 调价功能中的下架商品(不卖了)
  '/api/ufo/sellerOrder/batchDownShelf': {
    auth: true,
    accessLog: true,
    checkSign: true,
    ufo: true,
    api: 'ufo.sellerOrder.batchDownShelf',
    params: {
      product_id: { type: Number },
      storage_id: { type: Number },
      old_price: { type: Number },
      num: { type: Number },
    },
  },

  // 预先试算价格,看是否符合调价标准
  '/api/ufo/sellerOrder/computeAdjustPrice': {
    auth: true,
    accessLog: true,
    checkSign: true,
    ufo: true,
    api: 'ufo.sellerOrder.computeAdjustPrice',
    params: {
      product_id: { type: Number },
      storage_id: { type: Number },
      new_price: { type: Number },
      old_price: { type: Number },
      num: { type: Number },
    },
  },

  // 未入驻商家试算价格
  '/api/ufo/notEntrySeller/computeChangePrice': {
    auth: true,
    accessLog: true,
    checkSign: true,
    ufo: true,
    api: 'ufo.notEntrySeller.computeChangePrice',
    params: {
      price: { type: Number },
      skup: { type: Number },
    },
  },

  // 未入驻商家调价
  '/api/ufo/notEntrySeller/changePrice': {
    auth: true,
    accessLog: true,
    checkSign: true,
    ufo: true,
    api: 'ufo.notEntrySeller.changePrice',
    params: {
      address_id: { type: Number },
      price: { type: Number },
      skup: { type: Number },
    },
  },

  // 调价
  '/api/ufo/sellerOrder/batchAdjustPrice': {
    auth: true,
    accessLog: true,
    checkSign: true,
    ufo: true,
    api: 'ufo.sellerOrder.batchAdjustPrice',
    params: {
      product_id: { type: Number },
      storage_id: { type: Number },
      new_price: { type: Number },
      old_price: { type: Number },
      num: { type: Number },
    },
  },

  // 订单列表查询
  '/api/order/list': {
    ufo: true,
    auth: true,
    api: 'ufo.order.list',
    // 类型定义
    params: {
      limit: { type: Number }, // page size
      page: { type: Number, require: true }, // page number
      type: { type: Number, require: true }, // 订单类型
      tabType: { type: String, require: true }, // 订单来源
    },
  },

  // 订单详情
  '/api/order/detail': {
    ufo: true,
    auth: true,
    api: 'ufo.order.detail',
    params: {
      tabType: { type: String, require: true }, // 订单来源
      orderCode: { type: Number, require: true }, // 订单编号
    },
  },

  // 确认收货
  '/api/buy/confirm/receipt': {
    ufo: true,
    auth: true,
    api: 'ufo.buyer.confirm',
    params: {
      orderCode: { type: Number, require: true }, // 订单编号
    },
  },

  // 不卖了 确认提示信息
  '/api/sell/trade/cancel/confirm/info': {
    auth: true,
    ufo: true,
    api: 'ufo.sellerOrder.cancelConfirm',
    params: {
      orderCode: { type: Number, require: true }, // 订单编号
    },
  },

  // 不卖了
  '/api/sell/trade/cancel': {
    auth: true,
    ufo: true,
    api: 'ufo.sellerOrder.cancel',
    params: {
      orderCode: { type: Number, require: true }, // 订单编号
    },
  },

  // 取消订单
  '/api/buy/trade/cancel': {
    auth: true,
    ufo: true,
    api: 'ufo.buyer.cancel',
    params: {
      orderCode: { type: Number, require: true }, // 订单编号
    },
  },

  // 买家取消订单预信息
  '/api/buy/trade/cancel/confirm/info': {
    auth: true,
    ufo: true,
    api: 'ufo.buyer.cancelCompute',
    params: {
      orderCode: { type: Number, require: true }, // 订单编号
    },
  },

  // 买家删除订单
  '/api/buy/order/delete': {
    auth: true,
    ufo: true,
    api: 'ufo.buyer.delete',
    params: {
      orderCode: { type: Number, require: true }, // 订单编号
    },
  },

  // 卖家删除订单
  '/api/sell/order/delete': {
    auth: true,
    ufo: true,
    api: 'ufo.sellerOrder.delete',
    params: {
      orderCode: { type: Number, require: true }, // 订单编号
    },
  },

  // 非入住商家订单类表
  '/api/ufo/seller/notEntryPrdList': {
    auth: true,
    ufo: true,
    api: 'ufo.seller.notEntryPrdList',
  },

  // 入住商家类表
  '/api/ufo/seller/entryPrdList': {
    auth: true,
    ufo: true,
    api: 'ufo.seller.entryPrdList',
  },

  // 订单数量
  '/api/order/confirm/count': {
    ufo: true,
    auth: true,
    api: 'ufo.order.getAllCnt',
  },

  // 地址列表
  '/api/order/confirm/address': {
    auth: true,
    api: 'app.address.gethidden',
  },

  // 卖家计算订单价格
  '/api/order/confirm/compute': {
    auth: true,
    ufo: true,
    api: 'ufo.sellerOrder.computePublishPrd',

  },

  '/api/order/ordercount': {
    ufo: true,
    auth: true,
    api: API.ORDER_COUNT,
    params: {
      tabType: { type: String, require: true }, // 订单来源
    }
  },

  // 判断用户状态
  '/api/order/user/status': {
    auth: true,
    ufo: true,
    api: 'ufo.sellerOrder.entryStatus',
  },

  // 是绑定支付宝
  '/api/order/alipay/status': {
    auth: true,
    ufo: true,
    api: 'ufo.user.aliPayAccountQuery',
  },

  // 下订单
  '/api/order/presubmit': {
    auth: true,
    ufo: true,
    api: 'ufo.sellerOrder.publishPrd',
  },

  // 支付方式
  '/api/order/paytype': {
    auth: true,
    ufo: true,
    api: 'ufo.payment.findPayListDetail',
  },

  // 买家计算订单价格
  '/api/order/confirm/buycompute': {
    ufo: true,
    auth: true,
    path: 'shopping',
    api: 'ufo.order.compute',
    params: {
      skup: { type: Number, require: true },
    },
  },

  // 买家预定单订单价格
  '/api/order/confirm/buypayment': {
    ufo: true,
    auth: true,
    path: 'shopping',
    api: 'ufo.order.payment',
    params: {
      skup: { type: Number, require: true },
    },
  },

  // 买家获得优惠券
  '/api/order/confirm/coupon': {
    ufo: true,
    auth: true,
    path: 'shopping',
    api: 'ufo.order.selectCoupon',
    params: {
      skup: { type: Number, require: true },
    },
  },

  // 订单物流信息
  '/api/order/express': {
    ufo: true,
    auth: true,
    api: 'ufo.order.expressDetailInfo',
    params: {
      tabType: { type: String, require: true }, // 订单来源
      orderCode: { type: Number, require: true }, // 订单编号
    },
  },

  // 鉴定中心地址
  '/api/order/appraiseAddress': {
    ufo: true,
    auth: true,
    api: 'ufo.order.appraiseAddress',
    params: {
      skup: { type: String, require: true },
      orderCode: { type: String, require: true }, // 订单编号
    },
  },

  // 鉴定中心地址更改公告
  '/api/order/noticeAppraiseAddressChanged': {
    ufo: true,
    auth: true,
    api: 'ufo.order.noticeAppraiseAddressChanged',
    params: {
      orderCode: { type: String, require: true }, // 订单编号
    },
  },

  // 卖家发货
  '/api/order/deliverToDepot': {
    ufo: true,
    auth: true,
    api: 'ufo.order.deliverToDepot',
    params: {
      expressCompanyId: { type: Number, require: true }, // 快递公司id
      wayBillCode: { type: String, require: true }, // 物流快递号
      orderCode: { type: String, require: true }, // 订单编号
      depotNum: { type: Number, require: true }, // 鉴定中心id
    },
  },
};