internship:再次更改了功能需求

从一开始着手该项目到现在,经历了几次项目功能需求更改,每一次对该项目原有接口的代码解读使得对该项目理解更加深刻。同时,和其他部门负责人在交互上也更加熟练,特别是和前端。产品经理对于项目产品理解是首位。

以下是更改需求之后,所写的接口:


import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSort;
import com.hyd.daring.common.response.ResponseData;
import com.hyd.daring.model.module.ModuleScheduleInfo;
import com.hyd.daring.service.IBizTunnelServiceDemo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RequestMapping("/")
@RestController
@Validated
@Api(tags = "需求更改-模型数据接口")
@ApiSort(value = 1)
@Slf4j
public class D3ModuleController_Demo {

    @Resource
    private IBizTunnelServiceDemo tunnelService;

    /**
     *每种隧道分两种类型 因此创建两种接口 负责单独传输该类型的数据
     * @return
     */

    @RequestMapping(value = "/scheduleDemo",method = RequestMethod.GET)
    @ApiOperation(value = "3D-隧道类型1")
    @ApiOperationSupport(order=1)
    public ResponseData<ModuleScheduleInfo> shedule(@ApiParam(name = "tunnelId",value = "当前选择的隧道id",required = true) Integer tunnelId) {
        ModuleScheduleInfo res=tunnelService.moduleScheduleInfo(tunnelId);
        return new ResponseData<>(res);
    }

    @RequestMapping(value = "/scheduleDemoAnother",method = RequestMethod.GET)
    @ApiOperation(value = "3D-隧道类型2")
    @ApiOperationSupport(order=1)
    public ResponseData<ModuleScheduleInfo> sheduleAonther(@ApiParam(name = "tunnelId",value = "当前选择的隧道id",required = true) Integer tunnelId) {
        ModuleScheduleInfo res=tunnelService.moduleScheduleInfoAnother(tunnelId);
        return new ResponseData<>(res);
    }

    @RequestMapping(value = "/scheduleType",method = RequestMethod.GET)
    @ApiOperation(value = "3D-隧道各位置最新坐标、进尺、桩号、监控视频、施工工艺视频")
    @ApiOperationSupport(order=1)
    public ResponseData<ModuleScheduleInfo> sheduleType(@ApiParam(name = "tunnelId",value = "当前选择的隧道id",required = true) Integer tunnelId) {
        ModuleScheduleInfo res=tunnelService.moduleSchedule(tunnelId);
        return new ResponseData<>(res);
    }
}

基于一定的业务逻辑理解

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值