Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
44abe0d8
Commit
44abe0d8
authored
Apr 21, 2021
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
7f8336d9
7e44a453
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
89 additions
and
0 deletions
+89
-0
center-channel/app/base/api/impl/action/opNeed.js
+3
-0
center-channel/app/base/api/impl/opaction/order.js
+3
-0
center-channel/app/base/service/impl/utilsSve/utilsOpNeedSve.js
+41
-0
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+42
-0
No files found.
center-channel/app/base/api/impl/action/opNeed.js
View file @
44abe0d8
...
...
@@ -60,6 +60,9 @@ class OpNeed extends APIBase {
case
"getStatisticsByProduct"
:
opResult
=
await
this
.
utilsOpNeedSve
.
getStatisticsByProduct
(
pobj
);
break
;
case
"getStatisticsByChannel"
:
opResult
=
await
this
.
utilsOpNeedSve
.
getStatisticsByChannel
(
pobj
);
break
;
case
"getNeedProductType"
:
opResult
=
await
this
.
utilsOpNeedSve
.
getNeedProductType
(
pobj
);
break
;
...
...
center-channel/app/base/api/impl/opaction/order.js
View file @
44abe0d8
...
...
@@ -51,6 +51,9 @@ class ProductAPI extends WEBBase {
case
"getOrderStatisticsByProduct"
:
opResult
=
await
this
.
utilsOrderSve
.
getOrdersStatisticsByProduct
(
pobj
);
break
;
case
"getOrderStatisticsByChannel"
:
opResult
=
await
this
.
utilsOrderSve
.
getOrdersStatisticsByChannel
(
pobj
);
break
;
case
"getOrdersComparison"
:
opResult
=
await
this
.
utilsOrderSve
.
getOrdersComparison
(
pobj
);
break
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsOpNeedSve.js
View file @
44abe0d8
...
...
@@ -409,6 +409,47 @@ class UtilsOpNeedService extends AppServiceBase {
}
/**
* 需求统计(产品维度) 总数
* @param pobj
* @returns {Promise<void>}
*/
async
getStatisticsByChannel
(
pobj
){
let
url
=
this
.
centerOrderUrl
+
"action/opNeed/springBoard"
;
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
result
.
status
!=
0
){
return
system
.
getResultFail
(
-
1
);
}
let
data
=
result
.
data
;
let
temp
=
""
;
let
arr
=
[];
let
reArr
=
[];
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
){
if
((
temp
!=
data
[
i
].
uapp_id
&&
temp
!=
""
)){
let
obj
=
{
uapp_id
:
temp
,
data
:
arr
}
reArr
.
push
(
obj
);
arr
=
[];
}
let
dArr
=
{
typeCode
:
data
[
i
].
typeCode
,
count
:
data
[
i
].
count
}
arr
.
push
(
dArr
);
temp
=
data
[
i
].
uapp_id
;
if
(
i
==
data
.
length
-
1
){
let
obj
=
{
uapp_id
:
temp
,
data
:
arr
}
reArr
.
push
(
obj
);
}
}
return
system
.
getResultSuccess
(
reArr
);
}
/**
* 获取需求 的产品类型
* @param pobj
* @returns {Promise<void>}
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
44abe0d8
...
...
@@ -319,6 +319,47 @@ class UtilsOrderService extends AppServiceBase {
}
/**
* 需求统计(产品、渠道维度)
* @param pobj
* @returns {Promise<void>}
*/
async
getOrdersStatisticsByChannel
(
pobj
)
{
let
url
=
this
.
centerOrderUrl
+
"action/order/springBoard"
;
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
result
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
1
);
}
let
data
=
result
.
data
;
let
temp
=
""
;
let
arr
=
[];
let
reArr
=
[];
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
((
temp
!=
data
[
i
].
uapp_id
&&
temp
!=
""
))
{
let
obj
=
{
uapp_id
:
temp
,
data
:
arr
}
reArr
.
push
(
obj
);
arr
=
[];
}
let
dArr
=
{
pathName
:
data
[
i
].
pathName
,
count
:
data
[
i
].
count
}
arr
.
push
(
dArr
);
temp
=
data
[
i
].
uapp_id
;
if
(
i
==
data
.
length
-
1
)
{
let
obj
=
{
uapp_id
:
temp
,
data
:
arr
}
reArr
.
push
(
obj
);
}
}
return
system
.
getResultSuccess
(
reArr
);
}
/**
* 订单数量对比
* @param pobj
* @returns {Promise<void>}
...
...
@@ -1203,6 +1244,7 @@ class UtilsOrderService extends AppServiceBase {
channel_nickname
:
opOrderResult
.
data
.
order_info
.
channelUserId
};
opOrderResult
.
data
.
orderNo
=
params
.
orderNo
;
opOrderResult
.
data
.
idempotentNo
=
opOrderResult
.
data
.
order_info
.
channelOrderNo
opOrderResult
.
data
.
order_info
.
pay_flow_no
=
params
.
trade_no
||
""
;
// 2020 0704 lin 新增 推送fq必填字段
opOrderResult
.
data
.
order_info
.
pay_channel
=
params
.
payType
||
""
;
//付款方式
opOrderResult
.
data
.
order_info
.
pay_time
=
params
.
payTime
;
//付款时间
...
...
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