运营区边缘计算:基础支持-redis缓存设备所属运营商
This commit is contained in:
parent
f41a89b24a
commit
67f06a6ed7
@ -11,6 +11,7 @@ import com.cdzy.operations.model.vo.EbikeEcuInfoVo;
|
||||
import com.cdzy.operations.model.vo.EbikeEcuUpgradeVo;
|
||||
import com.cdzy.operations.service.EbikeEcuInfoService;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -25,6 +26,8 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static com.cdzy.operations.model.entity.table.EbikeEcuInfoTableDef.EBIKE_ECU_INFO;
|
||||
|
||||
/**
|
||||
* 中控基本信息 控制层。
|
||||
*
|
||||
@ -167,7 +170,7 @@ public class EbikeEcuInfoController {
|
||||
*/
|
||||
@GetMapping("executeCommand")
|
||||
public JsonResult<?> executeCommand(String ecuSn, String bikeCode, @NotNull(message = "命令编码不能为空") String commandCode) {
|
||||
boolean result = ebikeEcuInfoService.executeCommand(ecuSn, bikeCode, commandCode, null,null);
|
||||
boolean result = ebikeEcuInfoService.executeCommand(ecuSn, bikeCode, commandCode, null, null);
|
||||
return JsonResult.success(result);
|
||||
}
|
||||
|
||||
@ -177,11 +180,24 @@ public class EbikeEcuInfoController {
|
||||
* @return 执行结构
|
||||
*/
|
||||
@GetMapping("playAudio")
|
||||
public JsonResult<?> playAudio(String ecuSn,Integer idx) {
|
||||
boolean result = ebikeEcuInfoService.executeCommand(ecuSn, null, CommandType.PLAY_AUDIO, null,idx);
|
||||
public JsonResult<?> playAudio(String ecuSn, Integer idx) {
|
||||
boolean result = ebikeEcuInfoService.executeCommand(ecuSn, null, CommandType.PLAY_AUDIO, null, idx);
|
||||
return JsonResult.success(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据中控编号获取详情
|
||||
*
|
||||
* @return 执行结构
|
||||
*/
|
||||
@GetMapping("getEcuInfoByEcuSn")
|
||||
public JsonResult<EbikeEcuInfo> getEcuInfoByEcuSn(@RequestParam("ecuSn") String ecuSn) {
|
||||
QueryWrapper queryWrapper = QueryWrapper.create()
|
||||
.where(EBIKE_ECU_INFO.ECU_SN.eq(ecuSn));
|
||||
EbikeEcuInfo info = ebikeEcuInfoService.getOne(queryWrapper);
|
||||
return JsonResult.success(info);
|
||||
}
|
||||
|
||||
/**
|
||||
* 远程升级
|
||||
*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user