初始上传
This commit is contained in:
28
addon/pintuan/event/ClosePintuan.php
Executable file
28
addon/pintuan/event/ClosePintuan.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\pintuan\event;
|
||||
|
||||
use addon\pintuan\model\Pintuan;
|
||||
|
||||
/**
|
||||
* 关闭活动
|
||||
*/
|
||||
class ClosePintuan
|
||||
{
|
||||
|
||||
public function handle($params)
|
||||
{
|
||||
$pintuan = new Pintuan();
|
||||
$res = $pintuan->cronClosePintuan($params['relate_id']);
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
28
addon/pintuan/event/ClosePintuanGroup.php
Executable file
28
addon/pintuan/event/ClosePintuanGroup.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\pintuan\event;
|
||||
|
||||
use addon\pintuan\model\PintuanGroup;
|
||||
|
||||
/**
|
||||
* 关闭活动
|
||||
*/
|
||||
class ClosePintuanGroup
|
||||
{
|
||||
|
||||
public function handle($params)
|
||||
{
|
||||
$pintuan = new PintuanGroup();
|
||||
$res = $pintuan->cronClosePintuanGroup($params['relate_id']);
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
43
addon/pintuan/event/GoodsListCategoryIds.php
Executable file
43
addon/pintuan/event/GoodsListCategoryIds.php
Executable file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
|
||||
namespace addon\pintuan\event;
|
||||
|
||||
use addon\pintuan\model\Pintuan;
|
||||
|
||||
/**
|
||||
* 营销活动商品分类id
|
||||
*/
|
||||
class GoodsListCategoryIds
|
||||
{
|
||||
|
||||
/**
|
||||
* 商品营销活动信息
|
||||
* @param $param
|
||||
* @return array
|
||||
*/
|
||||
public function handle($param)
|
||||
{
|
||||
if (empty($param[ 'promotion' ]) || $param[ 'promotion' ] != 'pintuan') return [];
|
||||
|
||||
$condition[] = [
|
||||
['pp.site_id', '=', $param[ 'site_id' ]],
|
||||
['pp.status', '=', 1],
|
||||
['g.is_delete','=',0],
|
||||
['g.goods_state','=',1],
|
||||
];
|
||||
|
||||
$model = new Pintuan();
|
||||
$res = $model->getGoodsCategoryIds($condition);
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
63
addon/pintuan/event/GoodsListPromotion.php
Executable file
63
addon/pintuan/event/GoodsListPromotion.php
Executable file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
|
||||
namespace addon\pintuan\event;
|
||||
|
||||
use addon\pintuan\model\Pintuan;
|
||||
|
||||
/**
|
||||
* 商品营销活动信息
|
||||
*/
|
||||
class GoodsListPromotion
|
||||
{
|
||||
|
||||
/**
|
||||
* 商品营销活动信息
|
||||
* @param $param
|
||||
* @return array
|
||||
*/
|
||||
public function handle($param)
|
||||
{
|
||||
if (empty($param[ 'promotion' ]) || $param[ 'promotion' ] != 'pintuan') return [];
|
||||
|
||||
$condition[] = [
|
||||
['pp.site_id', '=', $param[ 'site_id' ]],
|
||||
['pp.status', '=', 1],
|
||||
['g.is_delete','=',0],
|
||||
['g.goods_state','=',1]
|
||||
];
|
||||
|
||||
if ($param[ 'promotion_name' ]) {
|
||||
$condition[] = ['pp.pintuan_name', 'like', '%' . $param[ 'promotion_name' ] . '%'];
|
||||
}
|
||||
if(!empty($param['goods_name'])){
|
||||
$condition[] = ['g.goods_name', 'like', '%'.$param['goods_name'].'%'];
|
||||
}
|
||||
if (!empty($param['select_type']) && $param['select_type'] == 'selected' && isset($param['goods_ids'])) {
|
||||
$condition[] = [ 'g.goods_id', 'in', $param['goods_ids'] ];
|
||||
}
|
||||
if (!empty($param['category_id'])) {
|
||||
$condition[] = [ 'g.category_id', 'like', '%,' . $param['category_id'] . ',%' ];
|
||||
}
|
||||
if (!empty($param['label_id'])) {
|
||||
$condition[] = [ 'g.label_id', '=', $param['label_id'] ];
|
||||
}
|
||||
if (!empty($param['goods_class'])) {
|
||||
$condition[] = [ 'g.goods_class', '=', $param['goods_class'] ];
|
||||
}
|
||||
|
||||
$model = new Pintuan();
|
||||
$list = $model->getPintuanGoodsPageList($condition, $param[ 'page' ], $param[ 'page_size' ], 'pp.pintuan_id desc');
|
||||
$list['condition'] = $condition;
|
||||
return $list;
|
||||
}
|
||||
}
|
||||
69
addon/pintuan/event/GoodsPromotion.php
Executable file
69
addon/pintuan/event/GoodsPromotion.php
Executable file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\pintuan\event;
|
||||
|
||||
use addon\pintuan\model\Pintuan;
|
||||
|
||||
use app\model\goods\Goods as GoodsModel;
|
||||
|
||||
/**
|
||||
* 商品营销活动信息
|
||||
*/
|
||||
class GoodsPromotion
|
||||
{
|
||||
|
||||
/**
|
||||
* 商品营销活动信息
|
||||
* @param $param
|
||||
* @return array
|
||||
*/
|
||||
public function handle($param)
|
||||
{
|
||||
if (isset($param[ 'goods_sku_detail' ])) {
|
||||
$goods_info = $param[ 'goods_sku_detail' ];
|
||||
if (!empty($goods_info[ 'promotion_addon' ])) {
|
||||
$promotion_addon = json_decode($goods_info[ 'promotion_addon' ], true);
|
||||
if (!empty($promotion_addon[ 'pintuan' ])) {
|
||||
return [
|
||||
'promotion_type' => 'pintuan',
|
||||
'promotion_name' => '拼团',
|
||||
'pintuan_id' => $promotion_addon[ 'pintuan' ]
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
if (empty($param[ 'goods_id' ])) return [];
|
||||
$goods_model = new GoodsModel();
|
||||
$goods_info = $goods_model->getGoodsInfo([ [ 'goods_id', '=', $param[ 'goods_id' ] ] ], 'promotion_addon')[ 'data' ];
|
||||
if (!empty($goods_info[ 'promotion_addon' ])) {
|
||||
$promotion_addon = json_decode($goods_info[ 'promotion_addon' ], true);
|
||||
if (!empty($promotion_addon[ 'pintuan' ])) {
|
||||
$pintuan_model = new Pintuan();
|
||||
$condition = [
|
||||
[ 'ppg.pintuan_id', '=', $promotion_addon[ 'pintuan' ] ],
|
||||
[ 'pp.status', '=', 1 ],
|
||||
[ 'g.goods_state', '=', 1 ],
|
||||
[ 'g.is_delete', '=', 0 ]
|
||||
];
|
||||
$field = 'ppg.id,ppg.pintuan_id,ppg.goods_id,ppg.sku_id,ppg.pintuan_price,ppg.promotion_price,pp.pintuan_name';
|
||||
$goods_detail = $pintuan_model->getPintuanGoodsDetail($condition, $field)[ 'data' ];
|
||||
if (!empty($goods_detail)) {
|
||||
$goods_detail[ 'promotion_type' ] = 'pintuan';
|
||||
$goods_detail[ 'promotion_name' ] = '拼团';
|
||||
return $goods_detail;
|
||||
}
|
||||
}
|
||||
}
|
||||
return [];
|
||||
}
|
||||
}
|
||||
}
|
||||
27
addon/pintuan/event/GoodsPromotionType.php
Executable file
27
addon/pintuan/event/GoodsPromotionType.php
Executable file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\pintuan\event;
|
||||
|
||||
/**
|
||||
* 活动类型
|
||||
*/
|
||||
class GoodsPromotionType
|
||||
{
|
||||
|
||||
/**
|
||||
* 活动类型
|
||||
* @return array
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
return [ 'name' => '拼团', 'short' => '拼', 'type' => 'pintuan', 'color' => '#F58760', 'url' => 'pintuan://shop/pintuan/lists' ];
|
||||
}
|
||||
}
|
||||
25
addon/pintuan/event/Install.php
Executable file
25
addon/pintuan/event/Install.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\pintuan\event;
|
||||
|
||||
/**
|
||||
* 应用安装
|
||||
*/
|
||||
class Install
|
||||
{
|
||||
/**
|
||||
* 执行安装
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
return success();
|
||||
}
|
||||
}
|
||||
27
addon/pintuan/event/MessagePintuanComplete.php
Executable file
27
addon/pintuan/event/MessagePintuanComplete.php
Executable file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\pintuan\event;
|
||||
|
||||
use addon\pintuan\model\Pintuan;
|
||||
|
||||
class MessagePintuanComplete
|
||||
{
|
||||
|
||||
public function handle($param)
|
||||
{
|
||||
//发送消息
|
||||
if ($param[ "keywords" ] == "PINTUAN_COMPLETE") {
|
||||
$model = new Pintuan();
|
||||
$result = $model->pintuanCompleteMessage($param);
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
31
addon/pintuan/event/MessagePintuanFail.php
Executable file
31
addon/pintuan/event/MessagePintuanFail.php
Executable file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\pintuan\event;
|
||||
|
||||
use addon\pintuan\model\Pintuan;
|
||||
|
||||
/**
|
||||
* 关闭活动消息
|
||||
*/
|
||||
class MessagePintuanFail
|
||||
{
|
||||
|
||||
public function handle($param)
|
||||
{
|
||||
//发送消息
|
||||
if ($param["keywords"] == "PINTUAN_FAIL") {
|
||||
$model = new Pintuan();
|
||||
$result = $model->pintuanFailMessage($param);
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
28
addon/pintuan/event/OpenPintuan.php
Executable file
28
addon/pintuan/event/OpenPintuan.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\pintuan\event;
|
||||
|
||||
use addon\pintuan\model\Pintuan;
|
||||
|
||||
/**
|
||||
* 启动活动
|
||||
*/
|
||||
class OpenPintuan
|
||||
{
|
||||
|
||||
public function handle($params)
|
||||
{
|
||||
$pintuan = new Pintuan();
|
||||
$res = $pintuan->cronOpenPintuan($params['relate_id']);
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
37
addon/pintuan/event/OrderClose.php
Executable file
37
addon/pintuan/event/OrderClose.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\pintuan\event;
|
||||
|
||||
use addon\pintuan\model\PintuanOrder;
|
||||
|
||||
/**
|
||||
* 订单关闭衍生
|
||||
*/
|
||||
class OrderClose
|
||||
{
|
||||
|
||||
/**
|
||||
* 活动展示
|
||||
* @param $param
|
||||
* @return array|mixed
|
||||
*/
|
||||
public function handle($params)
|
||||
{
|
||||
if ($params[ 'promotion_type' ] == 'pintuan') {
|
||||
$pintuan_order = new PintuanOrder();
|
||||
$condition= array(
|
||||
['order_id', '=', $params['order_id']]
|
||||
);
|
||||
$res = $pintuan_order->pintuanOrderClose($condition);
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
}
|
||||
34
addon/pintuan/event/OrderPay.php
Executable file
34
addon/pintuan/event/OrderPay.php
Executable file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\pintuan\event;
|
||||
|
||||
use addon\pintuan\model\PintuanOrder;
|
||||
|
||||
/**
|
||||
* 活动展示
|
||||
*/
|
||||
class OrderPay
|
||||
{
|
||||
|
||||
/**
|
||||
* 活动展示
|
||||
* @param $param
|
||||
* @return array|mixed
|
||||
*/
|
||||
public function handle($param)
|
||||
{
|
||||
if ($param[ 'promotion_type' ] == 'pintuan') {
|
||||
$pintuan_order = new PintuanOrder();
|
||||
$res = $pintuan_order->orderPay($param);
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
}
|
||||
27
addon/pintuan/event/OrderPromotionType.php
Executable file
27
addon/pintuan/event/OrderPromotionType.php
Executable file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\pintuan\event;
|
||||
|
||||
/**
|
||||
* 订单营销活动类型
|
||||
*/
|
||||
class OrderPromotionType
|
||||
{
|
||||
|
||||
/**
|
||||
* 订单营销活动类型
|
||||
* @return array
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
return [ "name" => "拼团", "type" => "pintuan" ];
|
||||
}
|
||||
}
|
||||
37
addon/pintuan/event/PintuanZoneConfig.php
Executable file
37
addon/pintuan/event/PintuanZoneConfig.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\pintuan\event;
|
||||
|
||||
|
||||
/**
|
||||
* 活动专区——拼团页面配置
|
||||
*/
|
||||
class PintuanZoneConfig
|
||||
{
|
||||
|
||||
public function handle($params)
|
||||
{
|
||||
if (empty($params) || $params[ 'name' ] == 'pintuan') {
|
||||
$data = [
|
||||
'name' => 'pintuan', // 标识
|
||||
'title' => '拼团', // 名称
|
||||
'url' => 'shop/adv/lists?keyword=NS_PINTUAN', // 自定义跳转链接
|
||||
'preview' => 'addon/pintuan/shop/view/public/img/zone_preview.png', // 预览图
|
||||
// 页面配置
|
||||
'value' => [
|
||||
'bg_color' => '#FA3A1D'
|
||||
],
|
||||
];
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
27
addon/pintuan/event/PromotionType.php
Executable file
27
addon/pintuan/event/PromotionType.php
Executable file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\pintuan\event;
|
||||
|
||||
/**
|
||||
* 活动类型
|
||||
*/
|
||||
class PromotionType
|
||||
{
|
||||
|
||||
/**
|
||||
* 活动类型
|
||||
* @return array
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
return [ "name" => "拼团", "type" => "pintuan" ];
|
||||
}
|
||||
}
|
||||
98
addon/pintuan/event/ShowPromotion.php
Executable file
98
addon/pintuan/event/ShowPromotion.php
Executable file
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\pintuan\event;
|
||||
|
||||
use think\facade\Db;
|
||||
|
||||
/**
|
||||
* 活动展示
|
||||
*/
|
||||
class ShowPromotion
|
||||
{
|
||||
public $promotion_type = 'time_limit';
|
||||
|
||||
/**
|
||||
* 活动展示
|
||||
* @param array $params
|
||||
* @return array
|
||||
*/
|
||||
public function handle($params = [])
|
||||
{
|
||||
$data = [
|
||||
'shop' => [
|
||||
[
|
||||
//插件名称
|
||||
'name' => 'pintuan',
|
||||
//店铺端展示分类 shop:营销活动 member:互动营销
|
||||
'show_type' => 'shop',
|
||||
//展示主题
|
||||
'title' => '拼团',
|
||||
//展示介绍
|
||||
'description' => '邀请朋友一起拼团购买',
|
||||
//展示图标
|
||||
'icon' => 'addon/pintuan/icon.png',
|
||||
//跳转链接
|
||||
'url' => 'pintuan://shop/pintuan/lists',
|
||||
'summary' => $this->summary($params)
|
||||
]
|
||||
]
|
||||
|
||||
];
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 营销活动概况
|
||||
* @param $params
|
||||
* @return array
|
||||
*/
|
||||
private function summary($params)
|
||||
{
|
||||
if (empty($params)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if(isset($params['promotion_type']) && $params['promotion_type'] != $this->promotion_type){
|
||||
return [];
|
||||
}
|
||||
|
||||
//获取活动数量
|
||||
if (isset($params[ 'count' ])) {
|
||||
$count = model("promotion_pintuan")->getCount([ [ 'site_id', '=', $params[ 'site_id' ] ] ]);
|
||||
return [
|
||||
'count' => $count
|
||||
];
|
||||
}
|
||||
//获取活动概况,需要获取开始时间与结束时间
|
||||
if (isset($params[ 'summary' ])) {
|
||||
$join = [
|
||||
[ 'goods g', 'p.goods_id = g.goods_id', 'inner' ]
|
||||
];
|
||||
$list = model("promotion_pintuan")->getList([
|
||||
[ '', 'exp', Db::raw('not ( (`start_time` >= ' . $params[ 'end_time' ] . ') or (`end_time` <= ' . $params[ 'start_time' ] . '))') ],
|
||||
[ 'p.site_id', '=', $params[ 'site_id' ] ],
|
||||
[ 'p.status', '<>', 2 ],
|
||||
[ 'p.status', '<>', 3 ],
|
||||
[ 'p.status', '<>', 4 ],
|
||||
[ 'g.goods_state', '=', 1 ],
|
||||
[ 'g.is_delete', '=', 0 ]
|
||||
], 'p.pintuan_name as promotion_name,p.pintuan_id as promotion_id,p.start_time,p.end_time', '', 'p', $join, 'p.pintuan_name');
|
||||
return !empty($list) ? [
|
||||
'time_limit' => [
|
||||
'count' => count($list),
|
||||
'detail' => $list,
|
||||
'color' => '#6D66FF'
|
||||
]
|
||||
] : [];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
25
addon/pintuan/event/UnInstall.php
Executable file
25
addon/pintuan/event/UnInstall.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\pintuan\event;
|
||||
|
||||
/**
|
||||
* 应用卸载
|
||||
*/
|
||||
class UnInstall
|
||||
{
|
||||
/**
|
||||
* 执行卸载
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
return success();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user