Commit 96f63811 authored by 李腾威's avatar 李腾威

任务 3713

parent 81f2192f
package com.yeejoin.amos.boot.module.jcs.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 机场机位旋转角度
*
* @author litw
* @date 2021-09-17
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="AirportStandDto", description="机场机位旋转角度")
public class AirportStandDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "机位号")
private String standCode;
@ApiModelProperty(value = "坐标X")
private String coordinateX;
@ApiModelProperty(value = "坐标Y")
private String coordinateY;
@ApiModelProperty(value = "经度")
private String longitude;
@ApiModelProperty(value = "纬度")
private String latitude;
@ApiModelProperty(value = "更新时间")
private Date updateTime;
}
package com.yeejoin.amos.boot.module.jcs.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
/**
* 机场机位旋转角度
*
* @author litw
* @date 2021-09-17
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("jc_airport_stand")
public class AirportStand extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 机位号
*/
@TableField("stand_code")
private String standCode;
/**
* 坐标X
*/
@TableField("coordinate_x")
private String coordinateX;
/**
* 坐标Y
*/
@TableField("coordinate_y")
private String coordinateY;
/**
* 经度
*/
@TableField("longitude")
private String longitude;
/**
* 纬度
*/
@TableField("latitude")
private String latitude;
/**
* 更新时间
*/
@TableField("update_time")
private Date updateTime;
}
package com.yeejoin.amos.boot.module.jcs.api.mapper;
import com.yeejoin.amos.boot.module.jcs.api.entity.AirportStand;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 机场机位旋转角度 Mapper 接口
*
* @author litw
* @date 2021-09-17
*/
public interface AirportStandMapper extends BaseMapper<AirportStand> {
}
package com.yeejoin.amos.boot.module.jcs.api.service;
/**
* 机场机位旋转角度接口类
*
* @author litw
* @date 2021-09-17
*/
public interface IAirportStandService {
}
<?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.yeejoin.amos.boot.module.jcs.api.mapper.AirportStandMapper">
</mapper>
package com.yeejoin.amos.boot.module.jcs.biz.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.jcs.api.entity.AirportStand;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AirportStandServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jcs.api.dto.AirportStandDto;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
/**
* 机场机位旋转角度
*
* @author litw
* @date 2021-09-17
*/
@RestController
@Api(tags = "机场机位旋转角度Api")
@RequestMapping(value = "/airport-stand")
public class AirportStandController extends BaseController {
@Autowired
AirportStandServiceImpl airportStandServiceImpl;
/**
* 根据sequenceNbr查询
*
* @param standCode 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{standCode}")
@ApiOperation(httpMethod = "GET",value = "根据standCode查询单个机场机位旋转角度", notes = "根据standCode查询单个机场机位旋转角度")
public ResponseModel<AirportStandDto> selectOne(@PathVariable String standCode) {
QueryWrapper<AirportStand> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("stand_code",standCode);
AirportStand airportStand = airportStandServiceImpl.getOne(queryWrapper);
AirportStandDto airportStandDto = new AirportStandDto();
BeanUtils.copyProperties(airportStand,airportStandDto);
return ResponseHelper.buildResponse(airportStandDto);
}
}
package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import com.yeejoin.amos.boot.module.jcs.api.entity.AirportStand;
import com.yeejoin.amos.boot.module.jcs.api.mapper.AirportStandMapper;
import com.yeejoin.amos.boot.module.jcs.api.service.IAirportStandService;
import com.yeejoin.amos.boot.module.jcs.api.dto.AirportStandDto;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
/**
* 机场机位旋转角度服务实现类
*
* @author litw
* @date 2021-09-17
*/
@Service
public class AirportStandServiceImpl extends BaseService<AirportStandDto,AirportStand,AirportStandMapper> implements IAirportStandService {
/**
* 分页查询
*/
public Page<AirportStandDto> queryForAirportStandPage(Page<AirportStandDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<AirportStandDto> queryForAirportStandList() {
return this.queryForList("" , false);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment