|
|
@@ -6,6 +6,7 @@ import com.dji.sample.manage.service.IWorkspaceService;
|
|
|
import com.dji.sdk.common.HttpResultResponse;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
@@ -51,4 +52,15 @@ public class WorkspaceController {
|
|
|
|
|
|
return workspaceList.isEmpty() ? HttpResultResponse.error() : HttpResultResponse.success(workspaceList);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取项目名称和设备绑定码
|
|
|
+ * @param workspaceId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/{workspace_id}/bingCode")
|
|
|
+ public HttpResultResponse getBingCode(@PathVariable(name = "workspace_id") String workspaceId) {
|
|
|
+ WorkspaceDTO workspaceList = workspaceService.getBindCode(workspaceId);
|
|
|
+ return HttpResultResponse.success(workspaceList);
|
|
|
+ }
|
|
|
}
|