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
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
24 deletions
+30
-24
center-channel/app/base/api/impl/opreceive/ic.js
+6
-2
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");
...
@@ -4,6 +4,7 @@ var settings = require("../../../../config/settings");
class
Ic
extends
APIBase
{
class
Ic
extends
APIBase
{
constructor
()
{
constructor
()
{
super
();
super
();
this
.
centerorderSve
=
system
.
getObject
(
"service.common.centerorderSve"
);
}
}
/**
/**
...
@@ -19,16 +20,19 @@ class Ic extends APIBase {
...
@@ -19,16 +20,19 @@ class Ic extends APIBase {
if
(
!
pobj
.
actionType
)
{
if
(
!
pobj
.
actionType
)
{
return
system
.
getResult
(
null
,
"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
;
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
;
var
opResult
=
null
;
switch
(
action_type
)
{
switch
(
action_type
)
{
case
"deliveryInfo"
:
//办理公司表单数据
case
"deliveryInfo"
:
//办理公司表单数据
break
;
break
;
case
"deliveryStatus"
:
//办理公司状态
case
"deliveryStatus"
:
//办理公司状态
break
;
break
;
case
"reqCenterOrderApi"
:
//办理公司状态
break
;
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
break
;
...
...
center-channel/app/base/service/impl/common/centerorderSve.js
View file @
7f58b9e1
...
@@ -25,10 +25,10 @@ class CenterorderService{
...
@@ -25,10 +25,10 @@ class CenterorderService{
var
needinfo
=
res
.
data
.
needinfo
;
//需求信息
var
needinfo
=
res
.
data
.
needinfo
;
//需求信息
var
needsolution
=
res
.
data
.
needsolution
;
//方案信息
var
needsolution
=
res
.
data
.
needsolution
;
//方案信息
//推送数据至阿
//推送数据至阿
//
var bizType = pobj.actionBody.solutionContent.bizType || "";//业务类型里
var
bizType
=
pobj
.
actionBody
.
solutionContent
.
bizType
||
""
;
//业务类型里
//
var pushObj = {
var
pushObj
=
{
//
intentionBizId:needinfo.channelNeedNo,bizType:bizType,solution:ab.solutionContent.solution
intentionBizId
:
needinfo
.
channelNeedNo
,
bizType
:
bizType
,
solution
:
ab
.
solutionContent
.
solution
//
};
};
// var pushRes = await this.aliclient.reqbyget({action:"",reqbody:pushObj});
// var pushRes = await this.aliclient.reqbyget({action:"",reqbody:pushObj});
// if(pushRes && pushRes.SolutionBizId){
// if(pushRes && pushRes.SolutionBizId){
// var reqObj2 = {
// var reqObj2 = {
...
@@ -40,9 +40,8 @@ class CenterorderService{
...
@@ -40,9 +40,8 @@ class CenterorderService{
// };
// };
// await this.reqCenterOrderApi(reqObj2);//保存渠道方案id
// await this.reqCenterOrderApi(reqObj2);//保存渠道方案id
// }
// }
return
system
.
getResultSuccess
();
}
}
return
res
;
return
system
.
getResultSuccess
()
;
}
}
//服务商方案作废
//服务商方案作废
async
abolishProgramme
(
pobj
){
async
abolishProgramme
(
pobj
){
...
@@ -53,9 +52,10 @@ class CenterorderService{
...
@@ -53,9 +52,10 @@ class CenterorderService{
solutionBizId
:
res
.
data
.
channelNeedNo
,
note
:
pobj
.
actionBody
.
note
||
""
solutionBizId
:
res
.
data
.
channelNeedNo
,
note
:
pobj
.
actionBody
.
note
||
""
};
};
// var pushRes = await this.aliclient.reqbyget({action:"",reqbody:pushObj});
// var pushRes = await this.aliclient.reqbyget({action:"",reqbody:pushObj});
return
system
.
getResultSuccess
();
}
}
return
res
;
return
res
;
}
}
}
}
module
.
exports
=
CenterorderService
;
module
.
exports
=
CenterorderService
;
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
7f58b9e1
...
@@ -14,11 +14,11 @@ class UtilsNeedSve extends AppServiceBase {
...
@@ -14,11 +14,11 @@ class UtilsNeedSve extends AppServiceBase {
* @param {*} actionBody
* @param {*} actionBody
*/
*/
async
submitNeed
(
pobj
,
actionBody
)
{
async
submitNeed
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
needNo
)
{
if
(
!
actionBody
.
intentionBizId
)
{
return
system
.
getResult
(
null
,
"actionBody.
needNo
can not be empty,100380"
);
return
system
.
getResult
(
null
,
"actionBody.
intentionBizId
can not be empty,100380"
);
}
}
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
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 {
...
@@ -26,8 +26,8 @@ class UtilsNeedSve extends AppServiceBase {
* @param {*} actionBody needNo 需求号
* @param {*} actionBody needNo 需求号
*/
*/
async
getItemByNeedNo
(
pobj
,
actionBody
)
{
async
getItemByNeedNo
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
needNo
)
{
if
(
!
actionBody
.
intentionBizId
)
{
return
system
.
getResult
(
null
,
"actionBody.
needNo
can not be empty,100380"
);
return
system
.
getResult
(
null
,
"actionBody.
intentionBizId
can not be empty,100380"
);
}
}
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
itemResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
itemResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
...
@@ -39,11 +39,11 @@ class UtilsNeedSve extends AppServiceBase {
...
@@ -39,11 +39,11 @@ class UtilsNeedSve extends AppServiceBase {
* @param {*} actionBody
* @param {*} actionBody
*/
*/
async
needClose
(
pobj
,
actionBody
)
{
async
needClose
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
needNo
)
{
if
(
!
actionBody
.
intentionBizId
)
{
return
system
.
getResult
(
null
,
"actionBody.
needNo
can not be empty,100380"
);
return
system
.
getResult
(
null
,
"actionBody.
intentionBizId
can not be empty,100380"
);
}
}
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
return
await
this
.
restPostUrl
(
pobj
,
u
rl
);
return
await
this
.
restPostUrl
(
pobj
,
reqU
rl
);
}
}
}
}
module
.
exports
=
UtilsNeedSve
;
module
.
exports
=
UtilsNeedSve
;
...
...
center-channel/app/base/utils/aliyunClient.js
View file @
7f58b9e1
const
Client
=
require
(
'aliyun-api-gateway'
).
Client
;
const
Client
=
require
(
'aliyun-api-gateway'
).
Client
;
var
RPCClient
=
require
(
'@alicloud/pop-core'
).
RPCClient
;
class
aliyunClient
{
class
aliyunClient
{
constructor
()
{
constructor
()
{
this
.
aliclient
=
new
RPCClient
({
accessKeyId
:
"LTAI1pJs7KQizBe2"
,
accessKeySecret
:
"MMNibebAPqR9AnX5YWHnSL2tHMSIoL"
,
endpoint
:
"https://companyreg.aliyuncs.com"
,
apiVersion
:
"2020-03-06"
});
}
}
async
post
(
aliReqUrl
,
key
,
secret
,
actionBody
)
{
async
post
(
aliReqUrl
,
key
,
secret
,
actionBody
)
{
const
client
=
new
Client
(
key
,
secret
);
const
client
=
new
Client
(
key
,
secret
);
...
@@ -18,12 +26,6 @@ class aliyunClient {
...
@@ -18,12 +26,6 @@ class aliyunClient {
}
}
//阿里接口
//阿里接口
async
reqbyget
(
obj
,
cbk
)
{
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
action
=
obj
.
action
;
var
reqbody
=
obj
.
reqbody
;
var
reqbody
=
obj
.
reqbody
;
return
this
.
aliclient
.
request
(
action
,
reqbody
,
{
return
this
.
aliclient
.
request
(
action
,
reqbody
,
{
...
...
center-channel/app/config/settings.js
View file @
7f58b9e1
...
@@ -57,7 +57,7 @@ var settings = {
...
@@ -57,7 +57,7 @@ var settings = {
},
},
centerOrderUrl
:
function
()
{
centerOrderUrl
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
if
(
this
.
env
==
"dev"
)
{
return
"http://
centerorder.apps.com
:4011/"
;
return
"http://
192.168.0.103
:4011/"
;
}
else
{
}
else
{
return
"http://center-order-service/"
;
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