1.控制层
@ApiOperation("街道信息")
@GetMapping("/street")
public Object street() {
List<MapStreetEntity> list = disabledStreetService.list();
return R.ok().put("data", list);
}
2.service
@Mapper
public interface DisabledStreetService extends IService<MapStreetEntity> {
}
@Service
public class DisabledStreetServiceImpl extends ServiceImpl<DisabledStreetMapper, MapStreetEntity> implements DisabledStreetService {
}
3.mapper
public interface DisabledStreetMapper extends BaseMapper<MapStreetEntity> {
}
4.Bean
@Data
@TableName(value = "table_map_street")
public class MapStreetEntity {
@ApiModelProperty(value = "主键")
private Integer id;
@ApiModelProperty(value = "街道名称")
private String street;
@ApiModelProperty(value = "街道编号")
private Integer streetId;
}