| | |
| | | return service.getById(powerId); |
| | | } |
| | | |
| | | @ApiOperation("查询-品牌") |
| | | @GetMapping("getProducerList") |
| | | public Response getProducerList(){ |
| | | return service.getProducerList(); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.whyc.mapper; |
| | | |
| | | import com.whyc.pojo.db_batt.PowerInf; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface PowerInfMapper extends CustomMapper<PowerInf>{ |
| | | Integer selectMaxBattGroupId(); |
| | | |
| | | int getMaxPowerId(); |
| | | |
| | | @Select("select distinct producer from db_batt.power_inf where producer is not null") |
| | | List<String> getProducerList(); |
| | | } |
| | |
| | | PowerInf powerInf = mapper.selectById(powerId); |
| | | return new Response().set(1,powerInf); |
| | | } |
| | | |
| | | public Response getProducerList() { |
| | | List<String> producerList = mapper.getProducerList(); |
| | | return new Response().set(1,producerList); |
| | | } |
| | | } |