Commit 1bee345e by 王昆

gsb

parent 9ed4882e
module.exports = (db, DataTypes) => {
return db.define("merchantapi", {
secret: DataTypes.STRING,
merchant_id: DataTypes.BIGINT,
name : DataTypes.STRING,
secret: DataTypes.STRING,
ip: DataTypes.STRING,
merchant_id: DataTypes.BIGINT,
is_enabled:{
type:DataTypes.BOOLEAN,
defaultValue: true
},
},{
paranoid: true, //假的删除
underscored: true,
......
......@@ -68,8 +68,8 @@ class MerchantService extends ServiceBase {
} else {
params.id = id;
rtn = await this.dao.create(params);
var secret = await this.getUidInfo(32);
this.merchantapiSve.create({merchant_id: id, name: merchant.name, secret: secret});
var secret = (await this.getUidInfo(32)).toLowerCase();
this.merchantapiSve.create({merchant_id: id, name: merchant.name, secret: secret, is_enabled: true});
}
return system.getResultSuccess(rtn);
} 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