'商城发放', self::SEND_FROM2 => '购买商品奖励', self::SEND_FROM3 => '商品详情处领取', self::SEND_FROM4 => '领券中心领取', self::SEND_FROM5 => '签到', self::SEND_FROM6 => '好友转赠', self::SEND_FROM7 => '云库存-提货到线下奖励', self::SEND_FROM8 => '升级礼包赠送', self::SEND_FROM9 => '九宫格中奖', self::SEND_FROM10 => '刮刮卡中奖', self::SEND_FROM11 => '充值赠送', self::SEND_FROM12 => '会员礼包赠送', self::SEND_FROM13 => '消费礼包赠送', self::SEND_FROM14 => '推三返一赠送', self::SEND_FROM15 => '推荐有礼赠送', self::SEND_FROM16 => '收银台订单赠送', ]; if(isset($data[$form])) return $data[$form]; return $data; } /** * @return array */ public static function getMap(): array { return []; } public static function getTypeMap(): array { return [ self::DISCOUNT => '折扣', self::FULL_MINUS => '满减', self::EXCHANGE => '兑换', ]; } public static function getExpireTypeMap(): array { return [ self::EXPIRE_TYPE1 => '领取后N天过期', self::EXPIRE_TYPE2 => '指定有效期', self::EXPIRE_TYPE3 => '领取后N天生效,生效后M天过期', ]; } public static function getAppointTypeMap(): array { return [ self::APPOINT_TYPE1 => '指定分类', self::APPOINT_TYPE2 => '指定商品', self::APPOINT_TYPE3 => '全场通用', ]; } public static function getGivingStatusMap(): array { return [ self::GIVING_STATUS0 => '未转赠', self::GIVING_STATUS1 => '转赠中', self::GIVING_STATUS2 => '已被领取', ]; } public static function getIsGivingMap() { return [ self::GIVING => '是', self::GIVING_N => '否', ]; } public static function getReceiveTypeMap(int $revc_type = 0) { $revc_type_map = [ self::REVC_TYPE_H5 => 'h5', self::REVC_TYPE_WECHAT => '微信', self::REVC_TYPE_MPWX => '微信小程序', self::REVC_TYPE_APP => 'app', self::REVC_TYPE_WORK_WX => '企业微信', ]; if ($revc_type) { return $revc_type_map[$revc_type]; } else { return $revc_type_map; } } public static function getCouponStatusMap(int $status = 0, bool $is_user_coupon = false) { $status_map = [ self::STATUS_NOT_BEGIN => '未开始', self::STATUS_RECEIVING => '领取中', self::STATUS_EXPIRED => '已过期', self::STATUS_FAILURE => '已失效', ]; if ($is_user_coupon) { $status_map[self::STATUS_RECEIVING] = '正常使用'; } if ($status) { return $status_map[$status]; } else { return $status_map; } } public static function getRewardScenariosMap(int $reward_type = 0) { $reward_type_map = [ self::REWARD_TYPE_CONSUME => '使用奖励', self::REWARD_TYPE_GIVING => '转赠奖励', ]; if ($reward_type) { return $reward_type_map[$reward_type]; } else { return $reward_type_map; } } public static function getRewardTypeMap(int $reward_type) { $reward_type_map = [ self::REWARD_TYPE1 => '余额', self::REWARD_TYPE2 => '红包', self::REWARD_TYPE3 => '积分', self::REWARD_TYPE4 => '系统虚拟货币', ]; if ($reward_type) { return $reward_type_map[$reward_type]; } else { return $reward_type_map; } } }