Forráskód Böngészése

对接前端优化

limingming 1 éve
szülő
commit
50cb40d14a
25 módosított fájl, 332 hozzáadás és 1266 törlés
  1. 80 49
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/BasicLibraryController.java
  2. 70 52
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/ComponentsLibraryController.java
  3. 60 54
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/QrLibraryController.java
  4. 52 54
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/TemplateLibraryController.java
  5. 21 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/BaseParam.java
  6. 7 7
      ruoyi-system/src/main/java/com/ruoyi/system/domain/BasicLibrary.java
  7. 8 7
      ruoyi-system/src/main/java/com/ruoyi/system/domain/ComponentsLibrary.java
  8. 7 6
      ruoyi-system/src/main/java/com/ruoyi/system/domain/QrLibrary.java
  9. 9 9
      ruoyi-system/src/main/java/com/ruoyi/system/domain/TemplateLibrary.java
  10. 1 53
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/BasicLibraryMapper.java
  11. 1 49
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/ComponentsLibraryMapper.java
  12. 1 49
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/QrLibraryMapper.java
  13. 1 50
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/TemplateLibraryMapper.java
  14. 1 52
      ruoyi-system/src/main/java/com/ruoyi/system/service/BasicLibraryService.java
  15. 1 48
      ruoyi-system/src/main/java/com/ruoyi/system/service/ComponentsLibraryService.java
  16. 1 49
      ruoyi-system/src/main/java/com/ruoyi/system/service/QrLibraryService.java
  17. 1 50
      ruoyi-system/src/main/java/com/ruoyi/system/service/TemplateLibraryService.java
  18. 1 86
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BasicLibraryServiceImpl.java
  19. 2 80
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ComponentsLibraryServiceImpl.java
  20. 3 83
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/QrLibraryServiceImpl.java
  21. 4 86
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TemplateLibraryServiceImpl.java
  22. 0 81
      ruoyi-system/src/main/resources/mapper/system/platform/BasicLibraryMapper.xml
  23. 0 86
      ruoyi-system/src/main/resources/mapper/system/platform/ComponentsLibraryMapper.xml
  24. 0 61
      ruoyi-system/src/main/resources/mapper/system/platform/QrLibraryMapper.xml
  25. 0 65
      ruoyi-system/src/main/resources/mapper/system/platform/TemplateLibraryMapper.xml

+ 80 - 49
ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/BasicLibraryController.java

@@ -1,23 +1,30 @@
 package com.ruoyi.web.controller.platform;
 
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.PageInfo;
 import com.ruoyi.common.core.domain.R;
-import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.BaseParam;
 import com.ruoyi.system.domain.BasicLibrary;
 import com.ruoyi.system.service.BasicLibraryService;
 import io.swagger.annotations.ApiOperation;
+import org.apache.poi.ss.formula.functions.T;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 
 import java.util.List;
 
 /**
- * 红外遥控基础库管理Controller
+ * 基础库管理Controller
  * 
  * @author liming
  * @date 2023-07-12
@@ -29,69 +36,93 @@ public class BasicLibraryController extends BaseController {
     private BasicLibraryService basicLibraryService;
 
     /**
-     * 查询基础库管理列表
+     * 查询基础库列表
      */
     @ApiOperation("查询基础库管理列表")
-    @PreAuthorize("@ss.hasPermi('platform:base:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(BasicLibrary basicLibrary)
-    {
-        startPage();
-        List<BasicLibrary> list = basicLibraryService.selectBasicLibraryList(basicLibrary);
-        return getDataTable(list);
+//    @PreAuthorize("@ss.hasPermi('platform:base:list')")
+    @PostMapping("/list")
+    public R<PageInfo<BasicLibrary>> list(@RequestBody BaseParam param) {
+        IPage<BasicLibrary> basicLibraryIPage = basicLibraryService.page(new Page<BasicLibrary>().setCurrent(param.getCurrent()).setSize(param.getSize()),
+                new LambdaQueryWrapper<BasicLibrary>().like(param.getName()!=null,BasicLibrary::getName,param.getName())
+                        .eq(BasicLibrary::getDelFlag,0));
+        PageInfo<BasicLibrary> pageInfo = new PageInfo<>();
+        pageInfo.setRecords(basicLibraryIPage.getRecords());
+        pageInfo.setSize(basicLibraryIPage.getSize());
+        pageInfo.setCurrent(basicLibraryIPage.getCurrent());
+        pageInfo.setTotal(basicLibraryIPage.getTotal());
+        return R.ok(pageInfo);
     }
 
 
-    // TODO: 2023/7/13  这里做分页测试
-    @GetMapping("/test")
-    public R<List<BasicLibrary>> test(BasicLibrary basicLibrary)
-    {
-//        Page<List<BasicLibrary>> list2 = basicLibraryService.selectBasicLibraryList(basicLibrary);
-        return R.ok();
+    /**
+     * 查询基础库列表
+     */
+    @ApiOperation("查询基础库管理列表")
+//    @PreAuthorize("@ss.hasPermi('platform:base:list')")
+    @PostMapping("/allList")
+    public R<List<BasicLibrary>> getAllList() {
+        List<BasicLibrary> basicLibraryList = basicLibraryService.list(new LambdaQueryWrapper<BasicLibrary>().eq(BasicLibrary::getDelFlag,0));
+        return R.ok(basicLibraryList);
     }
 
     
     /**
-     * 获取红外遥控基础库管理详细信息
+     * 获取基础库详细信息
      */
-    @PreAuthorize("@ss.hasPermi('platform:base:query')")
-    @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
-        return success(basicLibraryService.selectBasicLibraryById(id));
+//    @PreAuthorize("@ss.hasPermi('platform:base:query')")
+    @PostMapping(value = "/getInfo")
+    public R<BasicLibrary> getInfo(@RequestBody BaseParam param){
+
+        return R.ok( basicLibraryService.getOne(new LambdaQueryWrapper<BasicLibrary>().eq(BasicLibrary::getId, param.getId())
+                .eq(BasicLibrary::getDelFlag, "0"), false));
     }
 
     /**
-     * 新增红外遥控基础库管理
+     * 新增修改基础库
      */
 //    @PreAuthorize("@ss.hasPermi('platform:base:add')")
-//    @Log(title = "红外遥控基础库管理", businessType = BusinessType.INSERT)
-    @PostMapping("add")
-    public AjaxResult add(@RequestBody BasicLibrary basicLibrary)
-    {
-        // TODO: 2023/7/12 校验参数必须是26的倍数
-        return toAjax(basicLibraryService.insertBasicLibrary(basicLibrary));
+    @Log(title = "基础库管理", businessType = BusinessType.INSERT)
+    @PostMapping("addOrUpdate")
+    public R<Boolean> add(@RequestBody BasicLibrary param) {
+        //参数校验
+        String[] bootCode = param.getBootCode().split(",");
+        if (bootCode.length != 2){
+            return R.fail("引导码参数格式有误");
+        }
+        if (param.getBootCodeSend() < 0){
+            return R.fail("引导码发送次数参数有误");
+        }
+        String[] dateCode = param.getDateCode().split(",");
+        if (dateCode.length % 2 != 0){
+            return R.fail("数据码参数有误");
+        }
+        String[] overCode = param.getOverCode().split(",");
+        if (overCode.length != 2){
+            return R.fail("结束码参数有误");
+        }
+        if (param.getId() != null) {
+            param.setUpdateTime(DateUtils.getNowDate());
+        }else {
+            param.setCreateTime(DateUtils.getNowDate());
+        }
+        return R.ok(basicLibraryService.saveOrUpdate(param));
     }
 
-    /**
-     * 修改红外遥控基础库管理
-     */
-    @PreAuthorize("@ss.hasPermi('platform:base:edit')")
-    @Log(title = "红外遥控基础库管理", businessType = BusinessType.UPDATE)
-    @PutMapping("update")
-    public AjaxResult edit(@RequestBody BasicLibrary basicLibrary)
-    {
-        return toAjax(basicLibraryService.updateBasicLibrary(basicLibrary));
-    }
 
     /**
-     * 删除红外遥控基础库管理
+     * 删除红外遥控基础库
      */
-    @PreAuthorize("@ss.hasPermi('platform:base:remove')")
-    @Log(title = "红外遥控基础库管理", businessType = BusinessType.DELETE)
-	@DeleteMapping("/delete/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
-        return toAjax(basicLibraryService.deleteBasicLibraryByIds(ids));
+//    @PreAuthorize("@ss.hasPermi('platform:base:remove')")
+    @Log(title = "基础库管理", businessType = BusinessType.DELETE)
+	@PostMapping("/delete")
+    public R<T> remove(@RequestBody BaseParam param) {
+        BasicLibrary basicLibrary = new BasicLibrary();
+        basicLibrary.setId(param.getId());
+        basicLibrary.setDelFlag("2");
+        boolean sta = basicLibraryService.updateById(basicLibrary);
+        if (!sta){
+            return R.fail("删除失败");
+        }
+        return R.ok();
     }
 }

+ 70 - 52
ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/ComponentsLibraryController.java

@@ -1,91 +1,109 @@
 package com.ruoyi.web.controller.platform;
 
-import java.util.List;
-
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.PageInfo;
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.BaseParam;
 import com.ruoyi.system.domain.ComponentsLibrary;
-import org.springframework.security.access.prepost.PreAuthorize;
+import com.ruoyi.system.service.ComponentsLibraryService;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.annotation.Log;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.enums.BusinessType;
-import com.ruoyi.system.service.ComponentsLibraryService;
-import com.ruoyi.common.core.page.TableDataInfo;
+
+import java.util.List;
 
 /**
- * 红外遥控组件库Controller
+ * 组件库Controller
  *
  * @author liming
  * @date 2023-07-12
  */
 @RestController
-@RequestMapping("/platform/v1/init")
-public class ComponentsLibraryController extends BaseController
-{
+@RequestMapping("/platform/v1/components")
+public class ComponentsLibraryController extends BaseController {
     @Autowired
     private ComponentsLibraryService componentsLibraryService;
 
     /**
-     * 查询红外遥控组件库列表
+     * 查询组件库列表
      */
-    @PreAuthorize("@ss.hasPermi('platform:components:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(ComponentsLibrary componentsLibrary)
-    {
-        startPage();
-        List<ComponentsLibrary> list = componentsLibraryService.selectComponentsLibraryList(componentsLibrary);
-        return getDataTable(list);
+//    @PreAuthorize("@ss.hasPermi('platform:components:list')")
+    @PostMapping("/list")
+    public R<PageInfo<ComponentsLibrary>> list(@RequestBody BaseParam param) {
+        IPage<ComponentsLibrary> basicLibraryIPage = componentsLibraryService.page(new Page<ComponentsLibrary>().setCurrent(param.getCurrent()).setSize(param.getSize()),
+                new LambdaQueryWrapper<ComponentsLibrary>().like(param.getName()!=null,ComponentsLibrary::getName,param.getName())
+                        .eq(ComponentsLibrary::getDelFlag,"0"));
+        PageInfo<ComponentsLibrary> pageInfo = new PageInfo<>();
+        pageInfo.setRecords(basicLibraryIPage.getRecords());
+        pageInfo.setSize(param.getSize());
+        pageInfo.setCurrent(basicLibraryIPage.getCurrent());
+        pageInfo.setTotal(basicLibraryIPage.getTotal());
+        return R.ok(pageInfo);
     }
 
 
     /**
-     * 获取红外遥控组件库详细信息
+     * 查询基础库列表
      */
-    @PreAuthorize("@ss.hasPermi('platform:components:query')")
-    @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
-        return success(componentsLibraryService.selectComponentsLibraryById(id));
+    @ApiOperation("查询组件库管理列表")
+//    @PreAuthorize("@ss.hasPermi('platform:base:list')")
+    @PostMapping("/allList")
+    public R<List<ComponentsLibrary>> getAllList() {
+        List<ComponentsLibrary> basicLibraryList = componentsLibraryService.list(new LambdaQueryWrapper<ComponentsLibrary>().eq(ComponentsLibrary::getDelFlag,0));
+        return R.ok(basicLibraryList);
     }
 
+
     /**
-     * 新增红外遥控组件库
+     * 获取组件库详细信息
      */
-    @PreAuthorize("@ss.hasPermi('platform:components:add')")
-    @Log(title = "红外遥控组件库", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody ComponentsLibrary componentsLibrary)
-    {
-        return toAjax(componentsLibraryService.insertComponentsLibrary(componentsLibrary));
+//    @PreAuthorize("@ss.hasPermi('platform:components:query')")
+    @PostMapping(value = "/getInfo")
+    public R<ComponentsLibrary> getInfo(@RequestBody BaseParam param) {
+
+        return R.ok(componentsLibraryService.getOne(new LambdaQueryWrapper<ComponentsLibrary>().eq(ComponentsLibrary::getId,param.getId())
+                .eq(ComponentsLibrary::getDelFlag,"0"),false));
     }
 
     /**
-     * 修改红外遥控组件库
+     * 新增修改组件库
      */
-    @PreAuthorize("@ss.hasPermi('platform:components:edit')")
-    @Log(title = "红外遥控组件库", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody ComponentsLibrary componentsLibrary)
-    {
-        return toAjax(componentsLibraryService.updateComponentsLibrary(componentsLibrary));
+//    @PreAuthorize("@ss.hasPermi('platform:components:add')")
+    @Log(title = "组件库", businessType = BusinessType.INSERT)
+    @PostMapping("addOrUpdate")
+    public R<Boolean> add(@RequestBody ComponentsLibrary param) {
+        if (param.getId() != null) {
+            param.setUpdateTime(DateUtils.getNowDate());
+        }else {
+            param.setCreateTime(DateUtils.getNowDate());
+        }
+        return R.ok(componentsLibraryService.saveOrUpdate(param));
     }
 
+
     /**
-     * 删除红外遥控组件库
+     * 删除组件库
      */
-    @PreAuthorize("@ss.hasPermi('platform:components:remove')")
-    @Log(title = "红外遥控组件库", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
-        return toAjax(componentsLibraryService.deleteComponentsLibraryByIds(ids));
+//    @PreAuthorize("@ss.hasPermi('platform:components:remove')")
+    @Log(title = "组件库", businessType = BusinessType.DELETE)
+	@PostMapping("/delete")
+    public R remove(@RequestBody BaseParam param) {
+        ComponentsLibrary componentsLibrary = new ComponentsLibrary();
+        componentsLibrary.setId(param.getId());
+        componentsLibrary.setDelFlag("2");
+        boolean sta = componentsLibraryService.updateById(componentsLibrary);
+        if (!sta){
+            return R.fail("删除失败");
+        }
+        return R.ok();
     }
 }

+ 60 - 54
ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/QrLibraryController.java

@@ -1,91 +1,97 @@
 package com.ruoyi.web.controller.platform;
 
-import java.util.List;
-
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.PageInfo;
+import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.BaseParam;
 import com.ruoyi.system.domain.QrLibrary;
 import com.ruoyi.system.service.QrLibraryService;
-import com.ruoyi.common.core.page.TableDataInfo;
+import org.apache.poi.ss.formula.functions.T;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
- * 红外遥控二维码Controller
+ * 二维码Controller
  *
  * @author liming
  * @date 2023-07-12
  */
 @RestController
-@RequestMapping("/platform/v1/or")
-public class QrLibraryController extends BaseController
-{
+@RequestMapping("/platform/v1/qr")
+public class QrLibraryController extends BaseController {
     @Autowired
     private QrLibraryService qrLibraryService;
 
     /**
-     * 查询红外遥控二维码列表
+     * 查询二维码列表
      */
-    @PreAuthorize("@ss.hasPermi('platform:or:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(QrLibrary qrLibrary)
-    {
-        startPage();
-        List<QrLibrary> list = qrLibraryService.selectQrLibraryList(qrLibrary);
-        return getDataTable(list);
+//    @PreAuthorize("@ss.hasPermi('platform:or:list')")
+    @PostMapping("/list")
+    public R<PageInfo<QrLibrary>> list(@RequestBody BaseParam param){
+        IPage<QrLibrary> qrLibraryIPage = qrLibraryService.page(new Page<QrLibrary>().setCurrent(param.getCurrent()).setSize(param.getSize()),
+                new LambdaQueryWrapper<QrLibrary>().like(param.getName()!=null,QrLibrary::getName,param.getName())
+                        .eq(QrLibrary::getDelFlag,0));
+        PageInfo<QrLibrary> pageInfo = new PageInfo<>();
+        pageInfo.setRecords(qrLibraryIPage.getRecords());
+        pageInfo.setTotal(qrLibraryIPage.getTotal());
+        pageInfo.setSize(qrLibraryIPage.getSize());
+        pageInfo.setCurrent(qrLibraryIPage.getCurrent());
+        return R.ok(pageInfo);
     }
 
 
     /**
-     * 获取红外遥控二维码详细信息
+     * 获取二维码详细信息
      */
-    @PreAuthorize("@ss.hasPermi('platform:or:query')")
-    @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
-        return success(qrLibraryService.selectQrLibraryById(id));
+//    @PreAuthorize("@ss.hasPermi('platform:or:query')")
+    @PostMapping(value = "/getInfo")
+    public R<QrLibrary> getInfo(@RequestBody BaseParam param) {
+        return R.ok(qrLibraryService.getOne(new LambdaQueryWrapper<QrLibrary>().eq(QrLibrary::getId,param.getId())
+                .eq(QrLibrary::getDelFlag,"0"),false));
     }
 
     /**
-     * 新增红外遥控二维码
+     * 新增修改二维码
      */
-    @PreAuthorize("@ss.hasPermi('platform:or:add')")
+
+//    @PreAuthorize("@ss.hasPermi('platform:or:add')")
+
     @Log(title = "红外遥控二维码", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody QrLibrary qrLibrary)
-    {
-        return toAjax(qrLibraryService.insertQrLibrary(qrLibrary));
+    @PostMapping("/addOrUpdate")
+    public R<Boolean> add(@RequestBody QrLibrary param) {
+        if (param.getId() != null) {
+            param.setUpdateTime(DateUtils.getNowDate());
+        }else {
+            param.setCreateTime(DateUtils.getNowDate());
+        }
+        return R.ok(qrLibraryService.saveOrUpdate(param));
     }
 
-    /**
-     * 修改红外遥控二维码
-     */
-    @PreAuthorize("@ss.hasPermi('platform:or:edit')")
-    @Log(title = "红外遥控二维码", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody QrLibrary qrLibrary)
-    {
-        return toAjax(qrLibraryService.updateQrLibrary(qrLibrary));
-    }
+
 
     /**
-     * 删除红外遥控二维码
+     * 删除二维码
      */
-    @PreAuthorize("@ss.hasPermi('platform:or:remove')")
+//    @PreAuthorize("@ss.hasPermi('platform:or:remove')")
     @Log(title = "红外遥控二维码", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
-        return toAjax(qrLibraryService.deleteQrLibraryByIds(ids));
+	@PostMapping("/delete")
+    public R<T> remove(@RequestBody BaseParam param) {
+        QrLibrary qrLibrary = new QrLibrary();
+        qrLibrary.setId(param.getId());
+        qrLibrary.setDelFlag("2");
+        boolean sta = qrLibraryService.updateById(qrLibrary);
+        if (!sta){
+            return R.fail("删除失败");
+        }
+        return R.ok();
     }
 }

+ 52 - 54
ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/TemplateLibraryController.java

@@ -1,24 +1,19 @@
 package com.ruoyi.web.controller.platform;
 
-import java.util.List;
-
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.PageInfo;
+import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.BaseParam;
 import com.ruoyi.system.domain.TemplateLibrary;
 import com.ruoyi.system.service.TemplateLibraryService;
-import com.ruoyi.common.core.page.TableDataInfo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
 
 /**
  * 红外遥控模板库Controller
@@ -28,64 +23,67 @@ import com.ruoyi.common.core.page.TableDataInfo;
  */
 @RestController
 @RequestMapping("/platform/v1/template")
-public class TemplateLibraryController extends BaseController
-{
+public class TemplateLibraryController extends BaseController {
     @Autowired
     private TemplateLibraryService templateLibraryService;
 
     /**
-     * 查询红外遥控模板库列表
+     * 查询模板库列表
      */
-    @PreAuthorize("@ss.hasPermi('platform:template:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(TemplateLibrary templateLibrary)
-    {
-        startPage();
-        List<TemplateLibrary> list = templateLibraryService.selectTemplateLibraryList(templateLibrary);
-        return getDataTable(list);
+//    @PreAuthorize("@ss.hasPermi('platform:template:list')")
+    @PostMapping("/list")
+    public R<IPage<TemplateLibrary>> list(@RequestBody BaseParam param) {
+        IPage<TemplateLibrary> templateIPage = templateLibraryService.page(new Page<TemplateLibrary>().setCurrent(param.getCurrent()).setSize(param.getSize()),
+                new LambdaQueryWrapper<TemplateLibrary>().like(param.getName()!=null,TemplateLibrary::getName,param.getName())
+                        .eq(TemplateLibrary::getDelFlag,0));
+        PageInfo<TemplateLibrary> pageInfo = new PageInfo<>();
+        pageInfo.setRecords(templateIPage.getRecords());
+        pageInfo.setTotal(templateIPage.getTotal());
+        return R.ok(templateIPage);
     }
 
 
     /**
-     * 获取红外遥控模板库详细信息
+     * 获取模板库详细信息
      */
-    @PreAuthorize("@ss.hasPermi('platform:template:query')")
-    @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
-        return success(templateLibraryService.selectTemplateLibraryById(id));
-    }
+//    @PreAuthorize("@ss.hasPermi('platform:template:query')")
+    @PostMapping(value = "/getInfo")
+    public R<TemplateLibrary> getInfo(@RequestBody BaseParam param) {
 
-    /**
-     * 新增红外遥控模板库
-     */
-    @PreAuthorize("@ss.hasPermi('platform:template:add')")
-    @Log(title = "红外遥控模板库", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody TemplateLibrary templateLibrary)
-    {
-        return toAjax(templateLibraryService.insertTemplateLibrary(templateLibrary));
+        return R.ok(templateLibraryService.getOne(new LambdaQueryWrapper<TemplateLibrary>().eq(TemplateLibrary::getId,param.getId())
+                .eq(TemplateLibrary::getDelFlag,"0"),false));
     }
 
     /**
-     * 修改红外遥控模板库
+     * 新增模板库
      */
-    @PreAuthorize("@ss.hasPermi('platform:template:edit')")
-    @Log(title = "红外遥控模板库", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody TemplateLibrary templateLibrary)
-    {
-        return toAjax(templateLibraryService.updateTemplateLibrary(templateLibrary));
+//    @PreAuthorize("@ss.hasPermi('platform:template:add')")
+    @Log(title = "模板库", businessType = BusinessType.INSERT)
+    @PostMapping("addOrUpdate")
+    public R<Boolean> add(@RequestBody TemplateLibrary param) {
+        if (param.getId() != null) {
+            param.setUpdateTime(DateUtils.getNowDate());
+        }else {
+            param.setCreateTime(DateUtils.getNowDate());
+        }
+        return R.ok(templateLibraryService.saveOrUpdate(param));
     }
 
+
     /**
-     * 删除红外遥控模板库
+     * 删除模板库
      */
-    @PreAuthorize("@ss.hasPermi('platform:template:remove')")
-    @Log(title = "红外遥控模板库", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
-        return toAjax(templateLibraryService.deleteTemplateLibraryByIds(ids));
+//    @PreAuthorize("@ss.hasPermi('platform:template:remove')")
+    @Log(title = "模板库", businessType = BusinessType.DELETE)
+	@PostMapping("/delete")
+    public R<Object> remove(@RequestBody BaseParam param) {
+        TemplateLibrary templateLibrary = new TemplateLibrary();
+        templateLibrary.setId(param.getId());
+        templateLibrary.setDelFlag("2");
+        boolean salt = templateLibraryService.updateById(templateLibrary);
+        if (!salt){
+            return R.fail("删除失败");
+        }
+        return R.ok();
     }
 }

+ 21 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/BaseParam.java

@@ -0,0 +1,21 @@
+package com.ruoyi.system.domain;
+
+import com.ruoyi.common.core.domain.PageInfo;
+import lombok.Data;
+import org.apache.poi.ss.formula.functions.T;
+
+/**
+ * @Author: LiMingMing
+ * @Date: 2023/7/14 15:15
+ * @Description: 统一查询信息加分页信息
+ **/
+@Data
+public class BaseParam extends PageInfo<T> {
+
+    private Long id;
+
+    private Long[] ids;
+
+    private String name;
+
+}

+ 7 - 7
ruoyi-system/src/main/java/com/ruoyi/system/domain/BasicLibrary.java

@@ -1,27 +1,27 @@
 package com.ruoyi.system.domain;
 
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.core.domain.BaseEntity;
+import lombok.Data;
 
+import java.io.Serializable;
 import java.util.Date;
 
 /**
- * 红外遥控基础库管理对象 t_basic_library
+ * 基础库管理对象 t_basic_library
  * 
  * @author liming
  * @date 2023-07-13
  */
 @Data
 @TableName("t_basic_library")
-public class BasicLibrary  {
+public class BasicLibrary   implements Serializable {
     private static final long serialVersionUID = 1L;
 
     /** 基本库id */
+    @TableId( value = "id", type = IdType.AUTO)
     private Long id;
 
     /** 基本库名 */

+ 8 - 7
ruoyi-system/src/main/java/com/ruoyi/system/domain/ComponentsLibrary.java

@@ -1,26 +1,27 @@
 package com.ruoyi.system.domain;
 
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.core.domain.BaseEntity;
+import lombok.Data;
 
+import java.io.Serializable;
 import java.util.Date;
 
 /**
- * 红外遥控组件库对象 t_components_library
+ * 组件库对象 t_components_library
  * 
  * @author liming
  * @date 2023-07-13
  */
 @Data
 @TableName("t_components_library")
-public class ComponentsLibrary {
+public class ComponentsLibrary implements Serializable {
     private static final long serialVersionUID = 1L;
 
     /** 组件id */
+    @TableId( value = "id", type = IdType.AUTO)
     private Long id;
 
     /** 组件名称 */
@@ -33,7 +34,7 @@ public class ComponentsLibrary {
 
     /** 组件类型   1开关型  2加减形 */
     @Excel(name = "组件类型   1开关型  2加减形")
-    private Long typeNum;
+    private String typeNum;
 
     /** 加减型  最大值 */
     @Excel(name = "加减型  最大值")

+ 7 - 6
ruoyi-system/src/main/java/com/ruoyi/system/domain/QrLibrary.java

@@ -1,26 +1,27 @@
 package com.ruoyi.system.domain;
 
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.core.domain.BaseEntity;
+import lombok.Data;
 
+import java.io.Serializable;
 import java.util.Date;
 
 /**
- * 红外遥控二维码对象 t_qr_library
+ * 二维码对象 t_qr_library
  * 
  * @author liming
  * @date 2023-07-12
  */
 @Data
 @TableName("t_qr_library")
-public class QrLibrary {
+public class QrLibrary  implements Serializable {
     private static final long serialVersionUID = 1L;
 
     /** 二维码id */
+    @TableId( value = "id", type = IdType.AUTO)
     private Long id;
 
     /** 二维码名称 */

+ 9 - 9
ruoyi-system/src/main/java/com/ruoyi/system/domain/TemplateLibrary.java

@@ -1,27 +1,27 @@
 package com.ruoyi.system.domain;
 
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.core.domain.BaseEntity;
+import lombok.Data;
 
+import java.io.Serializable;
 import java.util.Date;
 
 /**
- * 红外遥控模板库对象 t_template_library
+ * 模板库对象 t_template_library
  * 
  * @author liming
  * @date 2023-07-12
  */
 @Data
 @TableName("t_template_library")
-public class TemplateLibrary  {
+public class TemplateLibrary implements Serializable {
     private static final long serialVersionUID = 1L;
 
     /** 模板id */
+    @TableId( value = "id", type = IdType.AUTO)
     private Long id;
 
     /** 基础库id */
@@ -32,8 +32,8 @@ public class TemplateLibrary  {
     @Excel(name = "模板名称")
     private String name;
 
-    /** 关联组件id */
-    @Excel(name = "关联组件id")
+    /** 关联组件信息 */
+    @Excel(name = "关联组信息")
     private String components;
 
     /** 状态(0使用中 1未使用) */

+ 1 - 53
ruoyi-system/src/main/java/com/ruoyi/system/mapper/BasicLibraryMapper.java

@@ -1,67 +1,15 @@
 package com.ruoyi.system.mapper;
 
 
-
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ruoyi.system.domain.BasicLibrary;
-import com.ruoyi.system.domain.ComponentsLibrary;
-
-import java.util.List;
 
 /**
- * 红外遥控基础库管理Mapper接口
+ * 基础库管理Mapper接口
  * 
  * @author liming
  * @date 2023-07-12
  */
 public interface BasicLibraryMapper extends BaseMapper<BasicLibrary> {
-    /**
-     * 查询红外遥控基础库管理
-     * 
-     * @param id 红外遥控基础库管理主键
-     * @return 红外遥控基础库管理
-     */
-    public BasicLibrary selectBasicLibraryById(Long id);
-
-    /**
-     * 查询红外遥控基础库管理列表
-     * 
-     * @param basicLibrary 红外遥控基础库管理
-     * @return 红外遥控基础库管理集合
-     */
-    public List<BasicLibrary> selectBasicLibraryList(BasicLibrary basicLibrary);
-
-    /**
-     * 新增红外遥控基础库管理
-     * 
-     * @param basicLibrary 红外遥控基础库管理
-     * @return 结果
-     */
-    public int insertBasicLibrary(BasicLibrary basicLibrary);
-
-    /**
-     * 修改红外遥控基础库管理
-     * 
-     * @param basicLibrary 红外遥控基础库管理
-     * @return 结果
-     */
-    public int updateBasicLibrary(BasicLibrary basicLibrary);
-
-    /**
-     * 删除红外遥控基础库管理
-     * 
-     * @param id 红外遥控基础库管理主键
-     * @return 结果
-     */
-    public int deleteBasicLibraryById(Long id);
-
-    /**
-     * 批量删除红外遥控基础库管理
-     * 
-     * @param ids 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deleteBasicLibraryByIds(Long[] ids);
 
-    List<BasicLibrary> getList();
 }

+ 1 - 49
ruoyi-system/src/main/java/com/ruoyi/system/mapper/ComponentsLibraryMapper.java

@@ -2,62 +2,14 @@ package com.ruoyi.system.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ruoyi.system.domain.ComponentsLibrary;
-import io.lettuce.core.metrics.CommandMetrics;
-
-import java.util.List;
 
 /**
- * 红外遥控组件库Mapper接口
+ * 组件库Mapper接口
  * 
  * @author liming
  * @date 2023-07-12
  */
 public interface ComponentsLibraryMapper extends BaseMapper<ComponentsLibrary> {
-    /**
-     * 查询红外遥控组件库
-     * 
-     * @param id 红外遥控组件库主键
-     * @return 红外遥控组件库
-     */
-    public ComponentsLibrary selectComponentsLibraryById(Long id);
-
-    /**
-     * 查询红外遥控组件库列表
-     * 
-     * @param componentsLibrary 红外遥控组件库
-     * @return 红外遥控组件库集合
-     */
-    public List<ComponentsLibrary> selectComponentsLibraryList(ComponentsLibrary componentsLibrary);
-
-    /**
-     * 新增红外遥控组件库
-     * 
-     * @param componentsLibrary 红外遥控组件库
-     * @return 结果
-     */
-    public int insertComponentsLibrary(ComponentsLibrary componentsLibrary);
-
-    /**
-     * 修改红外遥控组件库
-     * 
-     * @param componentsLibrary 红外遥控组件库
-     * @return 结果
-     */
-    public int updateComponentsLibrary(ComponentsLibrary componentsLibrary);
 
-    /**
-     * 删除红外遥控组件库
-     * 
-     * @param id 红外遥控组件库主键
-     * @return 结果
-     */
-    public int deleteComponentsLibraryById(Long id);
 
-    /**
-     * 批量删除红外遥控组件库
-     * 
-     * @param ids 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deleteComponentsLibraryByIds(Long[] ids);
 }

+ 1 - 49
ruoyi-system/src/main/java/com/ruoyi/system/mapper/QrLibraryMapper.java

@@ -1,63 +1,15 @@
 package com.ruoyi.system.mapper;
 
-import java.util.List;
-
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.system.domain.ComponentsLibrary;
 import com.ruoyi.system.domain.QrLibrary;
 
 /**
- * 红外遥控二维码Mapper接口
+ * 二维码Mapper接口
  * 
  * @author liming
  * @date 2023-07-12
  */
 public interface QrLibraryMapper  extends BaseMapper<QrLibrary> {
-    /**
-     * 查询红外遥控二维码
-     * 
-     * @param id 红外遥控二维码主键
-     * @return 红外遥控二维码
-     */
-    public QrLibrary selectQrLibraryById(Long id);
-
-    /**
-     * 查询红外遥控二维码列表
-     * 
-     * @param qrLibrary 红外遥控二维码
-     * @return 红外遥控二维码集合
-     */
-    public List<QrLibrary> selectQrLibraryList(QrLibrary qrLibrary);
-
-    /**
-     * 新增红外遥控二维码
-     * 
-     * @param qrLibrary 红外遥控二维码
-     * @return 结果
-     */
-    public int insertQrLibrary(QrLibrary qrLibrary);
-
-    /**
-     * 修改红外遥控二维码
-     * 
-     * @param qrLibrary 红外遥控二维码
-     * @return 结果
-     */
-    public int updateQrLibrary(QrLibrary qrLibrary);
 
-    /**
-     * 删除红外遥控二维码
-     * 
-     * @param id 红外遥控二维码主键
-     * @return 结果
-     */
-    public int deleteQrLibraryById(Long id);
 
-    /**
-     * 批量删除红外遥控二维码
-     * 
-     * @param ids 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deleteQrLibraryByIds(Long[] ids);
 }

+ 1 - 50
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TemplateLibraryMapper.java

@@ -1,63 +1,14 @@
 package com.ruoyi.system.mapper;
 
-import java.util.List;
-
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.system.domain.ComponentsLibrary;
 import com.ruoyi.system.domain.TemplateLibrary;
 
 /**
- * 红外遥控模板库Mapper接口
+ * 模板库Mapper接口
  * 
  * @author liming
  * @date 2023-07-12
  */
 public interface TemplateLibraryMapper extends BaseMapper<TemplateLibrary> {
-    /**
-     * 查询红外遥控模板库
-     * 
-     * @param id 红外遥控模板库主键
-     * @return 红外遥控模板库
-     */
-    public TemplateLibrary selectTemplateLibraryById(Long id);
-
-    /**
-     * 查询红外遥控模板库列表
-     * 
-     * @param templateLibrary 红外遥控模板库
-     * @return 红外遥控模板库集合
-     */
-    public List<TemplateLibrary> selectTemplateLibraryList(TemplateLibrary templateLibrary);
-
-    /**
-     * 新增红外遥控模板库
-     * 
-     * @param templateLibrary 红外遥控模板库
-     * @return 结果
-     */
-    public int insertTemplateLibrary(TemplateLibrary templateLibrary);
-
-    /**
-     * 修改红外遥控模板库
-     * 
-     * @param templateLibrary 红外遥控模板库
-     * @return 结果
-     */
-    public int updateTemplateLibrary(TemplateLibrary templateLibrary);
-
-    /**
-     * 删除红外遥控模板库
-     * 
-     * @param id 红外遥控模板库主键
-     * @return 结果
-     */
-    public int deleteTemplateLibraryById(Long id);
 
-    /**
-     * 批量删除红外遥控模板库
-     * 
-     * @param ids 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deleteTemplateLibraryByIds(Long[] ids);
 }

+ 1 - 52
ruoyi-system/src/main/java/com/ruoyi/system/service/BasicLibraryService.java

@@ -3,65 +3,14 @@ package com.ruoyi.system.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ruoyi.system.domain.BasicLibrary;
-import com.ruoyi.system.domain.ComponentsLibrary;
-
-import java.util.List;
 
 /**
- * 红外遥控基础库管理Service接口
+ * 基础库管理Service接口
  * 
  * @author liming
  * @date 2023-07-12
  */
 public interface BasicLibraryService extends IService<BasicLibrary> {
-    /**
-     * 查询红外遥控基础库管理
-     *
-     * @param id 红外遥控基础库管理主键
-     * @return 红外遥控基础库管理
-     */
-    public BasicLibrary selectBasicLibraryById(Long id);
-
-    /**
-     * 查询红外遥控基础库管理列表
-     *
-     * @param basicLibrary 红外遥控基础库管理
-     * @return 红外遥控基础库管理集合
-     */
-    public List<BasicLibrary> selectBasicLibraryList(BasicLibrary basicLibrary);
-
-    /**
-     * 新增红外遥控基础库管理
-     *
-     * @param basicLibrary 红外遥控基础库管理
-     * @return 结果
-     */
-    public int insertBasicLibrary(BasicLibrary basicLibrary);
-
-    /**
-     * 修改红外遥控基础库管理
-     *
-     * @param basicLibrary 红外遥控基础库管理
-     * @return 结果
-     */
-    public int updateBasicLibrary(BasicLibrary basicLibrary);
-
-    /**
-     * 批量删除红外遥控基础库管理
-     *
-     * @param ids 需要删除的红外遥控基础库管理主键集合
-     * @return 结果
-     */
-    public int deleteBasicLibraryByIds(Long[] ids);
-
-    /**
-     * 删除红外遥控基础库管理信息
-     *
-     * @param id 红外遥控基础库管理主键
-     * @return 结果
-     */
-    public int deleteBasicLibraryById(Long id);
 
-    List<BasicLibrary> getList();
 
 }

+ 1 - 48
ruoyi-system/src/main/java/com/ruoyi/system/service/ComponentsLibraryService.java

@@ -3,60 +3,13 @@ package com.ruoyi.system.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ruoyi.system.domain.ComponentsLibrary;
 
-import java.util.List;
-
 /**
- * 红外遥控组件库Service接口
+ * 组件库Service接口
  * 
  * @author liming
  * @date 2023-07-12
  */
 public interface ComponentsLibraryService extends IService<ComponentsLibrary> {
-    /**
-     * 查询红外遥控组件库
-     * 
-     * @param id 红外遥控组件库主键
-     * @return 红外遥控组件库
-     */
-    public ComponentsLibrary selectComponentsLibraryById(Long id);
-
-    /**
-     * 查询红外遥控组件库列表
-     * 
-     * @param componentsLibrary 红外遥控组件库
-     * @return 红外遥控组件库集合
-     */
-    public List<ComponentsLibrary> selectComponentsLibraryList(ComponentsLibrary componentsLibrary);
-
-    /**
-     * 新增红外遥控组件库
-     * 
-     * @param componentsLibrary 红外遥控组件库
-     * @return 结果
-     */
-    public int insertComponentsLibrary(ComponentsLibrary componentsLibrary);
-
-    /**
-     * 修改红外遥控组件库
-     * 
-     * @param componentsLibrary 红外遥控组件库
-     * @return 结果
-     */
-    public int updateComponentsLibrary(ComponentsLibrary componentsLibrary);
 
-    /**
-     * 批量删除红外遥控组件库
-     * 
-     * @param ids 需要删除的红外遥控组件库主键集合
-     * @return 结果
-     */
-    public int deleteComponentsLibraryByIds(Long[] ids);
 
-    /**
-     * 删除红外遥控组件库信息
-     * 
-     * @param id 红外遥控组件库主键
-     * @return 结果
-     */
-    public int deleteComponentsLibraryById(Long id);
 }

+ 1 - 49
ruoyi-system/src/main/java/com/ruoyi/system/service/QrLibraryService.java

@@ -1,63 +1,15 @@
 package com.ruoyi.system.service;
 
-import java.util.List;
-
 import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.system.domain.ComponentsLibrary;
 import com.ruoyi.system.domain.QrLibrary;
 
 /**
- * 红外遥控二维码Service接口
+ * 二维码Service接口
  * 
  * @author liming
  * @date 2023-07-12
  */
 public interface QrLibraryService  extends IService<QrLibrary> {
-    /**
-     * 查询红外遥控二维码
-     * 
-     * @param id 红外遥控二维码主键
-     * @return 红外遥控二维码
-     */
-    public QrLibrary selectQrLibraryById(Long id);
-
-    /**
-     * 查询红外遥控二维码列表
-     * 
-     * @param qrLibrary 红外遥控二维码
-     * @return 红外遥控二维码集合
-     */
-    public List<QrLibrary> selectQrLibraryList(QrLibrary qrLibrary);
-
-    /**
-     * 新增红外遥控二维码
-     * 
-     * @param qrLibrary 红外遥控二维码
-     * @return 结果
-     */
-    public int insertQrLibrary(QrLibrary qrLibrary);
-
-    /**
-     * 修改红外遥控二维码
-     * 
-     * @param qrLibrary 红外遥控二维码
-     * @return 结果
-     */
-    public int updateQrLibrary(QrLibrary qrLibrary);
 
-    /**
-     * 批量删除红外遥控二维码
-     * 
-     * @param ids 需要删除的红外遥控二维码主键集合
-     * @return 结果
-     */
-    public int deleteQrLibraryByIds(Long[] ids);
 
-    /**
-     * 删除红外遥控二维码信息
-     * 
-     * @param id 红外遥控二维码主键
-     * @return 结果
-     */
-    public int deleteQrLibraryById(Long id);
 }

+ 1 - 50
ruoyi-system/src/main/java/com/ruoyi/system/service/TemplateLibraryService.java

@@ -1,63 +1,14 @@
 package com.ruoyi.system.service;
 
-import java.util.List;
-
 import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.system.domain.ComponentsLibrary;
 import com.ruoyi.system.domain.TemplateLibrary;
 
 /**
- * 红外遥控模板库Service接口
+ * 模板库Service接口
  * 
  * @author liming
  * @date 2023-07-12
  */
 public interface TemplateLibraryService  extends IService<TemplateLibrary> {
-    /**
-     * 查询红外遥控模板库
-     * 
-     * @param id 红外遥控模板库主键
-     * @return 红外遥控模板库
-     */
-    public TemplateLibrary selectTemplateLibraryById(Long id);
-
-    /**
-     * 查询红外遥控模板库列表
-     * 
-     * @param templateLibrary 红外遥控模板库
-     * @return 红外遥控模板库集合
-     */
-    public List<TemplateLibrary> selectTemplateLibraryList(TemplateLibrary templateLibrary);
-
-    /**
-     * 新增红外遥控模板库
-     * 
-     * @param templateLibrary 红外遥控模板库
-     * @return 结果
-     */
-    public int insertTemplateLibrary(TemplateLibrary templateLibrary);
-
-    /**
-     * 修改红外遥控模板库
-     * 
-     * @param templateLibrary 红外遥控模板库
-     * @return 结果
-     */
-    public int updateTemplateLibrary(TemplateLibrary templateLibrary);
-
-    /**
-     * 批量删除红外遥控模板库
-     * 
-     * @param ids 需要删除的红外遥控模板库主键集合
-     * @return 结果
-     */
-    public int deleteTemplateLibraryByIds(Long[] ids);
 
-    /**
-     * 删除红外遥控模板库信息
-     * 
-     * @param id 红外遥控模板库主键
-     * @return 结果
-     */
-    public int deleteTemplateLibraryById(Long id);
 }

+ 1 - 86
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BasicLibraryServiceImpl.java

@@ -2,104 +2,19 @@ package com.ruoyi.system.service.impl;
 
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.system.domain.BasicLibrary;
-import com.ruoyi.system.domain.ComponentsLibrary;
 import com.ruoyi.system.mapper.BasicLibraryMapper;
-import com.ruoyi.system.mapper.ComponentsLibraryMapper;
 import com.ruoyi.system.service.BasicLibraryService;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.List;
-
 /**
- * 红外遥控基础库管理Service业务层处理
+ * 基础库管理Service业务层处理
  * 
  * @author liming
  * @date 2023-07-12
  */
 @Service
 public class BasicLibraryServiceImpl  extends ServiceImpl<BasicLibraryMapper, BasicLibrary> implements BasicLibraryService {
-    @Autowired
-    private BasicLibraryMapper basicLibraryMapper;
-
-    /**
-     * 查询红外遥控基础库管理
-     * 
-     * @param id 红外遥控基础库管理主键
-     * @return 红外遥控基础库管理
-     */
-    @Override
-    public BasicLibrary selectBasicLibraryById(Long id)
-    {
-        return basicLibraryMapper.selectBasicLibraryById(id);
-    }
-
-    /**
-     * 查询红外遥控基础库管理列表
-     * 
-     * @param basicLibrary 红外遥控基础库管理
-     * @return 红外遥控基础库管理
-     */
-    @Override
-    public List<BasicLibrary> selectBasicLibraryList(BasicLibrary basicLibrary)
-    {
-        return basicLibraryMapper.selectBasicLibraryList(basicLibrary);
-    }
-
-    /**
-     * 新增红外遥控基础库管理
-     * 
-     * @param basicLibrary 红外遥控基础库管理
-     * @return 结果
-     */
-    @Override
-    public int insertBasicLibrary(BasicLibrary basicLibrary)
-    {
-        basicLibrary.setCreateTime(DateUtils.getNowDate());
-        return basicLibraryMapper.insertBasicLibrary(basicLibrary);
-    }
-
-    /**
-     * 修改红外遥控基础库管理
-     * 
-     * @param basicLibrary 红外遥控基础库管理
-     * @return 结果
-     */
-    @Override
-    public int updateBasicLibrary(BasicLibrary basicLibrary)
-    {
-        basicLibrary.setUpdateTime(DateUtils.getNowDate());
-        return basicLibraryMapper.updateBasicLibrary(basicLibrary);
-    }
-
-    /**
-     * 批量删除红外遥控基础库管理
-     * 
-     * @param ids 需要删除的红外遥控基础库管理主键
-     * @return 结果
-     */
-    @Override
-    public int deleteBasicLibraryByIds(Long[] ids)
-    {
-        return basicLibraryMapper.deleteBasicLibraryByIds(ids);
-    }
 
-    /**
-     * 删除红外遥控基础库管理信息
-     * 
-     * @param id 红外遥控基础库管理主键
-     * @return 结果
-     */
-    @Override
-    public int deleteBasicLibraryById(Long id)
-    {
-        return basicLibraryMapper.deleteBasicLibraryById(id);
-    }
 
-    @Override
-    public List<BasicLibrary> getList() {
-        return basicLibraryMapper.getList();
-    }
 }

+ 2 - 80
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ComponentsLibraryServiceImpl.java

@@ -1,97 +1,19 @@
 package com.ruoyi.system.service.impl;
 
-import java.util.List;
-
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.system.domain.ComponentsLibrary;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
 import com.ruoyi.system.mapper.ComponentsLibraryMapper;
 import com.ruoyi.system.service.ComponentsLibraryService;
+import org.springframework.stereotype.Service;
 
 /**
- * 红外遥控组件库Service业务层处理
+ * 组件库Service业务层处理
  * 
  * @author liming
  * @date 2023-07-12
  */
 @Service
 public class ComponentsLibraryServiceImpl extends ServiceImpl<ComponentsLibraryMapper, ComponentsLibrary> implements ComponentsLibraryService {
-    @Autowired
-    private ComponentsLibraryMapper componentsLibraryMapper;
-
-    /**
-     * 查询红外遥控组件库
-     * 
-     * @param id 红外遥控组件库主键
-     * @return 红外遥控组件库
-     */
-    @Override
-    public ComponentsLibrary selectComponentsLibraryById(Long id)
-    {
-        return componentsLibraryMapper.selectComponentsLibraryById(id);
-    }
-
-    /**
-     * 查询红外遥控组件库列表
-     * 
-     * @param componentsLibrary 红外遥控组件库
-     * @return 红外遥控组件库
-     */
-    @Override
-    public List<ComponentsLibrary> selectComponentsLibraryList(ComponentsLibrary componentsLibrary)
-    {
-        return componentsLibraryMapper.selectComponentsLibraryList(componentsLibrary);
-    }
-
-    /**
-     * 新增红外遥控组件库
-     * 
-     * @param componentsLibrary 红外遥控组件库
-     * @return 结果
-     */
-    @Override
-    public int insertComponentsLibrary(ComponentsLibrary componentsLibrary)
-    {
-        componentsLibrary.setCreateTime(DateUtils.getNowDate());
-        return componentsLibraryMapper.insertComponentsLibrary(componentsLibrary);
-    }
-
-    /**
-     * 修改红外遥控组件库
-     * 
-     * @param componentsLibrary 红外遥控组件库
-     * @return 结果
-     */
-    @Override
-    public int updateComponentsLibrary(ComponentsLibrary componentsLibrary)
-    {
-        componentsLibrary.setUpdateTime(DateUtils.getNowDate());
-        return componentsLibraryMapper.updateComponentsLibrary(componentsLibrary);
-    }
 
-    /**
-     * 批量删除红外遥控组件库
-     * 
-     * @param ids 需要删除的红外遥控组件库主键
-     * @return 结果
-     */
-    @Override
-    public int deleteComponentsLibraryByIds(Long[] ids)
-    {
-        return componentsLibraryMapper.deleteComponentsLibraryByIds(ids);
-    }
 
-    /**
-     * 删除红外遥控组件库信息
-     * 
-     * @param id 红外遥控组件库主键
-     * @return 结果
-     */
-    @Override
-    public int deleteComponentsLibraryById(Long id)
-    {
-        return componentsLibraryMapper.deleteComponentsLibraryById(id);
-    }
 }

+ 3 - 83
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/QrLibraryServiceImpl.java

@@ -1,99 +1,19 @@
 package com.ruoyi.system.service.impl;
 
-import java.util.List;
-
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.common.utils.DateUtils;
-import com.ruoyi.system.domain.ComponentsLibrary;
-import com.ruoyi.system.mapper.ComponentsLibraryMapper;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.ruoyi.system.mapper.QrLibraryMapper;
 import com.ruoyi.system.domain.QrLibrary;
+import com.ruoyi.system.mapper.QrLibraryMapper;
 import com.ruoyi.system.service.QrLibraryService;
+import org.springframework.stereotype.Service;
 
 /**
- * 红外遥控二维码Service业务层处理
+ * 二维码Service业务层处理
  * 
  * @author liming
  * @date 2023-07-12
  */
 @Service
 public class QrLibraryServiceImpl  extends ServiceImpl<QrLibraryMapper, QrLibrary> implements QrLibraryService {
-    @Autowired
-    private QrLibraryMapper qrLibraryMapper;
-
-    /**
-     * 查询红外遥控二维码
-     * 
-     * @param id 红外遥控二维码主键
-     * @return 红外遥控二维码
-     */
-    @Override
-    public QrLibrary selectQrLibraryById(Long id)
-    {
-        return qrLibraryMapper.selectQrLibraryById(id);
-    }
-
-    /**
-     * 查询红外遥控二维码列表
-     * 
-     * @param qrLibrary 红外遥控二维码
-     * @return 红外遥控二维码
-     */
-    @Override
-    public List<QrLibrary> selectQrLibraryList(QrLibrary qrLibrary)
-    {
-        return qrLibraryMapper.selectQrLibraryList(qrLibrary);
-    }
-
-    /**
-     * 新增红外遥控二维码
-     * 
-     * @param qrLibrary 红外遥控二维码
-     * @return 结果
-     */
-    @Override
-    public int insertQrLibrary(QrLibrary qrLibrary)
-    {
-        qrLibrary.setCreateTime(DateUtils.getNowDate());
-        return qrLibraryMapper.insertQrLibrary(qrLibrary);
-    }
-
-    /**
-     * 修改红外遥控二维码
-     * 
-     * @param qrLibrary 红外遥控二维码
-     * @return 结果
-     */
-    @Override
-    public int updateQrLibrary(QrLibrary qrLibrary)
-    {
-        qrLibrary.setUpdateTime(DateUtils.getNowDate());
-        return qrLibraryMapper.updateQrLibrary(qrLibrary);
-    }
 
-    /**
-     * 批量删除红外遥控二维码
-     * 
-     * @param ids 需要删除的红外遥控二维码主键
-     * @return 结果
-     */
-    @Override
-    public int deleteQrLibraryByIds(Long[] ids)
-    {
-        return qrLibraryMapper.deleteQrLibraryByIds(ids);
-    }
 
-    /**
-     * 删除红外遥控二维码信息
-     * 
-     * @param id 红外遥控二维码主键
-     * @return 结果
-     */
-    @Override
-    public int deleteQrLibraryById(Long id)
-    {
-        return qrLibraryMapper.deleteQrLibraryById(id);
-    }
 }

+ 4 - 86
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TemplateLibraryServiceImpl.java

@@ -1,100 +1,18 @@
 package com.ruoyi.system.service.impl;
 
-import java.util.List;
-
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.common.utils.DateUtils;
-import com.ruoyi.system.domain.ComponentsLibrary;
-import com.ruoyi.system.mapper.ComponentsLibraryMapper;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.ruoyi.system.mapper.TemplateLibraryMapper;
 import com.ruoyi.system.domain.TemplateLibrary;
+import com.ruoyi.system.mapper.TemplateLibraryMapper;
 import com.ruoyi.system.service.TemplateLibraryService;
+import org.springframework.stereotype.Service;
 
 /**
- * 红外遥控模板库Service业务层处理
+ * 模板库Service业务层处理
  * 
  * @author liming
  * @date 2023-07-12
  */
 @Service
-public class TemplateLibraryServiceImpl  extends ServiceImpl<TemplateLibraryMapper, TemplateLibrary> implements TemplateLibraryService
-{
-    @Autowired
-    private TemplateLibraryMapper templateLibraryMapper;
-
-    /**
-     * 查询红外遥控模板库
-     * 
-     * @param id 红外遥控模板库主键
-     * @return 红外遥控模板库
-     */
-    @Override
-    public TemplateLibrary selectTemplateLibraryById(Long id)
-    {
-        return templateLibraryMapper.selectTemplateLibraryById(id);
-    }
-
-    /**
-     * 查询红外遥控模板库列表
-     * 
-     * @param templateLibrary 红外遥控模板库
-     * @return 红外遥控模板库
-     */
-    @Override
-    public List<TemplateLibrary> selectTemplateLibraryList(TemplateLibrary templateLibrary)
-    {
-        return templateLibraryMapper.selectTemplateLibraryList(templateLibrary);
-    }
-
-    /**
-     * 新增红外遥控模板库
-     * 
-     * @param templateLibrary 红外遥控模板库
-     * @return 结果
-     */
-    @Override
-    public int insertTemplateLibrary(TemplateLibrary templateLibrary)
-    {
-        templateLibrary.setCreateTime(DateUtils.getNowDate());
-        return templateLibraryMapper.insertTemplateLibrary(templateLibrary);
-    }
-
-    /**
-     * 修改红外遥控模板库
-     * 
-     * @param templateLibrary 红外遥控模板库
-     * @return 结果
-     */
-    @Override
-    public int updateTemplateLibrary(TemplateLibrary templateLibrary)
-    {
-        templateLibrary.setUpdateTime(DateUtils.getNowDate());
-        return templateLibraryMapper.updateTemplateLibrary(templateLibrary);
-    }
-
-    /**
-     * 批量删除红外遥控模板库
-     * 
-     * @param ids 需要删除的红外遥控模板库主键
-     * @return 结果
-     */
-    @Override
-    public int deleteTemplateLibraryByIds(Long[] ids)
-    {
-        return templateLibraryMapper.deleteTemplateLibraryByIds(ids);
-    }
+public class TemplateLibraryServiceImpl  extends ServiceImpl<TemplateLibraryMapper, TemplateLibrary> implements TemplateLibraryService {
 
-    /**
-     * 删除红外遥控模板库信息
-     * 
-     * @param id 红外遥控模板库主键
-     * @return 结果
-     */
-    @Override
-    public int deleteTemplateLibraryById(Long id)
-    {
-        return templateLibraryMapper.deleteTemplateLibraryById(id);
-    }
 }

+ 0 - 81
ruoyi-system/src/main/resources/mapper/system/platform/BasicLibraryMapper.xml

@@ -24,87 +24,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select id, name, band_value, boot_code, boot_code_send, date_code, over_code, status, del_flag, create_by, create_time, update_by, update_time from t_basic_library
     </sql>
 
-    <select id="getList" resultType="com.ruoyi.system.domain.BasicLibrary">
-        select id, name, boot_code_high, boot_code_low, boot_code_send_num, sync_code_interval_high, sync_code_interval_low, data0_high, data0_low, data1_high, data1_low, status, del_flag, create_by, create_time, update_by, update_time from t_basic_library
-    </select>
 
-    <select id="selectBasicLibraryList" parameterType="BasicLibrary" resultMap="BasicLibraryResult">
-        <include refid="selectBasicLibraryVo"/>
-        <where>  
-            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
-            <if test="bandValue != null "> and band_value = #{bandValue}</if>
-            <if test="bootCode != null  and bootCode != ''"> and boot_code = #{bootCode}</if>
-            <if test="bootCodeSend != null "> and boot_code_send = #{bootCodeSend}</if>
-            <if test="dateCode != null  and dateCode != ''"> and date_code = #{dateCode}</if>
-            <if test="overCode != null  and overCode != ''"> and over_code = #{overCode}</if>
-            <if test="status != null  and status != ''"> and status = #{status}</if>
-        </where>
-    </select>
-    
-    <select id="selectBasicLibraryById" parameterType="Long" resultMap="BasicLibraryResult">
-        <include refid="selectBasicLibraryVo"/>
-        where id = #{id}
-    </select>
-        
-    <insert id="insertBasicLibrary" parameterType="BasicLibrary" useGeneratedKeys="true" keyProperty="id">
-        insert into t_basic_library
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="name != null">name,</if>
-            <if test="bandValue != null">band_value,</if>
-            <if test="bootCode != null">boot_code,</if>
-            <if test="bootCodeSend != null">boot_code_send,</if>
-            <if test="dateCode != null">date_code,</if>
-            <if test="overCode != null">over_code,</if>
-            <if test="status != null">status,</if>
-            <if test="delFlag != null">del_flag,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="name != null">#{name},</if>
-            <if test="bandValue != null">#{bandValue},</if>
-            <if test="bootCode != null">#{bootCode},</if>
-            <if test="bootCodeSend != null">#{bootCodeSend},</if>
-            <if test="dateCode != null">#{dateCode},</if>
-            <if test="overCode != null">#{overCode},</if>
-            <if test="status != null">#{status},</if>
-            <if test="delFlag != null">#{delFlag},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-         </trim>
-    </insert>
-
-    <update id="updateBasicLibrary" parameterType="BasicLibrary">
-        update t_basic_library
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="name != null">name = #{name},</if>
-            <if test="bandValue != null">band_value = #{bandValue},</if>
-            <if test="bootCode != null">boot_code = #{bootCode},</if>
-            <if test="bootCodeSend != null">boot_code_send = #{bootCodeSend},</if>
-            <if test="dateCode != null">date_code = #{dateCode},</if>
-            <if test="overCode != null">over_code = #{overCode},</if>
-            <if test="status != null">status = #{status},</if>
-            <if test="delFlag != null">del_flag = #{delFlag},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-        </trim>
-        where id = #{id}
-    </update>
-
-    <delete id="deleteBasicLibraryById" parameterType="Long">
-        delete from t_basic_library where id = #{id}
-    </delete>
 
-    <delete id="deleteBasicLibraryByIds" parameterType="String">
-        delete from t_basic_library where id in 
-        <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </delete>
 </mapper>

+ 0 - 86
ruoyi-system/src/main/resources/mapper/system/platform/ComponentsLibraryMapper.xml

@@ -26,91 +26,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select id, name, bnt_style, type_num, add_sub_max, add_sub_min, dictate_parameter, def_value, repeat_code, status, del_flag, create_by, create_time, update_by, update_time from t_components_library
     </sql>
 
-    <select id="selectComponentsLibraryList" parameterType="ComponentsLibrary" resultMap="ComponentsLibraryResult">
-        <include refid="selectComponentsLibraryVo"/>
-        <where>  
-            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
-            <if test="bntStyle != null  and bntStyle != ''"> and bnt_style = #{bntStyle}</if>
-            <if test="typeNum != null "> and type_num = #{typeNum}</if>
-            <if test="addSubMax != null "> and add_sub_max = #{addSubMax}</if>
-            <if test="addSubMin != null "> and add_sub_min = #{addSubMin}</if>
-            <if test="dictateParameter != null  and dictateParameter != ''"> and dictate_parameter = #{dictateParameter}</if>
-            <if test="defValue != null  and defValue != ''"> and def_value = #{defValue}</if>
-            <if test="repeatCode != null "> and repeat_code = #{repeatCode}</if>
-            <if test="status != null  and status != ''"> and status = #{status}</if>
-        </where>
-    </select>
-    
-    <select id="selectComponentsLibraryById" parameterType="Long" resultMap="ComponentsLibraryResult">
-        <include refid="selectComponentsLibraryVo"/>
-        where id = #{id}
-    </select>
-        
-    <insert id="insertComponentsLibrary" parameterType="ComponentsLibrary" useGeneratedKeys="true" keyProperty="id">
-        insert into t_components_library
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="name != null">name,</if>
-            <if test="bntStyle != null">bnt_style,</if>
-            <if test="typeNum != null">type_num,</if>
-            <if test="addSubMax != null">add_sub_max,</if>
-            <if test="addSubMin != null">add_sub_min,</if>
-            <if test="dictateParameter != null">dictate_parameter,</if>
-            <if test="defValue != null">def_value,</if>
-            <if test="repeatCode != null">repeat_code,</if>
-            <if test="status != null">status,</if>
-            <if test="delFlag != null">del_flag,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="name != null">#{name},</if>
-            <if test="bntStyle != null">#{bntStyle},</if>
-            <if test="typeNum != null">#{typeNum},</if>
-            <if test="addSubMax != null">#{addSubMax},</if>
-            <if test="addSubMin != null">#{addSubMin},</if>
-            <if test="dictateParameter != null">#{dictateParameter},</if>
-            <if test="defValue != null">#{defValue},</if>
-            <if test="repeatCode != null">#{repeatCode},</if>
-            <if test="status != null">#{status},</if>
-            <if test="delFlag != null">#{delFlag},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-         </trim>
-    </insert>
-
-    <update id="updateComponentsLibrary" parameterType="ComponentsLibrary">
-        update t_components_library
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="name != null">name = #{name},</if>
-            <if test="bntStyle != null">bnt_style = #{bntStyle},</if>
-            <if test="typeNum != null">type_num = #{typeNum},</if>
-            <if test="addSubMax != null">add_sub_max = #{addSubMax},</if>
-            <if test="addSubMin != null">add_sub_min = #{addSubMin},</if>
-            <if test="dictateParameter != null">dictate_parameter = #{dictateParameter},</if>
-            <if test="defValue != null">def_value = #{defValue},</if>
-            <if test="repeatCode != null">repeat_code = #{repeatCode},</if>
-            <if test="status != null">status = #{status},</if>
-            <if test="delFlag != null">del_flag = #{delFlag},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-        </trim>
-        where id = #{id}
-    </update>
-
-    <delete id="deleteComponentsLibraryById" parameterType="Long">
-        delete from t_components_library where id = #{id}
-    </delete>
 
-    <delete id="deleteComponentsLibraryByIds" parameterType="String">
-        delete from t_components_library where id in 
-        <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </delete>
 </mapper>

+ 0 - 61
ruoyi-system/src/main/resources/mapper/system/platform/QrLibraryMapper.xml

@@ -20,67 +20,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select id, name, url, status, del_flag, create_by, create_time, update_by, update_time from t_qr_library
     </sql>
 
-    <select id="selectQrLibraryList" parameterType="QrLibrary" resultMap="QrLibraryResult">
-        <include refid="selectQrLibraryVo"/>
-        <where>  
-            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
-            <if test="url != null  and url != ''"> and url = #{url}</if>
-            <if test="status != null  and status != ''"> and status = #{status}</if>
-        </where>
-    </select>
-    
-    <select id="selectQrLibraryById" parameterType="Long" resultMap="QrLibraryResult">
-        <include refid="selectQrLibraryVo"/>
-        where id = #{id}
-    </select>
-        
-    <insert id="insertQrLibrary" parameterType="QrLibrary" useGeneratedKeys="true" keyProperty="id">
-        insert into t_qr_library
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="name != null">name,</if>
-            <if test="url != null">url,</if>
-            <if test="status != null">status,</if>
-            <if test="delFlag != null">del_flag,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="name != null">#{name},</if>
-            <if test="url != null">#{url},</if>
-            <if test="status != null">#{status},</if>
-            <if test="delFlag != null">#{delFlag},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-         </trim>
-    </insert>
-
-    <update id="updateQrLibrary" parameterType="QrLibrary">
-        update t_qr_library
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="name != null">name = #{name},</if>
-            <if test="url != null">url = #{url},</if>
-            <if test="status != null">status = #{status},</if>
-            <if test="delFlag != null">del_flag = #{delFlag},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-        </trim>
-        where id = #{id}
-    </update>
 
-    <delete id="deleteQrLibraryById" parameterType="Long">
-        delete from t_qr_library where id = #{id}
-    </delete>
 
-    <delete id="deleteQrLibraryByIds" parameterType="String">
-        delete from t_qr_library where id in 
-        <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </delete>
 </mapper>

+ 0 - 65
ruoyi-system/src/main/resources/mapper/system/platform/TemplateLibraryMapper.xml

@@ -21,71 +21,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select id, base_id, name, components_id, status, del_flag, create_by, create_time, update_by, update_time from t_template_library
     </sql>
 
-    <select id="selectTemplateLibraryList" parameterType="TemplateLibrary" resultMap="TemplateLibraryResult">
-        <include refid="selectTemplateLibraryVo"/>
-        <where>  
-            <if test="baseId != null "> and base_id = #{baseId}</if>
-            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
-            <if test="componentsId != null  and componentsId != ''"> and components_id = #{componentsId}</if>
-            <if test="status != null  and status != ''"> and status = #{status}</if>
-        </where>
-    </select>
-    
-    <select id="selectTemplateLibraryById" parameterType="Long" resultMap="TemplateLibraryResult">
-        <include refid="selectTemplateLibraryVo"/>
-        where id = #{id}
-    </select>
-        
-    <insert id="insertTemplateLibrary" parameterType="TemplateLibrary" useGeneratedKeys="true" keyProperty="id">
-        insert into t_template_library
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="baseId != null">base_id,</if>
-            <if test="name != null">name,</if>
-            <if test="componentsId != null">components_id,</if>
-            <if test="status != null">status,</if>
-            <if test="delFlag != null">del_flag,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="baseId != null">#{baseId},</if>
-            <if test="name != null">#{name},</if>
-            <if test="componentsId != null">#{componentsId},</if>
-            <if test="status != null">#{status},</if>
-            <if test="delFlag != null">#{delFlag},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-         </trim>
-    </insert>
-
-    <update id="updateTemplateLibrary" parameterType="TemplateLibrary">
-        update t_template_library
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="baseId != null">base_id = #{baseId},</if>
-            <if test="name != null">name = #{name},</if>
-            <if test="componentsId != null">components_id = #{componentsId},</if>
-            <if test="status != null">status = #{status},</if>
-            <if test="delFlag != null">del_flag = #{delFlag},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-        </trim>
-        where id = #{id}
-    </update>
 
-    <delete id="deleteTemplateLibraryById" parameterType="Long">
-        delete from t_template_library where id = #{id}
-    </delete>
 
-    <delete id="deleteTemplateLibraryByIds" parameterType="String">
-        delete from t_template_library where id in 
-        <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </delete>
 </mapper>