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.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -41,10 +38,16 @@ public class AppGoodsController {
|
|||||||
return goodsService.sourceGoodsList(query);
|
return goodsService.sourceGoodsList(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @ApiOperation("成片vlog商品详情")
|
||||||
|
// @GetMapping("/getVideoGoodsDetail/{goodId}")
|
||||||
|
// public ApiResponse<GoodsVO> videoGoodsDetail(@RequestBody GoodsReqQuery query) {
|
||||||
|
//
|
||||||
|
// return ApiResponse.success("");
|
||||||
|
// }
|
||||||
|
|
||||||
@ApiOperation("查询价格")
|
@ApiOperation("查询价格")
|
||||||
@PostMapping("/queryPrice")
|
@PostMapping("/queryPrice")
|
||||||
public ApiResponse queryPrice(@RequestBody GoodsPriceQueryReq queryPriceData) {
|
public ApiResponse queryPrice(@RequestBody GoodsPriceQueryReq queryPriceData) {
|
||||||
//TODO 处理购买逻辑
|
|
||||||
return goodsService.queryPrice(queryPriceData);
|
return goodsService.queryPrice(queryPriceData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.ycwl.basic.controller.mobile;
|
package com.ycwl.basic.controller.mobile;
|
||||||
|
|
||||||
import com.ycwl.basic.annotation.IgnoreToken;
|
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.OrderAddOrUpdateReq;
|
||||||
import com.ycwl.basic.model.pc.order.req.OrderReqQuery;
|
import com.ycwl.basic.model.pc.order.req.OrderReqQuery;
|
||||||
import com.ycwl.basic.model.pc.order.resp.OrderAppRespVO;
|
import com.ycwl.basic.model.pc.order.resp.OrderAppRespVO;
|
||||||
@ -49,8 +50,7 @@ public class AppOrderController {
|
|||||||
@ApiOperation("获取用户订单数量")
|
@ApiOperation("获取用户订单数量")
|
||||||
@GetMapping("/getUserOrderCount")
|
@GetMapping("/getUserOrderCount")
|
||||||
public ApiResponse getUserOrderCount() {
|
public ApiResponse getUserOrderCount() {
|
||||||
//TODO 获取用户信息
|
Long userId = Long.parseLong(BaseContextHandler.getUserId());
|
||||||
Long userId = 1L;
|
|
||||||
|
|
||||||
return orderService.getOrderCountByUserId(userId);
|
return orderService.getOrderCountByUserId(userId);
|
||||||
}
|
}
|
||||||
|
@ -22,5 +22,5 @@ public class WeChatUserInfoUpdateDTO {
|
|||||||
/**
|
/**
|
||||||
* 是否同意用户协议,1同意0未同意
|
* 是否同意用户协议,1同意0未同意
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private Integer agreement;
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,6 @@ public class GoodsVO {
|
|||||||
private Integer sourceType;
|
private Integer sourceType;
|
||||||
@ApiModelProperty("商品id goodsType为1时才有值")
|
@ApiModelProperty("商品id goodsType为1时才有值")
|
||||||
private Long goodsId;
|
private Long goodsId;
|
||||||
@ApiModelProperty("视频链接 goodsType为1时才有值")
|
@ApiModelProperty("模版封面图片")
|
||||||
private String videoUrl;
|
private String templateCoverUrl;
|
||||||
}
|
}
|
||||||
|
@ -92,4 +92,6 @@ public class OrderReqQuery extends BaseQueryParameterReq {
|
|||||||
private Date startRefundTime;
|
private Date startRefundTime;
|
||||||
private Date endRefundTime;
|
private Date endRefundTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("订单类型 0成片(vlog) 1原片 2照片")
|
||||||
|
private Integer type;
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
package com.ycwl.basic.model.pc.video.resp;
|
package com.ycwl.basic.model.pc.video.resp;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.ycwl.basic.model.common.BaseQueryParameterReq;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -39,7 +37,9 @@ public class VideoRespVO {
|
|||||||
@ApiModelProperty("模版名称")
|
@ApiModelProperty("模版名称")
|
||||||
private String templateName;
|
private String templateName;
|
||||||
@ApiModelProperty("模版价格")
|
@ApiModelProperty("模版价格")
|
||||||
private BigDecimal tmplatePrice;
|
private BigDecimal templatePrice;
|
||||||
|
@ApiModelProperty("模版封面图片")
|
||||||
|
private String templateCoverUrl;
|
||||||
@ApiModelProperty("经度")
|
@ApiModelProperty("经度")
|
||||||
private BigDecimal longitude;
|
private BigDecimal longitude;
|
||||||
@ApiModelProperty("纬度")
|
@ApiModelProperty("纬度")
|
||||||
|
@ -51,7 +51,7 @@ public class GoodsServiceImpl implements GoodsService {
|
|||||||
goodsVO.setLatitude(videoRespVO.getLatitude());
|
goodsVO.setLatitude(videoRespVO.getLatitude());
|
||||||
goodsVO.setGoodsType(1);
|
goodsVO.setGoodsType(1);
|
||||||
goodsVO.setGoodsId(videoRespVO.getId());
|
goodsVO.setGoodsId(videoRespVO.getId());
|
||||||
goodsVO.setVideoUrl(videoRespVO.getVideoUrl());
|
goodsVO.setTemplateCoverUrl(videoRespVO.getTemplateCoverUrl());
|
||||||
goodsList.add(goodsVO);
|
goodsList.add(goodsVO);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ public class GoodsServiceImpl implements GoodsService {
|
|||||||
if(videoRespVO==null){
|
if(videoRespVO==null){
|
||||||
return ApiResponse.fail("该vlog不存在或已失效");
|
return ApiResponse.fail("该vlog不存在或已失效");
|
||||||
}
|
}
|
||||||
BigDecimal tmplatePrice = videoRespVO.getTmplatePrice();
|
BigDecimal tmplatePrice = videoRespVO.getTemplatePrice();
|
||||||
if(tmplatePrice==null){
|
if(tmplatePrice==null){
|
||||||
return ApiResponse.fail("该vlog使用的模板价格或状态异常,请联系管理员");
|
return ApiResponse.fail("该vlog使用的模板价格或状态异常,请联系管理员");
|
||||||
}
|
}
|
||||||
|
@ -325,6 +325,17 @@
|
|||||||
<if test="endCancelTime!= null ">
|
<if test="endCancelTime!= null ">
|
||||||
and cancel_at <= #{endCancelTime}
|
and cancel_at <= #{endCancelTime}
|
||||||
</if>
|
</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>
|
</where>
|
||||||
order by o.create_at desc
|
order by o.create_at desc
|
||||||
</select>
|
</select>
|
||||||
|
@ -21,13 +21,13 @@
|
|||||||
delete from video where id = #{id}
|
delete from video where id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
<select id="list" resultType="com.ycwl.basic.model.pc.video.resp.VideoRespVO">
|
<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,
|
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
|
s.name scenicName, s.latitude, s.longitude, t.name templateName, t.price templatePrice,t.cover_url templateCoverUrl
|
||||||
from video v
|
from video v
|
||||||
left join scenic s on s.id = v.scenic_id
|
left join scenic s on s.id = v.scenic_id
|
||||||
left join template t on v.template_id = t.id
|
left join template t on v.template_id = t.id
|
||||||
<where>
|
<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="memberId!= null">and member_id = #{memberId} </if>
|
||||||
<if test="templateId!= null">and template_id = #{templateId} </if>
|
<if test="templateId!= null">and template_id = #{templateId} </if>
|
||||||
<if test="taskId!=null">
|
<if test="taskId!=null">
|
||||||
|
Reference in New Issue
Block a user