Authored by caoyan

Merge branch 'test6.9.2' of http://git.yoho.cn/ufo/ufo-platform into test6.9.2

... ... @@ -111,7 +111,7 @@ public class UfoLiveController {
Integer currentTime;
try {
currentTime = ufoLiveService.queryCurrentTime(req.getOrderCode());
currentTime = ufoLiveService.queryCurrentTime(req.getOrderCode(), req.getPhoneUid());
} catch (PlatformException e) {
return new ApiResponse.ApiResponseBuilder().code(e.getCode()).data("").message(e.getMessage()).build();
}
... ...
... ... @@ -225,7 +225,11 @@ public class UfoLiveService {
return null == cameraCode ? req.getCameraCode() : Integer.valueOf(cameraCode);
}
public Integer queryCurrentTime(Long orderCode) throws PlatformException {
public Integer queryCurrentTime(Long orderCode, String phoneUid) throws PlatformException {
if (StringUtils.isNotEmpty(phoneUid) && null == phoneUidCameraService.selectByphoneUid(phoneUid)) { // 如果启动手机唯一标识来关联摄像头,则走此流程
throw new PlatformException("没有选择摄像头", 400);
}
Integer userId = new UserHelper().getUserId();
RedisKeyBuilder key = RedisKeyBuilder.newInstance().appendFixed(RedisKeyConstants.LIVE_USER).appendVar(userId);
... ...
... ... @@ -729,11 +729,11 @@ public class ProductServiceImpl implements IProductService, ApplicationContextAw
}
int n = storagePriceMapper.cancelSaleSkup(bo.getSkup()); // SQL里面保证修改的原始状态为 可售 防止并发
if (n == 1) {
Storage storage = storageMapper.selectByPrimaryKey(sp.getStorageId());
/*Storage storage = storageMapper.selectByPrimaryKey(sp.getStorageId());
if (storageMapper.updateStorageNum(sp.getStorageId(), storage.getStorageNum() - 1, storage.getStorageNum()) != 1) { // 防止并发修改,如果失败则发送一个spring事件
applicationContext.publishEvent(new StorageNumEvent(sp.getStorageId()));
}
}*/
LOGGER.info("send info to seller, product_name is {}, seller_uid is {}", bo.getProductName(), sp.getSellerUid());
//inboxService.addInbox(InboxBusinessTypeEnum.SALE_NOTIFIED_UNSHELF.getBusinessType(), InboxBusinessTypeEnum.SALE_NOTIFIED_UNSHELF.getType(),
... ...