Commit 9ed4882e by 王昆

gsb

parent 383d07fb
...@@ -2,7 +2,8 @@ module.exports = (db, DataTypes) => { ...@@ -2,7 +2,8 @@ module.exports = (db, DataTypes) => {
return db.define("merchantapi", { return db.define("merchantapi", {
secret: DataTypes.STRING, secret: DataTypes.STRING,
name : DataTypes.STRING, name : DataTypes.STRING,
ip: DataTypes.TINYINT, ip: DataTypes.STRING,
merchant_id: DataTypes.BIGINT,
},{ },{
paranoid: true, //假的删除 paranoid: true, //假的删除
underscored: true, underscored: true,
......
...@@ -69,7 +69,7 @@ class MerchantService extends ServiceBase { ...@@ -69,7 +69,7 @@ class MerchantService extends ServiceBase {
params.id = id; params.id = id;
rtn = await this.dao.create(params); rtn = await this.dao.create(params);
var secret = await this.getUidInfo(32); var secret = await this.getUidInfo(32);
this.merchantapiSve.create({id: id, secret: secret}); this.merchantapiSve.create({merchant_id: id, name: merchant.name, secret: secret});
} }
return system.getResultSuccess(rtn); return system.getResultSuccess(rtn);
} catch (e) { } catch (e) {
......
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