Commit 9af33140 by lixinming
parents 56e4c19d 023f20cc
......@@ -163,6 +163,20 @@ export async function info({id}) {
/**
* 删除
* @param id 列表返回的userId
*/
export async function deleteAdmin({userId, id}) {
let userInfo = await findOnce(TABLEENUM.用户表, {userId:id}, ["userId", "memberState"]);
if (!userInfo || !userInfo.userId) throw new BizError(ERRORENUM.目标数据不存在);
await updateOneData(TABLEENUM.用户表, {userId:id}, { isAdmin:STATE. });
return sysTools.successResult();
}
/**
* 权限下拉列表
*/
export async function mgmtSelectList() {
......
......@@ -612,6 +612,13 @@ export const Config = {
bindBiz:rightsMgmtBiz.freeze
},
{
apiName:"删除管理员",
subUrl:'/rightsmgmt/deleteadmin',
param:[
],
bindBiz:rightsMgmtBiz.deleteAdmin
},
{
apiName:"权限下拉列表",
subUrl:'/rightsmgmt/mgmtselectlist',
param:[
......
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