sean.zhou
2022-07-22 9b2eedb85d53ca32610c32c6e50b5230ab3b16cf
src/main/java/com/dji/sample/manage/service/IWorkspaceService.java
@@ -1,18 +1,13 @@
package com.dji.sample.manage.service;
import com.dji.sample.component.mqtt.model.CommonTopicReceiver;
import com.dji.sample.manage.model.dto.WorkspaceDTO;
import org.springframework.messaging.MessageHeaders;
import java.util.Optional;
public interface IWorkspaceService {
    /**
     * Query the workspace information based on the primary key id of the database.
     * @param id primary key id
     * @return
     */
    Optional<WorkspaceDTO> getWorkspaceById(int id);
    /**
     * Query the information of a workspace based on its workspace id.
@@ -20,4 +15,19 @@
     * @return
     */
    Optional<WorkspaceDTO> getWorkspaceByWorkspaceId(String workspaceId);
    /**
     * Query the workspace of a workspace based on bind code.
     * @param bindCode
     * @return
     */
    Optional<WorkspaceDTO> getWorkspaceNameByBindCode(String bindCode);
    /**
     * Handle the request for obtaining the organization information corresponding to the device binding.
     * Note: If your business does not need to bind the dock to the organization,
     *       you can directly reply to the successful message without implementing business logic.
     * @param receiver
     */
    void replyOrganizationGet(CommonTopicReceiver receiver, MessageHeaders headers);
}