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
f3000da9
Commit
f3000da9
authored
Jul 03, 2025
by
wangzhengwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cert
parent
822b35bc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
6 deletions
+15
-6
Settled.php
app/api/controller/Settled.php
+4
-4
CertOrder.php
app/api/controller/cert/CertOrder.php
+10
-1
PayService.php
app/api/service/PayService.php
+1
-1
No files found.
app/api/controller/Settled.php
View file @
f3000da9
...
...
@@ -41,7 +41,7 @@ class Settled extends BaseController
$user
=
UserService
::
getUserInfo
(
$token
);
if
(
!
$user
)
{
return
$this
->
returnMsg
(
'登陆过期'
);
return
$this
->
returnMsg
(
'登陆过期'
,
201
);
}
// if (schoolModel::where('user_id', $user['id'])->count())
...
...
@@ -83,7 +83,7 @@ class Settled extends BaseController
$user
=
UserService
::
getUserInfo
(
$token
);
if
(
!
$user
)
{
return
$this
->
returnMsg
(
'登陆过期'
,
0
);
return
$this
->
returnMsg
(
'登陆过期'
,
201
);
}
// if (businessModel::where('user_id', $user['id'])->count())
...
...
@@ -120,7 +120,7 @@ class Settled extends BaseController
$user
=
UserService
::
getUserInfo
(
$token
);
if
(
!
$user
)
{
return
$this
->
returnMsg
(
'登陆过期'
,
0
);
return
$this
->
returnMsg
(
'登陆过期'
,
201
);
}
$data
=
schoolModel
::
where
([
'user_id'
=>
$user
[
'id'
]])
...
...
@@ -144,7 +144,7 @@ class Settled extends BaseController
$user
=
UserService
::
getUserInfo
(
$token
);
if
(
!
$user
)
{
return
$this
->
returnMsg
(
'登陆过期'
,
0
);
return
$this
->
returnMsg
(
'登陆过期'
,
201
);
}
$data
=
businessModel
::
where
([
'user_id'
=>
$user
[
'id'
]])
...
...
app/api/controller/cert/CertOrder.php
View file @
f3000da9
...
...
@@ -44,8 +44,17 @@ class CertOrder extends BaseController
$where
=
[
'is_del'
=>
0
,
'user_id'
=>
$data
[
'user_id'
],
'cert_id'
=>
$data
[
'cert_id'
]];
$count
=
OrderModel
::
where
(
$where
)
->
count
();
if
(
$count
>
0
)
{
//
return $this->returnMsg('请勿重复提交');
return
$this
->
returnMsg
(
'请勿重复提交'
);
}
//免费证书
$certData
=
\app\model\Cert
::
where
(
'id'
,
$data
[
'cert_id'
])
->
find
();
if
(
$certData
[
'price'
]
<=
0
)
{
//申请中
$data
[
'status'
]
=
1
;
}
$enrollCert
=
OrderModel
::
create
(
$data
);
return
$this
->
returnMsg
(
'success'
,
1
,
$enrollCert
);
...
...
app/api/service/PayService.php
View file @
f3000da9
...
...
@@ -53,7 +53,7 @@ class PayService
if
(
$orderType
==
self
::
ORDER_TYPE_COURSE
)
{
$store
=
Db
::
name
(
'course'
)
->
where
(
'id'
,
$orderId
)
->
field
(
'title,user_id,id'
)
->
find
();
}
else
{
$store
=
Db
::
name
(
'cert'
)
->
where
(
'id'
,
$orderId
)
->
field
(
'title,
user_id,
id'
)
->
find
();
$store
=
Db
::
name
(
'cert'
)
->
where
(
'id'
,
$orderId
)
->
field
(
'title,id'
)
->
find
();
}
if
(
empty
(
$store
))
{
...
...
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