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
c5d6b24c
Commit
c5d6b24c
authored
Jul 02, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
bd4aae1d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
367 additions
and
76 deletions
+367
-76
brg-user-center/app/base/api/api.base.js
+3
-2
brg-user-center/app/base/api/impl/action/icapi.js
+39
-0
brg-user-center/app/base/api/impl/action/need.js
+4
-3
brg-user-center/app/base/api/impl/action/order.js
+8
-4
brg-user-center/app/base/api/impl/action/txapi.js
+12
-0
brg-user-center/app/base/db/impl/order/orderDeliveryDao.js
+1
-1
brg-user-center/app/base/db/impl/order/orderProductDao.js
+1
-1
brg-user-center/app/base/service/impl/common/txPushLogSve.js
+80
-30
brg-user-center/app/base/service/impl/need/needInfoSve.js
+2
-1
brg-user-center/app/base/service/impl/need/needSolutionSve.js
+3
-2
brg-user-center/app/base/service/impl/order/applyInfoSve.js
+1
-1
brg-user-center/app/base/service/impl/order/orderDeliverySve.js
+10
-8
brg-user-center/app/base/service/impl/order/orderInfoSve.js
+0
-0
brg-user-center/app/base/service/impl/utilsSve/utilsIcNameSve.js
+22
-0
brg-user-center/app/base/service/impl/utilsSve/utilsMsgSendSve.js
+36
-11
brg-user-center/app/config/settings.js
+9
-1
brg-user-center/app/front/entry/public/apidoc/customer/ICName.md
+126
-0
brg-user-center/app/front/entry/public/apidoc/customer/order.md
+10
-11
No files found.
brg-user-center/app/base/api/api.base.js
View file @
c5d6b24c
...
...
@@ -24,7 +24,7 @@ class APIBase {
"GetQualificationCertificateDetail"
:
"getQualificationCertificateDetail"
,
"RefusalSolution"
:
"refusalSolution"
,
"SendVerificationCode"
:
"sendVerificationCode"
,
"CheckBusinessNameList"
:
"checkBusinessNameList"
,
};
}
//-----------------------新的模式------------------开始
...
...
@@ -43,13 +43,14 @@ class APIBase {
if
(
!
result
)
{
result
=
system
.
getResult
(
null
,
"请求的方法返回值为空"
);
}
var
tmpResult
=
pobj
.
actionType
.
indexOf
(
"List"
)
<
0
?
result
:
{
status
:
result
.
status
,
message
:
result
.
message
,
requestId
:
result
.
requestId
};
this
.
execClient
.
execLogs
(
"reqPath:"
+
req
.
path
+
"执行结果"
,
param
,
"brg-user-center-apibase"
,
tmpResult
,
null
);
result
.
requestId
=
result
.
requestId
||
uuid
.
v1
();
if
(
req
.
body
.
Action
&&
this
.
userCenterAction
[
req
.
body
.
Action
])
{
result
=
await
this
.
handleTxResult
(
result
);
delete
req
.
body
[
"ActionBody"
];
delete
req
.
body
[
"Action"
];
}
//处理tx返回数据
this
.
execClient
.
execLogs
(
"reqPath:"
+
req
.
path
+
"执行结果"
,
param
,
"brg-user-center-apibase"
,
result
,
null
);
return
result
;
}
catch
(
error
)
{
var
stackStr
=
error
.
stack
?
error
.
stack
:
JSON
.
stringify
(
error
);
...
...
brg-user-center/app/base/api/impl/action/icapi.js
0 → 100755
View file @
c5d6b24c
var
APIBase
=
require
(
"../../api.base"
);
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
class
icName
extends
APIBase
{
constructor
()
{
super
();
this
.
utilsIcNameSve
=
system
.
getObject
(
"service.utilsSve.utilsIcNameSve"
);
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async
springBoard
(
pobj
,
qobj
,
req
)
{
if
(
!
pobj
.
actionType
)
{
return
system
.
getResult
(
null
,
"actionType参数不能为空"
);
}
var
result
=
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionType
,
req
);
return
result
;
}
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
var
opResult
=
null
;
switch
(
action_type
)
{
case
"test"
:
//测试
opResult
=
system
.
getResultSuccess
(
"测试接口"
);
break
;
case
"checkBusinessNameList"
:
//工商核名
opResult
=
await
this
.
utilsIcNameSve
.
checkBusinessNameList
(
pobj
.
actionBody
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
}
return
opResult
;
}
}
module
.
exports
=
icName
;
brg-user-center/app/base/api/impl/action/need.js
View file @
c5d6b24c
...
...
@@ -24,11 +24,11 @@ class Need extends APIBase {
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
var
opResult
=
null
;
var
verificationCodeList
=
[
//
"needSubmit"
"needSubmit"
];
var
self
=
this
;
if
(
verificationCodeList
.
indexOf
(
action_type
)
>
-
1
)
{
if
(
!
pobj
.
actionBody
.
c
ontactsMoblie
)
{
if
(
!
pobj
.
actionBody
.
C
ontactsMoblie
)
{
opResult
=
system
.
getResult
(
null
,
"contactsMoblie参数错误"
);
return
opResult
;
}
...
...
@@ -36,7 +36,7 @@ class Need extends APIBase {
opResult
=
system
.
getResult
(
null
,
"verificationCode参数错误"
);
return
opResult
;
}
var
v
=
await
self
.
utilsMsgSendSve
.
getVerificationCode
(
pobj
.
actionBody
.
c
ontactsMoblie
);
var
v
=
await
self
.
utilsMsgSendSve
.
getVerificationCode
(
pobj
.
actionBody
.
C
ontactsMoblie
);
if
(
v
!=
pobj
.
actionBody
.
VerificationCode
)
{
opResult
=
system
.
getResult
(
null
,
"验证码错误"
);
return
opResult
;
...
...
@@ -64,3 +64,4 @@ class Need extends APIBase {
}
module
.
exports
=
Need
;
brg-user-center/app/base/api/impl/action/order.js
View file @
c5d6b24c
...
...
@@ -29,16 +29,20 @@ class Order extends APIBase {
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
var
opResult
=
null
;
var
verificationCodeList
=
[
//
"submitGoodsinfo"
"submitGoodsinfo"
];
var
self
=
this
;
if
(
verificationCodeList
.
indexOf
(
action_type
)
>
-
1
)
{
if
(
!
pobj
.
actionBody
.
contactsMoblie
)
{
opResult
=
system
.
getResult
(
null
,
"contactsMoblie参数错误"
);
if
(
!
pobj
.
actionBody
.
Info
)
{
return
system
.
getResultFail
(
-
101
,
"Info is empty"
);
}
pobj
.
actionBody
.
Info
=
JSON
.
parse
(
pobj
.
actionBody
.
Info
);
if
(
!
pobj
.
actionBody
.
Info
[
0
].
formInfo
.
contactsPhone
)
{
opResult
=
system
.
getResult
(
null
,
"contactsPhone参数错误"
);
return
opResult
;
}
if
(
pobj
.
actionBody
.
VerificationCode
)
{
var
v
=
await
self
.
utilsMsgSendSve
.
getVerificationCode
(
pobj
.
actionBody
.
contactsMobli
e
);
var
v
=
await
self
.
utilsMsgSendSve
.
getVerificationCode
(
pobj
.
actionBody
.
Info
[
0
].
formInfo
.
contactsPhon
e
);
if
(
v
!=
pobj
.
actionBody
.
VerificationCode
)
{
opResult
=
system
.
getResult
(
null
,
"验证码错误"
);
return
opResult
;
...
...
brg-user-center/app/base/api/impl/action/txapi.js
View file @
c5d6b24c
...
...
@@ -22,12 +22,24 @@ class Need extends APIBase {
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
var
opResult
=
null
;
switch
(
action_type
)
{
case
"qcloud.domain.checkCreate"
:
//新购参数检查
opResult
=
await
this
.
txPushLogSve
.
checkCreate
(
pobj
);
break
;
case
"qcloud.cbs.CreateCbsInstance"
:
//支付回调
opResult
=
await
this
.
txPushLogSve
.
createCbsInstance
(
pobj
);
break
;
case
"qcloud.PRODUCT_NAME.queryFlow"
:
//发货状态查询
opResult
=
await
this
.
txPushLogSve
.
queryFlow
(
pobj
);
break
;
case
"qcloud.PRODUCT_NAME.isolateResource"
:
//资源隔离
opResult
=
await
this
.
txPushLogSve
.
isolateResource
(
pobj
);
break
;
case
"qcloud.PRODUCT_NAME.queryResources"
:
//资源拉取
opResult
=
await
this
.
txPushLogSve
.
queryResources
(
pobj
);
break
;
case
"qcloud.PRODUCT_NAME.destroyResource"
:
//销毁资源
opResult
=
await
this
.
txPushLogSve
.
destroyResource
(
pobj
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
...
...
brg-user-center/app/base/db/impl/order/orderDeliveryDao.js
View file @
c5d6b24c
...
...
@@ -16,7 +16,7 @@ class OrderDeliveryDao extends Dao{
userId
:
userId
,
productTypeOne
:
"%/"
+
productTypeOne
+
"/%"
};
var
sql
=
"select count(1) as dataCount from v_order_oproduct_odelivery where deleted_at is null and delivery_status =
:deliveryStatus
"
+
var
sql
=
"select count(1) as dataCount from v_order_oproduct_odelivery where deleted_at is null and delivery_status =
"
+
deliveryStatus
+
"
"
+
" and user_id = :userId and product_type like :productTypeOne "
;
var
tmpResultCount
=
await
this
.
customQuery
(
sql
,
params
);
return
tmpResultCount
&&
tmpResultCount
.
length
>
0
?
tmpResultCount
[
0
].
dataCount
:
0
;
...
...
brg-user-center/app/base/db/impl/order/orderProductDao.js
View file @
c5d6b24c
...
...
@@ -13,7 +13,7 @@ class OrderProductDao extends Dao {
creditCode
:
creditCode
,
creditCode2
:
creditCode
};
var
sql
=
"SELECT order_num,product_type_name,product_type,delivery_status,delivery_status_name,"
+
var
sql
=
"SELECT order_num,
total_sum,
product_type_name,product_type,delivery_status,delivery_status_name,"
+
"updated_at,order_snapshot FROM `v_order_oproduct_odelivery` where user_id=:user_id and "
+
"(deliver_content->'$.companyInfo' is not null and deliver_content->'$.companyInfo.creditCode'=:creditCode) "
+
// " or "+
...
...
brg-user-center/app/base/service/impl/common/txPushLogSve.js
View file @
c5d6b24c
...
...
@@ -24,6 +24,7 @@ class TxPushLogService extends ServiceBase {
if
(
!
pobj
.
interface
.
para
.
dealName
)
{
return
self
.
returnTX
(
-
1
,
"cgateway"
,
"参数错误"
,
null
)
}
try
{
var
loginfo
=
await
this
.
findOne
({
deal_name
:
pobj
.
interface
.
para
.
dealName
,
push_action_type
:
"orderPayNotify"
});
if
(
loginfo
)
{
return
self
.
returnTX
(
1
,
"cgateway"
,
"ok"
,
{
"flowId"
:
loginfo
.
flow_id
,
"resourceIds"
:
[
pobj
.
interface
.
para
.
dealName
]
})
...
...
@@ -48,14 +49,19 @@ class TxPushLogService extends ServiceBase {
"actionBody"
:
{
notifyUrl
:
""
,
actionType
:
"orderPayNotify"
,
pushUrl
:
"192.168.1.113:4011
/api/action/order/springBoard"
,
pushUrl
:
"http://brguser.brg.tencentyun.com
/api/action/order/springBoard"
,
messageBody
:
pobj
,
identifyCode
:
"orderPayNotify"
}
};
this
.
execPostByTimeOut
(
pushobj
,
settings
.
opPushUrl
());
var
a
=
await
this
.
execPostByTimeOut
(
pushobj
,
settings
.
opPushUrl
());
return
self
.
returnTX
(
1
,
"cgateway"
,
"ok"
,
{
"flowId"
:
creatlog
.
flow_id
,
"resourceIds"
:
[
pobj
.
interface
.
para
.
dealName
]
})
}
catch
(
error
)
{
console
.
log
(
error
);
return
self
.
returnTX
(
-
1
,
"cgateway"
,
"请求失败"
,
null
)
}
}
//发货检查
...
...
@@ -120,43 +126,87 @@ class TxPushLogService extends ServiceBase {
}
// {
// "version": "1.0",
// "caller": "mall_logic",
// "componentName": "mall_logic",
// "password": "mall_logic",
// "callee": "cdb",
// "eventId": 843836670,
// "seqId": "1501802577.465723597230350480",
// "spanId": "logical;1",
// "timestamp": 1501802577,
// "interface": {
// "interfaceName": "qcloud.PRODUCT_NAME.isolateResource",
// "para": {
// "appId": 123,
// "uin": "123",
// "operateUin": "123",
// "type": "cdb",
// "region": 4,
// "resourceId": "cdb-dfe8t7i9"
// "renewFlag": 0,
// "newDeadline": "2016-10-22 12:00:00",
// "billingIsolateType": "refund",
// "billingExtParam":{
// "sv_xxx":"sv_xxx"// 查询用量时业务返回的数据
// }
// }
// }
// }
// {
// "version": "1.0",
// "caller": "mall_logic",
// "componentName": "mall_logic",
// "password": "mall_logic",
// "callee": "cdb",
// "eventId": 843836670,
// "seqId": "1501802577.465723597230350480",
// "spanId": "logical;1",
// "timestamp": 1501802577,
// "interface": {
// "interfaceName": "qcloud.PRODUCT_NAME.isolateResource",
// "para": {
// "appId": 123,
// "uin": "123",
// "operateUin": "123",
// "type": "cdb",
// "region": 4,
// "resourceId": "cdb-dfe8t7i9"
// "renewFlag": 0,
// "newDeadline": "2016-10-22 12:00:00",
// "billingIsolateType": "refund",
// "billingExtParam":{
// "sv_xxx":"sv_xxx"// 查询用量时业务返回的数据
// }
// }
// }
// }
//隔离资源
async
isolateResource
(
pobj
)
{
if
(
!
pobj
.
interface
.
para
.
resourceId
)
{
return
self
.
returnTX
(
-
1
,
"mall_logic"
,
"参数错误"
,
null
)
}
var
orderProduct
=
await
this
.
orderProductDao
.
findOne
({
order_num
:
pobj
.
interface
.
para
.
resourceId
});
if
(
!
orderProduct
)
{
return
self
.
returnTX
(
-
1
,
"mall_logic"
,
"资源不存在"
,
null
)
}
if
(
orderProduct
.
dataValues
.
status
==
2
)
{
return
self
.
returnTX
(
1
,
"mall_logic"
,
"ok"
,
null
)
}
if
(
orderProduct
.
dataValues
.
status
==
3
)
{
return
self
.
returnTX
(
-
1
,
"mall_logic"
,
"资源已销毁"
,
null
)
}
await
this
.
orderProductDao
.
update
({
id
:
orderProduct
.
dataValues
.
id
,
status
:
2
,
isolated_time
:
new
Date
()
});
return
self
.
returnTX
(
1
,
"mall_logic"
,
"ok"
,
null
)
}
//销毁资源
async
destroyResource
(
pobj
)
{
if
(
!
pobj
.
interface
.
para
.
resourceId
)
{
return
self
.
returnTX
(
-
1
,
"mall_logic"
,
"参数错误"
,
null
)
}
var
orderProduct
=
await
this
.
orderProductDao
.
findOne
({
order_num
:
pobj
.
interface
.
para
.
resourceId
});
if
(
!
orderProduct
)
{
return
self
.
returnTX
(
-
1
,
"mall_logic"
,
"资源不存在"
,
null
)
}
if
(
orderProduct
.
dataValues
.
status
==
1
)
{
return
self
.
returnTX
(
-
1
,
"mall_logic"
,
"资源未隔离"
,
null
)
}
if
(
orderProduct
.
dataValues
.
status
==
3
)
{
return
self
.
returnTX
(
1
,
"mall_logic"
,
"资源已销毁"
,
null
)
}
var
flow_id
=
await
this
.
getBusUid
(
"f"
);
var
newobj
=
{
flow_id
:
flow_id
,
deal_name
:
pobj
.
interface
.
para
.
resourceId
,
request_url
:
"qcloud.PRODUCT_NAME.destroyResource"
,
requestjson
:
pobj
,
push_url
:
""
,
push_action_type
:
""
,
push_status
:
"2"
,
}
var
creatlog
=
await
this
.
create
(
newobj
);
if
(
!
creatlog
)
{
return
self
.
returnTX
(
-
1
,
"mall_logic"
,
"请求错误"
,
null
)
}
await
this
.
orderProductDao
.
update
({
id
:
orderProduct
.
dataValues
.
id
,
status
:
3
});
return
self
.
returnTX
(
1
,
"mall_logic"
,
"ok"
,
{
flowId
:
flow_id
})
}
//新购参数检查
async
checkCreate
(
pobj
)
{
...
...
brg-user-center/app/base/service/impl/need/needInfoSve.js
View file @
c5d6b24c
...
...
@@ -110,7 +110,7 @@ class NeedInfoService extends ServiceBase {
var
pushobj
=
{
"actionType"
:
"produceData"
,
// Y 功能名称
"actionBody"
:
{
notifyUrl
:
"http://
192.168.1.113:4011
/api/receive/notifyApi/springBoard"
,
notifyUrl
:
"http://
brguser.brg.tencentyun.com
/api/receive/notifyApi/springBoard"
,
actionType
:
"needSubmit"
,
pushUrl
:
settings
.
deliveryUrl
()
+
"/entService/consultation/springBoard"
,
messageBody
:
actionBody
,
...
...
@@ -128,6 +128,7 @@ class NeedInfoService extends ServiceBase {
return
system
.
getResultSuccess
();
}
catch
(
e
)
{
return
system
.
getResultFail
(
-
510
,
e
)
}
}
...
...
brg-user-center/app/base/service/impl/need/needSolutionSve.js
View file @
c5d6b24c
...
...
@@ -101,7 +101,7 @@ class NeedSolutionService extends ServiceBase {
await
self
.
dao
.
update
(
updateObj
,
t
);
await
self
.
needInfoDao
.
update
({
id
:
needinfo
.
id
,
status
:
"3"
},
t
);
//发送短信通知
self
.
sendSmsNotification
(
"15675201933"
,
needinfo
.
user_id
,
needinfo
.
consult_type
,
needinfo
.
consult_type_name
,
3
);
self
.
sendSmsNotification
(
needinfo
.
contacts_mobile
,
needinfo
.
user_id
,
needinfo
.
consult_type
,
needinfo
.
consult_type_name
,
3
);
return
system
.
getResultSuccess
();
});
...
...
@@ -126,7 +126,8 @@ class NeedSolutionService extends ServiceBase {
await
self
.
needInfoDao
.
update
({
id
:
needinfo
.
id
,
status
:
"3"
},
t
);
await
self
.
dao
.
create
(
createObj
,
t
);
//发送短信通知
self
.
sendSmsNotification
(
"15675201933"
,
needinfo
.
consult_type
,
needinfo
.
consult_type_name
,
3
);
// self.sendSmsNotification(needinfo.contacts_mobile,needinfo.consult_type,needinfo.consult_type_name,3);
self
.
sendSmsNotification
(
needinfo
.
contacts_mobile
,
needinfo
.
user_id
,
needinfo
.
consult_type
,
needinfo
.
consult_type_name
,
3
);
return
system
.
getResultSuccess
(
solution_num
);
});
...
...
brg-user-center/app/base/service/impl/order/applyInfoSve.js
View file @
c5d6b24c
...
...
@@ -118,7 +118,7 @@ class ApplyInfoService extends ServiceBase {
var
companyCount
=
await
this
.
dao
.
findCount
({
where
:
{
apply_type
:
1
,
user_id
:
ab
.
UserId
}
});
//公司数量
var
selfEmployedPersonCount
=
await
this
.
dao
.
findCount
({
where
:
{
apply_type
:
2
,
user_id
:
ab
.
UserId
}
});
//个体户数量
var
waitConfirmCount
=
await
this
.
needInfoDao
.
findCount
({
where
:
{
status
:
3
,
user_id
:
ab
.
UserId
,
consult_type
:
{
[
this
.
db
.
Op
.
like
]:
productTypeOne
}
}
});
//待确认方案数量
var
waitReceiveFileOrderCount
=
await
this
.
orderDeliveryDao
.
findOverviewCount
(
1
3
,
ab
.
UserId
,
ab
.
ProductTypeOne
);
//待收文件数量
var
waitReceiveFileOrderCount
=
await
this
.
orderDeliveryDao
.
findOverviewCount
(
1
50
,
ab
.
UserId
,
ab
.
ProductTypeOne
);
//待收文件数量
// var unpaidCount = await this.orderInfoDao.findCount({where:{order_status:0}});//待支付订单数量
if
(
ab
.
ProductTypeOne
==
"qcfw"
){
//资质证照
var
icpCount
=
await
this
.
orderInfoDao
.
findOrderCountByProductPathCode
(
"/qcfw/icp/"
,
ab
.
UserId
);
//icp数量
...
...
brg-user-center/app/base/service/impl/order/orderDeliverySve.js
View file @
c5d6b24c
...
...
@@ -139,13 +139,14 @@ class OrderDeliveryService extends ServiceBase {
var
deliver_content
=
orderdeliveryinfo
.
deliver_content
||
{};
var
updateObj
=
{
id
:
orderdeliveryinfo
.
id
,
delivery_status
:
ab
.
status
};
if
(
ab
.
deliverContent
&&
Object
.
keys
(
ab
.
deliverContent
).
length
>
0
)
{
//判断传参交付内容不为空
for
(
var
item
in
ab
.
deliverContent
)
{
deliver_content
[
item
]
=
ab
.
deliverContent
[
item
];
}
// for (var item in ab.deliverContent) {
// deliver_content[item] = ab.deliverContent[item];
// }
Object
.
assign
(
deliver_content
,
ab
.
deliverContent
);
updateObj
[
"deliver_content"
]
=
deliver_content
;
}
await
this
.
dao
.
update
(
updateObj
);
if
(
ab
.
status
==
170
||
ab
.
status
==
30
||
ab
.
status
==
160
){
//交付状态:已完成,已交付,已签收
if
(
ab
.
status
==
170
||
ab
.
status
==
30
||
ab
.
status
==
160
||
ab
.
status
==
150
){
//交付状态:已完成,已交付,已签收
this
.
createQualificationCertificateInfo
(
ab
.
orderNum
);
//创建资质证照信息
this
.
createApplyInfo
(
ab
.
orderNum
);
//创建申请主体信息
}
...
...
@@ -174,7 +175,7 @@ class OrderDeliveryService extends ServiceBase {
product_type_name
=
productArr
[
2
];
}
//联系人电话
smsParams
.
phoneNumber
=
orderdetail
.
order_snapshot
&&
orderdetail
.
order_snapshot
.
contactsPhone
?
orderdetail
.
order_snapshot
.
contactsPhone
:
"
15675201933
"
;
//联系人手机号
smsParams
.
phoneNumber
=
orderdetail
.
order_snapshot
&&
orderdetail
.
order_snapshot
.
contactsPhone
?
orderdetail
.
order_snapshot
.
contactsPhone
:
""
;
//联系人手机号
//用户id
webinfoParams
.
subAccount
=
orderdetail
.
user_id
||
""
;
//用户id
//判断联系人手机号、用户id、产品类型
...
...
@@ -277,12 +278,13 @@ class OrderDeliveryService extends ServiceBase {
}
smsParams
.
messageBody
=
smsMessageBody
;
webinfoParams
.
messageBody
=
webinfoMessageBody
;
smsParams
.
phoneNumber
=
"1567520193
3"
;
//测试电话号码
// smsParams.phoneNumber = "1307555669
3";//测试电话号码
await
this
.
utilsMsgSendSve
.
sendMessageVerify
({
phoneList
:[
smsParams
],
subAccountList
:[
webinfoParams
]});
//发送短信
}
return
;
}
}
catch
(
e
)
{
console
.
log
(
e
.
stack
)
this
.
execClient
.
execLogs
(
"orderDeliverySve.js/sendSmsNotification(发送短信通知)方法出现异常"
,
{
orderNum
:
orderNum
,
status
:
status
},
""
,
null
,
e
.
stack
);
return
;
}
...
...
@@ -372,7 +374,7 @@ class OrderDeliveryService extends ServiceBase {
apply_name
:
companyInfo
.
companyName
,
credit_code
:
companyInfo
.
creditCode
,
apply_type
:
companyInfo
.
companyType
==
"个体工商户"
?
2
:
1
,
operator
:
deliver_content
.
managerInfo
&&
deliver_content
.
managerInfo
.
operatorName
?
deliver_content
.
managerInfo
.
operatorName
:
""
,
operator
:
companyInfo
.
shareholderName
||
""
,
regist_capital
:
companyInfo
.
registeredCapital
,
business_term
:
companyInfo
.
businessTerm
,
establish_time
:
companyInfo
.
establishedTime
,
...
...
@@ -386,7 +388,7 @@ class OrderDeliveryService extends ServiceBase {
apply_name
:
companyInfo
.
companyName
,
credit_code
:
companyInfo
.
creditCode
,
apply_type
:
companyInfo
.
companyType
==
"个体工商户"
?
2
:
1
,
operator
:
deliver_content
.
managerInfo
&&
deliver_content
.
managerInfo
.
operatorName
?
deliver_content
.
managerInfo
.
operatorName
:
""
,
operator
:
companyInfo
.
shareholderName
||
""
,
regist_capital
:
companyInfo
.
registeredCapital
,
business_term
:
companyInfo
.
businessTerm
,
establish_time
:
companyInfo
.
establishedTime
,
...
...
brg-user-center/app/base/service/impl/order/orderInfoSve.js
View file @
c5d6b24c
This diff is collapsed.
Click to expand it.
brg-user-center/app/base/service/impl/utilsSve/utilsIcNameSve.js
0 → 100755
View file @
c5d6b24c
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
const
AppServiceBase
=
require
(
"../../app.base"
);
class
UtilsIcNameService
extends
AppServiceBase
{
constructor
()
{
super
();
}
/**
* 工商核名请求接口
* @param {*}
*/
async
checkBusinessNameList
(
params
)
{
var
result
=
await
this
.
execPostByTimeOut
(
params
,
settings
.
hemingUrl
());
return
result
;
}
}
module
.
exports
=
UtilsIcNameService
;
\ No newline at end of file
brg-user-center/app/base/service/impl/utilsSve/utilsMsgSendSve.js
View file @
c5d6b24c
...
...
@@ -158,7 +158,7 @@ class UtilsMsgSendService extends AppServiceBase {
if
(
sendResult
.
status
==
1
)
{
this
.
redisClient
.
setWithEx
(
shaStr
,
1
,
setCacheEx
);
}
console
.
log
(
sendResult
,
"发送通知消息-----------------------------------------------"
);
console
.
log
(
sendResult
,
"发送通知消息-----------------------------------------------"
);
return
sendResult
;
}
/**
...
...
@@ -189,23 +189,48 @@ class UtilsMsgSendService extends AppServiceBase {
"ownerUin"
:
798950673
,
"themeId"
:
364
,
"tplParams"
:
{
"titleTpl"
:
obj
.
titleTpl
,
"smsTpl"
:
obj
.
smsTpl
,
"siteTpl"
:
obj
.
siteTpl
,
"wechatTpl"
:
obj
.
wechatTpl
,
"emailTpl"
:
obj
.
emailTpl
//
"titleTpl": obj.titleTpl,
//
"smsTpl": obj.smsTpl,
//
"siteTpl": obj.siteTpl,
//
"wechatTpl": obj.wechatTpl,
//
"emailTpl": obj.emailTpl
},
"receiver"
:
{
"phoneList"
:
obj
.
phoneList
,
"subAccountList"
:
obj
.
subAccountList
,
"wechatList"
:
obj
.
wechatList
,
"emailList"
:
obj
.
emailList
//
"phoneList": obj.phoneList,
//
"subAccountList": obj.subAccountList,
//
"wechatList": obj.wechatList,
//
"emailList": obj.emailList
},
"lang"
:
"zh"
,
"sendChannel"
:
5
"sendChannel"
:
0
}
}
}
var
sendChannel
=
0
;
//1站内信、2邮件、4短信、8微信
if
(
obj
.
titleTpl
&&
obj
.
titleTpl
.
length
>
0
)
{
params
.
interface
.
para
.
tplParams
[
"titleTpl"
]
=
obj
.
titleTpl
;
}
if
(
obj
.
smsTpl
&&
obj
.
smsTpl
.
length
>
0
&&
obj
.
phoneList
&&
obj
.
phoneList
.
length
>
0
)
{
params
.
interface
.
para
.
tplParams
[
"smsTpl"
]
=
obj
.
smsTpl
;
params
.
interface
.
para
.
receiver
[
"phoneList"
]
=
obj
.
phoneList
;
sendChannel
=
sendChannel
+
4
;
}
if
(
obj
.
siteTpl
&&
obj
.
siteTpl
.
length
>
0
&&
obj
.
subAccountList
&&
obj
.
subAccountList
.
length
>
0
)
{
params
.
interface
.
para
.
tplParams
[
"siteTpl"
]
=
obj
.
siteTpl
;
params
.
interface
.
para
.
receiver
[
"subAccountList"
]
=
obj
.
subAccountList
;
sendChannel
=
sendChannel
+
1
;
}
if
(
obj
.
wechatTpl
&&
obj
.
wechatTpl
.
length
>
0
&&
obj
.
wechatList
&&
obj
.
wechatList
.
length
>
0
)
{
params
.
interface
.
para
.
tplParams
[
"wechatTpl"
]
=
obj
.
wechatTpl
;
params
.
interface
.
para
.
receiver
[
"wechatList"
]
=
obj
.
wechatList
;
sendChannel
=
sendChannel
+
8
;
}
if
(
obj
.
emailTpl
&&
obj
.
emailTpl
.
length
>
0
&&
obj
.
emailList
&&
obj
.
emailList
.
length
>
0
)
{
params
.
interface
.
para
.
tplParams
[
"emailTpl"
]
=
obj
.
emailTpl
;
params
.
interface
.
para
.
receiver
[
"emailList"
]
=
obj
.
emailList
;
sendChannel
=
sendChannel
+
2
;
}
params
.
interface
.
para
.
sendChannel
=
sendChannel
;
var
result
=
await
this
.
execPostByTimeOut
(
params
,
"http://dev.message.tencentyun.com"
);
if
(
result
.
status
!=
1
||
!
result
.
data
||
!
result
.
data
.
codeDesc
||
result
.
data
.
codeDesc
!=
"success"
)
{
return
system
.
getResult
(
null
,
"获取失败"
);
...
...
brg-user-center/app/config/settings.js
View file @
c5d6b24c
...
...
@@ -34,7 +34,14 @@ var settings = {
if
(
this
.
env
==
"dev"
||
this
.
env
==
"test"
)
{
return
"http://tx.g.com:8000"
;
}
else
{
return
"http://tx.brg.tencentyun.com"
;
return
"http://paas-service"
;
}
},
hemingUrl
:
function
()
{
if
(
this
.
env
==
"dev"
||
this
.
env
==
"test"
)
{
return
"http://192.168.1.131:15502/gsb/heming"
;
}
else
{
return
"http://ic-name-service/gsb/heming"
;
}
},
redis
:
function
()
{
...
...
@@ -61,6 +68,7 @@ var settings = {
password
:
ENVINPUT
.
DB_PWD
,
config
:
{
host
:
ENVINPUT
.
DB_HOST
,
port
:
ENVINPUT
.
DB_PORT
,
dialect
:
'mysql'
,
operatorsAliases
:
false
,
pool
:
{
...
...
brg-user-center/app/front/entry/public/apidoc/customer/ICName.md
0 → 100755
View file @
c5d6b24c
<a
name=
"menu"
href=
"/doc"
>
返回主目录
</a>
1.
[
工商核名接口
](
#icname
)
## **<a name="icname"> 工商核名接口</a>**
[
返回到目录
](
#menu
)
##### URL
[
/api/action/icapi/springBoard
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 Action:CheckBusinessNameList
```
javascript
{
"Action"
:
"CheckBusinessNameList"
,
"ActionBody"
:
{
"CityName"
:
"北京"
,
// Y 注册城市地区
"KeyWord"
:
"天达11"
,
// Y 公司字号
"BtName"
:
"文化"
,
// Y 行业类型
"OrgName"
:
""
,
// Y 组织类型
"SearchType"
:
1
,
// N 检索方式:1.公司宝ES查询 2.企查查数据接口Appkey,查询数据库 3.混合两种查询
"SitCity"
:
""
// N 1: cityname + keyword + btname + orgname
2
:
keyword
+
(
cityname
)
+
btname
+
orgname
3
:
keyword
+
btname
+
(
cityname
)
+
orgname
}
}
```
#### 返回结果
```
javascript
{
"Response"
:
{
"Status"
:
1
,
"InstanceSet"
:
{
"BrandList"
:
"[]"
,
"CityList"
:
"[]"
,
"Code"
:
"200"
,
"IdenticalCityList"
:
"[{
\"
id
\"
:0,
\"
levels
\"
:
\"
中
\"
,
\"
name
\"
:
\"
北京<em>天达</em>文化传媒有限公司
\"
,
\"
per
\"
:66,
\"
pinyin
\"
:
\"\"
,
\"
title
\"
:
\"\"
,
\"
type
\"
:
\"\"
}]"
,
"Level"
:
"低"
,
"Msg"
:
"查询完成"
,
"Point"
:
1100
,
"SensitiveList"
:
"[]"
,
"SimilarCityList"
:
"[{
\"
id
\"
:0,
\"
levels
\"
:
\"
中
\"
,
\"
name
\"
:
\"
北京星<em>天达</em>文化传播有限公司
\"
,
\"
per
\"
:63,
\"
pinyin
\"
:
\"\"
,
\"
title
\"
:
\"\"
,
\"
type
\"
:
\"\"
},{
\"
id
\"
:0,
\"
levels
\"
:
\"
中
\"
,
\"
name
\"
:
\"
北京金源<em>天达</em>文化发展中心
\"
,
\"
per
\"
:66,
\"
pinyin
\"
:
\"\"
,
\"
title
\"
:
\"\"
,
\"
type
\"
:
\"\"
},{
\"
id
\"
:0,
\"
levels
\"
:
\"
中
\"
,
\"
name
\"
:
\"
北京纬祺<em>天达</em>文化有限公司
\"
,
\"
per
\"
:66,
\"
pinyin
\"
:
\"\"
,
\"
title
\"
:
\"\"
,
\"
type
\"
:
\"\"
},{
\"
id
\"
:0,
\"
levels
\"
:
\"
中
\"
,
\"
name
\"
:
\"
北京圣<em>天达</em>文化交流有限公司
\"
,
\"
per
\"
:63,
\"
pinyin
\"
:
\"\"
,
\"
title
\"
:
\"\"
,
\"
type
\"
:
\"\"
},{
\"
id
\"
:0,
\"
levels
\"
:
\"
中
\"
,
\"
name
\"
:
\"
安艺<em>天达</em>(北京)文化传播有限公司
\"
,
\"
per
\"
:54,
\"
pinyin
\"
:
\"\"
,
\"
title
\"
:
\"\"
,
\"
type
\"
:
\"\"
},{
\"
id
\"
:0,
\"
levels
\"
:
\"
中
\"
,
\"
name
\"
:
\"
北京灵科<em>天达</em>文化用品中心
\"
,
\"
per
\"
:66,
\"
pinyin
\"
:
\"\"
,
\"
title
\"
:
\"\"
,
\"
type
\"
:
\"\"
},{
\"
id
\"
:0,
\"
levels
\"
:
\"
中
\"
,
\"
name
\"
:
\"
北京泽<em>天达</em>文化发展有限公司
\"
,
\"
per
\"
:63,
\"
pinyin
\"
:
\"\"
,
\"
title
\"
:
\"\"
,
\"
type
\"
:
\"\"
},{
\"
id
\"
:0,
\"
levels
\"
:
\"
中
\"
,
\"
name
\"
:
\"
北京佳境<em>天达</em>文化传媒有限公司
\"
,
\"
per
\"
:60,
\"
pinyin
\"
:
\"\"
,
\"
title
\"
:
\"\"
,
\"
type
\"
:
\"\"
},{
\"
id
\"
:0,
\"
levels
\"
:
\"
中
\"
,
\"
name
\"
:
\"
北京鑫业<em>天达</em>文化交流中心
\"
,
\"
per
\"
:66,
\"
pinyin
\"
:
\"\"
,
\"
title
\"
:
\"\"
,
\"
type
\"
:
\"\"
},{
\"
id
\"
:0,
\"
levels
\"
:
\"
中
\"
,
\"
name
\"
:
\"
北京智诚<em>天达</em>文化传媒有限公司
\"
,
\"
per
\"
:60,
\"
pinyin
\"
:
\"\"
,
\"
title
\"
:
\"\"
,
\"
type
\"
:
\"\"
}]"
},
"RequestId"
:
"ac3eea80-ba17-11ea-a2bb-c30cdcc6eddf"
}
}
```
返回参数说明:
```
javascript
{
"Response"
:
{
"Status"
:
1
,
"InstanceSet"
:
{
"brandList"
:
[
{
"id"
:
0
,
// Int 保留,默认0
"levels"
:
"中"
,
// String 核名的相似度,“高”或“中”或“低”:1-29,低;30-69 中;70 以上高
"name"
:
""
,
// String 商标名称
"per"
:
40
,
// Int 相似度评分,约值
"pinyin"
:
""
,
// String 如是拼音相同,返回命中词的拼音;其他返回“”
"type"
:
""
// String 保留,默认“”
}
],
"cityList"
:
[
{
"id"
:
0
,
// Int 保留,默认0
"levels"
:
"中"
,
// String 核名的相似度,“高”或“中”或“低”:1-29,低;30-69 中;70 以上高
"name"
:
""
,
// String 与字号相同的地区城市名词
"per"
:
40
,
// Int 相似度评分,约值
"pinyin"
:
""
,
// String 如是拼音相同,返回命中词的拼音;其他返回“”
"title"
:
""
,
// String 保留,默认“”
"type"
:
""
// String 保留,默认“”
}
],
"code"
:
"200"
,
"identicalCityList"
:
[
{
"id"
:
0
,
// Int 保留,默认0
"levels"
:
"中"
,
// String 核名的相似度,“高”或“中”或“低”:1-29,低;30-69 中;70 以上高
"name"
:
"<em>意欣</em>(北京)医药技术有限公司"
,
// String 企业名称或敏感词
"per"
:
40
,
// Int 相似度评分,约值
"pinyin"
:
""
,
// String 如是拼音相同,返回命中词的拼音;其他返回“”
"title"
:
""
,
// String 保留,默认“”
"type"
:
""
// String 保留,默认“”
}
],
"level"
:
"低"
,
"msg"
:
"查询完成"
,
"point"
:
800
,
"sensitiveList"
:
[
{
"id"
:
0
,
// Int 保留,默认0
"levels"
:
""
,
// String 核名的相似度,“高”或“中”或“低”:1-29,低;30-69 中;70 以上高
"name"
:
""
,
// String 企业名称或敏感词
"per"
:
""
,
// Int 相似度评分,约值
"pinyin"
:
""
,
// String 如是拼音相同,返回命中词的拼音;其他返回“”
"title"
:
""
,
// String 保留,默认“”
"type"
:
""
// String 保留,默认“”
}
],
"similarCityList"
:
[
{
"id"
:
0
,
// Int 保留,默认0
"levels"
:
"中"
,
// String 核名的相似度,“高”或“中”或“低”:1-29,低;30-69 中;70 以上高
"name"
:
"北京<em>意欣</em>千阳文化发展有限责任公司"", // String 企业名称或敏感词
"
per
": 36, // Int 相似度评分,约值
"
pinyin
": "", // String 如是拼音相同,返回命中词的拼音;其他返回“”
"
title
": "", // String 保留,默认“”
"
type
": "" // String 保留,默认“”
}
]
},
"
RequestId
": "
ac3eea80
-
ba17
-
11
ea
-
a2bb
-
c30cdcc6eddf
"
}
}
Level 准则:
Point:0-49 分通过率为高
Point:50-99 分通过率为中
Point:100 以上通过率为低
```
\ No newline at end of file
brg-user-center/app/front/entry/public/apidoc/customer/order.md
View file @
c5d6b24c
...
...
@@ -379,6 +379,16 @@
4.
工商变更 /ic/gschangs/
税控申请 /ic/sksq/
社保开户 /ic/sbopen/
银行开户 /ic/bankopen/
税控申请 /ic/sksq/
税务报道 /ic/swbd/
| 参数名 | 必填 | 类型 | 描述 |
| ---- | ---- | ---- | ---- |
| UserId | 否 | string | 用户id |
...
...
@@ -386,17 +396,6 @@
| RegionName | 是 | string | 地区拼音 |
| PathCode | 是 | string | 产品类型 |
5.
税控申请 /ic/sksq/
| 参数名 | 必填 | 类型 | 描述 |
| ---- | ---- | ---- | ---- |
|| UserId | 否 | string | 用户id |
| RegionId | 是 | string | 地区代码 |
| RegionName | 是 | string | 地区拼音 |
| PathCode | 是 | string | 产品类型 |
| TaxpayerType | 是 | string | 纳税人类型 |
| TimeSpan | 是 | string | 计费数量 |
| TimeUnit | 是 | string | 计费周期 |
6.
icp /qcfw/icp/
...
...
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