You've already forked FrameTour-BE
free
This commit is contained in:
@ -43,4 +43,5 @@ public class GoodsDetailVO {
|
||||
private BigDecimal price;
|
||||
@ApiModelProperty("是否已购买 0否 1是")
|
||||
private Integer isBuy;
|
||||
private Integer isFree;
|
||||
}
|
||||
|
@ -58,4 +58,6 @@ public class DeviceConfigEntity {
|
||||
*/
|
||||
private BigDecimal cutPost;
|
||||
private Integer enablePreBook;
|
||||
private Integer imageFree;
|
||||
private Integer videoFree;
|
||||
}
|
||||
|
@ -14,4 +14,6 @@ public class MemberSourceEntity {
|
||||
private Long sourceId;
|
||||
private Integer isBuy;
|
||||
private Long orderId;
|
||||
private Integer isFree;
|
||||
private String waterUrl;
|
||||
}
|
||||
|
@ -50,4 +50,5 @@ public class SourceRespVO {
|
||||
private Date createTime;
|
||||
@ApiModelProperty("是否购买:0未购买,1已购买")
|
||||
private Integer isBuy;
|
||||
private Integer isFree;
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ public class GoodsServiceImpl implements GoodsService {
|
||||
goodsDetailVO.setVideoUrl(sourceRespVO.getVideoUrl());
|
||||
goodsDetailVO.setUrl(sourceRespVO.getUrl());
|
||||
goodsDetailVO.setCreateTime(sourceRespVO.getCreateTime());
|
||||
|
||||
goodsDetailVO.setIsFree(sourceRespVO.getIsFree());
|
||||
goodsDetailVOList.add(goodsDetailVO);
|
||||
i++;
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ import com.ycwl.basic.mapper.FaceSampleMapper;
|
||||
import com.ycwl.basic.mapper.ScenicMapper;
|
||||
import com.ycwl.basic.mapper.SourceMapper;
|
||||
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.face.entity.FaceEntity;
|
||||
import com.ycwl.basic.model.pc.face.resp.FaceRespVO;
|
||||
@ -137,6 +138,7 @@ public class TaskFaceServiceImpl implements TaskFaceService {
|
||||
if (sampleListIds != null && !sampleListIds.isEmpty()) {// 匹配原片:照片
|
||||
List<SourceEntity> sourceEntities = sourceMapper.listBySampleIds(sampleListIds);
|
||||
List<MemberSourceEntity> memberSourceEntityList = sourceEntities.stream().map(sourceEntity -> {
|
||||
DeviceConfigEntity deviceConfig = deviceRepository.getDeviceConfig(sourceEntity.getDeviceId());
|
||||
MemberSourceEntity memberSourceEntity = new MemberSourceEntity();
|
||||
memberSourceEntity.setScenicId(scenicId);
|
||||
memberSourceEntity.setFaceId(faceEntity.getId());
|
||||
@ -151,6 +153,18 @@ public class TaskFaceServiceImpl implements TaskFaceService {
|
||||
} else {
|
||||
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;
|
||||
}).collect(Collectors.toList());
|
||||
if (!memberSourceEntityList.isEmpty()) {
|
||||
|
Reference in New Issue
Block a user