mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-26 17:21:53 +08:00
mall + promotion:增加砍价记录的 mock
This commit is contained in:
parent
c33bd38b5d
commit
f5b2bb4d7d
@ -1,9 +1,12 @@
|
||||
package cn.iocoder.yudao.module.promotion.controller.app.bargain;
|
||||
|
||||
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.framework.common.util.date.LocalDateTimeUtils;
|
||||
import cn.iocoder.yudao.module.promotion.controller.app.bargain.vo.record.AppBargainRecordCreateReqVO;
|
||||
import cn.iocoder.yudao.module.promotion.controller.app.bargain.vo.record.AppBargainRecordDetailRespVO;
|
||||
import cn.iocoder.yudao.module.promotion.controller.app.bargain.vo.record.AppBargainRecordRespVO;
|
||||
import cn.iocoder.yudao.module.promotion.controller.app.bargain.vo.record.AppBargainRecordSummaryRespVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@ -64,6 +67,77 @@ public class AppBargainRecordController {
|
||||
return success(detail);
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得砍价记录的分页")
|
||||
public CommonResult<PageResult<AppBargainRecordRespVO>> getBargainRecordPage(PageParam pageParam) {
|
||||
PageResult<AppBargainRecordRespVO> page = new PageResult<>();
|
||||
page.setList(new ArrayList<>());
|
||||
AppBargainRecordRespVO record1 = new AppBargainRecordRespVO();
|
||||
record1.setId(1L);
|
||||
record1.setUserId(1L);
|
||||
record1.setSpuId(1L);
|
||||
record1.setSkuId(1L);
|
||||
record1.setPrice(500);
|
||||
record1.setActivityId(1L);
|
||||
record1.setBargainPrice(150);
|
||||
record1.setPrice(200);
|
||||
record1.setPayPrice(180);
|
||||
record1.setStatus(1);
|
||||
record1.setPicUrl("https://demo26.crmeb.net/uploads/attach/2021/11/15/a79f5d2ea6bf0c3c11b2127332dfe2df.jpg");
|
||||
record1.setExpireTime(LocalDateTimeUtils.addTime(Duration.ofDays(2)));
|
||||
page.getList().add(record1);
|
||||
|
||||
AppBargainRecordRespVO record2 = new AppBargainRecordRespVO();
|
||||
record2.setId(1L);
|
||||
record2.setUserId(1L);
|
||||
record2.setSpuId(1L);
|
||||
record2.setSkuId(1L);
|
||||
record2.setPrice(500);
|
||||
record2.setActivityId(1L);
|
||||
record2.setBargainPrice(150);
|
||||
record2.setPrice(200);
|
||||
record2.setPayPrice(280);
|
||||
record2.setStatus(2);
|
||||
record2.setPicUrl("https://demo26.crmeb.net/uploads/attach/2021/11/15/a79f5d2ea6bf0c3c11b2127332dfe2df.jpg");
|
||||
record2.setExpireTime(LocalDateTimeUtils.addTime(Duration.ofDays(2)));
|
||||
page.getList().add(record2);
|
||||
|
||||
AppBargainRecordRespVO record3 = new AppBargainRecordRespVO();
|
||||
record3.setId(1L);
|
||||
record3.setUserId(1L);
|
||||
record3.setSpuId(1L);
|
||||
record3.setSkuId(1L);
|
||||
record3.setPrice(500);
|
||||
record3.setActivityId(1L);
|
||||
record3.setBargainPrice(150);
|
||||
record3.setPrice(200);
|
||||
record3.setPayPrice(380);
|
||||
record3.setStatus(2);
|
||||
record3.setPicUrl("https://demo26.crmeb.net/uploads/attach/2021/11/15/a79f5d2ea6bf0c3c11b2127332dfe2df.jpg");
|
||||
record3.setExpireTime(LocalDateTimeUtils.addTime(Duration.ofDays(2)));
|
||||
record3.setOrderId(100L);
|
||||
page.getList().add(record3);
|
||||
|
||||
AppBargainRecordRespVO record4 = new AppBargainRecordRespVO();
|
||||
record4.setId(1L);
|
||||
record4.setUserId(1L);
|
||||
record4.setSpuId(1L);
|
||||
record4.setSkuId(1L);
|
||||
record4.setPrice(500);
|
||||
record4.setActivityId(1L);
|
||||
record4.setBargainPrice(150);
|
||||
record4.setPrice(200);
|
||||
record4.setPayPrice(380);
|
||||
record4.setStatus(3);
|
||||
record4.setPicUrl("https://demo26.crmeb.net/uploads/attach/2021/11/15/a79f5d2ea6bf0c3c11b2127332dfe2df.jpg");
|
||||
record4.setExpireTime(LocalDateTimeUtils.addTime(Duration.ofDays(2)));
|
||||
record4.setOrderId(100L);
|
||||
page.getList().add(record4);
|
||||
|
||||
page.setTotal(1L);
|
||||
return success(page);
|
||||
}
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建砍价记录", description = "参与拼团活动")
|
||||
public CommonResult<Long> createBargainRecord(@RequestBody AppBargainRecordCreateReqVO reqVO) {
|
||||
|
@ -0,0 +1,32 @@
|
||||
package cn.iocoder.yudao.module.promotion.controller.app.bargain.vo.record;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "用户 App - 砍价记录的 Response VO")
|
||||
@Data
|
||||
public class AppBargainRecordRespVO {
|
||||
|
||||
// TODO @芋艿:status;如果砍价对应的订单支付超时,算失败么?砍价的支付时间,以 expireTime 为准么?
|
||||
|
||||
private Long id;
|
||||
private Long userId;
|
||||
private Long spuId;
|
||||
private Long skuId;
|
||||
private Long activityId;
|
||||
private Integer bargainPrice;
|
||||
private Integer price;
|
||||
private Integer payPrice;
|
||||
private Integer status;
|
||||
private LocalDateTime expireTime;
|
||||
|
||||
private Long orderId;
|
||||
private Boolean payStatus;
|
||||
private Long payOrderId;
|
||||
|
||||
private String activityName;
|
||||
private String picUrl;
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user