| | |
| | | private ApplicationConfigMapper configMapper; |
| | | |
| | | public Response insert(Application app) { |
| | | //TODO:id返回获取异常,需要修复 |
| | | int id = mapper.insertApp(app); |
| | | return new Response<>().set(1,id,"创建成功"); |
| | | mapper.insertApp(app); |
| | | return new Response<>().set(1,app,"创建成功"); |
| | | } |
| | | |
| | | public Response getAll() { |
| | |
| | | return new Response<>().setCode(1); |
| | | } |
| | | |
| | | /**查询应用和对应的配置模块*/ |
| | | public Response getAllConfig(int appId) { |
| | | QueryWrapper<ApplicationConfig> query = Wrappers.query(); |
| | | query.eq("app_id",appId); |
| | | List<ApplicationConfig> applicationConfigs = configMapper.selectList(query); |
| | | return new Response<>().set(1,applicationConfigs); |
| | | ApplicationConfigDTO applicationConfigDTO = configMapper.getAllConfig(appId); |
| | | return new Response<>().set(1,applicationConfigDTO); |
| | | } |
| | | } |