Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wds12580
ShopXO
提交
9d2a9fc0
ShopXO
项目概览
wds12580
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9d2a9fc0
编写于
12月 28, 2018
作者:
G
gongfuxiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug
上级
85d32fef
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
410 addition
and
0 deletion
+410
-0
application/api/controller/Ordernotify.php
application/api/controller/Ordernotify.php
+45
-0
application/api/controller/Useraddress.php
application/api/controller/Useraddress.php
+111
-0
application/api/controller/Usergoodsbrowse.php
application/api/controller/Usergoodsbrowse.php
+90
-0
application/api/controller/Usergoodsfavor.php
application/api/controller/Usergoodsfavor.php
+89
-0
application/api/controller/Userintegral.php
application/api/controller/Userintegral.php
+75
-0
未找到文件。
application/api/controller/Ordernotify.php
0 → 100755
浏览文件 @
9d2a9fc0
<?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'
);
}
}
?>
\ No newline at end of file
application/api/controller/Useraddress.php
0 → 100644
浏览文件 @
9d2a9fc0
<?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
);
}
}
?>
\ No newline at end of file
application/api/controller/Usergoodsbrowse.php
0 → 100755
浏览文件 @
9d2a9fc0
<?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
);
}
}
?>
\ No newline at end of file
application/api/controller/Usergoodsfavor.php
0 → 100755
浏览文件 @
9d2a9fc0
<?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
);
}
}
?>
\ No newline at end of file
application/api/controller/Userintegral.php
0 → 100755
浏览文件 @
9d2a9fc0
<?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
));
}
}
?>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录