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
cfa9149c
Commit
cfa9149c
authored
Oct 10, 2019
by
李尚科
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
credit fix
parent
838d8d50
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
callrisk.js
app/service/credit/callrisk.js
+6
-6
order.js
app/service/credit/order.js
+3
-1
No files found.
app/service/credit/callrisk.js
View file @
cfa9149c
...
...
@@ -732,22 +732,22 @@ class CallriskService extends Service {
const
call_behavior
=
yys_report_data
.
data
.
call_behavior_analysis
;
const
call_behavior_report
=
{
report_id
,
// active_call_count: call_behavior.active_call
_count,
// passive_call_count: call_behavior.passive_call
_count,
// each_call_count: call_behavior.each_call
_count,
active_call_count
:
call_behavior
.
active_call_number
_count
,
passive_call_count
:
call_behavior
.
passive_call_number
_count
,
each_call_count
:
call_behavior
.
mutual_call_number
_count
,
silence_count_3day
:
call_behavior
.
silence_count_3day
,
silence_time_3day
:
call_behavior
.
silence_time_3day
,
silence_time_rate_3day
:
call_behavior
.
silence_time_rate_3day
,
maximum_active_call_count
:
call_behavior
.
maximum_active_call_count
,
maximum_active_call_number
:
call_behavior
.
maximum_active_call_number
,
// maximum_active_call_city: call_behavior.maximum_active_call_city
,
maximum_active_call_city
:
call_behavior
.
maximum_active_call_location
,
maximum_passive_call_count
:
call_behavior
.
maximum_passive_call_count
,
maximum_passive_call_number
:
call_behavior
.
maximum_passive_call_number
,
// maximum_passive_call_city: call_behavior.maximum_passive_call_city
,
maximum_passive_call_city
:
call_behavior
.
maximum_passive_call_location
,
maximum_call_time
:
call_behavior
.
maximum_call_time
,
maximum_call_time_number
:
call_behavior
.
maximum_call_time_number
,
// maximum_call_time_city: call_behavior.maximum_call_time_city
,
maximum_call_time_city
:
call_behavior
.
maximum_call_time_location
,
}
const
call_behavior_id
=
await
ctx
.
prometheusModel
.
CreditCallriskCallBehavior
.
add
(
call_behavior_report
);
...
...
app/service/credit/order.js
View file @
cfa9149c
...
...
@@ -122,12 +122,14 @@ class OrderService extends Service {
const
slag
=
TypeConfigFlip
[
type
];
const
preferential
=
await
ctx
.
service
.
credit
.
preferential
.
getPreferential
(
slag
);
let
preferential_price
=
0
;
let
preferential_id
=
0
;
if
(
preferential
&&
preferential
.
id
)
{
preferential_price
=
preferential
.
price
;
preferential_id
=
preferential
.
id
;
}
const
price
=
(
order
.
price
-
preferential_price
).
toFixed
(
2
);
await
ctx
.
prometheusModel
.
CreditOrder
.
update
({
final_price
:
price
,
preferential_price
,
preferential_id
:
preferential
.
id
},
{
where
:
{
id
,
pay_status
:
0
}
});
await
ctx
.
prometheusModel
.
CreditOrder
.
update
({
final_price
:
price
,
preferential_price
,
preferential_id
:
preferential
_
id
},
{
where
:
{
id
,
pay_status
:
0
}
});
return
price
;
...
...
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