Commit cc8c4712c57e83a5af2a495def3cf564b0aae1ab
1 parent
97694da9
fix: add new ability
Showing
5 changed files
with
16 additions
and
2 deletions
redis-dockerfile
| @@ -2,6 +2,6 @@ FROM redis:6.2 | @@ -2,6 +2,6 @@ FROM redis:6.2 | ||
| 2 | MAINTAINER guzijian | 2 | MAINTAINER guzijian |
| 3 | EXPOSE 6379 | 3 | EXPOSE 6379 |
| 4 | # 设置Redis快照 | 4 | # 设置Redis快照 |
| 5 | -RUN sed -i 's/^# save ""/save 900 1\nsave 300 10\nsave 60 10000/g' /etc/redis/redis.conf | 5 | +# RUN sed -i 's/^# save ""/save 900 1\nsave 300 10\nsave 60 10000/g' /etc/redis/redis.conf |
| 6 | # 确保启动时使用容器内的配置 | 6 | # 确保启动时使用容器内的配置 |
| 7 | CMD ["redis-server", "/etc/redis/redis.conf"] | 7 | CMD ["redis-server", "/etc/redis/redis.conf"] |
| 8 | \ No newline at end of file | 8 | \ No newline at end of file |
ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
| @@ -49,7 +49,7 @@ public class RuoYiApplication { | @@ -49,7 +49,7 @@ public class RuoYiApplication { | ||
| 49 | String sqlUrl = env.getProperty("spring.datasource.druid.master.url"); | 49 | String sqlUrl = env.getProperty("spring.datasource.druid.master.url"); |
| 50 | List<String> sqlInfo = getSqlInfo(sqlUrl); | 50 | List<String> sqlInfo = getSqlInfo(sqlUrl); |
| 51 | log.info( | 51 | log.info( |
| 52 | - "\n Swagger访问地址:http://" + ip + ":" + port + path + "swagger-ui/index.html \n" + | 52 | + "\n Swagger访问地址:http://" + ip + ":" + port + path + "doc.html \n" + |
| 53 | " Redis服务器地址:" + redisHost + ":" + redisPort + "\n" + | 53 | " Redis服务器地址:" + redisHost + ":" + redisPort + "\n" + |
| 54 | " Mysql服务器地址:" + sqlInfo.get(0) + ":" + sqlInfo.get(1)); | 54 | " Mysql服务器地址:" + sqlInfo.get(0) + ":" + sqlInfo.get(1)); |
| 55 | } | 55 | } |
ruoyi-admin/src/main/java/com/ruoyi/eexception/controller/EquipmentExceptionController.java
| @@ -2,6 +2,9 @@ package com.ruoyi.eexception.controller; | @@ -2,6 +2,9 @@ package com.ruoyi.eexception.controller; | ||
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import javax.servlet.http.HttpServletResponse; | 4 | import javax.servlet.http.HttpServletResponse; |
| 5 | + | ||
| 6 | +import io.swagger.annotations.Api; | ||
| 7 | +import io.swagger.annotations.ApiOperation; | ||
| 5 | import org.springframework.security.access.prepost.PreAuthorize; | 8 | import org.springframework.security.access.prepost.PreAuthorize; |
| 6 | import org.springframework.beans.factory.annotation.Autowired; | 9 | import org.springframework.beans.factory.annotation.Autowired; |
| 7 | import org.springframework.web.bind.annotation.GetMapping; | 10 | import org.springframework.web.bind.annotation.GetMapping; |
| @@ -29,6 +32,7 @@ import com.ruoyi.common.core.page.TableDataInfo; | @@ -29,6 +32,7 @@ import com.ruoyi.common.core.page.TableDataInfo; | ||
| 29 | */ | 32 | */ |
| 30 | @RestController | 33 | @RestController |
| 31 | @RequestMapping("/eexception/eexception") | 34 | @RequestMapping("/eexception/eexception") |
| 35 | +@Api(tags = "异常设备管理") | ||
| 32 | public class EquipmentExceptionController extends BaseController | 36 | public class EquipmentExceptionController extends BaseController |
| 33 | { | 37 | { |
| 34 | @Autowired | 38 | @Autowired |
| @@ -39,6 +43,7 @@ public class EquipmentExceptionController extends BaseController | @@ -39,6 +43,7 @@ public class EquipmentExceptionController extends BaseController | ||
| 39 | */ | 43 | */ |
| 40 | @PreAuthorize("@ss.hasPermi('eexception:eexception:list')") | 44 | @PreAuthorize("@ss.hasPermi('eexception:eexception:list')") |
| 41 | @GetMapping("/list") | 45 | @GetMapping("/list") |
| 46 | + @ApiOperation("查询设备异常记录列表") | ||
| 42 | public TableDataInfo list(EquipmentException equipmentException) | 47 | public TableDataInfo list(EquipmentException equipmentException) |
| 43 | { | 48 | { |
| 44 | startPage(); | 49 | startPage(); |
| @@ -52,6 +57,7 @@ public class EquipmentExceptionController extends BaseController | @@ -52,6 +57,7 @@ public class EquipmentExceptionController extends BaseController | ||
| 52 | @PreAuthorize("@ss.hasPermi('eexception:eexception:export')") | 57 | @PreAuthorize("@ss.hasPermi('eexception:eexception:export')") |
| 53 | @Log(title = "设备异常记录", businessType = BusinessType.EXPORT) | 58 | @Log(title = "设备异常记录", businessType = BusinessType.EXPORT) |
| 54 | @PostMapping("/export") | 59 | @PostMapping("/export") |
| 60 | + @ApiOperation("导出设备异常记录列表") | ||
| 55 | public void export(HttpServletResponse response, EquipmentException equipmentException) | 61 | public void export(HttpServletResponse response, EquipmentException equipmentException) |
| 56 | { | 62 | { |
| 57 | List<EquipmentException> list = equipmentExceptionService.selectEquipmentExceptionList(equipmentException); | 63 | List<EquipmentException> list = equipmentExceptionService.selectEquipmentExceptionList(equipmentException); |
| @@ -64,6 +70,7 @@ public class EquipmentExceptionController extends BaseController | @@ -64,6 +70,7 @@ public class EquipmentExceptionController extends BaseController | ||
| 64 | */ | 70 | */ |
| 65 | @PreAuthorize("@ss.hasPermi('eexception:eexception:query')") | 71 | @PreAuthorize("@ss.hasPermi('eexception:eexception:query')") |
| 66 | @GetMapping(value = "/{id}") | 72 | @GetMapping(value = "/{id}") |
| 73 | + @ApiOperation("获取设备异常记录详细信息") | ||
| 67 | public AjaxResult getInfo(@PathVariable("id") Long id) | 74 | public AjaxResult getInfo(@PathVariable("id") Long id) |
| 68 | { | 75 | { |
| 69 | return success(equipmentExceptionService.selectEquipmentExceptionById(id)); | 76 | return success(equipmentExceptionService.selectEquipmentExceptionById(id)); |
| @@ -75,6 +82,7 @@ public class EquipmentExceptionController extends BaseController | @@ -75,6 +82,7 @@ public class EquipmentExceptionController extends BaseController | ||
| 75 | @PreAuthorize("@ss.hasPermi('eexception:eexception:add')") | 82 | @PreAuthorize("@ss.hasPermi('eexception:eexception:add')") |
| 76 | @Log(title = "设备异常记录", businessType = BusinessType.INSERT) | 83 | @Log(title = "设备异常记录", businessType = BusinessType.INSERT) |
| 77 | @PostMapping | 84 | @PostMapping |
| 85 | + @ApiOperation("新增设备异常记录") | ||
| 78 | public AjaxResult add(@RequestBody EquipmentException equipmentException) | 86 | public AjaxResult add(@RequestBody EquipmentException equipmentException) |
| 79 | { | 87 | { |
| 80 | return toAjax(equipmentExceptionService.insertEquipmentException(equipmentException)); | 88 | return toAjax(equipmentExceptionService.insertEquipmentException(equipmentException)); |
| @@ -86,6 +94,7 @@ public class EquipmentExceptionController extends BaseController | @@ -86,6 +94,7 @@ public class EquipmentExceptionController extends BaseController | ||
| 86 | @PreAuthorize("@ss.hasPermi('eexception:eexception:edit')") | 94 | @PreAuthorize("@ss.hasPermi('eexception:eexception:edit')") |
| 87 | @Log(title = "设备异常记录", businessType = BusinessType.UPDATE) | 95 | @Log(title = "设备异常记录", businessType = BusinessType.UPDATE) |
| 88 | @PutMapping | 96 | @PutMapping |
| 97 | + @ApiOperation("修改设备异常记录") | ||
| 89 | public AjaxResult edit(@RequestBody EquipmentException equipmentException) | 98 | public AjaxResult edit(@RequestBody EquipmentException equipmentException) |
| 90 | { | 99 | { |
| 91 | return toAjax(equipmentExceptionService.updateEquipmentException(equipmentException)); | 100 | return toAjax(equipmentExceptionService.updateEquipmentException(equipmentException)); |
| @@ -97,6 +106,7 @@ public class EquipmentExceptionController extends BaseController | @@ -97,6 +106,7 @@ public class EquipmentExceptionController extends BaseController | ||
| 97 | @PreAuthorize("@ss.hasPermi('eexception:eexception:remove')") | 106 | @PreAuthorize("@ss.hasPermi('eexception:eexception:remove')") |
| 98 | @Log(title = "设备异常记录", businessType = BusinessType.DELETE) | 107 | @Log(title = "设备异常记录", businessType = BusinessType.DELETE) |
| 99 | @DeleteMapping("/{ids}") | 108 | @DeleteMapping("/{ids}") |
| 109 | + @ApiOperation("删除设备异常记录") | ||
| 100 | public AjaxResult remove(@PathVariable Long[] ids) | 110 | public AjaxResult remove(@PathVariable Long[] ids) |
| 101 | { | 111 | { |
| 102 | return toAjax(equipmentExceptionService.deleteEquipmentExceptionByIds(ids)); | 112 | return toAjax(equipmentExceptionService.deleteEquipmentExceptionByIds(ids)); |
ruoyi-admin/src/main/java/com/ruoyi/equipment/controller/EquipmentController.java
| @@ -3,6 +3,7 @@ package com.ruoyi.equipment.controller; | @@ -3,6 +3,7 @@ package com.ruoyi.equipment.controller; | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import javax.servlet.http.HttpServletResponse; | 4 | import javax.servlet.http.HttpServletResponse; |
| 5 | 5 | ||
| 6 | +import io.swagger.annotations.Api; | ||
| 6 | import io.swagger.annotations.ApiOperation; | 7 | import io.swagger.annotations.ApiOperation; |
| 7 | import org.springframework.security.access.prepost.PreAuthorize; | 8 | import org.springframework.security.access.prepost.PreAuthorize; |
| 8 | import org.springframework.beans.factory.annotation.Autowired; | 9 | import org.springframework.beans.factory.annotation.Autowired; |
| @@ -31,6 +32,7 @@ import com.ruoyi.common.core.page.TableDataInfo; | @@ -31,6 +32,7 @@ import com.ruoyi.common.core.page.TableDataInfo; | ||
| 31 | */ | 32 | */ |
| 32 | @RestController | 33 | @RestController |
| 33 | @RequestMapping("/equipment/equipment") | 34 | @RequestMapping("/equipment/equipment") |
| 35 | +@Api(tags = "设备信息管理") | ||
| 34 | public class EquipmentController extends BaseController | 36 | public class EquipmentController extends BaseController |
| 35 | { | 37 | { |
| 36 | @Autowired | 38 | @Autowired |
ruoyi-admin/src/main/java/com/ruoyi/in/controller/SignInController.java
| @@ -3,6 +3,7 @@ package com.ruoyi.in.controller; | @@ -3,6 +3,7 @@ package com.ruoyi.in.controller; | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import javax.servlet.http.HttpServletResponse; | 4 | import javax.servlet.http.HttpServletResponse; |
| 5 | 5 | ||
| 6 | +import io.swagger.annotations.Api; | ||
| 6 | import io.swagger.annotations.ApiOperation; | 7 | import io.swagger.annotations.ApiOperation; |
| 7 | import org.springframework.security.access.prepost.PreAuthorize; | 8 | import org.springframework.security.access.prepost.PreAuthorize; |
| 8 | import org.springframework.beans.factory.annotation.Autowired; | 9 | import org.springframework.beans.factory.annotation.Autowired; |
| @@ -31,6 +32,7 @@ import com.ruoyi.common.core.page.TableDataInfo; | @@ -31,6 +32,7 @@ import com.ruoyi.common.core.page.TableDataInfo; | ||
| 31 | */ | 32 | */ |
| 32 | @RestController | 33 | @RestController |
| 33 | @RequestMapping("/in/in") | 34 | @RequestMapping("/in/in") |
| 35 | +@Api(tags = "签到管理") | ||
| 34 | public class SignInController extends BaseController | 36 | public class SignInController extends BaseController |
| 35 | { | 37 | { |
| 36 | @Autowired | 38 | @Autowired |