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
4ef9fabd
Commit
4ef9fabd
authored
Jul 16, 2021
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
1c131b9d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
88 additions
and
71 deletions
+88
-71
center-channel/app/base/api/impl/action/opNeed.js
+10
-0
center-channel/app/base/api/impl/action/product.js
+9
-0
center-channel/app/base/service/impl/utilsSve/utilsOpNeedSve.js
+69
-71
center-channel/app/config/businessConfig.js
+0
-0
No files found.
center-channel/app/base/api/impl/action/opNeed.js
View file @
4ef9fabd
...
@@ -77,5 +77,14 @@ class OpNeed extends APIBase {
...
@@ -77,5 +77,14 @@ class OpNeed extends APIBase {
}
}
return
opResult
;
return
opResult
;
}
}
async
opSubmitNeed
(
pobj
,
qobj
,
req
)
{
pobj
.
actionBody
=
{
type
:
pobj
.
type
,
mobile
:
pobj
.
mobile
,
userName
:
pobj
.
userName
}
return
await
this
.
utilsOpNeedSve
.
opSubmitNeed
(
pobj
,
pobj
.
actionBody
);
}
}
}
module
.
exports
=
OpNeed
;
module
.
exports
=
OpNeed
;
\ No newline at end of file
center-channel/app/base/api/impl/action/product.js
View file @
4ef9fabd
...
@@ -68,5 +68,13 @@ class ProductAPI extends WEBBase {
...
@@ -68,5 +68,13 @@ class ProductAPI extends WEBBase {
return
opResult
;
return
opResult
;
}
}
async
getProductList
(
pobj
,
action_type
,
req
)
{
pobj
.
actionBody
=
{
pathCode
:
pobj
.
pathCode
}
return
await
this
.
utilsProductSve
.
getProductList
(
pobj
,
pobj
);
}
}
}
module
.
exports
=
ProductAPI
;
module
.
exports
=
ProductAPI
;
\ No newline at end of file
center-channel/app/base/service/impl/utilsSve/utilsOpNeedSve.js
View file @
4ef9fabd
...
@@ -32,7 +32,7 @@ class UtilsOpNeedService extends AppServiceBase {
...
@@ -32,7 +32,7 @@ class UtilsOpNeedService extends AppServiceBase {
if
(
opResult
.
status
!=
0
)
{
if
(
opResult
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
5015
,
"需求类型查询失败"
);
return
system
.
getResultFail
(
-
5015
,
"需求类型查询失败"
);
}
}
pobj
.
actionBody
.
service_product_id
=
opResult
.
data
.
service_product_id
;
pobj
.
actionBody
.
service_product_id
=
opResult
.
data
.
service_product_id
;
pobj
.
actionBody
.
productId
=
opResult
.
data
.
service_product_id
;
pobj
.
actionBody
.
productId
=
opResult
.
data
.
service_product_id
;
pobj
.
actionBody
.
appName
=
pobj
.
appInfo
.
app_name
;
pobj
.
actionBody
.
appName
=
pobj
.
appInfo
.
app_name
;
pobj
.
actionBody
.
type_code
=
opResult
.
data
.
type_code
;
pobj
.
actionBody
.
type_code
=
opResult
.
data
.
type_code
;
...
@@ -45,9 +45,7 @@ class UtilsOpNeedService extends AppServiceBase {
...
@@ -45,9 +45,7 @@ class UtilsOpNeedService extends AppServiceBase {
var
reqUrl
=
this
.
centerOrderUrl
+
"action/opNeed/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/opNeed/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
if
(
result
.
status
==
0
)
{
if
(
result
.
status
==
0
)
{
if
(
pobj
.
actionBody
.
channel_type_code
==
"esp.companyreg"
||
pobj
.
actionBody
.
channel_type_code
==
"esp.companyreg_cloud"
)
{
this
.
utilsPushSve
.
business2Channel
(
pobj
,
"pushNeedBusiness"
);
this
.
utilsPushSve
.
business2Channel
(
pobj
,
"pushNeedBusiness"
);
}
}
}
return
result
;
return
result
;
}
}
...
@@ -94,7 +92,7 @@ class UtilsOpNeedService extends AppServiceBase {
...
@@ -94,7 +92,7 @@ class UtilsOpNeedService extends AppServiceBase {
return
result
;
return
result
;
}
}
async
getNeedList
(
pobj
,
actionBody
){
async
getNeedList
(
pobj
,
actionBody
)
{
// pobj.
// pobj.
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
...
@@ -242,47 +240,47 @@ class UtilsOpNeedService extends AppServiceBase {
...
@@ -242,47 +240,47 @@ class UtilsOpNeedService extends AppServiceBase {
* @param pobj
* @param pobj
* @returns {Promise<void>}
* @returns {Promise<void>}
*/
*/
async
getStatisticsByUappId
(
pobj
){
async
getStatisticsByUappId
(
pobj
)
{
let
url
=
this
.
centerOrderUrl
+
"action/opNeed/springBoard"
;
let
url
=
this
.
centerOrderUrl
+
"action/opNeed/springBoard"
;
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
result
.
status
!=
0
)
{
if
(
result
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
1
);
return
system
.
getResultFail
(
-
1
);
}
}
let
data
=
result
.
data
;
let
data
=
result
.
data
;
let
temp
=
0
;
let
temp
=
0
;
let
arr
=
[];
let
arr
=
[];
let
reArr
=
[];
let
reArr
=
[];
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
((
temp
!=
data
[
i
].
uapp_id
&&
temp
!=
0
))
{
if
((
temp
!=
data
[
i
].
uapp_id
&&
temp
!=
0
))
{
let
obj
=
{
let
obj
=
{
uapp_id
:
temp
,
uapp_id
:
temp
,
data
:
arr
data
:
arr
}
}
reArr
.
push
(
obj
);
reArr
.
push
(
obj
);
arr
=
[];
arr
=
[];
}
}
let
dArr
=
{
let
dArr
=
{
time
:
data
[
i
].
time
,
time
:
data
[
i
].
time
,
count
:
data
[
i
].
count
count
:
data
[
i
].
count
}
}
arr
.
push
(
dArr
);
arr
.
push
(
dArr
);
temp
=
data
[
i
].
uapp_id
;
temp
=
data
[
i
].
uapp_id
;
if
(
i
==
data
.
length
-
1
)
{
if
(
i
==
data
.
length
-
1
)
{
let
obj
=
{
let
obj
=
{
uapp_id
:
temp
,
uapp_id
:
temp
,
data
:
arr
data
:
arr
}
}
reArr
.
push
(
obj
);
reArr
.
push
(
obj
);
}
}
}
}
reArr
.
sort
((
a
,
b
)
=>
{
reArr
.
sort
((
a
,
b
)
=>
{
return
a
.
uapp_id
-
b
.
uapp_id
;
return
a
.
uapp_id
-
b
.
uapp_id
;
})
})
let
temp2
=
0
;
let
temp2
=
0
;
let
arr2
=
[];
let
arr2
=
[];
let
final
=
[];
let
final
=
[];
for
(
let
i
=
0
;
i
<
reArr
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
reArr
.
length
;
i
++
)
{
if
((
temp2
!=
reArr
[
i
].
uapp_id
&&
temp2
!=
0
))
{
if
((
temp2
!=
reArr
[
i
].
uapp_id
&&
temp2
!=
0
))
{
let
o
=
{
let
o
=
{
uapp_id
:
temp2
,
uapp_id
:
temp2
,
data
:
arr2
data
:
arr2
...
@@ -293,10 +291,10 @@ class UtilsOpNeedService extends AppServiceBase {
...
@@ -293,10 +291,10 @@ class UtilsOpNeedService extends AppServiceBase {
console
.
log
(
reArr
[
i
].
data
)
console
.
log
(
reArr
[
i
].
data
)
arr2
=
arr2
.
concat
(
reArr
[
i
].
data
);
arr2
=
arr2
.
concat
(
reArr
[
i
].
data
);
temp2
=
reArr
[
i
].
uapp_id
;
temp2
=
reArr
[
i
].
uapp_id
;
if
(
i
==
reArr
.
length
-
1
)
{
if
(
i
==
reArr
.
length
-
1
)
{
let
obj
=
{
let
obj
=
{
uapp_id
:
temp2
,
uapp_id
:
temp2
,
data
:
arr2
data
:
arr2
}
}
final
.
push
(
obj
);
final
.
push
(
obj
);
}
}
...
@@ -309,7 +307,7 @@ class UtilsOpNeedService extends AppServiceBase {
...
@@ -309,7 +307,7 @@ class UtilsOpNeedService extends AppServiceBase {
* @param pobj
* @param pobj
* @returns {Promise<void>}
* @returns {Promise<void>}
*/
*/
async
getNeedFunnelStatistics
(
pobj
){
async
getNeedFunnelStatistics
(
pobj
)
{
let
url
=
this
.
centerOrderUrl
+
"action/opNeed/springBoard"
;
let
url
=
this
.
centerOrderUrl
+
"action/opNeed/springBoard"
;
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
return
result
;
return
result
;
...
@@ -320,35 +318,35 @@ class UtilsOpNeedService extends AppServiceBase {
...
@@ -320,35 +318,35 @@ class UtilsOpNeedService extends AppServiceBase {
* @param pobj
* @param pobj
* @returns {Promise<void>}
* @returns {Promise<void>}
*/
*/
async
getStatisticsByProduct
(
pobj
){
async
getStatisticsByProduct
(
pobj
)
{
let
url
=
this
.
centerOrderUrl
+
"action/opNeed/springBoard"
;
let
url
=
this
.
centerOrderUrl
+
"action/opNeed/springBoard"
;
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
result
.
status
!=
0
)
{
if
(
result
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
1
);
return
system
.
getResultFail
(
-
1
);
}
}
let
data
=
result
.
data
;
let
data
=
result
.
data
;
let
temp
=
""
;
let
temp
=
""
;
let
arr
=
[];
let
arr
=
[];
let
reArr
=
[];
let
reArr
=
[];
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
((
temp
!=
data
[
i
].
typeCode
&&
temp
!=
""
))
{
if
((
temp
!=
data
[
i
].
typeCode
&&
temp
!=
""
))
{
let
obj
=
{
let
obj
=
{
type_code
:
temp
,
type_code
:
temp
,
data
:
arr
data
:
arr
}
}
reArr
.
push
(
obj
);
reArr
.
push
(
obj
);
arr
=
[];
arr
=
[];
}
}
let
dArr
=
{
let
dArr
=
{
uapp_id
:
data
[
i
].
uapp_id
,
uapp_id
:
data
[
i
].
uapp_id
,
count
:
data
[
i
].
count
count
:
data
[
i
].
count
}
}
arr
.
push
(
dArr
);
arr
.
push
(
dArr
);
temp
=
data
[
i
].
typeCode
;
temp
=
data
[
i
].
typeCode
;
if
(
i
==
data
.
length
-
1
)
{
if
(
i
==
data
.
length
-
1
)
{
let
obj
=
{
let
obj
=
{
type_code
:
temp
,
type_code
:
temp
,
data
:
arr
data
:
arr
}
}
reArr
.
push
(
obj
);
reArr
.
push
(
obj
);
}
}
...
@@ -361,35 +359,35 @@ class UtilsOpNeedService extends AppServiceBase {
...
@@ -361,35 +359,35 @@ class UtilsOpNeedService extends AppServiceBase {
* @param pobj
* @param pobj
* @returns {Promise<void>}
* @returns {Promise<void>}
*/
*/
async
getStatisticsByChannel
(
pobj
){
async
getStatisticsByChannel
(
pobj
)
{
let
url
=
this
.
centerOrderUrl
+
"action/opNeed/springBoard"
;
let
url
=
this
.
centerOrderUrl
+
"action/opNeed/springBoard"
;
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
result
.
status
!=
0
)
{
if
(
result
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
1
);
return
system
.
getResultFail
(
-
1
);
}
}
let
data
=
result
.
data
;
let
data
=
result
.
data
;
let
temp
=
""
;
let
temp
=
""
;
let
arr
=
[];
let
arr
=
[];
let
reArr
=
[];
let
reArr
=
[];
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
((
temp
!=
data
[
i
].
uapp_id
&&
temp
!=
""
))
{
if
((
temp
!=
data
[
i
].
uapp_id
&&
temp
!=
""
))
{
let
obj
=
{
let
obj
=
{
uapp_id
:
temp
,
uapp_id
:
temp
,
data
:
arr
data
:
arr
}
}
reArr
.
push
(
obj
);
reArr
.
push
(
obj
);
arr
=
[];
arr
=
[];
}
}
let
dArr
=
{
let
dArr
=
{
typeCode
:
data
[
i
].
typeCode
,
typeCode
:
data
[
i
].
typeCode
,
count
:
data
[
i
].
count
count
:
data
[
i
].
count
}
}
arr
.
push
(
dArr
);
arr
.
push
(
dArr
);
temp
=
data
[
i
].
uapp_id
;
temp
=
data
[
i
].
uapp_id
;
if
(
i
==
data
.
length
-
1
)
{
if
(
i
==
data
.
length
-
1
)
{
let
obj
=
{
let
obj
=
{
uapp_id
:
temp
,
uapp_id
:
temp
,
data
:
arr
data
:
arr
}
}
reArr
.
push
(
obj
);
reArr
.
push
(
obj
);
}
}
...
@@ -402,10 +400,10 @@ class UtilsOpNeedService extends AppServiceBase {
...
@@ -402,10 +400,10 @@ class UtilsOpNeedService extends AppServiceBase {
* @param pobj
* @param pobj
* @returns {Promise<void>}
* @returns {Promise<void>}
*/
*/
async
getNeedProductType
(
pobj
){
async
getNeedProductType
(
pobj
)
{
let
url
=
this
.
centerOrderUrl
+
"action/opNeed/springBoard"
;
let
url
=
this
.
centerOrderUrl
+
"action/opNeed/springBoard"
;
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
result
.
status
!=
0
)
{
if
(
result
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
1
);
return
system
.
getResultFail
(
-
1
);
}
}
return
result
;
return
result
;
...
@@ -416,10 +414,10 @@ class UtilsOpNeedService extends AppServiceBase {
...
@@ -416,10 +414,10 @@ class UtilsOpNeedService extends AppServiceBase {
* @param pobj
* @param pobj
* @returns {Promise<void>}
* @returns {Promise<void>}
*/
*/
async
getNeedComparison
(
pobj
){
async
getNeedComparison
(
pobj
)
{
let
url
=
this
.
centerOrderUrl
+
"action/opNeed/springBoard"
;
let
url
=
this
.
centerOrderUrl
+
"action/opNeed/springBoard"
;
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
result
.
status
!=
0
)
{
if
(
result
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
1
);
return
system
.
getResultFail
(
-
1
);
}
}
return
result
;
return
result
;
...
@@ -430,35 +428,35 @@ class UtilsOpNeedService extends AppServiceBase {
...
@@ -430,35 +428,35 @@ class UtilsOpNeedService extends AppServiceBase {
* @param pobj
* @param pobj
* @returns {Promise<void>}
* @returns {Promise<void>}
*/
*/
async
getStatisticsByArea
(
pobj
){
async
getStatisticsByArea
(
pobj
)
{
let
url
=
this
.
centerOrderUrl
+
"action/opNeed/springBoard"
;
let
url
=
this
.
centerOrderUrl
+
"action/opNeed/springBoard"
;
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
result
.
status
!=
0
)
{
if
(
result
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
1
);
return
system
.
getResultFail
(
-
1
);
}
}
let
data
=
result
.
data
;
let
data
=
result
.
data
;
let
temp
=
""
;
let
temp
=
""
;
let
arr
=
[];
let
arr
=
[];
let
reArr
=
[];
let
reArr
=
[];
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
((
temp
!=
data
[
i
].
province
&&
temp
!=
""
))
{
if
((
temp
!=
data
[
i
].
province
&&
temp
!=
""
))
{
let
obj
=
{
let
obj
=
{
province
:
temp
,
province
:
temp
,
data
:
arr
data
:
arr
}
}
reArr
.
push
(
obj
);
reArr
.
push
(
obj
);
arr
=
[];
arr
=
[];
}
}
let
dArr
=
{
let
dArr
=
{
type_code
:
data
[
i
].
typeCode
,
type_code
:
data
[
i
].
typeCode
,
count
:
data
[
i
].
count
count
:
data
[
i
].
count
}
}
arr
.
push
(
dArr
);
arr
.
push
(
dArr
);
temp
=
data
[
i
].
province
;
temp
=
data
[
i
].
province
;
if
(
i
==
data
.
length
-
1
)
{
if
(
i
==
data
.
length
-
1
)
{
let
obj
=
{
let
obj
=
{
province
:
temp
,
province
:
temp
,
data
:
arr
data
:
arr
}
}
reArr
.
push
(
obj
);
reArr
.
push
(
obj
);
}
}
...
@@ -471,7 +469,7 @@ class UtilsOpNeedService extends AppServiceBase {
...
@@ -471,7 +469,7 @@ class UtilsOpNeedService extends AppServiceBase {
* @param pobj
* @param pobj
* @returns {Promise<void>}
* @returns {Promise<void>}
*/
*/
async
getNeedComparisonList
(
pobj
){
async
getNeedComparisonList
(
pobj
)
{
let
url
=
this
.
centerOrderUrl
+
"action/opNeed/springBoard"
;
let
url
=
this
.
centerOrderUrl
+
"action/opNeed/springBoard"
;
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
return
result
;
return
result
;
...
@@ -488,7 +486,7 @@ class UtilsOpNeedService extends AppServiceBase {
...
@@ -488,7 +486,7 @@ class UtilsOpNeedService extends AppServiceBase {
return
jsonarr
;
return
jsonarr
;
}
}
//2020 0826 lin 测试使用
//2020 0826 lin 测试使用
async
test
(
pobj
,
actionBody
){
async
test
(
pobj
,
actionBody
)
{
pobj
.
actionType
=
"receiveIcpStatusNotify"
;
pobj
.
actionType
=
"receiveIcpStatusNotify"
;
var
url
=
settings
.
centerOrderUrl
()
+
"action/qcapi/springBoard"
;
var
url
=
settings
.
centerOrderUrl
()
+
"action/qcapi/springBoard"
;
var
rtn
=
await
this
.
restPostUrl
(
pobj
,
url
);
var
rtn
=
await
this
.
restPostUrl
(
pobj
,
url
);
...
...
center-channel/app/config/businessConfig.js
View file @
4ef9fabd
This diff is collapsed.
Click to expand it.
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