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

Api 新增app配置接口

limingming 1 éve
szülő
commit
b2219c61f1

+ 34 - 0
rouyi-api/src/main/java/com/info666/infraredRemote/controller/AppConfigController.java

@@ -0,0 +1,34 @@
+package com.info666.infraredRemote.controller;
+
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.system.domain.AppConfigLibrary;
+import com.ruoyi.system.service.AppConfigLibraryService;
+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.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @Author: LiMingMing
+ * @Date: 2023/7/19 14:27
+ * @Description: TODO
+ **/
+@RestController
+@RequestMapping("/api/v1/appConfig")
+public class AppConfigController {
+
+    @Autowired
+    private AppConfigLibraryService appConfigLibraryService;
+
+
+    @ApiOperation("获取App配置信息")
+    @GetMapping("/getAppConfig")
+    public R<List<AppConfigLibrary>> getAppConfig() {
+
+        return R.ok(appConfigLibraryService.list(null));
+    }
+
+}

+ 0 - 4
rouyi-api/src/main/java/com/info666/infraredRemote/controller/GetDeviceInfoController.java

@@ -7,7 +7,6 @@ import com.ruoyi.system.domain.BasicLibrary;
 import com.ruoyi.system.domain.TemplateLibrary;
 import com.ruoyi.system.domain.vo.GetDeviceInfoVo;
 import com.ruoyi.system.service.BasicLibraryService;
-import com.ruoyi.system.service.ComponentsLibraryService;
 import com.ruoyi.system.service.TemplateLibraryService;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -33,9 +32,6 @@ public class GetDeviceInfoController {
     @Autowired
     private TemplateLibraryService templateLibraryService;
 
-    @Autowired
-    private ComponentsLibraryService componentsLibraryService;
-
     @ApiOperation("获取遥控设备信息")
     @PostMapping("/getDeviceInfo")
     public R<List<GetDeviceInfoVo>> getDeviceInfo(@RequestBody BaseParam param) {

+ 29 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/AppConfigLibrary.java

@@ -0,0 +1,29 @@
+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.ruoyi.common.annotation.Excel;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author: LiMingMing
+ * @Date: 2023/7/14 15:15
+ * @Description: 统一查询信息加分页信息
+ **/
+@Data
+@TableName("t_app_config_library")
+public class AppConfigLibrary implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**id */
+    @TableId( value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /** data */
+    @Excel(name = "基本库名")
+    private String data;
+
+}

+ 15 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/AppConfigLibraryMapper.java

@@ -0,0 +1,15 @@
+package com.ruoyi.system.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.system.domain.AppConfigLibrary;
+
+/**
+ * app配置
+ * 
+ * @author liming
+ * @date 2023-07-19
+ */
+public interface AppConfigLibraryMapper extends BaseMapper<AppConfigLibrary> {
+
+}

+ 16 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/AppConfigLibraryService.java

@@ -0,0 +1,16 @@
+package com.ruoyi.system.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.system.domain.AppConfigLibrary;
+
+/**
+ * App配置
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+public interface AppConfigLibraryService extends IService<AppConfigLibrary> {
+
+
+
+}

+ 20 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AppConfigLibraryServiceImpl.java

@@ -0,0 +1,20 @@
+package com.ruoyi.system.service.impl;
+
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.system.domain.AppConfigLibrary;
+import com.ruoyi.system.mapper.AppConfigLibraryMapper;
+import com.ruoyi.system.service.AppConfigLibraryService;
+import org.springframework.stereotype.Service;
+
+/**
+ * APP配置
+ * 
+ * @author liming
+ * @date 2023-07-19
+ */
+@Service
+public class AppConfigLibraryServiceImpl extends ServiceImpl<AppConfigLibraryMapper, AppConfigLibrary> implements AppConfigLibraryService {
+
+
+}

+ 18 - 0
ruoyi-system/src/main/resources/mapper/system/platform/AppConfigLibraryMapper.xml

@@ -0,0 +1,18 @@
+<?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.AppConfigLibraryMapper">
+    
+    <resultMap type="AppConfigLibrary" id="AppConfigLibraryResult">
+        <result property="id"    column="id"    />
+        <result property="data"    column="data"    />
+    </resultMap>
+
+    <sql id="selectBasicLibraryVo">
+        select id, data from t_app_config_library
+    </sql>
+
+
+
+</mapper>