diff --git a/src/main/java/com/ycwl/basic/controller/mobile/AppGoodsController.java b/src/main/java/com/ycwl/basic/controller/mobile/AppGoodsController.java index e35d661..c13d206 100644 --- a/src/main/java/com/ycwl/basic/controller/mobile/AppGoodsController.java +++ b/src/main/java/com/ycwl/basic/controller/mobile/AppGoodsController.java @@ -9,10 +9,7 @@ import com.ycwl.basic.utils.ApiResponse; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -41,10 +38,16 @@ public class AppGoodsController { return goodsService.sourceGoodsList(query); } +// @ApiOperation("成片vlog商品详情") +// @GetMapping("/getVideoGoodsDetail/{goodId}") +// public ApiResponse videoGoodsDetail(@RequestBody GoodsReqQuery query) { +// +// return ApiResponse.success(""); +// } + @ApiOperation("查询价格") @PostMapping("/queryPrice") public ApiResponse queryPrice(@RequestBody GoodsPriceQueryReq queryPriceData) { - //TODO 处理购买逻辑 return goodsService.queryPrice(queryPriceData); } } diff --git a/src/main/java/com/ycwl/basic/controller/mobile/AppOrderController.java b/src/main/java/com/ycwl/basic/controller/mobile/AppOrderController.java index a0cc688..567b47a 100644 --- a/src/main/java/com/ycwl/basic/controller/mobile/AppOrderController.java +++ b/src/main/java/com/ycwl/basic/controller/mobile/AppOrderController.java @@ -1,6 +1,7 @@ package com.ycwl.basic.controller.mobile; import com.ycwl.basic.annotation.IgnoreToken; +import com.ycwl.basic.constant.BaseContextHandler; import com.ycwl.basic.model.pc.order.req.OrderAddOrUpdateReq; import com.ycwl.basic.model.pc.order.req.OrderReqQuery; import com.ycwl.basic.model.pc.order.resp.OrderAppRespVO; @@ -49,8 +50,7 @@ public class AppOrderController { @ApiOperation("获取用户订单数量") @GetMapping("/getUserOrderCount") public ApiResponse getUserOrderCount() { - //TODO 获取用户信息 - Long userId = 1L; + Long userId = Long.parseLong(BaseContextHandler.getUserId()); return orderService.getOrderCountByUserId(userId); } diff --git a/src/main/java/com/ycwl/basic/model/mobile/DTO/WeChatUserInfoUpdateDTO.java b/src/main/java/com/ycwl/basic/model/mobile/DTO/WeChatUserInfoUpdateDTO.java index 2995e5e..cee1a14 100644 --- a/src/main/java/com/ycwl/basic/model/mobile/DTO/WeChatUserInfoUpdateDTO.java +++ b/src/main/java/com/ycwl/basic/model/mobile/DTO/WeChatUserInfoUpdateDTO.java @@ -22,5 +22,5 @@ public class WeChatUserInfoUpdateDTO { /** * 是否同意用户协议,1同意0未同意 */ - private Long id; + private Integer agreement; } diff --git a/src/main/java/com/ycwl/basic/model/mobile/goods/GoodsVO.java b/src/main/java/com/ycwl/basic/model/mobile/goods/GoodsVO.java index 851e116..78128b8 100644 --- a/src/main/java/com/ycwl/basic/model/mobile/goods/GoodsVO.java +++ b/src/main/java/com/ycwl/basic/model/mobile/goods/GoodsVO.java @@ -32,6 +32,6 @@ public class GoodsVO { private Integer sourceType; @ApiModelProperty("商品id goodsType为1时才有值") private Long goodsId; - @ApiModelProperty("视频链接 goodsType为1时才有值") - private String videoUrl; + @ApiModelProperty("模版封面图片") + private String templateCoverUrl; } diff --git a/src/main/java/com/ycwl/basic/model/pc/order/req/OrderReqQuery.java b/src/main/java/com/ycwl/basic/model/pc/order/req/OrderReqQuery.java index 94aea47..a73b200 100644 --- a/src/main/java/com/ycwl/basic/model/pc/order/req/OrderReqQuery.java +++ b/src/main/java/com/ycwl/basic/model/pc/order/req/OrderReqQuery.java @@ -92,4 +92,6 @@ public class OrderReqQuery extends BaseQueryParameterReq { private Date startRefundTime; private Date endRefundTime; + @ApiModelProperty("订单类型 0成片(vlog) 1原片 2照片") + private Integer type; } diff --git a/src/main/java/com/ycwl/basic/model/pc/video/resp/VideoRespVO.java b/src/main/java/com/ycwl/basic/model/pc/video/resp/VideoRespVO.java index 5da12d5..abc117d 100644 --- a/src/main/java/com/ycwl/basic/model/pc/video/resp/VideoRespVO.java +++ b/src/main/java/com/ycwl/basic/model/pc/video/resp/VideoRespVO.java @@ -1,8 +1,6 @@ package com.ycwl.basic.model.pc.video.resp; -import com.baomidou.mybatisplus.annotation.TableId; import com.fasterxml.jackson.annotation.JsonFormat; -import com.ycwl.basic.model.common.BaseQueryParameterReq; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -39,7 +37,9 @@ public class VideoRespVO { @ApiModelProperty("模版名称") private String templateName; @ApiModelProperty("模版价格") - private BigDecimal tmplatePrice; + private BigDecimal templatePrice; + @ApiModelProperty("模版封面图片") + private String templateCoverUrl; @ApiModelProperty("经度") private BigDecimal longitude; @ApiModelProperty("纬度") diff --git a/src/main/java/com/ycwl/basic/service/impl/mobile/GoodsServiceImpl.java b/src/main/java/com/ycwl/basic/service/impl/mobile/GoodsServiceImpl.java index 82b53f2..400ceb9 100644 --- a/src/main/java/com/ycwl/basic/service/impl/mobile/GoodsServiceImpl.java +++ b/src/main/java/com/ycwl/basic/service/impl/mobile/GoodsServiceImpl.java @@ -51,7 +51,7 @@ public class GoodsServiceImpl implements GoodsService { goodsVO.setLatitude(videoRespVO.getLatitude()); goodsVO.setGoodsType(1); goodsVO.setGoodsId(videoRespVO.getId()); - goodsVO.setVideoUrl(videoRespVO.getVideoUrl()); + goodsVO.setTemplateCoverUrl(videoRespVO.getTemplateCoverUrl()); goodsList.add(goodsVO); }); @@ -104,7 +104,7 @@ public class GoodsServiceImpl implements GoodsService { if(videoRespVO==null){ return ApiResponse.fail("该vlog不存在或已失效"); } - BigDecimal tmplatePrice = videoRespVO.getTmplatePrice(); + BigDecimal tmplatePrice = videoRespVO.getTemplatePrice(); if(tmplatePrice==null){ return ApiResponse.fail("该vlog使用的模板价格或状态异常,请联系管理员"); } diff --git a/src/main/resources/mapper/pc/OrderMapper.xml b/src/main/resources/mapper/pc/OrderMapper.xml index a9f37e1..af45b2b 100644 --- a/src/main/resources/mapper/pc/OrderMapper.xml +++ b/src/main/resources/mapper/pc/OrderMapper.xml @@ -325,6 +325,17 @@ and cancel_at <= #{endCancelTime} + + + and oi.goods_type = 1 + + + and oi.goods_type = 2 and sr.type = 1 + + + and oi.goods_type = 2 and sr.type = 2 + + order by o.create_at desc diff --git a/src/main/resources/mapper/pc/VideoMapper.xml b/src/main/resources/mapper/pc/VideoMapper.xml index 5b71fd0..2d545cd 100644 --- a/src/main/resources/mapper/pc/VideoMapper.xml +++ b/src/main/resources/mapper/pc/VideoMapper.xml @@ -21,13 +21,13 @@ delete from video where id = #{id}