zhanghua
2022-11-07 3042d3d2afae0828d851f820c3bbcffa352fd61f
音柱、手持设备修改
3个文件已修改
24 ■■■■ 已修改文件
ycl-platform/src/main/java/com/ycl/controller/epuipment/HandheldTerminalController.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/epuipment/LoudspeakerController.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/equipment/impl/LoudspeakerServiceImpl.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/epuipment/HandheldTerminalController.java
@@ -47,20 +47,26 @@
    @ApiOperation("添加")
    @LogSave(operationType = "手持设备管理", contain = "添加手持设备")
    public CommonResult add(@RequestBody HandheldTerminal handheldTerminal) {
        return CommonResult.success(null);
        handheldTerminal.setState(Short.valueOf("1"));
        handheldTerminalService.save(handheldTerminal);
        return CommonResult.success(true);
    }
    @PutMapping("/update")
    @ApiOperation("修改")
    @LogSave(operationType = "手持设备管理", contain = "修改手持设备")
    public CommonResult update(@RequestBody HandheldTerminal handheldTerminal) {
        return CommonResult.success(null);
        handheldTerminalService.updateById(handheldTerminal);
        return CommonResult.success(true);
    }
    @DeleteMapping("/delete/{id}")
    @ApiOperation("删除")
    @LogSave(operationType = "手持设备管理", contain = "删除手持设备")
    public CommonResult delete(@PathVariable Long id) {
        handheldTerminalService.removeById(id);
        return CommonResult.success(null);
    }
ycl-platform/src/main/java/com/ycl/controller/epuipment/LoudspeakerController.java
@@ -61,21 +61,25 @@
    @ApiOperation("添加")
    @LogSave(operationType = "音柱管理", contain = "添加音柱")
    public CommonResult add(@RequestBody Loudspeaker loudspeaker) {
        return CommonResult.success(null);
        loudspeaker.setState(Short.valueOf("1"));
        loudspeakerService.save(loudspeaker);
        return CommonResult.success(true);
    }
    @PutMapping("/update")
    @ApiOperation("编辑")
    @LogSave(operationType = "音柱管理", contain = "修改音柱")
    public CommonResult update(@RequestBody Loudspeaker loudspeaker) {
        return CommonResult.success(null);
        loudspeakerService.updateById(loudspeaker);
        return CommonResult.success(true);
    }
    @DeleteMapping("/delete/{id}")
    @ApiOperation("删除")
    @LogSave(operationType = "音柱管理", contain = "删除音柱")
    public CommonResult delete(@PathVariable Long id) {
        return CommonResult.success(null);
        loudspeakerService.removeById(id);
        return CommonResult.success(true);
    }
ycl-platform/src/main/java/com/ycl/service/equipment/impl/LoudspeakerServiceImpl.java
@@ -23,7 +23,9 @@
    @Override
    public IPage<Loudspeaker> search(Integer pageSize, Integer currentPage, Short state) {
        Page<Loudspeaker> page = new Page<>(currentPage, pageSize);
        LambdaQueryWrapper<Loudspeaker> queryWrapper = new LambdaQueryWrapper<Loudspeaker>().eq(state != null, Loudspeaker::getState, state);
        LambdaQueryWrapper<Loudspeaker> queryWrapper = new LambdaQueryWrapper<Loudspeaker>()
                .eq(state != null, Loudspeaker::getState, state)
                .orderByDesc(Loudspeaker::getId);
        return baseMapper.selectPage(page, queryWrapper);
    }
}