Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
projecttwo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangtao
projecttwo
Commits
2351f125
Commit
2351f125
authored
Jul 04, 2025
by
wangtao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
学习资料
parent
bae0637f
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
152 additions
and
43 deletions
+152
-43
Index.php
app/admin/controller/Index.php
+1
-0
Course.php
app/admin/controller/course/Course.php
+2
-1
Course.php
app/api/controller/Course.php
+3
-2
User.php
app/api/controller/User.php
+5
-1
Student.php
app/api/controller/manage/Student.php
+2
-0
User.php
app/api/controller/mine/User.php
+68
-23
ProjectPut.php
app/api/controller/project/ProjectPut.php
+1
-1
UserValidate.php
app/api/validate/UserValidate.php
+34
-2
Jobtask.php
app/job/Jobtask.php
+3
-6
Course.php
app/model/Course.php
+9
-0
ShCourse.php
app/model/ShCourse.php
+8
-0
User.php
app/model/project/User.php
+2
-1
course.php
app/subscribe/course.php
+4
-5
Units.php
vendor/nesbot/carbon/src/Carbon/Traits/Units.php
+10
-1
No files found.
app/admin/controller/Index.php
View file @
2351f125
...
...
@@ -56,6 +56,7 @@ class Index extends AdminBase
return
$this
->
fetch
(
'welcome'
);
}
$business_dsh_count
=
Db
::
name
(
'business'
)
->
where
([
'is_del'
=>
'0'
,
'status'
=>
0
])
->
count
();
//企业资料待审核
$school_dsh_count
=
Db
::
name
(
'school'
)
->
where
([
'is_del'
=>
'0'
,
'status'
=>
0
])
->
count
();
//学校资料待审核
$course_dsh_count
=
Db
::
name
(
'sh_course'
)
->
where
([
'is_del'
=>
'0'
,
'status'
=>
1
])
->
count
();
//课程待审核
...
...
app/admin/controller/course/Course.php
View file @
2351f125
...
...
@@ -120,13 +120,14 @@ class Course extends AdminBase
$shstatus
=
2
;
}
$updatedata
[
'status'
]
=
$shstatus
;
$updatedata
[
'sh_time'
]
=
time
();
$updatedata
[
'sh_error_desc'
]
=
$errordesc
;
$result
=
$this
->
course
->
where
(
'id'
,
$post
[
'id'
])
->
update
(
$updatedata
);
if
(
$result
)
{
$courseinfo
=
Db
::
name
(
'course'
)
->
where
(
'id'
,
$post
[
'id'
])
->
field
(
'id,title,user_id'
)
->
find
();
$courseinfo
=
$this
->
course
->
where
(
'id'
,
$post
[
'id'
])
->
field
(
'id,title,user_id'
)
->
find
();
if
(
$post
[
'shstatus'
]
==
1
)
{
event
(
'Course'
,
[
'course_id'
=>
$post
[
'id'
],
'tasktype'
=>
'course'
,
'action'
=>
'shstatus'
]);
Mail
::
createmail
(
$courseinfo
[
'user_id'
],
"您的课程【"
.
$courseinfo
[
'title'
]
.
"】已审核通过"
);
...
...
app/api/controller/Course.php
View file @
2351f125
...
...
@@ -136,12 +136,13 @@ class Course extends BaseController
$data
=
$request
->
param
();
$token
=
$request
->
header
(
'token'
);
$userId
=
TokenService
::
verifyToken
(
$token
)[
'user_id'
]
??
0
;
$data
=
(
new
CourseModel
())
$data
2
=
(
new
CourseModel
())
// ->with(['getTeacher','getSections'=>['getCourseClass'],'getCourseClass'])
->
getCourseDetail
(
$data
[
'course_id'
],
$userId
);
CourseModel
::
where
(
'id'
,
$request
->
param
(
'course_id'
))
->
inc
(
'click'
)
->
update
([]);
event
(
'Course'
,
[
'course_id'
=>
$data
[
'course_id'
],
'tasktype'
=>
'course'
,
'action'
=>
'courseupdateclick'
]);
//同步数据
return
$this
->
returnMsg
(
'success'
,
1
,
$data
);
return
$this
->
returnMsg
(
'success'
,
1
,
$data
2
);
}
...
...
app/api/controller/User.php
View file @
2351f125
...
...
@@ -227,14 +227,18 @@ class User extends BaseController
if
(
!
$user
)
{
return
$this
->
returnMsg
(
'用户不存在'
,
0
);
}
// 验证重置令牌
$storedToken
=
cache
(
'reset_token_'
.
$user
[
'id'
]);
if
(
!
$storedToken
||
$storedToken
!==
$data
[
'reset_token'
])
{
return
$this
->
returnMsg
(
'无效的重置令牌或已过期'
,
0
);
}
$update
[
'password'
]
=
md5
(
$data
[
'password'
]
.
$user
[
'salt'
]);
if
(
$update
[
'password'
]
==
$user
[
'password'
]){
return
$this
->
returnMsg
(
'与原密码一样'
);
}
userModel
::
where
([
'id'
=>
$user
[
'id'
]])
->
update
(
$update
);
// 清除重置令牌
...
...
app/api/controller/manage/Student.php
View file @
2351f125
...
...
@@ -67,6 +67,7 @@ class Student extends BaseController
'password'
=>
$password
,
'salt'
=>
$salt
,
'school_user_id'
=>
\request
()
->
userId
,
'headico'
=>
vconfig
(
'default_user'
)
??
null
,
];
$userinfo
=
User
::
create
(
$datauser
);
$user_id
=
$userinfo
->
id
;
...
...
@@ -105,6 +106,7 @@ class Student extends BaseController
$pageSize
=
$request
->
param
(
'pageSize'
,
10
);
$list
=
StudentModel
::
where
(
$where
)
->
where
(
$map
)
->
order
(
'createtime desc'
)
->
with
([
'userprofile'
])
->
append
([
'sex_text'
,
'birthday_text'
])
->
paginate
([
'page'
=>
$page
,
...
...
app/api/controller/mine/User.php
View file @
2351f125
...
...
@@ -53,8 +53,7 @@ class User extends BaseController
}
$user
[
'info_status'
]
=
$info_status
;
if
(
$user
[
'role'
]
==
1
)
{
if
(
$user
[
'role'
]
==
1
)
{
// 获取当前月份和上个月的起始和结束时间戳
$currentMonthStart
=
strtotime
(
date
(
'Y-m-01 00:00:00'
));
$currentMonthEnd
=
strtotime
(
date
(
'Y-m-t 23:59:59'
));
...
...
@@ -64,33 +63,33 @@ class User extends BaseController
// 本月收入 (类型为0-项目结算和2-后台手动增加)
$currentMonthIncome
=
UserMoneyLog
::
where
(
'user_id'
,
$user
[
'id'
])
->
whereIn
(
'type'
,
[
0
,
2
])
->
where
(
'money_type'
,
0
)
->
where
(
'money_type'
,
0
)
->
whereBetween
(
'createtime'
,
[
$currentMonthStart
,
$currentMonthEnd
])
->
sum
(
'money'
);
$user
[
'financial'
][
'current_month_income'
]
=
number_format
(
$currentMonthIncome
,
2
);
$user
[
'financial'
][
'current_month_income'
]
=
number_format
(
$currentMonthIncome
,
2
);
// 本月支出 (类型为1-提现)
$currentMonthExpense
=
abs
(
UserMoneyLog
::
where
(
'user_id'
,
$user
[
'id'
])
->
whereIn
(
'type'
,
[
1
])
->
where
(
'money_type'
,
0
)
->
where
(
'money_type'
,
0
)
->
whereBetween
(
'createtime'
,
[
$currentMonthStart
,
$currentMonthEnd
])
->
sum
(
'money'
));
$user
[
'financial'
][
'current_month_expense'
]
=
number_format
(
$currentMonthExpense
,
2
);
$user
[
'financial'
][
'current_month_expense'
]
=
number_format
(
$currentMonthExpense
,
2
);
// 上月收入
$lastMonthIncome
=
UserMoneyLog
::
where
(
'user_id'
,
$user
[
'id'
])
->
whereIn
(
'type'
,
[
0
,
2
])
->
where
(
'money_type'
,
0
)
->
where
(
'money_type'
,
0
)
->
whereBetween
(
'createtime'
,
[
$lastMonthStart
,
$lastMonthEnd
])
->
sum
(
'money'
);
$user
[
'financial'
][
'lastMonthIncome'
]
=
number_format
(
$lastMonthIncome
,
2
);
$user
[
'financial'
][
'lastMonthIncome'
]
=
number_format
(
$lastMonthIncome
,
2
);
// 上月支出
$lastMonthExpense
=
abs
(
UserMoneyLog
::
where
(
'user_id'
,
$user
[
'id'
])
->
whereIn
(
'type'
,
[
1
])
->
where
(
'money_type'
,
0
)
->
where
(
'money_type'
,
0
)
->
whereBetween
(
'createtime'
,
[
$lastMonthStart
,
$lastMonthEnd
])
->
sum
(
'money'
));
$user
[
'financial'
][
'lastMonthExpense'
]
=
number_format
(
$lastMonthExpense
,
2
);
$user
[
'financial'
][
'lastMonthExpense'
]
=
number_format
(
$lastMonthExpense
,
2
);
// 计算较上月百分比
...
...
@@ -131,15 +130,17 @@ class User extends BaseController
// if (UserAccount::where(['user_id' => $request->userId, 'is_del' => 0])->count()) {
// return $this->returnMsg('请勿重复提交');
// }
$data
=
$request
->
param
();
$zfbinfo
=
UserAccount
::
where
([
'user_id'
=>
$request
->
userId
,
'is_del'
=>
0
])
->
find
();
$data
[
'type'
]
=
0
;
$data
[
'account'
]
=
$data
[
'zfb'
];
$data
[
'user_id'
]
=
$request
->
userId
;
unset
(
$data
[
'zfb'
]);
$res
=
UserAccount
::
create
(
$data
);
if
(
$zfbinfo
){
$res
=
UserAccount
::
where
(
'user_id'
,
$request
->
userId
)
->
update
(
$data
);
}
else
{
$res
=
UserAccount
::
create
(
$data
);
}
return
$this
->
returnMsg
(
'操作成功'
,
1
,
$res
);
...
...
@@ -160,26 +161,65 @@ class User extends BaseController
return
$this
->
returnMsg
(
'验证码错误'
);
}
$is_exit
=
userModel
::
where
([
'mobile'
=>
$data
[
'mobile'
]])
->
where
(
'is_del'
,
0
)
->
count
();
if
(
$is_exit
)
{
return
$this
->
returnMsg
(
'手机号已存在'
);
}
$res
=
UserService
::
updateUserInfo
(
'mobile'
,
$data
[
'mobile'
]);
return
$this
->
returnMsg
(
'操作成功'
,
1
,
$res
);
}
public
function
realUser
(
Request
$request
)
//第一步验证手机
public
function
editMobileone
(
Request
$request
)
{
$vo
=
(
new
UserValidate
())
->
goCheck
([
'
realname'
,
'idcard'
,
'idcard_q'
,
'idcard_h
'
]);
$vo
=
(
new
UserValidate
())
->
goCheck
([
'
code
'
]);
if
(
$vo
!==
true
)
{
return
$vo
;
}
if
(
UserSmrz
::
where
([
'user_id'
=>
$request
->
userId
,
'is_del'
=>
0
])
->
count
())
{
return
$this
->
returnMsg
(
'请勿重复提交'
);
}
$data
=
$request
->
param
();
$userInfo
=
UserModel
::
where
([
'id'
=>
$request
->
userId
,
'is_del'
=>
0
])
->
field
(
'id,mobile'
)
->
find
();
//check sms
$checkSmsCode
=
UtilService
::
checkSmsCode
(
$userInfo
[
'mobile'
],
$data
[
'code'
]);
if
(
!
$checkSmsCode
)
{
return
$this
->
returnMsg
(
'验证码错误'
);
}
return
$this
->
returnMsg
(
'操作成功'
,
1
);
$data
[
'user_id'
]
=
$request
->
userId
;
}
public
function
realUser
(
Request
$request
)
{
$vo
=
(
new
UserValidate
())
->
goCheck
([
'realname'
,
'idcard'
,
'idcard_q'
,
'idcard_h'
]);
if
(
$vo
!==
true
)
{
return
$vo
;
}
$data
=
$request
->
param
();
$smrzinfo
=
UserSmrz
::
where
([
'user_id'
=>
$request
->
userId
])
->
find
();
if
(
$smrzinfo
)
{
if
(
$smrzinfo
[
'status'
]
==
2
)
{
return
$this
->
returnMsg
(
'已认证'
);
}
$data
[
'status'
]
=
2
;
$res
=
UserSmrz
::
update
(
$data
,
[
'user_id'
=>
$request
->
userId
]);
}
else
{
$data
[
'user_id'
]
=
$request
->
userId
;
$data
[
'status'
]
=
2
;
$res
=
UserSmrz
::
create
(
$data
);
}
$res
=
UserSmrz
::
create
(
$data
);
// if (UserSmrz::where(['user_id' => $request->userId, 'is_del' => 0, 'status' => 2])->count()) {
// return $this->returnMsg('请勿重复提交');
// }
//
// $data = $request->param();
//
// $data['user_id'] = $request->userId;
//
// $res = UserSmrz::create($data);
return
$this
->
returnMsg
(
'操作成功'
,
1
,
$res
);
...
...
@@ -200,6 +240,10 @@ class User extends BaseController
return
$this
->
returnMsg
(
'余额不足'
);
}
$smrzstatus
=
UserSmrz
::
where
([
'user_id'
=>
$request
->
userId
])
->
value
(
'status'
);
if
(
$smrzstatus
!=
2
)
{
return
$this
->
returnMsg
(
'请先实名认证'
);
}
$count
=
UserMoneyLog
::
where
([
'user_id'
=>
$userId
,
'type'
=>
1
])
->
whereBetween
(
'createtime'
,
[
strtotime
(
'today'
),
strtotime
(
'tomorrow'
)
-
1
])
...
...
@@ -239,7 +283,7 @@ class User extends BaseController
$page
=
$request
->
param
(
'page/d'
,
1
);
$pageSize
=
$request
->
param
(
'pageSize/d'
,
10
);
$list
=
Mail
::
where
(
'user_id'
,
$request
->
userId
)
->
order
(
'createtime'
,
'desc'
)
$list
=
Mail
::
where
(
'user_id'
,
$request
->
userId
)
->
order
(
'createtime'
,
'desc'
)
->
paginate
([
'page'
=>
$page
,
'list_rows'
=>
$pageSize
...
...
@@ -358,9 +402,10 @@ class User extends BaseController
$data
[
'old_password'
]
=
md5
(
$data
[
'old_password'
]
.
$user
[
'salt'
]);
if
(
$data
[
'old_password'
]
!=
$user
[
'password'
])
{
return
$this
->
returnMsg
(
'密码不正确'
);
return
$this
->
returnMsg
(
'
旧密码
密码不正确'
);
}
userModel
::
where
(
'id'
,
$userId
)
->
update
([
'password'
=>
md5
(
$data
[
'password'
]
.
$user
[
'salt'
])]);
return
$this
->
returnMsg
(
'success'
,
1
);
...
...
app/api/controller/project/ProjectPut.php
View file @
2351f125
...
...
@@ -22,7 +22,7 @@ class ProjectPut extends BaseController
public
function
projectPut
(
Request
$request
)
{
$vo
=
(
new
ProjectValidate
())
->
goCheck
([
'project_id'
,
'user_desc'
,
'file_id_str'
]);
$vo
=
(
new
ProjectValidate
())
->
goCheck
([
'project_id'
,
'user_desc'
]);
if
(
$vo
!==
true
)
{
return
$vo
;
}
...
...
app/api/validate/UserValidate.php
View file @
2351f125
...
...
@@ -9,13 +9,13 @@ class UserValidate extends BaseValidate
protected
$rule
=
[
'name'
=>
'require'
,
'mobile'
=>
'require|mobile'
,
'password'
=>
'require'
,
'password'
=>
'require
|length:6,16
'
,
'code'
=>
'require'
,
'token'
=>
'require'
,
'str'
=>
'require'
,
'confirm_password'
=>
'require|checkPasswordEqual'
,
'password2'
=>
'require|checkPasswordEqual'
,
'updateField'
=>
'require|in:username,realname,sex,headico,description,email,qq,wechat'
,
'updateField'
=>
'require|in:username,realname,sex,headico,description,email,qq,wechat
|updateFieldchange
'
,
'updateValue'
=>
'require'
,
'zfb'
=>
'require'
,
'realname'
=>
'require'
,
...
...
@@ -37,6 +37,7 @@ class UserValidate extends BaseValidate
'mobile.require'
=>
'手机号不能为空'
,
'mobile.mobile'
=>
'手机号格式不正确'
,
'password.require'
=>
'密码必须'
,
'password.length'
=>
'密码长度必须是6-16位'
,
'code.require'
=>
'验证码必须'
,
'token.require'
=>
'token必须'
,
'str.require'
=>
'必填项不能为空'
,
...
...
@@ -44,6 +45,7 @@ class UserValidate extends BaseValidate
'password2.checkPasswordEqual'
=>
'两次输入的密码不一致'
,
'updateField.require'
=>
'必填项不能为空'
,
'updateField.in'
=>
'范围不合法'
,
'updateField.updateFieldchange'
=>
'提交信息长度或者格式错误'
,
'amount.require'
=>
'金额不能为空'
,
'amount.chenckAmount'
=>
'金额不合法'
,
];
...
...
@@ -75,4 +77,34 @@ class UserValidate extends BaseValidate
return
true
;
}
protected
function
updateFieldchange
(
$value
,
$rule
,
$data
)
{
if
(
$value
==
'email'
){
if
(
!
filter_var
(
$data
[
'updateValue'
],
FILTER_VALIDATE_EMAIL
))
{
return
false
;
}
}
elseif
(
$value
==
'username'
){
$len
=
mb_strlen
(
$data
[
'updateValue'
],
'UTF-8'
);
if
(
$len
>
20
){
return
false
;
}
}
elseif
(
$value
==
'realname'
){
$len
=
mb_strlen
(
$data
[
'updateValue'
],
'UTF-8'
);
if
(
$len
>
10
){
return
false
;
}
}
elseif
(
$value
==
'description'
){
$len
=
mb_strlen
(
$data
[
'updateValue'
],
'UTF-8'
);
if
(
$len
>
100
){
return
false
;
}
}
elseif
(
$value
==
'qq'
){
$len
=
mb_strlen
(
$data
[
'updateValue'
],
'UTF-8'
);
if
(
$len
>
11
){
return
false
;
}
}
return
true
;
}
}
\ No newline at end of file
app/job/Jobtask.php
View file @
2351f125
...
...
@@ -67,9 +67,7 @@ class Jobtask
$courseinfo
=
ShCourse
::
where
(
'id'
,
$data
[
'course_id'
])
->
find
();
$is_cz
=
CourseModel
::
where
(
'id'
,
$data
[
'course_id'
])
->
count
();
if
(
$is_cz
>
0
)
{
unset
(
$courseinfo
[
'click'
]);
unset
(
$courseinfo
[
'tvclick'
]);
CourseModel
::
update
(
$courseinfo
);
CourseModel
::
update
(
$courseinfo
,[
'id'
=>
$data
[
'course_id'
]]);
}
else
{
CourseModel
::
create
(
$courseinfo
);
//添加课程
}
...
...
@@ -125,9 +123,8 @@ class Jobtask
}
elseif
(
$data
[
'action'
]
==
'courseupdateclick'
)
{
//更新销量阅读量
$courseinfo
=
CourseModel
::
field
(
'id,click,tvclick'
)
->
where
(
'id'
,
$data
[
'course_id'
])
->
find
();
ShCourse
::
update
(
$courseinfo
);
$courseinfo
=
Db
::
name
(
'course'
)
->
field
(
'click,tvclick'
)
->
where
(
'id'
,
$data
[
'course_id'
])
->
find
();
Db
::
name
(
'sh_course'
)
->
where
(
'id'
,
$data
[
'course_id'
])
->
update
(
$courseinfo
);
}
...
...
app/model/Course.php
View file @
2351f125
...
...
@@ -22,6 +22,15 @@ use think\Model;
class
Course
extends
Model
{
// protected $type = [
// 'is_hot'=>'integer',
// 'tvclick'=>'integer',
// 'click'=>'integer',
// 'is_sell'=>'integer',
// 'is_tj'=>'integer',
// 'is_zb'=>'integer'
// ];
/**获取推荐课程列表
*/
public
function
getRecommendList
(
$category_id
,
$page
,
$pageSize
)
...
...
app/model/ShCourse.php
View file @
2351f125
...
...
@@ -21,6 +21,14 @@ use think\Model;
class
ShCourse
extends
Model
{
// protected $type = [
// 'is_hot'=>'integer',
// 'tvclick'=>'integer',
// 'click'=>'integer',
// 'is_sell'=>'integer',
// 'is_tj'=>'integer',
// 'is_zb'=>'integer'
// ];
public
function
getCreatetimeAttr
(
$value
)
{
...
...
app/model/project/User.php
View file @
2351f125
...
...
@@ -47,6 +47,7 @@ class User extends Model
{
return
$this
->
hasOne
(
UserSmrz
::
class
,
'user_id'
,
'id'
)
->
where
(
'is_del'
,
0
)
->
where
(
'status'
,
2
)
->
field
(
'id,realname,user_id,idcard'
);
}
//获取头像
...
...
@@ -110,7 +111,7 @@ class User extends Model
//实名信息
public
function
userReal
()
{
return
$this
->
hasOne
(
UserSmrz
::
class
,
'user_id'
,
'id'
)
->
where
(
'is_del'
,
0
);
return
$this
->
hasOne
(
UserSmrz
::
class
,
'user_id'
,
'id'
)
->
where
(
'is_del'
,
0
)
->
where
(
'status'
,
2
)
;
}
...
...
app/subscribe/course.php
View file @
2351f125
...
...
@@ -43,9 +43,7 @@ class course
$courseinfo
=
ShCourse
::
where
(
'id'
,
$data
[
'course_id'
])
->
find
();
$is_cz
=
CourseModel
::
where
(
'id'
,
$data
[
'course_id'
])
->
count
();
if
(
$is_cz
>
0
)
{
unset
(
$courseinfo
[
'click'
]);
unset
(
$courseinfo
[
'tvclick'
]);
CourseModel
::
update
(
$courseinfo
);
CourseModel
::
update
(
$courseinfo
,[
'id'
=>
$data
[
'course_id'
]]);
}
else
{
CourseModel
::
create
(
$courseinfo
);
//添加课程
}
...
...
@@ -101,8 +99,9 @@ class course
}
elseif
(
$data
[
'action'
]
==
'courseupdateclick'
)
{
//更新销量阅读量
$courseinfo
=
CourseModel
::
field
(
'id,click,tvclick'
)
->
where
(
'id'
,
$data
[
'course_id'
])
->
find
();
ShCourse
::
update
(
$courseinfo
);
$courseinfo
=
Db
::
name
(
'course'
)
->
field
(
'click,tvclick'
)
->
where
(
'id'
,
$data
[
'course_id'
])
->
find
();
Db
::
name
(
'sh_course'
)
->
where
(
'id'
,
$data
[
'course_id'
])
->
update
(
$courseinfo
);
}
...
...
vendor/nesbot/carbon/src/Carbon/Traits/Units.php
View file @
2351f125
...
...
@@ -158,9 +158,18 @@ trait Units
}
$seconds
=
(
int
)
$value
;
// $microseconds = (int) round(
// (abs($value) - abs($seconds)) * ($value < 0 ? -1 : 1) * static::MICROSECONDS_PER_SECOND,
// );
// 确保所有值都是数值类型
$value
=
is_numeric
(
$value
)
?
(
float
)
$value
:
0.0
;
$seconds
=
is_numeric
(
$seconds
)
?
(
float
)
$seconds
:
0.0
;
$microseconds
=
(
int
)
round
(
(
abs
(
$value
)
-
abs
(
$seconds
))
*
(
$value
<
0
?
-
1
:
1
)
*
static
::
MICROSECONDS_PER_SECOND
,
(
abs
(
$value
)
-
abs
(
$seconds
))
*
(
$value
<
0
?
-
1
:
1
)
*
static
::
MICROSECONDS_PER_SECOND
);
$date
=
$this
->
setTimestamp
(
$this
->
getTimestamp
()
+
$seconds
);
return
$microseconds
?
$date
->
addUTCUnit
(
'microsecond'
,
$microseconds
)
:
$date
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment