free
This commit is contained in:
parent
eac1c48cb2
commit
7e8eebdef5
@ -43,4 +43,5 @@ public class GoodsDetailVO {
|
|||||||
private BigDecimal price;
|
private BigDecimal price;
|
||||||
@ApiModelProperty("是否已购买 0否 1是")
|
@ApiModelProperty("是否已购买 0否 1是")
|
||||||
private Integer isBuy;
|
private Integer isBuy;
|
||||||
|
private Integer isFree;
|
||||||
}
|
}
|
||||||
|
@ -58,4 +58,6 @@ public class DeviceConfigEntity {
|
|||||||
*/
|
*/
|
||||||
private BigDecimal cutPost;
|
private BigDecimal cutPost;
|
||||||
private Integer enablePreBook;
|
private Integer enablePreBook;
|
||||||
|
private Integer imageFree;
|
||||||
|
private Integer videoFree;
|
||||||
}
|
}
|
||||||
|
@ -14,4 +14,6 @@ public class MemberSourceEntity {
|
|||||||
private Long sourceId;
|
private Long sourceId;
|
||||||
private Integer isBuy;
|
private Integer isBuy;
|
||||||
private Long orderId;
|
private Long orderId;
|
||||||
|
private Integer isFree;
|
||||||
|
private String waterUrl;
|
||||||
}
|
}
|
||||||
|
@ -50,4 +50,5 @@ public class SourceRespVO {
|
|||||||
private Date createTime;
|
private Date createTime;
|
||||||
@ApiModelProperty("是否购买:0未购买,1已购买")
|
@ApiModelProperty("是否购买:0未购买,1已购买")
|
||||||
private Integer isBuy;
|
private Integer isBuy;
|
||||||
|
private Integer isFree;
|
||||||
}
|
}
|
||||||
|
@ -182,7 +182,7 @@ public class GoodsServiceImpl implements GoodsService {
|
|||||||
goodsDetailVO.setVideoUrl(sourceRespVO.getVideoUrl());
|
goodsDetailVO.setVideoUrl(sourceRespVO.getVideoUrl());
|
||||||
goodsDetailVO.setUrl(sourceRespVO.getUrl());
|
goodsDetailVO.setUrl(sourceRespVO.getUrl());
|
||||||
goodsDetailVO.setCreateTime(sourceRespVO.getCreateTime());
|
goodsDetailVO.setCreateTime(sourceRespVO.getCreateTime());
|
||||||
|
goodsDetailVO.setIsFree(sourceRespVO.getIsFree());
|
||||||
goodsDetailVOList.add(goodsDetailVO);
|
goodsDetailVOList.add(goodsDetailVO);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ import com.ycwl.basic.mapper.FaceSampleMapper;
|
|||||||
import com.ycwl.basic.mapper.ScenicMapper;
|
import com.ycwl.basic.mapper.ScenicMapper;
|
||||||
import com.ycwl.basic.mapper.SourceMapper;
|
import com.ycwl.basic.mapper.SourceMapper;
|
||||||
import com.ycwl.basic.model.mobile.order.IsBuyRespVO;
|
import com.ycwl.basic.model.mobile.order.IsBuyRespVO;
|
||||||
|
import com.ycwl.basic.model.pc.device.entity.DeviceConfigEntity;
|
||||||
import com.ycwl.basic.model.pc.device.entity.DeviceEntity;
|
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.entity.FaceEntity;
|
||||||
import com.ycwl.basic.model.pc.face.resp.FaceRespVO;
|
import com.ycwl.basic.model.pc.face.resp.FaceRespVO;
|
||||||
@ -137,6 +138,7 @@ public class TaskFaceServiceImpl implements TaskFaceService {
|
|||||||
if (sampleListIds != null && !sampleListIds.isEmpty()) {// 匹配原片:照片
|
if (sampleListIds != null && !sampleListIds.isEmpty()) {// 匹配原片:照片
|
||||||
List<SourceEntity> sourceEntities = sourceMapper.listBySampleIds(sampleListIds);
|
List<SourceEntity> sourceEntities = sourceMapper.listBySampleIds(sampleListIds);
|
||||||
List<MemberSourceEntity> memberSourceEntityList = sourceEntities.stream().map(sourceEntity -> {
|
List<MemberSourceEntity> memberSourceEntityList = sourceEntities.stream().map(sourceEntity -> {
|
||||||
|
DeviceConfigEntity deviceConfig = deviceRepository.getDeviceConfig(sourceEntity.getDeviceId());
|
||||||
MemberSourceEntity memberSourceEntity = new MemberSourceEntity();
|
MemberSourceEntity memberSourceEntity = new MemberSourceEntity();
|
||||||
memberSourceEntity.setScenicId(scenicId);
|
memberSourceEntity.setScenicId(scenicId);
|
||||||
memberSourceEntity.setFaceId(faceEntity.getId());
|
memberSourceEntity.setFaceId(faceEntity.getId());
|
||||||
@ -151,6 +153,18 @@ public class TaskFaceServiceImpl implements TaskFaceService {
|
|||||||
} else {
|
} else {
|
||||||
memberSourceEntity.setIsBuy(0);
|
memberSourceEntity.setIsBuy(0);
|
||||||
}
|
}
|
||||||
|
memberSourceEntity.setIsFree(0);
|
||||||
|
if (deviceConfig != null) {
|
||||||
|
if (sourceEntity.getType() == 1) {
|
||||||
|
if (Integer.valueOf(1).equals(deviceConfig.getVideoFree())) {
|
||||||
|
memberSourceEntity.setIsFree(1);
|
||||||
|
}
|
||||||
|
} else if (sourceEntity.getType() == 2) {
|
||||||
|
if (Integer.valueOf(1).equals(deviceConfig.getImageFree())) {
|
||||||
|
memberSourceEntity.setIsFree(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return memberSourceEntity;
|
return memberSourceEntity;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
if (!memberSourceEntityList.isEmpty()) {
|
if (!memberSourceEntityList.isEmpty()) {
|
||||||
|
@ -37,7 +37,9 @@
|
|||||||
online_max_interval = #{onlineMaxInterval},
|
online_max_interval = #{onlineMaxInterval},
|
||||||
cut_pre = #{cutPre},
|
cut_pre = #{cutPre},
|
||||||
cut_post = #{cutPost},
|
cut_post = #{cutPost},
|
||||||
enable_pre_book = #{enablePreBook}
|
enable_pre_book = #{enablePreBook},
|
||||||
|
image_free = #{imageFree},
|
||||||
|
video_free = #{videoFree}
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateEntity">
|
<update id="updateEntity">
|
||||||
|
@ -6,14 +6,14 @@
|
|||||||
values (#{id}, #{scenicId}, #{deviceId}, #{url}, #{videoUrl}, #{type}, #{faceSampleId}, #{posJson}, #{createTime})
|
values (#{id}, #{scenicId}, #{deviceId}, #{url}, #{videoUrl}, #{type}, #{faceSampleId}, #{posJson}, #{createTime})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="addRelation">
|
<insert id="addRelation">
|
||||||
replace member_source(scenic_id, face_id, member_id, source_id, is_buy, type, order_id)
|
replace member_source(scenic_id, face_id, member_id, source_id, is_buy, type, order_id, is_free)
|
||||||
values (#{scenicId}, #{faceId}, #{memberId}, #{sourceId}, #{isBuy}, #{type}, #{orderId})
|
values (#{scenicId}, #{faceId}, #{memberId}, #{sourceId}, #{isBuy}, #{type}, #{orderId}, #{isFree})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="addRelations">
|
<insert id="addRelations">
|
||||||
replace member_source(scenic_id, face_id, member_id, source_id, is_buy, type, order_id)
|
replace member_source(scenic_id, face_id, member_id, source_id, is_buy, type, order_id, is_free)
|
||||||
values
|
values
|
||||||
<foreach collection="list" item="item" separator=",">
|
<foreach collection="list" item="item" separator=",">
|
||||||
(#{item.scenicId}, #{item.faceId}, #{item.memberId}, #{item.sourceId}, #{item.isBuy}, #{item.type}, #{item.orderId})
|
(#{item.scenicId}, #{item.faceId}, #{item.memberId}, #{item.sourceId}, #{item.isBuy}, #{item.type}, #{item.orderId}, #{item.isFree})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
<update id="update">
|
<update id="update">
|
||||||
@ -75,7 +75,7 @@
|
|||||||
order by so.create_time desc
|
order by so.create_time desc
|
||||||
</select>
|
</select>
|
||||||
<select id="userGetById" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
|
<select id="userGetById" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
|
||||||
select so.id, ms.scenic_id, device_id, ms.member_id, url, so.create_time, so.update_time,sc.`name` as scenicName
|
select so.id, ms.scenic_id, device_id, ms.member_id, url, ms.is_free, so.create_time, so.update_time,sc.`name` as scenicName
|
||||||
from member_source ms
|
from member_source ms
|
||||||
left join source so on ms.source_id = so.id
|
left join source so on ms.source_id = so.id
|
||||||
left join scenic sc on sc.id = so.scenic_id
|
left join scenic sc on sc.id = so.scenic_id
|
||||||
@ -125,7 +125,7 @@
|
|||||||
limit 1
|
limit 1
|
||||||
</select>
|
</select>
|
||||||
<select id="listUser" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
|
<select id="listUser" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
|
||||||
select so.id, ms.scenic_id, device_id, url, so.create_time, so.update_time,sc.`name` as scenicName, ms.is_buy, video_url
|
select so.id, ms.scenic_id, device_id, url, ms.is_free, ms.water_url, so.create_time, so.update_time,sc.`name` as scenicName, ms.is_buy, video_url
|
||||||
from member_source ms
|
from member_source ms
|
||||||
left join source so on ms.source_id = so.id
|
left join source so on ms.source_id = so.id
|
||||||
left join scenic sc on sc.id = so.scenic_id
|
left join scenic sc on sc.id = so.scenic_id
|
||||||
@ -139,7 +139,7 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="listUserOne" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
|
<select id="listUserOne" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
|
||||||
select so.id, ms.scenic_id, device_id, url, video_url, so.create_time, so.update_time,sc.`name` as scenicName, ms.is_buy
|
select so.id, ms.scenic_id, device_id, url, ms.is_free, video_url, so.create_time, so.update_time,sc.`name` as scenicName, ms.is_buy
|
||||||
from member_source ms
|
from member_source ms
|
||||||
left join source so on ms.source_id = so.id
|
left join source so on ms.source_id = so.id
|
||||||
left join scenic sc on sc.id = so.scenic_id
|
left join scenic sc on sc.id = so.scenic_id
|
||||||
@ -147,7 +147,7 @@
|
|||||||
limit 1
|
limit 1
|
||||||
</select>
|
</select>
|
||||||
<select id="queryByRelation" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
|
<select id="queryByRelation" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
|
||||||
select so.id, ms.face_id, ms.scenic_id, ms.type, so.url, so.create_time, so.update_time,sc.`name` as scenicName, ms.is_buy
|
select so.id, ms.face_id, ms.scenic_id, ms.type, so.url, ms.is_free, so.create_time, so.update_time,sc.`name` as scenicName, ms.is_buy
|
||||||
from member_source ms
|
from member_source ms
|
||||||
left join source so on ms.source_id = so.id
|
left join source so on ms.source_id = so.id
|
||||||
left join scenic sc on sc.id = so.scenic_id
|
left join scenic sc on sc.id = so.scenic_id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user