src/main/java/com/whyc/controller/StationInfoController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/whyc/mapper/StationInfoMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/whyc/service/StationInfoService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/StationInfoMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/whyc/controller/StationInfoController.java
New file @@ -0,0 +1,27 @@ package com.whyc.controller; import com.whyc.dto.Response; import com.whyc.pojo.StationInfo; import com.whyc.service.StationInfoService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; @Api(tags = "台站管理") @RestController @RequestMapping("stationInfo") public class StationInfoController { @Autowired private StationInfoService service; @ApiOperation(value = "添加台站") public Response addStation(@RequestParam(required = false) String stationName1 ,@RequestParam(required = false) String stationName2 ,@RequestParam(required = false) String stationName3){ return service.addStation(stationName1,stationName2,stationName3); } } src/main/java/com/whyc/mapper/StationInfoMapper.java
New file @@ -0,0 +1,6 @@ package com.whyc.mapper; import com.whyc.pojo.StationInfo; public interface StationInfoMapper extends CustomMapper<StationInfo>{ } src/main/java/com/whyc/service/StationInfoService.java
New file @@ -0,0 +1,17 @@ package com.whyc.service; import com.whyc.dto.Response; import com.whyc.mapper.StationInfoMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service public class StationInfoService { @Autowired(required = false) private StationInfoMapper mapper; //添加台站 public Response addStation(String stationName1, String stationName2, String stationName3) { return new Response().set(1,true,""); } } src/main/resources/mapper/StationInfoMapper.xml
New file @@ -0,0 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.whyc.mapper.StationInfoMapper"> </mapper>