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
c751d8d6
Commit
c751d8d6
authored
Jan 06, 2021
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
fc7db29b
a04ad50e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
98 additions
and
1 deletions
+98
-1
center-channel/app/base/api/impl/action/opNeed.js
+4
-1
center-channel/app/base/api/impl/action/product.js
+3
-0
center-channel/app/base/api/impl/auth/accessAuth.js
+3
-0
center-channel/app/base/service/impl/utilsSve/utilsAuthSve.js
+10
-0
center-channel/app/base/service/impl/utilsSve/utilsOpNeedSve.js
+67
-0
center-channel/app/base/service/impl/utilsSve/utilsProductSve.js
+11
-0
No files found.
center-channel/app/base/api/impl/action/opNeed.js
View file @
c751d8d6
...
...
@@ -52,7 +52,10 @@ class OpNeed extends APIBase {
// break;
// case "receiveFeedback"://关闭方案
// opResult = await this.centerorderSve.reqCenterOrderApi(pobj);
// break;
// break;
case
"getStatisticsByUappId"
:
opResult
=
await
this
.
utilsOpNeedSve
.
getStatisticsByUappId
(
pobj
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
...
...
center-channel/app/base/api/impl/action/product.js
View file @
c751d8d6
...
...
@@ -50,6 +50,9 @@ class ProductAPI extends WEBBase {
case
"getRegProducePrice"
:
opResult
=
await
this
.
utilsProductSve
.
getRegProducePrice
(
pobj
,
pobj
.
actionBody
)
break
;
case
"getAllProducts"
:
opResult
=
await
this
.
utilsProductSve
.
getAllProducts
(
pobj
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
}
...
...
center-channel/app/base/api/impl/auth/accessAuth.js
View file @
c751d8d6
...
...
@@ -112,6 +112,9 @@ class AccessAuthAPI extends WEBBase {
case
"logout"
:
//用户退出--已经废弃,前端自己进行移除userpin信息
opResult
=
await
this
.
utilsAuthSve
.
userLogout
(
pobj
,
pobj
.
actionBody
);
break
;
case
"getAllChannels"
:
opResult
=
await
this
.
utilsAuthSve
.
getAllChannels
(
pobj
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsAuthSve.js
View file @
c751d8d6
...
...
@@ -293,5 +293,15 @@ class UtilsAuthService extends AppServiceBase {
return
result
;
}
/**
* 获取所有渠道
* @returns {Promise<void>}
*/
async
getAllChannels
(
pobj
){
let
url
=
this
.
centerAppUrl
+
'auth/accessAuth/getAllChannels'
;
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
return
result
}
}
module
.
exports
=
UtilsAuthService
;
center-channel/app/base/service/impl/utilsSve/utilsOpNeedSve.js
View file @
c751d8d6
...
...
@@ -286,6 +286,73 @@ class UtilsOpNeedService extends AppServiceBase {
return
system
.
getResultSuccess
(
res
);
}
/**
* 各渠道需求统计
* @param pobj
* @returns {Promise<void>}
*/
async
getStatisticsByUappId
(
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
=
0
;
let
arr
=
[];
let
reArr
=
[];
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
){
if
((
temp
!=
data
[
i
].
uapp_id
&&
temp
!=
0
)){
let
obj
=
{
uapp_id
:
temp
,
data
:
arr
}
reArr
.
push
(
obj
);
arr
=
[];
}
let
dArr
=
{
time
:
data
[
i
].
time
,
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
);
}
}
reArr
.
sort
((
a
,
b
)
=>
{
return
a
.
uapp_id
-
b
.
uapp_id
;
})
let
temp2
=
0
;
let
arr2
=
[];
let
final
=
[];
for
(
let
i
=
0
;
i
<
reArr
.
length
;
i
++
){
if
((
temp2
!=
reArr
[
i
].
uapp_id
&&
temp2
!=
0
)){
let
o
=
{
uapp_id
:
temp2
,
data
:
arr2
};
final
.
push
(
o
);
arr2
=
[];
}
console
.
log
(
reArr
[
i
].
data
)
arr2
=
arr2
.
concat
(
reArr
[
i
].
data
);
temp2
=
reArr
[
i
].
uapp_id
;
if
(
i
==
reArr
.
length
-
1
){
let
obj
=
{
uapp_id
:
temp2
,
data
:
arr2
}
final
.
push
(
obj
);
}
}
return
system
.
getResultSuccess
(
final
);
}
urlSplit
(
url
)
{
var
arr
=
url
.
split
(
"?"
)[
1
];
//根据?跟个url
...
...
center-channel/app/base/service/impl/utilsSve/utilsProductSve.js
View file @
c751d8d6
...
...
@@ -142,6 +142,17 @@ class UtilsProductService extends AppServiceBase {
let
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
return
await
this
.
restPostUrl
(
pobj
,
url
);
}
/**
* 获取全部产品
* @returns {Promise<{msg: string, data, bizmsg: *|string, status: number}|any>}
*/
async
getAllProducts
(
pobj
){
let
url
=
settings
.
centerAppUrl
()
+
'action/opProduct/springBoard'
;
pobj
.
actionType
=
'getAllProducts'
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
return
result
;
}
}
module
.
exports
=
UtilsProductService
;
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