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
7f58b9e1
Commit
7f58b9e1
authored
Mar 19, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
5713a212
413d5fd7
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
26 deletions
+32
-26
center-channel/app/base/api/impl/opreceive/ic.js
+8
-4
center-channel/app/base/service/impl/common/centerorderSve.js
+7
-7
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+8
-8
center-channel/app/base/utils/aliyunClient.js
+8
-6
center-channel/app/config/settings.js
+1
-1
No files found.
center-channel/app/base/api/impl/opreceive/ic.js
View file @
7f58b9e1
...
...
@@ -4,6 +4,7 @@ var settings = require("../../../../config/settings");
class
Ic
extends
APIBase
{
constructor
()
{
super
();
this
.
centerorderSve
=
system
.
getObject
(
"service.common.centerorderSve"
);
}
/**
...
...
@@ -12,23 +13,26 @@ class Ic extends APIBase {
* action_type 执行的类型
* action_body 执行的参数
*/
async
springBoard
(
pobj
,
qobj
,
req
)
{
async
springBoard
(
pobj
,
qobj
,
req
)
{
if
(
!
pobj
.
actionProcess
)
{
return
system
.
getResult
(
null
,
"actionProcess参数不能为空"
);
}
if
(
!
pobj
.
actionType
)
{
return
system
.
getResult
(
null
,
"actionType参数不能为空"
);
}
var
result
=
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionProcess
,
pobj
.
actionType
,
pobj
.
actionBody
,
req
);
var
result
=
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionProcess
,
pobj
.
actionType
,
pobj
.
actionBody
,
req
);
return
result
;
}
async
opActionProcess
(
pobj
,
action_process
,
action_type
,
action_body
,
req
)
{
async
opActionProcess
(
pobj
,
action_process
,
action_type
,
action_body
,
req
)
{
var
opResult
=
null
;
switch
(
action_type
)
{
case
"deliveryInfo"
:
//办理公司表单数据
break
;
case
"deliveryStatus"
:
//办理公司状态
break
;
break
;
case
"reqCenterOrderApi"
:
//办理公司状态
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
...
...
center-channel/app/base/service/impl/common/centerorderSve.js
View file @
7f58b9e1
...
...
@@ -25,10 +25,10 @@ class CenterorderService{
var
needinfo
=
res
.
data
.
needinfo
;
//需求信息
var
needsolution
=
res
.
data
.
needsolution
;
//方案信息
//推送数据至阿
//
var bizType = pobj.actionBody.solutionContent.bizType || "";//业务类型里
//
var pushObj = {
//
intentionBizId:needinfo.channelNeedNo,bizType:bizType,solution:ab.solutionContent.solution
//
};
var
bizType
=
pobj
.
actionBody
.
solutionContent
.
bizType
||
""
;
//业务类型里
var
pushObj
=
{
intentionBizId
:
needinfo
.
channelNeedNo
,
bizType
:
bizType
,
solution
:
ab
.
solutionContent
.
solution
};
// var pushRes = await this.aliclient.reqbyget({action:"",reqbody:pushObj});
// if(pushRes && pushRes.SolutionBizId){
// var reqObj2 = {
...
...
@@ -40,9 +40,8 @@ class CenterorderService{
// };
// await this.reqCenterOrderApi(reqObj2);//保存渠道方案id
// }
return
system
.
getResultSuccess
();
}
return
res
;
return
system
.
getResultSuccess
()
;
}
//服务商方案作废
async
abolishProgramme
(
pobj
){
...
...
@@ -53,9 +52,10 @@ class CenterorderService{
solutionBizId
:
res
.
data
.
channelNeedNo
,
note
:
pobj
.
actionBody
.
note
||
""
};
// var pushRes = await this.aliclient.reqbyget({action:"",reqbody:pushObj});
return
system
.
getResultSuccess
();
}
return
res
;
}
}
module
.
exports
=
CenterorderService
;
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
7f58b9e1
...
...
@@ -14,11 +14,11 @@ class UtilsNeedSve extends AppServiceBase {
* @param {*} actionBody
*/
async
submitNeed
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
needNo
)
{
return
system
.
getResult
(
null
,
"actionBody.
needNo
can not be empty,100380"
);
if
(
!
actionBody
.
intentionBizId
)
{
return
system
.
getResult
(
null
,
"actionBody.
intentionBizId
can not be empty,100380"
);
}
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
return
await
this
.
restPostUrl
(
pobj
,
u
rl
);
return
await
this
.
restPostUrl
(
pobj
,
reqU
rl
);
}
/**
* 获取需求详情
...
...
@@ -26,8 +26,8 @@ class UtilsNeedSve extends AppServiceBase {
* @param {*} actionBody needNo 需求号
*/
async
getItemByNeedNo
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
needNo
)
{
return
system
.
getResult
(
null
,
"actionBody.
needNo
can not be empty,100380"
);
if
(
!
actionBody
.
intentionBizId
)
{
return
system
.
getResult
(
null
,
"actionBody.
intentionBizId
can not be empty,100380"
);
}
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
itemResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
...
...
@@ -39,11 +39,11 @@ class UtilsNeedSve extends AppServiceBase {
* @param {*} actionBody
*/
async
needClose
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
needNo
)
{
return
system
.
getResult
(
null
,
"actionBody.
needNo
can not be empty,100380"
);
if
(
!
actionBody
.
intentionBizId
)
{
return
system
.
getResult
(
null
,
"actionBody.
intentionBizId
can not be empty,100380"
);
}
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
return
await
this
.
restPostUrl
(
pobj
,
u
rl
);
return
await
this
.
restPostUrl
(
pobj
,
reqU
rl
);
}
}
module
.
exports
=
UtilsNeedSve
;
...
...
center-channel/app/base/utils/aliyunClient.js
View file @
7f58b9e1
const
Client
=
require
(
'aliyun-api-gateway'
).
Client
;
var
RPCClient
=
require
(
'@alicloud/pop-core'
).
RPCClient
;
class
aliyunClient
{
constructor
()
{
this
.
aliclient
=
new
RPCClient
({
accessKeyId
:
"LTAI1pJs7KQizBe2"
,
accessKeySecret
:
"MMNibebAPqR9AnX5YWHnSL2tHMSIoL"
,
endpoint
:
"https://companyreg.aliyuncs.com"
,
apiVersion
:
"2020-03-06"
});
}
async
post
(
aliReqUrl
,
key
,
secret
,
actionBody
)
{
const
client
=
new
Client
(
key
,
secret
);
...
...
@@ -18,12 +26,6 @@ class aliyunClient {
}
//阿里接口
async
reqbyget
(
obj
,
cbk
)
{
const
aliclient
=
new
RPCClient
({
accessKeyId
:
'LTAI4FmyipY1wuLHjLhMWiPa'
,
accessKeySecret
:
'hp4FF18IDCSym1prqzxrAjnnhNH3ju'
,
endpoint
:
'https://trademark.aliyuncs.com'
,
apiVersion
:
'2018-07-24'
});
var
action
=
obj
.
action
;
var
reqbody
=
obj
.
reqbody
;
return
this
.
aliclient
.
request
(
action
,
reqbody
,
{
...
...
center-channel/app/config/settings.js
View file @
7f58b9e1
...
...
@@ -57,7 +57,7 @@ var settings = {
},
centerOrderUrl
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
return
"http://
centerorder.apps.com
:4011/"
;
return
"http://
192.168.0.103
:4011/"
;
}
else
{
return
"http://center-order-service/"
;
}
...
...
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