‘linchangsheng’ 6 months ago
commit
20627a5077
100 changed files with 4726 additions and 0 deletions
  1. 40 0
      .gitignore
  2. 0 0
      README.md
  3. 38 0
      mall-miniapp-service/.gitignore
  4. 3 0
      mall-miniapp-service/README.md
  5. 310 0
      mall-miniapp-service/mvnw
  6. 182 0
      mall-miniapp-service/mvnw.cmd
  7. 427 0
      mall-miniapp-service/pom.xml
  8. 34 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/MiniappApplication.java
  9. 73 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/SwaggerConfig.java
  10. 11 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/annotation/ApiNotAuth.java
  11. 12 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/annotation/DataPermission.java
  12. 28 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/ExcelData.java
  13. 21 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/Page.java
  14. 26 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/PayDetail.java
  15. 14 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/SVerification.java
  16. 26 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/activity/PromotionActivityBean.java
  17. 21 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/chargingstandard/ChargingStandardBean.java
  18. 37 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/common/RegionBean.java
  19. 14 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/common/SysDictConstant.java
  20. 13 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/common/WechatOpenBean.java
  21. 19 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/common/WxJsApiSignBean.java
  22. 19 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/coupon/BuyGoodsInfo.java
  23. 22 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/coupon/CouponBean.java
  24. 26 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/coupon/CouponDataBean.java
  25. 13 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/coupon/CouponObtainBean.java
  26. 22 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/coupon/CouponQrcodeBean.java
  27. 20 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/coupon/CustomCoupouBean.java
  28. 17 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/coupon/UserCouponBean.java
  29. 18 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/coupon/UserCouponCountBean.java
  30. 22 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/engin/RpProjectRepairBean.java
  31. 110 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/es/ESGoodsBean.java
  32. 20 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/es/ESGoodsOtherCountBean.java
  33. 17 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/es/EsGoodsMessageBean.java
  34. 30 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/es/EsOrderBuyBean.java
  35. 21 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/es/EsOrderInfoBean.java
  36. 17 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/es/EsOrderRefundBean.java
  37. 21 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/es/GuessBean.java
  38. 32 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/AckGoodsBean.java
  39. 34 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/CategoryBean.java
  40. 18 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/CommentTagCount.java
  41. 22 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/CutGoodsBean.java
  42. 90 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/GoodsBean.java
  43. 19 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/GoodsCategoryBean.java
  44. 24 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/GoodsComment.java
  45. 19 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/GoodsCommentCount.java
  46. 18 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/GoodsFavoriteBean.java
  47. 22 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/GoodsNewBean.java
  48. 24 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/GoodsPackageBean.java
  49. 45 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/GoodsSortBean.java
  50. 44 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/GoodsSpecBean.java
  51. 46 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/GoodsSpecSecBean.java
  52. 30 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/PromotionGoodsBean.java
  53. 18 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/PromotionShareQrCode.java
  54. 44 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/gree/WorkOrderBean.java
  55. 14 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/inf/ValidGroup.java
  56. 57 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/MyDataCountBean.java
  57. 67 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/NormRecordVO.java
  58. 19 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/PartsApplyBean.java
  59. 124 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/PartsRefundVO.java
  60. 23 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/SalesOrderBean.java
  61. 18 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/WebsitBuyGood.java
  62. 17 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/WebsitSalesCategoryVO.java
  63. 55 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/WebsitSalesGoodsVO.java
  64. 26 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/WebsitSalesPayMapBean.java
  65. 33 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/WebsitShoppingCartBean.java
  66. 107 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/WebsitShoppingCartList.java
  67. 144 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/NewRefundManageBean.java
  68. 65 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/NewRefundManageItemBean.java
  69. 16 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/NewRefundManageRecordBean.java
  70. 190 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/OldRefundManageBean.java
  71. 108 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/OldRefundManageItemBean.java
  72. 23 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/OldRefundManageRecordBean.java
  73. 66 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/PartsChangeSalesBean.java
  74. 124 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/PartsRefundRecordDTO.java
  75. 41 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/PartsSalesOrderBean.java
  76. 18 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/PartsSalesOrderItemBean.java
  77. 22 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/PartsWorkerStockBean.java
  78. 67 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/SalesCustomerPartsBean.java
  79. 61 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/SalesCustomerPartsItemBean.java
  80. 48 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/SalesItemRecordDTO.java
  81. 16 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/WebsitExtends.java
  82. 79 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/WebsitPartsStockBean.java
  83. 38 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/WorkerStockCensusBean.java
  84. 24 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/settlement/SettlementAmountBean.java
  85. 161 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/stock/WebsitStockDTO.java
  86. 31 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/stock/WorkerNormStockBean.java
  87. 13 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/stock/WorkerStockAccBean.java
  88. 19 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/stock/WorkerStockBean.java
  89. 195 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/stock/WorkerStockDTO.java
  90. 13 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/stock/WorkerStockDetailBean.java
  91. 21 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/notice/NoticeParam.java
  92. 12 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/notice/NoticeParamBean.java
  93. 22 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/notice/NoticeRecordVO.java
  94. 63 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/order/BuyGood.java
  95. 18 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/order/GoodsCategoryItemBean.java
  96. 28 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/order/LeaseOrderBean.java
  97. 32 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/order/LeaseOrderVO.java
  98. 18 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/order/MaterialOrderBuy.java
  99. 16 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/order/OldProductManagerAdd.java
  100. 41 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/order/OrderAckBean.java

+ 40 - 0
.gitignore

@@ -0,0 +1,40 @@
+HELP.md
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+.mvn
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+/src/main/java/com/gree/mall/miniapp/plus/
+.DS_Store
+logs/
+/src/test/
+*.log
+mall-common/

+ 0 - 0
README.md


+ 38 - 0
mall-miniapp-service/.gitignore

@@ -0,0 +1,38 @@
+HELP.md
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+/src/main/java/com/gree/mall/miniapp/plus/
+.DS_Store
+logs/
+/src/test/
+*.log

+ 3 - 0
mall-miniapp-service/README.md

@@ -0,0 +1,3 @@
+# mall-miniapp-service
+
+分销商城小程序API

+ 310 - 0
mall-miniapp-service/mvnw

@@ -0,0 +1,310 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#    https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+#   JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+#   M2_HOME - location of maven2's installed home dir
+#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
+#     e.g. to debug Maven itself, use
+#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+  if [ -f /etc/mavenrc ] ; then
+    . /etc/mavenrc
+  fi
+
+  if [ -f "$HOME/.mavenrc" ] ; then
+    . "$HOME/.mavenrc"
+  fi
+
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  MINGW*) mingw=true;;
+  Darwin*) darwin=true
+    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+    if [ -z "$JAVA_HOME" ]; then
+      if [ -x "/usr/libexec/java_home" ]; then
+        export JAVA_HOME="`/usr/libexec/java_home`"
+      else
+        export JAVA_HOME="/Library/Java/Home"
+      fi
+    fi
+    ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+  if [ -r /etc/gentoo-release ] ; then
+    JAVA_HOME=`java-config --jre-home`
+  fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+  ## resolve links - $0 may be a link to maven's home
+  PRG="$0"
+
+  # need this for relative symlinks
+  while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+      PRG="$link"
+    else
+      PRG="`dirname "$PRG"`/$link"
+    fi
+  done
+
+  saveddir=`pwd`
+
+  M2_HOME=`dirname "$PRG"`/..
+
+  # make it fully qualified
+  M2_HOME=`cd "$M2_HOME" && pwd`
+
+  cd "$saveddir"
+  # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --unix "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME="`(cd "$M2_HOME"; pwd)`"
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+  javaExecutable="`which javac`"
+  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+    # readlink(1) is not available as standard on Solaris 10.
+    readLink=`which readlink`
+    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+      if $darwin ; then
+        javaHome="`dirname \"$javaExecutable\"`"
+        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+      else
+        javaExecutable="`readlink -f \"$javaExecutable\"`"
+      fi
+      javaHome="`dirname \"$javaExecutable\"`"
+      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+      JAVA_HOME="$javaHome"
+      export JAVA_HOME
+    fi
+  fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD="`which java`"
+  fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly." >&2
+  echo "  We cannot execute $JAVACMD" >&2
+  exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+  echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+  if [ -z "$1" ]
+  then
+    echo "Path not specified to find_maven_basedir"
+    return 1
+  fi
+
+  basedir="$1"
+  wdir="$1"
+  while [ "$wdir" != '/' ] ; do
+    if [ -d "$wdir"/.mvn ] ; then
+      basedir=$wdir
+      break
+    fi
+    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+    if [ -d "${wdir}" ]; then
+      wdir=`cd "$wdir/.."; pwd`
+    fi
+    # end of workaround
+  done
+  echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+  if [ -f "$1" ]; then
+    echo "$(tr -s '\n' ' ' < "$1")"
+  fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+  exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Found .mvn/wrapper/maven-wrapper.jar"
+    fi
+else
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+    fi
+    if [ -n "$MVNW_REPOURL" ]; then
+      jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+    else
+      jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+    fi
+    while IFS="=" read key value; do
+      case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+      esac
+    done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Downloading from: $jarUrl"
+    fi
+    wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+    if $cygwin; then
+      wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+    fi
+
+    if command -v wget > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found wget ... using wget"
+        fi
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+            wget "$jarUrl" -O "$wrapperJarPath"
+        else
+            wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
+        fi
+    elif command -v curl > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found curl ... using curl"
+        fi
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+            curl -o "$wrapperJarPath" "$jarUrl" -f
+        else
+            curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
+        fi
+
+    else
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Falling back to using Java to download"
+        fi
+        javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+        # For Cygwin, switch paths to Windows format before running javac
+        if $cygwin; then
+          javaClass=`cygpath --path --windows "$javaClass"`
+        fi
+        if [ -e "$javaClass" ]; then
+            if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Compiling MavenWrapperDownloader.java ..."
+                fi
+                # Compiling the Java class
+                ("$JAVA_HOME/bin/javac" "$javaClass")
+            fi
+            if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                # Running the downloader
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Running MavenWrapperDownloader.java ..."
+                fi
+                ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+            fi
+        fi
+    fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+  echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --path --windows "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+  $MAVEN_OPTS \
+  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+  "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

+ 182 - 0
mall-miniapp-service/mvnw.cmd

@@ -0,0 +1,182 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements.  See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership.  The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License.  You may obtain a copy of the License at
+@REM
+@REM    https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied.  See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM     e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+
+FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+    IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Found %WRAPPER_JAR%
+    )
+) else (
+    if not "%MVNW_REPOURL%" == "" (
+        SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+    )
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Couldn't find %WRAPPER_JAR%, downloading it ...
+        echo Downloading from: %DOWNLOAD_URL%
+    )
+
+    powershell -Command "&{"^
+		"$webclient = new-object System.Net.WebClient;"^
+		"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+		"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+		"}"^
+		"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
+		"}"
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Finished downloading %WRAPPER_JAR%
+    )
+)
+@REM End of extension
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%

+ 427 - 0
mall-miniapp-service/pom.xml

@@ -0,0 +1,427 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.3.3.RELEASE</version>
+        <relativePath/> <!-- lookup parent from repository -->
+    </parent>
+    <groupId>com.gree.miniapp</groupId>
+    <artifactId>zfire_jsm_mall_miniapp</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <name>zfire_jsm_mall_miniapp</name>
+    <description>Demo project for Spring Boot</description>
+
+    <properties>
+        <java.version>1.8</java.version>
+        <mybatis.version>2.1.0</mybatis.version>
+        <mybatis-plus.version>3.4.2</mybatis-plus.version>
+        <velocity.version>2.1</velocity.version>
+        <projectlombok.version>1.18.8</projectlombok.version>
+        <mybatis-spring.version>2.1.0</mybatis-spring.version>
+        <google.zxing.version>3.3.2</google.zxing.version>
+        <mysql.version>8.0.17</mysql.version>
+        <druid.version>1.1.21</druid.version>
+        <commons-pool2.version>2.8.0</commons-pool2.version>
+        <fastjson.version>1.2.59</fastjson.version>
+        <okhttp3.version>4.0.1</okhttp3.version>
+        <swagger.version>2.9.2</swagger.version>
+        <swagger-bootstrap.version>1.9.4</swagger-bootstrap.version>
+        <io-swagger.version>1.5.22</io-swagger.version>
+        <bcprov-jdk15on.version>1.60</bcprov-jdk15on.version>
+        <thumbnailator.version>0.4.8</thumbnailator.version>
+        <io.jsonwebtoken.version>0.6.0</io.jsonwebtoken.version>
+        <aliyun-sdk-oss.version>3.8.1</aliyun-sdk-oss.version>
+        <httpclient.version>4.5</httpclient.version>
+        <weixin-java.version>4.5.0</weixin-java.version>
+        <hutool-all.version>5.8.1</hutool-all.version>
+        <thymeleaf.version>2.2.6.RELEASE</thymeleaf.version>
+        <commons-codec.version>1.9</commons-codec.version>
+        <aliyun-sdk-core.version>4.0.3</aliyun-sdk-core.version>
+        <junit.version>4.12</junit.version>
+        <logstash.version>6.3</logstash.version>
+        <wxpay-sdk.version>0.0.3</wxpay-sdk.version>
+    </properties>
+
+    <dependencies>
+        <!--<dependency>-->
+        <!--<groupId>org.springframework.boot</groupId>-->
+        <!--<artifactId>spring-boot-starter-security</artifactId>-->
+        <!--</dependency>-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-starter-tomcat</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.integration</groupId>
+            <artifactId>spring-integration-redis</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-devtools</artifactId>
+            <scope>runtime</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.junit.vintage</groupId>
+                    <artifactId>junit-vintage-engine</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <!--mybatis-->
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+            <version>${mybatis.version}</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>mybatis</artifactId>
+                    <groupId>org.mybatis</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+            <version>${mybatis-plus.version}</version>
+            <!--<exclusions>-->
+            <!--<exclusion>-->
+            <!--<artifactId>mybatis</artifactId>-->
+            <!--<groupId>org.mybatis</groupId>-->
+            <!--</exclusion>-->
+            <!--</exclusions>-->
+        </dependency>
+        <!--<dependency>-->
+        <!--<groupId>com.baomidou</groupId>-->
+        <!--<artifactId>mybatis-plus-generator</artifactId>-->
+        <!--<version>3.2.0</version>-->
+        <!--</dependency>-->
+        <dependency>
+            <groupId>org.apache.velocity</groupId>
+            <artifactId>velocity-engine-core</artifactId>
+            <version>${velocity.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>${projectlombok.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-autoconfigure</artifactId>
+            <version>${mybatis-spring.version}</version>
+        </dependency>
+
+
+        <dependency>
+            <groupId>com.google.zxing</groupId>
+            <artifactId>core</artifactId>
+            <version>${google.zxing.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.google.zxing</groupId>
+            <artifactId>javase</artifactId>
+            <version>${google.zxing.version}</version>
+        </dependency>
+
+        <!--mysql驱动-->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <version>${mysql.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid-spring-boot-starter</artifactId>
+            <version>${druid.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-pool2</artifactId>
+            <version>${commons-pool2.version}</version>
+        </dependency>
+        <!--fastjson-->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>${fastjson.version}</version>
+        </dependency>
+        <!--okhttp3-->
+        <dependency>
+            <groupId>com.squareup.okhttp3</groupId>
+            <artifactId>okhttp</artifactId>
+            <version>${okhttp3.version}</version>
+        </dependency>
+        <!--swagger接口文档框架-->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+            <version>${swagger.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+            <version>${swagger.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.github.xiaoymin</groupId>
+            <artifactId>swagger-bootstrap-ui</artifactId>
+            <version>${swagger-bootstrap.version}</version>
+        </dependency>
+        <!-- 支持 @ConfigurationProperties 注解 -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-configuration-processor</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <!-- fix swagger input报错-->
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-annotations</artifactId>
+            <version>${io-swagger.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-models</artifactId>
+            <version>${io-swagger.version}</version>
+        </dependency>
+        <!--更换undertow容器-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-undertow</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.bouncycastle</groupId>
+            <artifactId>bcprov-jdk15on</artifactId>
+            <version>${bcprov-jdk15on.version}</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>net.coobird</groupId>
+            <artifactId>thumbnailator</artifactId>
+            <version>${thumbnailator.version}</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt</artifactId>
+            <version>${io.jsonwebtoken.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.aliyun.oss</groupId>
+            <artifactId>aliyun-sdk-oss</artifactId>
+            <version>${aliyun-sdk-oss.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+            <version>${httpclient.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpmime</artifactId>
+            <version>${httpclient.version}</version>
+        </dependency>
+
+        <!--模板组件-->
+        <!--<dependency>-->
+            <!--<groupId>org.springframework.boot</groupId>-->
+            <!--<artifactId>spring-boot-starter-thymeleaf</artifactId>-->
+            <!--<version>${thymeleaf.version}</version>-->
+        <!--</dependency>-->
+        <!--模板组件END-->
+
+        <!-- https://mvnrepository.com/artifact/commons-codec/commons-codec -->
+        <dependency>
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+            <version>${commons-codec.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>aliyun-java-sdk-core</artifactId>
+            <version>${aliyun-sdk-core.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
+            <version>2.1.0.RELEASE</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
+            <version>2.1.0.RELEASE</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+            <version>2.1.3.RELEASE</version>
+        </dependency>
+
+
+        <dependency>
+            <groupId>net.logstash.logback</groupId>
+            <artifactId>logstash-logback-encoder</artifactId>
+            <version>${logstash.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.github.wxpay</groupId>
+            <artifactId>wxpay-sdk</artifactId>
+            <version>${wxpay-sdk.version}</version>
+        </dependency>
+
+        <!--企业微信api-->
+        <dependency>
+            <groupId>com.github.binarywang</groupId>
+            <artifactId>weixin-java-cp</artifactId>
+            <version>${weixin-java.version}</version>
+        </dependency>
+        <!-- 微信支付 -->
+        <dependency>
+            <groupId>com.github.binarywang</groupId>
+            <artifactId>weixin-java-pay</artifactId>
+            <version>${weixin-java.version}</version>
+        </dependency>
+        <!-- 微信小程序 -->
+        <dependency>
+            <groupId>com.github.binarywang</groupId>
+            <artifactId>weixin-java-miniapp</artifactId>
+            <version>${weixin-java.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.github.binarywang</groupId>
+            <artifactId>weixin-java-mp</artifactId>
+            <version>${weixin-java.version}</version>
+        </dependency>
+        <!--hutool-->
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>${hutool-all.version}</version>
+        </dependency>
+        <!-- 校验 -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-validation</artifactId>
+        </dependency>
+
+        <!--单元测试的依赖-->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>${junit.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.sun.mail</groupId>
+            <artifactId>javax.mail</artifactId>
+            <version>1.5.5</version>
+        </dependency>
+
+    </dependencies>
+
+
+    <profiles>
+        <profile>
+            <!-- 本地开发环境 -->
+            <id>dev</id>
+            <properties>
+                <profiles.active>dev</profiles.active>
+            </properties>
+            <activation>
+                <!-- 设置默认激活这个配置 -->
+                <activeByDefault>true</activeByDefault>
+            </activation>
+        </profile>
+        <profile>
+            <!-- 测试环境 -->
+            <id>test</id>
+            <properties>
+                <profiles.active>test</profiles.active>
+            </properties>
+        </profile>
+        <profile>
+            <!-- 正式环境 -->
+            <id>prd</id>
+            <properties>
+                <profiles.active>prd</profiles.active>
+            </properties>
+        </profile>
+    </profiles>
+
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+<!--                <configuration>-->
+<!--                    <jvmArguments>-->
+<!--                        -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9090-->
+<!--                    </jvmArguments>-->
+<!--                </configuration>-->
+            </plugin>
+            <plugin>
+                <groupId>com.plus.plugin</groupId>
+                <artifactId>plus-maven-plugin</artifactId>
+                <version>5.0.0-SNAPSHOT</version>
+                <configuration>
+                    <configPath>src/main/resources/generator-${profiles.active}.properties</configPath>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+
+    <repositories>
+        <repository>
+            <id>nexus</id>
+            <name>Releases</name>
+            <url>http://121.43.111.127:8081/repository/maven-public</url>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+            <!--snapshots默认是关闭的,需要开启  -->
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+        </repository>
+    </repositories>
+    <pluginRepositories>
+        <pluginRepository>
+            <id>nexus</id>
+            <name>Releases</name>
+            <url>http://121.43.111.127:8081/repository/maven-public</url>
+        </pluginRepository>
+    </pluginRepositories>
+
+</project>

+ 34 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/MiniappApplication.java

@@ -0,0 +1,34 @@
+package com.gree.mall.miniapp;
+
+import com.gree.mall.miniapp.utils.ApplicationContextUtils;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
+import org.springframework.cache.annotation.EnableCaching;
+
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+@SpringBootApplication
+@ServletComponentScan(basePackages = {"com.gree.mall.miniapp"})
+@EnableAsync
+@EnableScheduling
+//@EnableFeignClients
+@EnableDiscoveryClient
+@EnableCaching
+@MapperScan(basePackages = {
+        "com.gree.mall.miniapp.plus.mapper",
+        "com.gree.mall.miniapp.commonmapper"
+})
+public class MiniappApplication {
+
+    public static void main(String[] args) {
+        ApplicationContext context = SpringApplication.run(MiniappApplication.class, args);
+        ApplicationContextUtils.setApplicationContext(context);
+    }
+
+}

+ 73 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/SwaggerConfig.java

@@ -0,0 +1,73 @@
+package com.gree.mall.miniapp;
+
+/**
+ *
+ */
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.ParameterBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.schema.ModelRef;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.Contact;
+import springfox.documentation.service.Parameter;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * API文档设置
+ * com.qichuan.sugar.minaapi.SwaggerConfig
+ */
+@Profile({"dev","test"})
+@Configuration
+@EnableSwagger2
+public class SwaggerConfig {
+    @Bean
+    public Docket statisticsApi() {
+        return new Docket(DocumentationType.SWAGGER_2)
+                .pathMapping("/")
+                .groupName("小程序API")
+                .select()
+                .apis(RequestHandlerSelectors.basePackage("com.gree.mall.miniapp.controller"))
+                .paths(PathSelectors.regex("/.*"))
+                .build()
+                .apiInfo(apiBInfo())
+                .globalOperationParameters(setHeaderToken());
+    }
+
+    private ApiInfo apiBInfo() {
+
+        return new ApiInfoBuilder()
+                .title("格匠员工培训项目企业运营小程序API")
+                .description("格匠员工培训项目企业运营小程序API")
+                .contact(new Contact("格匠", "http://gejiang", "gejiang@gejiang.com"))
+                .version("1.0")
+                .build();
+    }
+
+    /**
+     * 设置公共header参数
+     * @return
+     */
+    private List<Parameter> setHeaderToken() {
+        ParameterBuilder tokenPar = new ParameterBuilder();
+        tokenPar.name("x-token").description("校验TOKEN").modelRef(new ModelRef("string")).defaultValue("1111").parameterType("header").required(false).build();
+
+        ParameterBuilder tokenPar2 = new ParameterBuilder();
+        tokenPar2.name("APPID").description("APPID").modelRef(new ModelRef("string")).defaultValue("1").parameterType("header").required(false).build();
+
+        List<Parameter> pars = new ArrayList<>();
+        pars.add(tokenPar.build());
+        pars.add(tokenPar2.build());
+        return pars;
+    }
+}

+ 11 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/annotation/ApiNotAuth.java

@@ -0,0 +1,11 @@
+package com.gree.mall.miniapp.annotation;
+
+import java.lang.annotation.*;
+
+@Target(value = ElementType.METHOD)
+@Retention(value = RetentionPolicy.RUNTIME)
+@Documented
+public @interface ApiNotAuth {
+
+
+}

+ 12 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/annotation/DataPermission.java

@@ -0,0 +1,12 @@
+package com.gree.mall.miniapp.annotation;
+
+import java.lang.annotation.*;
+
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+@Inherited
+public @interface DataPermission {
+
+    String field() default "company_wechat_id";
+}

+ 28 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/ExcelData.java

@@ -0,0 +1,28 @@
+package com.gree.mall.miniapp.bean;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+@Data
+public class ExcelData implements Serializable {
+    /**
+     * 表头
+     */
+    @ApiModelProperty(value = "表头")
+    private List<String> titles;
+
+    /**
+     * 数据
+     */
+    @ApiModelProperty(value = "数据")
+    private List<List<Object>> rows;
+
+    /**
+     * 页签名称
+     */
+    @ApiModelProperty(value = "页签名称")
+    private String name;
+}

+ 21 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/Page.java

@@ -0,0 +1,21 @@
+package com.gree.mall.miniapp.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+@ApiModel
+@Data
+public class  Page<T> {
+    @ApiModelProperty(value = "总条数")
+    private Integer total;
+    @ApiModelProperty(value = "当前页码")
+    private Integer pageNum;
+    @ApiModelProperty(value = "当前页数量")
+    private Integer pageSize;
+    @ApiModelProperty(value = "总页数")
+    private Integer totalPage;
+    @ApiModelProperty(value = "数据实体")
+    private List<T> list;
+}

+ 26 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/PayDetail.java

@@ -0,0 +1,26 @@
+package com.gree.mall.miniapp.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel
+@Data
+public class PayDetail {
+    @ApiModelProperty(value = "paySign")
+    private String paySign;
+    @ApiModelProperty(value = "微信返回的预支付id")
+    private String payPackage;
+    @ApiModelProperty(value = "paySign")
+    private String nonceStr;
+    @ApiModelProperty(value = "当前的时间")
+    private String timeStamp;
+    @ApiModelProperty("id")
+    private String id;
+    @ApiModelProperty("是否需要微信支付 true/false")
+    private Boolean isPay = true;
+    @ApiModelProperty("扫码支付的url")
+    private String codeUrl;
+
+
+}

+ 14 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/SVerification.java

@@ -0,0 +1,14 @@
+package com.gree.mall.miniapp.bean;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class SVerification implements Serializable {
+    @ApiModelProperty(name = "code", value = "code")
+    private String code;
+    @ApiModelProperty(name = "pic", value = "64位编码")
+    private String pic;//64位编码
+}

+ 26 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/activity/PromotionActivityBean.java

@@ -0,0 +1,26 @@
+package com.gree.mall.miniapp.bean.activity;
+
+import com.gree.mall.miniapp.plus.entity.PromotionActivity;
+import com.gree.mall.miniapp.plus.entity.PromotionActivityItem;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel
+public class PromotionActivityBean extends PromotionActivity {
+
+    @ApiModelProperty(value = "报名信息")
+    private List<PromotionActivityItem> items;
+
+    @ApiModelProperty(value = "活动名称")
+    private String name;
+
+    @ApiModelProperty(value = "活动图片")
+    private String detailImgs;
+
+}

+ 21 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/chargingstandard/ChargingStandardBean.java

@@ -0,0 +1,21 @@
+package com.gree.mall.miniapp.bean.chargingstandard;
+
+import com.gree.mall.miniapp.plus.entity.ChargingStandard;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel
+@Data
+public class ChargingStandardBean extends ChargingStandard {
+
+    @ApiModelProperty("收费标准-类型名称")
+    public String typeName;
+    @ApiModelProperty("品牌名称")
+    private String brandName;
+    @ApiModelProperty("一级分类")
+    private String oneCategoryName;
+    @ApiModelProperty("二级分类")
+    private String twoCategoryName;
+
+}

+ 37 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/common/RegionBean.java

@@ -0,0 +1,37 @@
+package com.gree.mall.miniapp.bean.common;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class RegionBean {
+
+    @ApiModelProperty(value = "经纬度")
+    private String lnglat;
+
+    @ApiModelProperty(value = "省id")
+    private String provinceId;
+
+    @ApiModelProperty(value ="省名称")
+    private String provinceName;
+
+    @ApiModelProperty(value ="市id")
+    private String cityId;
+
+    @ApiModelProperty(value = "市名称")
+    private String cityName;
+
+    @ApiModelProperty(value = "区id")
+    private String areaId;
+
+    @ApiModelProperty(value = "区名称")
+    private String areaName;
+
+    @ApiModelProperty(value = "街道id")
+    private String lbsId;
+
+    @ApiModelProperty(value = "街道名称")
+    private String name;
+
+
+}

+ 14 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/common/SysDictConstant.java

@@ -0,0 +1,14 @@
+package com.gree.mall.miniapp.bean.common;
+
+public class SysDictConstant {
+
+
+    //字典类型
+    public final static String SYS_DICT_TYPE="SYS_DICT_TYPE";
+    //结算主体品牌
+    public final static String BRAND="BRAND";
+    //工单渠道
+    public final static String ORDER_CHANNEL = "ORDER_CHANNEL";
+
+
+}

+ 13 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/common/WechatOpenBean.java

@@ -0,0 +1,13 @@
+package com.gree.mall.miniapp.bean.common;
+
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+@ApiModel
+@Data
+public class WechatOpenBean {
+    private String openid;
+    private String sessionKey;
+    private String unionid;
+    private String mobile;
+}

+ 19 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/common/WxJsApiSignBean.java

@@ -0,0 +1,19 @@
+package com.gree.mall.miniapp.bean.common;
+
+import lombok.Data;
+
+/**
+ * @author :lijh
+ * @description:TODO
+ * @date :2024/1/24 19:41
+ */
+@Data
+public class WxJsApiSignBean {
+
+    private String appId;
+    private String nonceStr;
+    private long timestamp;
+    private String url;
+    private String signature;
+
+}

+ 19 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/coupon/BuyGoodsInfo.java

@@ -0,0 +1,19 @@
+package com.gree.mall.miniapp.bean.coupon;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel
+@Data
+public class BuyGoodsInfo {
+
+    @ApiModelProperty( value = "商品名称")
+    private String goodsName;
+
+    @ApiModelProperty( value = "商品件数")
+    private int goodsCount;
+
+    @ApiModelProperty( value = "商品件数")
+    private int memberCount;
+}

+ 22 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/coupon/CouponBean.java

@@ -0,0 +1,22 @@
+package com.gree.mall.miniapp.bean.coupon;
+
+import com.gree.mall.miniapp.plus.entity.*;
+import com.gree.mall.miniapp.plus.entity.Coupon;
+import com.gree.mall.miniapp.plus.entity.CouponGoods;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+
+@ApiModel
+@Data
+public class CouponBean extends Coupon {
+
+    @ApiModelProperty( value = "商品列表")
+    private List<CouponGoods> goodsList;
+
+    @ApiModelProperty( value = "会员列表")
+    private List<CouponTag> couponTagList;
+}

+ 26 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/coupon/CouponDataBean.java

@@ -0,0 +1,26 @@
+package com.gree.mall.miniapp.bean.coupon;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+@ApiModel
+@Data
+public class CouponDataBean {
+
+    @ApiModelProperty( value = "用券总成交额")
+    private BigDecimal totalSaleValue;
+
+    @ApiModelProperty( value = "优惠总金额")
+    private BigDecimal totalDiscountValue;
+
+    @ApiModelProperty( value = "购买商品件数")
+    private int buyGoodsCount;
+
+    @ApiModelProperty( value = "购买商品明细")
+    private List<BuyGoodsInfo> buyGoodsInfoList;
+
+}

+ 13 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/coupon/CouponObtainBean.java

@@ -0,0 +1,13 @@
+package com.gree.mall.miniapp.bean.coupon;
+
+import com.gree.mall.miniapp.plus.entity.Coupon;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel
+@Data
+public class CouponObtainBean extends Coupon {
+    @ApiModelProperty( value = "优惠券类型,0/1/2,不可领/可领/已领")
+    private Integer obtainType;
+}

+ 22 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/coupon/CouponQrcodeBean.java

@@ -0,0 +1,22 @@
+package com.gree.mall.miniapp.bean.coupon;
+
+import com.gree.mall.miniapp.plus.entity.CouponGoods;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@ApiModel
+@Data
+public class CouponQrcodeBean {
+    @ApiModelProperty(value = "优惠券二维码")
+    private String qrcode;
+
+    @ApiModelProperty(value = "总分享次数")
+    private Integer shareTimes;
+
+    @ApiModelProperty(value = "剩余分享次数")
+    private Integer leftShareTimes;
+
+}

+ 20 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/coupon/CustomCoupouBean.java

@@ -0,0 +1,20 @@
+package com.gree.mall.miniapp.bean.coupon;
+
+import com.gree.mall.miniapp.plus.entity.CouponGoods;
+import com.gree.mall.miniapp.plus.entity.UserCoupon;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+
+@EqualsAndHashCode(callSuper = true)
+@ApiModel
+@Data
+public class CustomCoupouBean extends UserCoupon {
+
+    @ApiModelProperty( value = "优惠券是否可用标记true:可用,false:不可用")
+    private Boolean useableFlag;
+
+}

+ 17 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/coupon/UserCouponBean.java

@@ -0,0 +1,17 @@
+package com.gree.mall.miniapp.bean.coupon;
+
+import com.gree.mall.miniapp.plus.entity.UserCoupon;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class UserCouponBean extends UserCoupon {
+
+    //商品券所对应的goodsId
+    private String goodsId;
+    @ApiModelProperty("用户昵称")
+    private String nickName;
+    @ApiModelProperty("用户手机号")
+    private String mobile;
+
+}

+ 18 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/coupon/UserCouponCountBean.java

@@ -0,0 +1,18 @@
+package com.gree.mall.miniapp.bean.coupon;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel
+public class UserCouponCountBean {
+
+    @ApiModelProperty("未使用数量")
+    private Integer wsy = 0;
+    @ApiModelProperty("已使用数量")
+    private Integer ysy = 0;
+    @ApiModelProperty("已过期数量")
+    private Integer ygq = 0;
+
+}

+ 22 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/engin/RpProjectRepairBean.java

@@ -0,0 +1,22 @@
+package com.gree.mall.miniapp.bean.engin;
+
+import com.gree.mall.miniapp.plus.entity.RpProjectRepair;
+import com.gree.mall.miniapp.plus.entity.RpProjectRepairWebsit;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author :lijh
+ * @description:TODO
+ * @date :2024/1/15 18:47
+ */
+@ApiModel
+@Data
+public class RpProjectRepairBean extends RpProjectRepair {
+
+    @ApiModelProperty("服务网点")
+    private List<RpProjectRepairWebsit> projectRepairWebsitList;
+}

+ 110 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/es/ESGoodsBean.java

@@ -0,0 +1,110 @@
+package com.gree.mall.miniapp.bean.es;
+
+import com.gree.mall.miniapp.plus.entity.EsGoodsImg;
+import com.gree.mall.miniapp.plus.entity.EsOrderInfo;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+@ApiModel
+@Data
+public class ESGoodsBean {
+
+    @ApiModelProperty(value = "商品id")
+    private String id;
+
+    @ApiModelProperty(value = "商户编号")
+    private String companyWechatId;
+
+    @ApiModelProperty(value = "商户名称")
+    private String companyWechatName;
+
+    @ApiModelProperty(value = "用户id")
+    private String userId;
+
+    @ApiModelProperty(value = "用户昵称")
+    private String userNickName;
+
+    @ApiModelProperty(value = "用户头像")
+    private String userHeadImg;
+
+    @ApiModelProperty(value = "商品名称")
+    private String goodsName;
+
+    @ApiModelProperty(value = "商品描述")
+    private String goodsNote;
+
+    @ApiModelProperty(value = "商品分类id")
+    private String categoryId;
+
+    @ApiModelProperty(value = "商品分类名称")
+    private String categoryName;
+
+    @ApiModelProperty(value = "商品价格(含运费)")
+    private BigDecimal price;
+
+    @ApiModelProperty(value = "上架数量")
+    private Integer qty;
+
+    @ApiModelProperty(value = "商品品牌")
+    private String brand;
+
+    @ApiModelProperty(value = "功率(W)")
+    private String power;
+
+    @ApiModelProperty(value = "能效标识id")
+    private String markId;
+
+    @ApiModelProperty(value = "能效标识")
+    private String mark;
+
+    @ApiModelProperty(value = "制造日期")
+    private String makeDate;
+
+    @ApiModelProperty(value = "联系电话")
+    private String linkPhone;
+
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+
+    @ApiModelProperty(value = "修改时间")
+    private Date updateTime;
+
+    @ApiModelProperty(value = "修改人")
+    private String updateBy;
+
+    @ApiModelProperty(value = "状态 ON=上架 OFF=下架 SALE=已卖出")
+    private String status;
+
+    @ApiModelProperty(value = "点赞数量")
+    private Integer likeCount;
+
+    @ApiModelProperty(value = "访问数量")
+    private Integer queryCount;
+
+    @ApiModelProperty(value = "留言数量")
+    private Integer messageCount;
+
+    @ApiModelProperty(value = "商品图片")
+    private List<EsGoodsImg> imgList;
+//
+//    @ApiModelProperty(value = "留言")
+//    private List<EsGoodsMessage> messageList;
+
+    @ApiModelProperty(value = "是否点赞 true=是 false=否")
+    private Boolean isPraise;
+
+    @ApiModelProperty(value = "留言回复")
+    private List<EsGoodsMessageBean> messageAndReplyList;
+
+
+    @ApiModelProperty(value = "订单")
+    private EsOrderInfo esOrderInfo;
+}

+ 20 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/es/ESGoodsOtherCountBean.java

@@ -0,0 +1,20 @@
+package com.gree.mall.miniapp.bean.es;
+
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel
+@Data
+public class ESGoodsOtherCountBean {
+
+    @ApiModelProperty(value = "点赞")
+    private int praiseCount;
+
+    @ApiModelProperty(value = "留言")
+    private int messageCount;
+
+    @ApiModelProperty(value = "查看")
+    private int queryCount;
+}

+ 17 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/es/EsGoodsMessageBean.java

@@ -0,0 +1,17 @@
+package com.gree.mall.miniapp.bean.es;
+
+import com.gree.mall.miniapp.plus.entity.EsGoodsMessage;
+import com.gree.mall.miniapp.plus.entity.EsGoodsMessageReply;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@ApiModel
+@Data
+public class EsGoodsMessageBean extends EsGoodsMessage {
+
+    @ApiModelProperty(value = "回复")
+    private List<EsGoodsMessageReply> messageReplyList;
+}

+ 30 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/es/EsOrderBuyBean.java

@@ -0,0 +1,30 @@
+package com.gree.mall.miniapp.bean.es;
+
+import com.gree.mall.miniapp.bean.order.BuyGood;
+import com.gree.mall.miniapp.bean.order.OrderOldProductAdd;
+import com.gree.mall.miniapp.enums.PayTypeEnum;
+import com.gree.mall.miniapp.plus.entity.EsOrderInfo;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+@ApiModel
+@Data
+public class EsOrderBuyBean   {
+
+    @ApiModelProperty("二手商品id")
+    private String esGoodsId;
+
+    @ApiModelProperty("数量")
+    private Integer num;
+
+    @ApiModelProperty("收货地址id")
+    private String userAddressId;
+
+    @ApiModelProperty(value = "支付方式 WECHAT=微信支付 CASH=现金支付 TRANSFER=转账支付")
+    private String payType;
+
+}

+ 21 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/es/EsOrderInfoBean.java

@@ -0,0 +1,21 @@
+package com.gree.mall.miniapp.bean.es;
+
+import com.gree.mall.miniapp.plus.entity.EsOrderInfo;
+import com.gree.mall.miniapp.plus.entity.EsOrderRefund;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@ApiModel
+@Data
+public class EsOrderInfoBean extends EsOrderInfo {
+
+    @ApiModelProperty(value = "客户售后信息")
+    private EsOrderRefundBean esOrderRefunds;
+
+
+    @ApiModelProperty(value = "线下售后信息")
+    private List<EsOrderRefundBean> esOrderRefundList;
+}

+ 17 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/es/EsOrderRefundBean.java

@@ -0,0 +1,17 @@
+package com.gree.mall.miniapp.bean.es;
+
+import com.gree.mall.miniapp.plus.entity.EsOrderRefund;
+import com.gree.mall.miniapp.plus.entity.EsOrderRefundFile;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@ApiModel
+@Data
+public class EsOrderRefundBean extends EsOrderRefund {
+
+    @ApiModelProperty(value = "凭证")
+    private List<EsOrderRefundFile> esOrderRefundFileList;
+}

+ 21 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/es/GuessBean.java

@@ -0,0 +1,21 @@
+package com.gree.mall.miniapp.bean.es;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@ApiModel
+@Data
+public class GuessBean {
+
+    @ApiModelProperty(value = "品牌")
+    private List<String> brandList;
+
+    @ApiModelProperty(value = "功率")
+    private List<String> powerList;
+
+    @ApiModelProperty(value = "能效")
+    private List<String> markList;
+}

+ 32 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/AckGoodsBean.java

@@ -0,0 +1,32 @@
+package com.gree.mall.miniapp.bean.goods;
+
+import com.gree.mall.miniapp.plus.entity.Goods;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@ApiModel
+@Data
+public class AckGoodsBean extends Goods {
+
+    @ApiModelProperty("规则值")
+    private String specValue;
+    @ApiModelProperty("规格图片")
+    private String specImgUrl;
+    @ApiModelProperty("价格")
+    private BigDecimal price;
+    @ApiModelProperty("划线价")
+    private BigDecimal orgPrice;
+    @ApiModelProperty("商品数量")
+    private Integer num;
+    @ApiModelProperty("是否为礼品卡活动商品")
+    private Boolean isGift;
+    @ApiModelProperty("秒杀活动id")
+    private String secKillId;
+    @ApiModelProperty("团购活动id")
+    private String promotionGroupId;
+
+
+}

+ 34 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/CategoryBean.java

@@ -0,0 +1,34 @@
+package com.gree.mall.miniapp.bean.goods;
+
+import com.gree.mall.miniapp.plus.entity.GoodsSpec;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+
+@ApiModel
+@Data
+public class CategoryBean {
+
+    @ApiModelProperty("分类id")
+    private String categoryId;
+
+    @ApiModelProperty("分类名称")
+    private String name;
+    @ApiModelProperty("图片url")
+    private String imgUrl;
+    @ApiModelProperty("商品数量")
+    private String goodsNum;
+    @ApiModelProperty("层级")
+    private String level;
+    @ApiModelProperty("上层id")
+    private String parentId;
+    @ApiModelProperty("排序值")
+    private String sortNum;
+
+    @ApiModelProperty("子分类")
+    private List<CategoryBean> sub;
+
+}

+ 18 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/CommentTagCount.java

@@ -0,0 +1,18 @@
+package com.gree.mall.miniapp.bean.goods;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel
+@Data
+public class CommentTagCount {
+
+    @ApiModelProperty("评价标签id")
+    private String orderCommentTagId;
+    @ApiModelProperty("标签名称")
+    private String tag;
+    @ApiModelProperty("标签数量")
+    private Integer total;
+
+}

+ 22 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/CutGoodsBean.java

@@ -0,0 +1,22 @@
+package com.gree.mall.miniapp.bean.goods;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@ApiModel
+@Data
+public class CutGoodsBean {
+    @ApiModelProperty("秒杀活动id")
+    private String secKillActivityId;
+    @ApiModelProperty("商品id")
+    private String goodsId;
+    @ApiModelProperty("商品规格id")
+    private String GoodsSpecId;
+    @ApiModelProperty("降价金额")
+    private BigDecimal cutAmount;
+    @ApiModelProperty("true=生成二维码并返回二维码url  false=分享链接,并返回参数id")
+    private Boolean qrcode;
+}

+ 90 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/GoodsBean.java

@@ -0,0 +1,90 @@
+package com.gree.mall.miniapp.bean.goods;
+
+import com.gree.mall.miniapp.plus.entity.*;
+import com.gree.mall.miniapp.plus.entity.CommonFile;
+import com.gree.mall.miniapp.plus.entity.Goods;
+import com.gree.mall.miniapp.plus.entity.GoodsSpec;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+@EqualsAndHashCode(callSuper = true)
+@ApiModel
+@Data
+public class GoodsBean extends Goods {
+
+    @ApiModelProperty("商品库存")
+    private Integer stock;
+
+    @ApiModelProperty("商品规格")
+    private List<GoodsSpecSecBean> goodsSpecs;
+
+    @ApiModelProperty("轮播图")
+    private List<CommonFile> images;
+
+    @ApiModelProperty("是否收藏标记")
+    private Boolean favorite;
+
+    @ApiModelProperty(value = "秒杀id")
+    private String secKillId;
+
+    @ApiModelProperty("团购活动id")
+    private String promotionGroupId;
+
+    @ApiModelProperty("团长id")
+    private String groupUserId;
+
+    @ApiModelProperty("团长昵称")
+    private String groupUserName;
+
+    @ApiModelProperty("团长头像")
+    private String groupPic;
+
+    @ApiModelProperty(value = "秒杀商品规格id")
+    private String secKillSpecId;
+
+    @ApiModelProperty(value = "秒杀商品库存")
+    private Integer secStockNum;
+
+    @ApiModelProperty(value = "秒杀商品限制购买数量")
+    private Integer limitBuy;
+
+    @ApiModelProperty(value = "场次结束时间")
+    private Integer endHour;
+
+    @ApiModelProperty(value = "秒杀价格")
+    private BigDecimal secPrice;
+
+    @ApiModelProperty(value = "是否正在秒杀商品,true:秒杀中,false:非秒杀")
+    private Boolean secType;
+
+    @ApiModelProperty("商品模板")
+    private CommonTemplate commonTemplate;
+
+    @ApiModelProperty("公共商品模板")
+    private PubTemplate pubCommonTemplate;
+
+    @ApiModelProperty("当前角色的佣金")
+    private BigDecimal shareAmount;
+
+    @ApiModelProperty("正常佣金")
+    private BigDecimal shareAmount1;
+    @ApiModelProperty("内部佣金")
+    private BigDecimal shareAmount2;
+
+    @ApiModelProperty("是否为商户账号")
+    private Boolean isMaster = false;
+
+    @ApiModelProperty("满几件最优惠(满件商品才有该字段)")
+    private Integer promotionFullPieceNum;
+    @ApiModelProperty("满件条件最优惠的单价(满件商品才有该字段)")
+    private BigDecimal promotionFullPiecePrice;
+
+    private List<String> tags1;
+    private List<String> tags2;
+
+}

+ 19 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/GoodsCategoryBean.java

@@ -0,0 +1,19 @@
+package com.gree.mall.miniapp.bean.goods;
+
+import com.gree.mall.miniapp.plus.entity.GoodsCategory;
+import com.gree.mall.miniapp.plus.entity.GoodsCategory;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+
+@EqualsAndHashCode(callSuper = true)
+@ApiModel
+@Data
+public class GoodsCategoryBean extends GoodsCategory {
+
+    @ApiModelProperty( value = "子类别")
+    private List<GoodsCategoryBean> children;
+}

+ 24 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/GoodsComment.java

@@ -0,0 +1,24 @@
+package com.gree.mall.miniapp.bean.goods;
+
+import com.gree.mall.miniapp.plus.entity.OrderComment;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+@ApiModel
+@Data
+public class GoodsComment extends OrderComment {
+
+    @ApiModelProperty("用户名称")
+    private String userName;
+    @ApiModelProperty("用户头像")
+    private String avatar;
+    @ApiModelProperty("标签")
+    private List<String> tags;
+    @ApiModelProperty("图片")
+    private List<String> imgs;
+
+}

+ 19 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/GoodsCommentCount.java

@@ -0,0 +1,19 @@
+package com.gree.mall.miniapp.bean.goods;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+@ApiModel
+@Data
+public class GoodsCommentCount {
+    @ApiModelProperty("综合好评")
+    private Integer goodRate;
+    @ApiModelProperty("标签统计")
+    private List<CommentTagCount> tagCountList;
+
+}

+ 18 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/GoodsFavoriteBean.java

@@ -0,0 +1,18 @@
+package com.gree.mall.miniapp.bean.goods;
+
+import com.gree.mall.miniapp.plus.entity.Goods;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+@EqualsAndHashCode(callSuper = true)
+@ApiModel
+@Data
+public class GoodsFavoriteBean extends Goods {
+
+    @ApiModelProperty("收藏id")
+    private String goodsFavoriteId;
+
+
+}

+ 22 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/GoodsNewBean.java

@@ -0,0 +1,22 @@
+package com.gree.mall.miniapp.bean.goods;
+
+import com.gree.mall.miniapp.plus.entity.Goods;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@ApiModel
+@Data
+public class GoodsNewBean extends Goods {
+
+    @ApiModelProperty("objId")
+    private String objId;
+    @ApiModelProperty("上标签")
+    private List<String> tags1;
+    @ApiModelProperty("下标签")
+    private List<String> tags2;
+
+
+}

+ 24 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/GoodsPackageBean.java

@@ -0,0 +1,24 @@
+package com.gree.mall.miniapp.bean.goods;
+
+import com.gree.mall.miniapp.plus.entity.GoodsPackagePop;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+@ApiModel
+@Data
+public class GoodsPackageBean extends GoodsPackagePop {
+
+    @ApiModelProperty("商品名称")
+    private String goodsName;
+    @ApiModelProperty("图片")
+    private String imgUrl;
+    @ApiModelProperty("规格")
+    private String specValue;
+    @ApiModelProperty("划线价格")
+    private BigDecimal orgPrice;
+
+}

+ 45 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/GoodsSortBean.java

@@ -0,0 +1,45 @@
+package com.gree.mall.miniapp.bean.goods;
+
+import com.alibaba.fastjson.JSONArray;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel
+@Data
+public class GoodsSortBean {
+
+    @ApiModelProperty(value = "商品排序对应值 PRICE=销售价格 SHARE=分销金额 SOLD=销量 STOCK=库存")
+    private String sortColumn;
+    @ApiModelProperty(value = "true=升序 false=倒序")
+    private boolean type = true ;
+
+
+    public static String convertColumn(JSONArray goodsSortBeanArray) {
+        StringBuilder sb = new StringBuilder();
+
+        for(int i = 0; i < goodsSortBeanArray.size(); i++) {
+            GoodsSortBean goodsSortBean = goodsSortBeanArray.getObject(i, GoodsSortBean.class);
+            switch (goodsSortBean.getSortColumn()) {
+                case "PRICE" :
+                    sb.append("t2.price ").append(goodsSortBean.isType() ? "ASC," : "DESC,");
+                    break;
+                case "SHARE" :
+                    sb.append("t2.share_amount ").append(goodsSortBean.isType() ? "ASC," : "DESC,");
+                    break;
+                case "SOLD" :
+                    sb.append("t2.sold_num ").append(goodsSortBean.isType() ? "ASC," : "DESC,");
+                    break;
+                case "STOCK" :
+                    sb.append("t2.stock_num ").append(goodsSortBean.isType() ? "ASC," : "DESC,");
+                    break;
+                default :
+            }
+        }
+        if(sb.toString().length() == 0) {
+            return null;
+        }
+        String resStr = sb.toString();
+        return resStr.substring(0, resStr.length() - 1);
+    }
+}

+ 44 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/GoodsSpecBean.java

@@ -0,0 +1,44 @@
+package com.gree.mall.miniapp.bean.goods;
+
+import com.gree.mall.miniapp.plus.entity.Goods;
+import com.gree.mall.miniapp.plus.entity.Goods;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+
+@EqualsAndHashCode(callSuper = true)
+@ApiModel
+@Data
+public class GoodsSpecBean extends Goods {
+
+    @ApiModelProperty(value = "商品规格id")
+    private String goodsSpecId;
+
+    @ApiModelProperty(value = "规格值")
+    private String specValue;
+
+    @ApiModelProperty(value = "图片")
+    private String specImgUrl;
+
+    @ApiModelProperty(value = "成本价")
+    private BigDecimal costPrice;
+
+    @ApiModelProperty(value = "销售价")
+    private BigDecimal price;
+
+    @ApiModelProperty(value = "划线价格")
+    private BigDecimal orgPrice;
+
+    @ApiModelProperty(value = "分销金额")
+    private BigDecimal shareAmount;
+
+    @ApiModelProperty(value = "库存")
+    private Integer stockNum;
+
+    @ApiModelProperty(value = "商品类别名称")
+    private String categoryName;
+
+}

+ 46 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/GoodsSpecSecBean.java

@@ -0,0 +1,46 @@
+package com.gree.mall.miniapp.bean.goods;
+
+import com.gree.mall.miniapp.plus.entity.GoodsSpec;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+
+@ApiModel
+@Data
+public class GoodsSpecSecBean extends GoodsSpec {
+    @ApiModelProperty(value = "秒杀id")
+    private String secKillId;
+
+    @ApiModelProperty(value = "秒杀商品规格id")
+    private String secKillSpecId;
+
+    @ApiModelProperty(value = "秒杀商品库存")
+    private Integer secStockNum;
+
+    @ApiModelProperty(value = "秒杀商品限制购买数量")
+    private Integer limitBuy;
+
+    @ApiModelProperty(value = "场次结束时间")
+    private Integer endHour;
+
+    @ApiModelProperty(value = "秒杀分销金额")
+    private BigDecimal secShareAmount;
+
+    @ApiModelProperty(value = "秒杀价格")
+    private BigDecimal secPrice;
+
+    @ApiModelProperty(value = "是否正在秒杀商品,true:秒杀中,false:非秒杀")
+    private Boolean secType;
+
+    @ApiModelProperty("商品划线价")
+    private BigDecimal orgGoodsPrice;
+
+    @ApiModelProperty("满几件最优惠(满件商品才有该字段)")
+    private Integer promotionFullPieceNum;
+    @ApiModelProperty("满件条件最优惠的单价(满件商品才有该字段)")
+    private BigDecimal promotionFullPiecePrice;
+
+}

+ 30 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/PromotionGoodsBean.java

@@ -0,0 +1,30 @@
+package com.gree.mall.miniapp.bean.goods;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@ApiModel
+@Data
+public class PromotionGoodsBean {
+
+    @ApiModelProperty("团购活动id")
+    private String promotionGroupId;
+    @ApiModelProperty("商品id")
+    private String goodsId;
+    @ApiModelProperty("商品名称")
+    private String goodsName;
+    @ApiModelProperty("商品图")
+    private String goodsImgSrc;
+    @ApiModelProperty("拼团价")
+    private BigDecimal groupPrice;
+    @ApiModelProperty("销售数量")
+    private Integer saleNum;
+    @ApiModelProperty("库存")
+    private Integer stock;
+    @ApiModelProperty("划线价")
+    private BigDecimal orgGoodsPrice;
+
+}

+ 18 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/goods/PromotionShareQrCode.java

@@ -0,0 +1,18 @@
+package com.gree.mall.miniapp.bean.goods;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel
+@Data
+public class PromotionShareQrCode {
+
+    @ApiModelProperty("活动背景图")
+    private String promotionImgUrl;
+    @ApiModelProperty("海报图片")
+    private String posterImgUrl;
+    @ApiModelProperty("小程序二维码")
+    private String qrcode;
+
+}

+ 44 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/gree/WorkOrderBean.java

@@ -0,0 +1,44 @@
+package com.gree.mall.miniapp.bean.gree;
+
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+import java.util.List;
+import java.util.Map;
+
+
+@Data
+public class WorkOrderBean {
+    private String fx_sale_order_no = "";
+    private String user_name = "";
+    private String user_phone = "";
+    private String province = "";
+    private String city = "";
+    private String area = "";
+    private String street ="";
+    private String address = "";
+    private String user_contact="";
+    private String payment_time="";
+    //1=已支付 2=已退货
+    private String payment_state = "1";
+    private String payment_desc = "微信支付";
+    private String main_id = "101";
+    private String main_name = "0";
+    private String clerk_name = "";
+    private String clerk_phone = "";
+    private String clerk_idcard="0";
+    private String clerk_id = "";
+    private String websit_number = "";
+//    private String small_id = "0";
+//    private String small_name = "0";
+//    private String series_name = "0";
+//    private String pname = "";
+//    private String unit = "";
+//    private String number = "";
+//    private String price = "";
+
+    private List<Map<String,Object>> itf_fx_install_req_data;
+
+
+
+}

+ 14 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/inf/ValidGroup.java

@@ -0,0 +1,14 @@
+package com.gree.mall.miniapp.bean.inf;
+
+/**
+ * 校验分组
+ */
+public interface ValidGroup {
+    interface Add {
+
+    }
+
+    interface Edit {
+
+    }
+}

+ 57 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/MyDataCountBean.java

@@ -0,0 +1,57 @@
+package com.gree.mall.miniapp.bean.material;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+@ApiModel
+public class MyDataCountBean {
+
+    @ApiModelProperty(value = "新件待返还")
+    private Integer newRefundCount;
+
+    @ApiModelProperty(value = "旧件待返还")
+    private Integer oldRefundCount;
+
+    @ApiModelProperty(value = "辅材销售单数")
+    private Integer materialSalesCount;
+
+    @ApiModelProperty(value = "辅材销售金额")
+    private BigDecimal materialSalesAmount;
+
+    @ApiModelProperty(value = "配件销售单数")
+    private Integer partsSalesCount;
+
+    @ApiModelProperty(value = "配件销售金额")
+    private BigDecimal partsSalesAmount;
+
+    @ApiModelProperty(value = "待返还")
+    private Integer waitRefundCount;
+
+    @ApiModelProperty(value = "已返还")
+    private Integer endRefundCount;
+
+    @ApiModelProperty(value = "已提交")
+    private Integer saveCount;
+
+    @ApiModelProperty(value = "待支付")
+    private Integer waitPayCount;
+
+    @ApiModelProperty(value = "已支付")
+    private Integer endPayCount;
+
+    @ApiModelProperty(value = "已完成")
+    private Integer endCount;
+
+    @ApiModelProperty(value = "配件申请中")
+    private Integer partsIngCount;
+
+    @ApiModelProperty(value = "配件已到货")
+    private Integer partsEndCount;
+
+    @ApiModelProperty(value = "配件已取消")
+    private Integer partsCancelCount;
+}

+ 67 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/NormRecordVO.java

@@ -0,0 +1,67 @@
+package com.gree.mall.miniapp.bean.material;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@ApiModel
+@Data
+public class NormRecordVO {
+
+    @ApiModelProperty(value = "ID")
+    private String id;
+
+    @ApiModelProperty(value = "商户编号")
+    private String companyWechatId;
+
+    @ApiModelProperty(value = "商户名称")
+    private String companyWechatName;
+
+    @ApiModelProperty(value = "商品类型 M=辅材 P=配件")
+    private String goodsType;
+
+    @ApiModelProperty(value = "网点编号")
+    private String websitId;
+
+    @ApiModelProperty(value = "网点名称")
+    private String websitName;
+
+    @ApiModelProperty(value = "师傅编号")
+    private String workerId;
+
+    @ApiModelProperty(value = "师傅名称")
+    private String workerName;
+
+    @ApiModelProperty(value = "工单编号")
+    private String orderId;
+
+    @ApiModelProperty(value = "关联工单")
+    private String refOrder;
+
+    @ApiModelProperty(value = "使用日期")
+    private Date useTime;
+
+    @ApiModelProperty(value = "商品名称")
+    private String goodsName;
+
+    @ApiModelProperty(value = "商品代码")
+    private String goodsCode;
+
+    @ApiModelProperty(value = "使用数量")
+    private BigDecimal useQty;
+
+    @ApiModelProperty(value = "收费标准")
+    private BigDecimal normAmount;
+
+    @ApiModelProperty(value = "单位")
+    private String unit;
+
+    @ApiModelProperty(value = "客户电话")
+    private String phone;
+
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+}

+ 19 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/PartsApplyBean.java

@@ -0,0 +1,19 @@
+package com.gree.mall.miniapp.bean.material;
+
+import com.gree.mall.miniapp.plus.entity.WebsitPartsApply;
+import com.gree.mall.miniapp.plus.entity.WebsitPartsApplyItem;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+
+@EqualsAndHashCode(callSuper = true)
+@ApiModel
+@Data
+public class PartsApplyBean extends WebsitPartsApply {
+
+    @ApiModelProperty(value = "明细")
+    private List<WebsitPartsApplyItem> items;
+}

+ 124 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/PartsRefundVO.java

@@ -0,0 +1,124 @@
+package com.gree.mall.miniapp.bean.material;
+
+import com.gree.mall.miniapp.plus.entity.WebsitPartsRetItem;
+import com.gree.mall.miniapp.plus.entity.WebsitPartsRetOldRecord;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+@ApiModel
+@Data
+public class PartsRefundVO {
+
+    @ApiModelProperty(value = "返件单号")
+    private String partsRetId;
+
+    @ApiModelProperty(value = "销售单号")
+    private String salesId;
+
+    @ApiModelProperty(value = "商户编号")
+    private String companyWechatId;
+
+    @ApiModelProperty(value = "商户名称")
+    private String companyWechatName;
+
+    @ApiModelProperty(value = "网点编号")
+    private String websitId;
+
+    @ApiModelProperty(value = "网点名称")
+    private String websitName;
+
+    @ApiModelProperty(value = "类型  NEW 新件返还  OLD 旧件返还")
+    private String type;
+
+    @ApiModelProperty(value = "工程师编号")
+    private String workerId;
+
+    @ApiModelProperty(value = "工程师名称")
+    private String workerName;
+
+    @ApiModelProperty(value = "工程师手机号")
+    private String workerMobile;
+
+    @ApiModelProperty(value = "工程师网点编号")
+    private String workerWebsitId;
+
+    @ApiModelProperty(value = "工程师网点名称")
+    private String workerWebsitName;
+
+    @ApiModelProperty(value = "身份证")
+    private String identity;
+
+    @ApiModelProperty(value = "销售日期")
+    private Date salesTime;
+
+    @ApiModelProperty(value = "支付方式 CASH=现金 WECHAT=微信")
+    private String payType;
+
+    @ApiModelProperty(value = "支付时间")
+    private Date payTime;
+
+    @ApiModelProperty(value = "订单金额")
+    private BigDecimal totalAmount;
+
+    @ApiModelProperty(value = "支付订单号")
+    private String payNo;
+
+    @ApiModelProperty(value = "返件金额")
+    private BigDecimal totalRefundAmount;
+
+    @ApiModelProperty(value = "工单使用类型  INSIDE=保内 OUT=保外")
+    private String orderUseType;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    @ApiModelProperty(value = "状态 SAVE=保存 SUBMIT=提交 OK=通过 FAIL=失败")
+    private String flag;
+
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+
+    @ApiModelProperty(value = "提交人")
+    private String submitBy;
+
+    @ApiModelProperty(value = "提交时间")
+    private Date submitTime;
+
+    @ApiModelProperty(value = "审核人")
+    private String confirmBy;
+
+    @ApiModelProperty(value = "审核时间")
+    private Date confirmTime;
+
+    @ApiModelProperty(value = "退款时间")
+    private Date refundTime;
+
+    @ApiModelProperty(value = "退款状态 OK=成功 FAIL=失败 WAIT=等待")
+    private String refundState;
+
+    @ApiModelProperty(value = "退款流水号")
+    private String refundSerialNo;
+
+    @ApiModelProperty(value = "原因")
+    private String reason;
+
+    @ApiModelProperty(value = "明细")
+    private List<WebsitPartsRetItem> items;
+
+    @ApiModelProperty(value = "旧件记录")
+    private List<WebsitPartsRetOldRecord> records;
+}

+ 23 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/SalesOrderBean.java

@@ -0,0 +1,23 @@
+package com.gree.mall.miniapp.bean.material;
+
+import com.gree.mall.miniapp.plus.entity.WebsitSales;
+import com.gree.mall.miniapp.plus.entity.WebsitSalesItem;
+import com.gree.mall.miniapp.plus.entity.WebsitSalesPayOrder;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+
+@EqualsAndHashCode(callSuper = true)
+@ApiModel
+@Data
+public class SalesOrderBean extends WebsitSales {
+
+    @ApiModelProperty(value = "支付订单")
+    WebsitSalesPayOrder websitSalesPayOrder;
+
+    @ApiModelProperty(value = "明细")
+    List<WebsitSalesItem> items;
+}

+ 18 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/WebsitBuyGood.java

@@ -0,0 +1,18 @@
+package com.gree.mall.miniapp.bean.material;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@ApiModel
+@Data
+public class WebsitBuyGood {
+
+    @ApiModelProperty("商品id")
+    private String goodsId;
+    @ApiModelProperty("购买数量")
+    private BigDecimal num;
+
+}

+ 17 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/WebsitSalesCategoryVO.java

@@ -0,0 +1,17 @@
+package com.gree.mall.miniapp.bean.material;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel
+public class WebsitSalesCategoryVO {
+
+    @ApiModelProperty(value = "分类编号")
+    private String categoryId;
+
+    @ApiModelProperty(value = "分类名称")
+    private String categoryName;
+
+}

+ 55 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/WebsitSalesGoodsVO.java

@@ -0,0 +1,55 @@
+package com.gree.mall.miniapp.bean.material;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+public class WebsitSalesGoodsVO {
+
+    @ApiModelProperty(value = "商品编号")
+    private String goodsId;
+
+    @ApiModelProperty(value = "商品名称")
+    private String goodsName;
+
+    @ApiModelProperty(value = "商品单价")
+    private BigDecimal price;
+
+    @ApiModelProperty(value = "商品代码")
+    private String goodsCode;
+
+    @ApiModelProperty(value = "商品简称")
+    private String goodsSpell;
+
+    @ApiModelProperty(value = "商品规格")
+    private String goodsSpecification;
+
+    @ApiModelProperty(value = "商品库存单位(网点采购时、网点销售时)")
+    private String goodsStockUnit;
+
+    @ApiModelProperty(value = "商品销售单位(师傅采购时、师傅销售时)")
+    private String goodsSalesUnit;
+
+    @ApiModelProperty(value = "品牌名称")
+    private String brandRelaName;
+
+    @ApiModelProperty(value = "产品名称")
+    private String productRelaName;
+
+    @ApiModelProperty(value = "库存数量")
+    private BigDecimal qty;
+
+    @ApiModelProperty(value = "转换数保留小数位(以0舍1入方式保留)")
+    private BigDecimal convertBitScale;
+
+    @ApiModelProperty(value = "销售单位转换系数")
+    private BigDecimal goodsSalesConvertQty;
+
+    @ApiModelProperty(value = "是否入师傅库存 NO=否 YES=是")
+    private String manageWorkerStock;
+
+    @ApiModelProperty(value = "配件类型")
+    private String partType;
+}

+ 26 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/WebsitSalesPayMapBean.java

@@ -0,0 +1,26 @@
+package com.gree.mall.miniapp.bean.material;
+
+import com.gree.mall.miniapp.plus.entity.WebsitSalesPayMap;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel
+public class WebsitSalesPayMapBean extends WebsitSalesPayMap {
+
+    @ApiModelProperty(value = "短链接")
+    private String code;
+
+    @ApiModelProperty(value = "appid")
+    private String appid;
+
+    @ApiModelProperty(value = "appOrderId")
+    private String appOrderId;
+
+    @ApiModelProperty(value = "请求位置 1=小程序")
+    private Integer type;
+
+}

+ 33 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/WebsitShoppingCartBean.java

@@ -0,0 +1,33 @@
+package com.gree.mall.miniapp.bean.material;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+@ApiModel
+public class WebsitShoppingCartBean {
+
+    @ApiModelProperty(value = "商户编号", required = true)
+    private String companyWechatId;
+    @ApiModelProperty(value = "师傅编号", required = true)
+    private String workerId;
+    @ApiModelProperty("师傅名称")
+    private String workerName;
+    @ApiModelProperty(value = "师傅网点号")
+    private String workerWebsitId;
+    @ApiModelProperty(value = "师傅网点名称")
+    private String workerWebsitName;
+    @ApiModelProperty(value = "销售网点编号", required = true)
+    private String websitId;
+    @ApiModelProperty("网点名称")
+    private String websitName;
+    @ApiModelProperty(value = "商品类型 M=辅材 P=配件", required = true)
+    private String goodsType;
+    @ApiModelProperty("备注")
+    private String remark;
+    @ApiModelProperty("购物清单")
+    private List<WebsitBuyGood> websitBuyGoods;
+}

+ 107 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/WebsitShoppingCartList.java

@@ -0,0 +1,107 @@
+package com.gree.mall.miniapp.bean.material;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@ApiModel
+public class WebsitShoppingCartList {
+
+    private String id;
+
+    @ApiModelProperty(value = "师傅号")
+    private String workerId;
+
+    @ApiModelProperty(value = "师傅名称")
+    private String workerName;
+
+    @ApiModelProperty(value = "师傅网点号")
+    private String workerWebsitId;
+
+    @ApiModelProperty(value = "师傅网点名称")
+    private String workerWebsitName;
+
+    @ApiModelProperty(value = "销售网点号")
+    private String websitId;
+
+    @ApiModelProperty(value = "销售网点名称")
+    private String websitName;
+
+    @ApiModelProperty(value = "商户编号")
+    private String companyWechatId;
+
+    @ApiModelProperty(value = "商品id")
+    private String goodsId;
+
+    @ApiModelProperty(value = "商品名称")
+    private String goodsName;
+
+    @ApiModelProperty(value = "商品类型 M=辅材 P=配件")
+    private String goodsType;
+
+    @ApiModelProperty(value = "商品数量")
+    private BigDecimal salesQty;
+
+    @ApiModelProperty(value = "单价")
+    private BigDecimal price;
+
+    @ApiModelProperty(value = "销售金额")
+    private BigDecimal saleAmount;
+
+    @ApiModelProperty(value = "商品父类编号")
+    private String parentCategoryId;
+
+    @ApiModelProperty(value = "商品父类名称")
+    private String parentCategoryName;
+
+    @ApiModelProperty(value = "商品小类编号")
+    private String goodsCategoryId;
+
+    @ApiModelProperty(value = "商品小类名称")
+    private String goodsCategoryName;
+
+    @ApiModelProperty(value = "适用品牌")
+    private String brand;
+
+    @ApiModelProperty(value = "适用产品大类")
+    private String productCategory;
+
+    @ApiModelProperty(value = "销售单位转换系数")
+    private BigDecimal goodsSalesConvertQty;
+
+    @ApiModelProperty(value = "转换数保留小数位(以0舍1入方式保留)")
+    private Integer convertBitScale;
+
+    @ApiModelProperty(value = "是否入师傅库存 NO=否 YES=是")
+    private String manageWorkerStock;
+
+    @ApiModelProperty(value = "转换师傅入库数量")
+    private BigDecimal convertQty;
+
+    @ApiModelProperty(value = "师傅销售单位")
+    private String goodsSalesUnit;
+
+    @ApiModelProperty(value = "网点销售单位")
+    private String goodsStockUnit;
+
+    @ApiModelProperty(value = "规格型号")
+    private String goodsSpecification;
+
+    private Date createTime;
+
+    @ApiModelProperty(value = "转换师傅单价")
+    private BigDecimal convertPrice;
+
+    @ApiModelProperty(value = "原配件单价")
+    private BigDecimal origPartsPrice;
+
+    @ApiModelProperty(value = "师傅商品id")
+    private String workerGoodsId;
+
+    @ApiModelProperty(value = "师傅商品名称")
+    private String workerGoodsName;
+}

+ 144 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/NewRefundManageBean.java

@@ -0,0 +1,144 @@
+package com.gree.mall.miniapp.bean.material.parts;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.gree.mall.miniapp.bean.inf.ValidGroup;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import javax.validation.constraints.*;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+@Data
+@ApiModel
+@Accessors(chain = true)
+@JsonIgnoreProperties(value = {"createBy", "createTime", "updateBy", "updateTime", "submitBy"
+        , "submitTime", "examineBy", "examineTime", "refundedBy", "refundedTime"}, allowGetters = true)
+public class NewRefundManageBean {
+
+    private String companyWechatId;
+    private String companyWechatName;
+
+    @ApiModelProperty("申请单号")
+    @Null(groups = ValidGroup.Add.class, message = "申请单号必须为空")
+    @NotNull(groups = ValidGroup.Edit.class, message = "申请单号不能为空")
+    private String applyNo;
+
+    @ApiModelProperty("销售单号")
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "销售单id不能空")
+    private String salesId;
+
+    @ApiModelProperty(value = "申请类别", required = true)
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "申请类别不能空")
+    private String applyCategory;
+
+    @ApiModelProperty(value = "申请类别")
+    private String applyCategoryName;
+
+    @ApiModelProperty(value = "申请类型", required = true)
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "申请类型不能空")
+    @Pattern(regexp = "^NEW|LOST|BUG$", message = "申请类型错误")
+    private String applyType;
+
+    @ApiModelProperty(value = "申请类型")
+    private String applyTypeName;
+
+    @ApiModelProperty(value = "返还方式", required = true)
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "返还方式不能空")
+    private String refundMode;
+
+    @ApiModelProperty(value = "返还方式")
+    private String refundModeName;
+
+    @ApiModelProperty("快递单号")
+    private String expressNo;
+
+    @ApiModelProperty("收货地址")
+    private String receiveAddress;
+
+    @ApiModelProperty(value = "接收网点编号", required = true)
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "接收网点编号不能空")
+    private String receiveWebsitId;
+
+    @ApiModelProperty("接收网点名称")
+    private String receiveWebsitName;
+
+    @ApiModelProperty("接收配件网点编号")
+    private String receivePartsWebsitId;
+
+    @ApiModelProperty("网点地址")
+    private String websitAddress;
+
+    @ApiModelProperty(value = "师傅身份证", required = true)
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "师傅身份证不能空")
+    private String identity;
+
+    @ApiModelProperty(value = "师傅编号", required = true)
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "师傅编号不能空")
+    private String workerId;
+
+    @ApiModelProperty(value = "师傅名称", required = true)
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "师傅名称不能空")
+    private String workerName;
+
+    @ApiModelProperty("退款金额")
+    private BigDecimal refundAmount;
+
+    @ApiModelProperty("退款方式")
+    private String refundAmountMode;
+
+    @ApiModelProperty("退款方式")
+    private String refundAmountModeName;
+
+    @ApiModelProperty("备注")
+    private String remark;
+
+    @ApiModelProperty("审批备注")
+    private String examineRemark;
+
+    @ApiModelProperty("单据状态")
+    private String flag;
+
+    @ApiModelProperty("单据状态")
+    private String flagName;
+
+    @ApiModelProperty("创建人")
+    private String createBy;
+
+    @ApiModelProperty("创建时间")
+    private Date createTime;
+
+    @ApiModelProperty("更新人")
+    private String updateBy;
+
+    @ApiModelProperty("更新时间")
+    private Date updateTime;
+
+    @ApiModelProperty("提交人")
+    private String submitBy;
+
+    @ApiModelProperty("提交时间")
+    private Date submitTime;
+
+    @ApiModelProperty("审核人")
+    private String examineBy;
+
+    @ApiModelProperty("审核时间")
+    private Date examineTime;
+
+    @ApiModelProperty("确认返还人")
+    private String refundedBy;
+
+    @ApiModelProperty("确认返还时间")
+    private Date refundedTime;
+
+    @ApiModelProperty("申请明细")
+    @NotEmpty(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "申请明细不能空")
+    private List<NewRefundManageItemBean> newRefundManageItemBeanList;
+
+    @ApiModelProperty("记录")
+    private List<NewRefundManageRecordBean> partsNewRefundManageRecordList;
+}

+ 65 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/NewRefundManageItemBean.java

@@ -0,0 +1,65 @@
+package com.gree.mall.miniapp.bean.material.parts;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.gree.mall.miniapp.bean.inf.ValidGroup;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Null;
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@ApiModel
+@JsonIgnoreProperties(value = {"id"}, allowGetters = true)
+public class NewRefundManageItemBean {
+
+    private static final long serialVersionUID = 1L;
+
+    @Null(groups = {ValidGroup.Add.class}, message = "id必须为空")
+    private String id;
+
+    @ApiModelProperty("申请单号")
+    private String applyNo;
+
+    @ApiModelProperty("销售单id")
+    private String salesId;
+
+    @ApiModelProperty("配件编码")
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "配件编码不能空")
+    private String partsNumber;
+
+    @ApiModelProperty("配件名称")
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "配件名称不能空")
+    private String partsName;
+
+    @ApiModelProperty("物料组名称")
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "物料组名称不能空")
+    private String materialGroupName;
+
+    @ApiModelProperty("单位名称")
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "单位名称不能空")
+    private String goodsStockUnit;
+
+    @ApiModelProperty("数量")
+    @NotNull(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "数量不能空")
+    private BigDecimal qty;
+
+    @ApiModelProperty("备注")
+    private String remark;
+
+    @ApiModelProperty("图片地址")
+    private String image;
+
+    @ApiModelProperty("自编码")
+    private String customNo;
+
+    @ApiModelProperty("创建时间")
+    private Date createTime;
+
+    @ApiModelProperty("库存数量")
+    private BigDecimal stockQty = new BigDecimal("0");
+}

+ 16 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/NewRefundManageRecordBean.java

@@ -0,0 +1,16 @@
+package com.gree.mall.miniapp.bean.material.parts;
+
+import com.gree.mall.miniapp.plus.entity.WebsitPartsNewRefundManageRecord;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel
+public class NewRefundManageRecordBean extends WebsitPartsNewRefundManageRecord {
+
+    @ApiModelProperty("新件返还明细id")
+    private String refundStateName;
+}

+ 190 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/OldRefundManageBean.java

@@ -0,0 +1,190 @@
+package com.gree.mall.miniapp.bean.material.parts;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.gree.mall.miniapp.bean.inf.ValidGroup;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Null;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+@Data
+@ApiModel
+@JsonIgnoreProperties(value = {"createBy", "createTime", "updateBy", "updateTime", "submitBy"
+        , "submitTime", "examineBy", "examineTime", "refundedBy", "refundedTime", "settlement"}, allowGetters = true)
+public class OldRefundManageBean {
+
+    @ApiModelProperty(value = "商户编号", required = true)
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "商户编号不能空")
+    private String companyWechatId;
+
+    @ApiModelProperty(value = "商户名称", required = true)
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "商户名称不能空")
+    private String companyWechatName;
+
+    @ApiModelProperty("申请单号")
+    @Null(groups = ValidGroup.Add.class, message = "申请单号必须为空")
+    @NotNull(groups = ValidGroup.Edit.class, message = "申请单号不能为空")
+    private String applyNo;
+
+    @ApiModelProperty(value = "申请类别", required = true)
+    private String applyCategory;
+
+    @ApiModelProperty(value = "申请类别")
+    private String applyCategoryName;
+
+    @ApiModelProperty(value = "申请类型", required = true)
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "申请类型不能空")
+    private String applyType;
+
+    @ApiModelProperty(value = "申请类型")
+    private String applyTypeName;
+
+    @ApiModelProperty(value = "返还方式", required = true)
+    private String refundMode;
+
+    @ApiModelProperty(value = "返还方式")
+    private String refundModeName;
+
+    @ApiModelProperty("快递单号")
+    private String expressNo;
+
+    @ApiModelProperty("维修标识")
+    private String repairFlag;
+
+    @ApiModelProperty("维修标识")
+    private String repairFlagName;
+
+    @ApiModelProperty("收货地址")
+    private String receiveAddress;
+
+    @ApiModelProperty(value = "接收网点编号", required = true)
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "接收网点编号不能空")
+    private String receiveWebsitId;
+
+    @ApiModelProperty("接收网点名称")
+    private String receiveWebsitName;
+
+    @ApiModelProperty("接收配件网点编号")
+    private String receivePartsWebsitId;
+
+    @ApiModelProperty("网点地址")
+    private String websitAddress;
+
+    @ApiModelProperty(value = "师傅身份证", required = true)
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "师傅身份证不能空")
+    private String identity;
+
+    @ApiModelProperty(value = "师傅编号", required = true)
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "师傅编号不能空")
+    private String workerId;
+
+    @ApiModelProperty(value = "师傅名称", required = true)
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "师傅名称不能空")
+    private String workerName;
+
+    @ApiModelProperty("工单编号")
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "工单编号不能空")
+    private String workOrderNo;
+
+    @ApiModelProperty("总部工单派工id")
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "总部工单派工id不能空")
+    private String pgId;
+
+    @ApiModelProperty(value = "用户名称")
+    private String customerName;
+
+    @ApiModelProperty(value = "用户电话")
+    private String customerTel;
+
+    @ApiModelProperty("退款金额")
+    private BigDecimal refundAmount;
+
+    @ApiModelProperty("退款方式")
+    private String refundAmountMode;
+
+    @ApiModelProperty("结算状态")
+    private Boolean settlementState;
+
+    @ApiModelProperty("结算状态")
+    private String settlementStateName;
+
+    @ApiModelProperty("备注")
+    private String remark;
+
+    @ApiModelProperty("审批备注")
+    private String examineRemark;
+
+    @ApiModelProperty("复核备注")
+    private String reviewRemark;
+
+    @ApiModelProperty("是否优惠价 true=是 false=否")
+    private Boolean isDisc;
+
+    @ApiModelProperty("是否优惠价")
+    private String isDiscName;
+
+    @ApiModelProperty("是否执行优惠价 true=是 false=否")
+    private Boolean reviewResult;
+
+    @ApiModelProperty("是否执行优惠价")
+    private String reviewResultName;
+
+    @ApiModelProperty("单据状态")
+    private String flag;
+
+    @ApiModelProperty("单据状态")
+    private String flagName;
+
+    @ApiModelProperty("创建人")
+    private String createBy;
+
+    @ApiModelProperty("创建时间")
+    private Date createTime;
+
+    @ApiModelProperty("更新人")
+    private String updateBy;
+
+    @ApiModelProperty("更新时间")
+    private Date updateTime;
+
+    @ApiModelProperty("提交人")
+    private String submitBy;
+
+    @ApiModelProperty("提交时间")
+    private Date submitTime;
+
+    @ApiModelProperty("审核人")
+    private String examineBy;
+
+    @ApiModelProperty("审核时间")
+    private Date examineTime;
+
+    @ApiModelProperty("确认返还人")
+    private String refundedBy;
+
+    @ApiModelProperty("确认返还时间")
+    private Date refundedTime;
+
+    @ApiModelProperty("复核人")
+    private String reviewBy;
+
+    @ApiModelProperty("复核时间")
+    private Date reviewTime;
+
+    @ApiModelProperty("导入更新时间")
+    private Date importTime;
+
+    @ApiModelProperty("申请明细")
+    @NotEmpty(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "申请明细不能空")
+    private List<OldRefundManageItemBean> oldRefundManageItemBeanList;
+
+    @ApiModelProperty("记录")
+    private List<OldRefundManageRecordBean> partsOldRefundManageRecordList;
+}

+ 108 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/OldRefundManageItemBean.java

@@ -0,0 +1,108 @@
+package com.gree.mall.miniapp.bean.material.parts;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.gree.mall.miniapp.bean.inf.ValidGroup;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Null;
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@ApiModel
+@JsonIgnoreProperties(value = {"id"}, allowGetters = true)
+public class OldRefundManageItemBean {
+
+    @Null(groups = {ValidGroup.Add.class}, message = "id必须为空")
+    private String id;
+
+    @ApiModelProperty("申请单号")
+    @TableField("applyNo")
+    private String applyNo;
+
+    @ApiModelProperty("旧配件编码")
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "旧配件编码不能空")
+    private String oldPartsNumber;
+
+    @ApiModelProperty("旧配件名称")
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "旧配件名称不能空")
+    private String oldPartsName;
+
+    @ApiModelProperty("旧配件物料组名称")
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "旧配件物料组名称不能空")
+    private String oldMaterialGroupName;
+
+    @ApiModelProperty("旧配件单位名称")
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "旧配件单位不能空")
+    private String oldGoodsStockUnit;
+
+    @ApiModelProperty("数量")
+    @NotNull(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "数量不能空")
+    private BigDecimal qty;
+
+    @ApiModelProperty("旧件图片地址")
+    private String oldImage;
+
+    @ApiModelProperty("铭牌")
+    private String tab;
+
+    @ApiModelProperty("新配件编码")
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "新配件编码不能空")
+    private String newPartsNumber;
+
+    @ApiModelProperty("新配件名称")
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "新配件名称不能空")
+    private String newPartsName;
+
+    @ApiModelProperty("新配件物料组名称")
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "新配件物料组名称不能空")
+    private String newMaterialGroupName;
+
+    @ApiModelProperty("新配件单位")
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "新配件单位不能空")
+    private String newGoodsStockUnit;
+
+    @ApiModelProperty("维修记录编号")
+    private String repairRecordNumber;
+
+    @ApiModelProperty("机器条形码")
+    private String machineBarcode;
+
+    @ApiModelProperty("修复时间")
+    private Date repairTime;
+
+    @ApiModelProperty("旧压缩机编号")
+    private String oldCompressNumber;
+
+    @ApiModelProperty("新压缩机编号")
+    private String newCompressNumber;
+
+    @ApiModelProperty("配件条码")
+    private String partsBarcode;
+
+    @ApiModelProperty("安装日期")
+    private Date installTime;
+
+    @ApiModelProperty("自编码")
+    private String customNo;
+
+    @ApiModelProperty("是否备用件 false=否 true=是")
+    private Boolean isBackup;
+
+    @ApiModelProperty("是否备用件")
+    private String isBackupName;
+
+    @ApiModelProperty("备注")
+    private String remark;
+
+    @ApiModelProperty("创建时间")
+    private Date createTime;
+
+    @ApiModelProperty("收费明细id")
+    private String workerOrderItemId;
+}

+ 23 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/OldRefundManageRecordBean.java

@@ -0,0 +1,23 @@
+package com.gree.mall.miniapp.bean.material.parts;
+
+import com.gree.mall.miniapp.plus.entity.WebsitPartsOldRefundManageRecord;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel
+public class OldRefundManageRecordBean extends WebsitPartsOldRefundManageRecord {
+
+    @ApiModelProperty("退款状态")
+    private String refundStateName;
+
+    @ApiModelProperty("维修标识 INNER=保内 OUTSIDE=保外")
+    private String repairFlagName;
+
+    @ApiModelProperty("是否备用件 false=否 true=是")
+    private String isBackupName;
+
+}

+ 66 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/PartsChangeSalesBean.java

@@ -0,0 +1,66 @@
+package com.gree.mall.miniapp.bean.material.parts;
+
+import com.gree.mall.miniapp.plus.entity.WebsitPartsChangeSalesItem;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+@Data
+@ApiModel
+public class PartsChangeSalesBean {
+
+    @ApiModelProperty("转销单号")
+    private String changeSalesNo;
+
+    @ApiModelProperty("销售单号")
+    private String salesId;
+
+    @ApiModelProperty("转单类型")
+    private String changeType;
+
+    @ApiModelProperty("总金额")
+    private BigDecimal totalAmount;
+
+    @ApiModelProperty("网点编码")
+    private String websitId;
+
+    @ApiModelProperty("网点名称")
+    private String websitName;
+
+    @ApiModelProperty("配件网点编号")
+    private String partsWebsitId;
+
+    @ApiModelProperty("师傅身份证")
+    private String identity;
+
+    @ApiModelProperty("师傅编号")
+    private String workerId;
+
+    @ApiModelProperty("师傅名称")
+    private String workerName;
+
+    @ApiModelProperty("审批备注")
+    private String examineRemark;
+
+    @ApiModelProperty("单据状态")
+    private String flag;
+
+    @ApiModelProperty("单据状态")
+    private String flagName;
+
+    @ApiModelProperty("创建时间")
+    private Date createTime;
+
+    @ApiModelProperty("审核人")
+    private String examineBy;
+
+    @ApiModelProperty("审核时间")
+    private Date examineTime;
+
+    @ApiModelProperty("转销售明细")
+    List<WebsitPartsChangeSalesItem> partsChangeSalesItemList;
+}

+ 124 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/PartsRefundRecordDTO.java

@@ -0,0 +1,124 @@
+package com.gree.mall.miniapp.bean.material.parts;
+
+import cn.hutool.core.date.DateUtil;
+import com.gree.mall.miniapp.enums.material.PartsRefTypeEnum;
+import com.gree.mall.miniapp.plus.entity.WebsitPartsSalesItem;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+public class PartsRefundRecordDTO {
+
+    @ApiModelProperty("返还明细id")
+    private String itemId;
+
+    @ApiModelProperty("申请单号")
+    private String applyNo;
+
+    @ApiModelProperty("销售单id")
+    private String salesId;
+
+    @ApiModelProperty("销售单明细id")
+    private String salesItemId;
+
+    @ApiModelProperty("配件编码")
+    private String partsNumber;
+
+    @ApiModelProperty("配件名称")
+    private String partsName;
+
+    @ApiModelProperty("销售价")
+    private BigDecimal salesPrice;
+
+    @ApiModelProperty("市场价")
+    private BigDecimal marketPrice;
+
+    @ApiModelProperty("优惠价2")
+    private BigDecimal secondPrice;
+
+    @ApiModelProperty("数量")
+    private BigDecimal qty;
+
+    @ApiModelProperty("总金额")
+    private BigDecimal totalAmount;
+
+    @ApiModelProperty("退款方式 WX=微信 CASH=现金")
+    private String refundAmountMode;
+
+    @ApiModelProperty("退款金额")
+    private BigDecimal refundAmount;
+
+    @ApiModelProperty("维修标识 INNER=保内 OUTSIDE=保外")
+    private String repairFlag;
+
+    @ApiModelProperty("工单编号")
+    private String workOrderNo;
+
+    @ApiModelProperty("总部工单派工id")
+    private String pgId;
+
+    @ApiModelProperty("用户名称")
+    private String customerName;
+
+    @ApiModelProperty("用户电话")
+    private String customerTel;
+
+    @ApiModelProperty("是否备用件 false=否 true=是")
+    private Boolean isBackup;
+
+    @ApiModelProperty("创建时间")
+    private Date createTime;
+
+
+    public void injectData(SalesItemRecordDTO itemRecordDTO, WebsitPartsSalesItem salesOrderItem, BigDecimal qty, String refType) {
+        this.itemId = itemRecordDTO.getItemId();
+        this.applyNo = itemRecordDTO.getApplyNo();
+        this.salesId = salesOrderItem.getSalesId();
+        this.salesItemId = salesOrderItem.getId();
+        this.partsNumber = salesOrderItem.getPartsNumber();
+        this.partsName = salesOrderItem.getPartsName();
+        this.salesPrice = salesOrderItem.getSalesPrice();
+        this.marketPrice = salesOrderItem.getMarketPrice();
+        this.secondPrice = salesOrderItem.getSecondPrice();
+        this.qty = qty;
+        this.totalAmount = salesOrderItem.getSalesPrice().multiply(qty);
+        this.repairFlag = itemRecordDTO.getRepairFlag();
+        this.workOrderNo = itemRecordDTO.getWorkOrderNo();
+        this.pgId = itemRecordDTO.getPgId();
+        this.customerName = itemRecordDTO.getCustomerName();
+        this.customerTel = itemRecordDTO.getCustomerTel();
+        this.isBackup = itemRecordDTO.getIsBackup();
+        this.createTime = DateUtil.date();
+        this.refundAmountMode = salesOrderItem.getRefundAmountMode();
+        if (refType.equals(PartsRefTypeEnum.OLD_REFUND.getRemark()) || refType.equals(PartsRefTypeEnum.NEW_REFUND.getRemark())) {
+            // 旧件返还保内或新件返还 全额退还
+            this.refundAmount = salesOrderItem.getSalesPrice().multiply(qty);
+        } else if (refType.equals(PartsRefTypeEnum.OUTSIDE_TO_SALES.getRemark())) {
+            // 保外新件转销售的市场价-优惠价2的差价退还(旧计算方式)
+//            this.refundAmount = salesOrderItem.getMarketPrice().subtract(salesOrderItem.getSecondPrice()).multiply(qty);
+            // 销售价-优惠价2*1.2倍  返还差价
+            this.refundAmount = BigDecimal.ZERO;
+            if (salesOrderItem.getSecondPrice().compareTo(BigDecimal.ZERO) > 0) {
+                this.refundAmount = this.computeDiffAmount(salesOrderItem.getSalesPrice(), salesOrderItem.getSecondPrice(), qty);
+            }
+
+        }
+
+        if (refType.equals(PartsRefTypeEnum.NEW_REFUND.toString())) {
+            // 销售明细新件数量增加
+            salesOrderItem.setNewRefundQty(salesOrderItem.getNewRefundQty().add(qty));
+        } else {
+            // 销售明细旧件数量增加
+            salesOrderItem.setOldRefundQty(salesOrderItem.getOldRefundQty().add(qty));
+        }
+        // 销售明细数量减少
+        salesOrderItem.setQty(salesOrderItem.getQty().subtract(qty));
+    }
+
+    public BigDecimal computeDiffAmount(BigDecimal salesPrice, BigDecimal secondPrice, BigDecimal qty) {
+        return salesPrice.subtract(secondPrice.multiply(BigDecimal.valueOf(1.2))).multiply(qty);
+    }
+}

+ 41 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/PartsSalesOrderBean.java

@@ -0,0 +1,41 @@
+package com.gree.mall.miniapp.bean.material.parts;
+
+import com.gree.mall.miniapp.plus.entity.WebsitPartsSales;
+import com.gree.mall.miniapp.plus.entity.WebsitSalesPayOrder;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel
+public class PartsSalesOrderBean extends WebsitPartsSales {
+
+    @ApiModelProperty("购买方式")
+    private String buyTypeName;
+
+    @ApiModelProperty("单据状态")
+    private String stateName;
+
+    @ApiModelProperty("下推标志")
+    private String pushFlagName;
+
+    @ApiModelProperty("提货状态名称")
+    private String pickupStateName;
+
+    @ApiModelProperty(value = "订单配件信息", required = true)
+    private List<PartsSalesOrderItemBean> itemList;
+
+    @ApiModelProperty(value = "支付记录列表", required = true)
+    private List<WebsitSalesPayOrder> payList;
+
+    @ApiModelProperty(value = "全部支付记录列表")
+    private List<WebsitSalesPayOrder> allPayList;
+
+    @ApiModelProperty(value = "订单明细使用信息", required = true)
+    private List<OldRefundManageRecordBean> oldRefundManageRecordBeanList;
+
+}

+ 18 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/PartsSalesOrderItemBean.java

@@ -0,0 +1,18 @@
+package com.gree.mall.miniapp.bean.material.parts;
+
+import com.gree.mall.miniapp.plus.entity.WebsitPartsSalesItem;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel
+public class PartsSalesOrderItemBean extends WebsitPartsSalesItem {
+
+	@ApiModelProperty("可用库存")
+    private BigDecimal stockQty;
+}

+ 22 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/PartsWorkerStockBean.java

@@ -0,0 +1,22 @@
+package com.gree.mall.miniapp.bean.material.parts;
+
+import com.gree.mall.miniapp.plus.entity.WorkerStock;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+
+@EqualsAndHashCode(callSuper = true)
+@ApiModel
+@Data
+public class PartsWorkerStockBean extends WorkerStock {
+
+    @ApiModelProperty("市场价")
+    private BigDecimal marketPrice;
+
+    @ApiModelProperty("剩余天数")
+    private Long expireDay;
+
+}

+ 67 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/SalesCustomerPartsBean.java

@@ -0,0 +1,67 @@
+package com.gree.mall.miniapp.bean.material.parts;
+
+import com.gree.mall.miniapp.bean.inf.ValidGroup;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotEmpty;
+import java.util.List;
+
+@Data
+@ApiModel
+public class SalesCustomerPartsBean {
+
+    @ApiModelProperty(value = "商户编号", required = true)
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "商户编号不能空")
+    private String companyWechatId;
+
+    @ApiModelProperty(value = "商户名称", required = true)
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "商户名称不能空")
+    private String companyWechatName;
+
+    @ApiModelProperty(value = "维修标识 INNER=保内 OUTSIDE=保外", required = true)
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "维修标识不能空")
+    private String repairFlag;
+
+    @ApiModelProperty(value = "接收网点编号", required = true)
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "接收网点编号不能空")
+    private String receiveWebsitId;
+
+    @ApiModelProperty("接收配件网点编号")
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "接收配件网点编号不能空")
+    private String receivePartsWebsitId;
+
+    @ApiModelProperty(value = "师傅身份证", required = true)
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "师傅身份证不能空")
+    private String identity;
+
+    @ApiModelProperty(value = "师傅编号", required = true)
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "师傅编号不能空")
+    private String workerId;
+
+    @ApiModelProperty(value = "师傅名称", required = true)
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "师傅名称不能空")
+    private String workerName;
+
+    @ApiModelProperty(value = "工单编号", required = true)
+//    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "工单编号不能空")
+    private String workOrderNo;
+
+    @ApiModelProperty(value = "用户名称", required = true)
+//    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "用户名称不能空")
+    private String customerName;
+
+    @ApiModelProperty(value = "用户电话", required = true)
+//    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "用户电话不能空")
+    private String customerTel;
+
+    @ApiModelProperty("备注")
+    private String remark;
+
+    @ApiModelProperty("明细")
+    @NotEmpty(groups = { ValidGroup.Add.class,ValidGroup.Edit.class }, message = "明细不能空")
+    private List<SalesCustomerPartsItemBean> items;
+
+}

+ 61 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/SalesCustomerPartsItemBean.java

@@ -0,0 +1,61 @@
+package com.gree.mall.miniapp.bean.material.parts;
+
+import com.gree.mall.miniapp.bean.inf.ValidGroup;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.math.BigDecimal;
+
+@Data
+@ApiModel
+public class SalesCustomerPartsItemBean {
+
+    @ApiModelProperty(value = "新配件编码", required = true)
+    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "新配件编码不能空")
+    private String partsNumber;
+
+    @ApiModelProperty(value = "数量", required = true)
+    @NotNull(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "数量不能空")
+    private BigDecimal qty;
+
+    @ApiModelProperty("旧配件编号")
+    private String oldPartsNumber;
+
+    @ApiModelProperty("旧配件名称")
+    private String oldPartsName;
+
+    @ApiModelProperty("收费明细id")
+    private String workerOrderItemId;
+
+//    @ApiModelProperty(value = "维修记录编号")
+//    private String repairRecordNumber;
+//
+//    @ApiModelProperty(value = "机器条形码", required = true)
+//    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "机器条形码不能空")
+//    private String machineBarcode;
+
+//    @ApiModelProperty(value = "修复时间", required = true)
+//    @NotNull(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "修复时间不能空")
+//    private Date repairTime;
+
+//    @ApiModelProperty("旧压缩机编号")
+//    private String oldCompressNumber;
+//
+//    @ApiModelProperty("新压缩机编号")
+//    private String newCompressNumber;
+//
+//    @ApiModelProperty("配件条码")
+//    private String partsBarcode;
+//
+//    @ApiModelProperty("安装日期")
+//    private Date installTime;
+//
+//    @ApiModelProperty("自编码")
+//    private String customNo;
+
+//    @ApiModelProperty("备注")
+//    private String remark;
+}

+ 48 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/SalesItemRecordDTO.java

@@ -0,0 +1,48 @@
+package com.gree.mall.miniapp.bean.material.parts;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+public class SalesItemRecordDTO {
+
+    @ApiModelProperty("明细id")
+    private String itemId;
+
+    @ApiModelProperty("申请单号")
+    private String applyNo;
+
+    @ApiModelProperty("配件编码")
+    private String partsNumber;
+
+    @ApiModelProperty("配件名称")
+    private String partsName;
+
+    @ApiModelProperty("数量")
+    private BigDecimal qty;
+
+    @ApiModelProperty("销售单id")
+    private String salesId;
+
+    @ApiModelProperty("维修标识 INNER=保内 OUTSIDE=保外")
+    private String repairFlag;
+
+    @ApiModelProperty("工单编号")
+    private String workOrderNo;
+
+    @ApiModelProperty("总部工单派工id")
+    private String pgId;
+
+    @ApiModelProperty("用户名称")
+    private String customerName;
+
+    @ApiModelProperty("用户电话")
+    private String customerTel;
+
+    @ApiModelProperty("是否备用件 false=否 true=是")
+    private Boolean isBackup;
+
+
+}

+ 16 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/WebsitExtends.java

@@ -0,0 +1,16 @@
+package com.gree.mall.miniapp.bean.material.parts;
+
+import com.gree.mall.miniapp.plus.entity.AdminWebsit;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel
+public class WebsitExtends extends AdminWebsit {
+
+    @ApiModelProperty("距离(单位:km)")
+    private Double distance;
+}

+ 79 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/WebsitPartsStockBean.java

@@ -0,0 +1,79 @@
+package com.gree.mall.miniapp.bean.material.parts;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@ApiModel
+@Data
+public class WebsitPartsStockBean {
+
+    @ApiModelProperty("id")
+    private String id;
+
+    @ApiModelProperty("商户编号")
+    private String companyWechatId;
+
+    @ApiModelProperty("商户名称")
+    private String companyWechatName;
+
+    @ApiModelProperty("网点编号")
+    private String websitId;
+
+    @ApiModelProperty("网点名称")
+    private String websitName;
+
+    @ApiModelProperty("配件网点编号")
+    private String partsWebsiteNumber;
+
+    @ApiModelProperty("配件编码")
+    private String partsNumber;
+
+    @ApiModelProperty("配件名称")
+    private String partsName;
+
+    @ApiModelProperty("物料组名称")
+    private String materialGroupName;
+
+    @ApiModelProperty("单位")
+    private String goodsStockUnit;
+
+    @ApiModelProperty("新件库存")
+    private BigDecimal qty;
+
+    @ApiModelProperty("旧件库存")
+    private BigDecimal oldQty;
+
+    @ApiModelProperty("备注")
+    private String remark;
+
+    @ApiModelProperty("创建人")
+    private String createBy;
+
+    @ApiModelProperty("创建时间")
+    private Date createTime;
+
+    @ApiModelProperty("更新人")
+    private String updateBy;
+
+    @ApiModelProperty("更新时间")
+    private Date updateTime;
+
+    @ApiModelProperty("市场价")
+    private BigDecimal marketPrice;
+
+    @ApiModelProperty("优惠价1")
+    private BigDecimal firstPrice;
+
+    @ApiModelProperty("优惠价2")
+    private BigDecimal secondPrice;
+
+    @ApiModelProperty("配件类型")
+    private String partType;
+
+    @ApiModelProperty("销售价")
+    private BigDecimal salesPrice;
+}

+ 38 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/parts/WorkerStockCensusBean.java

@@ -0,0 +1,38 @@
+package com.gree.mall.miniapp.bean.material.parts;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+@ApiModel
+public class WorkerStockCensusBean {
+    @ApiModelProperty("师傅身份证")
+    private String identity;
+
+    @ApiModelProperty("师傅编号")
+    private String workerId;
+
+    @ApiModelProperty("师傅名称")
+    private String workerName;
+
+    @ApiModelProperty("新件库存")
+    private BigDecimal newQty;
+
+    @ApiModelProperty("旧件库存")
+    private BigDecimal oldQty;
+
+    @ApiModelProperty("新件待返还数量")
+    private BigDecimal newRefundQty;
+
+    @ApiModelProperty("新件待返还金额")
+    private BigDecimal newRefundAmount;
+
+    @ApiModelProperty("旧件待返还数量")
+    private BigDecimal oldRefundQty;
+
+    @ApiModelProperty("旧件待返还金额")
+    private BigDecimal oldRefundAmount;
+}

+ 24 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/settlement/SettlementAmountBean.java

@@ -0,0 +1,24 @@
+package com.gree.mall.miniapp.bean.material.settlement;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@ApiModel
+@Data
+public class SettlementAmountBean {
+    @ApiModelProperty("可提现")
+    private BigDecimal ktx;
+    @ApiModelProperty("提现中")
+    private BigDecimal txz;
+    @ApiModelProperty("待结算")
+    private BigDecimal djs;
+    @ApiModelProperty("已结算")
+    private BigDecimal yjs;
+
+
+    @ApiModelProperty("总收益")
+    private BigDecimal zsy;
+}

+ 161 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/stock/WebsitStockDTO.java

@@ -0,0 +1,161 @@
+package com.gree.mall.miniapp.bean.material.stock;
+
+import com.gree.mall.miniapp.enums.material.DirectFlagEnum;
+import com.gree.mall.miniapp.enums.material.PartsAttrEnum;
+import com.gree.mall.miniapp.exception.RemoteServiceException;
+import com.gree.mall.miniapp.plus.entity.WebsitStock;
+import com.gree.mall.miniapp.plus.entity.WebsitStockAcc;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.Objects;
+
+@Data
+@ApiModel
+public class WebsitStockDTO {
+
+    @ApiModelProperty("商户编号")
+    @NotBlank(message = "商户编号不能空")
+    private String companyWechatId;
+
+    @ApiModelProperty("商户名称")
+    @NotBlank(message = "商户名称不能空")
+    private String companyWechatName;
+
+    @ApiModelProperty("网点编号")
+    @NotBlank(message = "网点编号不能空")
+    private String websitId;
+
+    @ApiModelProperty("网点名称")
+    @NotBlank(message = "网点名称不能空")
+    private String websitName;
+
+    @ApiModelProperty("配件网点编号")
+    private String partsWebsitId;
+
+    @ApiModelProperty("发生时间")
+    @NotNull(message = "发生时间不能空")
+    private Date sdate;
+
+    @ApiModelProperty("商品类型")
+    @NotNull(message = "商品类型不能空")
+    private String goodsType;
+
+    @ApiModelProperty("配件属性 NEW=新件 OLD=旧件")
+    private String partsAttr;
+
+    @ApiModelProperty("商品编码")
+    @NotBlank(message = "商品编码不能空")
+    private String goodsId;
+
+    @ApiModelProperty("商品名称")
+    @NotBlank(message = "商品名称不能空")
+    private String goodsName;
+
+    @ApiModelProperty("发生单价")
+    private BigDecimal price;
+
+    @ApiModelProperty("相关单号")
+    @NotBlank(message = "相关单号不能空")
+    private String ref;
+
+    @ApiModelProperty("相关单据类型")
+    @NotBlank(message = "相关单据类型不能空")
+    private String refType;
+
+    @ApiModelProperty("变动数量")
+    @NotNull(message = "变动数量不能空")
+    private BigDecimal changeQty;
+
+    @ApiModelProperty("发生方向 ADD=增加 SUB=减少")
+    @NotBlank(message = "发生方向不能空")
+    private String directFlag;
+
+    @ApiModelProperty("备注")
+    private String remark;
+
+    @ApiModelProperty("业务对象")
+    private String obj;
+
+    @ApiModelProperty("操作人")
+    @NotBlank(message = "操作人不能空")
+    private String operateBy;
+
+    @ApiModelProperty("操作时间")
+    @NotNull(message = "操作时间不能空")
+    private Date operateTime;
+
+    @ApiModelProperty(value = "仓储id")
+    @NotNull(message = "仓位不能空")
+    private String storageId;
+
+    @ApiModelProperty("采购订单号")
+    private String purchaseId;
+
+    @ApiModelProperty(value = "凭证号")
+    private String voucherNo;
+
+    @ApiModelProperty(value = "申请单号")
+    private String applyNo;
+
+    @ApiModelProperty(value = "物料组名称")
+    private String materialGroupName;
+
+    @ApiModelProperty(value = "单位")
+    private String goodsStockUnit;
+
+    public WebsitStock createPartsStock() {
+        WebsitStock websitStock = new WebsitStock();
+        BeanUtils.copyProperties(this, websitStock);
+        websitStock.setId(null)
+                .setLastCost(BigDecimal.ZERO)
+                .setGoodsType(this.getGoodsType())
+                .setQty(BigDecimal.ZERO)
+                .setOldQty(BigDecimal.ZERO)
+                .setCreateBy(this.operateBy)
+                .setCreateTime(this.operateTime);
+        return websitStock;
+    }
+
+    public void computeWebsitStock(WebsitStock websitStock, WebsitStockAcc websitStockAcc) {
+        BigDecimal qty = websitStock.getQty();
+        if (StringUtils.isNotBlank(this.partsAttr) && this.partsAttr.equals(PartsAttrEnum.OLD.getKey())) {
+            qty = websitStock.getOldQty();
+        }
+        if (Objects.isNull(this.directFlag)) {
+            throw new RemoteServiceException("发生方向不符");
+        }
+        BigDecimal direct = this.directFlag.equals(DirectFlagEnum.ADD.getKey()) ? BigDecimal.ONE : new BigDecimal("-1");
+        BigDecimal closeQty = qty.add(this.changeQty.multiply(direct));
+        if (closeQty.compareTo(BigDecimal.ZERO) < 0 && direct.compareTo(BigDecimal.ZERO) < 0 && !this.getRefType().equals("销售订单")) {
+            throw new RemoteServiceException("\""+ websitStock.getGoodsName() + "\"商品库存不允许为负");
+        }
+        // 注入三级帐
+        BeanUtils.copyProperties(this, websitStockAcc);
+        websitStockAcc.setWebsitId(this.websitId)
+                .setWebsitName(this.websitName)
+                .setPartsWebsitId(this.partsWebsitId)
+                .setQty(qty)
+                .setCloseQty(closeQty)
+                .setOperateBy(this.operateBy)
+                .setOperateTime(this.operateTime)
+                .setStorageId(this.storageId);
+        // 注入库存
+        if (this.partsAttr.equals(PartsAttrEnum.NEW.getKey())) {
+            websitStock.setQty(closeQty);
+        } else if (this.partsAttr.equals(PartsAttrEnum.OLD.getKey())) {
+            websitStock.setOldQty(closeQty);
+        } else {
+            throw new RemoteServiceException("配件属性异常");
+        }
+        websitStock.setUpdateBy(this.operateBy)
+                .setUpdateTime(this.operateTime);
+    }
+}

+ 31 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/stock/WorkerNormStockBean.java

@@ -0,0 +1,31 @@
+package com.gree.mall.miniapp.bean.material.stock;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@ApiModel
+@Data
+public class WorkerNormStockBean {
+
+    @ApiModelProperty("收费标准编号")
+    private String normId;
+    @ApiModelProperty("师傅辅材编号")
+    private String workerGoodsId;
+    @ApiModelProperty("定义1比N扣减数量")
+    private BigDecimal qty;
+    @ApiModelProperty("师傅辅材名称")
+    private String goodsName;
+    @ApiModelProperty("师傅辅材名称")
+    private String salesUnit;
+    @ApiModelProperty("是否小件")
+    private Boolean isSmall;
+    @ApiModelProperty("库存数量")
+    private BigDecimal stockQty;
+    @ApiModelProperty("实际要扣减数量")
+    private BigDecimal realQty;
+    @ApiModelProperty("收费标准单价")
+    private BigDecimal normPrice;
+}

+ 13 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/stock/WorkerStockAccBean.java

@@ -0,0 +1,13 @@
+package com.gree.mall.miniapp.bean.material.stock;
+
+import com.gree.mall.miniapp.plus.entity.WorkerStockAcc;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel
+@Data
+public class WorkerStockAccBean extends WorkerStockAcc {
+    @ApiModelProperty("单位")
+    private String unit;
+}

+ 19 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/stock/WorkerStockBean.java

@@ -0,0 +1,19 @@
+package com.gree.mall.miniapp.bean.material.stock;
+
+import com.gree.mall.miniapp.plus.entity.WorkerStock;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel
+@Data
+public class WorkerStockBean extends WorkerStock {
+
+    @ApiModelProperty("商品规格")
+    private String goodsSpecification;
+    @ApiModelProperty("产品类别id")
+    private String goodsCategoryId;
+    @ApiModelProperty("产品类别名称")
+    private String categoryName;
+
+}

+ 195 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/stock/WorkerStockDTO.java

@@ -0,0 +1,195 @@
+package com.gree.mall.miniapp.bean.material.stock;
+
+import com.gree.mall.miniapp.enums.material.PartsAttrEnum;
+import com.gree.mall.miniapp.exception.RemoteServiceException;
+import com.gree.mall.miniapp.plus.entity.WorkerStock;
+import com.gree.mall.miniapp.plus.entity.WorkerStockAcc;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.Objects;
+
+@Data
+public class WorkerStockDTO {
+
+    @ApiModelProperty("商户编号")
+    @NotBlank(message = "商户编号不能空")
+    private String companyWechatId;
+
+    @ApiModelProperty("商户名称")
+    @NotBlank(message = "商户名称不能空")
+    private String companyWechatName;
+
+    @ApiModelProperty("师傅身份证")
+    @NotBlank(message = "师傅身份证不能空")
+    private String identity;
+
+    @ApiModelProperty("师傅编号")
+    @NotBlank(message = "师傅编号不能空")
+    private String workerId;
+
+    @ApiModelProperty("师傅名称")
+    @NotBlank(message = "师傅名称不能空")
+    private String workerName;
+
+    @ApiModelProperty("师傅网点编号")
+//    @NotBlank(message = "师傅网点编号不能空")
+    private String workerWebsitId;
+
+    @ApiModelProperty("师傅网点名称")
+//    @NotBlank(message = "师傅网点名称不能空")
+    private String workerWebsitName;
+
+    @ApiModelProperty("销售网点编号")
+    @NotBlank(message = "销售网点编号不能空")
+    private String websitId;
+
+    @ApiModelProperty("销售网点名称")
+    @NotBlank(message = "销售网点名称不能空")
+    private String websitName;
+
+    @ApiModelProperty("配件网点编号")
+    private String partsWebsitId;
+
+    @ApiModelProperty("商品类型")
+    @NotNull(message = "商品类型不能空")
+    private String goodsType;
+
+    @ApiModelProperty("发生时间")
+    @NotNull(message = "发生时间不能空")
+    private Date sdate;
+
+    @ApiModelProperty("商品编码")
+    @NotBlank(message = "商品编码不能空")
+    private String goodsId;
+
+    @ApiModelProperty("商品名称")
+    @NotBlank(message = "商品名称不能空")
+    private String goodsName;
+
+    @ApiModelProperty("单位id")
+    private String goodsStockUnit;
+
+    @ApiModelProperty("物料组名称")
+    private String materialGroupName;
+
+    @ApiModelProperty("发生单价")
+    private BigDecimal price;
+
+    @ApiModelProperty("相关单号")
+    @NotBlank(message = "相关单号不能空")
+    private String ref;
+
+    @ApiModelProperty("相关单号")
+    @NotBlank(message = "相关单据类型不能空")
+    private String refType;
+
+    @ApiModelProperty("配件属性 NEW=新件 OLD=旧件")
+    @NotBlank(message = "配件属性不能空")
+    private String partsAttr;
+
+    @ApiModelProperty("变动数量")
+    @NotNull(message = "变动数量不能空")
+    private BigDecimal changeQty;
+
+    @ApiModelProperty("发生方向 ADD=增加 SUB=减少")
+    @NotBlank(message = "发生方向不能空")
+    private String directFlag;
+
+    @ApiModelProperty("备注")
+    private String remark;
+
+    @ApiModelProperty("业务对象")
+    private String obj;
+
+    @ApiModelProperty("状态 ING=在途 TAKE=已提货 USED=已使用 REFUND=退货 INIT=初始化 REFUND_NEW=返新件 REFUND_OLD=返旧件")
+    private String flag;
+
+    @ApiModelProperty("销售方式 OWM=自有 OUT=外购")
+    private String settlementType;
+
+    @ApiModelProperty("工单号")
+    private String workerOrderNo;
+
+    @ApiModelProperty("操作人")
+    @NotBlank(message = "操作人不能空")
+    private String operateBy;
+
+    @ApiModelProperty("操作时间")
+    @NotNull(message = "操作时间不能空")
+    private Date operateTime;
+
+    public WorkerStock createWorkerStock() {
+        WorkerStock workerStock = new WorkerStock();
+        BeanUtils.copyProperties(this, workerStock);
+        workerStock.setId(null)
+                .setWebsitId(StringUtils.isBlank(this.workerWebsitId) ? this.websitId : this.workerWebsitId)
+                .setWebsitName(StringUtils.isBlank(this.workerWebsitName) ? this.websitName : this.workerWebsitName)
+                .setQty(BigDecimal.ZERO)
+                .setOldQty(BigDecimal.ZERO)
+                .setTempNewQty(BigDecimal.ZERO)
+                .setTempOldQty(BigDecimal.ZERO)
+                .setWayQty(BigDecimal.ZERO)
+                .setChangeSalesQty(BigDecimal.ZERO)
+                .setCreateBy(this.operateBy)
+                .setCreateTime(this.operateTime)
+                .setUpdateBy(this.operateBy)
+                .setUpdateTime(this.operateTime);
+        return workerStock;
+    }
+
+    public void computeWorkerStock(WorkerStock workerStock, WorkerStockAcc workerStockAcc) throws RemoteServiceException {
+        BigDecimal qty;
+        if (this.partsAttr.equals(PartsAttrEnum.NEW.getKey())) {
+            qty = workerStock.getQty();
+        } else if (this.partsAttr.equals(PartsAttrEnum.OLD.getKey())) {
+            qty = workerStock.getOldQty();
+        } else if (this.partsAttr.equals(PartsAttrEnum.TEMP_NEW.getKey())) {
+            qty = workerStock.getTempNewQty();
+        } else if (this.partsAttr.equals(PartsAttrEnum.TEMP_OLD.getKey())) {
+            qty = workerStock.getTempOldQty();
+        } else if (this.partsAttr.equals(PartsAttrEnum.WAY.getKey())) {
+            qty = workerStock.getWayQty();
+        } else if (this.partsAttr.equals(PartsAttrEnum.CHANGE_NEW.getKey())) {
+            qty = workerStock.getChangeSalesQty();
+        } else {
+            throw new RemoteServiceException("配件库存属性不匹配:" + this.partsAttr);
+        }
+        if (Objects.isNull(this.directFlag)) {
+            throw new RemoteServiceException("发生方向不符");
+        }
+        BigDecimal direct = this.directFlag.equals("ADD") ? BigDecimal.ONE : new BigDecimal("-1");
+        BigDecimal closeQty = qty.add(this.changeQty.multiply(direct));
+        if (closeQty.compareTo(BigDecimal.ZERO) < 0 && this.partsAttr.equals(PartsAttrEnum.NEW.getKey())) {
+            throw new RemoteServiceException(workerStock.getGoodsName() + ":" + this.partsAttr + "结存库存不能少于0");
+        }
+        // 注入三级帐
+        BeanUtils.copyProperties(this, workerStockAcc);
+        workerStockAcc.setQty(qty)
+                .setCloseQty(closeQty)
+                .setOperBy(this.operateBy)
+                .setOperTime(this.operateTime);
+        // 注入库存
+        if (this.partsAttr.equals(PartsAttrEnum.NEW.getKey())) {
+            workerStock.setQty(closeQty);
+        } else if (this.partsAttr.equals(PartsAttrEnum.OLD.getKey())) {
+            workerStock.setOldQty(closeQty);
+        } else if (this.partsAttr.equals(PartsAttrEnum.TEMP_NEW.getKey())) {
+            workerStock.setTempNewQty(closeQty);
+        } else if (this.partsAttr.equals(PartsAttrEnum.TEMP_OLD.getKey())) {
+            workerStock.setTempOldQty(closeQty);
+        } else if (this.partsAttr.equals(PartsAttrEnum.WAY.getKey())) {
+            workerStock.setWayQty(closeQty);
+        } else if (this.partsAttr.equals(PartsAttrEnum.CHANGE_NEW.getKey())) {
+            workerStock.setChangeSalesQty(closeQty);
+        }
+        workerStock.setOperBy(this.operateBy)
+                .setOperTime(this.operateTime);
+    }
+}

+ 13 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/stock/WorkerStockDetailBean.java

@@ -0,0 +1,13 @@
+package com.gree.mall.miniapp.bean.material.stock;
+
+import com.gree.mall.miniapp.plus.entity.WorkerStock;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel
+@Data
+public class WorkerStockDetailBean extends WorkerStock {
+    @ApiModelProperty("单位")
+    private String unit;
+}

+ 21 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/notice/NoticeParam.java

@@ -0,0 +1,21 @@
+package com.gree.mall.miniapp.bean.notice;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel
+public class NoticeParam {
+
+    private String param1;
+    private String param2;
+    private String param3;
+    private String param4;
+    private String param5;
+    private String param6;
+    @ApiModelProperty("客户手机号")
+    private String mobile;
+    @ApiModelProperty("1=下派/改派 2=预约/改约 3=支付成功 4=新工单")
+    private Integer type;
+}

+ 12 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/notice/NoticeParamBean.java

@@ -0,0 +1,12 @@
+package com.gree.mall.miniapp.bean.notice;
+
+import com.gree.mall.miniapp.plus.entity.NoticeParam;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+@ApiModel
+@Data
+public class NoticeParamBean extends NoticeParam {
+
+
+}

+ 22 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/notice/NoticeRecordVO.java

@@ -0,0 +1,22 @@
+package com.gree.mall.miniapp.bean.notice;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.gree.mall.miniapp.plus.entity.CommonFile;
+import com.gree.mall.miniapp.plus.entity.NoticeRecord;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class NoticeRecordVO extends NoticeRecord {
+
+    @ApiModelProperty(value = "文件")
+    private List<CommonFile> file;
+
+
+}

+ 63 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/order/BuyGood.java

@@ -0,0 +1,63 @@
+package com.gree.mall.miniapp.bean.order;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.gree.mall.miniapp.plus.entity.Goods;
+import com.gree.mall.miniapp.plus.entity.GoodsSpec;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@ApiModel
+@Data
+public class BuyGood {
+
+    @ApiModelProperty("商品id")
+    private String goodsId;
+    @ApiModelProperty("商品规格id")
+    private String GoodsSpecId;
+    @ApiModelProperty("购买数量")
+    private Integer num;
+    @ApiModelProperty("套购商品-框几")
+    private Integer popType;
+    @ApiModelProperty("购物车id(购物车提交订单才传)")
+    private String shoppingCartId;
+    @ApiModelProperty("团购活动id")
+    private String promotionGroupId;
+    @ApiModelProperty("秒杀活动id")
+    private String secKillId;
+    @ApiModelProperty("wxSceneId")
+    private String wxSceneId;
+
+    @ApiModelProperty("是否为满件折扣商品,不需要前端传")
+    private Boolean promotionFullPiece;
+
+    @JsonIgnore
+    private Goods goods;
+    @JsonIgnore
+    private GoodsSpec goodsSpec;
+    @JsonIgnore
+    @ApiModelProperty("单价")
+    private BigDecimal price;
+    @JsonIgnore
+    @ApiModelProperty("单个商品佣金")
+    private BigDecimal shareAmount;
+    //套购商品
+    @JsonIgnore
+    private Boolean isGoodsPackage = false;
+    //秒杀商品
+    @JsonIgnore
+    private Boolean isSecKill = false;
+    //团购商品
+    @JsonIgnore
+    private Boolean isPromotionGroup = false;
+    //原价
+    @JsonIgnore
+    private BigDecimal orgPrice;
+    //活动的商品图
+    @JsonIgnore
+    private String promotionImgUrl;
+
+
+}

+ 18 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/order/GoodsCategoryItemBean.java

@@ -0,0 +1,18 @@
+package com.gree.mall.miniapp.bean.order;
+
+import com.gree.mall.miniapp.plus.entity.GoodsCategory;
+import com.gree.mall.miniapp.plus.entity.GoodsCategoryItem;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+@ApiModel
+public class GoodsCategoryItemBean extends GoodsCategory {
+
+
+    @ApiModelProperty(value = "规格属性")
+    private List<GoodsCategoryItem> goodsCategoryItems;
+}

+ 28 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/order/LeaseOrderBean.java

@@ -0,0 +1,28 @@
+package com.gree.mall.miniapp.bean.order;
+
+import com.gree.mall.miniapp.plus.entity.LeaseOrder;
+import com.gree.mall.miniapp.plus.entity.LeaseOrderItem;
+import com.gree.mall.miniapp.plus.entity.LeaseOrderPayRecord;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.util.List;
+
+@EqualsAndHashCode(callSuper = true)
+@ApiModel
+@Data
+@Accessors(chain = true)
+public class LeaseOrderBean extends LeaseOrder {
+
+    @ApiModelProperty(value = "商品明细")
+    List<LeaseOrderItem> items;
+
+    @ApiModelProperty(value = "订金记录")
+    LeaseOrderPayRecord record;
+
+    @ApiModelProperty(value = "续租记录")
+    List<LeaseOrderPayRecord> records;
+}

+ 32 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/order/LeaseOrderVO.java

@@ -0,0 +1,32 @@
+package com.gree.mall.miniapp.bean.order;
+
+import com.gree.mall.miniapp.plus.entity.LeaseOrder;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel
+public class LeaseOrderVO extends LeaseOrder {
+
+    @ApiModelProperty(value = "商品分类名称")
+    private String categoryName;
+    @ApiModelProperty(value = "商品分类图片url")
+    private String categoryUrl;
+    @ApiModelProperty(value = "租赁商品名称")
+    private String goodsLeaseName;
+    @ApiModelProperty(value = "保修描述")
+    private String repairRemark;
+    @ApiModelProperty(value = "数量")
+    private Integer qty;
+    @ApiModelProperty(value = "起租日期")
+    private Date startDate;
+    @ApiModelProperty(value = "到期日期")
+    private Date endDate;
+    @ApiModelProperty(value = "实际到期日期")
+    private Date realEndDate;
+}

+ 18 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/order/MaterialOrderBuy.java

@@ -0,0 +1,18 @@
+package com.gree.mall.miniapp.bean.order;
+
+import com.gree.mall.miniapp.plus.entity.RpMaterialOrder;
+import com.gree.mall.miniapp.plus.entity.RpMaterialOrderItem;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+@ApiModel
+public class MaterialOrderBuy extends RpMaterialOrder {
+
+    @ApiModelProperty(value = "子订单信息")
+    private List<RpMaterialOrderItem> rpMaterialOrderItemList;
+}

+ 16 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/order/OldProductManagerAdd.java

@@ -0,0 +1,16 @@
+package com.gree.mall.miniapp.bean.order;
+
+import com.gree.mall.miniapp.plus.entity.OldProductManager;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@ApiModel
+@Data
+public class OldProductManagerAdd extends OldProductManager {
+
+    @ApiModelProperty("回收信息明细")
+    private List<OrderOldProductAdd> orderOldProductAdds;
+}

+ 41 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/order/OrderAckBean.java

@@ -0,0 +1,41 @@
+package com.gree.mall.miniapp.bean.order;
+
+import com.gree.mall.miniapp.bean.goods.AckGoodsBean;
+import com.gree.mall.miniapp.bean.goods.GoodsBean;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+@ApiModel
+@Data
+public class OrderAckBean {
+
+    @ApiModelProperty("商品总金额")
+    private BigDecimal totalAmount;
+    @ApiModelProperty("商品详情")
+    private List<AckGoodsBean> goods;
+    @ApiModelProperty("商品总数量")
+    private Integer totalNum;
+    @ApiModelProperty("openid")
+    private String openId;
+    @ApiModelProperty("是否为秒杀活动")
+    private Boolean isSecKill = false;
+    @ApiModelProperty("运费")
+    private BigDecimal freight;
+    @ApiModelProperty("优惠券或者优惠码抵消金额")
+    private BigDecimal exchangeAmount;
+    @ApiModelProperty("折扣抵消金额")
+    private BigDecimal discountAmount;
+    @ApiModelProperty("订单实际支付金额 总金额 - 优惠券/优惠码金额 - 折扣扣减金额")
+    private BigDecimal payAmount;
+    @ApiModelProperty("折扣活动的折扣")
+    private BigDecimal promotionDiscountRate;
+    @ApiModelProperty("满件打折优惠金额")
+    private BigDecimal promotionFullPieceDiscountAmount = new BigDecimal(0);
+    @ApiModelProperty("满件打折优惠说明")
+    private String promotionFullPriceRemark;
+
+}

Some files were not shown because too many files changed in this diff