Commit ce322bab by Sxy

fix: 代码格式

parent e8df5b23
...@@ -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_id) { async pushBusinessLicenseMsg(senderId, targetId, businessLicenseId) {
if (!businessLicense_id) { if (!businessLicenseId) {
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_id) { if (notice && notice.businessLicense_id == businessLicenseId) {
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_id, content: businessLicenseId,
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_id); const bl = await this.businesslicenseDao.findById(businessLicenseId);
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;
......
...@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment