| | |
| | | /*======应用管理,admin才有权限更改======*/ |
| | | public Response insert(ApplicationDTO app) { |
| | | UserInf userInf = userInfMapper.selectById(app.getUserId()); |
| | | if(!userInf.getuName().equals("admin")){ |
| | | if(!userInf.getUName().equals("admin")){ |
| | | return new Response<>().setMsg(0,"创建应用需admin权限"); |
| | | } |
| | | mapper.insertApp(app.getApplication()); |
| | |
| | | |
| | | public Response update(ApplicationDTO app) { |
| | | UserInf userInf = userInfMapper.selectById(app.getUserId()); |
| | | if(!userInf.getuName().equals("admin")){ |
| | | return new Response<>().setMsg(0,"创建应用需admin权限"); |
| | | if(!userInf.getUName().equals("admin")){ |
| | | return new Response<>().setMsg(0,"更新应用需admin权限"); |
| | | } |
| | | int res = mapper.updateById(app.getApplication()); |
| | | if(res==1){ |
| | |
| | | |
| | | public Response delete(ApplicationDTO app) { |
| | | UserInf userInf = userInfMapper.selectById(app.getUserId()); |
| | | if(!userInf.getuName().equals("admin")){ |
| | | if(!userInf.getUName().equals("admin")){ |
| | | return new Response<>().setMsg(0,"创建应用需admin权限"); |
| | | } |
| | | //删除应用 |