初始上传

This commit is contained in:
2026-04-04 17:27:12 +08:00
parent 4d80d28eb4
commit b7e11774ee
11191 changed files with 1588469 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
/**
* Niushop商城系统 - 团队十年电商经验汇集巨献!
* =========================================================
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
* ----------------------------------------------
* 官方网址: https://www.niushop.com
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和使用。
* 任何企业和个人不允许对程序代码以任何形式任何目的再发布。
* =========================================================
*/
namespace addon\supermember\event;
use addon\supermember\model\MemberLevelStat;
/**
* 礼品卡统计
*/
class AddStat
{
public function handle($params)
{
$type = $params['type'];
if($type == 'member_level_order'){
$member_level_stat_model = new MemberLevelStat();
$res = $member_level_stat_model->addMemberLevelStat($params['data']);
return $res;
}
}
}

View File

@@ -0,0 +1,26 @@
<?php
/**
* Niushop商城系统 - 团队十年电商经验汇集巨献!
* =========================================================
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
* ----------------------------------------------
* 官方网址: https://www.niushop.com
* =========================================================
*/
namespace addon\supermember\event;
/**
* 优惠券来源类型
*/
class CouponGetType
{
/**
* 执行安装
*/
public function handle()
{
return [ 5 => '会员卡开卡奖励'];
}
}

View File

@@ -0,0 +1,33 @@
<?php
/**
* Niushop商城系统 - 团队十年电商经验汇集巨献!
* =========================================================
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
* ----------------------------------------------
* 官方网址: https://www.niushop.com
* =========================================================
*/
namespace addon\supermember\event;
use addon\supermember\model\MemberLevelOrder;
/**
* 资金收入统计
*/
class IncomeStatistics
{
public function handle($param)
{
$money = (new MemberLevelOrder())->getOrderSum([ ['site_id', '=', $param['site_id'] ], ['pay_type', '<>', 'BALANCE'], ['pay_time', 'between', [$param['start_time'], $param['end_time']] ] ], 'order_money')['data'];
return [
[
'title' => '会员开卡',
'value' => $money,
'desc' => '统计时间内,所有会员开卡支付金额之和',
'url' => 'supermember://shop/membercard/order'
]
];
}
}

View File

@@ -0,0 +1,26 @@
<?php
/**
* Niushop商城系统 - 团队十年电商经验汇集巨献!
* =========================================================
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
* ----------------------------------------------
* 官方网址: https://www.niushop.com
* =========================================================
*/
namespace addon\supermember\event;
/**
* 应用安装
*/
class Install
{
/**
* 执行安装
*/
public function handle()
{
return success();
}
}

View File

@@ -0,0 +1,29 @@
<?php
/**
* Niushop商城系统 - 团队十年电商经验汇集巨献!
* =========================================================
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
* ----------------------------------------------
* 官方网址: https://www.niushop.com
* =========================================================
*/
namespace addon\supermember\event;
use app\model\member\MemberLevel;
/**
* 会员卡过期
*/
class MemberLevelAutoExpire
{
public function handle($param)
{
$order = new MemberLevel();
$res = $order->memberLevelExpire($param['relate_id']);
return $res;
}
}

View File

@@ -0,0 +1,30 @@
<?php
/**
* Niushop商城系统 - 团队十年电商经验汇集巨献!
* =========================================================
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
* ----------------------------------------------
* 官方网址: https://www.niushop.com
* =========================================================
*/
namespace addon\supermember\event;
use addon\supermember\model\MemberLevelOrder;
/**
* 关闭会员卡订单
*/
class MemberLevelOrderClose
{
public function handle($param)
{
$order = new MemberLevelOrder();
$res = $order->closeLevelOrder($param['relate_id']);
return $res;
}
}

View File

@@ -0,0 +1,29 @@
<?php
/**
* Niushop商城系统 - 团队十年电商经验汇集巨献!
* =========================================================
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
* ----------------------------------------------
* 官方网址: https://www.niushop.com
* =========================================================
*/
namespace addon\supermember\event;
use addon\supermember\model\MemberLevelOrder;
/**
* 会员卡订单回调
*/
class MemberLevelOrderPayNotify
{
public function handle($data)
{
$model = new MemberLevelOrder();
$res = $model->orderPay($data);
return $res;
}
}

View File

@@ -0,0 +1,47 @@
<?php
/**
* Niushop商城系统 - 团队十年电商经验汇集巨献!
* =========================================================
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
* ----------------------------------------------
* 官方网址: https://www.niushop.com
* =========================================================
*/
namespace addon\supermember\event;
/**
* 活动展示
*/
class ShowPromotion
{
/**
* 活动展示
* @return array
*/
public function handle()
{
$data = [
'shop' => [
[
//插件名称
'name' => 'supermember',
//展示分类根据平台端设置admin平台营销shop店铺营销member:会员营销, tool:应用工具)
'show_type' => 'member',
//展示主题
'title' => '超级会员卡',
//展示介绍
'description' => '提供更丰富的会员权益',
//展示图标
'icon' => 'addon/supermember/icon.png',
//跳转链接
'url' => 'supermember://shop/membercard/lists',
]
]
];
return $data;
}
}

View File

@@ -0,0 +1,26 @@
<?php
/**
* Niushop商城系统 - 团队十年电商经验汇集巨献!
* =========================================================
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
* ----------------------------------------------
* 官方网址: https://www.niushop.com
* =========================================================
*/
namespace addon\supermember\event;
/**
* 应用卸载
*/
class UnInstall
{
/**
* 执行卸载
*/
public function handle()
{
return error('', "系统插件不允许删除");
}
}

View File

@@ -0,0 +1,27 @@
<?php
/**
* Niushop商城系统 - 团队十年电商经验汇集巨献!
* =========================================================
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
* ----------------------------------------------
* 官方网址: https://www.niushop.com
* =========================================================
*/
namespace addon\supermember\event;
use addon\blindbox\model\BlindboxOrder;
use addon\supermember\model\MemberLevelOrder;
/**
* 通过支付信息获取手机端订单详情路径
*/
class WapOrderDetailPathByPayInfo
{
public function handle($data)
{
if($data['event'] == 'MemberLevelOrderPayNotify'){
return '/pages_tool/member/card';
}
}
}