package com.whyc.service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.whyc.mapper.PowerheartParamMapper; import com.whyc.pojo.db_param.PowerheartParam; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service public class PowerheartParamService { @Autowired(required = false) private PowerheartParamMapper mapper; //获取前笔数*时间间隔 public PowerheartParam getHeartParamByPowerId(Integer powerId) { QueryWrapper wrapper=new QueryWrapper(); wrapper.eq("powerId",powerId); wrapper.last("limit 1"); return mapper.selectOne(wrapper); } }