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
02d00cd6
Commit
02d00cd6
authored
May 13, 2020
by
王栋源
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wdy
parent
ec80560a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
33 deletions
+59
-33
igirl-web/app/base/api/impl/tmtransactionApi.js
+41
-18
igirl-web/app/base/controller/impl/toolCtl.js
+0
-0
igirl-web/app/base/db/models/pytmreport.js
+18
-15
No files found.
igirl-web/app/base/api/impl/tmtransactionApi.js
View file @
02d00cd6
...
...
@@ -10,7 +10,8 @@ class TmtransactionApi extends ApiBase {
this
.
utilstmtasktradeSve
=
System
.
getObject
(
"service.utilstmtasktradeSve"
);
this
.
pytmreportSve
=
System
.
getObject
(
"service.pytmreportSve"
);
this
.
mailClient
=
System
.
getObject
(
"util.mailClient"
);
this
.
redisClient
=
System
.
getObject
(
"util.redisClient"
);
this
.
redisClient
=
System
.
getObject
(
"util.redisClient"
);
this
.
execClient
=
System
.
getObject
(
"util.execClient"
);
};
//获取某类型的交易商标 post
async
findByTmType
(
obj
)
{
...
...
@@ -50,13 +51,20 @@ class TmtransactionApi extends ApiBase {
async
tmreport
()
{
var
id
=
await
this
.
redisClient
.
lpop
(
"create_
tm
repotCache"
);
var
id
=
await
this
.
redisClient
.
lpop
(
"create_repotCache"
);
console
.
log
(
id
,
"商标检索报告执行开始................."
);
if
(
id
)
{
var
info
=
await
this
.
pytmreportSve
.
dao
.
findById
(
id
);
console
.
log
(
info
.
dataValues
);
if
(
info
)
{
var
url
=
"http://43.247.184.92:8015/tmdoc/api/createdoc?mycompanyname="
+
encodeURIComponent
(
info
.
companyname
);
var
cpush
=
""
;
if
(
info
.
push_type
==
1
)
{
cpush
=
"http://43.247.184.92:8015/tmdoc/api/createdoc?mycompanyname="
;
}
if
(
info
.
push_type
==
2
)
{
cpush
=
"http://43.247.184.94:19500/patentdoc/api/createdoc?mycompanyname="
;
}
var
url
=
cpush
+
encodeURIComponent
(
info
.
companyname
);
var
rc
=
System
.
getObject
(
"util.execClient"
);
var
rtn
=
null
;
try
{
...
...
@@ -66,26 +74,41 @@ class TmtransactionApi extends ApiBase {
// console.log("fanhui");
console
.
log
(
j
);
if
(
j
.
indexOf
(
"gsb-zc.oss-cn-beijing.aliyuncs.com"
)
>=
0
)
{
var
text
=
"企业监控报告"
;
var
html
=
'<a href="'
+
j
+
'">企业监控报告</a>'
var
mresult
=
this
.
mailClient
.
sendMsg
(
info
.
email
,
"企业监控报告"
,
null
,
html
,
null
,
null
,
[]);
//发送成功后result的值:250 Data Ok: queued as freedom
if
(
info
.
push_type
==
1
)
{
if
(
info
.
type
==
1
)
{
var
html
=
'<a href="'
+
j
+
'">企业商标监控报告</a>'
this
.
mailClient
.
sendMsg
(
info
.
email
,
"企业商标监控报告"
,
null
,
html
,
null
,
null
,
[]);
//发送成功后result的值:250 Data Ok: queued as freedom
}
if
(
info
.
type
==
2
)
{
var
html
=
'<a href="'
+
j
+
'">企业专利监控报告</a>'
this
.
mailClient
.
sendMsg
(
info
.
email
,
"企业专利监控报告"
,
null
,
html
,
null
,
null
,
[]);
//发送成功后result的值:250 Data Ok: queued as freedom
}
}
if
(
info
.
push_type
==
2
)
{
var
pobj
=
{
fid
:
info
.
wxuser_id
,
title
:
info
.
companyname
,
linkUrl
:
j
}
var
rtn
=
await
this
.
execClient
.
execPost
(
pobj
,
info
.
notifyUrl
);
}
info
.
dataValues
.
filepath
=
j
;
info
.
dataValues
.
status
=
1
;
var
result
=
await
this
.
pytmreportSve
.
dao
.
model
.
update
(
info
.
dataValues
,
{
where
:
{
id
:
id
}
});
logCtl
.
info
({
optitle
:
"检索报告执行结果"
,
op
:
"/igirl-web/app/base/db/task/CreaterepotTask.js"
,
content
:
"id="
+
id
+
"执行结果:"
+
j
,
clientIp
:
""
});
return
result
;
}
info
.
dataValues
.
filepath
=
j
;
info
.
dataValues
.
status
=
1
;
var
result
=
await
this
.
pytmreportSve
.
dao
.
model
.
update
(
info
.
dataValues
,
{
where
:
{
id
:
id
}
});
logCtl
.
info
({
optitle
:
"商标检索报告执行结果"
,
op
:
"/igirl-web/app/base/db/task/CreatetmrepotTask.js"
,
content
:
"id="
+
id
+
"执行结果:"
+
j
,
clientIp
:
""
});
return
result
;
}
catch
(
e
)
{
console
.
log
(
e
);
//日志记录
logCtl
.
error
({
optitle
:
"
商标
检索报告执行结果-error"
,
op
:
"/igirl-web/app/base/db/task/Create
tm
repotTask.js"
,
optitle
:
"检索报告执行结果-error"
,
op
:
"/igirl-web/app/base/db/task/CreaterepotTask.js"
,
content
:
e
.
stack
,
clientIp
:
""
});
...
...
igirl-web/app/base/controller/impl/toolCtl.js
View file @
02d00cd6
This diff is collapsed.
Click to expand it.
igirl-web/app/base/db/models/pytmreport.js
View file @
02d00cd6
...
...
@@ -4,19 +4,22 @@ module.exports = (db, DataTypes) => {
filepath
:
DataTypes
.
STRING
,
phonenum
:
DataTypes
.
STRING
,
email
:
DataTypes
.
STRING
,
status
:
DataTypes
.
INTEGER
,
type
:
DataTypes
.
INTEGER
,
channel_company_id
:
DataTypes
.
INTEGER
,
//统计公司id(通过公司渠道码获取,用于渠道用户统计使用商标报告功能情况)
wxuser_id
:
DataTypes
.
INTEGER
//微信用户id(使用商标报告功能的微信用户id,存在于wx_user表中)
},{
paranoid
:
true
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
tableName
:
'py_tmreport'
,
validate
:
{
}
});
status
:
DataTypes
.
INTEGER
,
type
:
DataTypes
.
INTEGER
,
channel_company_id
:
DataTypes
.
INTEGER
,
//统计公司id(通过公司渠道码获取,用于渠道用户统计使用商标报告功能情况)
wxuser_id
:
DataTypes
.
INTEGER
,
//微信用户id(使用商标报告功能的微信用户id,存在于wx_user表中)
notifyUrl
:
DataTypes
.
STRING
,
source
:
DataTypes
.
STRING
,
push_type
:
DataTypes
.
STRING
,
},
{
paranoid
:
true
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
tableName
:
'py_tmreport'
,
validate
:
{
}
});
}
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