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
ce322bab
Commit
ce322bab
authored
Nov 18, 2020
by
Sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 代码格式
parent
e8df5b23
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
13 deletions
+8
-13
ic-deliver/app/base/service/impl/msg/msghistorySve.js
+6
-6
ic-deliver/app/base/utils/restClient.js
+2
-7
No files found.
ic-deliver/app/base/service/impl/msg/msghistorySve.js
View file @
ce322bab
...
@@ -20,12 +20,12 @@ class MsgHistoryService extends ServiceBase {
...
@@ -20,12 +20,12 @@ class MsgHistoryService extends ServiceBase {
return
msg
;
return
msg
;
}
}
async
pushBusinessLicenseMsg
(
senderId
,
targetId
,
businessLicense
_i
d
)
{
async
pushBusinessLicenseMsg
(
senderId
,
targetId
,
businessLicense
I
d
)
{
if
(
!
businessLicense
_i
d
)
{
if
(
!
businessLicense
I
d
)
{
return
0
;
return
0
;
}
}
const
notice
=
await
this
.
msgnoticeDao
.
findOne
({
fromId
:
senderId
,
toId
:
targetId
});
const
notice
=
await
this
.
msgnoticeDao
.
findOne
({
fromId
:
senderId
,
toId
:
targetId
});
if
(
notice
&&
notice
.
businessLicense_id
==
businessLicense
_i
d
)
{
if
(
notice
&&
notice
.
businessLicense_id
==
businessLicense
I
d
)
{
return
0
;
return
0
;
}
}
...
@@ -43,14 +43,14 @@ class MsgHistoryService extends ServiceBase {
...
@@ -43,14 +43,14 @@ class MsgHistoryService extends ServiceBase {
senderId
,
senderId
,
target
,
target
,
targetId
,
targetId
,
content
:
businessLicense
_i
d
,
content
:
businessLicense
I
d
,
isRead
:
false
,
isRead
:
false
,
businessLicense_id
,
businessLicense_id
:
businessLicenseId
,
};
};
const
obj
=
await
this
.
saveMsg
(
msg
);
const
obj
=
await
this
.
saveMsg
(
msg
);
const
bl
=
await
this
.
businesslicenseDao
.
findById
(
businessLicense
_i
d
);
const
bl
=
await
this
.
businesslicenseDao
.
findById
(
businessLicense
I
d
);
msg
.
businessLicense
=
bl
;
msg
.
businessLicense
=
bl
;
msg
.
id
=
obj
.
id
;
msg
.
id
=
obj
.
id
;
msg
.
created_at
=
obj
.
created_at
;
msg
.
created_at
=
obj
.
created_at
;
...
...
ic-deliver/app/base/utils/restClient.js
View file @
ce322bab
...
@@ -10,17 +10,12 @@ class RestClient {
...
@@ -10,17 +10,12 @@ class RestClient {
this
.
cmdDownLoadFilePattern
=
'curl -G -o {fileName} {url}'
;
this
.
cmdDownLoadFilePattern
=
'curl -G -o {fileName} {url}'
;
this
.
cmdPostPattern2
=
'curl -k -H
\'
Content-type: application/x-www-form-urlencoded
\'
-d
\'
{data}
\'
{url}'
;
this
.
cmdPostPattern2
=
'curl -k -H
\'
Content-type: application/x-www-form-urlencoded
\'
-d
\'
{data}
\'
{url}'
;
this
.
cmdPostPatternWithAK
=
'curl -k -H
\'
Content-type: application/json
\'
-H
\'
AccessKey:{ak}
\'
-d
\'
{data}
\'
{url}'
;
this
.
cmdPostPatternWithAK
=
'curl -k -H
\'
Content-type: application/json
\'
-H
\'
AccessKey:{ak}
\'
-d
\'
{data}
\'
{url}'
;
// 云帐户
// this.cmdPostPattern3="curl -k -H 'Content-type: application/x-www-form-urlencoded' -H 'dealer-id:"+settings.apiconfig.yunzhanghuDealer_id()+"' -H 'request-id:"+parseInt(Date.now() / 1000)+"_gsb"+"' -d '{data}' {url}";
// this.cmdGetPattern3 = "curl {-G} -k {url} --header 'dealer-id:"+settings.apiconfig.yunzhanghuDealer_id()+"'";
// e签宝
// this.cmdPostPattern4="curl -k -H 'Content-type: application/json' -H 'X-Tsign-Open-App-Id:"+settings.apiconfig.eSignBaoAppId()+"' -H 'X-Tsign-Open-App-Secret:"+settings.apiconfig.eSignBaoAppKey()+"' -d '{data}' {url}";
// form-data形式post data参数类型 md5=2&data=1
// form-data形式post data参数类型 md5=2&data=1
this
.
cmdPostPattern5
=
'curl -k --data
\'
{data}
\'
{url}'
;
this
.
cmdPostPattern5
=
'curl -k --data
\'
{data}
\'
{url}'
;
}
}
FetchGetCmd
(
subData
,
url
)
{
FetchGetCmd
(
subData
,
url
)
{
const
cmd
=
this
.
cmdGetPattern
.
replace
(
/
\{\
-
G
\}
/g
,
'-G'
).
replace
(
/
\{
data
\}
/g
,
subData
)
const
cmd
=
this
.
cmdGetPattern
.
replace
(
/
\{
-G
\}
/g
,
'-G'
).
replace
(
/
\{
data
\}
/g
,
subData
)
.
replace
(
/
\{
url
\}
/g
,
url
);
.
replace
(
/
\{
url
\}
/g
,
url
);
return
cmd
;
return
cmd
;
}
}
...
@@ -58,7 +53,7 @@ class RestClient {
...
@@ -58,7 +53,7 @@ class RestClient {
return
cmd
;
return
cmd
;
}
}
FetchGetCmd3
(
url
)
{
FetchGetCmd3
(
url
)
{
const
cmd
=
this
.
cmdGetPattern3
.
replace
(
/
\{
\
-
G
\}
/g
,
'-G'
).
replace
(
/
\{
url
\}
/g
,
url
);
const
cmd
=
this
.
cmdGetPattern3
.
replace
(
/
\{
-G
\}
/g
,
'-G'
).
replace
(
/
\{
url
\}
/g
,
url
);
return
cmd
;
return
cmd
;
}
}
FetchPostCmd4
(
subData
,
url
)
{
FetchPostCmd4
(
subData
,
url
)
{
...
...
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