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
e0646743
Commit
e0646743
authored
Apr 01, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsbh5
parent
fb7aa8a9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
162 additions
and
12 deletions
+162
-12
fqboss/app/base/api/impl/channelpushApi.js
+30
-3
fqboss/app/base/api/impl/channelreceiveApi.js
+36
-0
fqboss/app/base/db/impl/channelreceiveDao.js
+96
-9
fqboss/app/base/service/impl/channelreceiveSve.js
+0
-0
No files found.
fqboss/app/base/api/impl/channelpushApi.js
View file @
e0646743
...
...
@@ -13,6 +13,7 @@ class ChannelPushApi{
constructor
(){
this
.
orderSve
=
System
.
getObject
(
"service.orderSve"
);
this
.
tmflowSve
=
System
.
getObject
(
"service.tmflowSve"
);
this
.
channelreceiveSve
=
System
.
getObject
(
"service.channelreceiveSve"
);
// this.userSve=System.getObject("service.userSve");
// this.appSve=System.getObject("service.appSve");
// this.channelSve=System.getObject("service.channelSve");
...
...
@@ -314,9 +315,34 @@ class ChannelPushApi{
// officialType:"1",
// tmRegistNum:"111111",
// officialFileName:"商标注册申请书",
// officialFileUrl:"http://www.baidu.com",
// };
// return this.tmflowSve.pushTmOfficialData(pushObj);
// officialFileUrl:"http://www.baidu.com", pushChannelAssistTmData
// };pushEditChannelAssistTmData
// var co = {
// "org_name":"汉唐信通",
// "operator_name":"庄冰",
// "order_pay_state":"待付款",
// "order_state":"办理中",
// "order_company_name":"北京联大共享科技有限公司",
// "customer_phone":"13075556693",
// "customer_name":"测试李四",
// "customer_email":"2577638904@qq.com",
// "order_price":0.01,
// "payOneClassCount":1,
// "needId":"OT18202003312235gT1S",
// "order_no_class_count":[
// {
// "class_count":10,
// "order_no":"100173202"
// }
// ],
// "threeClassCount":10,
// "order_nos":[
// "100173202"
// ],
// "oneClassCount":1,
// "payThreeClassCount":10
// };
// return this.channelreceiveSve.pushEditChannelAssistTmData("4u31585290678404","dbsbzc",co);
}
}
module
.
exports
=
ChannelPushApi
;
\ No newline at end of file
fqboss/app/base/api/impl/channelreceiveApi.js
View file @
e0646743
...
...
@@ -204,5 +204,40 @@ class ChannelReceiveApi {
return
{
code
:
-
200
,
msg
:
"操作失败"
,
err
:
e
.
stack
};
}
}
//渠道商标方案确认
async
channelTmConfirm
(
pobj
,
obj
)
{
// var userInfo = obj.userInfo;
var
appInfo
=
obj
.
appInfo
;
if
(
!
appInfo
||
!
appInfo
.
app_code
)
{
return
{
code
:
-
1
,
msg
:
"appInfo参数错误"
};
}
try
{
var
app
=
await
this
.
appSve
.
dao
.
model
.
findOne
({
where
:
{
appid
:
"2e787bbaacda4c6488b9fae58fff30ba"
,
isEnabled
:
1
},
raw
:
true
});
if
(
app
)
{
obj
[
"app"
]
=
app
}
else
{
return
{
code
:
-
100
,
msg
:
"未知应用"
};
}
var
channel
=
await
this
.
channelSve
.
getChannelItem
(
appInfo
.
app_code
);
if
(
channel
)
{
obj
[
"channel"
]
=
channel
}
else
{
return
{
code
:
-
101
,
msg
:
"未知渠道"
};
}
// var user = await this.getUserInfo(userInfo, appInfo,app);
// if (user) {
// obj["user"] = user;
// } else {
// return { code: -102, msg: "未知用户" };
// }
return
await
this
.
channelreceiveSve
.
channelTmConfirm
(
obj
);
}
catch
(
e
)
{
return
{
code
:
-
200
,
msg
:
"操作失败"
,
err
:
e
.
stack
};
}
}
}
module
.
exports
=
ChannelReceiveApi
;
\ No newline at end of file
fqboss/app/base/db/impl/channelreceiveDao.js
View file @
e0646743
...
...
@@ -8,10 +8,6 @@ class ChannelReceiveDao {
//推送渠道商标状态修改信息(同步商标注册号|商标状态|推送商标回执)
async
updateChannelTmStatus
(
obj
)
{
try
{
// var tbCode = obj.tbCode;
// if (!tbCode) {
// return { code: -100, msg: "tbCode参数错误" };
// }
var
channelApiUrl
=
this
.
channelApiUrl
;
channelApiUrl
=
settings
.
channelApiUrl
(
"gsbh5"
);
var
reqUrl
=
channelApiUrl
+
"/notifyaction/internalCallsNotify/updateTmStatus"
;
...
...
@@ -21,14 +17,13 @@ class ChannelReceiveDao {
if
(
rtn
&&
rtn
.
stdout
){
rtn
=
JSON
.
parse
(
rtn
.
stdout
);
}
console
.
log
(
rtn
,
"11111111111111111111111111111"
);
if
(
rtn
.
status
==
0
)
{
await
this
.
oplogSve
.
createDb
({
logLevel
:
"info"
,
optitle
:
"gsbh5商标状态修改---成功"
,
op
:
reqUrl
,
content
:
JSON
.
stringify
(
obj
),
result
:
JSON
.
stringify
(
rtn
),
result
info
:
JSON
.
stringify
(
rtn
),
clientIp
:
""
});
}
else
{
...
...
@@ -37,7 +32,7 @@ class ChannelReceiveDao {
optitle
:
"gsbh5商标状态修改---失败"
,
op
:
reqUrl
,
content
:
JSON
.
stringify
(
obj
),
result
:
JSON
.
stringify
(
rtn
),
result
info
:
JSON
.
stringify
(
rtn
),
clientIp
:
""
});
return
{
code
:
-
200
};
...
...
@@ -48,14 +43,106 @@ class ChannelReceiveDao {
await
this
.
oplogSve
.
createDb
({
logLevel
:
"error"
,
optitle
:
"渠道商标状态修改---异常"
,
op
:
"trademarkSve/updateChannelTmStatus"
,
op
:
"app/base/db/impl/channelreceiveDao.js"
,
content
:
JSON
.
stringify
(
obj
),
resultinfo
:
JSON
.
stringify
(
e
.
stack
),
clientIp
:
""
});
return
{
code
:
-
400
,
msg
:
"操作失败"
,
err
:
e
.
stack
};
}
}
//推送辅助、担保商标注册数据
async
pushChannelAssistTmData
(
obj
){
try
{
var
channelApiUrl
=
this
.
channelApiUrl
;
channelApiUrl
=
settings
.
channelApiUrl
(
"gsbh5"
);
var
reqUrl
=
channelApiUrl
+
"/notifyaction/internalCallsNotify/nbtzreceiveAssistTmData"
;
var
rc
=
system
.
getObject
(
"util.execClient"
);
var
rtn
=
await
rc
.
execPost
(
obj
,
reqUrl
);
if
(
rtn
&&
rtn
.
stdout
){
rtn
=
JSON
.
parse
(
rtn
.
stdout
);
}
if
(
rtn
.
status
==
0
)
{
await
this
.
oplogSve
.
createDb
({
logLevel
:
"info"
,
optitle
:
"gsbh5辅助、担保商标注册数据推送---成功"
,
op
:
reqUrl
,
content
:
JSON
.
stringify
(
obj
),
resultinfo
:
JSON
.
stringify
(
rtn
),
clientIp
:
""
});
}
else
{
await
this
.
oplogSve
.
createDb
({
logLevel
:
"error"
,
optitle
:
"gsbh5辅助、担保商标注册数据推送---失败"
,
op
:
reqUrl
,
content
:
JSON
.
stringify
(
obj
),
resultinfo
:
JSON
.
stringify
(
rtn
),
clientIp
:
""
});
return
{
code
:
-
200
};
}
return
{
code
:
1
};
}
catch
(
e
)
{
console
.
log
(
e
.
stack
);
await
this
.
oplogSve
.
createDb
({
logLevel
:
"error"
,
optitle
:
"gsbh5辅助、担保商标注册数据推送---异常"
,
op
:
"app/base/db/impl/channelreceiveDao.js"
,
content
:
JSON
.
stringify
(
obj
),
resultinfo
:
JSON
.
stringify
(
e
.
stack
),
clientIp
:
""
});
return
{
code
:
-
400
,
msg
:
"操作失败"
,
err
:
e
.
stack
};
}
}
//推送辅助、担保商标注册修改数据
async
pushEditChannelAssistTmData
(
obj
){
try
{
var
channelApiUrl
=
this
.
channelApiUrl
;
channelApiUrl
=
settings
.
channelApiUrl
(
"gsbh5"
);
var
reqUrl
=
channelApiUrl
+
"/notifyaction/internalCallsNotify/nbtzreceiveEditAssistTmData"
;
var
rc
=
system
.
getObject
(
"util.execClient"
);
var
rtn
=
await
rc
.
execPost
(
obj
,
reqUrl
);
if
(
rtn
&&
rtn
.
stdout
){
rtn
=
JSON
.
parse
(
rtn
.
stdout
);
}
if
(
rtn
.
status
==
0
)
{
await
this
.
oplogSve
.
createDb
({
logLevel
:
"info"
,
optitle
:
"gsbh5辅助、担保商标注册修改数据推送---成功"
,
op
:
reqUrl
,
content
:
JSON
.
stringify
(
obj
),
result
:
JSON
.
stringify
(
rtn
),
clientIp
:
""
});
}
else
{
await
this
.
oplogSve
.
createDb
({
logLevel
:
"error"
,
optitle
:
"gsbh5辅助、担保商标注册修改数据推送---失败"
,
op
:
reqUrl
,
content
:
JSON
.
stringify
(
obj
),
result
:
JSON
.
stringify
(
rtn
),
clientIp
:
""
});
return
{
code
:
-
200
};
}
return
{
code
:
1
};
}
catch
(
e
)
{
console
.
log
(
e
.
stack
);
await
this
.
oplogSve
.
createDb
({
logLevel
:
"error"
,
optitle
:
"gsbh5辅助、担保商标注册修改数据推送---异常"
,
op
:
"app/base/db/impl/channelreceiveDao.js"
,
content
:
JSON
.
stringify
(
e
.
stack
),
clientIp
:
""
});
return
{
code
:
-
400
,
msg
:
"操作失败"
,
err
:
e
.
stack
};
}
}
}
module
.
exports
=
ChannelReceiveDao
;
// var task = new ChannelReceiveDao();
...
...
fqboss/app/base/service/impl/channelreceiveSve.js
View file @
e0646743
This diff is collapsed.
Click to expand it.
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