Commit 31a28cb40dbebf0c2926d7c148c7505a67473488
1 parent
d6b59743
Review代码修改
Showing
2 changed files
with
4 additions
and
4 deletions
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/enums/decorate/DecoratePageEnum.java
| ... | ... | @@ -16,7 +16,7 @@ import java.util.Arrays; |
| 16 | 16 | public enum DecoratePageEnum implements IntArrayValuable { |
| 17 | 17 | |
| 18 | 18 | INDEX(1, "首页"), |
| 19 | - MY(2, "个人中心"), | |
| 19 | + MY(2, "我的"), | |
| 20 | 20 | ; |
| 21 | 21 | |
| 22 | 22 | private static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DecoratePageEnum::getPage).toArray(); | ... | ... |
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/diy/AppDiyTemplateController.java
| ... | ... | @@ -5,6 +5,7 @@ import cn.iocoder.yudao.module.promotion.controller.app.diy.vo.AppDiyTemplatePro |
| 5 | 5 | import cn.iocoder.yudao.module.promotion.convert.diy.DiyTemplateConvert; |
| 6 | 6 | import cn.iocoder.yudao.module.promotion.dal.dataobject.diy.DiyPageDO; |
| 7 | 7 | import cn.iocoder.yudao.module.promotion.dal.dataobject.diy.DiyTemplateDO; |
| 8 | +import cn.iocoder.yudao.module.promotion.enums.decorate.DecoratePageEnum; | |
| 8 | 9 | import cn.iocoder.yudao.module.promotion.service.diy.DiyPageService; |
| 9 | 10 | import cn.iocoder.yudao.module.promotion.service.diy.DiyTemplateService; |
| 10 | 11 | import io.swagger.v3.oas.annotations.Operation; |
| ... | ... | @@ -55,9 +56,8 @@ public class AppDiyTemplateController { |
| 55 | 56 | } |
| 56 | 57 | // 查询模板下的页面 |
| 57 | 58 | List<DiyPageDO> pages = diyPageService.getDiyPageByTemplateId(diyTemplate.getId()); |
| 58 | - // TODO @疯狂:首页、我的,要不枚举到 DiyPageDO 例如说 NAME_USER,NAME_HOME 类似这种哈; | |
| 59 | - String home = findFirst(pages, page -> "首页".equals(page.getName()), DiyPageDO::getProperty); | |
| 60 | - String user = findFirst(pages, page -> "我的".equals(page.getName()), DiyPageDO::getProperty); | |
| 59 | + String home = findFirst(pages, page -> DecoratePageEnum.INDEX.getName().equals(page.getName()), DiyPageDO::getProperty); | |
| 60 | + String user = findFirst(pages, page -> DecoratePageEnum.MY.getName().equals(page.getName()), DiyPageDO::getProperty); | |
| 61 | 61 | // 拼接返回 |
| 62 | 62 | return DiyTemplateConvert.INSTANCE.convertPropertyVo2(diyTemplate, home, user); |
| 63 | 63 | } | ... | ... |