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
41d2f408
Commit
41d2f408
authored
Jul 14, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
e17a44f3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
107 additions
and
37 deletions
+107
-37
brg-user-center/app/base/api/impl/action/statisticData.js
+83
-20
brg-user-center/app/base/service/impl/utilsSve/utilsIcNameSve.js
+9
-1
brg-user-center/app/config/settings.js
+3
-3
brg-user-center/app/front/entry/public/apidoc/README.md
+4
-2
brg-user-center/app/front/entry/public/apidoc/customer/ICName.md
+8
-11
No files found.
brg-user-center/app/base/api/impl/action/statisticData.js
View file @
41d2f408
...
...
@@ -7,33 +7,42 @@ class icName extends APIBase {
this
.
utilsIcNameSve
=
system
.
getObject
(
"service.utilsSve.utilsIcNameSve"
);
this
.
orderproductSve
=
system
.
getObject
(
"service.order.orderproductSve"
);
}
async
get
Vat
(
pobj
,
qobj
,
req
)
{
async
get
ProductUsageInfo
(
pobj
,
qobj
,
req
)
{
if
(
!
pobj
){
return
system
.
getConsoleResultFail
(
-
100
,
"
参数异常
"
);
return
system
.
getConsoleResultFail
(
-
100
,
"
parameter exception
"
);
}
var
userId
=
null
;
userId
=
pobj
.
openId
||
pobj
.
uin
;
if
(
!
userId
){
return
system
.
getConsoleResultFail
(
-
100
,
"用户id不能为空"
);
if
(
!
pobj
.
interface
){
return
system
.
getConsoleResultFail
(
-
101
,
"interface can not be empty"
);
}
var
count
=
await
this
.
orderproductSve
.
dao
.
findCount
({
where
:
{
user_id
:
userId
,
product_type
:
{
[
this
.
db
.
Op
.
like
]:
"%/qcfw/%"
}
}
});
//增值电信产品数量
var
resData
=
{
"nums"
:
count
,
// 产品使用数量
"isOpen"
:
1
,
// 0未开通此产品;1已开通此产品
"unit"
:
"次"
// 产品使用数量单位
};
return
system
.
getConsoleResultSuccess
(
resData
);
}
async
getBusinessRegistration
(
pobj
,
qobj
,
req
)
{
if
(
!
pobj
){
return
system
.
getConsoleResultFail
(
-
100
,
"参数异常"
);
if
(
!
pobj
.
interface
.
para
){
return
system
.
getConsoleResultFail
(
-
102
,
"para can not be empty"
);
}
if
(
!
pobj
.
interface
.
interfaceName
){
return
system
.
getConsoleResultFail
(
-
103
,
"interfaceName can not be empty"
);
}
var
productType
=
null
;
if
(
pobj
.
interface
.
interfaceName
==
"getVatProductUsageInfo"
){
productType
=
"qcfw"
;
}
if
(
pobj
.
interface
.
interfaceName
==
"getBusinessRegistrationProductUsageInfo"
){
productType
=
"ic"
;
}
if
(
!
productType
){
return
system
.
getConsoleResultFail
(
-
104
,
"invalid interfaceName"
);
}
var
para
=
pobj
.
interface
.
para
;
var
userId
=
null
;
userId
=
p
obj
.
openId
||
pobj
.
uin
;
userId
=
p
ara
.
openId
||
para
.
uin
;
if
(
!
userId
){
return
system
.
getConsoleResultFail
(
-
100
,
"用户id不能为空"
);
return
system
.
getConsoleResultFail
(
-
105
,
"unknown user account"
);
}
if
(
!
para
.
hasOwnProperty
(
"appId"
)){
return
system
.
getConsoleResultFail
(
-
106
,
"appId can not be empty"
);
}
if
(
!
para
.
hasOwnProperty
(
"projectId"
)){
return
system
.
getConsoleResultFail
(
-
107
,
"projectId can not be empty"
);
}
var
count
=
await
this
.
orderproductSve
.
dao
.
findCount
({
where
:
{
user_id
:
userId
,
product_type
:
{
[
this
.
db
.
Op
.
like
]:
"%/ic
/%"
}
}
});
//增值电信产品数量
var
count
=
await
this
.
orderproductSve
.
dao
.
findCount
({
where
:
{
user_id
:
userId
,
product_type
:
{
[
this
.
orderproductSve
.
db
.
Op
.
like
]:
"%/"
+
productType
+
"
/%"
}
}
});
//增值电信产品数量
var
resData
=
{
"nums"
:
count
,
// 产品使用数量
"isOpen"
:
1
,
// 0未开通此产品;1已开通此产品
...
...
@@ -41,5 +50,59 @@ class icName extends APIBase {
};
return
system
.
getConsoleResultSuccess
(
resData
);
}
// async getVat(pobj, qobj, req) {
// if(!pobj){
// return system.getConsoleResultFail(-100, "参数异常");
// }
// if(!pobj.interface){
// return system.getConsoleResultFail(-101, "interface can not be empty!");
// }
// if(!pobj.interface.para){
// return system.getConsoleResultFail(-102, "para can not be empty!");
// }
// if(!pobj.interface.interfaceName){
// return system.getConsoleResultFail(-103, "interfaceName can not be empty!");
// }
// var para = pobj.interface.para;
// var userId = null;
// userId=para.openId || para.uin;
// if(!userId){
// return system.getConsoleResultFail(-104, "用户id不能为空");
// }
// var count = await this.orderproductSve.dao.findCount({ where: {user_id: userId, product_type: { [this.orderproductSve.db.Op.like]: "%/qcfw/%" } } });//增值电信产品数量
// var resData = {
// "nums": count, // 产品使用数量
// "isOpen": 1, // 0未开通此产品;1已开通此产品
// "unit": "次" // 产品使用数量单位
// };
// return system.getConsoleResultSuccess(resData);
// }
// async getBusinessRegistration(pobj, qobj, req) {
// if(!pobj){
// return system.getConsoleResultFail(-100, "参数异常");
// }
// if(!pobj.interface){
// return system.getConsoleResultFail(-101, "interface can not be empty!");
// }
// if(!pobj.interface.para){
// return system.getConsoleResultFail(-102, "para can not be empty!");
// }
// if(!pobj.interface.interfaceName){
// return system.getConsoleResultFail(-103, "interfaceName can not be empty!");
// }
// var para = pobj.interface.para;
// var userId = null;
// userId=para.openId || para.uin;
// if(!userId){
// return system.getConsoleResultFail(-104, "用户id不能为空");
// }
// var count = await this.orderproductSve.dao.findCount({ where: {user_id: userId, product_type: { [this.orderproductSve.db.Op.like]: "%/ic/%" } } });//增值电信产品数量
// var resData = {
// "nums": count, // 产品使用数量
// "isOpen": 1, // 0未开通此产品;1已开通此产品
// "unit": "次" // 产品使用数量单位
// };
// return system.getConsoleResultSuccess(resData);
// }
}
module
.
exports
=
icName
;
brg-user-center/app/base/service/impl/utilsSve/utilsIcNameSve.js
View file @
41d2f408
...
...
@@ -12,7 +12,15 @@ class UtilsIcNameService extends AppServiceBase {
* @param {*}
*/
async
checkBusinessNameList
(
params
,
req
)
{
var
result
=
await
this
.
execPostByTimeOut
(
req
,
params
,
settings
.
hemingUrl
());
var
obj
=
{
cityname
:
params
.
CityName
,
keyword
:
params
.
KeyWord
,
btname
:
params
.
IndustryType
,
orgname
:
params
.
OrganizationType
,
searchtype
:
params
.
SearchType
||
""
,
sitcity
:
params
.
SitCity
||
""
}
var
result
=
await
this
.
execPostByTimeOut
(
req
,
obj
,
settings
.
checkIcNameUrl
());
return
result
;
}
...
...
brg-user-center/app/config/settings.js
View file @
41d2f408
...
...
@@ -37,11 +37,11 @@ var settings = {
return
"http://tx.brg.tencentyun.com"
;
}
},
heming
Url
:
function
()
{
checkIcName
Url
:
function
()
{
if
(
this
.
env
==
"dev"
||
this
.
env
==
"test"
)
{
return
"http://1
92.168.1.131:15502/gsb/heming
"
;
return
"http://1
27.0.0.1:35502//IcName/CheckName
"
;
}
else
{
return
"http://ic-name-service/
gsb/heming
"
;
return
"http://ic-name-service/
/IcName/CheckName
"
;
}
},
redis
:
function
()
{
...
...
brg-user-center/app/front/entry/public/apidoc/README.md
View file @
41d2f408
...
...
@@ -8,4 +8,6 @@
## 3. 用户控制台
1
[
用户订单接口
](
doc/api/customer/order.md
)
## 4. 消息中心
1
[
消息中心接口
](
doc/api/platform/commonMsg.md
)
\ No newline at end of file
1
[
消息中心接口
](
doc/api/platform/commonMsg.md
)
## 5. 工商核名相关接口
1
[
工商核名相关接口
](
doc/api/customer/ICName.md
)
\ No newline at end of file
brg-user-center/app/front/entry/public/apidoc/customer/ICName.md
View file @
41d2f408
...
...
@@ -13,17 +13,14 @@
```
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
}
"CityName"
:
"北京"
,
// Y 注册城市地区
"KeyWord"
:
"天达11"
,
// Y 公司字号
"IndustryType"
:
"文化"
,
// Y 行业类型
"OrganizationType"
:
""
,
// Y 组织类型
"SearchType"
:
1
,
// N 检索方式:1.公司宝ES查询 2.企查查数据接口Appkey,查询数据库 3.混合两种查询
"SitCity"
:
""
// N 1: CityName + KeyWord + IndustryType + OrganizationType
2
:
KeyWord
+
CityName
+
IndustryType
+
OrganizationType
3
:
KeyWord
+
IndustryType
+
CityName
+
OrganizationType
}
```
...
...
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