‘linchangsheng’ 6 місяців тому
батько
коміт
023564fac3
100 змінених файлів з 6844 додано та 3 видалено
  1. 2 2
      mall-server-api/src/main/java/com/gree/mall/manager/schedule/SyncSchedule.java
  2. 310 0
      mall-server-sync-api/mvnw
  3. 32 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/ManagerSyncApplication.java
  4. 68 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/SwaggerConfig.java
  5. 11 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/annotation/ApiNotAuth.java
  6. 12 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/annotation/DataPermission.java
  7. 28 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/ExcelData.java
  8. 33 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/PayDetail.java
  9. 14 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/SVerification.java
  10. 68 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/SalesCustomerPartsBean.java
  11. 62 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/SalesCustomerPartsItemBean.java
  12. 31 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/WorkerNormStockBean.java
  13. 24 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/activity/PromotionActivityBean.java
  14. 32 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/activity/PromotionQuestionnaireAddBean.java
  15. 23 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/charging/ChargingStandardBean.java
  16. 37 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/common/RegionBean.java
  17. 19 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/common/WxJsApiSignBean.java
  18. 19 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/coupon/BuyGoodsInfo.java
  19. 26 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/coupon/CouponDataBean.java
  20. 17 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/coupon/UserCouponBean.java
  21. 25 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/engin/RpMaterialOrderAllVO.java
  22. 150 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/es/CommonListES.java
  23. 18 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/goods/GoodsCategoryBean.java
  24. 24 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/goods/GoodsPackageBean.java
  25. 51 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/goods/GoodsSortBean.java
  26. 19 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/material/manage/PartsApplyBean.java
  27. 19 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/material/manage/WebsitPartsSalesItemBean.java
  28. 131 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/material/manage/WebsitSalesItemBean.java
  29. 78 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/material/stock/WebsitSalesGoodsVO.java
  30. 164 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/material/stock/WebsitStockDTO.java
  31. 210 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/material/stock/WorkerStockDTO.java
  32. 108 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/material/worker/OldRefundManageItemBean.java
  33. 124 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/material/worker/PartsRefundRecordDTO.java
  34. 48 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/material/worker/SalesItemRecordDTO.java
  35. 19 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/order/OldProductManagerAdd.java
  36. 26 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/order/OrderOldProductAdd.java
  37. 19 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/order/OrderOldProductDTO.java
  38. 107 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/order/WorkerOrderInfo.java
  39. 23 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/policy/PolicyDetail.java
  40. 43 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/settle/repair/DailyWorkerIssueSalaryBean.java
  41. 15 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/websit/SettlementOrderDetail.java
  42. 134 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/websit/WebsitPartsRetVO.java
  43. 19 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/worker/WebsitWorkerBean.java
  44. 76 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/workorder/OrderAddBean2DTO.java
  45. 25 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/workorder/PgOrderProductDetailVO.java
  46. 15 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/wxCustomer/SimpleTagBean.java
  47. 19 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/wxCustomer/WxCustomerTagBean.java
  48. 15 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/commonmapper/CoustomUserCouponMapper.java
  49. 73 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/component/StartRunner.java
  50. 26 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/config/CorsConfiguration.java
  51. 19 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/config/FeignConfigure.java
  52. 70 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/config/GlobalDefaultExceptionHandler.java
  53. 62 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/config/MpMetaObjectHandler.java
  54. 31 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/config/MulitpartConfig.java
  55. 84 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/config/MyBatisPlusConfig.java
  56. 43 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/config/MySecurityConfig.java
  57. 110 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/config/RedisConfig.java
  58. 17 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/config/RedisLockConfiguration.java
  59. 57 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/config/RespondeBodyConfig.java
  60. 21 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/config/ScheduleConfig.java
  61. 66 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/config/TheaderPoolConfig.java
  62. 81 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/config/aop/ApiAspect.java
  63. 130 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/config/aop/OperationLogAspect.java
  64. 98 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/config/datascope/DataScopeInnerInterceptor.java
  65. 71 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/constant/DailyConstant.java
  66. 21 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/constant/SybConstants.java
  67. 19 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/constant/SysDictConstant.java
  68. 142 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/CarouselMapController.java
  69. 125 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/FreightController.java
  70. 109 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/ManuelController.java
  71. 115 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/StorageController.java
  72. 86 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/activity/PromotionActivityController.java
  73. 70 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/activity/PromotionApplyController.java
  74. 78 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/activity/PromotionDiscountController.java
  75. 76 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/activity/PromotionFullPieceController.java
  76. 160 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/activity/PromotionGroupController.java
  77. 53 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/activity/PromotionGroupUserController.java
  78. 129 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/activity/PromotionLuckDrawController.java
  79. 95 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/activity/PromotionQuestionnaireController.java
  80. 193 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/activity/SecKillController.java
  81. 71 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminCompanyPayConfigController.java
  82. 48 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminCompanyWechatOtherController.java
  83. 61 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminCompanyWechatTemplateController.java
  84. 160 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminDeptController.java
  85. 56 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminModuleController.java
  86. 85 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminRoleController.java
  87. 271 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminUserController.java
  88. 162 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminWebsitController.java
  89. 60 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/OperationLogController.java
  90. 66 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/ew/EnterpriseWechatWithUserController.java
  91. 161 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/ew/EnterpriseWechatWorkerController.java
  92. 202 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/big/BigController.java
  93. 14 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/big/ServiceClassController.java
  94. 92 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/comlist/ComListAllController.java
  95. 110 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/comlist/ComListController.java
  96. 96 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/comlist/WorkerComListController.java
  97. 3 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/CallRecordController.java
  98. 1 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/CommonController.java
  99. 2 0
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/CompanyRecordController.java
  100. 1 1
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/GreeLogic.java

+ 2 - 2
mall-server-api/src/main/java/com/gree/mall/manager/schedule/SyncSchedule.java

@@ -15,8 +15,8 @@ import java.io.IOException;
 /**
  * 定时购买保险
  */
-@ConditionalOnProperty(name = "schedule.enable", havingValue = "true", matchIfMissing = true)
-@Component
+//@ConditionalOnProperty(name = "schedule.enable", havingValue = "true", matchIfMissing = true)
+//@Component
 public class SyncSchedule {
 
 

+ 310 - 0
mall-server-sync-api/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 "$@"

+ 32 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/ManagerSyncApplication.java

@@ -0,0 +1,32 @@
+package com.gree.mall.manager;
+
+import com.gree.mall.manager.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.scheduling.annotation.EnableAsync;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+@SpringBootApplication
+@ServletComponentScan(basePackages = {"com.gree.mall.manager"})
+@EnableAsync
+@EnableScheduling
+//@EnableFeignClients
+@EnableDiscoveryClient
+@EnableCaching
+@MapperScan(basePackages = {
+        "com.gree.mall.manager.plus.mapper",
+        "com.gree.mall.manager.commonmapper"
+})
+public class ManagerSyncApplication {
+
+    public static void main(String[] args) {
+        ApplicationContext context = SpringApplication.run(ManagerSyncApplication.class, args);
+        ApplicationContextUtils.setApplicationContext(context);
+    }
+
+}

+ 68 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/SwaggerConfig.java

@@ -0,0 +1,68 @@
+package com.gree.mall.manager;
+
+/**
+ *
+ */
+
+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.manager.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();
+        List<Parameter> pars = new ArrayList<>();
+        tokenPar.name("x-token").description("校验TOKEN").modelRef(new ModelRef("string")).defaultValue("1111").parameterType("header").required(false).build();
+        pars.add(tokenPar.build());
+        return pars;
+    }
+}

+ 11 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/annotation/ApiNotAuth.java

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

+ 12 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/annotation/DataPermission.java

@@ -0,0 +1,12 @@
+package com.gree.mall.manager.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-server-sync-api/src/main/java/com/gree/mall/manager/bean/ExcelData.java

@@ -0,0 +1,28 @@
+package com.gree.mall.manager.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;
+}

+ 33 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/PayDetail.java

@@ -0,0 +1,33 @@
+package com.gree.mall.manager.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Accessors(chain = true)
+@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;
+    @ApiModelProperty(value = "支付金额")
+    private BigDecimal payAmount;
+    @ApiModelProperty(value = "支付失效时间")
+    private Date timeExpire;
+}

+ 14 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/SVerification.java

@@ -0,0 +1,14 @@
+package com.gree.mall.manager.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位编码
+}

+ 68 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/SalesCustomerPartsBean.java

@@ -0,0 +1,68 @@
+package com.gree.mall.manager.bean;
+
+
+import com.gree.mall.manager.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 workerNumber;
+
+    @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;
+
+}

+ 62 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/SalesCustomerPartsItemBean.java

@@ -0,0 +1,62 @@
+package com.gree.mall.manager.bean;
+
+
+import com.gree.mall.manager.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;
+}

+ 31 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/WorkerNormStockBean.java

@@ -0,0 +1,31 @@
+package com.gree.mall.manager.bean;
+
+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;
+}

+ 24 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/activity/PromotionActivityBean.java

@@ -0,0 +1,24 @@
+package com.gree.mall.manager.bean.activity;
+
+import com.gree.mall.manager.plus.entity.PromotionActivity;
+import com.gree.mall.manager.plus.entity.PromotionActivityItem;
+import com.gree.mall.manager.plus.entity.PromotionActivityRecord;
+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 List<PromotionActivityRecord> records;
+
+}

+ 32 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/activity/PromotionQuestionnaireAddBean.java

@@ -0,0 +1,32 @@
+package com.gree.mall.manager.bean.activity;
+
+import com.gree.mall.manager.plus.entity.PromotionQuestionnaire;
+import com.gree.mall.manager.plus.entity.PromotionQuestionnaireItem;
+import com.gree.mall.manager.plus.entity.PromotionQuestionnaireQrcode;
+import com.gree.mall.manager.plus.entity.PromotionQuestionnaireUser;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 问卷活动新增
+ * @author :lijh
+ * @description:TODO
+ * @date :2024/5/7 10:33
+ */
+@ApiModel
+@Data
+public class PromotionQuestionnaireAddBean extends PromotionQuestionnaire {
+
+    @ApiModelProperty("提交记录")
+    private List<PromotionQuestionnaireUser> promotionQuestionnaireUsers;
+    @ApiModelProperty("活动题目")
+    private List<PromotionQuestionnaireItem> promotionQuestionnaireItems;
+    @ApiModelProperty("各网点二维码")
+    private List<PromotionQuestionnaireQrcode> promotionQuestionnaireQrcodes;
+    @ApiModelProperty("状态0=未开始 1=进行中 2=已过期 3=已终止")
+    private Integer status;
+
+}

+ 23 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/charging/ChargingStandardBean.java

@@ -0,0 +1,23 @@
+package com.gree.mall.manager.bean.charging;
+
+import com.gree.mall.manager.plus.entity.ChargingStandard;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+@EqualsAndHashCode(callSuper = true)
+@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-server-sync-api/src/main/java/com/gree/mall/manager/bean/common/RegionBean.java

@@ -0,0 +1,37 @@
+package com.gree.mall.manager.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;
+
+
+}

+ 19 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/common/WxJsApiSignBean.java

@@ -0,0 +1,19 @@
+package com.gree.mall.manager.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-server-sync-api/src/main/java/com/gree/mall/manager/bean/coupon/BuyGoodsInfo.java

@@ -0,0 +1,19 @@
+package com.gree.mall.manager.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;
+}

+ 26 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/coupon/CouponDataBean.java

@@ -0,0 +1,26 @@
+package com.gree.mall.manager.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;
+
+}

+ 17 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/coupon/UserCouponBean.java

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

+ 25 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/engin/RpMaterialOrderAllVO.java

@@ -0,0 +1,25 @@
+package com.gree.mall.manager.bean.engin;
+
+import com.gree.mall.manager.plus.entity.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+@ApiModel
+public class RpMaterialOrderAllVO extends RpMaterialOrder {
+
+    @ApiModelProperty(value = "item")
+    private List<RpMaterialOrderItem> rpMaterialOrderItems;
+
+    @ApiModelProperty(value = "工单师傅")
+    private List<PgOrderWorker> pgOrderWorkers;
+
+    @ApiModelProperty(value = "工单")
+    private PgOrderBase pgOrderBase;
+
+    @ApiModelProperty(value = "工单产品")
+    private List<PgOrderProduct> pgOrderProducts;
+}

+ 150 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/es/CommonListES.java

@@ -0,0 +1,150 @@
+package com.gree.mall.manager.bean.es;
+
+/*
+ * 通用列表
+ * */
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.data.annotation.Id;
+import org.springframework.data.elasticsearch.annotations.Document;
+import org.springframework.data.elasticsearch.annotations.Field;
+import org.springframework.data.elasticsearch.annotations.FieldType;
+
+/**
+ *  FieldIndex.not_analyzed:不会分词,只能根据原词索引Field;
+ *  FieldIndex.analyzed:根据分词器分词,可以根据原词和分词后的词条索引Field;
+ *  FieldIndex.no:该字段不会被索引,查不到;
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@ApiModel
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Document(indexName = "common_list_v2", type = "_doc", replicas = 1, shards = 1, createIndex = true)
+public class CommonListES {
+
+    @Id
+    @Field(index = false, store = true, type = FieldType.Keyword)//index:设置通过这个字段是否可以进行搜索
+    private String id;
+    /**
+     * 1=标题,2=内容
+     */
+    @ApiModelProperty("1=标题,2=内容")
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String type;
+    //外键id
+    @Field(index = false, store = true, type = FieldType.Integer)
+    private String comListId;
+    @ApiModelProperty("网点编号")
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String websitNumber;
+    @ApiModelProperty("师傅编号")
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String workerNumber;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field1;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field2;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field3;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field4;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field5;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field6;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field7;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field8;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field9;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field10;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field11;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field12;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field13;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field14;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field15;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field16;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field17;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field18;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field19;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field20;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field21;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field22;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field23;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field24;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field25;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field26;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field27;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field28;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field29;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field30;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field31;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field32;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field33;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field34;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field35;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field36;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field37;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field38;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field39;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field40;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field41;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field42;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field43;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field44;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field45;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field46;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field47;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field48;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field49;
+    @Field(index = false, store = true, type = FieldType.Keyword)
+    private String field50;
+
+}

+ 18 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/goods/GoodsCategoryBean.java

@@ -0,0 +1,18 @@
+package com.gree.mall.manager.bean.goods;
+
+import com.gree.mall.manager.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-server-sync-api/src/main/java/com/gree/mall/manager/bean/goods/GoodsPackageBean.java

@@ -0,0 +1,24 @@
+package com.gree.mall.manager.bean.goods;
+
+import com.gree.mall.manager.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{
+
+    @ApiModelProperty("商品名称")
+    private String goodsName;
+    @ApiModelProperty("图片")
+    private String imgUrl;
+    @ApiModelProperty("规格")
+    private List<GoodsPackagePopBean> goodsPackagePopList;
+    @ApiModelProperty("排序")
+    private Integer sortNum;
+
+}

+ 51 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/goods/GoodsSortBean.java

@@ -0,0 +1,51 @@
+package com.gree.mall.manager.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=库存 LEASE_PRICE=租赁价格 DEPOSIT=租赁定金")
+    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;
+                case "LEASE_PRICE" :
+                    sb.append("a.lease_price ").append(goodsSortBean.isType() ? "ASC," : "DESC,");
+                    break;
+                case "DEPOSIT" :
+                    sb.append("a.deposit_price ").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);
+    }
+}

+ 19 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/material/manage/PartsApplyBean.java

@@ -0,0 +1,19 @@
+package com.gree.mall.manager.bean.material.manage;
+
+import com.gree.mall.manager.plus.entity.WebsitPartsApply;
+import com.gree.mall.manager.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)
+@Data
+@ApiModel
+public class PartsApplyBean extends WebsitPartsApply {
+
+    @ApiModelProperty(value = "明细")
+    private List<WebsitPartsApplyItem> items;
+}

+ 19 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/material/manage/WebsitPartsSalesItemBean.java

@@ -0,0 +1,19 @@
+package com.gree.mall.manager.bean.material.manage;
+
+import com.gree.mall.manager.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 WebsitPartsSalesItemBean extends WebsitPartsSalesItem {
+
+    @ApiModelProperty("可用库存")
+    private BigDecimal stockQty;
+
+}

+ 131 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/material/manage/WebsitSalesItemBean.java

@@ -0,0 +1,131 @@
+package com.gree.mall.manager.bean.material.manage;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.math.BigDecimal;
+
+@ApiModel
+@Data
+public class WebsitSalesItemBean {
+
+    @ApiModelProperty(value = "ID")
+    private String id;
+
+    @ApiModelProperty(value = "销售单号")
+    private String salesId;
+
+    @ApiModelProperty(value = "商品类型 M=辅材 P=配件")
+    private String goodsType;
+
+    @ApiModelProperty(value = "网点编号")
+    private String websitId;
+
+    @ApiModelProperty(value = "网点名称")
+    private String websitName;
+
+    @ApiModelProperty(value = "商品价格id")
+    private String goodsPriceId;
+
+    @NotBlank(message = "商品编号不能为空")
+    @ApiModelProperty(value = "商品编号")
+    private String goodsId;
+
+    @NotBlank(message = "商品名称不能为空")
+    @ApiModelProperty(value = "商品名称")
+    private String goodsName;
+
+    @NotNull(message = "销售数量不能为空")
+    @Min(value = 1, message = "销售数量不能少于1")
+    @ApiModelProperty(value = "销售数量")
+    private BigDecimal salesQty;
+
+    @NotNull(message = "售价不能为空")
+    @ApiModelProperty(value = "售价")
+    private BigDecimal price;
+
+    @ApiModelProperty(value = "销售金额")
+    private BigDecimal saleAmount;
+
+    @ApiModelProperty(value = "收费标准")
+    private BigDecimal normPrice;
+
+    @ApiModelProperty(value = "网点销售单位")
+    private String goodsStockUnit;
+
+    @ApiModelProperty(value = "师傅销售单位")
+    private String goodsSalesUnit;
+
+    @ApiModelProperty(value = "规格型号")
+    private String goodsSpecification;
+
+    @ApiModelProperty(value = "销售单位转换系数")
+    private BigDecimal goodsSalesConvertQty;
+
+    @ApiModelProperty(value = "转换数保留小数位(以0舍1入方式保留)")
+    private Integer convertBitScale;
+
+    @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 oldRefundQty;
+
+    @ApiModelProperty(value = "支付方式 CASH=现金 WECHAT=微信")
+    private String payType;
+
+    @ApiModelProperty(value = "退货数量")
+    private BigDecimal retQty;
+
+    @ApiModelProperty(value = "是否入师傅库存 NO=否 YES=是")
+    private String manageWorkerStock;
+
+    @ApiModelProperty(value = "转换师傅单价")
+    private BigDecimal convertPrice;
+
+    @ApiModelProperty(value = "转换师傅入库数量")
+    private BigDecimal convertQty;
+
+    @ApiModelProperty(value = "转换师傅退货数量")
+    private BigDecimal convertRetQty;
+
+    @ApiModelProperty(value = "师傅商品id")
+    private String workerGoodsId;
+
+    @ApiModelProperty(value = "师傅商品名称")
+    private String workerGoodsName;
+
+    @ApiModelProperty(value = "库存数量(保存状态时显示)")
+    private BigDecimal stockQty;
+
+    @ApiModelProperty(value = "商品信息来源 BASE=基础资料 ENGIN=工程基础资料")
+    private String itemSourceType;
+
+    @ApiModelProperty(value = "商品信息id")
+    private String itemSourceId;
+
+    @ApiModelProperty(value = "收费类型 M=物料收费 S=服务收费")
+    private String normType;
+
+    @ApiModelProperty(value = "原配件单价")
+    private BigDecimal origPartsPrice;
+}

+ 78 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/material/stock/WebsitSalesGoodsVO.java

@@ -0,0 +1,78 @@
+package com.gree.mall.manager.bean.material.stock;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+public class WebsitSalesGoodsVO {
+
+    @ApiModelProperty(value = "商品编号")
+    private String id;
+
+    @ApiModelProperty(value = "商品编号")
+    private String goodsId;
+
+    @ApiModelProperty(value = "商品名称")
+    private String goodsName;
+
+    @ApiModelProperty(value = "配件编号")
+    private String partsNumber;
+
+    @ApiModelProperty(value = "配件名称")
+    private String partsName;
+
+    @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 = "商品信息来源 BASE=基础资料 ENGIN=工程基础资料 M_NORM=辅材收费标准")
+    private String itemSourceType;
+
+    @ApiModelProperty(value = "商品信息id")
+    private String itemSourceId;
+
+    @ApiModelProperty(value = "收费标准")
+    private String normType;
+
+    @ApiModelProperty(value = "配件类型")
+    private String partType;
+
+    @ApiModelProperty(value = "物料组")
+    private String materialGroupName;
+
+    @ApiModelProperty(value = "市场价")
+    private BigDecimal marketPrice;
+
+    @ApiModelProperty(value = "销售价格")
+    private BigDecimal salesPrice;
+
+    @ApiModelProperty(value = "旧件库存数量")
+    private BigDecimal oldQty;
+}

+ 164 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/material/stock/WebsitStockDTO.java

@@ -0,0 +1,164 @@
+package com.gree.mall.manager.bean.material.stock;
+
+import com.gree.mall.manager.enums.material.DirectFlagEnum;
+import com.gree.mall.manager.enums.material.PartsAttrEnum;
+import com.gree.mall.manager.exception.RemoteServiceException;
+import com.gree.mall.manager.plus.entity.WebsitStock;
+import com.gree.mall.manager.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() + "\"商品库存不允许为负");
+//        }
+        if (closeQty.compareTo(BigDecimal.ZERO) < 0 && direct.compareTo(BigDecimal.ZERO) < 0) {
+            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);
+    }
+}

+ 210 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/material/stock/WorkerStockDTO.java

@@ -0,0 +1,210 @@
+package com.gree.mall.manager.bean.material.stock;
+
+import com.gree.mall.manager.enums.material.DirectFlagEnum;
+import com.gree.mall.manager.enums.material.PartsAttrEnum;
+import com.gree.mall.manager.enums.material.WebsitGoodsTypeEnum;
+import com.gree.mall.manager.exception.RemoteServiceException;
+import com.gree.mall.manager.plus.entity.WorkerStock;
+import com.gree.mall.manager.plus.entity.WorkerStockAcc;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+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("网点商品编码")
+    private String websitGoodsId;
+
+    @ApiModelProperty("网点商品名称")
+    private String websitGoodsName;
+
+    @ApiModelProperty("网点商品转换系数")
+    private BigDecimal goodsSalesConvertQty;
+
+    @ApiModelProperty("网点规格型号")
+    private String goodsSpecification;
+
+    @ApiModelProperty("网点销售数量")
+    private BigDecimal websitGoodsQty;
+
+    @ApiModelProperty("网点销售价")
+    private BigDecimal websitGoodsPrice;
+
+    @ApiModelProperty("物料组名称")
+    private String materialGroupName;
+
+    @ApiModelProperty("单位")
+    private String goodsStockUnit;
+
+    @ApiModelProperty("发生单价")
+    private BigDecimal price;
+
+    @ApiModelProperty("相关单号")
+    @NotBlank(message = "相关单号不能空")
+    private String ref;
+
+    @ApiModelProperty("相关单号")
+    @NotBlank(message = "相关单据类型不能空")
+    private String refType;
+
+    @ApiModelProperty("配件属性 NEW=新件 OLD=旧件 WAY=在途 TEMPNEW=临占新件 TEMPOLD=临占旧件")
+    @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("状态 USED=已使用 REFUND=退货 INIT=初始化 REFUND_NEW=返新件 REFUND_OLD=返旧件")
+    private String flag;
+
+    @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(this.websitId)
+                .setWebsitName(this.websitName)
+                .setQty(BigDecimal.ZERO)
+                .setOldQty(BigDecimal.ZERO)
+                .setTempNewQty(BigDecimal.ZERO)
+                .setTempOldQty(BigDecimal.ZERO)
+                .setWayQty(BigDecimal.ZERO)
+                .setChangeSalesQty(BigDecimal.ZERO)
+                .setOperBy(this.operateBy)
+                .setOperTime(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(DirectFlagEnum.ADD.getKey()) ? BigDecimal.ONE : new BigDecimal("-1");
+        BigDecimal closeQty = qty.add(this.changeQty.multiply(direct));
+        if (closeQty.compareTo(BigDecimal.ZERO) < 0 && workerStock.getGoodsType().equals(WebsitGoodsTypeEnum.P.getKey())) {
+            throw new RemoteServiceException(workerStock.getGoodsName() + ":" + PartsAttrEnum.valueOf(this.partsAttr).getRemark() + "结存库存不能少于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);
+    }
+
+}

+ 108 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/material/worker/OldRefundManageItemBean.java

@@ -0,0 +1,108 @@
+package com.gree.mall.manager.bean.material.worker;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.gree.mall.manager.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;
+}

+ 124 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/material/worker/PartsRefundRecordDTO.java

@@ -0,0 +1,124 @@
+package com.gree.mall.manager.bean.material.worker;
+
+import cn.hutool.core.date.DateUtil;
+import com.gree.mall.manager.enums.material.PartsRefTypeEnum;
+import com.gree.mall.manager.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.getKey()) || refType.equals(PartsRefTypeEnum.NEW_REFUND.getKey())) {
+            // 旧件返还保内或新件返还 全额退还
+            this.refundAmount = salesOrderItem.getSalesPrice().multiply(qty);
+        } else if (refType.equals(PartsRefTypeEnum.OUTSIDE_TO_SALES.getKey())) {
+            // 保外新件转销售的市场价-优惠价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);
+    }
+}

+ 48 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/material/worker/SalesItemRecordDTO.java

@@ -0,0 +1,48 @@
+package com.gree.mall.manager.bean.material.worker;
+
+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;
+
+
+}

+ 19 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/order/OldProductManagerAdd.java

@@ -0,0 +1,19 @@
+package com.gree.mall.manager.bean.order;
+
+import com.gree.mall.manager.plus.entity.OldProductManager;
+import com.gree.mall.manager.plus.entity.OldProductManagerItem;
+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 OldProductManagerAdd extends OldProductManager {
+
+    @ApiModelProperty("回收信息明细")
+    private List<OrderOldProductAdd> orderOldProductAdds;
+}

+ 26 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/order/OrderOldProductAdd.java

@@ -0,0 +1,26 @@
+package com.gree.mall.manager.bean.order;
+
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.models.auth.In;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+@Data
+public class OrderOldProductAdd {
+
+    @ApiModelProperty("规格id")
+    private String id;
+
+    @ApiModelProperty("数量")
+    private Integer num;
+
+    @ApiModelProperty("价格")
+    private BigDecimal payAmount;
+
+
+
+    @ApiModelProperty("属性id")
+    private List<String> itemIds;
+}

+ 19 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/order/OrderOldProductDTO.java

@@ -0,0 +1,19 @@
+package com.gree.mall.manager.bean.order;
+
+
+import com.gree.mall.manager.plus.entity.OrderOldProduct;
+import com.gree.mall.manager.plus.entity.OrderOldProductItem;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@ApiModel
+@Data
+public class OrderOldProductDTO extends OrderOldProduct {
+
+
+    @ApiModelProperty(value = "属性信息")
+    private List<OrderOldProductItem> itemList;
+}

+ 107 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/order/WorkerOrderInfo.java

@@ -0,0 +1,107 @@
+package com.gree.mall.manager.bean.order;
+
+import com.gree.mall.manager.plus.entity.OrderDetail;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+@ApiModel
+@Data
+public class WorkerOrderInfo {
+
+    @ApiModelProperty("信息编号")
+    private String workerOrder;
+    @ApiModelProperty("总部信息编号")
+    private String pgid;
+    @ApiModelProperty("工单状态数值")
+    private Integer orderStateInt;
+    @ApiModelProperty("工单状态")
+    private String orderState;
+    @ApiModelProperty("售后服务网点编号")
+    private String installNumber;
+    @ApiModelProperty("售后服务网点名称")
+    private String installName;
+    @ApiModelProperty("主要服务人员")
+    private String workerName;
+    @ApiModelProperty("主要服务人员电话")
+    private String workerPhone;
+    @ApiModelProperty("工单接收时间")
+    private String orderReceTime;
+    @ApiModelProperty("完工时间")
+    private String finishTime;
+    @ApiModelProperty("工单反馈信息")
+    private List<Fkxx> fkxxs;
+    @ApiModelProperty("辅材支付信息")
+    private List<Fcxx> fcxxs;
+    @ApiModelProperty("订单明细")
+    private List<OrderDetail> orderDetails;
+    @ApiModelProperty("订单号")
+    private String orderId;
+    @ApiModelProperty("下单时间")
+    private Date payTime;
+    @ApiModelProperty("辅助人员名称")
+    private String assistName;
+    @ApiModelProperty("预约时间")
+    private String reserveTime;
+    @ApiModelProperty("服务内容")
+    private String serverContent;
+    @ApiModelProperty("支架")
+    private String bracket;
+    @ApiModelProperty("加长管")
+    private String pipe;
+    @ApiModelProperty("空气开关")
+    private String switchFlag;
+    @ApiModelProperty("高空作业")
+    private String highAltitude;
+    @ApiModelProperty("一次成型墙孔")
+    private String hole;
+    @ApiModelProperty("服务备注")
+    private String remark;
+
+    @ApiModel
+    @Data
+    public static class Fkxx{
+        @ApiModelProperty("操作类型")
+        private String operatorType;
+        @ApiModelProperty("操作内容")
+        private String operatorContent;
+        @ApiModelProperty("最后操作时间")
+        private String lastOperatorTime;
+        @ApiModelProperty("操作人")
+        private String operatorName;
+        @ApiModelProperty("操作网点")
+        private String operatorWebsit;
+        @ApiModelProperty("反馈结果")
+        private String result;
+        @ApiModelProperty("附件")
+        private String files;
+    }
+
+    @ApiModel
+    @Data
+    public static class Fcxx{
+        @ApiModelProperty("id")
+        private Integer id;
+        @ApiModelProperty("费用单号")
+        private String orderNo;
+        @ApiModelProperty("操作网点")
+        private String operatorWebsit;
+        @ApiModelProperty("操作人")
+        private String operatorName;
+        @ApiModelProperty("支付状态")
+        private String payStatus;
+        @ApiModelProperty("支付时间")
+        private String payTime;
+        @ApiModelProperty("金额")
+        private String amount;
+        @ApiModelProperty("备注")
+        private String remark;
+        @ApiModelProperty("详情")
+        private List<Map<String,Object>> details;
+    }
+
+}

+ 23 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/policy/PolicyDetail.java

@@ -0,0 +1,23 @@
+package com.gree.mall.manager.bean.policy;
+
+import com.gree.mall.manager.plus.entity.Policy;
+import com.gree.mall.manager.plus.entity.PolicyRange;
+import com.gree.mall.manager.plus.entity.PolicyWebsit;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@ApiModel
+@Data
+public class PolicyDetail extends Policy {
+
+
+    @ApiModelProperty(value = "保单范围")
+    private List<PolicyRange> policyRanges;
+
+
+    @ApiModelProperty(value = "网点")
+    private List<PolicyWebsit> policyWebsits;
+}

+ 43 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/settle/repair/DailyWorkerIssueSalaryBean.java

@@ -0,0 +1,43 @@
+package com.gree.mall.manager.bean.settle.repair;
+
+import com.gree.mall.manager.plus.entity.SettleDailyImportSummaryItem;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+@EqualsAndHashCode(callSuper = true)
+@ApiModel
+@Data
+public class DailyWorkerIssueSalaryBean extends SettleDailyImportSummaryItem {
+
+    @ApiModelProperty(value = "银行卡号")
+    private String bankAccount;
+
+    @ApiModelProperty(value = "户名")
+    private String bankAccountName;
+
+    @ApiModelProperty(value = "开户行")
+    private String depositBank;
+
+    @ApiModelProperty(value = "发放状态 1.待发放 2.已发放")
+    private Integer issueStatus;
+
+    @ApiModelProperty(value = "发放时间")
+    private String issueTime;
+
+    @ApiModelProperty(value = "发放人")
+    private String issueBy;
+
+    @ApiModelProperty(value = "是否扣减 1是 2否")
+    private Integer reduceStatus;
+
+    @ApiModelProperty(value = "结算时间 reduceStatus=1取")
+    private Date reduceTime;
+
+    @ApiModelProperty(value = "1.已发放 2.未发放 3.暂不结算 4.已扣回")
+    private String tStatus;
+
+}

+ 15 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/websit/SettlementOrderDetail.java

@@ -0,0 +1,15 @@
+package com.gree.mall.manager.bean.websit;
+
+import com.gree.mall.manager.plus.entity.SettlementOrder;
+import com.gree.mall.manager.plus.entity.SettlementOrderItem;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class SettlementOrderDetail extends SettlementOrder {
+
+    @ApiModelProperty(value = "子信息")
+    private List<SettlementOrderItem> settlementOrderItemList;
+}

+ 134 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/websit/WebsitPartsRetVO.java

@@ -0,0 +1,134 @@
+package com.gree.mall.manager.bean.websit;
+
+import com.gree.mall.manager.annotation.ZfireField;
+import com.gree.mall.manager.enums.ExamineStatusEnum;
+import com.gree.mall.manager.enums.material.PartsAttrEnum;
+import com.gree.mall.manager.enums.material.PayTypeEnum;
+import com.gree.mall.manager.enums.material.WebsitGoodsTypeEnum;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@ZfireField(tbName = "a")
+public class WebsitPartsRetVO   {
+
+    @ApiModelProperty(value = "返件单号")
+    private String partsRetId;
+
+    @ApiModelProperty(value = "销售单号")
+    private String salesId;
+
+    @ZfireField(hide = true)
+    @ApiModelProperty(value = "租户编号")
+    private String companyWechatId;
+
+    @ApiModelProperty(value = "网点编号")
+    private String websitId;
+
+    @ApiModelProperty(value = "网点名称")
+    private String websitName;
+
+    @ApiModelProperty(value = "商品类型")
+    private WebsitGoodsTypeEnum goodsType;
+
+    @ApiModelProperty(value = "工程师编号")
+    private String workerId;
+
+    @ApiModelProperty(value = "工程师名称")
+    private String workerName;
+
+    @ApiModelProperty(value = "工程师手机号")
+    private String workerMobile;
+
+    @ApiModelProperty(value = "销售类型")
+    private String salesType;
+
+    @ZfireField(hide = true)
+    @ApiModelProperty(value = "工程师网点编号")
+    private String workerWebsitId;
+    @ZfireField(hide = true)
+    @ApiModelProperty(value = "工程师网点名称")
+    private String workerWebsitName;
+
+    @ApiModelProperty(value = "身份证")
+    private String identity;
+
+    @ApiModelProperty(value = "销售日期")
+    private Date salesTime;
+
+    @ApiModelProperty(value = "支付方式")
+    private PayTypeEnum payType;
+
+    @ApiModelProperty(value = "类型")
+    private PartsAttrEnum type;
+
+    @ApiModelProperty(value = "支付时间")
+    private Date payTime;
+
+    @ApiModelProperty(value = "订单金额")
+    private BigDecimal totalAmount;
+
+    @ApiModelProperty(value = "支付订单号")
+    private String payNo;
+
+    @ApiModelProperty(value = "返件金额")
+    private BigDecimal totalRefundAmount;
+
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    @ApiModelProperty(value = "状态")
+    private ExamineStatusEnum 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;
+    @ZfireField(hide = true)
+    @ApiModelProperty(value = "退款时间")
+    private Date refundTime;
+    @ZfireField(hide = true)
+    @ApiModelProperty(value = "退款状态")
+    private ExamineStatusEnum refundState;
+    @ZfireField(hide = true)
+    @ApiModelProperty(value = "退款流水号")
+    private String refundSerialNo;
+
+    @ZfireField(hide = true)
+    @ApiModelProperty(value = "工程基础资料id")
+    private String orderEnginBaseId;
+
+    @ApiModelProperty(value = "工程编号")
+    private String projectNo;
+
+    @ApiModelProperty(value = "工程名称")
+    private String projectName;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "退货仓库")
+    private String storageName;
+
+}

+ 19 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/worker/WebsitWorkerBean.java

@@ -0,0 +1,19 @@
+package com.gree.mall.manager.bean.worker;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel
+@Data
+public class WebsitWorkerBean {
+
+    @ApiModelProperty(value = "师傅id")
+    private String workerId;
+
+    @ApiModelProperty(value = "师傅编号")
+    private String workerNumber;
+
+    @ApiModelProperty(value = "师傅名称")
+    private String workerName;
+}

+ 76 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/workorder/OrderAddBean2DTO.java

@@ -0,0 +1,76 @@
+package com.gree.mall.manager.bean.workorder;
+
+import com.gree.mall.manager.plus.entity.PgOrderProduct;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.util.Date;
+import java.util.List;
+
+
+@Data
+public class OrderAddBean2DTO {
+
+    @ApiModelProperty("用户地址id")
+    private String userAddressId;
+    //@NotBlank(message = "客户名称不能为空")
+    @ApiModelProperty("客户名称")
+    private String userName;
+    //@NotBlank(message = "客户手机号不能为空")
+    @ApiModelProperty("客户手机号")
+    private String phone;
+    //@NotBlank(message = "省id不能为空")
+    @ApiModelProperty("省id")
+    private String provinceId;
+    //@NotBlank(message = "市id不能为空")
+    @ApiModelProperty("市id")
+    private String cityId;
+    //@NotBlank(message = "区id不能为空")
+    @ApiModelProperty("区id")
+    private String areaId;
+    //@NotBlank(message = "街道id不能为空")
+    @ApiModelProperty("街道id")
+    private String streetId;
+    //@NotBlank(message = "省不能为空")
+    private String province;
+    //@NotBlank(message = "市不能为空")
+    private String city;
+    //@NotBlank(message = "区不能为空")
+    private String area;
+    //@NotBlank(message = "街道不能为空")
+    private String street;
+    //@NotBlank(message = "地址不能为空")
+    private String address;
+
+    @NotBlank(message = "工单类型不能为空")
+    @ApiModelProperty("工单类型")
+    private String orderSmallType;
+    @ApiModelProperty("所属网点(师傅类型必填)")
+    private String websitId;
+    @ApiModelProperty("预约上门时间")
+    private Date appointmentTime;
+    @ApiModelProperty("产品信息")
+    private List<PgOrderProduct> orderProducts;
+    @ApiModelProperty("备注")
+    private String remark;
+
+    @ApiModelProperty("延保订单id")
+    private String pgIncreOrderId;
+    @ApiModelProperty("维保id")
+    private String rpProjectRepairId;
+
+    @ApiModelProperty("师傅/客户id")
+    private String userId;
+    private String companyWechatId;
+    private String companyWechatName;
+
+    private String saleOrderId;
+
+    @ApiModelProperty("是否为拆机")
+    private Boolean isCj = false;
+    @ApiModelProperty("是否为租赁单")
+    private Boolean isZl = false;
+
+}
+

+ 25 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/workorder/PgOrderProductDetailVO.java

@@ -0,0 +1,25 @@
+package com.gree.mall.manager.bean.workorder;
+
+
+import com.gree.mall.manager.plus.entity.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+@ApiModel
+public class PgOrderProductDetailVO extends PgOrderProduct {
+
+    @ApiModelProperty(value = "采集图片")
+    private List<PgOrderDetail> pgOrderProductDetails;
+
+
+    @ApiModelProperty(value = "工单")
+    private PgOrderBase pgOrderBase;
+
+    @ApiModelProperty(value = "工程师")
+    private List<PgOrderWorker> pgOrderWorkers;
+
+}

+ 15 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/wxCustomer/SimpleTagBean.java

@@ -0,0 +1,15 @@
+package com.gree.mall.manager.bean.wxCustomer;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel
+@Data
+public class SimpleTagBean {
+    @ApiModelProperty("标签id")
+    private String tagId;
+    @ApiModelProperty("标签名称tagName")
+    private String tagName;
+
+}

+ 19 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/bean/wxCustomer/WxCustomerTagBean.java

@@ -0,0 +1,19 @@
+package com.gree.mall.manager.bean.wxCustomer;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@ApiModel
+@Data
+public class WxCustomerTagBean {
+    @ApiModelProperty("用户unionId")
+    private String unionId;
+    @ApiModelProperty("要增加的tag")
+    private List<SimpleTagBean> addTags;
+    @ApiModelProperty("要删除的tag")
+    private List<SimpleTagBean> delTags;
+
+}

+ 15 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/commonmapper/CoustomUserCouponMapper.java

@@ -0,0 +1,15 @@
+package com.gree.mall.manager.commonmapper;
+
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+@Mapper
+public interface CoustomUserCouponMapper {
+
+    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
+    void decreaseLeftTimes(@Param("id") String id);
+
+    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
+    void increaseLeftTimes(@Param("id") String id);
+}

+ 73 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/component/StartRunner.java

@@ -0,0 +1,73 @@
+package com.gree.mall.manager.component;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.ApplicationArguments;
+import org.springframework.boot.ApplicationRunner;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+import java.lang.reflect.Method;
+
+
+@Component
+public class StartRunner implements ApplicationRunner {
+    @Value("${server.port}")
+    private String port;
+    @Value("${server.servlet.context-path}")
+    private String contextPath;
+
+    @Override
+    public void run(ApplicationArguments args) throws Exception {
+        String url_format = "http://%s:%s%s/doc.html#";
+        String ip = null;
+        try {
+//            ip = IpUtil.getIpAddress();
+//            if (null == ip || "".equals(ip)) {
+//                ip = "127.0.0.1";
+//            }
+//            if (null == port || "".equals(port)) {
+//                port = "8080";
+//            }
+            String url = String.format(url_format, "127.0.0.1", port,contextPath);
+            //browse(url);
+        } catch (Exception e) {
+            System.out.println(e.getMessage());
+        }
+    }
+
+    public String getPort() {
+        return port;
+    }
+
+    public void setPort(String port) {
+        this.port = port;
+    }
+
+    private void browse(String url) throws Exception {
+        // 获取操作系统的名字
+        String osName = System.getProperty("os.name", "");
+        if (osName.startsWith("Mac OS")) {
+            // 苹果的打开方式
+            Class fileMgr = Class.forName("com.apple.eio.FileManager");
+            Method openURL = fileMgr.getDeclaredMethod("openURL", new Class[]{String.class});
+            openURL.invoke(null, new Object[]{url});
+        } else if (osName.startsWith("Windows")) {
+            // windows的打开方式。
+            Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);
+        } else {
+            // Unix or Linux的打开方式
+            String[] browsers = {"firefox", "opera", "konqueror", "epiphany", "mozilla", "netscape"};
+            String browser = null;
+            for (int count = 0; count < browsers.length && browser == null; count++)
+                // 执行代码,在brower有值后跳出,
+                // 这里是如果进程创建成功了,==0是表示正常结束。
+                if (Runtime.getRuntime().exec(new String[]{"which", browsers[count]}).waitFor() == 0)
+                    browser = browsers[count];
+            if (browser == null)
+                throw new Exception("Could not find web browser");
+            else
+                // 这个值在上面已经成功的得到了一个进程。
+                Runtime.getRuntime().exec(new String[]{browser, url});
+        }
+    }
+}

+ 26 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/config/CorsConfiguration.java

@@ -0,0 +1,26 @@
+package com.gree.mall.manager.config;
+
+import org.slf4j.LoggerFactory;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
+import org.springframework.web.filter.CorsFilter;
+
+
+@Configuration
+public class CorsConfiguration {
+    @Bean
+    public CorsFilter corsFilter() {
+
+        LoggerFactory.getLogger(this.getClass()).info("CorsFilter 启动运行");
+
+        final UrlBasedCorsConfigurationSource urlBasedCorsConfigurationSource = new UrlBasedCorsConfigurationSource();
+        final org.springframework.web.cors.CorsConfiguration corsConfiguration = new org.springframework.web.cors.CorsConfiguration();
+        corsConfiguration.setAllowCredentials(true);
+        corsConfiguration.addAllowedOrigin("*");
+        corsConfiguration.addAllowedHeader("*");
+        corsConfiguration.addAllowedMethod("*");
+        urlBasedCorsConfigurationSource.registerCorsConfiguration("/**", corsConfiguration);
+        return new CorsFilter(urlBasedCorsConfigurationSource);
+    }
+}

+ 19 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/config/FeignConfigure.java

@@ -0,0 +1,19 @@
+package com.gree.mall.manager.config;
+
+//@Configuration
+public class FeignConfigure {
+//    @Value("${ribbon.ConnectTimeout}")
+//    public int connectTimeout;
+//    @Value("${ribbon.ReadTimeout}")
+//    public int readTimeout;
+//    @Bean
+//    public Request.Options options() {
+//        return new Request.Options(connectTimeout, readTimeout);
+//    }
+//
+//    @Bean
+//    public Retryer feignRetryer() {
+//        return new Retryer.Default(1000, 3000, 3);
+//    }
+}
+

+ 70 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/config/GlobalDefaultExceptionHandler.java

@@ -0,0 +1,70 @@
+package com.gree.mall.manager.config;
+
+import com.alibaba.fastjson.JSONObject;
+import com.gree.mall.manager.exception.RemoteServiceException;
+import com.gree.mall.manager.helper.ResponseHelper;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.http.converter.HttpMessageNotReadableException;
+import org.springframework.web.bind.MethodArgumentNotValidException;
+import org.springframework.web.bind.annotation.ControllerAdvice;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.HashMap;
+import java.util.Map;
+
+@ControllerAdvice
+@ResponseBody
+@Slf4j
+public class GlobalDefaultExceptionHandler {
+
+    @ExceptionHandler(HttpMessageNotReadableException.class)
+    public ResponseHelper handleHttpMessageNotReadableException(HttpMessageNotReadableException e){
+        return ResponseHelper.error(501,"检测到参数内容格式错误");
+    }
+
+    /**
+     * 自定义验证异常
+     */
+    @ExceptionHandler(MethodArgumentNotValidException.class)
+    public ResponseHelper handleMethodArgumentNotValidException(MethodArgumentNotValidException e) {
+        log.warn(e.getMessage(), e);
+        String message = e.getBindingResult().getFieldError().getDefaultMessage();
+        return ResponseHelper.error(ResponseHelper.ResponseCode_VALIDATION_ERROR, message);
+    }
+
+    @ExceptionHandler(value = Exception.class)
+    public ResponseHelper<Object> defaultErrorHandler(HttpServletRequest req, Exception ex) {
+
+        if(ex instanceof RemoteServiceException){
+            //自定义错误就不抛出栈异常
+            //log.error("网络异常:",ex);
+            log.error("网络异常:"+ex.getMessage()+req.getRequestURI()+JSONObject.toJSONString(this.bodyParam(req)));
+            return ResponseHelper.error(((RemoteServiceException) ex).getCode(),"温馨提示:"+ex.getMessage());
+        }
+
+        log.error("系统错误:"+ex.getMessage()+req.getRequestURI()+JSONObject.toJSONString(this.bodyParam(req)),ex);
+        return ResponseHelper.error(501,"网络异常");
+    }
+
+    private Map<String,Object> bodyParam(HttpServletRequest request){
+        Map<String,Object> params = new HashMap<String, Object>();
+//        BufferedReader br;
+//        try {
+//            br = request.getReader();
+//            String str, wholeStr = "";
+//            while((str = br.readLine()) != null){
+//                wholeStr += str;
+//            }
+//            if(StringUtils.isNotBlank(wholeStr)){
+//                params = JSON.parseObject(wholeStr,Map.class);
+//            }
+//        } catch (IOException e1) {
+//            log.error(""+e1);
+//        }
+        return params;
+    }
+
+
+}

+ 62 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/config/MpMetaObjectHandler.java

@@ -0,0 +1,62 @@
+package com.gree.mall.manager.config;
+
+import com.alibaba.excel.util.StringUtils;
+import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
+import com.gree.mall.manager.utils.CommonUtils;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.ibatis.reflection.MetaObject;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+
+
+/**
+ * 自动补充插入或更新时的值
+ */
+@Slf4j
+@Component
+public class MpMetaObjectHandler implements MetaObjectHandler {
+    /**
+     * 插入时的填充策略
+     * @param metaObject
+     */
+    @Override
+    public void insertFill(MetaObject metaObject) {
+        String by = CommonUtils.getNickName();
+        String username = CommonUtils.getUsername();
+        if(StringUtils.isNotBlank(username)){
+            by = "(" + username+ ")" + by;
+        }
+        if (this.getFieldValByName("isThreeOrder",metaObject) != null)
+            return;
+
+      //  if (Objects.isNull(this.getFieldValByName("createBy", metaObject))) {
+            this.setFieldValByName("createBy", by, metaObject);
+       // }
+       // if (Objects.isNull(this.getFieldValByName("updateBy", metaObject))) {
+            this.setFieldValByName("updateBy", by, metaObject);
+       // }
+        //if (Objects.isNull(this.getFieldValByName("createTime", metaObject))) {
+            this.setFieldValByName("createTime", new Date(), metaObject);
+        //}
+        //if (Objects.isNull(this.getFieldValByName("updateTime", metaObject))) {
+            this.setFieldValByName("updateTime", new Date(), metaObject);
+        //}
+    }
+
+    /**
+     * 更新时的填充策略
+     * @param metaObject
+     */
+    @Override
+    public void updateFill(MetaObject metaObject) {
+        String by = CommonUtils.getNickName();
+        String username = CommonUtils.getUsername();
+        if(StringUtils.isNotBlank(username)){
+            by = "(" + username+ ")" + by;
+        }
+        //log.info("【更新填充】:{}",CommonUtils.getNickName());
+        this.setFieldValByName("updateBy", by, metaObject);
+        this.setFieldValByName("updateTime", new Date(), metaObject);
+    }
+}

+ 31 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/config/MulitpartConfig.java

@@ -0,0 +1,31 @@
+package com.gree.mall.manager.config;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.web.servlet.MultipartConfigFactory;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import javax.servlet.MultipartConfigElement;
+
+@Configuration
+public class MulitpartConfig {
+
+
+    @Value("${spring.profiles.active}")
+    private String env;
+    /**
+     * 文件上传临时路径
+     */
+    @Bean
+    MultipartConfigElement multipartConfigElement() {
+        MultipartConfigFactory factory = new MultipartConfigFactory();
+        if (env.equals("prd")) {
+            factory.setLocation("/home/jsmapp");
+        } else {
+            factory.setLocation("/app");
+        }
+
+        return factory.createMultipartConfig();
+    }
+
+}

+ 84 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/config/MyBatisPlusConfig.java

@@ -0,0 +1,84 @@
+package com.gree.mall.manager.config;
+
+import com.baomidou.mybatisplus.annotation.DbType;
+import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.inner.BlockAttackInnerInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
+import com.gree.mall.manager.constant.Constant;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+
+@Configuration
+@AutoConfigureAfter()
+public class MyBatisPlusConfig {
+    private final static Logger logger = LoggerFactory.getLogger(MyBatisPlusConfig.class);
+
+    /**
+     * @description: 配置分页插件
+     *
+     * @author: gradual
+     * @date: 2019/1/15 10:17
+     * @param: []
+     * @return: com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor
+     */
+//    @Bean
+//    public PaginationInterceptor paginationInterceptor() {
+//        logger.debug("注册分页插件");
+//        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
+//
+//
+//        // 攻击 SQL 阻断解析器、加入解析链,阻止恶意的全表更新删除
+//        List<ISqlParser> sqlParserList = new ArrayList<>();
+//        sqlParserList.add(new BlockAttackSqlParser());
+//        paginationInterceptor.setSqlParserList(sqlParserList);
+//        paginationInterceptor.setLimit(10000);
+//        return paginationInterceptor;
+//    }
+
+
+    /**
+     * @description: SQL执行效率插件
+     *
+     * @author: gradual
+     * @date: 19-1-24 下午4:59
+     * @param: []
+     * @return: com.baomidou.mybatisplus.extension.plugins.PerformanceInterceptor
+     */
+//    @Bean
+//    @Profile({"dev","test"})// 设置 dev test 环境开启
+//    public PerformanceInterceptor performanceInterceptor() {
+//        PerformanceInterceptor performanceInterceptor = new PerformanceInterceptor();
+//        performanceInterceptor.setFormat(true);
+//        performanceInterceptor.setMaxTime(5000);
+//        return performanceInterceptor;
+//    }
+
+    @Bean
+    public PaginationInnerInterceptor paginationInnerInterceptor() {
+        PaginationInnerInterceptor paginationInnerInterceptor = new PaginationInnerInterceptor();
+        paginationInnerInterceptor.setMaxLimit(Long.valueOf(Constant.PAGE_SIZE));
+        paginationInnerInterceptor.setDbType(DbType.MYSQL);
+        return paginationInnerInterceptor;
+    }
+
+    /**
+     * 添加分页插件
+     */
+    @Bean
+    public MybatisPlusInterceptor mybatisPlusInterceptor() {
+        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
+        interceptor.addInnerInterceptor(paginationInnerInterceptor());
+        // 添加非法SQL拦截器
+//        interceptor.addInnerInterceptor(new IllegalSQLInnerInterceptor());
+        // 阻止全表更新删除
+        interceptor.addInnerInterceptor(new BlockAttackInnerInterceptor());
+        // 自定义权限拦截器
+//        interceptor.addInnerInterceptor(new DataScopeInnerInterceptor());
+        // 如果有多数据源可以不配具体类型, 否则都建议配上具体的 DbType
+        return interceptor;
+    }
+}

+ 43 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/config/MySecurityConfig.java

@@ -0,0 +1,43 @@
+//package com.gree.mall.manager.config;
+//
+//import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
+//import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+//import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
+//import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
+//
+///**
+// * 接口安全访问名单
+// * @Author: duke
+// * @Date: 2018/9/27 10:00 AM
+// */
+//@EnableWebSecurity
+//public class MySecurityConfig extends WebSecurityConfigurerAdapter {
+//    @Override
+//    protected void configure(HttpSecurity http) throws Exception {
+//        http.headers().frameOptions().disable();
+//        http.csrf().disable() //HTTP with Disable CSRF
+//                .authorizeRequests() //Authorize Request Configuration
+//                .antMatchers(
+//                        "/v2/api-docs",
+//                        "/swagger-resources/**",
+//                        "/swagger-ui.html**",
+//                        "/doc.html**",
+//                        "/webjars/**",
+//                        "favicon.ico"
+//                )
+//                .authenticated()
+//                .and()
+//                .authorizeRequests()
+//                .antMatchers("/**").permitAll()
+//                .and()
+//                .cors()
+//                .and()
+//                .formLogin();
+//
+//    }
+//
+//    @Override
+//    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
+//        super.configure(auth);
+//    }
+//}

+ 110 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/config/RedisConfig.java

@@ -0,0 +1,110 @@
+package com.gree.mall.manager.config;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.PropertyAccessor;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.jsontype.impl.LaissezFaireSubTypeValidator;
+import com.gree.mall.manager.utils.RedisUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.cache.CacheManager;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.cache.interceptor.KeyGenerator;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.cache.RedisCacheConfiguration;
+import org.springframework.data.redis.cache.RedisCacheManager;
+import org.springframework.data.redis.cache.RedisCacheWriter;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
+import org.springframework.data.redis.core.RedisOperations;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.listener.RedisMessageListenerContainer;
+import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+
+import java.lang.reflect.Method;
+import java.time.Duration;
+
+
+@Configuration
+@EnableCaching
+@ConditionalOnClass(RedisOperations.class)
+@EnableConfigurationProperties(RedisProperties.class)
+@Slf4j
+public class RedisConfig {
+
+    @Bean
+    public RedisTemplate<String, Object> redisTemplate(LettuceConnectionFactory factory) {
+        Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class);
+        ObjectMapper om = new ObjectMapper();
+        om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
+        //om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
+        om.activateDefaultTyping(LaissezFaireSubTypeValidator.instance ,
+                ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY);
+        jackson2JsonRedisSerializer.setObjectMapper(om);
+
+        StringRedisSerializer stringRedisSerializer = new StringRedisSerializer();
+        RedisTemplate template = new RedisTemplate();
+        template.setConnectionFactory(factory);
+        template.setValueSerializer(jackson2JsonRedisSerializer);
+        template.setKeySerializer(stringRedisSerializer);
+        template.setHashKeySerializer(stringRedisSerializer);
+        template.setHashValueSerializer(jackson2JsonRedisSerializer);
+        template.afterPropertiesSet();
+        return template;
+    }
+
+    @Bean
+    public CacheManager cacheManager(RedisConnectionFactory connectionFactory) {
+        RedisCacheWriter redisCacheWriter = RedisCacheWriter.nonLockingRedisCacheWriter(connectionFactory);
+        RedisCacheConfiguration defaultCacheConfig = RedisCacheConfiguration.defaultCacheConfig();
+        //设置默认超过期时间是30秒
+        defaultCacheConfig.entryTtl(Duration.ofSeconds(30));
+        //初始化RedisCacheManager
+        RedisCacheManager cacheManager = new RedisCacheManager(redisCacheWriter, defaultCacheConfig);
+        return cacheManager;
+    }
+
+    @Bean
+    RedisMessageListenerContainer container(RedisConnectionFactory connectionFactory) {
+        RedisMessageListenerContainer container = new RedisMessageListenerContainer();
+        container.setConnectionFactory(connectionFactory);
+       // container.addMessageListener(listenerAdapter, new PatternTopic("__keyevent@0__:expired"));
+        return container;
+    }
+
+
+    /**
+     * 注入封装RedisTemplate
+     * @Title: redisUtil
+     * @return RedisUtil
+     * @throws
+     */
+    @Bean(name = "redisUtil")
+    public RedisUtil redisUtilSingle(RedisTemplate<String, Object> redisTemplate) {
+        RedisUtil redisUtil = new RedisUtil();
+        redisUtil.setRedisTemplate(redisTemplate);
+        return redisUtil;
+    }
+
+    @Bean
+    public KeyGenerator keyGenerator() {
+        return new KeyGenerator() {
+            @Override
+            public Object generate(Object target, Method method, Object... params) {
+                StringBuilder sb = new StringBuilder();
+                sb.append(target.getClass().getName());
+                sb.append(":" + method.getName());
+                for (Object obj : params) {
+                    sb.append(":" + obj.toString());
+                }
+                return sb.toString();
+            }
+        };
+    }
+
+}

+ 17 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/config/RedisLockConfiguration.java

@@ -0,0 +1,17 @@
+package com.gree.mall.manager.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.integration.redis.util.RedisLockRegistry;
+
+
+@Configuration
+public class RedisLockConfiguration {
+
+    @Bean
+    public RedisLockRegistry redisLockRegistry(RedisConnectionFactory redisConnectionFactory) {
+        return new RedisLockRegistry(redisConnectionFactory, "spring-cloud");
+    }
+
+}

+ 57 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/config/RespondeBodyConfig.java

@@ -0,0 +1,57 @@
+//package com.gree.mall.manager.config;
+//
+//
+//import com.alibaba.fastjson.JSONObject;
+//import com.fasterxml.jackson.databind.ObjectMapper;
+//import com.gree.mall.manager.helper.ResponseHelper;
+//import lombok.extern.slf4j.Slf4j;
+//import org.springframework.core.MethodParameter;
+//import org.springframework.http.MediaType;
+//import org.springframework.http.ResponseEntity;
+//import org.springframework.http.server.ServerHttpRequest;
+//import org.springframework.http.server.ServerHttpResponse;
+//import org.springframework.web.bind.annotation.ControllerAdvice;
+//import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;
+//
+//import java.text.SimpleDateFormat;
+//import java.util.Map;
+//
+///**
+// * 解决小程序不兼容datetime类型,格式化返回值
+// * created by lijh
+// *  2019-07-13
+// *
+// */
+//@ControllerAdvice
+//@Slf4j
+//public class RespondeBodyConfig implements ResponseBodyAdvice {
+//
+//
+//    @Override
+//    public Object beforeBodyWrite(Object resBody, MethodParameter arg1, MediaType arg2, Class arg3, ServerHttpRequest req,
+//                                  ServerHttpResponse res) {
+//        //resBody就是controller方法中返回的值,对其进行修改后再return就可以了
+//
+//        ObjectMapper mapper = new ObjectMapper();
+//        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+//        mapper.setDateFormat(format);
+//
+//        try {
+//            if(resBody instanceof ResponseHelper) {
+//                String json = mapper.writeValueAsString(resBody);
+//                return JSONObject.parseObject(json, ResponseHelper.class);
+//            }
+//        } catch (Exception e) {
+//            log.error("【全局返回值处理失败】",e);
+//        }
+//        return resBody;
+//    }
+//
+//    @Override
+//    public boolean supports(MethodParameter arg0, Class arg1) {
+//        //这里直接返回true,表示对任何handler的responsebody都调用beforeBodyWrite方法
+//        return true;
+//    }
+//
+//
+//}

+ 21 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/config/ScheduleConfig.java

@@ -0,0 +1,21 @@
+package com.gree.mall.manager.config;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.SchedulingConfigurer;
+import org.springframework.scheduling.config.ScheduledTaskRegistrar;
+
+import java.util.concurrent.Executors;
+
+/**
+ * schedule定时任务多线程
+ * 2019-02-21
+ */
+
+@Configuration
+public class ScheduleConfig implements SchedulingConfigurer {
+
+    @Override
+    public void configureTasks(ScheduledTaskRegistrar scheduledTaskRegistrar) {
+        scheduledTaskRegistrar.setScheduler(Executors.newScheduledThreadPool(10));
+    }
+}

+ 66 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/config/TheaderPoolConfig.java

@@ -0,0 +1,66 @@
+package com.gree.mall.manager.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
+
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadPoolExecutor;
+
+@Configuration
+@EnableAsync
+public class TheaderPoolConfig {
+
+
+    /**
+     *   默认情况下,在创建了线程池后,线程池中的线程数为0,当有任务来之后,就会创建一个线程去执行任务,
+     *	当线程池中的线程数目达到corePoolSize后,就会把到达的任务放到缓存队列当中;
+     *  当队列满了,就继续创建线程,当线程数量大于等于maxPoolSize后,开始使用拒绝策略拒绝
+     */
+
+    /** 核心线程数(默认线程数) */
+    private static final int corePoolSize = 4;
+    /** 最大线程数 */
+    private static final int maxPoolSize = 8;
+    /** 允许线程空闲时间(单位:默认为秒) */
+    private static final int keepAliveTime = 5;
+    /** 缓冲队列大小 */
+    private static final int queueCapacity = 200;
+    /** 线程池名前缀 */
+    private static final String threadNamePrefix = "Async-ManagerService-";
+
+    @Bean("taskExecutor") // bean的名称,默认为首字母小写的方法名
+    public ThreadPoolTaskExecutor taskExecutor(){
+        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
+        executor.setCorePoolSize(corePoolSize);
+        executor.setMaxPoolSize(maxPoolSize);
+        executor.setQueueCapacity(queueCapacity);
+        executor.setKeepAliveSeconds(keepAliveTime);
+        executor.setThreadNamePrefix(threadNamePrefix);
+
+        // 线程池对拒绝任务的处理策略
+        // CallerRunsPolicy:由调用线程(提交任务的线程)处理该任务
+        executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
+        // 初始化
+        executor.initialize();
+        return executor;
+    }
+    @Bean("singleTaskExecutor") // bean的名称,默认为首字母小写的方法名
+    public ThreadPoolTaskExecutor singleTaskExecutor(){
+        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
+        executor.setCorePoolSize(1);
+        executor.setMaxPoolSize(1);
+        executor.setQueueCapacity(1);
+        executor.setKeepAliveSeconds(0);
+        executor.setThreadNamePrefix(threadNamePrefix);
+        // 线程池对拒绝任务的处理策略
+        // CallerRunsPolicy:由调用线程(提交任务的线程)处理该任务
+        executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
+        // 初始化
+        executor.initialize();
+        return executor;
+    }
+
+}

+ 81 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/config/aop/ApiAspect.java

@@ -0,0 +1,81 @@
+package com.gree.mall.manager.config.aop;
+
+import com.gree.mall.manager.utils.RedisUtil;
+import org.apache.commons.lang3.StringUtils;
+import com.gree.mall.manager.annotation.ApiNotAuth;
+import com.gree.mall.manager.constant.Constant;
+import com.gree.mall.manager.exception.RemoteServiceException;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.utils.CommonUtils;
+import lombok.extern.slf4j.Slf4j;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Before;
+import org.aspectj.lang.annotation.Pointcut;
+import org.aspectj.lang.reflect.MethodSignature;
+import org.omg.CORBA.Environment;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.core.annotation.Order;
+import org.springframework.stereotype.Component;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import java.lang.reflect.Method;
+
+@Aspect
+@Component
+@Slf4j
+@Order(1)
+public class ApiAspect {
+
+    @Value("${spring.profiles.active}")
+    private String profiles;
+
+    @Pointcut("@annotation(io.swagger.annotations.ApiOperation)")
+    public void auth() {}
+
+    @Before("auth()")
+    public void doBefore(JoinPoint joinPoint) throws RemoteServiceException {
+            start(joinPoint);
+    }
+
+    private void start(JoinPoint joinPoint) throws RemoteServiceException {
+        ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        Method sourceMethod = getSourceMethod(joinPoint);
+        HttpServletRequest request = attributes.getRequest();
+        ApiNotAuth apiNotAuth = sourceMethod.getAnnotation(ApiNotAuth.class);
+        if(apiNotAuth != null){
+            return;
+        }
+
+        if(!profiles.equals("prd")){
+            if(request.getHeader(Constant.TOKEN_NAME) != null && request.getHeader(Constant.TOKEN_NAME).equals("1111")){
+                return;
+            }
+            if(request.getParameter(Constant.TOKEN_NAME) != null && request.getParameter(Constant.TOKEN_NAME).equals("1111")){
+                return;
+            }
+        }
+
+        String userId = CommonUtils.getUserId(request);
+        if (StringUtils.isBlank(userId)) {
+            throw new RemoteServiceException(ResponseHelper.ResponseCode_AUTH_ERROR, "请求不合法");
+        }
+
+    }
+
+    private Method getSourceMethod(JoinPoint jp) {
+        Method proxyMethod = ((MethodSignature) jp.getSignature()).getMethod();
+        try {
+            return jp.getTarget().getClass().getMethod(proxyMethod.getName(), proxyMethod.getParameterTypes());
+        } catch (NoSuchMethodException e) {
+            e.printStackTrace();
+        } catch (SecurityException e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+}

+ 130 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/config/aop/OperationLogAspect.java

@@ -0,0 +1,130 @@
+package com.gree.mall.manager.config.aop;
+
+import org.apache.commons.lang3.StringUtils;
+import com.gree.mall.manager.bean.admin.AdminUserCom;
+import com.gree.mall.manager.logic.common.CommonLogic;
+import com.gree.mall.manager.plus.entity.AdminUser;
+import com.gree.mall.manager.plus.entity.OperationLog;
+import com.gree.mall.manager.plus.service.AdminUserService;
+import com.gree.mall.manager.plus.service.OperationLogService;
+import com.gree.mall.manager.utils.CommonUtils;
+import com.gree.mall.manager.utils.IpUtil;
+import com.gree.mall.manager.utils.JwtUtils;
+import com.gree.mall.manager.utils.RedisUtil;
+import io.jsonwebtoken.Claims;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Before;
+import org.aspectj.lang.annotation.Pointcut;
+import org.aspectj.lang.reflect.MethodSignature;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.annotation.Order;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import java.lang.reflect.Method;
+import java.text.SimpleDateFormat;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+
+/**
+ *  操作日志
+ *  created by lijh
+ *  2020-06-03
+ */
+@Aspect
+@Component
+@Slf4j
+@Order(3)
+public class OperationLogAspect {
+
+    @Autowired
+    RedisUtil redisUtil;
+    @Autowired
+    OperationLogService operationLogService;
+    @Autowired
+    AdminUserService adminUserService;
+    @Autowired
+    CommonLogic commonLogic;
+
+    @Pointcut("@annotation(io.swagger.annotations.ApiOperation)")
+    public void auth() {}
+
+    @Before("auth()")
+    public void doBefore(JoinPoint joinPoint){
+        try{
+            start(joinPoint);
+        }catch(Exception e){
+            log.error("操作日志记录失败,{}",e.getMessage());
+        }
+
+    }
+
+
+    private void start(JoinPoint joinPoint){
+        //不记录的模块
+        List<String> modules = Arrays.asList("小程序API","公共API");
+
+        ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        HttpServletRequest request = attributes.getRequest();
+        String adminUserId = CommonUtils.getUserId(request);
+        String nickName = CommonUtils.getNickName(request);
+        Method sourceMethod = getSourceMethod(joinPoint);
+        //只记录post请求的增删改操作
+        PostMapping annotation = sourceMethod.getAnnotation(PostMapping.class);
+        if (annotation != null) {
+            ApiOperation ApiOperation = sourceMethod.getAnnotation(ApiOperation.class);
+            //方法上的注解为具体操作
+            String value = ApiOperation.value();
+            //类上的api注解为模块
+            String moduleName = joinPoint.getTarget().getClass().getAnnotation(Api.class).value();
+            if(StringUtils.isBlank(moduleName) || modules.contains(moduleName)){
+                return;
+            }
+            //登录接口获取不到token,写死
+            if(value.equals("登录")){
+                String userName = request.getParameter("userName");
+                AdminUser adminUser = adminUserService.lambdaQuery().eq(AdminUser::getUserName, userName).one();
+                nickName = adminUser.getNickName();
+                adminUserId = adminUser.getAdminUserId();
+            }
+            //当前时间
+            Date date = new Date();
+            String dateStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date);
+            //获取登录用户的企业微信id
+            AdminUserCom adminUser = commonLogic.getAdminUser(request);
+            //记录
+            OperationLog operationLog = new OperationLog();
+            operationLog.setContent(nickName + "于" + dateStr + value);
+            operationLog.setModuleName(moduleName);
+            operationLog.setAdminUserId(adminUserId);
+            operationLog.setUserName(nickName);
+            operationLog.setNickName(nickName);
+            operationLog.setIp(IpUtil.getIpAddr(request));
+            operationLog.setCreateTime(new Date());
+            operationLog.setCompanyWechatId(adminUser.getCompanyWechatId());
+            operationLog.setCompanyName(adminUser.getCompanyName());
+            operationLogService.save(operationLog);
+        }
+    }
+
+    private Method getSourceMethod(JoinPoint jp) {
+        Method proxyMethod = ((MethodSignature) jp.getSignature()).getMethod();
+        try {
+            return jp.getTarget().getClass().getMethod(proxyMethod.getName(), proxyMethod.getParameterTypes());
+        } catch (NoSuchMethodException e) {
+            e.printStackTrace();
+        } catch (SecurityException e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+}

+ 98 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/config/datascope/DataScopeInnerInterceptor.java

@@ -0,0 +1,98 @@
+package com.gree.mall.manager.config.datascope;
+
+
+import com.baomidou.mybatisplus.core.toolkit.PluginUtils;
+import com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor;
+import com.gree.mall.manager.annotation.DataPermission;
+import com.gree.mall.manager.logic.common.CommonLogic;
+import com.gree.mall.manager.utils.ApplicationContextUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.ibatis.executor.Executor;
+import org.apache.ibatis.mapping.BoundSql;
+import org.apache.ibatis.mapping.MappedStatement;
+import org.apache.ibatis.mapping.ParameterMapping;
+import org.apache.ibatis.session.ResultHandler;
+import org.apache.ibatis.session.RowBounds;
+import org.springframework.core.annotation.Order;
+import org.springframework.stereotype.Component;
+
+import java.lang.reflect.Method;
+import java.sql.SQLException;
+import java.util.List;
+
+/**
+ * 此数据权限添加不启用(无需启用)
+ */
+@Order(200)
+@Component
+public class DataScopeInnerInterceptor implements InnerInterceptor {
+
+    @Override
+    public void beforeUpdate(Executor executor, MappedStatement ms, Object parameter) throws SQLException {
+        BoundSql boundSql = ms.getBoundSql(parameter);
+        //执行sql
+        String originalSql = boundSql.getSql();
+        //sql执行新增或者修改 insert or update
+        String insertUpdate = originalSql.substring(0, originalSql.indexOf(" "));
+        //表名称
+        String tbName = insertUpdate.equals("INSERT")?originalSql.split(" ")[2]:originalSql.split(" ")[1];
+
+        List<ParameterMapping> parameterMappings =  boundSql.getParameterMappings();
+        //参数
+        Object parameterObject = boundSql.getParameterObject();
+        //parameterObject.getClass().isArray();
+
+//        log.info("parameterObject: {}",parameterObject);
+//        log.info("执行sql - originalSql: {}",originalSql);
+//
+//        if(parameterObject instanceof OrderBase){
+//            log.info("OrderBase....sql执行头:{},执行表:{}",insertUpdate,tbName);
+//        }else if(parameterObject instanceof OrderWorker){
+//            log.info("OrderWorker....sql执行头:{},执行表:{}",insertUpdate,tbName);
+//        }else if(parameterObject instanceof OrderInstallOperatingLog){
+//            log.info("OrderInstallOperatingLog....sql执行头:{},执行表:{}",insertUpdate,tbName);
+//        }
+    }
+
+
+    @Override
+    public void beforeQuery(Executor executor, MappedStatement ms, Object parameter, RowBounds rowBounds,
+                            ResultHandler resultHandler, BoundSql boundSql) {
+
+        PluginUtils.MPBoundSql mpBs = PluginUtils.mpBoundSql(boundSql);
+
+        String originalSql = boundSql.getSql();
+        //采用判断方法注解方式进行数据权限
+        Class<?> clazz = null;
+        try {
+            //获取Mapper类
+            clazz = Class.forName(ms.getId().substring(0,  ms.getId().lastIndexOf(".")));
+        } catch (ClassNotFoundException e) {
+            e.printStackTrace();
+        }
+        // 获取方法名
+        String methodName = ms.getId().substring(ms.getId().lastIndexOf(".") + 1);
+        Method[] methods = clazz.getMethods();
+        //遍历类的方法
+        for (Method method : methods) {
+            DataPermission annotation = method.getAnnotation(DataPermission.class);
+            //判断是否存在注解且方法名一致
+            if (annotation != null && methodName.equals(method.getName())){
+
+                CommonLogic commonLogic = ApplicationContextUtils.getBean(CommonLogic.class);
+                List<String> companyWechatIds = commonLogic.getAdminUser().getCompanyWechatIds();
+                if(companyWechatIds != null && companyWechatIds.size() > 0){
+                    String scopeName = annotation.field();
+                    // 优先获取赋值数据
+                    List<String> data =  companyWechatIds;
+                    String websitIds = StringUtils.join(data.toArray(), "','");
+                    websitIds = "'" + websitIds + "'";
+                    originalSql = String.format("SELECT * FROM (%s) temp_data_scope WHERE temp_data_scope.%s IN (%s)",
+                                originalSql, scopeName, websitIds);
+
+                }
+            }
+        }
+        mpBs.sql(originalSql);
+    }
+}

+ 71 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/constant/DailyConstant.java

@@ -0,0 +1,71 @@
+package com.gree.mall.manager.constant;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+public class DailyConstant {
+
+    /**
+     * 汇总状态 1.已汇总 2.未汇总 3.暂不结算 4.驳回
+     */
+    public final static Integer SUMMARY_STATUS_HAS = 1;
+
+    public final static Integer SUMMARY_STATUS_NOT = 2;
+
+    public final static Integer SUMMARY_STATUS_WAIT = 3;
+
+    public final static Integer SUMMARY_STATUS_REJECT = 4;
+
+    public static List<Integer>   SUMMARY_STATUS_CAN_DO = Arrays.asList(2, 4);
+
+    public static List<Integer>   SUMMARY_STATUS_CAN_DEL = Arrays.asList(2,3,4);
+
+    /**
+     * 发放状态 1.未发放 2.已发放 3.银行受理中 4.发放失败 5.驳回
+     */
+    public final static Integer ISSUE_STATUS_NOT = 1;
+    public final static Integer ISSUE_STATUS_SUCCESS = 2;
+    public final static Integer ISSUE_STATUS_BANK_DO = 3;
+    public final static Integer ISSUE_STATUS_FAILED = 4;
+    public final static Integer ISSUE_STATUS_REJECT = 5;
+
+    //app展示未发放
+    public static List<Integer>   ISSUE_STATUS_APP_NOT = Arrays.asList(1,3,4);
+
+    public static List<Integer>   ISSUE_STATUS_SUCCESS_ARRY = Arrays.asList(2);
+
+
+    public final static String TRANSFER_RESP_WAIT[] = {"W"};
+    public final static String TRANSFER_RESP_SUCCESS[] = {"S"};
+    public final static String TRANSFER_RESP_FAILED[] = {"E"};
+
+    // 调用银行接口返回数据
+    public final static String CMC_RESPONSE_FAIL_CODE = "201";
+    public final static String CMC_RESPONSE_SUCCESS_CODE = "200";
+
+    public final static String CMC_BUS_MOD = "00002";
+
+    //执行状态
+    public final static Integer DO_STATUS_HAS = 1;
+
+    public final static Integer DO_STATUS_NOT = 2;
+
+    public final static List<String> SUMMARY_STATUS_ARRAY = new ArrayList<String>(){
+        {
+            add("已转结算待汇总");
+            add("待退旧件");
+            add("待总部日审");
+            add("待总部审批");
+            add("待总部日结审批");
+            add("已汇总");
+        }
+    };
+
+
+    public static List<String>   WARN_COMPANY = Arrays.asList("广州嘉讯茂机电工程有限公司","广东家盛茂科技有限公司");
+
+
+    public final static  String WARN_TEMPLEATE = "SMS_250916318";
+
+}

+ 21 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/constant/SybConstants.java

@@ -0,0 +1,21 @@
+package com.gree.mall.manager.constant;
+
+public class SybConstants {
+	//正式环境测试参数
+	public static final String SYB_ORGID = "";//集团/机构模式下该参数不为空,且appid与key是与次参数对应
+	public static final String SYB_CUSID = "990440148166000";
+	public static final String SYB_APPID = "00000003";
+	public static final String SYB_MD5_APPKEY = "a0ea3fa20dbd7bb4d5abf1d59d63bae8";
+	public static final String SYB_APIURL = "https://vsp.allinpay.com/apiweb/unitorder";//生产环境
+	public static final String SIGN_TYPE = "SM2";
+	public static final String SYB_RSACUSPRIKEY = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAO0HpPUP+eHk//Ba6ZOePvoZVDpOCRtt943oeVfCTllye43bqja1jVIaebX0MgX+yPYnWIQIOJ9ubSH0R4iyY9y1/HR00qkUpfW3/0usBPt9qn7r0xtFHerhVCd4dT2rKb2Oc5IhKOg05cw/BmMFohMkFsqt0jlrUXI8zJOlLIcxAgMBAAECgYA9lt/pAYa3iK5sQOMyhUrt54j4QXCiXPeXOxHUmNuM6G9sU+itoI0hCVoYymP5JNQJCf45CH3WB3Z5/SRdQ6Uoo1cjao6cCohPLxMSfJglsZCHckPH53o25RKEza4njIgKC+yN7HAhanKymhw/yYQ6i0aXq38zFIk8djMtE7R6xQJBAP6jvNy7UhPKO5rxGFKR+MvvbO3qnYH6x0jZCGY3FlxuGfbavueOiFtMeK67FuDv683dcUKi+M48yR4kH5CfIusCQQDuS9KF6mlm3kHAiZWgVhE8VVNYGpRLCRDgAKm4InGmvk5mUv+O1yAtAFVAEHWIgD4awC7Eqf1YFrSF/It9HV9TAkEAsXiU7JJxhfFw0XAvL30lFZ1tIfReinSp6A+7VuIV552k4vNaEjC4wEjv43fpXiRZCEXJ5lOHbNXYpfUvOrBuuQJAOpow8rf8Jc0g1G3Be0XPRUwii/c1YuKe4Meo9VybIIuKkkV1Dba/9fEwBepGTURkgYWjur+nSyOCT7UUxLcVewJAPLig8dVfKpsiNwYuveEYMcFaO5xoRuiB7v+CMmvxpuuK+rrFS+d7RdmwDbnBiDV4JkTgFObUiGvB7MtS+LGfhw==";
+	public static final String SYB_RSATLPUBKEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCm9OV6zH5DYH/ZnAVYHscEELdCNfNTHGuBv1nYYEY9FrOzE0/4kLl9f7Y9dkWHlc2ocDwbrFSm0Vqz0q2rJPxXUYBCQl5yW3jzuKSXif7q1yOwkFVtJXvuhf5WRy+1X5FOFoMvS7538No0RpnLzmNi3ktmiqmhpcY/1pmt20FHQQIDAQAB";
+//	/**商户sm2私钥,用于向通联发起请求前进行签名**/
+	public static final String SYB_SM2PPRIVATEKEY = "MIGTAgEAMBMGByqGSM49AgEGCCqBHM9VAYItBHkwdwIBAQQgjj4Rk+b0YjwO+UwXofnHf4bK+kaaY5Btkd8nMP2VimmgCgYIKoEcz1UBgi2hRANCAAQqlALW4qGC3bP1x3wo5QsKxaCMEZJ2ODTTwOQ+d8UGU7GoK/y/WMBQWf5upMnFU06p5FxGooXYYoBtldgm03hq";
+//	/**通联平台sm2公钥,用于请求返回或者通联通知的验签**/
+	public static final String SYB_SM2TLPUBKEY = "MFkwEwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAEBQicgWm0KAMqhO3bdqMUEDrKQvYg8cCXHhdGwq7CGE6oJDzJ1P/94HpuVdBf1KidmPxr7HOH+0DAnpeCcx9TcQ==";
+
+	public static final String PAY_TYPE_W01 = "W01"; // 微信扫码支付
+	public static final String PAY_TYPE_W02 = "W02"; // 微信JS支付
+	public static final String PAY_TYPE_W06 = "W06"; // 微信小程序支付
+}

+ 19 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/constant/SysDictConstant.java

@@ -0,0 +1,19 @@
+package com.gree.mall.manager.constant;
+
+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";
+
+    //工单来源
+    public final static String ORDER_SOURCE = "WORKER_ORDER_SOURCE";
+
+
+    // 维修日结
+    public final static String REPAIR_DAILY = "REPAIR_DAILY";
+}

+ 142 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/CarouselMapController.java

@@ -0,0 +1,142 @@
+package com.gree.mall.manager.controller;
+
+import cn.hutool.core.lang.TypeReference;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.gree.mall.manager.annotation.ZfireList;
+import com.gree.mall.manager.bean.carouselMap.CarouselMapVO;
+import com.gree.mall.manager.exception.RemoteServiceException;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.CarouselMapLogic;
+import com.gree.mall.manager.plus.entity.CarouselMap;
+import com.gree.mall.manager.plus.entity.Goods;
+import com.gree.mall.manager.zfire.bean.ZfireParamBean;
+import com.gree.mall.manager.zfire.util.FieldUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+@Slf4j
+@RestController
+@Api(value = "轮播图管理", tags ={"轮播图管理"} )
+@RequestMapping(value = "/carouselMap", produces = "application/json; charset=utf-8")
+public class CarouselMapController {
+
+    @Resource
+    CarouselMapLogic carouselMapLogic;
+
+
+
+
+    @ZfireList
+    @PostMapping("/list/pageV2")
+    @ApiOperation(value = "轮播图列表V2")
+    public ResponseHelper<IPage<CarouselMapVO>> pageV2(
+            @RequestBody ZfireParamBean zfireParamBean
+    ) {
+        IPage<CarouselMapVO> page = carouselMapLogic.pageV2(zfireParamBean);
+        return ResponseHelper.success(page, new TypeReference<CarouselMapVO>() {});
+    }
+
+    @PostMapping("/pageExport")
+    @ApiOperation(value = "轮播图列表V2导出")
+    public void listExport(@RequestBody ZfireParamBean zfireParamBean, HttpServletRequest request, HttpServletResponse response) throws Exception {
+        //1.组装查询条件
+        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
+        //2.查询要导出的内容
+        IPage<CarouselMapVO> page = carouselMapLogic.pageV2(zfireParamBean);
+        //3.导出
+        FieldUtils.exportData(page.getRecords(), zfireParam.getExportFields(), request, response);
+    }
+
+
+
+
+    @GetMapping("/list/page")
+    @ApiOperation(value = "轮播图列表")
+    public ResponseHelper<Page<CarouselMap>> page(
+            HttpServletRequest request,
+            @ApiParam(value = "状态(true:启用 false:禁用") @RequestParam(required = false) Boolean state,
+            @ApiParam(value = "页号",required = true) @RequestParam Integer pageNum,
+            @ApiParam(value = "页大小",required = true) @RequestParam Integer pageSize
+    ) throws RemoteServiceException {
+        IPage<CarouselMap> page = carouselMapLogic.page(request, state,pageNum, pageSize);
+        return ResponseHelper.success(page);
+    }
+
+    @GetMapping("/detail")
+    @ApiOperation(value = "轮播详情")
+    public ResponseHelper<CarouselMap> detail(
+            @ApiParam(value = "id",required = true) @RequestParam() String id
+    ) throws RemoteServiceException {
+        CarouselMap detail = carouselMapLogic.detail(id);
+        return ResponseHelper.success(detail);
+    }
+
+
+    @PostMapping("/add")
+    @ApiOperation(value = "新增轮播图")
+    public ResponseHelper add(
+            HttpServletRequest request,
+            @ApiParam(value = "object",required = true) @RequestBody CarouselMap carouselMapBean) {
+        carouselMapLogic.add(request, carouselMapBean);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/update")
+    @ApiOperation(value = "修改轮播图")
+    public ResponseHelper update(
+            @ApiParam(value = "object",required = true) @RequestBody CarouselMap carouselMapBean) {
+        carouselMapLogic.update(carouselMapBean);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/delete")
+    @ApiOperation(value = "删除轮播图")
+    public ResponseHelper delete(
+            @ApiParam(value = "轮播图id",required = true) @RequestParam String carouselMapId
+    ) {
+        carouselMapLogic.delete(carouselMapId);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/batch/delete")
+    @ApiOperation(value = "删除轮播图")
+    public ResponseHelper delete(
+            @ApiParam(value = "轮播图id",required = true) @RequestBody List<String> ids
+    ) {
+        carouselMapLogic.delete(ids);
+        return ResponseHelper.success();
+    }
+
+
+    @PostMapping("/state/update")
+    @ApiOperation(value = "禁用/正常")
+    public ResponseHelper change(
+            @ApiParam(value = "轮播图id",required = true) @RequestParam String carouselMapId,
+            @ApiParam(value = "状态:true上架 false下架",required = true) @RequestParam Boolean state
+    ) {
+        carouselMapLogic.updateState(carouselMapId, state);
+        return ResponseHelper.success();
+    }
+
+    @GetMapping("/list/goods")
+    @ApiOperation(value = "商品列表")
+    public ResponseHelper<Page<Goods>> page(
+            HttpServletRequest request,
+            @ApiParam(value = "商品id") @RequestParam(required = false) String goodsId,
+            @ApiParam(value = "商品名称") @RequestParam(required = false) String goodsName,
+            @ApiParam(value = "页号",required = true) @RequestParam Integer pageNum,
+            @ApiParam(value = "页大小",required = true) @RequestParam Integer pageSize
+    ) throws RemoteServiceException {
+        IPage<Goods> page = carouselMapLogic.getGoods(request, goodsId, goodsName,pageNum, pageSize);
+        return ResponseHelper.success(page);
+    }
+}

+ 125 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/FreightController.java

@@ -0,0 +1,125 @@
+package com.gree.mall.manager.controller;
+
+import cn.hutool.core.lang.TypeReference;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.gree.mall.manager.annotation.ZfireList;
+import com.gree.mall.manager.bean.Freight.FreightTemplateBean;
+import com.gree.mall.manager.bean.Freight.RegionTreeBean;
+import com.gree.mall.manager.bean.FreightTemplateVO;
+import com.gree.mall.manager.bean.carouselMap.CarouselMapVO;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.FreightLogic;
+import com.gree.mall.manager.plus.entity.FreightTemplate;
+import com.gree.mall.manager.zfire.bean.ZfireParamBean;
+import com.gree.mall.manager.zfire.util.FieldUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+@Slf4j
+@RestController
+@Api(value = "运费管理", tags ={"运费管理"} )
+@RequestMapping(value = "/freight", produces = "application/json; charset=utf-8")
+public class FreightController {
+
+    @Autowired
+    FreightLogic freightLogic;
+
+
+    @ZfireList
+    @PostMapping("/list/pageV2")
+    @ApiOperation(value = "运费模板列表V2")
+    public ResponseHelper<IPage<FreightTemplateVO>> pageV2(
+            @RequestBody ZfireParamBean zfireParamBean
+    ) {
+        IPage<FreightTemplateVO> page = freightLogic.pageV2(zfireParamBean);
+        return ResponseHelper.success(page, new TypeReference<FreightTemplateVO>() {});
+    }
+
+    @PostMapping("/pageExport")
+    @ApiOperation(value = "运费模板列表V2导出")
+    public void listExport(@RequestBody ZfireParamBean zfireParamBean, HttpServletRequest request, HttpServletResponse response) throws Exception {
+        //1.组装查询条件
+        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
+        //2.查询要导出的内容
+        IPage<FreightTemplateVO> page = freightLogic.pageV2(zfireParamBean);
+        //3.导出
+        FieldUtils.exportData(page.getRecords(), zfireParam.getExportFields(), request, response);
+    }
+
+
+
+
+    @GetMapping("/list")
+    @ApiOperation(value = "运费模板列表")
+    public ResponseHelper<Page<FreightTemplate>> page(
+            HttpServletRequest request,
+            @ApiParam(value = "名称",required = false) @RequestParam(required = false) String name,
+            @ApiParam(value = "状态(true:启用 false:禁用",required = false) @RequestParam(required = false) Boolean status,
+            @ApiParam(value = "开始时间",required = false) @RequestParam(required = false) String startTime,
+            @ApiParam(value = "结束时间",required = false) @RequestParam(required = false) String endTime,
+            @ApiParam(value = "页号",required = true) @RequestParam(required = true) Integer pageNum,
+            @ApiParam(value = "页大小",required = true) @RequestParam(required = true) Integer pageSize
+    ){
+        IPage<FreightTemplate> list = freightLogic.list(request,name, status, startTime, endTime, pageNum, pageSize);
+        return ResponseHelper.success(list);
+    }
+
+    @GetMapping("/detail")
+    @ApiOperation(value = "运费模板详情")
+    public ResponseHelper<FreightTemplateBean> detail(
+            @ApiParam(value = "模板id",required = true) @RequestParam(required = true) String freightTemplateId
+    ){
+        FreightTemplateBean detail = freightLogic.detail(freightTemplateId);
+        return ResponseHelper.success(detail);
+    }
+
+
+    @PostMapping("/delete")
+    @ApiOperation(value = "删除运费模板")
+    public ResponseHelper delete(
+            @ApiParam(value = "模板id",required = true) @RequestParam(required = true) String freightTemplateId
+    ){
+        freightLogic.delete(freightTemplateId);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/save")
+    @ApiOperation(value = "新增修改运费模板")
+    public ResponseHelper delete(
+            @ApiParam(value = "模板",required = true) @RequestBody(required = true) FreightTemplateBean freightTemplateBean,
+            HttpServletRequest request
+    ){
+        freightLogic.save(freightTemplateBean,request);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/status/update")
+    @ApiOperation(value = "修改运费模板状态")
+    public ResponseHelper updateStatus(
+            @ApiParam(value = "模板id",required = true) @RequestParam(required = true) String freightTemplateId,
+            @ApiParam(value = "状态:true=启用 false=禁用",required = true) @RequestParam(required = true) Boolean status
+    ){
+        freightLogic.updateStatus(freightTemplateId,status);
+        return ResponseHelper.success();
+    }
+
+
+    @GetMapping("/region/tree")
+    @ApiOperation(value = "获取地区树")
+    public ResponseHelper<List<RegionTreeBean>> regionTree(
+            @ApiParam(value = "等级(1=省,2=市,3=区,4=街道,5=社区)(默认为区以上)",required = false) @RequestParam(required = false) Integer level
+    ){
+        List<RegionTreeBean> regionTreeBeans = freightLogic.regionTree(level);
+        return ResponseHelper.success(regionTreeBeans);
+    }
+
+}

+ 109 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/ManuelController.java

@@ -0,0 +1,109 @@
+package com.gree.mall.manager.controller;
+
+import com.github.binarywang.wxpay.exception.WxPayException;
+import com.gree.mall.manager.bean.Freight.FreightTemplateBean;
+import com.gree.mall.manager.enums.ExchangeCodeTypeEnum;
+import com.gree.mall.manager.exception.RemoteServiceException;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.ExpressLogic;
+import com.gree.mall.manager.logic.common.WechatLogic;
+import com.gree.mall.manager.plus.entity.GiftExchangeCode;
+import com.gree.mall.manager.plus.service.GiftExchangeCodeService;
+import com.gree.mall.manager.utils.RC4Utils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.math.BigDecimal;
+import java.util.*;
+
+@Slf4j
+@RestController
+@Api(value = "手动操作接口", tags ={"手动操作接口"} )
+@RequestMapping(value = "/manuel", produces = "application/json; charset=utf-8")
+public class ManuelController {
+    @Autowired
+    private ExpressLogic expressLogic;
+    @Autowired
+    private WechatLogic wechatLogic;
+    @Autowired
+    GiftExchangeCodeService giftExchangeCodeService;
+
+    @PostMapping("/excode/init")
+    public void initExcode(){
+        int count = giftExchangeCodeService.count();
+        if(count > 0){
+            return;
+        }
+        List<GiftExchangeCode> list = new ArrayList<>();
+        for(int i = 0 ;i < 3000;i++){
+            String s = RC4Utils.encry_RC4_string(String.format("%04d", 1), UUID.randomUUID().toString());
+            GiftExchangeCode giftExchangeCode = new GiftExchangeCode();
+            giftExchangeCode.setId(s);
+            giftExchangeCode.setStatus(0);
+            giftExchangeCode.setCreateTime(new Date());
+            if(i >= 2000) {
+                giftExchangeCode.setAmount(BigDecimal.valueOf(9.9));
+            }
+            list.add(giftExchangeCode);
+        }
+        giftExchangeCodeService.saveBatch(list);
+    }
+
+    @PostMapping("/excode/init2")
+    public void initExcode2(
+            @ApiParam("生成的数量") @RequestParam Integer num
+    ){
+        int count = giftExchangeCodeService.count();
+        if(count > 0){
+            return;
+        }
+        Set<String> codes = new HashSet<>();
+        List<GiftExchangeCode> list = new ArrayList<>();
+        for(int i = 0 ;i < num;i++){
+            String s = RC4Utils.encry_RC4_string(String.format("%04d", 1), UUID.randomUUID().toString());
+            codes.add(s);
+        }
+        for(String s : codes) {
+            GiftExchangeCode giftExchangeCode = new GiftExchangeCode();
+            giftExchangeCode.setId(s);
+            giftExchangeCode.setStatus(0);
+            giftExchangeCode.setType(ExchangeCodeTypeEnum.SUB.toString());
+            giftExchangeCode.setCreateTime(new Date());
+            giftExchangeCode.setAmount(new BigDecimal(9999999));
+            giftExchangeCode.setRemark("金额抵扣");
+            list.add(giftExchangeCode);
+        }
+        giftExchangeCodeService.saveBatch(list);
+    }
+
+//
+//    @PostMapping("/express/subscribe")
+//    @ApiOperation(value = "快递订阅")
+//    public ResponseHelper subscribe(
+//            @ApiParam(value = "快递单号",required = true) @RequestParam(required = true)String logisticsNo,
+//            @ApiParam(value = "快递公司代码",required = true) @RequestParam(required = true)String company
+//    ){
+//        expressLogic.subscribeExpressPrd(logisticsNo,company);
+//        return ResponseHelper.success();
+//    }
+//
+//
+//    @PostMapping("/pay/refund")
+//    @ApiOperation(value = "手动退款")
+//    public ResponseHelper refund(
+//            @ApiParam(value = "订单号",required = true) @RequestParam(required = true)String orderId,
+//            @ApiParam(value = "退款单号",required = true) @RequestParam(required = true)String refundNo,
+//            @ApiParam(value = "收款总金额",required = true) @RequestParam(required = true)Double totalFee,
+//            @ApiParam(value = "退款金额",required = true) @RequestParam(required = true)Double refundFee
+//    ) throws RemoteServiceException, WxPayException {
+//        wechatLogic.refund(orderId,refundNo,totalFee,refundFee);
+//        return ResponseHelper.success();
+//    }
+
+
+}

+ 115 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/StorageController.java

@@ -0,0 +1,115 @@
+package com.gree.mall.manager.controller;
+
+import cn.hutool.core.lang.TypeReference;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.gree.mall.manager.annotation.ZfireList;
+import com.gree.mall.manager.bean.StorageVO;
+import com.gree.mall.manager.exception.RemoteServiceException;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.StorageLogic;
+import com.gree.mall.manager.plus.entity.Storage;
+import com.gree.mall.manager.zfire.bean.ZfireParamBean;
+import com.gree.mall.manager.zfire.util.FieldUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+@Slf4j
+@RestController
+@Api(value = "仓储管理", tags ={"仓储管理"} )
+@RequestMapping(value = "/storage", produces = "application/json; charset=utf-8")
+public class StorageController {
+
+    @Resource
+    StorageLogic storageLogic;
+
+    @ZfireList
+    @PostMapping("/list/pageV2")
+    @ApiOperation(value = "仓储列表V2")
+    public ResponseHelper<IPage<StorageVO>> pageV2(
+            @RequestBody ZfireParamBean zfireParamBean
+    ) {
+        IPage<StorageVO> page = storageLogic.pageV2(zfireParamBean);
+        return ResponseHelper.success(page, new TypeReference<StorageVO>() {});
+    }
+
+    @PostMapping("/pageExport")
+    @ApiOperation(value = "仓储列表V2导出")
+    public void listExport(@RequestBody ZfireParamBean zfireParamBean, HttpServletRequest request, HttpServletResponse response) throws Exception {
+        //1.组装查询条件
+        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
+        //2.查询要导出的内容
+        IPage<StorageVO> page = storageLogic.pageV2(zfireParamBean);
+        //3.导出
+        FieldUtils.exportData(page.getRecords(), zfireParam.getExportFields(), request, response);
+    }
+
+
+    @GetMapping("/list")
+    @ApiOperation(value = "仓储列表")
+    public ResponseHelper<Page<Storage>> page(
+            @ApiParam(value = "属性", required = false) @RequestParam(required = false) String type,
+            @ApiParam(value = "状态") @RequestParam(required = false) Boolean status,
+            @ApiParam(value = "页号", required = true) @RequestParam Integer pageNum,
+            @ApiParam(value = "页大小", required = true) @RequestParam Integer pageSize,
+            HttpServletRequest request
+    ) throws RemoteServiceException {
+        IPage<Storage> page = storageLogic.page(type, status, pageNum, pageSize, request);
+        return ResponseHelper.success(page);
+    }
+
+    @GetMapping("/detail")
+    @ApiOperation(value = "仓储详情")
+    public ResponseHelper<Storage> detail(
+            @ApiParam(value = "id",required = true) @RequestParam() String id
+    ) throws RemoteServiceException {
+        Storage detail = storageLogic.detail(id);
+        return ResponseHelper.success(detail);
+    }
+
+
+    @PostMapping("/add")
+    @ApiOperation(value = "新增仓储")
+    public ResponseHelper add(
+            HttpServletRequest request,
+            @ApiParam(value = "object",required = true) @RequestBody Storage storage) {
+        storageLogic.add(request,storage);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/update")
+    @ApiOperation(value = "修改仓储")
+    public ResponseHelper update(
+            @ApiParam(value = "object",required = true) @RequestBody Storage storage) {
+        storageLogic.update(storage);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/delete")
+    @ApiOperation(value = "删除仓储")
+    public ResponseHelper delete(
+            @ApiParam(value = "仓储id",required = true) @RequestParam String storageId
+    ) {
+        storageLogic.delete(storageId);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/batch/update/status")
+    @ApiOperation(value = "仓储管理-批量更新状态")
+    public ResponseHelper batchUpdateStatus(
+            @ApiParam(value = "id", required = true) @RequestParam List<String> ids,
+            @ApiParam(value = "状态 true=开启 false=关闭", required = true) @RequestParam Boolean status
+    ) throws Exception {
+        storageLogic.batchUpdateStatus(ids, status);
+        return ResponseHelper.success();
+    }
+
+}

+ 86 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/activity/PromotionActivityController.java

@@ -0,0 +1,86 @@
+package com.gree.mall.manager.controller.activity;
+
+import cn.hutool.core.lang.TypeReference;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gree.mall.manager.annotation.ZfireList;
+import com.gree.mall.manager.bean.ExcelData;
+import com.gree.mall.manager.bean.activity.PromotionActivityBatchBean;
+import com.gree.mall.manager.bean.activity.PromotionActivityBean;
+import com.gree.mall.manager.bean.activity.PromotionActivityVO;
+import com.gree.mall.manager.exception.RemoteServiceException;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.activity.PromotionActivityLogic;
+import com.gree.mall.manager.utils.excel.ExcelUtils;
+import com.gree.mall.manager.zfire.bean.ZfireParamBean;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+
+@Slf4j
+@RestController
+@Api(value = "扫码活动单API", tags ={"扫码活动单API"} )
+@RequestMapping(value = "/promotion/activity", produces = "application/json; charset=utf-8")
+public class PromotionActivityController {
+
+    @Resource
+    PromotionActivityLogic promotionActivityLogic;
+
+    @ZfireList
+    @PostMapping("/list")
+    @ApiOperation(value = "活动单-列表")
+    public ResponseHelper<IPage<PromotionActivityVO>> list(
+            @RequestBody ZfireParamBean zfireParamBean
+    ) {
+        IPage<PromotionActivityVO> page = promotionActivityLogic.list(zfireParamBean);
+        return ResponseHelper.success(page, new TypeReference<PromotionActivityVO>() {});
+    }
+
+    @GetMapping("/export")
+    @ApiOperation(value = "活动单-导出")
+    public void export(
+            @ApiParam(value = "开始时间") @RequestParam Date statDate,
+            @ApiParam(value = "结束时间") @RequestParam Date endDate,
+            HttpServletRequest request,
+            HttpServletResponse response
+    ) throws Exception {
+
+        ExcelData excelData = promotionActivityLogic.export(statDate, endDate);
+
+        ExcelUtils.exportExcel(request,response,"活动单列表.xlsx",excelData);
+    }
+
+    @PostMapping("/detail")
+    @ApiOperation(value = "活动单-详情")
+    public ResponseHelper<PromotionActivityBean> detail(
+            @ApiParam(value = "id", required = true) @RequestParam String promotionActivityId
+    ) throws RemoteServiceException {
+        PromotionActivityBean bean = promotionActivityLogic.detail(promotionActivityId);
+        return ResponseHelper.success(bean);
+    }
+
+    @PostMapping("/add")
+    @ApiOperation(value = "活动单-新增")
+    public ResponseHelper add(
+            HttpServletRequest request,
+            @RequestBody PromotionActivityBean bean
+    ) throws Exception {
+        promotionActivityLogic.add(request, bean);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/batch/follow")
+    @ApiOperation(value = "活动单-批量跟进")
+    public ResponseHelper batchFollow(
+            @RequestBody PromotionActivityBatchBean bean
+    ) throws Exception {
+        promotionActivityLogic.batchFollow(bean);
+        return ResponseHelper.success();
+    }
+}

+ 70 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/activity/PromotionApplyController.java

@@ -0,0 +1,70 @@
+//package com.gree.mall.manager.controller.activity;
+//
+//import com.baomidou.mybatisplus.core.metadata.IPage;
+//import com.gree.mall.manager.bean.activity.PromotionApplyBean;
+//import com.gree.mall.manager.helper.ResponseHelper;
+//import com.gree.mall.manager.logic.activity.PromotionApplyLogic;
+//import io.swagger.annotations.Api;
+//import io.swagger.annotations.ApiOperation;
+//import io.swagger.annotations.ApiParam;
+//import lombok.extern.slf4j.Slf4j;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.web.bind.annotation.*;
+//
+//import javax.servlet.http.HttpServletRequest;
+//import java.math.BigDecimal;
+//
+//@Slf4j
+//@RestController
+//@Api(value = "优惠申请API", tags ={"优惠申请API"} )
+//@RequestMapping(value = "/promotion/apply", produces = "application/json; charset=utf-8")
+//public class PromotionApplyController {
+//
+//    @Autowired
+//    PromotionApplyLogic promotionApplyLogic;
+//
+//
+//    @GetMapping("/list")
+//    @ApiOperation(value = "列表")
+//    public ResponseHelper<IPage<PromotionApplyBean>> page(
+//            @ApiParam(value = "昵称手机号",required = true) @RequestParam String nickName,
+//            @ApiParam(value = "网点名称",required = true) @RequestParam String websitName,
+//            @ApiParam(value = "页号",required = true) @RequestParam Integer pageNum,
+//            @ApiParam(value = "页大小",required = true) @RequestParam Integer pageSize,
+//            HttpServletRequest request
+//    ) throws Exception {
+//        IPage<PromotionApplyBean> list = promotionApplyLogic.list(nickName, websitName, pageNum, pageSize);
+//        return ResponseHelper.success(list);
+//    }
+//
+//    @GetMapping("/detail")
+//    @ApiOperation(value = "详情")
+//    public ResponseHelper<PromotionApplyBean> detail(
+//            @ApiParam(value = "id") @RequestParam(required = true)String id
+//    ) throws Exception {
+//        PromotionApplyBean detail = promotionApplyLogic.detail(id);
+//        return ResponseHelper.success(detail);
+//    }
+//
+//
+//    @PostMapping("/save")
+//    @ApiOperation(value = "保存")
+//    public ResponseHelper save(
+//            @ApiParam(value = "id(不传就新增,传了就修改)",required = true) @RequestParam(required = false) String id,
+//            @ApiParam(value = "用户id",required = true) @RequestParam String userId,
+//            @ApiParam(value = "折扣率",required = true) @RequestParam BigDecimal rate,
+//            @ApiParam(value = "true=启用 false=禁用",required = true) @RequestParam Boolean status
+//    ) throws Exception {
+//        promotionApplyLogic.save(id,userId,rate,status);
+//        return ResponseHelper.success();
+//    }
+//
+//    @PostMapping("/delete")
+//    @ApiOperation(value = "删除")
+//    public ResponseHelper delete(
+//            @ApiParam(value = "id") @RequestParam(required = true)String id
+//    ) throws Exception {
+//        promotionApplyLogic.delete(id);
+//        return ResponseHelper.success();
+//    }
+//}

+ 78 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/activity/PromotionDiscountController.java

@@ -0,0 +1,78 @@
+package com.gree.mall.manager.controller.activity;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gree.mall.manager.bean.activity.PromotionGroupBean;
+import com.gree.mall.manager.bean.activity.PromotionGroupList;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.activity.PromotionDiscountLogic;
+import com.gree.mall.manager.plus.entity.PromotionDiscount;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+
+@Slf4j
+@RestController
+@Api(value = "折扣活动API", tags ={"折扣活动API"} )
+@RequestMapping(value = "/promotion/discount", produces = "application/json; charset=utf-8")
+public class PromotionDiscountController {
+
+    @Autowired
+    PromotionDiscountLogic promotionDiscountLogic;
+
+
+    @GetMapping("/list")
+    @ApiOperation(value = "折扣活动-列表")
+    public ResponseHelper<IPage<PromotionDiscount>> page(
+            @ApiParam(value = "页号",required = true) @RequestParam Integer pageNum,
+            @ApiParam(value = "页大小",required = true) @RequestParam Integer pageSize,
+            HttpServletRequest request
+    ) throws Exception {
+        IPage<PromotionDiscount> list = promotionDiscountLogic.list(pageNum, pageSize);
+        return ResponseHelper.success(list);
+    }
+
+    @GetMapping("/detail")
+    @ApiOperation(value = "折扣活动-详情")
+    public ResponseHelper<PromotionDiscount> detail(
+            @ApiParam(value = "id") @RequestParam(required = true)String id
+    ) throws Exception {
+        PromotionDiscount detail = promotionDiscountLogic.detail(id);
+        return ResponseHelper.success(detail);
+    }
+
+
+    @PostMapping("/add")
+    @ApiOperation(value = "折扣活动-新增")
+    public ResponseHelper add(
+            @ApiParam(value = "object") @RequestBody(required = true)PromotionDiscount promotionDiscount
+    ) throws Exception {
+        promotionDiscountLogic.add(promotionDiscount);
+        return ResponseHelper.success();
+    }
+
+
+    @PostMapping("/update")
+    @ApiOperation(value = "折扣活动-修改")
+    public ResponseHelper update(
+            @ApiParam(value = "object") @RequestBody(required = false)PromotionDiscount promotionDiscount
+    ) throws Exception {
+        promotionDiscountLogic.update(promotionDiscount);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/delete")
+    @ApiOperation(value = "折扣活动-删除")
+    public ResponseHelper delete(
+            @ApiParam(value = "id") @RequestParam(required = true)String id
+    ) throws Exception {
+        promotionDiscountLogic.delete(id);
+        return ResponseHelper.success();
+    }
+
+}

+ 76 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/activity/PromotionFullPieceController.java

@@ -0,0 +1,76 @@
+package com.gree.mall.manager.controller.activity;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gree.mall.manager.bean.activity.fullpiece.PromotionFullPieceBean;
+import com.gree.mall.manager.bean.activity.fullpiece.PromotionFullPieceListVO;
+import com.gree.mall.manager.bean.activity.fullpiece.PromotionFullPieceOrderVO;
+import com.gree.mall.manager.bean.activity.fullpiece.PromotionFullPieceVO;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.activity.PromotionFullPieceLogic;
+import com.gree.mall.manager.plus.entity.OrderDetail;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Map;
+
+@Slf4j
+@RestController
+@Api(value = "满件打折活动", tags ={"满件打折活动"} )
+@RequestMapping(value = "/promotion/full/piece", produces = "application/json; charset=utf-8")
+public class PromotionFullPieceController {
+
+    @Autowired
+    PromotionFullPieceLogic promotionFullPieceLogic;
+
+    @GetMapping("/list")
+    @ApiOperation("列表")
+    public ResponseHelper<PromotionFullPieceListVO> list(
+            @ApiParam(value = "1=进行中 2=未开始 3=已过期") @RequestParam(required = false)Integer status,
+            @RequestParam Integer pageNum,
+            @RequestParam Integer pageSize){
+        IPage<PromotionFullPieceListVO> list = promotionFullPieceLogic.list(status,pageNum, pageSize);
+        return ResponseHelper.success(list);
+    }
+
+    @GetMapping("/total")
+    @ApiOperation("根据状态统计活动数量")
+    public ResponseHelper<Map<String, Integer>> totalByStatus(){
+        Map<String, Integer> map = promotionFullPieceLogic.totalByStatus();
+        return ResponseHelper.success(map);
+    }
+
+    @PostMapping("/save")
+    @ApiOperation(value = "保存活动(有id修改,没id新增)")
+    public ResponseHelper save(
+            @ApiParam(value = "object") @RequestBody(required = false) PromotionFullPieceBean bean
+    ) throws Exception {
+        promotionFullPieceLogic.save(bean);
+        return ResponseHelper.success();
+    }
+
+    //PromotionFullPieceVO
+    @GetMapping("/detail")
+    @ApiOperation(value = "活动详情")
+    public ResponseHelper<PromotionFullPieceVO> detail(
+            @ApiParam(value = "id") @RequestParam String id
+    ) throws Exception {
+        PromotionFullPieceVO detail = promotionFullPieceLogic.detail(id);
+        return ResponseHelper.success(detail);
+    }
+
+    @GetMapping("/order/detail")
+    @ApiOperation("订单详情")
+    public ResponseHelper<IPage<OrderDetail>> orderDetail(
+            @ApiParam(value = "活动id") @RequestParam String id,
+            @RequestParam Integer pageNum,
+            @RequestParam Integer pageSize
+    ){
+        IPage<PromotionFullPieceOrderVO> page = promotionFullPieceLogic.orderDetail(id, pageNum, pageSize);
+        return ResponseHelper.success(page);
+    }
+
+}

+ 160 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/activity/PromotionGroupController.java

@@ -0,0 +1,160 @@
+package com.gree.mall.manager.controller.activity;
+
+import cn.hutool.core.lang.TypeReference;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gree.mall.manager.annotation.ZfireList;
+import com.gree.mall.manager.bean.activity.PromotionGroupBean;
+import com.gree.mall.manager.bean.activity.PromotionGroupDetail;
+import com.gree.mall.manager.bean.activity.PromotionGroupList;
+import com.gree.mall.manager.bean.goods.PromotionGroupListVO;
+import com.gree.mall.manager.bean.order.OrderShareVO;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.activity.PromotionGroupLogic;
+import com.gree.mall.manager.plus.entity.GoodsVisit;
+import com.gree.mall.manager.plus.entity.OrderInfo;
+import com.gree.mall.manager.zfire.bean.ZfireParamBean;
+import com.gree.mall.manager.zfire.util.FieldUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Map;
+
+@Slf4j
+@RestController
+@Api(value = "团购活动管理", tags ={"团购活动管理"} )
+@RequestMapping(value = "/promotion/group", produces = "application/json; charset=utf-8")
+public class PromotionGroupController {
+
+    @Autowired
+    PromotionGroupLogic promotionGroupLogic;
+
+    @ZfireList
+    @PostMapping("/list/pageV2")
+    @ApiOperation(value = "团购活动列表V2")
+    public ResponseHelper<IPage<PromotionGroupListVO>> pageV2(
+            @RequestBody ZfireParamBean zfireParamBean
+    ) {
+        IPage<PromotionGroupListVO> page = promotionGroupLogic.pageV2(zfireParamBean);
+        return ResponseHelper.success(page, new TypeReference<PromotionGroupListVO>() {});
+    }
+
+    @PostMapping("/pageExport")
+    @ApiOperation(value = "团购活动列表V2导出")
+    public void listExport(@RequestBody ZfireParamBean zfireParamBean, HttpServletRequest request, HttpServletResponse response) throws Exception {
+        //1.组装查询条件
+        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
+        //2.查询要导出的内容
+        IPage<PromotionGroupListVO> page = promotionGroupLogic.pageV2(zfireParamBean);
+        //3.导出
+        FieldUtils.exportData(page.getRecords(), zfireParam.getExportFields(), request, response);
+    }
+
+
+
+    @GetMapping("/list")
+    @ApiOperation(value = "团购活动列表")
+    public ResponseHelper page(
+            @ApiParam(value = "状态 true:开启 false:关闭") @RequestParam(required = false) Boolean status,
+            @ApiParam(value = "页号",required = true) @RequestParam Integer pageNum,
+            @ApiParam(value = "页大小",required = true) @RequestParam Integer pageSize,
+            HttpServletRequest request
+    ) throws Exception {
+        IPage<PromotionGroupList> list = promotionGroupLogic.list(status, pageNum, pageSize,request);
+        return ResponseHelper.success(list);
+    }
+
+    @GetMapping("/detail")
+    @ApiOperation(value = "团购活动详情")
+    public ResponseHelper<PromotionGroupBean> detail(
+            @ApiParam(value = "promotionGroupId") @RequestParam(required = true)String promotionGroupId
+    ) throws Exception {
+        PromotionGroupBean detail = promotionGroupLogic.detail(promotionGroupId);
+        return ResponseHelper.success(detail);
+    }
+
+    @GetMapping("/count")
+    @ApiOperation(value = "团购分类统计")
+    public ResponseHelper count(
+            HttpServletRequest request
+    ) throws Exception {
+        Map<String, Integer> count = promotionGroupLogic.count(request);
+        return ResponseHelper.success(count);
+    }
+
+
+    @PostMapping("/add")
+    @ApiOperation(value = "新增团购活动")
+    public ResponseHelper<String> add(
+            @ApiParam(value = "object") @RequestBody(required = false)PromotionGroupBean promotionGroupBean,
+            HttpServletRequest request
+            ) throws Exception {
+        String promotionGroupId = promotionGroupLogic.add(promotionGroupBean,request);
+        return ResponseHelper.success(promotionGroupId);
+    }
+
+
+    @PostMapping("/update")
+    @ApiOperation(value = "修改团购活动")
+    public ResponseHelper update(
+            HttpServletRequest request,
+            @ApiParam(value = "object") @RequestBody(required = false)PromotionGroupBean promotionGroupBean
+    ) throws Exception {
+        promotionGroupLogic.update(request,promotionGroupBean);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/status/update")
+    @ApiOperation(value = "修改团购状态")
+    public ResponseHelper updateStatus(
+            @ApiParam(value = "id") @RequestParam(required = false) String promotionGroupId,
+            @ApiParam(value = "状态 true:开启 false:关闭") @RequestParam(required = false) Boolean status
+    ) throws Exception {
+        promotionGroupLogic.updateStatus(promotionGroupId,status);
+        return ResponseHelper.success();
+    }
+
+
+    @GetMapping("/pt/detail")
+    @ApiOperation(value = "拼团详情列表")
+    public ResponseHelper<IPage<PromotionGroupDetail>> ptDetail(
+            @ApiParam(value = "promotionGroupId") @RequestParam(required = false) String promotionGroupId,
+            @ApiParam(value = "团长手机号",required = false) @RequestParam(required = false) String mobile,
+            @ApiParam(value = "pageNum") @RequestParam(required = true)Integer pageNum,
+            @ApiParam(value = "pageSize") @RequestParam(required = true)Integer pageSize
+    ) throws Exception {
+        IPage<PromotionGroupDetail> promotionGroupDetailIPage = promotionGroupLogic.ptDetail(promotionGroupId,mobile,pageNum, pageSize);
+        return ResponseHelper.success(promotionGroupDetailIPage);
+    }
+
+    @GetMapping("/pt/orderlist")
+    @ApiOperation(value = "拼团订单列表")
+    public ResponseHelper<IPage<OrderInfo>> ptOrderlist(
+            @ApiParam(value = "promotionGroupId") @RequestParam(required = false) String promotionGroupId,
+            @ApiParam(value = "用户id") @RequestParam(required = true)String userId,
+            @ApiParam(value = "pageNum") @RequestParam(required = true)Integer pageNum,
+            @ApiParam(value = "pageSize") @RequestParam(required = true)Integer pageSize
+    ) throws Exception {
+        IPage<OrderInfo> orderInfoIPage = promotionGroupLogic.queryOrderList(promotionGroupId,userId, pageNum, pageSize);
+        return ResponseHelper.success(orderInfoIPage);
+    }
+
+    @GetMapping("/pt/visitlist")
+    @ApiOperation(value = "拼团订单列表")
+    public ResponseHelper<IPage<GoodsVisit>> ptVisitlist(
+            @ApiParam(value = "promotionGroupId") @RequestParam(required = false) String promotionGroupId,
+            @ApiParam(value = "用户id") @RequestParam(required = true)String userId,
+            @ApiParam(value = "pageNum") @RequestParam(required = true)Integer pageNum,
+            @ApiParam(value = "pageSize") @RequestParam(required = true)Integer pageSize,
+            HttpServletRequest request
+    ) throws Exception {
+        IPage<GoodsVisit> goodsVisitIPage = promotionGroupLogic.queryGoodsVisit(promotionGroupId,userId, pageNum, pageSize, request);
+        return ResponseHelper.success(goodsVisitIPage);
+    }
+
+}

+ 53 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/activity/PromotionGroupUserController.java

@@ -0,0 +1,53 @@
+package com.gree.mall.manager.controller.activity;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gree.mall.manager.bean.activity.PromotionGroupBean;
+import com.gree.mall.manager.bean.activity.PromotionGroupList;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.activity.PromotionGroupLogic;
+import com.gree.mall.manager.logic.activity.PromotionGroupUserLogic;
+import com.gree.mall.manager.plus.entity.PromotionGroupSpecUser;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+@Slf4j
+@RestController
+@Api(value = "团购团长管理", tags ={"团购团长管理"} )
+@RequestMapping(value = "/promotion/user", produces = "application/json; charset=utf-8")
+public class PromotionGroupUserController {
+
+    @Autowired
+    PromotionGroupUserLogic promotionGroupUserLogic;
+
+    @GetMapping("/list")
+    @ApiOperation(value = "团购活动列表")
+    public ResponseHelper page(
+            @ApiParam(value = "团购商品规格id") @RequestParam(required = false) String promotionGroupSpecId,
+            @ApiParam(value = "名称") @RequestParam(required = false) String name,
+            @ApiParam(value = "手机号") @RequestParam(required = false) String phone,
+            @ApiParam(value = "团购价") @RequestParam(required = false) BigDecimal groupPrice,
+            @ApiParam(value = "分享金额") @RequestParam(required = false) BigDecimal shareAmount
+    ) throws Exception {
+        List<PromotionGroupSpecUser> list = promotionGroupUserLogic.list(promotionGroupSpecId, name, phone, groupPrice, shareAmount);
+        return ResponseHelper.success(list);
+    }
+
+    @PostMapping("/update")
+    @ApiOperation(value = "修改团购价")
+    public ResponseHelper update(
+            @RequestBody List<PromotionGroupSpecUser> specUserList
+    ) throws Exception {
+        promotionGroupUserLogic.update(specUserList);
+        return ResponseHelper.success(specUserList);
+    }
+
+
+}

+ 129 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/activity/PromotionLuckDrawController.java

@@ -0,0 +1,129 @@
+package com.gree.mall.manager.controller.activity;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gree.mall.manager.bean.ExcelData;
+import com.gree.mall.manager.bean.activity.luckdraw.PromotionLuckDrawBean;
+import com.gree.mall.manager.bean.activity.luckdraw.PromotionLuckDrawCodeBean;
+import com.gree.mall.manager.bean.activity.luckdraw.PromotionLuckDrawList;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.activity.PromotionLuckDrawLogic;
+import com.gree.mall.manager.utils.excel.ExcelUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+
+@Slf4j
+@RestController
+@Api(value = "抽奖活动API", tags ={"抽奖活动API"} )
+@RequestMapping(value = "/promotion/luck/draw", produces = "application/json; charset=utf-8")
+public class PromotionLuckDrawController {
+
+    @Autowired
+    PromotionLuckDrawLogic promotionLuckDrawLogic;
+
+    @GetMapping("/list")
+    @ApiOperation("抽奖活动列表")
+    public ResponseHelper<IPage<PromotionLuckDrawList>> list(
+         @ApiParam(value = "活动名称",required = false) @RequestParam(required = false) String name,
+         @ApiParam(value = "状态",required = false) @RequestParam(required = false) Boolean status,
+         @ApiParam(value = "页号",required = true) @RequestParam(required = true) Integer pageNum,
+         @ApiParam(value = "页大小",required = true) @RequestParam(required = true) Integer pageSize
+    ){
+        IPage<PromotionLuckDrawList> list = promotionLuckDrawLogic.list(name, status, pageNum, pageSize);
+        return ResponseHelper.success(list);
+    }
+
+    @PostMapping("/add")
+    @ApiOperation("新增抽奖活动")
+    public ResponseHelper add( @Valid @RequestBody PromotionLuckDrawBean promotionLuckDrawBean){
+        promotionLuckDrawLogic.add(promotionLuckDrawBean);
+        return ResponseHelper.success();
+    }
+
+    @GetMapping("/detail")
+    @ApiOperation(value = "抽奖活动详情")
+    public ResponseHelper<PromotionLuckDrawBean> detail(
+            @ApiParam(value = "抽奖活动id",required = true) @RequestParam(required = true) String promotionLuckDrawId
+    ) throws Exception {
+        PromotionLuckDrawBean detail = promotionLuckDrawLogic.detail(promotionLuckDrawId);
+        return ResponseHelper.success(detail);
+    }
+
+    @PostMapping("/updateStatus")
+    @ApiOperation("修改状态")
+    public ResponseHelper updateStatus(
+            @ApiParam(value = "抽奖活动id",required = true) @RequestParam(required = true) String promotionLuckDrawId,
+            @ApiParam(value = "状态true=进行中 false=已结束",required = true) @RequestParam(required = true) Boolean status
+    ){
+        promotionLuckDrawLogic.updateStatus(promotionLuckDrawId,status);
+        return ResponseHelper.success();
+    }
+
+
+    @GetMapping("/exchange/list")
+    @ApiOperation("兑换记录")
+    public ResponseHelper<IPage<PromotionLuckDrawCodeBean>> exchangeList(
+            @ApiParam(value = "活动id",required = false) @RequestParam(required = false) String promotionLuckDrawId,
+            @ApiParam(value = "优惠券id",required = false) @RequestParam(required = false) String promotionLuckDrawCouponId,
+            @ApiParam(value = "兑换码",required = false) @RequestParam(required = false) String code,
+            @ApiParam(value = "昵称",required = false) @RequestParam(required = false) String name,
+            @ApiParam(value = "电话",required = false) @RequestParam(required = false) String mobile,
+            @ApiParam(value = "兑换开始时间",required = false) @RequestParam(required = false) String exchangeStartTime,
+            @ApiParam(value = "兑换结束时间",required = false) @RequestParam(required = false) String exchangeEndTime,
+            @ApiParam(value = "使用开始时间",required = false) @RequestParam(required = false) String useStartTime,
+            @ApiParam(value = "使用结束时间",required = false) @RequestParam(required = false) String useEndTime,
+            @ApiParam(value = "订单id",required = false) @RequestParam(required = false) String orderId,
+            @ApiParam(value = "优惠券名称",required = false) @RequestParam(required = false) String couponName,
+            @ApiParam(value = "状态 0=未兑换 1=已兑换未使用 2=已使用",required = false) @RequestParam(required = false) Integer status2,
+            @ApiParam(value = "页号",required = true) @RequestParam(required = true) Integer pageNum,
+            @ApiParam(value = "页大小",required = true) @RequestParam(required = true) Integer pageSize
+    ){
+        IPage<PromotionLuckDrawCodeBean> page = promotionLuckDrawLogic
+                .exchangeList(promotionLuckDrawId,promotionLuckDrawCouponId, code, name, mobile, exchangeStartTime, exchangeEndTime, useStartTime,
+                        useEndTime, orderId, couponName, status2, pageNum, pageSize);
+        return ResponseHelper.success(page);
+    }
+
+    @GetMapping("/exchange/export")
+    @ApiOperation("兑换记录")
+    public void exportExchange(
+            @ApiParam(value = "活动id",required = false) @RequestParam(required = false) String promotionLuckDrawId,
+            @ApiParam(value = "优惠券id",required = false) @RequestParam(required = false) String promotionLuckDrawCouponId,
+            @ApiParam(value = "兑换码",required = false) @RequestParam(required = false) String code,
+            @ApiParam(value = "昵称",required = false) @RequestParam(required = false) String name,
+            @ApiParam(value = "电话",required = false) @RequestParam(required = false) String mobile,
+            @ApiParam(value = "兑换开始时间",required = false) @RequestParam(required = false) String exchangeStartTime,
+            @ApiParam(value = "兑换结束时间",required = false) @RequestParam(required = false) String exchangeEndTime,
+            @ApiParam(value = "使用开始时间",required = false) @RequestParam(required = false) String useStartTime,
+            @ApiParam(value = "使用结束时间",required = false) @RequestParam(required = false) String useEndTime,
+            @ApiParam(value = "订单id",required = false) @RequestParam(required = false) String orderId,
+            @ApiParam(value = "优惠券名称",required = false) @RequestParam(required = false) String couponName,
+            @ApiParam(value = "状态 0=未兑换 1=已兑换未使用 2=已使用",required = false) @RequestParam(required = false) Integer status2,
+            HttpServletRequest request,
+            HttpServletResponse response
+    ) throws Exception {
+        IPage<PromotionLuckDrawCodeBean> page = promotionLuckDrawLogic
+                .exchangeList(promotionLuckDrawId,promotionLuckDrawCouponId, code, name, mobile, exchangeStartTime, exchangeEndTime, useStartTime,
+                        useEndTime, orderId, couponName, status2, 1, -1);
+        ExcelData excelData = promotionLuckDrawLogic.exportData(page.getRecords());
+        ExcelUtils.exportExcel(request,response,"兑换记录.xlsx",excelData);
+    }
+
+    @GetMapping("/code/export")
+    @ApiOperation("导出兑换码")
+    public void exportCode(
+            @RequestParam(required = false) String promotionLuckDrawId,
+            @RequestParam(required = false) String promotionLuckDrawCouponId,
+                           HttpServletRequest request,
+                           HttpServletResponse response) throws Exception {
+        ExcelData excelData = promotionLuckDrawLogic.exportCode(promotionLuckDrawId,promotionLuckDrawCouponId);
+        ExcelUtils.exportExcel(request,response,"兑换码.xlsx",excelData);
+    }
+}

+ 95 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/activity/PromotionQuestionnaireController.java

@@ -0,0 +1,95 @@
+package com.gree.mall.manager.controller.activity;
+
+import cn.hutool.core.lang.TypeReference;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gree.mall.manager.annotation.ZfireList;
+import com.gree.mall.manager.bean.activity.PromotionQuestionnaireAddBean;
+import com.gree.mall.manager.bean.goods.PromotionGroupListVO;
+import com.gree.mall.manager.bean.listvo.PromotionQuestionnairVO;
+import com.gree.mall.manager.bean.listvo.param.PromotionZfireParamBean;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.activity.PromotionQuestionnaireLogic;
+import com.gree.mall.manager.zfire.bean.ZfireParamBean;
+import com.gree.mall.manager.zfire.util.FieldUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@Slf4j
+@RestController
+@RequiredArgsConstructor
+@Api(value = "问卷活动API", tags ={"问卷活动API"} )
+@RequestMapping(value = "/promotion/questionnaire", produces = "application/json; charset=utf-8")
+public class PromotionQuestionnaireController {
+
+    private final PromotionQuestionnaireLogic promotionQuestionnaireLogic;
+
+    @ZfireList
+    @PostMapping("/list")
+    @ApiOperation(value = "列表")
+    public ResponseHelper<IPage<PromotionQuestionnairVO>> list(
+            @RequestBody PromotionZfireParamBean zfireParamBean
+    ) {
+        IPage<PromotionQuestionnairVO> list = promotionQuestionnaireLogic.list(zfireParamBean);
+        return ResponseHelper.success(list, new TypeReference<PromotionQuestionnairVO>() {});
+    }
+
+    @PostMapping("/export")
+    @ApiOperation(value = "导出")
+    public void listExport(@RequestBody PromotionZfireParamBean zfireParamBean, HttpServletRequest request, HttpServletResponse response) throws Exception {
+        //2.查询要导出的内容
+        IPage<PromotionQuestionnairVO> page = promotionQuestionnaireLogic.list(zfireParamBean);
+        //3.导出
+        FieldUtils.exportData(page.getRecords(), zfireParamBean.getExportFields(), request, response);
+    }
+
+    @ApiOperation(value = "新增")
+    @PostMapping("/add")
+    public ResponseHelper add(@RequestBody PromotionQuestionnaireAddBean bean) throws Exception {
+        promotionQuestionnaireLogic.add(bean);
+        return ResponseHelper.success();
+    }
+
+    @ApiOperation(value = "下载二维码")
+    @GetMapping("/download")
+    public void down(
+           @ApiParam(value = "活动id",required = true) @RequestParam String id,
+           @ApiParam(value = "活动二维码id",required = false) @RequestParam(required = false) String id2,
+            HttpServletResponse response
+    ) throws Exception {
+        promotionQuestionnaireLogic.batchDownload(id,id2,response);
+    }
+
+
+
+    @ApiOperation(value = "显示/隐藏")
+    @PostMapping("/show")
+    public ResponseHelper show(@RequestParam String id,@RequestParam Boolean isShow) throws Exception {
+        promotionQuestionnaireLogic.updateIsShow(id,isShow);
+        return ResponseHelper.success();
+    }
+
+
+    @ApiOperation(value = "详情")
+    @PostMapping("/detail")
+    public ResponseHelper<PromotionQuestionnaireAddBean > detail(@RequestParam String id) throws Exception {
+        PromotionQuestionnaireAddBean detail = promotionQuestionnaireLogic.detail(id);
+        return ResponseHelper.success(detail);
+    }
+
+
+    @ApiOperation(value = "终止")
+    @PostMapping("/stop")
+    public ResponseHelper stop(@RequestParam String id) throws Exception {
+        promotionQuestionnaireLogic.stop(id);
+        return ResponseHelper.success();
+    }
+
+
+}

+ 193 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/activity/SecKillController.java

@@ -0,0 +1,193 @@
+package com.gree.mall.manager.controller.activity;
+
+import cn.hutool.core.lang.TypeReference;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gree.mall.manager.annotation.ZfireList;
+import com.gree.mall.manager.bean.activity.CustomSecSpecBean;
+import com.gree.mall.manager.bean.activity.SecKillActivityBean;
+import com.gree.mall.manager.bean.activity.SecKillActivityStageBean;
+import com.gree.mall.manager.bean.goods.CustomSecSpecBeanVO;
+import com.gree.mall.manager.bean.goods.SecKillActivityStageBeanVO;
+import com.gree.mall.manager.bean.order.OrderShareVO;
+import com.gree.mall.manager.exception.RemoteServiceException;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.activity.SecKillLogic;
+import com.gree.mall.manager.zfire.bean.ZfireParamBean;
+import com.gree.mall.manager.zfire.util.FieldUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+
+@Slf4j
+@RestController
+@Api(value = "秒杀商品列表", tags ={"秒杀商品列表"} )
+@RequestMapping(value = "/sec-kill/goods/", produces = "application/json; charset=utf-8")
+public class SecKillController {
+
+    @Resource
+    SecKillLogic secKillLogic;
+
+    @ZfireList
+    @PostMapping("/spec/list/pageV2")
+    @ApiOperation(value = "秒杀商品列表V2")
+    public ResponseHelper<IPage<CustomSecSpecBeanVO>> pageV2Spec(
+            @RequestBody ZfireParamBean zfireParamBean
+    ) {
+        IPage<CustomSecSpecBeanVO> page = secKillLogic.pageV2(zfireParamBean);
+        return ResponseHelper.success(page, new TypeReference<CustomSecSpecBeanVO>() {});
+    }
+
+    @PostMapping("/spec/list/pageV2Export")
+    @ApiOperation(value = "秒杀商品列表V2导出")
+    public void pageV2Export(@RequestBody ZfireParamBean zfireParamBean, HttpServletRequest request, HttpServletResponse response) throws Exception {
+        //1.组装查询条件
+        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
+        //2.查询要导出的内容
+        IPage<CustomSecSpecBeanVO> page = secKillLogic.pageV2(zfireParamBean);
+        //3.导出
+        FieldUtils.exportData(page.getRecords(), zfireParam.getExportFields(), request, response);
+    }
+
+    @ZfireList
+    @PostMapping("/activity/list/pageV2")
+    @ApiOperation(value = "秒杀活动列表V2")
+    public ResponseHelper<IPage<SecKillActivityStageBeanVO>> pageV2Activity(
+            @RequestBody ZfireParamBean zfireParamBean
+    ) {
+        IPage<SecKillActivityStageBeanVO> page = secKillLogic.pageV2Activity(zfireParamBean);
+        return ResponseHelper.success(page, new TypeReference<SecKillActivityStageBeanVO>() {});
+    }
+
+    @PostMapping("/activity/list/pageV2Export")
+    @ApiOperation(value = "秒杀活动列表V2导出")
+    public void listExport(@RequestBody ZfireParamBean zfireParamBean, HttpServletRequest request, HttpServletResponse response) throws Exception {
+        //1.组装查询条件
+        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
+        //2.查询要导出的内容
+        IPage<SecKillActivityStageBeanVO> page = secKillLogic.pageV2Activity(zfireParamBean);
+        //3.导出
+        FieldUtils.exportData(page.getRecords(), zfireParam.getExportFields(), request, response);
+    }
+
+    @GetMapping("/list/spec/page")
+    @ApiOperation(value = "秒杀商品列表")
+    public ResponseHelper<IPage<CustomSecSpecBean>> page(
+            @ApiParam(value = "秒杀状态,0全部,1未开始,2进行中,3已结束,4已关闭") @RequestParam(required = false) Integer status,
+            @ApiParam(value = "商品名称") @RequestParam(required = false) String keyword,
+            @ApiParam(value = "页号",required = true) @RequestParam Integer pageNum,
+            @ApiParam(value = "页大小",required = true) @RequestParam Integer pageSize,
+            HttpServletRequest request
+    ) throws Exception {
+        return ResponseHelper.success(secKillLogic.pageSpec(status,keyword, pageNum, pageSize,request));
+    }
+
+    @GetMapping("/list/activity/page")
+    @ApiOperation(value = "秒杀活动列表")
+    public ResponseHelper pageActivity(
+            @ApiParam(value = "秒杀状态,0全部,1未开始,2进行中,3已结束") @RequestParam(required = false) Integer status,
+            @ApiParam(value = "商品名称") @RequestParam(required = false) String keyword,
+            @ApiParam(value = "开始时间") @RequestParam(required = false) Date startTime,
+            @ApiParam(value = "页号",required = true) @RequestParam Integer pageNum,
+            @ApiParam(value = "页大小",required = true) @RequestParam Integer pageSize,
+            HttpServletRequest request
+    ) throws Exception {
+        return ResponseHelper.success(secKillLogic.pageActivity(status,keyword,startTime,pageNum, pageSize,request));
+    }
+
+
+    @GetMapping("/list/spec/select")
+    @ApiOperation(value = "秒杀选择活动商品列表")
+    public ResponseHelper pageActivityGoods(
+            @ApiParam(value = "商品名称") @RequestParam(required = false) String keyword,
+            @ApiParam(value = "商品分类id") @RequestParam(required = false) String categoryId,
+            @ApiParam(value = "页号",required = true) @RequestParam Integer pageNum,
+            @ApiParam(value = "页大小",required = true) @RequestParam Integer pageSize,
+            HttpServletRequest request
+    ) throws Exception {
+        return ResponseHelper.success(secKillLogic.goodsSpecList(categoryId,keyword,pageNum, pageSize,request));
+    }
+
+
+    @PostMapping("/activity/add")
+    @ApiOperation(value = "新增秒杀活动")
+    public ResponseHelper add(
+            @ApiParam(value = "object",required = true) @RequestBody SecKillActivityBean secKillActivityBean,
+            HttpServletRequest request
+    ) throws RemoteServiceException {
+        secKillLogic.add(secKillActivityBean,request);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/activity/update")
+    @ApiOperation(value = "编辑秒杀活动")
+    public ResponseHelper update(
+            HttpServletRequest request,
+            @ApiParam(value = "object",required = true) @RequestBody SecKillActivityBean secKillActivityBean)
+            throws RemoteServiceException {
+        secKillLogic.update(request, secKillActivityBean);
+        return ResponseHelper.success();
+    }
+
+    @GetMapping("/activity/detail")
+    @ApiOperation(value = "秒杀活动详情")
+    public ResponseHelper activityDetail(
+            @ApiParam(value = "秒杀活动secKillId",required = true) @RequestParam String secKillId
+    ) {
+        return ResponseHelper.success(secKillLogic.detail(secKillId));
+    }
+    @PostMapping("/activity/close")
+    @ApiOperation(value = "关闭秒杀活动")
+    public ResponseHelper activityClose(
+            @ApiParam(value = "秒杀活动secKillId",required = true) @RequestParam String secKillId
+    ) {
+        secKillLogic.updateStatus(secKillId,false);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/activity/open")
+    @ApiOperation(value = "重新开启秒杀活动")
+    public ResponseHelper activityOpen(
+            @ApiParam(value = "秒杀活动secKillId",required = true) @RequestParam String secKillId
+    ) {
+        secKillLogic.updateStatus(secKillId,true);
+        return ResponseHelper.success();
+    }
+
+
+    @PostMapping("/spec/delete")
+    @ApiOperation(value = "删除秒杀商品")
+    public ResponseHelper specDelete(
+            @ApiParam(value = "secKillSpecId",required = true) @RequestParam String secKillSpecId
+    ) throws RemoteServiceException {
+        secKillLogic.specDelete(secKillSpecId);
+        return ResponseHelper.success();
+    }
+    @PostMapping("/spec/close")
+    @ApiOperation(value = "关闭秒杀商品")
+    public ResponseHelper close(
+            @ApiParam(value = "secKillSpecId",required = true) @RequestParam String secKillSpecId
+    ) throws RemoteServiceException {
+        secKillLogic.specClose(secKillSpecId);
+        return ResponseHelper.success();
+    }
+
+
+
+
+//    @PostMapping("/updateStockNum")
+//    @ApiOperation(value = "秒杀活动开始后增加或减少库存")
+//    public ResponseHelper updateStockNum(
+//            @ApiParam(value = "secKillSpecId",required = true) @RequestParam String secKillSpecId,
+//            @ApiParam(value = "stockNum,增加为正数,减少为负",required = true) @RequestParam Integer stockNum
+//    ) throws RemoteServiceException {
+//        secKillLogic.updateStockNum(secKillSpecId,stockNum);
+//        return ResponseHelper.success();
+//    }
+}

+ 71 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminCompanyPayConfigController.java

@@ -0,0 +1,71 @@
+package com.gree.mall.manager.controller.admin;
+
+import cn.hutool.core.lang.TypeReference;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.gree.mall.manager.annotation.ZfireList;
+import com.gree.mall.manager.bean.admin.AdminCompanyPayConfigVO;
+import com.gree.mall.manager.exception.RemoteServiceException;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.admin.AdminCompanyPayConfigLogic;
+import com.gree.mall.manager.plus.entity.AdminCompanyWechatPayConfig;
+import com.gree.mall.manager.zfire.bean.ZfireParamBean;
+import com.gree.mall.manager.zfire.util.FieldUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@RestController
+@Api(value = "商户支付配置", tags = {"商户支付配置"})
+@RequestMapping(value = "/admin/company/pay/config", produces = "application/json; charset=utf-8")
+public class AdminCompanyPayConfigController {
+
+    @Resource
+    AdminCompanyPayConfigLogic adminCompanyPayConfigLogic;
+
+    @ZfireList
+    @PostMapping("/list")
+    @ApiOperation(value = "列表")
+    public ResponseHelper<Page<AdminCompanyPayConfigVO>> list(
+            @RequestBody ZfireParamBean zfireParamBean
+    ) {
+        IPage<AdminCompanyPayConfigVO> vo = adminCompanyPayConfigLogic.list(zfireParamBean);
+        return ResponseHelper.success(vo, new TypeReference<AdminCompanyPayConfigVO>() {});
+    }
+
+    @PostMapping("/list/export")
+    @ApiOperation(value = "导出")
+    public void listExport(@RequestBody ZfireParamBean zfireParamBean, HttpServletRequest request, HttpServletResponse response) throws Exception {
+        //1.组装查询条件
+        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
+        //2.查询要导出的内容
+        IPage<AdminCompanyPayConfigVO> page = adminCompanyPayConfigLogic.list(zfireParamBean);
+        //3.导出
+        FieldUtils.exportData(page.getRecords(), zfireParam.getExportFields(), request, response);
+    }
+
+    @PostMapping("/detail")
+    @ApiOperation(value = "详情")
+    public ResponseHelper<AdminCompanyWechatPayConfig> detail(
+            @ApiParam(value = "id", required = true) @RequestParam String id
+    ) throws RemoteServiceException {
+        AdminCompanyWechatPayConfig bean = adminCompanyPayConfigLogic.detail(id);
+        return ResponseHelper.success(bean);
+    }
+
+    @PostMapping("/save")
+    @ApiOperation(value = "保存")
+    public ResponseHelper save(
+            @RequestBody AdminCompanyWechatPayConfig bean
+    ) throws Exception {
+
+        adminCompanyPayConfigLogic.save(bean);
+
+        return ResponseHelper.success();
+    }
+}

+ 48 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminCompanyWechatOtherController.java

@@ -0,0 +1,48 @@
+package com.gree.mall.manager.controller.admin;
+
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.admin.AdminCompanyWechatOtherLogic;
+import com.gree.mall.manager.plus.entity.AdminCompanyWechatOther;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+
+@RestController
+@Api(value = "小程序其他配置", tags = {"小程序其他配置"})
+@RequestMapping(value = "/admin/company/other", produces = "application/json; charset=utf-8")
+public class AdminCompanyWechatOtherController {
+
+
+    @Autowired
+    private AdminCompanyWechatOtherLogic adminCompanyWechatOtherLogic;
+
+
+    @GetMapping("/getOne")
+    @ApiOperation("获取企业其他配置")
+    public ResponseHelper<AdminCompanyWechatOther> getOne(HttpServletRequest request) {
+
+        return ResponseHelper.success(adminCompanyWechatOtherLogic.getOne(request));
+    }
+
+    @PostMapping("/init")
+    @ApiOperation("初始化其他配置")
+    public ResponseHelper init(
+            @ApiParam(value = "企业微信id", required = true) @RequestParam String companyId,
+            @ApiParam(value = "企业名称", required = true) @RequestParam String companyName) {
+        adminCompanyWechatOtherLogic.init(companyId, companyName);
+        return ResponseHelper.success();
+    }
+
+
+
+    @ApiOperation("更新其他配置")
+    @PostMapping("/update")
+    public ResponseHelper update(@RequestBody AdminCompanyWechatOther other,HttpServletRequest request) {
+        adminCompanyWechatOtherLogic.update(other,request);
+        return ResponseHelper.success();
+    }
+}

+ 61 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminCompanyWechatTemplateController.java

@@ -0,0 +1,61 @@
+package com.gree.mall.manager.controller.admin;
+
+import com.gree.mall.manager.bean.admin.reqDto.AdminCompanyWechatTemplateUpdateReqDto;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.admin.AdminCompanyWechatTemplateLogic;
+import com.gree.mall.manager.plus.entity.AdminCompanyWechatTemplate;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.omg.CORBA.PUBLIC_MEMBER;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+
+@RestController
+@Api(value = "小程序模板", tags ={"小程序模板"} )
+@RequestMapping(value = "/admin/company/template", produces = "application/json; charset=utf-8")
+public class AdminCompanyWechatTemplateController {
+
+    @Autowired
+    private AdminCompanyWechatTemplateLogic adminCompanyWechatTemplateLogic;
+
+
+
+    @GetMapping("/detail")
+    @ApiOperation("获取企业下模板")
+    public ResponseHelper<List<AdminCompanyWechatTemplate>> getTemplate( @ApiParam(value = "企业id",required = true) @RequestParam String companyId) {
+
+
+        return ResponseHelper.success(adminCompanyWechatTemplateLogic.getTemplate(companyId));
+    }
+
+
+    @PostMapping("/updateTemplate")
+    @ApiOperation("更改模板信息")
+    public ResponseHelper updateTemplate(HttpServletRequest request,@RequestBody AdminCompanyWechatTemplate adminCompanyWechatTemplate) {
+        adminCompanyWechatTemplateLogic.updateTemplate(request, adminCompanyWechatTemplate);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/updateCompanyWithTemplate")
+    @ApiOperation("更改企业信息和模板信息")
+    public ResponseHelper updateCompanyWithTemplate(@RequestBody AdminCompanyWechatTemplateUpdateReqDto reqDto) {
+        adminCompanyWechatTemplateLogic.updateCompanyWithTemplate(reqDto);
+        return ResponseHelper.success();
+    }
+
+
+    @PostMapping("/initCompanyWechatTemplate")
+    @ApiOperation("初始化企业微信模板")
+    public ResponseHelper initCompanyWechatTemplate(
+            @ApiParam(required = true,value = "企业微信id")@RequestParam String companyWechatId,
+            @ApiParam(required = true,value = "企业名称")@RequestParam String companyName
+    ) {
+
+        adminCompanyWechatTemplateLogic.initCompanyWechatTemplate(companyWechatId, companyName);
+        return ResponseHelper.success();
+    }
+}

+ 160 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminDeptController.java

@@ -0,0 +1,160 @@
+package com.gree.mall.manager.controller.admin;
+
+import cn.hutool.core.lang.TypeReference;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.gree.mall.manager.annotation.ZfireList;
+import com.gree.mall.manager.bean.admin.AdminDeptTree;
+import com.gree.mall.manager.bean.admin.AdminDeptWebsitVO;
+import com.gree.mall.manager.bean.notice.NoticeRecordReadBean;
+import com.gree.mall.manager.bean.workorder.IncreAddOrUp;
+import com.gree.mall.manager.bean.workorder.IncreVO;
+import com.gree.mall.manager.exception.RemoteServiceException;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.admin.AdminDeptLogic;
+import com.gree.mall.manager.plus.entity.AdminDept;
+import com.gree.mall.manager.plus.entity.AdminDeptWebsit;
+import com.gree.mall.manager.utils.excel.ExcelUtils;
+import com.gree.mall.manager.zfire.bean.ZfireParamBean;
+import com.gree.mall.manager.zfire.util.FieldUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.text.ParseException;
+import java.util.List;
+
+@Slf4j
+@RestController
+@Api(value = "部门级别api", tags = {"部门级别api"})
+@RequestMapping(value = "/admin/dept", produces = "application/json; charset=utf-8")
+public class AdminDeptController {
+
+    @Autowired
+    AdminDeptLogic adminDeptLogic;
+
+
+    @GetMapping("/tree")
+    @ApiOperation("部门树")
+    public ResponseHelper<AdminDeptTree> tree(HttpServletRequest request) {
+        List<AdminDeptTree> tree = adminDeptLogic.tree(request);
+        return ResponseHelper.success(tree);
+    }
+
+    @GetMapping("/treeWebsit")
+    @ApiOperation("部门树合并网点")
+    public ResponseHelper<AdminDeptTree> treeWebsit(HttpServletRequest request) {
+        List<AdminDeptTree> tree = adminDeptLogic.treeWebsit(request);
+        return ResponseHelper.success(tree);
+    }
+
+
+    @ZfireList
+    @PostMapping("/list")
+    @ApiOperation(value = "部门网点列表")
+    public ResponseHelper<IPage<AdminDeptWebsitVO>> list(
+            @RequestBody ZfireParamBean zfireParamBean
+    ) throws RemoteServiceException {
+        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
+        IPage<AdminDeptWebsitVO> adminDeptVOIPage = adminDeptLogic.list(new Page(zfireParam.getPageNum(), zfireParam.getPageSize()), zfireParam);
+        return ResponseHelper.success(adminDeptVOIPage, new TypeReference<AdminDeptWebsitVO>() {});
+    }
+
+    @PostMapping("/list/export")
+    @ApiOperation(value = "部门网点列表导出")
+    public void listExport(
+            @RequestBody ZfireParamBean zfireParamBean,
+            HttpServletRequest request,
+            HttpServletResponse response
+    ) throws Exception {
+        //1.组装查询条件
+        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
+        //2.查询要导出的内容
+        IPage<AdminDeptWebsitVO> adminDeptVOIPage = adminDeptLogic.list(new Page(zfireParam.getPageNum(), zfireParam.getPageSize()), zfireParam);
+        //3.导出
+        FieldUtils.exportData(adminDeptVOIPage.getRecords(), zfireParam.getExportFields(), request, response);
+    }
+
+
+    @PostMapping("/add")
+    @ApiOperation("添加部门")
+    public ResponseHelper add(
+            @RequestBody AdminDept adminDept,
+            HttpServletRequest request
+    ) throws ParseException {
+        adminDeptLogic.add(adminDept);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/update")
+    @ApiOperation("修改部门")
+    public ResponseHelper update(
+            @RequestBody AdminDept adminDept,
+            HttpServletRequest request
+    ) throws ParseException {
+        adminDeptLogic.update(adminDept);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/del")
+    @ApiOperation("删除部门")
+    public ResponseHelper update(
+            @ApiParam(value = "部门id" , required = true) @RequestParam(required = true) String adminDeptId,
+            HttpServletRequest request
+    ) throws ParseException {
+        adminDeptLogic.del(adminDeptId);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/addWebsit")
+    @ApiOperation("添加部门网点")
+    public ResponseHelper addWebsit(
+            @ApiParam(value = "部门id" , required = true) @RequestParam(required = true) String adminDeptId,
+            @ApiParam(value = "网点" , required = true) @RequestParam(required = true) List<String> websitIds,
+            HttpServletRequest request
+    ) throws ParseException {
+        adminDeptLogic.addWebsit(adminDeptId,websitIds);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/updateWebsit")
+    @ApiOperation("修改部门网点")
+    public ResponseHelper updateWebsit(
+            @RequestBody AdminDeptWebsit adminDeptWebsit,
+            HttpServletRequest request
+    ) throws ParseException {
+        adminDeptLogic.updateWebsit(adminDeptWebsit);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/delWebsit")
+    @ApiOperation("删除部门网点")
+    public ResponseHelper delWebsit(
+            @ApiParam(value = "部门网点id" , required = true) @RequestParam(required = true) String adminDeptWebsitId,
+            HttpServletRequest request
+    ) throws ParseException {
+        adminDeptLogic.delWebsit(adminDeptWebsitId);
+        return ResponseHelper.success();
+    }
+
+
+
+    @PostMapping("/import")
+    @ApiOperation("导入部门网点")
+    public ResponseHelper importData(
+            @RequestPart("file") MultipartFile file
+    ) throws IOException {
+        List<Object> objects = ExcelUtils.importExcel(file);
+        adminDeptLogic.importData(objects);
+        return ResponseHelper.success();
+    }
+
+
+}

+ 56 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminModuleController.java

@@ -0,0 +1,56 @@
+package com.gree.mall.manager.controller.admin;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gree.mall.manager.bean.admin.AdminModuleBean;
+import com.gree.mall.manager.bean.admin.AdminModuleVO;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.admin.AdminModuleLogic;
+import com.gree.mall.manager.plus.entity.AdminModule;
+import com.gree.mall.manager.plus.entity.AdminRole;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@Slf4j
+@RestController
+@Api(value = "系统菜单管理", tags ={"系统菜单管理"} )
+@RequestMapping(value = "/admin/module", produces = "application/json; charset=utf-8")
+public class AdminModuleController {
+
+    @Autowired
+    AdminModuleLogic adminModuleLogic;
+
+    @GetMapping("/detail")
+    @ApiOperation("详情")
+    public ResponseHelper<AdminModuleVO> detail(@RequestParam String moduleId){
+        AdminModuleVO detail = adminModuleLogic.detail(moduleId);
+        return ResponseHelper.success(detail);
+    }
+
+    @PostMapping("/add")
+    @ApiOperation("新增")
+    public ResponseHelper add(@RequestBody AdminModuleBean adminModule){
+        adminModuleLogic.add(adminModule);
+        return ResponseHelper.success();
+    }
+
+
+    @PostMapping("/update")
+    @ApiOperation("修改")
+    public ResponseHelper update(@RequestBody AdminModule adminModule){
+        adminModuleLogic.update(adminModule);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/delete")
+    @ApiOperation("删除")
+    public ResponseHelper delete(@RequestParam String id){
+        adminModuleLogic.delete(id);
+        return ResponseHelper.success();
+    }
+
+
+
+}

+ 85 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminRoleController.java

@@ -0,0 +1,85 @@
+package com.gree.mall.manager.controller.admin;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gree.mall.manager.bean.user.RoleTypeBean;
+import com.gree.mall.manager.exception.RemoteServiceException;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.admin.AdminRoleLogic;
+import com.gree.mall.manager.plus.entity.AdminRole;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+
+@Slf4j
+@RestController
+@Api(value = "系统角色管理", tags ={"系统角色管理"} )
+@RequestMapping(value = "/admin/role", produces = "application/json; charset=utf-8")
+public class AdminRoleController {
+
+    @Autowired
+    AdminRoleLogic adminRoleLogic;
+
+    @GetMapping("/list")
+    @ApiOperation(value = "角色列表")
+    public ResponseHelper<IPage<AdminRole>> list(
+            HttpServletRequest request,
+            @ApiParam(value = "商户名称") @RequestParam(required = false) String companyWechatName,
+            @ApiParam(value = "父角色名") @RequestParam(required = false) String parentRoleName,
+            @ApiParam(value = "页号",required = true) @RequestParam Integer pageNum,
+            @ApiParam(value = "页大小",required = true) @RequestParam Integer pageSize
+    ) throws RemoteServiceException {
+        IPage<AdminRole> adminRoleIPage = adminRoleLogic.listPage(request, companyWechatName, parentRoleName, pageNum, pageSize);
+        return ResponseHelper.success(adminRoleIPage);
+    }
+
+    @GetMapping("/detail")
+    @ApiOperation(value = "角色详情")
+    public ResponseHelper<AdminRole> detail(
+            @ApiParam(value = "角色id",required = true) @RequestParam(required = true) String adminRoleId
+    ) throws RemoteServiceException {
+        AdminRole detail = adminRoleLogic.detail(adminRoleId);
+        return ResponseHelper.success(detail);
+    }
+
+    @PostMapping("/add")
+    @ApiOperation(value = "新增角色")
+    public ResponseHelper add(
+            HttpServletRequest request,
+            @RequestBody AdminRole adminRole
+    ) throws RemoteServiceException {
+        adminRoleLogic.add(request,adminRole);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/update")
+    @ApiOperation(value = "修改角色")
+    public ResponseHelper update(@RequestBody AdminRole adminRole) throws RemoteServiceException {
+        adminRoleLogic.update(adminRole);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/delete")
+    @ApiOperation(value = "删除角色")
+    public ResponseHelper delete(
+            @ApiParam(value = "角色id",required = true) @RequestParam String adminRoleId
+    ) throws RemoteServiceException {
+        adminRoleLogic.delete(adminRoleId);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/get/role/type")
+    @ApiOperation(value = "获取角色类型")
+    public ResponseHelper<List<RoleTypeBean>> getRoleType() throws RemoteServiceException {
+        List<RoleTypeBean> list = adminRoleLogic.getRoleType();
+        return ResponseHelper.success(list);
+    }
+
+
+
+}

+ 271 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminUserController.java

@@ -0,0 +1,271 @@
+package com.gree.mall.manager.controller.admin;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gree.mall.manager.annotation.ApiNotAuth;
+import com.gree.mall.manager.bean.ExcelData;
+import com.gree.mall.manager.bean.SVerification;
+import com.gree.mall.manager.bean.admin.*;
+import com.gree.mall.manager.bean.admin.reqDto.AdminCompanyWechatReqBean;
+import com.gree.mall.manager.bean.admin.reqDto.AdminUserAddReqBean;
+import com.gree.mall.manager.bean.admin.respDto.AdminCompanyWechatRespPageBean;
+import com.gree.mall.manager.constant.Constant;
+import com.gree.mall.manager.logic.admin.AdminCompanyWechatLogic;
+import com.gree.mall.manager.logic.admin.AdminUserLogic;
+import com.gree.mall.manager.exception.RemoteServiceException;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.plus.entity.AdminCompanyWechat;
+import com.gree.mall.manager.plus.entity.AdminUser;
+import com.gree.mall.manager.utils.excel.ExcelUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.integration.redis.util.RedisLockRegistry;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.Lock;
+
+@Slf4j
+@RestController
+@Api(value = "系统用户管理", tags ={"后台用户相关API"} )
+@RequestMapping(value = "/admin/user", produces = "application/json; charset=utf-8")
+public class AdminUserController {
+
+    @Autowired
+    AdminUserLogic adminUserLogic;
+    @Autowired
+    AdminCompanyWechatLogic adminCompanyWechatLogic;
+    @Autowired
+    RedisLockRegistry redisLockRegistry;
+
+
+
+
+    @ApiNotAuth
+    @PostMapping("/login")
+    @ApiOperation(value = "登录")
+    public ResponseHelper<AdminUserCom> login(
+            @ApiParam(value = "帐号",required = true) @RequestParam(required = true) String userName,
+            @ApiParam(value = "密码",required = false) @RequestParam(required = false) String password,
+            @ApiParam(value = "验证码code",required = false) @RequestParam(required = false) String code,
+            @ApiParam(value = "验证码值",required = false) @RequestParam(required = false) String codeValue
+
+    ) throws RemoteServiceException, InterruptedException {
+        Lock obtain = redisLockRegistry.obtain(Constant.RedisPrefix.LOCK_LOGIN + userName);
+        if(!obtain.tryLock(10, TimeUnit.SECONDS)){
+            throw new RemoteServiceException("系统繁忙请稍后再试");
+        }
+        try {
+            AdminUserCom adminUserCom = adminUserLogic.login(userName, password, code, codeValue);
+            return ResponseHelper.success(adminUserCom);
+        }finally {
+            obtain.unlock();
+        }
+    }
+
+    @PostMapping("/password/update")
+    @ApiOperation(value = "修改密码")
+    public ResponseHelper<AdminUserBean> login(
+            @ApiParam(value = "帐号",required = true) @RequestParam(required = true) String userName,
+            @ApiParam(value = "密码",required = true) @RequestParam(required = true) String password,
+            @ApiParam(value = "新密码",required = true) @RequestParam(required = true) String newPassword
+    ) throws RemoteServiceException {
+        adminUserLogic.updatePassword(userName, password,newPassword);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/status/update")
+    @ApiOperation("修改帐号状态(冻结/正常)")
+    public ResponseHelper updateStatus(
+            @ApiParam(value = "帐号名称",required = true) @RequestParam(required = true) String adminUserId,
+            @ApiParam(value = "true:正常  false:冻结",required = true) @RequestParam(required = true) Boolean status
+    ) throws RemoteServiceException {
+        adminUserLogic.updateStatus(adminUserId,status);
+        return ResponseHelper.success();
+    }
+
+
+    @ApiNotAuth
+    @PostMapping("/addCompanyWechat")
+    @ApiOperation("新增商户")
+    public ResponseHelper addCompanyWechat(
+            @ApiParam(value = "帐号",required = true) @RequestBody AdminCompanyWechatReqBean adminUserBean,
+            HttpServletRequest request
+    ) throws RemoteServiceException {
+        adminCompanyWechatLogic.addCompanyWechat(adminUserBean);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/add")
+    @ApiOperation("新增帐号")
+    public ResponseHelper add(
+            @ApiParam(value = "帐号",required = true) @RequestBody AdminUserAddReqBean adminUserBean
+    ) throws RemoteServiceException {
+        adminUserLogic.add(adminUserBean,false, false);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/user/updateCompanyWechat")
+    @ApiOperation(value = "修改商户信息")
+    public ResponseHelper updateCompanyWechat(
+            @ApiParam(value = "商户信息", required = true) @RequestBody AdminCompanyWechat adminCompanyWechat
+    ) throws RemoteServiceException {
+        adminCompanyWechatLogic.updateCompanyWechat(adminCompanyWechat);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/user/update")
+    @ApiOperation(value = "修改帐号")
+    public ResponseHelper updateUser(
+            HttpServletRequest request,
+            @ApiParam(value = "帐号", required = true) @RequestBody AdminUserAddReqBean adminUserBean
+    ) throws RemoteServiceException {
+        adminUserLogic.update(request, adminUserBean);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/password/reset")
+    @ApiOperation("重置密码")
+    public ResponseHelper resetPwd (
+            @ApiParam(value = "用户id",required = true) @RequestParam(required = true) String adminUserId,
+            @ApiParam(value = "密码",required = true) @RequestParam(required = true) String password,
+            HttpServletRequest request
+    ) throws RemoteServiceException {
+        adminUserLogic.resetPassword(adminUserId,password,request);
+        return ResponseHelper.success();
+    }
+
+
+    @GetMapping("/list")
+    @ApiOperation(value = "帐号列表")
+    public ResponseHelper<IPage<AdminUser>> list(
+            @ApiParam(value = "商户id",required = false) @RequestParam(required = false) String companyWechatId,
+            @ApiParam(value = "商户名称",required = false) @RequestParam(required = false) String companyWechatName,
+            @ApiParam(value = "角色id",required = false) @RequestParam(required = false) String roleId,
+            @ApiParam(value = "状态 true:正常 false:冻结",required = false) @RequestParam(required = false) Boolean status,
+            @ApiParam(value = "用户名",required = false) @RequestParam(required = false) String userName,
+            @ApiParam(value = "网点id",required = false) @RequestParam(required = false) String websitId,
+            @ApiParam(value = "页号",required = true) @RequestParam(required = true) Integer pageNum,
+            @ApiParam(value = "页大小",required = true) @RequestParam(required = true) Integer pageSize,
+            HttpServletRequest request
+    ) throws RemoteServiceException {
+        IPage<AdminUser> page = adminUserLogic.list(companyWechatId,companyWechatName,roleId,status,userName,pageNum, pageSize,websitId);
+        return ResponseHelper.success(page);
+    }
+
+    @GetMapping("/mch/list")
+    @ApiOperation(value = "商户账号列表")
+    public ResponseHelper<IPage<AdminCompanyWechatRespPageBean>> list(
+            @ApiParam(value = "会员帐号",required = false) @RequestParam(required = false) String userName,
+            @ApiParam(value = "用户昵称",required = false) @RequestParam(required = false) String nickName,
+            @ApiParam(value = "联系电话",required = false) @RequestParam(required = false) String linkPhone,
+            @ApiParam(value = "电子邮箱",required = false) @RequestParam(required = false) String email,
+            @ApiParam(value = "状态 true:正常 false:冻结",required = false) @RequestParam(required = false) Boolean status,
+            @ApiParam(value = "页号",required = true) @RequestParam(required = true) Integer pageNum,
+            @ApiParam(value = "页大小",required = true) @RequestParam(required = true) Integer pageSize
+    ) throws RemoteServiceException {
+        IPage<AdminCompanyWechatRespPageBean> page = adminCompanyWechatLogic.list(userName,nickName,linkPhone,email,status,pageNum, pageSize);
+        return ResponseHelper.success(page);
+    }
+
+    @GetMapping("/mch/export")
+    @ApiOperation(value = "商户列表导出")
+    public void exportMch(
+            @ApiParam(value = "会员帐号",required = false) @RequestParam(required = false) String userName,
+            @ApiParam(value = "用户昵称",required = false) @RequestParam(required = false) String nickName,
+            @ApiParam(value = "联系电话",required = false) @RequestParam(required = false) String linkPhone,
+            @ApiParam(value = "电子邮箱",required = false) @RequestParam(required = false) String email,
+            @ApiParam(value = "状态 true:正常 false:冻结",required = false) @RequestParam(required = false) Boolean status,
+            HttpServletRequest request,
+            HttpServletResponse response
+    ) throws Exception {
+        IPage<AdminCompanyWechatRespPageBean> page = adminCompanyWechatLogic.list(userName,nickName,linkPhone,email,status,1, -1);
+        ExcelData excelData = adminUserLogic.exportMch(page.getRecords());
+        ExcelUtils.exportExcel(request,response,"mch.xlsx",excelData);
+    }
+
+
+    @GetMapping("/module/list")
+    @ApiOperation(value = "功能菜单权限列表")
+    public ResponseHelper<List<AdminModuleTree>> moduleList(
+            @ApiParam(value = "用户id",required = true) @RequestParam(required = true) String adminUserId,
+            @ApiParam(value = "父级角色id") @RequestParam(required = false) String parentAdminRoleId
+    ) throws RemoteServiceException {
+        List<AdminModuleTree> adminModuleTrees = adminUserLogic.queryAdminModule(adminUserId, parentAdminRoleId);
+        return ResponseHelper.success(adminModuleTrees);
+    }
+
+    @GetMapping("/module/id/checked")
+    @ApiOperation("查询选中的功能模块ids")
+    public ResponseHelper<List<String>> queryModuleIdChecked(
+            @ApiParam(value = "角色id",required = true) @RequestParam(required = true) String adminRoleId
+    ) throws RemoteServiceException {
+        List<String> moduleIds = adminUserLogic.queryModuleIdChecked(adminRoleId);
+        return ResponseHelper.success(moduleIds);
+    }
+
+    @GetMapping("/module/all")
+    @ApiOperation(value = "全部功能菜单权限列表")
+    public ResponseHelper<List<AdminModuleTree>> allModuleList(
+            @ApiParam(value = "角色",required = true) @RequestParam(required = true) String adminRoleId,
+            HttpServletRequest request
+    ) throws RemoteServiceException {
+        List<AdminModuleTree> adminModuleTrees = adminUserLogic.queryAllAdminModuleTree(adminRoleId,request);
+        return ResponseHelper.success(adminModuleTrees);
+    }
+
+    @PostMapping("/module/grant")
+    @ApiOperation(value = "授权动能菜单权限")
+    public ResponseHelper grant(
+            @RequestBody AdminWebsitGrantBean adminWebsitGrantBean
+            ) throws RemoteServiceException {
+        adminUserLogic.grantModules(adminWebsitGrantBean);
+        return ResponseHelper.success();
+    }
+
+    @GetMapping("/detail")
+    @ApiOperation(value = "详情")
+    public ResponseHelper<AdminUserBean> detail(
+            @ApiParam(value = "帐号id",required = true) @RequestParam(required = true) String adminUserId
+    ) throws RemoteServiceException {
+        AdminUserBean detail = adminUserLogic.detail(adminUserId);
+        return ResponseHelper.success(detail);
+    }
+
+    @PostMapping("/logout")
+    @ApiOperation("退出登录")
+    public ResponseHelper logout(HttpServletRequest request){
+        adminUserLogic.logout(request);
+        return ResponseHelper.success();
+    }
+
+    @ApiNotAuth
+    @GetMapping("/imageVerification")
+    @ApiOperation(value = "获取图片验证码")
+    public ResponseHelper<SVerification> defaultKaptcha()
+            throws Exception {
+        SVerification sVerification = adminUserLogic.defaultKaptcha();
+        return ResponseHelper.success(sVerification);
+    }
+
+//    @ApiNotAuth
+//    @PostMapping("/check-or-login/account")
+//    @ApiOperation(value = "检查账号")
+//    public ResponseHelper<ExternalMapBean> checkOrLoginAccount(
+//            @ApiParam(value = "账号",required = true) @RequestParam String account,
+//            @ApiParam(value = "密码",required = true) @RequestParam String password,
+//            @ApiParam(value = "是否检查",required = true) @RequestParam Boolean isCheck,
+//            @ApiParam(value = "时间戳",required = true) @RequestParam String timestamp,
+//            @ApiParam(value = "签名",required = true) @RequestParam String sign
+//    ) throws Exception {
+//        ExternalMapBean bean = adminUserLogic.checkOrLoginAccount(account, password, isCheck, timestamp, sign);
+//        return ResponseHelper.success(bean);
+//    }
+
+
+}

+ 162 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminWebsitController.java

@@ -0,0 +1,162 @@
+package com.gree.mall.manager.controller.admin;
+
+import com.gree.mall.manager.bean.ExcelData;
+import com.gree.mall.manager.bean.admin.AdminWebsitNewBean;
+import com.gree.mall.manager.bean.admin.AdminWebsitTree;
+import com.gree.mall.manager.bean.workorder.AdminWebsitList;
+import com.gree.mall.manager.exception.RemoteServiceException;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.admin.AdminWebsitLogic;
+import com.gree.mall.manager.plus.entity.AdminWebsit;
+import com.gree.mall.manager.plus.entity.AdminWebsitPayConfig;
+import com.gree.mall.manager.plus.entity.AdminZone;
+import com.gree.mall.manager.utils.excel.ExcelUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import me.chanjar.weixin.common.error.WxErrorException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+@Slf4j
+@RestController
+@Api(value = "企业微信部门管理API", tags = {"企业微信部门管理API"})
+@RequestMapping(value = "/admin/websit", produces = "application/json; charset=utf-8")
+public class AdminWebsitController {
+
+    @Autowired
+    AdminWebsitLogic adminWebsitLogic;
+
+    @GetMapping("/tree")
+    @ApiOperation("部门树")
+    public ResponseHelper<AdminWebsitTree> tree(HttpServletRequest request) {
+        List<AdminWebsitTree> tree = adminWebsitLogic.tree(request);
+        return ResponseHelper.success(tree);
+    }
+
+    @GetMapping("/list")
+    @ApiOperation("部门列表")
+    public ResponseHelper<List<AdminWebsit>> list(
+            @ApiParam(value = "A=平台 B=商户网点 C=普通网点") @RequestParam(required = false) String type,
+            @RequestParam(required = false) Boolean isAll,
+            @RequestParam(required = false) String websitId,
+            @RequestParam(required = false) String websitName,
+            @RequestParam(required = false) Boolean status,
+            @RequestParam(required = false) Boolean isIncre,
+            @RequestParam(required = false) String streetCode,
+            @RequestParam(required = false) String channelId,
+            @RequestParam(required = false) String categoryId,
+            @RequestParam(required = false) String orderSourceId,
+            @RequestParam(required = false) String orderSmallId,
+            @RequestParam(required = false) Boolean queryPartsWebsit,
+            @RequestParam(required = false)   @ApiParam(value = "网点属性 SELF=自建网点 MAJOR=第三方专业网点 MERCHANT=第三方经销商家网点")String attr,
+            @RequestParam(required = false) Integer level
+    ) {
+        List<AdminWebsit> list = adminWebsitLogic.list(attr,websitId,websitName,type, isAll, isIncre, status, streetCode, channelId, categoryId, orderSmallId, orderSourceId, queryPartsWebsit, level);
+        return ResponseHelper.success(list);
+    }
+
+
+    @GetMapping("/websitList")
+    @ApiOperation("网点列表")
+    public ResponseHelper<List<AdminWebsitList>> websitList(
+            @ApiParam(value = "A=平台 B=商户网点 C=普通网点") @RequestParam(required = false) String type,
+            @ApiParam(value = "当前权限网点") @RequestParam(required = false) Boolean isAll,
+            @ApiParam(value = "状态") @RequestParam(required = false) Boolean status,
+            @ApiParam(value = "是否增值网点") @RequestParam(required = false) Boolean isIncre,
+            @ApiParam(value = "街道id") @RequestParam(required = false) String streetCode,
+            @ApiParam(value = "渠道") @RequestParam(required = false) String channelId,
+            @ApiParam(value = "产品大类") @RequestParam(required = false) String categoryId,
+            @ApiParam(value = "工单来源") @RequestParam(required = false) String orderSource,
+            @ApiParam(value = "工单类型") @RequestParam(required = false) String orderSmallId
+    ) {
+        List<AdminWebsitList> list = adminWebsitLogic.websitList(type, isAll, isIncre, status, streetCode, channelId, categoryId, orderSmallId, orderSource);
+        return ResponseHelper.success(list);
+    }
+
+    @GetMapping("/zone/list")
+    @ApiOperation("区域列表")
+    public ResponseHelper<AdminZone> zoneList() {
+        List<AdminZone> adminZones = adminWebsitLogic.adminZoneList();
+        return ResponseHelper.success(adminZones);
+    }
+
+    @PostMapping("/add")
+    @ApiOperation("新增部门")
+    public ResponseHelper add(@RequestBody AdminWebsitNewBean adminWebsit, HttpServletRequest request) throws RemoteServiceException, WxErrorException {
+        adminWebsitLogic.add(adminWebsit, request);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/update")
+    @ApiOperation("修改部门")
+    public ResponseHelper update(@RequestBody AdminWebsitNewBean adminWebsit, HttpServletRequest request) throws RemoteServiceException, WxErrorException {
+        adminWebsitLogic.update(adminWebsit, request);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/delete")
+    @ApiOperation("删除部门")
+    public ResponseHelper delete(@RequestParam String id, HttpServletRequest request) throws WxErrorException {
+        adminWebsitLogic.delete(id, request);
+        return ResponseHelper.success();
+    }
+
+    @GetMapping("/detail")
+    @ApiOperation("部门详情")
+    public ResponseHelper<AdminWebsitNewBean> detail(@RequestParam String id) {
+        AdminWebsitNewBean detail = adminWebsitLogic.detail(id);
+        return ResponseHelper.success(detail);
+    }
+
+    @PostMapping("/save/pay/config")
+    @ApiOperation("新增编辑网点支付配置")
+    public ResponseHelper savePayConfig(@RequestBody AdminWebsitPayConfig payConfig, HttpServletRequest request) throws RemoteServiceException {
+        adminWebsitLogic.savePayConfig(payConfig, request);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/delete/pay/config")
+    @ApiOperation("删除网点支付配置")
+    public ResponseHelper deletePayConfig(@RequestParam String id, HttpServletRequest request) {
+        adminWebsitLogic.deletePayConfig(id, request);
+        return ResponseHelper.success();
+    }
+
+
+    @PostMapping("/pay/config/list")
+    @ApiOperation("网点支付配置列表")
+    public ResponseHelper<List<AdminWebsitPayConfig>> payConfigList(
+            @ApiParam(value = "网点编号") @RequestParam(required = false) String websitId,
+            @ApiParam(value = "类别 M=辅材 P=配件") @RequestParam(required = false) String type,
+            @ApiParam(value = "状态 true=开启 false=关闭") @RequestParam(required = false) Boolean status
+    ) {
+        List<AdminWebsitPayConfig> list = adminWebsitLogic.payConfigList(websitId, type, status);
+        return ResponseHelper.success(list);
+    }
+
+    @PostMapping("/import")
+    @ApiOperation(value = "网点管理-导入(下载模板:网点管理导入模板.xlsx)")
+    public ResponseHelper<String> importData(
+            @RequestPart("file") MultipartFile file
+    ) throws Exception {
+        adminWebsitLogic.importData(file);
+        return ResponseHelper.success();
+    }
+
+    @GetMapping("/export")
+    @ApiOperation(value = "网点管理-导出")
+    public void export(
+            HttpServletRequest request,
+            HttpServletResponse response
+    ) throws Exception {
+        ExcelData excelData = adminWebsitLogic.exportData();
+        ExcelUtils.exportExcel(request, response, "网点管理列表.xlsx", excelData);
+    }
+}

+ 60 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/OperationLogController.java

@@ -0,0 +1,60 @@
+package com.gree.mall.manager.controller.admin;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gree.mall.manager.bean.admin.AdminUserBean;
+import com.gree.mall.manager.exception.RemoteServiceException;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.admin.OperationLogLogic;
+import com.gree.mall.manager.plus.entity.OperationLog;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+
+@Slf4j
+@RestController
+@Api(value = "操作日志", tags ={"操作日志"} )
+@RequestMapping(value = "/admin/operation/log", produces = "application/json; charset=utf-8")
+public class OperationLogController {
+
+    @Autowired
+    OperationLogLogic operationLogLogic;
+
+    @GetMapping("/list")
+    @ApiOperation(value = "列表")
+    public ResponseHelper<IPage<OperationLog>> list(
+            HttpServletRequest request,
+            @ApiParam(value = "模块名称",required = false) @RequestParam(required = false) String moduleName,
+            @ApiParam(value = "商户名称",required = false) @RequestParam(required = false) String companyWechatName,
+            @ApiParam(value = "账号昵称",required = false) @RequestParam(required = false) String nickName,
+            @ApiParam(value = "开始时间",required = false) @RequestParam(required = false) String startTime,
+            @ApiParam(value = "结束时间",required = false) @RequestParam(required = false) String endTime,
+            @ApiParam(value = "页号",required = true) @RequestParam(required = true) Integer pageNo,
+            @ApiParam(value = "页大小",required = true) @RequestParam(required = true) Integer pageSize
+    ) throws RemoteServiceException {
+        IPage<OperationLog> operationLogIPage = operationLogLogic.listPage(request, moduleName,companyWechatName,nickName, startTime, endTime, pageNo, pageSize);
+        return ResponseHelper.success(operationLogIPage);
+    }
+
+    @GetMapping("/module")
+    @ApiOperation(value = "所属模块")
+    public ResponseHelper<List<String>> moduleList(HttpServletRequest request){
+        return ResponseHelper.success(operationLogLogic.moduleList(request));
+    }
+
+
+    @GetMapping("/detail")
+    @ApiOperation(value = "详情")
+    public ResponseHelper<OperationLog> detail(
+            @ApiParam(value = "operationLogId",required = true) @RequestParam(required = true) String operationLogId
+    ) throws RemoteServiceException {
+        OperationLog detail = operationLogLogic.detail(operationLogId);
+        return ResponseHelper.success(detail);
+    }
+}

+ 66 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/ew/EnterpriseWechatWithUserController.java

@@ -0,0 +1,66 @@
+//package com.gree.mall.manager.controller.admin.ew;
+//
+//import com.gree.mall.manager.config.aop.annotation.IsAdmin;
+//import com.gree.mall.manager.helper.ResponseHelper;
+//import com.gree.mall.manager.logic.admin.EnterpriseWechatWithUserLogic;
+//import com.gree.mall.manager.plus.entity.AdminUser;
+//import com.gree.mall.manager.plus.entity.AdminWebsit;
+//import com.gree.mall.manager.plus.entity.EnterpriseWechat;
+//import io.swagger.annotations.Api;
+//import io.swagger.annotations.ApiOperation;
+//import io.swagger.annotations.ApiParam;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.web.bind.annotation.*;
+//
+//import java.util.List;
+//
+//@Api("企业微信用户管理api")
+//@RestController
+//@RequestMapping("/wechat/adminUser")
+//public class EnterpriseWechatWithUserController {
+//
+//
+//    @Autowired
+//    EnterpriseWechatWithUserLogic enterpriseWechatWithUserLogic;
+//
+//    @IsAdmin
+//    @ApiOperation("获取所有企业微信")
+//    @GetMapping("/getAllEnterpriseWechat")
+//    public ResponseHelper<List<EnterpriseWechat>> getAllEnterpriseWechat(
+//            @ApiParam(value = "企业微信id",required = false)@RequestParam(required = false) String enterpriseWechatId,
+//            @ApiParam(value = "企业微信名称",required = false)@RequestParam(required = false) String enterpriseWechatName
+//    ){
+//
+//        return ResponseHelper.success(enterpriseWechatWithUserLogic.getAllEnterpriseWechat(enterpriseWechatId,enterpriseWechatName));
+//    }
+//
+//    @IsAdmin
+//    @ApiOperation("查询所有用户")
+//    @GetMapping("/getAllAdminUser")
+//    public ResponseHelper<List<AdminUser>> getAllAdminUser(
+//            @ApiParam(value = "用户id",required = false)@RequestParam(required = false) String userId,
+//            @ApiParam(value = "账号",required = false)@RequestParam(required = false) String username){
+//
+//        return ResponseHelper.success(enterpriseWechatWithUserLogic.getAllAdminUser(userId,username));
+//    }
+//
+//    @IsAdmin
+//    @ApiOperation("通过用户id查寻其绑定的企业微信")
+//    @GetMapping("/getWebsitIdsByAdminUserId")
+//    public ResponseHelper<List<AdminWebsit>> getWebsitIdsByAdminUserId(
+//            @ApiParam(value = "用户id",required = true)@RequestParam(required = true)String adminUserId){
+//
+//        return ResponseHelper.success(enterpriseWechatWithUserLogic.getEnterpriseWechatIdsByAdminUserId(adminUserId));
+//    }
+//
+//    @IsAdmin
+//    @ApiOperation("变更用户与企业绑定关系")
+//    @PostMapping("/updateAdminUserWebsit")
+//    public ResponseHelper<Void> updateAdminUserWebsit(
+//            @ApiParam(value = "用户id",required = true)@RequestParam(required = true)String adminUserId,
+//            @ApiParam(value = "新的企业id 格式 enterpriseWechat1,格式enterpriseWechat2  固定清除旧的关联 添加新的关联",required = false)
+//            @RequestParam(required = false) String newEnterpriseWechats){
+//        enterpriseWechatWithUserLogic.updateEnterpriseWechatWithUser(adminUserId,newEnterpriseWechats);
+//        return ResponseHelper.success();
+//    }
+//}

+ 161 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/ew/EnterpriseWechatWorkerController.java

@@ -0,0 +1,161 @@
+//package com.gree.mall.manager.controller.admin.ew;
+//
+//import com.baomidou.mybatisplus.core.metadata.IPage;
+//import com.gree.mall.manager.bean.ExcelData;
+//import com.gree.mall.manager.bean.admin.AdminUserCom;
+//import com.gree.mall.manager.exception.RemoteServiceException;
+//import com.gree.mall.manager.helper.ResponseHelper;
+//import com.gree.mall.manager.logic.admin.ew.EnterpriseWechatWorkerLogic;
+//import com.gree.mall.manager.logic.common.CommonLogic;
+//import com.gree.mall.manager.plus.entity.EnterpriseWechatWorker;
+//import com.gree.mall.manager.utils.CommonUtils;
+//import com.gree.mall.manager.utils.excel.ExcelUtils;
+//import io.swagger.annotations.Api;
+//import io.swagger.annotations.ApiOperation;
+//import io.swagger.annotations.ApiParam;
+//import lombok.extern.slf4j.Slf4j;
+//import me.chanjar.weixin.common.error.WxErrorException;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.web.bind.annotation.*;
+//import org.springframework.web.multipart.MultipartFile;
+//
+//import javax.servlet.http.HttpServletRequest;
+//import javax.servlet.http.HttpServletResponse;
+//import javax.validation.constraints.NotBlank;
+//import javax.validation.constraints.NotEmpty;
+//import javax.validation.constraints.NotNull;
+//import java.io.IOException;
+//import java.util.List;
+//
+//@Slf4j
+//@RestController
+//@Api(value = "企业微信成员管理API", tags ={"企业微信成员管理API"} )
+//@RequestMapping(value = "/wechat/enterprise", produces = "application/json; charset=utf-8")
+//public class EnterpriseWechatWorkerController {
+//
+//    @Autowired
+//    EnterpriseWechatWorkerLogic enterpriseWechatWorkerLogic;
+//    @Autowired
+//    CommonLogic commonLogic;
+//
+//    @GetMapping("/list")
+//    @ApiOperation("成员列表")
+//    public ResponseHelper<IPage<EnterpriseWechatWorker>> list(
+//           @ApiParam(value = "keyword",required = false) @RequestParam(required = false) String keyword,
+//           @ApiParam(value = "网点主键",required = false) @RequestParam(required = false) String adminWebsitId,
+//           @ApiParam(value = "网点id",required = false) @RequestParam(required = false) Long websitId,
+//           @ApiParam(value = "页号",required = true) @RequestParam(required = true) Integer pageNo,
+//           @ApiParam(value = "页大小",required = true) @RequestParam(required = true) Integer pageSize,
+//           HttpServletRequest request
+//    ){
+//        IPage<EnterpriseWechatWorker> list = enterpriseWechatWorkerLogic.list(keyword, adminWebsitId,websitId, pageNo, pageSize,request);
+//        return ResponseHelper.success(list);
+//    }
+//
+//    //String name,String wechatUserId,String position,String mobile,Integer gender,Long mainDepartmentId,String email
+//    @PostMapping("/add")
+//    @ApiOperation("新增")
+//    public ResponseHelper add(
+//            @ApiParam(value = "名称",required = true) @RequestParam(required = true) String name,
+//            @ApiParam(value = "帐号",required = true) @RequestParam(required = true) String wechatUserId,
+//            @ApiParam(value = "职位",required = true) @RequestParam(required = true) String position,
+//            @ApiParam(value = "手机号",required = true) @RequestParam(required = true) String mobile,
+//            @ApiParam(value = "性别(1=男 2=女 0=未知)",required = true) @RequestParam(required = true) Integer gender,
+//            @ApiParam(value = "部门id",required = true) @RequestParam(required = true) Long mainDepartmentId,
+//            @ApiParam(value = "邮箱",required = true) @RequestParam(required = true) String email,
+//            HttpServletRequest request
+//    ) throws RemoteServiceException, WxErrorException {
+//        AdminUserCom adminUser = commonLogic.getAdminUser(request);
+//        enterpriseWechatWorkerLogic.add(name,wechatUserId,position,mobile,gender,mainDepartmentId,email,adminUser.getAdminCompanyWechat());
+//        return ResponseHelper.success();
+//    }
+//
+//    @PostMapping("/update")
+//    @ApiOperation("修改")
+//    public ResponseHelper update(
+//            @ApiParam(value = "id",required = true) @RequestParam(required = true) Integer id,
+//            @ApiParam(value = "名称",required = false) @RequestParam(required = false) String name,
+//            @ApiParam(value = "帐号",required = false) @RequestParam(required = false) String wechatUserId,
+//            @ApiParam(value = "职位",required = false) @RequestParam(required = false) String position,
+//            @ApiParam(value = "手机号",required = false) @RequestParam(required = false) String mobile,
+//            @ApiParam(value = "性别(1=男 2=女 0=未知)",required = true) @RequestParam(required = false) Integer gender,
+//            @ApiParam(value = "部门id",required = false) @RequestParam(required = false) Long mainDepartmentId,
+//            @ApiParam(value = "邮箱",required = false) @RequestParam(required = false) String email,
+//            HttpServletRequest request
+//    ) throws RemoteServiceException, WxErrorException {
+//        enterpriseWechatWorkerLogic.update(id,name,wechatUserId,position,mobile,gender,mainDepartmentId,email,request);
+//        return ResponseHelper.success();
+//    }
+//
+//    @PostMapping("/delete")
+//    @ApiOperation("删除")
+//    public ResponseHelper delete(
+//            @RequestParam List<Integer> id,
+//            HttpServletRequest request
+//    ) throws WxErrorException {
+//        enterpriseWechatWorkerLogic.delete(id,request);
+//        return ResponseHelper.success();
+//    }
+//
+//    @PostMapping("/excelDelete")
+//    @ApiOperation("/导入删除")
+//    public ResponseHelper<Void> loadDelete(
+//            @RequestParam("file")MultipartFile file,
+//            HttpServletRequest request
+//    ) throws IOException, WxErrorException {
+//
+//        enterpriseWechatWorkerLogic.loadDelete(file,request);
+//        return ResponseHelper.success();
+//    }
+//
+//    @GetMapping("/downloadDeleteExcel")
+//    @ApiOperation("下载导入删除模板")
+//    public void downloadDeleteExcel(
+//            HttpServletResponse response
+//    ) throws Exception {
+//        CommonUtils.downloadFile("/template/down_load_delete.xlsx",response);
+//    }
+//
+//
+//    @GetMapping("/detail")
+//    @ApiOperation("详情")
+//    public ResponseHelper<EnterpriseWechatWorker> detail(@RequestParam Integer id) throws WxErrorException {
+//        EnterpriseWechatWorker detail = enterpriseWechatWorkerLogic.detail(id);
+//        return ResponseHelper.success(detail);
+//    }
+//
+//    @GetMapping("/export")
+//    @ApiOperation("导出")
+//    public void exportData(
+//            @ApiParam(value = "keyword",required = false) @RequestParam(required = false) String keyword,
+//            @ApiParam(value = "网点主键",required = false) @RequestParam(required = false) String adminWebsitId,
+//            @ApiParam(value = "网点id",required = false) @RequestParam(required = false) Long websitId,
+//            HttpServletRequest request,
+//            HttpServletResponse response
+//    ) throws Exception {
+//        ExcelData excelData = enterpriseWechatWorkerLogic.exportData(request, keyword, adminWebsitId,websitId);
+//        ExcelUtils.exportExcel(request,response,"成员.xlsx",excelData);
+//    }
+//
+//
+//    @PostMapping("/import")
+//    @ApiOperation("导入")
+//    public ResponseHelper importData(
+//            @ApiParam(value = "附件",required = true) @RequestParam(required = true) MultipartFile file,
+//            @ApiParam(value = "部门id",required = true) @RequestParam(required = true) Long mainDepartmentId,
+//            HttpServletRequest request
+//    ) throws Exception {
+//        List<Object> datas = ExcelUtils.importExcel(file);
+//        String s = enterpriseWechatWorkerLogic.importData(datas, mainDepartmentId,request);
+//        return ResponseHelper.success(s);
+//    }
+//
+//    @GetMapping("/download")
+//    @ApiOperation("下载模板")
+//    public void download(
+//            HttpServletResponse response
+//    ) throws Exception {
+//        CommonUtils.downloadFile("/template/wechat_user.xlsx",response);
+//    }
+//
+//}

+ 202 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/big/BigController.java

@@ -0,0 +1,202 @@
+package com.gree.mall.manager.controller.big;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.gree.mall.manager.annotation.ApiNotAuth;
+import com.gree.mall.manager.bean.big.*;
+import com.gree.mall.manager.exception.RemoteServiceException;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.ExpressLogic;
+import com.gree.mall.manager.logic.big.BigLogic;
+import com.gree.mall.manager.logic.common.CommonLogic;
+import com.gree.mall.manager.logic.common.WechatLogic;
+import com.gree.mall.manager.logic.common.kuaidi100.response.SubscribeResp;
+import com.gree.mall.manager.plus.entity.*;
+import com.gree.mall.manager.plus.service.AdminCompanyWechatService;
+import com.gree.mall.manager.plus.service.OrderDetailService;
+import com.gree.mall.manager.plus.service.OrderInfoService;
+import com.gree.mall.manager.utils.CommonUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import me.chanjar.weixin.common.error.WxErrorException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.constraints.NotBlank;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+
+@Slf4j
+@RestController
+@Api(value = "大屏API", tags ={"大屏API"} )
+@RequestMapping(value = "/big", produces = "application/json; charset=utf-8")
+public class BigController {
+
+    @Autowired
+    BigLogic bigLogic;
+
+
+
+    @ApiNotAuth
+    @ApiOperation("天气预报")
+    @GetMapping("/water/get")
+    public ResponseHelper<Map<String,Object>> getWater(
+            @ApiParam(value = "city",required = true) @RequestParam(required = true) String city
+    ){
+        Map<String, Object> water = bigLogic.getWater(city);
+        return ResponseHelper.success(water);
+    }
+
+
+
+    @PostMapping("/getRegion")
+    @ApiOperation(value = "获得区域坐标")
+    public ResponseHelper<String> getRegion(
+            @ApiParam(required = false, value = "国家") @RequestParam(required = false) String country,
+            @ApiParam(required = false, value = "省") @RequestParam(required = false) String province,
+            @ApiParam(required = false, value = "市") @RequestParam(required = false) String city,
+            @ApiParam(required = false, value = "区") @RequestParam(required = false) String area
+    ) throws IOException, RemoteServiceException {
+        String region = bigLogic.getRegion(country,province,city,area);
+        return ResponseHelper.success(region);
+    }
+
+
+
+    @PostMapping("/getLarge1")
+    @ApiOperation(value = "平台获得地图总数据")
+    public ResponseHelper<LargeOneBean> getLarge1(
+            @ApiParam(required = false, value = "省") @RequestParam(required = false) String province
+    ) throws IOException, RemoteServiceException {
+        LargeOneBean largeOneBean = bigLogic.getLarge1(province);
+        return ResponseHelper.success(largeOneBean);
+    }
+
+
+    @PostMapping("/getLarge2")
+    @ApiOperation(value = "商户获得地图总数据")
+    public ResponseHelper<LargeOneBean> getLarge2(
+    ) throws IOException, RemoteServiceException {
+        LargeOneBean largeOneBean = bigLogic.getLarge2();
+        return ResponseHelper.success(largeOneBean);
+    }
+
+
+    @PostMapping("/getLarge3")
+    @ApiOperation(value = "浏览量,访客量")
+    public ResponseHelper<List<largeSeeLogin>> getLarge3(
+    ) throws IOException, RemoteServiceException {
+        List<largeSeeLogin> largeOneBean = bigLogic.getLarge3();
+        return ResponseHelper.success(largeOneBean);
+    }
+
+
+
+    @PostMapping("/getLarge4")
+    @ApiOperation(value = "近30天辅配件统计")
+    public ResponseHelper<LargeMpBean> getLarge4(
+    ) throws IOException, RemoteServiceException {
+        LargeMpBean largeMpBean = bigLogic.getLarge4();
+        return ResponseHelper.success(largeMpBean);
+    }
+
+
+
+    @PostMapping("/getLarge5")
+    @ApiOperation(value = "近30天累计工单数量")
+    public ResponseHelper<LargeWorkerOrderBean> getLarge5(
+    ) throws IOException, RemoteServiceException {
+        LargeWorkerOrderBean largeMpBean = bigLogic.getLarge5();
+        return ResponseHelper.success(largeMpBean);
+    }
+
+
+    @PostMapping("/getLarge6")
+    @ApiOperation(value = "近30天工单趋势")
+    public ResponseHelper<List<LargeWorkerOrderDateBean>> getLarge6(
+    ) throws IOException, RemoteServiceException {
+        List<LargeWorkerOrderDateBean> largeMpBean = bigLogic.getLarge6();
+        return ResponseHelper.success(largeMpBean);
+    }
+
+
+
+    @PostMapping("/getLarge7")
+    @ApiOperation(value = "近30天累计订单统计")
+    public ResponseHelper<LargeOrderBean> getLarge7(
+    ) throws IOException, RemoteServiceException {
+        LargeOrderBean largeMpBean = bigLogic.getLarge7();
+        return ResponseHelper.success(largeMpBean);
+    }
+
+
+    @PostMapping("/getLarge8")
+    @ApiOperation(value = "近30天订单趋势")
+    public ResponseHelper<List<LargeOrderBean>> getLarge8(
+    ) throws IOException, RemoteServiceException {
+        List<LargeOrderBean> largeMpBean = bigLogic.getLarge8();
+        return ResponseHelper.success(largeMpBean);
+    }
+
+
+    @GetMapping("/list")
+    @ApiOperation(value = "商户街道完工数据")
+    public ResponseHelper<Page<LargeWorkerOrderList>> page(
+            HttpServletRequest request,
+            @ApiParam(value = "市",required = false) @RequestParam(required = false) String city,
+            @ApiParam(value = "省",required = false) @RequestParam(required = false) String province,
+            @ApiParam(value = "区",required = false) @RequestParam(required = false) String area,
+
+            @ApiParam(value = "页号",required = true) @RequestParam(required = true) Integer pageNum,
+            @ApiParam(value = "页大小",required = true) @RequestParam(required = true) Integer pageSize
+    ){
+        IPage<LargeWorkerOrderList> list = bigLogic.list(request,city, province,area, pageNum, pageSize);
+        return ResponseHelper.success(list);
+    }
+
+
+    @PostMapping("/getLarge9")
+    @ApiOperation(value = "数据省份获得")
+    public ResponseHelper<List<String>> getLarge9(
+    ) throws IOException, RemoteServiceException {
+        List<String> largeMpBean = bigLogic.getLarge9();
+        return ResponseHelper.success(largeMpBean);
+    }
+
+
+    @GetMapping("/getLarge10")
+    @ApiOperation(value = "区工单台数")
+    public ResponseHelper<List<LargeNumCity>> getLarge10(
+            HttpServletRequest request,
+            @ApiParam(value = "市",required = false) @RequestParam(required = false) String city,
+            @ApiParam(value = "省",required = false) @RequestParam(required = false) String province
+
+    ){
+        List<LargeNumCity> list = bigLogic.getLarge10(city, province);
+        return ResponseHelper.success(list);
+    }
+
+
+    @GetMapping("/getLarge11")
+    @ApiOperation(value = "市工单台数")
+    public ResponseHelper<LargeNumCity> getLarge11(
+            HttpServletRequest request,
+            @ApiParam(value = "市",required = false) @RequestParam(required = false) String city,
+            @ApiParam(value = "省",required = false) @RequestParam(required = false) String province
+
+    ){
+        LargeNumCity list = bigLogic.getLarge11(city, province);
+        return ResponseHelper.success(list);
+    }
+
+
+}

+ 14 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/big/ServiceClassController.java

@@ -0,0 +1,14 @@
+package com.gree.mall.manager.controller.big;
+
+import io.swagger.annotations.Api;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@Slf4j
+@RestController
+@Api(value = "大屏服务类API", tags ={"大屏服务类API"} )
+@RequestMapping(value = "/big/service/class", produces = "application/json; charset=utf-8")
+public class ServiceClassController {
+
+}

+ 92 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/comlist/ComListAllController.java

@@ -0,0 +1,92 @@
+package com.gree.mall.manager.controller.comlist;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.comlist.ComListAllLogic;
+import com.gree.mall.manager.logic.comlist.ComListLogic;
+import com.gree.mall.manager.plus.entity.ComDetailLog;
+import com.gree.mall.manager.plus.entity.ComList;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@Slf4j
+@RestController
+@Api(value = "文件下发api", tags = {"文件下发api"})
+@RequestMapping(value = "/comAll/list", produces = "application/json; charset=utf-8")
+public class ComListAllController {
+
+    @Autowired
+    ComListAllLogic comListAllLogic;
+
+
+    @GetMapping("/list")
+    @ApiOperation(value = "万能通用附件列表")
+    public ResponseHelper<ComList> list(
+            @ApiParam(required = false, value = "标题") @RequestParam(required = false) String title,
+            @ApiParam(required = false, value = "备注") @RequestParam(required = false) String remark,
+            @ApiParam(required = false, value = "是否强制提醒 true/false") @RequestParam(required = false) Boolean isNotice,
+            @ApiParam(required = true, value = "页号") @RequestParam(required = true) Integer pageNo,
+            @ApiParam(required = true, value = "页大小") @RequestParam(required = true) Integer pageSize,
+            HttpServletRequest request
+    ) {
+        IPage<ComList> list = comListAllLogic.list(title, remark, isNotice, pageNo, pageSize, request);
+        return ResponseHelper.success(list);
+    }
+
+
+    @PostMapping("/delete")
+    @ApiOperation(value = "删除万能通用附件")
+    public ResponseHelper list(
+            @ApiParam(required = true, value = "id") @RequestParam(required = true) String id,
+            HttpServletRequest request
+    ) {
+        comListAllLogic.delete(id, request);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/yonge")
+    @ApiOperation(value = "上传万能通用列表附件")
+    public ResponseHelper yonge(
+            @ApiParam(required = true, value = "标题") @RequestParam(required = true) String title,
+            @ApiParam(required = false, value = "备注") @RequestParam(required = false) String remark,
+            @ApiParam(required = true, value = "file") @RequestParam(required = true) String file,
+            @ApiParam(required = false, value = "是否强制通知 true=是 false=否") @RequestParam(required = false) Boolean isNotice,
+            @ApiParam(required = false, value = "下载密码") @RequestParam(required = false) String downloadPwd,
+            HttpServletRequest request
+    ) throws Exception {
+        comListAllLogic.yonge(title, remark, file, isNotice, downloadPwd, request);
+        return ResponseHelper.success();
+    }
+
+    @GetMapping("/download")
+    @ApiOperation(value = "下载万能通用列表附件")
+    public void down(
+            @ApiParam(required = true, value = "id") @RequestParam(required = true) String id,
+            @ApiParam(required = false, value = "下载密码") @RequestParam(required = false) String downloadPwd,
+            HttpServletRequest request, HttpServletResponse response
+    ) throws Exception {
+        comListAllLogic.download(id, downloadPwd, request, response);
+        //return ResponseHelper.success(download);
+    }
+    @GetMapping("/download/log")
+    @ApiOperation(value = "下载记录")
+    public ResponseHelper<IPage<ComDetailLog>> downlog(
+            @ApiParam(required = true, value = "id") @RequestParam(required = true) String id,
+            @ApiParam(required = true, value = "页号") @RequestParam(required = true) Integer pageNo,
+            @ApiParam(required = true, value = "页大小") @RequestParam(required = true) Integer pageSize,
+            HttpServletRequest request
+    ) throws Exception {
+        IPage<ComDetailLog> comDetailLogIPage = comListAllLogic.logList(id, pageNo, pageSize, request);
+        return ResponseHelper.success(comDetailLogIPage);
+    }
+
+
+
+}

+ 110 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/comlist/ComListController.java

@@ -0,0 +1,110 @@
+package com.gree.mall.manager.controller.comlist;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.comlist.ComListLogic;
+import com.gree.mall.manager.plus.entity.ComDetailLog;
+import com.gree.mall.manager.plus.entity.ComList;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@Slf4j
+@RestController
+@Api(value = "通用万能列表API", tags = {"中心文件下发API"})
+@RequestMapping(value = "/com/list", produces = "application/json; charset=utf-8")
+public class ComListController {
+
+    @Autowired
+    ComListLogic comListLogic;
+
+    @GetMapping("/list")
+    @ApiOperation(value = "万能通用附件列表")
+    public ResponseHelper<ComList> list(
+            @ApiParam(required = false, value = "标题") @RequestParam(required = false) String title,
+            @ApiParam(required = false, value = "备注") @RequestParam(required = false) String remark,
+            @ApiParam(required = false, value = "是否强制提醒 true/false") @RequestParam(required = false) Boolean isNotice,
+            @ApiParam(required = true, value = "页号") @RequestParam(required = true) Integer pageNo,
+            @ApiParam(required = true, value = "页大小") @RequestParam(required = true) Integer pageSize,
+            HttpServletRequest request
+    ) {
+        IPage<ComList> list = comListLogic.list(title, remark, isNotice, pageNo, pageSize, request);
+        return ResponseHelper.success(list);
+    }
+
+
+    @PostMapping("/delete")
+    @ApiOperation(value = "删除万能通用附件")
+    public ResponseHelper list(
+            @ApiParam(required = true, value = "id") @RequestParam(required = true) String id,
+            HttpServletRequest request
+    ) {
+        comListLogic.delete(id, request);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/yonge")
+    @ApiOperation(value = "上传万能通用列表附件")
+    public ResponseHelper yonge(
+            @ApiParam(required = true, value = "标题") @RequestParam(required = true) String title,
+            @ApiParam(required = false, value = "备注") @RequestParam(required = false) String remark,
+            @ApiParam(required = true, value = "file") @RequestParam(required = true) String file,
+            @ApiParam(required = false, value = "是否强制通知 true=是 false=否") @RequestParam(required = false) Boolean isNotice,
+            @ApiParam(required = false, value = "下载密码") @RequestParam(required = false) String downloadPwd,
+            HttpServletRequest request
+    ) throws Exception {
+        comListLogic.yonge(title, remark, file, isNotice, downloadPwd, request);
+        return ResponseHelper.success();
+    }
+
+    @GetMapping("/download")
+    @ApiOperation(value = "下载万能通用列表附件")
+    public void down(
+            @ApiParam(required = true, value = "id") @RequestParam(required = true) String id,
+            @ApiParam(required = false, value = "下载密码") @RequestParam(required = false) String downloadPwd,
+            HttpServletRequest request, HttpServletResponse response
+    ) throws Exception {
+        comListLogic.download(id, downloadPwd, request, response);
+        //return ResponseHelper.success(download);
+    }
+
+    @GetMapping("/download/get")
+    @ApiOperation("强制提醒-未下载的中心文件列表")
+    public ResponseHelper<IPage<ComList>> downGet(
+            @ApiParam(required = true, value = "页号") @RequestParam(required = true) Integer pageNo,
+            @ApiParam(required = true, value = "页大小") @RequestParam(required = true) Integer pageSize
+    ) throws Exception {
+        IPage<ComList> comListIPage = comListLogic.notDownComList(pageNo, pageSize);
+        return ResponseHelper.success(comListIPage);
+    }
+
+    @GetMapping("/download/batch")
+    @ApiOperation("强制提醒-批量下载文件")
+    public void downGet(
+            @ApiParam(required = true, value = "下载的文件数量上限") @RequestParam(required = true) Integer pageSize,
+            HttpServletRequest request, HttpServletResponse response
+    ) throws Exception {
+        comListLogic.download(pageSize, response);
+    }
+
+
+    @GetMapping("/download/log")
+    @ApiOperation(value = "下载记录")
+    public ResponseHelper<IPage<ComDetailLog>> downlog(
+            @ApiParam(required = true, value = "id") @RequestParam(required = true) String id,
+            @ApiParam(required = true, value = "页号") @RequestParam(required = true) Integer pageNo,
+            @ApiParam(required = true, value = "页大小") @RequestParam(required = true) Integer pageSize,
+            HttpServletRequest request
+    ) throws Exception {
+        IPage<ComDetailLog> comDetailLogIPage = comListLogic.logList(id, pageNo, pageSize, request);
+        return ResponseHelper.success(comDetailLogIPage);
+    }
+
+
+}

+ 96 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/comlist/WorkerComListController.java

@@ -0,0 +1,96 @@
+package com.gree.mall.manager.controller.comlist;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gree.mall.manager.bean.es.CommonListES;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.comlist.WorkerComListLogic;
+import com.gree.mall.manager.plus.entity.WorkerComList;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+
+@Slf4j
+@RestController
+@Api(value = "师傅-文件下发", tags ={"师傅-文件下发"} )
+@RequestMapping(value = "/worker/comlist", produces = "application/json; charset=utf-8")
+public class WorkerComListController {
+
+    @Autowired
+    WorkerComListLogic workerComListLogic;
+
+    @GetMapping("/list")
+    @ApiOperation(value = "万能通用附件列表")
+    public ResponseHelper<IPage<WorkerComList>> list(
+            @ApiParam(required = false, value = "师傅编号") @RequestParam(required = false) String workerNumber,
+            @ApiParam(required = false, value = "标题") @RequestParam(required = false) String title,
+            @ApiParam(required = false, value = "备注") @RequestParam(required = false) String remark,
+            @ApiParam(required = false, value = "状态 true=显示 false=隐藏") @RequestParam(required = false) Boolean status,
+            @ApiParam(required = true, value = "页号") @RequestParam(required = true) Integer pageNum,
+            @ApiParam(required = true, value = "页大小") @RequestParam(required = true) Integer pageSize
+
+    ){
+        IPage<WorkerComList> list = workerComListLogic.list(workerNumber,title, status, remark, pageNum, pageSize);
+        return ResponseHelper.success(list);
+    }
+
+    @PostMapping("/delete")
+    @ApiOperation(value = "删除万能通用附件")
+    public ResponseHelper list(
+            @ApiParam(required = true, value = "id") @RequestParam(required = true) String id
+    ){
+        workerComListLogic.delete(id);
+        return ResponseHelper.success();
+    }
+
+    @PostMapping("/updateStatus")
+    @ApiOperation(value = "修改状态")
+    public ResponseHelper list(
+            @ApiParam(required = true, value = "id") @RequestParam(required = true) String id,
+            @ApiParam(required = true, value = "true=正常 false=隐藏") @RequestParam(required = true) Boolean status
+    ){
+        workerComListLogic.updateStatus(id,status);
+        return ResponseHelper.success();
+    }
+
+
+    @PostMapping("/save")
+    @ApiOperation(value = "上传万能通用列表附件")
+    public ResponseHelper save(
+            @ApiParam(required = true, value = "标题") @RequestParam(required = true) String title,
+            @ApiParam(required = false, value = "备注") @RequestParam(required = false) String remark,
+            @ApiParam(required = true, value = "fileUrl") @RequestParam(required = true) String file
+    ) throws Exception {
+        workerComListLogic.save(title,remark,file);
+        return ResponseHelper.success();
+    }
+
+    @GetMapping("/record")
+    @ApiOperation(value = "通用列表-明细")
+    public ResponseHelper<List<CommonListES>> record(
+            @ApiParam(required = true, value = "列表id") @RequestParam(required = true) String comListId,
+            @ApiParam(required = true, value = "师傅编号") @RequestParam(required = true) String workerNumber
+    ) throws Exception {
+        List<CommonListES> record = workerComListLogic.record(comListId, workerNumber);
+        return ResponseHelper.success(record);
+    }
+
+    @GetMapping("/download")
+    @ApiOperation(value = "下载万能通用列表附件")
+    public void down(
+            @ApiParam(required = true, value = "comListId") @RequestParam(required = true) String comListId,
+            @ApiParam(required = false, value = "websitNumber") @RequestParam(required = false) String websitNumber,
+            HttpServletRequest request, HttpServletResponse response
+    ) throws Exception {
+        workerComListLogic.download(comListId,websitNumber, request, response);
+    }
+
+
+}

+ 3 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/CallRecordController.java

@@ -6,9 +6,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.gree.mall.manager.annotation.ZfireList;
 import com.gree.mall.manager.bean.common.CallRecordOrderVo;
 import com.gree.mall.manager.bean.common.CallRecordVo;
+import com.gree.mall.manager.bean.workorder.IncreVO;
 import com.gree.mall.manager.exception.RemoteServiceException;
 import com.gree.mall.manager.helper.ResponseHelper;
 import com.gree.mall.manager.logic.unicom.UnicomLogic;
+import com.gree.mall.manager.plus.entity.CallRecord;
+import com.gree.mall.manager.plus.entity.CallSendRecord;
 import com.gree.mall.manager.zfire.bean.ZfireParamBean;
 import com.gree.mall.manager.zfire.util.FieldUtils;
 import io.swagger.annotations.Api;

+ 1 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/CommonController.java

@@ -30,6 +30,7 @@ import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 
 @Slf4j

+ 2 - 0
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/CompanyRecordController.java

@@ -3,6 +3,7 @@ package com.gree.mall.manager.controller.common;
 
 import cn.hutool.core.lang.TypeReference;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.beust.jcommander.Parameter;
 import com.gree.mall.manager.annotation.ApiNotAuth;
 import com.gree.mall.manager.annotation.ZfireList;
 import com.gree.mall.manager.bean.common.AmityUrlVO;
@@ -15,6 +16,7 @@ import com.gree.mall.manager.plus.entity.CompanyRecordManage;
 import com.gree.mall.manager.plus.entity.ImgCarouselManage;
 import com.gree.mall.manager.zfire.bean.ZfireParamBean;
 import io.swagger.annotations.Api;
+
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import lombok.extern.slf4j.Slf4j;

+ 1 - 1
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/GreeLogic.java

@@ -1,4 +1,4 @@
-package com.gree.mall.manager.controller.common;/*
+/*
 package com.gree.mall.manager.controller.common;
 
 import com.alibaba.fastjson.JSON;

Деякі файли не було показано, через те що забагато файлів було змінено