Bladeren bron

网页端版本管理

tags/正式3.3.0
雍文秀 2 jaren geleden
bovenliggende
commit
f433e0b8eb

+ 1
- 1
sapi/src/main/java/com/xhkjedu/sapi/controller/appversion/WebVersionController.java Bestand weergeven

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

+ 1
- 1
sapi/src/main/java/com/xhkjedu/sapi/mapper/appversion/WebVersionMapper.java Bestand weergeven

@@ -14,7 +14,7 @@ public interface WebVersionMapper extends TkMapper<TWebVersion> {
14 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 20
     Map getNew(@Param("versiontype") Integer versiontype);

+ 2
- 2
sapi/src/main/java/com/xhkjedu/sapi/service/appversion/WebVersionService.java Bestand weergeven

@@ -41,8 +41,8 @@ public class WebVersionService {
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 Bestand weergeven

@@ -8,7 +8,13 @@
8 8
     <!--获取版本列表-->
9 9
     <select id="listAll" resultType="java.util.Map">
10 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 18
     </select>
13 19
     <!--获取最新版本-->
14 20
     <select id="getNew" resultType="java.util.Map">

Laden…
Annuleren
Opslaan