Showing
1 changed file
with
17 additions
and
1 deletions
@@ -71,7 +71,8 @@ public class ResourceServiceImpl implements IResourceService{ | @@ -71,7 +71,8 @@ public class ResourceServiceImpl implements IResourceService{ | ||
71 | } | 71 | } |
72 | List<ResourceGetBo> resourceGetBoList = new ArrayList<>(); | 72 | List<ResourceGetBo> resourceGetBoList = new ArrayList<>(); |
73 | for(Resources res : resourcesList){ | 73 | for(Resources res : resourcesList){ |
74 | - ResourceGetBo bo = new ResourceGetBo(res.getId(), res.getName(), Integer.valueOf(1).equals(res.getPlatformId()) ? "APP" : "小程序", | 74 | + |
75 | + ResourceGetBo bo = new ResourceGetBo(res.getId(), res.getName(), getPlatformName(res.getPlatformId()), | ||
75 | res.getCode(), res.getCreateTime()); | 76 | res.getCode(), res.getCreateTime()); |
76 | bo.setSortId(res.getSortId()); | 77 | bo.setSortId(res.getSortId()); |
77 | resourceGetBoList.add(bo); | 78 | resourceGetBoList.add(bo); |
@@ -303,4 +304,19 @@ public class ResourceServiceImpl implements IResourceService{ | @@ -303,4 +304,19 @@ public class ResourceServiceImpl implements IResourceService{ | ||
303 | }); | 304 | }); |
304 | } | 305 | } |
305 | 306 | ||
307 | + private String getPlatformName(Integer platformId) { | ||
308 | + if (platformId != null) { | ||
309 | + if (platformId == 1) { | ||
310 | + return "APP"; | ||
311 | + } | ||
312 | + if (platformId == 2) { | ||
313 | + return "小程序"; | ||
314 | + } | ||
315 | + if (platformId == 3) { | ||
316 | + return "H5"; | ||
317 | + } | ||
318 | + } | ||
319 | + return "小程序"; | ||
320 | + } | ||
321 | + | ||
306 | } | 322 | } |
-
Please register or login to post a comment