BusiAssistantClueRemote.java 2.92 KB
package cn.com.glsx.busassistant.remote;

import cn.com.glsx.busassistant.dto.BusinessAssistantClueDynamicRecordDTO;
import cn.com.glsx.busassistant.dto.BusinessAssistantClueInfoDTO;
import cn.com.glsx.framework.core.annotation.*;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;

import javax.validation.constraints.NotNull;

@ApiService(value = "生意助手-线索服务", version = "1.0.0", protocol = ApiService.ProtocolEnum.dubbo, type = ApiService.ApiTypeEnum.DUBBO, alias = "BusiAssistantClueRemote", owner = "liuyf")
public interface BusiAssistantClueRemote {

    @interface InsertOrUpdate {
    }

    @ApiMethod("新增或更新线索埋点数据")
    @ApiParam(name = "record", notes = "线索埋点对象", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
    @ApiResponse("返回线索信息")
    RpcResponse<Boolean> insertOrUpdate(@NotNull BusinessAssistantClueDynamicRecordDTO record);

    @ApiMethod("标记意向客户接口")
    @ApiParams({@ApiParam(name = "clueId", notes = "线索ID", dataType = ApiParam.DataTypeEnum.INTEGER, required = true)})
    @ApiResponse("返回标记结果")
    RpcResponse<Boolean> tagStarToCustomer(@NotNull Integer clueId);

    @ApiMethod("标记线索已读")
    @ApiParams({
            @ApiParam(name = "merchantId", notes = "商户ID", dataType = ApiParam.DataTypeEnum.INTEGER, required = true),
    })
    @ApiResponse("标记线索已读")
    RpcResponse<Integer> readClue(@NotNull Integer merchantId);

    @interface Query {
    }

    @ApiMethod("线索分页查询")
    @ApiParam(name = "pagination", notes = "分页信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
    @ApiResponse("线索分页信息")
    RpcResponse<RpcPagination<BusinessAssistantClueInfoDTO>> listWithPage(@NotNull RpcPagination<BusinessAssistantClueInfoDTO> pagination);

    @ApiMethod("根据线索ID获取线索信息")
    @ApiParams({
            @ApiParam(name = "clueId", notes = "线索ID", dataType = ApiParam.DataTypeEnum.INTEGER, required = true),
            @ApiParam(name = "isDetail", notes = "是否需要返回详细数据", dataType = ApiParam.DataTypeEnum.BOOLEAN, required = true)
    })
    @ApiResponse("返回线索信息")
    RpcResponse<BusinessAssistantClueInfoDTO> getById(@NotNull Integer clueId, boolean isDetail);


    @ApiMethod("获取有无未读线索")
    @ApiParams({
            @ApiParam(name = "merchantId", notes = "商户ID", dataType = ApiParam.DataTypeEnum.INTEGER, required = true),
    })
    @ApiResponse("返回有无未读线索")
    RpcResponse<Integer> getClueHasUnReadInfo(@NotNull Integer merchantId);

    @interface Delete {
    }

    @ApiMethod("线索删除")
    @ApiParams({@ApiParam(name = "clueId", notes = "线索ID", dataType = ApiParam.DataTypeEnum.INTEGER, required = true)})
    @ApiResponse("返回操作是否成功")
    RpcResponse<Boolean> delete(@NotNull Integer clueId);

}