|
@@ -31,8 +31,6 @@ import com.fdkankan.model.enums.ModelTypeEnums;
|
|
|
import com.fdkankan.model.utils.CreateHouseJsonUtil;
|
|
|
import com.fdkankan.model.utils.CreateObjUtil;
|
|
|
import com.fdkankan.model.utils.SceneUtil;
|
|
|
-import com.fdkankan.push.config.PushMessageConfig;
|
|
|
-import com.fdkankan.push.utils.PushMsgUtil;
|
|
|
import com.fdkankan.rabbitmq.bean.BuildSceneCallMessage;
|
|
|
import com.fdkankan.rabbitmq.bean.BuildSceneResultMqMessage;
|
|
|
import com.fdkankan.rabbitmq.util.RabbitMqProducer;
|
|
@@ -572,47 +570,6 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
|
|
|
|
|
|
private void pushMsgToApp(Integer pushChannel, String pushToken, int cameraType, String sceneName, String webSite){
|
|
|
log.info("推送消息,渠道是 {}, 手机token是 {}", pushChannel, pushToken);
|
|
|
- if(Objects.isNull(pushChannel) && StrUtil.isBlank(pushToken)){
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- String title = sceneName + "计算完成";
|
|
|
- String body = "您上传的" + sceneName + "计算完成,点击查看";
|
|
|
-
|
|
|
- try{
|
|
|
- if(FYunTypeEnum.AWS.code().equals(fYunFileService.getFyunType())){
|
|
|
- PushMsgUtil.googlePushMsg(ConstantFilePath.BASE_PATH + "/refreshToken.json", pushToken,
|
|
|
- title, body , webSite);
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- PushMessageConfig pushConfig = null;
|
|
|
- if(pushChannel == 0){
|
|
|
- if(cameraType == 10 || cameraType == 13){
|
|
|
- //ios
|
|
|
- pushConfig = new PushMessageConfig(PushMessageConfig.IOS_KEY_Z, PushMessageConfig.IOS_SECRET_Z);
|
|
|
- pushConfig.sendIOSUnicast(pushToken, "四维看看Minion",title, body, webSite);
|
|
|
- }else {
|
|
|
- //ios
|
|
|
- pushConfig = new PushMessageConfig(PushMessageConfig.IOS_KEY, PushMessageConfig.IOS_SECRET);
|
|
|
- pushConfig.sendIOSUnicast(pushToken, "四维看看Pro",title, body, webSite);
|
|
|
- }
|
|
|
- }else {
|
|
|
- if(cameraType == 10 || cameraType == 13){
|
|
|
- //ios
|
|
|
- //安卓
|
|
|
- pushConfig = new PushMessageConfig(PushMessageConfig.ANDROID_KEY_Z, PushMessageConfig.ANDROID_SECRET_Z);
|
|
|
- pushConfig.sendAndroidUnicast2(pushToken, "四维看看Minion",title, body, webSite);
|
|
|
- }else {
|
|
|
- //安卓
|
|
|
- pushConfig = new PushMessageConfig(PushMessageConfig.ANDROID_KEY, PushMessageConfig.ANDROID_SECRET);
|
|
|
- pushConfig.sendAndroidUnicast(pushToken, "四维看看Pro",title, body, webSite);
|
|
|
- }
|
|
|
- }
|
|
|
- log.info("消息推送结束!");
|
|
|
- }catch (Exception e){
|
|
|
- log.error("推送消息失败:", e);
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
private void copyToEditDir(String num) throws IOException {
|
|
@@ -795,23 +752,8 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
|
|
|
|
|
|
private int getPayStatus(Long cameraId, Long space){
|
|
|
//更新相机使用用量
|
|
|
- CameraDetail cameraDetail = cameraDetailService.updateCameraDetailByCameraIdAndSpace(cameraId, space);
|
|
|
- Long totalSpace = cameraDetail.getTotalSpace();
|
|
|
-
|
|
|
- UserIncrement userIncrement = userIncrementService.getByCameraId(cameraId);
|
|
|
- if(!ObjectUtils.isEmpty(userIncrement) && userIncrement.getIsExpired().equals(ExpiredStatus.NOT_EXPIRED.code())){
|
|
|
- IncrementType type = incrementTypeService.getById(userIncrement.getIncrementTypeId());
|
|
|
- if(type != null){
|
|
|
- Integer cameraCapacity = type.getCameraCapacity();
|
|
|
- if(cameraCapacity == -1){ //无限容量权益
|
|
|
- return PayStatus.PAY.code();
|
|
|
- }else {
|
|
|
- totalSpace = cameraCapacity *1024 * 1024 * 1024L; //权益设置容量
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return totalSpace.compareTo(cameraDetail.getUsedSpace()) == -1 ? PayStatus.NO_CAPACITY.code() : PayStatus.PAY.code();
|
|
|
+ cameraDetailService.updateCameraDetailByCameraIdAndSpace(cameraId, space);
|
|
|
+ return PayStatus.PAY.code();
|
|
|
}
|
|
|
|
|
|
private Object[] updateEditInfo(ScenePlus scenePlus){
|