mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 23:31:52 +08:00
📖 code review:店铺装修逻辑
This commit is contained in:
parent
cd45fc35ea
commit
106c1ecf4c
@ -82,6 +82,7 @@ public class DiyTemplateController {
|
|||||||
return success(DiyTemplateConvert.INSTANCE.convertPage(pageResult));
|
return success(DiyTemplateConvert.INSTANCE.convertPage(pageResult));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO @疯狂:这个要不和 getDiyTemplate 合并,然后 DiyTemplateRespVO 里面直接把 DiyPagePropertyRespVO 也加上。减少 VO 好了,管理后台 get 多返回点数据,也问题不大的。目的,还是想尽可能降低大家的理解成本哈;
|
||||||
@GetMapping("/get-property")
|
@GetMapping("/get-property")
|
||||||
@Operation(summary = "获得装修模板属性")
|
@Operation(summary = "获得装修模板属性")
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
@ -92,6 +93,7 @@ public class DiyTemplateController {
|
|||||||
return success(DiyTemplateConvert.INSTANCE.convertPropertyVo(diyTemplate, pages));
|
return success(DiyTemplateConvert.INSTANCE.convertPropertyVo(diyTemplate, pages));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO @疯狂:这个接口,要不和 useDiyTemplate 合并成一个,然后 VO 改成我们新的 VO 规范。不改的字段,就不传递。
|
||||||
@PutMapping("/update-property")
|
@PutMapping("/update-property")
|
||||||
@Operation(summary = "更新装修模板属性")
|
@Operation(summary = "更新装修模板属性")
|
||||||
@PreAuthorize("@ss.hasPermission('promotion:diy-template:update')")
|
@PreAuthorize("@ss.hasPermission('promotion:diy-template:update')")
|
||||||
|
@ -25,6 +25,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/promotion/decorate")
|
@RequestMapping("/promotion/decorate")
|
||||||
@Validated
|
@Validated
|
||||||
|
@Deprecated // 废弃
|
||||||
public class AppDecorateController {
|
public class AppDecorateController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
|
@ -33,6 +33,7 @@ public class AppDiyTemplateController {
|
|||||||
@Resource
|
@Resource
|
||||||
private DiyPageService diyPageService;
|
private DiyPageService diyPageService;
|
||||||
|
|
||||||
|
// TODO @疯狂:要不要把 used 和 get 接口合并哈;不传递 id,直接拿默认;
|
||||||
@GetMapping("/used")
|
@GetMapping("/used")
|
||||||
@Operation(summary = "使用中的装修模板")
|
@Operation(summary = "使用中的装修模板")
|
||||||
public CommonResult<AppDiyTemplatePropertyRespVO> getUsedDiyTemplate() {
|
public CommonResult<AppDiyTemplatePropertyRespVO> getUsedDiyTemplate() {
|
||||||
@ -54,6 +55,7 @@ public class AppDiyTemplateController {
|
|||||||
}
|
}
|
||||||
// 查询模板下的页面
|
// 查询模板下的页面
|
||||||
List<DiyPageDO> pages = diyPageService.getDiyPageByTemplateId(diyTemplate.getId());
|
List<DiyPageDO> pages = diyPageService.getDiyPageByTemplateId(diyTemplate.getId());
|
||||||
|
// TODO @疯狂:首页、我的,要不枚举到 DiyPageDO 例如说 NAME_USER,NAME_HOME 类似这种哈;
|
||||||
String home = findFirst(pages, page -> "首页".equals(page.getName()), DiyPageDO::getProperty);
|
String home = findFirst(pages, page -> "首页".equals(page.getName()), DiyPageDO::getProperty);
|
||||||
String user = findFirst(pages, page -> "我的".equals(page.getName()), DiyPageDO::getProperty);
|
String user = findFirst(pages, page -> "我的".equals(page.getName()), DiyPageDO::getProperty);
|
||||||
// 拼接返回
|
// 拼接返回
|
||||||
|
@ -44,6 +44,7 @@ public class DiyPageDO extends BaseDO {
|
|||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
// TODO @疯狂:这个字段要不改成 previewPicUrls,和别的模块一样用 pic 作为图片哇?
|
||||||
/**
|
/**
|
||||||
* 预览图,多个逗号分隔
|
* 预览图,多个逗号分隔
|
||||||
*/
|
*/
|
||||||
|
@ -50,13 +50,14 @@ public class DiyTemplateDO extends BaseDO {
|
|||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
// TODO @疯狂:这个字段要不改成 previewPicUrls,和别的模块一样用 pic 作为图片哇?
|
||||||
/**
|
/**
|
||||||
* 预览图
|
* 预览图
|
||||||
*/
|
*/
|
||||||
@TableField(typeHandler = StringListTypeHandler.class)
|
@TableField(typeHandler = StringListTypeHandler.class)
|
||||||
private List<String> previewImageUrls;
|
private List<String> previewImageUrls;
|
||||||
/**
|
/**
|
||||||
* 底部导航属性,JSON 格式
|
* uni-app 底部导航属性,JSON 格式
|
||||||
*/
|
*/
|
||||||
private String property;
|
private String property;
|
||||||
|
|
||||||
|
@ -24,7 +24,8 @@ public interface PayWalletRechargeMapper extends BaseMapperX<PayWalletRechargeDO
|
|||||||
default PageResult<PayWalletRechargeDO> selectPage(PageParam pageReqVO, Long walletId, Boolean payStatus) {
|
default PageResult<PayWalletRechargeDO> selectPage(PageParam pageReqVO, Long walletId, Boolean payStatus) {
|
||||||
return selectPage(pageReqVO, new LambdaQueryWrapperX<PayWalletRechargeDO>()
|
return selectPage(pageReqVO, new LambdaQueryWrapperX<PayWalletRechargeDO>()
|
||||||
.eq(PayWalletRechargeDO::getWalletId, walletId)
|
.eq(PayWalletRechargeDO::getWalletId, walletId)
|
||||||
.eq(PayWalletRechargeDO::getPayStatus, payStatus));
|
.eq(PayWalletRechargeDO::getPayStatus, payStatus)
|
||||||
|
.orderByDesc(PayWalletRechargeDO::getId));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user