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
9d7261f2
Commit
9d7261f2
authored
Dec 22, 2020
by
兰国旗
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
laolan
parent
26066508
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
14 deletions
+37
-14
center-order/app/base/api/impl/action/regapi.js
+4
-0
center-order/app/base/db/impl/dbneed/needinfoDao.js
+3
-1
center-order/app/base/db/impl/reg/regcenterorderDao.js
+3
-1
center-order/app/base/service/impl/qcutils/regCenterOrderSve.js
+27
-12
No files found.
center-order/app/base/api/impl/action/regapi.js
View file @
9d7261f2
...
@@ -65,6 +65,10 @@ class RegAPI extends APIBase {
...
@@ -65,6 +65,10 @@ class RegAPI extends APIBase {
case
"regNeedClose"
:
//前端关闭reg需求及方案
case
"regNeedClose"
:
//前端关闭reg需求及方案
opResult
=
await
this
.
regCenterOrderSve
.
regNeedClose
(
pobj
);
opResult
=
await
this
.
regCenterOrderSve
.
regNeedClose
(
pobj
);
break
;
break
;
case
"saveReginfo"
:
//保存渠道方案及url
opResult
=
await
this
.
regCenterOrderSve
.
saveReginfo
(
pobj
);
break
;
case
"getRegInfoByChannelNeedNo"
:
//获取需求方案列表
case
"getRegInfoByChannelNeedNo"
:
//获取需求方案列表
opResult
=
await
this
.
regCenterOrderSve
.
reqCenterOrderApi
(
pobj
);
opResult
=
await
this
.
regCenterOrderSve
.
reqCenterOrderApi
(
pobj
);
break
;
break
;
...
...
center-order/app/base/db/impl/dbneed/needinfoDao.js
View file @
9d7261f2
...
@@ -66,7 +66,9 @@ class NeedinfoDao extends Dao {
...
@@ -66,7 +66,9 @@ class NeedinfoDao extends Dao {
"channelTypeName"
,
"channelTypeName"
,
"publisherOnlyCode"
,
"publisherOnlyCode"
,
"followManName"
,
"followManName"
,
"followManOnlyCode"
],
"followManOnlyCode"
,
"created_at"
],
raw
:
true
raw
:
true
});
});
}
}
...
...
center-order/app/base/db/impl/reg/regcenterorderDao.js
View file @
9d7261f2
...
@@ -66,7 +66,9 @@ class RegCenterorderDao extends Dao {
...
@@ -66,7 +66,9 @@ class RegCenterorderDao extends Dao {
"channelTypeName"
,
"channelTypeName"
,
"publisherOnlyCode"
,
"publisherOnlyCode"
,
"followManName"
,
"followManName"
,
"followManOnlyCode"
],
"followManOnlyCode"
,
"created_at"
],
raw
:
true
raw
:
true
});
});
}
}
...
...
center-order/app/base/service/impl/qcutils/regCenterOrderSve.js
View file @
9d7261f2
...
@@ -312,7 +312,7 @@ class RegCenterOrderService extends ServiceBase {
...
@@ -312,7 +312,7 @@ class RegCenterOrderService extends ServiceBase {
var
new_ns
=
await
this
.
needsolutionDao
.
model
.
findOne
({
var
new_ns
=
await
this
.
needsolutionDao
.
model
.
findOne
({
where
:
{
id
:
ns
.
id
},
raw
:
true
where
:
{
id
:
ns
.
id
},
raw
:
true
});
});
return
system
.
getResultSuccess
(
ns
);
return
system
.
getResultSuccess
(
n
ew_n
s
);
}
}
//接收方案状态及支付信息
//接收方案状态及支付信息
...
@@ -744,7 +744,9 @@ class RegCenterOrderService extends ServiceBase {
...
@@ -744,7 +744,9 @@ class RegCenterOrderService extends ServiceBase {
}
}
//方案推送baidu后,接收保存方案编号/链接
//方案推送baidu后,接收保存方案编号/链接
async
saveReginfo
(
pobj
)
{
async
saveReginfo
(
pobj
)
{
console
.
log
(
'----pobj--'
,
pobj
)
var
ab
=
pobj
.
actionBody
;
var
ab
=
pobj
.
actionBody
;
console
.
log
(
'---ab---'
,
ab
)
if
(
!
ab
.
infos
)
{
if
(
!
ab
.
infos
)
{
return
system
.
getResultFail
(
-
101
,
"渠道信息不能为空"
);
return
system
.
getResultFail
(
-
101
,
"渠道信息不能为空"
);
}
}
...
@@ -753,16 +755,15 @@ class RegCenterOrderService extends ServiceBase {
...
@@ -753,16 +755,15 @@ class RegCenterOrderService extends ServiceBase {
var
infosLength
=
ab
.
infos
.
length
var
infosLength
=
ab
.
infos
.
length
var
solutionNos
=
[];
var
solutionNos
=
[];
var
infoList
=
[];
var
infoList
=
[];
var
nsLength
=
ns
.
length
for
(
i
=
0
;
i
<
infosLength
;
i
++
)
{
for
(
i
=
0
;
i
<
infosLength
;
i
++
)
{
var
solutionNo
=
{
solutionNos
.
push
(
ab
.
infos
[
i
].
gsbBizId
)
solutionNo
:
ab
.
infos
[
i
].
bizId
}
solutionNos
.
push
(
solutionNo
)
}
}
console
.
log
(
'----solutionNos----'
,
solutionNos
)
var
ns
=
await
this
.
needsolutionDao
.
model
.
findAll
({
var
ns
=
await
this
.
needsolutionDao
.
model
.
findAll
({
where
:
{
solutionNo
:
{
[
this
.
db
.
Op
.
in
]:
solutionNos
},
isInvalid
:
0
},
raw
:
true
where
:
{
solutionNo
:
{
[
this
.
db
.
Op
.
in
]:
solutionNos
},
isInvalid
:
0
},
raw
:
true
});
});
console
.
log
(
"----ns----"
,
ns
)
var
nsLength
=
ns
.
length
if
(
!
ns
)
{
if
(
!
ns
)
{
return
system
.
getResultFail
(
-
103
,
"未知方案"
);
return
system
.
getResultFail
(
-
103
,
"未知方案"
);
}
}
...
@@ -775,8 +776,14 @@ class RegCenterOrderService extends ServiceBase {
...
@@ -775,8 +776,14 @@ class RegCenterOrderService extends ServiceBase {
if
(
needinfo
.
status
==
"ycd"
||
needinfo
.
status
==
"ygb"
)
{
if
(
needinfo
.
status
==
"ycd"
||
needinfo
.
status
==
"ygb"
)
{
return
system
.
getResultFail
(
-
105
,
"该方案需求状态为"
+
needinfo
.
statusName
+
",不能执行此操作"
);
return
system
.
getResultFail
(
-
105
,
"该方案需求状态为"
+
needinfo
.
statusName
+
",不能执行此操作"
);
}
}
var
confirmUrl
=
[]
var
str
;
for
(
j
=
0
;
j
<
nsLength
;
j
++
)
{
for
(
j
=
0
;
j
<
nsLength
;
j
++
)
{
await
this
.
needsolutionDao
.
model
.
update
({
channelSolutionNo
:
ab
.
infos
[
j
].
bizId
},
{
where
:
{
id
:
ns
[
j
].
id
}
});
//修改方案信息
confirmUrl
.
push
(
ab
.
infos
[
j
].
confirmUrl
)
ns
[
j
].
solutionContent
[
'confirmUrl'
]
=
ab
.
infos
[
j
].
confirmUrl
str
=
ns
[
j
].
solutionContent
str
=
JSON
.
stringify
(
str
)
await
this
.
needsolutionDao
.
model
.
update
({
channelSolutionNo
:
ab
.
infos
[
j
].
bizId
,
solutionContent
:
str
},
{
where
:
{
id
:
ns
[
j
].
id
}
});
//修改方案信息
}
}
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
...
@@ -918,8 +925,9 @@ class RegCenterOrderService extends ServiceBase {
...
@@ -918,8 +925,9 @@ class RegCenterOrderService extends ServiceBase {
});
});
console
.
log
(
'nnnsss-----'
,
ns
)
console
.
log
(
'nnnsss-----'
,
ns
)
var
i
;
var
i
;
var
n
sLength
=
ns
.
length
var
n
eedObj
;
if
(
ns
)
{
if
(
ns
)
{
var
nsLength
=
ns
.
length
for
(
i
=
0
;
i
<
nsLength
;
i
++
)
{
for
(
i
=
0
;
i
<
nsLength
;
i
++
)
{
if
(
ns
[
i
].
id
)
{
if
(
ns
[
i
].
id
)
{
if
(
ns
[
i
].
status
==
"ywc"
)
{
if
(
ns
[
i
].
status
==
"ywc"
)
{
...
@@ -932,18 +940,25 @@ class RegCenterOrderService extends ServiceBase {
...
@@ -932,18 +940,25 @@ class RegCenterOrderService extends ServiceBase {
}
}
var
self
=
this
var
self
=
this
await
this
.
needsolutionDao
.
db
.
transaction
(
async
function
(
t
)
{
await
this
.
needsolutionDao
.
db
.
transaction
(
async
function
(
t
)
{
var
needObj
=
{
needObj
=
{
id
:
needinfo
.
id
,
status
:
"ygb"
,
notes
:
ab
.
note
id
:
needinfo
.
id
,
status
:
"ygb"
,
notes
:
ab
.
note
};
};
await
self
.
needinfoDao
.
update
(
needObj
,
t
);
//关闭需求
await
this
.
needinfoDao
.
update
(
needObj
,
t
);
//关闭需求
await
self
.
needsolutionDao
.
model
.
update
({
status
:
"yzf"
,
isInvalid
:
1
},
{
where
:
{
id
:
ns
.
id
},
transaction
:
t
});
//方案废弃
await
self
.
needsolutionDao
.
model
.
update
({
status
:
"yzf"
,
isInvalid
:
1
},
{
where
:
{
id
:
ns
.
id
},
transaction
:
t
});
//方案废弃
// return system.getResultSuccess(ns.orderNo);
// return system.getResultSuccess(ns.orderNo);
ns
[
'uapp_id'
]
=
needinfo
.
uapp_id
;
console
.
log
(
'guanbi ns +++'
,
ns
)
})
})
}
}
}
}
}
else
{
needObj
=
{
id
:
needinfo
.
id
,
status
:
"ygb"
,
notes
:
ab
.
note
};
await
this
.
needinfoDao
.
update
(
needObj
)
ns
[
'uapp_id'
]
=
needinfo
.
uapp_id
;
console
.
log
(
'guanbi ns +++'
,
ns
)
}
}
return
system
.
getResultSuccess
(
ns
);
return
system
.
getResultSuccess
(
ns
);
}
}
...
...
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