Commit bea0e9a8 by 王昆

gsb

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