feat(developer): 完善开发者选项CRUD与SN查询逻辑
This commit is contained in:
@@ -11,7 +11,6 @@ import com.youlai.boot.device.model.entity.SnDeviceHardware;
|
||||
import com.youlai.boot.device.model.req.ApkInstallInfoReq;
|
||||
import com.youlai.boot.device.model.req.SnHardwareInfoReq;
|
||||
import com.youlai.boot.device.model.req.SnLocationReq;
|
||||
import com.youlai.boot.device.model.entity.SnDeveloper;
|
||||
import com.youlai.boot.device.model.entity.SnLocation;
|
||||
import com.youlai.boot.device.model.entity.SnScreenshot;
|
||||
import com.youlai.boot.device.model.vo.DeveloperOptionsVO;
|
||||
@@ -240,17 +239,9 @@ public class MobileController {
|
||||
return Result.failed("设备序列号不能为空");
|
||||
}
|
||||
|
||||
// 查询该设备的开发者选项配置
|
||||
SnDeveloper developerConfig = developerService.lambdaQuery()
|
||||
.eq(SnDeveloper::getSn, sn)
|
||||
.one();
|
||||
|
||||
// 查询该设备的开发者选项配置,未配置时默认关闭
|
||||
DeveloperOptionsVO vo = new DeveloperOptionsVO();
|
||||
if (developerConfig != null) {
|
||||
vo.setDeveloperOptions(developerConfig.getDeveloperOptions());
|
||||
} else {
|
||||
vo.setDeveloperOptions(0);
|
||||
}
|
||||
vo.setDeveloperOptions(developerService.getDeveloperOptionsBySn(sn));
|
||||
// 返回开发者选项开关状态
|
||||
return Result.success(vo);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user