feat:柜子接口信息定义
This commit is contained in:
1 parent
eb9b36c9ca
commit
37784861c5
25 files changed
+636
-4
No files matched your search
+6
-3
@@ -80,8 +80,10 @@ public class HardSpuRepertoryController {
|
||||
@SysLog("修改硬件商品库存更新记录")
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('hard_hardSpuRepertory_edit')")
|
||||
public R updateById(@RequestBody HardSpuRepertoryEntity hardSpuRepertory) {
|
||||
return R.ok(hardSpuRepertoryService.updateById(hardSpuRepertory));
|
||||
public R updateById(@Validated @RequestBody HardSpuRepertoryEntity hardSpuRepertory) {
|
||||
PjcloudUser user = SecurityUtils.getUser();
|
||||
hardSpuRepertoryService.edit(hardSpuRepertory, user);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Operation(summary = "通过id删除硬件商品库存更新记录", description = "通过id删除硬件商品库存更新记录")
|
||||
@@ -89,7 +91,8 @@ public class HardSpuRepertoryController {
|
||||
@DeleteMapping
|
||||
@PreAuthorize("@pms.hasPermission('hard_hardSpuRepertory_del')")
|
||||
public R removeById(@RequestBody Long[] ids) {
|
||||
return R.ok(hardSpuRepertoryService.removeBatchByIds(CollUtil.toList(ids)));
|
||||
hardSpuRepertoryService.delByIds(CollUtil.toList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@ResponseExcel
|
||||
|
||||
+12
@@ -8,6 +8,8 @@ import com.bsd.pjcloud.hard.api.dto.spu.HardSpuRepertoryDto;
|
||||
import com.bsd.pjcloud.hard.api.entity.spu.HardSpuRepertoryEntity;
|
||||
import com.bsd.pjcloud.hard.api.vo.spu.HardSpuRepertoryVo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public interface HardSpuRepertoryService extends IService<HardSpuRepertoryEntity> {
|
||||
|
||||
Page<HardSpuRepertoryVo> scopePageJoin(Page page, HardSpuRepertoryDto dto, DataScope dataScope);
|
||||
@@ -16,4 +18,14 @@ public interface HardSpuRepertoryService extends IService<HardSpuRepertoryEntity
|
||||
* 新增
|
||||
*/
|
||||
Long create(HardSpuRepertoryEntity entity, PjcloudUser user);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
void edit(HardSpuRepertoryEntity entity, PjcloudUser user);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
void delByIds(ArrayList<Long> list);
|
||||
}
|
||||
+57
@@ -86,6 +86,63 @@ public class HardSpuRepertoryServiceImpl extends ServiceImpl<HardSpuRepertoryMap
|
||||
return entity.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void edit(HardSpuRepertoryEntity entity, PjcloudUser user) {
|
||||
// 查询商品
|
||||
HardSpuEntity spuDetail = hardSpuService.getById(entity.getSpuId());
|
||||
if (ObjectUtil.isEmpty(spuDetail)) {
|
||||
throw new RuntimeException("商品不存在");
|
||||
}
|
||||
// 查询上架记录
|
||||
HardSpuRepertoryEntity repertoryDetail = baseMapper.selectById(entity.getId());
|
||||
if (ObjectUtil.isEmpty(repertoryDetail)) {
|
||||
throw new RuntimeException("上架记录不存在");
|
||||
}
|
||||
Integer beforeCount = 0;
|
||||
if (ObjectUtil.isNotEmpty(spuDetail.getRepertoryCount())) {
|
||||
beforeCount = spuDetail.getRepertoryCount();
|
||||
}
|
||||
entity.setUserId(user.getId());
|
||||
baseMapper.updateById(entity);
|
||||
// 更新商品库存
|
||||
HardSpuEntity spu = new HardSpuEntity();
|
||||
spu.setId(spuDetail.getId());
|
||||
spu.setRepertoryCount(entity.getCount() + beforeCount - repertoryDetail.getCount());
|
||||
hardSpuService.updateById(spu);
|
||||
entity.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delByIds(ArrayList<Long> list) {
|
||||
if (ObjectUtil.isEmpty(list)) return;
|
||||
List<HardSpuRepertoryEntity> spuRepertoryList = baseMapper.selectList(new LambdaQueryWrapper<HardSpuRepertoryEntity>()
|
||||
.in(HardSpuRepertoryEntity::getId, list)
|
||||
);
|
||||
for (HardSpuRepertoryEntity v : spuRepertoryList) {
|
||||
// 删除
|
||||
baseMapper.deleteById(v.getId());
|
||||
// 更新商品库存
|
||||
// 查询商品
|
||||
HardSpuEntity spuDetail = hardSpuService.getById(v.getSpuId());
|
||||
if (ObjectUtil.isEmpty(spuDetail)) {
|
||||
throw new RuntimeException("商品<" + spuDetail.getName() + ">不存在");
|
||||
}
|
||||
HardSpuEntity spu = new HardSpuEntity();
|
||||
spu.setId(v.getSpuId());
|
||||
spu.setRepertoryCount(spuDetail.getRepertoryCount() - v.getCount());
|
||||
hardSpuService.updateById(spu);
|
||||
baseMapper.deleteById(v.getId());
|
||||
}
|
||||
}
|
||||
|
||||
private void disposeList(List<HardSpuRepertoryVo> list, HardSpuRepertoryDto dto) {
|
||||
if (ObjectUtil.isEmpty(list)) return;
|
||||
// 商户
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<result property="ksStatus" column="ks_status"/>
|
||||
<result property="ksStatusTitle" column="ks_status_title"/>
|
||||
<result property="ksComments" column="ks_comments"/>
|
||||
<result property="hardDoorNumber" column="hard_door_number"/>
|
||||
<result property="mchId" column="mch_id"/>
|
||||
<result property="mchDeptId" column="mch_dept_id"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
@@ -41,6 +42,7 @@
|
||||
a.ks_status_title,
|
||||
a.ks_comments,
|
||||
a.hard_id,
|
||||
a.hard_door_number,
|
||||
a.mch_id,
|
||||
a.mch_dept_id,
|
||||
a.create_by,
|
||||
|
||||
+1
@@ -35,6 +35,7 @@
|
||||
</sql>
|
||||
|
||||
<sql id="whereA">
|
||||
a.del_flag = '0'
|
||||
<if test="dto.hardId != null and dto.hardId != '' ">
|
||||
and a.hard_id = #{dto.hardId}
|
||||
</if>
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import lombok.Getter;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 打印状态
|
||||
* 正元接口
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.bsd.pjcloud.thirdparty.constant;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 柜子接口
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum ThordDoorApiTypeEnum {
|
||||
|
||||
REGISTER("10", "设备注册"),
|
||||
BIND("20", "设备信息绑定"),
|
||||
STATUS("30", "查询设备状态"),
|
||||
RESTART("40", "设备重启"),
|
||||
SETTING("50", "设备设置"),
|
||||
VOLUME("60", "音量设置"),
|
||||
OPEN("70", "请求开锁"),
|
||||
VIDEO("80", "调取另一个摄像头视频"),
|
||||
OPEN_CALLBACK("90", "门锁开关通知"),
|
||||
VIDEO_CALLBACK("100", "视频地址通知"),
|
||||
STATUS_CALLBACK("110", "设备状态通知"),
|
||||
;
|
||||
|
||||
private final String type;
|
||||
private final String description;
|
||||
|
||||
public static ThordDoorApiTypeEnum valueOfByType(String type) {
|
||||
if (ObjectUtil.isEmpty(type)) return null;
|
||||
return Arrays.stream(values()).filter(v -> ObjectUtil.equals(type, v.getType())).findFirst().get();
|
||||
}
|
||||
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.bsd.pjcloud.thirdparty.dto.door;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DoorBindDto {
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
private String deviceCode;
|
||||
|
||||
/**
|
||||
* 设备 IMEI 号(15 位)
|
||||
*/
|
||||
private String imei;
|
||||
|
||||
/**
|
||||
* 外部设备编号(由调用方系统自定义唯一编号)
|
||||
*/
|
||||
private String outDeviceCode;
|
||||
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
package com.bsd.pjcloud.thirdparty.dto.door;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DoorOpenCallbackDto {
|
||||
|
||||
/**
|
||||
* OPEN:开锁通知;
|
||||
* CLOSE:关锁通知;
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 开门事件号
|
||||
*/
|
||||
private String eventId;
|
||||
|
||||
/**
|
||||
* 1: 录制视频;4:不录制视频;5:检修开锁;6:检修关锁;
|
||||
*/
|
||||
private Integer eventType;
|
||||
|
||||
/**
|
||||
* 商户自定义开门请求号(未开门的通知该字段为空)
|
||||
*/
|
||||
private String outOpenNo;
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
private String deviceCode;
|
||||
|
||||
/**
|
||||
* 货柜号(1,2)
|
||||
*/
|
||||
private Integer cabinetNo;
|
||||
|
||||
/**
|
||||
* SUCCESS: 开锁成功;
|
||||
* FAIL: 失败;
|
||||
*/
|
||||
private String resultCode;
|
||||
|
||||
/**
|
||||
* 错误信息,resultCode=FAIL 时返回错误信息
|
||||
*/
|
||||
private String resultMsg;
|
||||
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package com.bsd.pjcloud.thirdparty.dto.door;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DoorOpenDto {
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
private String deviceCode;
|
||||
|
||||
/**
|
||||
* 货柜号(1,2),单门柜填 1
|
||||
*/
|
||||
private int cabinetNo;
|
||||
|
||||
/**
|
||||
* 商户自定义开门请求号(商户需要保证唯一)
|
||||
*/
|
||||
private String outOpenNo;
|
||||
|
||||
/**
|
||||
* 1:录制视频;4:不录制视频;5:检修开锁;6:检修关锁
|
||||
* 当锁状态异常无法开门时,可通过检修开锁、检修关锁重置锁状态
|
||||
*/
|
||||
private Integer eventType;
|
||||
|
||||
/**
|
||||
* 开关门通知地址
|
||||
*/
|
||||
private String lockNotifyUrl;
|
||||
|
||||
/**
|
||||
* 视频通知地址,视频上传成功后通过该地址通知 eventType 为 1 时必传
|
||||
*/
|
||||
private String videoNotifyUrl;
|
||||
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.bsd.pjcloud.thirdparty.dto.door;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DoorRegisterDto {
|
||||
|
||||
/**
|
||||
* 设备 IMEI 号(15 位)
|
||||
*/
|
||||
private String imei;
|
||||
|
||||
/**
|
||||
* 外部设备编号(由调用方系统自定义唯一编号)
|
||||
*/
|
||||
private String outDeviceCode;
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.bsd.pjcloud.thirdparty.dto.door;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DoorRestartDto {
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
private String deviceCode;
|
||||
|
||||
/**
|
||||
* 重启模式。
|
||||
* 3:系统软重启 安全重启空闲状态下响应处于购物中不响应
|
||||
* 4:系统硬重启 不论什么状态直接重启
|
||||
*/
|
||||
private String restartType;
|
||||
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package com.bsd.pjcloud.thirdparty.dto.door;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DoorStatusDto {
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
private String deviceCode;
|
||||
|
||||
}
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
package com.bsd.pjcloud.thirdparty.dto.door;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
public class DoorVideoCallbackDto {
|
||||
|
||||
/**
|
||||
* 开门事件号
|
||||
*/
|
||||
private String eventId;
|
||||
|
||||
/**
|
||||
* 商户自定义开门请求号(未开门的通知该字段为空)
|
||||
*/
|
||||
private String outOpenNo;
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
private String deviceCode;
|
||||
|
||||
/**
|
||||
* 货柜号(1,2)
|
||||
*/
|
||||
private Integer cabinetNo;
|
||||
|
||||
/**
|
||||
* SUCCESS: 成功,videoList 有值。
|
||||
* FAIL: 失败,videoList 为空。
|
||||
* UNOPENED:未开门,videoList 为空。
|
||||
*/
|
||||
private String resultCode;
|
||||
|
||||
/**
|
||||
* 错误信息,resultCode=FAIL 时返回错误信息
|
||||
*/
|
||||
private String resultMsg;
|
||||
|
||||
private List<DoorVideoCallbackDto.Video> videoList;
|
||||
|
||||
@Data
|
||||
public class Video {
|
||||
|
||||
/**
|
||||
* 摄像头号:1:主摄;2:辅摄
|
||||
*/
|
||||
private Integer cameraNo;
|
||||
|
||||
/**
|
||||
* 视频地址
|
||||
*/
|
||||
private String videoUrl;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package com.bsd.pjcloud.thirdparty.dto.door;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DoorVideoDto {
|
||||
|
||||
/**
|
||||
* 开门事件号
|
||||
*/
|
||||
private String eventId;
|
||||
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.bsd.pjcloud.thirdparty.dto.door;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DoorVolumeDto {
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
private String deviceCode;
|
||||
|
||||
/**
|
||||
* 系统音量
|
||||
*/
|
||||
private Integer systemVolume;
|
||||
|
||||
/**
|
||||
* 媒体音量
|
||||
*/
|
||||
private Integer mediaVolume;
|
||||
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.bsd.pjcloud.thirdparty.vo.door;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DoorBindVo {
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
private String deviceCode;
|
||||
|
||||
/**
|
||||
* 设备 IMEI 号(15 位)
|
||||
*/
|
||||
private String imei;
|
||||
|
||||
/**
|
||||
* 外部设备编号(由调用方系统自定义唯一编号)
|
||||
*/
|
||||
private String outDeviceCode;
|
||||
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package com.bsd.pjcloud.thirdparty.vo.door;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DoorOpenCallbackVo {
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.bsd.pjcloud.thirdparty.vo.door;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DoorOpenVo {
|
||||
|
||||
/**
|
||||
* 开门事件号
|
||||
*/
|
||||
private String eventId;
|
||||
|
||||
/**
|
||||
* 商户自定义开门请求号
|
||||
*/
|
||||
private String outOpenNo;
|
||||
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.bsd.pjcloud.thirdparty.vo.door;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DoorRegisterVo {
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
private String deviceCode;
|
||||
|
||||
/**
|
||||
* 设备 IMEI 号(15 位)
|
||||
*/
|
||||
private String imei;
|
||||
|
||||
/**
|
||||
* 外部设备编号(由调用方系统自定义唯一编号)
|
||||
*/
|
||||
private String outDeviceCode;
|
||||
|
||||
/**
|
||||
* 货柜数量
|
||||
*/
|
||||
private Integer cabinetNum;
|
||||
|
||||
/**
|
||||
* 每个货柜中摄像头数量
|
||||
*/
|
||||
private Integer cabinetCameraNum;
|
||||
|
||||
/**
|
||||
* 每个货柜中称重单元数量
|
||||
*/
|
||||
private Integer cabinetWeightUnitNum;
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.bsd.pjcloud.thirdparty.vo.door;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DoorRestartVo {
|
||||
|
||||
}
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
package com.bsd.pjcloud.thirdparty.vo.door;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
public class DoorStatusVo {
|
||||
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
private String deviceCode;
|
||||
|
||||
/**
|
||||
* 1:通电;2:断电
|
||||
*/
|
||||
private Integer powerStatus;
|
||||
|
||||
/**
|
||||
* 在线状态,1:在线;2:离线
|
||||
*/
|
||||
private Integer netStatus;
|
||||
|
||||
/**
|
||||
* 售卖状态。1:在售;2:停售
|
||||
*/
|
||||
private Integer saleStatus;
|
||||
|
||||
/**
|
||||
* sim卡号设备有上报会返回,若一次上报都没有,则返回null。
|
||||
*/
|
||||
private String simSn;
|
||||
|
||||
/**
|
||||
* sim 信号强度
|
||||
* 大于-95 表示信号强度好
|
||||
* -95 到-105 表示信号强度中等
|
||||
* 小于-105 表示信号差
|
||||
*/
|
||||
private Integer signalIntensity;
|
||||
|
||||
/**
|
||||
* 信噪比,体现信道传输质量的参数
|
||||
* 大于 15 表示质量好
|
||||
* 15 到 0 表示质量中等
|
||||
* 小于等于 0 表示质量差
|
||||
*/
|
||||
private Integer signalRatio;
|
||||
|
||||
/**
|
||||
* sim 信号值更新时间。yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
private LocalDateTime signalTime;
|
||||
|
||||
/**
|
||||
* 货柜列表
|
||||
*/
|
||||
private List<Cabinet> cabinetList;
|
||||
|
||||
@Data
|
||||
public class Cabinet {
|
||||
|
||||
/**
|
||||
* 货柜号(1,2)
|
||||
*/
|
||||
private Integer cabinetNo;
|
||||
|
||||
/**
|
||||
* 锁在线1:在线;2:离线
|
||||
*/
|
||||
private Integer isLockOnline;
|
||||
|
||||
/**
|
||||
* 锁状态1:锁关;2:锁开
|
||||
*/
|
||||
private Integer lockStatus;
|
||||
|
||||
/**
|
||||
* 门状态1:门关;2:门开
|
||||
*/
|
||||
private Integer doorStatus;
|
||||
|
||||
/**
|
||||
* 货柜售卖状态1:在售;2:停售
|
||||
*/
|
||||
private Integer saleStatus;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.bsd.pjcloud.thirdparty.vo.door;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
public class DoorVideoVo {
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package com.bsd.pjcloud.thirdparty.vo.door;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DoorVolumeVo {
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
package com.bsd.pjcloud.thirdparty.utils.door.api;
|
||||
|
||||
|
||||
import com.bsd.pjcloud.thirdparty.constant.ThordDoorApiTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
public class DoorApi {
|
||||
|
||||
// 设备注册
|
||||
public static final Api REGISTER = Api.builder().url("/ams/api/device/register").type(ThordDoorApiTypeEnum.REGISTER).method("post").contentType("application/json").build();
|
||||
|
||||
// 设备信息绑定
|
||||
public static final Api BIND = Api.builder().url("/ams/api/device/bind").type(ThordDoorApiTypeEnum.BIND).method("post").contentType("application/json").build();
|
||||
|
||||
// 查询设备状态
|
||||
public static final Api STATUS = Api.builder().url("/ams/api/device/status").type(ThordDoorApiTypeEnum.STATUS).method("post").contentType("application/json").build();
|
||||
|
||||
// 设备重启
|
||||
public static final Api RESTART = Api.builder().url("/ams/api/device/restart").type(ThordDoorApiTypeEnum.RESTART).method("post").contentType("application/json").build();
|
||||
|
||||
// 设备设置
|
||||
public static final Api SETTING = Api.builder().url("/ams/api/device/setting").type(ThordDoorApiTypeEnum.SETTING).method("post").contentType("application/json").build();
|
||||
|
||||
// 音量设置
|
||||
public static final Api VOLUME = Api.builder().url("/ams/api/device/volume").type(ThordDoorApiTypeEnum.VOLUME).method("post").contentType("application/json").build();
|
||||
|
||||
// 请求开锁
|
||||
public static final Api OPEN = Api.builder().url("/ams/api/event/open").type(ThordDoorApiTypeEnum.OPEN).method("post").contentType("application/json").build();
|
||||
|
||||
// 调取另一个摄像头视频
|
||||
public static final Api VIDEO = Api.builder().url("/ams/api/event/video").type(ThordDoorApiTypeEnum.VIDEO).method("post").contentType("application/json").build();
|
||||
|
||||
// 门锁开关通知
|
||||
public static final Api OPEN_CALLBACK = Api.builder().url("/door/callback/open").type(ThordDoorApiTypeEnum.OPEN_CALLBACK).method("post").contentType("application/json").build();
|
||||
|
||||
// 视频地址通知
|
||||
public static final Api VIDEO_CALLBACK = Api.builder().url("/door/callback/video").type(ThordDoorApiTypeEnum.VIDEO_CALLBACK).method("post").contentType("application/json").build();
|
||||
|
||||
// 设备状态通知
|
||||
public static final Api STATUS_CALLBACK = Api.builder().url("/door/callback/status").type(ThordDoorApiTypeEnum.STATUS_CALLBACK).method("post").contentType("application/json").build();
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Api {
|
||||
|
||||
private String url;
|
||||
|
||||
private String method;
|
||||
|
||||
private String contentType;
|
||||
|
||||
private ThordDoorApiTypeEnum type;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user