debug
parent
5183850dbb
commit
85d32feffd
|
|
@ -1,45 +0,0 @@
|
||||||
<?php
|
|
||||||
namespace app\api\controller;
|
|
||||||
|
|
||||||
use app\service\OrderService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单支付异步通知
|
|
||||||
* @author Devil
|
|
||||||
* @blog http://gong.gg/
|
|
||||||
* @version 0.0.1
|
|
||||||
* @datetime 2018-05-21T10:48:48+0800
|
|
||||||
*/
|
|
||||||
class OrderNotify extends Common
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* [__construct 构造方法]
|
|
||||||
* @author Devil
|
|
||||||
* @blog http://gong.gg/
|
|
||||||
* @version 0.0.1
|
|
||||||
* @datetime 2016-12-03T12:39:08+0800
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
// 调用父类前置方法
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [Notify 支付异步处理]
|
|
||||||
* @author Devil
|
|
||||||
* @blog http://gong.gg/
|
|
||||||
* @version 1.0.0
|
|
||||||
* @datetime 2018-03-04T14:35:38+0800
|
|
||||||
*/
|
|
||||||
public function Notify()
|
|
||||||
{
|
|
||||||
$ret = OrderService::Notify($_REQUEST);
|
|
||||||
if($ret['code'] == 0)
|
|
||||||
{
|
|
||||||
exit('success');
|
|
||||||
}
|
|
||||||
exit('error');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
@ -1,111 +0,0 @@
|
||||||
<?php
|
|
||||||
namespace app\api\controller;
|
|
||||||
|
|
||||||
use app\service\UserService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户地址
|
|
||||||
* @author Devil
|
|
||||||
* @blog http://gong.gg/
|
|
||||||
* @version 0.0.1
|
|
||||||
* @datetime 2017-03-02T22:48:35+0800
|
|
||||||
*/
|
|
||||||
class UserAddress extends Common
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* [__construct 构造方法]
|
|
||||||
* @author Devil
|
|
||||||
* @blog http://gong.gg/
|
|
||||||
* @version 0.0.1
|
|
||||||
* @datetime 2016-12-03T12:39:08+0800
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
// 调用父类前置方法
|
|
||||||
parent::__construct();
|
|
||||||
|
|
||||||
// 是否登录
|
|
||||||
$this->Is_Login();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取用户地址详情
|
|
||||||
* @author Devil
|
|
||||||
* @blog http://gong.gg/
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2018-07-18
|
|
||||||
* @desc description
|
|
||||||
*/
|
|
||||||
public function Detail()
|
|
||||||
{
|
|
||||||
$params = $this->data_post;
|
|
||||||
$params['user'] = $this->user;
|
|
||||||
$ret = UserService::UserAddressRow($params);
|
|
||||||
return json($ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取用户地址列表
|
|
||||||
* @author Devil
|
|
||||||
* @blog http://gong.gg/
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2018-07-18
|
|
||||||
* @desc description
|
|
||||||
*/
|
|
||||||
public function Index()
|
|
||||||
{
|
|
||||||
$ret = UserService::UserAddressList(['user'=>$this->user]);
|
|
||||||
return json($ret);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户地址保存
|
|
||||||
* @author Devil
|
|
||||||
* @blog http://gong.gg/
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2018-07-18
|
|
||||||
* @desc description
|
|
||||||
*/
|
|
||||||
public function Save()
|
|
||||||
{
|
|
||||||
$params = $this->data_post;
|
|
||||||
$params['user'] = $this->user;
|
|
||||||
$ret = UserService::UserAddressSave($params);
|
|
||||||
return json($ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除地址
|
|
||||||
* @author Devil
|
|
||||||
* @blog http://gong.gg/
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2018-07-18
|
|
||||||
* @desc description
|
|
||||||
*/
|
|
||||||
public function Delete()
|
|
||||||
{
|
|
||||||
$params = $this->data_post;
|
|
||||||
$params['user'] = $this->user;
|
|
||||||
$ret = UserService::UserAddressDelete($params);
|
|
||||||
return json($ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 默认地址设置
|
|
||||||
* @author Devil
|
|
||||||
* @blog http://gong.gg/
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2018-07-18
|
|
||||||
* @desc description
|
|
||||||
*/
|
|
||||||
public function SetDefault()
|
|
||||||
{
|
|
||||||
$params = $this->data_post;
|
|
||||||
$params['user'] = $this->user;
|
|
||||||
$ret = UserService::UserAddressDefault($params);
|
|
||||||
return json($ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
@ -1,90 +0,0 @@
|
||||||
<?php
|
|
||||||
namespace app\api\controller;
|
|
||||||
|
|
||||||
use app\service\GoodsService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户商品浏览
|
|
||||||
* @author Devil
|
|
||||||
* @blog http://gong.gg/
|
|
||||||
* @version 0.0.1
|
|
||||||
* @datetime 2016-12-01T21:51:08+0800
|
|
||||||
*/
|
|
||||||
class UserGoodsBrowse extends Common
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* [__construct 构造方法]
|
|
||||||
* @author Devil
|
|
||||||
* @blog http://gong.gg/
|
|
||||||
* @version 0.0.1
|
|
||||||
* @datetime 2016-12-03T12:39:08+0800
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
// 调用父类前置方法
|
|
||||||
parent::__construct();
|
|
||||||
|
|
||||||
// 是否登录
|
|
||||||
$this->Is_Login();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品浏览列表
|
|
||||||
* @author Devil
|
|
||||||
* @blog http://gong.gg/
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2018-10-09
|
|
||||||
* @desc description
|
|
||||||
*/
|
|
||||||
public function Index()
|
|
||||||
{
|
|
||||||
// 参数
|
|
||||||
$params = $this->data_post;
|
|
||||||
$params['user'] = $this->user;
|
|
||||||
|
|
||||||
// 分页
|
|
||||||
$number = 10;
|
|
||||||
$page = max(1, isset($this->data_post['page']) ? intval($this->data_post['page']) : 1);
|
|
||||||
|
|
||||||
// 条件
|
|
||||||
$where = GoodsService::UserGoodsBrowseListWhere($params);
|
|
||||||
|
|
||||||
// 获取总数
|
|
||||||
$total = GoodsService::GoodsBrowseTotal($where);
|
|
||||||
$page_total = ceil($total/$number);
|
|
||||||
$start = intval(($page-1)*$number);
|
|
||||||
|
|
||||||
// 获取列表
|
|
||||||
$data_params = array(
|
|
||||||
'limit_start' => $start,
|
|
||||||
'limit_number' => $number,
|
|
||||||
'where' => $where,
|
|
||||||
);
|
|
||||||
$data = GoodsService::GoodsBrowseList($data_params);
|
|
||||||
|
|
||||||
// 返回数据
|
|
||||||
$result = [
|
|
||||||
'total' => $total,
|
|
||||||
'page_total' => $page_total,
|
|
||||||
'data' => $data['data'],
|
|
||||||
];
|
|
||||||
return json(DataReturn('success', 0, $result));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品浏览删除
|
|
||||||
* @author Devil
|
|
||||||
* @blog http://gong.gg/
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2018-09-14
|
|
||||||
* @desc description
|
|
||||||
*/
|
|
||||||
public function Delete()
|
|
||||||
{
|
|
||||||
$params = $this->data_post;
|
|
||||||
$params['user'] = $this->user;
|
|
||||||
$ret = GoodsService::GoodsBrowseDelete($params);
|
|
||||||
return json($ret);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
@ -1,89 +0,0 @@
|
||||||
<?php
|
|
||||||
namespace app\api\controller;
|
|
||||||
|
|
||||||
use app\service\GoodsService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户商品收藏
|
|
||||||
* @author Devil
|
|
||||||
* @blog http://gong.gg/
|
|
||||||
* @version 0.0.1
|
|
||||||
* @datetime 2016-12-01T21:51:08+0800
|
|
||||||
*/
|
|
||||||
class UserGoodsFavor extends Common
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* [__construct 构造方法]
|
|
||||||
* @author Devil
|
|
||||||
* @blog http://gong.gg/
|
|
||||||
* @version 0.0.1
|
|
||||||
* @datetime 2016-12-03T12:39:08+0800
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
// 调用父类前置方法
|
|
||||||
parent::__construct();
|
|
||||||
|
|
||||||
// 是否登录
|
|
||||||
$this->Is_Login();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [Index 获取列表]
|
|
||||||
* @author Devil
|
|
||||||
* @blog http://gong.gg/
|
|
||||||
* @version 0.0.1
|
|
||||||
* @datetime 2017-02-22T16:50:32+0800
|
|
||||||
*/
|
|
||||||
public function Index()
|
|
||||||
{
|
|
||||||
// 参数
|
|
||||||
$params = input();
|
|
||||||
$params['user'] = $this->user;
|
|
||||||
|
|
||||||
// 分页
|
|
||||||
$number = 10;
|
|
||||||
$page = max(1, isset($this->data_post['page']) ? intval($this->data_post['page']) : 1);
|
|
||||||
|
|
||||||
// 条件
|
|
||||||
$where = GoodsService::UserGoodsFavorListWhere($params);
|
|
||||||
|
|
||||||
// 获取总数
|
|
||||||
$total = GoodsService::GoodsFavorTotal($where);
|
|
||||||
$page_total = ceil($total/$number);
|
|
||||||
$start = intval(($page-1)*$number);
|
|
||||||
|
|
||||||
// 获取列表
|
|
||||||
$data_params = array(
|
|
||||||
'm' => $start,
|
|
||||||
'n' => $number,
|
|
||||||
'where' => $where,
|
|
||||||
);
|
|
||||||
$data = GoodsService::GoodsFavorList($data_params);
|
|
||||||
|
|
||||||
// 返回数据
|
|
||||||
$result = [
|
|
||||||
'total' => $total,
|
|
||||||
'page_total' => $page_total,
|
|
||||||
'data' => $data['data'],
|
|
||||||
];
|
|
||||||
return json(DataReturn('success', 0, $result));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户商品收藏取消
|
|
||||||
* @author Devil
|
|
||||||
* @blog http://gong.gg/
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2018-07-17
|
|
||||||
* @desc description
|
|
||||||
*/
|
|
||||||
public function Cancel()
|
|
||||||
{
|
|
||||||
$params = $this->data_post;
|
|
||||||
$params['user'] = $this->user;
|
|
||||||
$ret = GoodsService::GoodsFavor($params);
|
|
||||||
return json($ret);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
@ -1,75 +0,0 @@
|
||||||
<?php
|
|
||||||
namespace app\api\controller;
|
|
||||||
|
|
||||||
use app\service\IntegralService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户积分管理
|
|
||||||
* @author Devil
|
|
||||||
* @blog http://gong.gg/
|
|
||||||
* @version 0.0.1
|
|
||||||
* @datetime 2016-12-01T21:51:08+0800
|
|
||||||
*/
|
|
||||||
class UserIntegral extends Common
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* [__construct 构造方法]
|
|
||||||
* @author Devil
|
|
||||||
* @blog http://gong.gg/
|
|
||||||
* @version 0.0.1
|
|
||||||
* @datetime 2016-12-03T12:39:08+0800
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
// 调用父类前置方法
|
|
||||||
parent::__construct();
|
|
||||||
|
|
||||||
// 是否登录
|
|
||||||
$this->Is_Login();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户积分列表
|
|
||||||
* @author Devil
|
|
||||||
* @blog http://gong.gg/
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2018-09-28
|
|
||||||
* @desc description
|
|
||||||
*/
|
|
||||||
public function Index()
|
|
||||||
{
|
|
||||||
// 参数
|
|
||||||
$params = $this->data_post;
|
|
||||||
$params['user'] = $this->user;
|
|
||||||
|
|
||||||
// 分页
|
|
||||||
$number = 10;
|
|
||||||
$page = max(1, isset($this->data_post['page']) ? intval($this->data_post['page']) : 1);
|
|
||||||
|
|
||||||
// 条件
|
|
||||||
$where = IntegralService::UserIntegralLogListWhere($params);
|
|
||||||
|
|
||||||
// 获取总数
|
|
||||||
$total = IntegralService::UserIntegralLogTotal($where);
|
|
||||||
$page_total = ceil($total/$number);
|
|
||||||
$start = intval(($page-1)*$number);
|
|
||||||
|
|
||||||
// 获取列表
|
|
||||||
$data_params = array(
|
|
||||||
'limit_start' => $start,
|
|
||||||
'limit_number' => $number,
|
|
||||||
'where' => $where,
|
|
||||||
);
|
|
||||||
$data = IntegralService::UserIntegralLogList($data_params);
|
|
||||||
|
|
||||||
// 返回数据
|
|
||||||
$result = [
|
|
||||||
'total' => $total,
|
|
||||||
'page_total' => $page_total,
|
|
||||||
'data' => $data['data'],
|
|
||||||
];
|
|
||||||
return json(DataReturn('success', 0, $result));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
Loading…
Reference in New Issue