92 lines
2.2 KiB
PHP
92 lines
2.2 KiB
PHP
<?php
|
|
|
|
|
|
namespace app\common\enum;
|
|
|
|
|
|
class OrderEnum
|
|
{
|
|
/**
|
|
* 流水类型
|
|
* @USER_ORDER_PAY 用户订单支付
|
|
* @CASHIER_ORDER_PAY 收银台支付
|
|
* @CASHIER_CASH_ORDER_PAY 收银台现金支付
|
|
* @MERCHANT_ORDER_OBTAINS 商户订单获得
|
|
* @ORDER_HANDLING_FEES 订单手续费
|
|
* @MERCHANT_ORDER_PAY 商户订单支付
|
|
* @PLATFORM_ORDER_OBTAINS 平台订单获得
|
|
* @SUPPLIER_ORDER_OBTAINS 供应链订单获得
|
|
* @PLATFORM_ORDER_PAY 平台订单支付
|
|
* @SYSTEM_SET 系统设置
|
|
*/
|
|
const USER_ORDER_PAY = 1;
|
|
const MERCHANT_ORDER_OBTAINS = 2;
|
|
const ORDER_HANDLING_FEES = 3;
|
|
const MERCHANT_ORDER_PAY = 4;
|
|
const PLATFORM_ORDER_OBTAINS = 5;
|
|
const SUPPLIER_ORDER_OBTAINS = 6;
|
|
const PLATFORM_ORDER_PAY = 7;
|
|
const SYSTEM_SET = 8;
|
|
const CASHIER_ORDER_PAY = 9;
|
|
const CASHIER_CASH_ORDER_PAY = 10;
|
|
|
|
|
|
/**
|
|
* 收入支出类型
|
|
* @EXPENDITURE 支出
|
|
* @INCOME 收入
|
|
*/
|
|
const EXPENDITURE =0;
|
|
const INCOME =1;
|
|
|
|
|
|
/**
|
|
* 状态
|
|
* @RECEIVED_GOODS 已收货
|
|
*/
|
|
const RECEIVED_GOODS = 2;
|
|
|
|
|
|
/**
|
|
* 账户类型
|
|
* @USER 用户
|
|
* @MERCHANT 商户
|
|
* @PLATFORM 平台
|
|
* @SUPPLIER 供应链
|
|
* @SYSTEM 系统
|
|
*/
|
|
const USER =0;
|
|
const MERCHANT =1;
|
|
const PLATFORM =2;
|
|
const SUPPLIER =3;
|
|
const SYSTEM=4;
|
|
|
|
/**
|
|
* @notes 获取支付类型
|
|
* @param bool $value
|
|
* @return string|string[]
|
|
* @author 段誉
|
|
* @date 2023/2/23 15:36
|
|
*/
|
|
public static function getFinancialType($value = true)
|
|
{
|
|
$data = [
|
|
self::USER_ORDER_PAY=>'用户订单支付',
|
|
self::MERCHANT_ORDER_PAY=>'商户订单支付',
|
|
self::PLATFORM_ORDER_PAY=>'平台订单支付',
|
|
self::MERCHANT_ORDER_OBTAINS=>'商户订单获得',
|
|
self::ORDER_HANDLING_FEES=>'订单手续费',
|
|
self::PLATFORM_ORDER_OBTAINS=>'平台订单获得',
|
|
self::SUPPLIER_ORDER_OBTAINS=>'供应商订单获得',
|
|
self::SYSTEM_SET=>'平台设置',
|
|
|
|
|
|
];
|
|
if ($value === true) {
|
|
return $data;
|
|
}
|
|
return $data[$value] ?? '';
|
|
}
|
|
|
|
|
|
} |