| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <?php
- namespace addons\JoinPay\common\enums;
- use common\enums\BaseEnum;
- /**
- * Class AddonsCouponEnum
- * @package addons\Coupon\common\enums
- */
- class AddonsJoinPayEnum extends BaseEnum
- {
- // 账号类型
- const ACCOUNT_FOR_PUBLIC = 202;
- const ACCOUNT_FOR_PRIVATE = 201;
- // 货币类型
- const CURRENCY_RMB = 201;
- const CURRENCY_DOLLAR = 202;
- // 是否复核
- const REVIEW_NEED = 201;
- const REVIEW_NO = 202;
- // 代付用途
- const PAID_PURPOSE1 = 201;
- const PAID_PURPOSE2 = 202;
- const PAID_PURPOSE3 = 203;
- const PAID_PURPOSE4 = 204;
- const PAID_PURPOSE5 = 205;
- const PAID_PURPOSE6 = 206;
- // 处理状态
- const HANDLE_STATUS0 = 0;
- const HANDLE_STATUS1 = 1;
- const HANDLE_STATUS2 = 2;
- public static function getAccountTypeMap(int $account_type = null)
- {
- $map = [
- self::ACCOUNT_FOR_PUBLIC => '对公',
- self::ACCOUNT_FOR_PRIVATE => '对私',
- ];
- if ($account_type !== null) return $map[$account_type];
- return $map;
- }
- public static function getCurrencyTypeMap(int $currency_type = null)
- {
- $map = [
- self::CURRENCY_RMB => '人民币',
- self::CURRENCY_DOLLAR => '美元',
- ];
- if ($currency_type !== null) return $map[$currency_type];
- return $map;
- }
- public static function getReviewMap(int $is_review = null)
- {
- $map = [
- self::REVIEW_NEED => '需要复核',
- self::REVIEW_NO => '不需要复核',
- ];
- if ($is_review !== null) return $map[$is_review];
- return $map;
- }
- // public static function getPaidPurposeMap(int $paid_purpose = null)
- // {
- // $map = [
- // self::PAID_PURPOSE1 => '对公',
- // self::PAID_PURPOSE2 => '对私',
- // self::PAID_PURPOSE3 => '对私',
- // self::PAID_PURPOSE4 => '对私',
- // self::PAID_PURPOSE5 => '对私',
- // self::PAID_PURPOSE6 => '对私',
- // ];
- // if ($paid_purpose !== null) return $map[$paid_purpose];
- // return $map;
- // }
- public static function getHandleStatusMap(int $status = null)
- {
- $map = [
- self::HANDLE_STATUS0 => '等待处理',
- self::HANDLE_STATUS1 => '成功',
- self::HANDLE_STATUS2 => '失败',
- ];
- if ($status !== null) return $map[$status];
- return $map;
- }
- public static function getMap(): array
- {
- return [];
- }
- }
|