瀏覽代碼

Merge remote-tracking branch 'origin/dev-api' into dev-api

wangtianteng 1 年之前
父節點
當前提交
e5bfbaa6da
共有 34 個文件被更改,包括 2587 次插入65 次删除
  1. 99 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/BasicLibraryController.java
  2. 92 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/ComponentsLibraryController.java
  3. 92 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/QrLibraryController.java
  4. 92 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/TemplateLibraryController.java
  5. 17 0
      ruoyi-common/pom.xml
  6. 42 2
      ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java
  7. 1 1
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java
  8. 23 0
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseOrderInfo.java
  9. 40 0
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BasePageInfo.java
  10. 77 0
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/CodeMsg.java
  11. 9 0
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/ErrorEnum.java
  12. 45 0
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/PageInfo.java
  13. 75 53
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/R.java
  14. 10 9
      ruoyi-framework/src/main/java/com/ruoyi/framework/config/MyBatisConfig.java
  15. 208 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/BasicLibrary.java
  16. 166 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/ComponentsLibrary.java
  17. 96 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/QrLibrary.java
  18. 110 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/TemplateLibrary.java
  19. 64 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/BasicLibraryMapper.java
  20. 61 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/ComponentsLibraryMapper.java
  21. 61 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/QrLibraryMapper.java
  22. 61 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/TemplateLibraryMapper.java
  23. 63 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IBasicLibraryService.java
  24. 61 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IComponentsLibraryService.java
  25. 61 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IQrLibraryService.java
  26. 61 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/ITemplateLibraryService.java
  27. 98 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BasicLibraryServiceImpl.java
  28. 96 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ComponentsLibraryServiceImpl.java
  29. 96 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/QrLibraryServiceImpl.java
  30. 96 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TemplateLibraryServiceImpl.java
  31. 126 0
      ruoyi-system/src/main/resources/mapper/system/platform/BasicLibraryMapper.xml
  32. 111 0
      ruoyi-system/src/main/resources/mapper/system/platform/ComponentsLibraryMapper.xml
  33. 86 0
      ruoyi-system/src/main/resources/mapper/system/platform/QrLibraryMapper.xml
  34. 91 0
      ruoyi-system/src/main/resources/mapper/system/platform/TemplateLibraryMapper.xml

+ 99 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/BasicLibraryController.java

@@ -0,0 +1,99 @@
+package com.ruoyi.web.controller.platform;
+
+
+import com.github.pagehelper.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.R;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.domain.BasicLibrary;
+import com.ruoyi.system.service.IBasicLibraryService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 红外遥控基础库管理Controller
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+@RestController
+@RequestMapping("/platform/v1/base")
+public class BasicLibraryController extends BaseController
+{
+    @Autowired
+    private IBasicLibraryService 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);
+    }
+
+
+    // TODO: 2023/7/13  这里做分页测试
+    @GetMapping("/list")
+    public R<List<BasicLibrary>> test(BasicLibrary basicLibrary)
+    {
+//        Page<List<BasicLibrary>> list2 = basicLibraryService.selectBasicLibraryList(basicLibrary);
+        return R.ok();
+    }
+
+    
+    /**
+     * 获取红外遥控基础库管理详细信息
+     */
+    @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:add')")
+    @Log(title = "红外遥控基础库管理", businessType = BusinessType.INSERT)
+    @PostMapping("add")
+    public AjaxResult add(@RequestBody BasicLibrary basicLibrary)
+    {
+        // TODO: 2023/7/12 校验参数必须是26的倍数
+        return toAjax(basicLibraryService.insertBasicLibrary(basicLibrary));
+    }
+
+    /**
+     * 修改红外遥控基础库管理
+     */
+    @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));
+    }
+}

+ 92 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/ComponentsLibraryController.java

@@ -0,0 +1,92 @@
+//package com.ruoyi.web.controller.platform;
+//
+//import java.util.List;
+//import javax.servlet.http.HttpServletResponse;
+//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.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.domain.ComponentsLibrary;
+//import com.ruoyi.system.service.IComponentsLibraryService;
+//import com.ruoyi.common.utils.poi.ExcelUtil;
+//import com.ruoyi.common.core.page.TableDataInfo;
+//
+///**
+// * 红外遥控组件库Controller
+// *
+// * @author liming
+// * @date 2023-07-12
+// */
+//@RestController
+//@RequestMapping("/platform/v1/init")
+//public class ComponentsLibraryController extends BaseController
+//{
+//    @Autowired
+//    private IComponentsLibraryService 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:query')")
+//    @GetMapping(value = "/{id}")
+//    public AjaxResult getInfo(@PathVariable("id") Long id)
+//    {
+//        return success(componentsLibraryService.selectComponentsLibraryById(id));
+//    }
+//
+//    /**
+//     * 新增红外遥控组件库
+//     */
+//    @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:edit')")
+//    @Log(title = "红外遥控组件库", businessType = BusinessType.UPDATE)
+//    @PutMapping
+//    public AjaxResult edit(@RequestBody ComponentsLibrary componentsLibrary)
+//    {
+//        return toAjax(componentsLibraryService.updateComponentsLibrary(componentsLibrary));
+//    }
+//
+//    /**
+//     * 删除红外遥控组件库
+//     */
+//    @PreAuthorize("@ss.hasPermi('platform:components:remove')")
+//    @Log(title = "红外遥控组件库", businessType = BusinessType.DELETE)
+//	@DeleteMapping("/{ids}")
+//    public AjaxResult remove(@PathVariable Long[] ids)
+//    {
+//        return toAjax(componentsLibraryService.deleteComponentsLibraryByIds(ids));
+//    }
+//}

+ 92 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/QrLibraryController.java

@@ -0,0 +1,92 @@
+package com.ruoyi.web.controller.platform;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+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.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.domain.QrLibrary;
+import com.ruoyi.system.service.IQrLibraryService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 红外遥控二维码Controller
+ *
+ * @author liming
+ * @date 2023-07-12
+ */
+@RestController
+@RequestMapping("/platform/v1/or")
+public class QrLibraryController extends BaseController
+{
+    @Autowired
+    private IQrLibraryService 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:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(qrLibraryService.selectQrLibraryById(id));
+    }
+
+    /**
+     * 新增红外遥控二维码
+     */
+    @PreAuthorize("@ss.hasPermi('platform:or:add')")
+    @Log(title = "红外遥控二维码", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody QrLibrary qrLibrary)
+    {
+        return toAjax(qrLibraryService.insertQrLibrary(qrLibrary));
+    }
+
+    /**
+     * 修改红外遥控二维码
+     */
+    @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')")
+    @Log(title = "红外遥控二维码", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(qrLibraryService.deleteQrLibraryByIds(ids));
+    }
+}

+ 92 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/TemplateLibraryController.java

@@ -0,0 +1,92 @@
+package com.ruoyi.web.controller.platform;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+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.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.domain.TemplateLibrary;
+import com.ruoyi.system.service.ITemplateLibraryService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 红外遥控模板库Controller
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+@RestController
+@RequestMapping("/platform/v1/template")
+public class TemplateLibraryController extends BaseController
+{
+    @Autowired
+    private ITemplateLibraryService 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:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(templateLibraryService.selectTemplateLibraryById(id));
+    }
+
+    /**
+     * 新增红外遥控模板库
+     */
+    @PreAuthorize("@ss.hasPermi('platform:template:add')")
+    @Log(title = "红外遥控模板库", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TemplateLibrary templateLibrary)
+    {
+        return toAjax(templateLibraryService.insertTemplateLibrary(templateLibrary));
+    }
+
+    /**
+     * 修改红外遥控模板库
+     */
+    @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:remove')")
+    @Log(title = "红外遥控模板库", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(templateLibraryService.deleteTemplateLibraryByIds(ids));
+    }
+}

+ 17 - 0
ruoyi-common/pom.xml

@@ -140,6 +140,23 @@
             <version>1.6.2</version>
         </dependency>
 
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+            <version>3.5.1</version>
+        </dependency>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-extension</artifactId>
+            <version>3.5.1</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>com.github.jsqlparser</groupId>
+                    <artifactId>jsqlparser</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
     </dependencies>
 
 </project>

+ 42 - 2
ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java

@@ -37,12 +37,22 @@ public class Constants
     /**
      * 通用成功标识
      */
-    public static final String SUCCESS = "0";
+    public static final String SUCCESS = "200";
 
     /**
      * 通用失败标识
      */
-    public static final String FAIL = "1";
+    public static final String FAIL = "444";
+
+    /**
+     * 登录成功状态
+     */
+    public static final String LOGIN_SUCCESS_STATUS = "0";
+
+    /**
+     * 登录失败状态
+     */
+    public static final String LOGIN_FAIL_STATUS = "1";
 
     /**
      * 登录成功
@@ -63,6 +73,26 @@ public class Constants
      * 登录失败
      */
     public static final String LOGIN_FAIL = "Error";
+
+    /**
+     * 当前记录起始索引
+     */
+    public static final String PAGE_NUM = "pageNum";
+
+    /**
+     * 每页显示记录数
+     */
+    public static final String PAGE_SIZE = "pageSize";
+
+    /**
+     * 排序列
+     */
+    public static final String ORDER_BY_COLUMN = "orderByColumn";
+
+    /**
+     * 排序的方向 "desc" 或者 "asc".
+     */
+    public static final String IS_ASC = "isAsc";
  
     /**
      * 验证码有效期(分钟)
@@ -139,4 +169,14 @@ public class Constants
      */
     public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
             "org.springframework", "org.apache", "com.ruoyi.common.utils.file", "com.ruoyi.common.config" };
+
+
+    public static final boolean R_COM_SUCCESS = true;
+    public static final boolean R_COM_DEFAULT_ERROR = true;
+    public static final String R_COM_DEFAULT_CODE = "-1";
+    public static final String R_COM_DEFAULT_STATUS = "1";
+    public static final String R_COM_SUCCESS_STATUS = "000000";
+    public static final String R_COM_SUCCESS_MSG = "OK";
+    public static final String R_COM_SUCCESS_MESSAGE = "成功";
+    public static final boolean R_COM_SUCCESS_ERROR = false;
 }

+ 1 - 1
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java

@@ -13,7 +13,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
  * 
  * @author ruoyi
  */
-public class BaseEntity implements Serializable
+public class BaseEntity extends BasePageInfo implements Serializable
 {
     private static final long serialVersionUID = 1L;
 

+ 23 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseOrderInfo.java

@@ -0,0 +1,23 @@
+package com.ruoyi.common.core.domain;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class BaseOrderInfo implements Serializable {
+
+    /**
+     * 需要进行排序的字段
+     */
+    @ApiModelProperty("需要排序的字段")
+    private String column;
+
+    /**
+     * 是否正序排列,默认 true
+     */
+    @ApiModelProperty("是否正序排列,默认 true")
+    private boolean asc = true;
+
+}

+ 40 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BasePageInfo.java

@@ -0,0 +1,40 @@
+package com.ruoyi.common.core.domain;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by TerryJ
+ */
+@Data
+public class BasePageInfo implements Serializable {
+
+    /**
+     * 每页显示条数,默认 10
+     */
+    @ApiModelProperty(value = "每页显示条数,默认 10")
+    private long size = 10;
+
+    /**
+     * 当前页
+     */
+    @ApiModelProperty(value = "排序字段信息")
+    private long current = 1;
+
+    /**
+     * 排序字段信息
+     */
+    @ApiModelProperty(value = "排序字段信息")
+    private List<BaseOrderInfo> orders = new ArrayList<>();
+
+    /**
+     * 是否进行 count 查询
+     */
+    @ApiModelProperty(value = "是否进行 count 查询 默认true")
+    private boolean isSearchCount = true;
+
+}

+ 77 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/CodeMsg.java

@@ -0,0 +1,77 @@
+package com.ruoyi.common.core.domain;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * 编码 描述 枚举
+ */
+@Getter
+@AllArgsConstructor
+public enum CodeMsg implements ErrorEnum{
+
+    CODE_MSG_100(100, "操作成功"),
+
+    //系统级别 1xx
+    CODE_MSG_101(101, "参数错误"),
+
+    CODE_MSG_102(102, "签名校验失败"),
+    CODE_MSG_103(103, "登录信息过期,请重新登录"),
+    CODE_MSG_104(104, "禁止重复提交,请稍后再试"),
+    CODE_MSG_105(105, "用户不存在"),
+
+    //用户token 11x
+    CODE_MSG_110(110, "参数不能为空"),
+    CODE_MSG_111(111, "时间戳过期"),
+    CODE_MSG_112(112, "重复请求"),
+    CODE_MSG_113(113, "验签失败"),
+    CODE_MSG_114(114, "解析用户手机号失败"),
+
+    CODE_MSG_199(199, "未知异常"),
+
+
+    //业务级别 2xx
+    CODE_MSG_201(201, "账号或密码不正确"),
+    CODE_MSG_202(202,"验证码错误"),
+    CODE_MSG_221(221, "TOKEN已过期"),
+
+    //业务级别 3xx
+    CODE_MSG_301(301, "员工不存在"),
+    CODE_MSG_302(302, "您办理的号码不是黑龙江号码!"),
+    CODE_MSG_303(303, "您的号码与向您推荐业务的朋友非同一城市,办理失败。!"),
+    CODE_MSG_304(304, "没有找到对应的产品!"),
+
+    //业务级别 4xx
+    StatusMsg_403(403, "xxxx"),
+    StatusMsg_404(404, "数据不存在"),
+    StatusMsg_405(405, "服务器错误%s"),
+    StatusMsg_406(406, "%s 是非法的文件格式"),
+
+    //宽带业务BOSS异常
+    StatusMsg_KD_BOSS(501, "%s"),
+    StatusMsg_KD_502(502, "未获取到您的当前主资费"),
+    StatusMsg_KD_503(503, "您目前的手机账户余额为:%s元。您至少需交%s元话费方可参与本活动。"),
+    StatusMsg_KD_504(504, "您暂无可办理的家庭网组。"),
+    StatusMsg_KD_505(505, "未获取到您要添加的号码的详细信息!"),
+    StatusMsg_KD_506(506, "账户状态为:%s。无法添加"),
+    StatusMsg_KD_507(507, "家庭业务校验失败!"),
+    StatusMsg_KD_508(508, "营销案办理失败:%s"),
+    StatusMsg_KD_509(509, "选择要办理的业务错误,请刷新重试!"),
+
+
+    ;
+
+    private int code;
+    private String msg;
+
+    // 构造方法
+    public static String getMsg(int code) {
+        for (CodeMsg codeMsg : CodeMsg.values()) {
+            if (codeMsg.code == code) {
+                return codeMsg.msg;
+            }
+        }
+        return null;
+    }
+
+}

+ 9 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/ErrorEnum.java

@@ -0,0 +1,9 @@
+package com.ruoyi.common.core.domain;
+
+public interface ErrorEnum {
+
+    int getCode();
+
+    String getMsg();
+
+}

+ 45 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/PageInfo.java

@@ -0,0 +1,45 @@
+package com.ruoyi.common.core.domain;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.List;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class PageInfo<T> implements Serializable {
+
+    private static final long serialVersionUID = 8545992873220298798L;
+
+    /**
+     * 总数
+     */
+    @ApiModelProperty(value = "总数")
+    private long total = 0;
+
+    /**
+     * 每页显示条数
+     */
+    @ApiModelProperty(value = "每页显示条数")
+    private long size = 10;
+
+    /**
+     * 当前页
+     */
+    @ApiModelProperty(value = "当前页")
+    private long current = 1;
+
+    /**
+     * 查询数据列表
+     */
+    @ApiModelProperty(value = "数据列表")
+    private List<T> records = Collections.emptyList();
+    public PageInfo(List<T> records){
+        this.records = records;
+    }
+}

+ 75 - 53
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/R.java

@@ -1,71 +1,72 @@
 package com.ruoyi.common.core.domain;
 
+import com.ruoyi.common.constant.Constants;
+
 import java.io.Serializable;
-import com.ruoyi.common.constant.HttpStatus;
 
 /**
  * 响应信息主体
  *
- * @author ruoyi
+ * @author agile
  */
-public class R<T> implements Serializable
-{
+public class R<T> implements Serializable {
+    /**
+     * 成功
+     */
+    public static final int SUCCESS = Integer.parseInt(Constants.SUCCESS);
+    /**
+     * 失败
+     */
+    public static final int FAIL = Integer.parseInt(Constants.FAIL);
     private static final long serialVersionUID = 1L;
-
-    /** 成功 */
-    public static final int SUCCESS = HttpStatus.SUCCESS;
-
-    /** 失败 */
-    public static final int FAIL = HttpStatus.ERROR;
-
+    private static final String SUCCESS_MSG = "success";
     private int code;
 
     private String msg;
 
     private T data;
 
-    public static <T> R<T> ok()
-    {
-        return restResult(null, SUCCESS, "操作成功");
+    public static <T> R<T> ok() {
+        return restResult(null, SUCCESS, SUCCESS_MSG);
     }
 
-    public static <T> R<T> ok(T data)
-    {
-        return restResult(data, SUCCESS, "操作成功");
+    public static <T> R<T> create(T data) {
+        return restResult(data, SUCCESS, SUCCESS_MSG);
     }
 
-    public static <T> R<T> ok(T data, String msg)
-    {
+    public static <T> R<T> ok(T data) {
+        return restResult(data, SUCCESS, SUCCESS_MSG);
+    }
+
+    public static <T> R<T> ok(T data, String msg) {
         return restResult(data, SUCCESS, msg);
     }
 
-    public static <T> R<T> fail()
-    {
-        return restResult(null, FAIL, "操作失败");
+    public static <T> R<T> fail() {
+        return restResult(null, FAIL, null);
     }
 
-    public static <T> R<T> fail(String msg)
-    {
+    public static <T> R<T> fail(String msg) {
         return restResult(null, FAIL, msg);
     }
 
-    public static <T> R<T> fail(T data)
-    {
-        return restResult(data, FAIL, "操作失败");
+    public static <T> R<T> fail(T data) {
+        return restResult(data, FAIL, null);
     }
 
-    public static <T> R<T> fail(T data, String msg)
-    {
+    public static <T> R<T> fail(T data, String msg) {
         return restResult(data, FAIL, msg);
     }
 
-    public static <T> R<T> fail(int code, String msg)
-    {
+    public static <T> R<T> fail(int code, String msg) {
         return restResult(null, code, msg);
     }
 
-    private static <T> R<T> restResult(T data, int code, String msg)
-    {
+    public static <T> R<T> fail(ErrorEnum errorEnum) {
+        return restResult(null, errorEnum.getCode(), errorEnum.getMsg());
+    }
+
+    private static <T> R<T> restResult(T data, int code, String msg) {
         R<T> apiResult = new R<>();
         apiResult.setCode(code);
         apiResult.setData(data);
@@ -73,43 +74,64 @@ public class R<T> implements Serializable
         return apiResult;
     }
 
-    public int getCode()
-    {
+    public static <T> Boolean isError(R<T> ret) {
+        return !isSuccess(ret);
+    }
+
+    public static <T> Boolean isSuccess(R<T> ret) {
+        return R.SUCCESS == ret.getCode();
+    }
+
+    public boolean isOk() {
+        return this.getCode() == 200;
+    }
+
+    public boolean isNotOk() {
+        return this.getCode() != 200;
+    }
+
+    public void setCodeMsg(CodeMsg codeMsg) {
+        this.code = codeMsg.getCode();
+        this.msg = codeMsg.getMsg();
+    }
+
+    public void setCodeMsg(CodeMsg codeMsg,String... args) {
+        this.setCodeMsg(codeMsg);
+        if (null != args) {
+            this.msg = String.format(codeMsg.getMsg(),args);
+        }
+    }
+
+    public int getCode() {
         return code;
     }
 
-    public void setCode(int code)
-    {
+    public void setCode(int code) {
         this.code = code;
     }
 
-    public String getMsg()
-    {
+    public String getMsg() {
         return msg;
     }
 
-    public void setMsg(String msg)
-    {
+    public void setMsg(String msg) {
         this.msg = msg;
     }
 
-    public T getData()
-    {
+    public T getData() {
         return data;
     }
 
-    public void setData(T data)
-    {
+    public void setData(T data) {
         this.data = data;
     }
 
-    public static <T> Boolean isError(R<T> ret)
-    {
-        return !isSuccess(ret);
-    }
-
-    public static <T> Boolean isSuccess(R<T> ret)
-    {
-        return R.SUCCESS == ret.getCode();
+    @Override
+    public String toString() {
+        return "{" +
+                "code=" + code +
+                ", msg='" + msg + '\'' +
+                ", data=" + data +
+                '}';
     }
 }

+ 10 - 9
ruoyi-framework/src/main/java/com/ruoyi/framework/config/MyBatisConfig.java

@@ -1,14 +1,9 @@
 package com.ruoyi.framework.config;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import javax.sql.DataSource;
+import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
+import com.ruoyi.common.utils.StringUtils;
 import org.apache.ibatis.io.VFS;
 import org.apache.ibatis.session.SqlSessionFactory;
-import org.mybatis.spring.SqlSessionFactoryBean;
 import org.mybatis.spring.boot.autoconfigure.SpringBootVFS;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Bean;
@@ -22,7 +17,13 @@ import org.springframework.core.type.classreading.CachingMetadataReaderFactory;
 import org.springframework.core.type.classreading.MetadataReader;
 import org.springframework.core.type.classreading.MetadataReaderFactory;
 import org.springframework.util.ClassUtils;
-import com.ruoyi.common.utils.StringUtils;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
 
 /**
  * Mybatis支持*匹配扫描包
@@ -122,7 +123,7 @@ public class MyBatisConfig
         typeAliasesPackage = setTypeAliasesPackage(typeAliasesPackage);
         VFS.addImplClass(SpringBootVFS.class);
 
-        final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
+        final MybatisSqlSessionFactoryBean sessionFactory = new MybatisSqlSessionFactoryBean();
         sessionFactory.setDataSource(dataSource);
         sessionFactory.setTypeAliasesPackage(typeAliasesPackage);
         sessionFactory.setMapperLocations(resolveMapperLocations(StringUtils.split(mapperLocations, ",")));

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

@@ -0,0 +1,208 @@
+package com.ruoyi.system.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 红外遥控基础库管理对象 t_basic_library
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+public class BasicLibrary extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 基本库id */
+    private Long id;
+
+    /** 基本库名 */
+    @Excel(name = "基本库名")
+    private String name;
+
+    /** 引导码-高电平 */
+    @Excel(name = "引导码-高电平")
+    private Long bootCodeHigh;
+
+    /** 引导码-低电平 */
+    @Excel(name = "引导码-低电平")
+    private Long bootCodeLow;
+
+    /** 引导码-发送次数 */
+    @Excel(name = "引导码-发送次数")
+    private Long bootCodeSendNum;
+
+    /** 同步码间隔时间-高电平 */
+    @Excel(name = "同步码间隔时间-高电平")
+    private Long syncCodeIntervalHigh;
+
+    /** 同步码间隔时间-低电平 */
+    @Excel(name = "同步码间隔时间-低电平")
+    private Long syncCodeIntervalLow;
+
+    /** 数据0-高电平 */
+    @Excel(name = "数据0-高电平")
+    private Long data0High;
+
+    /** 数据0-低电平 */
+    @Excel(name = "数据0-低电平")
+    private Long data0Low;
+
+    /** 数据1-高电平 */
+    @Excel(name = "数据1-高电平")
+    private Long data1High;
+
+    /** 数据1-低电平 */
+    @Excel(name = "数据1-低电平")
+    private Long data1Low;
+
+    /** 状态(0使用中 1未使用) */
+    @Excel(name = "状态", readConverterExp = "0=使用中,1=未使用")
+    private String status;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setName(String name) 
+    {
+        this.name = name;
+    }
+
+    public String getName() 
+    {
+        return name;
+    }
+    public void setBootCodeHigh(Long bootCodeHigh) 
+    {
+        this.bootCodeHigh = bootCodeHigh;
+    }
+
+    public Long getBootCodeHigh() 
+    {
+        return bootCodeHigh;
+    }
+    public void setBootCodeLow(Long bootCodeLow) 
+    {
+        this.bootCodeLow = bootCodeLow;
+    }
+
+    public Long getBootCodeLow() 
+    {
+        return bootCodeLow;
+    }
+    public void setBootCodeSendNum(Long bootCodeSendNum) 
+    {
+        this.bootCodeSendNum = bootCodeSendNum;
+    }
+
+    public Long getBootCodeSendNum() 
+    {
+        return bootCodeSendNum;
+    }
+    public void setSyncCodeIntervalHigh(Long syncCodeIntervalHigh) 
+    {
+        this.syncCodeIntervalHigh = syncCodeIntervalHigh;
+    }
+
+    public Long getSyncCodeIntervalHigh() 
+    {
+        return syncCodeIntervalHigh;
+    }
+    public void setSyncCodeIntervalLow(Long syncCodeIntervalLow) 
+    {
+        this.syncCodeIntervalLow = syncCodeIntervalLow;
+    }
+
+    public Long getSyncCodeIntervalLow() 
+    {
+        return syncCodeIntervalLow;
+    }
+    public void setData0High(Long data0High) 
+    {
+        this.data0High = data0High;
+    }
+
+    public Long getData0High() 
+    {
+        return data0High;
+    }
+    public void setData0Low(Long data0Low) 
+    {
+        this.data0Low = data0Low;
+    }
+
+    public Long getData0Low() 
+    {
+        return data0Low;
+    }
+    public void setData1High(Long data1High) 
+    {
+        this.data1High = data1High;
+    }
+
+    public Long getData1High() 
+    {
+        return data1High;
+    }
+    public void setData1Low(Long data1Low) 
+    {
+        this.data1Low = data1Low;
+    }
+
+    public Long getData1Low() 
+    {
+        return data1Low;
+    }
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("name", getName())
+            .append("bootCodeHigh", getBootCodeHigh())
+            .append("bootCodeLow", getBootCodeLow())
+            .append("bootCodeSendNum", getBootCodeSendNum())
+            .append("syncCodeIntervalHigh", getSyncCodeIntervalHigh())
+            .append("syncCodeIntervalLow", getSyncCodeIntervalLow())
+            .append("data0High", getData0High())
+            .append("data0Low", getData0Low())
+            .append("data1High", getData1High())
+            .append("data1Low", getData1Low())
+            .append("status", getStatus())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 166 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/ComponentsLibrary.java

@@ -0,0 +1,166 @@
+package com.ruoyi.system.domain;
+
+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;
+
+/**
+ * 红外遥控组件库对象 t_components_library
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+public class ComponentsLibrary extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 组件id */
+    private Long id;
+
+    /** 组件名称 */
+    @Excel(name = "组件名称")
+    private String name;
+
+    /** 组件类型   1开关型  2加减形 */
+    @Excel(name = "组件类型   1开关型  2加减形")
+    private Long typeNum;
+
+    /** 加减型  最大值 */
+    @Excel(name = "加减型  最大值")
+    private Long addSubMax;
+
+    /** 加减型  最小值 */
+    @Excel(name = "加减型  最小值")
+    private Long addSubMin;
+
+    /** 命令参数 */
+    @Excel(name = "命令参数")
+    private String dictateParameter;
+
+    /** 默认值 */
+    @Excel(name = "默认值")
+    private String defValue;
+
+    /** 重复码 */
+    @Excel(name = "重复码")
+    private Long repeatCode;
+
+    /** 状态(0使用中 1未使用) */
+    @Excel(name = "状态", readConverterExp = "0=使用中,1=未使用")
+    private String status;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setName(String name) 
+    {
+        this.name = name;
+    }
+
+    public String getName() 
+    {
+        return name;
+    }
+    public void setTypeNum(Long typeNum) 
+    {
+        this.typeNum = typeNum;
+    }
+
+    public Long getTypeNum() 
+    {
+        return typeNum;
+    }
+    public void setAddSubMax(Long addSubMax) 
+    {
+        this.addSubMax = addSubMax;
+    }
+
+    public Long getAddSubMax() 
+    {
+        return addSubMax;
+    }
+    public void setAddSubMin(Long addSubMin) 
+    {
+        this.addSubMin = addSubMin;
+    }
+
+    public Long getAddSubMin() 
+    {
+        return addSubMin;
+    }
+    public void setDictateParameter(String dictateParameter) 
+    {
+        this.dictateParameter = dictateParameter;
+    }
+
+    public String getDictateParameter() 
+    {
+        return dictateParameter;
+    }
+    public void setDefValue(String defValue) 
+    {
+        this.defValue = defValue;
+    }
+
+    public String getDefValue() 
+    {
+        return defValue;
+    }
+    public void setRepeatCode(Long repeatCode) 
+    {
+        this.repeatCode = repeatCode;
+    }
+
+    public Long getRepeatCode() 
+    {
+        return repeatCode;
+    }
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("name", getName())
+            .append("typeNum", getTypeNum())
+            .append("addSubMax", getAddSubMax())
+            .append("addSubMin", getAddSubMin())
+            .append("dictateParameter", getDictateParameter())
+            .append("defValue", getDefValue())
+            .append("repeatCode", getRepeatCode())
+            .append("status", getStatus())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 96 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/QrLibrary.java

@@ -0,0 +1,96 @@
+package com.ruoyi.system.domain;
+
+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;
+
+/**
+ * 红外遥控二维码对象 t_qr_library
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+public class QrLibrary extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 二维码id */
+    private Long id;
+
+    /** 二维码名称 */
+    @Excel(name = "二维码名称")
+    private String name;
+
+    /** 二维码连接 */
+    @Excel(name = "二维码连接")
+    private String url;
+
+    /** 状态(0使用中 1未使用) */
+    @Excel(name = "状态", readConverterExp = "0=使用中,1=未使用")
+    private String status;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setName(String name) 
+    {
+        this.name = name;
+    }
+
+    public String getName() 
+    {
+        return name;
+    }
+    public void setUrl(String url) 
+    {
+        this.url = url;
+    }
+
+    public String getUrl() 
+    {
+        return url;
+    }
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("name", getName())
+            .append("url", getUrl())
+            .append("status", getStatus())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

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

@@ -0,0 +1,110 @@
+package com.ruoyi.system.domain;
+
+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;
+
+/**
+ * 红外遥控模板库对象 t_template_library
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+public class TemplateLibrary extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 模板id */
+    private Long id;
+
+    /** 基础库id */
+    @Excel(name = "基础库id")
+    private Long baseId;
+
+    /** 模板名称 */
+    @Excel(name = "模板名称")
+    private String name;
+
+    /** 关联组件id */
+    @Excel(name = "关联组件id")
+    private String componentsId;
+
+    /** 状态(0使用中 1未使用) */
+    @Excel(name = "状态", readConverterExp = "0=使用中,1=未使用")
+    private String status;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setBaseId(Long baseId) 
+    {
+        this.baseId = baseId;
+    }
+
+    public Long getBaseId() 
+    {
+        return baseId;
+    }
+    public void setName(String name) 
+    {
+        this.name = name;
+    }
+
+    public String getName() 
+    {
+        return name;
+    }
+    public void setComponentsId(String componentsId) 
+    {
+        this.componentsId = componentsId;
+    }
+
+    public String getComponentsId() 
+    {
+        return componentsId;
+    }
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("baseId", getBaseId())
+            .append("name", getName())
+            .append("componentsId", getComponentsId())
+            .append("status", getStatus())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 64 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/BasicLibraryMapper.java

@@ -0,0 +1,64 @@
+package com.ruoyi.system.mapper;
+
+
+
+import com.ruoyi.system.domain.BasicLibrary;
+
+import java.util.List;
+
+/**
+ * 红外遥控基础库管理Mapper接口
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+public interface BasicLibraryMapper
+{
+    /**
+     * 查询红外遥控基础库管理
+     * 
+     * @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);
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/ComponentsLibraryMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.domain.ComponentsLibrary;
+
+/**
+ * 红外遥控组件库Mapper接口
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+public interface ComponentsLibraryMapper 
+{
+    /**
+     * 查询红外遥控组件库
+     * 
+     * @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);
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/QrLibraryMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.domain.QrLibrary;
+
+/**
+ * 红外遥控二维码Mapper接口
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+public interface QrLibraryMapper 
+{
+    /**
+     * 查询红外遥控二维码
+     * 
+     * @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);
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TemplateLibraryMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.domain.TemplateLibrary;
+
+/**
+ * 红外遥控模板库Mapper接口
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+public interface TemplateLibraryMapper 
+{
+    /**
+     * 查询红外遥控模板库
+     * 
+     * @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);
+}

+ 63 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IBasicLibraryService.java

@@ -0,0 +1,63 @@
+package com.ruoyi.system.service;
+
+
+import com.ruoyi.system.domain.BasicLibrary;
+
+import java.util.List;
+
+/**
+ * 红外遥控基础库管理Service接口
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+public interface IBasicLibraryService 
+{
+    /**
+     * 查询红外遥控基础库管理
+     * 
+     * @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);
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IComponentsLibraryService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.service;
+
+import java.util.List;
+import com.ruoyi.system.domain.ComponentsLibrary;
+
+/**
+ * 红外遥控组件库Service接口
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+public interface IComponentsLibraryService 
+{
+    /**
+     * 查询红外遥控组件库
+     * 
+     * @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);
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IQrLibraryService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.service;
+
+import java.util.List;
+import com.ruoyi.system.domain.QrLibrary;
+
+/**
+ * 红外遥控二维码Service接口
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+public interface IQrLibraryService 
+{
+    /**
+     * 查询红外遥控二维码
+     * 
+     * @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);
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/ITemplateLibraryService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.service;
+
+import java.util.List;
+import com.ruoyi.system.domain.TemplateLibrary;
+
+/**
+ * 红外遥控模板库Service接口
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+public interface ITemplateLibraryService 
+{
+    /**
+     * 查询红外遥控模板库
+     * 
+     * @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);
+}

+ 98 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BasicLibraryServiceImpl.java

@@ -0,0 +1,98 @@
+package com.ruoyi.system.service.impl;
+
+
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.BasicLibrary;
+import com.ruoyi.system.mapper.BasicLibraryMapper;
+import com.ruoyi.system.service.IBasicLibraryService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 红外遥控基础库管理Service业务层处理
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+@Service
+public class BasicLibraryServiceImpl implements IBasicLibraryService
+{
+    @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);
+    }
+}

+ 96 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ComponentsLibraryServiceImpl.java

@@ -0,0 +1,96 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.ComponentsLibraryMapper;
+import com.ruoyi.system.domain.ComponentsLibrary;
+import com.ruoyi.system.service.IComponentsLibraryService;
+
+/**
+ * 红外遥控组件库Service业务层处理
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+@Service
+public class ComponentsLibraryServiceImpl implements IComponentsLibraryService 
+{
+    @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);
+    }
+}

+ 96 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/QrLibraryServiceImpl.java

@@ -0,0 +1,96 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+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.service.IQrLibraryService;
+
+/**
+ * 红外遥控二维码Service业务层处理
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+@Service
+public class QrLibraryServiceImpl implements IQrLibraryService 
+{
+    @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);
+    }
+}

+ 96 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TemplateLibraryServiceImpl.java

@@ -0,0 +1,96 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+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.service.ITemplateLibraryService;
+
+/**
+ * 红外遥控模板库Service业务层处理
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+@Service
+public class TemplateLibraryServiceImpl implements ITemplateLibraryService 
+{
+    @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);
+    }
+
+    /**
+     * 删除红外遥控模板库信息
+     * 
+     * @param id 红外遥控模板库主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTemplateLibraryById(Long id)
+    {
+        return templateLibraryMapper.deleteTemplateLibraryById(id);
+    }
+}

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

@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.BasicLibraryMapper">
+    
+    <resultMap type="BasicLibrary" id="BasicLibraryResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="bootCodeHigh"    column="boot_code_high"    />
+        <result property="bootCodeLow"    column="boot_code_low"    />
+        <result property="bootCodeSendNum"    column="boot_code_send_num"    />
+        <result property="syncCodeIntervalHigh"    column="sync_code_interval_high"    />
+        <result property="syncCodeIntervalLow"    column="sync_code_interval_low"    />
+        <result property="data0High"    column="data0_high"    />
+        <result property="data0Low"    column="data0_low"    />
+        <result property="data1High"    column="data1_high"    />
+        <result property="data1Low"    column="data1_low"    />
+        <result property="status"    column="status"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectBasicLibraryVo">
+        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
+    </sql>
+
+    <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="bootCodeHigh != null "> and boot_code_high = #{bootCodeHigh}</if>
+            <if test="bootCodeLow != null "> and boot_code_low = #{bootCodeLow}</if>
+            <if test="bootCodeSendNum != null "> and boot_code_send_num = #{bootCodeSendNum}</if>
+            <if test="syncCodeIntervalHigh != null "> and sync_code_interval_high = #{syncCodeIntervalHigh}</if>
+            <if test="syncCodeIntervalLow != null "> and sync_code_interval_low = #{syncCodeIntervalLow}</if>
+            <if test="data0High != null "> and data0_high = #{data0High}</if>
+            <if test="data0Low != null "> and data0_low = #{data0Low}</if>
+            <if test="data1High != null "> and data1_high = #{data1High}</if>
+            <if test="data1Low != null "> and data1_low = #{data1Low}</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="bootCodeHigh != null">boot_code_high,</if>
+            <if test="bootCodeLow != null">boot_code_low,</if>
+            <if test="bootCodeSendNum != null">boot_code_send_num,</if>
+            <if test="syncCodeIntervalHigh != null">sync_code_interval_high,</if>
+            <if test="syncCodeIntervalLow != null">sync_code_interval_low,</if>
+            <if test="data0High != null">data0_high,</if>
+            <if test="data0Low != null">data0_low,</if>
+            <if test="data1High != null">data1_high,</if>
+            <if test="data1Low != null">data1_low,</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="bootCodeHigh != null">#{bootCodeHigh},</if>
+            <if test="bootCodeLow != null">#{bootCodeLow},</if>
+            <if test="bootCodeSendNum != null">#{bootCodeSendNum},</if>
+            <if test="syncCodeIntervalHigh != null">#{syncCodeIntervalHigh},</if>
+            <if test="syncCodeIntervalLow != null">#{syncCodeIntervalLow},</if>
+            <if test="data0High != null">#{data0High},</if>
+            <if test="data0Low != null">#{data0Low},</if>
+            <if test="data1High != null">#{data1High},</if>
+            <if test="data1Low != null">#{data1Low},</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="bootCodeHigh != null">boot_code_high = #{bootCodeHigh},</if>
+            <if test="bootCodeLow != null">boot_code_low = #{bootCodeLow},</if>
+            <if test="bootCodeSendNum != null">boot_code_send_num = #{bootCodeSendNum},</if>
+            <if test="syncCodeIntervalHigh != null">sync_code_interval_high = #{syncCodeIntervalHigh},</if>
+            <if test="syncCodeIntervalLow != null">sync_code_interval_low = #{syncCodeIntervalLow},</if>
+            <if test="data0High != null">data0_high = #{data0High},</if>
+            <if test="data0Low != null">data0_low = #{data0Low},</if>
+            <if test="data1High != null">data1_high = #{data1High},</if>
+            <if test="data1Low != null">data1_low = #{data1Low},</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>

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

@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.ComponentsLibraryMapper">
+    
+    <resultMap type="ComponentsLibrary" id="ComponentsLibraryResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="typeNum"    column="type_num"    />
+        <result property="addSubMax"    column="add_sub_max"    />
+        <result property="addSubMin"    column="add_sub_min"    />
+        <result property="dictateParameter"    column="dictate_parameter"    />
+        <result property="defValue"    column="def_value"    />
+        <result property="repeatCode"    column="repeat_code"    />
+        <result property="status"    column="status"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectComponentsLibraryVo">
+        select id, name, 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="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="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="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="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>

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

@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.QrLibraryMapper">
+    
+    <resultMap type="QrLibrary" id="QrLibraryResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="url"    column="url"    />
+        <result property="status"    column="status"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectQrLibraryVo">
+        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>

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

@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.TemplateLibraryMapper">
+    
+    <resultMap type="TemplateLibrary" id="TemplateLibraryResult">
+        <result property="id"    column="id"    />
+        <result property="baseId"    column="base_id"    />
+        <result property="name"    column="name"    />
+        <result property="componentsId"    column="components_id"    />
+        <result property="status"    column="status"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectTemplateLibraryVo">
+        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>