Commit bea0e9a8 by 王昆

gsb

parent 5260f3e4
...@@ -180,6 +180,9 @@ class ActionAPI extends APIBase { ...@@ -180,6 +180,9 @@ class ActionAPI extends APIBase {
case "platforMapByIds": case "platforMapByIds":
opResult = await this.saasplatformuserSve.mapByIds(action_body); opResult = await this.saasplatformuserSve.mapByIds(action_body);
break; break;
case "updatePlatformUserChannelIdBySaasId":
opResult = await this.saasplatformuserSve.updateChannelIdBySaasId(action_body);
break;
// saas商户 // saas商户
case "merchantLogin": case "merchantLogin":
......
...@@ -5,6 +5,15 @@ class SaasPlatformUserDao extends Dao { ...@@ -5,6 +5,15 @@ class SaasPlatformUserDao extends Dao {
super(Dao.getModelName(SaasPlatformUserDao)); super(Dao.getModelName(SaasPlatformUserDao));
} }
async updateChannelIdBySaasId(params) {
let sql = [];
sql.push("UPDATE `saas_platform_user`");
sql.push("SET channel_id = :channel_id");
sql.push("WHERE saas_id = :saas_id");
return await this.customUpdate(sql.join(" "), params);
}
/** /**
* 条件查询 * 条件查询
* @param {} params * @param {} params
......
...@@ -16,6 +16,7 @@ module.exports = (db, DataTypes) => { ...@@ -16,6 +16,7 @@ module.exports = (db, DataTypes) => {
defaultValue: true defaultValue: true
}, },
saas_id: DataTypes.INTEGER, saas_id: DataTypes.INTEGER,
channel_id: DataTypes.INTEGER,
}, { }, {
paranoid: true, //假的删除 paranoid: true, //假的删除
underscored: true, underscored: true,
......
...@@ -8,7 +8,12 @@ class SaasPlatformUserService extends ServiceBase { ...@@ -8,7 +8,12 @@ class SaasPlatformUserService extends ServiceBase {
this.saasbusinessDao = system.getObject("db.saas.saasbusinessDao"); this.saasbusinessDao = system.getObject("db.saas.saasbusinessDao");
} }
// 内部维护使用 async updateChannelIdBySaasId(params) {
let rs = await this.dao.updateChannelIdBySaasId(params);
return system.getResult(rs);
}
// 内部维护使用
async resetPasswordInner(params) { async resetPasswordInner(params) {
let user = await this.dao.findById(params.id); let user = await this.dao.findById(params.id);
user.password = await this.getEncryptStr(user.password); user.password = await this.getEncryptStr(user.password);
......
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