You've already forked FrameTour-BE
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -22,5 +22,5 @@ public class WeChatUserInfoUpdateDTO {
|
||||
/**
|
||||
* 是否同意用户协议,1同意0未同意
|
||||
*/
|
||||
private Long id;
|
||||
private Integer agreement;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -92,4 +92,6 @@ public class OrderReqQuery extends BaseQueryParameterReq {
|
||||
private Date startRefundTime;
|
||||
private Date endRefundTime;
|
||||
|
||||
@ApiModelProperty("订单类型 0成片(vlog) 1原片 2照片")
|
||||
private Integer type;
|
||||
}
|
||||
|
@ -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("纬度")
|
||||
|
@ -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使用的模板价格或状态异常,请联系管理员");
|
||||
}
|
||||
|
@ -325,6 +325,17 @@
|
||||
<if test="endCancelTime!= null ">
|
||||
and cancel_at <= #{endCancelTime}
|
||||
</if>
|
||||
<if test="type!= null ">
|
||||
<if test="type== 0 ">
|
||||
and oi.goods_type = 1
|
||||
</if>
|
||||
<if test="type== 1 ">
|
||||
and oi.goods_type = 2 and sr.type = 1
|
||||
</if>
|
||||
<if test="type== 2 ">
|
||||
and oi.goods_type = 2 and sr.type = 2
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
order by o.create_at desc
|
||||
</select>
|
||||
|
@ -21,13 +21,13 @@
|
||||
delete from video where id = #{id}
|
||||
</delete>
|
||||
<select id="list" resultType="com.ycwl.basic.model.pc.video.resp.VideoRespVO">
|
||||
select v.id, scenic_id, member_id, template_id, task_id, worker_id, video_url, v.create_time, v.update_time,
|
||||
s.name scenicName, s.latitude, s.longitude, t.name templateName, t.price templatePrice
|
||||
select v.id, v.scenic_id, member_id, template_id, task_id, worker_id, video_url, v.create_time, v.update_time,
|
||||
s.name scenicName, s.latitude, s.longitude, t.name templateName, t.price templatePrice,t.cover_url templateCoverUrl
|
||||
from video v
|
||||
left join scenic s on s.id = v.scenic_id
|
||||
left join template t on v.template_id = t.id
|
||||
<where>
|
||||
<if test="scenicId!= null">and scenic_id = #{scenicId} </if>
|
||||
<if test="scenicId!= null">and v.scenic_id = #{scenicId} </if>
|
||||
<if test="memberId!= null">and member_id = #{memberId} </if>
|
||||
<if test="templateId!= null">and template_id = #{templateId} </if>
|
||||
<if test="taskId!=null">
|
||||
|
Reference in New Issue
Block a user