Merge remote-tracking branch 'origin/master'

This commit is contained in:
songmingsong
2024-12-06 14:49:59 +08:00
9 changed files with 34 additions and 18 deletions

View File

@ -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<GoodsVO> videoGoodsDetail(@RequestBody GoodsReqQuery query) {
//
// return ApiResponse.success("");
// }
@ApiOperation("查询价格")
@PostMapping("/queryPrice")
public ApiResponse queryPrice(@RequestBody GoodsPriceQueryReq queryPriceData) {
//TODO 处理购买逻辑
return goodsService.queryPrice(queryPriceData);
}
}

View File

@ -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);
}

View File

@ -22,5 +22,5 @@ public class WeChatUserInfoUpdateDTO {
/**
* 是否同意用户协议1同意0未同意
*/
private Long id;
private Integer agreement;
}

View File

@ -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;
}

View File

@ -92,4 +92,6 @@ public class OrderReqQuery extends BaseQueryParameterReq {
private Date startRefundTime;
private Date endRefundTime;
@ApiModelProperty("订单类型 0成片vlog 1原片 2照片")
private Integer type;
}

View File

@ -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("纬度")

View File

@ -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使用的模板价格或状态异常请联系管理员");
}