Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
5
51business
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
方斌
51business
Commits
b4c1716a
Commit
b4c1716a
authored
Aug 07, 2020
by
任国军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add has_address
parent
541614c1
Pipeline
#27197
passed with stage
in 5 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
courseV5Class.js
app/model/class/v5/courseV5Class.js
+1
-0
institution.js
app/service/course/v5/institution.js
+1
-1
user.js
app/service/course/v5/user.js
+2
-2
No files found.
app/model/class/v5/courseV5Class.js
View file @
b4c1716a
...
...
@@ -36,6 +36,7 @@ module.exports = app => {
pay_url
:
STRING
,
sub_title
:
STRING
,
pay_count
:
INTEGER
,
has_address
:
INTEGER
,
sort
:
INTEGER
,
status
:
INTEGER
,
is_deleted
:
INTEGER
,
...
...
app/service/course/v5/institution.js
View file @
b4c1716a
...
...
@@ -111,7 +111,7 @@ class InstitutionSubService extends Service {
// 课程详情
async
getClassInfo
(
id
)
{
const
{
ctx
}
=
this
;
const
attributes
=
[
'id'
,
'institution_id'
,
'name'
,
'logo'
,
'age'
,
'price'
,
'price_type'
,
'mode'
,
'time'
,
'class_amount'
,
'multi_classes'
,
'cycle'
,
'description'
,
'button_style'
,
'button_text'
,
'button_type'
,
'button_sub_text'
,
'button_url'
,
'button_pay_text'
,
'top_price'
,
'pay_price'
,
'sub_title'
,
'pay_count'
,
'sort'
,
'pay_url'
];
const
attributes
=
[
'id'
,
'institution_id'
,
'name'
,
'logo'
,
'age'
,
'price'
,
'price_type'
,
'mode'
,
'time'
,
'class_amount'
,
'multi_classes'
,
'cycle'
,
'description'
,
'button_style'
,
'button_text'
,
'button_type'
,
'button_sub_text'
,
'button_url'
,
'button_pay_text'
,
'top_price'
,
'pay_price'
,
'sub_title'
,
'pay_count'
,
'sort'
,
'pay_url'
,
'has_address'
];
const
classInfo
=
await
ctx
.
classModel
.
V5
.
CourseV5Class
.
findOne
({
where
:
{
id
,
status
:
1
,
is_deleted
:
0
},
attributes
,
raw
:
true
});
if
(
ctx
.
isEmpty
(
classInfo
))
{
ctx
.
failed
(
'数据不存在'
);
...
...
app/service/course/v5/user.js
View file @
b4c1716a
...
...
@@ -409,7 +409,7 @@ class UserService extends Service {
class_id
:
id
,
pay
:
classInfo
.
pay_price
,
type
:
1
,
address
:
JSON
.
stringify
(
address
)
,
address
,
columns
:
JSON
.
stringify
(
columns
),
};
if
(
classInfo
.
button_type
===
3
)
{
...
...
@@ -419,7 +419,7 @@ class UserService extends Service {
order
=
await
ctx
.
classModel
.
V5
.
CourseUserOrder
.
findOne
({
where
:
{
user_uuid
:
userUuid
,
class_id
:
id
,
is_deleted
:
0
},
order
:
[[
'id'
,
'asc'
]]
});
}
await
ctx
.
classModel
.
V5
.
CourseUserOrder
.
update
({
pay
:
classInfo
.
pay_price
,
order_no
:
orderNo
,
type
:
1
,
address
:
JSON
.
stringify
(
address
)
,
columns
:
JSON
.
stringify
(
columns
),
status
:
0
},
{
where
:
{
id
:
order
.
id
}
});
await
ctx
.
classModel
.
V5
.
CourseUserOrder
.
update
({
pay
:
classInfo
.
pay_price
,
order_no
:
orderNo
,
type
:
1
,
address
,
columns
:
JSON
.
stringify
(
columns
),
status
:
0
},
{
where
:
{
id
:
order
.
id
}
});
let
response
=
await
this
.
service
.
course
.
v5
.
wechat
.
pay
({
pay
:
order
.
pay
,
order_no
:
orderNo
,
body
:
`趣选课-订单
${
orderNo
}
`
});
response
=
await
ctx
.
helper
.
xmlTojson
(
response
);
...
...
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