Commit 8c3b0aa3 by zhaoxiqing

gsb

parent 69db1e3d
......@@ -587,44 +587,44 @@ class EntcontractService extends ServiceBase {
//----------------
let ecompany = await this.ecompanyDao.findOne({
"name": params.merchantName,
})
if (!ecompany) {
// 创建ecompany
ecompany = await this.ecompanyDao.create({
"name": params.merchantName,
"nameA": '',
"isEnabled": true,
"isQuiet": true,
"sealurl": "",
"encryptkey": "",
"posturl": ""
});
}
let busi = await this.ecompanybusiDao.findOne({
ecompany_id: ecompany.id,
etemplate_id: 10287,
});
if (!busi) {
await this.ecompanybusiDao.create({
ecompany_id: ecompany.id,
etemplate_id: 10287,
postwxurl: "",
postsignurl: "",
appId: reso.data.appId,
mchtId: reso.data.mchtId,
mainId: reso.data.mainId,
key: reso.data.secret,
});
} else {
busi.appId = reso.data.appId;
busi.mchtId = reso.data.mchtId;
busi.mainId = reso.data.mainId;
busi.key = reso.data.secret;
await busi.save();
}
// let ecompany = await this.ecompanyDao.findOne({
// "name": params.merchantName,
// })
// if (!ecompany) {
// // 创建ecompany
// ecompany = await this.ecompanyDao.create({
// "name": params.merchantName,
// "nameA": '',
// "isEnabled": true,
// "isQuiet": true,
// "sealurl": "",
// "encryptkey": "",
// "posturl": ""
// });
// }
//
// let busi = await this.ecompanybusiDao.findOne({
// ecompany_id: ecompany.id,
// etemplate_id: 10287,
// });
// if (!busi) {
// await this.ecompanybusiDao.create({
// ecompany_id: ecompany.id,
// etemplate_id: 10287,
// postwxurl: "",
// postsignurl: "",
// appId: reso.data.appId,
// mchtId: reso.data.mchtId,
// mainId: reso.data.mainId,
// key: reso.data.secret,
// });
// } else {
// busi.appId = reso.data.appId;
// busi.mchtId = reso.data.mchtId;
// busi.mainId = reso.data.mainId;
// busi.key = reso.data.secret;
// await busi.save();
// }
//----------------
return reso;
......
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