mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 23:31:52 +08:00
mall + promotion:mock 拼团活动列表
This commit is contained in:
parent
8ec3733882
commit
5b324f90a4
@ -1,7 +1,10 @@
|
||||
package cn.iocoder.yudao.module.promotion.controller.app.combination;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.promotion.controller.app.combination.vo.activity.AppCombinationActivityDetailRespVO;
|
||||
import cn.iocoder.yudao.module.promotion.controller.app.combination.vo.activity.AppCombinationActivityPageItemRespVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@ -23,10 +26,37 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
@Validated
|
||||
public class AppCombinationActivityController {
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得拼团活动分页")
|
||||
public CommonResult<PageResult<AppCombinationActivityPageItemRespVO>> getCombinationActivityPage(PageParam pageParam) {
|
||||
List<AppCombinationActivityPageItemRespVO> activityList = new ArrayList<>();
|
||||
AppCombinationActivityPageItemRespVO activity1 = new AppCombinationActivityPageItemRespVO();
|
||||
activity1.setId(1L);
|
||||
activity1.setName("618 大拼团");
|
||||
activity1.setUserSize(3);
|
||||
activity1.setSpuId(2048L);
|
||||
activity1.setPicUrl("商品图片地址");
|
||||
activity1.setMarketPrice(50);
|
||||
activity1.setCombinationPrice(100);
|
||||
activityList.add(activity1);
|
||||
|
||||
AppCombinationActivityPageItemRespVO activity2 = new AppCombinationActivityPageItemRespVO();
|
||||
activity2.setId(2L);
|
||||
activity2.setName("双十一拼团");
|
||||
activity2.setUserSize(5);
|
||||
activity2.setSpuId(4096L);
|
||||
activity2.setPicUrl("商品图片地址");
|
||||
activity2.setMarketPrice(100);
|
||||
activity2.setCombinationPrice(200);
|
||||
activityList.add(activity2);
|
||||
|
||||
return success(new PageResult<>(activityList, 2L));
|
||||
}
|
||||
|
||||
@GetMapping("/get-detail")
|
||||
@Operation(summary = "获得拼团活动明细")
|
||||
@Parameter(name = "id", description = "活动编号", required = true, example = "1024")
|
||||
public CommonResult<AppCombinationActivityDetailRespVO> getCombinationActivity(@RequestParam("id") Long id) {
|
||||
public CommonResult<AppCombinationActivityDetailRespVO> getCombinationActivityDetail(@RequestParam("id") Long id) {
|
||||
// TODO 芋艿:如果禁用的时候,需要抛出异常;
|
||||
AppCombinationActivityDetailRespVO obj = new AppCombinationActivityDetailRespVO();
|
||||
// 设置其属性的值
|
||||
|
@ -45,7 +45,7 @@ public class AppCombinationRecordController {
|
||||
record.setUserCount(i);
|
||||
record.setPicUrl("https://demo26.crmeb.net/uploads/attach/2021/11/15/a79f5d2ea6bf0c3c11b2127332dfe2df.jpg");
|
||||
record.setActivityId(1L);
|
||||
record.setActivityName("活动:" + i);
|
||||
record.setSpuName("活动:" + i);
|
||||
list.add(record);
|
||||
}
|
||||
return success(list);
|
||||
|
@ -0,0 +1,31 @@
|
||||
package cn.iocoder.yudao.module.promotion.controller.app.combination.vo.activity;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "用户 App - 拼团活动分页项 Response VO")
|
||||
@Data
|
||||
public class AppCombinationActivityPageItemRespVO {
|
||||
|
||||
@Schema(description = "拼团活动编号", required = true, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "拼团活动名称", required = true, example = "618 大拼团")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "拼团人数", required = true, example = "3")
|
||||
private Integer userSize;
|
||||
|
||||
@Schema(description = "商品 SPU 编号", required = true, example = "2048")
|
||||
private Long spuId;
|
||||
|
||||
@Schema(description = "商品图片", required = true, example = "4096") // 从 SPU 的 picUrl 读取
|
||||
private String picUrl;
|
||||
|
||||
@Schema(description = "商品市场价,单位:分", required = true, example = "50") // 从 SPU 的 marketPrice 读取
|
||||
private Integer marketPrice;
|
||||
|
||||
@Schema(description = "拼团金额,单位:分", required = true, example = "100") // 从拼团商品里取最低价
|
||||
private Integer combinationPrice;
|
||||
|
||||
}
|
@ -33,15 +33,13 @@ public class AppCombinationRecordRespVO {
|
||||
@Schema(description = "拼团状态", required = true, example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "商品名字", required = true, example = "我是大黄豆")
|
||||
private String spuName;
|
||||
|
||||
@Schema(description = "商品图片", required = true, example = "https://www.iocoder.cn/1.png")
|
||||
private String picUrl;
|
||||
|
||||
@Schema(description = "拼团金额,单位:分", required = true, example = "100")
|
||||
private Integer combinationPrice;
|
||||
|
||||
// ========== 获得最近 n 条拼团记录(团长发起的)返回的字段 ==========
|
||||
|
||||
@Schema(description = "拼团活动名字", required = true, example = "1024")
|
||||
private String activityName;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user