finance-pay/app/common/enum/PayOrderEnum.php

76 lines
2.4 KiB
PHP
Raw Normal View History

2023-11-15 12:02:33 +08:00
<?php
namespace app\common\enum;
class PayOrderEnum
{
// 订单来源
const PAY_ORDER_SOURCE_SHOP = 11;
const PAY_ORDER_SOURCE_GONGXIAO = 12;
// 订单类型
const PAY_ORDER_TYPE_YAJIN = 101;
const PAY_ORDER_TYPE_GUJIN = 102;
const PAY_ORDER_TYPE_TRADE = 103;
const PAY_ORDER_TYPE_RECHARGE = 104;
//支付状态
const PAY_STATUS_UNPAID = 200; //未支付
const PAY_STATUS_ISPAID = 201; //已支付
// 付款角色
const PAY_ROLE_TOWN_HEHUOREN = 301; // 镇合伙人公司管理员
const PAY_ROLE_VILLAGE_MANAGER = 302; // 村管理公司管理员
const PAY_ROLE_GROUP_MANAGER = 303; // 小组服务团队管理员
const PAY_ROLE_NORMAL_USER = 304; // 普通用户
const PAY_ROLE_TOWN_MERCHANT = 305; // 镇街店铺
const PAY_ROLE_TOWN_SUPPLY_MERCHANT = 306; // 镇级供应链
const PAY_ROLE_CITY_SUPPLY_MERCHANT = 307; // 市级供应链
// 支付方式
const PAY_TYPE = 1; // 微信支付
/**
* @notes 获取支付订单类型
* @param bool $value
* @return string|string[]
* @author 段誉
* @date 2023/2/23 15:36
*/
public static function getPayOrderTypeDesc($value = true)
{
$data = [
self::PAY_ORDER_TYPE_YAJIN => '押金',
self::PAY_ORDER_TYPE_GUJIN => '股金',
self::PAY_ORDER_TYPE_TRADE => '交易',
self::PAY_ORDER_TYPE_RECHARGE => '充值',
];
if ($value === true) {
return $data;
}
return $data[$value] ?? '';
}
/**
* @notes 获取支付订单类型
* @param bool $value
* @return string|string[]
* @author 段誉
* @date 2023/2/23 15:36
*/
public static function getPayRoleDesc($value = true)
{
$data = [
self::PAY_ROLE_TOWN_HEHUOREN => '镇合伙人公司管理员',
self::PAY_ROLE_VILLAGE_MANAGER => '村管理公司管理员',
self::PAY_ROLE_GROUP_MANAGER => '小组服务团队管理员',
self::PAY_ROLE_NORMAL_USER => '普通用户',
self::PAY_ROLE_TOWN_MERCHANT => '镇街店铺商户',
self::PAY_ROLE_TOWN_SUPPLY_MERCHANT => '镇级供应链商户',
self::PAY_ROLE_CITY_SUPPLY_MERCHANT => '市级供应链商户',
];
if ($value === true) {
return $data;
}
return $data[$value] ?? '';
}
}