划线价显示在订单详情内、设备关闭时,不输出对应设备的视频内容(已关联的不管)
This commit is contained in:
parent
9c13d7261c
commit
3ee762f5bb
@ -58,7 +58,9 @@ public class OrderBiz {
|
||||
PriceObj priceObj = new PriceObj();
|
||||
priceObj.setGoodsType(goodsType);
|
||||
priceObj.setGoodsId(goodsId);
|
||||
ScenicEntity scenic = scenicRepository.getScenic(scenicId);
|
||||
ScenicConfigEntity scenicConfig = scenicRepository.getScenicConfig(scenicId);
|
||||
priceObj.setScenicAllPrice(scenic.getPrice());
|
||||
if (scenicConfig != null) {
|
||||
if (Integer.valueOf(1).equals(scenicConfig.getAllFree())) {
|
||||
// 景区全免
|
||||
@ -88,30 +90,12 @@ public class OrderBiz {
|
||||
priceObj.setScenicId(video.getScenicId());
|
||||
break;
|
||||
case 1: // source
|
||||
// goodsId 实际上是人脸ID
|
||||
FaceEntity _face = faceRepository.getFace(goodsId);
|
||||
if (_face == null || _face.getScenicId() == null) {
|
||||
return null;
|
||||
}
|
||||
ScenicEntity _scenic = scenicRepository.getScenic(_face.getScenicId());
|
||||
if (_scenic == null) {
|
||||
return null;
|
||||
}
|
||||
priceObj.setPrice(_scenic.getPrice());
|
||||
priceObj.setSlashPrice(_scenic.getPrice());
|
||||
priceObj.setPrice(scenic.getSourceVideoPrice());
|
||||
priceObj.setSlashPrice(scenic.getSourceVideoPrice());
|
||||
break;
|
||||
case 2: // source
|
||||
// goodsId 实际上是人脸ID
|
||||
FaceEntity __face = faceRepository.getFace(goodsId);
|
||||
if (__face == null || __face.getScenicId() == null) {
|
||||
return null;
|
||||
}
|
||||
ScenicEntity __scenic = scenicRepository.getScenic(__face.getScenicId());
|
||||
if (__scenic == null) {
|
||||
return null;
|
||||
}
|
||||
priceObj.setPrice(__scenic.getPrice());
|
||||
priceObj.setSlashPrice(__scenic.getPrice());
|
||||
priceObj.setPrice(scenic.getSourceImagePrice());
|
||||
priceObj.setSlashPrice(scenic.getSourceImagePrice());
|
||||
break;
|
||||
}
|
||||
return priceObj;
|
||||
|
@ -11,5 +11,6 @@ public class PriceObj {
|
||||
private int goodsType;
|
||||
private Long goodsId;
|
||||
private BigDecimal price = BigDecimal.ZERO;
|
||||
private BigDecimal scenicAllPrice;
|
||||
private BigDecimal slashPrice;
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ public class OrderAppRespVO {
|
||||
*/
|
||||
@ApiModelProperty("价格")
|
||||
private BigDecimal price;
|
||||
private BigDecimal slashPrice;
|
||||
/**
|
||||
* 实际支付价格
|
||||
*/
|
||||
|
@ -33,6 +33,7 @@ public class OrderRespVO {
|
||||
*/
|
||||
@ApiModelProperty("价格")
|
||||
private BigDecimal price;
|
||||
private BigDecimal slashPrice;
|
||||
/**
|
||||
* 实际支付价格
|
||||
*/
|
||||
|
@ -65,4 +65,6 @@ public class ScenicEntity {
|
||||
* 景区源素材价格,元
|
||||
*/
|
||||
private BigDecimal price;
|
||||
private BigDecimal sourceVideoPrice;
|
||||
private BigDecimal sourceImagePrice;
|
||||
}
|
||||
|
@ -81,6 +81,8 @@ public class ScenicAddOrUpdateReq {
|
||||
private Date updateTime;
|
||||
@ApiModelProperty("景区源素材价格,元")
|
||||
private BigDecimal price;
|
||||
private BigDecimal sourceVideoPrice;
|
||||
private BigDecimal sourceImagePrice;
|
||||
|
||||
@ApiModelProperty("账号")
|
||||
private String account;
|
||||
|
@ -87,6 +87,8 @@ public class ScenicRespVO {
|
||||
private Date updateTime;
|
||||
@ApiModelProperty("景区源素材价格,元")
|
||||
private BigDecimal price;
|
||||
private BigDecimal sourceVideoPrice;
|
||||
private BigDecimal sourceImagePrice;
|
||||
@ApiModelProperty("镜头数")
|
||||
private Integer lensNum;
|
||||
private String kfCodeUrl;
|
||||
|
@ -17,6 +17,7 @@ import com.ycwl.basic.mapper.TaskMapper;
|
||||
import com.ycwl.basic.mapper.TemplateMapper;
|
||||
import com.ycwl.basic.mapper.VideoMapper;
|
||||
import com.ycwl.basic.model.mobile.order.IsBuyRespVO;
|
||||
import com.ycwl.basic.model.pc.device.entity.DeviceEntity;
|
||||
import com.ycwl.basic.model.pc.face.entity.FaceEntity;
|
||||
import com.ycwl.basic.model.pc.face.resp.FaceRespVO;
|
||||
import com.ycwl.basic.model.pc.faceSample.entity.FaceSampleEntity;
|
||||
@ -41,6 +42,7 @@ import com.ycwl.basic.notify.NotifyFactory;
|
||||
import com.ycwl.basic.notify.adapters.INotifyAdapter;
|
||||
import com.ycwl.basic.notify.entity.NotifyContent;
|
||||
import com.ycwl.basic.notify.enums.NotifyType;
|
||||
import com.ycwl.basic.repository.DeviceRepository;
|
||||
import com.ycwl.basic.repository.FaceRepository;
|
||||
import com.ycwl.basic.repository.OrderRepository;
|
||||
import com.ycwl.basic.repository.ScenicRepository;
|
||||
@ -67,6 +69,7 @@ import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
@ -112,6 +115,8 @@ public class TaskTaskServiceImpl implements TaskService {
|
||||
private final ReentrantLock lock = new ReentrantLock();
|
||||
@Autowired
|
||||
private TaskStatusBiz taskStatusBiz;
|
||||
@Autowired
|
||||
private DeviceRepository deviceRepository;
|
||||
|
||||
|
||||
private RenderWorkerEntity getWorker(@NonNull WorkerAuthReqVo req) {
|
||||
@ -243,6 +248,10 @@ public class TaskTaskServiceImpl implements TaskService {
|
||||
List<SourceEntity> videoSourceList = sourceMapper.listVideoByScenicFaceRelation(face.getScenicId(), faceId);
|
||||
Map<String, List<SourceEntity>> sourcesMap = videoSourceList.stream()
|
||||
.peek(item -> item.setUrl(item.getVideoUrl()))
|
||||
.filter(item -> {
|
||||
DeviceEntity device = deviceRepository.getDevice(item.getDeviceId());
|
||||
return Integer.valueOf(1).equals(device.getStatus());
|
||||
})
|
||||
.collect(Collectors.groupingBy(item -> item.getDeviceId().toString()));
|
||||
if (sourcesMap.isEmpty()) {
|
||||
// 主动禁止没有视频源视频生成
|
||||
@ -430,6 +439,10 @@ public class TaskTaskServiceImpl implements TaskService {
|
||||
List<SourceEntity> videoSourceList = sourceMapper.listVideoByScenicFaceRelation(face.getScenicId(), faceId);
|
||||
Map<String, List<SourceEntity>> sourcesMap = videoSourceList.stream()
|
||||
.peek(item -> item.setUrl(item.getVideoUrl()))
|
||||
.filter(item -> {
|
||||
DeviceEntity device = deviceRepository.getDevice(item.getDeviceId());
|
||||
return Integer.valueOf(1).equals(device.getStatus());
|
||||
})
|
||||
.collect(Collectors.groupingBy(item -> item.getDeviceId().toString()));
|
||||
if (sourcesMap.isEmpty()) {
|
||||
// 主动禁止没有视频源视频生成
|
||||
|
@ -10,6 +10,7 @@
|
||||
<result column="real_name" property="memberRealName"/>
|
||||
<result column="openid" property="openId"/>
|
||||
<result column="price" property="price"/>
|
||||
<result column="slash_price" property="slashPrice"/>
|
||||
<result column="pay_price" property="payPrice"/>
|
||||
<result column="remark" property="remark"/>
|
||||
<result column="broker_id" property="brokerId"/>
|
||||
@ -37,6 +38,7 @@
|
||||
<resultMap id="AppBaseResultMap" type="com.ycwl.basic.model.pc.order.resp.OrderAppRespVO">
|
||||
<id column="id" property="id"/>
|
||||
<result column="price" property="price"/>
|
||||
<result column="slash_price" property="slashPrice"/>
|
||||
<result column="pay_price" property="payPrice"/>
|
||||
<result column="remark" property="remark"/>
|
||||
<result column="refund_reason" property="refundReason"/>
|
||||
@ -290,7 +292,7 @@
|
||||
order by o.create_at desc
|
||||
</select>
|
||||
<select id="appDetail" resultMap="AppBaseResultMap">
|
||||
select distinct o.id, o.member_id,o.openid, o.price, pay_price, remark, o.broker_id, o.promo_code,
|
||||
select distinct o.id, o.member_id,o.openid, o.price, o.slash_price, pay_price, remark, o.broker_id, o.promo_code,
|
||||
refund_reason, refund_status, o.`status`, o.create_at, refund_at, pay_at, cancel_at,
|
||||
o.scenic_id, sc.name scenicName
|
||||
from `order` AS o
|
||||
|
@ -2,8 +2,8 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ycwl.basic.mapper.ScenicMapper">
|
||||
<insert id="add">
|
||||
insert into scenic(id, `name`, introduction, phone, cover_url, longitude, latitude, radius, province, city, area, address, price, kf_code_url, kf_phone, logo_url)
|
||||
values (#{id}, #{name}, #{introduction}, #{phone}, #{coverUrl},#{longitude}, #{latitude}, #{radius}, #{province}, #{city}, #{area}, #{address}, #{price}, #{kfCodeUrl}, #{kfPhone}, #{logoUrl})
|
||||
insert into scenic(id, `name`, introduction, phone, cover_url, longitude, latitude, radius, province, city, area, address, price, kf_code_url, kf_phone, logo_url, source_video_price, source_image_price)
|
||||
values (#{id}, #{name}, #{introduction}, #{phone}, #{coverUrl},#{longitude}, #{latitude}, #{radius}, #{province}, #{city}, #{area}, #{address}, #{price}, #{kfCodeUrl}, #{kfPhone}, #{logoUrl}, #{sourceVideoPrice}, #{sourceImagePrice})
|
||||
</insert>
|
||||
<insert id="addConfig">
|
||||
insert into scenic_config(id, scenic_id, create_time)
|
||||
@ -58,6 +58,12 @@
|
||||
<if test="price!=null">
|
||||
price=#{price},
|
||||
</if>
|
||||
<if test="sourceVideoPrice!=null">
|
||||
source_video_price=#{sourceVideoPrice},
|
||||
</if>
|
||||
<if test="sourceImagePrice!=null">
|
||||
source_image_price=#{sourceImagePrice},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@ -109,6 +115,7 @@
|
||||
</delete>
|
||||
<select id="list" resultMap="scenic">
|
||||
select s.id, `name`, `phone`, introduction,logo_url,cover_url, longitude, latitude, radius, province, city, area, address, `status`, s.create_time, update_time, kf_code_url, kf_phone,
|
||||
s.price, s.source_video_price, s.source_image_price,
|
||||
(select scenic_account.account from scenic_account where scenic_account.scenic_id = s.id and scenic_account.is_super = 1 limit 1) as account,
|
||||
s.price
|
||||
from scenic s
|
||||
@ -138,7 +145,7 @@
|
||||
</select>
|
||||
<select id="getById" resultMap="scenic">
|
||||
select s.id, `name`, `phone`, introduction, logo_url,cover_url, longitude, latitude, radius, province, city, area, address, `status`, s.create_time, update_time,
|
||||
s.price
|
||||
s.price, s.source_video_price, s.source_image_price, kf_code_url, kf_phone
|
||||
from scenic s
|
||||
where s.id = #{id}
|
||||
</select>
|
||||
|
Loading…
x
Reference in New Issue
Block a user