Commit 824426f7 authored by Quxl's avatar Quxl

x

parent a7ee36b8
......@@ -30,4 +30,6 @@ public interface AdminAuthService {
void saveOrUpdateMenu(Fc_admin_menu menu);
void enableAdmin(Integer[] adminid);
}
......@@ -50,6 +50,12 @@ public class AdminAuthServiceImpl implements AdminAuthService {
jdbcTemplate.executeUpdate(sql, (Object[])adminid);
}
@Override
public void enableAdmin(Integer[] adminid) {
String sql = "update fc_admin set state = 1 where admin in (" + StringUtil.join("?", ", ", adminid.length) + ")";
jdbcTemplate.executeUpdate(sql, (Object[])adminid);
}
@Override
public void saveAdmin(Fc_admin admin) {
jdbcTemplate.save(admin);
......
......@@ -126,6 +126,18 @@ public class AdminAuthController {
return Rjx.jsonOk();
}
@ResponseBody
@PostMapping("adminEnabled")
@ApiOperation("禁用管理员")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="adminid", value="管理员ID", allowMultiple=true),
})
public Object adminEnabled(Integer[] adminid) {
XException.assertNotBlank("管理员ID不能为空", (Object[])adminid);
service.enableAdmin(adminid);
return Rjx.jsonOk();
}
@ResponseBody
@PostMapping("groupList")
@ApiOperation("管理组分页查询")
......
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