停车场系统源码,java停车场系统源码,php停车场系统源码暂时没有

码云地址:https://gitee.com/wangdefu/caraprk_public?_from=gitee_search

源代码已经完全开源,还望大神发现问题多多指点,在下感激不尽,怎么部署和安装环境我已经在后面描述清楚了,这个主要关键还是对接硬件,如果你要改写底层硬件的协议,你用C来对接已经接口,内置到相机中去,这样也可以解决掉不需要场端要架电脑的问题,省掉很多麻烦

源代码开源地址:https://gitee.com/wangdefu/caraprk_public?_from=gitee_search

对接停车场硬件示例代码:

package com.google.gson;

import java.lang.reflect.Type;

import java.sql.Timestamp;

import java.text.DateFormat;

import java.util.ArrayList;

import java.util.Collections;

import java.util.Date;

import java.util.HashMap;

import java.util.List;

import java.util.Map;

import com.google.gson.internal.$Gson$Preconditions;

import com.google.gson.internal.Excluder;

import com.google.gson.internal.bind.TreeTypeAdapter;

import com.google.gson.internal.bind.TypeAdapters;

import com.google.gson.reflect.TypeToken;

import com.google.gson.stream.JsonReader;

import static com.google.gson.Gson.DEFAULT_COMPLEX_MAP_KEYS;

import static com.google.gson.Gson.DEFAULT_ESCAPE_HTML;

import static com.google.gson.Gson.DEFAULT_JSON_NON_EXECUTABLE;

import static com.google.gson.Gson.DEFAULT_LENIENT;

import static com.google.gson.Gson.DEFAULT_PRETTY_PRINT;

import static com.google.gson.Gson.DEFAULT_SERIALIZE_NULLS;

import static com.google.gson.Gson.DEFAULT_SPECIALIZE_FLOAT_VALUES;

/**

* <p>Use this builder to construct a {@link Gson} instance when you need to set configuration

* options other than the default. For {@link Gson} with default configuration, it is simpler to

* use {@code new Gson()}. {@code GsonBuilder} is best used by creating it, and then invoking its

* various configuration methods, and finally calling create.</p>

*

* <p>The following is an example shows how to use the {@code GsonBuilder} to construct a Gson

* instance:

*

* <pre>

* Gson gson = new GsonBuilder()

*    .registerTypeAdapter(Id.class, new IdTypeAdapter())

*    .enableComplexMapKeySerialization()

*    .serializeNulls()

*    .setDateFormat(DateFormat.LONG)

*    .setFieldNamingPolicy(FieldNamingPolicy.UPPER_CAMEL_CASE)

*    .setPrettyPrinting()

*    .setVersion(1.0)

*    .create();

* </pre></p>

*

* <p>NOTES:

* <ul>

* <li> the order of invocation of configuration methods does not matter.</li>

* <li> The default serialization of {@link Date} and its subclasses in Gson does

*  not contain time-zone information. So, if you are using date/time instances,

*  use {@code GsonBuilder} and its {@code setDateFormat} methods.</li>

*  </ul>

* </p>

*

* @author Inderjeet Singh

* @author Joel Leitch

* @author Jesse Wilson

*/

public final class GsonBuilder {

  private Excluder excluder = Excluder.DEFAULT;

  private LongSerializationPolicy longSerializationPolicy = LongSerializationPolicy.DEFAULT;

  private FieldNamingStrategy fieldNamingPolicy = FieldNamingPolicy.IDENTITY;

  private final Map<Type, InstanceCreator<?>> instanceCreators

      = new HashMap<Type, InstanceCreator<?>>();

  private final List<TypeAdapterFactory> factories = new ArrayList<TypeAdapterFactory>();

  /** tree-style hierarchy factories. These come after factories for backwards compatibility. */

  private final List<TypeAdapterFactory> hierarchyFactories = new ArrayList<TypeAdapterFactory>();

  private boolean serializeNulls = DEFAULT_SERIALIZE_NULLS;

  private String datePattern;

  private int dateStyle = DateFormat.DEFAULT;

  private int timeStyle = DateFormat.DEFAULT;

  private boolean complexMapKeySerialization = DEFAULT_COMPLEX_MAP_KEYS;

  private boolean serializeSpecialFloatingPointValues = DEFAULT_SPECIALIZE_FLOAT_VALUES;

  private boolean escapeHtmlChars = DEFAULT_ESCAPE_HTML;

  private boolean prettyPrinting = DEFAULT_PRETTY_PRINT;

  private boolean generateNonExecutableJson = DEFAULT_JSON_NON_EXECUTABLE;

  private boolean lenient = DEFAULT_LENIENT;

  /**

  * Creates a GsonBuilder instance that can be used to build Gson with various configuration

  * settings. GsonBuilder follows the builder pattern, and it is typically used by first

  * invoking various configuration methods to set desired options, and finally calling

  * {@link #create()}.

  */

  public GsonBuilder() {

  }

  /**

  * Configures Gson to enable versioning support.

  *

  * @param ignoreVersionsAfter any field or type marked with a version higher than this value

  * are ignored during serialization or deserialization.

  * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern

  */

  public GsonBuilder setVersion(double ignoreVersionsAfter) {

    excluder = excluder.withVersion(ignoreVersionsAfter);

    return this;

  }

  /**

  * Configures Gson to excludes all class fields that have the specified modifiers. By default,

  * Gson will exclude all fields marked transient or static. This method will override that

  * behavior.

  *

  * @param modifiers the field modifiers. You must use the modifiers specified in the

  * {@link java.lang.reflect.Modifier} class. For example,

  * {@link java.lang.reflect.Modifier#TRANSIENT},

  * {@link java.lang.reflect.Modifier#STATIC}.

  * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern

  */

  public GsonBuilder excludeFieldsWithModifiers(int... modifiers) {

    excluder = excluder.withModifiers(modifiers);

    return this;

  }

  /**

  * Makes the output JSON non-executable in Javascript by prefixing the generated JSON with some

  * special text. This prevents attacks from third-party sites through script sourcing. See

  * <a href="http://code.google.com/p/google-gson/issues/detail?id=42">Gson Issue 42</a>

  * for details.

  *

  * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern

  * @since 1.3

  */

  public GsonBuilder generateNonExecutableJson() {

    this.generateNonExecutableJson = true;

    return this;

  }

  /**

  * Configures Gson to exclude all fields from consideration for serialization or deserialization

  * that do not have the {@link com.google.gson.annotations.Expose} annotation.

  *

  * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern

  */

  public GsonBuilder excludeFieldsWithoutExposeAnnotation() {

    excluder = excluder.excludeFieldsWithoutExposeAnnotation();

    return this;

  }

  /**

  * Configure Gson to serialize null fields. By default, Gson omits all fields that are null

  * during serialization.

  *

  * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern

  * @since 1.2

  */

  public GsonBuilder serializeNulls() {

    this.serializeNulls = true;

    return this;

  }

  /**

  * Enabling this feature will only change the serialized form if the map key is

  * a complex type (i.e. non-primitive) in its <strong>serialized</strong> JSON

  * form. The default implementation of map serialization uses {@code toString()}

  * on the key; however, when this is called then one of the following cases

  * apply:

  *

  * <h3>Maps as JSON objects</h3>

  * For this case, assume that a type adapter is registered to serialize and

  * deserialize some {@code Point} class, which contains an x and y coordinate,

  * to/from the JSON Primitive string value {@code "(x,y)"}. The Java map would

  * then be serialized as a {@link JsonObject}.

  *

  * <p>Below is an example:

  * <pre>  {@code

  *  Gson gson = new GsonBuilder()

  *      .register(Point.class, new MyPointTypeAdapter())

  *      .enableComplexMapKeySerialization()

  *      .create();

  *

  *  Map<Point, String> original = new LinkedHashMap<Point, String>();

  *  original.put(new Point(5, 6), "a");

  *  original.put(new Point(8, 8), "b");

  *  System.out.println(gson.toJson(original, type));

  * }</pre>

  * The above code prints this JSON object:<pre>  {@code

  *  {

  *    "(5,6)": "a",

  *    "(8,8)": "b"

  *  }

  * }</pre>

  *

  * <h3>Maps as JSON arrays</h3>

  * For this case, assume that a type adapter was NOT registered for some

  * {@code Point} class, but rather the default Gson serialization is applied.

  * In this case, some {@code new Point(2,3)} would serialize as {@code

  * {"x":2,"y":5}}.

  *

  * <p>Given the assumption above, a {@code Map<Point, String>} will be

  * serialize as an array of arrays (can be viewed as an entry set of pairs).

  *

  * <p>Below is an example of serializing complex types as JSON arrays:

  * <pre> {@code

  *  Gson gson = new GsonBuilder()

  *      .enableComplexMapKeySerialization()

  *      .create();

  *

  *  Map<Point, String> original = new LinkedHashMap<Point, String>();

  *  original.put(new Point(5, 6), "a");

  *  original.put(new Point(8, 8), "b");

  *  System.out.println(gson.toJson(original, type));

  * }

  *

  * The JSON output would look as follows:

  * <pre>  {@code

  *  [

  *    [

  *      {

  *        "x": 5,

  *        "y": 6

  *      },

  *      "a"

  *    ],

  *    [

  *      {

  *        "x": 8,

  *        "y": 8

  *      },

  *      "b"

  *    ]

  *  ]

  * }</pre>

  *

  * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern

  * @since 1.7

  */

  public GsonBuilder enableComplexMapKeySerialization() {

    complexMapKeySerialization = true;

    return this;

  }

  /**

  * Configures Gson to exclude inner classes during serialization.

  *

  * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern

  * @since 1.3

  */

  public GsonBuilder disableInnerClassSerialization() {

    excluder = excluder.disableInnerClassSerialization();

    return this;

  }

  /**

  * Configures Gson to apply a specific serialization policy for {@code Long} and {@code long}

  * objects.

  *

  * @param serializationPolicy the particular policy to use for serializing longs.

  * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern

  * @since 1.3

  */

  public GsonBuilder setLongSerializationPolicy(LongSerializationPolicy serializationPolicy) {

    this.longSerializationPolicy = serializationPolicy;

    return this;

  }

  /**

  * Configures Gson to apply a specific naming policy to an object's field during serialization

  * and deserialization.

  *

  * @param namingConvention the JSON field naming convention to use for serialization and

  * deserialization.

  * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern

  */

  public GsonBuilder setFieldNamingPolicy(FieldNamingPolicy namingConvention) {

    this.fieldNamingPolicy = namingConvention;

    return this;

  }

  /**

  * Configures Gson to apply a specific naming policy strategy to an object's field during

  * serialization and deserialization.

  *

  * @param fieldNamingStrategy the actual naming strategy to apply to the fields

  * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern

  * @since 1.3

  */

  public GsonBuilder setFieldNamingStrategy(FieldNamingStrategy fieldNamingStrategy) {

    this.fieldNamingPolicy = fieldNamingStrategy;

    return this;

  }

  /**

  * Configures Gson to apply a set of exclusion strategies during both serialization and

  * deserialization. Each of the {@code strategies} will be applied as a disjunction rule.

  * This means that if one of the {@code strategies} suggests that a field (or class) should be

  * skipped then that field (or object) is skipped during serialization/deserialization.

  *

  * @param strategies the set of strategy object to apply during object (de)serialization.

  * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern

  * @since 1.4

  */

  public GsonBuilder setExclusionStrategies(ExclusionStrategy... strategies) {

    for (ExclusionStrategy strategy : strategies) {

      excluder = excluder.withExclusionStrategy(strategy, true, true);

    }

    return this;

  }

  /**

  * Configures Gson to apply the passed in exclusion strategy during serialization.

  * If this method is invoked numerous times with different exclusion strategy objects

  * then the exclusion strategies that were added will be applied as a disjunction rule.

  * This means that if one of the added exclusion strategies suggests that a field (or

  * class) should be skipped then that field (or object) is skipped during its

  * serialization.

  *

  * @param strategy an exclusion strategy to apply during serialization.

  * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern

  * @since 1.7

  */

  public GsonBuilder addSerializationExclusionStrategy(ExclusionStrategy strategy) {

    excluder = excluder.withExclusionStrategy(strategy, true, false);

    return this;

  }

  /**

  * Configures Gson to apply the passed in exclusion strategy during deserialization.

  * If this method is invoked numerous times with different exclusion strategy objects

  * then the exclusion strategies that were added will be applied as a disjunction rule.

  * This means that if one of the added exclusion strategies suggests that a field (or

  * class) should be skipped then that field (or object) is skipped during its

  * deserialization.

  *

  * @param strategy an exclusion strategy to apply during deserialization.

  * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern

  * @since 1.7

  */

  public GsonBuilder addDeserializationExclusionStrategy(ExclusionStrategy strategy) {

    excluder = excluder.withExclusionStrategy(strategy, false, true);

    return this;

  }

  /**

  * Configures Gson to output Json that fits in a page for pretty printing. This option only

  * affects Json serialization.

  *

  * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern

  */

  public GsonBuilder setPrettyPrinting() {

    prettyPrinting = true;

    return this;

  }

  /**

  * By default, Gson is strict and only accepts JSON as specified by

  * <a href="http://www.ietf.org/rfc/rfc4627.txt">RFC 4627</a>. This option makes the parser

  * liberal in what it accepts.

  *

  * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern

  * @see JsonReader#setLenient(boolean)

  */

  public GsonBuilder setLenient() {

    lenient = true;

    return this;

  }

  /**

  * By default, Gson escapes HTML characters such as &lt; &gt; etc. Use this option to configure

  * Gson to pass-through HTML characters as is.

  *

  * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern

  * @since 1.3

  */

  public GsonBuilder disableHtmlEscaping() {

    this.escapeHtmlChars = false;

    return this;

  }

  /**

  * Configures Gson to serialize {@code Date} objects according to the pattern provided. You can

  * call this method or {@link #setDateFormat(int)} multiple times, but only the last invocation

  * will be used to decide the serialization format.

  *

  * <p>The date format will be used to serialize and deserialize {@link java.util.Date}, {@link

  * java.sql.Timestamp} and {@link java.sql.Date}.

  *

  * <p>Note that this pattern must abide by the convention provided by {@code SimpleDateFormat}

  * class. See the documentation in {@link java.text.SimpleDateFormat} for more information on

  * valid date and time patterns.</p>

  *

  * @param pattern the pattern that dates will be serialized/deserialized to/from

  * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern

  * @since 1.2

  */

  public GsonBuilder setDateFormat(String pattern) {

    // TODO(Joel): Make this fail fast if it is an invalid date format

    this.datePattern = pattern;

    return this;

  }

  /**

  * Configures Gson to to serialize {@code Date} objects according to the style value provided.

  * You can call this method or {@link #setDateFormat(String)} multiple times, but only the last

  * invocation will be used to decide the serialization format.

  *

  * <p>Note that this style value should be one of the predefined constants in the

  * {@code DateFormat} class. See the documentation in {@link java.text.DateFormat} for more

  * information on the valid style constants.</p>

  *

  * @param style the predefined date style that date objects will be serialized/deserialized

  * to/from

  * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern

  * @since 1.2

  */

  public GsonBuilder setDateFormat(int style) {

    this.dateStyle = style;

    this.datePattern = null;

    return this;

  }

  /**

  * Configures Gson to to serialize {@code Date} objects according to the style value provided.

  * You can call this method or {@link #setDateFormat(String)} multiple times, but only the last

  * invocation will be used to decide the serialization format.

  *

  * <p>Note that this style value should be one of the predefined constants in the

  * {@code DateFormat} class. See the documentation in {@link java.text.DateFormat} for more

  * information on the valid style constants.</p>

  *

  * @param dateStyle the predefined date style that date objects will be serialized/deserialized

  * to/from

  * @param timeStyle the predefined style for the time portion of the date objects

  * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern

  * @since 1.2

  */

  public GsonBuilder setDateFormat(int dateStyle, int timeStyle) {

    this.dateStyle = dateStyle;

    this.timeStyle = timeStyle;

    this.datePattern = null;

    return this;

  }

  /**

  * Configures Gson for custom serialization or deserialization. This method combines the

  * registration of an {@link TypeAdapter}, {@link InstanceCreator}, {@link JsonSerializer}, and a

  * {@link JsonDeserializer}. It is best used when a single object {@code typeAdapter} implements

  * all the required interfaces for custom serialization with Gson. If a type adapter was

  * previously registered for the specified {@code type}, it is overwritten.

  *

  * <p>This registers the type specified and no other types: you must manually register related

  * types! For example, applications registering {@code boolean.class} should also register {@code

  * Boolean.class}.

  *

  * @param type the type definition for the type adapter being registered

  * @param typeAdapter This object must implement at least one of the {@link TypeAdapter},

  * {@link InstanceCreator}, {@link JsonSerializer}, and a {@link JsonDeserializer} interfaces.

  * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern

  */

  @SuppressWarnings({"unchecked", "rawtypes"})

  public GsonBuilder registerTypeAdapter(Type type, Object typeAdapter) {

    $Gson$Preconditions.checkArgument(typeAdapter instanceof JsonSerializer<?>

        || typeAdapter instanceof JsonDeserializer<?>

        || typeAdapter instanceof InstanceCreator<?>

        || typeAdapter instanceof TypeAdapter<?>);

    if (typeAdapter instanceof InstanceCreator<?>) {

      instanceCreators.put(type, (InstanceCreator) typeAdapter);

    }

    if (typeAdapter instanceof JsonSerializer<?> || typeAdapter instanceof JsonDeserializer<?>) {

      TypeToken<?> typeToken = TypeToken.get(type);

      factories.add(TreeTypeAdapter.newFactoryWithMatchRawType(typeToken, typeAdapter));

    }

    if (typeAdapter instanceof TypeAdapter<?>) {

      factories.add(TypeAdapters.newFactory(TypeToken.get(type), (TypeAdapter)typeAdapter));

    }

    return this;

  }

  /**

  * Register a factory for type adapters. Registering a factory is useful when the type

  * adapter needs to be configured based on the type of the field being processed. Gson

  * is designed to handle a large number of factories, so you should consider registering

  * them to be at par with registering an individual type adapter.

  *

  * @since 2.1

  */

  public GsonBuilder registerTypeAdapterFactory(TypeAdapterFactory factory) {

    factories.add(factory);

    return this;

  }

  /**

  * Configures Gson for custom serialization or deserialization for an inheritance type hierarchy.

  * This method combines the registration of a {@link TypeAdapter}, {@link JsonSerializer} and

  * a {@link JsonDeserializer}. If a type adapter was previously registered for the specified

  * type hierarchy, it is overridden. If a type adapter is registered for a specific type in

  * the type hierarchy, it will be invoked instead of the one registered for the type hierarchy.

  *

  * @param baseType the class definition for the type adapter being registered for the base class

  *        or interface

  * @param typeAdapter This object must implement at least one of {@link TypeAdapter},

  *        {@link JsonSerializer} or {@link JsonDeserializer} interfaces.

  * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern

  * @since 1.7

  */

  @SuppressWarnings({"unchecked", "rawtypes"})

  public GsonBuilder registerTypeHierarchyAdapter(Class<?> baseType, Object typeAdapter) {

    $Gson$Preconditions.checkArgument(typeAdapter instanceof JsonSerializer<?>

        || typeAdapter instanceof JsonDeserializer<?>

        || typeAdapter instanceof TypeAdapter<?>);

    if (typeAdapter instanceof JsonDeserializer || typeAdapter instanceof JsonSerializer) {

      hierarchyFactories.add(TreeTypeAdapter.newTypeHierarchyFactory(baseType, typeAdapter));

    }

    if (typeAdapter instanceof TypeAdapter<?>) {

      factories.add(TypeAdapters.newTypeHierarchyFactory(baseType, (TypeAdapter)typeAdapter));

    }

    return this;

  }

  /**

  * Section 2.4 of <a href="http://www.ietf.org/rfc/rfc4627.txt">JSON specification</a> disallows

  * special double values (NaN, Infinity, -Infinity). However,

  * <a href="http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf">Javascript

  * specification</a> (see section 4.3.20, 4.3.22, 4.3.23) allows these values as valid Javascript

  * values. Moreover, most JavaScript engines will accept these special values in JSON without

  * problem. So, at a practical level, it makes sense to accept these values as valid JSON even

  * though JSON specification disallows them.

  *

  * <p>Gson always accepts these special values during deserialization. However, it outputs

  * strictly compliant JSON. Hence, if it encounters a float value {@link Float#NaN},

  * {@link Float#POSITIVE_INFINITY}, {@link Float#NEGATIVE_INFINITY}, or a double value

  * {@link Double#NaN}, {@link Double#POSITIVE_INFINITY}, {@link Double#NEGATIVE_INFINITY}, it

  * will throw an {@link IllegalArgumentException}. This method provides a way to override the

  * default behavior when you know that the JSON receiver will be able to handle these special

  * values.

  *

  * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern

  * @since 1.3

  */

  public GsonBuilder serializeSpecialFloatingPointValues() {

    this.serializeSpecialFloatingPointValues = true;

    return this;

  }

  /**

  * Creates a {@link Gson} instance based on the current configuration. This method is free of

  * side-effects to this {@code GsonBuilder} instance and hence can be called multiple times.

  *

  * @return an instance of Gson configured with the options currently set in this builder

  */

  public Gson create() {

    List<TypeAdapterFactory> factories = new ArrayList<TypeAdapterFactory>(this.factories.size() + this.hierarchyFactories.size() + 3);

    factories.addAll(this.factories);

    Collections.reverse(factories);

    Collections.reverse(this.hierarchyFactories);

    factories.addAll(this.hierarchyFactories);

    addTypeAdaptersForDate(datePattern, dateStyle, timeStyle, factories);

    return new Gson(excluder, fieldNamingPolicy, instanceCreators,

        serializeNulls, complexMapKeySerialization,

        generateNonExecutableJson, escapeHtmlChars, prettyPrinting, lenient,

        serializeSpecialFloatingPointValues, longSerializationPolicy, factories);

  }

  private void addTypeAdaptersForDate(String datePattern, int dateStyle, int timeStyle,

      List<TypeAdapterFactory> factories) {

    DefaultDateTypeAdapter dateTypeAdapter;

    if (datePattern != null && !"".equals(datePattern.trim())) {

      dateTypeAdapter = new DefaultDateTypeAdapter(datePattern);

    } else if (dateStyle != DateFormat.DEFAULT && timeStyle != DateFormat.DEFAULT) {

      dateTypeAdapter = new DefaultDateTypeAdapter(dateStyle, timeStyle);

    } else {

      return;

    }

    factories.add(TreeTypeAdapter.newFactory(TypeToken.get(Date.class), dateTypeAdapter));

    factories.add(TreeTypeAdapter.newFactory(TypeToken.get(Timestamp.class), dateTypeAdapter));

    factories.add(TreeTypeAdapter.newFactory(TypeToken.get(java.sql.Date.class), dateTypeAdapter));

  }

}

功能介绍】:

①兼容市面上主流的多家相机,理论上兼容所有硬件,可灵活扩展,②相机识别后数据自动上传到云端并记录,校验相机唯一id和硬件序列号,防止非法数据录入,③用户手机查询停车记录详情可自主缴费(支持微信,支付宝,银行接口支付,支持每个停车场指定不同的商户进行收款),支付后出场在免费时间内会自动抬杆。④支持app上查询附近停车场(导航,可用车位数,停车场费用,优惠券,评分,评论等),可预约车位。⑤断电断网支持岗亭人员使用app可接管硬件进行停车记录的录入。

【技术架构】:

后端开发语言java,框架oauth2+springboot2+doubble2.7.3,数据库mysql/mongodb/redis,即时通讯底层框架netty4,安卓和ios均为原生开发,后台管理模板vue-typescript-admin-template,文件服务fastDFS,短信目前仅集成阿里云短信服务。为千万级数据而生,千万级用户无忧,目前真实用户40w无压力,大数据时代物联网必备

【开源情况】:

代码完全开源,不存在授权问题,完全自主原创,不存在任何后门,不使用任何第三方私有jar包,性能和安全完全自主可控,想怎么耍就这么耍,就是这么任性,后续更新的话本人会持续更新部署教程。代码专业规范,新手看得懂,高手喜欢用。本系统完全免费

【部署环境】:

目前仅测试linux环境一切正常,win环境没部署过,演示地址在本文章末尾

【关于作者】:

屌丝码农一枚,4年前曾就职于开发停车场系统的公司,发现目前国内该领域垄断,技术过于陈旧,没有一个规范,故个人用来接近1年的时间在业余时间开发出这种系统,现代化标准的互联网应用,定位大型物联网大数据云平台系统,存在不足之处还望多多提宝贵意见,让我们打破市场垄断,让物联网应用更好的服务生活社会

软件架构

一、技术构成简述 (一)编程语言与架构简述 1.开发语言 (1)服务端 服务端语言目前均采用java语言开发,jdk版本要求1.8+。开发框架为springboot2+dubbo,鉴权采用oauth2,DB操作框架Mybaits,即时通讯底层框架与协议netty4

(2)客户端 目前我们主要客户端分为三个场景,分别为安卓,ios,微信公众号。安卓与ios均为原生开发,H5页面web端框架为vue

(3)后台管理 后台管理前端框架采用的是主流的vue element admin(TypeScript版本),分层清晰,官方文档完整,社区活跃

2.数据存储 (1)重要数据存储 重要数据均采用mysql进行存储,支持部署主从,大部分数据尽可能进行事务处理,确保数据容灾性

(2)一般数据存储 非重要性数据例如聊天内容,系统消息通知,广告等数据均存储于mongodb数据库中

(3)缓存数据存储 微小量缓存会存在mysql中,例如评论的前N条评论快照会超小量进行字段适当冗余,在提高存储性价比情况下大大提高数据的查询能力。其它大部分数据缓存均存储于redis数据中

3.性能与安全 (1)性能解决方案 架构与技术解决方案均为本团队一线5年开发经验总结,目前我们正在接触的项目真实用户40w+,毫无压力,我们系统采用的架构与技术均在仔细多方面综合考虑后多次调整,采用更加合理,性能更佳的模式与解决方案

(2)安全解决方案 所有请求均需携带jwt串token进行访问,每个接口服务和管理服务均需配置公钥文件且具有jwt串token合法性校验能力,用户权限服务携带私钥文件负责密钥生成

4.架构与生命力 (1)采用架构 本系统采用阿里巴巴微服务框架dubbo来进行实现微服务提供能力,追求高性能,高可用,超细粒度独立微服务,相同服务可以动态灵活增加与减少,支持不停机发布新版本服务。每个服务之间均为独立存在,互不影响。例如短信发送,支付,订单,停车场系统接口,停车场后台管理,停车场提供者服务等均为独立的服务。

(2)架构潜力 整个系统众多服务分工明确,细粒度微服务,实现真正的插拔服务,功能的删减或停用,新增等均可在不破坏和入侵原来系统的前提下满足新的开发需求

5.二次开发说明 (1)适用客户对象 ①本身有互联网it编程技术和经验或者拥有技术团队的。 ②不具备第一个条件但是费用预算比较充足,二次开发需求少或者愿意支付高额定制费的 (2)团队要求 服务器运维,安卓与ios开发者,web前端开发者,java实际开发经验2年+开发者

(3)技术要求 过硬的java编程能力,网络编程能力,数据库设计与优化能力,架构设计能力,微服务思维能力,成熟的前端技术开发能力,中大型系统部署与运营能力

(4)硬件要求 Linux操作系统,4核8G(最低)5M带宽,可多台服务器中的微服务指向统一微服务调度中心(本系统微服务调度中心管理平台zookeeper)

(二)软件与硬件数据交互简述 1.硬件端 (1)目前解决方案 封装工具类,兼容市场主流硬件设备,只负责各类硬件数据封装为统一数据结构。硬件发包目前多为http主动推送数据,被动接受服务端返回指令

(2)未来解决方案 改造主流厂商硬件底层服务系统,新增硬件规范的合法身份数据,采用长连接进行数据交互,保证数据与指令的实时性与可靠性得到更好的保障

2.服务端 (1)被动处理硬件数据 中间件处理各类前端数据,接收硬件推送数据,解析,计算,做出相应反馈

(2)主动通知硬件发生事件行为 长连接推送指令,例如开闸,实时动态配置硬件数据等,

二、常规功能简述 (一)基础功能 1.硬件管理 支持单个硬件管理与记录,硬件在线状态,维修与进度记录等。与指定停车场出入口进行绑定,均有记录GPS位置

2.停车场管理 不同时段费用配置,每日封顶因素综合参与动态计费,也支持静态+每日上限计费。支持查询附近停车场功能

3.停车记录管理 详细记录产生时间,地点,进出口位置,进出时间,异常数据实时推送与快速处理

4.支付机构管理 每个停车场的支付账号均可以独立配置,支持同一个停车场使用多家支付机构进行支付,例如支付宝,微信,银联等。

5.支付与优惠活动管理 支付宝与微信,银联都均支持免密支付(无感支付)。本系统自带优惠券功能,支持支持多种套餐自定义与用户进行快捷手机上下单随时购买

(二)特色功能 1.异常数据实时推送,汇报,及时处理,提前预知与通知 2.即时通讯功能(IM聊天沟通) 性能,架构,优化等均参考微信聊天功能机制进行开发

3.行业好友与圈子 让该应用不止只能停车,还能交到志同道合的行业知音,让应用更有温度

4.商城与营销功能 此功能主要考虑到使用者有运营周边的兴趣和能力,在商城和广告营销上进行盈利

安装教程

安装JDK1.8+

安装MySQL5.6+ 安装MongoDB 安装Redis 安装FastDFS 安装Zookeeper

将打包好的代码上传到服务器上,直接运行jar包即可

使用说明(swagger2文档)

【用户基础数据相关】:http://139.9.155.149:8080/swagger-ui.html 【停车场相关】:http://139.9.155.149:8089/swagger-ui.html 【短信】:http://139.9.155.149:8085/swagger-ui.html 【文件上传】:http://139.9.155.149:8088/swagger-ui.html 【支付相关】:http://139.9.155.149:8096/swagger-ui.html

参与贡献

Fork 本仓库

新建 Feat_xxx 分支

提交代码

新建 Pull Request

演示地址

http://139.9.155.149 admin 123456

如果您发现有代码有什么不足之处请跟我留言

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 204,189评论 6 478
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 85,577评论 2 381
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 150,857评论 0 337
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,703评论 1 276
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,705评论 5 366
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,620评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,995评论 3 396
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,656评论 0 258
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,898评论 1 298
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,639评论 2 321
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,720评论 1 330
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,395评论 4 319
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,982评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,953评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,195评论 1 260
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 44,907评论 2 349
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,472评论 2 342