8 changed files with 195 additions and 0 deletions
@ -0,0 +1,31 @@ |
|||||
|
package com.unicom.observatory.controller; |
||||
|
|
||||
|
import com.unicom.observatory.entity.Observatory; |
||||
|
import com.unicom.observatory.service.ObservatoryService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author 王晨阳 |
||||
|
* @tittle ObservatoryController |
||||
|
* @CREATE 2025/1/2 13:28 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("/observatory") |
||||
|
@Slf4j |
||||
|
public class ObservatoryController { |
||||
|
|
||||
|
@Resource |
||||
|
private ObservatoryService observatoryService; |
||||
|
|
||||
|
@GetMapping("/list") |
||||
|
public List<Observatory> list() { |
||||
|
return observatoryService.list(); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
package com.unicom.observatory.controller; |
||||
|
|
||||
|
import com.unicom.observatory.entity.TransportationInTheThreeProvinces; |
||||
|
import com.unicom.observatory.service.TransportationInTheThreeProvincesService; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author 王晨阳 |
||||
|
* @tittle TransportationInTheThreeProvincesController |
||||
|
* @CREATE 2025/1/2 15:41 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("/transportationInTheThreeProvinces") |
||||
|
public class TransportationInTheThreeProvincesController { |
||||
|
|
||||
|
@Resource |
||||
|
private TransportationInTheThreeProvincesService transportationInTheThreeProvincesService; |
||||
|
|
||||
|
/** |
||||
|
* 查询全部数据 |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("/list") |
||||
|
public List<TransportationInTheThreeProvinces> list() { |
||||
|
return transportationInTheThreeProvincesService.list(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
package com.unicom.observatory.dao; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.unicom.observatory.entity.Observatory; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author 王晨阳 |
||||
|
* @tittle ObservatoryMapper |
||||
|
* @CREATE 2025/1/2 11:14 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface ObservatoryMapper extends BaseMapper<Observatory> { |
||||
|
|
||||
|
/** |
||||
|
* 查询瞭望台内全部数据 |
||||
|
* @return |
||||
|
*/ |
||||
|
List<Observatory> selectAll(); |
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
package com.unicom.observatory.dao; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.unicom.observatory.entity.TransportationInTheThreeProvinces; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* @author 王晨阳 |
||||
|
* @tittle TransportationInTheThreeProvincesMapper |
||||
|
* @CREATE 2025/1/2 15:38 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface TransportationInTheThreeProvincesMapper extends BaseMapper<TransportationInTheThreeProvinces> { |
||||
|
|
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
package com.unicom.observatory.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author 王晨阳 |
||||
|
* @tittle 瞭望台数据 |
||||
|
* @CREATE 2025/1/2 11:09 |
||||
|
*/ |
||||
|
@Data |
||||
|
@TableName("observatory") |
||||
|
public class Observatory { |
||||
|
|
||||
|
private String id; |
||||
|
|
||||
|
private String indexName; |
||||
|
|
||||
|
private String indexCnName; |
||||
|
|
||||
|
private String value; |
||||
|
|
||||
|
private String area; |
||||
|
|
||||
|
private String areaName; |
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
package com.unicom.observatory.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author 王晨阳 |
||||
|
* @tittle transportationInTheThreeProvinces |
||||
|
* @CREATE 2025/1/2 15:35 |
||||
|
*/ |
||||
|
@Data |
||||
|
@TableName("transportation_in_the_three_provinces") |
||||
|
public class TransportationInTheThreeProvinces { |
||||
|
|
||||
|
private String id; |
||||
|
|
||||
|
private String indexName; |
||||
|
|
||||
|
private String indexCnName; |
||||
|
|
||||
|
private String value; |
||||
|
|
||||
|
private String province; |
||||
|
|
||||
|
private String provinceName; |
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
package com.unicom.observatory.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.unicom.observatory.dao.ObservatoryMapper; |
||||
|
import com.unicom.observatory.entity.Observatory; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
|
||||
|
/** |
||||
|
* @author 王晨阳 |
||||
|
* @tittle ObservatoryService |
||||
|
* @CREATE 2025/1/2 11:24 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class ObservatoryService extends ServiceImpl<ObservatoryMapper, Observatory> { |
||||
|
|
||||
|
@Resource |
||||
|
private ObservatoryMapper observatoryMapper; |
||||
|
|
||||
|
/** |
||||
|
* 查询全部数据 |
||||
|
* @return |
||||
|
*/ |
||||
|
// public List<Observatory> selectAll(){
|
||||
|
// return observatoryMapper.selectAll();
|
||||
|
// }
|
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
package com.unicom.observatory.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.unicom.observatory.dao.TransportationInTheThreeProvincesMapper; |
||||
|
import com.unicom.observatory.entity.TransportationInTheThreeProvinces; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* @author 王晨阳 |
||||
|
* @tittle TransportationInTheThreeProvincesService |
||||
|
* @CREATE 2025/1/2 15:40 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class TransportationInTheThreeProvincesService extends ServiceImpl<TransportationInTheThreeProvincesMapper, TransportationInTheThreeProvinces> { |
||||
|
} |
Loading…
Reference in new issue