feat:设备音量修改
This commit is contained in:
1 parent
27f265c9ee
commit
3fd191429e
9 files changed
+69
-1
No files matched your search
@@ -58,6 +58,8 @@ CREATE TABLE hard_door_manager
|
||||
signal_time datetime DEFAULT NULL COMMENT 'sim 信号值更新时间。yyyy-MM-dd HH:mm:ss',
|
||||
cabinet_list text DEFAULT NULL COMMENT '货柜列表JSON',
|
||||
restart_time datetime DEFAULT NULL COMMENT '上次重启时间',
|
||||
system_volume int DEFAULT 0 COMMENT '系统音量',
|
||||
media_volume int DEFAULT 0 COMMENT '媒体音量',
|
||||
create_by varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人',
|
||||
create_time datetime DEFAULT NULL COMMENT '创建时间',
|
||||
update_by varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '修改人',
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.bsd.pjcloud.hard.api.dto.spu;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class HardPutawayDto {
|
||||
|
||||
/**
|
||||
* 绑定id
|
||||
*/
|
||||
@NotNull(message = "绑定id不能为空")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 商品id
|
||||
*/
|
||||
@NotNull(message = "商品id")
|
||||
private Long hardSpuId;
|
||||
|
||||
}
|
||||
+12
@@ -126,6 +126,18 @@ public class HardDoorManagerEntity extends Model<HardDoorManagerEntity> {
|
||||
@Schema(description = "上次重启时间")
|
||||
private LocalDateTime restartTime;
|
||||
|
||||
/**
|
||||
* 系统音量
|
||||
*/
|
||||
@Schema(description = "系统音量")
|
||||
private Integer systemVolume;
|
||||
|
||||
/**
|
||||
* 媒体音量
|
||||
*/
|
||||
@Schema(description = "媒体音量")
|
||||
private Integer mediaVolume;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
|
||||
-1
@@ -44,7 +44,6 @@ public class HardDoorManagerController {
|
||||
@PostMapping("/bind")
|
||||
public R bind(@RequestBody HardDoorManagerEntity dto) {
|
||||
if (ObjectUtil.isEmpty(dto.getImei())) throw new RuntimeException("设备IMEI卡号不能为空");
|
||||
if (ObjectUtil.isEmpty(dto.getDeviceCode())) throw new RuntimeException("设备内置设备编号不能为空");
|
||||
hardDoorManagerService.bind(dto);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
+8
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.data.datascope.DataScope;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.hard.api.dto.spu.HardPutawayDto;
|
||||
import com.bsd.pjcloud.hard.api.dto.spu.HardSpuDto;
|
||||
import com.bsd.pjcloud.hard.api.entity.spu.HardSpuEntity;
|
||||
import com.bsd.pjcloud.hard.api.vo.spu.HardSpuJoinVo;
|
||||
@@ -52,6 +53,13 @@ public class HardSpuController {
|
||||
return R.ok(hardSpuService.getByCabinetNo(hardId, cabinetNo));
|
||||
}
|
||||
|
||||
@Operation(summary = "上架", description = "上架")
|
||||
@PostMapping("/putaway")
|
||||
public R putaway(@RequestBody HardPutawayDto dto) {
|
||||
hardSpuService.putaway(dto);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Operation(summary = "下拉查询", description = "下拉查询")
|
||||
@GetMapping("/select")
|
||||
public R select(@ParameterObject Page page, @ParameterObject HardSpuDto dto) {
|
||||
|
||||
+6
@@ -3,6 +3,7 @@ package com.bsd.pjcloud.hard.service;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.common.data.datascope.DataScope;
|
||||
import com.bsd.pjcloud.hard.api.dto.spu.HardPutawayDto;
|
||||
import com.bsd.pjcloud.hard.api.dto.spu.HardSpuDto;
|
||||
import com.bsd.pjcloud.hard.api.entity.spu.HardSpuEntity;
|
||||
import com.bsd.pjcloud.hard.api.vo.spu.HardSpuJoinVo;
|
||||
@@ -39,6 +40,11 @@ public interface HardSpuService extends IService<HardSpuEntity> {
|
||||
*/
|
||||
List<Map<Integer, List<HardSpuJoinVo>>> getByCabinetNo(Long hardId, String cabinetNo);
|
||||
|
||||
/**
|
||||
* 上架
|
||||
*/
|
||||
void putaway(HardPutawayDto dto);
|
||||
|
||||
/**
|
||||
* 拉取旷世商品
|
||||
*/
|
||||
|
||||
+7
@@ -98,6 +98,7 @@ public class HardDoorManagerServiceImpl extends ServiceImpl<HardDoorManagerMappe
|
||||
HardDoorManagerEntity hardDoorManagerDetail = baseMapper.selectById(dto.getId());
|
||||
// 更新设备信息
|
||||
HardDoorManagerEntity updateObj = new HardDoorManagerEntity();
|
||||
updateObj.setDeviceCode(bindVo.getDeviceCode());
|
||||
updateObj.setId(hardDoorManagerDetail.getId());
|
||||
updateObj.setPowerStatus(statusVo.getPowerStatus());
|
||||
updateObj.setNetStatus(statusVo.getNetStatus());
|
||||
@@ -137,5 +138,11 @@ public class HardDoorManagerServiceImpl extends ServiceImpl<HardDoorManagerMappe
|
||||
if (!volumeVo.isSuccess()) {
|
||||
throw new RuntimeException(volumeVo.getMessage());
|
||||
}
|
||||
// 修改音量
|
||||
HardDoorManagerEntity updateObj = new HardDoorManagerEntity();
|
||||
updateObj.setId(hardDoorDetail.getId());
|
||||
updateObj.setSystemVolume(dto.getSystemVolume());
|
||||
updateObj.setMediaVolume(dto.getMediaVolume());
|
||||
baseMapper.updateById(updateObj);
|
||||
}
|
||||
}
|
||||
+9
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.common.data.datascope.DataScope;
|
||||
import com.bsd.pjcloud.hard.api.constant.spu.HardKsSkuTypeEnum;
|
||||
import com.bsd.pjcloud.hard.api.dto.spu.HardPutawayDto;
|
||||
import com.bsd.pjcloud.hard.api.dto.spu.HardSpuDto;
|
||||
import com.bsd.pjcloud.hard.api.dto.spu.HardSpuJoinDto;
|
||||
import com.bsd.pjcloud.hard.api.entity.spu.HardSpuEntity;
|
||||
@@ -126,6 +127,14 @@ public class HardSpuServiceImpl extends ServiceImpl<HardSpuMapper, HardSpuEntity
|
||||
return List.of();
|
||||
}
|
||||
|
||||
/**
|
||||
* 上架id
|
||||
*/
|
||||
@Override
|
||||
public void putaway(HardPutawayDto dto) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 拉取旷世商品
|
||||
*/
|
||||
|
||||
+4
@@ -20,6 +20,8 @@
|
||||
<result property="signalTime" column="signal_time"/>
|
||||
<result property="cabinetList" column="cabinet_list"/>
|
||||
<result property="restartTime" column="restart_time"/>
|
||||
<result property="systemVolume" column="system_volume"/>
|
||||
<result property="mediaVolume" column="media_volume"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
@@ -46,6 +48,8 @@
|
||||
a.signal_time,
|
||||
a.cabinet_list,
|
||||
a.restart_time,
|
||||
a.system_volume,
|
||||
a.media_volume,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
|
||||
Reference in new issue
Block a user