当前位置:网站首页>internship:完成新功能增设接口
internship:完成新功能增设接口
2022-07-08 01:13:00 【ahyo】
后端就是为前端提供接口文档数据,至于网页的页面布局不需要后端去实现,只管页面所呈现的数据即可,以及再那些模块需要返回数据。
对于新增功能界面的接口写法 创建service层和controller层时,对应继承的MyBatis-plus所准备的工具类的泛型中的mapper是不一样的。也就是 一个service接口对应一个Impl。
编写相关的类作为接口的实现基础:
@Service
public class BizScheduleRecordServiceImplDemo extends ServiceImpl<BizScheduleRecordMapper, BizScheduleRecord> implements IBizScheduleRecordServiceDemo {
@Resource
private BizTunnelMapper tunnelMapper;
@Override
public ScheduleInfoModelDemo jinchiInfo(Integer tunnelId) {
BizTunnel tunnel = tunnelMapper.selectById(tunnelId);
ScheduleInfoModelDemo demo=new ScheduleInfoModelDemo();
demo.setTunnelId(tunnelId);
demo.setTunnelName(tunnel.getName());
demo.setLength(7.0);
if(tunnel.getName().equals(""))
{
ScheduleInfoModelDemo.DataDetail dataDetail=new ScheduleInfoModelDemo.DataDetail();
dataDetail.setZhangzmRatio(0.50)
.setErcRatio(0.50)
.setErceWholejinchi(3171)
.setZzmWholejinchi(3171);
demo.setPdx(dataDetail);
demo.setPdd(dataDetail);
}
if(tunnel.getName().equals(""))
{
ScheduleInfoModelDemo.DataDetail dataDetail=new ScheduleInfoModelDemo.DataDetail();
dataDetail.setZhangzmRatio(0.50)
.setErcRatio(0.50)
.setErceWholejinchi(3171)
.setZzmWholejinchi(3171);
demo.setEnter(dataDetail);
demo.setExit(dataDetail);
}
return demo;
}
}
接口:
@RequestMapping(value = "/**", method = RequestMethod.GET)
@ApiOperation(value = "")
@ApiOperationSupport(order = 8)
public ResponseData<ScheduleInfoModelDemo> tunnelschedule(@ApiParam(name = "tunnelId",value = "id", required = true) Integer tunnelId) {
return new ResponseData<>(scheduleRecordService.jinchiInfo(tunnelId));
}
边栏推荐
- Towards an endless language learning framework
- See how names are added to namespace STD from cmath file
- Height of life
- Give some suggestions to friends who are just getting started or preparing to change careers as network engineers
- Keras深度学习实战——基于Inception v3实现性别分类
- excel函数统计已存在数据的数量
- nmap工具介紹及常用命令
- Little knowledge about TXE and TC flag bits
- COMSOL --- construction of micro resistance beam model --- final temperature distribution and deformation --- addition of materials
- WPF custom realistic wind radar chart control
猜你喜欢

The bank needs to build the middle office capability of the intelligent customer service module to drive the upgrade of the whole scene intelligent customer service
![[reinforcement learning medical] deep reinforcement learning for clinical decision support: a brief overview](/img/45/5f14454267318bb404732c2df5e03c.jpg)
[reinforcement learning medical] deep reinforcement learning for clinical decision support: a brief overview

银行需要搭建智能客服模块的中台能力,驱动全场景智能客服务升级

很多小夥伴不太了解ORM框架的底層原理,這不,冰河帶你10分鐘手擼一個極簡版ORM框架(趕快收藏吧)

Leetcode featured 200 -- linked list

Semantic segmentation | learning record (3) FCN

Discrimination gradient descent

Introduction to QT: video player

List of top ten domestic industrial 3D visual guidance enterprises in 2022

Keras' deep learning practice -- gender classification based on inception V3
随机推荐
Alo who likes TestMan
科普 | 什么是灵魂绑定代币SBT?有何价值?
Height of life
JVM memory and garbage collection-3-object instantiation and memory layout
Leetcode question brushing record | 283_ Move zero
鱼和虾走的路
Coreldraw2022 download and install computer system requirements technical specifications
Introduction à l'outil nmap et aux commandes communes
Force buckle 6_ 1342. Number of operations to change a number to 0
Xmeter newsletter 2022-06 enterprise v3.2.3 release, error log and test report chart optimization
Ml self realization / linear regression / multivariable
Neural network and deep learning-5-perceptron-pytorch
"Hands on learning in depth" Chapter 2 - preparatory knowledge_ 2.2 data preprocessing_ Learning thinking and exercise answers
力扣5_876. 链表的中间结点
Introduction to ADB tools
Little knowledge about TXE and TC flag bits
线程死锁——死锁产生的条件
JVM memory and garbage collection-3-direct memory
JVM memory and garbage collection-3-runtime data area / heap area
咋吃都不胖的朋友,Nature告诉你原因:是基因突变了