Browse Source

网页端版本管理

tags/正式3.3.0
雍文秀 2 years ago
parent
commit
f433e0b8eb

+ 1
- 1
sapi/src/main/java/com/xhkjedu/sapi/controller/appversion/WebVersionController.java View File

54
     @PostMapping("/list")
54
     @PostMapping("/list")
55
     public ResultVo list(@RequestBody TWebVersion app) {
55
     public ResultVo list(@RequestBody TWebVersion app) {
56
         PageHelper.startPage(app.getPage(), app.getPageSize());
56
         PageHelper.startPage(app.getPage(), app.getPageSize());
57
-        List<Map> list = webVersionService.listAll();
57
+        List<Map> list = webVersionService.listAll(app);
58
         PageResult pageResult = PageUtil.getPageResult(new PageInfo(list));
58
         PageResult pageResult = PageUtil.getPageResult(new PageInfo(list));
59
         return new ResultVo(0, "获取列表成功", pageResult);
59
         return new ResultVo(0, "获取列表成功", pageResult);
60
     }
60
     }

+ 1
- 1
sapi/src/main/java/com/xhkjedu/sapi/mapper/appversion/WebVersionMapper.java View File

14
     Integer getCode(@Param("versiontype") Integer versiontype);
14
     Integer getCode(@Param("versiontype") Integer versiontype);
15
 
15
 
16
     //列表
16
     //列表
17
-    List<Map> listAll();
17
+    List<Map> listAll(@Param("app") TWebVersion app);
18
 
18
 
19
     //最新版本
19
     //最新版本
20
     Map getNew(@Param("versiontype") Integer versiontype);
20
     Map getNew(@Param("versiontype") Integer versiontype);

+ 2
- 2
sapi/src/main/java/com/xhkjedu/sapi/service/appversion/WebVersionService.java View File

41
     }
41
     }
42
 
42
 
43
     //获取列表
43
     //获取列表
44
-    public List<Map> listAll() {
45
-        return webVersionMapper.listAll();
44
+    public List<Map> listAll(TWebVersion app) {
45
+        return webVersionMapper.listAll(app);
46
     }
46
     }
47
 
47
 
48
     /**
48
     /**

+ 7
- 1
sapi/src/main/resources/mapper/appversion/WebVersionMapper.xml View File

8
     <!--获取版本列表-->
8
     <!--获取版本列表-->
9
     <select id="listAll" resultType="java.util.Map">
9
     <select id="listAll" resultType="java.util.Map">
10
         select v.versionid,v.versioncode,v.versionname,v.versiontype,v.versioncomm,v.createtime
10
         select v.versionid,v.versioncode,v.versionname,v.versiontype,v.versioncomm,v.createtime
11
-        from t_web_version v order by v.versionid desc
11
+        from t_web_version v
12
+        <where>
13
+            <if test="app.versiontype!=null and app.versiontype!=0">
14
+                and v.versiontype=#{app.versiontype}
15
+            </if>
16
+        </where>
17
+        order by v.versionid desc
12
     </select>
18
     </select>
13
     <!--获取最新版本-->
19
     <!--获取最新版本-->
14
     <select id="getNew" resultType="java.util.Map">
20
     <select id="getNew" resultType="java.util.Map">

Loading…
Cancel
Save