Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yizhi_server
Project
Project
Details
Activity
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
data_server
yizhi_server
Commits
343c3cb5
Commit
343c3cb5
authored
Jun 17, 2019
by
姜登
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user判断
parent
3ecb44c6
Pipeline
#8977
passed with stage
in 3 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
0 deletions
+4
-0
price.js
app/controller/price.js
+1
-0
remission.js
app/controller/remission.js
+1
-0
user.js
app/controller/user.js
+2
-0
No files found.
app/controller/price.js
View file @
343c3cb5
...
...
@@ -41,6 +41,7 @@ class PriceController extends Controller {
async
index
()
{
const
{
ctx
,
service
}
=
this
;
ctx
.
validate
(
this
.
indexRule
,
ctx
.
query
);
await
service
.
user
.
getUserInfo
();
const
ret
=
await
service
.
userDetail
.
findAll
(
this
.
model
,
{
appkey
:
ctx
.
query
.
appKey
},
[
'pay_type'
,
'price'
,
'start_time'
,
'end_time'
,
'operator'
],
ctx
.
pagination
);
const
total
=
await
service
.
userDetail
.
count
(
this
.
model
,
{
appkey
:
ctx
.
query
.
appKey
});
ctx
.
success
({
data
:
ret
,
total
,
...
ctx
.
pagination
});
...
...
app/controller/remission.js
View file @
343c3cb5
...
...
@@ -32,6 +32,7 @@ class RemissionController extends Controller {
async
index
()
{
const
{
ctx
,
service
}
=
this
;
ctx
.
validate
(
this
.
indexRule
,
ctx
.
query
);
await
service
.
user
.
getUserInfo
();
const
ret
=
await
service
.
userDetail
.
findAll
(
this
.
model
,
{
appkey
:
ctx
.
query
.
appKey
},
[
'appkey'
,
'start_time'
,
'count'
,
'operator'
],
ctx
.
pagination
);
const
total
=
await
service
.
userDetail
.
count
(
this
.
model
,
{
appkey
:
ctx
.
query
.
appKey
});
ctx
.
success
({
data
:
ret
,
total
,
...
ctx
.
pagination
});
...
...
app/controller/user.js
View file @
343c3cb5
...
...
@@ -74,6 +74,7 @@ class UserController extends Controller {
async
update
()
{
const
{
ctx
,
service
}
=
this
;
ctx
.
validate
(
this
.
updateRule
,
ctx
.
request
.
body
);
await
service
.
user
.
getUserInfo
();
const
{
id
}
=
ctx
.
params
;
const
{
status
}
=
ctx
.
request
.
body
;
await
service
.
user
.
update
({
user_id
:
id
},
{
status
});
...
...
@@ -83,6 +84,7 @@ class UserController extends Controller {
async
serviceList
()
{
const
{
ctx
,
service
}
=
this
;
ctx
.
validate
(
this
.
serviceRule
,
ctx
.
query
);
await
service
.
user
.
getUserInfo
();
const
{
user_id
}
=
ctx
.
query
;
const
ret
=
await
service
.
user
.
serviceList
({
user_id
});
ctx
.
success
(
ret
);
...
...
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