Files
OneKeyCallVideoTablet/src/main/java/com/onekeycall/videotablet/controller/sn/DeviceApkInfoController.java
2026-01-20 09:28:00 +08:00

33 lines
1.1 KiB
Java

package com.onekeycall.videotablet.controller.sn;
import com.onekeycall.videotablet.bean.ApkUploadRequest;
import com.onekeycall.videotablet.entity.ApkInfo;
import com.onekeycall.videotablet.result.Result;
import com.onekeycall.videotablet.service.DeviceApkInfoService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/sn")
public class DeviceApkInfoController {
static Logger logger = LoggerFactory.getLogger(DeviceApkInfoController.class);
@Autowired
private DeviceApkInfoService deviceApkInfoService;
@PostMapping("/upload_install_apks")
public Result uploadInstallApks(@RequestBody ApkUploadRequest request) {
String sn = request.getSn();
List<ApkInfo> apkList = request.getApk_list();
if (apkList == null || apkList.isEmpty()) {
return Result.error().message("应用列表为空");
}
deviceApkInfoService.saveOrUpdateDeviceApkInfo(sn, apkList);
return Result.ok();
}
}