Commit 106c1ecf4c08c9f8b2e52d3e2f60408586a55be2
1 parent
cd45fc35
📖 code review:店铺装修逻辑
Showing
6 changed files
with
10 additions
and
2 deletions
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/diy/DiyTemplateController.java
| ... | ... | @@ -82,6 +82,7 @@ public class DiyTemplateController { |
| 82 | 82 | return success(DiyTemplateConvert.INSTANCE.convertPage(pageResult)); |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | + // TODO @疯狂:这个要不和 getDiyTemplate 合并,然后 DiyTemplateRespVO 里面直接把 DiyPagePropertyRespVO 也加上。减少 VO 好了,管理后台 get 多返回点数据,也问题不大的。目的,还是想尽可能降低大家的理解成本哈; | |
| 85 | 86 | @GetMapping("/get-property") |
| 86 | 87 | @Operation(summary = "获得装修模板属性") |
| 87 | 88 | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| ... | ... | @@ -92,6 +93,7 @@ public class DiyTemplateController { |
| 92 | 93 | return success(DiyTemplateConvert.INSTANCE.convertPropertyVo(diyTemplate, pages)); |
| 93 | 94 | } |
| 94 | 95 | |
| 96 | + // TODO @疯狂:这个接口,要不和 useDiyTemplate 合并成一个,然后 VO 改成我们新的 VO 规范。不改的字段,就不传递。 | |
| 95 | 97 | @PutMapping("/update-property") |
| 96 | 98 | @Operation(summary = "更新装修模板属性") |
| 97 | 99 | @PreAuthorize("@ss.hasPermission('promotion:diy-template:update')") | ... | ... |
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/decorate/AppDecorateController.java
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/diy/AppDiyTemplateController.java
| ... | ... | @@ -33,6 +33,7 @@ public class AppDiyTemplateController { |
| 33 | 33 | @Resource |
| 34 | 34 | private DiyPageService diyPageService; |
| 35 | 35 | |
| 36 | + // TODO @疯狂:要不要把 used 和 get 接口合并哈;不传递 id,直接拿默认; | |
| 36 | 37 | @GetMapping("/used") |
| 37 | 38 | @Operation(summary = "使用中的装修模板") |
| 38 | 39 | public CommonResult<AppDiyTemplatePropertyRespVO> getUsedDiyTemplate() { |
| ... | ... | @@ -54,6 +55,7 @@ public class AppDiyTemplateController { |
| 54 | 55 | } |
| 55 | 56 | // 查询模板下的页面 |
| 56 | 57 | List<DiyPageDO> pages = diyPageService.getDiyPageByTemplateId(diyTemplate.getId()); |
| 58 | + // TODO @疯狂:首页、我的,要不枚举到 DiyPageDO 例如说 NAME_USER,NAME_HOME 类似这种哈; | |
| 57 | 59 | String home = findFirst(pages, page -> "首页".equals(page.getName()), DiyPageDO::getProperty); |
| 58 | 60 | String user = findFirst(pages, page -> "我的".equals(page.getName()), DiyPageDO::getProperty); |
| 59 | 61 | // 拼接返回 | ... | ... |
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/diy/DiyPageDO.java
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/diy/DiyTemplateDO.java
| ... | ... | @@ -50,13 +50,14 @@ public class DiyTemplateDO extends BaseDO { |
| 50 | 50 | * 备注 |
| 51 | 51 | */ |
| 52 | 52 | private String remark; |
| 53 | + // TODO @疯狂:这个字段要不改成 previewPicUrls,和别的模块一样用 pic 作为图片哇? | |
| 53 | 54 | /** |
| 54 | 55 | * 预览图 |
| 55 | 56 | */ |
| 56 | 57 | @TableField(typeHandler = StringListTypeHandler.class) |
| 57 | 58 | private List<String> previewImageUrls; |
| 58 | 59 | /** |
| 59 | - * 底部导航属性,JSON 格式 | |
| 60 | + * uni-app 底部导航属性,JSON 格式 | |
| 60 | 61 | */ |
| 61 | 62 | private String property; |
| 62 | 63 | ... | ... |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/wallet/PayWalletRechargeMapper.java
| ... | ... | @@ -24,7 +24,8 @@ public interface PayWalletRechargeMapper extends BaseMapperX<PayWalletRechargeDO |
| 24 | 24 | default PageResult<PayWalletRechargeDO> selectPage(PageParam pageReqVO, Long walletId, Boolean payStatus) { |
| 25 | 25 | return selectPage(pageReqVO, new LambdaQueryWrapperX<PayWalletRechargeDO>() |
| 26 | 26 | .eq(PayWalletRechargeDO::getWalletId, walletId) |
| 27 | - .eq(PayWalletRechargeDO::getPayStatus, payStatus)); | |
| 27 | + .eq(PayWalletRechargeDO::getPayStatus, payStatus) | |
| 28 | + .orderByDesc(PayWalletRechargeDO::getId)); | |
| 28 | 29 | } |
| 29 | 30 | |
| 30 | 31 | } |
| 31 | 32 | \ No newline at end of file | ... | ... |