当前位置:网站首页>Interface: compléter la nouvelle fonction et ajouter une interface
Interface: compléter la nouvelle fonction et ajouter une interface
2022-07-08 02:21:00 【Ahyo】
L'arrière - plan est de fournir des données de documentation d'interface pour l'avant - plan,Quant à la mise en page d'une page Web, elle n'a pas besoin d'arrière - plan,Seules les données présentées sur la page,Et ces autres modules doivent renvoyer des données.
Pour l'écriture d'interface de l'interface de nouvelle fonction CréationserviceCouche etcontrollerHeure de la couche,Correspondant à l'héritageMyBatis-plusDans les génériques de la classe d'outils préparéemapperC'est différent..C'est - à - dire UnserviceL'interface correspond à unImpl.
Écrivez les classes pertinentes comme base de mise en œuvre de l'interface:
@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;
}
}
Interface:
@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));
}
边栏推荐
- Mqtt x newsletter 2022-06 | v1.8.0 release, new mqtt CLI and mqtt websocket tools
- [knowledge map paper] attnpath: integrate the graph attention mechanism into knowledge graph reasoning based on deep reinforcement
- 入侵检测——jsql
- Emqx 5.0 release: open source Internet of things message server with single cluster supporting 100million mqtt connections
- JVM memory and garbage collection-3-runtime data area / method area
- Yolov5 Lite: yolov5, which is lighter, faster and easy to deploy
- Ml self realization / logistic regression / binary classification
- Learn CV two loss function from scratch (3)
- 云原生应用开发之 gRPC 入门
- BizDevOps与DevOps的关系
猜你喜欢
力争做到国内赛事应办尽办,国家体育总局明确安全有序恢复线下体育赛事
Talk about the realization of authority control and transaction record function of SAP system
1385:团伙(group)
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
JVM memory and garbage collection-3-runtime data area / heap area
C language -cmake cmakelists Txt tutorial
leetcode 869. Reordered Power of 2 | 869. 重新排序得到 2 的幂(状态压缩)
入侵检测——WebCrack
Yolov5 Lite: ncnn+int8 deployment and quantification, raspberry pie can also be real-time
线程死锁——死锁产生的条件
随机推荐
leetcode 869. Reordered Power of 2 | 869. 重新排序得到 2 的幂(状态压缩)
Popular science | what is soul binding token SBT? What is the value?
[knowledge map paper] r2d2: knowledge map reasoning based on debate dynamics
th:include的使用
leetcode 866. Prime Palindrome | 866. 回文素数
Deep understanding of softmax
Ncnn+int8+yolov4 quantitative model and real-time reasoning
[knowledge map] interpretable recommendation based on knowledge map through deep reinforcement learning
文盘Rust -- 给程序加个日志
leetcode 873. Length of Longest Fibonacci Subsequence | 873. 最长的斐波那契子序列的长度
生命的高度
力扣4_412. Fizz Buzz
CBAM for in-depth understanding of the attention mechanism in CV
Ml self realization / logistic regression / binary classification
Semantic segmentation | learning record (5) FCN network structure officially implemented by pytoch
Emqx 5.0 release: open source Internet of things message server with single cluster supporting 100million mqtt connections
image enhancement
力扣5_876. 链表的中间结点
internship:完成新功能增设接口
Yolov5 Lite: ncnn+int8 deployment and quantification, raspberry pie can also be real-time