From 95f9ea7eb339c36cade6c67d0385c49ec2d81477 Mon Sep 17 00:00:00 2001
From: 935090232@qq.com <ak473600000>
Date: Wed, 14 Apr 2021 19:39:45 +0800
Subject: [PATCH] Merge branch 'score_shop' into api_score_meger

---
 zq-erp/src/main/java/com/matrix/system/common/dao/BusParameterSettingsDao.java                                       |  102 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopRevenueFlowDao.java                                           |   18 
 zq-erp/src/main/java/com/matrix/system/activity/dto/SignReceiveListDto.java                                          |   29 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopSalemanSettlementDao.java                                     |   13 
 zq-erp/src/main/resources/config/test/application.properties                                                         |    7 
 zq-erp/src/main/java/com/matrix/system/activity/dto/WriteoffCodeSubmitDto.java                                       |   20 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ExamineSaleManApplyDto.java                                       |   26 
 zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopCouponRecordDao.java                                          |    7 
 zq-erp/src/main/resources/config/system.properties                                                                   |    9 
 zq-erp/src/main/java/com/matrix/system/score/entity/ScoreUseRecord.java                                              |   92 
 zq-erp/src/main/java/com/matrix/system/activity/vo/SignSetBasicJsonVo.java                                           |   29 
 zq-erp/src/main/java/com/matrix/system/hive/service/SysVipInfoService.java                                           |    9 
 zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUseFlow.java                                               |   18 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopSalesmanGradeDao.java                                         |   25 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SignBasicInfoJsonVo.java                                       |   31 
 zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopActivitiesDao.java                                            |   14 
 zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/Task/messageBulderDemo/DefaultTemplateMessageBulder.java  |    4 
 zq-erp/src/main/java/com/matrix/system/activity/service/ActivitySignReceiveRecordService.java                        |   22 
 zq-erp/src/main/java/com/matrix/system/score/entity/BaseEntity.java                                                  |   69 
 zq-erp/src/main/java/com/matrix/config/MybatisPlusConfig.java                                                        |   22 
 zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml                                                   |   10 
 zq-erp/src/main/resources/config/config.json                                                                         |    8 
 zq-erp/src/main/resources/config/xcshop/application.properties                                                       |   75 
 zq-erp/src/main/resources/mybatis/mapper/common/BusParameterSettingsDao.xml                                          |  802 
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/underlineOrder.html                                 |   24 
 zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesGroupJoinUserDao.xml                                  |    2 
 zq-erp/src/main/java/com/matrix/system/common/service/impl/InitBusParameterSettingService.java                       |   68 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ChangeSaleManGradeDto.java                                        |   17 
 zq-erp/src/main/java/com/matrix/system/fenxiao/vo/SalesmanBasicDetailVo.java                                         |   45 
 zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopCouponQuartz.java                                          |   14 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ScoreFlowDto.java                                             |   41 
 zq-erp/src/main/resources/static/images/dui.png                                                                      |    0 
 zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopCouponRecord.java                                            |    6 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesOrderAction.java                                    |   78 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesWithdrawalAction.java                               |  126 
 zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesDao.xml                                               |   42 
 zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java                                     |  588 
 zq-erp/src/main/java/com/matrix/system/app/action/ApiStatisticsAction.java                                           |    8 
 zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java                                        |   61 
 zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopInvoiceDao.xml                                                  |    6 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxMoneyCardUseAction.java                                  |  171 
 zq-erp/src/main/java/com/matrix/system/common/authority/strategy/ScanQrCodeLogin.java                                |   82 
 zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/MQTaskRouting.java                                             |    6 
 zq-erp/src/main/java/com/matrix/system/shopXcx/vo/SalesOrderVo.java                                                  |   47 
 zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesGroupJoinDao.xml                                      |    8 
 zq-erp/src/main/java/com/matrix/system/hive/service/SysProjServicesService.java                                      |    7 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/MoneyCardUseFlowDto.java                                      |   34 
 zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopDeliveryDetail.java                                          |    2 
 zq-erp/src/main/java/com/matrix/system/common/bean/SysFunction.java                                                  |   50 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dao/BizUserDao.java                                                   |   14 
 zq-erp/src/main/resources/templates/views/common/login.html                                                          |  299 
 zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml                                                        |   25 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SignAwardDto.java                                             |   20 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SignSuccessVo.java                                             |  154 
 zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopProductComment.java                                          |   28 
 zq-erp/src/main/java/com/matrix/system/hive/dto/ScoreChangeDto.java                                                  |   26 
 zq-erp/src/main/java/com/matrix/core/pojo/AjaxResult.java                                                            |   36 
 zq-erp/src/main/java/com/matrix/system/common/bean/SysFnBtnRel.java                                                  |   50 
 zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductCommentDao.xml                                           |   13 
 zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityGroupJoinTimeOutQuartz.java                        |   11 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopActivitiesGroupServiceImpl.java                |   51 
 zq-erp/src/main/java/com/matrix/system/common/interceptor/ApiUserLoginInterceptor.java                               |    9 
 zq-erp/src/main/java/com/matrix/system/activity/vo/LogisticsVo.java                                                  |   18 
 zq-erp/src/main/resources/templates/views/admin/shop/shopAdvertisType-list.html                                      |    5 
 zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpVipInfoController.java                                      |   80 
 zq-erp/src/main/java/com/matrix/system/score/dto/ScoreRuleSettingDto.java                                            |    8 
 zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopActivitiesAction.java                                      |   40 
 zq-erp/src/main/java/com/matrix/system/activity/vo/GoodsVo.java                                                      |   29 
 zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopOrderDetailVo.java                                             |   48 
 zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-writeoff.html                                 |  298 
 zq-erp/src/main/java/com/matrix/system/fenxiao/entity/ShopSalesmanOrderItem.java                                     |   54 
 zq-erp/src/main/java/com/matrix/system/score/constant/ScoreSettingConstant.java                                      |   66 
 zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderV2Dao.xml                                                  |   25 
 zq-erp/src/main/java/com/matrix/system/hive/dao/MoneyCardUseFlowDao.java                                             |    7 
 zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseV2Dao.xml                                                  |    7 
 zq-erp/src/main/java/com/matrix/core/exception/GlobleExceptionResolver.java                                          |    2 
 zq-erp/src/main/java/com/matrix/system/constance/Dictionary.java                                                     |    7 
 zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java                                            |   74 
 zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipInfo.java                                                     |  699 -
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserAction.java                                          |  239 
 zq-erp/src/main/java/com/matrix/system/hive/dao/MoneyCardUseV2Dao.java                                               |   12 
 zq-erp/src/main/resources/mybatis/mapper/hive/SysBusinessDataDao.xml                                                 |   42 
 zq-erp/.gitignore                                                                                                    |    3 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShareProductAction.java                                  |   36 
 zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesGroupJoin.java                                     |    6 
 zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-update.html                                   | 1030 +
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopProduct.java                                         |   21 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/CalculatePostagePOJO.java                                    |    6 
 zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/ScoreOrderTask.java                                            |  141 
 zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityTimeOutQuartz.java                                 |   16 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WxShopRefundRecordService.java                            |    6 
 zq-erp/src/main/java/com/matrix/system/common/service/impl/SysCompanyServiceImpl.java                                |  493 
 zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java                                            |    5 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dto/FyfaManageDto.java                                                |   22 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dto/UpdateTgtpDto.java                                                |   17 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dto/AddSaleManApplyDto.java                                           |   21 
 zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipInfoDao.java                                                   |    6 
 zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanGradeVo.java                                           |   17 
 zq-erp/src/test/java/com/matrix/JyyTests.java                                                                        |   84 
 zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java                                         |   12 
 zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanOrderItemDao.xml                                        |   33 
 zq-erp/src/main/java/com/matrix/system/activity/vo/ActivitiesListVo.java                                             |  107 
 zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopOrder.java                                                   |   47 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ShopSalesmanAppliingDto.java                                      |   20 
 zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-update.html                                          |  672 +
 zq-erp/src/main/java/com/matrix/system/activity/dto/AddSignAwardSetDto.java                                          |   28 
 zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopRefundRecordAction.java                                    |  108 
 zq-erp/src/main/java/com/matrix/system/activity/entity/ActivitySignReceiveRecord.java                                |  100 
 zq-erp/src/main/java/com/matrix/system/activity/vo/AddSignAwardSetVo.java                                            |   33 
 zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-receive.html                                  |  281 
 zq-erp/src/main/java/com/matrix/system/fenxiao/action/FenXiaoOrderAction.java                                        |   92 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopLogisticsQueryAction.java                            |    2 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/tools/WxShopCouponUtil.java                                       |    6 
 zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjServices.java                                                |    4 
 zq-erp/src/main/java/com/matrix/system/common/actions/TestActionBB.java                                              |   33 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ShopSalesmanDetailDto.java                                        |   29 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxProductCommentAction.java                                |   26 
 zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesSalonRecordDao.xml                                    |    6 
 zq-erp/src/main/java/com/matrix/system/common/bean/SysUsers.java                                                     |    3 
 zq-erp/src/main/java/com/matrix/system/job/ServiceOvertimeNoticeJob.java                                             |    9 
 zq-erp/src/main/resources/templates/views/admin/sys/customerDataDictionary-list.html                                 |    4 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesGroupBuyController.java                    |   16 
 zq-erp/src/main/java/com/matrix/system/hive/dao/AchieveNewDao.java                                                   |   10 
 zq-erp/src/main/java/com/matrix/system/hive/service/SysProjUseService.java                                           |    2 
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yyServiceAddForm.html                               |  347 
 zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanAppliingVo.java                                        |   31 
 zq-erp/src/main/java/com/matrix/system/score/entity/ScoreVipDetail.java                                              |  131 
 zq-erp/src/main/java/com/matrix/system/activity/dto/SignWriteoffListDto.java                                         |   21 
 zq-erp/src/main/java/com/matrix/system/activity/entity/ActivitySignAwardSet.java                                     |  197 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopScoreAction.java                                     |  139 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ClickSignDTO.java                                             |   17 
 zq-erp/src/test/java/com/matrix/TcProjTest.java                                                                      |   33 
 zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/Task/UniformMsgSentTask.java                              |    4 
 zq-erp/src/main/java/com/matrix/system/fenxiao/vo/LoadFenxiaoOrderBasicVo.java                                       |   20 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxGetAcodeAction.java                                      |   18 
 zq-erp/src/main/java/com/matrix/system/activity/vo/CouponVo.java                                                     |   29 
 zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopPageAction.java                                            |    2 
 zq-erp/src/main/java/com/matrix/component/wechat/externalInterface/protocol/paramProtocol/BrandWCPayRequestData.java |    2 
 zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDao.xml                                                    |   69 
 zq-erp/src/main/resources/mybatis/mapper/score/ScoreVipDetailDao.xml                                                 |   31 
 zq-erp/src/main/resources/templates/views/admin/shop/shopProduct-form.html                                           |  204 
 zq-erp/src/main/java/com/matrix/system/fenxiao/entity/ShopSalesmanOrder.java                                         |  103 
 zq-erp/src/main/java/com/matrix/system/hive/dao/ShoppingGoodsDao.java                                                |    2 
 zq-erp/src/main/resources/config/db/increment/美度业绩升级.sql                                                             |   15 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ShopSalesmanApplyDto.java                                         |   25 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSalonAction.java                           |   11 
 zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopPageDao.java                                                  |    2 
 zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml                                                        |  148 
 zq-erp/src/main/java/com/matrix/system/activity/service/ActivitySignRecordService.java                               |   22 
 zq-erp/src/main/java/com/matrix/system/shopXcx/vo/SalesmanApplyCondition.java                                        |   35 
 zq-erp/src/main/java/com/matrix/system/constance/SystemConstance.java                                                |    9 
 zq-erp/src/test/java/com/matrix/SourceFlowTests.java                                                                 |   40 
 zq-erp/src/main/resources/templates/views/admin/hive-erp/score/score-setting.html                                    |  339 
 zq-erp/src/main/java/com/matrix/system/fenxiao/entity/ShopRevenueFlow.java                                           |   69 
 zq-erp/src/main/resources/static/demoPage/soketLoginTest.html                                                        |  138 
 zq-erp/src/test/java/com/matrix/BizUserToVipInfoTool.java                                                            |   93 
 zq-erp/src/main/java/com/matrix/system/activity/vo/SignWriteoffListVo.java                                           |   77 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxScoreProductAction.java                                  |   72 
 zq-erp/src/main/java/com/matrix/system/fenxiao/entity/ShopSalesmanGrade.java                                         |   75 
 zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java                              |  289 
 zq-erp/src/main/java/com/matrix/system/hive/statistics/StatisticsBusinessDataJob.java                                |    8 
 zq-erp/src/main/java/com/matrix/system/common/actions/SysRoleAction.java                                             |    8 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxRefundRecordAction.java                                  |   14 
 zq-erp/src/main/java/com/matrix/system/fenxiao/entity/ShopSalesmanApply.java                                         |   82 
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/pbxq-form.html                                      |   19 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/tools/WxShopOrderUtil.java                                        |   84 
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip_bak.html                                        |    1 
 zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml                                                      |   74 
 zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalesmanOrderService.java                                 |  185 
 zq-erp/src/main/java/com/matrix/system/activity/dto/UpdateSignAwardSetDto.java                                       |   34 
 zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/OrderTask.java                                                 |   25 
 zq-erp/src/main/java/com/matrix/system/hive/service/CodeService.java                                                 |    9 
 zq-erp/src/main/java/com/matrix/component/tools/WxacodeUtil.java                                                     |   38 
 zq-erp/src/main/java/com/matrix/config/SwaggerConfig.java                                                            |   57 
 zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDetailsDao.xml                                             |   62 
 zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml                                                      |  208 
 zq-erp/src/main/java/com/matrix/component/websoket/WebSoketScanQrCodeLoginObserver.java                              |   66 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dto/LoadFenxiaoOrderListDto.java                                      |   41 
 zq-erp/src/main/java/com/matrix/system/fenxiao/action/FenXiaoUserAction.java                                         |  405 
 zq-erp/src/main/resources/config/db/increment/推广员.sql                                                                |  243 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxErpOrderAction.java                                      |   65 
 zq-erp/src/main/java/com/matrix/system/hive/service/imp/AchieveNewServiceImpl.java                                   |   53 
 zq-erp/src/main/resources/templates/views/common/showprojException.html                                              |   51 
 zq-erp/src/main/java/com/matrix/system/activity/action/ActivitySignWriteoffAction.java                               |   85 
 zq-erp/src/main/java/com/matrix/system/activity/dto/CouponDto.java                                                   |   19 
 zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopSku.java                                                     |   68 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SignBasicInfoVo.java                                           |   42 
 zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanApplyVo.java                                           |   97 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SeeAwardTextVo.java                                            |   49 
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html                                   |  183 
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html                                     |  243 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxBindingPhoneNumber.java                                  |   39 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dto/DelFyfaApplyDto.java                                              |   17 
 zq-erp/src/main/resources/templates/views/admin/shop/shopProduct-list.html                                           |   37 
 zq-erp/src/main/java/com/matrix/system/app/vo/BusinessesDataShowVo.java                                              |   22 
 zq-erp/src/main/resources/templates/views/admin/shop/logisticsImport-form.html                                       |  125 
 zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java                                   |  132 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dto/LoadFenxiaoOrderBasicDto.java                                     |   14 
 zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysWorktimeServiceImpl.java                                  |   26 
 zq-erp/src/main/java/com/matrix/system/activity/dao/ActivitySignAwardSetDao.java                                     |   20 
 zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml                                                      |  159 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/OrderCouponGroup.java                                        |   43 
 zq-erp/src/main/java/com/matrix/ZqErpApplication.java                                                                |    2 
 zq-erp/src/main/java/com/matrix/system/hive/dao/SysProjUseDao.java                                                   |    2 
 zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignReceiveRecordDao.xml                                   |  143 
 zq-erp/src/main/resources/mybatis/mapper/hive/OnlinebookingDao.xml                                                   |   24 
 zq-erp/src/test/java/com/matrix/SalesOrderTaskTest.java                                                              |  247 
 zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUse.java                                                   |  212 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserSearchRecord.java                                    |    6 
 zq-erp/src/main/java/com/matrix/component/wechat/externalInterface/weixinUtil/WeixinServiceUtil.java                 |   47 
 zq-erp/src/main/java/com/matrix/system/hiveErp/dao/TjVipSumDao.java                                                  |    6 
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form-bak.html                                  |  498 
 zq-erp/src/main/resources/templates/views/admin/activity/activity-market.html                                        |  169 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dto/LoadSetOrderListDtoDto.java                                       |   27 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SaleOrderDto.java                                             |   27 
 zq-erp/src/main/resources/static/images/qrcode.png                                                                   |    0 
 zq-erp/src/main/java/com/matrix/system/common/service/impl/SysFunctionServiceImpl.java                               |   12 
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service_all_list.html                               |    2 
 zq-erp/src/main/java/com/matrix/component/websoket/ScanQrCodeLoginDto.java                                           |   57 
 zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopShoppingCartDao.java                                          |    6 
 zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignRecordDao.xml                                          |   17 
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html                                        |  141 
 zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpShopInfoController.java                                     |    9 
 zq-erp/src/main/java/com/matrix/system/activity/service/ActivitySignAwardSetService.java                             |  271 
 zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrderItem.java                                                   |   32 
 zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopBizUserScoreAction.java                                    |   88 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSecKillAction.java                         |    6 
 zq-erp/src/main/resources/templates/views/admin/activity/activity-sign.html                                          |  959 +
 zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesGroupJoinUser.java                                 |    6 
 zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesSalonRecord.java                                   |    6 
 zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopDeliveryDetailDao.java                                        |    2 
 zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/SalesOrderRefundTask.java                                      |   68 
 zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopShoppingCart.java                                            |  105 
 zq-erp/src/main/java/com/matrix/system/shopXcx/vo/LogisticsImportVo.java                                             |   20 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dto/UpdateSetOrderDoneDto.java                                        |   32 
 zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-setting.html                                         |  565 
 zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopRefundRecordDao.xml                                             |    6 
 zq-erp/src/main/java/com/matrix/system/activity/dto/DelRowDto.java                                                   |   17 
 zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-logistics-info.html                           |  336 
 zq-erp/src/main/java/com/matrix/system/job/InvalidTimeJob.java                                                       |    2 
 zq-erp/src/main/resources/mybatis/mapper/score/ScoreUseRecordDao.xml                                                 |   46 
 zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityPayTimeOutQuartz.java                              |   11 
 zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanGradeDao.xml                                            |   68 
 zq-erp/src/main/java/com/matrix/system/activity/vo/SignReceiveListVo.java                                            |   37 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ShopCartBillVo.java                                            |   12 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopSalesmanApplyDao.java                                         |   54 
 zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignWriteoffDao.xml                                        |  104 
 zq-erp/src/main/resources/static/templates/logisticsImport.xls                                                       |    0 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dto/LoadParamSettingDto.java                                          |   25 
 zq-erp/src/main/java/com/matrix/system/shopXcx/vo/SalesmanCenterInfo.java                                            |   45 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopSalesmanOrderDao.java                                         |   39 
 zq-erp/src/main/java/com/matrix/system/score/mapper/ScoreRuleSettingMapper.java                                      |    8 
 zq-erp/src/main/java/com/matrix/system/activity/dto/SignSetBasicJsonDto.java                                         |   33 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/XcxUserSaveUserInfoDto.java                                   |   46 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SignAwardListVo.java                                           |   37 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ScoreUseRecordVo.java                                          |   56 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShoppingCartAction.java                                  |   80 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesProductAction.java                                  |   68 
 zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjUseServiceImpl.java                                   |    5 
 zq-erp/src/main/java/com/matrix/system/score/dto/SocreRuleDto.java                                                   |    5 
 zq-erp/src/main/java/com/matrix/component/websoket/WebSocketPushHandler.java                                         |    4 
 zq-erp/src/main/java/com/matrix/system/activity/constant/ActivitySignConstant.java                                   |    5 
 zq-erp/src/main/java/com/matrix/system/fenxiao/vo/LoadFenxiaoOrderListVo.java                                        |   45 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/OrderItemDto.java                                            |   47 
 zq-erp/src/main/resources/config/test/config.json                                                                    |    8 
 zq-erp/src/main/java/com/matrix/system/hive/service/imp/CodeServiceImpl.java                                         |   24 
 zq-erp/src/main/java/com/matrix/system/hive/action/BaseController.java                                               |   11 
 zq-erp/src/main/java/com/matrix/component/rabbitmq/DeliverCallbackAdapter.java                                       |    2 
 zq-erp/src/main/java/com/matrix/core/pojo/BasePageQueryDto.java                                                      |   44 
 zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopProduct.java                                                 |  402 
 zq-erp/src/main/java/com/matrix/system/common/actions/ProjExceptionAction.java                                       |   21 
 zq-erp/src/main/resources/config/xcshop/config.json                                                                  |   94 
 zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopAdvertis.java                                                |   13 
 zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopShareQrcord.java                                             |   69 
 zq-erp/src/main/java/com/matrix/config/TaskScheduleConfig.java                                                       |   16 
 zq-erp/src/main/resources/config/test/system.properties                                                              |    4 
 zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-sale-list.html                                 |    3 
 zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java                                              |  102 
 zq-erp/src/main/java/com/matrix/system/score/service/ScoreRuleSettingService.java                                    |   55 
 zq-erp/src/main/java/com/matrix/system/activity/dao/ActivitySignWriteoffDao.java                                     |   28 
 zq-erp/src/main/java/com/matrix/system/fenxiao/vo/FenXiaoSettingVo.java                                              |  139 
 zq-erp/src/main/resources/templates/views/admin/hive-erp/order/orderXq-form.html                                     |  191 
 zq-erp/src/main/java/com/matrix/system/common/authority/DefaultAuthorityManager.java                                 |   82 
 zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/SalesOrderTask.java                                            |  241 
 zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopPage.java                                                    |    2 
 zq-erp/src/main/resources/static/js/systools/MBase.js                                                                |   13 
 zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopRevenueFlowDao.xml                                              |   49 
 zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new.html                                  |  480 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dto/LoadParamSettingBasicDto.java                                     |   20 
 zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderSearchDao.xml                                              |    8 
 zq-erp/src/main/resources/readme-jyy                                                                                 |   11 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopActivitiesSecKillServiceImpl.java              |   26 
 zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopRefundRecord.java                                            |    6 
 zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopCouponDao.java                                                |    1 
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/servicceAddForm.html                                |   10 
 zq-erp/src/main/java/com/matrix/system/activity/dto/GoodsDto.java                                                    |   19 
 zq-erp/src/main/java/com/matrix/system/shopXcx/dto/CreateGroupBuyDTO.java                                            |  107 
 zq-erp/src/main/resources/static/templates/vipInfoImport.xls                                                         |    0 
 zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseFlowDao.xml                                                |   51 
 zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopDeliveryInfo.java                                            |   21 
 zq-erp/src/main/java/com/matrix/core/tools/StringUtils.java                                                          |   17 
 zq-erp/src/main/java/com/matrix/component/rabbitmq/MqTask.java                                                       |    8 
 zq-erp/src/main/resources/mybatis/mapper/fenxiao/BizUserDao.xml                                                      |    7 
 zq-erp/src/main/java/com/matrix/system/activity/dto/BeCloseDto.java                                                  |   17 
 zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-order.html                                           |  689 +
 zq-erp/src/main/java/com/matrix/component/tools/ImageUtil.java                                                       |   46 
 zq-erp/src/main/java/com/matrix/system/app/vo/ParameterSettingVo.java                                                |   39 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxInvoiceAction.java                                       |    6 
 zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalemanSettlementDao.xml                                        |   41 
 zq-erp/src/main/java/com/matrix/system/fenxiao/vo/LoadSetOrderListDtoVo.java                                         |   35 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WxShopCouponService.java                                  |    6 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ActivitySignAwardSetVo.java                                    |  174 
 zq-erp/src/main/java/com/matrix/system/activity/dto/SignForUpdateDto.java                                            |   17 
 zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalesmanOrderItemService.java                             |   20 
 zq-erp/src/main/resources/static/templates/vipProjUse.xls                                                            |    0 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dao/FenXiaoSettingDao.java                                            |    7 
 zq-erp/src/main/java/com/matrix/system/activity/action/ActivitySignReceiveRecordAction.java                          |   21 
 zq-erp/src/main/java/com/matrix/system/score/dao/ScoreVipDetailDao.java                                              |   34 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/YuyueAction.java                                           |   43 
 zq-erp/src/main/resources/static/js/plugin/qrcode.js                                                                 |  614 +
 zq-erp/src/main/java/com/matrix/config/MvcCoreConfig.java                                                            |    5 
 zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalemanSettlementService.java                             |   20 
 zq-erp/src/main/resources/templates/views/admin/shop/shopUser-list.html                                              |   62 
 zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/daily-sale-list.html                             |    3 
 zq-erp/src/main/java/com/matrix/system/activity/dto/SignWriteoffDto.java                                             |   17 
 zq-erp/src/main/java/com/matrix/system/score/vo/ScoreRuleSettingsVo.java                                             |  139 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dto/UpdateTgjhDto.java                                                |   17 
 zq-erp/src/main/java/com/matrix/system/activity/vo/ZjrVo.java                                                        |   19 
 zq-erp/src/main/java/com/matrix/system/fenxiao/entity/BizUser.java                                                   |  188 
 zq-erp/src/test/java/com/matrix/FenxiaoSoreInitTest.java                                                             |  113 
 zq-erp/src/main/resources/static/images/pc.png                                                                       |    0 
 zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml                                                 |    6 
 zq-erp/src/main/java/com/matrix/system/app/vo/ServiceTcVo.java                                                       |   12 
 zq-erp/src/main/java/com/matrix/system/fenxiao/entity/FenXiaoSettingEntity.java                                      |   18 
 zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopShareQrcordDao.java                                           |    2 
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html                                      |  126 
 zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopRevenueFlowService.java                                   |   20 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WXShopOrderServiceImpl.java                          |  331 
 zq-erp/src/main/java/com/matrix/config/RabbitMqConfig.java                                                           |   28 
 zq-erp/src/main/java/com/matrix/system/hive/bean/AchieveNew.java                                                     |  116 
 zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderItemDao.xml                                                    |   10 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dto/UpdateFyfaDto.java                                                |   32 
 zq-erp/src/main/resources/templates/views/admin/activity/activity-list.html                                          |  530 
 zq-erp/src/test/java/com/matrix/ParameterSettingsTool.java                                                           |  116 
 zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/daily-list-new.html                              |  461 
 zq-erp/src/main/java/com/matrix/system/common/constance/AppConstance.java                                            |   22 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSignAction.java                            |  386 
 zq-erp/src/main/java/com/matrix/TestClass.java                                                                       |    4 
 zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanApplyDao.xml                                            |  300 
 zq-erp/pom.xml                                                                                                       |    6 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ShopCartVo.java                                                |   94 
 zq-erp/src/main/resources/config/db/increment/签到活动.sql                                                               |  203 
 zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesSeckillRecordDao.xml                                  |    6 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/RevenueFlowDto.java                                           |   26 
 zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopCollectionDao.xml                                               |    8 
 zq-erp/src/main/java/com/matrix/system/common/actions/MultipleFileUploadAction.java                                  |  169 
 zq-erp/src/main/java/com/matrix/system/shopXcx/vo/SalesmanVo.java                                                    |   31 
 zq-erp/src/main/java/com/matrix/system/fenxiao/constant/FenxiaoSettingConstant.java                                  |   61 
 zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalesmanApplyService.java                                 |  444 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopSalesmanOrderItemDao.java                                     |   13 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SeeAwardTextDto.java                                          |   24 
 zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopAdvertisDao.xml                                                 |   20 
 zq-erp/src/main/resources/templates/views/admin/shop/shopProductComment-list.html                                    |   81 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SaleProductDto.java                                           |   18 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WXShopOrderAction.java                                     |  419 
 zq-erp/src/main/resources/static/js/function/vip.js                                                                  |   27 
 zq-erp/src/main/java/com/matrix/system/common/dto/WebLoginDto.java                                                   |   32 
 zq-erp/src/main/java/com/matrix/system/fenxiao/action/FenXiaoSettingAction.java                                      |  164 
 zq-erp/src/main/java/com/matrix/system/hive/dao/SysProjServicesDao.java                                              |    2 
 zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopOrderDetails.java                                            |   71 
 zq-erp/src/main/java/com/matrix/system/activity/entity/ActivitySignWriteoff.java                                     |  119 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSkinCheckAction.java                                     |    8 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ShopCartGroupVo.java                                           |   46 
 zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrder.java                                                       |   80 
 zq-erp/src/main/java/com/matrix/core/pojo/VerificationResult.java                                                    |   47 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxCollectionAction.java                                    |   10 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/WxMoneyCardUseVO.java                                          |   56 
 zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-apply.html                                           |  219 
 zq-erp/src/main/java/com/matrix/system/activity/service/ActivitySignWriteoffService.java                             |  294 
 zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductDao.xml                                                  |   85 
 zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java                                            |   51 
 zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new-bak.html                              |  229 
 zq-erp/src/main/resources/config/application.properties                                                              |   16 
 zq-erp/src/main/java/com/matrix/system/score/service/ScoreVipDetailService.java                                      |  287 
 zq-erp/src/main/java/com/matrix/system/activity/dao/ActivitySignRecordDao.java                                       |   20 
 zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopCouponRecordDao.xml                                             |    4 
 zq-erp/src/main/java/com/matrix/system/common/service/impl/SysUsersServiceImpl.java                                  |   15 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/ShoppingCartService.java                                  |   43 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/ShopOrderDto.java                                            |   58 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopRefundRecordServiceImpl.java                   |   55 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxProductAttributeAction.java                              |    4 
 zq-erp/src/main/java/com/matrix/system/app/authority/AppAuthorityManager.java                                        |   38 
 zq-erp/src/main/java/com/matrix/system/score/scheduledJob/ScoreScheduledJob.java                                     |   64 
 zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopOrderV2Dao.java                                               |   20 
 zq-erp/src/main/resources/static/demoPage/soketTest.html                                                             |    2 
 zq-erp/src/main/resources/config/xcshop/system.properties                                                            |   98 
 zq-erp/src/main/java/com/matrix/system/activity/dto/BeReadyDto.java                                                  |   17 
 zq-erp/src/main/java/com/matrix/system/app/action/ApiCommonAction.java                                               |   12 
 zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopQrcordVisitorDao.java                                         |    2 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ApplyToBeAnSalesmanDto.java                                   |   16 
 zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignAwardSetDao.xml                                        |   18 
 zq-erp/src/main/java/com/matrix/system/activity/vo/SignWriteoffVo.java                                               |   62 
 zq-erp/src/main/java/com/matrix/system/activity/action/ActivitySignRecordAction.java                                 |   22 
 zq-erp/src/main/java/com/matrix/system/common/actions/AdminAction.java                                               |   22 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopCouponServiceImpl.java                         |   88 
 zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopSkuDao.xml                                                      |   77 
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html                                            |  207 
 zq-erp/src/main/java/com/matrix/system/activity/dao/ActivitySignReceiveRecordDao.java                                |   41 
 zq-erp/src/main/java/com/matrix/system/app/action/ApiSettingAction.java                                              |   47 
 zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanOrderDao.xml                                            |  174 
 zq-erp/src/main/resources/static/images/qrcodeBack.png                                                               |    0 
 zq-erp/src/main/java/com/matrix/component/wechat/externalInterface/protocol/payComProtocol/JsApiPayComReqData.java   |   82 
 zq-erp/src/main/java/com/matrix/system/shopXcx/dto/DiscountExplain.java                                              |   50 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dto/UnbundlingSaleManDto.java                                         |   17 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxReceiveAddressAction.java                                |   10 
 zq-erp/src/main/java/com/matrix/system/activity/dto/LogisticsSubmitDto.java                                          |   28 
 zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopDeliveryInfoAction.java                                    |   13 
 zq-erp/src/main/java/com/matrix/system/hive/action/ErpShopScoreAction.java                                           |  101 
 zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopOrderDao.java                                                 |   17 
 zq-erp/src/main/java/com/matrix/system/fenxiao/service/FenXiaoSettingService.java                                    |   53 
 zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopSearchRecord.java                                            |    6 
 zq-erp/src/main/resources/templates/views/admin/shop/shopOrder-list.html                                             |  308 
 zq-erp/src/main/resources/mybatis/mapper/hive/SysBeauticianStateDao.xml                                              |   18 
 zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopShoppingCartDao.xml                                             |   28 
 zq-erp/src/main/java/com/matrix/system/shopXcx/pojo/ShopOrderQueryPOJO.java                                          |    4 
 zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanDetailVo.java                                          |    5 
 zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivities.java                                              |   27 
 zq-erp/src/main/java/com/matrix/system/common/actions/CommonAction.java                                              |   68 
 zq-erp/src/main/java/com/matrix/config/WebSocketConfig.java                                                          |    1 
 zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesSeckillRecord.java                                 |    6 
 zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopDeliveryInfoDao.xml                                             |    5 
 zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalesmanGradeService.java                                 |   20 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxCommonAction.java                                        |  153 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ScoreProductDto.java                                          |   20 
 zq-erp/src/main/java/com/matrix/system/score/action/ScoreRuleSettingAction.java                                      |  133 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopLogisticsQueryServiceImpl.java                 |  144 
 zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-writeoff-info.html                            |  198 
 zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-user.html                                            |  770 +
 zq-erp/src/main/java/com/matrix/system/activity/entity/ActivitySignRecord.java                                       |   63 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/OrderCouponGroupService.java                              |  282 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/WithdrawalCashDto.java                                        |   20 
 zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml                                                    |    2 
 zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopAutomaticReceiveQuartz.java                                |   11 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesmanAction.java                                      |  316 
 zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopCustomDetailVo.java                                            |   27 
 zq-erp/src/main/java/com/matrix/component/redis/RedisUserLoginUtils.java                                             |   11 
 zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopOrderAction.java                                           |  245 
 zq-erp/src/main/java/com/matrix/system/activity/action/ActivitySignAwardSetAction.java                               |  207 
 zq-erp/src/main/java/com/matrix/system/fenxiao/dto/DelSaleManGradeApplyDto.java                                      |   20 
 zq-erp/src/main/java/com/matrix/system/fenxiao/entity/ShopSalemanSettlement.java                                     |   93 
 /dev/null                                                                                                            |  251 
 zq-erp/src/main/java/com/matrix/system/activity/dto/ActivitiesListDto.java                                           |   22 
 zq-erp/src/main/java/com/matrix/system/fenxiao/vo/FyfaManageVo.java                                                  |   32 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WXShopOrderService.java                                   |   15 
 zq-erp/src/main/java/com/matrix/system/score/dao/ScoreUseRecordDao.java                                              |   25 
 455 files changed, 30,283 insertions(+), 5,922 deletions(-)

diff --git a/zq-erp/.gitignore b/zq-erp/.gitignore
index 7f64141..31966d8 100644
--- a/zq-erp/.gitignore
+++ b/zq-erp/.gitignore
@@ -76,4 +76,5 @@
 .project
 .classpath
 .settings
-.metadata
\ No newline at end of file
+.metadata
+.gitignore
\ No newline at end of file
diff --git a/zq-erp/pom.xml b/zq-erp/pom.xml
index cf7b2c4..ed1dc1f 100644
--- a/zq-erp/pom.xml
+++ b/zq-erp/pom.xml
@@ -59,6 +59,12 @@
                 <env>lhx</env>
             </properties>
         </profile>
+        <profile>
+            <id>xcshop</id>
+            <properties>
+                <env>xcshop</env>
+            </properties>
+        </profile>
     </profiles>
     <dependencies>
 
diff --git a/zq-erp/src/main/java/com/matrix/TestClass.java b/zq-erp/src/main/java/com/matrix/TestClass.java
index 5ba006f..61d3a91 100644
--- a/zq-erp/src/main/java/com/matrix/TestClass.java
+++ b/zq-erp/src/main/java/com/matrix/TestClass.java
@@ -1,9 +1,7 @@
 package com.matrix;
 
 
-import java.io.FileWriter;
 import java.io.IOException;
-import java.math.BigDecimal;
 
 public class TestClass {
     public static void main(String[] args) throws IOException {
@@ -19,7 +17,7 @@
 //            printer.printRecord(cells);
 //        }
 //        printer.flush();
-//        printer.close();
+//        printer.close(); 
         long t2 = System.currentTimeMillis();
         System.out.println("CSV: " + (t2 - t1));
     }
diff --git a/zq-erp/src/main/java/com/matrix/ZqErpApplication.java b/zq-erp/src/main/java/com/matrix/ZqErpApplication.java
index 2941bcc..4502fc0 100644
--- a/zq-erp/src/main/java/com/matrix/ZqErpApplication.java
+++ b/zq-erp/src/main/java/com/matrix/ZqErpApplication.java
@@ -10,9 +10,7 @@
  * @author jiangyouyao
  */
 @SpringBootApplication
-
 @ComponentScan(basePackages = {"com.matrix.**"})
-
 public class ZqErpApplication {
 
     public static void main(String[] args) {
diff --git a/zq-erp/src/main/java/com/matrix/biz/action/1.sql b/zq-erp/src/main/java/com/matrix/biz/action/1.sql
deleted file mode 100644
index 9f5ebb3..0000000
--- a/zq-erp/src/main/java/com/matrix/biz/action/1.sql
+++ /dev/null
@@ -1,129 +0,0 @@
-INSERT INTO `sys_data_dictionary` (`ID`,value, `type_NAME` )
-VALUES
-	(4, '优惠券', '礼遇类型 '),
-	(5, '是否', '礼遇类型 '),
-	(6, '会员转介', '到店途径'),
-	(7, '瑜珈转介', '到店途径'),
-	(8, '员工转介', '到店途径'),
-	(9, '赠送', '业务类型'),
-	(10, '购买', '业务类型'),
-	(11, '消耗', '业务类型'),
-	(12, '充值', '业务类型'),
-	(13, '补交', '业务类型'),
-	(14, '办卡', '业务类型'),
-	(15, '咨询', '业务类型'),
-	(17, '白羊座', '星座'),
-	(18, '金牛座', '星座'),
-	(19, '双子座', '星座'),
-	(20, '巨蟹座', '星座'),
-	(21, '狮子座', '星座'),
-	(22, '处女座', '星座'),
-	(23, '天秤座', '星座'),
-	(24, '天蝎座', '星座'),
-	(25, '射手座', '星座'),
-	(26, '摩羯座', '星座'),
-	(27, '水瓶座', '星座'),
-	(28, '双鱼座', '星座'),
-	(29, '鼠', '生肖'),
-	(30, '牛', '生肖'),
-	(31, '虎', '生肖'),
-	(32, '兔', '生肖'),
-	(33, '龙', '生肖'),
-	(34, '蛇', '生肖'),
-	(35, '马', '生肖'),
-	(36, '羊', '生肖'),
-	(37, '猴', '生肖'),
-	(38, '鸡', '生肖'),
-	(39, '狗', '生肖'),
-	(40, '猪', '生肖'),
-	(41, '活跃', '会员状态'),
-	(42, '不活跃', '会员状态'),
-	(43, '休眠', '会员状态'),
-	(44, '死客', '会员状态'),
-	(45, '有卡会员', '会员类型'),
-	(46, '无卡会员', '会员类型'),
-	(47, '线上会员', '会员类型'),
-	(49, '活跃', '会员活跃度'),
-	(50, '不活跃', '会员活跃度'),
-	(51, '休眠', '会员活跃度'),
-	(53, '消耗产品', '产品用途'),
-	(54, '家居产品', '产品用途'),
-	(55, '家居产品或消耗产品', '产品用途'),
-	(58, '上架', '产品状态'),
-	(59, '下架', '产品状态'),
-	(60, '张', '存货单位'),
-	(61, '套', '存货单位'),
-	(62, '瓶', '存货单位'),
-	(63, '盒', '存货单位'),
-	(64, '失败', '商机处理结果'),
-	(65, '成功', '商机处理结果'),
-	(66, '待处理', '商机处理结果'),
-	(67, '上架', '套餐状态'),
-	(68, '下架', '套餐状态'),
-	(69, '上架', '项目状态'),
-	(70, '下架', '项目状态'),
-	(71, '未审核', '审核状态'),
-	(72, '通过', '审核状态'),
-	(73, '未通过', '审核状态'),
-	(74, 'ml', '计量单位'),
-	(75, 'g', '计量单位'),
-	(77, '自然进店', '到店途径'),
-	(79, '花茶', '粥品名称'),
-	(80, '面膜', '易耗品名称'),
-	(81, '升', '存货单位'),
-	(82, '次', '计量单位'),
-	(83, '瓶', '计量单位'),
-	(84, '套', '计量单位'),
-	(86, '片', '计量单位'),
-	(87, '片', '存货单位'),
-	(88, '支', '存货单位'),
-	(89, '包', '存货单位'),
-	(90, '支', '计量单位'),
-	(91, '包', '计量单位'),
-	(92, '1', '积分签到赠送额'),
-	(94, '美肤', '微信项目分类'),
-	(95, '抗衰', '微信项目分类'),
-	(96, '微整', '微信项目分类'),
-	(97, '纤体', '微信项目分类'),
-	(98, '祛痘', '微信项目分类'),
-	(99, '祛斑', '微信项目分类'),
-	(100, '眉眼', '微信项目分类'),
-	(101, '美胸', '微信项目分类'),
-	(102, '舒缓', '微信项目分类'),
-	(103, '脱毛', '微信项目分类'),
-	(104, '私密', '微信项目分类'),
-	(105, '测试', '会员卡等级大类'),
-	(106, '折扣', '礼遇类型 '),
-	(109, '肌肤年轻化检测', '问卷分类'),
-	(110, '全面健康化检测', '问卷分类'),
-	(113, 'fdsfs', '粥品名称'),
-	(115, '户外广告', '到店途径'),
-	(116, '网络团购', '到店途径'),
-	(117, '市场-友阿体验', '到店途径'),
-	(118, '市场-艾特花嫁', '到店途径'),
-	(119, '市场-云水润心', '到店途径'),
-	(120, '市场-其它', '到店途径'),
-	(121, '2019年4月精选长沙', '到店途径'),
-	(122, '公司赠送-云水润心', '到店途径'),
-	(123, '市场-通联支付', '到店途径'),
-	(124, '市场-平安银行', '到店途径'),
-	(125, '单选', '问卷类型'),
-	(126, '多选', '问卷类型'),
-	(127, '文本', '问卷类型'),
-	(128, '长文本', '问卷类型'),
-	(131, '奈嘉洛眼龄健康管理', '问卷分类'),
-	(132, '标题', '问卷类型'),
-	(133, '台', '计量单位'),
-	(134, '台', '存货单位'),
-	(135, '只', '存货单位'),
-	(136, '只', '计量单位'),
-	(137, '盒', '计量单位'),
-	(138, '2018步步高母亲节活动卡', '到店途径'),
-	(139, '2018珠江物业母亲节活动', '到店途径'),
-	(140, '2018学乐教育母亲节活动', '到店途径'),
-	(141, '2019第一季度邮政银行客户', '到店途径'),
-	(142, '2019年3月商家联盟拓客活动', '到店途径'),
-	(143, '201903珠江花园画册拓客', '到店途径'),
-	(144, '沉睡', '会员活跃度'),
-	(145, '2019年4月精选长沙', '礼遇类型 '),
-	(146, '广发银行线上商城合作', '到店途径');
diff --git a/zq-erp/src/main/java/com/matrix/biz/action/BizUserAction.java b/zq-erp/src/main/java/com/matrix/biz/action/BizUserAction.java
deleted file mode 100644
index daa4513..0000000
--- a/zq-erp/src/main/java/com/matrix/biz/action/BizUserAction.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package com.matrix.biz.action;
-
-
-import com.matrix.biz.bean.BizUser;
-import com.matrix.biz.dao.BizUserDao;
-import com.matrix.core.pojo.AjaxResult;
-import com.matrix.core.pojo.PaginationVO;
-import com.matrix.core.tools.StringUtils;
-import com.matrix.system.hive.action.util.QueryUtil;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-import java.util.List;
-
-/**
- * @description 会员查询
- * @author pengliang
- * @date 2019-06-19
- */
-
-@Controller
-@RequestMapping(value = "/admin/bizUser")
-public class BizUserAction {
-
-    @Autowired
-    private BizUserDao bizUserDao;
-
-    /**
-     * 列表显示
-     */
-    @RequestMapping(value =  "/showList")
-    public @ResponseBody
-    AjaxResult showList(BizUser bizUser, PaginationVO pageVo) {
-
-        pageVo.setSort("createTime");
-        pageVo.setOrder("desc");
-        QueryUtil.setQueryLimitCom(bizUser);
-        List<BizUser> dataList = bizUserDao.selectInPage(bizUser, pageVo);
-        AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList,
-                bizUserDao.selectTotalRecord(bizUser));
-        return result;
-    }
-
-
-    /**
-     * 批量设置为销售员
-     * @param ids
-     * @param status 1=销售员,0=普通用户
-     * @return
-     */
-    @RequestMapping(value = "/setUserSales")
-    @ResponseBody
-    public AjaxResult setUserSales(String ids,Integer status){
-        List<String> userIds = StringUtils.strToCollToString(ids, ",");
-        bizUserDao.updateSalesByIds(userIds,status);
-        return  new AjaxResult(AjaxResult.STATUS_SUCCESS,"修改成功");
-    }
-
-}
diff --git a/zq-erp/src/main/java/com/matrix/biz/action/MultipleFileUploadAction.java b/zq-erp/src/main/java/com/matrix/biz/action/MultipleFileUploadAction.java
deleted file mode 100644
index 9107992..0000000
--- a/zq-erp/src/main/java/com/matrix/biz/action/MultipleFileUploadAction.java
+++ /dev/null
@@ -1,170 +0,0 @@
-package com.matrix.biz.action;
-
-import com.alibaba.fastjson.JSONObject;
-import com.matrix.core.tools.LogUtil;
-import com.matrix.core.tools.StringUtils;
-import com.matrix.core.tools.UUIDUtil;
-import com.matrix.system.common.constance.AppConstance;
-import org.apache.commons.fileupload.FileUploadException;
-import org.apache.log4j.Logger;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Controller;
-import org.springframework.util.FileCopyUtils;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.multipart.MultipartFile;
-import org.springframework.web.multipart.MultipartHttpServletRequest;
-
-import javax.servlet.http.HttpServletResponse;
-import java.io.File;
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * 多文件上传控制器
- * 
- * @author jiangyouyao
- * @email 512061637@qq.com
- * @date 2019年2月25日
- */
-@Controller
-@RequestMapping(value = "admin/multipleUploadFile")
-public class MultipleFileUploadAction {
-	Logger log = Logger.getLogger(MultipleFileUploadAction.class);
-
-	@Value("${file_storage_path}")
-	private String fileStoragePath;
-	@Value("${static_resource_url}")
-	private String nginxUrl;
-
-	/**
-	 * 最大值
-	 */
-	private Long maxSize = 1024*1024*100L;
-
-	/**
-	 * 多文件上传方法
-	 * 
-	 * @author jiangyouyao
-	 * @email 512061637@qq.com
-	 * @date 2019年2月25日
-	 * @param response
-	 * @param request
-	 * @return
-	 * @throws IOException
-	 * @throws FileUploadException
-	 */
-	@RequestMapping(value = "/doUpload")
-	public @ResponseBody JSONObject doFileUpload(HttpServletResponse response, MultipartHttpServletRequest request, Integer data)
-			throws IOException, FileUploadException {
-		// 文件保存目录路径
-		String savePath = fileStoragePath;
-		// 文件保存目录URL
-		String saveUrl = nginxUrl;
-		// String msgPag = "common/fileUploadResult";
-		JSONObject object = new JSONObject();
-		response.setContentType("text/html; charset=UTF-8");
-		request.setCharacterEncoding("UTF-8");
-
-		// 保存和访问路径检查
-		if (StringUtils.isBlank(saveUrl) || StringUtils.isBlank(savePath)) {
-			object.put("status", "err");
-			object.put("msg", "文件上传失败错误代码:001");
-			return object;
-		}
-		// 检查目录
-		File uploadDir = new File(savePath);
-		if (!uploadDir.isDirectory()) {
-			uploadDir.mkdir();
-		}
-		// 检查目录写权限
-//		if (!uploadDir.canWrite()) {
-//			object.put("status", "err");
-//			object.put("msg", "上传目录没有写权限");
-//			return object;
-//		}
-
-		Map<String, MultipartFile> fileMaps = request.getFileMap();
-		for (String key : fileMaps.keySet()) {
-			MultipartFile file = fileMaps.get(key);
-
-			SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
-			String ymd = sdf.format(new Date());
-			savePath += ymd + "/";
-			saveUrl += ymd + "/";
-			File dirFile = new File(savePath);
-			if (!dirFile.exists()) {
-				dirFile.mkdirs();
-			}
-			log.info("上传文件名:" + file.getOriginalFilename());
-			log.info("上传文件大小:" + file.getBytes().length);
-			log.info("上传文件大小限制:" + maxSize);
-			log.info("上传文件大小是否超过限制:" + (file.getBytes().length > maxSize));
-			if (file.getBytes().length > maxSize) {
-				object.put("status", "err");
-				object.put("msg", "上传文件大小超过限制");
-				return object;
-			}
-			String fileName = file.getOriginalFilename();
-			String fileExt = fileName.substring(fileName.lastIndexOf(".") + 1).toLowerCase();
-
-			fileName = fileName.replace("." + fileExt, "");
-			fileName = getSensitive(fileName);
-			String newFileName = UUIDUtil.getRandomID() + UUIDUtil.getRandomID() + "." + fileExt;
-			File uploadedFile = new File(savePath, newFileName);
-			try {
-				FileCopyUtils.copy(file.getBytes(), uploadedFile);
-			} catch (Exception e) {
-				object.put("status", "err");
-				object.put("msg", "上传文件失败 "+e.getMessage());
-				return object;
-			}
-			log.info("saveUrl:" + saveUrl);
-			String visitPath = saveUrl + newFileName;
-			log.info("上传一个文件:" + newFileName);
-			log.info("访问路径:" + visitPath);
-			// 获取回调函数
-			/*
-			 * String callBack = request.getParameter("callBack"); String inputId =
-			 * request.getParameter("inputId"); request.setAttribute("status", "200");
-			 * request.setAttribute("callBack", callBack); request.setAttribute("inputId",
-			 * inputId); request.setAttribute("url", visitPath);
-			 */
-			object.put("path", visitPath);
-			object.put("fileName", fileName);
-			object.put("status", 200);
-			if (data != null) {
-				object.put("index", data);
-			}
-		}
-		return object;
-	}
-
-	/**
-	 * 检查文件名,过滤特殊字符
-	 * 
-	 * @author jiangyouyao
-	 * @email 512061637@qq.com
-	 * @date 2019年2月25日
-	 * @param globWords
-	 * @return
-	 */
-	public String getSensitive(String globWords) {
-
-		String sensitive = "";
-		Pattern pattern = Pattern.compile(AppConstance.SPECIAL_CHARACTERS);
-		Matcher matcher = pattern.matcher(globWords);
-		while (matcher.find()) {
-			sensitive += matcher.group();
-		}
-		/*
-		 * if(sensitive=="" || sensitive.length()<3 ){
-		 * sensitive=StringUtils.getRandomString(8); }
-		 */
-		return sensitive;
-	}
-}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/biz/action/SynQueryDemo.java b/zq-erp/src/main/java/com/matrix/biz/action/SynQueryDemo.java
deleted file mode 100644
index 6178cb5..0000000
--- a/zq-erp/src/main/java/com/matrix/biz/action/SynQueryDemo.java
+++ /dev/null
@@ -1,177 +0,0 @@
-package com.matrix.biz.action;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.net.URLEncoder;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.util.HashMap;
-import java.util.Map;
-
-
-/**
- * 实时查询请求Demo
- * @author Administrator
- *
- */
-public class SynQueryDemo {
-	
-	public static void main(String[] args) {
-		String key = "RFGYfbVI747";				//贵司的授权key
-		String customer = "244D09E91F5500D0AB888299959835A2";			//贵司的查询公司编号
-		String com = "shunfeng";			//快递公司编码
-		String num = "232581179302";	//快递单号
-		String phone = "";				//手机号码后四位
-		String from = "";				//出发地
-		String to = "";					//目的地
-		int resultv2 = 0;				//开启行政规划解析
-		
-		SynQueryDemo demo = new SynQueryDemo(key, customer);
-		String result = demo.synQueryData(com, num, phone, from, to, resultv2);
-		System.out.println(result);
-	}
-	
-	/**
-	 * 实时查询请求地址
-	 */
-	private static final String SYNQUERY_URL = "http://poll.kuaidi100.com/poll/query.do";
-	
-	private String key;			//授权key
-	private String customer;	//实时查询公司编号
-
-	public SynQueryDemo(String key, String customer) {
-		this.key = key;
-		this.customer = customer;
-	}
-	
-	/**
-	 * 实时查询快递单号
-	 * @param com			快递公司编码
-	 * @param num			快递单号
-	 * @param phone			手机号
-	 * @param from			出发地城市
-	 * @param to			目的地城市
-	 * @param resultv2		开通区域解析功能:0-关闭;1-开通
-	 * @return
-	 */
-	public String synQueryData(String com, String num, String phone, String from, String to, int resultv2) {
-
-		StringBuilder param = new StringBuilder("{");
-		param.append("\"com\":\"").append(com).append("\"");
-		param.append(",\"num\":\"").append(num).append("\"");
-		param.append(",\"phone\":\"").append(phone).append("\"");
-		param.append(",\"from\":\"").append(from).append("\"");
-		param.append(",\"to\":\"").append(to).append("\"");
-		if(1 == resultv2) {
-			param.append(",\"resultv2\":1");
-		} else {
-			param.append(",\"resultv2\":0");
-		}
-		param.append("}");
-		
-		Map<String, String> params = new HashMap<String, String>();
-		params.put("customer", this.customer);
-		String sign = MD5Utils.encode(param + this.key + this.customer);
-		params.put("sign", sign);
-		params.put("param", param.toString());
-		
-		return this.post(params);
-	}
-	
-	/**
-	 * 发送post请求
-	 */
-	public String post(Map<String, String> params) {
-		StringBuffer response = new StringBuffer("");
-		
-		BufferedReader reader = null;
-		try {
-			StringBuilder builder = new StringBuilder();
-			for (Map.Entry<String, String> param : params.entrySet()) {
-				if (builder.length() > 0) {
-					builder.append('&');
-				}
-				builder.append(URLEncoder.encode(param.getKey(), "UTF-8"));
-				builder.append('=');
-				builder.append(URLEncoder.encode(String.valueOf(param.getValue()), "UTF-8"));
-			}
-			byte[] bytes = builder.toString().getBytes("UTF-8");
-
-			URL url = new URL(SYNQUERY_URL);
-			HttpURLConnection conn = (HttpURLConnection) url.openConnection();
-			conn.setConnectTimeout(3000);
-			conn.setReadTimeout(3000);
-			conn.setRequestMethod("POST");
-			conn.setRequestProperty("accept", "*/*");
-            conn.setRequestProperty("connection", "Keep-Alive");
-			conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
-			conn.setRequestProperty("Content-Length", String.valueOf(bytes.length));
-			conn.setDoOutput(true);
-			conn.getOutputStream().write(bytes);
-
-			reader = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));
-			
-			String line = "";
-            while ((line = reader.readLine()) != null) {
-            	response.append(line);
-            }
-		} catch (Exception e) {
-			e.printStackTrace();
-		} finally {
-			try {
-				if (null != reader) {
-					reader.close();
-				}
-			} catch (IOException e) {
-				e.printStackTrace();
-			}
-		}
-		
-		return response.toString();
-	}
-}
-
-/**
- * md5加密
- */
-class MD5Utils {
-	private static MessageDigest mdigest = null;
-	private static char digits[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
-	
-	private static MessageDigest getMdInst() {
-		if (null == mdigest) {
-			try {
-				mdigest = MessageDigest.getInstance("MD5");
-			} catch (NoSuchAlgorithmException e) {
-				e.printStackTrace();
-			}
-		}
-		return mdigest;
-	}
-
-	public static String encode(String s) {
-		if(null == s) {
-			return "";
-		}
-		
-		try {
-			byte[] bytes = s.getBytes();
-			getMdInst().update(bytes);
-			byte[] md = getMdInst().digest();
-			int j = md.length;
-			char str[] = new char[j * 2];
-			int k = 0;
-			for (int i = 0; i < j; i++) {
-				byte byte0 = md[i];
-				str[k++] = digits[byte0 >>> 4 & 0xf];
-				str[k++] = digits[byte0 & 0xf];
-			}
-			return new String(str);
-		} catch (Exception e) {
-			e.printStackTrace();
-			return null;
-		}
-	}
-}
diff --git a/zq-erp/src/main/java/com/matrix/biz/bean/BizUser.java b/zq-erp/src/main/java/com/matrix/biz/bean/BizUser.java
deleted file mode 100644
index 92049f8..0000000
--- a/zq-erp/src/main/java/com/matrix/biz/bean/BizUser.java
+++ /dev/null
@@ -1,479 +0,0 @@
-package com.matrix.biz.bean;
-
-import com.matrix.core.anotations.Extend;
-import com.matrix.core.pojo.EntityDTO;
-
-import java.util.Date;
-
-/**
- * @description 用户表
- * @author jyy
- */
-public class BizUser extends EntityDTO{
-    @Extend
-    private static final long serialVersionUID = 1L;
-
-
-    /**
-     * 主键
-     */
-    private String  userId;
-
-
-    /**
-     * 真实姓名
-     */
-    private String  userName;
-
-
-    /**
-     * 密码
-     */
-    private String  userPassword;
-
-
-    /**
-     * 用户昵称
-     */
-    private String  nickName;
-
-
-    /**
-     * 头像
-     */
-    private String  avatarUrl;
-
-
-    /**
-     * 微信openid用户唯一标识
-     */
-    private String  openId;
-
-
-    /**
-     * 用户在开发平台的唯一标识符
-     */
-    private String  unionId;
-
-
-    /**
-     * 性别 1、男  2、女  0、未知
-     */
-    private String  gender;
-
-
-    /**
-     * 手机号码
-     */
-    private String  phoneNumber;
-
-
-    /**
-     * 用户所在地
-     */
-    private String  area;
-
-
-    /**
-     * 用户所在城市
-     */
-    private String  city;
-
-
-    /**
-     * 用户所在省份
-     */
-    private String  province;
-
-
-    /**
-     * 用户所在国家
-     */
-    private String  country;
-
-
-    /**
-     * 会话密匙
-     */
-    private String  sessionKey;
-
-
-    /**
-     * 最后登录时间
-     */
-    private Date  lastLoginTime;
-
-
-    /**
-     * 用户状态
-     */
-    private Integer  userStatus;
-
-
-    /**
-     * vip等级
-     */
-    private Integer  userVip;
-
-
-    /**
-     * 到期时间
-     */
-    private Date  userExpiryTime;
-
-
-    /**
-     * 认证信息
-     */
-    private String  userAuthentication;
-
-
-    /**
-     * 用户是否授权  1、是  2、否
-     */
-    private Integer  userIsAuthorize;
-
-
-    /**
-     * 用户临时名称
-     */
-    private String  userTempName;
-
-
-    /**
-     * 用户临时头像
-     */
-    private String  userTempAvatarUrl;
-
-
-    /**
-     * 用户类型 1、普通用户  2、会员  3、游客
-     */
-    private Integer  userType;
-
-
-    /**
-     * 用户总积分
-     */
-    private Integer totalScore;
-
-
-    /**
-     * 用户当前积分
-     */
-    private Integer currentScore;
-
-
-    /**
-     * 上级用户openId
-     */
-    private String parentOpenId;
-
-
-    /**
-     * 绑定上级用户时间
-     */
-    private Date bindingParentTime;
-
-
-    /**
-     * 是否是销售员(1=是,0=否)
-     */
-    private Integer isSales;
-
-
-    /**
-     * 开始时间
-     */
-    @Extend
-    private String startTime;
-
-    /**
-     * 结束时间
-     */
-    @Extend
-    private String endTime;
-    /**
-     * token
-     */
-    @Extend
-    private String  token;
-    public String getToken() {
-        return token;
-    }
-
-    private Long companyId;
-    public Long getCompanyId() {
-        return companyId;
-    }
-
-    public void setCompanyId(Long companyId) {
-        this.companyId = companyId;
-    }
-
-    public void setToken(String token) {
-        this.token=userId;
-    }
-
-    public String getUserId() {
-        return userId;
-    }
-
-    public void setUserId(String userId) {
-        this.userId=userId;
-    }
-
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName=userName;
-    }
-
-
-    public String getUserPassword() {
-        return userPassword;
-    }
-
-    public void setUserPassword(String userPassword) {
-        this.userPassword=userPassword;
-    }
-
-
-    public String getNickName() {
-        return nickName;
-    }
-
-    public void setNickName(String nickName) {
-        this.nickName=nickName;
-    }
-
-
-    public String getAvatarUrl() {
-        return avatarUrl;
-    }
-
-    public void setAvatarUrl(String avatarUrl) {
-        this.avatarUrl=avatarUrl;
-    }
-
-
-    public String getOpenId() {
-        return openId;
-    }
-
-    public void setOpenId(String openId) {
-        this.openId=openId;
-    }
-
-
-    public String getUnionId() {
-        return unionId;
-    }
-
-    public void setUnionId(String unionId) {
-        this.unionId=unionId;
-    }
-
-
-    public String getGender() {
-        return gender;
-    }
-
-    public void setGender(String gender) {
-        this.gender=gender;
-    }
-
-
-    public String getPhoneNumber() {
-        return phoneNumber;
-    }
-
-    public void setPhoneNumber(String phoneNumber) {
-        this.phoneNumber=phoneNumber;
-    }
-
-
-    public String getArea() {
-        return area;
-    }
-
-    public void setArea(String area) {
-        this.area=area;
-    }
-
-
-    public String getCity() {
-        return city;
-    }
-
-    public void setCity(String city) {
-        this.city=city;
-    }
-
-
-    public String getProvince() {
-        return province;
-    }
-
-    public void setProvince(String province) {
-        this.province=province;
-    }
-
-
-    public String getCountry() {
-        return country;
-    }
-
-    public void setCountry(String country) {
-        this.country=country;
-    }
-
-
-    public String getSessionKey() {
-        return sessionKey;
-    }
-
-    public void setSessionKey(String sessionKey) {
-        this.sessionKey=sessionKey;
-    }
-
-
-    public Date getLastLoginTime() {
-        return lastLoginTime;
-    }
-
-    public void setLastLoginTime(Date lastLoginTime) {
-        this.lastLoginTime=lastLoginTime;
-    }
-
-
-    public Integer getUserStatus() {
-        return userStatus;
-    }
-
-    public void setUserStatus(Integer userStatus) {
-        this.userStatus=userStatus;
-    }
-
-
-    public Integer getUserVip() {
-        return userVip;
-    }
-
-    public void setUserVip(Integer userVip) {
-        this.userVip=userVip;
-    }
-
-
-    public Date getUserExpiryTime() {
-        return userExpiryTime;
-    }
-
-    public void setUserExpiryTime(Date userExpiryTime) {
-        this.userExpiryTime=userExpiryTime;
-    }
-
-
-    public String getUserAuthentication() {
-        return userAuthentication;
-    }
-
-    public void setUserAuthentication(String userAuthentication) {
-        this.userAuthentication=userAuthentication;
-    }
-
-
-    public Integer getUserIsAuthorize() {
-        return userIsAuthorize;
-    }
-
-    public void setUserIsAuthorize(Integer userIsAuthorize) {
-        this.userIsAuthorize=userIsAuthorize;
-    }
-
-
-    public String getUserTempName() {
-        return userTempName;
-    }
-
-    public void setUserTempName(String userTempName) {
-        this.userTempName=userTempName;
-    }
-
-
-    public String getUserTempAvatarUrl() {
-        return userTempAvatarUrl;
-    }
-
-    public void setUserTempAvatarUrl(String userTempAvatarUrl) {
-        this.userTempAvatarUrl=userTempAvatarUrl;
-    }
-
-
-    public Integer getUserType() {
-        return userType;
-    }
-
-    public void setUserType(Integer userType) {
-        this.userType=userType;
-    }
-
-    public String getStartTime() {
-        return startTime;
-    }
-
-    public void setStartTime(String startTime) {
-        this.startTime = startTime;
-    }
-
-    public String getEndTime() {
-        return endTime;
-    }
-
-    public void setEndTime(String endTime) {
-        this.endTime = endTime;
-    }
-
-    public Integer getTotalScore() {
-        return totalScore;
-    }
-
-    public void setTotalScore(Integer totalScore) {
-        this.totalScore = totalScore;
-    }
-
-    public Integer getCurrentScore() {
-        return currentScore;
-    }
-
-    public void setCurrentScore(Integer currentScore) {
-        this.currentScore = currentScore;
-    }
-
-    public String getParentOpenId() {
-        return parentOpenId;
-    }
-
-    public void setParentOpenId(String parentOpenId) {
-        this.parentOpenId = parentOpenId;
-    }
-
-    public Date getBindingParentTime() {
-        return bindingParentTime;
-    }
-
-    public void setBindingParentTime(Date bindingParentTime) {
-        this.bindingParentTime = bindingParentTime;
-    }
-
-    public Integer getIsSales() {
-        return isSales;
-    }
-
-    public void setIsSales(Integer isSales) {
-        this.isSales = isSales;
-    }
-}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/biz/dao/BizUserDao.java b/zq-erp/src/main/java/com/matrix/biz/dao/BizUserDao.java
deleted file mode 100644
index b87fbc8..0000000
--- a/zq-erp/src/main/java/com/matrix/biz/dao/BizUserDao.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.matrix.biz.dao;
-
-import com.matrix.biz.bean.BizUser;
-import com.matrix.core.pojo.PaginationVO;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @description 用户表
- * @author jyy
- * @date 2019-05-31 10:03
- */
-public interface BizUserDao {
-
-	public int insert(@Param("item") BizUser bizUser);
-   	
-   	public int batchInsert(@Param("list") List<BizUser> bizUserList);
-   	
-	public int updateByMap(Map<String, Object> modifyMap);
-	
-	public int updateByModel(@Param("record") BizUser bizUser);
-	
-	public int deleteByIds(@Param("list") List<String> list);
-	
-	public int deleteById(String userId);
-
-	public int deleteByModel(@Param("record") BizUser bizUser);
-	
-	public List<BizUser> selectInPage(@Param("record") BizUser bizUser, @Param("pageVo") PaginationVO pageVo);
-
-	public List<BizUser> selectByModel(@Param("record") BizUser bizUser);
-	
-	public int selectTotalRecord(@Param("record") BizUser bizUser);
-	
-	public BizUser  selectById(String userId);
-	
-	public BizUser  selectForUpdate(String userId);
-
-	public BizUser findByOpenId(@Param("openId") String openId);
-
-	/**
-	 * 批量设置销售员
-	 * @param list
-	 * @param status
-	 * @return
-	 */
-	int  updateSalesByIds(@Param("list") List<String> list, @Param("status") Integer status);
-
-}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/biz/service/BizUserService.java b/zq-erp/src/main/java/com/matrix/biz/service/BizUserService.java
deleted file mode 100644
index 77ae0fe..0000000
--- a/zq-erp/src/main/java/com/matrix/biz/service/BizUserService.java
+++ /dev/null
@@ -1,82 +0,0 @@
-package com.matrix.biz.service;
-
-import com.matrix.biz.bean.BizUser;
-import com.matrix.core.pojo.PaginationVO;
-import com.matrix.core.web.BaseServices;
-
-import java.util.List;
-
-/**
- * @description  service接口类 (用户表)
- * @author jyy
- * @date 2019-05-31 10:03
- */
-public interface BizUserService extends BaseServices<BizUser> {
-	
-	/**
-	 * 新增
-	 */
-	public int add(BizUser bizUser);
-   	
-   	/**
-	 * 批量新增
-	 */
-	public int batchAdd(List<BizUser> bizUserList);
-
-   	/**
-	 * 根据map键值对 更新
-	 */
-	public int modifyByMap(BizUser oldBizUser, BizUser newBizUser);
-	
-	/**
-	 * 根据对象 更新
-	 */
-	public int modifyByModel(BizUser bizUser);
-	
-	/**
-	 * 批量删除
-	 */
-	public int remove(List<String> list);
-
-	/**
-	 * 根据id删除
-	 */
-	public int removeById(String userId);
-	
-	/**
-	 * 根据对象删除
-	 */
-	public int removeByModel(BizUser bizUser);
-	
-	/**
-	 * 分页查询
-	 */
-	public List<BizUser> findInPage(BizUser bizUser, PaginationVO pageVo);
-
-	/**
-	 * 根据对象查询
-	 */
-	public List<BizUser> findByModel(BizUser bizUser);
-	
-	/**
-	 * 统计记录数
-	 */
-	public int  findTotal(BizUser bizUser);
-	
-	/**
-	 * 根据id查询
-	 */
-	public BizUser  findById(String userId);
-
-   	
-	/**
-	 * 根据openId更新
-	 */
-
-	public BizUser findByOpenId(String openId);
-	
-	/**
-	 * 保存用户信息
-	 */
-	public int saveUserInfo(BizUser bizUser);
-}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/biz/service/impl/BizUserServiceImpl.java b/zq-erp/src/main/java/com/matrix/biz/service/impl/BizUserServiceImpl.java
deleted file mode 100644
index 415389b..0000000
--- a/zq-erp/src/main/java/com/matrix/biz/service/impl/BizUserServiceImpl.java
+++ /dev/null
@@ -1,158 +0,0 @@
-package com.matrix.biz.service.impl;
-
-import com.matrix.biz.bean.BizUser;
-import com.matrix.biz.dao.BizUserDao;
-import com.matrix.biz.service.BizUserService;
-import com.matrix.core.constance.MatrixConstance;
-import com.matrix.core.constance.SystemErrorCode;
-import com.matrix.core.exception.GlobleException;
-import com.matrix.core.pojo.PaginationVO;
-import com.matrix.core.tools.ModelUtils;
-import com.matrix.core.tools.UUIDUtil;
-import com.matrix.system.common.constance.AppConstance;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @description service接口实现类(用户表)
- * @author jyy
- * @date 2019-05-31 10:03
- */
-@Service
-public class BizUserServiceImpl implements BizUserService {
-
-	
-	@Autowired
-	private BizUserDao bizUserDao;
-
-	
-	@Override
-	public int add(BizUser bizUser){
-		// 设置基本字段信息,临时字段
-		bizUser.setUserIsAuthorize(AppConstance.IS_NOT_AUTHORIZE);
-		bizUser.setCreateBy(AppConstance.USER_TYPE_ADMIN);
-		bizUser.setUpdateBy(AppConstance.USER_TYPE_ADMIN);
-		bizUser.setUserId(UUIDUtil.getRandomID());
-		return bizUserDao.insert(bizUser);
-		
-	}
-	
-	@Override
-	public int batchAdd(List<BizUser>  bizUserList) {
-		//这里没有做基本字段的设置,如有需要请自己实现	
-		int num = 0;
-		int c = 10000;
-		int size = bizUserList.size()/c + 1;
-		for(int i=0; i<size; i++) {
-			int begin = i*c;
-			int end = (i+1)*c;
-			end = end >= bizUserList.size() ? bizUserList.size() : end;
-			List<BizUser> insertList = bizUserList.subList(begin, end);
-			num += bizUserDao.batchInsert(insertList);
-		}
-		return num;
-		
-	}
-	
-	
-   	
-    @Override
-	public int modifyByMap(BizUser oldBizUser
-	,BizUser newBizUser){
-	
-		Map<String, Object> modifyMap = null;
-		try {
-			if (!ModelUtils.isModified(oldBizUser, newBizUser)) {
-				return MatrixConstance.DML_SUCCESSS;
-			}
-			modifyMap = ModelUtils.comparePojo2Map(oldBizUser, newBizUser);
-		} catch (Exception e) {
-			throw new GlobleException(SystemErrorCode.DATA_UPDATE_FAIL, e, newBizUser);
-		}
-		if (modifyMap.size() > 0) {
-			modifyMap.put("userId", oldBizUser.getUserId());
-			bizUserDao.updateByMap(modifyMap);
-		}
-		return MatrixConstance.DML_SUCCESSS;
-	}
-	
-	@Override
-	public int modifyByModel(BizUser bizUser){
-	
-		return bizUserDao.updateByModel(bizUser);
-	
-	}
-	
-	
-	
-	@Override
-	public int remove(List<String> list){
-	
-		return bizUserDao.deleteByIds(list);
-	
-	}
-
-	@Override
-	public int removeById(String userId){
-	
-		return bizUserDao.deleteById(userId);
-	
-	}
-	
-	@Override
-	public int removeByModel(BizUser bizUser){
-	
-		return bizUserDao.deleteByModel(bizUser);
-	
-	}
-	
-	
-	@Override
-	public List<BizUser> findInPage(BizUser bizUser,  PaginationVO pageVo){
-	
-		return bizUserDao.selectInPage(bizUser , pageVo);
-	
-	}
-	
-	@Override
-	public List<BizUser> findByModel(BizUser bizUser){
-	
-		return bizUserDao.selectByModel(bizUser);
-	
-	}
-	
-	@Override
-	public int  findTotal(BizUser bizUser){
-	
-		return bizUserDao.selectTotalRecord(bizUser);
-	
-	}
-	
-	@Override
-	public BizUser  findById(String userId){
-	
-		return bizUserDao.selectById(userId);
-	
-	}
-
-	
-	@Override
-	public BizUser findByOpenId(String openId) {
-		return bizUserDao.findByOpenId(openId);
-	}
-	
-	/**
-	 * 保存用户信息
-	 */
-	@Override
-	public int saveUserInfo(BizUser bizUser) {
-			
-		return bizUserDao.updateByModel(bizUser);
-	}
-   	
-	
-	
-}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/component/rabbitmq/DeliverCallbackAdapter.java b/zq-erp/src/main/java/com/matrix/component/rabbitmq/DeliverCallbackAdapter.java
index 887b2b2..d477acc 100644
--- a/zq-erp/src/main/java/com/matrix/component/rabbitmq/DeliverCallbackAdapter.java
+++ b/zq-erp/src/main/java/com/matrix/component/rabbitmq/DeliverCallbackAdapter.java
@@ -1,4 +1,4 @@
-package com.matrix.core.rabbitmq;
+package com.matrix.component.rabbitmq;
 
 import com.matrix.core.exception.GlobleExceptionResolver;
 import com.matrix.core.tools.LogUtil;
diff --git a/zq-erp/src/main/java/com/matrix/component/rabbitmq/MqTask.java b/zq-erp/src/main/java/com/matrix/component/rabbitmq/MqTask.java
index 2745b5e..eafb7c2 100644
--- a/zq-erp/src/main/java/com/matrix/component/rabbitmq/MqTask.java
+++ b/zq-erp/src/main/java/com/matrix/component/rabbitmq/MqTask.java
@@ -26,7 +26,7 @@
     /**
      * 处理类在spring中的bean名称
      */
-    private com.matrix.core.rabbitmq.DeliverCallbackAdapter handerAdapter;
+    private DeliverCallbackAdapter handerAdapter;
 
     /**
      * 自动确认 默认为true
@@ -39,7 +39,7 @@
         this.queue = queue;
         this.routingKey = routingKey;
         if(hander!=null){
-            this.handerAdapter = new com.matrix.core.rabbitmq.DeliverCallbackAdapter(hander,routingKey);
+            this.handerAdapter = new DeliverCallbackAdapter(hander,routingKey);
         }
 
     }
@@ -48,7 +48,7 @@
         this.queue = queue;
         this.routingKey = routingKey;
         if(hander!=null){
-            this.handerAdapter = new com.matrix.core.rabbitmq.DeliverCallbackAdapter(hander,routingKey);
+            this.handerAdapter = new DeliverCallbackAdapter(hander,routingKey);
         }
         this.autoAck=autoAck;
 
@@ -95,7 +95,7 @@
         return handerAdapter;
     }
 
-    public void setHander(com.matrix.core.rabbitmq.DeliverCallbackAdapter hander) {
+    public void setHander(DeliverCallbackAdapter hander) {
         this.handerAdapter = hander;
     }
 }
diff --git a/zq-erp/src/main/java/com/matrix/component/redis/RedisUserLoginUtils.java b/zq-erp/src/main/java/com/matrix/component/redis/RedisUserLoginUtils.java
index 9eb6eb0..358950f 100644
--- a/zq-erp/src/main/java/com/matrix/component/redis/RedisUserLoginUtils.java
+++ b/zq-erp/src/main/java/com/matrix/component/redis/RedisUserLoginUtils.java
@@ -7,7 +7,6 @@
 import com.matrix.core.tools.StringUtils;
 import com.matrix.core.tools.UUIDUtil;
 import com.matrix.core.tools.WebUtil;
-import com.matrix.system.hive.plugin.message.StringUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
@@ -120,10 +119,14 @@
 	 * @date:2018年1月19日下午3:17:14
 	 */
 	public void loginOut() {
-		String toke = getUserToken();
-		redisClient.removeObject(toke);
+		String token = getUserToken();
+		redisClient.removeObject(token);
 	}
 
 
-
+    public void updateUserInfo(Object obj) {
+		String token = getUserToken();
+		redisClient.saveValue(token, obj);
+		LogUtil.debug("更新redis用户");
+    }
 }
diff --git a/zq-erp/src/main/java/com/matrix/component/tools/ImageUtil.java b/zq-erp/src/main/java/com/matrix/component/tools/ImageUtil.java
index c7fdbdb..d6966a2 100644
--- a/zq-erp/src/main/java/com/matrix/component/tools/ImageUtil.java
+++ b/zq-erp/src/main/java/com/matrix/component/tools/ImageUtil.java
@@ -2,8 +2,10 @@
 
 import java.awt.*;
 import java.awt.image.BufferedImage;
-import java.io.FileNotFoundException;
-import java.io.IOException;
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.URL;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.regex.Matcher;
@@ -91,4 +93,44 @@
 		System.out.println("系统字体数:" + fontCount);
 	}
 
+
+	public static void downloadPicture(String imgUrl,String savePath) {
+		URL url = null;
+		int imageNumber = 0;
+		try {
+
+			InputStream inputStream = null;
+			HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(imgUrl).openConnection();
+			httpURLConnection.setRequestMethod("GET");
+			httpURLConnection.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36");
+			httpURLConnection.setRequestProperty("Accept-Encoding", "gzip");
+			httpURLConnection.setRequestProperty("Referer","no-referrer");
+			httpURLConnection.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
+			httpURLConnection.setConnectTimeout(15000);
+			httpURLConnection.setReadTimeout(20000);
+			inputStream = httpURLConnection.getInputStream();
+
+
+
+			FileOutputStream fileOutputStream = new FileOutputStream(new File(savePath));
+			ByteArrayOutputStream output = new ByteArrayOutputStream();
+			byte[] buffer = new byte[1024];
+			int length;
+			while ((length = inputStream.read(buffer)) > 0) {
+				output.write(buffer, 0, length);
+			}
+			byte[] context=output.toByteArray();
+			fileOutputStream.write(output.toByteArray());
+			inputStream.close();
+			fileOutputStream.close();
+		} catch (MalformedURLException e) {
+			e.printStackTrace();
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+
+
+
 }
diff --git a/zq-erp/src/main/java/com/matrix/component/tools/WxacodeUtil.java b/zq-erp/src/main/java/com/matrix/component/tools/WxacodeUtil.java
index 7b0c2a4..1bd3bc1 100644
--- a/zq-erp/src/main/java/com/matrix/component/tools/WxacodeUtil.java
+++ b/zq-erp/src/main/java/com/matrix/component/tools/WxacodeUtil.java
@@ -19,14 +19,9 @@
 import java.util.Map;
 
 public class WxacodeUtil {
-	/**
-	 * 小程序秘钥
-	 */
-	private static final String XCX_SECRET = "xcx_secret";
-	/**
-	 * 小程序appid
-	 */
-	private static final String XCX_APPID = "xcx_appid";
+
+
+
 	/**
 	 * token获取地址
 	 */
@@ -37,11 +32,9 @@
 	 */
 	private static final String GET_WXACODE ="https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=";
 	
-    public static String getWxacode(String scene,String page,String fileName) throws Exception {
+    public static String getWxacode(String scene,String page,String fileName,String appid,String secret) throws Exception {
         LogUtil.debug("scene={},page={},fileName={}",scene,page,fileName);
         //获取token
-    	String appid = PropertiesUtil.getString(XCX_APPID);
-		String secret = PropertiesUtil.getString(XCX_SECRET);
 		 String result1 = get(TOKEN_URL.replace("APPID", appid).replace("SECRET", secret));
 	     String access_token = JSONObject.parseObject(result1).getString("access_token");
         if(StringUtils.isNotBlank(access_token)) {
@@ -61,12 +54,6 @@
             HttpResponse response;
             response = httpClient.execute(httpPost);
             InputStream inputStream = response.getEntity().getContent();
-            /*Object inputObj= response.getEntity().getContent();
-            if(inputObj instanceof InputStream){
-                String strError = streamToString(inputStream,"GBK");
-                LogUtil.info("-------------二维码生成------"+strError);
-                return "error:" + strError;
-            }*/
 
             // 图片保存目录路径
     		String baseSavePath = PropertiesUtil.getString(AppConstance.FILES_TORAGE_PATH);
@@ -74,11 +61,6 @@
             if(!targetFile.exists()){
                 targetFile.mkdirs();
             }
-
-            /*String inputstreamtofile = inputstreamtofile(inputStream, targetFile);
-            if(null != inputstreamtofile){
-                return inputstreamtofile;
-            }*/
 
             // 创建图片文件夹
             baseSavePath += "wxacode" + File.separatorChar;
@@ -89,23 +71,15 @@
             String qrcodePath = baseSavePath + fileName + ".png";
             FileOutputStream out = new FileOutputStream(qrcodePath);
             LogUtil.debug("qrcodePath:{}",qrcodePath);
-            //本地调试创建(不用删)
-            /*String filePath = "e:/test.png";
-            File file = new File(filePath);
-            if (!file.exists()) {
-                file.mkdir();
-            }
-            FileOutputStream outs = new FileOutputStream(file);*/
+
             byte[] buffer = new byte[1024];
             int bytesRead = 0;
             while((bytesRead = inputStream.read(buffer, 0, 1024)) != -1) {
                 out.write(buffer, 0, bytesRead);
-                //outs.write(buffer, 0, bytesRead);
+
             }
             out.flush();
             out.close();
-            //outs.flush();
-            //outs.close();
 
             return qrcodePath;
         } else {
diff --git a/zq-erp/src/main/java/com/matrix/component/websoket/ScanQrCodeLoginDto.java b/zq-erp/src/main/java/com/matrix/component/websoket/ScanQrCodeLoginDto.java
new file mode 100644
index 0000000..2eb5086
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/component/websoket/ScanQrCodeLoginDto.java
@@ -0,0 +1,57 @@
+package com.matrix.component.websoket;
+
+import lombok.Data;
+
+/**
+ * 扫码登录接收参数
+ */
+@Data
+public class ScanQrCodeLoginDto {
+
+    /**
+     * 登录操作 1.登录
+     */
+    public static final Integer LOGIN_OPERATION_LOGIN=1;
+
+    /**
+     * 登录操作 2取消登录
+     */
+    public static final Integer LOGIN_OPERATION_CANCEL=2;
+    /**
+     * 指令类型  1,已扫码
+     */
+    public static final Integer MSG_TYPE_SCAN=1;
+    /**
+     * 指令类型 2登录确认
+     */
+    public static final Integer MSG_TYPE_LOGIN=2;
+
+
+
+    /**
+     * 网页客户端id,浏览器生成
+     */
+    String webClientId;
+
+    /**
+     * 二维码登录key
+     */
+    String loginQrCodeKey;
+
+    /**
+     * app登录用户ID
+     */
+    Long appUserId;
+
+    /**
+     * 登录操作 1.登录,2取消登录
+     */
+    Integer loginOperation;
+
+    /**
+    * 指令类型  1,已扫码,2登录确认,
+     */
+    Integer msgType;
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/component/websoket/WebSocketPushHandler.java b/zq-erp/src/main/java/com/matrix/component/websoket/WebSocketPushHandler.java
index aa53291..5344831 100644
--- a/zq-erp/src/main/java/com/matrix/component/websoket/WebSocketPushHandler.java
+++ b/zq-erp/src/main/java/com/matrix/component/websoket/WebSocketPushHandler.java
@@ -27,10 +27,12 @@
     private static final List<WebSoketMessageObserver> observerList=new ArrayList<>();
 
 
+
     public  WebSocketPushHandler(){
         LogUtil.info("WebSocketPushHandler初始化");
         //注册观察者
-        addObserver(new WebSoketMessageRabbitObserver());
+        //addObserver(new WebSoketMessageRabbitObserver());
+        addObserver(new WebSoketScanQrCodeLoginObserver());
     }
     /**
      * 用户进入系统监听
diff --git a/zq-erp/src/main/java/com/matrix/component/websoket/WebSoketScanQrCodeLoginObserver.java b/zq-erp/src/main/java/com/matrix/component/websoket/WebSoketScanQrCodeLoginObserver.java
new file mode 100644
index 0000000..634493a
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/component/websoket/WebSoketScanQrCodeLoginObserver.java
@@ -0,0 +1,66 @@
+package com.matrix.component.websoket;
+
+import cn.hutool.crypto.SecureUtil;
+import net.sf.json.JSONObject;
+import org.springframework.web.socket.CloseStatus;
+import org.springframework.web.socket.TextMessage;
+import org.springframework.web.socket.WebSocketSession;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 扫码登录soket处理类
+ * @author jyy
+ */
+public class WebSoketScanQrCodeLoginObserver implements WebSoketMessageObserver {
+
+
+    private static Map<String,Long> scanCash=new HashMap<>();
+
+
+    @Override
+    public void userConnection(WebSocketSession session) {
+
+    }
+
+    @Override
+    public void handleTextMessage(WebSocketSession session, TextMessage message) {
+
+
+        ScanQrCodeLoginDto commonMessage = (ScanQrCodeLoginDto) JSONObject.toBean(JSONObject.fromObject(message.getPayload()), ScanQrCodeLoginDto.class);
+
+        if(ScanQrCodeLoginDto.MSG_TYPE_LOGIN.equals(commonMessage.getMsgType())){
+            //todo 添加安全校验代码
+            scanCash.put(SecureUtil.md5(commonMessage.getLoginQrCodeKey()),commonMessage.getAppUserId());
+            JSONObject jsonObject=new JSONObject();
+            jsonObject.put("loginOperation",commonMessage.getLoginOperation());
+            jsonObject.put("msgType",commonMessage.getMsgType());
+            WebSocketPushHandler.sendMessageToUser(commonMessage.getWebClientId(), new TextMessage(jsonObject.toString()));
+        }else if(ScanQrCodeLoginDto.MSG_TYPE_SCAN.equals(commonMessage.getMsgType())){
+            JSONObject jsonObject=new JSONObject();
+            jsonObject.put("msgType",commonMessage.getMsgType());
+            WebSocketPushHandler.sendMessageToUser(commonMessage.getWebClientId(), new TextMessage(jsonObject.toString()));
+        }
+
+
+    }
+
+    @Override
+    public void afterConnectionClosed(WebSocketSession session, CloseStatus status) {
+
+    }
+
+    /**
+     * 获取扫码的用户id
+     * @param webClientId
+     * @return
+     */
+    public static Long getScanCashValue(String webClientId){
+        return scanCash.remove(SecureUtil.md5(webClientId));
+    }
+
+}
+
+
+
diff --git a/zq-erp/src/main/java/com/matrix/component/wechat/externalInterface/protocol/paramProtocol/BrandWCPayRequestData.java b/zq-erp/src/main/java/com/matrix/component/wechat/externalInterface/protocol/paramProtocol/BrandWCPayRequestData.java
index b0c8126..c5961d9 100644
--- a/zq-erp/src/main/java/com/matrix/component/wechat/externalInterface/protocol/paramProtocol/BrandWCPayRequestData.java
+++ b/zq-erp/src/main/java/com/matrix/component/wechat/externalInterface/protocol/paramProtocol/BrandWCPayRequestData.java
@@ -25,7 +25,7 @@
     private String signType = "";
     private String paySign = "";
     
-    public BrandWCPayRequestData(String prepay_id,String appID,String paySecret){
+    public BrandWCPayRequestData(String prepay_id, String appID, String paySecret){
     	//默认必须设置
         setAppId(appID);
         //随机字符串,不长于32 位
diff --git a/zq-erp/src/main/java/com/matrix/component/wechat/externalInterface/protocol/payComProtocol/JsApiPayComReqData.java b/zq-erp/src/main/java/com/matrix/component/wechat/externalInterface/protocol/payComProtocol/JsApiPayComReqData.java
index d38b928..45b726d 100644
--- a/zq-erp/src/main/java/com/matrix/component/wechat/externalInterface/protocol/payComProtocol/JsApiPayComReqData.java
+++ b/zq-erp/src/main/java/com/matrix/component/wechat/externalInterface/protocol/payComProtocol/JsApiPayComReqData.java
@@ -3,7 +3,6 @@
 
 import com.matrix.component.wechat.externalInterface.common.RandomStringGenerator;
 import com.matrix.component.wechat.externalInterface.common.Signature;
-import com.matrix.component.wechat.externalInterface.common.WechatConfigure;
 
 import java.lang.reflect.Field;
 import java.util.HashMap;
@@ -21,31 +20,29 @@
     /**
      * 商户号
      */
-    private String mch_id = "";
+    private String mchid = "";
+
+    private String mch_appid = "";
+
     /**
      * 商户企业付款单号
      */
     private String partner_trade_no = "";
+
     /**
      * 随机字符串
      */
     private String nonce_str = "";
+
+
+    private String check_name = "";
+
+
     /**
      * 签名
      */
     private String sign = "";
-    /**
-     * 收款方银行卡号
-     */
-    private String enc_bank_no = "";
-    /**
-     * 收款方用户名
-     */
-    private String enc_true_name = "";
-    /**
-     * 收款方开户行
-     */
-    private String bank_code = "";
+
     /**
      * 付款金额	RMB(分)
      */
@@ -54,6 +51,8 @@
      * 备注
      */
     private String desc = "";
+
+    private String openid = "";
 
 
     public JsApiPayComReqData() {
@@ -66,58 +65,49 @@
      * @param desc         描述
      * @param outTradeNo   商户企业付款单号
      * @param totalFee     付款金额
-     * @param bankNo       银行卡号
-     * @param bankTrueName 收款号姓名
      * @param bankCode     收款号开户行
      */
-    public JsApiPayComReqData(String mchID,String paySecret ,String desc, String outTradeNo, int totalFee, String bankNo, String bankTrueName, String bankCode) {
+    public JsApiPayComReqData(String mchID,String mch_appid,String paySecret ,String desc, String outTradeNo, int totalFee,
+                              String openid, String check_name, String bankCode) {
+        setMch_appid(mch_appid);
         //默认必须设置
-        setMch_id(mchID);
+        setMchid(mchID);
         setDesc(desc);
         setPartner_trade_no(outTradeNo);
         setAmount(totalFee);
+        setOpenid(openid);
+        setCheck_name(check_name);
         //随机字符串,不长于32 位
         setNonce_str(RandomStringGenerator.getRandomStringByLength(32));
         //根据API给的签名规则进行签名 【 必须要放在本方法的最后】
         String sign = Signature.getSign(toMap(),paySecret);
         setSign(sign);//把签名数据设置到Sign这个属性中
-//        setEnc_bank_no();
-//        setEnc_true_name();
-//        setBank_code();
+
 
     }
 
-
-    public String getMch_id() {
-        return mch_id;
+    public String getMch_appid() {
+        return mch_appid;
     }
 
-    public void setMch_id(String mch_id) {
-        this.mch_id = mch_id;
+    public void setMch_appid(String mch_appid) {
+        this.mch_appid = mch_appid;
     }
 
-    public String getEnc_bank_no() {
-        return enc_bank_no;
+    public String getCheck_name() {
+        return check_name;
     }
 
-    public void setEnc_bank_no(String enc_bank_no) {
-        this.enc_bank_no = enc_bank_no;
+    public void setCheck_name(String check_name) {
+        this.check_name = check_name;
     }
 
-    public String getEnc_true_name() {
-        return enc_true_name;
+    public String getMchid() {
+        return mchid;
     }
 
-    public void setEnc_true_name(String enc_true_name) {
-        this.enc_true_name = enc_true_name;
-    }
-
-    public String getBank_code() {
-        return bank_code;
-    }
-
-    public void setBank_code(String bank_code) {
-        this.bank_code = bank_code;
+    public void setMchid(String mchid) {
+        this.mchid = mchid;
     }
 
     public String getNonce_str() {
@@ -144,6 +134,14 @@
         this.partner_trade_no = partner_trade_no;
     }
 
+    public String getOpenid() {
+        return openid;
+    }
+
+    public void setOpenid(String openid) {
+        this.openid = openid;
+    }
+
     public int getAmount() {
         return amount;
     }
diff --git a/zq-erp/src/main/java/com/matrix/component/wechat/externalInterface/weixinUtil/WeixinServiceUtil.java b/zq-erp/src/main/java/com/matrix/component/wechat/externalInterface/weixinUtil/WeixinServiceUtil.java
index 30c7d4d..cc168ab 100644
--- a/zq-erp/src/main/java/com/matrix/component/wechat/externalInterface/weixinUtil/WeixinServiceUtil.java
+++ b/zq-erp/src/main/java/com/matrix/component/wechat/externalInterface/weixinUtil/WeixinServiceUtil.java
@@ -25,6 +25,7 @@
 import com.matrix.system.common.interceptor.HostInterceptor;
 import com.matrix.system.shopXcx.api.tools.WxShopOrderUtil;
 import org.apache.log4j.Logger;
+import org.jetbrains.annotations.NotNull;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -69,7 +70,25 @@
 	 * @return 预支付订单返回的结果对象(该结果对象已封装),在H5页面使用该对象信息
 	 * @throws Exception
 	 */
-	public BrandWCPayRequestData createOrder(String desc,String outTradeNo, int price, String openId,String attach) throws Exception {
+	public BrandWCPayRequestData createOrder(String desc, String outTradeNo, int price, String openId, String attach) throws Exception {
+		Long companyId=HostInterceptor.getCompanyId();
+		BusParameterSettings notifyUrl = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_NOTIFYURL, companyId);
+		return buildBrandWCPayRequestData(desc, outTradeNo, price, openId, attach, notifyUrl);
+	}
+
+	/**
+	 * 创建充值订单
+	 */
+	public BrandWCPayRequestData createRechargeOrder(String desc, String outTradeNo, int price, String openId, String attach) throws Exception {
+		Long companyId=HostInterceptor.getCompanyId();
+		BusParameterSettings notifyUrl = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_RECHARGE_NOTIFYURL, companyId);
+		return buildBrandWCPayRequestData(desc, outTradeNo, price, openId, attach, notifyUrl);
+	}
+
+
+
+	@NotNull
+	private BrandWCPayRequestData buildBrandWCPayRequestData(String desc, String outTradeNo, int price, String openId, String attach, BusParameterSettings notifyUrl) throws Exception {
 		// 创建微信支付预付接口
 		JsApiPayBusiness jsApiPayBusiness = new JsApiPayBusiness();
 		String idAddr = getIpAddr(WebUtil.getRequest());
@@ -78,7 +97,7 @@
 
 		BusParameterSettings mchID = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_MCHID, companyId);
 		BusParameterSettings paySecret = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_SECRET, companyId);
-		BusParameterSettings notifyUrl = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_NOTIFYURL, companyId);
+
 
 		BusParameterSettings appId = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.MINIPROGRAM_APPID, companyId);
 
@@ -102,10 +121,9 @@
 			LogUtil.error("创建微信支付订单失败msg={}",result.getReturn_msg());
 			throw new GlobleException("创建微信支付订单失败,请检查程序配置");
 		}
-
 	}
-	
-	
+
+
 	/**@Description 支付后,向微信发送请求、查询订单,看订单是否真的支付成功了
 	   @date 2017年6月27日
 	   @atuhor jiangyouyao
@@ -142,20 +160,31 @@
 	 * @param openid
 	 * @return
 	 */
-	public JsApiPayComResData comPay(String desc, String outTradeNo,int totalFee, String openid){
+	public JsApiPayComResData comPay(String desc, String outTradeNo,int totalFee, String openid,Long companyId){
 		JsApiPayComResData result=null;
-		//boolean flag=false;
 		try {
 			JsApiPayBusiness jsApiPayBusiness = new JsApiPayBusiness();
 			// TODO 企业付款
-			Long companyId=HostInterceptor.getCompanyId();
+
 			BusParameterSettings mchID = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_MCHID, companyId);
+			BusParameterSettings appId = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.MINIPROGRAM_APPID, companyId);
 			BusParameterSettings paySecret = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_SECRET, companyId);
 
+			BusParameterSettings certLocalPath = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_CERTLOCAL_PATH, companyId);
 
-			JsApiPayComReqData jsApiPayComReqData=new JsApiPayComReqData(mchID.getParamValue(),paySecret.getParamValue(),"","",0,"","","");
+			JsApiPayComReqData jsApiPayComReqData=new JsApiPayComReqData(mchID.getParamValue(),
+					appId.getParamValue(),
+					paySecret.getParamValue(),
+					desc,outTradeNo,totalFee,openid,"NO_CHECK","");
 			JsApiPayComService jsApiPayComService=new JsApiPayComService();
+
+			HttpsRequest2 request2= (HttpsRequest2) jsApiPayComService.getServiceRequest();
+			request2.setCertLocalPath(certLocalPath.getParamValue());
+			request2.setMchId(mchID.getParamValue());
+
+
 			result = jsApiPayBusiness.payComOrder(jsApiPayComService, jsApiPayComReqData);
+
 			LogUtil.info("#提现,企业付款到个人---result:{}",result);
 			if (result.getResult_code().equals("SUCCESS")) {
 				return result;
diff --git a/zq-erp/src/main/java/com/matrix/config/MvcCoreConfig.java b/zq-erp/src/main/java/com/matrix/config/MvcCoreConfig.java
index 8520ba6..5884118 100644
--- a/zq-erp/src/main/java/com/matrix/config/MvcCoreConfig.java
+++ b/zq-erp/src/main/java/com/matrix/config/MvcCoreConfig.java
@@ -20,7 +20,7 @@
  * @description 容器添加组件
  * @date 2019-06-14 15:50
  */
-@Configuration
+@Configuration()
 @PropertySource("classpath:config/system.properties")
 public class MvcCoreConfig implements WebMvcConfigurer {
 
@@ -77,7 +77,8 @@
 		registry.addInterceptor(suAuthorityInterceptor).addPathPatterns("/**/su/**");
 		//小程序公司与域名对应关系拦截
 		registry.addInterceptor(hostInterceptor).addPathPatterns("/**/wxapi/**")
-				.excludePathPatterns("/wxCommon/wxapi/wxpayCallback");
+				.excludePathPatterns("/wxCommon/wxapi/wxpayCallback")
+				.excludePathPatterns("/wxCommon/wxapi/rechargeCallBack");
 	}
 
 
diff --git a/zq-erp/src/main/java/com/matrix/config/MybatisPlusConfig.java b/zq-erp/src/main/java/com/matrix/config/MybatisPlusConfig.java
new file mode 100644
index 0000000..e08b37d
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/config/MybatisPlusConfig.java
@@ -0,0 +1,22 @@
+package com.matrix.config;
+
+import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @author wzy
+ * @date 2021-02-22
+ **/
+@Configuration
+@MapperScan("com.matrix.system.*.dao")
+public class MybatisPlusConfig {
+
+    @Bean
+    public PaginationInterceptor paginationInterceptor(){
+        return new PaginationInterceptor();
+    }
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/config/RabbitMqConfig.java b/zq-erp/src/main/java/com/matrix/config/RabbitMqConfig.java
index b05d58b..3cbe384 100644
--- a/zq-erp/src/main/java/com/matrix/config/RabbitMqConfig.java
+++ b/zq-erp/src/main/java/com/matrix/config/RabbitMqConfig.java
@@ -35,14 +35,27 @@
 
     public static final String MQ_EXCHANGE_A = "hive_exchange_A";
 
+    //订阅模式
+    public static final String MQ_EXCHANGE_TOPIC = "hive_exchange_fanout";
+
     @Bean
-    VipCreateTask VipCreateTask() {
-        return new VipCreateTask();
+    ScoreOrderTask ScoreOrderTask() {
+        return new ScoreOrderTask();
     }
+
+
 
     @Bean
     OrderTask OrderrCreateTask() {
         return new OrderTask();
+    }
+    @Bean
+    SalesOrderTask SalesOrderTask() {
+        return new SalesOrderTask();
+    }
+    @Bean
+    SalesOrderRefundTask SalesOrderRefundTask() {
+        return new SalesOrderRefundTask();
     }
 
     @Bean
@@ -68,16 +81,21 @@
 
         //声明一个交换机
         rabiitMqTemplate.exchangeDeclare(MQ_EXCHANGE_A+evn, "direct");
-        rabiitMqTemplate.exchangeDeclare(MQ_EXCHANGE_A+"cf", "direct");
+        rabiitMqTemplate.exchangeDeclare(MQ_EXCHANGE_TOPIC +evn, "topic");
 
         List<MqTask> taskList = new ArrayList<>();
 
         //注册RabbitMq任务
-        taskList.add(new MqTask(MQ_EXCHANGE_A + evn, MQTaskRouting.CREATE_VIP + evn, MQTaskRouting.CREATE_VIP + evn, VipCreateTask()));
-        taskList.add(new MqTask(MQ_EXCHANGE_A + evn, MQTaskRouting.CREATE_ORDER + evn,MQTaskRouting.CREATE_ORDER + evn,OrderrCreateTask()));
         taskList.add(new MqTask(MQ_EXCHANGE_A + evn, MQTaskRouting.SEND_TEMPLATE_MSG + evn,MQTaskRouting.SEND_TEMPLATE_MSG + evn, TemplateMsgTask()));
         taskList.add(new MqTask(MQ_EXCHANGE_A + evn, MQTaskRouting.ORDER_OUT_SOTORE + evn,MQTaskRouting.ORDER_OUT_SOTORE + evn, OrderOutSotoreTask()));
         taskList.add(new MqTask(MQ_EXCHANGE_A + evn, MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG + evn,MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG + evn, UniformMsgSentTask()));
+        taskList.add(new MqTask(MQ_EXCHANGE_A + evn, MQTaskRouting.SHOP_ORDER_REFUND + evn,MQTaskRouting.SHOP_ORDER_REFUND + evn, SalesOrderRefundTask()));
+
+        //不同任务在不同的队列,但是routingKey一样则可以收到生产者消息
+        taskList.add(new MqTask(MQ_EXCHANGE_TOPIC + evn, MQTaskRouting.CREATE_ORDER + evn,MQTaskRouting.CREATE_ORDER + evn,OrderrCreateTask()));
+        taskList.add(new MqTask(MQ_EXCHANGE_TOPIC + evn, MQTaskRouting.SALES_ORDER + evn,MQTaskRouting.CREATE_ORDER + evn,SalesOrderTask()));
+        taskList.add(new MqTask(MQ_EXCHANGE_TOPIC + evn, MQTaskRouting.SCORE_ORDER + evn,MQTaskRouting.CREATE_ORDER + evn,ScoreOrderTask()));
+
 
         rabiitMqTemplate.binding(taskList);
 
diff --git a/zq-erp/src/main/java/com/matrix/config/SwaggerConfig.java b/zq-erp/src/main/java/com/matrix/config/SwaggerConfig.java
index d1cc052..6b71b6a 100644
--- a/zq-erp/src/main/java/com/matrix/config/SwaggerConfig.java
+++ b/zq-erp/src/main/java/com/matrix/config/SwaggerConfig.java
@@ -2,8 +2,6 @@
 
 import io.swagger.annotations.Api;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
-import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import springfox.documentation.builders.ApiInfoBuilder;
@@ -43,7 +41,7 @@
                 .required(false).build();
         parameters.add(parameterBuilder.build());
         return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).enable(swaggerEnable).select().apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
-                .paths(PathSelectors.any()).build().globalOperationParameters(parameters);
+                .paths(PathSelectors.ant("/api/**")).build().globalOperationParameters(parameters).groupName("HIVE");
 //                .ignoredParameterTypes(MemberEntity.class);
     }
 
@@ -54,4 +52,57 @@
                 .version("1.0")
                 .build();
     }
+
+    @Bean
+    public Docket wxRestApi(){
+        // 添加请求参数,我们这里把token作为请求头部参数传入后端
+        ParameterBuilder parameterBuilder = new ParameterBuilder();
+        List<Parameter> parameters = new ArrayList<Parameter>();
+        parameterBuilder.name("token").description("令牌").modelRef(new ModelRef("string")).parameterType("header")
+                .required(true).build();
+        parameters.add(parameterBuilder.build());
+
+        ParameterBuilder parameterBuilder2 = new ParameterBuilder();
+        parameterBuilder2.name("companyCode").description("公司编码tangqiaqia.jyymatrix.cc").modelRef(new ModelRef("string")).parameterType("header")
+                .required(true).build();
+        parameters.add(parameterBuilder2.build());
+
+        return new Docket(DocumentationType.SWAGGER_2).apiInfo(wxApiInfo()).enable(swaggerEnable).select().apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
+                .paths(PathSelectors.ant("/wxapi/**")).build().globalOperationParameters(parameters).groupName("小程序接口");
+//                .ignoredParameterTypes(MemberEntity.class);
+    }
+
+    private ApiInfo wxApiInfo(){
+        return new ApiInfoBuilder()
+                .title("Hive Wx")
+                .description("This is a restful api document of Hive Wx.")
+                .version("1.0")
+                .build();
+    }
+
+
+    @Bean
+    public Docket ERPApi(){
+        // 添加请求参数,我们这里把token作为请求头部参数传入后端
+        ParameterBuilder parameterBuilder = new ParameterBuilder();
+        List<Parameter> parameters = new ArrayList<Parameter>();
+        parameterBuilder.name("token").description("令牌").modelRef(new ModelRef("string")).parameterType("header")
+                .required(true).build();
+        parameters.add(parameterBuilder.build());
+
+
+        return new Docket(DocumentationType.SWAGGER_2).apiInfo(ERPApiInfo()).enable(swaggerEnable).select().apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
+                .paths(PathSelectors.ant("/admin/**")).build().globalOperationParameters(parameters).groupName("ERP接口");
+    }
+
+    private ApiInfo ERPApiInfo(){
+        return new ApiInfoBuilder()
+                .title("Hive ERP")
+                .description("This is a restful api document of Hive ERP.")
+                .version("1.0")
+                .build();
+    }
+
+
+
 }
diff --git a/zq-erp/src/main/java/com/matrix/config/TaskScheduleConfig.java b/zq-erp/src/main/java/com/matrix/config/TaskScheduleConfig.java
new file mode 100644
index 0000000..1d09724
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/config/TaskScheduleConfig.java
@@ -0,0 +1,16 @@
+package com.matrix.config;
+
+import com.matrix.core.tools.LogUtil;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.stereotype.Component;
+
+@Component
+@EnableScheduling
+@ConditionalOnProperty(name = "scheduling.enabled", havingValue= "true")
+public class TaskScheduleConfig {
+
+    public   TaskScheduleConfig(){
+        LogUtil.debug("**********定时任务启动**********");
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/config/WebSocketConfig.java b/zq-erp/src/main/java/com/matrix/config/WebSocketConfig.java
index 56a21a4..aed2a7d 100644
--- a/zq-erp/src/main/java/com/matrix/config/WebSocketConfig.java
+++ b/zq-erp/src/main/java/com/matrix/config/WebSocketConfig.java
@@ -39,6 +39,7 @@
 		LogUtil.info("注册WebSocket处理类");
 		registry.addHandler(createWebSocketPushHandler(), "/webSocketServer")
 				.addInterceptors(createHhandshakeInterceptor()).setAllowedOrigins("*");
+
 		registry.addHandler(createWebSocketPushHandler(), "/sockjs/webSocketServer")
 				.addInterceptors(createHhandshakeInterceptor()).withSockJS();
 
diff --git a/zq-erp/src/main/java/com/matrix/core/exception/GlobleExceptionResolver.java b/zq-erp/src/main/java/com/matrix/core/exception/GlobleExceptionResolver.java
index d6ca19c..2ff87a7 100644
--- a/zq-erp/src/main/java/com/matrix/core/exception/GlobleExceptionResolver.java
+++ b/zq-erp/src/main/java/com/matrix/core/exception/GlobleExceptionResolver.java
@@ -7,7 +7,6 @@
 import com.matrix.system.common.bean.ProjException;
 import com.matrix.system.common.bean.SysUsers;
 import com.matrix.system.common.dao.ProjExceptionDao;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.web.servlet.HandlerExceptionResolver;
 import org.springframework.web.servlet.ModelAndView;
@@ -28,6 +27,7 @@
 
     private static final String TRUE = "true";
 
+
     /**
      * 忽略一些特定的异常
      */
diff --git a/zq-erp/src/main/java/com/matrix/core/pojo/AjaxResult.java b/zq-erp/src/main/java/com/matrix/core/pojo/AjaxResult.java
index 4e45714..8582d87 100644
--- a/zq-erp/src/main/java/com/matrix/core/pojo/AjaxResult.java
+++ b/zq-erp/src/main/java/com/matrix/core/pojo/AjaxResult.java
@@ -4,7 +4,7 @@
 import com.matrix.core.tools.InternationaUtil;
 import com.matrix.core.tools.MdcUtil;
 import com.matrix.core.tools.StringUtils;
-import com.matrix.system.hive.plugin.message.StringUtil;
+import com.matrix.system.fenxiao.vo.ShopSalesmanApplyVo;
 
 import java.io.Serializable;
 import java.util.HashMap;
@@ -44,7 +44,14 @@
      * info会被国际化工具先处理,找不到国际化资源则显示原始信息
      **/
     private String info;
+
+    /**
+     * 单个对象返回参数
+     */
+    private Object data;
+
     private Map<Object, Object> mapInfo = new HashMap<>();
+
     private List<?> rows;
     /**
      * 总记录数
@@ -53,8 +60,17 @@
 
     private String requestId;
 
+    public static AjaxResult buildSuccessInstance(Object data) {
+        AjaxResult result= new AjaxResult(STATUS_SUCCESS,"");
+        result.data=data;
+        return  result;
+    }
 
-
+    public static AjaxResult buildSuccessInstance(Object data, String info) {
+        AjaxResult result= new AjaxResult(STATUS_SUCCESS,info);
+        result.data=data;
+        return  result;
+    }
 
 
     public static AjaxResult buildSuccessInstance(String info) {
@@ -69,6 +85,11 @@
     public static AjaxResult buildSuccessInstance(List<?> rows, Integer total) {
         return new AjaxResult(STATUS_SUCCESS, rows, total);
     }
+    
+    public static AjaxResult buildSuccessInstance(List<?> rows, long total) {
+        return new AjaxResult(STATUS_SUCCESS, rows, Integer.parseInt(total+""));
+    }
+
 
     public static AjaxResult buildSuccessInstance(List<?> rows) {
         return new AjaxResult(STATUS_SUCCESS, rows);
@@ -93,8 +114,6 @@
      * 设置简单信息,这是一个便捷的方法
      *
      * @param status
-     * @param page
-     * @param info
      */
     public AjaxResult(String status, List<?> rows) {
         this.status = status;
@@ -109,6 +128,7 @@
         }
         this.requestId= MdcUtil.getMdc();
     }
+
 
 
 
@@ -168,6 +188,14 @@
         this.requestId = requestId;
     }
 
+    public Object getData() {
+        return data;
+    }
+
+    public void setData(Object data) {
+        this.data = data;
+    }
+
     /**
      * 在map对象中放置信息
      *
diff --git a/zq-erp/src/main/java/com/matrix/core/pojo/BasePageQueryDto.java b/zq-erp/src/main/java/com/matrix/core/pojo/BasePageQueryDto.java
new file mode 100644
index 0000000..a47fd5b
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/core/pojo/BasePageQueryDto.java
@@ -0,0 +1,44 @@
+package com.matrix.core.pojo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.matrix.core.tools.DateUtil;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.util.Date;
+
+@Data
+@ApiModel(value = "BaseQueryDto", description = "通用分页查询参数接收类")
+public class BasePageQueryDto {
+
+
+    @NotNull(message = "pageNum参数不能为空")
+    @ApiModelProperty(value = "第几页", example = "1")
+    private Integer pageNum;
+
+    @NotNull(message = "pageSize参数不能为空")
+    @ApiModelProperty(value ="数量", example = "10")
+    private Integer pageSize;
+
+    @ApiModelProperty(value ="排序方式", example = "desc")
+    private String order;
+
+    @ApiModelProperty(value ="排序字段", example = "create_time")
+    private String sort;
+
+    @ApiModelProperty(value ="关键字")
+    private String keywords;
+
+    @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8")
+    @ApiModelProperty(value = "开始时间")
+    private Date beginTime;
+
+    @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8")
+    @ApiModelProperty(value = "结束时间")
+    private Date endTime;
+
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/core/pojo/VerificationResult.java b/zq-erp/src/main/java/com/matrix/core/pojo/VerificationResult.java
new file mode 100644
index 0000000..d4bb932
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/core/pojo/VerificationResult.java
@@ -0,0 +1,47 @@
+package com.matrix.core.pojo;
+
+import lombok.Data;
+
+/**
+ * 通用的验证返回参数
+ */
+@Data
+public class VerificationResult {
+
+    private boolean judgeResult;
+
+    private String  msg;
+
+    private Object  info;
+
+    private VerificationResult(){
+
+    }
+
+    public static VerificationResult buildVerificationResult(boolean judgeResult){
+        VerificationResult obj=new VerificationResult();
+        obj.judgeResult =judgeResult;
+        return obj ;
+    }
+
+
+    public static VerificationResult buildVerificationResult(boolean judgeResult,String msg){
+        VerificationResult obj=new VerificationResult();
+        obj.judgeResult =judgeResult;
+        obj.msg=msg;
+        return obj ;
+    }
+
+
+    public static VerificationResult buildVerificationResult(boolean judgeResult,Object  info){
+        VerificationResult obj=new VerificationResult();
+        obj.judgeResult =judgeResult;
+        obj.info=info;
+        return obj ;
+    }
+
+
+
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/core/tools/StringUtils.java b/zq-erp/src/main/java/com/matrix/core/tools/StringUtils.java
index c2fbc63..60ff28d 100644
--- a/zq-erp/src/main/java/com/matrix/core/tools/StringUtils.java
+++ b/zq-erp/src/main/java/com/matrix/core/tools/StringUtils.java
@@ -1,15 +1,5 @@
 package com.matrix.core.tools;
 
-import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Random;
-import java.util.UUID;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
 import com.matrix.core.exception.GlobleException;
 import net.sourceforge.pinyin4j.PinyinHelper;
 import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
@@ -18,6 +8,11 @@
 import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType;
 import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
 import org.apache.commons.collections.CollectionUtils;
+
+import java.io.UnsupportedEncodingException;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 /**
  * 字符串操作类,转换数据类型,切割字符串,对象比较等操作
@@ -404,6 +399,8 @@
         return sb.toString();
     }
 
+
+
     /**
      * 用逗号分开的存的id是否包含对应的id 如比较 123,123,124 中是否包含12这个主键 比对的方法是 字符串中是否包含"^12$"
      * "^12,.*" 或者 ".+,12$" 或者 ".+,12,$" 或者 ".+,12,.+" 字符串
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/action/ActivitySignAwardSetAction.java b/zq-erp/src/main/java/com/matrix/system/activity/action/ActivitySignAwardSetAction.java
new file mode 100644
index 0000000..997821c
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/action/ActivitySignAwardSetAction.java
@@ -0,0 +1,207 @@
+package com.matrix.system.activity.action;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.tools.StringUtils;
+import com.matrix.system.activity.dto.ActivitiesListDto;
+import com.matrix.system.activity.dto.AddSignAwardSetDto;
+import com.matrix.system.activity.dto.BeCloseDto;
+import com.matrix.system.activity.dto.BeReadyDto;
+import com.matrix.system.activity.dto.CouponDto;
+import com.matrix.system.activity.dto.DelRowDto;
+import com.matrix.system.activity.dto.GoodsDto;
+import com.matrix.system.activity.dto.SignForUpdateDto;
+import com.matrix.system.activity.dto.SignReceiveListDto;
+import com.matrix.system.activity.dto.UpdateSignAwardSetDto;
+import com.matrix.system.activity.service.ActivitySignAwardSetService;
+import com.matrix.system.activity.vo.ActivitiesListVo;
+import com.matrix.system.activity.vo.CouponVo;
+import com.matrix.system.activity.vo.GoodsVo;
+import com.matrix.system.activity.vo.SignReceiveListVo;
+import com.matrix.system.hive.action.util.QueryUtil;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @description 奖品设置表
+ * @author yourName
+ * @date 2021-03-31 16:57
+ */
+@RestController
+@RequestMapping(value = "admin/activitySignAwardSet")
+public class ActivitySignAwardSetAction {
+
+	@Autowired
+	private ActivitySignAwardSetService activitySignAwardSetService;
+
+	/**
+	 * 新增签到活动
+	 */
+	@PostMapping(value = "/addSignAwardSet")
+	public @ResponseBody
+	AjaxResult addSignAwardSet(@RequestBody AddSignAwardSetDto addSignAwardSetDto) {
+		return activitySignAwardSetService.activitySignAwardSetService(addSignAwardSetDto);
+	}
+	
+	/**
+	 * 查询优惠券
+	 */
+	@ApiOperation(value = "查询优惠券")
+	@ApiResponses({
+			@ApiResponse(code = 200, message = "OK",  response = CouponVo.class)
+	})
+	@PostMapping(value = "/selectCouponList")
+	public @ResponseBody
+	AjaxResult selectCouponList(@RequestBody CouponDto couponDto) {
+		//设置用户公司ID
+		QueryUtil.setQueryLimitCom(couponDto);
+		//排序
+		if(StringUtils.isBlank(couponDto.getSort())){
+			couponDto.setSort("create_time");
+			couponDto.setOrder("desc");
+		}
+		Page<CouponVo> page = new Page(couponDto.getPageNum(), couponDto.getPageSize());
+		IPage<CouponVo> rows = activitySignAwardSetService.selectCouponList(page,couponDto);
+		AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal());
+		return result;
+	}
+	
+	/**
+	 * 查询商品
+	 */
+	@ApiOperation(value = "查询商品")
+	@ApiResponses({
+			@ApiResponse(code = 200, message = "OK",  response = GoodsVo.class)
+	})
+	@PostMapping(value = "/selectGoodsList")
+	public @ResponseBody
+	AjaxResult selectGoodsList(@RequestBody GoodsDto goodsDto) {
+		//设置用户公司ID
+		QueryUtil.setQueryLimitCom(goodsDto);
+		//排序
+		if(StringUtils.isBlank(goodsDto.getSort())){
+			goodsDto.setSort("create_time");
+			goodsDto.setOrder("desc");
+		}
+		Page<GoodsVo> page = new Page(goodsDto.getPageNum(), goodsDto.getPageSize());
+		IPage<GoodsVo> rows = activitySignAwardSetService.selectGoodsList(page,goodsDto);
+		AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal());
+		return result;
+	}
+
+	/**
+	 * 查询活动列表
+	 */
+	@ApiOperation(value = "查询活动列表")
+	@ApiResponses({
+			@ApiResponse(code = 200, message = "OK",  response = ActivitiesListVo.class)
+	})
+	@PostMapping(value = "/findActivitiesList")
+	public @ResponseBody
+	AjaxResult findActivitiesList(@RequestBody ActivitiesListDto activitiesListDto) {
+		//设置用户公司ID
+		QueryUtil.setQueryLimitCom(activitiesListDto);
+		//排序
+		if(StringUtils.isBlank(activitiesListDto.getSort())){
+			activitiesListDto.setSort("create_time");
+			activitiesListDto.setOrder("desc");
+		}
+		Page<ActivitiesListVo> page = new Page(activitiesListDto.getPageNum(), activitiesListDto.getPageSize());
+		IPage<ActivitiesListVo> rows = activitySignAwardSetService.findActivitiesList(page,activitiesListDto);
+		AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal());
+		return result;
+	}
+    
+    /**
+     *发布
+     */
+    @ApiOperation(value = "发布")
+    @PostMapping(value = "/beReady")
+    public @ResponseBody
+    AjaxResult beReady(@RequestBody BeReadyDto beReadyDto) {
+    	return activitySignAwardSetService.beReady(beReadyDto);
+    }
+    
+    /**
+     *删除
+     */
+    @ApiOperation(value = "删除")
+    @PostMapping(value = "/delRow")
+    public @ResponseBody
+    AjaxResult delRow(@RequestBody DelRowDto delRowDto) {
+    	return activitySignAwardSetService.delRow(delRowDto);
+    }
+	
+	/**
+     *关闭
+     */
+    @ApiOperation(value = "关闭")
+    @PostMapping(value = "/beClose")
+    public @ResponseBody
+    AjaxResult beClose(@RequestBody BeCloseDto beCloseDto) {
+    	return activitySignAwardSetService.beClose(beCloseDto);
+    }
+    
+    /**
+	 * 活动统计
+	 */
+	@ApiOperation(value = "活动统计")
+	@ApiResponses({
+			@ApiResponse(code = 200, message = "OK",  response = SignReceiveListVo.class)
+	})
+	@PostMapping(value = "/findSignReceiveList")
+	public @ResponseBody
+	AjaxResult findSignReceiveList(@RequestBody SignReceiveListDto signReceiveListDto) {
+		//设置用户公司ID
+		QueryUtil.setQueryLimitCom(signReceiveListDto);
+		//排序
+		if(StringUtils.isBlank(signReceiveListDto.getSort())){
+			signReceiveListDto.setSort("create_time");
+			signReceiveListDto.setOrder("desc");
+		}
+		Page<SignReceiveListVo> page = new Page(signReceiveListDto.getPageNum(), signReceiveListDto.getPageSize());
+		IPage<SignReceiveListVo> rows = activitySignAwardSetService.findSignReceiveList(page,signReceiveListDto);
+		AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal());
+		return result;
+	}
+	
+	/**
+     *进入修改
+     */
+    @ApiOperation(value = "进入修改")
+    @PostMapping(value = "/findSignForUpdate")
+    public @ResponseBody
+    AjaxResult findSignForUpdate(@RequestBody SignForUpdateDto signForUpdateDto) {
+    	return activitySignAwardSetService.findSignForUpdate(signForUpdateDto);
+    }
+	
+    /**
+	 * 保存
+	 */
+	@PostMapping(value = "/updateSignAwardSet")
+	public @ResponseBody
+	AjaxResult updateSignAwardSet(@RequestBody UpdateSignAwardSetDto updateSignAwardSetDto) {
+		return activitySignAwardSetService.updateSignAwardSet(updateSignAwardSetDto);
+	}
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/action/ActivitySignReceiveRecordAction.java b/zq-erp/src/main/java/com/matrix/system/activity/action/ActivitySignReceiveRecordAction.java
new file mode 100644
index 0000000..ca94f53
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/action/ActivitySignReceiveRecordAction.java
@@ -0,0 +1,21 @@
+package com.matrix.system.activity.action;
+import com.matrix.system.activity.service.ActivitySignReceiveRecordService;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @description 领取记录表
+ * @author yourName
+ * @date 2021-03-31 16:57
+ */
+@RestController
+@RequestMapping(value = "admin/activitySignReceiveRecord")
+public class ActivitySignReceiveRecordAction {
+
+	@Autowired
+	private ActivitySignReceiveRecordService activitySignReceiveRecordService;
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/action/ActivitySignRecordAction.java b/zq-erp/src/main/java/com/matrix/system/activity/action/ActivitySignRecordAction.java
new file mode 100644
index 0000000..4a3b7a6
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/action/ActivitySignRecordAction.java
@@ -0,0 +1,22 @@
+package com.matrix.system.activity.action;
+
+import com.matrix.system.activity.service.ActivitySignRecordService;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @description 签到记录表
+ * @author yourName
+ * @date 2021-03-31 16:57
+ */
+@RestController
+@RequestMapping(value = "admin/activitySignRecord")
+public class ActivitySignRecordAction {
+
+	@Autowired
+	private ActivitySignRecordService activitySignRecordService;
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/action/ActivitySignWriteoffAction.java b/zq-erp/src/main/java/com/matrix/system/activity/action/ActivitySignWriteoffAction.java
new file mode 100644
index 0000000..7d5db67
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/action/ActivitySignWriteoffAction.java
@@ -0,0 +1,85 @@
+package com.matrix.system.activity.action;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.tools.StringUtils;
+import com.matrix.system.activity.dto.LogisticsSubmitDto;
+import com.matrix.system.activity.dto.SignWriteoffDto;
+import com.matrix.system.activity.dto.SignWriteoffListDto;
+import com.matrix.system.activity.dto.WriteoffCodeSubmitDto;
+import com.matrix.system.activity.service.ActivitySignWriteoffService;
+import com.matrix.system.activity.vo.SignWriteoffListVo;
+import com.matrix.system.hive.action.util.QueryUtil;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+/**
+ * @description 核销记录
+ * @author yourName
+ * @date 2021-04-08 14:25
+ */
+@RestController
+@RequestMapping(value = "admin/activitySignWriteoff")
+public class ActivitySignWriteoffAction {
+
+	@Autowired
+	private ActivitySignWriteoffService activitySignWriteoffService;
+	
+	/**
+	 * 核销记录
+	 */
+	@ApiOperation(value = "核销记录")
+	@ApiResponses({
+			@ApiResponse(code = 200, message = "OK",  response = SignWriteoffListVo.class)
+	})
+	@PostMapping(value = "/findSignWriteoffList")
+	public @ResponseBody
+	AjaxResult findSignWriteoffList(@RequestBody SignWriteoffListDto signWriteoffListDto) {
+		//设置用户公司ID
+		QueryUtil.setQueryLimitCom(signWriteoffListDto);
+		//排序
+		if(StringUtils.isBlank(signWriteoffListDto.getSort())){
+			signWriteoffListDto.setSort("create_time");
+			signWriteoffListDto.setOrder("desc");
+		}
+		Page<SignWriteoffListVo> page = new Page(signWriteoffListDto.getPageNum(), signWriteoffListDto.getPageSize());
+		IPage<SignWriteoffListVo> rows = activitySignWriteoffService.findSignWriteoffList(page,signWriteoffListDto);
+		AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal());
+		return result;
+	}
+	
+	/**
+     *中奖信息
+     */
+    @ApiOperation(value = "中奖信息")
+    @PostMapping(value = "/findSignWriteoff")
+    public @ResponseBody
+    AjaxResult findSignWriteoff(@RequestBody SignWriteoffDto signWriteoffDto) {
+    	return activitySignWriteoffService.findSignWriteoff(signWriteoffDto);
+    }
+    
+    /**
+     *核销验证
+     */
+    @ApiOperation(value = "核销验证")
+    @PostMapping(value = "/writeoffCodeSubmit")
+    public @ResponseBody
+    AjaxResult writeoffCodeSubmit(@RequestBody WriteoffCodeSubmitDto writeoffCodeSubmitDto) {
+    	return activitySignWriteoffService.writeoffCodeSubmit(writeoffCodeSubmitDto);
+    }
+
+	/**
+	 *物流发货
+	 */
+	@ApiOperation(value = "物流发货")
+	@PostMapping(value = "/logisticsSubmit")
+	public @ResponseBody
+	AjaxResult logisticsSubmit(@RequestBody LogisticsSubmitDto logisticsSubmitDto) {
+		return activitySignWriteoffService.logisticsSubmit(logisticsSubmitDto);
+	}
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/constant/ActivitySignConstant.java b/zq-erp/src/main/java/com/matrix/system/activity/constant/ActivitySignConstant.java
new file mode 100644
index 0000000..9b5c750
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/constant/ActivitySignConstant.java
@@ -0,0 +1,5 @@
+package com.matrix.system.activity.constant;
+
+public class ActivitySignConstant {
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/dao/ActivitySignAwardSetDao.java b/zq-erp/src/main/java/com/matrix/system/activity/dao/ActivitySignAwardSetDao.java
new file mode 100644
index 0000000..bff7cc7
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/dao/ActivitySignAwardSetDao.java
@@ -0,0 +1,20 @@
+package com.matrix.system.activity.dao;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.matrix.system.activity.entity.ActivitySignAwardSet;
+import com.matrix.system.shopXcx.api.vo.ActivitySignAwardSetVo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @description 奖品设置表
+ * @author yourName
+ * @date 2021-03-31 16:57
+ */
+public interface ActivitySignAwardSetDao extends BaseMapper<ActivitySignAwardSet>{
+
+	List<ActivitySignAwardSetVo> selectListByActIDAndCompanyId(@Param("actId")Long actId, @Param("companyId")Long companyId,@Param("awardState")int awardstateWork);
+
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/dao/ActivitySignReceiveRecordDao.java b/zq-erp/src/main/java/com/matrix/system/activity/dao/ActivitySignReceiveRecordDao.java
new file mode 100644
index 0000000..2c395a8
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/dao/ActivitySignReceiveRecordDao.java
@@ -0,0 +1,41 @@
+package com.matrix.system.activity.dao;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.matrix.system.activity.dto.CouponDto;
+import com.matrix.system.activity.dto.GoodsDto;
+import com.matrix.system.activity.dto.SignReceiveListDto;
+import com.matrix.system.activity.entity.ActivitySignReceiveRecord;
+import com.matrix.system.activity.vo.CouponVo;
+import com.matrix.system.activity.vo.GoodsVo;
+import com.matrix.system.activity.vo.SignReceiveListVo;
+import com.matrix.system.shopXcx.api.dto.SeeAwardTextDto;
+import com.matrix.system.shopXcx.api.dto.SignAwardDto;
+import com.matrix.system.shopXcx.api.vo.SeeAwardTextVo;
+import com.matrix.system.shopXcx.api.vo.SignAwardListVo;
+import com.matrix.system.shopXcx.vo.SalesOrderVo;
+
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @author yourName
+ * @date 2021-03-31 16:57
+ */
+public interface ActivitySignReceiveRecordDao extends BaseMapper<ActivitySignReceiveRecord>{
+
+	IPage<SignReceiveListVo> findSignReceiveList(Page<SignReceiveListVo> page, 
+			@Param("record")SignReceiveListDto signReceiveListDto);
+
+	IPage<CouponVo> selectCouponList(Page<CouponVo> page, @Param("record")CouponDto couponDto);
+
+	IPage<GoodsVo> selectGoodsList(Page<GoodsVo> page, @Param("record")GoodsDto goodsDto);
+
+	int getSignAwardReceiveCount(@Param("userId")Long userId, @Param("companyId")Long companyId);
+
+	IPage<SignAwardListVo> selectSignAwardList(Page<SalesOrderVo> page, @Param("record")SignAwardDto signAwardDto);
+
+	SeeAwardTextVo selectSeeAwardTextVOById(@Param("record")SeeAwardTextDto seeAwardTextDto);
+
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/dao/ActivitySignRecordDao.java b/zq-erp/src/main/java/com/matrix/system/activity/dao/ActivitySignRecordDao.java
new file mode 100644
index 0000000..5f13341
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/dao/ActivitySignRecordDao.java
@@ -0,0 +1,20 @@
+package com.matrix.system.activity.dao;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.matrix.system.activity.entity.ActivitySignRecord;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.Date;
+
+/**
+ * @description 签到记录表
+ * @author yourName
+ * @date 2021-03-31 16:57
+ */
+public interface ActivitySignRecordDao extends BaseMapper<ActivitySignRecord>{
+
+	ActivitySignRecord selectOneByActIdAndUserIdLikesignTime(@Param("actId")long actId,
+			@Param("userId")Long userId, @Param("format")Date format);
+
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/dao/ActivitySignWriteoffDao.java b/zq-erp/src/main/java/com/matrix/system/activity/dao/ActivitySignWriteoffDao.java
new file mode 100644
index 0000000..660ab82
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/dao/ActivitySignWriteoffDao.java
@@ -0,0 +1,28 @@
+package com.matrix.system.activity.dao;
+
+
+import com.matrix.system.shopXcx.bean.ShopDeliveryInfo;
+import org.apache.ibatis.annotations.Param;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.matrix.system.activity.dto.SignWriteoffListDto;
+import com.matrix.system.activity.entity.ActivitySignWriteoff;
+import com.matrix.system.activity.vo.SignWriteoffListVo;
+import com.matrix.system.activity.vo.ZjrVo;
+
+/**
+ * @description 核销记录
+ * @author yourName
+ * @date 2021-04-08 14:25
+ */
+public interface ActivitySignWriteoffDao extends BaseMapper<ActivitySignWriteoff>{
+
+	IPage<SignWriteoffListVo> findSignWriteoffList(Page<SignWriteoffListVo> page,
+												   @Param("record")SignWriteoffListDto signWriteoffListDto);
+
+	ZjrVo selectUsernameByUserId(@Param("userId")Long userId, @Param("receiveId")Long receiveId);
+
+    ShopDeliveryInfo selectShopDeliveryInfoByLogisticsId(@Param("logisticsId")Integer logisticsId);
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/dto/ActivitiesListDto.java b/zq-erp/src/main/java/com/matrix/system/activity/dto/ActivitiesListDto.java
new file mode 100644
index 0000000..011454f
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/dto/ActivitiesListDto.java
@@ -0,0 +1,22 @@
+package com.matrix.system.activity.dto;
+
+import com.matrix.core.pojo.BasePageQueryDto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "ActivitiesListDto", description = "查询参数")
+public class ActivitiesListDto extends BasePageQueryDto {
+
+	@ApiModelProperty(value ="活动名称")
+	private String hdmc;
+	
+	@ApiModelProperty(value ="活动状态")
+	private Integer hdzt;
+
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/dto/AddSignAwardSetDto.java b/zq-erp/src/main/java/com/matrix/system/activity/dto/AddSignAwardSetDto.java
new file mode 100644
index 0000000..ff857c6
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/dto/AddSignAwardSetDto.java
@@ -0,0 +1,28 @@
+package com.matrix.system.activity.dto;
+
+import com.matrix.system.activity.entity.ActivitySignAwardSet;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+@Data
+@ApiModel(value = "AddSignAwardSetDto", description = "查询参数")
+public class AddSignAwardSetDto {
+	
+	@ApiModelProperty(value ="活动名称")
+    private String actName;
+	@ApiModelProperty(value ="活动编码")
+	private String actCode;
+	@ApiModelProperty(value ="活动开始时间")
+	private Date beginTime;
+	@ApiModelProperty(value ="活动结束时间")
+	private Date endTime;
+	
+	private SignSetBasicJsonDto signSetBasicJsonDto;
+	
+	private List<ActivitySignAwardSet> activitySignAwardSets;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/dto/BeCloseDto.java b/zq-erp/src/main/java/com/matrix/system/activity/dto/BeCloseDto.java
new file mode 100644
index 0000000..ccc0919
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/dto/BeCloseDto.java
@@ -0,0 +1,17 @@
+package com.matrix.system.activity.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "BeCloseDto", description = "参数")
+public class BeCloseDto {
+	
+	@ApiModelProperty(value ="活动主表ID")
+	private Long actId;
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/dto/BeReadyDto.java b/zq-erp/src/main/java/com/matrix/system/activity/dto/BeReadyDto.java
new file mode 100644
index 0000000..03b3586
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/dto/BeReadyDto.java
@@ -0,0 +1,17 @@
+package com.matrix.system.activity.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "BeReadyDto", description = "参数")
+public class BeReadyDto {
+	
+	@ApiModelProperty(value ="活动主表ID")
+	private Long actId;
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/dto/CouponDto.java b/zq-erp/src/main/java/com/matrix/system/activity/dto/CouponDto.java
new file mode 100644
index 0000000..b6a9a40
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/dto/CouponDto.java
@@ -0,0 +1,19 @@
+package com.matrix.system.activity.dto;
+
+import com.matrix.core.pojo.BasePageQueryDto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "CouponDto", description = "查询参数")
+public class CouponDto extends BasePageQueryDto {
+
+	@ApiModelProperty(value ="活动名称")
+	private String yhjmc;
+
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/dto/DelRowDto.java b/zq-erp/src/main/java/com/matrix/system/activity/dto/DelRowDto.java
new file mode 100644
index 0000000..6c13eef
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/dto/DelRowDto.java
@@ -0,0 +1,17 @@
+package com.matrix.system.activity.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "DelRowDto", description = "参数")
+public class DelRowDto {
+	
+	@ApiModelProperty(value ="活动主表ID")
+	private Long actId;
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/dto/GoodsDto.java b/zq-erp/src/main/java/com/matrix/system/activity/dto/GoodsDto.java
new file mode 100644
index 0000000..dc72283
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/dto/GoodsDto.java
@@ -0,0 +1,19 @@
+package com.matrix.system.activity.dto;
+
+import com.matrix.core.pojo.BasePageQueryDto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "GoodsDto", description = "查询参数")
+public class GoodsDto extends BasePageQueryDto {
+
+	@ApiModelProperty(value ="商品名称")
+	private String cpmc;
+
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/dto/LogisticsSubmitDto.java b/zq-erp/src/main/java/com/matrix/system/activity/dto/LogisticsSubmitDto.java
new file mode 100644
index 0000000..47d3db1
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/dto/LogisticsSubmitDto.java
@@ -0,0 +1,28 @@
+package com.matrix.system.activity.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "LogisticsSubmitDto", description = "查询参数")
+public class LogisticsSubmitDto {
+	
+	@ApiModelProperty(value ="核销ID")
+	private long writeoffId;
+	
+	@ApiModelProperty(value ="收货人")
+	private String shr;
+	@ApiModelProperty(value ="联系电话")
+	private String lxdh;
+	@ApiModelProperty(value ="收货地址")
+	private String shdz;
+	@ApiModelProperty(value ="快递公司Code")
+	private String kdgs;
+	@ApiModelProperty(value ="快递单号")
+	private String kddh;
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/dto/SignForUpdateDto.java b/zq-erp/src/main/java/com/matrix/system/activity/dto/SignForUpdateDto.java
new file mode 100644
index 0000000..ac9680d
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/dto/SignForUpdateDto.java
@@ -0,0 +1,17 @@
+package com.matrix.system.activity.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "SignForUpdateDto", description = "参数")
+public class SignForUpdateDto {
+	
+	@ApiModelProperty(value ="活动主表ID")
+	private Long actId;
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/dto/SignReceiveListDto.java b/zq-erp/src/main/java/com/matrix/system/activity/dto/SignReceiveListDto.java
new file mode 100644
index 0000000..af58abd
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/dto/SignReceiveListDto.java
@@ -0,0 +1,29 @@
+package com.matrix.system.activity.dto;
+
+import com.matrix.core.pojo.BasePageQueryDto;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+@ApiModel(value = "SignReceiveListDto", description = "参数")
+public class SignReceiveListDto extends BasePageQueryDto {
+	
+	@ApiModelProperty(value ="活动编码")
+	private String yhmc;
+	
+	@ApiModelProperty(value ="签到开始时间")
+	private Date startTime;
+	
+	@ApiModelProperty(value ="签到结束时间")
+	private Date endTime;
+	
+	@ApiModelProperty(value ="活动主表ID")
+	private Long actId;
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/dto/SignSetBasicJsonDto.java b/zq-erp/src/main/java/com/matrix/system/activity/dto/SignSetBasicJsonDto.java
new file mode 100644
index 0000000..4d5d4c5
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/dto/SignSetBasicJsonDto.java
@@ -0,0 +1,33 @@
+package com.matrix.system.activity.dto;
+
+import java.util.Date;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "SignSetBasicJsonDto", description = "查询参数")
+public class SignSetBasicJsonDto {
+	
+	@ApiModelProperty(value ="标题图片")
+	private String imageUrlTitle;
+	@ApiModelProperty(value ="头部图片")
+	private String imageUrlHead;
+	@ApiModelProperty(value ="按钮图片")
+	private String imageUrlButton;
+	@ApiModelProperty(value ="状态图片")
+	private String imageUrlState;
+	
+	@ApiModelProperty(value ="规则内容")
+	private String ruleExplain;
+	@ApiModelProperty(value ="字体颜色")
+	private String typographyColor;
+	@ApiModelProperty(value ="背景颜色")
+	private String backgroundColor;
+	@ApiModelProperty(value ="字体大小")
+	private Integer typographyNum;
+	@ApiModelProperty(value ="字体透明度")
+	private Integer typographyLight;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/dto/SignWriteoffDto.java b/zq-erp/src/main/java/com/matrix/system/activity/dto/SignWriteoffDto.java
new file mode 100644
index 0000000..3c7552a
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/dto/SignWriteoffDto.java
@@ -0,0 +1,17 @@
+package com.matrix.system.activity.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "SignWriteoffDto", description = "查询参数")
+public class SignWriteoffDto {
+	
+	@ApiModelProperty(value ="核销ID")
+	private long writeoffId;
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/dto/SignWriteoffListDto.java b/zq-erp/src/main/java/com/matrix/system/activity/dto/SignWriteoffListDto.java
new file mode 100644
index 0000000..43b04b2
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/dto/SignWriteoffListDto.java
@@ -0,0 +1,21 @@
+package com.matrix.system.activity.dto;
+
+import com.matrix.core.pojo.BasePageQueryDto;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "SignWriteoffListDto", description = "查询参数")
+public class SignWriteoffListDto extends BasePageQueryDto {
+	
+	@ApiModelProperty(value ="中奖者姓名")
+	private String zjzxm;
+
+	@ApiModelProperty(value ="活动名称/编码")
+	private String hdmcbm;
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+	
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/dto/UpdateSignAwardSetDto.java b/zq-erp/src/main/java/com/matrix/system/activity/dto/UpdateSignAwardSetDto.java
new file mode 100644
index 0000000..20134c2
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/dto/UpdateSignAwardSetDto.java
@@ -0,0 +1,34 @@
+package com.matrix.system.activity.dto;
+
+import com.matrix.system.activity.entity.ActivitySignAwardSet;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+@Data
+@ApiModel(value = "UpdateSignAwardSetDto", description = "查询参数")
+public class UpdateSignAwardSetDto {
+	
+	@ApiModelProperty(value ="活动名称")
+    private String actName;
+	@ApiModelProperty(value ="活动编码")
+	private String actCode;
+	@ApiModelProperty(value ="活动开始时间")
+	private Date beginTime;
+	@ApiModelProperty(value ="活动结束时间")
+	private Date endTime;
+	
+	private SignSetBasicJsonDto signSetBasicJsonDto;
+	
+	private List<ActivitySignAwardSet> activitySignAwardSets;
+	
+	@ApiModelProperty(value ="活动主表ID")
+	private Long actMainId;
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/dto/WriteoffCodeSubmitDto.java b/zq-erp/src/main/java/com/matrix/system/activity/dto/WriteoffCodeSubmitDto.java
new file mode 100644
index 0000000..972be8a
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/dto/WriteoffCodeSubmitDto.java
@@ -0,0 +1,20 @@
+package com.matrix.system.activity.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "WriteoffCodeSubmitDto", description = "查询参数")
+public class WriteoffCodeSubmitDto {
+	
+	@ApiModelProperty(value ="核销ID")
+	private long writeoffId;
+	
+	@ApiModelProperty(value ="兑奖码")
+	private String writeOffCode;
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/entity/ActivitySignAwardSet.java b/zq-erp/src/main/java/com/matrix/system/activity/entity/ActivitySignAwardSet.java
new file mode 100644
index 0000000..985978f
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/entity/ActivitySignAwardSet.java
@@ -0,0 +1,197 @@
+package com.matrix.system.activity.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.matrix.core.anotations.Extend;
+import com.matrix.system.score.entity.BaseEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @description 奖品设置表
+ * @author yourName
+ * @date 2021-03-31 16:57
+ */
+@Data
+@TableName("activity_sign_award_set")
+public class ActivitySignAwardSet  extends BaseEntity{
+	@Extend
+	private static final long serialVersionUID = 1L; 
+
+	
+
+
+	
+	/**
+	 * 奖项类型(1:自定义产品2:积分3:优惠券4:店铺商品)
+	 */
+
+	@ApiModelProperty(value ="奖项类型(1:自定义产品2:积分3:优惠券4:店铺商品)")
+	private int  awardType;
+
+
+	public static final int AWARDTYPE_CUSTOMIZE = 1;
+	public static final int AWARDTYPE_SCORE = 2;
+	public static final int AWARDTYPE_COUPON = 3;
+	public static final int AWARDTYPE_GOODS = 4;
+	
+	/**
+	 * 奖项规则(1:每日奖励(默认)2:累计签到天数)
+	 */
+
+
+	@ApiModelProperty(value ="奖项规则(1:每日奖励(默认)2:累计签到天数)")
+	private int  awardRule;
+
+	public static final int AWARDRULE_NORMAL = 1;
+	public static final int AWARDRULE_CUMULATIVEDAY = 2;
+	
+	/**
+	 * 签到累计天数
+	 */
+
+	@ApiModelProperty(value ="签到累计天数")
+	private int  cumulativeDay;
+	
+	/**
+	 * 奖项名称
+	 */
+
+	@ApiModelProperty(value ="奖项名称")
+	private String  awardName;
+	
+	/**
+	 * 图片介绍
+	 */
+
+	@ApiModelProperty(value ="图片介绍")
+	private String  introduceImg;
+	
+	/**
+	 * 文字介绍
+	 */
+
+
+	@ApiModelProperty(value ="文字介绍")
+	private String  introduceTip;
+	
+	/**
+	 * 奖项库存数量
+	 */
+
+
+	@ApiModelProperty(value ="奖项库存数量")
+	private int  awardInventoryCnt;
+	
+	/**
+	 * 已派发数量
+	 */
+
+
+	@ApiModelProperty(value ="已派发数量")
+	private int  awardDistributeCnt;
+	
+	/**
+	 * 兑奖方式(1:线下兑换2:物流配送3:客服兑换)
+	 */
+
+
+	@ApiModelProperty(value ="兑奖方式(1:线下兑换2:物流配送3:客服兑换)")
+	private int  awardWay;
+	public static final int AWARDWAY_ONE = 1;
+	public static final int AWARDWAY_TWO = 2;
+	public static final int AWARDWAY_THREE = 3;
+	
+	/**
+	 * 奖品是否有效(1:有效 2:无效)
+	 */
+	@ApiModelProperty(value ="奖品是否有效(1:有效 2:无效)")
+	private int  awardState;
+	public static final int AWARDSTATE_WORK = 1;
+	public static final int AWARDSTATE_UNWORK = 2;
+	
+	/**
+	 * 操作提示
+	 */
+
+	@ApiModelProperty(value ="操作提示")
+	private String  operationTip;
+	
+	/**
+	 * 兑奖地址
+	 */
+
+	@ApiModelProperty(value ="兑奖地址")
+	private String  prizeAddress;
+	
+	/**
+	 * 兑奖期限开始日期
+	 */
+
+
+	@ApiModelProperty(value ="兑奖期限开始日期")
+	private Date  prizeStartTime;
+	
+	/**
+	 * 兑奖期限结束日期
+	 */
+
+	@ApiModelProperty(value ="兑奖期限结束日期")
+	private Date  prizeEndTime;
+	
+	/**
+	 * 客服微信
+	 */
+
+	@ApiModelProperty(value ="客服微信")
+	private String  wechatImg;
+	
+	/**
+	 * 积分数量
+	 */
+
+
+	@ApiModelProperty(value ="积分数量")
+	private int  scoreCnt;
+	
+	/**
+	 * 优惠券ID
+	 */
+
+	@ApiModelProperty(value ="优惠券")
+	private String  couponName;
+
+	@ApiModelProperty(value ="优惠券ID")
+	private String  couponId;
+	
+	/**
+	 * 商品ID
+	 */
+
+	@ApiModelProperty(value ="商品")
+	private String  goodsName;
+
+	@ApiModelProperty(value ="商品ID")
+	private String  goodsId;
+	
+	/**
+	 * 活动主表ID
+	 */
+
+
+	@ApiModelProperty(value ="活动主表ID")
+	private Long  activityId;
+	
+	/**
+	 * 公司ID
+	 */
+
+
+	@ApiModelProperty(value ="公司ID")
+	private Long  companyId;
+
+
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/entity/ActivitySignReceiveRecord.java b/zq-erp/src/main/java/com/matrix/system/activity/entity/ActivitySignReceiveRecord.java
new file mode 100644
index 0000000..f59cb27
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/entity/ActivitySignReceiveRecord.java
@@ -0,0 +1,100 @@
+package com.matrix.system.activity.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.matrix.core.anotations.Extend;
+import com.matrix.system.score.entity.BaseEntity;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @description 领
+ * @author yourName
+ * @date 2021-03-31 16:57
+ */
+@Data
+@TableName("activity_sign_receive_record")
+public class ActivitySignReceiveRecord  extends BaseEntity{
+	@Extend
+	private static final long serialVersionUID = 1L; 
+
+	
+
+
+	
+	/**
+	 * userId
+	 */
+
+
+	private Long  userId;
+	
+	/**
+	 * 领取时间
+	 */
+
+
+	private Date  receiveTime;
+	
+	/**
+	 * 备注
+	 */
+
+
+	private String  remark;
+	
+	/**
+	 * 奖品设置表ID
+	 */
+
+
+	private Long  awardId;
+	
+	/**
+	 * 是否已领取(1:待领取2:已领取)
+	 */
+
+
+	private Integer  state;
+
+	public static final int STATE_ING = 1;
+	public static final int STATE_DONE = 2;
+	
+	/**
+	 * 核销码
+	 */
+
+
+	private String  writeOffCode;
+	
+	/**
+	 * 活动主表ID
+	 */
+
+
+	private Long  activityId;
+	
+	/**
+	 * 公司ID
+	 */
+
+
+	private Long  companyId;
+
+	/**
+	 * 收货人
+	 */
+	private String  consignee;
+	/**
+	 * 联系电话
+	 */
+	private String  consigneePhone;
+	/**
+	 * 收货地址
+	 */
+	private String  consigneeAddress;
+
+
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/entity/ActivitySignRecord.java b/zq-erp/src/main/java/com/matrix/system/activity/entity/ActivitySignRecord.java
new file mode 100644
index 0000000..437d938
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/entity/ActivitySignRecord.java
@@ -0,0 +1,63 @@
+package com.matrix.system.activity.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.matrix.core.anotations.Extend;
+import com.matrix.system.score.entity.BaseEntity;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @description 签到记录表
+ * @author yourName
+ * @date 2021-03-31 16:57
+ */
+@Data
+@TableName("activity_sign_record")
+public class ActivitySignRecord  extends BaseEntity{
+	@Extend
+	private static final long serialVersionUID = 1L; 
+
+	
+
+
+	
+	/**
+	 * userId
+	 */
+
+
+	private Long  userId;
+	
+	/**
+	 * 签到时间
+	 */
+
+
+	private Date  signTime;
+	
+	/**
+	 * 累计签到天数
+	 */
+
+
+	private Integer  cumulativeDay;
+	
+	/**
+	 * 活动主表ID
+	 */
+
+
+	private Long  activityId;
+	
+	/**
+	 * 公司ID
+	 */
+
+
+	private Long  companyId;
+
+
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/entity/ActivitySignWriteoff.java b/zq-erp/src/main/java/com/matrix/system/activity/entity/ActivitySignWriteoff.java
new file mode 100644
index 0000000..febff5f
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/entity/ActivitySignWriteoff.java
@@ -0,0 +1,119 @@
+package com.matrix.system.activity.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.matrix.core.anotations.Extend;
+import com.matrix.system.score.entity.BaseEntity;
+import lombok.Data;
+
+import java.util.Date;
+
+
+/**
+ * @description 核销记录
+ * @author yourName
+ * @date 2021-04-08 14:25
+ */
+@Data
+@TableName("activity_sign_writeoff")
+public class ActivitySignWriteoff  extends BaseEntity{
+	@Extend
+	private static final long serialVersionUID = 1L; 
+
+	
+
+
+	
+	/**
+	 * 核销时间
+	 */
+
+
+	private Date  writeoffTime;
+	
+	/**
+	 * 核销员
+	 */
+
+
+	private String  writeoffUser;
+	
+	/**
+	 * 兑奖码
+	 */
+
+
+	private String  writeoffCode;
+	
+	/**
+	 * 活动ID
+	 */
+
+
+	private Long  actId;
+	
+	/**
+	 * 奖品ID
+	 */
+
+
+	private Long  awardId;
+	
+	/**
+	 * 中奖时间
+	 */
+
+
+	private Date  winTime;
+	
+	/**
+	 * 状态(1:待兑换 2:待发货  3:已兑换  )
+	 */
+	private Integer  state;
+	public static final int STATE_ONE = 1;
+	public static final int STATE_TWO = 2;
+	public static final int STATE_THREE = 3;
+	
+	/**
+	 * 中奖者ID
+	 */
+
+
+	private Long  userId;
+	
+	/**
+	 * 物流ID
+	 */
+
+
+	private Integer  logisticsId;
+	
+	/**
+	 * 中奖记录ID
+	 */
+
+
+	private Long  receiveId;
+	
+	/**
+	 * 公司ID
+	 */
+
+
+	private Long  companyId;
+	
+	/**
+	 * 店铺ID
+	 */
+
+
+	private Long  shopId;
+	
+	/**
+	 * 核销员ID
+	 */
+
+
+	private Long  writeoffUserid;
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/service/ActivitySignAwardSetService.java b/zq-erp/src/main/java/com/matrix/system/activity/service/ActivitySignAwardSetService.java
new file mode 100644
index 0000000..aed8a95
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/service/ActivitySignAwardSetService.java
@@ -0,0 +1,271 @@
+package com.matrix.system.activity.service;
+
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.matrix.core.constance.MatrixConstance;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.tools.WebUtil;
+import com.matrix.system.activity.dao.ActivitySignAwardSetDao;
+import com.matrix.system.activity.dao.ActivitySignReceiveRecordDao;
+import com.matrix.system.activity.dto.*;
+import com.matrix.system.activity.entity.ActivitySignAwardSet;
+import com.matrix.system.activity.vo.ActivitiesListVo;
+import com.matrix.system.activity.vo.AddSignAwardSetVo;
+import com.matrix.system.activity.vo.CouponVo;
+import com.matrix.system.activity.vo.GoodsVo;
+import com.matrix.system.activity.vo.SignReceiveListVo;
+import com.matrix.system.activity.vo.SignSetBasicJsonVo;
+import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.hive.action.util.QueryUtil;
+import com.matrix.system.shopXcx.bean.ShopActivities;
+import com.matrix.system.shopXcx.dao.ShopActivitiesDao;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @description 奖品设置表
+ * @author yourName
+ * @date 2021-03-31 16:57
+ */
+@Service
+public class ActivitySignAwardSetService  extends ServiceImpl<ActivitySignAwardSetDao, ActivitySignAwardSet>{
+	
+	@Autowired
+    private ShopActivitiesDao shopActivitiesDao;
+	@Autowired
+	private ActivitySignAwardSetDao activitySignAwardSetDao;
+	@Autowired
+	private ActivitySignReceiveRecordDao activitySignReceiveRecordDao;
+
+	@Transactional
+	public AjaxResult activitySignAwardSetService(AddSignAwardSetDto addSignAwardSetDto) {
+		//获取当前登录人员信息
+        SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+        Long companyId = user.getCompanyId();
+        /**
+         * todo签到活动的唯一性
+         */
+        
+        //新增活动主表信息
+        ShopActivities shopActivities = new ShopActivities();
+        shopActivities.setActName(addSignAwardSetDto.getActName());
+        shopActivities.setActCode(addSignAwardSetDto.getActCode());
+        shopActivities.setIsStart(ShopActivities.ACTIVITIES_STATUS_CLOSE);
+        shopActivities.setActType(ShopActivities.ACTIVITIES_TYPE_SIGN);
+        shopActivities.setActStatus(ShopActivities.ACTSTATUS_STATUS_RELEASE);
+        shopActivities.setActBeginTime(addSignAwardSetDto.getBeginTime());
+        shopActivities.setActEndTime(addSignAwardSetDto.getEndTime());
+        shopActivities.setCompanyId(companyId);
+		shopActivities.setCreateBy(user.getSuName());
+		shopActivities.setUpdateBy(user.getSuName());
+        //将基本信息转换成JSON字符串存储到活动主表的act_content字段
+        SignSetBasicJsonDto signSetBasicJsonDto = addSignAwardSetDto.getSignSetBasicJsonDto();
+		String json=JSON.toJSONString(signSetBasicJsonDto);
+		shopActivities.setActContent(json);
+		int insert = shopActivitiesDao.insert(shopActivities);
+		if(insert > 0){
+			//新增活动奖品信息
+			List<ActivitySignAwardSet> activitySignAwardSets = addSignAwardSetDto.getActivitySignAwardSets();
+			if(CollUtil.isNotEmpty(activitySignAwardSets)) {
+				for(ActivitySignAwardSet activitySignAwardSet : activitySignAwardSets) {
+					activitySignAwardSet.setCreateBy(user.getSuName());
+					activitySignAwardSet.setCreateTime(new Date());
+					activitySignAwardSet.setUpdateTime(new Date());
+					activitySignAwardSet.setUpdateBy(user.getSuName());
+					activitySignAwardSet.setCompanyId(companyId);
+					activitySignAwardSet.setActivityId(shopActivities.getId());
+					activitySignAwardSet.setAwardState(ActivitySignAwardSet.AWARDSTATE_WORK);
+					activitySignAwardSetDao.insert(activitySignAwardSet);
+				}
+			}
+		}else{
+			return new AjaxResult(AjaxResult.STATUS_FAIL, "保存失败");
+		}
+        return new AjaxResult(AjaxResult.STATUS_SUCCESS, "保存成功");
+	}
+
+	public IPage<ActivitiesListVo> findActivitiesList(Page<ActivitiesListVo> page,
+			ActivitiesListDto activitiesListDto) {
+		return shopActivitiesDao.findActivitiesList(page,activitiesListDto);
+	}
+
+	@Transactional
+	public AjaxResult beReady(BeReadyDto beReadyDto) {
+		//设置用户公司ID
+        QueryUtil.setQueryLimitCom(beReadyDto);
+        Long actId = beReadyDto.getActId();
+        ShopActivities shopActivity = shopActivitiesDao.selectById(actId);
+        if(ObjectUtil.isEmpty(shopActivity)) {
+        	return AjaxResult.buildFailInstance("网络不通畅,请刷新页面");
+        }
+        /**
+         * 未发布状态即使达到活动时间也不进入进行中状态
+         */
+        //未发布状态点击发布,状态变成未开始,且是开启状态
+        shopActivity.setActStatus(ShopActivities.ACTSTATUS_STATUS_READY);
+        shopActivity.setIsStart(ShopActivities.ACTIVITIES_STATUS_OPEN);
+        shopActivitiesDao.updateByModel(shopActivity);
+		return AjaxResult.buildSuccessInstance("操作成功");
+	}
+
+	public AjaxResult delRow(DelRowDto delRowDto) {
+		//设置用户公司ID
+        QueryUtil.setQueryLimitCom(delRowDto);
+        Long actId = delRowDto.getActId();
+        ShopActivities shopActivity = shopActivitiesDao.selectById(actId);
+        if(ObjectUtil.isEmpty(shopActivity)) {
+        	return AjaxResult.buildFailInstance("网络不通畅,请刷新页面");
+        }
+        /**
+         * 删除状态更新状态为已删除,只能查看活动统计
+         */
+        shopActivity.setActStatus(ShopActivities.ACTSTATUS_STATUS_DEL);
+        shopActivity.setIsStart(ShopActivities.ACTIVITIES_STATUS_CLOSE);
+        shopActivitiesDao.updateByModel(shopActivity);
+		return AjaxResult.buildSuccessInstance("操作成功");
+	}
+
+	public AjaxResult beClose(BeCloseDto beCloseDto) {
+		//设置用户公司ID
+        QueryUtil.setQueryLimitCom(beCloseDto);
+        Long actId = beCloseDto.getActId();
+        ShopActivities shopActivity = shopActivitiesDao.selectById(actId);
+        if(ObjectUtil.isEmpty(shopActivity)) {
+        	return AjaxResult.buildFailInstance("网络不通畅,请刷新页面");
+        }
+        /**
+         * 关闭状态
+         */
+        shopActivity.setActStatus(ShopActivities.ACTSTATUS_STATUS_END);
+        shopActivity.setIsStart(ShopActivities.ACTIVITIES_STATUS_CLOSE);
+        shopActivitiesDao.updateByModel(shopActivity);
+		return AjaxResult.buildSuccessInstance("操作成功");
+	}
+
+	public IPage<SignReceiveListVo> findSignReceiveList(Page<SignReceiveListVo> page,
+			SignReceiveListDto signReceiveListDto) {
+		return activitySignReceiveRecordDao.findSignReceiveList(page,signReceiveListDto);
+	}
+
+	public AjaxResult findSignForUpdate(SignForUpdateDto signForUpdateDto) {
+		//设置用户公司ID
+        QueryUtil.setQueryLimitCom(signForUpdateDto);
+        Long actId = signForUpdateDto.getActId();
+        AjaxResult result= AjaxResult.buildSuccessInstance("查询成功");
+        //获取对应的活动主表信息和对应的奖品设置信息
+        AddSignAwardSetVo addSignAwardSetVo = new AddSignAwardSetVo();
+        ShopActivities shopActivity = shopActivitiesDao.selectById(actId);
+        if(ObjectUtil.isNotEmpty(shopActivity)) {
+        	addSignAwardSetVo.setId(actId);
+        	addSignAwardSetVo.setActName(shopActivity.getActName());
+        	addSignAwardSetVo.setActCode(shopActivity.getActCode());
+        	addSignAwardSetVo.setBeginTime(shopActivity.getActBeginTime());
+        	addSignAwardSetVo.setEndTime(shopActivity.getActEndTime());
+        	
+        	String actContent = shopActivity.getActContent();
+        	SignSetBasicJsonVo signSetBasicJsonVo = JSON.parseObject(actContent, SignSetBasicJsonVo.class);
+        	addSignAwardSetVo.setSignSetBasicJsonDto(signSetBasicJsonVo);
+        	
+        	Map<String, Object> columnMap = new HashMap<String, Object>();
+        	columnMap.put("activity_id", actId);
+        	columnMap.put("company_id", signForUpdateDto.getCompanyId());
+			List<ActivitySignAwardSet> activitySignAwardSets = activitySignAwardSetDao.selectByMap(columnMap);
+			addSignAwardSetVo.setActivitySignAwardSets(activitySignAwardSets);
+        }
+        result.putInMap("addSignAwardSetVo", addSignAwardSetVo);
+        return result;
+	}
+
+	@Transactional
+	public AjaxResult updateSignAwardSet(UpdateSignAwardSetDto updateSignAwardSetDto) {
+		//获取当前登录人员信息
+        QueryUtil.setQueryLimitCom(updateSignAwardSetDto);
+        SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+        Long actId = updateSignAwardSetDto.getActMainId();
+        Long companyId = user.getCompanyId();
+        ShopActivities shopActivity = shopActivitiesDao.selectById(actId);
+        //更新活动主表信息
+        shopActivity.setActName(updateSignAwardSetDto.getActName());
+        shopActivity.setActCode(updateSignAwardSetDto.getActCode());
+        shopActivity.setActBeginTime(updateSignAwardSetDto.getBeginTime());
+        shopActivity.setActEndTime(updateSignAwardSetDto.getEndTime());
+        shopActivity.setCompanyId(companyId);
+        shopActivity.setCreateBy(user.getSuName());
+        shopActivity.setUpdateBy(user.getSuName());
+        //将基本信息转换成JSON字符串存储到活动主表的act_content字段
+        SignSetBasicJsonDto signSetBasicJsonDto = updateSignAwardSetDto.getSignSetBasicJsonDto();
+		String json=JSON.toJSONString(signSetBasicJsonDto);
+		shopActivity.setActContent(json);
+		shopActivitiesDao.updateByModel(shopActivity);
+		/**
+		 * 比较两个奖品名单,多的新增,减少的更新为已失效,不变的更新
+		 */
+		//原有的奖品
+		ArrayList<Long> arrayListOld = new ArrayList<>();
+		Map<String, Object> columnMap = new HashMap<String, Object>();
+    	columnMap.put("activity_id", actId);
+    	columnMap.put("company_id", updateSignAwardSetDto.getCompanyId());
+		List<ActivitySignAwardSet> activitySignAwardSetOld = activitySignAwardSetDao.selectByMap(columnMap);
+		if(CollUtil.isNotEmpty(activitySignAwardSetOld)) {
+			for(ActivitySignAwardSet activitySignAwardSetUpdate : activitySignAwardSetOld) {
+				Long actSubid = activitySignAwardSetUpdate.getId();
+				arrayListOld.add(actSubid);
+			}
+		}
+		//修改后的奖品
+		List<ActivitySignAwardSet> activitySignAwardSetsUpdate = updateSignAwardSetDto.getActivitySignAwardSets();
+		ArrayList<Long> arrayListUpdate = new ArrayList<>();
+		if(CollUtil.isNotEmpty(activitySignAwardSetsUpdate)) {
+			for(ActivitySignAwardSet activitySignAwardSetUpdate : activitySignAwardSetsUpdate) {
+				Long actSubid = activitySignAwardSetUpdate.getId();
+				//如果ID为空则新增,不为空则修改
+				if(ObjectUtil.isEmpty(actSubid)) {
+					activitySignAwardSetUpdate.setCreateBy(user.getSuName());
+					activitySignAwardSetUpdate.setCreateTime(new Date());
+					activitySignAwardSetUpdate.setUpdateTime(new Date());
+					activitySignAwardSetUpdate.setUpdateBy(user.getSuName());
+					activitySignAwardSetUpdate.setCompanyId(companyId);
+					activitySignAwardSetUpdate.setActivityId(actId);
+					activitySignAwardSetDao.insert(activitySignAwardSetUpdate);
+				}else {
+					activitySignAwardSetDao.updateById(activitySignAwardSetUpdate);
+					arrayListUpdate.add(actSubid);
+				}
+			}
+		}
+		//比较获取原来的比现在多出来的奖品,修改状态为失效
+		boolean removeAll = arrayListOld.removeAll(arrayListUpdate);
+		if(removeAll && CollUtil.isNotEmpty(arrayListOld)) {
+			for(long id : arrayListOld) {
+				ActivitySignAwardSet activitySignAwardSetDel = activitySignAwardSetDao.selectById(id);
+				activitySignAwardSetDel.setAwardState(ActivitySignAwardSet.AWARDSTATE_UNWORK);
+				activitySignAwardSetDao.updateById(activitySignAwardSetDel);
+			}
+		}
+        return new AjaxResult(AjaxResult.STATUS_SUCCESS, "保存成功");
+	}
+
+	public IPage<CouponVo> selectCouponList(Page<CouponVo> page, CouponDto couponDto) {
+		return activitySignReceiveRecordDao.selectCouponList(page,couponDto);
+	}
+
+	public IPage<GoodsVo> selectGoodsList(Page<GoodsVo> page, GoodsDto goodsDto) {
+		return activitySignReceiveRecordDao.selectGoodsList(page,goodsDto);
+	}
+
+
+
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/service/ActivitySignReceiveRecordService.java b/zq-erp/src/main/java/com/matrix/system/activity/service/ActivitySignReceiveRecordService.java
new file mode 100644
index 0000000..cb5935c
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/service/ActivitySignReceiveRecordService.java
@@ -0,0 +1,22 @@
+package com.matrix.system.activity.service;
+
+
+import org.springframework.stereotype.Service;
+
+import com.matrix.system.activity.dao.ActivitySignReceiveRecordDao;
+import com.matrix.system.activity.entity.ActivitySignReceiveRecord;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @description 领
+ * @author yourName
+ * @date 2021-03-31 16:57
+ */
+@Service
+public class ActivitySignReceiveRecordService  extends ServiceImpl<ActivitySignReceiveRecordDao, ActivitySignReceiveRecord>{
+
+
+
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/service/ActivitySignRecordService.java b/zq-erp/src/main/java/com/matrix/system/activity/service/ActivitySignRecordService.java
new file mode 100644
index 0000000..70c96b1
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/service/ActivitySignRecordService.java
@@ -0,0 +1,22 @@
+package com.matrix.system.activity.service;
+
+
+import org.springframework.stereotype.Service;
+
+import com.matrix.system.activity.dao.ActivitySignRecordDao;
+import com.matrix.system.activity.entity.ActivitySignRecord;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @description 签到记录表
+ * @author yourName
+ * @date 2021-03-31 16:57
+ */
+@Service
+public class ActivitySignRecordService  extends ServiceImpl<ActivitySignRecordDao, ActivitySignRecord>{
+
+
+
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/service/ActivitySignWriteoffService.java b/zq-erp/src/main/java/com/matrix/system/activity/service/ActivitySignWriteoffService.java
new file mode 100644
index 0000000..e784058
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/service/ActivitySignWriteoffService.java
@@ -0,0 +1,294 @@
+package com.matrix.system.activity.service;
+
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.matrix.core.constance.MatrixConstance;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.tools.WebUtil;
+import com.matrix.system.activity.dao.ActivitySignAwardSetDao;
+import com.matrix.system.activity.dao.ActivitySignReceiveRecordDao;
+import com.matrix.system.activity.dao.ActivitySignWriteoffDao;
+import com.matrix.system.activity.dto.LogisticsSubmitDto;
+import com.matrix.system.activity.dto.SignWriteoffDto;
+import com.matrix.system.activity.dto.SignWriteoffListDto;
+import com.matrix.system.activity.dto.WriteoffCodeSubmitDto;
+import com.matrix.system.activity.entity.ActivitySignAwardSet;
+import com.matrix.system.activity.entity.ActivitySignReceiveRecord;
+import com.matrix.system.activity.entity.ActivitySignWriteoff;
+import com.matrix.system.activity.vo.LogisticsVo;
+import com.matrix.system.activity.vo.SignWriteoffListVo;
+import com.matrix.system.activity.vo.SignWriteoffVo;
+import com.matrix.system.activity.vo.ZjrVo;
+import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.common.bean.SystemDictionary;
+import com.matrix.system.common.dao.SystemDictionaryDao;
+import com.matrix.system.hive.action.util.QueryUtil;
+import com.matrix.system.hive.dao.SysVipInfoDao;
+import com.matrix.system.shopXcx.bean.ShopActivities;
+import com.matrix.system.shopXcx.bean.ShopDeliveryInfo;
+import com.matrix.system.shopXcx.bean.ShopLogisticsInfo;
+import com.matrix.system.shopXcx.dao.ShopActivitiesDao;
+import com.matrix.system.shopXcx.dao.ShopDeliveryInfoDao;
+import com.matrix.system.shopXcx.dao.ShopLogisticsInfoDao;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @description 核销记录
+ * @author yourName
+ * @date 2021-04-08 14:25
+ */
+@Service
+public class ActivitySignWriteoffService  extends ServiceImpl<ActivitySignWriteoffDao, ActivitySignWriteoff>{
+	
+	@Autowired
+	ActivitySignWriteoffDao activitySignWriteoffDao;
+	@Autowired
+    ShopActivitiesDao shopActivitiesDao;
+	@Autowired
+	ActivitySignAwardSetDao activitySignAwardSetDao;
+	@Autowired
+	ActivitySignReceiveRecordDao activitySignReceiveRecordDao;
+	@Autowired
+	SysVipInfoDao sysVipInfoDao;
+	@Autowired
+	SystemDictionaryDao systemDictionaryDao;
+	@Autowired
+	ShopDeliveryInfoDao shopDeliveryInfoDao;
+	@Autowired
+	ShopLogisticsInfoDao shopLogisticsInfoDao;
+
+	public IPage<SignWriteoffListVo> findSignWriteoffList(Page<SignWriteoffListVo> page,
+			SignWriteoffListDto signWriteoffListDto) {
+		return activitySignWriteoffDao.findSignWriteoffList(page,signWriteoffListDto);
+	}
+
+	public AjaxResult findSignWriteoff(SignWriteoffDto signWriteoffDto) {
+		//设置用户公司ID
+        QueryUtil.setQueryLimitCom(signWriteoffDto);
+        Long writeoffId = signWriteoffDto.getWriteoffId();
+        AjaxResult result= AjaxResult.buildSuccessInstance("成功");
+        //获取核销信息
+        SignWriteoffVo signWriteoffVo = new SignWriteoffVo();
+        ActivitySignWriteoff activitySignWriteoff = activitySignWriteoffDao.selectById(writeoffId);
+        if(ObjectUtil.isNotEmpty(activitySignWriteoff)) {
+        	//获取奖品信息
+        	ActivitySignAwardSet activitySignAwardSet = activitySignAwardSetDao.selectById(activitySignWriteoff.getAwardId());
+        	signWriteoffVo.setJpmc(activitySignAwardSet.getAwardName());
+        	signWriteoffVo.setJptp(activitySignAwardSet.getIntroduceImg());
+        	signWriteoffVo.setSl(1);
+        	signWriteoffVo.setDjfs(activitySignAwardSet.getAwardWay());
+        	//获取中奖人信息
+        	ZjrVo zjrVo = activitySignWriteoffDao.selectUsernameByUserId(activitySignWriteoff.getUserId(),activitySignAwardSet.getId());
+        	signWriteoffVo.setZjr(zjrVo.getZjr());
+        	signWriteoffVo.setZjsj(zjrVo.getZjsj());
+        	signWriteoffVo.setDjsj(activitySignWriteoff.getWriteoffTime());
+        	signWriteoffVo.setState(activitySignWriteoff.getState());
+        	//获取活动主表信息
+        	ShopActivities shopActivities = shopActivitiesDao.selectById(activitySignWriteoff.getActId());
+        	signWriteoffVo.setHdmc(shopActivities.getActName());
+        	signWriteoffVo.setHdbh(shopActivities.getActCode());
+        	//获取收货地址信息
+        	int awardWay = activitySignAwardSet.getAwardWay();
+        	if(ActivitySignAwardSet.AWARDWAY_TWO == awardWay) {
+        		ActivitySignWriteoff activitySignWriteoffLogistics = activitySignWriteoffDao.selectById(writeoffId);
+        		Long receiveId = activitySignWriteoffLogistics.getReceiveId();
+        		ActivitySignReceiveRecord activitySignReceiveRecordLogistic = activitySignReceiveRecordDao.selectById(receiveId);
+        		signWriteoffVo.setConsignee(activitySignReceiveRecordLogistic.getConsignee());
+        		signWriteoffVo.setConsigneePhone(activitySignReceiveRecordLogistic.getConsigneePhone());
+        		signWriteoffVo.setConsigneeAddress(activitySignReceiveRecordLogistic.getConsigneeAddress());
+        		
+        		//物流跟踪
+        		Integer logisticsId = activitySignWriteoffLogistics.getLogisticsId();
+        		if(ObjectUtil.isNotEmpty(logisticsId)) {
+        			List<ShopLogisticsInfo> shopLogisticsInfos = shopLogisticsInfoDao.selectByDelieryId(logisticsId);
+        			if(CollUtil.isNotEmpty(shopLogisticsInfos)) {
+        				ArrayList<LogisticsVo> logisticsVos = new ArrayList<>();
+        				for(ShopLogisticsInfo shopLogistics : shopLogisticsInfos) {
+        					LogisticsVo logisticsVo = new LogisticsVo();
+        					logisticsVo.setContent(shopLogistics.getDescribe());
+        					logisticsVo.setTimestamp(shopLogistics.getLogisticsTime());
+        					logisticsVos.add(logisticsVo);
+        				}
+        				signWriteoffVo.setActivities(logisticsVos);
+        			}
+        		}
+        		
+        	}
+        }
+        result.putInMap("signWriteoffVo", signWriteoffVo);
+        return result;
+	}
+
+	@Transactional
+	public AjaxResult writeoffCodeSubmit(WriteoffCodeSubmitDto writeoffCodeSubmitDto) {
+		//设置用户公司ID
+        QueryUtil.setQueryLimitCom(writeoffCodeSubmitDto);
+        SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
+        Long writeoffId = writeoffCodeSubmitDto.getWriteoffId();
+        String writeOffCode = writeoffCodeSubmitDto.getWriteOffCode();
+        /**
+         * 验证核销码是不是匹配
+         * 更新核销记录
+         * 更新领取记录
+         */
+        //验证核销码是不是匹配
+        ActivitySignWriteoff activitySignWriteoff = activitySignWriteoffDao.selectById(writeoffId);
+        if(ObjectUtil.isNotEmpty(activitySignWriteoff)) {
+        	String writeoffCodeReal = activitySignWriteoff.getWriteoffCode();
+        	if(!writeoffCodeReal.equals(writeOffCode)) {
+        		return new AjaxResult(AjaxResult.STATUS_FAIL, "兑奖码无效");
+        	}
+        }
+        //更新核销记录
+        activitySignWriteoff.setState(ActivitySignWriteoff.STATE_THREE);
+        activitySignWriteoff.setWriteoffTime(new Date());
+        activitySignWriteoff.setWriteoffUser(sysUsers.getSuName());
+        activitySignWriteoff.setWriteoffUserid(sysUsers.getSuId());
+        activitySignWriteoffDao.updateById(activitySignWriteoff);
+        //更新领取记录
+        ActivitySignReceiveRecord activitySignReceiveRecord = activitySignReceiveRecordDao.selectById(activitySignWriteoff.getReceiveId());
+        activitySignReceiveRecord.setState(ActivitySignReceiveRecord.STATE_DONE);
+        activitySignReceiveRecordDao.updateById(activitySignReceiveRecord);
+        
+        return new AjaxResult(AjaxResult.STATUS_SUCCESS, "核销成功");
+	}
+
+	@Transactional
+	public AjaxResult logisticsSubmit(LogisticsSubmitDto logisticsSubmitDto) {
+		//设置用户公司ID
+        QueryUtil.setQueryLimitCom(logisticsSubmitDto);
+        SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
+        Long writeoffId = logisticsSubmitDto.getWriteoffId();
+        /**
+         * 更新领取记录表的收货信息和状态
+         * 更新核销记录表的状态和物流ID
+         */
+        ActivitySignWriteoff activitySignWriteoff = activitySignWriteoffDao.selectById(writeoffId);
+        //新增一条物流信息
+        ShopDeliveryInfo shopDeliveryInfo = new ShopDeliveryInfo();
+        Long receiveId = activitySignWriteoff.getReceiveId();
+        SystemDictionary systemDictionary = systemDictionaryDao.selectByCode(logisticsSubmitDto.getKdgs());
+        if (ObjectUtil.isEmpty(systemDictionary)) {
+            return new AjaxResult(AjaxResult.STATUS_FAIL, "没有找到物流公司信息!");
+        }
+        shopDeliveryInfo.setUserId(activitySignWriteoff.getUserId());
+        shopDeliveryInfo.setReceiveId(receiveId);
+        shopDeliveryInfo.setReceiveAddress(logisticsSubmitDto.getShdz());
+
+        shopDeliveryInfo.setLogisticsCompany(systemDictionary.getName());
+        shopDeliveryInfo.setLogisticsCompanyCode(systemDictionary.getCode());
+        shopDeliveryInfo.setDeliveryWay("物流配送");
+
+        shopDeliveryInfo.setWaybillNo(logisticsSubmitDto.getKddh());
+        shopDeliveryInfo.setUpdateBy(sysUsers.getSuName());
+        shopDeliveryInfo.setCreateBy(sysUsers.getSuName());
+
+        shopDeliveryInfo.setDeliveryTime(new Date());
+        shopDeliveryInfoDao.insert(shopDeliveryInfo);
+//		Integer id = shopDeliveryInfo.getId();
+//		if(ObjectUtil.isNotEmpty(id)) {
+//			List<ShopLogisticsInfo> shopLogisticsList = new ArrayList<ShopLogisticsInfo>();
+//	        AjaxResult result = new AjaxResult();
+//	        Map<String, String> logisticsInfo = new HashMap<String, String>();
+//	        try {
+//	            if (shopDeliveryInfo == null) {
+//	                return new AjaxResult(AjaxResult.STATUS_FAIL, "找不到发货信息");
+//	            }
+//	            if (!StringUtils.isNotBlank(shopDeliveryInfo.getWaybillNo()) || !StringUtils.isNotBlank(shopDeliveryInfo.getLogisticsCompanyCode())) {
+//	                return new AjaxResult(AjaxResult.STATUS_FAIL, "物流公司信息为空");
+//	            }
+//	            logisticsInfo.put("logisticsCompany", shopDeliveryInfo.getLogisticsCompany());
+//	            logisticsInfo.put("waybillNo", shopDeliveryInfo.getWaybillNo());
+//
+//	            //如果已经签收直接查数据库
+//	            if (AppConstance.LOGISTICS_STATUS_OF_SIGN_FOR.equals(shopDeliveryInfo.getLogisticsStatus())) {
+//
+//	                List<ShopLogisticsInfo> shopLogisticsInfos = shopLogisticsInfoDao.selectByDelieryId(shopDeliveryInfo.getId());
+//	                logisticsInfo.put("logisticsStatus", String.valueOf(AppConstance.LOGISTICS_STATUS_OF_SIGN_FOR));
+//	                result.setStatus(AjaxResult.STATUS_SUCCESS);
+//	                result.setRows(shopLogisticsInfos);
+//	                result.putInMap("logisticsInfo", logisticsInfo);
+//	                return result;
+//	            }
+//	            Map<String, String> param = new HashMap<String, String>();
+//	            param.put("ShipperCode", shopDeliveryInfo.getLogisticsCompanyCode());
+//	            param.put("LogisticCode", shopDeliveryInfo.getWaybillNo());
+//	            Map<String, String> paramsUrl = getparams(param);
+//	            LogUtil.info("物流查询参数" + paramsUrl);
+//	            String logisticsResult = HttpCurlUtil.sendPost(logisticsUrl, paramsUrl);
+//	            LogUtil.info("查询物流返回信息" + logisticsResult);
+//	            LogisticsInfoVo logisticsInfoVo = JSON.parseObject(logisticsResult, LogisticsInfoVo.class);
+//	            if (logisticsInfoVo.isSuccess()) {
+//	                ShopDeliveryInfo shopDelivery = new ShopDeliveryInfo();
+//	                shopDelivery.setLogisticsStatus(Integer.valueOf(logisticsInfoVo.getState()));
+//	                shopDelivery.setId(shopDeliveryInfo.getId());
+//	                logisticsInfo.put("logisticsStatus", logisticsInfoVo.getState());
+//	                //更新物流状态
+//	                shopDeliveryInfoDao.updateByModel(shopDelivery);
+//	                if (CollectionUtils.isNotEmpty(logisticsInfoVo.getTraces())) {
+//	                    List<Map<String, String>> mapTraces = logisticsInfoVo.getTraces();
+//	                    for (int i = 0; i < mapTraces.size(); i++) {
+//	                        ShopLogisticsInfo shopLogisticsInfo = new ShopLogisticsInfo();
+//	                        shopLogisticsInfo.setCreateBy(AppConstance.SYSTEM_USER);
+//	                        shopLogisticsInfo.setUpdateBy(AppConstance.SYSTEM_USER);
+//	                        shopLogisticsInfo.setLogisticsTime(mapTraces.get(i).get("AcceptTime"));
+//	                        String acceptStation = mapTraces.get(i).get("AcceptStation");
+//	                        shopLogisticsInfo.setDescribe(acceptStation);
+//	                        shopLogisticsInfo.setDelieryId(shopDeliveryInfo.getId());
+//	                        if (acceptStation.indexOf(AppConstance.KDN_IS_SIGN) != -1) {
+//	                            shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_SIGN_FOR);
+//	                        } else if (acceptStation.indexOf(AppConstance.KDN_IS_RECEIVE) != -1) {
+//	                            shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_RECEIVE);
+//	                        } else if (acceptStation.indexOf(AppConstance.KDN_IS_ON_WAY) != -1) {
+//	                            shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_ON_WAY);
+//	                        } else if (acceptStation.indexOf(AppConstance.KDN_IS_MISTAKE) != -1) {
+//	                            shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_MISTAKE);
+//	                        } else {
+//	                            shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_NONE);
+//	                        }
+//	                        shopLogisticsList.add(shopLogisticsInfo);
+//	                    }
+//	                    shopLogisticsInfoDao.deleteByDelieryId(shopDeliveryInfo.getId());
+//	                    if (CollectionUtils.isNotEmpty(shopLogisticsList)) {
+//	                        shopLogisticsInfoDao.batchInsert(shopLogisticsList);
+//	                    }
+//	                }
+//	            } else {
+//	                throw new GlobleException(logisticsInfoVo.getReason());
+//	            }
+//
+//	        } catch (Exception e) {
+//	            throw new GlobleException("物流信息查询失败");
+//	        }
+	        //更新核销记录
+	        activitySignWriteoff.setState(ActivitySignWriteoff.STATE_THREE);
+	        activitySignWriteoff.setWriteoffTime(new Date());
+	        activitySignWriteoff.setWriteoffUser(sysUsers.getSuName());
+	        activitySignWriteoff.setWriteoffUserid(sysUsers.getSuId());
+	        activitySignWriteoff.setLogisticsId(shopDeliveryInfo.getId());
+	        activitySignWriteoffDao.updateById(activitySignWriteoff);
+	        //更新领取记录
+	        ActivitySignReceiveRecord activitySignReceiveRecord = activitySignReceiveRecordDao.selectById(receiveId);
+	        activitySignReceiveRecord.setState(ActivitySignReceiveRecord.STATE_DONE);
+	        activitySignReceiveRecord.setConsignee(logisticsSubmitDto.getShr());
+	        activitySignReceiveRecord.setConsigneeAddress(logisticsSubmitDto.getShdz());
+	        activitySignReceiveRecord.setConsigneePhone(logisticsSubmitDto.getLxdh());
+	        activitySignReceiveRecordDao.updateById(activitySignReceiveRecord);
+//		}
+        return new AjaxResult(AjaxResult.STATUS_SUCCESS, "发货成功");
+	}
+
+
+
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/vo/ActivitiesListVo.java b/zq-erp/src/main/java/com/matrix/system/activity/vo/ActivitiesListVo.java
new file mode 100644
index 0000000..0ff34af
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/vo/ActivitiesListVo.java
@@ -0,0 +1,107 @@
+package com.matrix.system.activity.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class ActivitiesListVo {
+	
+	/**
+	 * 活动类型 团购
+	 */
+	public static final int ACTIVITIES_TYPE_GROUP = 1;
+
+	/**
+	 * 活动类型 秒杀
+	 */
+	public static final int ACTIVITIES_TYPE_SECKILL = 2;
+
+	/**
+	 * 活动类型 沙龙
+	 */
+	public static final int ACTIVITIES_TYPE_SALON = 3;
+	/**
+	 * 活动类型 签到
+	 */
+	public static final int ACTIVITIES_TYPE_SIGN = 4;
+
+	/**
+	 * 活动状态 开启
+	 */
+	public static final int ACTIVITIES_STATUS_OPEN = 1;
+
+	/**
+	 * 活动状态 关闭
+	 */
+	public static final int ACTIVITIES_STATUS_CLOSE = 2;
+	/**
+	 * 主键
+	 */
+	private Long  id;
+			
+	
+	/**
+	 * 活动名称
+	 */
+	@ApiModelProperty(value = "活动名称")
+	private String  actName;
+	/**
+	 * 活动编码
+	 */
+	@ApiModelProperty(value = "活动编码")
+	private String  actCode;
+			
+	
+	/**
+	 * 活动类型
+	 */
+	@ApiModelProperty(value = "活动类型")
+	private Integer  actType;
+			
+	
+	/**
+	 * 开始时间
+	 */
+	@ApiModelProperty(value = "开始时间")
+	@JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
+	private Date actBeginTime;
+			
+	
+	/**
+	 * 结束时间
+	 */
+	@ApiModelProperty(value = "结束时间")
+	@JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
+	private Date  actEndTime;
+	/**
+	 * 活动状态
+	 */
+	@ApiModelProperty(value = "活动状态")
+	private Integer  actStatus;
+
+	//未发布
+	public static final int ACTSTATUS_STATUS_RELEASE = 1;
+	//未开始
+	public static final int ACTSTATUS_STATUS_READY = 2;
+	//进行中
+	public static final int ACTSTATUS_STATUS_ING = 3;
+	//已结束
+	public static final int ACTSTATUS_STATUS_END = 4;
+	@ApiModelProperty(value = "创建人")
+	private String  createBy;
+	/**
+	 * 活动说明
+	 */
+	@ApiModelProperty(value = "活动说明")
+	private String  actRemark;
+	
+	/**
+	 * 公司ID
+	 */
+	@ApiModelProperty(hidden = true)
+	private Long  companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/vo/AddSignAwardSetVo.java b/zq-erp/src/main/java/com/matrix/system/activity/vo/AddSignAwardSetVo.java
new file mode 100644
index 0000000..6dc0d02
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/vo/AddSignAwardSetVo.java
@@ -0,0 +1,33 @@
+package com.matrix.system.activity.vo;
+
+import java.util.Date;
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.matrix.system.activity.entity.ActivitySignAwardSet;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class AddSignAwardSetVo {
+	/**
+	 * 主键
+	 */
+	private Long  id;
+	
+	@ApiModelProperty(value ="活动名称")
+    private String actName;
+	@ApiModelProperty(value ="活动编码")
+	private String actCode;
+	@ApiModelProperty(value ="活动开始时间")
+	private Date beginTime;
+	@ApiModelProperty(value ="活动结束时间")
+	private Date endTime;
+	
+	private SignSetBasicJsonVo signSetBasicJsonDto;
+	
+	private List<ActivitySignAwardSet> activitySignAwardSets;
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/vo/CouponVo.java b/zq-erp/src/main/java/com/matrix/system/activity/vo/CouponVo.java
new file mode 100644
index 0000000..47ee4c1
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/vo/CouponVo.java
@@ -0,0 +1,29 @@
+package com.matrix.system.activity.vo;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class CouponVo {
+	/**
+	 * 主键
+	 */
+	private Integer  id;
+			
+	
+	/**
+	 * 优惠券名称
+	 */
+	@ApiModelProperty(value = "优惠券名称")
+	private String  cName;
+	
+	/**
+	 * 结束时间
+	 */
+	@ApiModelProperty(value = "结束时间")
+	@JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
+	private Date  endTime;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/vo/GoodsVo.java b/zq-erp/src/main/java/com/matrix/system/activity/vo/GoodsVo.java
new file mode 100644
index 0000000..41793ea
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/vo/GoodsVo.java
@@ -0,0 +1,29 @@
+package com.matrix.system.activity.vo;
+
+import lombok.Data;
+
+@Data
+public class GoodsVo {
+	
+	private Long id;
+    /**
+     * 产品名称
+     */
+    private String name;
+
+    /**
+     * 商品分类 组合商品/家居产品/项目/充值卡/综合卡
+     */
+    private String goodType;
+
+    /**
+     * 产品编码
+     */
+    private String code;
+    
+    /**
+     * 售价/本金
+     */
+    private Double sealPice;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/vo/LogisticsVo.java b/zq-erp/src/main/java/com/matrix/system/activity/vo/LogisticsVo.java
new file mode 100644
index 0000000..6e97798
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/vo/LogisticsVo.java
@@ -0,0 +1,18 @@
+package com.matrix.system.activity.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class LogisticsVo {
+	
+	@ApiModelProperty(value ="内容")
+	private String  content;
+	
+	@ApiModelProperty(value ="时间戳")
+	@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8")
+	private String  timestamp;
+	
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/vo/SignReceiveListVo.java b/zq-erp/src/main/java/com/matrix/system/activity/vo/SignReceiveListVo.java
new file mode 100644
index 0000000..d43dbf6
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/vo/SignReceiveListVo.java
@@ -0,0 +1,37 @@
+package com.matrix.system.activity.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class SignReceiveListVo {
+	/**
+	 * 主键
+	 */
+	private Long  id;
+			
+	@ApiModelProperty(value = "用户")
+	private String nickName;
+	
+	@ApiModelProperty(value = "签到时间")
+	@JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
+	private Date reciveTime;
+	
+	@ApiModelProperty(value = "连续签到天数")
+	private Integer cumulativeDay;
+	
+	@ApiModelProperty(value = "奖励类型")
+	private String awardType;
+	
+	@ApiModelProperty(value = "获得奖励")
+	private String awardName;
+	
+	@ApiModelProperty(value ="奖项规则(1:每日奖励(默认)2:累计签到天数)")
+	private int  awardRule;
+	@ApiModelProperty(value ="是否已领取(1:待领取2:已领取)")
+	private int  state;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/vo/SignSetBasicJsonVo.java b/zq-erp/src/main/java/com/matrix/system/activity/vo/SignSetBasicJsonVo.java
new file mode 100644
index 0000000..c2d0983
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/vo/SignSetBasicJsonVo.java
@@ -0,0 +1,29 @@
+package com.matrix.system.activity.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class SignSetBasicJsonVo {
+	
+	@ApiModelProperty(value ="标题图片")
+	private String imageUrlTitle;
+	@ApiModelProperty(value ="头部图片")
+	private String imageUrlHead;
+	@ApiModelProperty(value ="按钮图片")
+	private String imageUrlButton;
+	@ApiModelProperty(value ="状态图片")
+	private String imageUrlState;
+	
+	@ApiModelProperty(value ="规则内容")
+	private String ruleExplain;
+	@ApiModelProperty(value ="字体颜色")
+	private String typographyColor;
+	@ApiModelProperty(value ="背景颜色")
+	private String backgroundColor;
+	@ApiModelProperty(value ="字体大小")
+	private Integer typographyNum;
+	@ApiModelProperty(value ="字体透明度")
+	private Integer typographyLight;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/vo/SignWriteoffListVo.java b/zq-erp/src/main/java/com/matrix/system/activity/vo/SignWriteoffListVo.java
new file mode 100644
index 0000000..1bf2d2f
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/vo/SignWriteoffListVo.java
@@ -0,0 +1,77 @@
+package com.matrix.system.activity.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class SignWriteoffListVo {
+	
+
+	private Long  id;
+	
+	/**
+	 * 核销时间
+	 */
+	@ApiModelProperty(value ="核销时间")
+	@JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
+	private Date  writeoffTime;
+	
+	/**
+	 * 核销员
+	 */
+	@ApiModelProperty(value ="核销员")
+	private String  writeoffUser;
+	
+	/**
+	 * 兑奖码
+	 */
+	@ApiModelProperty(value ="兑奖码")
+	private String  writeoffCode;
+	
+	/**
+	 * 活动名称
+	 */
+	@ApiModelProperty(value ="活动名称")
+	private String  actName;
+	
+	/**
+	 * 奖品名称
+	 */
+	@ApiModelProperty(value ="奖品名称")
+	private String  awardName;
+	
+	/**
+	 * 中奖时间
+	 */
+	@ApiModelProperty(value ="中奖时间")
+	@JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
+	private Date  winTime;
+	
+	/**
+	 * 状态
+	 */
+	@ApiModelProperty(value ="状态(1:待兑换 2:待发货 3:已兑换)")
+	private int  state;
+	
+	/**
+	 * 兑奖方式
+	 */
+	@ApiModelProperty(value ="兑奖方式(1:线下兑换2:物流配送3:客服兑换)")
+	private int  awardWay;
+	
+	/**
+	 * 中奖者
+	 */
+	@ApiModelProperty(value ="中奖者")
+	private String  receiveName;
+	
+	/**
+	 * 收货地址
+	 */
+	@ApiModelProperty(value ="收货地址")
+	private String  receiveAddress;
+	
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/vo/SignWriteoffVo.java b/zq-erp/src/main/java/com/matrix/system/activity/vo/SignWriteoffVo.java
new file mode 100644
index 0000000..af7d6a6
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/vo/SignWriteoffVo.java
@@ -0,0 +1,62 @@
+package com.matrix.system.activity.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class SignWriteoffVo {
+	
+	@ApiModelProperty(value ="奖品名称")
+	private String  jpmc;
+	
+	@ApiModelProperty(value ="奖品图片")
+	private String  jptp;
+	
+	@ApiModelProperty(value ="数量")
+	private int  sl;
+	
+	@ApiModelProperty(value ="中奖人")
+	private String  zjr;
+	
+	@ApiModelProperty(value ="中奖时间")
+	@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8")
+	private Date  zjsj;
+	
+	@ApiModelProperty(value ="活动名称")
+	private String  hdmc;
+	
+	@ApiModelProperty(value ="活动编号")
+	private String  hdbh;
+	
+	@ApiModelProperty(value ="兑奖方式")
+	private int  djfs;
+	
+	@ApiModelProperty(value ="兑奖状态")
+	private int  state;
+	
+	@ApiModelProperty(value ="兑奖时间")
+	@JsonFormat(pattern = "yyyy-MM-dd hh:mm", timezone="GMT+8")
+	private Date  djsj;
+	
+	@ApiModelProperty(value ="收货人")
+	private String  consignee;
+	
+	@ApiModelProperty(value ="联系电话")
+	private String  consigneePhone;
+	
+	@ApiModelProperty(value ="收货地址")
+	private String  consigneeAddress;
+	
+	@ApiModelProperty(value ="物流单号")
+	private String  logisticsNum;
+	
+	@ApiModelProperty(value ="物流公司")
+	private String  logisticsCompany;
+	
+	private List<LogisticsVo>  activities;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/vo/ZjrVo.java b/zq-erp/src/main/java/com/matrix/system/activity/vo/ZjrVo.java
new file mode 100644
index 0000000..bbef08c
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/activity/vo/ZjrVo.java
@@ -0,0 +1,19 @@
+package com.matrix.system.activity.vo;
+
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+@Data
+public class ZjrVo {
+	
+	@ApiModelProperty(value ="中奖人")
+	private String  zjr;
+	
+	@ApiModelProperty(value ="中奖时间")
+	@JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
+	private Date  zjsj;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiCommonAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiCommonAction.java
index 1ea1ccc..2b580f6 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/action/ApiCommonAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiCommonAction.java
@@ -11,10 +11,10 @@
 import com.matrix.system.app.dto.UploadPhotoDto;
 import com.matrix.system.app.utils.Sms106Send;
 import com.matrix.system.app.vo.UserInfoVo;
-import com.matrix.system.common.authority.DefaultAuthorityManager;
 import com.matrix.system.common.authority.strategy.AccountPasswordLogin;
 import com.matrix.system.common.authority.strategy.LoginStrategy;
 import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
 import com.matrix.system.common.service.SysUsersService;
 import com.matrix.system.common.tools.PasswordUtil;
 import com.matrix.system.common.tools.UploadUtil;
@@ -62,6 +62,9 @@
 
     @Autowired
     private AppAuthorityManager authorityManager;
+
+    @Autowired
+    private BusParameterSettingsDao busParameterSettingsDao;
 
     @Autowired
     private RedisClient redisClient;
@@ -220,4 +223,11 @@
     public AjaxResult findAppVersion() {
         return AjaxResult.buildSuccessInstance(sysUsersService.findAppVersion());
     }
+
+
+
+
+
+
+
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java
index d9285cb..818338b 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java
@@ -125,13 +125,15 @@
 
         queryUse.setTaocanId(null);
         queryUse.setType(Dictionary.SHOPPING_GOODS_TYPE_TC);
-        List<SysProjUse> taoCanList = projUseService.findInPage(queryUse, null);
+//        List<SysProjUse> taoCanList = projUseService.findInPage(queryUse, null);
+        List<SysProjUse> taoCanList = projUseService.findTaocaoProjUseWithProj(queryUse);
         List<ServiceTcVo> serviceTcVos = SysProjUseMapper.INSTANCE.entityListToTcVoList(taoCanList);
 
         if (CollectionUtils.isNotEmpty(serviceTcVos)) {
             serviceTcVos.forEach(item -> {
-                List<SysProjUse> sysProjUses = projUseService.selectTaocanProjUse(item.getId(), queryUse.getStatus());
-                List<ServiceProjVo> taocanProj = SysProjUseMapper.INSTANCE.entityListToProjVoList(sysProjUses);
+//                List<SysProjUse> sysProjUses = projUseService.selectTaocanProjUse(item.getId(), queryUse.getStatus());
+                List<ServiceProjVo> taocanProj = SysProjUseMapper.INSTANCE.entityListToProjVoList(item.getTaocanProjUse());
+                item.setTaocanProjUse(null);
                 item.setProj(taocanProj);
             });
         }
@@ -150,9 +152,7 @@
             throw new GlobleException("请选择服务");
         }
         SysVipInfo vipInfo = sysVipInfoService.findById(serviceOrderDto.getVipId());
-//        if (StringUtils.isBlank(vipInfo.getPassWord())) {
-//            return AjaxResult.buildFailInstance("未设置资金密码");
-//        }
+
 
         if (StringUtils.isNotBlank(vipInfo.getPassWord())) {
             if (!vipInfo.getPassWord().equals(serviceOrderDto.getPassword())) {
diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiSettingAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiSettingAction.java
new file mode 100644
index 0000000..312228d
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiSettingAction.java
@@ -0,0 +1,47 @@
+package com.matrix.system.app.action;
+
+import com.matrix.core.constance.MatrixConstance;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.tools.WebUtil;
+import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.common.constance.AppConstance;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
+import com.matrix.system.hive.bean.AppVersion;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.CrossOrigin;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author jyy
+ * @date 2020-12-21
+ **/
+@CrossOrigin(origins = "*")
+@Api(value = "ApiSettingAction", tags = "配置查询类")
+@RestController
+@RequestMapping(value = "/api/setting")
+public class ApiSettingAction {
+
+
+    @Autowired
+    private BusParameterSettingsDao busParameterSettingsDao;
+
+
+    @ApiOperation(value = "获取app配置", notes = "获取app配置")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = AppVersion.class)
+    })
+    @GetMapping(value = "/findAppSettings")
+    public AjaxResult findAppSettings() {
+        SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+        AjaxResult result = AjaxResult.buildSuccessInstance("查询成功");
+        result.putInMap(AppConstance.APP_BANNER_GL, busParameterSettingsDao.selectCompanyParamByCode(AppConstance.APP_BANNER_GL,user.getCompanyId()));
+        return result;
+    }
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiStatisticsAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiStatisticsAction.java
index 71d838c..3cdc992 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/action/ApiStatisticsAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiStatisticsAction.java
@@ -154,6 +154,10 @@
                             return tjVipSumDao.selectProjConsumeCnt(timeSpaceParam, shopId, null);
                         case "20" :
                             return tjVipSumDao.selectTimeLength(timeSpaceParam, shopId, null);
+                        case "21" :
+                            return tjVipSumDao.selectCardAmount(timeSpaceParam, shopId, null);
+                        case "22" :
+                            return tjVipSumDao.selectFreeAmount(timeSpaceParam, shopId, null);
                         default :
                             return tjVipSumDao.selectBusinessInCome(timeSpaceParam, shopId, null);
                     }
@@ -205,6 +209,10 @@
                             return tjVipSumDao.selectProjConsumeCnt(timeSpaceParam, null, companyId);
                         case "20" :
                             return tjVipSumDao.selectTimeLength(timeSpaceParam, null, companyId);
+                        case "21" :
+                            return tjVipSumDao.selectCardAmount(timeSpaceParam, null, companyId);
+                        case "22" :
+                            return tjVipSumDao.selectFreeAmount(timeSpaceParam, null, companyId);
                         default :
                             return tjVipSumDao.selectBusinessInCome(timeSpaceParam, null, companyId);
                     }
diff --git a/zq-erp/src/main/java/com/matrix/system/app/authority/AppAuthorityManager.java b/zq-erp/src/main/java/com/matrix/system/app/authority/AppAuthorityManager.java
index b34a8e5..5d429c1 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/authority/AppAuthorityManager.java
+++ b/zq-erp/src/main/java/com/matrix/system/app/authority/AppAuthorityManager.java
@@ -1,5 +1,10 @@
 package com.matrix.system.app.authority;
 
+import cn.hutool.crypto.SecureUtil;
+import cn.hutool.json.JSONArray;
+import cn.hutool.json.JSONObject;
+import cn.hutool.json.JSONUtil;
+import com.matrix.component.redis.RedisClient;
 import com.matrix.core.constance.MatrixConstance;
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.core.tools.StringUtils;
@@ -31,7 +36,12 @@
     private static final int DEFAULT_2 = 2;
 
     @Autowired
+    RedisClient redisClient;
+
+    @Autowired
     SysFunctionService sysFunctionService;
+
+    public static final String USER_POWER_REDISKEY_APP = "USER_POWER_APP";
 
     public static final String USERFUNCTION = "userFunction";
     /** 用户所有路径权限的记录 **/
@@ -91,8 +101,32 @@
         List<String> userUrlMapping = new ArrayList<>();
 
 
-        // 获取用户所有权限
-        getUserFunction(user,userFunction, userUrlMapping);
+        String redisKey = USER_POWER_REDISKEY_APP + SecureUtil.md5(user.getSuId()+"");
+        String cachedValue = redisClient.getCachedValue(redisKey);
+        if (StringUtils.isNotBlank(cachedValue)) {
+            //从缓存中获取用户权限
+            JSONObject powerMap = JSONUtil.parseObj(cachedValue);
+            String userFunctionMapStr = powerMap.get(USERFUNCTION).toString();
+            JSONObject userFunctionMap = JSONUtil.parseObj(userFunctionMapStr);
+            Set<String> userFunctionMapKeys = userFunctionMap.keySet();
+            userFunctionMapKeys.forEach(key -> {
+                userFunction.put(key, userFunctionMap.get(key, SysFunction.class));
+            });
+
+            String userUrlMappingListStr = powerMap.get(USER_URL_MAPPING).toString();
+            JSONArray userUrlMappingArray = JSONUtil.parseArray(userUrlMappingListStr);
+            for (int i = 0; i < userUrlMappingArray.size(); i++) {
+                userUrlMapping.add(userUrlMappingArray.get(i, String.class));
+            }
+        } else {
+            // 获取用户所有权限
+            getUserFunction(user,userFunction, userUrlMapping);
+
+            Map<String ,Object> powerMap=new HashMap<>();
+            powerMap.put(USERFUNCTION, userFunction);
+            powerMap.put(USER_URL_MAPPING, userUrlMapping);
+            redisClient.saveValue(redisKey,JSONUtil.parseObj(powerMap,true));
+        }
 
 
         // TODO 这里的用户权限应该放到redis缓存中,在拦截器中做权限拦截
diff --git a/zq-erp/src/main/java/com/matrix/system/app/vo/BusinessesDataShowVo.java b/zq-erp/src/main/java/com/matrix/system/app/vo/BusinessesDataShowVo.java
index 714b2bf..5fae6d9 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/vo/BusinessesDataShowVo.java
+++ b/zq-erp/src/main/java/com/matrix/system/app/vo/BusinessesDataShowVo.java
@@ -40,6 +40,12 @@
     @ApiModelProperty(value = "卡项业绩")
     private BigDecimal cardAchieve;
 
+    @ApiModelProperty(value = "储值卡本金扣款")
+    private BigDecimal cardAmount;
+
+    @ApiModelProperty(value = "储值卡增金扣款")
+    private BigDecimal cardFreeAmount;
+
     @ApiModelProperty(value = "退款")
     private BigDecimal refund;
 
@@ -297,4 +303,20 @@
     public void setTimeLength(BigDecimal timeLength) {
         this.timeLength = timeLength;
     }
+
+    public BigDecimal getCardAmount() {
+        return cardAmount;
+    }
+
+    public void setCardAmount(BigDecimal cardAmount) {
+        this.cardAmount = cardAmount;
+    }
+
+    public BigDecimal getCardFreeAmount() {
+        return cardFreeAmount;
+    }
+
+    public void setCardFreeAmount(BigDecimal cardFreeAmount) {
+        this.cardFreeAmount = cardFreeAmount;
+    }
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/app/vo/ParameterSettingVo.java b/zq-erp/src/main/java/com/matrix/system/app/vo/ParameterSettingVo.java
new file mode 100644
index 0000000..b7f82c7
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/vo/ParameterSettingVo.java
@@ -0,0 +1,39 @@
+package com.matrix.system.app.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * jyy
+ */
+@Data
+@ApiModel(value = "ParameterSettingVo", description = "配置返回参数类")
+public class ParameterSettingVo  {
+
+    @ApiModelProperty(value = "参数编码ID")
+    private Long paramId;
+
+
+    @ApiModelProperty(value = "参数编码")
+    private String paramCode;
+
+
+
+    @ApiModelProperty(value = "参数值")
+    private String paramValue;
+
+
+    @ApiModelProperty(value = "值1")
+    private String paramValue1;
+
+
+    @ApiModelProperty(value = "值2")
+    private String paramValue2;
+
+
+    @ApiModelProperty(value = "值3")
+    private String paramValue3;
+
+
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/app/vo/ServiceTcVo.java b/zq-erp/src/main/java/com/matrix/system/app/vo/ServiceTcVo.java
index 9c9cb10..1c61e6d 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/vo/ServiceTcVo.java
+++ b/zq-erp/src/main/java/com/matrix/system/app/vo/ServiceTcVo.java
@@ -2,6 +2,7 @@
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.matrix.core.tools.DateUtil;
+import com.matrix.system.hive.bean.SysProjUse;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
@@ -42,6 +43,17 @@
     @ApiModelProperty(value = "快过期 1-是 2-否")
     private String isInvalid;
 
+    @ApiModelProperty(hidden = true)
+    private List<SysProjUse> taocanProjUse;
+
+    public List<SysProjUse> getTaocanProjUse() {
+        return taocanProjUse;
+    }
+
+    public void setTaocanProjUse(List<SysProjUse> taocanProjUse) {
+        this.taocanProjUse = taocanProjUse;
+    }
+
     public String getIsInvalid() {
         Date date = DateUtil.getDateAfterMonth(new Date(), 1);
         if (invalidTime != null) {
diff --git a/zq-erp/src/main/java/com/matrix/system/common/actions/AdminAction.java b/zq-erp/src/main/java/com/matrix/system/common/actions/AdminAction.java
index 8a8dbd6..70b7250 100644
--- a/zq-erp/src/main/java/com/matrix/system/common/actions/AdminAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/common/actions/AdminAction.java
@@ -25,9 +25,7 @@
 import com.matrix.system.common.service.SysUsersService;
 import com.matrix.system.common.tools.PasswordUtil;
 import com.matrix.system.common.tools.ResponseHeadUtil;
-import com.matrix.system.constance.SystemConstance;
 import com.matrix.system.hive.action.util.QueryUtil;
-import com.matrix.system.hive.bean.SysVipInfo;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -45,11 +43,8 @@
 import java.net.URLEncoder;
 import java.security.NoSuchAlgorithmException;
 import java.util.ArrayList;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.Objects;
-
-import static com.matrix.system.common.constance.AppConstance.SAFEPATH;
 
 /**
  * @author 姜ø友瑶
@@ -486,23 +481,6 @@
     }
 
 
-    /**
-     * 查询历史搜索人数
-     *
-     * @return
-     * @author luoyuanhong
-     */
-    @SuppressWarnings("unchecked")
-    @RequestMapping(value = "/showHistoryUser")
-    public @ResponseBody
-    AjaxResult showHistoryUser() {
-        if (WebUtil.getSession().getAttribute(SystemConstance.HISTORY_CUSTOMER) != null) {
-            return new AjaxResult(AjaxResult.STATUS_SUCCESS,
-                    (LinkedList<SysVipInfo>) WebUtil.getSession().getAttribute(SystemConstance.HISTORY_CUSTOMER), 0);
-        } else {
-            return new AjaxResult(AjaxResult.STATUS_SUCCESS, null, 0);
-        }
-    }
 
 
     /**
diff --git a/zq-erp/src/main/java/com/matrix/system/common/actions/CommonAction.java b/zq-erp/src/main/java/com/matrix/system/common/actions/CommonAction.java
index 36b217c..18eb754 100644
--- a/zq-erp/src/main/java/com/matrix/system/common/actions/CommonAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/common/actions/CommonAction.java
@@ -13,9 +13,11 @@
 import com.matrix.system.common.authority.DefaultAuthorityManager;
 import com.matrix.system.common.authority.strategy.AccountPasswordLogin;
 import com.matrix.system.common.authority.strategy.LoginStrategy;
+import com.matrix.system.common.authority.strategy.ScanQrCodeLogin;
 import com.matrix.system.common.bean.SysUsers;
 import com.matrix.system.common.constance.AppConstance;
 import com.matrix.system.common.dao.ProjExceptionDao;
+import com.matrix.system.common.dto.WebLoginDto;
 import com.matrix.system.common.service.SysUsersService;
 import com.matrix.system.hive.dao.SysShopInfoDao;
 import com.matrix.system.hive.statistics.StatisticsBusinessDataJob;
@@ -97,17 +99,22 @@
 	 * 
 	 *  登录验证
 	 * @author:姜友瑶
-	 * @param user
 	 * @return 返回类型 AjaxResult
 	 * @date 2016年8月30日
 	 */
 	@RequestMapping(value = "/dologin")
-	public @ResponseBody AjaxResult dologin(SysUsers user) {
-		long sqlStart = System.currentTimeMillis();
-		decryptAccountAndPassword(user);
-		LoginStrategy apLogin = new AccountPasswordLogin(user, sysUsersService);
+	public @ResponseBody AjaxResult dologin(WebLoginDto webLoginDto) {
 
-		user = authorityManager.login(apLogin);
+		long sqlStart = System.currentTimeMillis();
+		SysUsers user=null;
+		if(WebLoginDto.ACCOUNT_LOGIN.equals(webLoginDto.getLoginType())){
+			user= decryptAccountAndPassword(webLoginDto);
+			LoginStrategy apLogin = new AccountPasswordLogin(user, sysUsersService);
+			user = authorityManager.login(apLogin);
+		}else {
+			ScanQrCodeLogin apLogin = new ScanQrCodeLogin( sysUsersService,webLoginDto.getLoginQrCodeKey());
+			user = authorityManager.login(apLogin);
+		}
 
 
 		if(user.getShopId()!=null){
@@ -155,28 +162,27 @@
 	 * @author JIANGYOUYAO
 	 * @email 935090232@qq.com
 	 * @date 2017年12月11日
-	 * @param user
 	 */
-	private void decryptAccountAndPassword(SysUsers user) {
+	private SysUsers decryptAccountAndPassword(WebLoginDto webLoginDto) {
 
 		String privateKey = WebUtil.getSessionAttribute(MatrixConstance.PRIVATE_KEY);
 		if (StringUtils.isBlank(privateKey)) {
 			throw new GlobleException(SystemErrorCode.REQUEST_INVALID);
 		}
-
+		SysUsers user=new SysUsers();
 		try {
 			// 账号解密
-			byte[] acccountData = RSAUtils.decryptByPrivateKey(user.getSuAccount(), privateKey);
+			byte[] acccountData = RSAUtils.decryptByPrivateKey(webLoginDto.getSuAccount(), privateKey);
 			user.setSuAccount(new String(acccountData));
 			// 密码解密
-			byte[] passWordData = RSAUtils.decryptByPrivateKey(user.getSuPassword(), privateKey);
+			byte[] passWordData = RSAUtils.decryptByPrivateKey(webLoginDto.getSuPassword(), privateKey);
 			user.setSuPassword(new String(passWordData));
 
 		} catch (Exception e) {
 			LogUtil.error("用户账号密码解密失败", e);
 			throw new GlobleException(SystemErrorCode.LOGIN_FAIL);
 		}
-
+		return user;
 	}
 
 
@@ -246,44 +252,6 @@
 			return "admin/hive/mobile/mobileLogin";
 		}
 
-	}
-
-
-	/**
-	 * 移动端登录
-	 * @param user
-	 * @return
-	 */
-	@RequestMapping(value = "/doHiveMobilelogin")
-	public @ResponseBody AjaxResult doHiveMobilelogin(SysUsers user) {
-		long sqlStart = System.currentTimeMillis();
-		decryptAccountAndPassword(user);
-		LoginStrategy apLogin = new AccountPasswordLogin(user, sysUsersService);
-		user = authorityManager.login(apLogin);
-		// 获取该账户的岗位信息,并判断是否为店长
-		if(user.getShopId()!=null){
-			user.setShopName(sysShopInfoDao.selectById(user.getShopId()).getShopName());
-		}
-
-		AjaxResult result = new AjaxResult();
-		authorityManager.initUserPower(result);
-		result.setStatus(AjaxResult.STATUS_SUCCESS);
-		LogUtil.info("#用户登录成功 账号={}#", user.getSuAccount());
-		switch (user.getSuUserType()) {
-			// 企业管理员
-			case AppConstance.USER_TYPE_ADMIN:
-				result.setPage(HIVE_MOBILE_REDIRECT_INDEX);
-				break;
-			// 企业用户
-			case AppConstance.USER_TYPE_EMPLOYEE:
-				result.setPage(HIVE_MOBILE_REDIRECT_INDEX);
-				break;
-			default:// 不能识别的用户
-				result.setPage("common/redirect/404");
-		}
-		long endStart = System.currentTimeMillis();
-		LogUtil.info("本次登录耗时#{}毫秒", (endStart-sqlStart)+"");
-		return result;
 	}
 
 	@GetMapping(value = "/hiveMobileLoginOut")
diff --git a/zq-erp/src/main/java/com/matrix/system/common/actions/MultipleFileUploadAction.java b/zq-erp/src/main/java/com/matrix/system/common/actions/MultipleFileUploadAction.java
new file mode 100644
index 0000000..9c4f419
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/common/actions/MultipleFileUploadAction.java
@@ -0,0 +1,169 @@
+package com.matrix.system.common.actions;
+
+import com.alibaba.fastjson.JSONObject;
+import com.matrix.core.tools.StringUtils;
+import com.matrix.core.tools.UUIDUtil;
+import com.matrix.system.common.constance.AppConstance;
+import org.apache.commons.fileupload.FileUploadException;
+import org.apache.log4j.Logger;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Controller;
+import org.springframework.util.FileCopyUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * 多文件上传控制器
+ * 
+ * @author jiangyouyao
+ * @email 512061637@qq.com
+ * @date 2019年2月25日
+ */
+@Controller
+@RequestMapping(value = "admin/multipleUploadFile")
+public class MultipleFileUploadAction {
+	Logger log = Logger.getLogger(MultipleFileUploadAction.class);
+
+	@Value("${file_storage_path}")
+	private String fileStoragePath;
+	@Value("${static_resource_url}")
+	private String nginxUrl;
+
+	/**
+	 * 最大值
+	 */
+	private Long maxSize = 1024*1024*100L;
+
+	/**
+	 * 多文件上传方法
+	 * 
+	 * @author jiangyouyao
+	 * @email 512061637@qq.com
+	 * @date 2019年2月25日
+	 * @param response
+	 * @param request
+	 * @return
+	 * @throws IOException
+	 * @throws FileUploadException
+	 */
+	@RequestMapping(value = "/doUpload")
+	public @ResponseBody JSONObject doFileUpload(HttpServletResponse response, MultipartHttpServletRequest request, Integer data)
+			throws IOException, FileUploadException {
+		// 文件保存目录路径
+		String savePath = fileStoragePath;
+		// 文件保存目录URL
+		String saveUrl = nginxUrl;
+		// String msgPag = "common/fileUploadResult";
+		JSONObject object = new JSONObject();
+		response.setContentType("text/html; charset=UTF-8");
+		request.setCharacterEncoding("UTF-8");
+
+		// 保存和访问路径检查
+		if (StringUtils.isBlank(saveUrl) || StringUtils.isBlank(savePath)) {
+			object.put("status", "err");
+			object.put("msg", "文件上传失败错误代码:001");
+			return object;
+		}
+		// 检查目录
+		File uploadDir = new File(savePath);
+		if (!uploadDir.isDirectory()) {
+			uploadDir.mkdir();
+		}
+		// 检查目录写权限
+//		if (!uploadDir.canWrite()) {
+//			object.put("status", "err");
+//			object.put("msg", "上传目录没有写权限");
+//			return object;
+//		}
+
+		Map<String, MultipartFile> fileMaps = request.getFileMap();
+		for (String key : fileMaps.keySet()) {
+			MultipartFile file = fileMaps.get(key);
+
+			SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+			String ymd = sdf.format(new Date());
+			savePath += ymd + "/";
+			saveUrl += ymd + "/";
+			File dirFile = new File(savePath);
+			if (!dirFile.exists()) {
+				dirFile.mkdirs();
+			}
+			log.info("上传文件名:" + file.getOriginalFilename());
+			log.info("上传文件大小:" + file.getBytes().length);
+			log.info("上传文件大小限制:" + maxSize);
+			log.info("上传文件大小是否超过限制:" + (file.getBytes().length > maxSize));
+			if (file.getBytes().length > maxSize) {
+				object.put("status", "err");
+				object.put("msg", "上传文件大小超过限制");
+				return object;
+			}
+			String fileName = file.getOriginalFilename();
+			String fileExt = fileName.substring(fileName.lastIndexOf(".") + 1).toLowerCase();
+
+			fileName = fileName.replace("." + fileExt, "");
+			fileName = getSensitive(fileName);
+			String newFileName = UUIDUtil.getRandomID() + UUIDUtil.getRandomID() + "." + fileExt;
+			File uploadedFile = new File(savePath, newFileName);
+			try {
+				FileCopyUtils.copy(file.getBytes(), uploadedFile);
+			} catch (Exception e) {
+				object.put("status", "err");
+				object.put("msg", "上传文件失败 "+e.getMessage());
+				return object;
+			}
+			log.info("saveUrl:" + saveUrl);
+			String visitPath = saveUrl + newFileName;
+			log.info("上传一个文件:" + newFileName);
+			log.info("访问路径:" + visitPath);
+			// 获取回调函数
+			/*
+			 * String callBack = request.getParameter("callBack"); String inputId =
+			 * request.getParameter("inputId"); request.setAttribute("status", "200");
+			 * request.setAttribute("callBack", callBack); request.setAttribute("inputId",
+			 * inputId); request.setAttribute("url", visitPath);
+			 */
+			object.put("path", visitPath);
+			object.put("fileName", fileName);
+			object.put("status", 200);
+			if (data != null) {
+				object.put("index", data);
+			}
+		}
+		return object;
+	}
+
+	/**
+	 * 检查文件名,过滤特殊字符
+	 * 
+	 * @author jiangyouyao
+	 * @email 512061637@qq.com
+	 * @date 2019年2月25日
+	 * @param globWords
+	 * @return
+	 */
+	public String getSensitive(String globWords) {
+
+		String sensitive = "";
+		Pattern pattern = Pattern.compile(AppConstance.SPECIAL_CHARACTERS);
+		Matcher matcher = pattern.matcher(globWords);
+		while (matcher.find()) {
+			sensitive += matcher.group();
+		}
+		/*
+		 * if(sensitive=="" || sensitive.length()<3 ){
+		 * sensitive=StringUtils.getRandomString(8); }
+		 */
+		return sensitive;
+	}
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/common/actions/ProjExceptionAction.java b/zq-erp/src/main/java/com/matrix/system/common/actions/ProjExceptionAction.java
index 7229a15..19ed8a3 100644
--- a/zq-erp/src/main/java/com/matrix/system/common/actions/ProjExceptionAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/common/actions/ProjExceptionAction.java
@@ -1,22 +1,16 @@
 package com.matrix.system.common.actions;
 
-import com.matrix.core.constance.MatrixConstance;
 import com.matrix.core.pojo.AjaxResult;
-import com.matrix.core.pojo.PaginationVO;
-import com.matrix.core.tools.WebUtil;
 import com.matrix.system.common.bean.ProjException;
-import com.matrix.system.common.bean.SysUsers;
-import com.matrix.system.common.constance.AppConstance;
 import com.matrix.system.common.dao.ProjExceptionDao;
-import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
 
 import java.util.Arrays;
-import java.util.List;
 
 /**
  * @author 姜友瑶
@@ -31,12 +25,19 @@
     ProjExceptionDao projExceptionDao;
 
     @RequestMapping(value = "/showException")
-    public @ResponseBody
-    AjaxResult showException(Long id) {
+    public
+    ModelAndView showException(Long id) {
         ProjException projException = projExceptionDao.selectById(id);
-        return AjaxResult.buildSuccessInstance(Arrays.asList(projException));
+        ModelAndView mv = new ModelAndView("common/showprojException");
+        mv.addObject("obj", projException);
+        return mv;
+
     }
 
+
+
+
+
     @RequestMapping(value = "/projException/del")
     public @ResponseBody
     AjaxResult del(@RequestBody ProjException projException) {
diff --git a/zq-erp/src/main/java/com/matrix/system/common/actions/SysRoleAction.java b/zq-erp/src/main/java/com/matrix/system/common/actions/SysRoleAction.java
index 3920353..d242a64 100644
--- a/zq-erp/src/main/java/com/matrix/system/common/actions/SysRoleAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/common/actions/SysRoleAction.java
@@ -1,5 +1,6 @@
 package com.matrix.system.common.actions;
 
+import com.matrix.component.redis.RedisClient;
 import com.matrix.core.anotations.RemoveRequestToken;
 import com.matrix.core.anotations.SaveRequestToken;
 import com.matrix.core.constance.MatrixConstance;
@@ -9,6 +10,7 @@
 import com.matrix.core.tools.StringUtils;
 import com.matrix.core.tools.WebUtil;
 import com.matrix.core.web.BaseAction;
+import com.matrix.system.common.authority.DefaultAuthorityManager;
 import com.matrix.system.common.bean.SysFnBtnRel;
 import com.matrix.system.common.bean.SysFunction;
 import com.matrix.system.common.bean.SysRole;
@@ -16,7 +18,6 @@
 import com.matrix.system.common.constance.AppVocabularyCode;
 import com.matrix.system.common.service.SysFunctionService;
 import com.matrix.system.common.service.SysRoleService;
-import com.matrix.system.constance.Dictionary;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -49,7 +50,8 @@
 	private SysFunctionService sysFunctionService;
 
 	public static final String BEV = "SYSROLE_BEV";
-
+	@Autowired
+	RedisClient redisClient;
 	/**
 	 * 列表显示
 	 * 
@@ -230,9 +232,11 @@
 		}
 		AjaxResult result = modify(sysRoleService, WebUtil.getSessionAttribute(BEV), sysRole, AppVocabularyCode.ROLE);
 		WebUtil.removeSessionAttribute(BEV);
+		redisClient.batchDel(DefaultAuthorityManager.USER_POWER_REDISKEY);
 		return result;
 	}
 
+
 	/**
 	 * 进入修改界面
 	 * 
diff --git a/zq-erp/src/main/java/com/matrix/system/common/actions/TestActionBB.java b/zq-erp/src/main/java/com/matrix/system/common/actions/TestActionBB.java
new file mode 100644
index 0000000..b4b02ed
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/common/actions/TestActionBB.java
@@ -0,0 +1,33 @@
+package com.matrix.system.common.actions;
+
+import com.matrix.component.wechat.externalInterface.weixinUtil.WeixinServiceUtil;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.web.BaseAction;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+/**
+ * 测试一下
+ */
+@RequestMapping(value = "/testb")
+@Controller
+public class TestActionBB extends BaseAction {
+
+	@Autowired
+	WeixinServiceUtil weixinServiceUtil;
+
+
+	@GetMapping(value = "/testPay/{no}")
+	@ResponseBody
+	public AjaxResult hiveMobileLoginOut(@PathVariable  String no) {
+		weixinServiceUtil.comPay("提现", no,1,"oJkRK4yelehsY4S7I6Ee1ydWtQMI",36L);
+		return AjaxResult.buildSuccessInstance("");
+	}
+
+
+
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/common/authority/DefaultAuthorityManager.java b/zq-erp/src/main/java/com/matrix/system/common/authority/DefaultAuthorityManager.java
index ce8ae52..4329524 100644
--- a/zq-erp/src/main/java/com/matrix/system/common/authority/DefaultAuthorityManager.java
+++ b/zq-erp/src/main/java/com/matrix/system/common/authority/DefaultAuthorityManager.java
@@ -1,8 +1,12 @@
 package com.matrix.system.common.authority;
 
+import cn.hutool.crypto.SecureUtil;
+import cn.hutool.json.JSONArray;
+import cn.hutool.json.JSONObject;
+import cn.hutool.json.JSONUtil;
+import com.matrix.component.redis.RedisClient;
 import com.matrix.core.constance.MatrixConstance;
 import com.matrix.core.pojo.AjaxResult;
-import com.matrix.core.tools.LogUtil;
 import com.matrix.core.tools.StringUtils;
 import com.matrix.core.tools.WebUtil;
 import com.matrix.system.common.authority.strategy.LoginStrategy;
@@ -17,7 +21,6 @@
 
 import java.util.*;
 import java.util.Map.Entry;
-import java.util.logging.Logger;
 
 /**
  * DefaultAuthorityManager 实现了权限控制接口
@@ -31,13 +34,21 @@
 
     private static final int DEFAULT_2 = 2;
 
+    public static final String USER_POWER_REDISKEY = "USER_POWER_";
+    public static final String USER_POWER_REDISKEY_PC = "USER_POWER_PC";
+
     @Autowired
     SysFunctionService sysFunctionService;
 
     public static final String USERFUNCTION = "userFunction";
     public static final String MENUSFUNCTION = "menusFunction";
-    /** 用户所有路径权限的记录 **/
+    /**
+     * 用户所有路径权限的记录
+     **/
     public static final String USER_URL_MAPPING = "userUrlMapping";
+
+    @Autowired
+    RedisClient redisClient;
 
     private DefaultAuthorityManager() {
     }
@@ -90,6 +101,7 @@
 
     /**
      * 判断用户是否具有功能权限
+     *
      * @return
      */
     @Override
@@ -108,10 +120,10 @@
     /**
      * 初始化用户权限
      *
+     * @param result
      * @author JIANGYOUYAO
      * @email 935090232@qq.com
      * @date 2017年12月5日
-     * @param result
      */
     public void initUserPower(AjaxResult result) {
 
@@ -127,11 +139,43 @@
         // 用户的所有功能权限用id记录,方便后面查询菜单树形结构
         Map<String, SysFunction> menuFunctionMap = new TreeMap<>();
 
-        // 获取用户所有权限
-        getUserFunction(userFunction, menuFunctionMap, userUrlMapping);
+        SysUsers sysUser = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
 
-        // 组装菜单
-        assembleMenu(menuFunction, menuFunctionMap);
+        String redisKey = USER_POWER_REDISKEY_PC + SecureUtil.md5(sysUser.getSuId()+"");
+        String cachedValue = redisClient.getCachedValue(redisKey);
+        if (StringUtils.isNotBlank(cachedValue)) {
+            //从缓存中获取用户权限
+            JSONObject powerMap = JSONUtil.parseObj(cachedValue);
+            String userFunctionMapStr = powerMap.get(USERFUNCTION).toString();
+            JSONObject userFunctionMap = JSONUtil.parseObj(userFunctionMapStr);
+            Set<String> userFunctionMapKeys = userFunctionMap.keySet();
+            userFunctionMapKeys.forEach(key -> {
+                userFunction.put(key, userFunctionMap.get(key, SysFunction.class));
+            });
+            String menusFunctionListStr = powerMap.get(MENUSFUNCTION).toString();
+            JSONArray menusFunctionArray = JSONUtil.parseArray(menusFunctionListStr);
+            for (int i = 0; i < menusFunctionArray.size(); i++) {
+                menuFunction.add(menusFunctionArray.get(i, SysFunction.class));
+            }
+            String userUrlMappingListStr = powerMap.get(USER_URL_MAPPING).toString();
+            JSONArray userUrlMappingArray = JSONUtil.parseArray(userUrlMappingListStr);
+            for (int i = 0; i < userUrlMappingArray.size(); i++) {
+                userUrlMapping.add(userUrlMappingArray.get(i, String.class));
+            }
+        } else {
+            // 获取用户所有权限
+            getUserFunction(userFunction, menuFunctionMap, userUrlMapping);
+
+            // 组装菜单
+            assembleMenu(menuFunction, menuFunctionMap);
+
+            Map<String ,Object> powerMap=new HashMap<>();
+            powerMap.put(USERFUNCTION, userFunction);
+            powerMap.put(MENUSFUNCTION, menuFunction);
+            powerMap.put(USER_URL_MAPPING, userUrlMapping);
+            redisClient.saveValue(redisKey,JSONUtil.parseObj(powerMap,true));
+        }
+
 
         // 把用户菜单和用户的功能都存在session中。
         WebUtil.setSessionAttribute(USERFUNCTION, userFunction);
@@ -145,12 +189,12 @@
     /**
      * 获取用的功能,包括菜单功能和非菜单功能
      *
-     * @author JIANGYOUYAO
-     * @email 935090232@qq.com
-     * @date 2017年12月5日
      * @param userFunctionMap
      * @param menuFunctionMap
      * @param userUrlMapping
+     * @author JIANGYOUYAO
+     * @email 935090232@qq.com
+     * @date 2017年12月5日
      */
     private void getUserFunction(Map<String, SysFunction> userFunctionMap, Map<String, SysFunction> menuFunctionMap,
                                  List<String> userUrlMapping) {
@@ -165,7 +209,7 @@
 
                 userFunctionMap.put(sysFunction.getFnCode(), sysFunction);
                 // 注册访问路径
-                registerUrlMapping(userUrlMapping, sysFunction,true);
+                registerUrlMapping(userUrlMapping, sysFunction, true);
 
                 // 如果是菜单功能单独记录
                 if (AppConstance.IS_Y.equals(sysFunction.getFnShowMenu())) {
@@ -177,7 +221,7 @@
             List<SysFunction> userFunctionList = sysFunctionService.findFunctionByRoleIds(sysUser.getRoleIds());
             for (SysFunction sysFunction : userFunctionList) {
                 // TODO注册访问路径
-                registerUrlMapping(userUrlMapping, sysFunction,false);
+                registerUrlMapping(userUrlMapping, sysFunction, false);
 
 
                 if (userFunctionMap.containsKey(sysFunction.getFnCode())) {
@@ -204,11 +248,11 @@
     /**
      * 注册功能和按钮的访问路径
      *
+     * @param userUrlMapping
+     * @param sysFunction
      * @author JIANGYOUYAO
      * @email 935090232@qq.com
      * @date 2017年12月8日
-     * @param userUrlMapping
-     * @param sysFunction
      */
     private void registerUrlMapping(List<String> userUrlMapping, SysFunction sysFunction, boolean isAdmin) {
         String path = sysFunction.getFnPath();
@@ -220,7 +264,7 @@
         if (CollectionUtils.isNotEmpty(btnRels)) {
             for (SysFnBtnRel sysFnBtnRel : btnRels) {
                 //公司管理员可以添加所有按钮权限否则只能添加员工自己所有拥有的权限
-                if(isAdmin ||StringUtils.isContentSet(sysFnBtnRel.getBtnValue(),sysFunction.getRpfBns())){
+                if (isAdmin || StringUtils.isContentSet(sysFnBtnRel.getBtnValue(), sysFunction.getRpfBns())) {
                     String btnPath = sysFnBtnRel.getFbPath();
                     if (StringUtils.isNotBlank(btnPath) && !userUrlMapping.contains(btnPath)) {
                         userUrlMapping.add(btnPath);
@@ -233,11 +277,11 @@
     /**
      * 把菜单组装成树形结构
      *
+     * @param menuFunction
+     * @param menuFunctionMap
      * @author JIANGYOUYAO
      * @email 935090232@qq.com
      * @date 2017年12月5日
-     * @param menuFunction
-     * @param menuFunctionMap
      */
     private void assembleMenu(List<SysFunction> menuFunction, Map<String, SysFunction> menuFunctionMap) {
         // 将map.entrySet()转换成list,并按照功能的FnSequence倒序
@@ -261,7 +305,7 @@
             } else {
                 // 非一级节点找到父节点后存入
                 SysFunction parentFn = menuFunctionMap.get(String.valueOf(function.getFnParentId()));
-                if(parentFn!=null){
+                if (parentFn != null) {
                     List<SysFunction> childs = parentFn.getChilds();
                     if (childs == null) {
                         parentFn.setChilds(new ArrayList<SysFunction>());
diff --git a/zq-erp/src/main/java/com/matrix/system/common/authority/strategy/ScanQrCodeLogin.java b/zq-erp/src/main/java/com/matrix/system/common/authority/strategy/ScanQrCodeLogin.java
new file mode 100644
index 0000000..b9cd2ac
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/common/authority/strategy/ScanQrCodeLogin.java
@@ -0,0 +1,82 @@
+package com.matrix.system.common.authority.strategy;
+
+import com.matrix.component.websoket.WebSoketScanQrCodeLoginObserver;
+import com.matrix.core.constance.MatrixConstance;
+import com.matrix.core.exception.GlobleException;
+import com.matrix.core.tools.LogUtil;
+import com.matrix.core.tools.WebUtil;
+import com.matrix.system.common.bean.SysUserLoginRecord;
+import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.common.constance.AppConstance;
+import com.matrix.system.common.constance.AppMessageCode;
+import com.matrix.system.common.service.SysUsersService;
+
+import java.util.Date;
+
+/**
+ * 账号密码登录策略
+ *
+ * @author JIANGYOUYAO
+ * @email 935090232@qq.com
+ * @date 2017年12月9日
+ */
+public class ScanQrCodeLogin implements LoginStrategy {
+
+    private SysUsersService sysUsersService;
+
+
+    private String loginQrCodeKey;
+
+    public ScanQrCodeLogin(SysUsersService sysUsersService, String loginQrCodeKey) {
+
+        this.sysUsersService = sysUsersService;
+        this.loginQrCodeKey = loginQrCodeKey;
+    }
+
+    @Override
+    public Object login() {
+
+        Long loginUserId = WebSoketScanQrCodeLoginObserver.getScanCashValue(loginQrCodeKey);
+
+        if (loginUserId != null) {
+            SysUsers loginUser = sysUsersService.findById(loginUserId);
+            if (loginUser != null) {
+                addErrorLoginRecord(loginUser,AppConstance.LOGIN_SUCCESS);
+                return loginUser;
+            } else {
+                LogUtil.error("登录失败");
+                throw new GlobleException(AppMessageCode.User.ACCOUNT_NOT_EXIST);
+            }
+        }
+
+        LogUtil.error("登录失败");
+        throw new GlobleException(AppMessageCode.User.ACCOUNT_NOT_EXIST);
+    }
+
+
+    /**
+     * 添加登录记录
+     *
+     * @param loginUser
+     * @param loginResult
+     * @author JIANGYOUYAO
+     * @email 935090232@qq.com
+     * @date 2017年12月12日
+     */
+    private void addErrorLoginRecord(SysUsers loginUser, int loginResult) {
+
+        if (AppConstance.LOGIN_SUCCESS.equals(loginResult)) {
+            sysUsersService.cleanUserTodayErrorLoginTime(loginUser.getSuAccount());
+        }
+        SysUserLoginRecord loginRecord = new SysUserLoginRecord();
+        loginRecord.setCreateBy(MatrixConstance.SYSTEM_USER);
+        loginRecord.setUpdateBy(MatrixConstance.SYSTEM_USER);
+        loginRecord.setLrLoginTime(new Date());
+        loginRecord.setLrId(null);
+        loginRecord.setUserAccount(loginUser.getSuAccount());
+        loginRecord.setLrResult(loginResult);
+        loginRecord.setLrIp(WebUtil.getCustomerIp());
+        loginRecord.setLrValid(AppConstance.RECORD_VALID);
+        sysUsersService.addUserLoginRecord(loginRecord);
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/common/bean/SysFnBtnRel.java b/zq-erp/src/main/java/com/matrix/system/common/bean/SysFnBtnRel.java
index 2c67c60..7e81a99 100644
--- a/zq-erp/src/main/java/com/matrix/system/common/bean/SysFnBtnRel.java
+++ b/zq-erp/src/main/java/com/matrix/system/common/bean/SysFnBtnRel.java
@@ -1,7 +1,9 @@
 package com.matrix.system.common.bean;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.matrix.core.anotations.Extend;
-import com.matrix.core.pojo.EntityDTO;
+
+import java.util.Date;
 
 /**
  * 功能按钮关系表
@@ -9,11 +11,21 @@
  * @email 935090232@qq.com
  * @date 2017年12月3日
  */
-public class SysFnBtnRel extends EntityDTO {
+public class SysFnBtnRel   {
 
 	@Extend
 	private static final long serialVersionUID = 1L;
-	
+
+	private String createBy;
+
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone="GMT+8")
+	private Date createTime;
+
+	private String updateBy;
+
+	private Date updateTime;
+
+
 	/** 主键:这个关系表物理主键在修改比较中不参与比较 **/
 	@Extend
 	private Long fbId;
@@ -80,4 +92,36 @@
 	public void setBtnKey(String btnKey) {
 		this.btnKey = btnKey;
 	}
+
+	public String getCreateBy() {
+		return createBy;
+	}
+
+	public void setCreateBy(String createBy) {
+		this.createBy = createBy;
+	}
+
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	public String getUpdateBy() {
+		return updateBy;
+	}
+
+	public void setUpdateBy(String updateBy) {
+		this.updateBy = updateBy;
+	}
+
+	public Date getUpdateTime() {
+		return updateTime;
+	}
+
+	public void setUpdateTime(Date updateTime) {
+		this.updateTime = updateTime;
+	}
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/common/bean/SysFunction.java b/zq-erp/src/main/java/com/matrix/system/common/bean/SysFunction.java
index 318325b..2f03b79 100644
--- a/zq-erp/src/main/java/com/matrix/system/common/bean/SysFunction.java
+++ b/zq-erp/src/main/java/com/matrix/system/common/bean/SysFunction.java
@@ -1,9 +1,9 @@
 package com.matrix.system.common.bean;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.matrix.core.anotations.Extend;
-import com.matrix.core.pojo.EntityDTO;
 
-import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -12,10 +12,19 @@
  * @email 935090232@qq.com
  * @date 2017年12月3日
  */
-public class SysFunction extends EntityDTO {
+public class SysFunction  {
 
 	@Extend
 	private static final long serialVersionUID = 1L;
+
+	private String createBy;
+
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone="GMT+8")
+	private Date createTime;
+
+	private String updateBy;
+
+	private Date updateTime;
 
 	private Long fnId;
 
@@ -203,4 +212,39 @@
 		this.fnCode = fnCode;
 	}
 
+	public String getCreateBy() {
+		return createBy;
+	}
+
+	public void setCreateBy(String createBy) {
+		this.createBy = createBy;
+	}
+
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	public String getUpdateBy() {
+		return updateBy;
+	}
+
+	public void setUpdateBy(String updateBy) {
+		this.updateBy = updateBy;
+	}
+
+	public Date getUpdateTime() {
+		return updateTime;
+	}
+
+	public void setUpdateTime(Date updateTime) {
+		this.updateTime = updateTime;
+	}
+
+	public boolean isHasThisFn() {
+		return hasThisFn;
+	}
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/common/bean/SysUsers.java b/zq-erp/src/main/java/com/matrix/system/common/bean/SysUsers.java
index 19aee94..c8fe8d7 100644
--- a/zq-erp/src/main/java/com/matrix/system/common/bean/SysUsers.java
+++ b/zq-erp/src/main/java/com/matrix/system/common/bean/SysUsers.java
@@ -19,8 +19,11 @@
     private static final long serialVersionUID = 1L;
 
     /** 有效*/
+    @Extend
     public static final String VALID_Y="Y";
+
     /** 无效*/
+    @Extend
     public static final String VALID_N="N";
 
     private Long suId;
diff --git a/zq-erp/src/main/java/com/matrix/system/common/constance/AppConstance.java b/zq-erp/src/main/java/com/matrix/system/common/constance/AppConstance.java
index 957ed99..fcd90d7 100644
--- a/zq-erp/src/main/java/com/matrix/system/common/constance/AppConstance.java
+++ b/zq-erp/src/main/java/com/matrix/system/common/constance/AppConstance.java
@@ -12,6 +12,8 @@
     public static final String WX_ORDER_FLAG = "微商城同步订单";
     public static final String ZONGDIAN = "总店";
 
+
+
     private AppConstance() {
     }
 
@@ -549,16 +551,32 @@
      */
     public static final String WECHARPAY_NOTIFYURL = "wecharPaynotifyUrl";
     /**
+     * 充值支付通知地址
+     */
+    public static final String WECHARPAY_RECHARGE_NOTIFYURL = "wecharpayRechargeNotifyurl";
+
+
+    /**
      * 支付证书地址
      */
     public static final String WECHARPAY_CERTLOCAL_PATH = "certLocalPath";
 
+    /**
+     * APP管理模块Banner
+     */
+    public static final String APP_BANNER_GL = "APP_BANNER_GL";
 
 
+    /**
+     * 是否管理产品库存
+     */
+    public static final String WAREHOUSE_MANAGE_STOCK = "WAREHOUSE_MANAGE_STOCK";
 
 
-
-
+    /**
+     * 家居产品销售是否生成消耗业绩
+     */
+    public static final String SHOP_MANAGE_JJCPAS_CONSUME = "shopManageJjcpasConsume";
 
 
 
diff --git a/zq-erp/src/main/java/com/matrix/system/common/dao/BusParameterSettingsDao.java b/zq-erp/src/main/java/com/matrix/system/common/dao/BusParameterSettingsDao.java
index 9b7b29a..22a7752 100644
--- a/zq-erp/src/main/java/com/matrix/system/common/dao/BusParameterSettingsDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/common/dao/BusParameterSettingsDao.java
@@ -1,52 +1,52 @@
-package com.matrix.system.common.dao;
-
-import com.matrix.core.pojo.PaginationVO;
-import com.matrix.system.common.bean.BusParameterSettings;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * This field was generated by Zking.software.Codegen.
- * @date 2016-11-28 16:55
- */
- 
-
-public interface BusParameterSettingsDao {
-
-	public int insert(BusParameterSettings busParameterSettings);
-   	
-   	public int batchInsert(@Param("list") List<BusParameterSettings> busParameterSettingsList);
-   	
-	public int updateByMap(Map<String, Object> modifyMap);
-	
-	public int updateByModel(BusParameterSettings busParameterSettings);
-	
-	public int deleteByIds(@Param("list") List<Long> list);
-	
-	public int deleteById(Long paramId);
-
-	public int deleteByModel(@Param("record") BusParameterSettings busParameterSettings);
-	
-	public List<BusParameterSettings> selectInPage(@Param("record") BusParameterSettings busParameterSettings, @Param("pageVo") PaginationVO pageVo);
-
-	public List<BusParameterSettings> selectByModel(@Param("record") BusParameterSettings busParameterSettings);
-	
-	public int  selectTotalRecord(@Param("record") BusParameterSettings busParameterSettings);
-	
-	public BusParameterSettings  selectById(Long paramId);
-	
-	public BusParameterSettings  selectForUpdate(Long paramId);
-
-    List<BusParameterSettings> selectByCodes(@Param("list")List<String> codeList, @Param("companyId")Long companyId,@Param("shopId")Long shopId);
-
-
-
-	BusParameterSettings selectByCode(@Param("code")String code, @Param("companyId")Long companyId,@Param("shopId")Long shopId);
-
-	BusParameterSettings selectCompanyParamByCode(@Param("code")String code, @Param("companyId")Long companyId);
-
-	int updateParams(@Param("list")List<BusParameterSettings> parameterSettings, @Param("companyId")Long companyId);
+package com.matrix.system.common.dao;
+
+import com.matrix.core.pojo.PaginationVO;
+import com.matrix.system.common.bean.BusParameterSettings;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * This field was generated by Zking.software.Codegen.
+ * @date 2016-11-28 16:55
+ */
+ 
+
+public interface BusParameterSettingsDao {
+
+	public int insert(BusParameterSettings busParameterSettings);
+   	
+   	public int batchInsert(@Param("list") List<BusParameterSettings> busParameterSettingsList);
+   	
+	public int updateByMap(Map<String, Object> modifyMap);
+	
+	public int updateByModel(BusParameterSettings busParameterSettings);
+	
+	public int deleteByIds(@Param("list") List<Long> list);
+	
+	public int deleteById(Long paramId);
+
+	public int deleteByModel(@Param("record") BusParameterSettings busParameterSettings);
+	
+	public List<BusParameterSettings> selectInPage(@Param("record") BusParameterSettings busParameterSettings, @Param("pageVo") PaginationVO pageVo);
+
+	public List<BusParameterSettings> selectByModel(@Param("record") BusParameterSettings busParameterSettings);
+	
+	public int  selectTotalRecord(@Param("record") BusParameterSettings busParameterSettings);
+	
+	public BusParameterSettings  selectById(Long paramId);
+	
+	public BusParameterSettings  selectForUpdate(Long paramId);
+
+    List<BusParameterSettings> selectByCodes(@Param("list")List<String> codeList, @Param("companyId")Long companyId,@Param("shopId")Long shopId);
+
+	List<BusParameterSettings> selectByCodesAndCompanyId(@Param("list")List<String> codeList, @Param("companyId")Long companyId);
+
+	BusParameterSettings selectByCode(@Param("code")String code, @Param("companyId")Long companyId,@Param("shopId")Long shopId);
+
+	BusParameterSettings selectCompanyParamByCode(@Param("code")String code, @Param("companyId")Long companyId);
+
+	int updateParams(@Param("list")List<BusParameterSettings> parameterSettings, @Param("companyId")Long companyId);
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/common/dto/WebLoginDto.java b/zq-erp/src/main/java/com/matrix/system/common/dto/WebLoginDto.java
new file mode 100644
index 0000000..73561e3
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/common/dto/WebLoginDto.java
@@ -0,0 +1,32 @@
+package com.matrix.system.common.dto;
+
+import lombok.Data;
+
+@Data
+public class WebLoginDto {
+
+    public static final Integer ACCOUNT_LOGIN=1;
+
+    public static final Integer SCANQRCORD_LOGIN=2;
+
+
+    /**
+     * 账号
+     */
+    private String suAccount;
+
+    /**
+     * 密码
+     */
+    private String suPassword;
+
+    /**
+     * 登录方式1,账号密码,2扫码
+     */
+    private Integer loginType;
+    /**
+     * 终端标识
+     */
+    private String loginQrCodeKey;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/common/interceptor/ApiUserLoginInterceptor.java b/zq-erp/src/main/java/com/matrix/system/common/interceptor/ApiUserLoginInterceptor.java
index 64dfd5e..e21ef75 100644
--- a/zq-erp/src/main/java/com/matrix/system/common/interceptor/ApiUserLoginInterceptor.java
+++ b/zq-erp/src/main/java/com/matrix/system/common/interceptor/ApiUserLoginInterceptor.java
@@ -3,7 +3,6 @@
 import com.alibaba.fastjson.JSONObject;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.matrix.component.redis.RedisClient;
-import com.matrix.component.redis.RedisUserLoginUtils;
 import com.matrix.core.constance.MatrixConstance;
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.core.tools.LogUtil;
@@ -11,8 +10,6 @@
 import com.matrix.core.tools.StringUtils;
 import com.matrix.system.common.bean.SysUsers;
 import com.matrix.system.common.dao.SysUsersDao;
-import com.matrix.system.hive.bean.SysVipInfo;
-import com.matrix.system.hive.dao.SysVipInfoDao;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
@@ -46,11 +43,11 @@
 
     @Override
     public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
-       /*if ("dev".equals(evn)) {
-            SysUsers sysUsers = sysUsersDao.selectById(1012L);
+    if ("dev".equals(evn)) {
+            SysUsers sysUsers = sysUsersDao.selectById(1060L);
             request.getSession().setAttribute(MatrixConstance.LOGIN_KEY, sysUsers);
             return true;
-        }*/
+        }
 
         String token = resolveToken(request,privateKey);
         AjaxResult ajaxResult = new AjaxResult();
diff --git a/zq-erp/src/main/java/com/matrix/system/common/service/impl/InitBusParameterSettingService.java b/zq-erp/src/main/java/com/matrix/system/common/service/impl/InitBusParameterSettingService.java
new file mode 100644
index 0000000..b7f5673
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/common/service/impl/InitBusParameterSettingService.java
@@ -0,0 +1,68 @@
+package com.matrix.system.common.service.impl;
+
+import com.matrix.system.common.bean.BusParameterSettings;
+import com.matrix.system.common.bean.SysCompany;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
+import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant;
+import com.matrix.system.score.constant.ScoreSettingConstant;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Service
+public class InitBusParameterSettingService {
+
+    @Autowired
+    private BusParameterSettingsDao busParameterSettingsDao;
+
+    /**
+     * 初始化默认积分规则设置
+     */
+    public void initBusParameterSetting(SysCompany sysCompany) {
+        long companyId = sysCompany.getComId();
+        List<BusParameterSettings> ruleSettings=new ArrayList<>();
+
+        ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.VALID_PERIOD_POINTS, companyId));
+        ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.CREDIT_POINTS_CASH, companyId));
+
+        ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.CASH_CONSUMPTION, companyId));
+        ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.PRINCIPAL_BALANCE_CONSUMPTION, companyId));
+        ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.BONUS_BALANCE_CONSUMPTION, companyId));
+        ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.PRINCIPAL_CONSUMPTION, companyId));
+        ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.GIVE_CONSUMPTION, companyId));
+        ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.REFERRALS_CONSUMPTION, companyId));
+
+        ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.CASH_CONSUMPTION_SHOP, companyId));
+        ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.RESERVATION_SERVICE_SHOP, companyId));
+        ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.EVALUATUIN_ORDER_SHOP, companyId));
+
+        busParameterSettingsDao.batchInsert(ruleSettings);
+    }
+
+    /**
+     * 初始化默认分销规则设置
+     */
+    public void initBusParameterFenxiaoSetting(SysCompany sysCompany) {
+        long companyId = sysCompany.getComId();
+        List<BusParameterSettings> ruleSettings=new ArrayList<>();
+        ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_SWITCH, companyId));
+        ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_MODEL, companyId));
+        ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_APPLY_WAY, companyId));
+        ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_AUDIT_METHOD, companyId));
+        ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_APPLY_CONDITION, companyId));
+        ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_TG_PLAN, companyId));
+        ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_TG_POSTER, companyId));
+        ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_ZGFY, companyId));
+        busParameterSettingsDao.batchInsert(ruleSettings);
+    }
+
+    private BusParameterSettings addScoreRuleSetting(String code,long companyId) {
+        BusParameterSettings busParameterSetting = new BusParameterSettings();
+        busParameterSetting.setParamCode(code);
+        busParameterSetting.setCompanyId(companyId);
+        return busParameterSetting;
+    }
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/common/service/impl/SysCompanyServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/common/service/impl/SysCompanyServiceImpl.java
index 1521bd2..da1be03 100644
--- a/zq-erp/src/main/java/com/matrix/system/common/service/impl/SysCompanyServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/common/service/impl/SysCompanyServiceImpl.java
@@ -1,245 +1,250 @@
-package com.matrix.system.common.service.impl;
-
-import com.matrix.core.constance.MatrixConstance;
-import com.matrix.core.constance.SystemErrorCode;
-import com.matrix.core.exception.GlobleException;
-import com.matrix.core.pojo.PaginationVO;
-import com.matrix.core.tools.ModelUtils;
-import com.matrix.core.tools.StringUtils;
-import com.matrix.core.tools.WebUtil;
-import com.matrix.system.common.bean.*;
-import com.matrix.system.common.dao.SysCompanyDao;
-import com.matrix.system.common.dao.SysRoleDao;
-import com.matrix.system.common.dao.SysRolePwoerFnDao;
-import com.matrix.system.common.service.SysCompanyService;
-import com.matrix.system.hive.bean.SysShopInfo;
-import com.matrix.system.hive.bean.Warehouse;
-import com.matrix.system.hive.dao.SysShopInfoDao;
-import com.matrix.system.hive.dao.WarehouseDao;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 公司管理
- * 
- * @author JIANGYOUYAO
- * @email 935090232@qq.com
- * @date Dec 11, 2017
- */
-@Service
-public class SysCompanyServiceImpl implements SysCompanyService {
-
-	@Autowired
-	private SysCompanyDao sysCompanyDao;
-	@Autowired
-	private SysRoleDao sysRoleDao;
-	@Autowired
-	private SysRolePwoerFnDao rolePwoerFnDao;
-
-	@Autowired
-	private SysShopInfoDao shopInfoDao;
-
-
-	@Autowired
-	private InitCustomerDataDictionaryService initCustomerDataDictionaryService;
-
-
-	@Autowired
-	private InitShoppingGoodsCategoryService initShoppingGoodsCategoryService;
-
-
-	@Autowired
-	private InitRolePowerService initRolePowerService;
-
-	@Autowired
-	private InitGoodsTypeService initGoodsTypeService;
-
-	@Autowired
-	private InitShopProductCateService initShopProductCateService;
-
-
-	@Transactional
-	@Override
-	public int add(SysCompany sysCompany) {
-		SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
-		sysCompany.setCreateBy(user.getSuName());
-		sysCompany.setUpdateBy(user.getSuName());
-		int i= sysCompanyDao.insert(sysCompany);
-		SysShopInfo zbShop=	addZbShop(sysCompany);
-		initCustomerDataDictionaryService.initCustomerDataDictionary(sysCompany);
-		initShoppingGoodsCategoryService.initShoppingGoodsCategory(sysCompany,zbShop);
-		initRolePowerService.initRolePower(sysCompany);
-		initGoodsTypeService.initRolePower(sysCompany);
-		initShopProductCateService.initShopProductCate(sysCompany);
-
-		return i;
-
-	}
-
-
-	@Autowired
-	private WarehouseDao warehouseDao;
-	/**
-	 * 为新公司创建一个总部
-	 * @param sysCompany
-	 */
-	private SysShopInfo addZbShop(SysCompany sysCompany) {
-		SysShopInfo zbShopInfo=new SysShopInfo();
-		zbShopInfo.setShopType(SysShopInfo.SHOP_TYPE_ZONGBU);
-		zbShopInfo.setShopName(sysCompany.getComName()+"(总部)");
-		zbShopInfo.setCompanyId(sysCompany.getComId());
-		zbShopInfo.setShopTel(sysCompany.getComTel());
-		zbShopInfo.setShopShortName("总部");
-		zbShopInfo.setIsOpenNet(SysShopInfo.CLOSE_NET);
-		zbShopInfo.setShopNo(StringUtils.getRandomString(10));
-		shopInfoDao.insert(zbShopInfo);
-
-		//新增一个总部仓库
-		Warehouse warehouse=new Warehouse();
-		warehouse.setCompanyId(sysCompany.getComId());
-		warehouse.setName("总部仓库");
-		warehouse.setShopId(zbShopInfo.getId());
-		warehouse.setSort("1");
-		warehouseDao.insert(warehouse);
-		return  zbShopInfo;
-	}
-
-	@Transactional(rollbackFor = Exception.class)
-	@Override
-	public int modifyByMap(SysCompany oldSysCompany, SysCompany newSysCompany) {
-		SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
-		newSysCompany.setUpdateBy(user.getSuName());
-
-		updatePower(newSysCompany);
-		Map<String, Object> modifyMap = null;
-		try {
-			if (!ModelUtils.isModified(oldSysCompany, newSysCompany)) {
-				return MatrixConstance.DML_SUCCESSS;
-			}
-
-			modifyMap = ModelUtils.comparePojo2Map(oldSysCompany, newSysCompany);
-		} catch (Exception e) {
-			throw new GlobleException(SystemErrorCode.DATA_UPDATE_FAIL, e, newSysCompany.getComName());
-		}
-		if (modifyMap.size() > 0) {
-			modifyMap.put("comId", oldSysCompany.getComId());
-			return sysCompanyDao.updateByMap(modifyMap);
-		}
-		return MatrixConstance.DML_SUCCESSS;
-	}
-
-	/**
-	 * 更新公司员工权限
-	 * 
-	 * @author JIANGYOUYAO
-	 * @email 935090232@qq.com
-	 * @date 2017年12月5日
-	 * @param newSysCompany
-	 */
-	private void updatePower(SysCompany newSysCompany) {
-		List<String> oldFunctions = null;
-		String functions = sysCompanyDao.selectById(newSysCompany.getComId()).getComFunctions();
-		if (functions == null || functions.equals("")) {
-			oldFunctions = new ArrayList<>();
-		} else {
-			oldFunctions = StringUtils
-					.strToCollToString(sysCompanyDao.selectById(newSysCompany.getComId()).getComFunctions(), ",");
-		}
-		List<String> newFunctions = new ArrayList<>();
-		if (StringUtils.isNotBlank(newSysCompany.getComFunctions())) {
-			newFunctions = StringUtils.strToCollToString(newSysCompany.getComFunctions(), ",");
-		}
-
-		for (String old : oldFunctions) {
-			// 如果新权限中不包含这个老的功能,则要更新改企业下所有的角色权限
-			if (!newFunctions.contains(old)) {
-				SysRole role = new SysRole();
-				role.setCompanyId(newSysCompany.getComId());
-				List<SysRole> roles = sysRoleDao.selectByModel(role);
-				// 获取该公司下所有的权限信息
-				List<SysRolePwoerFn> compalyRolePwoer = new ArrayList<>();
-				for (SysRole tempRole : roles) {
-					SysRolePwoerFn r = new SysRolePwoerFn();
-					r.setRoleId(tempRole.getRoleId());
-					compalyRolePwoer.addAll(rolePwoerFnDao.selectByModel(r));
-				}
-				// 记录要删除的id
-				List<String> delRolePwoer = new ArrayList<>();
-				for (SysRolePwoerFn rolePwoer : compalyRolePwoer) {
-					// 如果有一个老权限则删除这个权限
-					if (rolePwoer.getFnId() != null && rolePwoer.getFnId().equals(old)) {
-						delRolePwoer.add(rolePwoer.getRpfId()+"");
-					}
-				}
-				// 如果获取到了就删除
-				if (!delRolePwoer.isEmpty()) {
-					rolePwoerFnDao.deleteByIds(delRolePwoer);
-				}
-			}
-		}
-	}
-
-	@Override
-	public int modifyByModel(SysCompany sysCompany) {
-
-		return sysCompanyDao.updateByModel(sysCompany);
-
-	}
-
-	@Override
-	public int remove(List<String> list) {
-
-		return sysCompanyDao.deleteByIds(list);
-
-	}
-
-	@Override
-	public int removeById(String comId) {
-
-		return sysCompanyDao.deleteById(Long.parseLong(comId));
-
-	}
-
-	@Override
-	public int removeByModel(SysCompany sysCompany) {
-
-		return sysCompanyDao.deleteByModel(sysCompany);
-
-	}
-
-	@Override
-	public List<SysCompany> findInPage(SysCompany sysCompany, PaginationVO pageVo) {
-
-		return sysCompanyDao.selectInPage(sysCompany, pageVo);
-
-	}
-
-	@Override
-	public List<SysCompany> findByModel(SysCompany sysCompany) {
-
-		return sysCompanyDao.selectByModel(sysCompany);
-
-	}
-
-	@Override
-	public int findTotal(SysCompany sysCompany) {
-
-		return sysCompanyDao.selectTotalRecord(sysCompany);
-
-	}
-
-	@Override
-	public SysCompany findById(String comId) {
-
-		return sysCompanyDao.selectById(Long.parseLong(comId));
-
-	}
-
-
-
+package com.matrix.system.common.service.impl;
+
+import com.matrix.core.constance.MatrixConstance;
+import com.matrix.core.constance.SystemErrorCode;
+import com.matrix.core.exception.GlobleException;
+import com.matrix.core.pojo.PaginationVO;
+import com.matrix.core.tools.ModelUtils;
+import com.matrix.core.tools.StringUtils;
+import com.matrix.core.tools.WebUtil;
+import com.matrix.system.common.bean.*;
+import com.matrix.system.common.dao.SysCompanyDao;
+import com.matrix.system.common.dao.SysRoleDao;
+import com.matrix.system.common.dao.SysRolePwoerFnDao;
+import com.matrix.system.common.service.SysCompanyService;
+import com.matrix.system.hive.bean.SysShopInfo;
+import com.matrix.system.hive.bean.Warehouse;
+import com.matrix.system.hive.dao.SysShopInfoDao;
+import com.matrix.system.hive.dao.WarehouseDao;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 公司管理
+ * 
+ * @author JIANGYOUYAO
+ * @email 935090232@qq.com
+ * @date Dec 11, 2017
+ */
+@Service
+public class SysCompanyServiceImpl implements SysCompanyService {
+
+	@Autowired
+	private SysCompanyDao sysCompanyDao;
+	@Autowired
+	private SysRoleDao sysRoleDao;
+	@Autowired
+	private SysRolePwoerFnDao rolePwoerFnDao;
+
+	@Autowired
+	private SysShopInfoDao shopInfoDao;
+
+
+	@Autowired
+	private InitCustomerDataDictionaryService initCustomerDataDictionaryService;
+
+
+	@Autowired
+	private InitShoppingGoodsCategoryService initShoppingGoodsCategoryService;
+
+
+	@Autowired
+	private InitRolePowerService initRolePowerService;
+
+	@Autowired
+	private InitGoodsTypeService initGoodsTypeService;
+
+	@Autowired
+	private InitShopProductCateService initShopProductCateService;
+
+	@Autowired
+	private InitBusParameterSettingService initBusParameterSettingService;
+
+
+	@Transactional
+	@Override
+	public int add(SysCompany sysCompany) {
+		SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+		sysCompany.setCreateBy(user.getSuName());
+		sysCompany.setUpdateBy(user.getSuName());
+		int i= sysCompanyDao.insert(sysCompany);
+		SysShopInfo zbShop=	addZbShop(sysCompany);
+		initCustomerDataDictionaryService.initCustomerDataDictionary(sysCompany);
+		initShoppingGoodsCategoryService.initShoppingGoodsCategory(sysCompany,zbShop);
+		initRolePowerService.initRolePower(sysCompany);
+		initGoodsTypeService.initRolePower(sysCompany);
+		initShopProductCateService.initShopProductCate(sysCompany);
+		initBusParameterSettingService.initBusParameterSetting(sysCompany);
+		initBusParameterSettingService.initBusParameterFenxiaoSetting(sysCompany);
+
+		return i;
+
+	}
+
+
+	@Autowired
+	private WarehouseDao warehouseDao;
+	/**
+	 * 为新公司创建一个总部
+	 * @param sysCompany
+	 */
+	private SysShopInfo addZbShop(SysCompany sysCompany) {
+		SysShopInfo zbShopInfo=new SysShopInfo();
+		zbShopInfo.setShopType(SysShopInfo.SHOP_TYPE_ZONGBU);
+		zbShopInfo.setShopName(sysCompany.getComName()+"(总部)");
+		zbShopInfo.setCompanyId(sysCompany.getComId());
+		zbShopInfo.setShopTel(sysCompany.getComTel());
+		zbShopInfo.setShopShortName("总部");
+		zbShopInfo.setIsOpenNet(SysShopInfo.CLOSE_NET);
+		zbShopInfo.setShopNo(StringUtils.getRandomString(10));
+		shopInfoDao.insert(zbShopInfo);
+
+		//新增一个总部仓库
+		Warehouse warehouse=new Warehouse();
+		warehouse.setCompanyId(sysCompany.getComId());
+		warehouse.setName("总部仓库");
+		warehouse.setShopId(zbShopInfo.getId());
+		warehouse.setSort("1");
+		warehouseDao.insert(warehouse);
+		return  zbShopInfo;
+	}
+
+	@Transactional(rollbackFor = Exception.class)
+	@Override
+	public int modifyByMap(SysCompany oldSysCompany, SysCompany newSysCompany) {
+		SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+		newSysCompany.setUpdateBy(user.getSuName());
+
+		updatePower(newSysCompany);
+		Map<String, Object> modifyMap = null;
+		try {
+			if (!ModelUtils.isModified(oldSysCompany, newSysCompany)) {
+				return MatrixConstance.DML_SUCCESSS;
+			}
+
+			modifyMap = ModelUtils.comparePojo2Map(oldSysCompany, newSysCompany);
+		} catch (Exception e) {
+			throw new GlobleException(SystemErrorCode.DATA_UPDATE_FAIL, e, newSysCompany.getComName());
+		}
+		if (modifyMap.size() > 0) {
+			modifyMap.put("comId", oldSysCompany.getComId());
+			return sysCompanyDao.updateByMap(modifyMap);
+		}
+		return MatrixConstance.DML_SUCCESSS;
+	}
+
+	/**
+	 * 更新公司员工权限
+	 * 
+	 * @author JIANGYOUYAO
+	 * @email 935090232@qq.com
+	 * @date 2017年12月5日
+	 * @param newSysCompany
+	 */
+	private void updatePower(SysCompany newSysCompany) {
+		List<String> oldFunctions = null;
+		String functions = sysCompanyDao.selectById(newSysCompany.getComId()).getComFunctions();
+		if (functions == null || functions.equals("")) {
+			oldFunctions = new ArrayList<>();
+		} else {
+			oldFunctions = StringUtils
+					.strToCollToString(sysCompanyDao.selectById(newSysCompany.getComId()).getComFunctions(), ",");
+		}
+		List<String> newFunctions = new ArrayList<>();
+		if (StringUtils.isNotBlank(newSysCompany.getComFunctions())) {
+			newFunctions = StringUtils.strToCollToString(newSysCompany.getComFunctions(), ",");
+		}
+
+		for (String old : oldFunctions) {
+			// 如果新权限中不包含这个老的功能,则要更新改企业下所有的角色权限
+			if (!newFunctions.contains(old)) {
+				SysRole role = new SysRole();
+				role.setCompanyId(newSysCompany.getComId());
+				List<SysRole> roles = sysRoleDao.selectByModel(role);
+				// 获取该公司下所有的权限信息
+				List<SysRolePwoerFn> compalyRolePwoer = new ArrayList<>();
+				for (SysRole tempRole : roles) {
+					SysRolePwoerFn r = new SysRolePwoerFn();
+					r.setRoleId(tempRole.getRoleId());
+					compalyRolePwoer.addAll(rolePwoerFnDao.selectByModel(r));
+				}
+				// 记录要删除的id
+				List<String> delRolePwoer = new ArrayList<>();
+				for (SysRolePwoerFn rolePwoer : compalyRolePwoer) {
+					// 如果有一个老权限则删除这个权限
+					if (rolePwoer.getFnId() != null && rolePwoer.getFnId().equals(old)) {
+						delRolePwoer.add(rolePwoer.getRpfId()+"");
+					}
+				}
+				// 如果获取到了就删除
+				if (!delRolePwoer.isEmpty()) {
+					rolePwoerFnDao.deleteByIds(delRolePwoer);
+				}
+			}
+		}
+	}
+
+	@Override
+	public int modifyByModel(SysCompany sysCompany) {
+
+		return sysCompanyDao.updateByModel(sysCompany);
+
+	}
+
+	@Override
+	public int remove(List<String> list) {
+
+		return sysCompanyDao.deleteByIds(list);
+
+	}
+
+	@Override
+	public int removeById(String comId) {
+
+		return sysCompanyDao.deleteById(Long.parseLong(comId));
+
+	}
+
+	@Override
+	public int removeByModel(SysCompany sysCompany) {
+
+		return sysCompanyDao.deleteByModel(sysCompany);
+
+	}
+
+	@Override
+	public List<SysCompany> findInPage(SysCompany sysCompany, PaginationVO pageVo) {
+
+		return sysCompanyDao.selectInPage(sysCompany, pageVo);
+
+	}
+
+	@Override
+	public List<SysCompany> findByModel(SysCompany sysCompany) {
+
+		return sysCompanyDao.selectByModel(sysCompany);
+
+	}
+
+	@Override
+	public int findTotal(SysCompany sysCompany) {
+
+		return sysCompanyDao.selectTotalRecord(sysCompany);
+
+	}
+
+	@Override
+	public SysCompany findById(String comId) {
+
+		return sysCompanyDao.selectById(Long.parseLong(comId));
+
+	}
+
+
+
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/common/service/impl/SysFunctionServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/common/service/impl/SysFunctionServiceImpl.java
index 9137ed9..19194e9 100644
--- a/zq-erp/src/main/java/com/matrix/system/common/service/impl/SysFunctionServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/common/service/impl/SysFunctionServiceImpl.java
@@ -4,6 +4,7 @@
 import com.matrix.core.constance.SystemErrorCode;
 import com.matrix.core.exception.GlobleException;
 import com.matrix.core.pojo.PaginationVO;
+import com.matrix.core.tools.LogUtil;
 import com.matrix.core.tools.ModelUtils;
 import com.matrix.core.tools.WebUtil;
 import com.matrix.system.common.authority.DefaultAuthorityManager;
@@ -365,11 +366,14 @@
 			} else {
 				// 非一级节点找到父节点后存入
 				SysFunction parentFn = allFnMap.get(String.valueOf(function.getFnParentId()));
-				List<SysFunction> childs = parentFn.getChilds();
-				if (childs == null) {
-					parentFn.setChilds(new ArrayList<SysFunction>());
+				if(parentFn!=null){
+					List<SysFunction> childs = parentFn.getChilds();
+					if (childs == null) {
+						parentFn.setChilds(new ArrayList<SysFunction>());
+					}
+					parentFn.getChilds().add(function);
 				}
-				parentFn.getChilds().add(function);
+
 			}
 
 		}
diff --git a/zq-erp/src/main/java/com/matrix/system/common/service/impl/SysUsersServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/common/service/impl/SysUsersServiceImpl.java
index 8b6ce98..86b537b 100644
--- a/zq-erp/src/main/java/com/matrix/system/common/service/impl/SysUsersServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/common/service/impl/SysUsersServiceImpl.java
@@ -1,12 +1,16 @@
 package com.matrix.system.common.service.impl;
 
+import cn.hutool.crypto.SecureUtil;
+import com.matrix.component.redis.RedisClient;
 import com.matrix.core.constance.MatrixConstance;
 import com.matrix.core.constance.SystemErrorCode;
 import com.matrix.core.exception.GlobleException;
 import com.matrix.core.pojo.PaginationVO;
+import com.matrix.core.tools.DateUtil;
 import com.matrix.core.tools.LogUtil;
 import com.matrix.core.tools.ModelUtils;
 import com.matrix.core.tools.WebUtil;
+import com.matrix.system.common.authority.DefaultAuthorityManager;
 import com.matrix.system.common.bean.SysUserLoginRecord;
 import com.matrix.system.common.bean.SysUsers;
 import com.matrix.system.common.constance.AppConstance;
@@ -20,8 +24,6 @@
 import com.matrix.system.hive.bean.SysProjServices;
 import com.matrix.system.hive.bean.SysShopInfo;
 import com.matrix.system.hive.dao.SysShopInfoDao;
-import com.matrix.system.hive.plugin.util.CollectionUtils;
-import com.matrix.core.tools.DateUtil;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -45,7 +47,8 @@
     private static final String SU_ID = "su_id";
 
     private static final String SU_ACCOUNT = "su_account";
-
+    @Autowired
+    RedisClient redisClient;
     @Autowired
     private SysUsersDao sysUsersDao;
 
@@ -128,8 +131,12 @@
         }
         if (modifyMap.size() > 0) {
             modifyMap.put("suId", oldSysUsers.getSuId());
-            return sysUsersDao.updateByMap(modifyMap);
+            sysUsersDao.updateByMap(modifyMap);
         }
+        //删除用户权限缓存
+        String redisKey=DefaultAuthorityManager.USER_POWER_REDISKEY+ SecureUtil.md5(oldSysUsers.getSuId()+"");
+        redisClient.removeObject(redisKey);
+
         return MatrixConstance.DML_SUCCESSS;
     }
 
diff --git a/zq-erp/src/main/java/com/matrix/system/constance/Dictionary.java b/zq-erp/src/main/java/com/matrix/system/constance/Dictionary.java
index cae214e..0ff4047 100644
--- a/zq-erp/src/main/java/com/matrix/system/constance/Dictionary.java
+++ b/zq-erp/src/main/java/com/matrix/system/constance/Dictionary.java
@@ -55,10 +55,7 @@
 	 * 支付方式-现金支付
 	 */
 	String PAY_TYPE_MOENY = "现金";
-	/**
-	 * 支付方式-现金支付
-	 */
-	String PAY_TYPE_MOENY_CARD = "会员卡";
+
 	/**
 	 * 支付方式-卡支付
 	 */
@@ -572,4 +569,6 @@
     String SEX_WOMAN ="女";
 
     String[] COLORS = { "#57c5d2", "#e3565e", "#2f343a", "#4d98db", "#4fbc9d", "#be9d4c"};
+
+    String SERVICE_OVER_BEGIN_END = "SERVICE_OVER_BEGIN_END";
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/constance/SystemConstance.java b/zq-erp/src/main/java/com/matrix/system/constance/SystemConstance.java
index 39616d4..1ce0092 100644
--- a/zq-erp/src/main/java/com/matrix/system/constance/SystemConstance.java
+++ b/zq-erp/src/main/java/com/matrix/system/constance/SystemConstance.java
@@ -3,10 +3,6 @@
 public class SystemConstance {
 	 
 
-	/**
-	 * 当前进行操作的用户
-	 */
-	public static final String CURRENT_CUSTOMER = "CURRENT_CUSTOMER";
 
 
 	/**
@@ -14,10 +10,7 @@
 	 */
 	public static final String SYSTEM_USER = "SYSTEM";
 
-	/**
-	 * 查询历史记录
-	 */
-	public static final String HISTORY_CUSTOMER = "HISTORY_CUSTOMER";
+
 	/**
 	 * 登陆前要访问的地址
 	 */
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/action/FenXiaoOrderAction.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/action/FenXiaoOrderAction.java
new file mode 100644
index 0000000..5c511b7
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/action/FenXiaoOrderAction.java
@@ -0,0 +1,92 @@
+package com.matrix.system.fenxiao.action;
+
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.system.fenxiao.dto.LoadFenxiaoOrderBasicDto;
+import com.matrix.system.fenxiao.dto.LoadFenxiaoOrderListDto;
+import com.matrix.system.fenxiao.dto.LoadSetOrderListDtoDto;
+import com.matrix.system.fenxiao.dto.UpdateSetOrderDoneDto;
+import com.matrix.system.fenxiao.service.ShopSalesmanOrderService;
+import com.matrix.system.fenxiao.vo.LoadFenxiaoOrderBasicVo;
+import com.matrix.system.fenxiao.vo.LoadFenxiaoOrderListVo;
+import com.matrix.system.fenxiao.vo.LoadSetOrderListDtoVo;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@RestController
+@RequestMapping(value = "/fenXiao/fenXiaoOrder")
+public class FenXiaoOrderAction {
+	
+	@Autowired
+    private ShopSalesmanOrderService shopSalesmanOrderService;
+	
+	/**
+     * 分销订单基本信息
+     */
+    @ApiOperation(value = "分销订单基本信息")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "OK",  response = LoadFenxiaoOrderBasicVo.class)
+    })
+    @PostMapping(value = "/loadFenxiaoOrderBasic")
+    public @ResponseBody
+    AjaxResult loadFenxiaoOrderBasic(@RequestBody LoadFenxiaoOrderBasicDto loadFenxiaoOrderBasicDto) {
+    	return shopSalesmanOrderService.loadFenxiaoOrderBasic(loadFenxiaoOrderBasicDto);
+    }
+    
+    /**
+     * 分销订单
+     */
+    @ApiOperation(value = "分销订单")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "OK",  response = LoadFenxiaoOrderListVo.class)
+    })
+    @PostMapping(value = "/loadFenxiaoOrderList")
+    public @ResponseBody
+    AjaxResult loadFenxiaoOrderList(@RequestBody LoadFenxiaoOrderListDto loadFenxiaoOrderListDto) {
+    	return shopSalesmanOrderService.loadFenxiaoOrderList(loadFenxiaoOrderListDto);
+    }
+    
+    /**
+     *批量结算分销订单
+     */
+    @ApiOperation(value = "批量结算分销订单")
+    @PostMapping(value = "/updateSetOrderDone")
+    public @ResponseBody
+    AjaxResult updateSetOrderDone(@RequestBody UpdateSetOrderDoneDto updateSetOrderDoneDto) {
+    	return shopSalesmanOrderService.updateSetOrderDone(updateSetOrderDoneDto);
+    }
+    
+    /**
+     * 结算记录
+     */
+    @ApiOperation(value = "结算记录")
+    @ApiResponses({
+    	@ApiResponse(code = 200, message = "OK",  response = LoadSetOrderListDtoVo.class)
+    })
+    @PostMapping(value = "/loadSetOrderList")
+    public @ResponseBody
+    AjaxResult loadSetOrderList(@RequestBody LoadSetOrderListDtoDto loadSetOrderListDto) {
+    	return shopSalesmanOrderService.loadSetOrderList(loadSetOrderListDto);
+    }
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/action/FenXiaoSettingAction.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/action/FenXiaoSettingAction.java
new file mode 100644
index 0000000..1b2bc12
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/action/FenXiaoSettingAction.java
@@ -0,0 +1,164 @@
+package com.matrix.system.fenxiao.action;
+
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.util.StrUtil;
+import com.matrix.system.hive.dao.SysVipInfoDao;
+import com.matrix.core.constance.MatrixConstance;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.pojo.PaginationVO;
+import com.matrix.core.tools.WebUtil;
+import com.matrix.system.common.bean.BusParameterSettings;
+import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.common.constance.AppConstance;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
+import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant;
+import com.matrix.system.fenxiao.service.FenXiaoSettingService;
+import com.matrix.system.fenxiao.vo.FenXiaoSettingVo;
+import com.matrix.system.hive.action.util.QueryUtil;
+import com.matrix.system.hive.dao.ShoppingGoodsDao;
+import com.matrix.system.shopXcx.bean.ShopProduct;
+import com.matrix.system.shopXcx.dao.ShopProductDao;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+@RestController
+@RequestMapping(value = "/fenXiao/ruleSetting")
+public class FenXiaoSettingAction {
+	
+	@Autowired
+    private FenXiaoSettingService fenXiaoSettingService;
+
+    @Autowired
+    private BusParameterSettingsDao busParameterSettingsDao;
+
+    @Autowired
+    private ShoppingGoodsDao shoppingGoodsDao;
+    
+    @Autowired
+    private SysVipInfoDao sysVipInfoDao;
+    
+    @Autowired
+    private ShopProductDao shopProductDao;
+	
+	/**
+     *查询分销配置
+     */
+    @RequestMapping(value = "/selectFenXiaoSetting")
+    public AjaxResult selectFenXiaoSetting() {
+
+       AjaxResult result= AjaxResult.buildSuccessInstance("查询成功");
+       SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+       Long companyId = user.getCompanyId();
+       
+       //分销开关
+       String[] FXKGCode={FenxiaoSettingConstant.FX_SWITCH};
+       String[] FXKGName={"分销开关"};
+       List<FenXiaoSettingVo> fxkgRuleSettingsVo = getRuleSettingsVo(FXKGCode,FXKGName,companyId);
+       result.putInMap("fxkg", fxkgRuleSettingsVo);
+       //自购返佣
+       String[] ZGFYCode={FenxiaoSettingConstant.FX_ZGFY};
+       String[] ZGFYName={"自购返佣"};
+       List<FenXiaoSettingVo> zgfyRuleSettingsVo = getRuleSettingsVo(ZGFYCode,ZGFYName,companyId);
+       result.putInMap("zgfy", zgfyRuleSettingsVo);
+
+       //分销模式
+       String[] FXMSCode={FenxiaoSettingConstant.FX_MODEL};
+       String[] FXMSName={"分销模式"};
+       List<FenXiaoSettingVo> fxmsRuleSettingsVo = getRuleSettingsVo(FXMSCode,FXMSName,companyId);
+       result.putInMap("fxms", fxmsRuleSettingsVo);
+       //申请方式
+       String[] sqfsCode={FenxiaoSettingConstant.FX_APPLY_WAY};
+       String[] sqfsName={"申请方式"};
+       List<FenXiaoSettingVo> sqfsRuleSettingsVo = getRuleSettingsVo(sqfsCode,sqfsName,companyId);
+       result.putInMap("sqfs", sqfsRuleSettingsVo);
+       //审核方式
+       String[] shfsCode={FenxiaoSettingConstant.FX_AUDIT_METHOD};
+       String[] shfsName={"审核方式"};
+       List<FenXiaoSettingVo> shfsRuleSettingsVo = getRuleSettingsVo(shfsCode,shfsName,companyId);
+       result.putInMap("shfs", shfsRuleSettingsVo);
+       //申请条件
+       String[] sqtjCode={FenxiaoSettingConstant.FX_APPLY_CONDITION};
+       String[] sqtjName={"申请条件"};
+       List<FenXiaoSettingVo> sqtjRuleSettingsVo = getRuleSettingsVo(sqtjCode,sqtjName,companyId);
+       result.putInMap("sqtj", sqtjRuleSettingsVo);
+       if(CollUtil.isNotEmpty(sqtjRuleSettingsVo)){
+    	   for(FenXiaoSettingVo fenXiaoSettingVo : sqtjRuleSettingsVo) {
+    		   //选择申请条件条件3时,获得选中产品集合
+    		   if(FenxiaoSettingConstant.FX_APPLY_CONDITION_XFZDCP.equals(fenXiaoSettingVo.getParamValue())) {
+    			   String paramValue1 = fenXiaoSettingVo.getParamValue1();
+    			   if(StrUtil.isNotEmpty(paramValue1)) {
+    				   List<Integer> idsList = new ArrayList<>();
+    				   List<String> idsStringList = Arrays.asList(paramValue1.split(","));
+    				   if(CollUtil.isNotEmpty(idsStringList)){
+    					   for(String string : idsStringList) {
+    						   Integer parseInt = Integer.parseInt(string);
+    						   idsList.add(parseInt);
+    					   }
+    				   }
+    				   //List<ShoppingGoods> list = shoppingGoodsDao.selectByIds(idsList);
+                       List<ShopProduct> shopProducts = shopProductDao.selectByIds(idsList);
+                       result.putInMap("order", shopProducts);
+    			   }
+    		   }else{
+                   List<ShopProduct> shopProducts = new ArrayList<>();
+                   result.putInMap("order", shopProducts);
+               }
+    	   }
+       }
+       return result;
+    }
+    
+    /**
+     * 列表显示
+     */
+    @RequestMapping(value = "/selectProduct")
+    public @ResponseBody
+    	AjaxResult selectProduct(ShopProduct shopProduct, PaginationVO pageVo) {
+    	QueryUtil.setQueryLimitCom(shopProduct);
+		pageVo.setSort("createTime");
+		pageVo.setOrder("desc");
+		shopProduct.setDelFlag(AppConstance.DATA_USEABLE);
+		shopProduct.setCompanyId(shopProduct.getCompanyId());
+		List<ShopProduct> dataList = shopProductDao.selectInPage(shopProduct, pageVo);
+		AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList,
+				shopProductDao.selectTotalRecord(shopProduct));
+		return result;
+
+    }
+    
+    /**
+     *获取对应的规则设置数据
+     * @param ArrayCode
+     * @param ArrayName
+     * @param companyId
+     * @return
+     */
+    private List<FenXiaoSettingVo> getRuleSettingsVo(String[] ArrayCode,String[] ArrayName,Long companyId){
+    	List<BusParameterSettings> dataList = busParameterSettingsDao.selectByCodesAndCompanyId(Arrays.asList(ArrayCode), companyId);
+        List<FenXiaoSettingVo> scoreRuleSettingsVos=new ArrayList<FenXiaoSettingVo>();
+        int index=0;
+        for (BusParameterSettings item:dataList){
+        	FenXiaoSettingVo paramVo=new FenXiaoSettingVo();
+            BeanUtils.copyProperties(item,paramVo);
+            paramVo.setParamName(ArrayName[index]);
+            scoreRuleSettingsVos.add(paramVo);
+            index++;
+        }
+        return scoreRuleSettingsVos;
+    }
+    
+    /**
+     * 修改公司维度的分销规则
+     */
+    @PostMapping(value = "/updateFenXiaoSetting")
+    public @ResponseBody
+    AjaxResult updateFenXiaoSetting(@RequestBody List<BusParameterSettings> busParameterSettings) {
+        return fenXiaoSettingService.updateFenXiaoSettingByCompanyId(busParameterSettings);
+    }
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/action/FenXiaoUserAction.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/action/FenXiaoUserAction.java
new file mode 100644
index 0000000..1bff040
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/action/FenXiaoUserAction.java
@@ -0,0 +1,405 @@
+package com.matrix.system.fenxiao.action;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.matrix.core.constance.MatrixConstance;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.tools.StringUtils;
+import com.matrix.core.tools.WebUtil;
+import com.matrix.system.common.bean.BusParameterSettings;
+import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
+import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant;
+import com.matrix.system.fenxiao.dao.ShopSalesmanApplyDao;
+import com.matrix.system.fenxiao.dao.ShopSalesmanGradeDao;
+import com.matrix.system.fenxiao.dto.*;
+import com.matrix.system.fenxiao.entity.ShopSalesmanApply;
+import com.matrix.system.fenxiao.service.ShopSalesmanApplyService;
+import com.matrix.system.fenxiao.vo.*;
+import com.matrix.system.hive.action.util.QueryUtil;
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.hive.dao.SysVipInfoDao;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+@RestController
+@RequestMapping(value = "/fenXiao/fenXiaoUser")
+public class FenXiaoUserAction {
+	
+	@Autowired
+    private ShopSalesmanApplyService shopSalesmanApplyService;
+	@Autowired
+    private ShopSalesmanApplyDao shopSalesmanApplyDao;
+	@Autowired
+	private SysVipInfoDao sysVipInfoDao;
+	@Autowired
+	private ShopSalesmanGradeDao shopSalesmanGradeDao;
+	@Autowired
+    private BusParameterSettingsDao busParameterSettingsDao;
+	
+	/**
+     * 分销员详情页面信息
+     */
+    @ApiOperation(value = "分销员详情页面信息")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "OK",  response = ShopSalesmanDetailVo.class)
+    })
+    @PostMapping(value = "/loadParamSettingBasic")
+    public @ResponseBody
+    AjaxResult findShopSalesmanDetail(@RequestBody LoadParamSettingBasicDto loadParamSettingBasicDto) {
+    	//设置用户公司ID
+    	QueryUtil.setQueryLimitCom(loadParamSettingBasicDto);
+    	AjaxResult result= AjaxResult.buildSuccessInstance("查询成功");
+    	SalesmanBasicDetailVo salesmanBasicDetailVo = shopSalesmanApplyService.selectShopSalesmanDetailByOpenId(loadParamSettingBasicDto.getUserId(),loadParamSettingBasicDto.getApplyId());
+    	result.putInMap("basicdetail", salesmanBasicDetailVo);
+        return result;
+    }
+
+    /**
+     * 分销员详情页面绑定客户
+     */
+    @ApiOperation(value = "分销员详情页面绑定客户")
+    @PostMapping(value = "/loadParamSetting")
+    public @ResponseBody
+    AjaxResult loadParamSetting(@RequestBody LoadParamSettingDto loadParamSettingDto) {
+        //设置用户公司ID
+        QueryUtil.setQueryLimitCom(loadParamSettingDto);
+        AjaxResult result= AjaxResult.buildSuccessInstance("查询成功");
+        //排序
+        if(StringUtils.isBlank(loadParamSettingDto.getSort())){
+        	loadParamSettingDto.setSort("create_time");
+        	loadParamSettingDto.setOrder("desc");
+        }
+        //查询绑定客户信息
+        Page<ShopCustomDetailVo> page = new Page(loadParamSettingDto.getPageNum(), loadParamSettingDto.getPageSize());
+        IPage<ShopCustomDetailVo> customDetailRows = shopSalesmanApplyService.findCustomDetail(page,loadParamSettingDto);
+        result.putInMap("customDetailRecords", customDetailRows.getRecords());
+        result.putInMap("customDetailTotal", customDetailRows.getTotal());
+        return result;
+    }
+
+    /**
+     * 分销员详情页面邀请下级
+     */
+    @ApiOperation(value = "分销员详情页面邀请下级")
+    @PostMapping(value = "/loadParamSettinglow")
+    public @ResponseBody
+    AjaxResult loadParamSettinglow(@RequestBody ShopSalesmanDetailDto shopSalesmanDetailDto) {
+        //设置用户公司ID
+        QueryUtil.setQueryLimitCom(shopSalesmanDetailDto);
+        AjaxResult result= AjaxResult.buildSuccessInstance("查询成功");
+        //排序
+        if(StringUtils.isBlank(shopSalesmanDetailDto.getSort())){
+            shopSalesmanDetailDto.setSort("create_time");
+            shopSalesmanDetailDto.setOrder("desc");
+        }
+        //查询邀请下级信息
+        Page<ShopCustomDetailVo> pageLow = new Page(shopSalesmanDetailDto.getPageNum(), shopSalesmanDetailDto.getPageSize());
+        IPage<ShopCustomDetailVo> customLowRows = shopSalesmanApplyService.findCustomLow(pageLow,shopSalesmanDetailDto);
+        result.putInMap("customLowRecords", customLowRows.getRecords());
+        result.putInMap("customLowTotal", customLowRows.getTotal());
+        return result;
+    }
+
+    /**
+     * 分销员详情页面收益订单
+     */
+    @ApiOperation(value = "分销员详情页面收益订单")
+    @PostMapping(value = "/loadParamSettingOrder")
+    public @ResponseBody
+    AjaxResult loadParamSettingOrder(@RequestBody ShopSalesmanDetailDto shopSalesmanDetailDto) {
+        //设置用户公司ID
+        QueryUtil.setQueryLimitCom(shopSalesmanDetailDto);
+        AjaxResult result= AjaxResult.buildSuccessInstance("查询成功");
+        //排序
+        if(StringUtils.isBlank(shopSalesmanDetailDto.getSort())){
+            shopSalesmanDetailDto.setSort("create_time");
+            shopSalesmanDetailDto.setOrder("desc");
+        }
+        //查询收益订单
+        Page<ShopOrderDetailVo> pageOrder = new Page(shopSalesmanDetailDto.getPageNum(), shopSalesmanDetailDto.getPageSize());
+        IPage<ShopOrderDetailVo> orderRows = shopSalesmanApplyService.findShopOrderDetail(pageOrder,shopSalesmanDetailDto);
+        result.putInMap("orderRecords", orderRows.getRecords());
+        result.putInMap("orderTotal", orderRows.getTotal());
+        return result;
+    }
+
+    /**
+     *修改等级
+     */
+    @ApiOperation(value = "修改等级")
+    @PostMapping(value = "/changeSaleManGrade")
+    public @ResponseBody
+    AjaxResult changeSaleManGrade(@RequestBody ChangeSaleManGradeDto changeSaleManGradeDto) {
+    	return shopSalesmanApplyService.changeSaleManGrade(changeSaleManGradeDto);
+    }
+    
+    /**
+     *解绑
+     */
+    @ApiOperation(value = "解绑")
+    @PostMapping(value = "/unbundlingSaleMan")
+    public @ResponseBody
+    AjaxResult unbundlingSaleMan(@RequestBody UnbundlingSaleManDto unbundlingSaleManDto) {
+    	return shopSalesmanApplyService.unbundlingSaleMan(unbundlingSaleManDto);
+    }
+    
+    /**
+     *推广图片
+     */
+    @ApiOperation(value = "推广图片")
+    @PostMapping(value = "/updateTgtp")
+    public @ResponseBody
+    AjaxResult updateTgtp(@RequestBody UpdateTgtpDto updateTgtpDto) {
+        return shopSalesmanApplyService.updateTgtp(updateTgtpDto);
+    }
+    
+    /**
+     *推广图片
+     */
+    @RequestMapping(value = "/loadTgtpSetting")
+    public AjaxResult loadTgtpSetting() {
+
+       AjaxResult result= AjaxResult.buildSuccessInstance("查询成功");
+       SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+       Long companyId = user.getCompanyId();
+       
+       //推广文案
+       String[] FXKGCode={FenxiaoSettingConstant.FX_TG_POSTER};
+       String[] FXKGName={"推广图片"};
+       List<FenXiaoSettingVo> fxkgRuleSettingsVo = getRuleSettingsVo(FXKGCode,FXKGName,companyId);
+       result.putInMap("tgtp", fxkgRuleSettingsVo.get(0));
+       return result;
+    }
+
+    /**
+     *推广计划更新
+     */
+    @ApiOperation(value = "推广计划更新")
+    @PostMapping(value = "/updateTgjh")
+    public @ResponseBody
+    AjaxResult updateTgjh(@RequestBody UpdateTgjhDto updateTgjhDto) {
+        return shopSalesmanApplyService.updateTgjh(updateTgjhDto);
+    }
+    /**
+     *查询推广计划
+     */
+    @RequestMapping(value = "/loadTgwaSetting")
+    public AjaxResult loadTgwaSetting() {
+
+       AjaxResult result= AjaxResult.buildSuccessInstance("查询成功");
+       SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+       Long companyId = user.getCompanyId();
+       
+       //推广文案
+       String[] FXKGCode={FenxiaoSettingConstant.FX_TG_PLAN};
+       String[] FXKGName={"推广文案"};
+       List<FenXiaoSettingVo> fxkgRuleSettingsVo = getRuleSettingsVo(FXKGCode,FXKGName,companyId);
+       result.putInMap("tgwa", fxkgRuleSettingsVo.get(0));
+       return result;
+    }
+    
+    /**
+     *获取对应的规则设置数据
+     * @param ArrayCode
+     * @param ArrayName
+     * @param companyId
+     * @return
+     */
+    private List<FenXiaoSettingVo> getRuleSettingsVo(String[] ArrayCode,String[] ArrayName,Long companyId){
+    	List<BusParameterSettings> dataList = busParameterSettingsDao.selectByCodesAndCompanyId(Arrays.asList(ArrayCode), companyId);
+        List<FenXiaoSettingVo> scoreRuleSettingsVos=new ArrayList<FenXiaoSettingVo>();
+        int index=0;
+        for (BusParameterSettings item:dataList){
+        	FenXiaoSettingVo paramVo=new FenXiaoSettingVo();
+            BeanUtils.copyProperties(item,paramVo);
+            paramVo.setParamName(ArrayName[index]);
+            scoreRuleSettingsVos.add(paramVo);
+            index++;
+        }
+        return scoreRuleSettingsVos;
+    }
+    
+    /**
+     * 分佣方案
+     */
+    @ApiOperation(value = "查询分佣方案")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "OK",  response = FyfaManageVo.class)
+    })
+    @PostMapping(value = "/findFyfaManageList")
+    public @ResponseBody
+    AjaxResult findFyfaManageList(@RequestBody FyfaManageDto fyfaManageDto) {
+    	//设置用户公司ID
+    	QueryUtil.setQueryLimitCom(fyfaManageDto);
+        //排序
+        if(StringUtils.isBlank(fyfaManageDto.getSort())){
+        	fyfaManageDto.setSort("create_time");
+        	fyfaManageDto.setOrder("asc");
+        }
+        Page<FyfaManageVo> page = new Page(fyfaManageDto.getPageNum(), fyfaManageDto.getPageSize());
+        IPage<FyfaManageVo> rows = shopSalesmanApplyService.findFyfaManageList(page,fyfaManageDto);
+        AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal());
+        return result;
+    }
+
+    /**
+     *新增分佣方案
+     */
+    @ApiOperation(value = "新增分佣方案")
+    @RequestMapping(value = "/addFyfa")
+    private @ResponseBody AjaxResult addFyfa(){
+        SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+        shopSalesmanApplyService.addFyfa(user);
+        return AjaxResult.buildSuccessInstance("新增成功");
+    }
+    
+    /**
+     *修改分佣方案
+     */
+    @ApiOperation(value = "修改分佣方案")
+    @PostMapping(value = "/updateFyfa")
+    public @ResponseBody
+    AjaxResult updateFyfa(@RequestBody UpdateFyfaDto updateFyfaDto) {
+    	return shopSalesmanApplyService.updateFyfa(updateFyfaDto);
+    }
+    
+    /**
+     *删除分佣方案
+     */
+    @ApiOperation(value = "删除分佣方案")
+    @PostMapping(value = "/delFyfaApply")
+    public @ResponseBody
+    AjaxResult delFyfaApply(@RequestBody DelFyfaApplyDto delFyfaApplyDto) {
+    	return shopSalesmanApplyService.delFyfaApply(delFyfaApplyDto);
+    }
+
+	/**
+     * 查询分销员审核记录
+     */
+    @ApiOperation(value = "查询分销员审核记录")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "OK",  response = ShopSalesmanApplyVo.class)
+    })
+    @PostMapping(value = "/findShopSalesmanApplyList")
+    public @ResponseBody
+    AjaxResult findShopSalesmanApplyList(@RequestBody ShopSalesmanApplyDto shopSalesmanApplyDto) {
+    	//设置用户公司ID
+    	QueryUtil.setQueryLimitCom(shopSalesmanApplyDto);
+        //排序
+        if(StringUtils.isBlank(shopSalesmanApplyDto.getSort())){
+        	shopSalesmanApplyDto.setSort("create_time");
+        	shopSalesmanApplyDto.setOrder("desc");
+        }
+        Page<ShopSalesmanApplyVo> page = new Page(shopSalesmanApplyDto.getPageNum(), shopSalesmanApplyDto.getPageSize());
+        IPage<ShopSalesmanApplyVo> rows = shopSalesmanApplyService.findShopSalesmanApplyList(page,shopSalesmanApplyDto);
+        AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal());
+
+        return result;
+    }
+    
+	/**
+     *获取分销员待审核记录
+     */
+    @ApiOperation(value = "获取分销员待审核记录")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "OK",  response = ShopSalesmanAppliingVo.class)
+    })
+    @PostMapping(value = "/findShopSalesmanAppliingList")
+    public @ResponseBody
+    AjaxResult findShopSalesmanAppliingList(@RequestBody ShopSalesmanAppliingDto shopSalesmanAppliingDto) {
+        //设置用户公司ID
+        QueryUtil.setQueryLimitCom(shopSalesmanAppliingDto);
+        //排序
+        if(StringUtils.isBlank(shopSalesmanAppliingDto.getSort())){
+        	shopSalesmanAppliingDto.setSort("create_time");
+        	shopSalesmanAppliingDto.setOrder("desc");
+        }
+
+        Page<ShopSalesmanAppliingVo> page = new Page(shopSalesmanAppliingDto.getPageNum(), shopSalesmanAppliingDto.getPageSize());
+        IPage<ShopSalesmanAppliingVo> rows = shopSalesmanApplyService.selectBizUserApplyList(page,shopSalesmanAppliingDto);
+
+        //IPage<ShopSalesmanAppliingVo> rows = shopSalesmanApplyService.findShopSalesmanAppliingList(page,shopSalesmanAppliingDto);
+        AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal());
+        return result;
+    }
+
+    /**
+     *新增分销员
+     */
+    @ApiOperation(value = "新增分销员")
+    @PostMapping(value = "/addSaleManApply")
+    public @ResponseBody
+    AjaxResult addSaleManApply(@RequestBody AddSaleManApplyDto addSaleManApplyDto) {
+
+    	if(addSaleManApplyDto.getGradeId()==null) {
+    		return AjaxResult.buildFailInstance("请选择分销等级");
+    	}
+
+        shopSalesmanApplyService.addSaleManApply(addSaleManApplyDto.getUserId(), addSaleManApplyDto.getGradeId());
+		return AjaxResult.buildSuccessInstance("设置成功");
+    }
+    
+    /**
+     *删除---设置成不是分销员
+     */
+    @ApiOperation(value = "删除---设置成不是分销员")
+    @PostMapping(value = "/delSaleManGradeApply")
+    public @ResponseBody
+    AjaxResult delSaleManGradeApply(@RequestBody DelSaleManGradeApplyDto delSaleManGradeApplyDto) {
+    	return shopSalesmanApplyService.delSaleManGradeApply(delSaleManGradeApplyDto);
+    }
+    
+    /**
+     *审核分销员
+     */
+    @ApiOperation(value = "审核分销员")
+    @PostMapping(value = "/examineSaleManApply")
+    public @ResponseBody
+    AjaxResult examineSaleManApply(@RequestBody ExamineSaleManApplyDto examineSaleManApplyDto) {
+        //设置用户公司ID
+        QueryUtil.setQueryLimitCom(examineSaleManApplyDto);
+        //待审核状态才允许提交
+        ShopSalesmanApply shopSalesmanApply = shopSalesmanApplyDao.selectById(examineSaleManApplyDto.getApplyId());
+		if(ObjectUtil.isEmpty(shopSalesmanApply)) {
+			return  AjaxResult.buildFailInstance("当前记录有误");
+		}
+		
+		SysVipInfo sysVipInfo = sysVipInfoDao.selectById(examineSaleManApplyDto.getUserId());
+		if(ObjectUtil.isEmpty(sysVipInfo)) {
+			return  AjaxResult.buildFailInstance("当前记录有误");
+		}
+		
+		Integer applyStatus = shopSalesmanApply.getApplyStatus();
+        if(ObjectUtil.isNotEmpty(applyStatus) && ShopSalesmanApply.APPLY_STATUS_DSH == applyStatus) {
+        	Integer applyState = examineSaleManApplyDto.getApplyState();
+            shopSalesmanApplyService.examineSaleManApply(shopSalesmanApply,applyState);
+            return AjaxResult.buildSuccessInstance("审核成功");
+        }else{
+            return  AjaxResult.buildFailInstance("当前记录不是待审核状态");
+        }
+    }
+
+    /**
+     *获取对应的分销员等级
+     */
+    @RequestMapping(value = "/getShopSalesmanGrade")
+    private @ResponseBody AjaxResult getShopSalesmanGradeVo(){
+        AjaxResult result= AjaxResult.buildSuccessInstance("查询成功");
+        SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+
+        List<ShopSalesmanGradeVo> dataList = shopSalesmanApplyService.getShopSalesmanGradeVo(user.getCompanyId());
+        result.putInMap("salesGrade", dataList);
+        return result;
+    }
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/constant/FenxiaoSettingConstant.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/constant/FenxiaoSettingConstant.java
new file mode 100644
index 0000000..3153b35
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/constant/FenxiaoSettingConstant.java
@@ -0,0 +1,61 @@
+package com.matrix.system.fenxiao.constant;
+
+public class FenxiaoSettingConstant {
+    /**
+     * 分销开关
+     */
+    public final static String FX_SWITCH = "FX_SWITCH";
+    /**
+     * 分销模式
+     */
+    public final static String FX_MODEL = "FX_MODEL";
+    /**
+     * 自购返佣 1:是 2:否
+     */
+    public final static String FX_ZGFY = "FX_ZGFY";
+
+    public final static String FX_ZGFY_YES = "1";
+    public final static String FX_ZGFY_NO = "2";
+    /**
+     * 申请方式
+     */
+    public final static String FX_APPLY_WAY = "FX_APPLY_WAY";
+    /**
+     * 申请方式 1自动申请通过
+     */
+    public final static String FX_APPLY_WAY_AUTO = "1";
+    /**
+     * 申请方式 2需要主动申请
+     */
+    public final static String FX_APPLY_WAY_CUSTOMER = "2";
+    /**
+     * 审核方式  1系统自动审核,2人工审核
+     */
+    public final static String FX_AUDIT_METHOD = "FX_AUDIT_METHOD";
+    /**
+     * 申请条件
+     */
+    public final static String FX_APPLY_CONDITION = "FX_APPLY_CONDITION";
+    /**
+     * 申请条件 1 无条件
+     */
+    public final static String FX_APPLY_CONDITION_WTJ = "1";
+    /**
+     * 申请条件 2 消费任意产品
+     */
+    public final static String FX_APPLY_CONDITION_XFRYCP = "2";
+    /**
+     * 申请条件 3 消费指定产品
+     */
+    public final static String FX_APPLY_CONDITION_XFZDCP = "3";
+    /**
+     * 申请条件 4 消费指定金额
+     */
+    public final static String FX_APPLY_CONDITION_XCZDJE = "4";
+    /**
+     * 推广计划
+     */
+    public final static String FX_TG_PLAN = "FX_TG_PLAN";
+
+    public static final String FX_TG_POSTER ="FX_TG_POSTER";
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dao/BizUserDao.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dao/BizUserDao.java
new file mode 100644
index 0000000..b4f2471
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dao/BizUserDao.java
@@ -0,0 +1,14 @@
+package com.matrix.system.fenxiao.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.matrix.system.fenxiao.entity.BizUser;
+
+/**
+ * @description 推广员申请记录
+ * @author jyy
+ * @date 2021-03-10 15:22
+ */
+public interface BizUserDao extends BaseMapper<BizUser> {
+
+	
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dao/FenXiaoSettingDao.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dao/FenXiaoSettingDao.java
new file mode 100644
index 0000000..0bf3029
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dao/FenXiaoSettingDao.java
@@ -0,0 +1,7 @@
+package com.matrix.system.fenxiao.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.matrix.system.fenxiao.entity.FenXiaoSettingEntity;
+
+public interface FenXiaoSettingDao extends BaseMapper<FenXiaoSettingEntity> {
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopRevenueFlowDao.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopRevenueFlowDao.java
new file mode 100644
index 0000000..d409465
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopRevenueFlowDao.java
@@ -0,0 +1,18 @@
+package com.matrix.system.fenxiao.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.matrix.system.fenxiao.entity.ShopRevenueFlow;
+import com.matrix.system.shopXcx.api.dto.RevenueFlowDto;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @description 收益流水
+ * @author jyy
+ * @date 2021-03-10 15:22
+ */
+public interface ShopRevenueFlowDao extends BaseMapper<ShopRevenueFlow> {
+
+    IPage<ShopRevenueFlow> selectRevenuFlowList(Page<ShopRevenueFlow> page, @Param("record") RevenueFlowDto revenueFlowDto);
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopSalemanSettlementDao.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopSalemanSettlementDao.java
new file mode 100644
index 0000000..d032047
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopSalemanSettlementDao.java
@@ -0,0 +1,13 @@
+package com.matrix.system.fenxiao.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.matrix.system.fenxiao.entity.ShopSalemanSettlement;
+
+/**
+ * @description 订单结算记录
+ * @author jyy
+ * @date 2021-03-10 15:22
+ */
+public interface ShopSalemanSettlementDao extends BaseMapper<ShopSalemanSettlement> {
+
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopSalesmanApplyDao.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopSalesmanApplyDao.java
new file mode 100644
index 0000000..52b6c4f
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopSalesmanApplyDao.java
@@ -0,0 +1,54 @@
+package com.matrix.system.fenxiao.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.matrix.system.fenxiao.dto.LoadParamSettingDto;
+import com.matrix.system.fenxiao.dto.ShopSalesmanAppliingDto;
+import com.matrix.system.fenxiao.dto.ShopSalesmanApplyDto;
+import com.matrix.system.fenxiao.dto.ShopSalesmanDetailDto;
+import com.matrix.system.fenxiao.entity.ShopSalesmanApply;
+import com.matrix.system.fenxiao.vo.SalesmanBasicDetailVo;
+import com.matrix.system.fenxiao.vo.ShopCustomDetailVo;
+import com.matrix.system.fenxiao.vo.ShopOrderDetailVo;
+import com.matrix.system.fenxiao.vo.ShopSalesmanAppliingVo;
+import com.matrix.system.fenxiao.vo.ShopSalesmanApplyVo;
+import com.matrix.system.shopXcx.vo.SalesmanCenterInfo;
+import com.matrix.system.shopXcx.vo.SalesmanVo;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @description 推广员申请记录
+ * @author jyy
+ * @date 2021-03-10 15:22
+ */
+public interface ShopSalesmanApplyDao extends BaseMapper<ShopSalesmanApply> {
+
+    IPage<SalesmanVo> selectInvitationuserInPage(Page<SalesmanVo> page, @Param("userId") Long userId, @Param("isSales")String isSales);
+
+    IPage<SalesmanVo> selectInvitationuserInPage(Page<SalesmanVo> page, @Param("userId") Long userId);
+
+	IPage<ShopSalesmanApplyVo> findShopSalesmanApplyList(Page<ShopSalesmanApplyVo> page,
+			@Param("record")ShopSalesmanApplyDto shopSalesmanApplyDto);
+	//根据公司ID、审核状态、会员昵称查询对应的记录
+	IPage<ShopSalesmanAppliingVo> findShopSalesmanAppliingList(Page<ShopSalesmanAppliingVo> page,
+			@Param("record")ShopSalesmanAppliingDto shopSalesmanAppliingDto);
+
+	IPage<ShopSalesmanAppliingVo> selectBizUserApplyList(Page<ShopSalesmanAppliingVo> page,
+			@Param("record")ShopSalesmanAppliingDto shopSalesmanAppliingDto);
+
+    SalesmanCenterInfo selectSalesmanCenterInfo(Long id);
+
+	SalesmanBasicDetailVo selectShopSalesmanDetailByOpenId(@Param("userId")Long userId,
+			@Param("companyId")Long companyId,@Param("applyId")long applyId);
+
+	IPage<ShopCustomDetailVo> findCustomDetail(Page<ShopCustomDetailVo> page,
+											   @Param("record")LoadParamSettingDto loadParamSettingDto);
+
+	IPage<ShopCustomDetailVo> findCustomLow(Page<ShopCustomDetailVo> pageLow,
+			@Param("record")ShopSalesmanDetailDto shopSalesmanDetailDto);
+
+	IPage<ShopOrderDetailVo> findShopOrderDetail(Page<ShopOrderDetailVo> pageOrder,
+			@Param("record")ShopSalesmanDetailDto shopSalesmanDetailDto);
+	
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopSalesmanGradeDao.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopSalesmanGradeDao.java
new file mode 100644
index 0000000..e51ec22
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopSalesmanGradeDao.java
@@ -0,0 +1,25 @@
+package com.matrix.system.fenxiao.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.matrix.system.fenxiao.dto.FyfaManageDto;
+import com.matrix.system.fenxiao.entity.ShopSalesmanGrade;
+import com.matrix.system.fenxiao.vo.FyfaManageVo;
+import com.matrix.system.fenxiao.vo.ShopSalesmanGradeVo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @description 推广员等级
+ * @author jyy
+ * @date 2021-03-10 15:22
+ */
+public interface ShopSalesmanGradeDao extends BaseMapper<ShopSalesmanGrade> {
+
+	List<ShopSalesmanGradeVo> getShopSalesmanGradeVo(@Param("companyId")Long companyId);
+
+	IPage<FyfaManageVo> findFyfaManageList(Page<FyfaManageVo> page,@Param("record")FyfaManageDto fyfaManageDto);
+
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopSalesmanOrderDao.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopSalesmanOrderDao.java
new file mode 100644
index 0000000..c5b69cb
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopSalesmanOrderDao.java
@@ -0,0 +1,39 @@
+package com.matrix.system.fenxiao.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.matrix.system.fenxiao.dto.LoadFenxiaoOrderListDto;
+import com.matrix.system.fenxiao.dto.LoadSetOrderListDtoDto;
+import com.matrix.system.fenxiao.entity.ShopSalesmanOrder;
+import com.matrix.system.fenxiao.vo.LoadFenxiaoOrderBasicVo;
+import com.matrix.system.fenxiao.vo.LoadFenxiaoOrderListVo;
+import com.matrix.system.fenxiao.vo.LoadSetOrderListDtoVo;
+import com.matrix.system.shopXcx.api.dto.SaleOrderDto;
+import com.matrix.system.shopXcx.vo.SalesOrderVo;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @description 分销订单
+ * @author jyy
+ * @date 2021-03-10 15:22
+ */
+public interface ShopSalesmanOrderDao extends BaseMapper<ShopSalesmanOrder> {
+
+    /**
+     * 查询推广订单
+     * @param page
+     * @param saleOrderDto
+     * @return
+     */
+    IPage<SalesOrderVo> selectSalesManOrder(Page<SalesOrderVo> page, @Param("record") SaleOrderDto saleOrderDto);
+
+	LoadFenxiaoOrderBasicVo selectFenxiaoOrderBasicByCompanyId(@Param("companyId")Long companyId);
+
+	IPage<LoadFenxiaoOrderListVo> findFenxiaoOrderList(Page<LoadFenxiaoOrderListVo> page,
+			@Param("record")LoadFenxiaoOrderListDto loadFenxiaoOrderListDto);
+
+	IPage<LoadSetOrderListDtoVo> findSetOrderList(Page<LoadSetOrderListDtoVo> page,
+			@Param("record")LoadSetOrderListDtoDto loadSetOrderListDto);
+
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopSalesmanOrderItemDao.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopSalesmanOrderItemDao.java
new file mode 100644
index 0000000..8c4e87e
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopSalesmanOrderItemDao.java
@@ -0,0 +1,13 @@
+package com.matrix.system.fenxiao.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.matrix.system.fenxiao.entity.ShopSalesmanOrderItem;
+
+/**
+ * @description 分销单明细
+ * @author yourName
+ * @date 2021-03-12 13:17
+ */
+public interface ShopSalesmanOrderItemDao extends BaseMapper<ShopSalesmanOrderItem> {
+
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/AddSaleManApplyDto.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/AddSaleManApplyDto.java
new file mode 100644
index 0000000..ad76f7f
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/AddSaleManApplyDto.java
@@ -0,0 +1,21 @@
+package com.matrix.system.fenxiao.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "AddSaleManApplyDto", description = "查询参数")
+public class AddSaleManApplyDto {
+
+	@ApiModelProperty(value ="会员ID")
+    private Long userId;
+
+	
+	@ApiModelProperty(value ="等级ID")
+    private Long gradeId;
+
+    @ApiModelProperty(hidden = true)
+    private Long companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ChangeSaleManGradeDto.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ChangeSaleManGradeDto.java
new file mode 100644
index 0000000..92c66de
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ChangeSaleManGradeDto.java
@@ -0,0 +1,17 @@
+package com.matrix.system.fenxiao.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "ChangeSaleManGradeDto", description = "查询参数")
+public class ChangeSaleManGradeDto {
+
+	@ApiModelProperty(value ="会员id")
+	private Long userId;
+
+	@ApiModelProperty(value ="等级ID")
+	private Long gradeId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/DelFyfaApplyDto.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/DelFyfaApplyDto.java
new file mode 100644
index 0000000..4e32d24
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/DelFyfaApplyDto.java
@@ -0,0 +1,17 @@
+package com.matrix.system.fenxiao.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "DelFyfaApplyDto", description = "参数")
+public class DelFyfaApplyDto {
+	
+	@ApiModelProperty(value ="申请记录ID")
+	 private Long gradeId;
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/DelSaleManGradeApplyDto.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/DelSaleManGradeApplyDto.java
new file mode 100644
index 0000000..2fb799c
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/DelSaleManGradeApplyDto.java
@@ -0,0 +1,20 @@
+package com.matrix.system.fenxiao.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "DelSaleManGradeApplyDto", description = "查询参数")
+public class DelSaleManGradeApplyDto {
+	
+	@ApiModelProperty(value ="会员id")
+	private Long userId;
+	
+	@ApiModelProperty(value ="申请记录ID")
+	 private Long applyId;
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ExamineSaleManApplyDto.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ExamineSaleManApplyDto.java
new file mode 100644
index 0000000..e389f85
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ExamineSaleManApplyDto.java
@@ -0,0 +1,26 @@
+package com.matrix.system.fenxiao.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+@Data
+@ApiModel(value = "ExamineSaleManApplyDto", description = "查询参数")
+public class ExamineSaleManApplyDto {
+
+    @NotNull
+	@ApiModelProperty(value ="会员ID")
+    private Long userId;
+    
+    @ApiModelProperty(value = "申请记录ID")
+	private Long applyId;
+
+    @ApiModelProperty(value ="审核状态   2:同意 3:不同意")
+    private Integer applyState;
+
+    @ApiModelProperty(hidden = true)
+    private Long companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/FyfaManageDto.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/FyfaManageDto.java
new file mode 100644
index 0000000..73c6ff9
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/FyfaManageDto.java
@@ -0,0 +1,22 @@
+package com.matrix.system.fenxiao.dto;
+
+import com.matrix.core.pojo.BasePageQueryDto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "FyfaManageDto", description = "查询参数")
+public class FyfaManageDto extends BasePageQueryDto {
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+	
+	@ApiModelProperty(value ="会员ID")
+	private Long userId;
+	
+	@ApiModelProperty(value ="申请记录ID")
+	 private Long applyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/LoadFenxiaoOrderBasicDto.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/LoadFenxiaoOrderBasicDto.java
new file mode 100644
index 0000000..80a80fd
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/LoadFenxiaoOrderBasicDto.java
@@ -0,0 +1,14 @@
+package com.matrix.system.fenxiao.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "LoadFenxiaoOrderBasicDto", description = "查询参数")
+public class LoadFenxiaoOrderBasicDto {
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/LoadFenxiaoOrderListDto.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/LoadFenxiaoOrderListDto.java
new file mode 100644
index 0000000..006e414
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/LoadFenxiaoOrderListDto.java
@@ -0,0 +1,41 @@
+package com.matrix.system.fenxiao.dto;
+
+import com.matrix.core.pojo.BasePageQueryDto;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+@ApiModel(value = "LoadFenxiaoOrderListDto", description = "查询参数")
+public class LoadFenxiaoOrderListDto extends BasePageQueryDto {
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+	
+	@ApiModelProperty(value ="订单状态")
+	private Integer ddType;
+	
+	@ApiModelProperty(value ="结算状态")
+	private Integer orderType;
+
+	@ApiModelProperty(value ="客户名称")
+	private String userName;
+	
+	@ApiModelProperty(value ="推广员名称")
+	private String tgy;
+	
+	@ApiModelProperty(value ="开始时间")
+	private Date startTime;
+	
+	@ApiModelProperty(value ="结束时间")
+	private Date endTime;
+	
+	@ApiModelProperty(value ="结算编号")
+	private String jsbh;
+	
+	@ApiModelProperty(value ="订单号")
+	private String ddh;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/LoadParamSettingBasicDto.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/LoadParamSettingBasicDto.java
new file mode 100644
index 0000000..ecbb93e
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/LoadParamSettingBasicDto.java
@@ -0,0 +1,20 @@
+package com.matrix.system.fenxiao.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "LoadParamSettingBasicDto", description = "查询参数")
+public class LoadParamSettingBasicDto {
+	
+	@ApiModelProperty(value ="会员ID")
+	private Long userId;
+
+	@ApiModelProperty(value ="申请记录ID")
+	private Long applyId;
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/LoadParamSettingDto.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/LoadParamSettingDto.java
new file mode 100644
index 0000000..50cfac5
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/LoadParamSettingDto.java
@@ -0,0 +1,25 @@
+package com.matrix.system.fenxiao.dto;
+
+import com.matrix.core.pojo.BasePageQueryDto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "LoadParamSettingDto", description = "查询参数")
+public class LoadParamSettingDto extends BasePageQueryDto {
+	
+	@ApiModelProperty(value ="会员姓名")
+	private String userName;
+	
+	@ApiModelProperty(value ="会员ID")
+	private Long userId;
+
+	@ApiModelProperty(value ="申请记录ID")
+	private Long applyId;
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+	
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/LoadSetOrderListDtoDto.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/LoadSetOrderListDtoDto.java
new file mode 100644
index 0000000..b23b183
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/LoadSetOrderListDtoDto.java
@@ -0,0 +1,27 @@
+package com.matrix.system.fenxiao.dto;
+
+import java.util.Date;
+
+import com.matrix.core.pojo.BasePageQueryDto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "LoadSetOrderListDtoDto", description = "查询参数")
+public class LoadSetOrderListDtoDto extends BasePageQueryDto {
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+
+	@ApiModelProperty(value ="会员姓名")
+	private String userName;
+	
+	@ApiModelProperty(value ="开始时间")
+	private Date startTime;
+	
+	@ApiModelProperty(value ="结束时间")
+	private Date endTime;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ShopSalesmanAppliingDto.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ShopSalesmanAppliingDto.java
new file mode 100644
index 0000000..3672483
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ShopSalesmanAppliingDto.java
@@ -0,0 +1,20 @@
+package com.matrix.system.fenxiao.dto;
+
+import com.matrix.core.pojo.BasePageQueryDto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "ShopSalesmanAppliingDto", description = "查询参数")
+public class ShopSalesmanAppliingDto extends BasePageQueryDto {
+	
+	@ApiModelProperty(value ="会员名称")
+    private String nickName;
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+
+	
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ShopSalesmanApplyDto.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ShopSalesmanApplyDto.java
new file mode 100644
index 0000000..39387a6
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ShopSalesmanApplyDto.java
@@ -0,0 +1,25 @@
+package com.matrix.system.fenxiao.dto;
+
+import com.matrix.core.pojo.BasePageQueryDto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "ShopSalesmanApplyDto", description = "查询参数")
+public class ShopSalesmanApplyDto extends BasePageQueryDto {
+	
+	@ApiModelProperty(value ="审核状态")
+    private Integer shenheState;
+	@ApiModelProperty(value ="分销员等级")
+	private Long salemanGrade;
+	@ApiModelProperty(value ="会员姓名")
+	private String userName;
+
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+
+	
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ShopSalesmanDetailDto.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ShopSalesmanDetailDto.java
new file mode 100644
index 0000000..4fda140
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ShopSalesmanDetailDto.java
@@ -0,0 +1,29 @@
+package com.matrix.system.fenxiao.dto;
+
+import com.matrix.core.pojo.BasePageQueryDto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "ShopSalesmanDetailDto", description = "查询参数")
+public class ShopSalesmanDetailDto extends BasePageQueryDto {
+	
+	@ApiModelProperty(value ="会员姓名")
+	private String userName;
+	
+	@ApiModelProperty(value ="会员ID")
+	private Long userId;
+
+	@ApiModelProperty(value ="申请记录ID")
+	private Long applyId;
+
+    @ApiModelProperty(value = " 结算状态1,待结算,2,已结算,3已退款")
+    private Integer orderType;
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+
+	
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/UnbundlingSaleManDto.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/UnbundlingSaleManDto.java
new file mode 100644
index 0000000..6ab0ba2
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/UnbundlingSaleManDto.java
@@ -0,0 +1,17 @@
+package com.matrix.system.fenxiao.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "UnbundlingSaleManDto", description = "查询参数")
+public class UnbundlingSaleManDto {
+	
+	@ApiModelProperty(value ="会员ID")
+	private Long userId;
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/UpdateFyfaDto.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/UpdateFyfaDto.java
new file mode 100644
index 0000000..31dcf80
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/UpdateFyfaDto.java
@@ -0,0 +1,32 @@
+package com.matrix.system.fenxiao.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "UpdateFyfaDto", description = "参数")
+public class UpdateFyfaDto {
+	
+	@ApiModelProperty(value = "id")
+	private Long id;
+	
+	@ApiModelProperty(value = "方案名称")
+	private String  name;
+
+	@ApiModelProperty(value = "自购返佣%")
+	private Double  selfCommission;
+
+	@ApiModelProperty(value = "推广提成%")
+	private Double  sealesCommission;
+	
+	@ApiModelProperty(value = "邀请提成 %")
+	private Double  invitationCommission;
+	
+	@ApiModelProperty(value = "等级条件(推广金额)")
+	private Double  gradeCondition;
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/UpdateSetOrderDoneDto.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/UpdateSetOrderDoneDto.java
new file mode 100644
index 0000000..dd4c723
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/UpdateSetOrderDoneDto.java
@@ -0,0 +1,32 @@
+package com.matrix.system.fenxiao.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "UpdateSetOrderDoneDto", description = "查询参数")
+public class UpdateSetOrderDoneDto {
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+	
+	@ApiModelProperty(value ="需要处理的IDs(字符串逗号隔开)")
+	private String orderIds;
+	
+	@ApiModelProperty(value ="结算方式1,线下结算,2余额结算")
+	private Integer setType;
+	
+	@ApiModelProperty(value ="结算人数")
+	private Integer  manCount;
+	
+	@ApiModelProperty(value ="结算单数")
+	private Integer  orderCount;
+	
+	@ApiModelProperty(value ="结算金额")
+	private Double  amount;
+	
+	@ApiModelProperty(value ="备注")
+	private String  remark;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/UpdateTgjhDto.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/UpdateTgjhDto.java
new file mode 100644
index 0000000..bfb530c
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/UpdateTgjhDto.java
@@ -0,0 +1,17 @@
+package com.matrix.system.fenxiao.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "UpdateTgjhDto", description = "参数")
+public class UpdateTgjhDto {
+	
+	@ApiModelProperty(value = "方案名称")
+	private String tgfa;
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/UpdateTgtpDto.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/UpdateTgtpDto.java
new file mode 100644
index 0000000..45c168d
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/dto/UpdateTgtpDto.java
@@ -0,0 +1,17 @@
+package com.matrix.system.fenxiao.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "UpdateTgjhDto", description = "参数")
+public class UpdateTgtpDto {
+	
+	@ApiModelProperty(value = "方案名称")
+	private String imageUrl;
+	
+	@ApiModelProperty(hidden = true)
+	private Long companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/entity/BizUser.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/entity/BizUser.java
new file mode 100644
index 0000000..6abef80
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/entity/BizUser.java
@@ -0,0 +1,188 @@
+package com.matrix.system.fenxiao.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.matrix.core.anotations.Extend;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @description 用户表
+ * @author jyy
+ */
+@Data
+@TableName("biz_user")
+public class BizUser  {
+    @Extend
+    private static final long serialVersionUID = 1L;
+
+
+    /**
+     * 主键
+     */
+    private String  userId;
+
+
+    /**
+     * 真实姓名
+     */
+    private String  userName;
+
+
+    /**
+     * 密码
+     */
+    private String  userPassword;
+
+
+    /**
+     * 用户昵称
+     */
+    private String  nickName;
+
+
+    /**
+     * 头像
+     */
+    private String  avatarUrl;
+
+
+    /**
+     * 微信openid用户唯一标识
+     */
+    private String  openId;
+
+
+    /**
+     * 用户在开发平台的唯一标识符
+     */
+    private String  unionId;
+
+
+    /**
+     * 性别 1、男  2、女  0、未知
+     */
+    private String  gender;
+
+
+    /**
+     * 手机号码
+     */
+    private String  phoneNumber;
+
+
+    /**
+     * 用户所在地
+     */
+    private String  area;
+
+
+    /**
+     * 用户所在城市
+     */
+    private String  city;
+
+
+    /**
+     * 用户所在省份
+     */
+    private String  province;
+
+
+    /**
+     * 用户所在国家
+     */
+    private String  country;
+
+
+    /**
+     * 会话密匙
+     */
+    private String  sessionKey;
+
+
+    /**
+     * 最后登录时间
+     */
+    private Date  lastLoginTime;
+
+
+    /**
+     * 用户状态
+     */
+    private Integer  userStatus;
+
+
+    /**
+     * vip等级
+     */
+    private Integer  userVip;
+
+
+    /**
+     * 到期时间
+     */
+    private Date  userExpiryTime;
+
+
+    /**
+     * 认证信息
+     */
+    private String  userAuthentication;
+
+
+    /**
+     * 用户是否授权  1、是  2、否
+     */
+    private Integer  userIsAuthorize;
+
+
+    /**
+     * 用户临时名称
+     */
+    private String  userTempName;
+
+
+    /**
+     * 用户临时头像
+     */
+    private String  userTempAvatarUrl;
+
+
+    /**
+     * 用户类型 1、普通用户  2、会员  3、游客
+     */
+    private Integer  userType;
+
+
+    /**
+     * 用户总积分
+     */
+    private Integer totalScore;
+
+
+    /**
+     * 用户当前积分
+     */
+    private Integer currentScore;
+
+
+    /**
+     * 上级用户openId
+     */
+    private String parentOpenId;
+
+
+    /**
+     * 绑定上级用户时间
+     */
+    private Date bindingParentTime;
+
+
+    /**
+     * 是否是销售员(1=是,0=否)
+     */
+    private Integer isSales;
+
+
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/entity/FenXiaoSettingEntity.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/entity/FenXiaoSettingEntity.java
new file mode 100644
index 0000000..7ed7815
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/entity/FenXiaoSettingEntity.java
@@ -0,0 +1,18 @@
+package com.matrix.system.fenxiao.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.matrix.system.score.entity.BaseEntity;
+
+@TableName("score_order")
+public class FenXiaoSettingEntity extends BaseEntity {
+
+	private String orderNo;
+
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/entity/ShopRevenueFlow.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/entity/ShopRevenueFlow.java
new file mode 100644
index 0000000..2a2130b
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/entity/ShopRevenueFlow.java
@@ -0,0 +1,69 @@
+package com.matrix.system.fenxiao.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.matrix.core.anotations.Extend;
+import com.matrix.system.score.entity.BaseEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @description 收益流水
+ * @author yourName
+ * @date 2021-03-10 17:34
+ */
+@Data
+@TableName("shop_revenue_flow")
+public class ShopRevenueFlow  extends BaseEntity {
+	@Extend
+	private static final long serialVersionUID = 1L; 
+
+	/**
+	 * 推广收益类型    推广收益
+	 */
+    public static final String TYPE_TGSY = "推广收益";
+    /**
+     * 推广收益类型   邀请收益
+     */
+   
+    public static final String TYPE_YQSY = "邀请收益";
+
+
+	
+	/**
+	 * 用户id
+	 */
+	@ApiModelProperty(hidden = true)
+	private Long  userId;
+	
+	/**
+	 * 收益说明
+	 */
+
+	@ApiModelProperty(value = "收益说明")
+	private String  revenueContent;
+	
+	/**
+	 * 收益金额
+	 */
+
+	@ApiModelProperty(value = "收益金额")
+	private Double  amount;
+	
+	/**
+	 * 原始订单ID
+	 */
+
+	@ApiModelProperty(value = "原始订单ID")
+	private Long  businessId;
+	
+	/**
+	 * 公司ID
+	 */
+
+	@ApiModelProperty(hidden = true)
+	private Long  companyId;
+
+
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/entity/ShopSalemanSettlement.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/entity/ShopSalemanSettlement.java
new file mode 100644
index 0000000..66a9dc1
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/entity/ShopSalemanSettlement.java
@@ -0,0 +1,93 @@
+package com.matrix.system.fenxiao.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.matrix.core.anotations.Extend;
+import com.matrix.system.score.entity.BaseEntity;
+import lombok.Data;
+
+/**
+ * @description 订单结算记录
+ * @author yourName
+ * @date 2021-03-10 17:34
+ */
+@Data
+@TableName("shop_saleman_settlement")
+public class ShopSalemanSettlement  extends BaseEntity {
+	@Extend
+	private static final long serialVersionUID = 1L; 
+	/**
+	 * 结算编号头部编码
+	 */
+    public static final String ORDERNO_START = "J";
+	
+	/**
+	 * 结算方式 1 线下结算
+	 */
+    public static final Integer SETTLEMENTWAY_XXJS = 1;
+
+	/**
+	 * 结算方式 2 微信余额结算
+	 */
+	public static final Integer SETTLEMENTWAY_YEJS = 2;
+
+	
+	/**
+	 * 结算编号
+	 */
+
+
+	private String  orderNo;
+	
+	/**
+	 * 结算方式1,线下结算,2余额结算
+	 */
+
+
+	private Integer  settlementWay;
+	
+	/**
+	 * 结算人数
+	 */
+
+
+	private Integer  manCount;
+	
+	/**
+	 * 结算单数
+	 */
+
+
+	private Integer  orderCount;
+	
+	/**
+	 * 结算金额
+	 */
+
+
+	private Double  amount;
+	
+	/**
+	 * 结算人
+	 */
+
+
+	private Integer  userId;
+	
+	/**
+	 * 备注
+	 */
+
+
+	private String  remark;
+	
+	/**
+	 * 公司ID
+	 */
+
+
+	private Long  companyId;
+
+
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/entity/ShopSalesmanApply.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/entity/ShopSalesmanApply.java
new file mode 100644
index 0000000..80bb8a8
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/entity/ShopSalesmanApply.java
@@ -0,0 +1,82 @@
+package com.matrix.system.fenxiao.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.matrix.system.score.entity.BaseEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @description 推广员申请记录
+ * @author yourName
+ * @date 2021-03-10 17:34
+ */
+@Data
+@TableName("shop_salesman_apply")
+public class ShopSalesmanApply  extends BaseEntity {
+	/**
+	 * 审核状态-1、待审核
+	 */
+	public static final int APPLY_STATUS_DSH = 1;
+	/**
+	 * 审核状态-2通过
+	 */
+	public static final int APPLY_STATUS_TG= 2;
+	/**
+	 * 审核状态-3未通过
+	 */
+	public static final int APPLY_STATUS_WTG = 3;
+	/**
+	 * 审核状态-4系统删除
+	 */
+	public static final int APPLY_STATUS_XTQX = 4;
+
+
+	/**
+	 * 申请方式1、自主申请
+	 */
+	public static  final  int APPLY_WAY_SELF=1;
+	/**
+	 * 申请方式2、自动添加
+	 */
+	public static  final  int APPLY_WAY_AUTO_ADD=2;
+	/**
+	 * 申请方式3上级邀请
+	 */
+	public static  final  int APPLY_WAY_INVITATION=3;
+	/**
+	 * 申请方式 4、手动添加
+	 */
+	public static  final  int APPLY_WAY_HAND_ADD=4;
+
+
+
+	@ApiModelProperty(value = "申请方式1、自主申请,2、自动添加,3上级邀请,4、手动添加")
+	private Integer  applyWay;
+
+	@ApiModelProperty(value = "申请用户id")
+	private Long  userId;
+	
+
+	@ApiModelProperty(value = "邀请用户ID")
+	private Long  parentUserId;
+	
+
+	@ApiModelProperty(value = "申请状态1、待审核,2通过,3未通过")
+	private Integer  applyStatus;
+
+	@ApiModelProperty(value = "备注")
+	private String  remark;
+	
+	@ApiModelProperty(value = "等级ID")
+	private long  gradeId;
+	
+	/**
+	 * 公司ID
+	 */
+	@ApiModelProperty(hidden = true)
+	private Long  companyId;
+
+
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/entity/ShopSalesmanGrade.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/entity/ShopSalesmanGrade.java
new file mode 100644
index 0000000..999b02c
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/entity/ShopSalesmanGrade.java
@@ -0,0 +1,75 @@
+package com.matrix.system.fenxiao.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.matrix.core.anotations.Extend;
+import com.matrix.system.score.entity.BaseEntity;
+import lombok.Data;
+
+/**
+ * @description 推广员等级
+ * @author yourName
+ * @date 2021-03-10 17:34
+ */
+@Data
+@TableName("shop_salesman_grade")
+public class ShopSalesmanGrade  extends BaseEntity {
+	@Extend
+	private static final long serialVersionUID = 1L; 
+
+	
+
+
+	
+	/**
+	 * 等级名称
+	 */
+
+
+	private String  name;
+	
+	/**
+	 * 推广提成%
+	 */
+
+
+	private Double  sealesCommission;
+
+	/**
+	 * 自购返佣比例%
+	 */
+
+	private Double  selfCommission;
+
+	
+	/**
+	 * 邀请提成 %
+	 */
+
+
+	private Double  invitationCommission;
+	
+	/**
+	 * 等级条件(推广金额额)
+	 */
+
+
+	private Double  gradeCondition;
+	
+	/**
+	 * 默认等级1是,2不是
+	 */
+
+
+	private Integer  isDefault;
+	
+	/**
+	 * 公司ID
+	 */
+
+
+	private Long  companyId;
+
+
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/entity/ShopSalesmanOrder.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/entity/ShopSalesmanOrder.java
new file mode 100644
index 0000000..1e19521
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/entity/ShopSalesmanOrder.java
@@ -0,0 +1,103 @@
+package com.matrix.system.fenxiao.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.matrix.core.anotations.Extend;
+import com.matrix.system.score.entity.BaseEntity;
+import lombok.Data;
+
+/**
+ * @description 分销订单
+ * @author yourName
+ * @date 2021-03-10 17:34
+ */
+@Data
+@TableName("shop_salesman_order")
+public class ShopSalesmanOrder  extends BaseEntity {
+	/**
+	 * 推广收益类型1推广收益
+	 */
+    public static final Integer REVENUE_TYPE_SALES = 1;
+
+	/**
+	 * 推广收益类型2邀请收益
+	 */
+	public static final Integer REVENUE_TYPE_INVITATION = 2;
+	/**
+	 * 分销单状态1待结算
+	 */
+	public static final Integer STATUS_DJS = 1;
+	/**
+	 * 分销单状态2已结算
+	 */
+	public static final Integer STATUS_YJS = 2;
+	/**
+	 * 分销单状态3已退款
+	 */
+	public static final Integer STATUS_YTK = 3;
+
+
+	@Extend
+	private static final long serialVersionUID = 1L; 
+
+	
+
+
+	
+	/**
+	 * 订单id
+	 */
+
+
+	private Long  orderId ;
+	
+	/**
+	 * 用户id
+	 */
+
+
+	private Long  userId;
+	
+	/**
+	 * 收益人id
+	 */
+
+
+	private Long  salesUserId;
+	
+	/**
+	 * 收益类型1,推广收益,2邀请收益
+	 */
+
+
+	private Integer  revenueType;
+	
+	/**
+	 * 收益金额
+	 */
+
+
+	private Double  amount;
+	
+	/**
+	 * 结算状态 1,待结算,2,已结算,3已退款
+	 */
+	private Integer  orderStatus;
+	
+	/**
+	 * 结算单ID
+	 */
+
+
+	private Long  settlementId;
+	
+	/**
+	 * 公司ID
+	 */
+
+
+	private Long  companyId;
+
+
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/entity/ShopSalesmanOrderItem.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/entity/ShopSalesmanOrderItem.java
new file mode 100644
index 0000000..a400637
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/entity/ShopSalesmanOrderItem.java
@@ -0,0 +1,54 @@
+package com.matrix.system.fenxiao.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.matrix.core.anotations.Extend;
+import com.matrix.system.score.entity.BaseEntity;
+import lombok.Data;
+
+/**
+ * @description 分销单明细
+ * @author yourName
+ * @date 2021-03-12 13:17
+ */
+@Data
+@TableName("shop_salesman_order_item")
+public class ShopSalesmanOrderItem  extends BaseEntity {
+	@Extend
+	private static final long serialVersionUID = 1L; 
+
+	
+
+
+	
+	/**
+	 * 订单id
+	 */
+
+
+	private Long  orderId ;
+	
+	/**
+	 * 分销订单id
+	 */
+
+
+	private Long  salesmanOrderId;
+	
+	/**
+	 * 订单明细id
+	 */
+
+
+	private Long  orderItemId;
+	
+	/**
+	 * 收益金额
+	 */
+
+
+	private Double  amount;
+
+
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/service/FenXiaoSettingService.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/service/FenXiaoSettingService.java
new file mode 100644
index 0000000..270cc56
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/service/FenXiaoSettingService.java
@@ -0,0 +1,53 @@
+package com.matrix.system.fenxiao.service;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.matrix.core.constance.MatrixConstance;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.tools.StringUtils;
+import com.matrix.core.tools.WebUtil;
+import com.matrix.system.common.bean.BusParameterSettings;
+import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
+import com.matrix.system.fenxiao.dao.FenXiaoSettingDao;
+import com.matrix.system.fenxiao.entity.FenXiaoSettingEntity;
+import com.matrix.system.hive.bean.ShoppingGoods;
+
+@Service
+public class FenXiaoSettingService extends ServiceImpl<FenXiaoSettingDao, FenXiaoSettingEntity> {
+
+    @Autowired
+    private BusParameterSettingsDao busParameterSettingsDao;
+
+	public AjaxResult updateFenXiaoSettingByCompanyId(List<BusParameterSettings> busParameterSettings) {
+        //获取当前登录人员信息
+        SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+        for (BusParameterSettings busParameterSetting:busParameterSettings ) {
+            String paramCode = busParameterSetting.getParamCode();
+            if(StringUtils.isNotBlank(paramCode)){
+                //删除原有code
+                BusParameterSettings delParanm=new BusParameterSettings();
+                delParanm.setCompanyId(user.getCompanyId());
+                delParanm.setParamCode(paramCode);
+                busParameterSettingsDao.deleteByModel(delParanm);
+                //添加新的code
+                BusParameterSettings newParam=new BusParameterSettings();
+                newParam.setParamCode(paramCode);
+                newParam.setCompanyId(user.getCompanyId());
+                newParam.setParamValue(busParameterSetting.getParamValue());
+                newParam.setParamValue1(busParameterSetting.getParamValue1());
+                newParam.setParamValue2(busParameterSetting.getParamValue2());
+                busParameterSettingsDao.insert(newParam);
+            }else{
+                return AjaxResult.buildFailInstance("code不能为空");
+            }
+        }
+        AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, "更新成功");
+        return result;
+    }
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopRevenueFlowService.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopRevenueFlowService.java
new file mode 100644
index 0000000..ef3e100
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopRevenueFlowService.java
@@ -0,0 +1,20 @@
+package com.matrix.system.fenxiao.service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.matrix.system.fenxiao.dao.ShopRevenueFlowDao;
+import com.matrix.system.fenxiao.entity.ShopRevenueFlow;
+import org.springframework.stereotype.Service;
+
+/**
+ * @description 收益流水
+ * @author jyy
+ * @date 2021-03-10 15:22
+ */
+@Service
+public class ShopRevenueFlowService  extends ServiceImpl<ShopRevenueFlowDao, ShopRevenueFlow>{
+
+
+
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalemanSettlementService.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalemanSettlementService.java
new file mode 100644
index 0000000..b49178e
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalemanSettlementService.java
@@ -0,0 +1,20 @@
+package com.matrix.system.fenxiao.service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.matrix.system.fenxiao.dao.ShopSalemanSettlementDao;
+import com.matrix.system.fenxiao.entity.ShopSalemanSettlement;
+import org.springframework.stereotype.Service;
+
+/**
+ * @description 订单结算记录
+ * @author jyy
+ * @date 2021-03-10 15:22
+ */
+@Service
+public class ShopSalemanSettlementService  extends ServiceImpl<ShopSalemanSettlementDao, ShopSalemanSettlement>{
+
+
+
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalesmanApplyService.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalesmanApplyService.java
new file mode 100644
index 0000000..617db32
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalesmanApplyService.java
@@ -0,0 +1,444 @@
+package com.matrix.system.fenxiao.service;
+
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.matrix.core.constance.MatrixConstance;
+import com.matrix.core.exception.GlobleException;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.pojo.VerificationResult;
+import com.matrix.core.tools.WebUtil;
+import com.matrix.system.common.bean.BusParameterSettings;
+import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
+import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant;
+import com.matrix.system.fenxiao.dao.ShopSalesmanApplyDao;
+import com.matrix.system.fenxiao.dao.ShopSalesmanGradeDao;
+import com.matrix.system.fenxiao.dto.*;
+import com.matrix.system.fenxiao.entity.ShopSalesmanApply;
+import com.matrix.system.fenxiao.entity.ShopSalesmanGrade;
+import com.matrix.system.fenxiao.vo.*;
+import com.matrix.system.hive.action.util.QueryUtil;
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.hive.dao.SysVipInfoDao;
+import com.matrix.system.hive.service.SysVipInfoService;
+import com.matrix.system.shopXcx.dao.ShopOrderV2Dao;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @description 推广员申请记录
+ * @author jyy
+ * @date 2021-03-10 15:22
+ */
+@Service
+public class ShopSalesmanApplyService  extends ServiceImpl<ShopSalesmanApplyDao, ShopSalesmanApply>{
+
+
+    @Autowired
+    BusParameterSettingsDao busParameterSettingsDao;
+
+    @Autowired
+    ShopSalesmanApplyDao shopSalesmanApplyDao;
+    
+    @Autowired
+    ShopSalesmanGradeDao shopSalesmanGradeDao;
+
+    @Autowired
+    SysVipInfoDao sysVipInfoDao;
+
+    @Autowired
+    SysVipInfoService sysVipInfoService;
+
+    @Autowired
+    ShopOrderV2Dao shopOrderV2Dao;
+
+    /**
+     * 申请成为推广员
+     * @param userId
+     * @param invitationId
+     * @return
+     */
+    public ShopSalesmanApply applyToBeAnSalesman(Long userId,Long gradeId,Long invitationId,int applyWay) {
+
+        SysVipInfo loginUser=sysVipInfoDao.selectById(userId);
+        //验证申请条件
+        VerificationResult verificationResult = isAbleToBeAnSalesman(userId,loginUser.getCompanyId());
+        if(verificationResult.isJudgeResult()){
+            //校验审核状态,和是否重复发起
+            QueryWrapper<ShopSalesmanApply> queryWrapper = new QueryWrapper<>();
+            queryWrapper.eq("user_id",loginUser.getId());
+            queryWrapper.in("apply_status",Arrays.asList("1,2".split(",")));
+            ShopSalesmanApply checkApply = shopSalesmanApplyDao.selectOne(queryWrapper);
+            if(checkApply==null||
+                    checkApply.getApplyStatus()==ShopSalesmanApply.APPLY_STATUS_WTG){
+
+                ShopSalesmanApply shopSalesmanApply=new ShopSalesmanApply();
+                shopSalesmanApply.setUserId(userId);
+
+                shopSalesmanApply.setCreateBy(MatrixConstance.SYSTEM_USER);
+                shopSalesmanApply.setApplyWay(ShopSalesmanApply.APPLY_WAY_SELF);
+
+                shopSalesmanApply.setCompanyId(loginUser.getCompanyId());
+                shopSalesmanApply.setUpdateBy(MatrixConstance.SYSTEM_USER);
+                Date date = new Date();
+                shopSalesmanApply.setCreateTime(date);
+                shopSalesmanApply.setUpdateTime(date);
+
+                if(invitationId!=null){
+                    shopSalesmanApply.setParentUserId(invitationId);
+                }else if(loginUser.getRecommendId()!=null){
+                    //如果曾经是被邀请进来的则自动绑定为之前邀请人的下级
+                    shopSalesmanApply.setParentUserId(loginUser.getRecommendId());
+                }
+                if(gradeId!=null){
+                    shopSalesmanApply.setGradeId(gradeId);
+                }else{
+                    //获取初始等级ID(公司id,是否为初始等级)
+                    QueryWrapper<ShopSalesmanGrade> queryWrapperOrepool = new QueryWrapper<>();
+                    queryWrapperOrepool.eq("company_id", loginUser.getCompanyId());
+                    queryWrapperOrepool.eq("is_default", 1);
+                    ShopSalesmanGrade shopSalesmanGrade = shopSalesmanGradeDao.selectOne(queryWrapperOrepool);
+                    shopSalesmanApply.setGradeId(shopSalesmanGrade.getId());
+                }
+                shopSalesmanApply.setApplyWay(applyWay);
+
+                BusParameterSettings busParameterSettings = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_AUDIT_METHOD, loginUser.getCompanyId());
+                if(busParameterSettings!=null
+                        &&busParameterSettings.getParamValue().equals("1")){
+                    //自动审核
+                    //初始等级ID(公司id,是否为初始等级)
+                    QueryWrapper<ShopSalesmanGrade> queryWrapperOrepool = new QueryWrapper<>();
+                    queryWrapperOrepool.eq("company_id", loginUser.getCompanyId());
+                    queryWrapperOrepool.eq("is_default", 1);
+                    ShopSalesmanGrade shopSalesmanGrade = shopSalesmanGradeDao.selectOne(queryWrapperOrepool);
+                    shopSalesmanApply.setApplyStatus(ShopSalesmanApply.APPLY_STATUS_TG);
+                    sysVipInfoService.setToBeAnSalesman(loginUser.getId(),invitationId,shopSalesmanGrade.getId());
+
+                }else{
+                    shopSalesmanApply.setApplyStatus(ShopSalesmanApply.APPLY_STATUS_DSH);
+                }
+                shopSalesmanApplyDao.insert(shopSalesmanApply);
+                return  shopSalesmanApply;
+            }else{
+                throw  new GlobleException("不能重复申请");
+            }
+        }else{
+            throw  new GlobleException(verificationResult.getMsg());
+        }
+    }
+
+
+    /**
+     * 判断是否满足申请成为分销员的条件
+     */
+    public VerificationResult isAbleToBeAnSalesman(Long userId,Long companyId) {
+
+        VerificationResult verificationResult=null;
+
+        //申请模式
+        BusParameterSettings applyWay = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_APPLY_WAY, companyId);
+        if (FenxiaoSettingConstant.FX_APPLY_WAY_AUTO.equals(applyWay.getParamValue())) {
+            verificationResult= VerificationResult.buildVerificationResult(true);
+        }else{
+            //申请条件
+            BusParameterSettings applyCondition = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_APPLY_CONDITION, companyId);
+            switch (applyCondition.getParamValue()){
+                case FenxiaoSettingConstant.FX_APPLY_CONDITION_WTJ:
+                    verificationResult= VerificationResult.buildVerificationResult(true);
+                    break;
+                case FenxiaoSettingConstant.FX_APPLY_CONDITION_XFZDCP:
+                    int buyZdcpCount= shopOrderV2Dao.countBuyZdcp(userId,applyCondition.getParamValue1());
+                    if(buyZdcpCount>0){
+                        verificationResult= VerificationResult.buildVerificationResult(true);
+                    }else{
+                        verificationResult= VerificationResult.buildVerificationResult(false,"不符合申请条件,请消费指定产品后再申请!");
+                    }
+                    break;
+                case FenxiaoSettingConstant.FX_APPLY_CONDITION_XFRYCP:
+                    //判断用户是否有确认收货的产品
+                    int receivedOrderCount= shopOrderV2Dao.selectReceivedOrderCount(userId);
+                    if(receivedOrderCount>0){
+                        verificationResult= VerificationResult.buildVerificationResult(true);
+                    }else{
+                        verificationResult= VerificationResult.buildVerificationResult(false,"不符合申请条件,请消费任意产品后再申请!");
+                    }
+                    break;
+                case FenxiaoSettingConstant.FX_APPLY_CONDITION_XCZDJE:
+                    Double zdje=Double.parseDouble(applyCondition.getParamValue2());
+                    Double yxfje=shopOrderV2Dao.countOrderAmount(userId);
+                    if(zdje<yxfje){
+                        verificationResult=VerificationResult.buildVerificationResult(true);
+                    }else{
+                        verificationResult= VerificationResult.buildVerificationResult(false,"不符合申请条件,请消费满"+zdje+"元后再申请!");
+                    }
+                    break;
+                default:
+                    verificationResult= VerificationResult.buildVerificationResult(true);
+            }
+        }
+        return verificationResult;
+    }
+
+
+    public IPage<ShopSalesmanApplyVo> findShopSalesmanApplyList(Page<ShopSalesmanApplyVo> page, ShopSalesmanApplyDto shopSalesmanApplyDto) {
+        return shopSalesmanApplyDao.findShopSalesmanApplyList(page,shopSalesmanApplyDto);
+    }
+
+	public IPage<ShopSalesmanAppliingVo> findShopSalesmanAppliingList(Page<ShopSalesmanAppliingVo> page,
+			ShopSalesmanAppliingDto shopSalesmanAppliingDto) {
+		return shopSalesmanApplyDao.findShopSalesmanAppliingList(page,shopSalesmanAppliingDto);
+	}
+
+    public IPage<ShopSalesmanAppliingVo> selectBizUserApplyList(Page<ShopSalesmanAppliingVo> page, ShopSalesmanAppliingDto shopSalesmanAppliingDto) {
+        return shopSalesmanApplyDao.selectBizUserApplyList(page,shopSalesmanAppliingDto);
+    }
+
+	public List<ShopSalesmanGradeVo> getShopSalesmanGradeVo(Long companyId) {
+		return shopSalesmanGradeDao.getShopSalesmanGradeVo(companyId);
+	}
+	
+	@Transactional(rollbackFor = Exception.class)
+	public void addSaleManApply(Long userId,Long gradeId) {
+		SysVipInfo user = sysVipInfoDao.selectById(userId);
+		applyToBeAnSalesman(user.getId(),gradeId, null,ShopSalesmanApply.APPLY_WAY_HAND_ADD);
+	}
+
+	@Transactional(rollbackFor = Exception.class)
+	public void examineSaleManApply(ShopSalesmanApply shopSalesmanApply, Integer applyState) {
+		Long userId = shopSalesmanApply.getUserId();
+        Long parentUserId = shopSalesmanApply.getParentUserId();
+		SysVipInfo sysVipInfo = sysVipInfoDao.selectById(userId);
+		//修改审核记录
+		if(ShopSalesmanApply.APPLY_STATUS_TG == applyState) {
+			shopSalesmanApply.setApplyStatus(ShopSalesmanApply.APPLY_STATUS_TG);
+			sysVipInfo.setIsSales(SysVipInfo.IS_SALES);
+		}else {
+			shopSalesmanApply.setApplyStatus(ShopSalesmanApply.APPLY_STATUS_WTG);
+			sysVipInfo.setIsSales(SysVipInfo.NOT_SALES);
+		}
+		shopSalesmanApplyDao.updateById(shopSalesmanApply);
+		//修改USER的状态
+		sysVipInfo.setRecommendId(parentUserId);
+		sysVipInfo.setBindingParentTime(new Date());
+        sysVipInfo.setSalesmanGrade(shopSalesmanApply.getGradeId());
+		sysVipInfoDao.update(sysVipInfo);
+	}
+
+	public IPage<ShopSalesmanApplyVo> findShopSalesmanDetail(Page<ShopSalesmanApplyVo> page,
+			ShopSalesmanDetailDto shopSalesmanDetailDto) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public SalesmanBasicDetailVo selectShopSalesmanDetailByOpenId(Long userId, long applyId) {
+		//获取个人信息
+		SysVipInfo sysVipInfo = sysVipInfoDao.selectById(userId);
+		Long companyId = sysVipInfo.getCompanyId();
+		return shopSalesmanApplyDao.selectShopSalesmanDetailByOpenId(sysVipInfo.getId(),companyId,applyId);
+	}
+
+	public IPage<ShopCustomDetailVo> findCustomDetail(Page<ShopCustomDetailVo> page,LoadParamSettingDto loadParamSettingDto) {
+		return shopSalesmanApplyDao.findCustomDetail(page,loadParamSettingDto);
+	}
+
+	public IPage<ShopCustomDetailVo> findCustomLow(Page<ShopCustomDetailVo> pageLow,
+			ShopSalesmanDetailDto shopSalesmanDetailDto) {
+		return shopSalesmanApplyDao.findCustomLow(pageLow,shopSalesmanDetailDto);
+	}
+
+	public IPage<ShopOrderDetailVo> findShopOrderDetail(Page<ShopOrderDetailVo> pageOrder,
+			ShopSalesmanDetailDto shopSalesmanDetailDto) {
+		return shopSalesmanApplyDao.findShopOrderDetail(pageOrder,shopSalesmanDetailDto);
+	}
+
+    @Transactional(rollbackFor = Exception.class)
+	public AjaxResult changeSaleManGrade(ChangeSaleManGradeDto changeSaleManGradeDto) {
+
+        SysVipInfo vipInfo = sysVipInfoDao.selectById(changeSaleManGradeDto.getUserId());
+
+        //获取对应的公司的等级
+        QueryWrapper<ShopSalesmanGrade> queryWrapperOrepool = new QueryWrapper<>();
+        queryWrapperOrepool.eq("is_default", 1);
+        queryWrapperOrepool.eq("company_id", vipInfo.getCompanyId());
+        ShopSalesmanGrade shopSalesmanGrade = shopSalesmanGradeDao.selectOne(queryWrapperOrepool);
+
+        //不是分销员不允许修改
+        Integer isSales = vipInfo.getIsSales();
+        if(SysVipInfo.IS_SALES != isSales) {
+        	return AjaxResult.buildFailInstance("当前用户未通过审核,不允许修改");
+        }
+        
+        //修改申请记录的等级
+        QueryWrapper<ShopSalesmanApply> queryShopSalesmanApply = new QueryWrapper<>();
+        queryShopSalesmanApply.eq("apply_status", 2);
+        queryShopSalesmanApply.eq("user_id", vipInfo.getId());
+        queryShopSalesmanApply.eq("company_id", vipInfo.getCompanyId());
+        ShopSalesmanApply shopSalesmanApply = shopSalesmanApplyDao.selectOne(queryShopSalesmanApply);
+        Long gradeId = changeSaleManGradeDto.getGradeId();
+        if(ObjectUtil.isEmpty(gradeId)) {
+        	vipInfo.setSalesmanGrade(shopSalesmanGrade.getId());
+        	shopSalesmanApply.setGradeId(shopSalesmanGrade.getId());
+        }else {
+        	vipInfo.setSalesmanGrade(gradeId);
+        	shopSalesmanApply.setGradeId(gradeId);
+        }
+        sysVipInfoDao.update(vipInfo);
+        shopSalesmanApplyDao.updateById(shopSalesmanApply);
+        
+        return AjaxResult.buildSuccessInstance("修改等级成功");
+	}
+
+    @Transactional(rollbackFor = Exception.class)
+	public AjaxResult unbundlingSaleMan(UnbundlingSaleManDto unbundlingSaleManDto) {
+
+        Long userId = unbundlingSaleManDto.getUserId();
+        sysVipInfoDao.unbundlingSaleMan(userId);
+        return AjaxResult.buildSuccessInstance("解绑成功");
+	}
+
+    @Transactional(rollbackFor = Exception.class)
+	public AjaxResult delSaleManGradeApply(DelSaleManGradeApplyDto delSaleManGradeApplyDto) {
+		//设置用户公司ID
+        QueryUtil.setQueryLimitCom(delSaleManGradeApplyDto);
+
+        
+        //将biz_user的is_sale设置成否
+        SysVipInfo vipInfo = sysVipInfoDao.selectById(delSaleManGradeApplyDto.getUserId());
+        if(ObjectUtil.isEmpty(vipInfo)) {
+        	return AjaxResult.buildFailInstance("当前用户已不存在");
+        }
+        vipInfo.setIsSales(SysVipInfo.NOT_SALES);
+        sysVipInfoDao.update(vipInfo);
+        //将记录设置成系统取消
+        ShopSalesmanApply selectById = shopSalesmanApplyDao.selectById(delSaleManGradeApplyDto.getApplyId());
+        selectById.setApplyStatus(ShopSalesmanApply.APPLY_STATUS_XTQX);
+        shopSalesmanApplyDao.updateById(selectById);
+		return AjaxResult.buildSuccessInstance("操作成功");
+	}
+
+	public IPage<FyfaManageVo> findFyfaManageList(Page<FyfaManageVo> page, FyfaManageDto fyfaManageDto) {
+		return shopSalesmanGradeDao.findFyfaManageList(page,fyfaManageDto);
+	}
+
+    @Transactional(rollbackFor = Exception.class)
+	public void addFyfa(SysUsers user) {
+		ShopSalesmanGrade shopSalesmanGrade = new ShopSalesmanGrade();
+		shopSalesmanGrade.setIsDefault(2);
+		shopSalesmanGrade.setCreateBy(user.getSuName());
+		shopSalesmanGrade.setUpdateBy(user.getSuName());
+		shopSalesmanGrade.setCreateTime(new Date());
+		shopSalesmanGrade.setUpdateTime(new Date());
+		shopSalesmanGrade.setCompanyId(user.getCompanyId());
+		shopSalesmanGradeDao.insert(shopSalesmanGrade);
+	}
+
+    @Transactional(rollbackFor = Exception.class)
+	public AjaxResult delFyfaApply(DelFyfaApplyDto delFyfaApplyDto) {
+		//设置用户公司ID
+        QueryUtil.setQueryLimitCom(delFyfaApplyDto);
+        Long gradeId = delFyfaApplyDto.getGradeId();
+        ShopSalesmanGrade selectById = shopSalesmanGradeDao.selectById(gradeId);
+        if(ObjectUtil.isEmpty(selectById)) {
+        	return AjaxResult.buildFailInstance("当前行数据不存在,请刷新页面");
+        }
+        shopSalesmanGradeDao.deleteById(gradeId);
+		return AjaxResult.buildSuccessInstance("操作成功");
+	}
+
+    @Transactional(rollbackFor = Exception.class)
+	public AjaxResult updateFyfa(UpdateFyfaDto updateFyfaDto) {
+        //设置用户公司ID
+        QueryUtil.setQueryLimitCom(updateFyfaDto);
+        ShopSalesmanGrade selectById = shopSalesmanGradeDao.selectById(updateFyfaDto.getId());
+        String name = updateFyfaDto.getName();
+        if(StrUtil.isEmpty(name)) {
+        	return AjaxResult.buildFailInstance("请输入方案名称");
+        }
+        Double selfCommission = updateFyfaDto.getSelfCommission();
+        if(ObjectUtil.isEmpty(selfCommission)) {
+            return AjaxResult.buildFailInstance("请输入正确的自购返佣");
+        }
+        Double sealesCommission = updateFyfaDto.getSealesCommission();
+        if(ObjectUtil.isEmpty(sealesCommission)) {
+        	return AjaxResult.buildFailInstance("请输入正确的推广提成");
+        }
+        Double invitationCommission = updateFyfaDto.getInvitationCommission();
+        if(ObjectUtil.isEmpty(invitationCommission)) {
+        	return AjaxResult.buildFailInstance("请输入正确的邀请提成");
+        }
+        if(ObjectUtil.isEmpty(selectById)) {
+            SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+            ShopSalesmanGrade shopSalesmanGrade = new ShopSalesmanGrade();
+            shopSalesmanGrade.setCompanyId(updateFyfaDto.getCompanyId());
+            shopSalesmanGrade.setName(updateFyfaDto.getName());
+            shopSalesmanGrade.setSelfCommission(selfCommission);
+            shopSalesmanGrade.setSealesCommission(sealesCommission);
+            shopSalesmanGrade.setInvitationCommission(invitationCommission);
+            shopSalesmanGrade.setGradeCondition(updateFyfaDto.getGradeCondition());
+            shopSalesmanGrade.setIsDefault(2);
+            shopSalesmanGrade.setCreateBy(user.getSuName());
+            shopSalesmanGrade.setUpdateBy(user.getSuName());
+            shopSalesmanGrade.setCreateTime(new Date());
+            shopSalesmanGrade.setUpdateTime(new Date());
+            shopSalesmanGrade.setCompanyId(user.getCompanyId());
+            shopSalesmanGradeDao.insert(shopSalesmanGrade);
+            return AjaxResult.buildSuccessInstance("操作成功");
+        }
+        selectById.setCompanyId(updateFyfaDto.getCompanyId());
+        selectById.setName(updateFyfaDto.getName());
+        selectById.setSelfCommission(selfCommission);
+        selectById.setSealesCommission(sealesCommission);
+        selectById.setInvitationCommission(invitationCommission);
+        selectById.setGradeCondition(updateFyfaDto.getGradeCondition());
+        shopSalesmanGradeDao.updateById(selectById);
+		return AjaxResult.buildSuccessInstance("操作成功");
+	}
+    
+    @Transactional(rollbackFor = Exception.class)
+	public AjaxResult updateTgjh(UpdateTgjhDto updateTgjhDto) {
+		//设置用户公司ID
+        QueryUtil.setQueryLimitCom(updateTgjhDto);
+        //获取推广计划的Param
+        Long companyId = updateTgjhDto.getCompanyId();
+        BusParameterSettings busParameterSettings = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_TG_PLAN, companyId);
+        busParameterSettings.setParamValue3(updateTgjhDto.getTgfa());
+        busParameterSettingsDao.updateByModel(busParameterSettings);
+		return AjaxResult.buildSuccessInstance("保存成功");
+	}
+
+    @Transactional(rollbackFor = Exception.class)
+	public AjaxResult updateTgtp(UpdateTgtpDto updateTgtpDto) {
+		//设置用户公司ID
+        QueryUtil.setQueryLimitCom(updateTgtpDto);
+        //获取推广计划的Param
+        Long companyId = updateTgtpDto.getCompanyId();
+        BusParameterSettings busParameterSettings = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_TG_POSTER, companyId);
+        busParameterSettings.setParamValue(updateTgtpDto.getImageUrl());
+        busParameterSettingsDao.updateByModel(busParameterSettings);
+		return AjaxResult.buildSuccessInstance("保存成功");
+	}
+
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalesmanGradeService.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalesmanGradeService.java
new file mode 100644
index 0000000..663bc50
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalesmanGradeService.java
@@ -0,0 +1,20 @@
+package com.matrix.system.fenxiao.service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.matrix.system.fenxiao.dao.ShopSalesmanGradeDao;
+import com.matrix.system.fenxiao.entity.ShopSalesmanGrade;
+import org.springframework.stereotype.Service;
+
+/**
+ * @description 推广员等级
+ * @author jyy
+ * @date 2021-03-10 15:22
+ */
+@Service
+public class ShopSalesmanGradeService  extends ServiceImpl<ShopSalesmanGradeDao, ShopSalesmanGrade>{
+
+
+
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalesmanOrderItemService.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalesmanOrderItemService.java
new file mode 100644
index 0000000..fcfb554
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalesmanOrderItemService.java
@@ -0,0 +1,20 @@
+package com.matrix.system.fenxiao.service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.matrix.system.fenxiao.dao.ShopSalesmanOrderItemDao;
+import com.matrix.system.fenxiao.entity.ShopSalesmanOrderItem;
+import org.springframework.stereotype.Service;
+
+/**
+ * @description 分销单明细
+ * @author yourName
+ * @date 2021-03-12 13:17
+ */
+@Service
+public class ShopSalesmanOrderItemService  extends ServiceImpl<ShopSalesmanOrderItemDao, ShopSalesmanOrderItem>{
+
+
+
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalesmanOrderService.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalesmanOrderService.java
new file mode 100644
index 0000000..55c708d
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalesmanOrderService.java
@@ -0,0 +1,185 @@
+package com.matrix.system.fenxiao.service;
+
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.hive.dao.SysVipInfoDao;
+import com.matrix.core.constance.MatrixConstance;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.tools.StringUtils;
+import com.matrix.core.tools.WebUtil;
+import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.fenxiao.dao.ShopRevenueFlowDao;
+import com.matrix.system.fenxiao.dao.ShopSalemanSettlementDao;
+import com.matrix.system.fenxiao.dao.ShopSalesmanOrderDao;
+import com.matrix.system.fenxiao.dto.LoadFenxiaoOrderBasicDto;
+import com.matrix.system.fenxiao.dto.LoadFenxiaoOrderListDto;
+import com.matrix.system.fenxiao.dto.LoadSetOrderListDtoDto;
+import com.matrix.system.fenxiao.dto.UpdateSetOrderDoneDto;
+import com.matrix.system.fenxiao.entity.ShopRevenueFlow;
+import com.matrix.system.fenxiao.entity.ShopSalemanSettlement;
+import com.matrix.system.fenxiao.entity.ShopSalesmanOrder;
+import com.matrix.system.fenxiao.vo.LoadFenxiaoOrderBasicVo;
+import com.matrix.system.fenxiao.vo.LoadFenxiaoOrderListVo;
+import com.matrix.system.fenxiao.vo.LoadSetOrderListDtoVo;
+import com.matrix.system.hive.action.util.QueryUtil;
+import com.matrix.system.hive.service.CodeService;
+import com.matrix.system.shopXcx.bean.ShopOrder;
+import com.matrix.system.shopXcx.dao.ShopOrderDao;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @description 分销订单
+ * @author jyy
+ * @date 2021-03-10 15:22
+ */
+@Service
+public class ShopSalesmanOrderService  extends ServiceImpl<ShopSalesmanOrderDao, ShopSalesmanOrder>{
+	
+	@Autowired
+	ShopSalesmanOrderDao shopSalesmanOrderDao;
+	@Autowired
+	CodeService codeService;
+	@Autowired
+	ShopSalemanSettlementDao shopSalemanSettlementDao;
+	@Autowired
+	ShopRevenueFlowDao shopRevenueFlowDao;
+	@Autowired
+	ShopOrderDao shopOrderDao;
+	@Autowired
+	SysVipInfoDao sysVipInfoDao;
+
+	public AjaxResult loadFenxiaoOrderBasic(LoadFenxiaoOrderBasicDto loadFenxiaoOrderBasicDto) {
+		//设置用户公司ID
+    	QueryUtil.setQueryLimitCom(loadFenxiaoOrderBasicDto);
+    	AjaxResult result= AjaxResult.buildSuccessInstance("查询成功");
+    	//根据OPENID查询基础信息
+    	Long companyId = loadFenxiaoOrderBasicDto.getCompanyId();
+    	LoadFenxiaoOrderBasicVo loadFenxiaoOrderBasicVo = shopSalesmanOrderDao.selectFenxiaoOrderBasicByCompanyId(companyId);
+    	result.putInMap("basicdetail", loadFenxiaoOrderBasicVo);
+        return result;
+	}
+
+	public AjaxResult loadFenxiaoOrderList(LoadFenxiaoOrderListDto loadFenxiaoOrderListDto) {
+		//设置用户公司ID
+    	QueryUtil.setQueryLimitCom(loadFenxiaoOrderListDto);
+        //排序
+        if(StringUtils.isBlank(loadFenxiaoOrderListDto.getSort())){
+        	loadFenxiaoOrderListDto.setSort("create_time");
+        	loadFenxiaoOrderListDto.setOrder("desc");
+        }
+        Page<LoadFenxiaoOrderListVo> page = new Page(loadFenxiaoOrderListDto.getPageNum(), loadFenxiaoOrderListDto.getPageSize());
+        IPage<LoadFenxiaoOrderListVo> loadFenxiaoOrderListVos = shopSalesmanOrderDao.findFenxiaoOrderList(page,loadFenxiaoOrderListDto);
+        return AjaxResult.buildSuccessInstance(loadFenxiaoOrderListVos.getRecords(),loadFenxiaoOrderListVos.getTotal());
+	}
+
+	public AjaxResult loadSetOrderList(LoadSetOrderListDtoDto loadSetOrderListDto) {
+		//设置用户公司ID
+		QueryUtil.setQueryLimitCom(loadSetOrderListDto);
+		//排序
+		if(StringUtils.isBlank(loadSetOrderListDto.getSort())){
+			loadSetOrderListDto.setSort("create_time");
+			loadSetOrderListDto.setOrder("desc");
+		}
+		Page<LoadSetOrderListDtoVo> page = new Page(loadSetOrderListDto.getPageNum(), loadSetOrderListDto.getPageSize());
+		IPage<LoadSetOrderListDtoVo> loadFenxiaoOrderListVos = shopSalesmanOrderDao.findSetOrderList(page,loadSetOrderListDto);
+		return AjaxResult.buildSuccessInstance(loadFenxiaoOrderListVos.getRecords(),loadFenxiaoOrderListVos.getTotal());
+	}
+
+	@Transactional(rollbackFor = Exception.class)
+	public AjaxResult updateSetOrderDone(UpdateSetOrderDoneDto updateSetOrderDoneDto) {
+		//设置用户公司ID
+		QueryUtil.setQueryLimitCom(updateSetOrderDoneDto);
+		SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+		Long companyId = updateSetOrderDoneDto.getCompanyId();
+		Integer setType = updateSetOrderDoneDto.getSetType();
+		
+		String orderIds = updateSetOrderDoneDto.getOrderIds();
+		if(StrUtil.isNotEmpty(orderIds)){
+			List<String> idsStringList = Arrays.asList(orderIds.split(","));
+			if(CollUtil.isEmpty(idsStringList)) {
+				return AjaxResult.buildFailInstance("请至少选择一条记录");
+			}
+			//产生订单结算记录
+			ShopSalemanSettlement shopSalemanSettlement = new ShopSalemanSettlement();
+			shopSalemanSettlement.setCompanyId(companyId);
+			shopSalemanSettlement.setCreateBy(MatrixConstance.SYSTEM_USER);
+			shopSalemanSettlement.setUpdateBy(MatrixConstance.SYSTEM_USER);
+			shopSalemanSettlement.setCreateTime(new Date());
+			shopSalemanSettlement.setUpdateTime(new Date());
+			shopSalemanSettlement.setOrderNo(codeService.getCodeByTyle(ShopSalemanSettlement.ORDERNO_START));
+			shopSalemanSettlement.setSettlementWay(setType);
+			shopSalemanSettlement.setManCount(updateSetOrderDoneDto.getManCount());
+			shopSalemanSettlement.setOrderCount(updateSetOrderDoneDto.getOrderCount());
+			shopSalemanSettlement.setUserId(user.getSuId().intValue());
+			shopSalemanSettlement.setAmount(updateSetOrderDoneDto.getAmount());
+			shopSalemanSettlement.setRemark(updateSetOrderDoneDto.getRemark());
+			shopSalemanSettlement.setCompanyId(companyId);
+			shopSalemanSettlementDao.insert(shopSalemanSettlement);
+			
+			for(String idString : idsStringList) {
+				long id = Long.parseLong(idString);
+				//更新分销订单
+				ShopSalesmanOrder shopSalesmanOrder = shopSalesmanOrderDao.selectById(id);
+				if(!ShopSalesmanOrder.STATUS_DJS.equals(shopSalesmanOrder.getOrderStatus())) {
+					return AjaxResult.buildFailInstance("选中记录中存在【已结算】的记录");
+				}
+				//判断原始订单的状态【4=待评价, 5=已评价】才能结算
+				ShopOrder shopOrder = shopOrderDao.selectById(shopSalesmanOrder.getOrderId().intValue());
+				if(ShopOrder.ORDER_STATUS_WAIT_REMARK != shopOrder.getOrderStatus() && 
+						ShopOrder.ORDER_STATUS_ALREADY_REMARK != shopOrder.getOrderStatus()) {
+					return AjaxResult.buildFailInstance("未收货订单不允许结算");
+				}
+				shopSalesmanOrder.setOrderStatus(ShopSalesmanOrder.STATUS_YJS);
+				shopSalesmanOrder.setSettlementId(shopSalemanSettlement.getId());
+				shopSalesmanOrderDao.updateById(shopSalesmanOrder);
+				//记录流水
+				ShopRevenueFlow salesRevenueFlow=new ShopRevenueFlow();
+				salesRevenueFlow.setCompanyId(companyId);
+				salesRevenueFlow.setCreateBy(MatrixConstance.SYSTEM_USER);
+				salesRevenueFlow.setUpdateBy(MatrixConstance.SYSTEM_USER);
+				salesRevenueFlow.setCreateTime(new Date());
+				salesRevenueFlow.setUpdateTime(new Date());
+				salesRevenueFlow.setAmount(shopSalesmanOrder.getAmount());
+				salesRevenueFlow.setUserId(shopSalesmanOrder.getSalesUserId());
+				if(ShopSalesmanOrder.REVENUE_TYPE_SALES.equals(shopSalesmanOrder.getRevenueType())) {
+					salesRevenueFlow.setRevenueContent(ShopRevenueFlow.TYPE_TGSY);
+				}
+				if(ShopSalesmanOrder.REVENUE_TYPE_INVITATION.equals(shopSalesmanOrder.getRevenueType())) {
+					salesRevenueFlow.setRevenueContent(ShopRevenueFlow.TYPE_YQSY);
+				}
+				salesRevenueFlow.setBusinessId(shopSalesmanOrder.getId());
+				shopRevenueFlowDao.insert(salesRevenueFlow);
+				//选择微信余额支付,更新用户的金额
+				if(ShopSalemanSettlement.SETTLEMENTWAY_YEJS == updateSetOrderDoneDto.getSetType()) {
+					SysVipInfo vipInfo = sysVipInfoDao.selectById(shopSalesmanOrder.getSalesUserId());
+					if(ObjectUtil.isEmpty(vipInfo)) {
+						return AjaxResult.buildFailInstance("收益人信息不存在");
+					}
+					Double withdrawalCash = vipInfo.getWithdrawalCash();
+					Double amount = shopSalesmanOrder.getAmount();
+					withdrawalCash = (withdrawalCash == null?0:withdrawalCash)+(amount== null?0:amount);
+					vipInfo.setWithdrawalCash(withdrawalCash);
+					sysVipInfoDao.update(vipInfo);
+				}
+			}
+	    }
+		return AjaxResult.buildSuccessInstance("操作成功");
+	}
+
+
+
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/FenXiaoSettingVo.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/FenXiaoSettingVo.java
new file mode 100644
index 0000000..838a131
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/FenXiaoSettingVo.java
@@ -0,0 +1,139 @@
+package com.matrix.system.fenxiao.vo;
+
+import com.matrix.core.anotations.Extend;
+
+public class FenXiaoSettingVo {
+	@Extend
+    private static final long serialVersionUID = 1L;
+
+
+    private Long paramId;
+    /**
+     * 参数名称
+     */
+    private String paramName;
+	/**
+     * 参数编码
+     */
+    private String paramCode;
+
+    /**
+     * switch按钮
+     */
+    private Boolean paramSwitch;
+
+
+    /**
+     * 参数值
+     */
+    private String paramValue;
+
+
+    /**
+     * 值1
+     */
+    private String paramValue1;
+
+
+    /**
+     * 值2
+     */
+    private String paramValue2;
+
+
+    /**
+     * 值3
+     */
+    private String paramValue3;
+
+    private Long companyId;
+
+    private Long shopId;
+
+
+    public Long getShopId() {
+        return shopId;
+    }
+
+    public void setShopId(Long shopId) {
+        this.shopId = shopId;
+    }
+
+    public Long getCompanyId() {
+        return companyId;
+    }
+
+    public void setCompanyId(Long companyId) {
+        this.companyId = companyId;
+    }
+
+    public Long getParamId() {
+        return paramId;
+    }
+
+    public void setParamId(Long paramId) {
+        this.paramId = paramId;
+    }
+
+
+    public String getParamCode() {
+        return paramCode;
+    }
+
+    public void setParamCode(String paramCode) {
+        this.paramCode = paramCode;
+    }
+
+
+    public String getParamValue() {
+        return paramValue;
+    }
+
+    public void setParamValue(String paramValue) {
+        this.paramValue = paramValue;
+    }
+
+
+    public String getParamValue1() {
+        return paramValue1;
+    }
+
+    public void setParamValue1(String paramValue1) {
+        this.paramValue1 = paramValue1;
+    }
+
+
+    public String getParamValue2() {
+        return paramValue2;
+    }
+
+    public void setParamValue2(String paramValue2) {
+        this.paramValue2 = paramValue2;
+    }
+
+
+    public String getParamValue3() {
+        return paramValue3;
+    }
+
+    public void setParamValue3(String paramValue3) {
+        this.paramValue3 = paramValue3;
+    }
+
+	public String getParamName() {
+		return paramName;
+	}
+
+	public void setParamName(String paramName) {
+		this.paramName = paramName;
+	}
+
+	public Boolean getParamSwitch() {
+		return paramSwitch;
+	}
+
+	public void setParamSwitch(Boolean paramSwitch) {
+		this.paramSwitch = paramSwitch;
+	}
+
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/FyfaManageVo.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/FyfaManageVo.java
new file mode 100644
index 0000000..6ce68e6
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/FyfaManageVo.java
@@ -0,0 +1,32 @@
+package com.matrix.system.fenxiao.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "FyfaManageVo", description = "分佣方案信息返回类")
+public class FyfaManageVo {
+	
+	@ApiModelProperty(value = "id")
+	private Long id;
+	
+	@ApiModelProperty(value = "方案名称")
+	private String  name;
+
+	@ApiModelProperty(value = "自购返佣%")
+	private Double  selfCommission;
+
+	@ApiModelProperty(value = "推广提成%")
+	private Double  sealesCommission;
+	
+	@ApiModelProperty(value = "邀请提成 %")
+	private Double  invitationCommission;
+	
+	@ApiModelProperty(value = "等级条件(推广金额)")
+	private Double  gradeCondition;
+
+	@ApiModelProperty(value = "默认等级1是,2不是")
+	private Integer  isDefault;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/LoadFenxiaoOrderBasicVo.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/LoadFenxiaoOrderBasicVo.java
new file mode 100644
index 0000000..c2ac378
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/LoadFenxiaoOrderBasicVo.java
@@ -0,0 +1,20 @@
+package com.matrix.system.fenxiao.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+@ApiModel(value = "LoadFenxiaoOrderBasicVo", description = "返回类")
+public class LoadFenxiaoOrderBasicVo {
+
+	@ApiModelProperty(value = "待计算金额")
+	private BigDecimal balance;
+	@ApiModelProperty(value = "待结算人数")
+	private Integer waitNum;
+	@ApiModelProperty(value = "待结算订单")
+	private Integer waitOrderNum;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/LoadFenxiaoOrderListVo.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/LoadFenxiaoOrderListVo.java
new file mode 100644
index 0000000..b0e5aef
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/LoadFenxiaoOrderListVo.java
@@ -0,0 +1,45 @@
+package com.matrix.system.fenxiao.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@ApiModel(value = "LoadFenxiaoOrderListVo", description = "返回类")
+public class LoadFenxiaoOrderListVo {
+	
+	@ApiModelProperty(value = "订单ID")
+	private Long id;
+	@ApiModelProperty(value = "订单编号")
+	private String orderNo;
+	@ApiModelProperty(value = "订单状态")
+	private Integer orderState;
+	@ApiModelProperty(value = "实付金额(元)")
+	private BigDecimal actualBalance;
+	@ApiModelProperty(value = "下单门店")
+	private String address;
+	@ApiModelProperty(value = "客户")
+	private String custom;
+	@ApiModelProperty(value = "客户openId")
+	private String customUserId;
+	@ApiModelProperty(value = "推广员")
+	private String parentSale;
+	@ApiModelProperty(value = "收益类型")
+	private Integer profitType;
+	@ApiModelProperty(value = "收益金额")
+	private BigDecimal profitBalance;
+	@ApiModelProperty(value = "结算状态")
+	private Integer settleType;
+	@ApiModelProperty(value = "结算编号")
+	private String settleNo;
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+	@ApiModelProperty(value = "结算时间")
+	private Date settleTime;
+	@ApiModelProperty(value = "结算人")
+	private String settler;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/LoadSetOrderListDtoVo.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/LoadSetOrderListDtoVo.java
new file mode 100644
index 0000000..b769ec7
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/LoadSetOrderListDtoVo.java
@@ -0,0 +1,35 @@
+package com.matrix.system.fenxiao.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@ApiModel(value = "LoadSetOrderListDtoVo", description = "返回类")
+public class LoadSetOrderListDtoVo {
+
+	@ApiModelProperty(value = "ID")
+	private Long id;
+	@ApiModelProperty(value = "结算编号")
+	private String orderNo;
+	@ApiModelProperty(value = "结算金额")
+	private BigDecimal actualBalance;
+	@ApiModelProperty(value = "结算订单数")
+	private String setNum;
+	@ApiModelProperty(value = "结算人数")
+	private String setManNum;
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+	@ApiModelProperty(value = "结算时间")
+	private Date setTime;
+	@ApiModelProperty(value = "结算人")
+	private String setMan;
+	@ApiModelProperty(value = "结算方式")
+	private BigDecimal settlementWay;
+	@ApiModelProperty(value = "备注")
+	private String remark;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/SalesmanBasicDetailVo.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/SalesmanBasicDetailVo.java
new file mode 100644
index 0000000..8efa56c
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/SalesmanBasicDetailVo.java
@@ -0,0 +1,45 @@
+package com.matrix.system.fenxiao.vo;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "SalesmanBasicDetailVo", description = "分销员基本信息的返参")
+public class SalesmanBasicDetailVo {
+	
+	@ApiModelProperty(value = "申请用户id")
+	private String  userId;
+	@ApiModelProperty(value = "头像")
+	private String avatarUrl;
+	@ApiModelProperty(value = "分销员")
+	private String nickname;
+	@ApiModelProperty(value = "等级")
+	private String grade;
+	@ApiModelProperty(value = "手机号码")
+	private String phone;
+	@ApiModelProperty(value = "加入时间")
+	@JsonFormat(pattern="yyyy-MM-dd HH:mm",timezone="GMT+8")
+	private Date createTime;
+	@ApiModelProperty(value = "邀请人")
+	private String parentUser;
+	@ApiModelProperty(value = "申请方式1、自主申请,2、自动添加,3上级邀请,4、手动添加(来源)")
+	private Integer  applyWay;
+	@ApiModelProperty(value = "申请状态1、待审核,2通过,3未通过")
+	private Integer  applyStatus;
+
+	@ApiModelProperty(value = "绑定客户")
+	private Integer lowerLevelNum;
+	@ApiModelProperty(value = "邀请下级")
+	private Integer invitedNum;
+	@ApiModelProperty(value = "累计收益")
+	private BigDecimal totalRevenue;
+	@ApiModelProperty(value = "待结算")
+	private BigDecimal balance;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopCustomDetailVo.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopCustomDetailVo.java
new file mode 100644
index 0000000..2b5a752
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopCustomDetailVo.java
@@ -0,0 +1,27 @@
+package com.matrix.system.fenxiao.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+@ApiModel(value = "ShopCustomDetailVo", description = "分销员客户基本信息的返参")
+public class ShopCustomDetailVo {
+	@ApiModelProperty(value = "申请用户id")
+	private String  userId;
+	@ApiModelProperty(value = "头像")
+	private String avatarUrl;
+	@ApiModelProperty(value = "分销员")
+	private String nickname;
+	@ApiModelProperty(value = "绑定时间")
+	@JsonFormat(pattern="yyyy-MM-dd HH:mm",timezone="GMT+8")
+	private Date createTime;
+	@ApiModelProperty(value = "绑定方式1、自主申请,2、自动添加,3上级邀请,4、手动添加(来源)")
+	private Integer applyWay;
+	@ApiModelProperty(value = "待成交次数")
+	private Integer doneNum;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopOrderDetailVo.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopOrderDetailVo.java
new file mode 100644
index 0000000..6d04291
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopOrderDetailVo.java
@@ -0,0 +1,48 @@
+package com.matrix.system.fenxiao.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+@ApiModel(value = "ShopOrderDetailVo", description = "订单收益信息返回类")
+public class ShopOrderDetailVo {
+
+    @ApiModelProperty(value = "订单id")
+    private Long  orderId ;
+
+    @ApiModelProperty(value = "订单编号")
+    private String  orderNo;
+
+    @ApiModelProperty(value = "实付金额")
+    private Double  orderMoney;
+
+    @ApiModelProperty(value = "订单状态")
+    private Integer orderState;
+    
+    @ApiModelProperty(value = "下单门店")
+    private String storeName;
+
+    @ApiModelProperty(value = "创建时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    private Date createTime;
+    
+	@ApiModelProperty(value = "头像")
+	private String avatarUrl;
+
+    @ApiModelProperty(value = "昵称")
+    private String nickName;
+
+    @ApiModelProperty(value = " 收益类型1,推广收益,2邀请收益")
+    private Integer  revenueType;
+
+    @ApiModelProperty(value = "收益金额")
+    private Double  amount;
+
+    @ApiModelProperty(value = " 结算状态1,待结算,2,已结算,3已退款")
+    private Integer  orderStatus;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanAppliingVo.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanAppliingVo.java
new file mode 100644
index 0000000..c2ebdf0
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanAppliingVo.java
@@ -0,0 +1,31 @@
+package com.matrix.system.fenxiao.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+@ApiModel(value = "ShopSalesmanAppliingVo", description = "获取分销员待审核记录的返参")
+public class ShopSalesmanAppliingVo {
+	
+	@ApiModelProperty(value = "申请用户id")
+	private String  userId;
+
+	
+	@ApiModelProperty(value = "分销员")
+	private String nickname;
+	
+	@ApiModelProperty(value = "创建时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    private Date createTime;
+	
+	@ApiModelProperty(value = "头像")
+	private String avatarUrl;
+	
+	@ApiModelProperty(value = "手机号码")
+	private String phone;
+	
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanApplyVo.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanApplyVo.java
new file mode 100644
index 0000000..79acde3
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanApplyVo.java
@@ -0,0 +1,97 @@
+package com.matrix.system.fenxiao.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+public class ShopSalesmanApplyVo {
+
+	/**
+	 * 审核状态-1、待审核
+	 */
+	public static final int APPLY_STATUS_DSH = 1;
+	/**
+	 * 审核状态-2通过
+	 */
+	public static final int APPLY_STATUS_TG= 2;
+	/**
+	 * 审核状态-3未通过
+	 */
+	public static final int APPLY_STATUS_WTG = 3;
+	/**
+	 * 审核状态-4系统删除
+	 */
+	public static final int APPLY_STATUS_XTQX = 4;
+
+
+	/**
+	 * 申请方式1、自主申请
+	 */
+	public static  final  int APPLY_WAY_SELF=1;
+	/**
+	 * 申请方式2、自动添加
+	 */
+	public static  final  int APPLY_WAY_AUTO_ADD=2;
+	/**
+	 * 申请方式3上级邀请
+	 */
+	public static  final  int APPLY_WAY_INVITATION=3;
+	/**
+	 * 申请方式 4、手动添加
+	 */
+	public static  final  int APPLY_WAY_HAND_ADD=4;
+
+	@ApiModelProperty(value = "申请记录ID")
+	private Long id;
+
+	@ApiModelProperty(value = "申请方式1、自主申请,2、自动添加,3上级邀请,4、手动添加(来源)")
+	private Integer  applyWay;
+
+	@ApiModelProperty(value = "申请用户id")
+	private String  userId;
+	
+
+	@ApiModelProperty(value = "邀请用户ID")
+	private String  parentUserId;
+	
+
+	@ApiModelProperty(value = "申请状态1、待审核,2通过,3未通过")
+	private Integer  applyStatus;
+
+	@ApiModelProperty(value = "备注")
+	private String  remark;
+	
+	/**
+	 * 公司ID
+	 */
+	@ApiModelProperty(hidden = true)
+	private Long  companyId;
+	
+	@ApiModelProperty(value = "分销员")
+	private String nickname;
+	@ApiModelProperty(value = "头像")
+	private String avatarUrl;
+	@ApiModelProperty(value = "注册邀请人")
+	private String parentUser;
+	@ApiModelProperty(value = "当前上级")
+	private String parentUserNow;
+	@ApiModelProperty(value = "推广客户")
+	private Integer lowerLevelNum;
+	@ApiModelProperty(value = "邀请下级")
+	private Integer invitedNum;
+
+	@ApiModelProperty(value = "累计收益")
+	private BigDecimal totalRevenue;
+	@ApiModelProperty(value = "待结算")
+	private BigDecimal balance;
+	@ApiModelProperty(value = "等级")
+	private String grade;
+	
+	@ApiModelProperty(value = "加入时间")
+	private Date createTime;
+	@ApiModelProperty(value = "状态")
+	private Integer state;
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanDetailVo.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanDetailVo.java
new file mode 100644
index 0000000..a23a5bf
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanDetailVo.java
@@ -0,0 +1,5 @@
+package com.matrix.system.fenxiao.vo;
+
+public class ShopSalesmanDetailVo {
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanGradeVo.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanGradeVo.java
new file mode 100644
index 0000000..7704375
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanGradeVo.java
@@ -0,0 +1,17 @@
+package com.matrix.system.fenxiao.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "ShopSalesmanGradeVo", description = "返参")
+public class ShopSalesmanGradeVo {
+	
+	@ApiModelProperty(value = "id")
+    private Long id;
+
+	@ApiModelProperty(value = "等级名称")
+	private String  name;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/BaseController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/BaseController.java
index 28052cf..3a8afed 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/BaseController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/BaseController.java
@@ -6,8 +6,6 @@
 import com.matrix.core.tools.StringUtils;
 import com.matrix.core.tools.WebUtil;
 import com.matrix.system.common.bean.SysUsers;
-import com.matrix.system.constance.SystemConstance;
-import com.matrix.system.hive.bean.SysVipInfo;
 import com.matrix.system.hive.plugin.util.BaseServices;
 
 import java.util.List;
@@ -75,14 +73,7 @@
 	
 	}
 
-	/**
-	 * 获取当前操作的会员对象
-	 * @author 姜友瑶
-	 * @date 2016/7/5
-	 */
-	public SysVipInfo getCurrentVioInfo() {
-		return (SysVipInfo) (WebUtil.getSession().getAttribute(SystemConstance.CURRENT_CUSTOMER));
-	}
+
 
 
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/ErpShopScoreAction.java b/zq-erp/src/main/java/com/matrix/system/hive/action/ErpShopScoreAction.java
new file mode 100644
index 0000000..b4f3e25
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/ErpShopScoreAction.java
@@ -0,0 +1,101 @@
+package com.matrix.system.hive.action;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.matrix.core.constance.MatrixConstance;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.tools.WebUtil;
+import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.hive.dao.SysVipInfoDao;
+import com.matrix.system.hive.dto.ScoreChangeDto;
+import com.matrix.system.score.dao.ScoreUseRecordDao;
+import com.matrix.system.score.dao.ScoreVipDetailDao;
+import com.matrix.system.score.entity.ScoreVipDetail;
+import com.matrix.system.score.service.ScoreVipDetailService;
+import com.matrix.system.shopXcx.api.dto.ScoreFlowDto;
+import com.matrix.system.shopXcx.api.vo.ScoreUseRecordVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @author jyy
+ * @date 2021-03-22 15:10
+ */
+@Api(tags = "用户积分接口类")
+@RestController
+@RequestMapping(value = "/admin/score")
+public class ErpShopScoreAction {
+
+
+
+    @Autowired
+    ScoreUseRecordDao scoreUseRecordDao;
+
+    @Autowired
+    ScoreVipDetailDao scoreVipDetailDao;
+
+    @Autowired
+    ScoreVipDetailService scoreVipDetailService;
+
+    @Autowired
+    SysVipInfoDao sysVipInfoDao;
+
+    @ApiOperation(value = "获取积分流水", notes = "")
+    @PostMapping(value = "/getFlowList")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = ScoreUseRecordVo.class)
+    })
+    AjaxResult getFlowList(@RequestBody  ScoreFlowDto scoreFlowDto) {
+        SysVipInfo vipInfo = sysVipInfoDao.selectById(scoreFlowDto.getVipId());
+        scoreFlowDto.setVipId(vipInfo.getId());
+        Page<ScoreUseRecordVo> page=new Page<>(scoreFlowDto.getPageNum(),scoreFlowDto.getPageSize());
+        IPage<ScoreUseRecordVo> shopScoreRecord = scoreUseRecordDao.selectFlowList(page,scoreFlowDto);
+        AjaxResult result=AjaxResult.buildSuccessInstance(shopScoreRecord.getRecords(),shopScoreRecord.getTotal());
+        return result;
+    }
+
+
+
+
+
+    @ApiOperation(value = "调整用户积分", notes = "")
+    @PostMapping(value = "/changeUserScore")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = AjaxResult.class)
+    })
+    AjaxResult changeUserScore(@RequestBody @Validated ScoreChangeDto scoreChangeDto) {
+        SysVipInfo vipInfo = sysVipInfoDao.selectById(scoreChangeDto.getVipId());
+        SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+
+        if(scoreChangeDto.getAmount()>0){
+            scoreVipDetailService.addScore(vipInfo.getId(),sysUsers.getSuId(),sysUsers.getShopId(),scoreChangeDto.getAmount(),0L, ScoreVipDetail.SCORE_VIP_TYPE_USERCHANGE,scoreChangeDto.getRemarks());
+        }else if (scoreChangeDto.getAmount()<0){
+            scoreVipDetailService.deductionScore(vipInfo.getId(),sysUsers.getSuId(),sysUsers.getShopId(),Math.abs(scoreChangeDto.getAmount()),0L,ScoreVipDetail.SCORE_VIP_TYPE_USERCHANGE,scoreChangeDto.getRemarks());
+        }
+        AjaxResult result=AjaxResult.buildSuccessInstance("调整成功");
+        return result;
+    }
+
+
+
+
+
+
+    @ApiOperation(value = "获取用户积分", notes = "")
+    @PostMapping(value = "/getUserScore/{vipId}")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = AjaxResult.class)
+    })
+    AjaxResult getUserScore(@PathVariable Long vipId) {
+        AjaxResult result=AjaxResult.buildSuccessInstance(scoreVipDetailDao.selectUserTotalScore(vipId));
+        return result;
+    }
+
+
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java
index 2399c96..5e47996 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java
@@ -1,5 +1,6 @@
 package com.matrix.system.hive.action;
 
+import cn.hutool.core.collection.CollUtil;
 import com.matrix.component.rabbitmq.RabiitMqTemplate;
 import com.matrix.core.constance.MatrixConstance;
 import com.matrix.core.exception.GlobleException;
@@ -14,13 +15,12 @@
 import com.matrix.system.common.bean.SysUsers;
 import com.matrix.system.common.tools.ResponseHeadUtil;
 import com.matrix.system.constance.Dictionary;
-import com.matrix.system.constance.SystemConstance;
 import com.matrix.system.hive.bean.*;
 import com.matrix.system.hive.dao.*;
 import com.matrix.system.hive.plugin.util.CollectionUtils;
-import com.matrix.system.hive.pojo.ShoppingCarItem;
-import com.matrix.system.hive.pojo.ShoppingCarItemsVo;
 import com.matrix.system.hive.service.*;
+import com.matrix.system.shopXcx.mqTask.MQTaskRouting;
+import com.matrix.system.wechart.templateMsg.UniformMsgParam;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Controller;
@@ -40,7 +40,6 @@
 import java.net.URLEncoder;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Date;
 import java.util.List;
 
 /**
@@ -54,6 +53,11 @@
 public class OrderController extends BaseController {
     @Resource
     private SysOrderService orderService;
+    @Autowired
+    ShoppingGoodsDao shoppingGoodsDao;
+
+    @Autowired
+    private CodeService codeService;
 
     @Autowired
     private SysOrderItemDao orderItemDao;
@@ -87,6 +91,10 @@
 
     @Autowired
     RabiitMqTemplate rabiitMqTemplate;
+
+    @Autowired
+    private SysProjServicesDao sysProjServicesDao;
+
     @Value("${evn}")
     private String evn;
 
@@ -123,14 +131,16 @@
     AjaxResult payOrder(@RequestBody SysOrder sysOrder) {
         SysUsers user = getMe();
         sysOrder.setShopId(user.getShopId());
+        sysOrder.setOrderType(SysOrder.ORDER_TYPE_SEAL);
+        sysOrder.setIsHasRefund(SysOrder.IS_HAS_REFUND_N);
         //校验订单是否满足结算调价,新订单则保存订单,已有订单则删除后更新
         sysOrder = orderService.checkAndSaveOrder(sysOrder);
         orderService.updateReceiptMoney(sysOrder);
 
         //发送微信公众号提醒
-//        UniformMsgParam uniformMsgParam=new UniformMsgParam(user.getCompanyId(),UniformMsgParam.GZH_GMCG);
-//        uniformMsgParam.put("orderId",sysOrder.getId());
-//        rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG+evn,uniformMsgParam.toJSONString());
+        UniformMsgParam uniformMsgParam=new UniformMsgParam(user.getCompanyId(),UniformMsgParam.GZH_GMCG);
+        uniformMsgParam.put("orderId",sysOrder.getId());
+        rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG+evn,uniformMsgParam.toJSONString());
 
 
         //处理用户购买的产品
@@ -146,7 +156,6 @@
      */
     @RequestMapping(value = "/refundOrder")
     @ResponseBody
-    @Transactional(rollbackFor = Exception.class)
     public AjaxResult refundOrder(@RequestBody SysOrder sysOrder) {
         //储值卡订单不能通过退款渠道退款
         if(CollectionUtils.isNotEmpty(sysOrder.getItems())){
@@ -157,17 +166,6 @@
                 }
             }
         }
-
-
-
-        SysUsers user = getMe();
-        sysOrder.setShopId(user.getShopId());
-        sysOrder.setStatu(Dictionary.ORDER_STATU_TK);
-        sysOrder.setOrderTime(new Date());
-
-
-        //校验订单是否满足结算调价,新订单则保存订单,已有订单则删除后更新
-        sysOrder = orderService.checkAndSaveOrder(sysOrder);
         orderService.refundOrderMoney(sysOrder);
         //处理用户购买的产品
         return AjaxResult.buildSuccessInstance(Arrays.asList(sysOrder), "订单退款成功");
@@ -189,49 +187,6 @@
         return AjaxResult.buildSuccessInstance(Arrays.asList(sysOrder), "订单保存成功");
     }
 
-    /**
-     * 新建订单
-     *
-     * @author jiangyouyao
-     */
-    @RequestMapping(value = "/addOrder")
-    public @ResponseBody
-    AjaxResult addOrder(ShoppingCarItemsVo car) {
-
-        List<ShoppingCarItem> sessionCarItems = (List<ShoppingCarItem>) WebUtil.getSession().getAttribute(
-                SystemConstance.SHOPPING_CAR);
-
-        List<ShoppingCarItem> carItems = new ArrayList<>();
-
-        // 设置购车中的具体类型信息,过滤没有被选中的商品
-        for (ShoppingCarItem carItem : car.getCarItems()) {
-
-            for (ShoppingCarItem sessionCar : sessionCarItems) {
-
-                if (carItem.getId().equals(sessionCar.getId())) {
-                    //已最后提交的数量为准
-                    sessionCar.setCount(carItem.getCount());
-                    carItems.add(sessionCar);
-                    break;
-                }
-            }
-        }
-        //设置过滤后的购物车条目
-        car.setCarItems(carItems);
-
-        SysVipInfo info = (SysVipInfo) WebUtil.getSession().getAttribute(SystemConstance.CURRENT_CUSTOMER);
-        car.setVipId(info.getId());
-
-        // 添加新订单
-        int i = orderService.createOrder(WebUtil.getSession(), car);
-
-        if (i > 0) {
-            WebUtil.getSession().removeAttribute(SystemConstance.SHOPPING_CAR);
-            return new AjaxResult(AjaxResult.STATUS_SUCCESS, "下单成功");
-        } else {
-            return new AjaxResult(AjaxResult.STATUS_FAIL, "下单添加失败");
-        }
-    }
 
 
     /**
@@ -446,8 +401,10 @@
 
         if(orderVo.getId()!=null){
             WebUtil.getRequest().setAttribute("orderParam", orderVo.getId());
+            WebUtil.getRequest().setAttribute("orderId", orderVo.getId());
         }else if(StringUtils.isNotBlank(orderVo.getOrderNo())){
             WebUtil.getRequest().setAttribute("orderParam", orderVo.getOrderNo());
+            WebUtil.getRequest().setAttribute("orderNo", orderVo.getOrderNo());
         }
         return "admin/hive/beautySalon/orderXq-form";
     }
@@ -476,13 +433,22 @@
         if (order == null) {
             return new AjaxResult(AjaxResult.STATUS_FAIL, "订单不存在!");
         }
-        orderService.cancelOrder(id);
-        if (del > 0) {
-            orderService.removeById(id);
-            result.setInfo("删除成功!");
-        } else {
-            result.setInfo("取消成功!");
+
+        List<SysOrderItem> items = orderItemDao.selectByOrderId(id);
+        for (SysOrderItem item : items) {
+            List<SysProjServices> sysProjServices = sysProjServicesDao.selectProjServicesByOrderItemId(item.getId());
+            if (CollUtil.isNotEmpty(sysProjServices)) {
+                return new AjaxResult(AjaxResult.STATUS_FAIL, "订单存在进行中的服务单无法取消/删除");
+            }
         }
+
+        orderService.cancelOrder(id);
+//        if (del > 0) {
+//            orderService.removeById(id);
+//            result.setInfo("删除成功!");
+//        } else {
+            result.setInfo("取消成功!");
+//        }
         result.setStatus(AjaxResult.STATUS_SUCCESS);
 
         return result;
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java
index 2fb6aa7..faed6f0 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java
@@ -1,5 +1,7 @@
 package com.matrix.system.hive.action;
 
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.util.StrUtil;
 import com.matrix.core.anotations.RemoveRequestToken;
 import com.matrix.core.constance.MatrixConstance;
 import com.matrix.core.exception.GlobleException;
@@ -108,6 +110,14 @@
         }
         //补充服务单扩展信息===============
         List<SysBeauticianState> beauticianStateList = beauticianStateDao.selectBySerIds(id);
+        if (CollUtil.isNotEmpty(beauticianStateList)) {
+            for (SysBeauticianState sysBeauticianState : beauticianStateList) {
+                if (sysBeauticianState.getProjUse().getTaocanId() != null) {
+                    SysProjUse sysProjUse = projUseService.findById(sysBeauticianState.getProjUse().getTaocanId());
+                    sysBeauticianState.getProjInfo().setName(sysProjUse.getProjName()+"--"+sysBeauticianState.getProjInfo().getName());
+                }
+            }
+        }
         projServices.setServiceItems(beauticianStateList);
         SysBedState sysBedState = sysBedStateDao.selectBySerIdAndBedId(projServices.getId(), projServices.getBedId());
         projServices.setBedState(sysBedState);
@@ -177,13 +187,7 @@
         AjaxResult result = AjaxResult.buildSuccessInstance("查询成功");
 
         SysProjUse queryUse = new SysProjUse();
-        if(Objects.nonNull(vipId)){
-            queryUse.setVipId(vipId);
-        }else{
-            SysVipInfo vipInfo = getCurrentVioInfo();
-            queryUse.setVipId(vipInfo.getId());
-        }
-
+        queryUse.setVipId(vipId);
         queryUse.setType(Dictionary.SHOPPING_GOODS_TYPE_XM);
         queryUse.setTaocanId(-1L);
         queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX);
@@ -273,6 +277,7 @@
         return "admin/hive/beautySalon/yypb-form";
     }
 
+
     /**
      * 进入预约排班详情
      *
@@ -303,6 +308,16 @@
 
         //补充服务单扩展信息===============
         List<SysBeauticianState> beauticianStateList = beauticianStateDao.selectBySerIds(projServices.getId());
+        if (CollUtil.isNotEmpty(beauticianStateList)) {
+            for (SysBeauticianState sysBeauticianState : beauticianStateList) {
+                if (sysBeauticianState.getProjUse().getTaocanId() != null) {
+                    SysProjUse sysProjUse = projUseService.findById(sysBeauticianState.getProjUse().getTaocanId());
+                    if(sysProjUse != null) {
+                        sysBeauticianState.getProjInfo().setName(sysProjUse.getProjName() + "--" + sysBeauticianState.getProjInfo().getName());
+                    }
+                }
+            }
+        }
         projServices.setServiceItems(beauticianStateList);
 
         SysBedState sysBedState = sysBedStateDao.selectBySerIdAndBedId(projServices.getId(), projServices.getBedId());
@@ -438,6 +453,7 @@
         }
     }
 
+
     /**
      * 根据id取消预约
      */
@@ -476,8 +492,7 @@
     @RequestMapping(value = "/addService")
     public @ResponseBody
     AjaxResult servicceAdd(@RequestBody SysProjServices sysProjServices) {
-        SysVipInfo vipInfo = getCurrentVioInfo();
-        sysProjServices.setVipId(vipInfo.getId());
+
 
         if (CollectionUtils.isEmpty(sysProjServices.getServiceItems())) {
             return new AjaxResult(AjaxResult.STATUS_FAIL, "没有选中可消耗的项目");
@@ -492,7 +507,9 @@
         if (balanceverifyResult.isError()) {
             return new AjaxResult(AjaxResult.STATUS_FAIL, balanceverifyResult.getMsg());
         }
-        sysProjServices.setState(Dictionary.SERVICE_STATU_YYCG);
+        if (StrUtil.isEmpty(sysProjServices.getState())) {
+            sysProjServices.setState(Dictionary.SERVICE_STATU_DYY);
+        }
         SysProjServices newSysProjServices = sysProjServicesService.addSysProjServices(sysProjServices);
         if (newSysProjServices != null) {
             return AjaxResult.buildSuccessInstance(Arrays.asList(newSysProjServices));
@@ -507,8 +524,8 @@
     @RequestMapping(value = "/addServiceForForm")
     public @ResponseBody
     AjaxResult servicceAddForForm(SysProjServices sysProjServices) {
-        SysVipInfo vipInfo = getCurrentVioInfo();
-        sysProjServices.setVipId(vipInfo.getId());
+
+
 
         if (CollectionUtils.isEmpty(sysProjServices.getServiceItems())) {
             return new AjaxResult(AjaxResult.STATUS_FAIL, "没有选中可消耗的项目");
@@ -547,6 +564,26 @@
     }
 
 
+    @RequestMapping(value = "/addServiceProj")
+    @ResponseBody
+    public AjaxResult addServiceProj(SysProjServices sysProjServices) {
+
+        return AjaxResult.buildSuccessInstance("保存成功");
+    }
+
+    /**
+     * 删除服务单项目/套餐
+     * @param id
+     * @return
+     */
+    @RequestMapping(value = "/delServiceOrderItems")
+    @ResponseBody
+    public AjaxResult delServiceOrderItems(Long id) {
+        sysProjServicesService.deleteProjServiceItemById(id);
+        return AjaxResult.buildSuccessInstance("删除成功");
+    }
+
+
     // 准备页面数据
     private void  pageDate() {
         // 根据岗位名称查询员工
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java
index 29c757c..f50de16 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java
@@ -17,7 +17,6 @@
 import com.matrix.system.hive.dao.ShoppingGoodsDao;
 import com.matrix.system.hive.dao.SysProjUseDao;
 import com.matrix.system.hive.dao.SysVipInfoDao;
-import com.matrix.system.hive.plugin.message.StringUtil;
 import com.matrix.system.hive.plugin.util.CollectionUtils;
 import com.matrix.system.hive.service.MoneyCardUseService;
 import com.matrix.system.hive.service.SysProjUseService;
@@ -323,7 +322,7 @@
         Object tel = objects.get(1);
         if (tel != null) {
             String telStr = tel.toString();
-            SysVipInfo vipInfo = vipInfoDao.selectByPhone(telStr);
+            SysVipInfo vipInfo = vipInfoDao.selectByPhone(telStr,sysUsers.getCompanyId());
             if (vipInfo == null) {
                 vipInfo = new SysVipInfo();
                 vipInfo.setShopId(sysUsers.getShopId());
@@ -380,7 +379,7 @@
         Object tel = objects.get(1);
         if (tel != null) {
             String telStr = tel.toString();
-            SysVipInfo vipInfo = vipInfoDao.selectByPhone(telStr);
+            SysVipInfo vipInfo = vipInfoDao.selectByPhone(telStr,sysUsers.getCompanyId());
             if (vipInfo == null) {
                 vipInfo = new SysVipInfo();
                 vipInfo.setShopId(sysUsers.getShopId());
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java
index 69717d5..aa8f6b4 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java
@@ -9,24 +9,25 @@
 import com.matrix.core.tools.excl.ExcelSheetPO;
 import com.matrix.core.tools.excl.ExcelUtil;
 import com.matrix.core.tools.excl.ExcelVersion;
-import com.matrix.system.common.bean.CustomerDataDictionary;
-import com.matrix.system.common.bean.SystemDictionary;
 import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.common.bean.SystemDictionary;
 import com.matrix.system.common.constance.AppConstance;
 import com.matrix.system.common.dao.CustomerDataDictionaryDao;
-import com.matrix.system.common.service.SystemDictionaryService;
 import com.matrix.system.common.service.SysUsersService;
+import com.matrix.system.common.service.SystemDictionaryService;
 import com.matrix.system.common.tools.ResponseHeadUtil;
 import com.matrix.system.constance.Dictionary;
-import com.matrix.system.constance.SystemConstance;
 import com.matrix.system.hive.action.util.QueryUtil;
-import com.matrix.system.hive.bean.*;
+import com.matrix.system.hive.bean.Question;
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.hive.bean.SysVipLevel;
+import com.matrix.system.hive.bean.VipAnswer;
 import com.matrix.system.hive.dao.MoneyCardUseDao;
 import com.matrix.system.hive.dao.SysVipLabelDao;
 import com.matrix.system.hive.dao.VipAnswerDao;
-import com.matrix.core.tools.DateUtil;
 import com.matrix.system.hive.pojo.RegisterInfo;
 import com.matrix.system.hive.service.*;
+import com.matrix.system.score.dao.ScoreVipDetailDao;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.ModelMap;
@@ -46,7 +47,10 @@
 import java.net.URLDecoder;
 import java.net.URLEncoder;
 import java.security.NoSuchAlgorithmException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.List;
 
 
 /**
@@ -87,6 +91,9 @@
     @Resource
     private SysOrderService sysOrderService;
 
+    @Autowired
+    private ScoreVipDetailDao scoreVipDetailDao;
+
 
     @RequestMapping(value = "/showVipLevel")
     public @ResponseBody
@@ -119,34 +126,12 @@
     @RequestMapping(value = "/showVipInfo")
     public @ResponseBody
     AjaxResult findByModel(String keyWord) {
-        LinkedList<SysVipInfo> userList = null;
-        // 获取最近查询客户
-        if (WebUtil.getSession().getAttribute(SystemConstance.HISTORY_CUSTOMER) == null) {
-            userList = new LinkedList<SysVipInfo>();
-            WebUtil.getSession().setAttribute(SystemConstance.HISTORY_CUSTOMER, userList);
-        } else {
-            userList = (LinkedList<SysVipInfo>) WebUtil.getSession().getAttribute(SystemConstance.HISTORY_CUSTOMER);
-        }
+
         List<SysVipInfo> vips = vipInfoService.findByVipNoOrTel(keyWord);
         if (vips.size() > 0) {
-            // 在session存放当前查询的客户
+            vips.get(0).setPointAll(scoreVipDetailDao.selectUserTotalScore(vips.get(0).getId()));
             vips.get(0).setSysOrder(sysOrderService.findSysOrderTjByVipId(vips.get(0).getId()));
             vips.get(0).setLevelCard(cardUseService.findByVipId(vips.get(0).getId()));
-            WebUtil.getSession().setAttribute(SystemConstance.CURRENT_CUSTOMER, vips.get(0));
-            // 满20后删除一个
-            if (userList.size() == 20) {
-                userList.poll();
-            }
-            // 去重标志
-            boolean isNoRepeat = true;
-            for (SysVipInfo sysVipInfo : userList) {
-                if (vips.get(0).getPhone().equals(sysVipInfo.getPhone())) {
-                    isNoRepeat = false;
-                }
-            }
-            if (isNoRepeat) {
-                userList.add(vips.get(0));
-            }
             vips.get(0).setLabels(sysVipLabelDao.selectByVipId(vips.get(0).getId()));
             vips.get(0).setAge(DateUtil.getAgeForBirthDay(vips.get(0).getBirthday1()));
             vips.get(0).setBalance(moneyCardUseDao.selectVipCardTotalMoney(vips.get(0).getId()));
@@ -356,6 +341,7 @@
         vipInfo.setVipState(Dictionary.VIP_STATE_HY);
         vipInfo.setStaffId(getMe().getSuId());
         vipInfo.setShopId(getMe().getShopId());
+        vipInfo.setCompanyId(getMe().getCompanyId());
         vipInfo.setVipType(Dictionary.VIP_TYPE_NOCARD);
         vipInfoService.add(vipInfo);
         return new AjaxResult(AjaxResult.STATUS_SUCCESS, "会员信息注册成功");
@@ -419,33 +405,7 @@
     @RequestMapping(value = "/findUserByPhoneOrNo")
     public @ResponseBody
     AjaxResult findUserByPhoneOrNo(String keyWord) {
-        LinkedList<SysVipInfo> userList = null;
-        // 获取最近查询客户
-        if (WebUtil.getSession().getAttribute(SystemConstance.HISTORY_CUSTOMER) == null) {
-            userList = new LinkedList<SysVipInfo>();
-            WebUtil.getSession().setAttribute(SystemConstance.HISTORY_CUSTOMER, userList);
-        } else {
-            userList = (LinkedList<SysVipInfo>) WebUtil.getSession().getAttribute(SystemConstance.HISTORY_CUSTOMER);
-        }
         List<SysVipInfo> vips = vipInfoService.findByVipNoOrTel(keyWord);
-        if (vips.size() > 0) {
-            // 在session存放当前查询的客户
-            WebUtil.getSession().setAttribute(SystemConstance.CURRENT_CUSTOMER, vips.get(0));
-            // 满20后删除一个
-            if (userList.size() == 20) {
-                userList.poll();
-            }
-            // 去重标志
-            boolean isNoRepeat = true;
-            for (SysVipInfo sysVipInfo : userList) {
-                if (vips.get(0).getPhone().equals(sysVipInfo.getPhone())) {
-                    isNoRepeat = false;
-                }
-            }
-            if (isNoRepeat) {
-                userList.add(vips.get(0));
-            }
-        }
         return new AjaxResult(AjaxResult.STATUS_SUCCESS, vips, 0);
 
     }
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/AchieveNew.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/AchieveNew.java
index 6a5a4f5..2c08183 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/bean/AchieveNew.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/AchieveNew.java
@@ -72,7 +72,15 @@
 	 * 客户id
 	 */
 	private Long  vipId;
-			
+
+
+
+	/**
+	 * 购买业绩
+	 */
+	private Double  goodsCash;
+
+	private Double cardCash;
 	
 	/**
 	 * 赠送消耗
@@ -85,29 +93,7 @@
 	 */
 	private Double  hisConsume;
 			
-	
-	/**
-	 * 划扣金额 从卡中划扣钱买东西
-	 */
-	private Double  consume;
-			
-	
-	/**
-	 * 卡项,套餐,充值,开会籍卡
-	 */
-	private Double  cardCash;
-			
-	
-	/**
-	 * 现金单次,购买项目的业绩
-	 */
-	private Double  projCash;
-			
-	
-	/**
-	 * 现金产品,购买家居产品的钱
-	 */
-	private Double  goodsCash;
+
 			
 	
 	/**
@@ -155,11 +141,12 @@
 	 * 总金额
 	 */
 	private Double  zkTotal;
+
 	/**
 	 * 公司id
 	 */
 	private Long companyId;
-	
+
 	private String  t1;
 			
 	
@@ -167,11 +154,11 @@
 
 
 	/**
-	 * 业绩种类 1-现金业绩 2-划扣业绩
+	 * 业绩类型
 	 */
-	private String  t3;
-			
-	
+	private String  achieveType;
+
+
 	private String  t4;
 			
 	
@@ -251,17 +238,40 @@
 	private Date  endTime;
 
 
-	/**
-	 * 分配的业绩金额
-	 */
-	@Extend
-	private Double achieveMoney;
 
 	private String goodsNo;
 
 	private String goodsName;
 
 	private String type;
+
+	private String payMethod;
+
+	private String cateName;
+
+	public Double getCardCash() {
+		return cardCash;
+	}
+
+	public void setCardCash(Double cardCash) {
+		this.cardCash = cardCash;
+	}
+
+	public String getCateName() {
+		return cateName;
+	}
+
+	public void setCateName(String cateName) {
+		this.cateName = cateName;
+	}
+
+	public String getPayMethod() {
+		return payMethod;
+	}
+
+	public void setPayMethod(String payMethod) {
+		this.payMethod = payMethod;
+	}
 
 	public String getType() {
 		return type;
@@ -311,13 +321,6 @@
 		this.companyId = companyId;
 	}
 
-	public Double getAchieveMoney() {
-		return achieveMoney;
-	}
-
-	public void setAchieveMoney(Double achieveMoney) {
-		this.achieveMoney = achieveMoney;
-	}
 
 	public Date getBeginTime() {
 		return beginTime;
@@ -403,24 +406,8 @@
 	public void setHisConsume(Double hisConsume) {
 		this.hisConsume = hisConsume;
 	}
-	public Double getConsume() {
-		return consume;
-	}
-	public void setConsume(Double consume) {
-		this.consume = consume;
-	}
-	public Double getCardCash() {
-		return cardCash;
-	}
-	public void setCardCash(Double cardCash) {
-		this.cardCash = cardCash;
-	}
-	public Double getProjCash() {
-		return projCash;
-	}
-	public void setProjCash(Double projCash) {
-		this.projCash = projCash;
-	}
+
+
 	public Double getGoodsCash() {
 		return goodsCash;
 	}
@@ -481,12 +468,15 @@
 	public void setT2(String t2) {
 		this.t2 = t2;
 	}
-	public String getT3() {
-		return t3;
+
+	public String getAchieveType() {
+		return achieveType;
 	}
-	public void setT3(String t3) {
-		this.t3 = t3;
+
+	public void setAchieveType(String achieveType) {
+		this.achieveType = achieveType;
 	}
+
 	public String getT4() {
 		return t4;
 	}
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUse.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUse.java
index 5c37494..d0a63cb 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUse.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUse.java
@@ -1,27 +1,63 @@
 package com.matrix.system.hive.bean;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.matrix.core.anotations.Extend;
 import com.matrix.core.tools.DateUtil;
+import com.matrix.system.constance.Dictionary;
 import com.matrix.system.hive.plugin.util.MoneyUtil;
-import com.matrix.system.hive.pojo.MoneyCardUserVo;
 import org.springframework.format.annotation.DateTimeFormat;
 
-import java.io.Serializable;
 import java.util.Date;
 
 /**
  *
  * @date 2016-09-17 10:17
  */
-public class MoneyCardUse extends MoneyCardUserVo implements Serializable{
+public class MoneyCardUse  {
 
-	private static final long serialVersionUID = 1L; 
 
-	
 	private Long  id;
-			
-	
+
+
+	private String createBy;
+
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+	private Date createTime;
+
+	private String updateBy;
+
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+	private Date updateTime;
+
+	/**
+	 * 剩余次数
+	 */
+	@TableField(exist = false)
+	String lastCountName;
+	/**
+	 * 数据来源
+	 */
+	@TableField(exist = false)
+	String sourceName;
+
+	/*vo对象************/
+
+	/**
+	 * 剩余次数
+	 */
+
+	private Integer  lastCount;
+
+	/**
+	 * 来源,购买,转让,赠送
+	 */
+	private String  source;
+	/**
+	 * 是会籍卡? Y 是,N否
+	 */
+	private String  isVipCar;
+
 	/**
 	 * 订单明细id
 	 */
@@ -34,12 +70,7 @@
 	private Integer  useTotal;
 			
 	
-	/**
-	 * 剩余次数
-	 */
-	
-	private Integer  lastCount;
-			
+
 	
 	/**
 	 * 本金
@@ -59,10 +90,7 @@
 	private String  status;
 			
 	
-	/**
-	 * 来源,购买,转让,赠送
-	 */
-	private String  source;
+
 			
 	
 	/**
@@ -71,7 +99,8 @@
 	@JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8")
 	@DateTimeFormat(pattern= DateUtil.DATE_FORMAT_DD)
 	private Date  failTime;
-			
+
+
 	
 	/**
 	 * 充值卡的id
@@ -81,6 +110,7 @@
 	/**
 	 * 订单ID
 	 */
+	@TableField(exist = false)
 	private Long  orderId;
 			
 	
@@ -92,10 +122,7 @@
 	 */
 	private String  isOver;
 			
-	/**
-	 * 是默认储值卡? Y 是,N否
-	 */
-	private String  isVipCar;
+
 	/**
 	 * 备注
 	 */
@@ -103,6 +130,7 @@
 	/**
 	 * 前台输入的退款金额
 	 */
+	@TableField(exist = false)
 	private String returnMonery;
 
 	/**
@@ -141,6 +169,87 @@
 	public void setRemark(String remark) {
 		this.remark = remark;
 	}
+
+	/**
+	 * 当大于10000时使用次数为不限,或者为会籍卡时
+	 * @return
+	 */
+	public String getLastCountName() {
+		if(getLastCount()==null){
+			return "";
+		}
+		if(Dictionary.FLAG_YES.equals(getIsVipCar())||getLastCount()>Dictionary.MAX_USE_COUNT_SIGN){
+			lastCountName=Dictionary.MAX_USE_STRING;
+		}else{
+			lastCountName=getLastCount().toString();
+		}
+		return lastCountName;
+	}
+
+	public String getCreateBy() {
+		return createBy;
+	}
+
+	public void setCreateBy(String createBy) {
+		this.createBy = createBy;
+	}
+
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	public String getUpdateBy() {
+		return updateBy;
+	}
+
+	public void setUpdateBy(String updateBy) {
+		this.updateBy = updateBy;
+	}
+
+	public Date getUpdateTime() {
+		return updateTime;
+	}
+
+	public void setUpdateTime(Date updateTime) {
+		this.updateTime = updateTime;
+	}
+
+	public void setLastCountName(String lastCountName) {
+		this.lastCountName = lastCountName;
+	}
+
+	public String getSourceName() {
+		if(getSource()==null){
+			return "";
+		}
+		if(getSource().contains(Dictionary.TAOCAN_SOURCE_ZS)){
+			sourceName=Dictionary.FLAG_YES;
+		}else{
+			sourceName=Dictionary.FLAG_NO;;
+		}
+		return sourceName;
+	}
+
+	public void setSourceName(String sourceName) {
+		this.sourceName = sourceName;
+	}
+
+
+	public String getIsVipCar() {
+		return isVipCar;
+	}
+
+	public void setIsVipCar(String isVipCar) {
+		this.isVipCar = isVipCar;
+	}
+
+
+
+
 	/**
 	 * 扩展对象
 	 */
@@ -149,12 +258,14 @@
 	/**
 	 * 会员信息
 	 */
+	@TableField(exist = false)
 	private SysVipInfo vipInfo;
 
 	/**
 	 * 调整说明
 	 */
 	@Extend
+	@TableField(exist = false)
 	private String changeRemark;
 
 
@@ -166,117 +277,110 @@
 		this.changeRemark = changeRemark;
 	}
 
-	public String getIsVipCar() {
-		return isVipCar;
-	}
-
-	public void setIsVipCar(String isVipCar) {
-		this.isVipCar = isVipCar;
-	}
 
 	public Long getId() {
 		return id;
 	}
-   	
+
    	public void setId(Long id) {
 		this.id=id;
 	}
-   	
+
 
 	public Long getOrderItemId() {
 		return orderItemId;
 	}
-   	
+
    	public void setOrderItemId(Long orderItemId) {
 		this.orderItemId=orderItemId;
 	}
-   	
+
 
 	public Integer getUseTotal() {
 		return useTotal;
 	}
-   	
+
    	public void setUseTotal(Integer useTotal) {
 		this.useTotal=useTotal;
 	}
-   	
+
 
 	public Integer getLastCount() {
 		return lastCount;
 	}
-   	
+
    	public void setLastCount(Integer lastCount) {
 		this.lastCount=lastCount;
 	}
-   	
+
 
 	public Double getRealMoney() {
 		return realMoney;
 	}
-   	
+
    	public void setRealMoney(Double realMoney) {
 		this.realMoney=realMoney;
 	}
-   	
+
 
 	public Double getGiftMoney() {
 		return giftMoney;
 	}
-   	
+
    	public void setGiftMoney(Double giftMoney) {
 		this.giftMoney=giftMoney;
 	}
-   	
+
 
 	public String getStatus() {
 		return status;
 	}
-   	
+
    	public void setStatus(String status) {
 		this.status=status;
 	}
-   	
+
 
 	public String getSource() {
 		return source;
 	}
-   	
+
    	public void setSource(String source) {
 		this.source=source;
 	}
-   	
+
 
 	public Date getFailTime() {
 		return failTime;
 	}
-   	
+
    	public void setFailTime(Date failTime) {
 		this.failTime=failTime;
 	}
-   	
+
 
 	public Long getGoodsId() {
 		return goodsId;
 	}
-   	
+
    	public void setGoodsId(Long goodsId) {
 		this.goodsId=goodsId;
 	}
-   	
+
 
 	public Long getVipId() {
 		return vipId;
 	}
-   	
+
    	public void setVipId(Long vipId) {
 		this.vipId=vipId;
 	}
-   	
+
 
 	public String getIsOver() {
 		return isOver;
 	}
-   	
+
    	public void setIsOver(String isOver) {
 		this.isOver=isOver;
 	}
@@ -295,6 +399,6 @@
 		return MoneyUtil.add(realMoney,giftMoney);
 	}
 
-   	
-  
+
+
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUseFlow.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUseFlow.java
index 8bb8780..8e4359e 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUseFlow.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUseFlow.java
@@ -1,5 +1,7 @@
 package com.matrix.system.hive.bean;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+
 import java.io.Serializable;
 import java.util.Date;
 /**
@@ -27,7 +29,12 @@
 	 * 订单编号
 	 */
 	private String  orderNo;
-			
+
+	/**
+	 * 微信支付编号
+	 */
+	private String  payNo;
+
 	
 	/**
 	 * 操作员id
@@ -43,6 +50,7 @@
 	/**
 	 * 创建时间
 	 */
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
 	private Date  createTime;
 	
 	/**
@@ -235,4 +243,12 @@
 	public void setTimes(Integer times) {
 		this.times = times;
 	}
+
+	public String getPayNo() {
+		return payNo;
+	}
+
+	public void setPayNo(String payNo) {
+		this.payNo = payNo;
+	}
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrder.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrder.java
index 7f34c77..835d02c 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrder.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrder.java
@@ -1,6 +1,5 @@
 package com.matrix.system.hive.bean;
 
-import com.fasterxml.jackson.annotation.JsonFormat;
 import com.matrix.core.tools.DateUtil;
 import org.springframework.format.annotation.DateTimeFormat;
 
@@ -16,7 +15,15 @@
  */
 public class SysOrder implements Serializable {
 
-	private static final long serialVersionUID = 1L;
+	/**
+	 * 订单类型-销售订单
+	 */
+	public static final int ORDER_TYPE_SEAL= 1;
+
+	/**
+	 * 订单类型-退款订单
+	 */
+	public static final int ORDER_TYPE_REFUND= 2;
 
 	/**
 	 * 序号
@@ -78,24 +85,24 @@
 	/**
 	 * 订单总价
 	 */
-	private double total;
+	private Double total;
 	/**
 	 * 折后价
 	 */
-	private double zkTotal;
+	private Double zkTotal;
 
 	/**
 	 * 现金支付金额
 	 */
-	private double cashPay;
+	private Double cashPay;
 	/**
 	 * 现金支付金额
 	 */
-	private double cardPay;
+	private Double cardPay;
 	/**
 	 * 欠款金额
 	 */
-	private double arrears;
+	private Double arrears;
 
 	/**
 	 * 店铺id
@@ -126,7 +133,12 @@
 	 * 会员姓名
 	 */
 	private String vipNo;
-	
+
+	/**
+	 * 订单类型1,销售订单,2退款订单
+	 */
+	private Integer orderType;
+
 	/* 会员手机号
 	 */
 	private String vipPhone;
@@ -165,12 +177,36 @@
 	 */
 	private Integer times;
 
+
 	private String type;
 
 	/**
 	 * 原有订单ID 退款时使用
 	 */
 	private Long oldOrderId;
+
+	/**
+	 * 该订单有退款
+	 */
+	public static final Integer IS_HAS_REFUND_Y = 1;
+
+	/**
+	 * 该订单无退款
+	 */
+	public static final Integer IS_HAS_REFUND_N = 2;
+
+	/**
+	 * 是否发生退款 1-是 2-否
+	 */
+	private Integer isHasRefund;
+
+	public Integer getIsHasRefund() {
+		return isHasRefund;
+	}
+
+	public void setIsHasRefund(Integer isHasRefund) {
+		this.isHasRefund = isHasRefund;
+	}
 
 	public Long getOldOrderId() {
 		return oldOrderId;
@@ -194,6 +230,14 @@
 
 	public void setShopShortName(String shopShortName) {
 		this.shopShortName = shopShortName;
+	}
+
+	public Integer getOrderType() {
+		return orderType;
+	}
+
+	public void setOrderType(Integer orderType) {
+		this.orderType = orderType;
 	}
 
 	public String getType() {
@@ -244,19 +288,19 @@
 		this.searchShop = searchShop;
 	}
 
-	public double getArrears() {
+	public Double getArrears() {
 		return arrears;
 	}
 
-	public void setArrears(double arrears) {
+	public void setArrears(Double arrears) {
 		this.arrears = arrears;
 	}
 
-	public double getCardPay() {
+	public Double getCardPay() {
 		return cardPay;
 	}
 
-	public void setCardPay(double cardPay) {
+	public void setCardPay(Double cardPay) {
 		this.cardPay = cardPay;
 	}
 
@@ -283,11 +327,11 @@
 	public void setEndTimeVo(Date endTimeVo) {
 		this.endTimeVo = endTimeVo;
 	}
-	public double getCashPay() {
+	public Double getCashPay() {
 		return cashPay;
 	}
 
-	public void setCashPay(double cashPay) {
+	public void setCashPay(Double cashPay) {
 		this.cashPay = cashPay;
 	}
 	
@@ -393,11 +437,11 @@
 		this.activity = activity;
 	}
 
-	public double getTotal() {
+	public Double getTotal() {
 		return total;
 	}
 
-	public void setTotal(double total) {
+	public void setTotal(Double total) {
 		this.total = total;
 	}
 
@@ -422,11 +466,11 @@
 		this.changeId = changeId;
 	}
 
-	public double getZkTotal() {
+	public Double getZkTotal() {
 		return zkTotal;
 	}
 
-	public void setZkTotal(double zkTotal) {
+	public void setZkTotal(Double zkTotal) {
 		this.zkTotal = zkTotal;
 	}
 
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrderItem.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrderItem.java
index c572e30..acd3b19 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrderItem.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrderItem.java
@@ -33,6 +33,11 @@
 	private Integer count;
 
 
+	/**
+	 * 退款数量
+	 */
+	private Integer refundCount;
+
 
 	/**
 	 * 是否为赠送和 是否
@@ -87,11 +92,8 @@
 	 * 欠款金额
 	 */
 	private Double arrears;
-	
 
-	
-	
-	//页面参数使用
+
 	/**
 	 * 付款方式
 	 */
@@ -108,8 +110,7 @@
 	 */
 	private Long cardId;
 	
-	
-	
+
 	/**
 	 * 是否为综合卡创建的订单明细
 	 * 1是
@@ -159,6 +160,14 @@
 		return preCount;
 	}
 
+	public Integer getRefundCount() {
+		return refundCount;
+	}
+
+	public void setRefundCount(Integer refundCount) {
+		this.refundCount = refundCount;
+	}
+
 	public void setPreCount(int preCount) {
 		this.preCount = preCount;
 	}
@@ -182,14 +191,15 @@
 	/**
 	 * 业绩计算
 	 */
-	private List<AchieveNew> achaeveList;
+	private List<AchieveNew> achieveList;
 
-	public List<AchieveNew> getAchaeveList() {
-		return achaeveList;
+
+	public List<AchieveNew> getAchieveList() {
+		return achieveList;
 	}
 
-	public void setAchaeveList(List<AchieveNew> achaeveList) {
-		this.achaeveList = achaeveList;
+	public void setAchieveList(List<AchieveNew> achieveList) {
+		this.achieveList = achieveList;
 	}
 
 	public String getPayMethodDetail() {
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjServices.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjServices.java
index 1350bdb..628ca52 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjServices.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjServices.java
@@ -64,9 +64,7 @@
      * 床位
      */
     private Long bedId;
-    /**
-     * 床位
-     */
+
     private Long companyId;
 
     /**
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipInfo.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipInfo.java
index 308720b..72f4119 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipInfo.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipInfo.java
@@ -1,8 +1,11 @@
 package com.matrix.system.hive.bean;
 
+
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.google.gson.annotations.Expose;
 import com.matrix.core.tools.DateUtil;
 import com.matrix.system.hive.plugin.util.ExcelAnnotation;
+import lombok.Data;
 import org.springframework.format.annotation.DateTimeFormat;
 
 import java.io.Serializable;
@@ -10,17 +13,22 @@
 import java.util.List;
 
 
-/**
- * @Title: SysVipInfo.java  
- * @Package com.zkingsoft.model  
- * @description 
- * @author jyy
- * @email 18075895212@qq.com
- * @date  2016年7月14日 上午10:59:29 
- */
+
+@Data
 public class SysVipInfo implements Serializable {
 
 	private static final long serialVersionUID = 1L;
+	/**
+	 * 是销售员
+	 */
+	public  static final int IS_SALES = 1;
+	/**
+	 * 不是销售员
+	 */
+	public  static final int NOT_SALES = 2;
+
+
+
 	/**
 	 * 1、成交客户
 	 * **/
@@ -230,80 +238,63 @@
 
 	private SysOrder sysOrder;
 
-	public String getProvince() {
-		return province;
-	}
+	/**
+	 * 可提现金额
+	 */
+	private Double  withdrawalCash;
+	/**
+	 *推广员等级
+	 */
+	private Long  salesmanGrade;
 
-	public void setProvince(String province) {
-		this.province = province;
-	}
-
-	public String getCity() {
-		return city;
-	}
-
-	public void setCity(String city) {
-		this.city = city;
-	}
-
-	public String getArea() {
-		return area;
-	}
-
-	public void setArea(String area) {
-		this.area = area;
-	}
-
-	public Long getRecommendId() {
-		return recommendId;
-	}
-
-	public void setRecommendId(Long recommendId) {
-		this.recommendId = recommendId;
-	}
-
-	public SysOrder getSysOrder() {
-		return sysOrder;
-	}
-
-	public void setSysOrder(SysOrder sysOrder) {
-		this.sysOrder = sysOrder;
-	}
-
-	public Integer getIsDeal() {
-		return isDeal;
-	}
-
-	public void setIsDeal(Integer isDeal) {
-		this.isDeal = isDeal;
-	}
-
-	public Long getParentId() {
-		return parentId;
-	}
-
-	public void setParentId(Long parentId) {
-		this.parentId = parentId;
-	}
-
-	public Date getCreateDistributionTime() {
-		return createDistributionTime;
-	}
-
-	public void setCreateDistributionTime(Date createDistributionTime) {
-		this.createDistributionTime = createDistributionTime;
-	}
-
-	public Date getHandleTime() {
-		return handleTime;
-	}
-
-	public void setHandleTime(Date handleTime) { 
-		this.handleTime = handleTime;
-	}
+	/**
+	 * 用户昵称
+	 */
+	private String  nickName;
 
 
-	/** 扩展信息 **/
+	/**
+	 * 头像
+	 */
+	private String  avatarUrl;
+
+	/**
+	 * 性别 1、男  2、女  0、未知
+	 */
+	private Integer  gender;
+
+	/**
+	 * 用户所在国家
+	 */
+	private String  country;
+
+
+
+	/**
+	 * 用户是否授权  1、是  2、否
+	 */
+	private Integer  userIsAuthorize;
+
+
+	/**
+	 * 绑定上级用户时间
+	 */
+	private Date bindingParentTime;
+
+
+	/**
+	 * 是否是销售员(1=是,2=否)
+	 */
+	private Integer isSales;
+
+	/**
+	 * 用户类型 1、待审核  2、审核通过  0、审核未通过
+	 */
+	private Integer  fenxiaoState;
+
+	private String  sessionKey;
+
+
 	/**
 	 * 会员等级id
 	 */
@@ -339,6 +330,8 @@
 	 * 页面上的入会时间
 	 */
 	private String inDateVo;
+
+
 	/**
 	 * 页面上的生日
 	 */
@@ -407,137 +400,31 @@
 	/**
 	 * 美疗师集合
 	 */
+	@Expose(serialize = false)
 	private List<MyBeatician> beauticains;
 	
 	
 	/**
 	 * 会员问卷信息-答案,传递数据使用
 	 */
+	@Expose(serialize = false)
 	List<VipAnswer> vipAnswers;
 
 	/**
 	 * 会员标签
 	 */
+	@Expose(serialize = false)
 	List<SysVipLabel> labels;
 
-	public List<SysVipLabel> getLabels() {
-		return labels;
-	}
-
-	public void setLabels(List<SysVipLabel> labels) {
-		this.labels = labels;
-	}
-
-	public String getAge() {
-		return age;
-	}
-
-	public void setAge(String age) {
-		this.age = age;
-	}
-
-	public Long getCompanyId() {
-		return companyId;
-	}
-
-	public void setCompanyId(Long companyId) {
-		this.companyId = companyId;
-	}
-
-	public String getOpenId() {
-		return openId;
-	}
-
-	public void setOpenId(String openId) {
-		this.openId = openId;
-	}
-
-	public String getPayTotal() {
-		return payTotal;
-	}
-
-	public void setPayTotal(String payTotal) {
-		this.payTotal = payTotal;
-	}
-
-	public Integer getCostTotal() {
-		return costTotal;
-	}
-
-	public void setCostTotal(Integer costTotal) {
-		this.costTotal = costTotal;
-	}
-
-	public String getCostNum() {
-		return costNum;
-	}
-
-	public void setCostNum(String costNum) {
-		this.costNum = costNum;
-	}
-
-	public String getTimeStart() {
-		return timeStart;
-	}
-
-	public void setTimeStart(String timeStart) {
-		this.timeStart = timeStart;
-	}
-
-	public String getTimeEnd() {
-		return timeEnd;
-	}
-
-	public void setTimeEnd(String timeEnd) {
-		this.timeEnd = timeEnd;
-	}
-
-	public Integer getVipNum() {
-		return vipNum;
-	}
-
-	public void setVipNum(Integer vipNum) {
-		this.vipNum = vipNum;
-	}
-
-	
-	public String getPhoto() {
-		return photo;
-	}
-
-	public void setPhoto(String photo) {
-		this.photo = photo;
-	}
-
-	public String getYear() {
-		return year;
-	}
-
-	public void setYear(String year) {
-		this.year = year;
-	}
-
-	public boolean isQdSign() {
-		return qdSign;
-	}
 
 
 
 	/**
 	 * 会员所有的充值卡
 	 */
+	@Expose(serialize = false,deserialize = false)
 	private List<MoneyCardUse> cards;
 	
-	
-	
-	
-	public List<MoneyCardUse> getCards() {
-		return cards;
-	}
-
-	public void setCards(List<MoneyCardUse> cards) {
-		this.cards = cards;
-	}
 
 
 
@@ -547,440 +434,8 @@
 	 * 没签到false
 	 */
 	private boolean qdSign;
+
 	private String name;
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public boolean getQdSign() {
-		return qdSign;
-	}
-
-	public void setQdSign(boolean qdSign) {
-		this.qdSign = qdSign;
-	}
-
-	public String getUuid() {
-		return uuid;
-	}
-
-	public void setUuid(String uuid) {
-		this.uuid = uuid;
-	}
-
-	public String getDisease() {
-		return disease;
-	}
-
-	public void setDisease(String disease) {
-		this.disease = disease;
-	}
-
-	public Date getStartTime() {
-		return startTime;
-	}
-
-	public Integer getRankType() {
-		return rankType;
-	}
-
-	public void setRankType(Integer rankType) {
-		this.rankType = rankType;
-	}
-
-	public void setStartTime(Date startTime) {
-		this.startTime = startTime;
-	}
-
-	public Date getEndTime() {
-		return endTime;
-	}
-
-	
-
-	public void setEndTime(Date endTime) {
-		this.endTime = endTime;
-	}
-
-	public Integer getRanking() {
-		return ranking;
-	}
-
-	public void setRanking(Integer ranking) {
-		this.ranking = ranking;
-	}
-
-	public String getEmail() {
-		return email;
-	}
-
-	public void setEmail(String email) {
-		this.email = email;
-	}
-
-	public String getShopName() {
-	    return shopName;
-    }
-
-    public String getInDateVo() {
-		return inDateVo;
-	}
-
-	public void setInDateVo(String inDateVo) {
-		this.inDateVo = inDateVo;
-	}
-
-	public String getBirthday1Vo() {
-		return birthday1Vo;
-	}
-
-	public void setBirthday1Vo(String birthday1Vo) {
-		this.birthday1Vo = birthday1Vo;
-	}
-
-	public void setShopName(String shopName) {
-	this.shopName = shopName;
-    }
-
-	public Long getShopId() {
-		return shopId;
-	}
-
-	public void setShopId(Long shopId) {
-		this.shopId = shopId;
-	}
-	public Long getStaffId() {
-		return staffId;
-	}
-
-	public void setStaffId(Long staffId) {
-		this.staffId = staffId;
-	}
-
-	
-
-
-
-	public String getStaffName() {
-		return staffName;
-	}
-
-	public void setStaffName(String staffName) {
-		this.staffName = staffName;
-	}
-
-	public Long getId() {
-		return id;
-	}
-
-	public void setId(Long id) {
-		this.id = id;
-	}
-
-	public String getVipNo() {
-		return vipNo;
-	}
-
-	public void setVipNo(String vipNo) {
-		this.vipNo = vipNo;
-	}
-
-	public String getVipName() {
-		return vipName;
-	}
-
-	public void setVipName(String vipName) {
-		this.vipName = vipName;
-	}
-
-
-	public String getZjm() {
-		return zjm;
-	}
-
-	public void setZjm(String zjm) {
-		this.zjm = zjm;
-	}
-
-	public String getPhone() {
-		return phone;
-	}
-
-	public void setPhone(String phone) {
-		this.phone = phone;
-	}
-
-
-	public String getSex() {
-		return sex;
-	}
-
-	public void setSex(String sex) {
-		this.sex = sex;
-	}
-
-	public Date getBirthday1() {
-		return birthday1;
-	}
-
-	public void setBirthday1(Date birthday1) {
-		this.birthday1 = birthday1;
-	}
-
-	public String getAddr() {
-		return addr;
-	}
-
-	public void setAddr(String addr) {
-		this.addr = addr;
-	}
-
-	public String getConstell() {
-		return constell;
-	}
-
-	public void setConstell(String constell) {
-		this.constell = constell;
-	}
-
-	public String getAnimalSign() {
-		return animalSign;
-	}
-
-	public void setAnimalSign(String animalSign) {
-		this.animalSign = animalSign;
-	}
-
-	public String getArrivalWay() {
-		return arrivalWay;
-	}
-
-	public void setArrivalWay(String arrivalWay) {
-		this.arrivalWay = arrivalWay;
-	}
-
-	public String getVipType() {
-		return vipType;
-	}
-
-	public void setVipType(String vipType) {
-		this.vipType = vipType;
-	}
-
-	public String getVipState() {
-		return vipState;
-	}
-
-	public void setVipState(String vipState) {
-		this.vipState = vipState;
-	}
-
-	public String getIsDelete() {
-		return isDelete;
-	}
-
-	public void setIsDelete(String isDelete) {
-		this.isDelete = isDelete;
-	}
-
-	public Integer getPointAll() {
-		return pointAll;
-	}
-
-	public void setPointAll(Integer pointAll) {
-		this.pointAll = pointAll;
-	}
-
-	public Double getCommissionAll() {
-		return commissionAll;
-	}
-
-	public void setCommissionAll(Double commissionAll) {
-		this.commissionAll = commissionAll;
-	}
-
-	public Date getInDate() {
-		return inDate;
-	}
-
-	public void setInDate(Date inDate) {
-		this.inDate = inDate;
-	}
-
-	public String getRemark() {
-		return remark;
-	}
-
-	public void setRemark(String remark) {
-		this.remark = remark;
-	}
-
-	public String getPassWord() {
-		return passWord;
-	}
-
-	public void setPassWord(String passWord) {
-		this.passWord = passWord;
-	}
-
-
-	public Date getCreateTime() {
-		return createTime;
-	}
-
-	public void setCreateTime(Date createTime) {
-		this.createTime = createTime;
-	}
-
-	public Long getLevelId() {
-		return levelId;
-	}
-
-	public void setLevelId(Long levelId) {
-		this.levelId = levelId;
-	}
-
-	public SysVipLevel getVipLevel() {
-		return vipLevel;
-	}
-
-	public void setVipLevel(SysVipLevel vipLevel) {
-		this.vipLevel = vipLevel;
-	}
-
-
-
-
-	public String getStatu() {
-		return statu;
-	}
-
-	public void setStatu(String statu) {
-		this.statu = statu;
-	}
-
-	public Double getBalance() {
-		return balance;
-	}
-
-	public void setBalance(Double balance) {
-		this.balance = balance;
-	}
-
-	
-
-	public MoneyCardUse getLevelCard() {
-		return levelCard;
-	}
-
-	public void setLevelCard(MoneyCardUse levelCard) {
-		this.levelCard = levelCard;
-	}
-
-	public String getBeatuyId() {
-		return beatuyId;
-	}
-
-	public void setBeatuyId(String beatuyId) {
-		this.beatuyId = beatuyId;
-	}
-
-	public List<MyBeatician> getBeauticains() {
-		return beauticains;
-	}
-
-	public void setBeauticains(List<MyBeatician> beauticains) {
-		this.beauticains = beauticains;
-	}
-
-	public String getBlood() {
-		return blood;
-	}
-
-	public void setBlood(String blood) {
-		this.blood = blood;
-	}
-
-	public String getSfCard() {
-		return sfCard;
-	}
-
-	public void setSfCard(String sfCard) {
-		this.sfCard = sfCard;
-	}
-
-	public String getLink() {
-		return link;
-	}
-
-	public void setLink(String link) {
-		this.link = link;
-	}
-
-	public String getMarry() {
-		return marry;
-	}
-
-	public void setMarry(String marry) {
-		this.marry = marry;
-	}
-
-	public String getVocation() {
-		return vocation;
-	}
-
-	public void setVocation(String vocation) {
-		this.vocation = vocation;
-	}
-
-	public List<VipAnswer> getVipAnswers() {
-		return vipAnswers;
-	}
-
-	public void setVipAnswers(List<VipAnswer> vipAnswers) {
-		this.vipAnswers = vipAnswers;
-	}
-
-
-	public Integer getBirthdayType() {
-		return birthdayType;
-	}
-
-	public void setBirthdayType(Integer birthdayType) {
-		this.birthdayType = birthdayType;
-	}
-
-	@Override
-	public String toString() {
-		return "SysVipInfo [id=" + id + ", vipNo=" + vipNo + ", vipName="
-				+ vipName + ", phone=" + phone + ", vipType=" + vipType
-				+ ", shopName=" + shopName + ", vipState=" + vipState
-				+ ", passWord=" + passWord + ", beatuyId=" + beatuyId
-				+ ", sex=" + sex + ", birthday1=" + birthday1 + ", addr="
-				+ addr + ", constell=" + constell + ", animalSign="
-				+ animalSign + ", arrivalWay=" + arrivalWay + ", photo="
-				+ photo + ", pointAll=" + pointAll + ", commissionAll="
-				+ commissionAll + ", inDate=" + inDate + ", createTime="
-				+ createTime + ", remark=" + remark + ", staffId=" + staffId
-				+ ", shopId=" + shopId + ", isDelete=" + isDelete + ", email="
-				+ email + ", blood=" + blood + ", sfCard=" + sfCard + ", link="
-				+ link + ", marry=" + marry + ", vocation=" + vocation
-				+ ", levelId=" + levelId + ", uuid=" + uuid + ", balance="
-				+ balance + ", levelCard=" + levelCard + ", vipLevel="
-				+ vipLevel + ", staffName=" + staffName + ", inDateVo="
-				+ inDateVo + ", birthday1Vo=" + birthday1Vo + ", ranking="
-				+ ranking + ", startTime=" + startTime + ", endTime=" + endTime
-				+ ", rankType=" + rankType + ", year=" + year + ", vipNum="
-				+ vipNum + ", timeStart=" + timeStart + ", timeEnd=" + timeEnd
-				+ ", payTotal=" + payTotal + ", costTotal=" + costTotal
-				+ ", costNum=" + costNum + ", openId=" + openId + ", statu="
-				+ statu + ", beauticains=" + beauticains + ", vipAnswers="
-				+ vipAnswers + ", cards=" + cards + ", qdSign=" + qdSign + "]";
-	}
 
 
 
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/dao/AchieveNewDao.java b/zq-erp/src/main/java/com/matrix/system/hive/dao/AchieveNewDao.java
index 46ee09f..d5f206e 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/dao/AchieveNewDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/dao/AchieveNewDao.java
@@ -1,15 +1,15 @@
 package com.matrix.system.hive.dao;
 
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
 import com.matrix.core.pojo.PaginationVO;
 import com.matrix.system.app.vo.OrderDetailAchieveItemVo;
 import com.matrix.system.app.vo.RankingVo;
 import com.matrix.system.app.vo.UserAchieveVo;
 import com.matrix.system.hive.bean.AchieveNew;
 import org.apache.ibatis.annotations.Param;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
 
 
 /**
@@ -73,4 +73,6 @@
 	List<AchieveNew> selectOrderItemAchieveByOrderId(Long orderId);
 
 	List<RankingVo> selectStaffSaleAchieveRanking(@Param("record") AchieveNew achieveNew);
+
+    int deleteByOrderId(@Param("orderId") Long orderId);
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/dao/MoneyCardUseFlowDao.java b/zq-erp/src/main/java/com/matrix/system/hive/dao/MoneyCardUseFlowDao.java
index 5c4bad7..597762f 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/dao/MoneyCardUseFlowDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/dao/MoneyCardUseFlowDao.java
@@ -1,10 +1,11 @@
 package com.matrix.system.hive.dao;
 
-import java.util.List;
-
 import com.matrix.core.pojo.PaginationVO;
 import com.matrix.system.hive.bean.MoneyCardUseFlow;
+import com.matrix.system.shopXcx.api.dto.MoneyCardUseFlowDto;
 import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 
 /**
@@ -25,6 +26,8 @@
 	
 	public List<MoneyCardUseFlow> selectInPage(@Param("record") MoneyCardUseFlow moneyCardUseFlow, @Param("pageVo") PaginationVO pageVo);
 
+	public List<MoneyCardUseFlow> selectForWxInPage(@Param("record")MoneyCardUseFlowDto moneyCardUseFlowDto);
+
 	public List<MoneyCardUseFlow> selectByModel(@Param("record") MoneyCardUseFlow moneyCardUseFlow);
 	
 	public int  selectTotalRecord(@Param("record") MoneyCardUseFlow moneyCardUseFlow);
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/dao/MoneyCardUseV2Dao.java b/zq-erp/src/main/java/com/matrix/system/hive/dao/MoneyCardUseV2Dao.java
new file mode 100644
index 0000000..741d039
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/hive/dao/MoneyCardUseV2Dao.java
@@ -0,0 +1,12 @@
+package com.matrix.system.hive.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.matrix.system.hive.bean.MoneyCardUse;
+
+/**
+ * @description 订单表
+ */
+public interface MoneyCardUseV2Dao extends BaseMapper<MoneyCardUse> {
+
+
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/dao/ShoppingGoodsDao.java b/zq-erp/src/main/java/com/matrix/system/hive/dao/ShoppingGoodsDao.java
index 895c181..c846f0d 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/dao/ShoppingGoodsDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/dao/ShoppingGoodsDao.java
@@ -89,4 +89,6 @@
 	List<ShoppingGoodsListVo> selectShoppingGoodsApiInPage(@Param("record") ShoppingGoodsListDto shoppingGoodsListDto, @Param("pageVo") PaginationVO pageVo);
 
 	int selectShopppingGoodsAipTotal(@Param("record") ShoppingGoodsListDto shoppingGoodsListDto);
+
+	public List<ShoppingGoods> selectByIds(@Param("ids")List<Integer> ids);
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/dao/SysProjServicesDao.java b/zq-erp/src/main/java/com/matrix/system/hive/dao/SysProjServicesDao.java
index 90c2647..4266fb8 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/dao/SysProjServicesDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/dao/SysProjServicesDao.java
@@ -68,4 +68,6 @@
 	 * @return
 	 */
 	int updateNoticeTimes(@Param("list")List<Long> noticedIds);
+
+	List<SysProjServices> selectProjServicesByOrderItemId(@Param("itemId") Long itemId);
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/dao/SysProjUseDao.java b/zq-erp/src/main/java/com/matrix/system/hive/dao/SysProjUseDao.java
index c064f18..cd06925 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/dao/SysProjUseDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/dao/SysProjUseDao.java
@@ -132,4 +132,6 @@
 	List<SysProjUseFlow> selectProjUseFlow(@Param("record") SysProjUseFlow projUseFlow, @Param("pageVo")PaginationVO pageVo);
 
 	Integer selectProjUseFlowTotal(@Param("record") SysProjUseFlow projUseFlow);
+
+	List<SysProjUse> selectTaoCanListWithProj(@Param("record") SysProjUse sysProjUse);
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipInfoDao.java b/zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipInfoDao.java
index 853b5c5..1295c04 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipInfoDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipInfoDao.java
@@ -189,7 +189,7 @@
 	public int selectSecondTotalRecord(@Param("record") SysVipInfo sysVipInfo);
 
 
-	public SysVipInfo selectByPhone(String phone);
+	public SysVipInfo selectByPhone(@Param("phone") String phone,@Param("companyId") Long companyId);
 
 
 
@@ -208,4 +208,8 @@
 	List<VipInfoListVo> selectVipAddressBookByList(@Param("record") VipInfoListDto vipInfoListDto);
 
 	com.matrix.system.app.vo.VipInfoVo selectVipInfoById(@Param("id") Long id);
+
+	public SysVipInfo findByOpenId(String openId);
+
+	int unbundlingSaleMan(Long userId);
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/dto/ScoreChangeDto.java b/zq-erp/src/main/java/com/matrix/system/hive/dto/ScoreChangeDto.java
new file mode 100644
index 0000000..5307e08
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/hive/dto/ScoreChangeDto.java
@@ -0,0 +1,26 @@
+package com.matrix.system.hive.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+
+@Data
+@ApiModel(value = "ScoreChangeDto", description = "积分修改参数接收类")
+public class ScoreChangeDto {
+
+    @NotNull
+    @ApiModelProperty(value = "会员id", example = "1")
+    private Long  vipId;
+
+    @NotNull(message = "调整数量不能为空")
+    @ApiModelProperty(value = "调整数量", example = "1")
+    private Integer  amount;
+
+    @NotEmpty(message = "调整说明不能为空")
+    @ApiModelProperty(value = "调整说明", example = "线下兑换")
+    private String  remarks;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/pojo/MoneyCardUserVo.java b/zq-erp/src/main/java/com/matrix/system/hive/pojo/MoneyCardUserVo.java
deleted file mode 100644
index 524857c..0000000
--- a/zq-erp/src/main/java/com/matrix/system/hive/pojo/MoneyCardUserVo.java
+++ /dev/null
@@ -1,102 +0,0 @@
-package com.matrix.system.hive.pojo;
-
-
-import com.matrix.system.constance.Dictionary;
-
-public class MoneyCardUserVo{
-	
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-	/*vo对象************/
-	/**
-	 * 剩余次数
-	 */
-	String lastCountName;
-	/**
-	 * 数据来源
-	 */
-	String sourceName;	
-	
-	/*vo对象************/
-	
-	/**
-	 * 剩余次数
-	 */
-	
-	private Integer  lastCount;
-	
-	/**
-	 * 来源,购买,转让,赠送
-	 */
-	private String  source;
-	/**
-	 * 是会籍卡? Y 是,N否
-	 */
-	private String  isVipCar;
-	
-	/**
-	 * 当大于10000时使用次数为不限,或者为会籍卡时
-	 * @return
-	 */
-	public String getLastCountName() {
-		if(getLastCount()==null){
-			return "";
-		}
-		if(Dictionary.FLAG_YES.equals(getIsVipCar())||getLastCount()>Dictionary.MAX_USE_COUNT_SIGN){
-			lastCountName=Dictionary.MAX_USE_STRING;
-		}else{
-			lastCountName=getLastCount().toString();
-		}
-		return lastCountName;
-	}
-
-	public void setLastCountName(String lastCountName) {
-		this.lastCountName = lastCountName;
-	}
-
-	public String getSourceName() {
-		if(getSource()==null){
-			return "";
-		}
-		if(getSource().contains(Dictionary.TAOCAN_SOURCE_ZS)){
-			sourceName=Dictionary.FLAG_YES;
-		}else{
-			sourceName=Dictionary.FLAG_NO;;
-		}
-		return sourceName;
-	}
-
-	public void setSourceName(String sourceName) {
-		this.sourceName = sourceName;
-	}
-
-	public Integer getLastCount() {
-		return lastCount;
-	}
-
-	public void setLastCount(Integer lastCount) {
-		this.lastCount = lastCount;
-	}
-
-	public String getSource() {
-		return source;
-	}
-
-	public void setSource(String source) {
-		this.source = source;
-	}
-
-	public String getIsVipCar() {
-		return isVipCar;
-	}
-
-	public void setIsVipCar(String isVipCar) {
-		this.isVipCar = isVipCar;
-	}
-
-	
-	
-	
-}
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/CodeService.java b/zq-erp/src/main/java/com/matrix/system/hive/service/CodeService.java
index 896518f..13508db 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/CodeService.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/CodeService.java
@@ -25,7 +25,16 @@
 	 */
 	public String getOrderCode();
 
+	String get32LenNumberCode();
+
 	public String getFlowCode();
+	/**
+	 * 生成一个加上typeName前缀的编号
+	 *    typeName+时间戳+四位随机数
+	 * @param typeName
+	 * @return
+	 */
+	public String getCodeByTyle(String typeName);
 	
 	/**
 	*  根据一定的规则返回一个随机编号。
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/SysProjServicesService.java b/zq-erp/src/main/java/com/matrix/system/hive/service/SysProjServicesService.java
index 5c48a1a..27ed849 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/SysProjServicesService.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/SysProjServicesService.java
@@ -72,6 +72,13 @@
      */
     public int modifyCancelProjServices(SysProjServices projServices);
 
+    /**
+     * 删除服务单中明细, 即项目/套餐
+     * @param id
+     * @return
+     */
+    public int deleteProjServiceItemById(Long id);
+
 
     /**
      * 划扣
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/SysProjUseService.java b/zq-erp/src/main/java/com/matrix/system/hive/service/SysProjUseService.java
index df034a0..0bf893a 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/SysProjUseService.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/SysProjUseService.java
@@ -141,4 +141,6 @@
 
 
 	public List<SysProjUse> selectTaocanProjUse(Long id, String status);
+
+	public List<SysProjUse> findTaocaoProjUseWithProj(SysProjUse sysProjUse);
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/SysVipInfoService.java b/zq-erp/src/main/java/com/matrix/system/hive/service/SysVipInfoService.java
index 0d5f436..dd21bc1 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/SysVipInfoService.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/SysVipInfoService.java
@@ -196,4 +196,13 @@
 		int apiModifyVip(ModifyVipDto modifyVipDto);
 
 		VipInfoDetailVo findVipInfoDetail(Long id);
+
+
+	/**
+	 * 设置为推广员
+	 * @param invitationId
+	 */
+	public int setToBeAnSalesman(Long userId,Long invitationId,long gradeId);
+
+    SysVipInfo findByOpenId(String openId);
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/AchieveNewServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/AchieveNewServiceImpl.java
index c91af9b..40331bd 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/AchieveNewServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/AchieveNewServiceImpl.java
@@ -8,7 +8,10 @@
 import com.matrix.core.tools.StringUtils;
 import com.matrix.core.tools.WebUtil;
 import com.matrix.system.app.vo.UserAchieveVo;
+import com.matrix.system.common.bean.BusParameterSettings;
 import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.common.constance.AppConstance;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
 import com.matrix.system.common.dao.SysUsersDao;
 import com.matrix.system.constance.Dictionary;
 import com.matrix.system.hive.bean.*;
@@ -190,12 +193,13 @@
                 achieveNew.setProjPercentage(Double.parseDouble(beauticianState.getExtract()));
             }
             if (isFirst && beauticianState.getEndTime() != null && beauticianState.getBeginTime() != null) {
-                long timeSpace = beauticianState.getEndTime().getTime() - beauticianState.getBeginTime().getTime();
-                if (timeSpace > 0) {
-                    achieveNew.setProjTime((int) (timeSpace / 1000 / 60));
-                } else {
-                    achieveNew.setProjTime(1);
-                }
+//                long timeSpace = beauticianState.getEndTime().getTime() - beauticianState.getBeginTime().getTime();
+//                if (timeSpace > 0) {
+//                    achieveNew.setProjTime((int) (timeSpace / 1000 / 60));
+//                } else {
+//                    achieveNew.setProjTime(1);
+//                }
+                achieveNew.setProjTime(beauticianState.getExcTime());
                 isFirst = false;
             }
             achieveNewList.add(achieveNew);
@@ -213,10 +217,10 @@
         if (CollectionUtils.isNotEmpty(pageOrder.getItems())) {
             for (SysOrderItem orderItem : pageOrder.getItems()) {
 
-                if (orderItem != null && CollectionUtils.isNotEmpty(orderItem.getAchaeveList())) {
+                if (orderItem != null && CollectionUtils.isNotEmpty(orderItem.getAchieveList())) {
 
-                    for (AchieveNew achieveNew : orderItem.getAchaeveList()) {
-                        if (achieveNew !=null   && achieveNew.getT1()!=null) {
+                    for (AchieveNew achieveNew : orderItem.getAchieveList()) {
+                        if (achieveNew !=null   && achieveNew.getGoodsCash()!=null) {
                             buildAchieve(pageOrder,  orderItem, achieveNew);
                             // 新增美疗师业绩
                             achieveNewList.add(achieveNew);
@@ -232,12 +236,15 @@
 
     @Autowired
     ShoppingGoodsDao shoppingGoodsDao;
+    @Autowired
+    BusParameterSettingsDao busParameterSettingsDao;
 
     private void buildAchieve(SysOrder pageOrder, SysOrderItem orderItem, AchieveNew achieveNew) {
+        BusParameterSettings shopManageJjcpasConsume =null;
         if (Dictionary.ORDER_STATU_TK.equals(pageOrder.getStatu())) {
             achieveNew.setId(null);
             achieveNew.setProjPercentage(0 - achieveNew.getProjPercentage());
-            achieveNew.setT1((0 - Double.parseDouble(achieveNew.getT1())) + "");
+            achieveNew.setGoodsCash(0 - achieveNew.getGoodsCash());
         }
 
         achieveNew.setVipId(pageOrder.getVipId());
@@ -248,6 +255,18 @@
         } else {
             achieveNew.setDatatime(new Date());
         }
+        if(Dictionary.SHOPPING_GOODS_TYPE_JJCP.equals(orderItem.getShoppingGoods().getGoodType())){
+            if(shopManageJjcpasConsume==null){
+                shopManageJjcpasConsume = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.SHOP_MANAGE_JJCPAS_CONSUME, pageOrder.getCompanyId());
+            }
+            if(AppConstance.IS_Y.equals(shopManageJjcpasConsume.getParamValue())){
+                achieveNew.setHisConsume(achieveNew.getGoodsCash());
+            }
+
+        }
+
+
+
         achieveNew.setOrderType(Dictionary.ORDER_TYPE_SEAL);
         achieveNew.setOrderId(pageOrder.getId());
         achieveNew.setOrderItemId(orderItem.getId());
@@ -256,14 +275,6 @@
         achieveNew.setShoppingGoodsId(orderItem.getGoodsId());
         // 是否赠送
         achieveNew.setT2(orderItem.getIsFree());
-        // 根据商品类型设置业绩类型
-
-        if (Dictionary.ACHIEVE_TYPE_CASH.equals(achieveNew.getT3())){
-            achieveNew.setCardCash(Double.parseDouble(achieveNew.getT1()));
-        } else {
-            // 设置划扣金额
-            achieveNew.setConsume(Double.parseDouble(achieveNew.getT1()));
-        }
     }
 
     @Override
@@ -309,17 +320,17 @@
             // 本日
             case 1 :
                 break;
-                // 昨日
+            // 昨日
             case 2:
                 startTime = DateUtil.previousNDate(startTime, 1);
                 endTime = startTime;
                 break;
-                // 本月
+            // 本月
             case 3:
                 calendar.set(Calendar.DAY_OF_MONTH, 1);
                 startTime = calendar.getTime();
                 break;
-                // 上月
+            // 上月
             case 4:
                 calendar.add(Calendar.MONTH, -1);
                 calendar.set(Calendar.DAY_OF_MONTH, 1);
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/CodeServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/CodeServiceImpl.java
index 8d7277f..77c291c 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/CodeServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/CodeServiceImpl.java
@@ -9,9 +9,9 @@
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.util.Random;
 
 
- 
 /**
  *
  * 
@@ -96,7 +96,29 @@
 	}
 
 	@Override
+	public String get32LenNumberCode(){
+		DateFormat fmt = new SimpleDateFormat("yyyyMMddHHmmss");
+		Date date=new Date();
+
+		String str = "0123456789";
+		Random random = new Random();
+		StringBuilder sb = new StringBuilder();
+		for (int i = 0; i < 18; i++) {
+			int number = random.nextInt(str.length());
+			sb.append(str.charAt(number));
+		}
+		return fmt.format(date)+sb.toString();
+	}
+
+
+
+	@Override
 	public String getFlowCode() {
 		return "F" + getNowTimeString();
 	}
+
+	@Override
+	public String getCodeByTyle(String typeName) {
+		return typeName+getNowTimeString()+ StringUtils.getRandomString(4);
+	}
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
index bc32f12..93362f4 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
@@ -5,6 +5,7 @@
 import com.matrix.core.exception.GlobleException;
 import com.matrix.core.pojo.PaginationVO;
 import com.matrix.core.tools.DateUtil;
+import com.matrix.core.tools.LogUtil;
 import com.matrix.core.tools.StringUtils;
 import com.matrix.core.tools.WebUtil;
 import com.matrix.system.app.dto.OrderListDto;
@@ -13,7 +14,9 @@
 import com.matrix.system.app.vo.OrderDetailItemVo;
 import com.matrix.system.app.vo.OrderDetailVo;
 import com.matrix.system.app.vo.RankingVo;
+import com.matrix.system.common.bean.BusParameterSettings;
 import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.common.constance.AppConstance;
 import com.matrix.system.common.dao.BusParameterSettingsDao;
 import com.matrix.system.common.dao.SysUsersDao;
 import com.matrix.system.constance.Dictionary;
@@ -25,6 +28,9 @@
 import com.matrix.system.hive.pojo.ShoppingCarItem;
 import com.matrix.system.hive.pojo.ShoppingCarItemsVo;
 import com.matrix.system.hive.service.*;
+import com.matrix.system.score.constant.ScoreSettingConstant;
+import com.matrix.system.score.entity.ScoreVipDetail;
+import com.matrix.system.score.service.ScoreVipDetailService;
 import com.matrix.system.shopXcx.mqTask.MQTaskRouting;
 import com.matrix.system.wechart.templateMsg.UniformMsgParam;
 import org.springframework.beans.BeanUtils;
@@ -35,6 +41,7 @@
 
 import javax.servlet.http.HttpSession;
 import javax.validation.constraints.NotEmpty;
+import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -63,7 +70,11 @@
     @Autowired
     MoneyCardUseFlowDao moneyCardUseFlowDao;
 
+    @Autowired
+    ScoreVipDetailService scoreVipDetailService;
 
+    @Autowired
+    BusParameterSettingsDao busParameterSettingsDao;
     @Autowired
     SysVipLevelDao sysVipLevelDao;
 
@@ -110,6 +121,8 @@
     @Autowired
     private SysInstoreInfoService sysInstoreInfoService;
 
+    @Autowired
+    BusParameterSettingsDao parameterSettingsDao;
 
     @Value("${evn}")
     private String evn;
@@ -176,11 +189,6 @@
 
     @Override
     public SysOrder checkAndSaveOrder(SysOrder sysOrder) {
-        // 收款改变订单状态
-        SysOrder source = null;
-        if (sysOrder.getId() != null) {
-            source = sysOrderDao.selectById(sysOrder.getId());
-        }
 
         // 计算订单折扣金额,收款情况下 计算订单总额
         double zkTotal = 0.0;
@@ -217,6 +225,10 @@
         SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
         sysOrder.setZkTotal(zkTotal);
         sysOrder.setStatu(orderStatus);
+        SysOrder source = null;
+        if (sysOrder.getId() != null) {
+            source = sysOrderDao.selectById(sysOrder.getId());
+        }
         sysOrder.setStaffId(source != null ? source.getStaffId() : user.getSuId());
         sysOrder.setCompanyId(source != null ? source.getCompanyId() : user.getCompanyId());
 
@@ -252,8 +264,6 @@
 
     /**
      * 取消订单
-     * 本方法无法退回多次不同卡项收款的订单
-     *
      * @param id
      * @return
      */
@@ -281,23 +291,22 @@
                 throw new GlobleException("订单已取消");
             }
 
-            List<SysOrderItem> sysOrderItems = orderItemDao.selectByOrderId(id);
+            List<SysOrderFlow> flows = sysOrderFlowDao.selectByOrderId(id);
+            // 非现金收款退回扣卡余额
+            for (SysOrderFlow flow : flows) {
+                if (SysOrderFlow.PAY_METHOD_CARD.equals(flow.getPayMethod())) {
 
-            for (SysOrderItem orderItem : sysOrderItems) {
-
-                //非现金收款退回扣卡余额
-                if (StringUtils.isNotBlank(orderItem.getPayMethodDetail())) {
-
-                    MoneyCardUse moneyCardUse = moneyCardUseDao.selectById(Long.parseLong(orderItem.getPayMethodDetail()));
+                    MoneyCardUse moneyCardUse = moneyCardUseDao.selectById(flow.getCardId());
                     MoneyCardUseFlow moneyCardUseFlow = new MoneyCardUseFlow();
 
                     if (moneyCardUse != null) {
-
                         // 根据订单明细判断是赠送金额购买还是本金购买
-
-                        moneyCardUseFlow.setTotal(orderItem.getCardPay());
-                        moneyCardUse.setRealMoney(MoneyUtil.add(moneyCardUse.getRealMoney(), orderItem.getCardPay()));
-                        //TODO 目前无法退回到具体的赠送金额还是本金
+                        moneyCardUseFlow.setTotal(flow.getAmount().doubleValue());
+                        if (SysOrderFlow.IS_GIFT_Y.equals(flow.getIsGift())) {
+                            moneyCardUse.setGiftMoney(MoneyUtil.add(moneyCardUse.getGiftMoney(), flow.getAmount().doubleValue()));
+                        } else {
+                            moneyCardUse.setRealMoney(MoneyUtil.add(moneyCardUse.getRealMoney(), flow.getAmount().doubleValue()));
+                        }
 
                         if (!moneyCardUse.getIsVipCar().equals(Dictionary.FLAG_YES_Y)) {
                             if (moneyCardUse.getLastCount() != null) {
@@ -319,29 +328,26 @@
                         moneyCardUseFlowDao.insert(moneyCardUseFlow);
                     }
                 }
+            }
+
+            List<SysOrderItem> sysOrderItems = orderItemDao.selectByOrderId(id);
+            for (SysOrderItem orderItem : sysOrderItems) {
                 // 充值卡类型退款
                 if (Dictionary.SHOPPING_GOODS_TYPE_CZK.equals(orderItem.getType())) {
-
                     ShoppingGoods shoppingGoods = shoppingGoodsDao.selectById(orderItem.getGoodsId());
-
-
                     //删除购买的充值卡
                     moneyCardUseDao.deleteByOrderItemId(orderItem.getId());
-
                 } else if (Dictionary.SHOPPING_GOODS_TYPE_XM.equals(orderItem.getType())
                         || Dictionary.SHOPPING_GOODS_TYPE_TC.equals(orderItem.getType())) {
                     // 项目套餐退款
                     // 删除套餐项目使用情况
                     sysProjUseDao.deleteByOrderItemId(orderItem.getId());
-
-
                 } else if (Dictionary.SHOPPING_GOODS_TYPE_ZHK.equals(orderItem.getType())) {
                     // 综合卡
                     // 删除套餐项目使用情况
                     sysProjUseDao.deleteByOrderItemId(orderItem.getId());
                     // 删除充值卡
                     moneyCardUseDao.deleteByOrderItemId(orderItem.getId());
-
                 }
             }
 
@@ -369,10 +375,11 @@
             // 删除收款记录
             sysOrderFlowDao.deleteByOrderId(id);
 
+            //删除积分
+            scoreVipDetailService.removeByBusinessId(order.getVipId(), order.getId());
+
             // 取消订单
             order.setStatu(Dictionary.ORDER_STATU_YQX);
-
-
             return sysOrderDao.update(order);
         }
 
@@ -490,6 +497,10 @@
         if (!Dictionary.ORDER_STATU_DFK.equals(pageOrder.getStatu())) {
             throw new GlobleException("该订单已经收过款,请刷新页面再试!");
         }
+        // 更新收款时间
+        pageOrder.setPayTime(new Date());
+        pageOrder.setStatu(Dictionary.ORDER_STATU_YFK);
+        sysOrderDao.update(pageOrder);
 
         // 获取用户信息
         SysVipInfo vipInfo = sysVipInfoDao.selectById(pageOrder.getVipId());
@@ -499,8 +510,8 @@
             sysVipInfoDao.update(vipInfo);
         }
 
-        //设置订单的成交状态
-        changeOrderStatu(pageOrder);
+        //添加支付流水
+        addOrderFlow(pageOrder);
 
         // 设置会员充值卡使用情况
         addMoneyCardUse(pageOrder);
@@ -516,81 +527,195 @@
 
         setShopSelCount(pageOrder);
 
+        //设置会员积分
+        addVipScore(pageOrder);
+
     }
 
     /**
-     * 收款改变订单状态,划扣金额
+     * 设置会员消费积分
+     * @param pageOrder
+     */
+    private void addVipScore(SysOrder pageOrder) {
+
+        SysVipInfo vipInfo=sysVipInfoDao.selectById(pageOrder.getVipId());
+
+        List<SysOrderFlow> flows = pageOrder.getFlows();
+        int [] cashScore={0,0,0};
+        //现金支付金额
+        BigDecimal cashPayAmount=flows.stream()
+                .filter(item->(!item.getPayMethod().equals("储值卡"))&&(!item.getPayMethod().equals("欠款")))
+                .map(SysOrderFlow::getAmount).reduce(BigDecimal.ZERO,BigDecimal::add);
+        BusParameterSettings cashConsumption = busParameterSettingsDao.selectCompanyParamByCode(ScoreSettingConstant.CASH_CONSUMPTION, vipInfo.getCompanyId());
+        if(cashPayAmount!=null
+                &&cashPayAmount.compareTo(BigDecimal.ZERO)>0
+                &&StringUtils.isNotBlank(cashConsumption.getParamValue())){
+
+            BigDecimal scoreSetting0 = new BigDecimal(cashConsumption.getParamValue());
+            cashScore[0]= cashPayAmount.divide(scoreSetting0).intValue();
+
+            if(StringUtils.isNotBlank(cashConsumption.getParamValue1())){
+                BigDecimal scoreSetting1 = new BigDecimal(cashConsumption.getParamValue1());
+                cashScore[1]= cashPayAmount.divide(scoreSetting1).intValue();
+            }
+
+            if(StringUtils.isNotBlank(cashConsumption.getParamValue2())){
+                BigDecimal scoreSetting2 = new BigDecimal(cashConsumption.getParamValue2());
+                cashScore[2]= cashPayAmount.divide(scoreSetting2).intValue();
+            }
+        }
+
+        int [] cardScore={0,0,0};
+        //储值卡本金支付金额
+        BigDecimal cardPayAmount=flows.stream()
+                .filter(item->item.getPayMethod().equals("储值卡")&&item.getIsGift().equals("N"))
+                .map(SysOrderFlow::getAmount).reduce(BigDecimal.ZERO,BigDecimal::add);
+
+        BusParameterSettings principalBalanceConsumption = busParameterSettingsDao.selectCompanyParamByCode(ScoreSettingConstant.PRINCIPAL_BALANCE_CONSUMPTION, vipInfo.getCompanyId());
+        if(cardPayAmount!=null
+                &&cardPayAmount.compareTo(BigDecimal.ZERO)>0
+                &&StringUtils.isNotBlank(principalBalanceConsumption.getParamValue())){
+
+            BigDecimal scoreSetting0 = new BigDecimal(principalBalanceConsumption.getParamValue());
+            cardScore[0]= cardPayAmount.divide(scoreSetting0).intValue();
+
+            if(StringUtils.isNotBlank(principalBalanceConsumption.getParamValue1())){
+                BigDecimal scoreSetting1 = new BigDecimal(principalBalanceConsumption.getParamValue1());
+                cardScore[1]= cardPayAmount.divide(scoreSetting1).intValue();
+            }
+
+            if(StringUtils.isNotBlank(principalBalanceConsumption.getParamValue2())){
+                BigDecimal scoreSetting2 = new BigDecimal(principalBalanceConsumption.getParamValue2());
+                cardScore[2]= cardPayAmount.divide(scoreSetting2).intValue();
+            }
+        }
+
+        int [] giftScore={0,0,0};
+        //储值卡本赠送付金额
+        BigDecimal giftPayAmount=flows.stream()
+                .filter(item->item.getPayMethod().equals("储值卡")&&item.getIsGift().equals("Y"))
+                .map(SysOrderFlow::getAmount).reduce(BigDecimal.ZERO,BigDecimal::add);
+        BusParameterSettings bonusBalanceConsumption = busParameterSettingsDao.selectCompanyParamByCode(ScoreSettingConstant.BONUS_BALANCE_CONSUMPTION, vipInfo.getCompanyId());
+        if(giftPayAmount!=null
+                &&giftPayAmount.compareTo(BigDecimal.ZERO)>0
+                &&StringUtils.isNotBlank(bonusBalanceConsumption.getParamValue())){
+
+            BigDecimal scoreSetting0 = new BigDecimal(bonusBalanceConsumption.getParamValue());
+            giftScore[0]= giftPayAmount.divide(scoreSetting0).intValue();
+
+            if(StringUtils.isNotBlank(bonusBalanceConsumption.getParamValue1())){
+                BigDecimal scoreSetting1 = new BigDecimal(bonusBalanceConsumption.getParamValue1());
+                giftScore[1]= giftPayAmount.divide(scoreSetting1).intValue();
+            }
+
+            if(StringUtils.isNotBlank(bonusBalanceConsumption.getParamValue2())){
+                BigDecimal scoreSetting2 = new BigDecimal(bonusBalanceConsumption.getParamValue2());
+                giftScore[2]= giftPayAmount.divide(scoreSetting2).intValue();
+            }
+        }
+
+        int selfScore=cashScore[0]+cardScore[0]+giftScore[0];
+        int parentScore=cashScore[1]+cardScore[1]+giftScore[1];
+        int topParentScore=cashScore[2]+cardScore[2]+giftScore[2];
+
+
+        //添加自己的积分
+        if(selfScore>0){
+                scoreVipDetailService.addScore(
+                        vipInfo.getId(),
+                        pageOrder.getStaffId(),
+                        pageOrder.getShopId(),
+                        selfScore,
+                        pageOrder.getId(),
+                        ScoreVipDetail.SCORE_VIP_TYPE_CASH,
+                        "消费奖励"
+                );
+        }
+
+        if(vipInfo.getRecommendId()!=null){
+            //推荐注册老带新积分奖励
+            SysVipInfo referrerVip = sysVipInfoDao.selectById(vipInfo.getRecommendId());
+            if(parentScore>0){
+                scoreVipDetailService.addScore(
+                        referrerVip.getId(),
+                        pageOrder.getStaffId(),
+                        pageOrder.getShopId(),
+                        parentScore,
+                        pageOrder.getId(),
+                        ScoreVipDetail.SCORE_VIP_TYPE_CASH,
+                        "推荐消费奖励"
+                );
+            }
+            //推荐注册二级带新积分奖励
+            if(referrerVip.getRecommendId()!=null){
+                SysVipInfo topVipInfo = sysVipInfoDao.selectById(referrerVip.getRecommendId());
+                if(topParentScore>0){
+                    scoreVipDetailService.addScore(
+                            topVipInfo.getId(),
+                            pageOrder.getStaffId(),
+                            pageOrder.getShopId(),
+                            topParentScore,
+                            pageOrder.getId(),
+                            ScoreVipDetail.SCORE_VIP_TYPE_CASH,
+                            "推荐消费奖励"
+                    );
+                }
+            }
+        }
+    }
+
+    /**
+     * 创建支付流水
      *
      * @author:姜友瑶
      */
-    private void changeOrderStatu(SysOrder sourceOrder) {
+    private void addOrderFlow(SysOrder sourceOrder) {
 
-        String orderStatus = Dictionary.ORDER_STATU_YFK;
-        String flowType = SysOrderFlow.FLOW_TYPE_BUY;
-        double cashPayTotal = 0D;
-        double cardPayTotal = 0D;
 
         //处理支付流水
         int flowCount = 1;
         for (SysOrderFlow flow : sourceOrder.getFlows()) {
-
             //支付内容摘要设置
             Long goodsId = sourceOrder.getItems().get(0).getGoodsId();
             ShoppingGoods goods = shoppingGoodsDao.selectById(goodsId);
             flow.setFlowContent(goods.getName() + "等" + sourceOrder.getItems().size() + "件产品");
-
             // 若是退款,则取负数
-            if (Dictionary.ORDER_STATU_TK.equals(sourceOrder.getStatu())) {
-                flowType = SysOrderFlow.FLOW_TYPE_REFUND;
+            if (SysOrder.ORDER_TYPE_REFUND== sourceOrder.getOrderType()) {
+                flow.setFlowType(SysOrderFlow.FLOW_TYPE_REFUND);
                 flow.setAmount(flow.getAmount().negate());
                 flow.setOrderId(sourceOrder.getOldOrderId());
             } else {
+                flow.setFlowType(SysOrderFlow.FLOW_TYPE_BUY);
                 flow.setOrderId(sourceOrder.getId());
             }
 
             //欠款处理
             if (SysOrderFlow.PAY_METHOD_ARREARS.equals(flow.getPayMethod())) {
-                orderStatus = Dictionary.ORDER_STATU_QK;
+                sourceOrder.setStatu(Dictionary.ORDER_STATU_QK);
                 sourceOrder.setArrears(flow.getAmount().doubleValue());
+                sysOrderDao.update(sourceOrder);
             }
 
             //统计储值卡支付
             if (SysOrderFlow.PAY_METHOD_CARD.equals(flow.getPayMethod())) {
                 if (flow.getCardId() != null) {
                     MoneyCardUse moneyCardUse = moneyCardUseDao.selectById(flow.getCardId());
-                    cardPayTotal += flow.getAmount().doubleValue();
-
                     //修改储值卡余额
                     cardPaySk(moneyCardUse, sourceOrder, flow);
                 }else{
                     throw new GlobleException("无效的储值卡支付方式");
                 }
             }
-            //统计现金支付
-            if (!SysOrderFlow.PAY_METHOD_ARREARS.equals(flow.getPayMethod())
-                    && !SysOrderFlow.PAY_METHOD_CARD.equals(flow.getPayMethod())) {
-                cashPayTotal += flow.getAmount().doubleValue();
-            }
 
             flow.setFlowNo(codeService.getFlowCode() + "-" + flowCount);
             flow.setVipId(sourceOrder.getVipId());
-            flow.setFlowType(flowType);
             flow.setShopId(sourceOrder.getShopId());
             flow.setCompanyId(sourceOrder.getCompanyId());
             sysOrderFlowDao.insert(flow);
             flowCount++;
         }
 
-        //修改订单信息
-        if (Dictionary.ORDER_STATU_TK.equals(sourceOrder.getStatu())) {
-            orderStatus = Dictionary.ORDER_STATU_TK;
-        }
-        // 更新收款状态
-        sourceOrder.setPayTime(new Date());
-        sourceOrder.setStatu(orderStatus);
-        sourceOrder.setCardPay(cardPayTotal);
-        sourceOrder.setCashPay(cashPayTotal);
-        sysOrderDao.update(sourceOrder);
+
 
     }
 
@@ -863,8 +988,6 @@
     }
 
 
-    @Autowired
-    BusParameterSettingsDao parameterSettingsDao;
 
     /**
      * @param order 新增出库单并更新本店库存
@@ -874,103 +997,110 @@
     @Override
     public void addOutStore(SysOrder order) {
 
-        List<SysOutStoreItem> storeItemList = new ArrayList<>();
+        BusParameterSettings manageStockSetting = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WAREHOUSE_MANAGE_STOCK, order.getCompanyId());
+        if(AppConstance.IS_Y.equals(manageStockSetting.getParamValue())){
 
-        for (SysOrderItem sysOrderItem : order.getItems()) {
+            List<SysOutStoreItem> storeItemList = new ArrayList<>();
 
-            if (ShoppingGoods.SHOPPING_GOODS_TYPE_JJCP.equals(sysOrderItem.getType())) {
+            for (SysOrderItem sysOrderItem : order.getItems()) {
 
-                SysOutStoreItem storeItem = new SysOutStoreItem();
-                storeItem.setSkuId(sysOrderItem.getGoodsId());
-                storeItem.setAmount(Double.valueOf(sysOrderItem.getCount()));
-                storeItemList.add(storeItem);
+                if (ShoppingGoods.SHOPPING_GOODS_TYPE_JJCP.equals(sysOrderItem.getType())) {
 
-            } else if (ShoppingGoods.SHOPPING_GOODS_TYPE_TC.equals(sysOrderItem.getType())
+                    SysOutStoreItem storeItem = new SysOutStoreItem();
+                    storeItem.setSkuId(sysOrderItem.getGoodsId());
+                    storeItem.setAmount(Double.valueOf(sysOrderItem.getCount()));
+                    storeItemList.add(storeItem);
 
-                    || ShoppingGoods.SHOPPING_GOODS_TYPE_ZHK.equals(sysOrderItem.getType())) {
+                } else if (ShoppingGoods.SHOPPING_GOODS_TYPE_TC.equals(sysOrderItem.getType())
 
-                List<ShoppingGoodsAssemble> goodsList = new ArrayList<>();
+                        || ShoppingGoods.SHOPPING_GOODS_TYPE_ZHK.equals(sysOrderItem.getType())) {
 
-                goodsList.addAll(shoppingGoodsAssembleDao.selectGoodsByShoppingGoodsIdAndType(sysOrderItem.getGoodsId(), ShoppingGoods.SHOPPING_GOODS_TYPE_JJCP));
+                    List<ShoppingGoodsAssemble> goodsList = new ArrayList<>();
 
-                if (ShoppingGoods.SHOPPING_GOODS_TYPE_ZHK.equals(sysOrderItem.getType())) {
-                    //综合卡处理,中的套餐,中的家居产品
-                    List<ShoppingGoodsAssemble> zhkAssemble = shoppingGoodsAssembleDao.selectGoodsByShoppingGoodsIdAndType(sysOrderItem.getGoodsId(), ShoppingGoods.SHOPPING_GOODS_TYPE_TC);
-                    zhkAssemble.forEach(item -> {
-                        goodsList.addAll(shoppingGoodsAssembleDao.selectGoodsByShoppingGoodsIdAndType(item.getAssembleGoodId(), ShoppingGoods.SHOPPING_GOODS_TYPE_JJCP));
+                    goodsList.addAll(shoppingGoodsAssembleDao.selectGoodsByShoppingGoodsIdAndType(sysOrderItem.getGoodsId(), ShoppingGoods.SHOPPING_GOODS_TYPE_JJCP));
+
+                    if (ShoppingGoods.SHOPPING_GOODS_TYPE_ZHK.equals(sysOrderItem.getType())) {
+                        //综合卡处理,中的套餐,中的家居产品
+                        List<ShoppingGoodsAssemble> zhkAssemble = shoppingGoodsAssembleDao.selectGoodsByShoppingGoodsIdAndType(sysOrderItem.getGoodsId(), ShoppingGoods.SHOPPING_GOODS_TYPE_TC);
+                        zhkAssemble.forEach(item -> {
+                            goodsList.addAll(shoppingGoodsAssembleDao.selectGoodsByShoppingGoodsIdAndType(item.getAssembleGoodId(), ShoppingGoods.SHOPPING_GOODS_TYPE_JJCP));
+                        });
+                    }
+
+                    goodsList.forEach(item -> {
+                        SysOutStoreItem storeItem = new SysOutStoreItem();
+                        storeItem.setSkuId(item.getAssembleGoodId());
+                        storeItem.setAmount(Double.valueOf(item.getTotal()));
+                        storeItemList.add(storeItem);
                     });
                 }
-
-                goodsList.forEach(item -> {
-                    SysOutStoreItem storeItem = new SysOutStoreItem();
-                    storeItem.setSkuId(item.getAssembleGoodId());
-                    storeItem.setAmount(Double.valueOf(item.getTotal()));
-                    storeItemList.add(storeItem);
-                });
             }
-        }
 
-        if (CollectionUtils.isNotEmpty(storeItemList)) {
-            Long warehouseId = warehouseDao.findShopWarehouse(order.getShopId()).get(0).getId();
-            SysOutStore outStore = new SysOutStore();
-            outStore.setOutStoreNo(codeService.getOutStoreCode());
-            outStore.setOrderId(order.getId());
-            outStore.setShopId(order.getShopId());
-            outStore.setShopId(order.getShopId());
-            outStore.setStaffId(order.getStaffId());
-            outStore.setType(Dictionary.OUT_STORE_JJCPCK);
-            outStore.setServiceNo(order.getOrderNo());
-            outStore.setTime(new Date());
-            outStore.setCheckStatus(Dictionary.CHECK_STATUS_DSH);
-            outStore.setCompanyId(order.getCompanyId());
-            sysOutStoreDao.insert(outStore);
+            if (CollectionUtils.isNotEmpty(storeItemList)) {
+                Long warehouseId = warehouseDao.findShopWarehouse(order.getShopId()).get(0).getId();
+                SysOutStore outStore = new SysOutStore();
+                outStore.setOutStoreNo(codeService.getOutStoreCode());
+                outStore.setOrderId(order.getId());
+                outStore.setShopId(order.getShopId());
+                outStore.setShopId(order.getShopId());
+                outStore.setStaffId(order.getStaffId());
+                outStore.setType(Dictionary.OUT_STORE_JJCPCK);
+                outStore.setServiceNo(order.getOrderNo());
+                outStore.setTime(new Date());
+                outStore.setCheckStatus(Dictionary.CHECK_STATUS_DSH);
+                outStore.setCompanyId(order.getCompanyId());
+                sysOutStoreDao.insert(outStore);
 
-            //出库明细,根据批次维度定义
-            List<SysOutStoreItem> realOutStoreItemList = new ArrayList<>();
+                //出库明细,根据批次维度定义
+                List<SysOutStoreItem> realOutStoreItemList = new ArrayList<>();
 
-            storeItemList.forEach(outStoreItem -> {
+                storeItemList.forEach(outStoreItem -> {
 
-                //设置出库主键
-                outStoreItem.setOutStoreId(outStore.getId());
+                    //设置出库主键
+                    outStoreItem.setOutStoreId(outStore.getId());
 
-                //计算库存总数是否满足本次扣减的需求
-                List<SysStoreInfo> stores = storeInfoDao.selectStoInfoBySku(outStoreItem.getSkuId(), warehouseId);
-                double sum = stores.stream().mapToDouble(item -> item.getStoreTotal()).sum();
-                if (sum < outStoreItem.getAmount()) {
-                    ShoppingGoods sysGoods = shoppingGoodsDao.selectById(outStoreItem.getSkuId());
-                    if (sysGoods != null) {
-                        throw new GlobleException("出库失败:【" + sysGoods.getName() + "库存不足】");
+                    //计算库存总数是否满足本次扣减的需求
+                    List<SysStoreInfo> stores = storeInfoDao.selectStoInfoBySku(outStoreItem.getSkuId(), warehouseId);
+                    double sum = stores.stream().mapToDouble(item -> item.getStoreTotal()).sum();
+                    if (sum < outStoreItem.getAmount()) {
+                        ShoppingGoods sysGoods = shoppingGoodsDao.selectById(outStoreItem.getSkuId());
+                        if (sysGoods != null) {
+                            throw new GlobleException("出库失败:【" + sysGoods.getName() + "库存不足】");
 
-                    } else {
-                        throw new GlobleException("出库失败没有找到出库产品");
+                        } else {
+                            throw new GlobleException("出库失败没有找到出库产品");
+                        }
                     }
-                }
 
-                //循环获取所有批次产品,并扣减库存
-                Double number = outStoreItem.getAmount();
-                for (SysStoreInfo storeInfo : stores) {
-                    Double oldStoreTotal = storeInfo.getStoreTotal();
-                    Double surplus = storeInfo.getStoreTotal() - number;
-                    //更新库存
-                    storeInfo.setStoreTotal(surplus < 0 ? 0 : surplus);
+                    //循环获取所有批次产品,并扣减库存
+                    Double number = outStoreItem.getAmount();
+                    for (SysStoreInfo storeInfo : stores) {
+                        Double oldStoreTotal = storeInfo.getStoreTotal();
+                        Double surplus = storeInfo.getStoreTotal() - number;
+                        //更新库存
+                        storeInfo.setStoreTotal(surplus < 0 ? 0 : surplus);
 
-                    //每次扣减库存都创建一个出库记录
-                    SysOutStoreItem sysOutStoreItem = new SysOutStoreItem();
-                    BeanUtils.copyProperties(outStoreItem, sysOutStoreItem);
-                    sysOutStoreItem.setStoreId(storeInfo.getId());
-                    sysOutStoreItem.setAmount(oldStoreTotal - storeInfo.getStoreTotal());
-                    realOutStoreItemList.add(sysOutStoreItem);
+                        //每次扣减库存都创建一个出库记录
+                        SysOutStoreItem sysOutStoreItem = new SysOutStoreItem();
+                        BeanUtils.copyProperties(outStoreItem, sysOutStoreItem);
+                        sysOutStoreItem.setStoreId(storeInfo.getId());
+                        sysOutStoreItem.setAmount(oldStoreTotal - storeInfo.getStoreTotal());
+                        realOutStoreItemList.add(sysOutStoreItem);
 
-                    storeInfoDao.update(storeInfo);
-                    //扣除后剩余库存大于0则跳出扣除,否则剩余数量的负数的绝对值就是再次扣减的数量
-                    if (surplus > 0) {
-                        break;
-                    } else {
-                        number = Math.abs(surplus);
+                        storeInfoDao.update(storeInfo);
+                        //扣除后剩余库存大于0则跳出扣除,否则剩余数量的负数的绝对值就是再次扣减的数量
+                        if (surplus > 0) {
+                            break;
+                        } else {
+                            number = Math.abs(surplus);
+                        }
                     }
-                }
-            });
-            sysOutStoreItemDao.batchInsert(realOutStoreItemList);
+                });
+                sysOutStoreItemDao.batchInsert(realOutStoreItemList);
+            }
+
+        }else{
+            LogUtil.debug("不管理库存");
         }
 
 
@@ -1201,6 +1331,7 @@
         order.setRemark(cardUser.getCardName());
         order.setStaffId(user.getSuId());
         order.setIsCross(2 + "");
+        order.setOrderType(SysOrder.ORDER_TYPE_SEAL);
         order.setStatu(Dictionary.ORDER_STATU_YFK);
         order.setCompanyId(user.getCompanyId());
         sysOrderDao.insert(order);
@@ -1220,7 +1351,8 @@
         orderItem.setIsFree(Dictionary.FLAG_NO);
         orderItem.setPrice(czVo.getBjmoney());
         orderItem.setStatus(Dictionary.ORDER_STATU_YFK);
-        orderItem.setAchaeveList(czVo.getAchaeveList());
+        orderItem.setAchieveList(czVo.getAchaeveList());
+        orderItem.setShoppingGoods(shoppingGoods);
         orderItemDao.insert(orderItem);
         List<SysOrderItem> items = new ArrayList<>();
         items.add(orderItem);
@@ -1241,9 +1373,12 @@
         moneyCardUseFlowDao.insert(moneyCardUseFlow);
 
         order.setFlows(czVo.getFlows());
-        changeOrderStatu(order);
+
+        addOrderFlow(order);
+
         // 添加员工业绩
         achieveNewService.addAchaeveByOrder(order);
+
         return order;
 
     }
@@ -1291,37 +1426,174 @@
 
     @Transactional(rollbackFor = Exception.class)
     @Override
-    public void refundOrderMoney(SysOrder pageOrder) {
+    public void refundOrderMoney(SysOrder sysOrder) {
         SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
 
-        // 修改订单状态
-        changeOrderStatu(pageOrder);
+        //原订单设置为退款状态
+        SysOrder sourceOrder=new SysOrder();
+        sourceOrder.setId(sysOrder.getOldOrderId());
+        sourceOrder.setIsHasRefund(SysOrder.IS_HAS_REFUND_Y);
+//        sourceOrder.setStatu(Dictionary.ORDER_STATU_TK);
+        sysOrderDao.update(sourceOrder);
+        SysOrder oldOrder=sysOrderDao.selectById(   sysOrder.getOldOrderId());
 
-        List<SysOrderItem> returnItems = new ArrayList<>();
-        for (SysOrderItem item : pageOrder.getItems()) {
+        sysOrder.setId(null);
+        sysOrder.setStaffId(user.getSuId());
+        sysOrder.setCompanyId(user.getCompanyId());
+        sysOrder.setShopId(user.getShopId());
+        sysOrder.setOrderType(SysOrder.ORDER_TYPE_REFUND);
+        sysOrder.setStatu(Dictionary.ORDER_STATU_YFK);
+        Date now = new Date();
+        sysOrder.setOrderTime(now);
+        sysOrder.setPayTime(now);
+        sysOrder.setOrderNo(codeService.getRefundOrderNo());
+        sysOrder.setZkTotal(-sysOrder.getZkTotal());
+        //新增订单
+        sysOrderDao.insert(sysOrder);
+        //插入明细
+        for (SysOrderItem item : sysOrder.getItems()) {
+
+            //更新原订单明细的可退数量
+            SysOrderItem oldItem=new SysOrderItem();
+            oldItem.setId(item.getId());
+            oldItem.setRefundCount(item.getCount());
+            orderItemDao.update(oldItem);
+
+            //插入新的订单明细
+            item.setId(null);
+            item.setCount(-item.getCount());
+            item.setOrderId(sysOrder.getId());
+            orderItemDao.insert(item);
+        }
+
+
+        // 添加订单收款流水
+        addOrderFlow(sysOrder);
+        //退款退套餐退项目
+        refundProjUse(sysOrder);
+        //删除积分
+        scoreVipDetailService.removeByBusinessId(oldOrder.getVipId(), oldOrder.getId());
+
+        // 设置业绩
+        achieveNewService.addAchaeveByOrder(sysOrder);
+
+    }
+
+    private void addRefundOrderFlow(SysOrder sourceOrder) {
+        //处理支付流水
+        int flowCount = 1;
+        for (SysOrderFlow flow : sourceOrder.getFlows()) {
+            //支付内容摘要设置
+            Long goodsId = sourceOrder.getItems().get(0).getGoodsId();
+            ShoppingGoods goods = shoppingGoodsDao.selectById(goodsId);
+            flow.setFlowContent(goods.getName() + "等" + sourceOrder.getItems().size() + "件产品");
+            // 退款,则取负数
+            flow.setFlowType(SysOrderFlow.FLOW_TYPE_REFUND);
+            flow.setAmount(flow.getAmount().negate());
+            flow.setOrderId(sourceOrder.getOldOrderId());
+
+            //统计储值卡支付
+            if (SysOrderFlow.PAY_METHOD_CARD.equals(flow.getPayMethod())) {
+                if (flow.getCardId() != null) {
+                    MoneyCardUse moneyCardUse = moneyCardUseDao.selectById(flow.getCardId());
+                    //修改储值卡余额
+                    cardPaySk(moneyCardUse, sourceOrder, flow);
+                }else{
+                    throw new GlobleException("无效的储值卡支付方式");
+                }
+            }
+
+            flow.setFlowNo(codeService.getFlowCode() + "-" + flowCount);
+            flow.setVipId(sourceOrder.getVipId());
+            flow.setShopId(sourceOrder.getShopId());
+            flow.setCompanyId(sourceOrder.getCompanyId());
+            sysOrderFlowDao.insert(flow);
+            flowCount++;
+        }
+    }
+
+    private void refundCard(MoneyCardUse moneyCardUse, SysOrder sourceOrder, SysOrderFlow flow) {
+        SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
+
+        MoneyCardUseFlow moneyCardUseFlow = new MoneyCardUseFlow();
+        if (SysOrderFlow.IS_GIFT_Y.equals(flow.getIsGift())) {
+            if (moneyCardUse.getGiftMoney() >= flow.getAmount().doubleValue()) {
+                double surplus = MoneyUtil.sub(moneyCardUse.getGiftMoney(), flow.getAmount().doubleValue());
+                moneyCardUse.setGiftMoney(surplus);
+                moneyCardUseFlow.setGiftMoney(0D - flow.getAmount().doubleValue());
+            } else {
+                throw new GlobleException(moneyCardUse.getCardName() + "余额不足");
+            }
+        } else {
+            if (moneyCardUse.getRealMoney() >= flow.getAmount().doubleValue()) {
+                double surplus = MoneyUtil.sub(moneyCardUse.getRealMoney(), flow.getAmount().doubleValue());
+                moneyCardUse.setRealMoney(surplus);
+                moneyCardUseFlow.setTotal(0 - flow.getAmount().doubleValue());
+            } else {
+                throw new GlobleException(moneyCardUse.getCardName() + "余额不足");
+            }
+        }
+
+        if (moneyCardUse.getIsVipCar().equals(Dictionary.FLAG_NO_N)) {
+            //余额为0时充值卡变为无效
+            if (moneyCardUse.getRealMoney().equals(0D) && moneyCardUse.getGiftMoney().equals(0D)) {
+                moneyCardUse.setIsOver(Dictionary.FLAG_YES_Y);
+                moneyCardUse.setStatus(Dictionary.MONEYCARD_STATUS_WX);
+            }
+        }
+
+        ShoppingGoods shoppingGoods = shoppingGoodsService.findById(moneyCardUse.getGoodsId());
+        if (shoppingGoods != null) {
+            Date invalidTime = shoppingGoodsService.calInvalidTime(shoppingGoods, 2, moneyCardUse.getFailTime());
+            moneyCardUse.setFailTime(invalidTime);
+        }
+        // 更新充值卡信息
+        moneyCardUseDao.update(moneyCardUse);
+        //设置卡项使用流水
+        moneyCardUseFlow.setCarUseId(moneyCardUse.getId());
+        moneyCardUseFlow.setOrderNo(sourceOrder.getOrderNo());
+        moneyCardUseFlow.setVipId(sourceOrder.getVipId());
+        moneyCardUseFlow.setTimes(-1);
+        moneyCardUseFlow.setType(MoneyCardUseFlow.USE_TYPE_CONSUMER);
+        moneyCardUseFlow.setCreateTime(new Date());
+        moneyCardUseFlow.setOperationId(user.getSuId());
+        moneyCardUseFlow.setBalance(moneyCardUse.getGiftMoney() + moneyCardUse.getRealMoney());
+        moneyCardUseFlowDao.insert(moneyCardUseFlow);
+    }
+
+    /**
+     * 退款退项目,套餐,卡项
+     * @param sysOrder
+     */
+    private void refundProjUse(SysOrder sysOrder) {
+        SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+
+        //记录需要退库存的产品
+        List<SysOrderItem> returnGoodsList = new ArrayList<>();
+
+        for (SysOrderItem item : sysOrder.getItems()) {
 
             SysProjUse queryProjUse = new SysProjUse();
-            queryProjUse.setIsOver(Dictionary.FLAG_NO_N);
-            queryProjUse.setStatus(Dictionary.TAOCAN_STATUS_YX);
             queryProjUse.setOrderItemId(item.getOldItemId());
             // 修改项目信息
             if (Dictionary.SHOPPING_GOODS_TYPE_XM.equals(item.getType()) || Dictionary.SHOPPING_GOODS_TYPE_JJCP.equals(item.getType())) {
 
                 if (Dictionary.SHOPPING_GOODS_TYPE_JJCP.equals(item.getType())) {
                     if (Dictionary.FLAG_YES_Y.equals(item.getIsReturnStore())) {
-                        returnItems.add(item);
+                        returnGoodsList.add(item);
                     }
                 } else {
                     SysProjUse sysProjUse = sysProjUseDao.selectByModel(queryProjUse).get(0);
 
                     int sub = sysProjUse.getSurplusCount() - item.getCount();
-                    sysProjUse.setSurplusCount(sub);
-                    if (sub <= 0) {
+                    if (sub < 0) {
+                      throw new GlobleException("项目余次不足");
+                    }else if(sub==0){
                         sysProjUse.setIsOver(Dictionary.FLAG_YES_Y);
                         sysProjUse.setStatus(Dictionary.TAOCAN_STATUS_WX);
                     }
+                    sysProjUse.setSurplusCount(sub);
                     sysProjUseDao.update(sysProjUse);
-
                     SysProjUseFlow sysProjUseFlow = SysProjUseMapper.INSTANCE.projUseToFlow(sysProjUse);
                     sysProjUseFlow.setOptionType("退款修改");
                     sysProjUseFlow.setId(null);
@@ -1334,15 +1606,13 @@
             if (Dictionary.SHOPPING_GOODS_TYPE_TC.equals(item.getType())) {
                 queryProjUse.setTaocanId(-1L);
                 List<SysProjUse> sysProjUses = sysProjUseDao.selectByModel(queryProjUse);
-                if (item.getCount() > sysProjUses.size()) {
-                    throw new GlobleException("数据异常");
-                }
+
 
                 for (int i = 0; i < item.getCount(); i++) {
+
                     SysProjUse sysProjUse = sysProjUses.get(i);
                     sysProjUse.setIsOver(Dictionary.FLAG_YES_Y);
                     sysProjUse.setStatus(Dictionary.TAOCAN_STATUS_WX);
-
                     sysProjUseDao.update(sysProjUse);
                     SysProjUseFlow sysProjUseFlow = SysProjUseMapper.INSTANCE.projUseToFlow(sysProjUse);
                     sysProjUseFlow.setOptionType("退款修改");
@@ -1379,13 +1649,13 @@
             shoppingGoodsDao.update(goods);
         }
 
-        // 家居产品退库存
-        if (CollectionUtils.isNotEmpty(returnItems)) {
-            refundInstore(returnItems);
+        BusParameterSettings manageStockSetting = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WAREHOUSE_MANAGE_STOCK, sysOrder.getCompanyId());
+        if(AppConstance.IS_Y.equals(manageStockSetting.getParamValue())){
+            // 家居产品退库存
+            if (CollectionUtils.isNotEmpty(returnGoodsList)) {
+                refundInstore(returnGoodsList);
+            }
         }
-
-        // 设置业绩
-        achieveNewService.addAchaeveByOrder(pageOrder);
 
     }
 
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java
index dca313c..57c2716 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java
@@ -1,5 +1,6 @@
 package com.matrix.system.hive.service.imp;
 
+import cn.hutool.core.collection.CollUtil;
 import com.matrix.component.rabbitmq.RabiitMqTemplate;
 import com.matrix.core.constance.MatrixConstance;
 import com.matrix.core.exception.GlobleException;
@@ -11,13 +12,19 @@
 import com.matrix.core.tools.WebUtil;
 import com.matrix.system.app.dto.ServiceOrderListDto;
 import com.matrix.system.app.vo.ServiceOrderListVo;
+import com.matrix.system.common.bean.BusParameterSettings;
 import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.common.constance.AppConstance;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
 import com.matrix.system.common.dao.SysUsersDao;
 import com.matrix.system.constance.Dictionary;
 import com.matrix.system.hive.bean.*;
 import com.matrix.system.hive.dao.*;
 import com.matrix.system.hive.plugin.util.MoneyUtil;
 import com.matrix.system.hive.service.*;
+import com.matrix.system.score.constant.ScoreSettingConstant;
+import com.matrix.system.score.entity.ScoreVipDetail;
+import com.matrix.system.score.service.ScoreVipDetailService;
 import com.matrix.system.shopXcx.mqTask.MQTaskRouting;
 import com.matrix.system.wechart.templateMsg.UniformMsgParam;
 import org.apache.commons.collections.CollectionUtils;
@@ -106,6 +113,16 @@
     @Autowired
     private RabiitMqTemplate rabiitMqTemplate;
 
+
+    @Autowired
+    BusParameterSettingsDao busParameterSettingsDao;
+
+    @Autowired
+    ScoreVipDetailService scoreVipDetailService;
+
+    @Autowired
+    SysVipInfoDao sysVipInfoDao;
+
     @Value("${evn}")
     private String evn;
 
@@ -120,7 +137,7 @@
     public SysProjServices addSysProjServices(SysProjServices sysProjServices) throws GlobleException {
 
         //创建服务单
-        if(WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY)!=null){
+        if (WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY) != null) {
             SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
             sysProjServices.setCreateStaffId(user.getSuId());
             sysProjServices.setShopId(user.getShopId());
@@ -128,10 +145,13 @@
         }
 
 
-        sysProjServices.setCreateTime(new Date());
-        sysProjServices.setServiceNo(codeService.getServiceOrderCode());
+        if (sysProjServices.getId() == null) {
+            sysProjServices.setCreateTime(new Date());
+            sysProjServices.setServiceNo(codeService.getServiceOrderCode());
+            int i = sysProjServicesDao.insert(sysProjServices);
+        }
+
         Double hkPrice = 0.0;
-        int i = sysProjServicesDao.insert(sysProjServices);
         // 计算项目总时长
         int totalTime = 0;
         //处理订单明细
@@ -213,7 +233,7 @@
             sysBeauticianState.setProjId(sysProjInfo.getId());
             sysBeauticianState.setServicesId(sysProjServices.getId());
             sysBeauticianState.setShopId(sysProjServices.getShopId());
-            sysBeauticianState.setState(Dictionary.BEATUI_STATE_DYY);
+            sysBeauticianState.setState(sysProjServices.getState());
             beauticianStateDao.insert(sysBeauticianState);
         }
         // 设置项目总时长
@@ -304,7 +324,8 @@
             SysProjUse sysProjUse = projUseService.findById(sysBeauticianState.getPuseId());
 
             ShoppingGoods shoppingGoods = shoppingGoodsDao.selectById(sysProjUse.getProjId());
-            SysOrderItem orderItem = sysOrderItemService.findById(sysProjUse.getOrderItemId());
+            SysOrderItem item = sysOrderItemService.findById(sysProjUse.getOrderItemId());
+            SysOrder orderItem = sysOrderService.findById(item.getOrderId());
             if ("购买".equals(sysProjUse.getSource())) {
                 // 如果用户有欠款,服务单总价不能超过已付金额
                 if (orderItem!=null && orderItem.getArrears() > 0) {
@@ -320,7 +341,7 @@
                     double money = MoneyUtil.sub((bj - orderItem.getArrears()), (yxfje + bcxfje));
                     // 如果 已付金额  - (已消费金额+本次消费金额)<0 则不能再消费
                    if (money < 0) {
-                        return new VerifyResult(true, shoppingGoods.getName() + "存在欠款" + orderItem.getArrears() + "元 , 订单编号[ " + sysOrderService.findById(orderItem.getOrderId()).getOrderNo() + " ] ");
+                        return new VerifyResult(true, shoppingGoods.getName() + "存在欠款" + orderItem.getArrears() + "元 , 订单编号[ " + orderItem.getOrderNo() + " ] ");
                     }
 
 
@@ -341,8 +362,8 @@
         /** 验证数据是否正确 */
         SysProjServices checkProjServices = sysProjServicesDao.selectById(projServices.getId());
         // 验证服务单是否存在或者取消
-        if (!checkProjServices.getState().equals(Dictionary.SERVICE_STATU_DYY)
-                && !checkProjServices.getState().equals(Dictionary.SERVICE_STATU_YYCG)) {
+        if (checkProjServices.getState().equals(Dictionary.SERVICE_STATU_YYQX)
+                || checkProjServices.getState().equals(Dictionary.SERVICE_STATU_FFJS)) {
             throw new GlobleException("该服务单已被取消或者不存在!");
         }
         // 验证是否选择床位
@@ -369,7 +390,7 @@
         }
 
         // 判断是否是编辑,还是新增,编辑则需要先释放资源
-        if (checkProjServices.getState().equals(Dictionary.SERVICE_STATU_YYCG)) {
+        if (!checkProjServices.getState().equals(Dictionary.SERVICE_STATU_DYY)) {
             // 释放床位资源
             bedStateDao.deleteByServiceId(checkProjServices.getId());
         }
@@ -387,6 +408,7 @@
             if (beauticianStateDao.checkBeauticianClash(beauticianState) > 0) {
                 throw new GlobleException("该美疗师已被占用,请重新分配!");
             }
+//            beauticianState.setExcTime(beauticianState.getProjInfo().getTimeLength());
             beauticianState.setState(Dictionary.BEATUI_STATE_YYY);
             beauticianStateDao.update(beauticianState);
 
@@ -396,8 +418,10 @@
         }
 
 
-        // 设置成功状态
-        projServices.setState(Dictionary.SERVICE_STATU_XPL);
+        if (Dictionary.SERVICE_STATU_DYY.equals(projServices.getState())) {
+            // 设置成功状态
+            projServices.setState(Dictionary.SERVICE_STATU_XPL);
+        }
         // 判断当前门店是否有历史美疗师
         LastestWorkBeatuistaff lastWorkStaff = new LastestWorkBeatuistaff();
         lastWorkStaff.setShopId(checkProjServices.getShopId());
@@ -479,6 +503,9 @@
             sysOutStoreDao.deleteById(sysOutStore.getId());
             sysOutStoreItemDao.deleteByOrderId(sysOutStore.getId());
         }
+        //删除积分
+        scoreVipDetailService.removeByBusinessId(checkProjServices.getVipId(), checkProjServices.getId());
+
         //更新服务单状态
         return sysProjServicesDao.update(checkProjServices);
     }
@@ -491,12 +518,20 @@
     private void backProjCount(SysProjServices projServices) {
         List<SysBeauticianState> beauticianStateList = beauticianStateDao.selectBySerIds(projServices.getId());
 
-        Map<Long ,List<SysProjUse>> taocanMap = new HashMap<>();
+        backProjCountItems(beauticianStateList, 1);
+    }
+
+    private void backProjCountItems(List<SysBeauticianState> beauticianStateList, int type) {
+        Map<Long, List<SysProjUse>> taocanMap = new HashMap<>();
         // 回退项目余额
         for (SysBeauticianState beauticianState : beauticianStateList) {
-            // 该修改为 有效日期判断更新所有
-            beauticianState.setState(Dictionary.BEATUI_STATE_YYQX);
-            beauticianStateDao.update(beauticianState);
+            if (type == 1) {
+                // 该修改为 有效日期判断更新所有
+                beauticianState.setState(Dictionary.BEATUI_STATE_YYQX);
+                beauticianStateDao.update(beauticianState);
+            } else {
+                beauticianStateDao.deleteById(beauticianState.getId());
+            }
 
             SysProjUse sysProjUse = sysProjUseDao.selectById(beauticianState.getPuseId());
             if (sysProjUse != null && sysProjUse.getId() != null) {
@@ -564,6 +599,16 @@
         }
     }
 
+    @Override
+    public int deleteProjServiceItemById(Long id) {
+        SysBeauticianState sysBeauticianState = beauticianStateDao.selectById(id);
+        List<SysBeauticianState> list = new ArrayList<>();
+        list.add(sysBeauticianState);
+
+        backProjCountItems(list, 2);
+        return 1;
+    }
+
     // 划扣 jyy
     @Transactional(rollbackFor = Exception.class)
     @Override
@@ -572,20 +617,153 @@
         if (!projServices.getState().equals(Dictionary.SERVICE_STATU_FWWC)) {
             throw new GlobleException("该服务单状态为" + projServices.getState() + ",不可以进行当前操作!");
         } else {
+            SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+            if (skipServiceOrderStep(Dictionary.SERVICE_OVER_BEGIN_END)) {
+                SysBeauticianState checkBeauticianState = new SysBeauticianState();
+                checkBeauticianState.setServicesId(projServices.getId());
+                checkBeauticianState.setState(Dictionary.BEATUI_STATE_FWJS);
+                beauticianStateDao.chengItemState(checkBeauticianState);
+
+                // 释放床位资源
+                SysBedState checkBedState = sysBedStateDao.selectBySerIdAndBedId(projServices.getId(), projServices.getBedId());
+                if (checkBedState != null) {
+                    checkBedState.setBedState(Dictionary.BED_STATE_SYJS);
+                    bedStateDao.update(checkBedState);
+                }
+                projServices.setEndTime(new Date());
+                // 计算时差
+                long minspace = DateUtil.getDifTimeMin(projServices.getStartTime(), projServices.getEndTime()) - projServices.getTotalTime();
+                // 判断是服务超时还是服务提前结束,如果minspace大于0则是超时服务,小于0则是提前结束服务
+                projServices.setIsOverTime(minspace + "");
+                projServices.setState(Dictionary.SERVICE_STATU_FWWC);
+                sysProjServicesDao.update(projServices);
+            }
+
             projServices.setState(Dictionary.SERVICE_STATU_FFJS);
             projServices.setConsumeTime(new Date());
-            int result=sysProjServicesDao.update(projServices);
+            int result = sysProjServicesDao.update(projServices);
             achieveNewService.addAchieveByServiceOrder(projServices);
 
+            //设置会员积分
+            addVipScore(projServices);
+
             //发送微信公众号提醒
-            UniformMsgParam uniformMsgParam=new UniformMsgParam(projServices.getCompanyId(),UniformMsgParam.GZH_FWWC);
-            uniformMsgParam.put("serviceId",projServices.getId());
-            rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG+evn,uniformMsgParam.toJSONString());
+            UniformMsgParam uniformMsgParam = new UniformMsgParam(projServices.getCompanyId(), UniformMsgParam.GZH_FWWC);
+            uniformMsgParam.put("serviceId", projServices.getId());
+            rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG + evn, uniformMsgParam.toJSONString());
+
+
+
 
             return result;
         }
+
+
     }
 
+    /**
+     * 设置会员消费积分
+     */
+    private void addVipScore(SysProjServices projServices) {
+
+        SysVipInfo vipInfo =sysVipInfoDao.selectById(projServices.getVipId());
+
+        List<SysBeauticianState> sysBeauticianStates = beauticianStateDao.selectBySerIds(projServices.getId());
+
+
+        double principalPrice = 0D;
+        double giftPrice = 0D;
+        for (SysBeauticianState sysBeauticianState : sysBeauticianStates) {
+            SysProjUse projUse = sysBeauticianState.getProjUse();
+            if (projUse.getSource().equals(Dictionary.TAOCAN_SOURCE_ZS)) {
+                giftPrice += projUse.getPrice();
+            } else {
+                principalPrice += projUse.getPrice();
+            }
+        }
+
+        int[] principalConsumScore = {0, 0, 0};
+        BusParameterSettings principalConsumption = busParameterSettingsDao.selectCompanyParamByCode(ScoreSettingConstant.PRINCIPAL_CONSUMPTION, vipInfo.getCompanyId());
+        //本金消耗
+        if (principalPrice > 0
+                && StringUtils.isNotBlank(principalConsumption.getParamValue())) {
+
+            principalConsumScore[0] = (int) (principalPrice / Double.parseDouble(principalConsumption.getParamValue()));
+
+            if (StringUtils.isNotBlank(principalConsumption.getParamValue1())) {
+                principalConsumScore[1] = (int) (principalPrice / Double.parseDouble(principalConsumption.getParamValue1()));
+            }
+
+            if (StringUtils.isNotBlank(principalConsumption.getParamValue2())) {
+                principalConsumScore[2] = (int) (principalPrice / Double.parseDouble(principalConsumption.getParamValue2()));
+            }
+        }
+
+        int[] giveConsumScore = {0, 0, 0};
+        BusParameterSettings giveConsumption = busParameterSettingsDao.selectCompanyParamByCode(ScoreSettingConstant.GIVE_CONSUMPTION, vipInfo.getCompanyId());
+        //本金消耗
+        if (giftPrice > 0
+                && StringUtils.isNotBlank(giveConsumption.getParamValue())) {
+
+            giveConsumScore[0] = (int) (giftPrice / Double.parseDouble(giveConsumption.getParamValue()));
+
+            if (StringUtils.isNotBlank(giveConsumption.getParamValue1())) {
+                giveConsumScore[1] = (int) (giftPrice / Double.parseDouble(giveConsumption.getParamValue1()));
+            }
+
+            if (StringUtils.isNotBlank(giveConsumption.getParamValue2())) {
+                giveConsumScore[2] = (int) (giftPrice / Double.parseDouble(giveConsumption.getParamValue2()));
+            }
+        }
+
+        int selfScore =principalConsumScore[0]+giveConsumScore[0];
+        int parentScore =principalConsumScore[1]+giveConsumScore[1];
+        int topParentScore =principalConsumScore[2]+giveConsumScore[2];
+
+        //添加自己的积分
+        if (selfScore > 0) {
+            scoreVipDetailService.addScore(
+                    vipInfo.getId(),
+                    projServices.getCreateStaffId(),
+                    projServices.getShopId(),
+                    selfScore,
+                    projServices.getId(),
+                    ScoreVipDetail.SCORE_VIP_TYPE_CASH,
+                    "消耗奖励"
+            );
+        }
+
+        if (vipInfo.getRecommendId() != null) {
+            //推荐注册老带新积分奖励
+            SysVipInfo referrerVip = sysVipInfoDao.selectById(vipInfo.getRecommendId());
+            if (parentScore > 0) {
+                scoreVipDetailService.addScore(
+                        referrerVip.getId(),
+                        projServices.getCreateStaffId(),
+                        projServices.getShopId(),
+                        parentScore,
+                        projServices.getId(),
+                        ScoreVipDetail.SCORE_VIP_TYPE_CASH,
+                        "推荐消耗奖励"
+                );
+            }
+            //推荐注册二级带新积分奖励
+            if (referrerVip.getRecommendId() != null) {
+                SysVipInfo topVipInfo = sysVipInfoDao.selectById(referrerVip.getRecommendId());
+                if (topParentScore > 0) {
+                    scoreVipDetailService.addScore(
+                            topVipInfo.getId(),
+                            projServices.getCreateStaffId(),
+                            projServices.getShopId(),
+                            topParentScore,
+                            projServices.getId(),
+                            ScoreVipDetail.SCORE_VIP_TYPE_CASH,
+                            "推荐消耗奖励"
+                    );
+                }
+            }
+        }
+    }
 
 
     // 派单 jyy
@@ -622,6 +800,7 @@
         if (!projServices.getState().equals(Dictionary.SERVICE_STATU_XPL)) {
             throw new GlobleException("该服务单状态为" + projServices.getState() + ",不可以进行当前操作!");
         }
+        projServicesVo.setCompanyId(projServices.getCompanyId());
         if (isNeedOutStore(projServicesVo)) {
 
             // 生成出库单
@@ -630,9 +809,9 @@
 
             outStore.setOutStoreNo(codeService.getOutStoreCode());
             outStore.setShopId(projServices.getShopId());
-            if(projServices.getDevisionId()!=null){
+            if (projServices.getDevisionId() != null) {
                 outStore.setStaffId(projServices.getDevisionId());
-            }else{
+            } else {
 
                 outStore.setStaffId(sysUsers.getSuId());
             }
@@ -657,7 +836,7 @@
                     double sum = stores.stream().mapToDouble(item2 -> item2.getStoreTotal()).sum();
                     Double needAmount = MoneyUtil.div(item.getAmount(), Double.valueOf(shoppingGoods.getVolume()));
                     if (sum < needAmount) {
-                        throw new GlobleException("出库失败:【" + shoppingGoods.getName()+"-"+shoppingGoods.getCode()+  "库存不足】");
+                        throw new GlobleException("出库失败:【" + shoppingGoods.getName() + "-" + shoppingGoods.getCode() + "库存不足】");
                     }
                     //循环获取所有批次产品,并扣减库存
                     for (SysStoreInfo storeInfo : stores) {
@@ -689,25 +868,50 @@
             sysOutStoreItemDao.batchInsert(realOutStoreItemList);
         }
         // 设置服务单状态
-        projServices.setState(Dictionary.SERVICE_STATU_PLWC);
-        if(projServices.getDevisionId()==null){
+//        projServices.setState(Dictionary.SERVICE_STATU_PLWC);
+
+        if (projServices.getDevisionId() == null) {
             //如果没有设置配料师则默认为操作配料的人为配料师
             projServices.setDevisionId(sysUsers.getSuId());
-
         }
+
+        // 判断是否跳过开始/结束服务
+        if (skipServiceOrderStep(Dictionary.SERVICE_OVER_BEGIN_END)) {
+            projServices.setStartTime(new Date());
+            projServices.setState(Dictionary.SERVICE_STATU_FWWC);
+        }
+        // 释放床位资源
+//        SysBedState checkBedState = sysBedStateDao.selectBySerIdAndBedId(projServices.getBedId(), projServices.getId());
+//        if (checkBedState != null) {
+//            checkBedState.setBedState(Dictionary.BED_STATE_SYJS);
+//            bedStateDao.update(checkBedState);
+//        }
+//        projServices.setStartTime(new Date());
+//        projServices.setEndTime(new Date());
+//        // 计算时差
+//        long minspace = DateUtil.getDifTimeMin(projServices.getStartTime(), projServices.getEndTime())
+//                - projServices.getTotalTime();
+//        // 判断是服务超时还是服务提前结束,如果minspace大于0则是超时服务,小于0则是提前结束服务
+//        projServices.setIsOverTime(minspace + "");
+//        projServices.setState(Dictionary.SERVICE_STATU_FWWC);
         return sysProjServicesDao.update(projServices);
     }
 
     /**
      * 服务单收费需要生成出库记录
+     *
      * @param projServicesVo
      * @return
      */
     private boolean isNeedOutStore(SysProjServices projServicesVo) {
-        if(CollectionUtils.isNotEmpty(projServicesVo.getOutStoreItem())){
-            for (SysOutStoreItem item : projServicesVo.getOutStoreItem()) {
-                if (item.getAmount() != null && item.getAmount() > 0) {
-                    return true;
+
+        if (CollectionUtils.isNotEmpty(projServicesVo.getOutStoreItem())) {
+            BusParameterSettings manageStockSetting = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WAREHOUSE_MANAGE_STOCK, projServicesVo.getCompanyId());
+            if(AppConstance.IS_Y.equals(manageStockSetting.getParamValue())){
+                for (SysOutStoreItem item : projServicesVo.getOutStoreItem()) {
+                    if (item.getAmount() != null && item.getAmount() > 0) {
+                        return true;
+                    }
                 }
             }
         }
@@ -761,7 +965,6 @@
         SysBeauticianState checkBeauticianState = new SysBeauticianState();
         checkBeauticianState.setServicesId(projServices.getId());
         checkBeauticianState.setState(Dictionary.BEATUI_STATE_FWJS);
-        checkBeauticianState.setStaffId(users.getSuId());
         int rerunlt = beauticianStateDao.chengItemState(checkBeauticianState);
 
         // 验证是否是最后一个美疗师结束服务
@@ -791,7 +994,6 @@
         }
 
         return rerunlt;
-
     }
 
     @Override
@@ -815,4 +1017,27 @@
     public int findApiServiceOrderListTotal(ServiceOrderListDto serviceOrderListDto) {
         return sysProjServicesDao.selectApiServiceOrderListTotal(serviceOrderListDto);
     }
+
+    /**
+     * 跳过服务单某步骤
+     */
+    private boolean skipServiceOrderStep(String step) {
+        SysUsers users = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
+        ParameterSettings ps = new ParameterSettings();
+        ps.setCompanyId(users.getCompanyId());
+        ps.setCategory("店务配置");
+        List<ParameterSettings> settings = parameterSettingsDao.getByCategory(ps);
+
+        boolean flag = false;
+        if (CollUtil.isNotEmpty(settings)) {
+            for (ParameterSettings setting : settings) {
+                if (step.equals(setting.getCode()) && Dictionary.FLAG_YES.equals(setting.getUserValue())) {
+                    flag = true;
+                    break;
+                }
+            }
+        }
+
+        return flag;
+    }
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjUseServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjUseServiceImpl.java
index 30bd8c9..d113cc4 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjUseServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjUseServiceImpl.java
@@ -599,4 +599,9 @@
         projUse.setStatus(status);
         return sysProjUseDao.selectByModel(projUse);
     }
+
+    @Override
+    public List<SysProjUse> findTaocaoProjUseWithProj(SysProjUse sysProjUse) {
+        return sysProjUseDao.selectTaoCanListWithProj(sysProjUse);
+    }
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java
index 922b7d9..b5a3280 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java
@@ -3,7 +3,10 @@
 import com.matrix.core.constance.MatrixConstance;
 import com.matrix.core.exception.GlobleException;
 import com.matrix.core.pojo.PaginationVO;
-import com.matrix.core.tools.*;
+import com.matrix.core.tools.DateUtil;
+import com.matrix.core.tools.EncrypUtil;
+import com.matrix.core.tools.StringUtils;
+import com.matrix.core.tools.WebUtil;
 import com.matrix.core.tools.excl.ExcelSheetPO;
 import com.matrix.core.tools.excl.ExcelUtil;
 import com.matrix.system.app.dto.AddVipDto;
@@ -11,7 +14,9 @@
 import com.matrix.system.app.dto.VipInfoListDto;
 import com.matrix.system.app.vo.VipInfoDetailVo;
 import com.matrix.system.app.vo.VipInfoListVo;
+import com.matrix.system.common.bean.BusParameterSettings;
 import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
 import com.matrix.system.common.tools.DataAuthUtil;
 import com.matrix.system.common.tools.ServiceUtil;
 import com.matrix.system.constance.Dictionary;
@@ -22,6 +27,9 @@
 import com.matrix.system.hive.plugin.util.CollectionUtils;
 import com.matrix.system.hive.pojo.VipInfoVo;
 import com.matrix.system.hive.service.SysVipInfoService;
+import com.matrix.system.score.constant.ScoreSettingConstant;
+import com.matrix.system.score.entity.ScoreVipDetail;
+import com.matrix.system.score.service.ScoreVipDetailService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -65,7 +73,11 @@
 
 	@Value("${default.vip.photo.man}")
 	String defaultMan;
+	@Autowired
+	BusParameterSettingsDao busParameterSettingsDao;
 
+	@Autowired
+	ScoreVipDetailService scoreVipDetailService;
 
 
 	/**
@@ -90,11 +102,11 @@
 
 	@Override
 	public int add(SysVipInfo sysVipInfo) {
-		SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+
 
 		if (sysVipInfo.getVipNo() != null && (!sysVipInfo.getVipNo().equals(""))) {
 			if (serviceUtil.addCheckRepeatTowColumn(TableMapping.SYS_VIP_INFO, "VIP_NO", sysVipInfo.getVipNo(),
-					"company_id",user.getCompanyId())) {
+					"company_id",sysVipInfo.getCompanyId())) {
 				throw new GlobleException("编号已存在!");
 			}
 		}
@@ -103,25 +115,23 @@
 				throw new GlobleException("请输入手机号!");
 			}
 			if (serviceUtil.addCheckRepeatTowColumn(TableMapping.SYS_VIP_INFO, "PHONE", sysVipInfo.getPhone(),
-					"company_id",user.getCompanyId() )) {
-				throw new GlobleException("手机已被注册!");
+					"company_id",sysVipInfo.getCompanyId() )) {
+				throw new GlobleException(sysVipInfo.getPhone()+"手机已被注册!");
 			}
 		}
 
-
-		sysVipInfo.setShopId(user.getShopId());
-		sysVipInfo.setCompanyId(user.getCompanyId());
 		sysVipInfo.setCreateTime(new Date());
 		sysVipInfo.setPointAll(0);
 		sysVipInfo.setIsDeal(SysVipInfo.UNDEAL_VIP);
-		sysVipInfo.setZjm(StringUtils.toHanyuPinyin(sysVipInfo.getVipName())+","+StringUtils.toHeadWordHanyuPinyin(sysVipInfo.getVipName()));
-		if(sysVipInfo.getSex().equals(Dictionary.SEX_MAN)){
+		if(StringUtils.isNotBlank(sysVipInfo.getVipName())){
+			sysVipInfo.setZjm(StringUtils.toHanyuPinyin(sysVipInfo.getVipName())+","+StringUtils.toHeadWordHanyuPinyin(sysVipInfo.getVipName()));
+		}
+		if(Dictionary.SEX_MAN.equals(sysVipInfo.getSex())){
 			sysVipInfo.setPhoto(defaultMan);
 		}else{
 			sysVipInfo.setPhoto(defaultWoman);
 		}
 		int i=sysVipInfoDao.insert(sysVipInfo);
-		modifyVipWithOtherInfo(sysVipInfo);
 		//创建用户默认储值卡
 		addVipDefaultCard(sysVipInfo.getId());
 		return i;
@@ -255,31 +265,7 @@
 		}
 		
 		
-        //如果会员id不为空则表示是修改,删除原有的绑定关系,建立新的关系
-         if(vipInfo.getId()!=null && !vipInfo.getId().equals("")){
-	         MyBeatician query=new MyBeatician();
-	         query.setVipId(vipInfo.getId());
-	         List<MyBeatician> listDel= myBeaticianDao.selectByModel(query);
-	         if(listDel!=null && listDel.size()>0){
-	         List<Long> delIds=new ArrayList<>();
-		         for (int i = 0; i < listDel.size(); i++) {
-					delIds.add(listDel.get(i).getId());
-				 }
-	         myBeaticianDao.deleteByIds(delIds);
-             }
-         }
-         //添加客户的美疗师
- 		List<MyBeatician> list=vipInfo.getBeauticains();
- 		if(list!=null && list.size()>0){
- 			List<MyBeatician> saveList=new ArrayList<>();
- 			//此处由于前台传递过来list中的下标可能是不连续的。因此要过滤掉空的,即要过滤掉美疗师的id为空的数据
- 			for (MyBeatician temp:list) {
- 				if(temp.getBeauticainId()!=null && !temp.getBeauticainId().equals("")){
- 					saveList.add(temp);
- 				   }
- 				}
- 			myBeaticianDao.insertAll(saveList,vipInfo.getId());
-			}
+
  			
 	}
 	
@@ -414,7 +400,7 @@
 					SysVipInfo vipInfo = new SysVipInfo();
 					vipInfo.setVipNo(objects.get(0).toString());
 
-					SysVipInfo exist = sysVipInfoDao.selectByPhone(objects.get(3).toString());
+					SysVipInfo exist = sysVipInfoDao.selectByPhone(objects.get(3).toString(),sysUsers.getCompanyId());
 					if (exist != null) {
 						continue;
 					}
@@ -454,6 +440,7 @@
 	}
 
 	@Override
+	@Transactional
 	public int apiAddVip(AddVipDto addVipDto) {
 		SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
 
@@ -512,10 +499,59 @@
 		if (CollectionUtils.isNotEmpty(addVipDto.getLabels())) {
 			batchInsertLabel(addVipDto.getLabels(), vipInfo.getId());
 		}
+		//添加推荐人积分
+		addReferrerVipScore(vipInfo);
 
 		//创建用户默认储值卡
 		addVipDefaultCard(vipInfo.getId());
 		return i;
+	}
+
+	/**
+	 * 添加推荐人积分
+	 * @param vipInfo
+	 */
+	public void addReferrerVipScore(SysVipInfo vipInfo) {
+		if(vipInfo.getRecommendId()!=null){
+			SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+			BusParameterSettings referrerScoreSetting = busParameterSettingsDao.selectCompanyParamByCode(ScoreSettingConstant.REFERRALS_CONSUMPTION, user.getCompanyId());
+			//推荐注册老带新积分奖励
+			SysVipInfo referrerVip = sysVipInfoDao.selectById(vipInfo.getRecommendId());
+
+			if(StringUtils.isNotBlank(referrerScoreSetting.getParamValue())){
+
+				scoreVipDetailService.addScore(
+						referrerVip.getId(),
+						user.getSuId(),
+						vipInfo.getShopId(),
+						Integer.parseInt(referrerScoreSetting.getParamValue()),
+						vipInfo.getId(),
+						ScoreVipDetail.SCORE_VIP_TYPE_REFERRER,
+						"推荐会员"
+						);
+			}
+
+			//推荐注册二级带新积分奖励
+
+			if(referrerVip.getRecommendId()!=null){
+
+				SysVipInfo topVipInfo = sysVipInfoDao.selectById(referrerVip.getRecommendId());
+
+
+				if(StringUtils.isNotBlank(referrerScoreSetting.getParamValue1())){
+					scoreVipDetailService.addScore(
+							topVipInfo.getId(),
+							user.getSuId(),
+							vipInfo.getShopId(),
+							Integer.parseInt(referrerScoreSetting.getParamValue1()),
+							vipInfo.getId(),
+							ScoreVipDetail.SCORE_VIP_TYPE_REFERRER,
+							"间接推荐会员"
+					);
+				}
+			}
+
+		}
 	}
 
 	@Override
@@ -608,4 +644,26 @@
 		vipInfoDetailVo.setLabels(labels);
 		return vipInfoDetailVo;
 	}
+
+	@Override
+	public SysVipInfo findByOpenId(String openId) {
+		return sysVipInfoDao.findByOpenId(openId);
+	}
+
+	/**
+	 * 设置成为推广员
+	 * @param invitationId
+	 */
+	@Override
+	public int setToBeAnSalesman(Long userId,Long invitationId,long gradeId) {
+		SysVipInfo sysVipInfo=sysVipInfoDao.selectById(userId);
+		sysVipInfo.setIsSales(SysVipInfo.IS_SALES);
+		sysVipInfo.setRecommendId(invitationId);
+		sysVipInfo.setBindingParentTime(new Date());
+		sysVipInfo.setSalesmanGrade(gradeId);
+		return sysVipInfoDao.update(sysVipInfo);
+	}
+
+
+
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysWorktimeServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysWorktimeServiceImpl.java
index 081934e..77ccadb 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysWorktimeServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysWorktimeServiceImpl.java
@@ -97,16 +97,20 @@
 
 	@Override
 	public boolean isInWorkTime(Long shopId, Date beginTime, Date endTime) {
-		Date minTime = findMinTime(shopId);
-		Date maxTime = findMaxTime(shopId);
-		minTime.setYear(beginTime.getYear());
-		minTime.setMonth(beginTime.getMonth());
-		minTime.setDate(beginTime.getDate());
-		maxTime.setYear(beginTime.getYear());
-		maxTime.setMonth(beginTime.getMonth());
-		maxTime.setDate(beginTime.getDate());
-		return (
-				(DateUtil.isDuringDate(minTime, maxTime, beginTime) || minTime.getTime()==beginTime.getTime()  )
-				&& DateUtil.isDuringDate(minTime, maxTime, endTime) || maxTime.getTime()==endTime.getTime() );
+		if(beginTime!=null){
+			Date minTime = findMinTime(shopId);
+			Date maxTime = findMaxTime(shopId);
+			minTime.setYear(beginTime.getYear());
+			minTime.setMonth(beginTime.getMonth());
+			minTime.setDate(beginTime.getDate());
+			maxTime.setYear(beginTime.getYear());
+			maxTime.setMonth(beginTime.getMonth());
+			maxTime.setDate(beginTime.getDate());
+			return (
+					(DateUtil.isDuringDate(minTime, maxTime, beginTime) || minTime.getTime()==beginTime.getTime()  )
+							&& DateUtil.isDuringDate(minTime, maxTime, endTime) || maxTime.getTime()==endTime.getTime() );
+		}else{
+			return false;
+		}
 	}
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java b/zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java
index 7f452ad..95ac4ed 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java
@@ -12,13 +12,14 @@
 import com.matrix.system.common.tools.ResponseHeadUtil;
 import com.matrix.system.hive.action.util.QueryUtil;
 import com.matrix.system.hive.bean.AchieveNew;
-import com.matrix.system.hive.bean.SysOrder;
-import com.matrix.system.hive.bean.SysOrderItem;
+import com.matrix.system.hive.dao.AchieveNewDao;
+import com.matrix.system.hive.plugin.util.CollectionUtils;
 import com.matrix.system.hive.service.AchieveNewService;
 import com.matrix.system.hive.service.SysOrderItemService;
 import com.matrix.system.hive.service.SysOrderService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.ui.ModelMap;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -48,6 +49,9 @@
 
     @Autowired
     private SysOrderItemService sysOrderItemService;
+
+    @Autowired
+    private AchieveNewDao achieveNewDao;
 
     /**
      * 门店每日单据明细表
@@ -90,7 +94,7 @@
         String title = "每日单据明细";
         orderSheet.setSheetName(title);
         orderSheet.setTitle(title);
-        String[] header = {"年", "月", "日",   "订单类型", "订单编号", "会员级别", "姓名", "项目名称", "总金额", "卡项", "现金单次", "现金产品", "划扣", "本金消耗", "赠消", "提成", "顾问", "美疗师", "人头", "项目个数", "项目时间", "门店"};
+        String[] header = {"年", "月", "日", "订单编号", "订单类型", "会员姓名", "项目名称", "订单金额", "订单业绩", "收款方式", "业绩类型", "员工", "本金消耗", "赠消", "提成", "人头", "项目个数", "项目时间", "顾问", "门店"};
         orderSheet.setHeaders(header);
         SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
         if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){
@@ -106,24 +110,21 @@
                 temp.add(item.getYear());
                 temp.add(item.getMonth());
                 temp.add(item.getDay());
-                temp.add(item.getOrderType());
                 temp.add(item.getOrderNo());
-                temp.add(item.getLevelName());
+                temp.add(item.getOrderType());
                 temp.add(item.getVipName());
                 temp.add(item.getProName());
                 temp.add(item.getZkTotal());
-                temp.add(item.getCardCash());
-                temp.add(item.getProjCash());
                 temp.add(item.getGoodsCash());
-                temp.add(item.getConsume());
+                temp.add(item.getPayMethod());
+                temp.add(item.getMeiliao());
                 temp.add(item.getHisConsume());
                 temp.add(item.getFreeConsume());
                 temp.add(item.getProjPercentage());
-                temp.add(item.getGuwen());
-                temp.add(item.getMeiliao());
                 temp.add(item.getNumberOfPeople());
                 temp.add(item.getProjNum());
                 temp.add(item.getProjTime());
+                temp.add(item.getGuwen());
                 temp.add(item.getShopName());
                 list.add(temp);
             }
@@ -149,27 +150,17 @@
 
     @RequestMapping(value = "/add")
     @ResponseBody
+    @Transactional
     public AjaxResult add(@RequestBody List<AchieveNew> list) {
-        SysOrder order = sysOrderService.findById(list.get(0).getOrderId());
-        List<SysOrderItem> orderItems = sysOrderItemService.findByOrderId(order.getId());
-        orderItems.forEach(item -> {
-            List<AchieveNew> achieveNewList = new ArrayList<>();
-            for(AchieveNew achieveNew : list) {
-                achieveNewService.removeById(achieveNew.getId());
-                achieveNew.setId(null);
-                achieveNew.setConsume(null);
-                achieveNew.setCardCash(null);
-
-                if (achieveNew.getOrderItemId().equals(item.getId())) {
-                    achieveNewList.add(achieveNew);
-                }
-
-            }
-            item.setAchaeveList(achieveNewList);
-        });
-        order.setItems(orderItems);
-        achieveNewService.addAchaeveByOrder(order);
-        return AjaxResult.buildSuccessInstance("保存成功");
+        if (CollectionUtils.isNotEmpty(list)) {
+            //删除原业绩
+            achieveNewDao.deleteByOrderId(list.get(0).getOrderId());
+            //插入新业绩
+            achieveNewDao.batchInsert(list);
+            return AjaxResult.buildSuccessInstance("保存成功");
+        } else {
+            return AjaxResult.buildFailInstance("未找到业绩数据");
+        }
     }
 
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/statistics/StatisticsBusinessDataJob.java b/zq-erp/src/main/java/com/matrix/system/hive/statistics/StatisticsBusinessDataJob.java
index 4e80ff7..257600e 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/statistics/StatisticsBusinessDataJob.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/statistics/StatisticsBusinessDataJob.java
@@ -18,11 +18,9 @@
 import static com.matrix.system.hive.statistics.BusinessDataTypeEnum.*;
 
 /**
- * 定时任务测试类
+ * 业绩统计报表定时任务
  *
- * @author zhangheng
- * @email 512061637@qq.com
- * @date 2019年1月15日
+ * @author jyy
  */
 @Component
 public class StatisticsBusinessDataJob {
@@ -72,7 +70,7 @@
     }
 
 
-    @Scheduled(cron = "0 0 0 1/1 * ?")
+    @Scheduled(cron = "1 0 0 1/1 * ?")
     public boolean executeExt() {
 
         LogUtil.info("业绩统计定时任务开始运行*******************");
diff --git a/zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpShopInfoController.java b/zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpShopInfoController.java
index 97fdc58..0146ff7 100644
--- a/zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpShopInfoController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpShopInfoController.java
@@ -11,11 +11,12 @@
 import com.matrix.system.common.bean.SysUsers;
 import com.matrix.system.common.constance.AppConstance;
 import com.matrix.system.constance.Dictionary;
-import com.matrix.system.constance.SystemConstance;
 import com.matrix.system.hive.action.BaseController;
 import com.matrix.system.hive.action.util.QueryUtil;
 import com.matrix.system.hive.bean.SysShopInfo;
 import com.matrix.system.hive.service.SysShopInfoService;
+import com.matrix.system.shopXcx.api.WeChatApiTools;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -39,6 +40,9 @@
     @Resource
     private SysShopInfoService shopInfoService; // 店铺Service
 
+
+    @Autowired
+    WeChatApiTools weChatApiTools;
 
     @RequestMapping(value = "/showList")
     @ResponseBody
@@ -91,7 +95,8 @@
     AjaxResult creteSohopQrcode(@PathVariable("shopId") Long shopId) {
         SysShopInfo shopInfo = shopInfoService.findById(shopId);
         try {
-            String qrcodeSavePath = WxacodeUtil.getWxacode(shopId + "", "pages/index/index", MD5Util.strToMD5(shopId + ""));
+            String qrcodeSavePath = WxacodeUtil.getWxacode(shopId + "", "pages/index/index", MD5Util.strToMD5(shopId + "")
+                    ,weChatApiTools.getAppid(shopInfo.getCompanyId()),weChatApiTools.getSecret(shopInfo.getCompanyId()));
             LogUtil.debug("qrcodeSavePath={}", qrcodeSavePath);
             // 图片保存目录路径
             String baseSavePath = PropertiesUtil.getString(AppConstance.FILES_TORAGE_PATH);
diff --git a/zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpVipInfoController.java b/zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpVipInfoController.java
index f2ed540..a412f07 100644
--- a/zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpVipInfoController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpVipInfoController.java
@@ -11,21 +11,25 @@
 import com.matrix.core.tools.excl.ExcelSheetPO;
 import com.matrix.core.tools.excl.ExcelUtil;
 import com.matrix.core.tools.excl.ExcelVersion;
-import com.matrix.system.common.bean.SystemDictionary;
 import com.matrix.system.common.bean.SysUsers;
-import com.matrix.system.common.service.SystemDictionaryService;
+import com.matrix.system.common.bean.SystemDictionary;
 import com.matrix.system.common.service.SysUsersService;
+import com.matrix.system.common.service.SystemDictionaryService;
 import com.matrix.system.common.tools.ResponseHeadUtil;
 import com.matrix.system.constance.Dictionary;
-import com.matrix.system.constance.SystemConstance;
 import com.matrix.system.hive.action.BaseController;
 import com.matrix.system.hive.action.util.QueryUtil;
-import com.matrix.system.hive.bean.*;
+import com.matrix.system.hive.bean.Question;
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.hive.bean.SysVipLevel;
+import com.matrix.system.hive.bean.VipAnswer;
 import com.matrix.system.hive.dao.MoneyCardUseDao;
 import com.matrix.system.hive.dao.VipAnswerDao;
-import com.matrix.core.tools.DateUtil;
 import com.matrix.system.hive.pojo.RegisterInfo;
-import com.matrix.system.hive.service.*;
+import com.matrix.system.hive.service.MoneyCardUseService;
+import com.matrix.system.hive.service.QuestionSerivce;
+import com.matrix.system.hive.service.SysVipInfoService;
+import com.matrix.system.hive.service.SysVipLevelService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.ModelMap;
@@ -42,7 +46,10 @@
 import java.net.URLDecoder;
 import java.net.URLEncoder;
 import java.security.NoSuchAlgorithmException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.List;
 
 
 /**
@@ -104,39 +111,7 @@
     @RequestMapping(value = "/showVipInfo")
     public @ResponseBody
     AjaxResult findByModel(String keyWord) {
-        LinkedList<SysVipInfo> userList = null;
-        // 获取最近查询客户
-        if (WebUtil.getSession().getAttribute(SystemConstance.HISTORY_CUSTOMER) == null) {
-            userList = new LinkedList<SysVipInfo>();
-            WebUtil.getSession().setAttribute(SystemConstance.HISTORY_CUSTOMER, userList);
-        } else {
-            userList = (LinkedList<SysVipInfo>) WebUtil.getSession().getAttribute(SystemConstance.HISTORY_CUSTOMER);
-        }
         List<SysVipInfo> vips = vipInfoService.findByVipNoOrTel(keyWord);
-        if (vips.size() > 0) {
-            // 在session存放当前查询的客户
-            MoneyCardUse cardUseInfo = cardUseService.findByVipId(vips.get(0).getId());
-            if (cardUseInfo == null) {
-                cardUseInfo=vipInfoService.addVipDefaultCard(vips.get(0).getId());
-            }
-            vips.get(0).setLevelCard(cardUseInfo);
-            WebUtil.getSession().setAttribute(SystemConstance.CURRENT_CUSTOMER, vips.get(0));
-            // 满20后删除一个
-            if (userList.size() == 20) {
-                userList.poll();
-            }
-            // 去重标志
-            boolean isNoRepeat = true;
-            for (SysVipInfo sysVipInfo : userList) {
-                if (vips.get(0).getPhone().equals(sysVipInfo.getPhone())) {
-                    isNoRepeat = false;
-                }
-            }
-            if (isNoRepeat) {
-                userList.add(vips.get(0));
-            }
-        }
-
         return new AjaxResult(AjaxResult.STATUS_SUCCESS, vips, 0);
     }
 
@@ -397,35 +372,8 @@
     @RequestMapping(value = "/findUserByPhoneOrNo")
     public @ResponseBody
     AjaxResult findUserByPhoneOrNo(String keyWord) {
-        LinkedList<SysVipInfo> userList = null;
-        // 获取最近查询客户
-        if (WebUtil.getSession().getAttribute(SystemConstance.HISTORY_CUSTOMER) == null) {
-            userList = new LinkedList<SysVipInfo>();
-            WebUtil.getSession().setAttribute(SystemConstance.HISTORY_CUSTOMER, userList);
-        } else {
-            userList = (LinkedList<SysVipInfo>) WebUtil.getSession().getAttribute(SystemConstance.HISTORY_CUSTOMER);
-        }
         List<SysVipInfo> vips = vipInfoService.findByVipNoOrTel(keyWord);
-        if (vips.size() > 0) {
-            // 在session存放当前查询的客户
-            WebUtil.getSession().setAttribute(SystemConstance.CURRENT_CUSTOMER, vips.get(0));
-            // 满20后删除一个
-            if (userList.size() == 20) {
-                userList.poll();
-            }
-            // 去重标志
-            boolean isNoRepeat = true;
-            for (SysVipInfo sysVipInfo : userList) {
-                if (vips.get(0).getPhone().equals(sysVipInfo.getPhone())) {
-                    isNoRepeat = false;
-                }
-            }
-            if (isNoRepeat) {
-                userList.add(vips.get(0));
-            }
-        }
         return new AjaxResult(AjaxResult.STATUS_SUCCESS, vips, 0);
-
     }
 
     @RequestMapping(value = "/getBirthday")
diff --git a/zq-erp/src/main/java/com/matrix/system/hiveErp/dao/TjVipSumDao.java b/zq-erp/src/main/java/com/matrix/system/hiveErp/dao/TjVipSumDao.java
index 3677903..3f1d10e 100644
--- a/zq-erp/src/main/java/com/matrix/system/hiveErp/dao/TjVipSumDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/hiveErp/dao/TjVipSumDao.java
@@ -81,6 +81,12 @@
 	// 服务时长
 	Map<String, BigDecimal> selectTimeLength(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId);
 
+	// 储值卡本金扣款
+	Map<String, BigDecimal> selectCardAmount(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId);
+
+	// 储值卡赠金扣款
+	Map<String, BigDecimal> selectFreeAmount(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId);
+
 	List<VipAchieveDataShowVo> selectVipAchieveInPage(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("userId") Long userId);
 
 	// 订单业绩
diff --git a/zq-erp/src/main/java/com/matrix/system/job/InvalidTimeJob.java b/zq-erp/src/main/java/com/matrix/system/job/InvalidTimeJob.java
index 2cd048a..ae6680e 100644
--- a/zq-erp/src/main/java/com/matrix/system/job/InvalidTimeJob.java
+++ b/zq-erp/src/main/java/com/matrix/system/job/InvalidTimeJob.java
@@ -1,5 +1,6 @@
 package com.matrix.system.job;
 
+import com.matrix.core.tools.LogUtil;
 import com.matrix.system.constance.Dictionary;
 import com.matrix.system.hive.bean.MoneyCardUse;
 import com.matrix.system.hive.bean.SysProjUse;
@@ -27,6 +28,7 @@
 
     @Scheduled(cron = "0 0 0 * * ?")
     public void setProjUseToInvalid() {
+        LogUtil.info("#项目,套餐失效任务处理#");
         List<SysProjUse> sysProjUses = sysProjUseDao.selectHasValidProjUse();
 
         List<MoneyCardUse> moneyCardUses = moneyCardUseDao.selectHasValidMoneyCardUse();
diff --git a/zq-erp/src/main/java/com/matrix/system/job/ServiceOvertimeNoticeJob.java b/zq-erp/src/main/java/com/matrix/system/job/ServiceOvertimeNoticeJob.java
index 87889ad..72e4f56 100644
--- a/zq-erp/src/main/java/com/matrix/system/job/ServiceOvertimeNoticeJob.java
+++ b/zq-erp/src/main/java/com/matrix/system/job/ServiceOvertimeNoticeJob.java
@@ -2,14 +2,8 @@
 
 import com.matrix.component.rabbitmq.RabiitMqTemplate;
 import com.matrix.core.tools.LogUtil;
-import com.matrix.system.common.bean.SysUsers;
-import com.matrix.system.constance.Dictionary;
-import com.matrix.system.hive.bean.MoneyCardUse;
 import com.matrix.system.hive.bean.SysProjServices;
-import com.matrix.system.hive.bean.SysProjUse;
-import com.matrix.system.hive.dao.MoneyCardUseDao;
 import com.matrix.system.hive.dao.SysProjServicesDao;
-import com.matrix.system.hive.dao.SysProjUseDao;
 import com.matrix.system.hive.plugin.util.CollectionUtils;
 import com.matrix.system.shopXcx.mqTask.MQTaskRouting;
 import com.matrix.system.wechart.templateMsg.UniformMsgParam;
@@ -18,7 +12,6 @@
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
-import java.util.ArrayList;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -41,7 +34,7 @@
     /**
      * 每分钟执行一次
      */
-    @Scheduled(cron = "0 0/1 * * * ?")
+    @Scheduled(cron = "0/30 * * * * ?")
     public void serviceOvertimeNotice() {
 
         List<SysProjServices> needNoticeService=projServicesDao.selectNeedNoticeService();
diff --git a/zq-erp/src/main/java/com/matrix/system/score/action/ScoreRuleSettingAction.java b/zq-erp/src/main/java/com/matrix/system/score/action/ScoreRuleSettingAction.java
new file mode 100644
index 0000000..25a2ee1
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/score/action/ScoreRuleSettingAction.java
@@ -0,0 +1,133 @@
+package com.matrix.system.score.action;
+
+import com.matrix.core.constance.MatrixConstance;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.tools.WebUtil;
+import com.matrix.system.common.bean.BusParameterSettings;
+import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
+import com.matrix.system.score.constant.ScoreSettingConstant;
+import com.matrix.system.score.service.ScoreRuleSettingService;
+import com.matrix.system.score.vo.ScoreRuleSettingsVo;
+
+import cn.hutool.core.util.StrUtil;
+
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * @author wzy
+ * @date 2021-02-22
+ **/
+@RestController
+@RequestMapping(value = "/score/ruleSetting")
+public class ScoreRuleSettingAction {
+
+    @Autowired
+    private ScoreRuleSettingService scoreRuleSettingService;
+    @Autowired
+    private BusParameterSettingsDao busParameterSettingsDao;
+
+
+    /**
+     *查询积分规则配置
+     */
+    @RequestMapping(value = "/selectScoreRule")
+    public AjaxResult selectScoreRule() {
+
+       AjaxResult result= AjaxResult.buildSuccessInstance("查询成功");
+       SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+       Long companyId = user.getCompanyId();
+       
+       //积分有效期
+       String[] jfyxqArrayCode={ScoreSettingConstant.VALID_PERIOD_POINTS};
+       String[] jfyxqArrayName={"积分有效期:从获得开始 到"};
+       List<ScoreRuleSettingsVo> jfyxqRuleSettingsVo = getRuleSettingsVo(jfyxqArrayCode,jfyxqArrayName,companyId);
+       result.putInMap("jfyxq", jfyxqRuleSettingsVo);
+       //积分抵扣现金
+       String[] jfdxjArrayCode={ScoreSettingConstant.CREDIT_POINTS_CASH};
+       String[] jfdxjArrayName={"积分抵扣现金"};
+       List<BusParameterSettings> dataList = busParameterSettingsDao.selectByCodesAndCompanyId(Arrays.asList(jfdxjArrayCode), companyId);
+       List<ScoreRuleSettingsVo> jfdxjRuleSettingsVo=new ArrayList<ScoreRuleSettingsVo>();
+       int index=0;
+       for (BusParameterSettings item:dataList){
+    	   ScoreRuleSettingsVo paramVo=new ScoreRuleSettingsVo();
+            BeanUtils.copyProperties(item,paramVo);
+            paramVo.setParamName(jfdxjArrayName[index]);
+            String paramValue = paramVo.getParamValue();
+            if(StrUtil.isNotEmpty(paramValue)) {
+            	paramVo.setParamSwitch(Boolean.TRUE);
+    		}else {
+    			paramVo.setParamSwitch(Boolean.FALSE);
+    		}
+            jfdxjRuleSettingsVo.add(paramVo);
+            index++;
+       }
+       result.putInMap("jfdxj", jfdxjRuleSettingsVo);
+       //门店积分规则
+       String[] mdjfArrayCode={
+    		   ScoreSettingConstant.CASH_CONSUMPTION,
+    		   ScoreSettingConstant.PRINCIPAL_BALANCE_CONSUMPTION,
+    		   ScoreSettingConstant.BONUS_BALANCE_CONSUMPTION,
+    		   ScoreSettingConstant.PRINCIPAL_CONSUMPTION,
+    		   ScoreSettingConstant.GIVE_CONSUMPTION,
+    		   ScoreSettingConstant.REFERRALS_CONSUMPTION};
+       String[] mdjfArrayName={
+    		   "现金消费",
+    		   "本金余额消费",
+    		   "赠金余额消费",
+    		   "本金消耗",
+    		   "赠送消耗",
+    		   "转介客户"};
+       List<ScoreRuleSettingsVo> mdjfRuleSettingsVo = getRuleSettingsVo(mdjfArrayCode,mdjfArrayName,companyId);
+       result.putInMap("mdjf", mdjfRuleSettingsVo);
+       //商城积分规则
+       String[] scjfArrayCode={
+    		   ScoreSettingConstant.CASH_CONSUMPTION_SHOP,
+    		   ScoreSettingConstant.RESERVATION_SERVICE_SHOP,
+    		   ScoreSettingConstant.EVALUATUIN_ORDER_SHOP};
+       String[] scjfArrayName={
+    		   "现金消费",
+    		   "预约服务",
+    		   "评价订单"};
+       List<ScoreRuleSettingsVo> scjfRuleSettingsVo =getRuleSettingsVo(scjfArrayCode,scjfArrayName,companyId);
+       result.putInMap("scjf", scjfRuleSettingsVo);
+       return result;
+    }
+
+    /**
+     *获取对应的积分规则设置数据
+     * @param ArrayCode
+     * @param ArrayName
+     * @param companyId
+     * @return
+     */
+    private List<ScoreRuleSettingsVo> getRuleSettingsVo(String[] ArrayCode,String[] ArrayName,Long companyId){
+    	List<BusParameterSettings> dataList = busParameterSettingsDao.selectByCodesAndCompanyId(Arrays.asList(ArrayCode), companyId);
+        List<ScoreRuleSettingsVo> scoreRuleSettingsVos=new ArrayList<ScoreRuleSettingsVo>();
+        int index=0;
+        for (BusParameterSettings item:dataList){
+        	ScoreRuleSettingsVo paramVo=new ScoreRuleSettingsVo();
+             BeanUtils.copyProperties(item,paramVo);
+             paramVo.setParamName(ArrayName[index]);
+             scoreRuleSettingsVos.add(paramVo);
+             index++;
+        }
+        return scoreRuleSettingsVos;
+    }
+
+    /**
+     * 修改公司维度的积分规则
+     */
+    @PostMapping(value = "/updateScoreRule")
+    public @ResponseBody
+    AjaxResult updateScoreRule(@RequestBody List<BusParameterSettings> busParameterSettings) {
+        return scoreRuleSettingService.updateScoreRuleByCompanyId(busParameterSettings);
+    }
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/score/constant/ScoreSettingConstant.java b/zq-erp/src/main/java/com/matrix/system/score/constant/ScoreSettingConstant.java
new file mode 100644
index 0000000..134eeae
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/score/constant/ScoreSettingConstant.java
@@ -0,0 +1,66 @@
+package com.matrix.system.score.constant;
+
+public class ScoreSettingConstant {
+
+    /**
+     * 积分有效期
+     */
+    public final static String VALID_PERIOD_POINTS = "VALID_PERIOD_POINTS";
+    public final static String VALID_PERIOD_POINTS_NAME = "积分有效期:从获得开始 到";
+    /**
+     * 积分抵扣现金
+     */
+    public final static String CREDIT_POINTS_CASH = "CREDIT_POINTS_CASH";
+    public final static String CREDIT_POINTS_CASH_NAME = "积分抵扣现金";
+
+    //门店设置
+    /**
+     * 现金消费
+     */
+    public final static String CASH_CONSUMPTION = "CASH_CONSUMPTION";
+    public final static String CASH_CONSUMPTION_NAME = "现金消费";
+    /**
+     * 本金余额消费
+     */
+    public final static String PRINCIPAL_BALANCE_CONSUMPTION = "PRINCIPAL_BALANCE_CONSUMPTION";
+    public final static String PRINCIPAL_BALANCE_CONSUMPTION_NAME = "本金余额消费";
+    /**
+     * 赠金余额消费
+     */
+    public final static String BONUS_BALANCE_CONSUMPTION = "BONUS_BALANCE_CONSUMPTION";
+    public final static String BONUS_BALANCE_CONSUMPTION_NAME = "赠金余额消费";
+    /**
+     * 本金消耗
+     */
+    public final static String PRINCIPAL_CONSUMPTION = "PRINCIPAL_CONSUMPTION";
+    public final static String PRINCIPAL_CONSUMPTION_NAME = "本金消耗";
+    /**
+     * 赠送消耗
+     */
+    public final static String GIVE_CONSUMPTION = "GIVE_CONSUMPTION";
+    public final static String GIVE_CONSUMPTION_NAME = "赠送消耗";
+    /**
+     * 转介客户
+     */
+    public final static String REFERRALS_CONSUMPTION = "REFERRALS_CONSUMPTION";
+    public final static String REFERRALS_CONSUMPTION_NAME = "转介客户";
+
+
+    //商城设置
+    /**
+     * 现金消费
+     */
+    public final static String CASH_CONSUMPTION_SHOP = "CASH_CONSUMPTION_SHOP";
+    public final static String CASH_CONSUMPTION_SHOP_NAME = "现金消费";
+    /**
+     * 预约服务
+     */
+    public final static String RESERVATION_SERVICE_SHOP = "RESERVATION_SERVICE_SHOP";
+    public final static String RESERVATION_SERVICE_SHOP_NAME = "预约服务";
+    /**
+     * 评价订单
+     */
+    public final static String EVALUATUIN_ORDER_SHOP = "EVALUATUIN_ORDER_SHOP";
+    public final static String EVALUATUIN_ORDER_SHOP_NAME = "评价订单";
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/score/dao/ScoreUseRecordDao.java b/zq-erp/src/main/java/com/matrix/system/score/dao/ScoreUseRecordDao.java
new file mode 100644
index 0000000..dae783a
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/score/dao/ScoreUseRecordDao.java
@@ -0,0 +1,25 @@
+package com.matrix.system.score.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.matrix.system.score.entity.ScoreUseRecord;
+import com.matrix.system.shopXcx.api.dto.ScoreFlowDto;
+import com.matrix.system.shopXcx.api.vo.ScoreUseRecordVo;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @description 积分记录表
+ * @author jyy
+ * @date 2021-02-26 15:26
+ */
+public interface ScoreUseRecordDao extends BaseMapper<ScoreUseRecord> {
+
+    /**
+     * 查询收支记录
+     * @param page
+     * @param scoreFlowDto
+     * @return
+     */
+    IPage<ScoreUseRecordVo> selectFlowList(Page<ScoreUseRecordVo> page, @Param("record")ScoreFlowDto scoreFlowDto);
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/score/dao/ScoreVipDetailDao.java b/zq-erp/src/main/java/com/matrix/system/score/dao/ScoreVipDetailDao.java
new file mode 100644
index 0000000..26be27d
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/score/dao/ScoreVipDetailDao.java
@@ -0,0 +1,34 @@
+package com.matrix.system.score.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.matrix.system.score.entity.ScoreVipDetail;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @description 客户积分余额
+ * @author jyy
+ * @date 2021-02-26 15:26
+ */
+public interface ScoreVipDetailDao extends BaseMapper<ScoreVipDetail> {
+
+    /**
+     * 查询用户总积分
+     * @param openId
+     * @param vipId
+     * @return
+     */
+    int selectUserTotalScore(@Param("vipId")Long vipId);
+
+    /**
+     * 查询用户有效的积分,按时间顺序排
+     * @param
+     * @return
+     */
+    List<ScoreVipDetail> selectEffectiveScore(@Param("vipId")Long vipId);
+
+    List<ScoreVipDetail> selectInvalidaVipScore();
+
+    int invalidVipScore();
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/score/dto/ScoreRuleSettingDto.java b/zq-erp/src/main/java/com/matrix/system/score/dto/ScoreRuleSettingDto.java
new file mode 100644
index 0000000..0b31eff
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/score/dto/ScoreRuleSettingDto.java
@@ -0,0 +1,8 @@
+package com.matrix.system.score.dto;
+
+/**
+ * @author wzy
+ * @date 2021-02-22
+ **/
+public class ScoreRuleSettingDto {
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/score/dto/SocreRuleDto.java b/zq-erp/src/main/java/com/matrix/system/score/dto/SocreRuleDto.java
new file mode 100644
index 0000000..ce7666e
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/score/dto/SocreRuleDto.java
@@ -0,0 +1,5 @@
+package com.matrix.system.score.dto;
+
+public class SocreRuleDto {
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/score/entity/BaseEntity.java b/zq-erp/src/main/java/com/matrix/system/score/entity/BaseEntity.java
new file mode 100644
index 0000000..3e1a1e0
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/score/entity/BaseEntity.java
@@ -0,0 +1,69 @@
+package com.matrix.system.score.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author wzy
+ * @date 2020-04-24 14:58
+ **/
+public class BaseEntity implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id",type = IdType.AUTO)
+    private Long id;
+
+    private String createBy;
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createTime;
+
+    private String updateBy;
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updateTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getUpdateBy() {
+        return updateBy;
+    }
+
+    public void setUpdateBy(String updateBy) {
+        this.updateBy = updateBy;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/score/entity/ScoreUseRecord.java b/zq-erp/src/main/java/com/matrix/system/score/entity/ScoreUseRecord.java
new file mode 100644
index 0000000..075e21c
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/score/entity/ScoreUseRecord.java
@@ -0,0 +1,92 @@
+package com.matrix.system.score.entity;
+
+import com.matrix.core.anotations.Extend;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import lombok.Data;
+
+/**
+ * @description 积分记录表
+ * @author jyy
+ * @date 2021-02-26 15:26
+ */
+@Data
+@TableName("score_use_record")
+public class ScoreUseRecord  extends BaseEntity{
+	@Extend
+	private static final long serialVersionUID = 1L;
+
+
+
+
+	
+	/**
+	 * 记录类型(1:现金消费2:员工划扣3赠送等)
+	 */
+
+
+	private Integer  type;
+	
+	/**
+	 * 数量
+	 */
+
+
+	private Integer  recNum;
+	
+	/**
+	 * 业务记录ID
+	 */
+
+
+	private Long  businessId;
+	/**
+	 * 操作人id
+	 */
+	Long oprationUserId;
+	/**
+	 * 积分卡ID
+	 */
+
+
+	private Long  scoreVipDetailId;
+	
+	/**
+	 * 原积分
+	 */
+
+
+	private Integer  preScore;
+	
+	/**
+	 * 现积分
+	 */
+
+
+	private Integer  nowScore;
+	
+	/**
+	 * 操作人ID
+	 */
+	private Long vipId;
+
+	private Long shopId;
+
+	/**
+	 * 备注
+	 */
+
+
+	private String  remarks;
+	
+	/**
+	 * 所属公司_id
+	 */
+
+
+	private Long  companyId;
+
+
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/score/entity/ScoreVipDetail.java b/zq-erp/src/main/java/com/matrix/system/score/entity/ScoreVipDetail.java
new file mode 100644
index 0000000..b32fe45
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/score/entity/ScoreVipDetail.java
@@ -0,0 +1,131 @@
+package com.matrix.system.score.entity;
+
+import com.matrix.core.anotations.Extend;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @description 客户积分余额
+ * @author jyy
+ * @date 2021-02-26 15:26
+ */
+@Data
+@TableName("score_vip_detail")
+public class ScoreVipDetail  extends BaseEntity{
+	@Extend
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 获取类型(1:现金消费)
+	 */
+	public static final int SCORE_VIP_TYPE_CASH=1;
+
+
+	/**
+	 * 获取类型(2:赠送等)
+	 */
+	public static final int SCORE_VIP_TYPE_CONSUME=2;
+	/**
+	 * 获取类型(3推荐客户)
+	 */
+	public static final int SCORE_VIP_TYPE_REFERRER=3;
+	/**
+	 * 获取类型(4参加活动)
+	 */
+	public static final int SCORE_VIP_TYPE_JOIN_ACTIVE=4;
+
+
+	/**
+	 * 获取类型(4人工调整)
+	 */
+	public static final int SCORE_VIP_TYPE_USERCHANGE=4;
+	/**
+	 * 获取类型(5积分失效)
+	 */
+	public static final int SCORE_OVER_TIME=5;
+
+	/** 有效*/
+	public static final int SCORE_STATUS_YX=1;
+	/** 无效*/
+	public static final int SCORE_STATUS_WX=2;
+
+
+
+
+
+	/**
+	 * erp用户Id
+	 */
+	private Long vipId;
+
+	
+	/**
+	 * 获取类型(1:现金消费2:赠送等)
+	 */
+
+
+	private Integer  type;
+	
+	/**
+	 * 积分总数
+	 */
+
+
+	private Integer  allScore;
+	
+	/**
+	 * 已使用积分
+	 */
+
+
+	private Integer  usedScore;
+	
+	/**
+	 * 剩余积分
+	 */
+
+
+	private Integer  remainScore;
+	
+	/**
+	 * 获取时间
+	 */
+
+
+	private Date gainTime;
+	
+	/**
+	 * 到期时间
+	 */
+
+
+	private Date  validiteTime;
+	
+	/**
+	 * 有效状态(1:有效 2:无效)
+	 */
+
+
+	private Integer  state;
+	
+	/**
+	 * 原始单据ID
+	 */
+
+
+	private Long  businessId;
+	
+	/**
+	 * 所属公司_id
+	 */
+
+
+	private Long  companyId;
+
+
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/score/mapper/ScoreRuleSettingMapper.java b/zq-erp/src/main/java/com/matrix/system/score/mapper/ScoreRuleSettingMapper.java
new file mode 100644
index 0000000..deb3e80
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/score/mapper/ScoreRuleSettingMapper.java
@@ -0,0 +1,8 @@
+package com.matrix.system.score.mapper;
+
+/**
+ * @author wzy
+ * @date 2021-02-22
+ **/
+public class ScoreRuleSettingMapper {
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/score/scheduledJob/ScoreScheduledJob.java b/zq-erp/src/main/java/com/matrix/system/score/scheduledJob/ScoreScheduledJob.java
new file mode 100644
index 0000000..edef129
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/score/scheduledJob/ScoreScheduledJob.java
@@ -0,0 +1,64 @@
+package com.matrix.system.score.scheduledJob;
+
+
+import cn.hutool.core.date.DateTime;
+import com.matrix.core.tools.LogUtil;
+import com.matrix.system.common.constance.AppConstance;
+import com.matrix.system.score.dao.ScoreUseRecordDao;
+import com.matrix.system.score.dao.ScoreVipDetailDao;
+import com.matrix.system.score.entity.ScoreUseRecord;
+import com.matrix.system.score.entity.ScoreVipDetail;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * 用户积分相关定时任务
+ *
+ * @author jyy
+ */
+@Component
+public class ScoreScheduledJob {
+
+
+    @Autowired
+    ScoreVipDetailDao scoreVipDetailDao;
+
+    @Autowired
+    ScoreUseRecordDao scoreUseRecordDao;
+
+    @Scheduled(cron = "1 0 0 1/1 * ?")
+    public boolean invalidVipScore() {
+
+        LogUtil.info("计算无效积分定时任务开始运行****************");
+
+        //获取所有失效的积分,生成失效记录
+        List<ScoreVipDetail>  invalidavipScoreList = scoreVipDetailDao.selectInvalidaVipScore();
+
+        for (ScoreVipDetail scoreVipDetail : invalidavipScoreList) {
+            ScoreUseRecord scoreUseRecord=new ScoreUseRecord();
+            scoreUseRecord.setCreateBy(AppConstance.SYSTEM_USER);
+            scoreUseRecord.setUpdateBy(AppConstance.SYSTEM_USER);
+            scoreUseRecord.setCreateTime(DateTime.now());
+            scoreUseRecord.setUpdateTime(DateTime.now());
+            scoreUseRecord.setNowScore(0);
+            scoreUseRecord.setCompanyId(scoreVipDetail.getCompanyId());
+            scoreUseRecord.setScoreVipDetailId(scoreVipDetail.getId());
+            scoreUseRecord.setBusinessId(0L);
+            scoreUseRecord.setRecNum(-scoreVipDetail.getRemainScore());
+            scoreUseRecord.setType(ScoreVipDetail.SCORE_OVER_TIME);
+            scoreUseRecord.setVipId(scoreVipDetail.getVipId());
+            scoreUseRecord.setPreScore(scoreVipDetail.getRemainScore());
+            scoreUseRecord.setRemarks("积分失效");
+            scoreUseRecordDao.insert(scoreUseRecord);
+        }
+        //更新失效积分记录状态
+        scoreVipDetailDao.invalidVipScore();
+        LogUtil.info("计算无效积分定时任务结束*******************");
+        return true;
+    }
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/score/service/ScoreRuleSettingService.java b/zq-erp/src/main/java/com/matrix/system/score/service/ScoreRuleSettingService.java
new file mode 100644
index 0000000..4e91105
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/score/service/ScoreRuleSettingService.java
@@ -0,0 +1,55 @@
+package com.matrix.system.score.service;
+
+import com.matrix.core.constance.MatrixConstance;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.tools.StringUtils;
+import com.matrix.core.tools.WebUtil;
+import com.matrix.system.common.bean.BusParameterSettings;
+import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
+import com.matrix.system.hive.dao.SysVipInfoDao;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @author wzy
+ * @date 2021-02-22
+ **/
+@Service
+public class ScoreRuleSettingService{
+
+    @Autowired
+    private BusParameterSettingsDao busParameterSettingsDao;
+    @Autowired
+    private SysVipInfoDao sysVipInfoDao;
+
+    public AjaxResult updateScoreRuleByCompanyId(List<BusParameterSettings> busParameterSettings) {
+        //获取当前登录人员信息
+        SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+        for (BusParameterSettings busParameterSetting:busParameterSettings ) {
+            String paramCode = busParameterSetting.getParamCode();
+            if(StringUtils.isNotBlank(paramCode)){
+                //删除原有code
+                BusParameterSettings delParanm=new BusParameterSettings();
+                delParanm.setCompanyId(user.getCompanyId());
+                delParanm.setParamCode(paramCode);
+                busParameterSettingsDao.deleteByModel(delParanm);
+                //添加新的code
+                BusParameterSettings newParam=new BusParameterSettings();
+                newParam.setParamCode(paramCode);
+                newParam.setCompanyId(user.getCompanyId());
+                newParam.setParamValue(busParameterSetting.getParamValue());
+                newParam.setParamValue1(busParameterSetting.getParamValue1());
+                newParam.setParamValue2(busParameterSetting.getParamValue2());
+                busParameterSettingsDao.insert(newParam);
+            }else{
+                return AjaxResult.buildFailInstance("code不能为空");
+            }
+        }
+        AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, "更新成功");
+        return result;
+    }
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/score/service/ScoreVipDetailService.java b/zq-erp/src/main/java/com/matrix/system/score/service/ScoreVipDetailService.java
new file mode 100644
index 0000000..7c27a80
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/score/service/ScoreVipDetailService.java
@@ -0,0 +1,287 @@
+package com.matrix.system.score.service;
+
+import cn.hutool.core.date.DateTime;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.matrix.core.constance.MatrixConstance;
+import com.matrix.core.exception.GlobleException;
+import com.matrix.core.tools.DateUtil;
+import com.matrix.core.tools.StringUtils;
+import com.matrix.system.common.bean.BusParameterSettings;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
+import com.matrix.system.common.dao.SysUsersDao;
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.hive.dao.SysVipInfoDao;
+import com.matrix.system.score.constant.ScoreSettingConstant;
+import com.matrix.system.score.dao.ScoreUseRecordDao;
+import com.matrix.system.score.dao.ScoreVipDetailDao;
+import com.matrix.system.score.entity.ScoreUseRecord;
+import com.matrix.system.score.entity.ScoreVipDetail;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author jyy
+ * @description 客户积分余额
+ * @date 2021-02-26 15:26
+ */
+@Service
+public class ScoreVipDetailService extends ServiceImpl<ScoreVipDetailDao, ScoreVipDetail> {
+
+    @Autowired
+    ScoreVipDetailDao scoreVipDetailDao;
+
+    @Autowired
+    ScoreUseRecordDao scoreUseRecordDao;
+
+    @Autowired
+    SysVipInfoDao sysVipInfoDao;
+
+    @Autowired
+    SysVipInfoDao vipInfoDao;
+
+    @Autowired
+    SysUsersDao sysUsersDao;
+
+    @Autowired
+    BusParameterSettingsDao busParameterSettingsDao;
+
+    /**
+     * 扣除用户积分
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public void deductionScore(Long vipId, Long oprationUserId, Long shopId, Integer score, Long businessId, int type, String remark) {
+        Long companyId = vipInfoDao.selectById(vipId).getCompanyId();
+
+        String createBy = MatrixConstance.SYSTEM_USER;
+        if (oprationUserId != null) {
+            createBy = sysUsersDao.selectById(oprationUserId).getSuName();
+        }
+
+        List<ScoreVipDetail> effectiveScoreList = scoreVipDetailDao.selectEffectiveScore(vipId);
+
+        for (ScoreVipDetail scoreVipDetail : effectiveScoreList) {
+
+            ScoreUseRecord scoreUseRecord = new ScoreUseRecord();
+            scoreUseRecord.setPreScore(scoreVipDetail.getRemainScore());
+
+            int surplus = scoreVipDetail.getRemainScore() - score;
+            int currentDedution = 0;
+            if (surplus > 0 || surplus == 0) {
+                //余额充足
+                currentDedution = score;
+                scoreVipDetail.setRemainScore(surplus);
+                if (surplus == 0) {
+                    scoreVipDetail.setState(ScoreVipDetail.SCORE_STATUS_WX);
+                }
+                scoreVipDetailDao.updateById(scoreVipDetail);
+                score = 0;
+            } else {
+                currentDedution = scoreVipDetail.getRemainScore();
+                scoreVipDetail.setState(ScoreVipDetail.SCORE_STATUS_WX);
+                scoreVipDetail.setRemainScore(0);
+                scoreVipDetailDao.updateById(scoreVipDetail);
+                score = Math.abs(surplus);
+            }
+
+
+            //新增扣除记录
+            scoreUseRecord.setCreateBy(createBy);
+            scoreUseRecord.setUpdateBy(createBy);
+            scoreUseRecord.setCreateTime(DateTime.now());
+            scoreUseRecord.setUpdateTime(DateTime.now());
+            scoreUseRecord.setNowScore(scoreVipDetail.getRemainScore());
+            scoreUseRecord.setCompanyId(companyId);
+            scoreUseRecord.setScoreVipDetailId(scoreVipDetail.getId());
+            scoreUseRecord.setBusinessId(businessId);
+            scoreUseRecord.setRecNum(-currentDedution);
+            scoreUseRecord.setType(type);
+            scoreUseRecord.setShopId(shopId);
+            scoreUseRecord.setVipId(vipId);
+            scoreUseRecord.setRemarks(remark);
+            scoreUseRecord.setOprationUserId(oprationUserId);
+            scoreUseRecordDao.insert(scoreUseRecord);
+
+            if (surplus > 0 || surplus == 0) {
+                break;
+            }
+        }
+        if (score > 0) {
+            throw new GlobleException("积分不足");
+        }
+    }
+
+    /**
+     * 新增用户积分
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public void addScore(Long vipId, Long oprationUserId, Long shopId, Integer score, Long businessId, int type, String remark) {
+        Long companyId = vipInfoDao.selectById(vipId).getCompanyId();
+
+        if (score < 0) {
+            throw new IllegalArgumentException("score必须有为大于零的数");
+        }
+
+        String createBy = MatrixConstance.SYSTEM_USER;
+        if (oprationUserId != null) {
+            createBy = sysUsersDao.selectById(oprationUserId).getSuName();
+        }
+
+        //计算过期时间
+        BusParameterSettings yxqSetting = busParameterSettingsDao.selectCompanyParamByCode(ScoreSettingConstant.VALID_PERIOD_POINTS, companyId);
+        Calendar cal = Calendar.getInstance();
+        int year = cal.get(Calendar.YEAR);
+        int sxYear = year + (Integer.parseInt(yxqSetting.getParamValue()) - 1);
+        Date sxys = DateUtil.stringToDate(sxYear + "-12-31 23:59", DateUtil.DATE_FORMAT_MM);
+
+        ScoreVipDetail scoreVipDetail = new ScoreVipDetail();
+
+        scoreVipDetail.setCreateBy(createBy);
+        scoreVipDetail.setUpdateBy(createBy);
+        scoreVipDetail.setCreateTime(DateTime.now());
+        scoreVipDetail.setUpdateTime(DateTime.now());
+        scoreVipDetail.setState(ScoreVipDetail.SCORE_STATUS_YX);
+        scoreVipDetail.setRemainScore(score);
+        scoreVipDetail.setUsedScore(0);
+        scoreVipDetail.setBusinessId(businessId);
+        scoreVipDetail.setValiditeTime(sxys);
+        scoreVipDetail.setVipId(vipId);
+        scoreVipDetail.setGainTime(DateTime.now());
+        scoreVipDetail.setAllScore(score);
+        scoreVipDetail.setType(type);
+        scoreVipDetail.setCompanyId(companyId);
+        scoreVipDetailDao.insert(scoreVipDetail);
+
+        //新增添加记录
+        ScoreUseRecord scoreUseRecord = new ScoreUseRecord();
+        scoreUseRecord.setPreScore(score);
+        scoreUseRecord.setCreateBy(createBy);
+        scoreUseRecord.setUpdateBy(createBy);
+        scoreUseRecord.setCreateTime(DateTime.now());
+        scoreUseRecord.setUpdateTime(DateTime.now());
+        scoreUseRecord.setNowScore(score);
+        scoreUseRecord.setCompanyId(companyId);
+        scoreUseRecord.setScoreVipDetailId(scoreVipDetail.getId());
+        scoreUseRecord.setBusinessId(businessId);
+        scoreUseRecord.setRecNum(score);
+        scoreUseRecord.setType(type);
+        scoreUseRecord.setVipId(vipId);
+        scoreUseRecord.setShopId(shopId);
+        scoreUseRecord.setOprationUserId(oprationUserId);
+        scoreUseRecord.setRemarks(remark);
+        scoreUseRecordDao.insert(scoreUseRecord);
+
+
+    }
+
+    /**
+     * 根据固定等级规则新增用户积分
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public void addScoreByParamSetting(Long vipId, Long oprationUserId, Long shopId, Long businessId, int type, String remark, BusParameterSettings parameterSetting) {
+
+        if (parameterSetting != null) {
+            SysVipInfo vipInfo = sysVipInfoDao.selectById(vipId);
+            //添加自己的积分
+            if (StringUtils.isNotBlank(parameterSetting.getParamValue())) {
+                Integer firstScore = new Integer(parameterSetting.getParamValue());
+                if (firstScore > 0) {
+                    addScore(
+                            vipInfo.getId(),
+                            oprationUserId,
+                            shopId,
+                            firstScore,
+                            businessId,
+                            type,
+                            remark
+                    );
+                }
+            }
+
+            if (StringUtils.isNotBlank(parameterSetting.getParamValue1())
+                    && vipInfo.getRecommendId() != null) {
+                //推荐注册老带新积分奖励
+                SysVipInfo referrerVip = sysVipInfoDao.selectById(vipInfo.getRecommendId());
+                Integer secondScore = new Integer(parameterSetting.getParamValue1());
+                if (secondScore > 0) {
+                    addScore(
+                            referrerVip.getId(),
+                            oprationUserId,
+                            shopId,
+                            secondScore,
+                            businessId,
+                            type,
+                            remark
+                    );
+                }
+                //推荐注册二级带新积分奖励
+                if (StringUtils.isNotBlank(parameterSetting.getParamValue2())
+                        && referrerVip.getRecommendId() != null) {
+                    Integer threeScore = new Integer(parameterSetting.getParamValue2());
+                    if (threeScore > 0) {
+                        addScore(
+                                referrerVip.getRecommendId(),
+                                oprationUserId,
+                                shopId,
+                                threeScore,
+                                businessId,
+                                type,
+                                remark
+                        );
+                    }
+                }
+            }
+        }
+    }
+
+
+    /**
+     * 退积分
+     */
+    public void refundScore(Long vipId, Integer score, Long oldBusinessId, int type) {
+
+        Long companyId = vipInfoDao.selectById(vipId).getCompanyId();
+
+        if (score < 0) {
+            throw new IllegalArgumentException("score必须有为大于零的数");
+        }
+        //查询原始使用记录
+        QueryWrapper queryWrapper = new QueryWrapper();
+        queryWrapper.eq("business_id", oldBusinessId);
+        queryWrapper.eq("company_id", companyId);
+        queryWrapper.eq("type", type);
+        List<ScoreUseRecord> scoreUseRecordList = scoreUseRecordDao.selectList(queryWrapper);
+        scoreUseRecordList.forEach(scoreUseRecord -> {
+            ScoreVipDetail scoreVipDetail = scoreVipDetailDao.selectById(scoreUseRecord.getScoreVipDetailId());
+            if (scoreVipDetail != null) {
+                if (DateTime.now().isAfter(scoreVipDetail.getValiditeTime())) {
+                    //积分还有效
+                    scoreVipDetail.setRemainScore(scoreVipDetail.getRemainScore() + score);
+                    scoreVipDetail.setUsedScore(scoreVipDetail.getUsedScore() - score);
+                    scoreVipDetail.setState(ScoreVipDetail.SCORE_STATUS_YX);
+                    scoreVipDetailDao.updateById(scoreVipDetail);
+                    scoreUseRecordDao.deleteById(scoreUseRecord.getId());
+                }
+            }
+
+        });
+    }
+
+    public void removeByBusinessId(Long vipId, Long oldBusinessId) {
+        Long companyId = vipInfoDao.selectById(vipId).getCompanyId();
+
+        if (oldBusinessId == null) {
+            throw new IllegalArgumentException("oldBusinessId必须有");
+        }
+        QueryWrapper queryWrapper = new QueryWrapper();
+        queryWrapper.eq("business_id", oldBusinessId);
+        queryWrapper.eq("company_id", companyId);
+        scoreVipDetailDao.delete(queryWrapper);
+        scoreUseRecordDao.delete(queryWrapper);
+    }
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/score/vo/ScoreRuleSettingsVo.java b/zq-erp/src/main/java/com/matrix/system/score/vo/ScoreRuleSettingsVo.java
new file mode 100644
index 0000000..0aeb028
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/score/vo/ScoreRuleSettingsVo.java
@@ -0,0 +1,139 @@
+package com.matrix.system.score.vo;
+
+import com.matrix.core.anotations.Extend;
+
+public class ScoreRuleSettingsVo {
+	@Extend
+    private static final long serialVersionUID = 1L;
+
+
+    private Long paramId;
+    /**
+     * 参数名称
+     */
+    private String paramName;
+	/**
+     * 参数编码
+     */
+    private String paramCode;
+
+    /**
+     * switch按钮
+     */
+    private Boolean paramSwitch;
+
+
+    /**
+     * 参数值
+     */
+    private String paramValue;
+
+
+    /**
+     * 值1
+     */
+    private String paramValue1;
+
+
+    /**
+     * 值2
+     */
+    private String paramValue2;
+
+
+    /**
+     * 值3
+     */
+    private String paramValue3;
+
+    private Long companyId;
+
+    private Long shopId;
+
+
+    public Long getShopId() {
+        return shopId;
+    }
+
+    public void setShopId(Long shopId) {
+        this.shopId = shopId;
+    }
+
+    public Long getCompanyId() {
+        return companyId;
+    }
+
+    public void setCompanyId(Long companyId) {
+        this.companyId = companyId;
+    }
+
+    public Long getParamId() {
+        return paramId;
+    }
+
+    public void setParamId(Long paramId) {
+        this.paramId = paramId;
+    }
+
+
+    public String getParamCode() {
+        return paramCode;
+    }
+
+    public void setParamCode(String paramCode) {
+        this.paramCode = paramCode;
+    }
+
+
+    public String getParamValue() {
+        return paramValue;
+    }
+
+    public void setParamValue(String paramValue) {
+        this.paramValue = paramValue;
+    }
+
+
+    public String getParamValue1() {
+        return paramValue1;
+    }
+
+    public void setParamValue1(String paramValue1) {
+        this.paramValue1 = paramValue1;
+    }
+
+
+    public String getParamValue2() {
+        return paramValue2;
+    }
+
+    public void setParamValue2(String paramValue2) {
+        this.paramValue2 = paramValue2;
+    }
+
+
+    public String getParamValue3() {
+        return paramValue3;
+    }
+
+    public void setParamValue3(String paramValue3) {
+        this.paramValue3 = paramValue3;
+    }
+
+	public String getParamName() {
+		return paramName;
+	}
+
+	public void setParamName(String paramName) {
+		this.paramName = paramName;
+	}
+
+	public Boolean getParamSwitch() {
+		return paramSwitch;
+	}
+
+	public void setParamSwitch(Boolean paramSwitch) {
+		this.paramSwitch = paramSwitch;
+	}
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopActivitiesAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopActivitiesAction.java
index ae33fac..a0b3313 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopActivitiesAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopActivitiesAction.java
@@ -1,29 +1,32 @@
 package com.matrix.system.shopXcx.action;
 
-import com.matrix.core.constance.MatrixConstance;
-import com.matrix.core.constance.SystemMessageCode;
-import com.matrix.core.pojo.PaginationVO;
-import com.matrix.core.tools.*;
-import com.matrix.core.web.BaseAction;
-import com.matrix.core.constance.SystemErrorCode;
 import com.matrix.core.anotations.RemoveRequestToken;
+import com.matrix.core.anotations.SaveRequestToken;
+import com.matrix.core.constance.MatrixConstance;
+import com.matrix.core.constance.SystemErrorCode;
+import com.matrix.core.constance.SystemMessageCode;
+import com.matrix.core.exception.GlobleException;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.pojo.PaginationVO;
+import com.matrix.core.tools.DateUtil;
+import com.matrix.core.tools.ModelUtils;
+import com.matrix.core.tools.StringUtils;
+import com.matrix.core.tools.WebUtil;
 import com.matrix.system.common.bean.SysUsers;
 import com.matrix.system.hive.plugin.util.CollectionUtils;
 import com.matrix.system.shopXcx.bean.*;
 import com.matrix.system.shopXcx.dao.*;
 import com.matrix.system.shopXcx.dto.SalonDTO;
 import com.matrix.system.shopXcx.dto.SecKillDTO;
-import org.springframework.stereotype.Controller;
-import com.matrix.core.exception.GlobleException;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.*;
-import com.matrix.core.anotations.SaveRequestToken;
-import com.matrix.core.pojo.AjaxResult;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
 
-import java.math.BigDecimal;
-import java.util.Arrays;
 import java.util.Comparator;
 import java.util.List;
 import java.util.Map;
@@ -308,13 +311,8 @@
 
         shopActivitiesDao.deleteById(actId);
         shopActivitiesGroupInfoDao.deleteByActId(actId);
-        int i = shopActivitiesGroupPriceDao.deleteByActId(actId);
-
-        if (i > 0) {
-            return new AjaxResult(AjaxResult.STATUS_SUCCESS, SystemMessageCode.DELETE_SUCCES, i);
-        } else {
-            throw new GlobleException(SystemErrorCode.DATA_DELETE_FAIL);
-        }
+        shopActivitiesGroupPriceDao.deleteByActId(actId);
+        return new AjaxResult(AjaxResult.STATUS_SUCCESS, SystemMessageCode.DELETE_SUCCES);
     }
 
     @RequestMapping(value = "/closeAct")
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopBizUserScoreAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopBizUserScoreAction.java
index 186022e..9e074ae 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopBizUserScoreAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopBizUserScoreAction.java
@@ -1,25 +1,10 @@
 package com.matrix.system.shopXcx.action;
 
-import com.matrix.biz.bean.BizUser;
-import com.matrix.biz.service.BizUserService;
-import com.matrix.core.anotations.RemoveRequestToken;
-import com.matrix.core.anotations.SaveRequestToken;
-import com.matrix.core.constance.MatrixConstance;
-import com.matrix.core.pojo.AjaxResult;
-import com.matrix.core.tools.StringUtils;
-import com.matrix.core.tools.WebUtil;
-import com.matrix.system.common.bean.SysUsers;
-import com.matrix.system.shopXcx.bean.ShopScoreExchange;
+import com.matrix.system.hive.service.SysVipInfoService;
 import com.matrix.system.shopXcx.dao.ShopScoreExchangeDao;
-import com.matrix.system.shopXcx.pojo.ExchangeScorePOJO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
-import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.servlet.ModelAndView;
-
-import java.util.Date;
 
 
 /**
@@ -32,7 +17,7 @@
 public class ShopBizUserScoreAction {
 
     @Autowired
-    private BizUserService bizUserService;
+    private SysVipInfoService sysVipInfoService;
     @Autowired
     private ShopScoreExchangeDao shopScoreExchangeDao;
 
@@ -40,75 +25,6 @@
      * 记录编辑前的值Before_Edit_Value
      */
     public static final String BEV = "ShopBizUserScore_BEV";
-
-
-    /**
-     * 进入积分兑换界面
-     */
-    @SaveRequestToken
-    @RequestMapping(value = "/intoExchangePage")
-    public ModelAndView exchangeScore(String userId) {
-        BizUser bizUser = new BizUser();
-        ModelAndView modelAndView = new ModelAndView("admin/shop/user-score-exchange");
-        if (StringUtils.isNotBlank(userId)) {
-            bizUser = bizUserService.findById(userId);
-            if (bizUser.getCurrentScore() == null) {
-                bizUser.setCurrentScore(0);
-            }
-        }
-        modelAndView.addObject("obj", bizUser);
-        return modelAndView;
-    }
-
-
-    /**
-     * 兑换积分
-     */
-    @Transactional(rollbackFor = Exception.class)
-    @RemoveRequestToken
-    @RequestMapping(value = "/exchangeScore")
-    public @ResponseBody
-    AjaxResult exchangeScore(ExchangeScorePOJO pojo) {
-        //校验参数中用户ID和用户兑换积分是否有效
-        if (pojo == null || StringUtils.isBlank(pojo.getUserId())
-                || pojo.getScore() == null || pojo.getScore() == 0) {
-            return new AjaxResult(AjaxResult.STATUS_FAIL, "提交参数有误!");
-        }
-        //兑换积分用户信息
-        BizUser bizUser = bizUserService.findById(pojo.getUserId());
-        if (bizUser == null) {
-            return new AjaxResult(AjaxResult.STATUS_FAIL, "没有查询到相应用户!");
-        }
-        if (bizUser.getCurrentScore() == null) {
-            bizUser.setCurrentScore(0);
-        }
-        //如果兑换积分大于用户当前积分
-        if (pojo.getScore() > bizUser.getCurrentScore()) {
-            return new AjaxResult(AjaxResult.STATUS_FAIL, "兑换积分大于用户当前积分!");
-        }
-        //剩余积分 = 当前积分 - 兑换积分
-        Integer remainScore = bizUser.getCurrentScore() - pojo.getScore();
-        //当前操作用户信息
-        SysUsers loginUser = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
-        //修改用户剩余积分
-        BizUser updateModel = new BizUser();
-        updateModel.setUserId(bizUser.getUserId());
-        updateModel.setCurrentScore(remainScore);
-        updateModel.setUpdateBy(loginUser.getSuName());
-        updateModel.setUpdateTime(new Date());
-        bizUserService.modifyByModel(updateModel);
-        //添加积分兑换记录
-        ShopScoreExchange insertExchange = new ShopScoreExchange();
-        insertExchange.setCreateBy(loginUser.getSuName());
-        insertExchange.setUpdateBy(loginUser.getSuName());
-        insertExchange.setUserId(bizUser.getOpenId());
-        insertExchange.setExchangeScore(pojo.getScore());
-        insertExchange.setOperateId(loginUser.getSuId());
-        insertExchange.setRemark(pojo.getRemarks());
-        shopScoreExchangeDao.insert(insertExchange);
-
-        return new AjaxResult(AjaxResult.STATUS_SUCCESS, "兑换成功!");
-    }
 
 
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopDeliveryInfoAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopDeliveryInfoAction.java
index 9e1504a..636b4ba 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopDeliveryInfoAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopDeliveryInfoAction.java
@@ -12,20 +12,18 @@
 import com.matrix.core.tools.ModelUtils;
 import com.matrix.core.tools.StringUtils;
 import com.matrix.core.tools.WebUtil;
-import com.matrix.system.common.bean.CustomerDataDictionary;
-import com.matrix.system.common.bean.SystemDictionary;
-import com.matrix.system.common.dao.CustomerDataDictionaryDao;
 import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.common.bean.SystemDictionary;
 import com.matrix.system.common.constance.AppConstance;
+import com.matrix.system.common.dao.CustomerDataDictionaryDao;
 import com.matrix.system.common.dao.SystemDictionaryDao;
-import com.matrix.system.constance.Dictionary;
 import com.matrix.system.hive.action.BaseController;
+import com.matrix.system.shopXcx.api.tools.WxShopOrderUtil;
 import com.matrix.system.shopXcx.bean.ShopDeliveryInfo;
 import com.matrix.system.shopXcx.bean.ShopOrder;
 import com.matrix.system.shopXcx.dao.ShopDeliveryInfoDao;
 import com.matrix.system.shopXcx.dao.ShopLogisticsInfoDao;
 import com.matrix.system.shopXcx.dao.ShopOrderDao;
-import com.matrix.system.shopXcx.api.tools.WxShopOrderUtil;
 import com.matrix.system.shopXcx.mqTask.MQTaskRouting;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -86,11 +84,6 @@
         pageVo.setSort("create_time");
         pageVo.setOrder("desc");
         shopDeliveryInfo.setCompanyId(sysUsers.getCompanyId());
-        if (getMe().getShopRole().equals(Dictionary.FLAG_NO_N)) {
-            shopDeliveryInfo.setShopId(sysUsers.getShopId());
-        }
-
-
         List<ShopDeliveryInfo> dataList = shopDeliveryInfoDao.selectInPage(shopDeliveryInfo, pageVo);
         AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList,
                 shopDeliveryInfoDao.selectTotalRecord(shopDeliveryInfo));
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopOrderAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopOrderAction.java
index 49d6d78..7b7cdc0 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopOrderAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopOrderAction.java
@@ -1,7 +1,10 @@
 package com.matrix.system.shopXcx.action;
 
 
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.util.ObjectUtil;
 import com.google.gson.Gson;
+import com.matrix.component.rabbitmq.RabiitMqTemplate;
 import com.matrix.core.anotations.RemoveRequestToken;
 import com.matrix.core.anotations.SaveRequestToken;
 import com.matrix.core.constance.MatrixConstance;
@@ -16,25 +19,33 @@
 import com.matrix.core.tools.excl.ExcelVersion;
 import com.matrix.system.common.bean.SysUsers;
 import com.matrix.system.common.constance.AppConstance;
-import com.matrix.system.constance.Dictionary;
 import com.matrix.system.hive.action.BaseController;
 import com.matrix.system.hive.action.util.QueryUtil;
 import com.matrix.system.hive.bean.SysShopInfo;
+import com.matrix.system.hive.bean.SysVipInfo;
 import com.matrix.system.hive.dao.SysShopInfoDao;
+import com.matrix.system.hive.service.SysVipInfoService;
 import com.matrix.system.shopXcx.bean.*;
 import com.matrix.system.shopXcx.dao.*;
 import com.matrix.system.shopXcx.dto.DiscountExplain;
+import com.matrix.system.shopXcx.mqTask.MQTaskRouting;
 import com.matrix.system.shopXcx.pojo.ShopOrderQueryPOJO;
 import com.matrix.system.shopXcx.shopEnum.OrderStatusEnum;
+import com.matrix.system.shopXcx.vo.LogisticsImportVo;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Controller;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.servlet.ModelAndView;
 
+import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.io.File;
 import java.io.IOException;
 import java.io.OutputStream;
 import java.math.BigDecimal;
@@ -62,10 +73,196 @@
     private WxApplyOrderRelateDao wxApplyOrderRelateDao;
     @Autowired
     private SysShopInfoDao sysShopInfoDao;
+    @Autowired
+    private SysVipInfoService vipInfoService;
+    @Autowired
+    private RabiitMqTemplate rabiitMqTemplate;
 
     //记录编辑前的值Before_Edit_Value
     public static final String BEV = "ShopOrder_BEV";
 
+    public static final List<LogisticsImportVo> logisticsImportVoLists = new ArrayList<>();
+
+    @Value("${evn}")
+    private String evn;
+    
+    /**
+     * 导入快递单
+     */
+    @RequestMapping(value = "/logisticsImport")
+    @ResponseBody
+    public AjaxResult logisticsImport(HttpServletResponse response, HttpServletRequest request,
+    	@RequestParam(value = "file", required = false) MultipartFile file) throws IOException {
+
+        String fileName = file.getOriginalFilename();
+        String dirPath = PropertiesUtil.getString(AppConstance.FILES_TORAGE_PATH);
+//        String dirPath = "E:/xcshop";
+        File fileDir = new File(dirPath);
+        LogUtil.info("#----->{}#", fileDir.exists());
+        if (!fileDir.exists()) {
+            fileDir.mkdirs();
+        }
+        File saveFile = new File(dirPath + "/" + fileName);
+        file.transferTo(saveFile);
+
+        String infoRemind = "提示:";
+        AjaxResult ajaxResult = new AjaxResult();
+        List<LogisticsImportVo> logisticsImportVos = logisticsImportFile(saveFile);
+        if(CollUtil.isNotEmpty(logisticsImportVos)){
+            ajaxResult = AjaxResult.buildSuccessInstance("部分数据导入失败");
+            ajaxResult.setStatus(AjaxResult.STATUS_FAIL);
+        }else{
+            ajaxResult = AjaxResult.buildSuccessInstance("导入成功");
+            ajaxResult.setStatus(AjaxResult.STATUS_SUCCESS);
+        }
+        return ajaxResult;
+    }
+
+    @RequestMapping(value = "/exportLogisticsImportExcel")
+    public void exportLogisticsImportExcel(HttpServletResponse res) {
+        OutputStream os = null;
+        try {
+            res.setCharacterEncoding("UTF-8");
+            res.setHeader("content-type", "application/octet-stream;charset=UTF-8");
+            res.setContentType("application/octet-stream;charset=UTF-8");
+            Date date = new Date();
+            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日HH时mm分ss");
+            res.setHeader("Content-Disposition", "attachment;filename=" +
+                    java.net.URLEncoder.encode("快递单导入列表" + dateFormat.format(date) + ".xls".trim(), "UTF-8"));
+
+            os = res.getOutputStream();
+            ExcelUtil.createWorkbookAtOutStream(ExcelVersion.V2007, disPoseLogisticsImportExcel(logisticsImportVoLists), os, true);
+            logisticsImportVoLists.clear();
+        } catch (Exception e) {
+            LogUtil.error("快递单导入异常", e);
+        } finally {
+            if (os != null) {
+                try {
+                    os.close();
+                } catch (IOException e) {
+                    LogUtil.error("关闭资源异常", e);
+                }
+            }
+        }
+    }
+    private List<ExcelSheetPO> disPoseLogisticsImportExcel(List<LogisticsImportVo> logisticsImportVos) {
+        List<ExcelSheetPO> res = new ArrayList<>();
+        ExcelSheetPO orderSheet = new ExcelSheetPO();
+        orderSheet.setSheetName("快递单导入");
+        orderSheet.setTitle("快递单导入失败列表");
+        String[] header = new String[]{"订单编号", "物流公司编码", "物流公司名称", "快递单号", "失败原因"};
+        orderSheet.setHeaders(header);
+        List<List<Object>> body = new ArrayList<>();
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");
+        if(CollUtil.isNotEmpty(logisticsImportVos)){
+            for (LogisticsImportVo logisticsImportVo : logisticsImportVos) {
+                List<Object> bodyItem = new ArrayList<>();
+                bodyItem.add(logisticsImportVo.getOrderNo());
+                bodyItem.add(logisticsImportVo.getLogisticsCompanyCode());
+                bodyItem.add(logisticsImportVo.getLogisticsCompany());
+                bodyItem.add(logisticsImportVo.getWaybillNo());
+                bodyItem.add(logisticsImportVo.getFailReason());
+                body.add(bodyItem);
+            }
+        }
+        orderSheet.setDataList(body);
+        res.add(orderSheet);
+        return res;
+    }
+    
+    public List<LogisticsImportVo> logisticsImportFile(File file) throws IOException {
+		SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+		List<ExcelSheetPO> excelList = ExcelUtil.readExcel(file, null,null);
+        ArrayList<LogisticsImportVo> logisticsImportVos = new ArrayList<>();
+		for (int i = 0; i < excelList.size(); i++) {
+			List<List<Object>> dataList = excelList.get(i).getDataList();
+			List<SysVipInfo> vipInfos = new ArrayList<>();
+			if (CollectionUtils.isNotEmpty(dataList)) {
+				for (int j = 1; j < dataList.size(); j++) {
+                    /**
+                     * 订单处于【待付款】【待配送】【待收货】都可以导入
+                     * 其他状态生成一个提示
+                     */
+
+                    LogisticsImportVo logisticsImportVo = new LogisticsImportVo();
+					List<Object> objects = dataList.get(j);
+					//订单编号
+					String orderNo = objects.get(0).toString();
+                    ShopOrder shopOrder = shopOrderDao.selectShopOrderByOrderNo(orderNo);
+                    if(ObjectUtil.isNotEmpty(shopOrder) &&
+                            (shopOrder.getOrderStatus() == ShopOrder.ORDER_STATUS_WAIT_SEND ||
+                                    shopOrder.getOrderStatus() == ShopOrder.ORDER_STATUS_WAIT_RECEIVE )){
+                        //物流公司编码
+                        String logisticsCompanyCode = objects.get(1).toString();
+                        //物流公司名称
+                        String logisticsCompany = objects.get(2).toString();
+                        //快递单号
+                        String waybillNo = objects.get(3).toString();
+
+                        ShopDeliveryInfo shopDeliveryInfo = new ShopDeliveryInfo();
+                        shopDeliveryInfo.setOrderId(shopOrder.getId());
+                        List<ShopDeliveryInfo> infoList = shopDeliveryInfoDao.selectByModel(shopDeliveryInfo);
+                        if (CollectionUtils.isEmpty(infoList)) {
+                            logisticsImportVo.setOrderNo(objects.get(0).toString());
+                            logisticsImportVo.setLogisticsCompanyCode(objects.get(1).toString());
+                            logisticsImportVo.setLogisticsCompany(objects.get(2).toString());
+                            logisticsImportVo.setWaybillNo(objects.get(3).toString());
+                            logisticsImportVo.setFailReason("未找到发货信息");
+                            logisticsImportVos.add(logisticsImportVo);
+                            logisticsImportVoLists.add(logisticsImportVo);
+                        }else{
+                            shopDeliveryInfo = infoList.get(0);
+                            shopDeliveryInfo.setOrderNo(orderNo);
+                            shopDeliveryInfo.setLogisticsCompanyCode(logisticsCompanyCode);
+                            shopDeliveryInfo.setLogisticsCompany(logisticsCompany);
+                            shopDeliveryInfo.setWaybillNo(waybillNo);
+                            shopDeliveryInfo.setUpdateBy(sysUsers.getSuName());
+                            shopDeliveryInfo.setLogisticsStatus(AppConstance.LOGISTICS_STATUS_OF_RECEIVE);
+                            shopDeliveryInfo.setDeliveryTime(new Date());
+                            shopDeliveryInfoDao.updateByModel(shopDeliveryInfo);
+
+                            //构建需要修改订单信息Map
+                            Map<String, Object> modifyMap = new HashMap<>();
+                            modifyMap.put("id", shopOrder.getId());
+                            modifyMap.put("orderStatus", ShopOrder.ORDER_STATUS_WAIT_RECEIVE);
+                            shopOrderDao.updateByMap(modifyMap);
+
+                            //发送创建订单的消息
+                            rabiitMqTemplate.sendMsg(MQTaskRouting.ORDER_OUT_SOTORE+evn, orderNo);
+                        }
+                    }else{
+                        if(ObjectUtil.isEmpty(shopOrder)){
+                            logisticsImportVo.setOrderNo(objects.get(0).toString());
+                            logisticsImportVo.setLogisticsCompanyCode(objects.get(1).toString());
+                            logisticsImportVo.setLogisticsCompany(objects.get(2).toString());
+                            logisticsImportVo.setWaybillNo(objects.get(3).toString());
+                            logisticsImportVo.setFailReason("未找到订单信息");
+                            logisticsImportVos.add(logisticsImportVo);
+                            logisticsImportVoLists.add(logisticsImportVo);
+                        }else if(shopOrder.getOrderStatus() != ShopOrder.ORDER_STATUS_WAIT_SEND ||
+                                shopOrder.getOrderStatus() != ShopOrder.ORDER_STATUS_WAIT_RECEIVE ){
+                            logisticsImportVo.setOrderNo(objects.get(0).toString());
+                            logisticsImportVo.setLogisticsCompanyCode(objects.get(1).toString());
+                            logisticsImportVo.setLogisticsCompany(objects.get(2).toString());
+                            logisticsImportVo.setWaybillNo(objects.get(3).toString());
+                            logisticsImportVo.setFailReason("订单状态不允许发货");
+                            logisticsImportVos.add(logisticsImportVo);
+                            logisticsImportVoLists.add(logisticsImportVo);
+                        }else{
+                            logisticsImportVo.setOrderNo(objects.get(0).toString());
+                            logisticsImportVo.setLogisticsCompanyCode(objects.get(1).toString());
+                            logisticsImportVo.setLogisticsCompany(objects.get(2).toString());
+                            logisticsImportVo.setWaybillNo(objects.get(3).toString());
+                            logisticsImportVo.setFailReason("导入失败");
+                            logisticsImportVos.add(logisticsImportVo);
+                            logisticsImportVoLists.add(logisticsImportVo);
+                        }
+                    }
+				}
+			}
+		}
+		return logisticsImportVos;
+	}
 
     /**
      * 导出Excel
@@ -108,8 +305,8 @@
         ExcelSheetPO orderSheet = new ExcelSheetPO();
         orderSheet.setSheetName("订单列表");
         orderSheet.setTitle("订单列表");
-        String[] header = new String[]{"订单编号", "客户姓名", "客户电话", "收货地址", "下单时间", "订单金额",
-                "优惠总金额", "优惠说明", "订单状态", "配送方式", "门店名称", "商品名称", "规格", "生产企业", "单价", "购买数量"};
+        String[] header = new String[]{"订单编号", "客户姓名", "客户电话", "收货地址", "店铺名称","订单状态","下单时间",  "购买商品","订单金额",
+                "优惠总金额",  "配送方式"};
         orderSheet.setHeaders(header);
         List<List<Object>> body = new ArrayList<>();
         SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");
@@ -133,42 +330,26 @@
                 } else {
                     bodyItem.add("");
                 }
-                //下单时间
-                bodyItem.add(dateFormat.format(shopOrder.getOrderTime()));
-                //购买数量
-//				bodyItem.add(shopOrder.getPurchaseQuantity());
-                //订单金额
-                bodyItem.add(shopOrder.getOrderMoney());
-                //优惠总金额
-                bodyItem.add(shopOrder.getDiscountAmount());
-                //优惠说明
-                bodyItem.add(shopOrder.getDiscountExplain());
+                //店铺名称
+                bodyItem.add(shopOrder.getStoreName());
                 //订单状态
                 bodyItem.add(OrderStatusEnum.getNameByCode(shopOrder.getOrderStatus()));
-                //配送方式 门店
-                bodyItem.add("物流");
-                bodyItem.add("");
-
-                //商品名称
+                //下单时间
+                bodyItem.add(dateFormat.format(shopOrder.getOrderTime()));
+                //购买商品
+                ShopSku shopSku = shopOrderDetails.getShopSku();
                 ShopProduct shopProduct = shopOrderDetails.getShopProduct();
                 if (shopProduct == null) {
                     bodyItem.add("");
                 } else {
-                    bodyItem.add(shopProduct.getTitle());
+                    bodyItem.add(shopProduct.getTitle()+ "(" +shopSku.getName()+ ")*" + shopOrderDetails.getCount());
                 }
-                //规格名称、生产企业、单价
-                ShopSku shopSku = shopOrderDetails.getShopSku();
-                if (shopSku == null) {
-                    bodyItem.add("");
-                    bodyItem.add(shopOrderDetails.getProductionEnterprise());
-                    bodyItem.add("");
-                } else {
-                    bodyItem.add(shopSku.getName());
-                    bodyItem.add(shopOrderDetails.getProductionEnterprise());
-                    bodyItem.add(shopSku.getPrice());
-                }
-                //购买数量
-                bodyItem.add(shopOrderDetails.getCount());
+                //订单金额
+                bodyItem.add(shopOrder.getOrderMoney());
+                //优惠总金额
+                bodyItem.add(shopOrder.getDiscountAmount());
+                //配送方式 门店
+                bodyItem.add("物流");
                 body.add(bodyItem);
             }
         }
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopPageAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopPageAction.java
index 7a02327..7dfe412 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopPageAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopPageAction.java
@@ -27,7 +27,7 @@
 
 /**
  * @description 小程序页面
- * @author yourName
+ * @author jyy
  * @date 2020-04-03 14:56
  */
 @Controller
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopRefundRecordAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopRefundRecordAction.java
index c790239..dded875 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopRefundRecordAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopRefundRecordAction.java
@@ -1,6 +1,8 @@
 package com.matrix.system.shopXcx.action;
 
-import com.matrix.component.wechat.externalInterface.common.WechatConfigure;
+import com.matrix.component.rabbitmq.RabiitMqTemplate;
+import com.matrix.component.redis.RedisUserLoginUtils;
+import com.matrix.component.wechat.externalInterface.weixinUtil.WeixinServiceUtil;
 import com.matrix.core.anotations.RemoveRequestToken;
 import com.matrix.core.anotations.SaveRequestToken;
 import com.matrix.core.constance.MatrixConstance;
@@ -9,21 +11,21 @@
 import com.matrix.core.exception.GlobleException;
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.core.pojo.PaginationVO;
-import com.matrix.core.tools.*;
-import com.matrix.component.redis.RedisUserLoginUtils;
+import com.matrix.core.tools.LogUtil;
+import com.matrix.core.tools.ModelUtils;
+import com.matrix.core.tools.StringUtils;
+import com.matrix.core.tools.WebUtil;
 import com.matrix.system.common.bean.SysUsers;
 import com.matrix.system.common.constance.AppConstance;
-
-import com.matrix.component.wechat.externalInterface.weixinUtil.WeixinServiceUtil;
 import com.matrix.system.hive.action.util.QueryUtil;
+import com.matrix.system.shopXcx.api.service.WXShopOrderService;
 import com.matrix.system.shopXcx.api.service.WxShopRefundRecordService;
 import com.matrix.system.shopXcx.bean.*;
 import com.matrix.system.shopXcx.dao.ShopCouponRecordDao;
 import com.matrix.system.shopXcx.dao.ShopDeliveryInfoDao;
 import com.matrix.system.shopXcx.dao.ShopOrderDao;
 import com.matrix.system.shopXcx.dao.ShopRefundRecordDao;
-import com.matrix.component.tools.WxTempLateMsgUtil;
-import com.matrix.system.shopXcx.api.service.WXShopOrderService;
+import com.matrix.system.shopXcx.mqTask.MQTaskRouting;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -73,6 +75,12 @@
 
 	@Value("${wx_pay_debug_onoff}")
 	private boolean isDebug;
+	@Value("${evn}")
+	private  String evn;
+
+	@Autowired
+	private RabiitMqTemplate rabiitMqTemplate;
+
 
 	/**
 	 * 列表显示
@@ -133,9 +141,6 @@
 		modifyMap.put("handingTime", new Date());
 		int i = shopRefundRecordDao.updateByMap(modifyMap);
 		if (i > 0) {
-			//同意退款后发送微信提醒填写物流单号
-			ShopRefundRecord fundRecord = shopRefundRecordDao.selectById(shopRefundRecord.getId());
-			sendRefundLogisticsInfoToUser(fundRecord);
 			return new AjaxResult(AjaxResult.STATUS_SUCCESS, "操作成功", "退款记录表");
 		} else {
 			throw new GlobleException("操作失败");
@@ -182,8 +187,6 @@
 			modifyOrder.put("id", record.getOrderId());
 			shopOrderDao.updateByMap(modifyOrder);
 		}
-		//退款拒绝后发送微信提醒
-		sendFailedRefundInfoToUser(record);
 		if (i > 0) {
 			return new AjaxResult(AjaxResult.STATUS_SUCCESS, "操作成功", "退款记录表");
 		} else {
@@ -246,7 +249,7 @@
 					if(flag){
 						//退款成功后发送微信提醒
 						ShopRefundRecord fundRecord = shopRefundRecordDao.selectById(oldShopRefundRecord.getId());
-						sendRefundInfoToUser(fundRecord);
+
 					}
 				}
 
@@ -270,7 +273,7 @@
 				if(flag){
 					//退款成功后发送微信提醒
 					ShopRefundRecord fundRecord = shopRefundRecordDao.selectById(oldShopRefundRecord.getId());
-					sendRefundInfoToUser(fundRecord);
+
 				}
 			}
 
@@ -390,7 +393,7 @@
 					if(flag){
 						//退款成功后发送微信提醒
 						ShopRefundRecord fundRecord = shopRefundRecordDao.selectById(Integer.valueOf(id));
-						sendRefundInfoToUser(fundRecord);
+
 						refundRecordService.updateGroupBuyStatus(Long.parseLong(id));
 					}
 				}
@@ -416,7 +419,7 @@
 				if(flag){
 					//退款成功后发送微信提醒
 					ShopRefundRecord fundRecord = shopRefundRecordDao.selectById(Integer.valueOf(id));
-					sendRefundInfoToUser(fundRecord);
+
 					refundRecordService.updateGroupBuyStatus(Long.parseLong(id));
 				}
 			}
@@ -488,8 +491,7 @@
 				//退款成功后同时把优惠券退回到用户的账号中
 				if (shopOrder.getDiscountAmount() != null && shopOrder.getDiscountAmount().compareTo(BigDecimal.ZERO) == 0) {
 					ShopCouponRecord shopCouponRecord = new ShopCouponRecord();
-					String userIds = shopRefundRecord.getUserId();
-					shopCouponRecord.setUserId(userIds);
+					shopCouponRecord.setUserId(shopRefundRecord.getUserId());
 					shopCouponRecord.setOrderId(shopOrder.getId());
 					List<ShopCouponRecord> recordList = shopCouponRecordDao.selectByModel(shopCouponRecord);
 					if (CollectionUtils.isNotEmpty(recordList)) {
@@ -522,6 +524,9 @@
 				modifyMap.put("orderStatus", ShopOrder.ORDER_STATUS_MONEYBACK_SUCCESS);
 				modifyMap.put("refundCharge", shopRefundRecord.getRefundMoney());
 				shopOrderDao.updateByMap(modifyMap);
+
+				rabiitMqTemplate.sendMsg(MQTaskRouting.SHOP_ORDER_REFUND+evn,shopRefundRecord.getOrderId()+"");
+
 			}catch (Exception e){
 				LogUtil.debug("退款成功,修改退款表和订单表状态出错。。。", id);
 				e.printStackTrace();
@@ -530,73 +535,6 @@
 		return flag;
 	}
 
-	//退款成功后发送微信提醒
-	private int sendRefundInfoToUser(ShopRefundRecord shopRefundRecord) {
-		ShopOrder order = shopOrderDao.selectById(shopRefundRecord.getOrderId());
-		if (order == null) {
-			throw new GlobleException("没有找到需要退款的订单信息");
-		}
-		List<String> msg = new ArrayList<>();
-		//退款说明
-		String refundExplain = "退款已经原路返回,具体到账时间可能会有1-3天延迟";
-		msg.add(order.getOrderNo());
-		msg.add(DateUtil.dateToString(shopRefundRecord.getRefundTime(),DateUtil.DATE_FORMAT_SS));
-		msg.add(refundExplain);
-		msg.add("商品名称");
-		String formId = null;
-		if(AppConstance.REFUND_GOODS.equals(shopRefundRecord.getRefundType()) && null != shopRefundRecord.getRefundTransactionNo()){
-			formId = shopRefundRecord.getRefundTransactionNo();
-		}else {
-			formId = order.getWxOrderNo().split("=")[1];
-		}
-		String page = "pages/refunDetail/refunDetail?id=" + shopRefundRecord.getId() + "&&status=1" + "&&inform=1";
-		int res = WxTempLateMsgUtil.sendWxTemplateMsg(msg, order.getUserId(),
-				page, WxTempLateMsgUtil.REFUND_SUCCESS, formId);
-		return res;
-	}
 
-	//退款拒绝后发送微信提醒
-	private int sendFailedRefundInfoToUser(ShopRefundRecord shopRefundRecord) {
-		ShopOrder order = shopOrderDao.selectById(shopRefundRecord.getOrderId());
-		if (order == null) {
-			throw new GlobleException("没有找到拒绝退款的订单信息");
-		}
-		List<String> msg = new ArrayList<>();
-		//退款说明
-		String remarks = "如有疑问请联系客服";
-		msg.add(order.getOrderNo());
-		msg.add("商品名称");
-		msg.add(shopRefundRecord.getRefundRefuseReason());
-		msg.add(shopRefundRecord.getRefundCause());
-		String formId = null;
-		if(AppConstance.REFUND_GOODS .equals(shopRefundRecord.getRefundType()) && null != shopRefundRecord.getRefundTransactionNo()){
-			formId = shopRefundRecord.getRefundTransactionNo();
-		}else {
-			formId = order.getWxOrderNo().split("=")[1];
-		}
-		String page = "pages/refunDetail/refunDetail?id=" + shopRefundRecord.getId() + "&&status=2" + "&&inform=1";
-		int res = WxTempLateMsgUtil.sendWxTemplateMsg(msg, order.getUserId(),
-				page, WxTempLateMsgUtil.REFUND_FAILED, formId);
-		return res;
-	}
 
-	//同意退款后发送微信提醒填写物流单号
-	private int sendRefundLogisticsInfoToUser(ShopRefundRecord shopRefundRecord) {
-		ShopOrder order = shopOrderDao.selectById(shopRefundRecord.getOrderId());
-		if (order == null) {
-			throw new GlobleException("没有找到发送微信提醒的订单信息");
-		}
-		List<String> msg = new ArrayList<>();
-		//退款说明
-		String remarks = "申请退款已审核通过,请尽快填写退货物流信息";
-		msg.add(order.getOrderNo());
-		msg.add("商品名称");
-		msg.add("待退回");
-		msg.add(remarks);
-		String formId = order.getWxOrderNo().split("=")[1];
-		String page = "pages/refunding/refunding?id=" + shopRefundRecord.getId() + "&&inform=1";
-		int res = WxTempLateMsgUtil.sendWxTemplateMsg(msg, order.getUserId(),
-				page, WxTempLateMsgUtil.WRITE_LOGISTICS, formId);
-		return res;
-	}
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopShoppingCartAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopShoppingCartAction.java
deleted file mode 100644
index c7e50a8..0000000
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopShoppingCartAction.java
+++ /dev/null
@@ -1,141 +0,0 @@
-package com.matrix.system.shopXcx.action;
-
-import com.matrix.core.constance.MatrixConstance;
-import com.matrix.core.constance.SystemMessageCode;
-import com.matrix.core.pojo.PaginationVO;
-import com.matrix.core.tools.ModelUtils;
-import com.matrix.core.tools.StringUtils;
-import com.matrix.core.constance.SystemErrorCode;
-import com.matrix.core.anotations.RemoveRequestToken;
-import com.matrix.system.common.bean.SysUsers;
-import com.matrix.system.hive.action.util.QueryUtil;
-import com.matrix.system.shopXcx.dao.ShopShoppingCartDao;
-import org.springframework.stereotype.Controller;
-import com.matrix.core.exception.GlobleException;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-import com.matrix.core.anotations.SaveRequestToken;
-import com.matrix.core.pojo.AjaxResult;
-import com.matrix.core.tools.WebUtil;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import java.util.List;
-import java.util.Map;
-import com.matrix.system.shopXcx.bean.ShopShoppingCart;
-import org.springframework.web.servlet.ModelAndView;
-
-/**
- * @description 购物车
- * @author jiangyouyao
- * @date 2019-06-12 19:09
- */
-@Controller
-@RequestMapping(value = "admin/shopShoppingCart")
-public class ShopShoppingCartAction {
-
-	@Autowired
-	private ShopShoppingCartDao shopShoppingCartDao;
-	
-	//记录编辑前的值Before_Edit_Value
-	public static final String BEV="ShopShoppingCart_BEV";
-	
-	
-	/**
-	 * 列表显示
-	 */
-	@RequestMapping(value =  "/showList")
-	public @ResponseBody AjaxResult showList(ShopShoppingCart shopShoppingCart, PaginationVO pageVo) {
-		QueryUtil.setQueryLimitCom(shopShoppingCart);
-		List<ShopShoppingCart> dataList = shopShoppingCartDao.selectInPage(shopShoppingCart, pageVo);
-		AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList,
-				shopShoppingCartDao.selectTotalRecord(shopShoppingCart));
-		return result;
-	}
-   	
-	/**
-	 * 新增
-	 */
-	@RemoveRequestToken	
-   	@RequestMapping(value =  "/addShopShoppingCart")
-	public @ResponseBody AjaxResult addShopShoppingCart(ShopShoppingCart shopShoppingCart) {
-	    SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
-		shopShoppingCart.setCreateBy(user.getSuName());
-		shopShoppingCart.setUpdateBy(user.getSuName());
-		shopShoppingCart.setCompanyId(user.getCompanyId());
-	 	int i=shopShoppingCartDao.insert(shopShoppingCart);
-	 	if(i > 0){
-	 		return new AjaxResult(AjaxResult.STATUS_SUCCESS, SystemMessageCode.ADD_SUCCES, "购物车");
-	 	}else {
-			throw new GlobleException(SystemErrorCode.DATA_ADD_FAIL);
-		}
-	}
-	
-	
-	
-	
-	
-	/**
-	 * 修改
-	 */   
-	@RemoveRequestToken	
-   	@RequestMapping(value =  "/modifyShopShoppingCart")
-	public @ResponseBody AjaxResult modifyShopShoppingCart(ShopShoppingCart newShopShoppingCart) {
-	   	ShopShoppingCart oldShopShoppingCart = WebUtil.getSessionAttribute(BEV);
-		int i = 0;
-		Map<String, Object> modifyMap = null;
-		try {
-			if (!ModelUtils.isModified(oldShopShoppingCart, newShopShoppingCart)) {
-				i = MatrixConstance.DML_SUCCESSS;
-			}
-			modifyMap = ModelUtils.comparePojo2Map(oldShopShoppingCart, newShopShoppingCart);
-		} catch (Exception e) {
-			throw new GlobleException(SystemErrorCode.DATA_UPDATE_FAIL, e, newShopShoppingCart);
-		}
-		if (modifyMap.size() > 0) {
-			modifyMap.put("cartId", oldShopShoppingCart.getCartId());
-			shopShoppingCartDao.updateByMap(modifyMap);
-		}
-		i = MatrixConstance.DML_SUCCESSS;
-		WebUtil.removeSessionAttribute(BEV);
-		if (i > 0) {
-			return new AjaxResult(AjaxResult.STATUS_SUCCESS, SystemMessageCode.UPDATE_SUCCES, "购物车");
-		} else {
-			throw new GlobleException(SystemErrorCode.DATA_UPDATE_FAIL);
-		}
-	}
-	
-	
-	
-	
-   	/**
-	 * 进入修改界面
-	 */   
-	@SaveRequestToken
-   	@RequestMapping(value =  "/editForm")
-	public ModelAndView editForm(Integer id) {
-		ShopShoppingCart shopShoppingCart = new ShopShoppingCart();
-		ModelAndView modelAndView = new ModelAndView("admin/shopShoppingCart-form");
-		if (id != null) {
-			shopShoppingCart = shopShoppingCartDao.selectById(id);
-			WebUtil.setSessionAttribute(BEV, shopShoppingCart);
-		}
-		modelAndView.addObject("obj",shopShoppingCart);
-		return modelAndView;
-	}
-   	
-   	
-   	/**
-	 * 删除
-	 */  
- 	@RequestMapping(value = "/del")
-	public @ResponseBody AjaxResult del(String keys) {
-		List<String> ids = StringUtils.strToCollToString(keys, ",");
-		int i =  shopShoppingCartDao.deleteByIds(ids);
-		if (i > 0) {
-			return new AjaxResult(AjaxResult.STATUS_SUCCESS, SystemMessageCode.DELETE_SUCCES, i);
-		} else {
-			throw new GlobleException(SystemErrorCode.DATA_DELETE_FAIL);
-		}
-	}
-  
-}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/WxUserAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/WxUserAction.java
deleted file mode 100644
index e5bbb53..0000000
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/WxUserAction.java
+++ /dev/null
@@ -1,189 +0,0 @@
-package com.matrix.system.shopXcx.api;
-
-import com.matrix.biz.bean.BizUser;
-import com.matrix.biz.dao.BizUserDao;
-import com.matrix.biz.service.BizUserService;
-import com.matrix.component.redis.RedisUserLoginUtils;
-import com.matrix.component.tools.HttpCurlUtil;
-import com.matrix.component.wechat.externalInterface.weixinUtil.WeixinServiceUtil;
-import com.matrix.core.pojo.AjaxResult;
-import com.matrix.core.tools.LogUtil;
-import com.matrix.core.tools.StringUtils;
-import com.matrix.core.web.BaseAction;
-import com.matrix.system.common.constance.AppConstance;
-import com.matrix.system.common.interceptor.HostInterceptor;
-import net.sf.json.JSONObject;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-import java.util.Collections;
-import java.util.Date;
-
-/**
- * @description (用户表)
- * @author jyy
- * @date 2019-05-31 10:03
- */
-@Controller
-@RequestMapping(value = "wxapi/user")
-public class WxUserAction extends BaseAction {
-
-	@Autowired
-	private BizUserService bizUserService;
-
-
-	@Autowired
-	private RedisUserLoginUtils redisUserLoginUtils;
-	@Autowired
-	private BizUserDao bizUserDao;
-
-	@Autowired
-	WeChatApiTools weChatApiTools;
-
-
-
-	@Autowired
-	private WeixinServiceUtil weixinServiceUtil;
-
-	@Value("${debug}")
-	private String isDebug;
-
-	/**
-	 * 小程序登录
-	 * 
-	 * @author JIANGYOUYAO
-	 * @email 935090232@qq.com
-	 * @date 2018年5月23日
-	 * @param code
-	 * @return
-	 * @throws Exception
-	 */
-	@RequestMapping(value = "/login/{keys}")
-	public @ResponseBody
-    AjaxResult wxLogin(@PathVariable("keys") String code) throws Exception {
-		AjaxResult res = new AjaxResult();
-		LogUtil.info("code:{}" + code);
-		if (StringUtils.isNotBlank(code)) {
-			String requrl = weChatApiTools.getXcxLoginUrl(code, HostInterceptor.getCompanyId());
-			String reslutData = HttpCurlUtil.sendGetHttp(requrl, null);
-			JSONObject json = JSONObject.fromObject(reslutData);
-			LogUtil.debug("微信登录获取到登录信息={}", json);
-
-			if(json.containsKey("errcode")){
-				res.setStatus(AjaxResult.STATUS_FAIL);
-				res.setInfo("自动登录失败");
-				LogUtil.debug("微信登录获取到异常信息errcode");
-				return res;
-			}
-
-			String openId = json.getString("openid");
-			String sessionKey = json.getString("session_key");
-			LogUtil.debug("openId={},sessionKey={}", openId, sessionKey);
-			// 查询用户是否存在
-			BizUser bizUser = null;
-			synchronized(this){
-				bizUser = bizUserService.findByOpenId(openId);
-				if (bizUser == null) {
-					// 新增用户
-					bizUser = new BizUser();
-					bizUser.setSessionKey(sessionKey);
-					bizUser.setOpenId(openId);
-					bizUser.setLastLoginTime(new Date());
-					bizUser.setUserType(AppConstance.USER_TYPE_CUSTOMER);
-					bizUser.setCompanyId(HostInterceptor.getCompanyId());
-					bizUserService.add(bizUser);
-
-				} else {
-					bizUser.setSessionKey(sessionKey);
-					bizUser.setLastLoginTime(new Date());
-					// 更新用户sessionKey
-					bizUserService.modifyByModel(bizUser);
-				}
-			}
-			// 存放redis
-			String token = redisUserLoginUtils.saveUserInfo(bizUser);
-			LogUtil.info("用户token={}", token);
-			res.putInMap("token", token);
-			res.putInMap("userInfo", bizUser);
-			res.setStatus(AjaxResult.STATUS_SUCCESS);
-		} else {
-			res.setStatus(AjaxResult.STATUS_FAIL);
-			res.setInfo("自动登录失败");
-		}
-		return res;
-	}
-
-	/**
-	 * 查询用户信息
-	 */
-	@RequestMapping(value = "/findUserInfo")
-	public @ResponseBody
-    AjaxResult findUserInfo() {
-		BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class);
-		String openId = loginUser.getOpenId();
-		BizUser bizUser = bizUserService.findByOpenId(openId);
-		
-		//处理用户当前所在店铺
-		/*
-		if(bizUser.getStaff()!=null){
-			//当前用户是员工账号
-			bizUser.setBusiness(bussinesssDao.selectById(bizUser.getStaff().getBusinessId()));
-			bizUser.setRole(bizUser.getStaff().getRole());
-		}else{
-			//当前用户是boss账号
-			bizUser.setBusiness(bussinesssDao.findByUserOpenId(bizUser.getOpenId()));
-			bizUser.setRole(AppConstance.User_ROLE_BOSS);
-		}*/
-		
-		AjaxResult res = new AjaxResult();
-		res.putInMap("userInfo", bizUser);
-		res.setStatus(AjaxResult.STATUS_SUCCESS);
-		return res;
-	}
-	
-	/**
-	 * 获取其他用户简化信息
-	 * @author JIANGYOUYAO
-	 * @email 935090232@qq.com
-	 * @date 2018年9月5日
-	 * @param openId
-	 * @return
-	 */
-	@RequestMapping(value = "/getOtherUserInfo/{openId}")
-	public @ResponseBody
-    AjaxResult getOtherUserInfo(@PathVariable String openId) {
-		BizUser bizUser = bizUserService.findByOpenId(openId);
-		AjaxResult res = new AjaxResult();
-		res.putInMap("userInfo", bizUser);
-		res.setStatus(AjaxResult.STATUS_SUCCESS);
-		return res;
-	}
-	
-
-	/**
-	 * 接收用户信息
-	 */
-	@RequestMapping(value = "/saveUserInfo")
-	public @ResponseBody
-    AjaxResult saveUserInfo(@RequestBody BizUser bizUser) {
-
-		BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class);
-		bizUser.setUserId(loginUser.getUserId());
-		// TODO 赋值操作
-		int i = bizUserService.saveUserInfo(bizUser);
-
-		if (i == 0) {
-			return new AjaxResult(AjaxResult.STATUS_FAIL, "更新失败");
-		}
-		return new AjaxResult(AjaxResult.STATUS_SUCCESS, Collections.singletonList(bizUser));
-	}
-
-
-
-
-}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WXShopOrderAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WXShopOrderAction.java
index 7c7577a..47f4f64 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WXShopOrderAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WXShopOrderAction.java
@@ -1,41 +1,43 @@
 package com.matrix.system.shopXcx.api.action;
 
-import com.matrix.biz.bean.BizUser;
+import com.matrix.component.rabbitmq.RabiitMqTemplate;
 import com.matrix.component.redis.RedisUserLoginUtils;
-import com.matrix.component.tools.WxUtils;
 import com.matrix.component.wechat.externalInterface.protocol.paramProtocol.BrandWCPayRequestData;
-import com.matrix.component.wechat.externalInterface.weixinUtil.WeixinServiceUtil;
+import com.matrix.config.RabbitMqConfig;
 import com.matrix.core.constance.SystemErrorCode;
 import com.matrix.core.exception.GlobleException;
 import com.matrix.core.pojo.AjaxResult;
-import com.matrix.core.tools.StringUtils;
+import com.matrix.core.tools.LogUtil;
 import com.matrix.system.common.constance.AppConstance;
-import com.matrix.system.constance.Dictionary;
-import com.matrix.system.hive.bean.ShoppingGoods;
+import com.matrix.system.hive.bean.MoneyCardUse;
+import com.matrix.system.hive.bean.MoneyCardUseFlow;
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.hive.dao.MoneyCardUseDao;
+import com.matrix.system.hive.dao.MoneyCardUseFlowDao;
 import com.matrix.system.hive.dao.ShoppingGoodsDao;
-import com.matrix.system.shopXcx.api.pojo.AddShopOrderPOJO;
-import com.matrix.system.shopXcx.api.pojo.CreateOrderDto;
+import com.matrix.system.hive.dao.SysVipInfoDao;
+import com.matrix.system.score.dao.ScoreVipDetailDao;
 import com.matrix.system.shopXcx.api.pojo.OrderInfoQueryPOJO;
+import com.matrix.system.shopXcx.api.pojo.ShopOrderDto;
+import com.matrix.system.shopXcx.api.service.OrderCouponGroupService;
 import com.matrix.system.shopXcx.api.service.ShoppingCartService;
 import com.matrix.system.shopXcx.api.service.WXShopOrderService;
 import com.matrix.system.shopXcx.api.service.WxShopCouponService;
-import com.matrix.system.shopXcx.api.tools.WxShopCouponUtil;
-import com.matrix.system.shopXcx.api.tools.WxShopOrderUtil;
-import com.matrix.system.shopXcx.api.vo.CouponReceiveInfoVO;
-import com.matrix.system.shopXcx.api.vo.ShopCartVo;
-import com.matrix.system.shopXcx.bean.*;
+import com.matrix.system.shopXcx.bean.ShopActivitiesGroupJoin;
+import com.matrix.system.shopXcx.bean.ShopActivitiesGroupJoinUser;
+import com.matrix.system.shopXcx.bean.ShopOrder;
+import com.matrix.system.shopXcx.bean.ShopPayLog;
 import com.matrix.system.shopXcx.dao.*;
-import com.matrix.system.shopXcx.dto.DiscountExplain;
-import org.apache.commons.collections.CollectionUtils;
+import com.matrix.system.shopXcx.mqTask.MQTaskRouting;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Controller;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
 import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
+import java.util.*;
 
 
 /**
@@ -53,16 +55,10 @@
     @Autowired
     WxShopCouponService wxShopCouponService;
 
-    @Autowired
-    private ShopReceiveAddressDao shopReceiveAddressDao;
 
     @Autowired
     ShoppingCartService shoppingCartService;
 
-    @Autowired
-    private ShopCouponDao shopCouponDao;
-    @Autowired
-    private WxShopCouponUtil wxShopCouponUtil;
 
     @Autowired
     private RedisUserLoginUtils redisUserLoginUtils;
@@ -75,274 +71,189 @@
 
     @Autowired
     ShopProductDao shopProductDao;
-    @Autowired
-    private WxShopOrderUtil wxShopOrderUtil;
 
     @Autowired
-    private ShopOrderDetailsDao shopOrderDetailsDao;
+    OrderCouponGroupService orderCouponGroupService;
+
+    @Autowired
+    private ShopPayLogDao shopPayLogDao;
 
     @Autowired
     ShopOrderDao shopOrderDao;
 
+    @Autowired
+    SysVipInfoDao sysVipInfoDao;
+
+    @Autowired
+    private ShopActivitiesGroupJoinUserDao shopActivitiesGroupJoinUserDao;
+
+    @Autowired
+    private ShopActivitiesGroupJoinDao shopActivitiesGroupJoinDao;
+
+    @Autowired
+    private RabiitMqTemplate rabiitMqTemplate;
+
+    @Autowired
+    ShoppingGoodsDao shoppingGoodsDao;
+
+    @Autowired
+    MoneyCardUseFlowDao moneyCardUseFlowDao;
+
+    @Autowired
+    MoneyCardUseDao moneyCardUseDao;
+
+    @Value("${evn}")
+    private String evn;
+
     /**
      * 计算购物车订单价格
      *
-     * @param addShopOrderPOJO
+     * @param shopOrderDto
      * @return
      * @throws Exception
      */
     @PostMapping(value = "/calculationCartOrder")
     public
     @ResponseBody
-    AjaxResult calculationCartOrder(@RequestBody AddShopOrderPOJO addShopOrderPOJO) throws Exception {
-        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class); //计算购物车中物品的优惠信息
-
-        List<ShopCartVo> cartList = shoppingCartService.findUserCartList(addShopOrderPOJO.getShopId());
-
-
-        //取出购物车中选中的产品
-        List<ShopShoppingCart> buyCart = new ArrayList<>();
-
-        //取出购物车中没有参加店铺活动的产品,和参加了店铺活动但是活动没有达到标准的产品,用来计算是否可以使用优惠券
-        List<ShopShoppingCart> notCouponuyCart = new ArrayList<>();
-        for (ShopCartVo shopCartVo : cartList) {
-            for (ShopShoppingCart shopShoppingCart : shopCartVo.getCartList()) {
-                if (shopShoppingCart.getIsSelected() == 1) {
-                    buyCart.add(shopShoppingCart);
-                    if (shopCartVo.getCoupon() == null || !shopCartVo.isSatisfactionCoupon()) {
-                        notCouponuyCart.add(shopShoppingCart);
-                    }
-                }
-            }
-        }
-        //获取当前购物车产品可用的优惠券
-        List<CouponReceiveInfoVO> usefulCoupon = wxShopCouponService.getCartVoCouponList(bizUser.getCompanyId(),notCouponuyCart);
-
-        //获取用户使用的优惠券
-        CouponReceiveInfoVO shopCoupon = new CouponReceiveInfoVO();
-        if (addShopOrderPOJO.getCouponReceiveId() == null) {
-            //如果用户没有选择优惠券则默认选优惠金额最高的
-            //计算使用优惠券后的价格
-            if (CollectionUtils.isNotEmpty(usefulCoupon)) {
-                //根据优惠券ID用户ID查询优惠券信息
-                shopCoupon = usefulCoupon.get(0);
-            }
-        } else if (addShopOrderPOJO.getCouponReceiveId() != 1) {
-            //用户选择了优惠券
-            shopCoupon = shopCouponRecordDao.selectMyCouponByReceiveId(addShopOrderPOJO.getCouponReceiveId());
-        } else {
-            //用户不使用优惠券
-        }
-
-
-        //计算收货地址:
-
-        ShopReceiveAddress shopReceiveAddress = null;
-        if (addShopOrderPOJO.getReceiveAddrId() == null) {
-            //如果没有传收货地址则默认收货地址
-            shopReceiveAddress = shopReceiveAddressDao.selectDefaultAddress(bizUser.getOpenId());
-            if (shopReceiveAddress != null) {
-                addShopOrderPOJO.setReceiveAddrId(shopReceiveAddress.getAddrId());
-            }
-        } else {
-            shopReceiveAddress = shopReceiveAddressDao.selectById(addShopOrderPOJO.getReceiveAddrId());
-            addShopOrderPOJO.setReceiveAddrId(shopReceiveAddress.getAddrId());
-
-        }
-
-
-        //得到订单计价说明
-        DiscountExplain discountExplain = shopOrderService.buildDiscountExplain(cartList, shopCoupon.getReceiveId(), bizUser.getCompanyId());
-
-        AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, buyCart, buyCart.size());
-        //结算金额信息
-        result.putInMap("discountExplain", discountExplain);
-
-
-        //用户优惠券
-        result.putInMap("usefulCoupon", usefulCoupon);
-        //用户选中的优惠券
-        result.putInMap("shopCoupon", shopCoupon);
-
-
-        //默认地址
-        String deliverySelect = "立即配送";
-        if (shopReceiveAddress != null) {
-            if (StringUtils.isNotBlank(shopReceiveAddress.getSchool())) {
-                deliverySelect = "立即配送";
-            } else {
-                deliverySelect = "物流配送";
-            }
-        }
-        result.putInMap("defaultAddress", shopReceiveAddress);
-        //配送方式
-        result.putInMap("deliverySelect", deliverySelect);
-
-
-        result.setRows(buyCart);
-        return result;
+    AjaxResult calculationCartOrder(@RequestBody ShopOrderDto shopOrderDto) throws Exception {
+        return shopOrderService.buildDiscountExplain(shopOrderDto);
     }
 
 
     @Autowired
-    ShoppingGoodsDao shoppingGoodsDao;
+    private ScoreVipDetailDao scoreVipDetailDao;
 
     /**
-     * 新增订单
+     * 新增微信支付订单
      *
-     * @param addShopOrderPOJO
+     * @param shopOrderDto
      * @return
      */
     @PostMapping(value = "/addShopOrder")
     public
     @ResponseBody
-    AjaxResult addShopOrder(@RequestBody AddShopOrderPOJO addShopOrderPOJO) throws Exception {
-        return shopOrderService.createShopOrder(addShopOrderPOJO);
-    }
+    AjaxResult addShopOrder(@RequestBody @Validated ShopOrderDto shopOrderDto) throws Exception {
 
-
-    /**
-     * 新增订单
-     * 本方法抛弃,不再使用,本方法是单单个产品购买
-     * 在多产品的时候不适合
-     * @return
-     */
-    @Deprecated
-    @PostMapping(value = "/addShopOrder2")
-    public
-    @ResponseBody
-    AjaxResult addShopOrder2(@RequestBody CreateOrderDto createOrderDto) throws Exception {
-
-
-        //校验收货地址
-        ShopReceiveAddress shopReceiveAddress = shopReceiveAddressDao.selectById(createOrderDto.getReceiveAddrId());
-        if (shopReceiveAddress == null) {
-            return new AjaxResult(AjaxResult.STATUS_FAIL, "请选择正确的收获地址");
-        }
-
-
-        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
-        ShopSku shopSku = shopSkuDao.selectById(createOrderDto.getSkuId());
-        ShopProduct shopProduct = shopProductDao.selectById(createOrderDto.getProductId());
-        String stokCode = shopSku.getStockCode();
-
-        ShopOrder shopOrder = new ShopOrder();
-        //查询绑定的产品是否为家居产品
-        if (StringUtils.isNotBlank(stokCode)) {
-            ShoppingGoods shoppingGoods = shoppingGoodsDao.selectById(Long.parseLong(stokCode));
-            if (shoppingGoods != null) {
-                //根据购买的产品设置订单类型
-                if (Dictionary.SHOPPING_GOODS_TYPE_JJCP.equals(shoppingGoods.getGoodType())) {
-                    shopOrder.setOrderType(ShopOrder.ORDER_TYPE_GOODS);
-                } else {
-                    shopOrder.setOrderType(ShopOrder.ORDER_TYPE_SERVICE);
-                }
-            } else {
-                shopOrder.setOrderType(ShopOrder.ORDER_TYPE_GOODS);
-            }
-        }
-
-        List<ShopOrderDetails> details = new ArrayList<>();
-        Integer cartCount = 0;
-        ShopOrderDetails shopOrderDetails = new ShopOrderDetails();
-        shopOrderDetails.setCreateBy(AppConstance.SYSTEM_USER);
-        shopOrderDetails.setUpdateBy(AppConstance.SYSTEM_USER);
-        shopOrderDetails.setpId(createOrderDto.getProductId());
-        shopOrderDetails.setsId(createOrderDto.getSkuId());
-        shopOrderDetails.setPrice(shopSku.getPrice());
-        shopOrderDetails.setCount(createOrderDto.getNumber());
-        shopOrderDetails.setsTitle(shopProduct.getTitle() + shopSku.getName());
-        shopOrderDetails.setDiscountAmount(BigDecimal.ZERO);
-        shopOrderDetails.setTotalPrice(shopOrderDetails.getPrice().multiply(BigDecimal.valueOf(shopOrderDetails.getCount())));
-        details.add(shopOrderDetails);
-        cartCount += shopOrderDetails.getCount();
-
-
-        //TODO 更新库存和销量[考虑和erp库存联动]
-        wxShopOrderUtil.updateProductAndSkuInfo(details);
-
-        //用户openId
-        shopOrder.setUserId(bizUser.getOpenId());
-        shopOrder.setCreateBy("微信小程序生成");
-        shopOrder.setUpdateBy("微信小程序生成");
-        shopOrder.setCommodityPrice(shopOrderDetails.getTotalPrice());
-        shopOrder.setPurchaseQuantity(cartCount);
-        //购买方式
-        shopOrder.setShippingMethod("物流配送");
-        //生成订单号
-        shopOrder.setOrderNo(WxUtils.getOrderNum());
-        //设置支付状态
-        shopOrder.setPayStatus(ShopOrder.ORDER_STATUS_WAIT_PAY);
-        //设置订单状态
-        shopOrder.setOrderStatus(ShopOrder.ORDER_STATUS_WAIT_SEND);
-
-        //设置退款费用(注:下次优化从数据字典表获取)
-        shopOrder.setRefundCharge(BigDecimal.ZERO);
-        //客户电话
-        shopOrder.setUserTel(shopReceiveAddress.getAddrTelephone());
-        //客户姓名
-        shopOrder.setUserName(shopReceiveAddress.getAddrLiaisonman());
-        //备注
-        shopOrder.setRemarks(createOrderDto.getRemarks());
-        //删除标识
-        shopOrder.setDelFlag(AppConstance.DATA_USEABLE);
-        //微信订单号
-        shopOrder.setWxOrderNo("");
-        //微信支付结果
-        shopOrder.setPayResult(ShopOrder.ORDER_WX_STATUS_WAIT_PAY);
-        //如果没有提交购买方式或配送方式不是物流
-        //获取邮费
-        shopOrder.setOrderMoney(shopOrderDetails.getTotalPrice());
-        shopOrder.setStoreId(createOrderDto.getShopId());
-
-        shopOrderDao.insert(shopOrder);
-
-        wxShopOrderUtil.insertSendPackageInfo(shopOrder, "物流配送", shopReceiveAddress);
-
-        //给订单详情表添加订单ID
-        shopOrderDetails.setOrderId(shopOrder.getId());
-
-        shopOrderDetailsDao.insert(shopOrderDetails);
-
-
-        BrandWCPayRequestData payData = startPayment(shopOrder);
-        AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, Arrays.asList(payData));
+        ShopOrder shopOrder = shopOrderService.createShopOrder(shopOrderDto);
+        AjaxResult result = AjaxResult.buildSuccessInstance("订单创建成功");
         result.putInMap("orderId", shopOrder.getId());
-
+        if (shopOrderDto.getPayMethod().equals(ShopOrder.SHOP_ORDER_PAY_METHOD_WX)) {
+            BrandWCPayRequestData payData = shopOrderService.startPayment(shopOrder);
+            result.setRows(Arrays.asList(payData));
+        }
         return result;
-
-
     }
 
-    @Value("${wx_pay_debug_onoff}")
-    private boolean isDebug;
-    @Autowired
-    private WeixinServiceUtil weixinServiceUtil;
+
 
     /**
-     * 开始付款
+     * 余额支付确认
      *
-     * @param shopOrder
+     * @param orderId
      * @return
      * @throws Exception
      */
-    public BrandWCPayRequestData startPayment(ShopOrder shopOrder) throws Exception {
-        BigDecimal unit = new BigDecimal("100");
-        BigDecimal money = new BigDecimal(shopOrder.getOrderMoney().toString());
-        BrandWCPayRequestData payData;
-        String productNames = wxShopOrderUtil.getProductNames(shopOrder.getUserId(), shopOrder.getId());
-        if (isDebug) {
-            payData = weixinServiceUtil.createOrder("[测试]" + productNames, shopOrder.getOrderNo(),
-                    1, shopOrder.getUserId(), String.valueOf(shopOrder.getId()));
+    @GetMapping(value = "/moneyCardPay/{orderId}")
+    @ResponseBody
+    @Transactional
+    public   AjaxResult moneyCardPay(@PathVariable Integer orderId) throws Exception {
+
+        ShopOrder order = shopOrderDao.selectById(orderId);
+        if (order != null
+                && ShopOrder.SHOP_ORDER_PAY_METHOD_VIPCARD == order.getPayMethod()
+                && ShopOrder.ORDER_PAY_STATUS_WAIT == order.getPayStatus()) {
+
+            MoneyCardUse moneyCardUse = moneyCardUseDao.selectVipCard(order.getUserId());
+            Double balance=moneyCardUse.getGiftMoney() + moneyCardUse.getRealMoney();
+            if(balance>=order.getOrderMoney().doubleValue()){
+                //扣减会员卡余额
+                if(moneyCardUse.getRealMoney()>=order.getOrderMoney().doubleValue()){
+                    moneyCardUse.setRealMoney(moneyCardUse.getRealMoney()-order.getOrderMoney().doubleValue());
+                }else{
+                    moneyCardUse.setGiftMoney(moneyCardUse.getGiftMoney()-(order.getOrderMoney().doubleValue()- moneyCardUse.getRealMoney() ));
+                    moneyCardUse.setRealMoney(0D);
+                }
+                moneyCardUseDao.update(moneyCardUse);
+                //插入扣减记录
+                MoneyCardUseFlow moneyCardUseFlow=new MoneyCardUseFlow();
+                moneyCardUseFlow.setTotal(order.getOrderMoney().doubleValue());
+                moneyCardUseFlow.setCarUseId(moneyCardUse.getId());
+                moneyCardUseFlow.setVipId(order.getUserId());
+                moneyCardUseFlow.setType(MoneyCardUseFlow.USE_TYPE_CONSUMER);
+                moneyCardUseFlow.setOrderNo(order.getOrderNo());
+                moneyCardUseFlow.setCreateTime(new Date());
+                moneyCardUseFlow.setBalance(moneyCardUse.getGiftMoney()+moneyCardUse.getRealMoney());
+                moneyCardUseFlow.setCardName(moneyCardUse.getCardName());
+                moneyCardUseFlowDao.insert(moneyCardUseFlow);
+
+                //构建需要修改订单信息Map
+                Map<String, Object> modifyMap = new HashMap<>();
+                modifyMap.put("id", order.getId());
+                //设置微信支付状态为已支付
+                modifyMap.put("payResult", ShopOrder.ORDER_WX_STATUS_PAY_SUCCESS);
+                //设置支付状态为支付成功
+                modifyMap.put("payStatus", ShopOrder.ORDER_PAY_STATUS_SUCCESS);
+                //如果是商品订单则进入待发货
+                modifyMap.put("orderStatus", ShopOrder.ORDER_STATUS_WAIT_SEND);
+                shopOrderDao.updateByMap(modifyMap);
+
+                // 判断该订单是否为拼团产生的订单
+                ShopActivitiesGroupJoinUser joinUser = shopActivitiesGroupJoinUserDao.selectGroupJoinUserByOrderId(order.getId().longValue());
+                if (joinUser != null) {
+                    joinUser.setIsHasPay(ShopActivitiesGroupJoinUser.IS_HAS_PAY_Y);
+                    shopActivitiesGroupJoinUserDao.updateByModel(joinUser);
+
+                    ShopActivitiesGroupJoin groupJoin = shopActivitiesGroupJoinDao.selectGroupAndPriceById(joinUser.getGjId());
+                    List<ShopActivitiesGroupJoinUser> joinUserList = shopActivitiesGroupJoinUserDao.selectGroupJoinUserListByGjId(joinUser.getGjId());
+                    LogUtil.info("#当前已支付完成:{}#", joinUserList.size());
+                    // 若拼团中已支付的数量等于几人团预设值,则更新拼团状态为拼团成功
+                    if (groupJoin.getGroupPrice().getGpCount() == joinUserList.size()) {
+                        groupJoin.setGjStatus(ShopActivitiesGroupJoin.ACTIVITIES_JOIN_SUCCESS);
+                    } else {
+                        if (joinUser.getUserId().equals(groupJoin.getGjHeadId())) {
+                            groupJoin.setGjStatus(ShopActivitiesGroupJoin.ACTIVITIES_JOIN_ING);
+                        }
+                    }
+                    shopActivitiesGroupJoinDao.updateByModel(groupJoin);
+
+                    SysVipInfo sysVipInfo = sysVipInfoDao.selectByPhone(order.getUserTel(),order.getCompanyId());
+                    if (sysVipInfo != null) {
+                        sysVipInfo.setIsDeal(SysVipInfo.DEAL_VIP);
+                        sysVipInfoDao.update(sysVipInfo);
+                    }
+                }
+
+                // 根据订单类型创建不同的处理任务
+                rabiitMqTemplate.sendTopicMsg(RabbitMqConfig.MQ_EXCHANGE_TOPIC + evn, MQTaskRouting.CREATE_ORDER + evn, orderId + "");
+                //支付记录
+                recordPayLog(Integer.valueOf(orderId), 1, order.getOrderNo(), order.getOrderMoney(), "会员卡余额支付成功", ShopOrder.ORDER_PAY_STATUS_SUCCESS);
+
+                return AjaxResult.buildSuccessInstance("支付成功");
+
+            }else{
+                return AjaxResult.buildFailInstance("会员卡余额不足");
+            }
+
         } else {
-            payData = weixinServiceUtil.createOrder(productNames, shopOrder.getOrderNo(),
-                    unit.multiply(money).intValue(), shopOrder.getUserId(), String.valueOf(shopOrder.getId()));
+            LogUtil.info("订单状态不为待付款,order status=", order.getOrderStatus());
+            return AjaxResult.buildFailInstance("订单不支持本次结算");
         }
-        ShopOrder updateParam = new ShopOrder();
-        updateParam.setId(shopOrder.getId());
-        updateParam.setWxOrderNo(payData.getPrepay_id());
-        shopOrderDao.updateByModel(updateParam);
-        return payData;
+
+    }
+
+
+    private void recordPayLog(Integer orderId, Integer type, String orderNo, BigDecimal payMoney, String payRemark, int payStatus) {
+        //设置支付类型为收款
+        ShopPayLog payLog = new ShopPayLog();
+        payLog.setPayType(type);
+        payLog.setJoinId(orderId);
+        payLog.setPayMoney(payMoney);
+        payLog.setPayOrderNo(orderNo);
+        payLog.setPayRemark(payRemark);
+        payLog.setPayStatus(payStatus);
+        payLog.setCreateBy(AppConstance.SYSTEM_USER);
+        payLog.setUpdateBy(AppConstance.SYSTEM_USER);
+        shopPayLogDao.insert(payLog);
     }
 
 
@@ -445,9 +356,9 @@
     @GetMapping(value = "/getOrderStatusCount")
     @ResponseBody
     public AjaxResult getOrderStatusCount() {
-        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         AjaxResult result = AjaxResult.buildSuccessInstance(
-                shopOrderDao.selectOrderStatusCount(bizUser.getOpenId()));
+                shopOrderDao.selectOrderStatusCount(sysVipInfo.getId()));
         return result;
     }
 
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxBindingPhoneNumber.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxBindingPhoneNumber.java
index 6b21617..ba4c3ec 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxBindingPhoneNumber.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxBindingPhoneNumber.java
@@ -1,18 +1,16 @@
 package com.matrix.system.shopXcx.api.action;
 
 import com.matrix.component.rabbitmq.RabiitMqTemplate;
-import com.matrix.core.constance.MatrixConstance;
+import com.matrix.component.redis.RedisUserLoginUtils;
+import com.matrix.component.tools.AES;
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.core.tools.LogUtil;
 import com.matrix.core.tools.StringUtils;
-import com.matrix.biz.bean.BizUser;
-import com.matrix.biz.dao.BizUserDao;
-import com.matrix.component.tools.AES;
-import com.matrix.component.redis.RedisUserLoginUtils;
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.hive.dao.SysVipInfoDao;
 import com.matrix.system.shopXcx.api.pojo.BindingPhoneNumberPOJO;
 import com.matrix.system.shopXcx.api.tools.SMSVerifiTools;
 import com.matrix.system.shopXcx.api.vo.DataDecipheringVo;
-import com.matrix.system.shopXcx.mqTask.MQTaskRouting;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang.RandomStringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -22,9 +20,7 @@
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 /**
  * @author jiangyouyao
@@ -38,7 +34,7 @@
     @Autowired
     private SMSVerifiTools sMSVerifiTools;
     @Autowired
-    private BizUserDao bizUserDao;
+    private SysVipInfoDao sysVipInfoDao;
 
     @Autowired
     private RedisUserLoginUtils redisUserLoginUtils;
@@ -62,9 +58,9 @@
         if (StringUtils.isBlank(phoneNumber)) {
             return new AjaxResult(AjaxResult.STATUS_FAIL, "手机号码不能为空");
         }
-        BizUser bizUser = new BizUser();
-        bizUser.setPhoneNumber(phoneNumber);
-        List<BizUser> bizUsers = bizUserDao.selectByModel(bizUser);
+        SysVipInfo sysVipInfo = new SysVipInfo();
+        sysVipInfo.setPhone(phoneNumber);
+        List<SysVipInfo> bizUsers = sysVipInfoDao.selectByModel(sysVipInfo);
         if (CollectionUtils.isNotEmpty(bizUsers) && bizUsers.size() > 0) {
             return new AjaxResult(AjaxResult.STATUS_FAIL, "该手机号已被绑定");
         }
@@ -102,15 +98,14 @@
             return new AjaxResult(AjaxResult.STATUS_FAIL, "手机号码不能为空");
         }
         //验证通过将手机号加入相应的用户数据中
-        BizUser bizUser = new BizUser();
-        BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class);
-        bizUser.setUserId(loginUser.getUserId());
-        bizUser.setPhoneNumber(bindingPhoneNumber.getPhoneNumber());
-        bizUserDao.updateByModel(bizUser);
-
-        //绑定号码后同步到erp
-        mqTemplate.sendMsg(MQTaskRouting.CREATE_VIP + evn, loginUser.getOpenId()+","+bindingPhoneNumber.getShopId());
-
+        SysVipInfo sysVipInfo = new SysVipInfo();
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        sysVipInfo.setId(loginUser.getId());
+        if(loginUser.getShopId()==null){
+            sysVipInfo.setShopId(bindingPhoneNumber.getShopId());
+        }
+        sysVipInfo.setPhone(bindingPhoneNumber.getPhoneNumber());
+        sysVipInfoDao.update(sysVipInfo);
         return new AjaxResult(AjaxResult.STATUS_SUCCESS, "绑定成功");
     }
 
@@ -128,7 +123,7 @@
     @RequestMapping(value = "/deciphering")
     public @ResponseBody
     AjaxResult deciphering(@RequestBody DataDecipheringVo dataDecipheringVo) {
-        BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         String session_key = loginUser.getSessionKey();
         LogUtil.debug(dataDecipheringVo.toString());
         String jsonResult = AES.wxDecrypt(dataDecipheringVo.getEncryptedData(), session_key, dataDecipheringVo.getIv());
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxCollectionAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxCollectionAction.java
index fdbdbf6..2000ceb 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxCollectionAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxCollectionAction.java
@@ -1,7 +1,7 @@
 package com.matrix.system.shopXcx.api.action;
 
 import com.matrix.core.pojo.AjaxResult;
-import com.matrix.biz.bean.BizUser;
+import com.matrix.system.hive.bean.SysVipInfo;
 
 import com.matrix.component.redis.RedisUserLoginUtils;
 import com.matrix.system.shopXcx.bean.ShopCollection;
@@ -35,7 +35,7 @@
     @PostMapping(value = "/saveCollection")
     public @ResponseBody
     AjaxResult saveCollection(@RequestBody ShopCollection collection) {
-        BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         collection.setCreateBy(loginUser.getOpenId());
         collection.setUpdateBy(loginUser.getOpenId());
         collection.setCollUserid(loginUser.getOpenId());
@@ -72,7 +72,7 @@
     @ResponseBody
     public AjaxResult deleteByProductId(@PathVariable("collProductid") Integer collProductid){
         Map<String, Object> deleteMap = new HashMap<>();
-        BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         String collUserid = loginUser.getOpenId();
         deleteMap.put("collProductid", collProductid);
         deleteMap.put("collUserid", collUserid);
@@ -91,7 +91,7 @@
     @PostMapping("/findCollection")
     @ResponseBody
     public AjaxResult getCollectionByUserId(@RequestBody ShopCollection collection) {
-        BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         String userId = loginUser.getOpenId();
         collection.setCollUserid(userId);
         List<ShopCollection> list = collectionDao.selectByUserId(collection);
@@ -107,7 +107,7 @@
     @PostMapping("/findByUserIdAndProid/{collProductid}")
     @ResponseBody
     public AjaxResult findByUserIdAndProid(@PathVariable("collProductid") Integer collProductid) {
-        BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         String userId = loginUser.getOpenId();
         List<ShopCollection> list = collectionDao.selectByUserIdAndProid(collProductid,userId);
         AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, list, list.size());
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxCommonAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxCommonAction.java
index ff78386..dde86bb 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxCommonAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxCommonAction.java
@@ -4,13 +4,20 @@
 import com.matrix.component.wechat.externalInterface.common.Signature;
 import com.matrix.component.wechat.externalInterface.common.Util;
 import com.matrix.component.wechat.externalInterface.protocol.queryProtocol.NotifyData;
+import com.matrix.config.RabbitMqConfig;
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.core.tools.LogUtil;
 import com.matrix.system.common.bean.BusParameterSettings;
 import com.matrix.system.common.constance.AppConstance;
 import com.matrix.system.common.dao.BusParameterSettingsDao;
+import com.matrix.system.common.interceptor.HostInterceptor;
+import com.matrix.system.hive.bean.MoneyCardUse;
+import com.matrix.system.hive.bean.MoneyCardUseFlow;
 import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.hive.dao.MoneyCardUseDao;
+import com.matrix.system.hive.dao.MoneyCardUseFlowDao;
 import com.matrix.system.hive.dao.SysVipInfoDao;
+import com.matrix.system.score.service.ScoreVipDetailService;
 import com.matrix.system.shopXcx.bean.ShopActivitiesGroupJoin;
 import com.matrix.system.shopXcx.bean.ShopActivitiesGroupJoinUser;
 import com.matrix.system.shopXcx.bean.ShopOrder;
@@ -78,17 +85,15 @@
     @Autowired
     BusParameterSettingsDao busParameterSettingsDao;
 
+    @Autowired
+    ScoreVipDetailService scoreVipDetailService;
+
 
 
     @Value("${evn}")
     private String evn;
     /**
      * 微信支付回调接口
-     *
-     * @param response
-     * @param request
-     * @throws IOException
-     * @throws Exception
      */
     @Transactional(rollbackFor = Exception.class)
     @RequestMapping(value = "/wxapi/wxpayCallback")
@@ -183,7 +188,7 @@
                                 }
                                 shopActivitiesGroupJoinDao.updateByModel(groupJoin);
 
-                                SysVipInfo sysVipInfo = sysVipInfoDao.selectByPhone(order.getUserTel());
+                                SysVipInfo sysVipInfo = sysVipInfoDao.selectByPhone(order.getUserTel(), order.getCompanyId());
                                 if(sysVipInfo!=null){
                                     sysVipInfo.setIsDeal(SysVipInfo.DEAL_VIP);
                                     sysVipInfoDao.update(sysVipInfo);
@@ -192,14 +197,15 @@
                             }
 
                             // 根据订单类型创建不同的处理任务
-                            rabiitMqTemplate.sendMsg(MQTaskRouting.CREATE_ORDER+evn, orderId);
+                            rabiitMqTemplate.sendTopicMsg(RabbitMqConfig.MQ_EXCHANGE_TOPIC +evn, MQTaskRouting.CREATE_ORDER+evn, orderId);
+
 
 
                             threadResult.putInMap("status", "success");
                             resXml = AppConstance.RESULT_XML_SUCCESS;
 
                             //支付记录
-                            recordPayLog(Integer.valueOf(orderId), payMoney, order, payLog, "支付成功", ShopOrder.ORDER_PAY_STATUS_SUCCESS);
+                            recordPayLog(Integer.valueOf(orderId), 1, order.getOrderNo(), payMoney,  "支付成功", ShopOrder.ORDER_PAY_STATUS_SUCCESS);
 
 
                         } else {
@@ -238,12 +244,137 @@
 
     }
 
-    private void recordPayLog(Integer orderId, BigDecimal payMoney, ShopOrder order, ShopPayLog payLog, String payRemark, int payStatus) {
+
+    @Autowired
+    MoneyCardUseFlowDao moneyCardUseFlowDao;
+
+    @Autowired
+    MoneyCardUseDao moneyCardUseDao;
+
+    /**
+     * 微信充值回调
+     */
+    @Transactional(rollbackFor = Exception.class)
+    @RequestMapping(value = "/wxapi/rechargeCallBack")
+    public void rechargeCallBack(HttpServletResponse response, HttpServletRequest request) throws IOException {
+        LogUtil.info("微信充值回调start....");
+
+        // 获取输入参数
+        String inputLine;
+        StringBuffer notityXml = new StringBuffer();
+        String resXml = "";
+        String moneyCardUseFlowId = "";
+
+        AjaxResult threadResult = new AjaxResult(AjaxResult.STATUS_SUCCESS, "");
+        try {
+            while ((inputLine = request.getReader().readLine()) != null) {
+                notityXml.append(inputLine);
+            }
+            request.getReader().close();
+            LogUtil.info("notityXml ---- :{} ", notityXml);
+
+
+            // XMl转对象
+            Object bb = Util.getObjectFromXML(notityXml.toString(), NotifyData.class);
+            NotifyData    data = new NotifyData();
+            BeanUtils.copyProperties(bb,data);
+            LogUtil.info("----return_code = {}", data.getReturn_code());
+
+
+            // 返回状态码 SUCCESS/FAIL
+            if (AppConstance.CODE_SUCCESS.equals(data.getReturn_code())) {
+
+                moneyCardUseFlowId = data.getAttach();
+                // 检验订单状态
+                MoneyCardUseFlow moneyCardUseFlow = moneyCardUseFlowDao.selectById(Long.valueOf(moneyCardUseFlowId));
+                SysVipInfo user=sysVipInfoDao.selectById(moneyCardUseFlow.getVipId());
+
+                // 校验签名
+                BusParameterSettings paySecret = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_SECRET, user.getCompanyId());
+                if (Signature.checkIsSignValidFromResponseString(notityXml.toString(),paySecret.getParamValue())) {
+                    // 校验业务结果
+                    if (AppConstance.CODE_SUCCESS.equals(data.getResult_code())) {
+                        // 返回SUCCESS报文
+                        resXml = AppConstance.RESULT_XML_SUCCESS;
+                        // 支付费用
+                        Double total_fee = Double.parseDouble(data.getTotal_fee());
+                        // 商户订单号
+                        String payNum = data.getOut_trade_no();
+
+                        LogUtil.info("支付回调关键信息---total_fee:{},payNum:{},moneyCardUseFlowId:{}", total_fee, payNum, moneyCardUseFlowId);
+                        // 订单ID
+                        Double payMoney = new BigDecimal(total_fee).divide(new BigDecimal(100), 2,
+                                BigDecimal.ROUND_HALF_DOWN).doubleValue();
+
+                        if (moneyCardUseFlow.getCarUseId()==null) {
+
+                            if(payMoney.equals(moneyCardUseFlow.getTotal())){
+                                threadResult.putInMap("status", "success");
+                                resXml = AppConstance.RESULT_XML_SUCCESS;
+                                MoneyCardUse moneyCardUse = moneyCardUseDao.selectVipCard(user.getId());
+                                moneyCardUseFlow.setCarUseId(moneyCardUse.getId());
+                                moneyCardUseFlow.setCardName(moneyCardUse.getCardName());
+                                Double balance=moneyCardUse.getGiftMoney() + moneyCardUse.getRealMoney();
+                                moneyCardUseFlow.setBalance(balance==null?0:balance);
+                                moneyCardUseFlowDao.update(moneyCardUseFlow);
+
+                                moneyCardUse.setRealMoney(moneyCardUse.getRealMoney()+payMoney.doubleValue());
+                                moneyCardUseDao.update(moneyCardUse);
+
+                                //充值记录
+                                recordPayLog(Integer.valueOf(moneyCardUseFlowId),2,moneyCardUseFlow.getPayNo(),new BigDecimal(payMoney), "充值成功", ShopOrder.ORDER_PAY_STATUS_SUCCESS);
+                            }else{
+                                LogUtil.debug("支付金额不一致,检查支付金额payMoney={},order.getPayMoney()={}", payMoney, moneyCardUseFlow.getTotal());
+                                threadResult.putInMap("status", "err");
+                                threadResult.putInMap("msg", "支付金额不一致");
+                                resXml = AppConstance.RESULT_XML_FAIL.replace(ERRORMSG, "微信标识业务是失败");
+                            }
+
+                        } else {
+                            LogUtil.info("充值已经确认");
+                        }
+
+                    } else {
+                        LogUtil.info("微信标识业务是失败");
+                        threadResult.putInMap("status", "err");
+                        threadResult.putInMap("msg", "查询支付信息失败,请联系客服或者刷新支付信息(错误码:001)");
+                        resXml = AppConstance.RESULT_XML_FAIL.replace(ERRORMSG, "微信标识业务是失败");
+                    }
+                } else {
+                    LogUtil.info("无效签名");
+                    threadResult.putInMap("status", "err");
+                    threadResult.putInMap("msg", "查询支付信息失败,请联系客服或者刷新支付信息(错误码:002)");
+                    resXml = AppConstance.RESULT_XML_FAIL.replace(ERRORMSG, "微信标识业务是失败");
+                }
+            } else {
+                LogUtil.info("通信标识失败");
+                threadResult.putInMap("status", "err");
+                threadResult.putInMap("msg", "查询支付信息失败,请联系客服或者刷新支付信息(错误码:003)");
+                resXml = AppConstance.RESULT_XML_FAIL.replace(ERRORMSG, "通信标识失败");
+            }
+        } catch (Exception e) {
+            LogUtil.error("支付回调签名错误", e);
+            threadResult.putInMap("status", "err");
+            threadResult.putInMap("msg", "查询支付信息失败,请联系客服或者刷新支付信息(错误码:004)");
+            resXml = AppConstance.RESULT_XML_FAIL.replace(ERRORMSG, "支付回调签名错误");
+        } finally {
+            // 通知线程消息
+            PayThreadPool.notifyThread(Integer.valueOf(moneyCardUseFlowId), threadResult);
+            sendResultBack(response, resXml);
+        }
+        return;
+
+    }
+
+
+
+    private void recordPayLog(Integer orderId, Integer type,String orderNo, BigDecimal payMoney, String payRemark, int payStatus) {
         //设置支付类型为收款
-        payLog.setPayType(1);
+        ShopPayLog payLog=new ShopPayLog();
+        payLog.setPayType(type);
         payLog.setJoinId(orderId);
         payLog.setPayMoney(payMoney);
-        payLog.setPayOrderNo(order.getOrderNo());
+        payLog.setPayOrderNo(orderNo);
         payLog.setPayRemark(payRemark);
         payLog.setPayStatus(payStatus);
         payLog.setCreateBy(AppConstance.SYSTEM_USER);
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxErpOrderAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxErpOrderAction.java
index 9a3f9f4..bfe16d7 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxErpOrderAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxErpOrderAction.java
@@ -1,38 +1,19 @@
 package com.matrix.system.shopXcx.api.action;
 
-import com.alibaba.fastjson.JSONObject;
-import com.matrix.biz.bean.BizUser;
 import com.matrix.component.redis.RedisClient;
 import com.matrix.component.redis.RedisUserLoginUtils;
 import com.matrix.core.pojo.AjaxResult;
-import com.matrix.core.tools.LogUtil;
-import com.matrix.core.tools.StringUtils;
-import com.matrix.core.tools.UUIDUtil;
 import com.matrix.system.app.authority.AppAuthorityManager;
-import com.matrix.system.app.dto.LoginDto;
-import com.matrix.system.app.dto.PwdResetDto;
-import com.matrix.system.app.dto.SmsCodeDto;
-import com.matrix.system.app.dto.UploadPhotoDto;
-import com.matrix.system.app.vo.UserInfoVo;
-import com.matrix.system.common.authority.strategy.AccountPasswordLogin;
-import com.matrix.system.common.authority.strategy.LoginStrategy;
-import com.matrix.system.common.bean.SysUsers;
 import com.matrix.system.common.service.SysUsersService;
-import com.matrix.system.common.tools.PasswordUtil;
-import com.matrix.system.hive.bean.AppVersion;
 import com.matrix.system.hive.bean.SysOrderFlow;
-import com.matrix.system.hive.bean.SysShopInfo;
 import com.matrix.system.hive.bean.SysVipInfo;
 import com.matrix.system.hive.dao.SysOrderDao;
 import com.matrix.system.hive.dao.SysOrderFlowDao;
 import com.matrix.system.hive.dao.SysOrderItemDao;
 import com.matrix.system.hive.dao.SysVipInfoDao;
-import com.matrix.system.hive.plugin.util.CollectionUtils;
-import com.matrix.system.hive.plugin.util.ImageUtil;
 import com.matrix.system.hive.service.SysShopInfoService;
 import com.matrix.system.shopXcx.api.dto.ErpOrderListDto;
 import com.matrix.system.shopXcx.api.vo.ErpOrderDetailFlowVo;
-import com.matrix.system.shopXcx.api.vo.ErpOrderDetailItemVo;
 import com.matrix.system.shopXcx.api.vo.ErpOrderDetailVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -44,9 +25,6 @@
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
-import java.io.File;
-import java.io.UnsupportedEncodingException;
-import java.security.NoSuchAlgorithmException;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -91,49 +69,44 @@
     @Value("${static_resource_url}")
     private String nginxUrl;
 
-    @ApiOperation(value = "查询用户所有在ERP中产生的订单" )
+    @ApiOperation(value = "查询用户所有在ERP中产生的订单")
     @ApiResponses({
-            @ApiResponse(code = 200, message = "OK",  response = ErpOrderListDto.class)
+            @ApiResponse(code = 200, message = "OK", response = ErpOrderListDto.class)
     })
     @PostMapping(value = "/findUserOrderList")
     public AjaxResult findUserOrderList(@RequestBody @Validated ErpOrderListDto erpOrderListDto) {
-        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
-        SysVipInfo vipInfo = vipInfoDao.selectByPhone(bizUser.getPhoneNumber());
-        if(vipInfo!=null){
-            erpOrderListDto.setVipId(vipInfo.getId());
-            List<ErpOrderDetailVo> rows=sysOrderDao.selectErpOrderList(erpOrderListDto);
-            rows.forEach(item->{
-                item.setItems(orderItemDao.selectErpOrderItemByOrderId(item.getOrderId()));
-            });
-            return  AjaxResult.buildSuccessInstance(rows,"查询成功");
-        }else{
-            return  AjaxResult.buildFailInstance("未查询到相关订单001");
-        }
+        SysVipInfo vipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        
+        erpOrderListDto.setVipId(vipInfo.getId());
+        List<ErpOrderDetailVo> rows = sysOrderDao.selectErpOrderList(erpOrderListDto);
+        rows.forEach(item -> {
+            item.setItems(orderItemDao.selectErpOrderItemByOrderId(item.getOrderId()));
+        });
+        return AjaxResult.buildSuccessInstance(rows, "查询成功");
+
 
     }
 
-    @ApiOperation(value = "查询用户在ERP中的订单详情" )
+    @ApiOperation(value = "查询用户在ERP中的订单详情")
     @ApiResponses({
-            @ApiResponse(code = 200, message = "OK",  response = ErpOrderListDto.class)
+            @ApiResponse(code = 200, message = "OK", response = ErpOrderListDto.class)
     })
     @GetMapping(value = "/findUserOrderById/{orderId}")
     public AjaxResult findUserOrderList(@PathVariable Long orderId) {
-        ErpOrderDetailVo order=sysOrderDao.findUserOrderById(orderId);
+        ErpOrderDetailVo order = sysOrderDao.findUserOrderById(orderId);
         order.setItems(orderItemDao.selectErpOrderItemByOrderId(order.getOrderId()));
         List<SysOrderFlow> sysOrderFlows = orderFlowDao.selectPayMethodsAmountByOrderId(orderId);
-        List<ErpOrderDetailFlowVo> flowVos=new ArrayList<>();
-        sysOrderFlows.forEach(item->{
+        List<ErpOrderDetailFlowVo> flowVos = new ArrayList<>();
+        sysOrderFlows.forEach(item -> {
             ErpOrderDetailFlowVo erpOrderDetailFlowVo = new ErpOrderDetailFlowVo();
-            BeanUtils.copyProperties(item,erpOrderDetailFlowVo);
+            BeanUtils.copyProperties(item, erpOrderDetailFlowVo);
             flowVos.add(erpOrderDetailFlowVo);
         });
         order.setFlow(flowVos);
         AjaxResult result = AjaxResult.buildSuccessInstance("查询成功");
-        result.putInMap("order",order);
-        return  result;
+        result.putInMap("order", order);
+        return result;
     }
-
-
 
 
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxGetAcodeAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxGetAcodeAction.java
index a416bb2..d04b001 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxGetAcodeAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxGetAcodeAction.java
@@ -1,11 +1,11 @@
 package com.matrix.system.shopXcx.api.action;
 
-import com.matrix.core.pojo.AjaxResult;
-import com.matrix.biz.bean.BizUser;
-
+import com.matrix.system.hive.bean.SysVipInfo;
 import com.matrix.component.redis.RedisUserLoginUtils;
-import com.matrix.system.shopXcx.bean.ShopWxAcode;
 import com.matrix.component.tools.WxacodeUtil;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.system.shopXcx.api.WeChatApiTools;
+import com.matrix.system.shopXcx.bean.ShopWxAcode;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.*;
@@ -13,7 +13,7 @@
 import java.util.Collections;
 
 /**
- * @description 获取<link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">接口
+ * @description 获取
  * @author jiangyouyao
  * @date 2019-07-03 15:15
  */
@@ -23,6 +23,8 @@
 public class WxGetAcodeAction {
     @Autowired
     private RedisUserLoginUtils redisUserLoginUtils;
+    @Autowired
+    WeChatApiTools weChatApiTools;
     /**
      * 获取微信二维码
      * @param
@@ -31,11 +33,11 @@
     @PostMapping("/getWxAcode")
     @ResponseBody
     public AjaxResult getWxAcode(@RequestBody ShopWxAcode wxAcode) {
-        BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         String openId = loginUser.getOpenId();
-        //String openId = "omfv64kVgvGpz6D8p4J3WZYuT6M4";
         try {
-            String wxacodeUrl = WxacodeUtil.getWxacode(wxAcode.getScene(), wxAcode.getPage(), wxAcode.getFileName());
+            String wxacodeUrl = WxacodeUtil.getWxacode(wxAcode.getScene(), wxAcode.getPage(), wxAcode.getFileName(),
+                    weChatApiTools.getAppid(loginUser.getCompanyId()),weChatApiTools.getSecret(loginUser.getCompanyId()));
             String substring = wxacodeUrl.substring(0, 5);
             if("error".equals(substring)){
                 return new AjaxResult(AjaxResult.STATUS_FAIL, wxacodeUrl);
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxInvoiceAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxInvoiceAction.java
index 89e9cf1..2bd8b97 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxInvoiceAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxInvoiceAction.java
@@ -1,7 +1,7 @@
 package com.matrix.system.shopXcx.api.action;
 
 import com.matrix.core.pojo.AjaxResult;
-import com.matrix.biz.bean.BizUser;
+import com.matrix.system.hive.bean.SysVipInfo;
 import com.matrix.system.common.bean.CustomerDataDictionary;
 import com.matrix.system.common.dao.CustomerDataDictionaryDao;
 import com.matrix.component.redis.RedisUserLoginUtils;
@@ -51,7 +51,7 @@
     @PostMapping(value = "/saveInvoice")
     public @ResponseBody
     AjaxResult saveInvoice(@RequestBody ShopInvoice shopInvoice) {
-        BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         shopInvoice.setCreateBy(loginUser.getOpenId());
         shopInvoice.setUpdateBy(loginUser.getOpenId());
         shopInvoice.setUserId(loginUser.getOpenId());
@@ -82,7 +82,7 @@
     @PostMapping("/findProductComment")
     @ResponseBody
     public AjaxResult getProductCommentByUserId(@RequestBody ShopInvoice shopInvoice) {
-        BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         String userId = loginUser.getOpenId();
         shopInvoice.setUserId(userId);
         List<ShopInvoice> list = invoiceDao.selectByUserId(shopInvoice);
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxMoneyCardUseAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxMoneyCardUseAction.java
new file mode 100644
index 0000000..a8a650d
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxMoneyCardUseAction.java
@@ -0,0 +1,171 @@
+package com.matrix.system.shopXcx.api.action;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.matrix.component.redis.RedisUserLoginUtils;
+import com.matrix.component.wechat.externalInterface.protocol.paramProtocol.BrandWCPayRequestData;
+import com.matrix.component.wechat.externalInterface.weixinUtil.WeixinServiceUtil;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.pojo.BasePageQueryDto;
+import com.matrix.core.tools.LogUtil;
+import com.matrix.core.tools.StringUtils;
+import com.matrix.system.hive.bean.MoneyCardUse;
+import com.matrix.system.hive.bean.MoneyCardUseFlow;
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.hive.dao.MoneyCardUseFlowDao;
+import com.matrix.system.hive.dao.MoneyCardUseV2Dao;
+import com.matrix.system.hive.service.CodeService;
+import com.matrix.system.shopXcx.api.dto.MoneyCardUseFlowDto;
+import com.matrix.system.shopXcx.api.vo.WxMoneyCardUseVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @author jyy
+ * @date 2021-04-09
+ **/
+@Api(tags = "会员储值卡")
+@RestController
+@RequestMapping(value = "/wxapi/moneyCardUse")
+public class WxMoneyCardUseAction {
+
+    @Autowired
+    WeixinServiceUtil weixinServiceUtil;
+
+
+    @Autowired
+    private MoneyCardUseV2Dao moneyCardUseV2Dao;
+
+    @Autowired
+    private RedisUserLoginUtils redisUserLoginUtils;
+
+    @Autowired
+    MoneyCardUseFlowDao moneyCardUseFlowDao;
+
+    @Autowired
+    CodeService codeService;
+
+
+
+
+    @ApiOperation(value = "查询会员主卡", notes = "")
+    @GetMapping(value = "/getUserVipCard")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = WxMoneyCardUseVO.class)
+    })
+    public AjaxResult getUserVipCard() {
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        QueryWrapper queryWrapper = new QueryWrapper();
+        queryWrapper.eq("vip_id", sysVipInfo.getId());
+        queryWrapper.eq("is_vip_car","Y");
+        MoneyCardUse moneyCardUse = moneyCardUseV2Dao.selectOne(queryWrapper);
+        WxMoneyCardUseVO vo = new WxMoneyCardUseVO();
+        BeanUtils.copyProperties(moneyCardUse, vo);
+        return AjaxResult.buildSuccessInstance(vo);
+    }
+
+
+    @ApiOperation(value = "查询会员储值卡", notes = "")
+    @PostMapping(value = "/getUserMoneyCardUseList")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = WxMoneyCardUseVO.class)
+    })
+    public AjaxResult getUserMoneyCardUseList(@RequestBody @Validated BasePageQueryDto pageDto) {
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        QueryWrapper queryWrapper = new QueryWrapper();
+        queryWrapper.eq("vip_id", sysVipInfo.getId());
+        IPage<MoneyCardUse> page = new Page<>(pageDto.getPageNum(), pageDto.getPageSize());
+        IPage pageList = moneyCardUseV2Dao.selectPage(page, queryWrapper);
+        List<WxMoneyCardUseVO> rows = (List<WxMoneyCardUseVO>) pageList.getRecords().stream().map(item -> {
+            WxMoneyCardUseVO vo = new WxMoneyCardUseVO();
+            BeanUtils.copyProperties(item, vo);
+            return vo;
+        }).collect(Collectors.toList());
+        System.out.println(rows.get(0).getId());
+        return AjaxResult.buildSuccessInstance(rows);
+    }
+
+
+
+
+    @ApiOperation(value = "创建储值卡充值预付单", notes = "传入参数 {rechargeAmount:10} 最少充值1元,最多2位小数 ")
+    @PostMapping(value = "/createRechargeOrder")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = AjaxResult.class)
+    })
+    public AjaxResult createRechargeOrder(@RequestBody Map<String, String> param) throws Exception {
+
+        String rechargeAmount = param.get("rechargeAmount");
+        if (StringUtils.isBlank(rechargeAmount)) {
+            return AjaxResult.buildFailInstance("请输入充值金额");
+        }
+        double total = new BigDecimal(rechargeAmount).setScale(2, BigDecimal.ROUND_HALF_DOWN).doubleValue();
+        if (total < 0.02) {
+            return AjaxResult.buildFailInstance("充值金额最底1元");
+        }
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        MoneyCardUseFlow moneyCardUseFlow = new MoneyCardUseFlow();
+        moneyCardUseFlow.setVipId(sysVipInfo.getId());
+        moneyCardUseFlow.setPayNo(codeService.get32LenNumberCode());
+        moneyCardUseFlow.setTotal(total);
+        moneyCardUseFlow.setCreateTime(new Date());
+        moneyCardUseFlow.setType(MoneyCardUseFlow.USE_TYPE_CZ);
+        moneyCardUseFlowDao.insert(moneyCardUseFlow);
+        moneyCardUseFlow.setContent("微信充值");
+        BrandWCPayRequestData payData = weixinServiceUtil.createRechargeOrder("储值卡充值", moneyCardUseFlow.getPayNo(),
+                (int) (moneyCardUseFlow.getTotal() * 100), sysVipInfo.getOpenId(), String.valueOf(moneyCardUseFlow.getId()));
+        AjaxResult result = AjaxResult.buildSuccessInstance(payData);
+        result.putInMap("orderId", moneyCardUseFlow.getId());
+        return result;
+    }
+
+    @ApiOperation(value = "查询充值结果", notes = " ")
+    @GetMapping(value = "/getRechargePayStatus/{orderId}")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = AjaxResult.class)
+    })
+    public AjaxResult getRechargePayStatus(@PathVariable Long orderId) {
+        AjaxResult result =AjaxResult.buildSuccessInstance("查询成功");
+        MoneyCardUseFlow moneyCardUseFlow = moneyCardUseFlowDao.selectById(orderId);
+        if (moneyCardUseFlow.getCarUseId() != null) {
+            result.putInMap("status", "success");
+            result.putInMap("msg", "支付成功");
+        } else {
+            LogUtil.debug("充值等待支付中={}。。。", orderId);
+            PayThreadPool.waitThread(orderId.intValue(), new Object());
+            result = PayThreadPool.getThreadResult(orderId.intValue());
+            LogUtil.debug("充值订单支付完成={}。。。", orderId);
+        }
+        return result;
+    }
+
+
+
+    @ApiOperation(value = "查询会员储值卡充值使用记录", notes = "keywords 传入会员卡ID")
+    @PostMapping(value = "/getRechargeList")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = MoneyCardUseFlow.class)
+    })
+    public AjaxResult getRechargeList(@RequestBody @Validated MoneyCardUseFlowDto pageDto) {
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        pageDto.setCompanyId(sysVipInfo.getCompanyId());
+        List<MoneyCardUseFlow> dataList = moneyCardUseFlowDao.selectForWxInPage(pageDto);
+        return AjaxResult.buildSuccessInstance(dataList);
+    }
+
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxProductAttributeAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxProductAttributeAction.java
index 2adf5f8..07dbded 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxProductAttributeAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxProductAttributeAction.java
@@ -28,9 +28,9 @@
     @Autowired
     private ShopProductAttributeDao shopProductAttributeDao;
 
-    @RequestMapping("/getByCode/{shopId}/{attrCode}")
+    @RequestMapping("/getByCode/{attrCode}")
     @ResponseBody
-    public AjaxResult getProductAttributeByCode(@PathVariable("shopId") Long shopId, @PathVariable("attrCode") String attrCode){
+    public AjaxResult getProductAttributeByCode(@PathVariable("attrCode") String attrCode){
 
         if(!StringUtils.isNotBlank(attrCode)){
             return  new AjaxResult(AjaxResult.STATUS_FAIL,"属性编码不能为空");
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxProductCommentAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxProductCommentAction.java
index 9a13860..456b0e2 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxProductCommentAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxProductCommentAction.java
@@ -1,10 +1,14 @@
 package com.matrix.system.shopXcx.api.action;
 
-import com.matrix.core.pojo.AjaxResult;
-import com.matrix.biz.bean.BizUser;
 import com.matrix.component.redis.RedisUserLoginUtils;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.system.common.bean.BusParameterSettings;
 import com.matrix.system.common.constance.AppConstance;
-
+import com.matrix.system.common.dao.BusParameterSettingsDao;
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.score.constant.ScoreSettingConstant;
+import com.matrix.system.score.entity.ScoreVipDetail;
+import com.matrix.system.score.service.ScoreVipDetailService;
 import com.matrix.system.shopXcx.bean.ShopOrder;
 import com.matrix.system.shopXcx.bean.ShopProductComment;
 import com.matrix.system.shopXcx.dao.ShopOrderDao;
@@ -34,6 +38,11 @@
     @Autowired
     private ShopOrderDao shopOrderDao;
 
+    @Autowired
+    ScoreVipDetailService scoreVipDetailService;
+
+    @Autowired
+    private BusParameterSettingsDao busParameterSettingsDao;
     /**
      * 根据ID逻辑删除产品评价
      * @param
@@ -58,7 +67,7 @@
     @PostMapping(value = "/saveProductComment")
     public @ResponseBody
     AjaxResult saveProductComment(@RequestBody List<ShopProductComment> commentList) {
-        BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         int flag = 0;
         if(CollectionUtils.isNotEmpty(commentList)){
             for(ShopProductComment productComment : commentList){
@@ -81,6 +90,13 @@
         modifyMap.put("id", orderId);
         modifyMap.put("orderStatus", ShopOrder.ORDER_STATUS_ALREADY_REMARK);
         shopOrderDao.updateByMap(modifyMap);
+
+        //添加用户积分
+        BusParameterSettings parameterSetting = busParameterSettingsDao.selectCompanyParamByCode(ScoreSettingConstant.EVALUATUIN_ORDER_SHOP_NAME, loginUser.getCompanyId());
+        scoreVipDetailService.addScoreByParamSetting(loginUser.getId(), null,null, commentList.get(0).getComId(),
+                ScoreVipDetail.SCORE_VIP_TYPE_JOIN_ACTIVE,"评价送积分", parameterSetting);
+
+
         return new AjaxResult(AjaxResult.STATUS_SUCCESS, "保存成功");
     }
 
@@ -92,7 +108,7 @@
     @PostMapping("/findProductComment")
     @ResponseBody
     public AjaxResult getProductCommentByUserId(@RequestBody ShopProductComment productComment) {
-        BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         String userId = loginUser.getOpenId();
         productComment.setUserId(userId);
         List<ShopProductComment> list = productCommentDao.selectByUserId(productComment);
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxReceiveAddressAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxReceiveAddressAction.java
index be633d2..ba7563a 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxReceiveAddressAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxReceiveAddressAction.java
@@ -2,7 +2,7 @@
 
 import com.matrix.core.exception.GlobleException;
 import com.matrix.core.pojo.AjaxResult;
-import com.matrix.biz.bean.BizUser;
+import com.matrix.system.hive.bean.SysVipInfo;
 import com.matrix.component.redis.RedisUserLoginUtils;
 import com.matrix.system.common.constance.AppConstance;
 
@@ -37,7 +37,7 @@
     @PostMapping(value = "/saveReceiveAddress")
     public @ResponseBody
     AjaxResult saveReceiveAddress(@RequestBody ShopReceiveAddress receiveAddress) {
-        BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         receiveAddress.setCreateBy(loginUser.getOpenId());
         receiveAddress.setUpdateBy(loginUser.getOpenId());
         receiveAddress.setAddrUserid(loginUser.getOpenId());
@@ -94,7 +94,7 @@
     @PostMapping("/findReceiveAddress")
     @ResponseBody
     public AjaxResult getByAddrUserId(@RequestBody ShopReceiveAddress receiveAddress) {
-        BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         String userId = loginUser.getOpenId();
         receiveAddress.setAddrUserid(userId);
         List<ShopReceiveAddress> list = shopReceiveAddressDao.selectByModel(receiveAddress);
@@ -110,7 +110,7 @@
     @PostMapping("/findAddrByAddrId/{addrId}")
     @ResponseBody
     public AjaxResult getByAddrId(@PathVariable("addrId") Integer addrId) {
-        BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         String userId = loginUser.getOpenId();
         ShopReceiveAddress params = new ShopReceiveAddress();
         params.setAddrUserid(userId);
@@ -145,7 +145,7 @@
     @PostMapping(value = "/updateReceiveAddress")
     public @ResponseBody
     AjaxResult updateReceiveAddress(@RequestBody ShopReceiveAddress receiveAddress) {
-        BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         receiveAddress.setCreateBy(loginUser.getOpenId());
         receiveAddress.setUpdateBy(loginUser.getOpenId());
         receiveAddress.setAddrUserid(loginUser.getOpenId());
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxRefundRecordAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxRefundRecordAction.java
index 66b4c64..daf749a 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxRefundRecordAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxRefundRecordAction.java
@@ -1,6 +1,6 @@
 package com.matrix.system.shopXcx.api.action;
 
-import com.matrix.biz.bean.BizUser;
+import com.matrix.system.hive.bean.SysVipInfo;
 import com.matrix.component.redis.RedisUserLoginUtils;
 import com.matrix.component.tools.WxUtils;
 import com.matrix.core.pojo.AjaxResult;
@@ -110,10 +110,10 @@
     @PostMapping(value = "/saveRefundRecord")
     public @ResponseBody
     AjaxResult saveRefundRecord(@RequestBody ShopRefundRecord refundRecord) {
-        BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         refundRecord.setCreateBy(loginUser.getOpenId());
         refundRecord.setUpdateBy(loginUser.getOpenId());
-        refundRecord.setUserId(loginUser.getOpenId());
+        refundRecord.setUserId(loginUser.getId());
         refundRecord.setCompanyId(loginUser.getCompanyId());
         refundRecord.setAuditStatus(AppConstance.REFUND_NOT_AUDITED);
         refundRecord.setRefundStatus(AppConstance.REFUND_PROCESSING);
@@ -124,7 +124,7 @@
         refundRecord.setApplyTime(new Date());
 
         ShopRefundRecord record = new ShopRefundRecord();
-        record.setUserId(loginUser.getOpenId());
+        record.setUserId(loginUser.getId());
         record.setOrderId(refundRecord.getOrderId());
         List<ShopRefundRecord> shopRefundRecords = refundRecordDao.selectByModel(record);
         if(CollectionUtils.isNotEmpty(shopRefundRecords)){
@@ -159,7 +159,6 @@
 
                     if(flag){
                         ShopRefundRecord fundRecord = refundRecordDao.selectById(shopRecord.getId());
-                        refundRecordService.sendRefundInfoToUser(fundRecord);
                         refundRecordService.updateGroupBuyStatus(orderId.longValue());
                         return new AjaxResult(AjaxResult.STATUS_SUCCESS, "退款成功");
                     }
@@ -186,9 +185,8 @@
     @PostMapping("/findRefundRecord")
     @ResponseBody
     public AjaxResult getRefundRecordByUserId(@RequestBody ShopRefundRecord refundRecord) {
-        BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class);
-        String userId = loginUser.getOpenId();
-        refundRecord.setUserId(userId);
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        refundRecord.setUserId(loginUser.getId());
         List<ShopRefundRecord> list = refundRecordDao.selectByRefundUserId(refundRecord);
         AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, list, list.size());
         return result;
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesOrderAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesOrderAction.java
new file mode 100644
index 0000000..ca54c0f
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesOrderAction.java
@@ -0,0 +1,78 @@
+package com.matrix.system.shopXcx.api.action;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.hive.dao.SysVipInfoDao;
+import com.matrix.component.redis.RedisUserLoginUtils;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.tools.StringUtils;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
+import com.matrix.system.fenxiao.dao.ShopSalesmanApplyDao;
+import com.matrix.system.fenxiao.dao.ShopSalesmanOrderDao;
+import com.matrix.system.fenxiao.service.ShopSalesmanApplyService;
+import com.matrix.system.shopXcx.api.dto.SaleOrderDto;
+import com.matrix.system.shopXcx.vo.SalesOrderVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author jyy
+ * @date 2021-03-10
+ **/
+@Api(tags = "分销订单接口类")
+@RestController
+@RequestMapping(value = "/wxapi/salesOrder")
+public class WxSalesOrderAction {
+
+    @Autowired
+    BusParameterSettingsDao busParameterSettingsDao;
+
+    @Autowired
+    ShopSalesmanApplyDao salesmanApplyDao;
+
+
+    @Autowired
+    ShopSalesmanApplyService shopSalesmanApplyService;
+
+    @Autowired
+    private RedisUserLoginUtils redisUserLoginUtils;
+
+    @Autowired
+    private SysVipInfoDao sysVipInfoDao;
+
+    @Autowired
+    private ShopSalesmanOrderDao shopSalesmanOrderDao;
+
+
+    @ApiOperation(value = "获取推广订单", notes = "")
+    @PostMapping(value = "/getOrderList")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = SalesOrderVo.class)
+    })
+    AjaxResult getInvitationuserList(@RequestBody @Validated SaleOrderDto saleOrderDto) {
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        Page<SalesOrderVo> page=new Page<>(saleOrderDto.getPageNum(),saleOrderDto.getPageSize());
+        if(StringUtils.isBlank(saleOrderDto.getSort())){
+            saleOrderDto.setSort("create_time");
+            saleOrderDto.setOrder("desc");
+        }
+        saleOrderDto.setUserId(loginUser.getId());
+        IPage<SalesOrderVo> shopSalesmanApplyIPage = shopSalesmanOrderDao.selectSalesManOrder(page,  saleOrderDto);
+        AjaxResult result=AjaxResult.buildSuccessInstance(shopSalesmanApplyIPage.getRecords());
+        return result;
+    }
+
+
+
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesProductAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesProductAction.java
new file mode 100644
index 0000000..611820b
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesProductAction.java
@@ -0,0 +1,68 @@
+package com.matrix.system.shopXcx.api.action;
+
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.system.common.constance.AppConstance;
+import com.matrix.system.common.interceptor.HostInterceptor;
+import com.matrix.system.shopXcx.api.dto.SaleProductDto;
+import com.matrix.system.shopXcx.bean.ShopProduct;
+import com.matrix.system.shopXcx.dao.ShopProductAttributeDao;
+import com.matrix.system.shopXcx.dao.ShopProductDao;
+import com.matrix.system.shopXcx.dao.ShopSkuDao;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @author jyy
+ * @date 2021-03-10
+ **/
+@Api(tags = "分销商品类")
+@RestController
+@RequestMapping(value = "/wxapi/salesProduct")
+public class WxSalesProductAction {
+
+    @Autowired
+    private ShopProductDao shopProductDao;
+
+    @Autowired
+    private ShopProductAttributeDao shopProductAttributeDao;
+
+    @Autowired
+    private ShopSkuDao shopSkuDao;
+
+    @ApiOperation(value = "查询推广商品", notes = "")
+    @PostMapping(value = "/getSalesProductList")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response=SaleProductDto.class)
+    })
+    public AjaxResult getShopProductShowList(@RequestBody @Validated SaleProductDto saleProductDto) {
+        ShopProduct shopProduct=new ShopProduct();
+        shopProduct.setLimit(saleProductDto.getPageSize());
+        shopProduct.setOffset((saleProductDto.getPageNum()-1)* saleProductDto.getPageSize());
+        shopProduct.setCategoryId(saleProductDto.getCategoryId());
+        shopProduct.setDelFlag(AppConstance.DATA_USEABLE);
+        shopProduct.setStatus(AppConstance.IS_PUTAWAY);
+        shopProduct.setAbleSales(ShopProduct.ABLE_SALES);
+        shopProduct.setCompanyId(HostInterceptor.getCompanyId());
+        List<ShopProduct> shopProducts = shopProductDao.selectByModelWx(shopProduct);
+        shopProducts.forEach(item->item.setSkus(shopSkuDao.selectByPid(item.getId())));
+        AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, shopProducts);
+        return result;
+    }
+
+
+
+
+
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesWithdrawalAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesWithdrawalAction.java
new file mode 100644
index 0000000..b60d8e3
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesWithdrawalAction.java
@@ -0,0 +1,126 @@
+package com.matrix.system.shopXcx.api.action;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.hive.dao.SysVipInfoDao;
+import com.matrix.component.redis.RedisUserLoginUtils;
+import com.matrix.component.wechat.externalInterface.weixinUtil.WeixinServiceUtil;
+import com.matrix.core.constance.MatrixConstance;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.pojo.BasePageQueryDto;
+import com.matrix.system.fenxiao.dao.ShopRevenueFlowDao;
+import com.matrix.system.fenxiao.entity.ShopRevenueFlow;
+import com.matrix.system.hive.service.CodeService;
+import com.matrix.system.shopXcx.api.dto.RevenueFlowDto;
+import com.matrix.system.shopXcx.api.dto.WithdrawalCashDto;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+
+/**
+ * @author jyy
+ * @date 2021-03-10
+ **/
+@Api(tags = "提现接口类")
+@RestController
+@RequestMapping(value = "/wxapi/salesWithdrawal")
+public class WxSalesWithdrawalAction {
+
+
+    @Autowired
+    private RedisUserLoginUtils redisUserLoginUtils;
+
+    @Autowired
+    private SysVipInfoDao sysVipInfoDao;
+
+    @Autowired
+    private ShopRevenueFlowDao revenueFlowDao;
+
+
+    @Autowired
+    private ShopRevenueFlowDao shopRevenueFlowDao;
+    @Autowired
+    WeixinServiceUtil weixinServiceUtil;
+
+    @Autowired
+    CodeService codeService;
+
+    @ApiOperation(value = "获取收支明细", notes = "")
+    @PostMapping(value = "/getRevenueFlow")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = ShopRevenueFlow.class)
+    })
+    AjaxResult getInvitationuserList(@RequestBody @Validated RevenueFlowDto revenueFlowDto) {
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        Page<ShopRevenueFlow> page=new Page<>(revenueFlowDto.getPageNum(),revenueFlowDto.getPageSize());
+        revenueFlowDto.setUserId(loginUser.getId());
+        IPage<ShopRevenueFlow> shopSalesmanApplyIPage = revenueFlowDao.selectRevenuFlowList(page,  revenueFlowDto);
+        AjaxResult result=AjaxResult.buildSuccessInstance(shopSalesmanApplyIPage.getRecords());
+        return result;
+    }
+
+
+    @ApiOperation(value = "提现", notes = "")
+    @PostMapping(value = "/withdrawalCash")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = BasePageQueryDto.class)
+    })
+    @Transactional
+    AjaxResult withdrawalCash(@RequestBody @Validated WithdrawalCashDto withdrawalCashDto) {
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        loginUser=sysVipInfoDao.selectById(loginUser.getId());
+        if(withdrawalCashDto.getAmount()<1){
+            return AjaxResult.buildFailInstance("最小提现金额为1元");
+        }else if(withdrawalCashDto.getAmount()>20000){
+            return AjaxResult.buildFailInstance("最大提现金额为2万元");
+        }else{
+            if(loginUser.getWithdrawalCash()==null || loginUser.getWithdrawalCash()<withdrawalCashDto.getAmount()){
+                return AjaxResult.buildFailInstance("余额不足");
+            }else{
+
+                String txNo = codeService.get32LenNumberCode();
+
+             /*调试注释
+             weixinServiceUtil.comPay("提现", txNo,Integer.parseInt((withdrawalCashDto.getAmount()*1000)+""),
+                        loginUser.getOpenId(),loginUser.getCompanyId());
+                    */
+                //记录收益流水
+                ShopRevenueFlow invitationRevenueFlow=new ShopRevenueFlow();
+                invitationRevenueFlow.setCompanyId(loginUser.getCompanyId());
+                invitationRevenueFlow.setCreateBy(MatrixConstance.SYSTEM_USER);
+                invitationRevenueFlow.setUpdateBy(txNo);
+                invitationRevenueFlow.setCreateTime(new Date());
+                invitationRevenueFlow.setUpdateTime(new Date());
+                invitationRevenueFlow.setAmount(-withdrawalCashDto.getAmount());
+                invitationRevenueFlow.setUserId(loginUser.getId());
+                invitationRevenueFlow.setRevenueContent("提现");
+                shopRevenueFlowDao.insert(invitationRevenueFlow);
+                //扣除用户剩余提现金额
+                loginUser.setWithdrawalCash(loginUser.getWithdrawalCash()-withdrawalCashDto.getAmount());
+                sysVipInfoDao.update(loginUser);
+                redisUserLoginUtils.updateUserInfo(loginUser);
+
+
+                return AjaxResult.buildSuccessInstance("提现成功");
+            }
+        }
+
+
+    }
+
+
+
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesmanAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesmanAction.java
new file mode 100644
index 0000000..7e39d58
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesmanAction.java
@@ -0,0 +1,316 @@
+package com.matrix.system.shopXcx.api.action;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.hive.dao.SysVipInfoDao;
+import com.matrix.component.redis.RedisUserLoginUtils;
+import com.matrix.component.tools.ImageUtil;
+import com.matrix.component.tools.WxacodeUtil;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.pojo.BasePageQueryDto;
+import com.matrix.core.pojo.VerificationResult;
+import com.matrix.core.tools.LogUtil;
+import com.matrix.core.tools.MD5Util;
+import com.matrix.core.tools.PropertiesUtil;
+import com.matrix.core.tools.StringUtils;
+import com.matrix.system.common.bean.BusParameterSettings;
+import com.matrix.system.common.constance.AppConstance;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
+import com.matrix.system.common.interceptor.HostInterceptor;
+import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant;
+import com.matrix.system.fenxiao.dao.ShopSalesmanApplyDao;
+import com.matrix.system.fenxiao.entity.ShopSalesmanApply;
+import com.matrix.system.fenxiao.service.ShopSalesmanApplyService;
+import com.matrix.system.hive.plugin.util.CollectionUtils;
+import com.matrix.system.shopXcx.api.WeChatApiTools;
+import com.matrix.system.shopXcx.dao.ShopProductDao;
+import com.matrix.system.shopXcx.vo.SalesmanApplyCondition;
+import com.matrix.system.shopXcx.vo.SalesmanCenterInfo;
+import com.matrix.system.shopXcx.vo.SalesmanVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
+
+import javax.imageio.ImageIO;
+import java.awt.*;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @author wzy
+ * @date 2021-03-10
+ **/
+@Api(tags = "推广员接口类")
+@RestController
+@RequestMapping(value = "/wxapi/salesman")
+public class WxSalesmanAction {
+
+    @Autowired
+    BusParameterSettingsDao busParameterSettingsDao;
+
+    @Autowired
+    ShopSalesmanApplyDao salesmanApplyDao;
+
+
+    @Autowired
+    ShopSalesmanApplyService shopSalesmanApplyService;
+
+    @Autowired
+    private RedisUserLoginUtils redisUserLoginUtils;
+
+    @Autowired
+    private SysVipInfoDao sysVipInfoDao;
+    @Autowired
+    WeChatApiTools weChatApiTools;
+
+    @Autowired
+    ShopProductDao shopProductDao;
+
+
+    @ApiOperation(value = "查询推广计划", notes = "")
+    @GetMapping(value = "/getTgPlan")
+    public AjaxResult getTgPlan() {
+        BusParameterSettings busParameterSettings = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_TG_PLAN, HostInterceptor.getCompanyId());
+        AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("");
+        ajaxResult.setData(busParameterSettings.getParamValue3());
+        return ajaxResult;
+    }
+
+    @ApiOperation(value = "查询分销商城开关", notes = "1开启分销,2关闭分销")
+    @GetMapping(value = "/getSalesMallSetting")
+    public AjaxResult getSalesMallSwith() {
+        BusParameterSettings fxSwith = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_SWITCH, HostInterceptor.getCompanyId());
+        BusParameterSettings fxModel = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_MODEL, HostInterceptor.getCompanyId());
+        AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("查询成功");
+        ajaxResult.putInMap("fxSwith", fxSwith.getParamValue());
+        ajaxResult.putInMap("fxModel", fxModel.getParamValue());
+        return ajaxResult;
+    }
+
+
+    @ApiOperation(value = "申请成为推广员", notes = "传入参数invitationId 邀请人openId ,非必填 例: {invitationId:openId}")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = ShopSalesmanApply.class)
+    })
+    @PostMapping(value = "/applyToBeAnSalesman")
+    @Transactional
+    public AjaxResult applyToBeAnSalesman(@RequestBody Map<String, String> param) {
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        Long invitationId=null;
+        if(StringUtils.isNotBlank(param.get("invitationId"))){
+             invitationId = Long.parseLong(param.get("invitationId"));
+
+            SysVipInfo invitationUser = sysVipInfoDao.selectById(invitationId);
+            if (invitationUser != null && invitationUser.getId().equals(loginUser.getId())) {
+                return AjaxResult.buildFailInstance("不能邀请自己成为推广员");
+            }
+        }
+        ShopSalesmanApply shopSalesmanApply = shopSalesmanApplyService.applyToBeAnSalesman(loginUser.getId(), null, invitationId, ShopSalesmanApply.APPLY_WAY_SELF);
+        loginUser = sysVipInfoDao.selectById(loginUser.getId());
+        redisUserLoginUtils.updateUserInfo(loginUser);
+        return AjaxResult.buildSuccessInstance(shopSalesmanApply);
+
+
+    }
+
+
+    @ApiOperation(value = "查询审核进度", notes = "")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = ShopSalesmanApply.class)
+    })
+    @GetMapping(value = "/queryApplyProgress")
+    public AjaxResult queryApplyProgress() {
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        QueryWrapper<ShopSalesmanApply> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("user_id", loginUser.getId());
+        queryWrapper.eq("apply_status", ShopSalesmanApply.APPLY_STATUS_DSH);
+        ShopSalesmanApply shopSalesmanApply = salesmanApplyDao.selectOne(queryWrapper);
+        return AjaxResult.buildSuccessInstance(shopSalesmanApply);
+    }
+
+
+    @ApiOperation(value = "绑定下级客户,当客户点击分销员分销的产品时调用", notes = "传入参数invitationId 必须 分销员userId例: {invitationId:userId}")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = Map.class)
+    })
+    @PostMapping(value = "/bindingParentSalesman")
+    public AjaxResult bindingParentSalesman(@RequestBody Map<String, Long> param) {
+        Long invitationId = param.get("invitationId");
+
+
+
+        SysVipInfo invitationUser = sysVipInfoDao.selectById(invitationId);
+        if (invitationUser == null) {
+            return AjaxResult.buildFailInstance("请求参数错误");
+        }
+
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        if (invitationId.equals(loginUser.getId())) {
+            return AjaxResult.buildSuccessInstance("不能绑定自己");
+        }
+
+        loginUser = sysVipInfoDao.selectById(loginUser.getId());
+        if (loginUser.getIsSales() == 1) {
+            return AjaxResult.buildSuccessInstance("只有非分销员才能被绑定成客户");
+        }
+        if (loginUser.getRecommendId()!=null) {
+            return AjaxResult.buildSuccessInstance("已经被绑定");
+        } else {
+            if (loginUser.getRecommendId()==null) {
+                Map<String, Object> updateParam = new HashMap<>();
+                updateParam.put("id", loginUser.getId());
+                loginUser.setRecommendId(invitationUser.getId());
+                loginUser.setBindingParentTime(new Date());
+                sysVipInfoDao.update(loginUser);
+                return AjaxResult.buildSuccessInstance("绑定成功");
+            } else {
+                return AjaxResult.buildSuccessInstance("已经存在上级");
+            }
+        }
+
+
+    }
+
+
+    @ApiOperation(value = "生成邀请下级海报", notes = "")
+    @PostMapping(value = "/getInvitationPoster")
+    AjaxResult getInvitationPoster() {
+        try {
+            SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+
+            String baseSavePath = PropertiesUtil.getString(AppConstance.FILES_TORAGE_PATH);
+            // 图片访问URL
+            String baseSaveUrl = PropertiesUtil.getString(AppConstance.NGINX_URL);
+
+            //目标海报物理存储路径
+            String targetImg = MD5Util.strToMD5(loginUser.getOpenId()) + "haibao.png";
+            String targetImgPath = baseSavePath + "wxacode" + File.separatorChar + targetImg;
+
+            String urlPath = baseSaveUrl + "/" + "wxacode" + "/" + targetImg;
+
+            String qrcodeSavePath = WxacodeUtil.getWxacode(loginUser.getId() + "", "pages/distributorCenter/applyFor/applyFor", MD5Util.strToMD5(loginUser.getOpenId()) + "qrcode"
+                    , weChatApiTools.getAppid(loginUser.getCompanyId()), weChatApiTools.getSecret(loginUser.getCompanyId()));
+
+            BufferedImage qrcordImgBuf = ImageIO.read(new File(qrcodeSavePath));
+
+            //获取海报
+            BusParameterSettings posterSetting = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_TG_POSTER, loginUser.getCompanyId());
+            String posterPath = baseSavePath + "wxacode" + File.separatorChar + MD5Util.strToMD5(loginUser.getOpenId()) + "poster.png";
+            ImageUtil.downloadPicture(posterSetting.getParamValue(), posterPath);
+            BufferedImage posterImgBuf = ImageIO.read(new File(posterPath));
+
+            //获取用户头像
+            String userPhotoPath = baseSavePath + "wxacode" + File.separatorChar + MD5Util.strToMD5(loginUser.getOpenId()) + "userPhoto.png";
+            ImageUtil.downloadPicture(loginUser.getAvatarUrl(), userPhotoPath);
+            BufferedImage userPhotoImgBuf = ImageIO.read(new File(userPhotoPath));
+
+
+            BufferedImage backgroundImgBuf = new BufferedImage(700, 900, BufferedImage.TYPE_4BYTE_ABGR);
+            //绘制背景+产品
+            Graphics2D g = backgroundImgBuf.createGraphics();
+            g.setColor(Color.WHITE);
+            g.fillRect(0, 0, 700, 900);
+            g.drawImage(posterImgBuf, 0, 0, 700, 700, null);
+
+            g.drawImage(userPhotoImgBuf, 20, 720, 80, 80, null);
+
+            g.drawImage(qrcordImgBuf, 500, 720, 150, 150, null);
+
+            g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB);
+
+            g.setFont(new Font("WenQuanYi Micro Hei", Font.BOLD, 24));
+            g.setColor(Color.BLACK);
+            g.drawString(loginUser.getNickName() + "邀请你一起推广赚佣金", 120, 750);
+
+            g.dispose();
+            ImageIO.write(backgroundImgBuf, "png", new File(targetImgPath));
+
+            return AjaxResult.buildSuccessInstance(urlPath);
+        } catch (Exception e) {
+            LogUtil.error("推广二维码生成错误:{}", e, "");
+            return AjaxResult.buildFailInstance("二维码生成失败");
+        }
+
+    }
+
+
+    @ApiOperation(value = "获取下级列表", notes = "keywords=1 表示下级,keywords=2表示顾客")
+    @PostMapping(value = "/getInvitationuserList")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = SalesmanVo.class)
+    })
+    AjaxResult getInvitationuserList(@RequestBody BasePageQueryDto pageDto) {
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        Page<SalesmanVo> page = new Page<>(pageDto.getPageNum(), pageDto.getPageSize());
+        IPage<SalesmanVo> shopSalesmanApplyIPage = salesmanApplyDao.selectInvitationuserInPage(page, loginUser.getId(), pageDto.getKeywords());
+        AjaxResult result = AjaxResult.buildSuccessInstance(shopSalesmanApplyIPage.getRecords());
+        return result;
+    }
+
+
+    @ApiOperation(value = "查询分销员中心信息", notes = "")
+    @PostMapping(value = "/getSalesmanCenterInfo")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = SalesmanCenterInfo.class)
+    })
+    AjaxResult getSalesmanCenterInfo() {
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        SalesmanCenterInfo salesmanCenterInfo = salesmanApplyDao.selectSalesmanCenterInfo(loginUser.getId());
+        return AjaxResult.buildSuccessInstance(salesmanCenterInfo);
+    }
+
+    @ApiOperation(value = "查询分销员申请条件", notes = "")
+    @PostMapping(value = "/getSalesmanApplyCondition")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = SalesmanApplyCondition.class)
+    })
+    AjaxResult getSalesmanApplyCondition() {
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        VerificationResult ableToBeAnSalesman = shopSalesmanApplyService.isAbleToBeAnSalesman(loginUser.getId(), loginUser.getCompanyId());
+        SalesmanApplyCondition applyConditionInfo = new SalesmanApplyCondition();
+        applyConditionInfo.setIsAbleApply(ableToBeAnSalesman.isJudgeResult());
+        applyConditionInfo.setMsg(ableToBeAnSalesman.getMsg());
+
+        //申请条件
+        BusParameterSettings applyCondition = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_APPLY_CONDITION, loginUser.getCompanyId());
+        switch (applyCondition.getParamValue()) {
+            case FenxiaoSettingConstant.FX_APPLY_CONDITION_WTJ:
+                applyConditionInfo.setCondition("您已满足申请条件");
+                break;
+            case FenxiaoSettingConstant.FX_APPLY_CONDITION_XFZDCP:
+                applyConditionInfo.setCondition("消费指定产品并确认收货");
+                List<String> strings = StringUtils.strToColl(applyCondition.getParamValue1(), ",");
+                List<Integer> ids = strings.stream().filter(i -> StringUtils.isNotBlank(i)).map(i -> Integer.parseInt(i + "")).distinct().collect(Collectors.toList());
+                if (CollectionUtils.isNotEmpty(ids)) {
+                    applyConditionInfo.setProductList(shopProductDao.selectByIds(ids));
+                } else {
+                    return AjaxResult.buildFailInstance("未配置消费产品,请联系管理员");
+                }
+
+                break;
+            case FenxiaoSettingConstant.FX_APPLY_CONDITION_XFRYCP:
+                //判断用户是否有确认收货的产品
+                applyConditionInfo.setCondition("消费任意产品并确认收货");
+                break;
+            case FenxiaoSettingConstant.FX_APPLY_CONDITION_XCZDJE:
+                Double zdje = Double.parseDouble(applyCondition.getParamValue2());
+                applyConditionInfo.setCondition("消费满" + zdje + "元确认收货");
+                applyConditionInfo.setMinAmount(zdje);
+        }
+
+        return AjaxResult.buildSuccessInstance(applyConditionInfo);
+    }
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxScoreProductAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxScoreProductAction.java
new file mode 100644
index 0000000..ebdc64d
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxScoreProductAction.java
@@ -0,0 +1,72 @@
+package com.matrix.system.shopXcx.api.action;
+
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.tools.StringUtils;
+import com.matrix.system.common.constance.AppConstance;
+import com.matrix.system.common.interceptor.HostInterceptor;
+import com.matrix.system.shopXcx.api.dto.SaleProductDto;
+import com.matrix.system.shopXcx.api.dto.ScoreProductDto;
+import com.matrix.system.shopXcx.bean.ShopProduct;
+import com.matrix.system.shopXcx.bean.ShopProductAttribute;
+import com.matrix.system.shopXcx.dao.ShopProductAttributeDao;
+import com.matrix.system.shopXcx.dao.ShopProductDao;
+import com.matrix.system.shopXcx.dao.ShopSkuDao;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @author jyy
+ * @date 2021-03-10
+ **/
+@Api(tags = "积分商品类")
+@RestController
+@RequestMapping(value = "/wxapi/scoreProduct")
+public class WxScoreProductAction {
+
+    @Autowired
+    private ShopProductDao shopProductDao;
+
+    @Autowired
+    private ShopSkuDao shopSkuDao;
+
+    @Autowired
+    ShopProductAttributeDao shopProductAttributeDao;
+
+    @ApiOperation(value = "查询积分商品", notes = "")
+    @PostMapping(value = "/getScoreProductList")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response=SaleProductDto.class)
+    })
+    public AjaxResult getShopProductShowList(@RequestBody @Validated ScoreProductDto scoreProductDto) {
+        ShopProduct shopProduct=new ShopProduct();
+        shopProduct.setLimit(scoreProductDto.getPageSize());
+        shopProduct.setOffset((scoreProductDto.getPageNum()-1)* scoreProductDto.getPageSize());
+        shopProduct.setScoreCategoryId(scoreProductDto.getScoreCategoryId());
+        shopProduct.setDelFlag(AppConstance.DATA_USEABLE);
+        shopProduct.setStatus(AppConstance.IS_PUTAWAY);
+        shopProduct.setAbleScorePay(ShopProduct.PAYFOR_SCORE);
+        shopProduct.setCompanyId(HostInterceptor.getCompanyId());
+        //根据属性查询
+        if(StringUtils.isNotBlank(scoreProductDto.getAttrCode())){
+            ShopProductAttribute jfscrmtj = shopProductAttributeDao.selectByCode("jfscrmtj", HostInterceptor.getCompanyId());
+            if(jfscrmtj!=null){
+                shopProduct.setAttrs(jfscrmtj.getAttrId()+"");
+            }
+        }
+        List<ShopProduct> shopProducts = shopProductDao.selectByModelWx(shopProduct);
+        shopProducts.forEach(item->item.setSkus(shopSkuDao.selectByPid(item.getId())));
+        return AjaxResult.buildSuccessInstance(shopProducts);
+    }
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShareProductAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShareProductAction.java
index ba10a99..ec2b34a 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShareProductAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShareProductAction.java
@@ -1,7 +1,7 @@
 package com.matrix.system.shopXcx.api.action;
 
-import com.matrix.biz.bean.BizUser;
-import com.matrix.biz.dao.BizUserDao;
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.hive.dao.SysVipInfoDao;
 import com.matrix.component.redis.RedisUserLoginUtils;
 import com.matrix.component.tools.WxacodeUtil;
 import com.matrix.core.pojo.AjaxResult;
@@ -9,11 +9,11 @@
 import com.matrix.core.tools.LogUtil;
 import com.matrix.core.tools.PropertiesUtil;
 import com.matrix.core.tools.UUIDUtil;
-import com.matrix.system.common.bean.BusParameterSettings;
 import com.matrix.system.common.constance.AppConstance;
 import com.matrix.system.common.dao.BusParameterSettingsDao;
 import com.matrix.system.hive.dao.SysShopInfoDao;
 import com.matrix.system.hive.plugin.util.CollectionUtils;
+import com.matrix.system.shopXcx.api.WeChatApiTools;
 import com.matrix.system.shopXcx.api.pojo.QrcodeImgParam;
 import com.matrix.system.shopXcx.api.vo.QrcodeVo;
 import com.matrix.system.shopXcx.api.vo.WxActivitiesGroupBuyVO;
@@ -47,7 +47,8 @@
 @CrossOrigin(origins = "*", maxAge = 3600)
 public class WxShareProductAction {
 
-
+    @Autowired
+    WeChatApiTools weChatApiTools;
     @Autowired
     private ShopProductDao shopProductDao;
 
@@ -71,7 +72,7 @@
     ShopActivitiesGroupInfoDao shopActivitiesGroupInfoDao;
 
     @Autowired
-    BizUserDao bizUserDao;
+    SysVipInfoDao sysVipInfoDao;
 
 
     @Autowired
@@ -93,8 +94,8 @@
     @RequestMapping(value = "/getProductShareQrcode")
     public @ResponseBody
     AjaxResult getwxacode1(@RequestBody QrcodeVo qrcodeVo) throws Exception {
-        BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class);
-        loginUser = bizUserDao.selectById(loginUser.getUserId());
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        loginUser = sysVipInfoDao.selectById(loginUser.getId());
         //活动类型
         ShopActivities activities=null;
         //是否为拼团分享
@@ -104,7 +105,7 @@
         }
         ShopShareQrcord queryOrcode = new ShopShareQrcord();
         queryOrcode.setProductId(qrcodeVo.getProductId());
-        queryOrcode.setUserId(loginUser.getOpenId());
+        queryOrcode.setUserId(loginUser.getId());
 
         if (isGroupProduct ) {
             queryOrcode.setProductId(Integer.parseInt(qrcodeVo.getActId() + ""));
@@ -119,7 +120,7 @@
             //如果未查询到就先插入数据再更新数据
             shareQrcord.setCreateBy(loginUser.getOpenId());
             shareQrcord.setUpdateBy(loginUser.getOpenId());
-            shareQrcord.setUserId(loginUser.getOpenId());
+            shareQrcord.setUserId(loginUser.getId());
             shareQrcord.setShopId(qrcodeVo.getShopId());
             //拼团活动
             if (isGroupProduct ) {
@@ -165,13 +166,14 @@
      * @param qrcodeVo
      * @return
      */
-    private QrcodeImgParam getSeckillQrcodeImgParam(BizUser loginUser, QrcodeVo qrcodeVo) throws Exception {
+    private QrcodeImgParam getSeckillQrcodeImgParam(SysVipInfo loginUser, QrcodeVo qrcodeVo) throws Exception {
 
         ShopActivitiesSeckillInfo seckillInfo = shopActivitiesSeckillInfoDao.selectById(qrcodeVo.getSkillId());
 
         ShopProduct shopProduct = shopProductDao.selectById(seckillInfo.getGoodsId().intValue());
 
-        String qrcodeSavePath = WxacodeUtil.getWxacode(qrcodeVo.getScene(), qrcodeVo.getPath(), UUIDUtil.getRandomID());
+        String qrcodeSavePath = WxacodeUtil.getWxacode(qrcodeVo.getScene(), qrcodeVo.getPath(), UUIDUtil.getRandomID()
+                ,weChatApiTools.getAppid(loginUser.getCompanyId()),weChatApiTools.getSecret(loginUser.getCompanyId()));
 
         LogUtil.debug("qrcodeSavePath={}", qrcodeSavePath);
         // 图片保存目录路径
@@ -203,13 +205,14 @@
      * @param qrcodeVo
      * @return
      */
-    private QrcodeImgParam getGroupQrcodeImgParam(BizUser loginUser, QrcodeVo qrcodeVo) throws Exception {
+    private QrcodeImgParam getGroupQrcodeImgParam(SysVipInfo loginUser, QrcodeVo qrcodeVo) throws Exception {
 
         WxActivitiesGroupBuyVO groupBuyVO = shopActivitiesGroupInfoDao.selectGroupInfoWithPriceByActId(qrcodeVo.getActId());
 
         ShopProduct shopProduct = shopProductDao.selectById(groupBuyVO.getGoodsId().intValue());
 
-        String qrcodeSavePath = WxacodeUtil.getWxacode(qrcodeVo.getScene(), qrcodeVo.getPath(), UUIDUtil.getRandomID());
+        String qrcodeSavePath = WxacodeUtil.getWxacode(qrcodeVo.getScene(), qrcodeVo.getPath(), UUIDUtil.getRandomID()
+                ,weChatApiTools.getAppid(loginUser.getCompanyId()),weChatApiTools.getSecret(loginUser.getCompanyId()));
 
         LogUtil.debug("qrcodeSavePath={}", qrcodeSavePath);
         // 图片保存目录路径
@@ -235,13 +238,14 @@
     }
 
     @NotNull
-    private QrcodeImgParam getQrcodeImgParam(BizUser loginUser, QrcodeVo qrcodeVo) throws Exception {
+    private QrcodeImgParam getQrcodeImgParam(SysVipInfo loginUser, QrcodeVo qrcodeVo) throws Exception {
 
         ShopProduct shopProduct = shopProductDao.selectById(qrcodeVo.getProductId());
 
 
 
-        String qrcodeSavePath = WxacodeUtil.getWxacode(qrcodeVo.getScene(), qrcodeVo.getPath(), UUIDUtil.getRandomID());
+        String qrcodeSavePath = WxacodeUtil.getWxacode(qrcodeVo.getScene(), qrcodeVo.getPath(), UUIDUtil.getRandomID()
+                ,weChatApiTools.getAppid(loginUser.getCompanyId()),weChatApiTools.getSecret(loginUser.getCompanyId()));
 
         LogUtil.debug("qrcodeSavePath={}", qrcodeSavePath);
         // 图片保存目录路径
@@ -310,7 +314,7 @@
         g = b2Img.createGraphics();
         g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_ATOP, 1));
         g.drawImage(qrcordImgBuf, 320, 550, 140, 140, null);
-        g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
+        g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB);
         //标题
         g.setColor(new Color(0xF10D0A0A, true));
         Font font = new Font("微软雅黑", Font.PLAIN, 24);
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesGroupBuyController.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesGroupBuyController.java
index 6054384..4fb5a76 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesGroupBuyController.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesGroupBuyController.java
@@ -1,6 +1,6 @@
 package com.matrix.system.shopXcx.api.action;
 
-import com.matrix.biz.bean.BizUser;
+import com.matrix.system.hive.bean.SysVipInfo;
 import com.matrix.component.redis.RedisUserLoginUtils;
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.system.common.interceptor.HostInterceptor;
@@ -122,10 +122,10 @@
      */
     @GetMapping(value = "/findOwnerGroupBuyInfo/{actId}")
     public AjaxResult findOwnerGroupBuyInfo(@PathVariable("actId") Long actId) {
-        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
 
         // 1、判断该用户在该活动中有没有正在拼团 若有,则返回正在拼团的用户列表,若没有则返回gruoping=1且返回正在拼团的拼团列表, 若加入了团未完成付款,则需要再做设置
-        ShopActivitiesGroupJoin isExsit = shopActivitiesGroupJoinDao.selectIsExistGroupInfoByUserId(actId, bizUser.getOpenId());
+        ShopActivitiesGroupJoin isExsit = shopActivitiesGroupJoinDao.selectIsExistGroupInfoByUserId(actId, sysVipInfo.getOpenId());
         AjaxResult ajaxResult = new AjaxResult(AjaxResult.STATUS_SUCCESS, null);
         if (isExsit == null) {
             ajaxResult.putInMap("grouping", 2);
@@ -134,7 +134,7 @@
         } else {
             ajaxResult.putInMap("grouping", 1);
             ShopActivitiesGroupJoin groupJoin = shopActivitiesGroupJoinDao.selectOwnerGroupJoinInfoWithNoPay(isExsit.getId());
-            ShopActivitiesGroupJoinUser groupJoinUser = shopActivitiesGroupJoinUserDao.selectGroupJoinUserByUserIdAndGjId(bizUser.getOpenId(), groupJoin.getId());
+            ShopActivitiesGroupJoinUser groupJoinUser = shopActivitiesGroupJoinUserDao.selectGroupJoinUserByUserIdAndGjId(sysVipInfo.getOpenId(), groupJoin.getId());
             ShopActivitiesGroupPrice price = shopActivitiesGroupPriceDao.selectById(groupJoin.getGpId());
             int theLast = price.getGpCount() - groupJoin.getJoinUserList().size();
             groupJoin.setTheLast(theLast);
@@ -154,12 +154,12 @@
      */
     @GetMapping(value = "/findGroupJoinInfo/{gjId}")
     public AjaxResult findGroupJoinInfo(@PathVariable Long gjId) {
-        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         ShopActivitiesGroupJoin groupJoin = shopActivitiesGroupJoinDao.selectOwnerGroupJoinInfo(gjId);
         int isExist = 2;
 
         for (ShopActivitiesGroupJoinUser joinUser : groupJoin.getJoinUserList()) {
-            if (bizUser.getOpenId().equals(joinUser.getUserId())) {
+            if (sysVipInfo.getOpenId().equals(joinUser.getUserId())) {
                 isExist = 1;
             }
         }
@@ -198,7 +198,7 @@
 
     @PostMapping(value = "/calPrice")
     public AjaxResult calPrice(@RequestBody CreateGroupBuyDTO createGroupBuyDTO) {
-        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         ShopActivitiesGroupPrice groupPrice = shopActivitiesGroupPriceDao.selectById(createGroupBuyDTO.getGpId());
         // 判断参数中gjId是否为空,若为空则为团长开团。再判断团长价是否为空,如果不为空则拥有团长价
         if (createGroupBuyDTO.getGjId() == null) {
@@ -210,7 +210,7 @@
         } else {
             createGroupBuyDTO.setPrice(groupPrice.getGpPrice());
         }
-        BigDecimal postage = wxShopOrderService.calculationPostage(createGroupBuyDTO.getPrice(),bizUser.getCompanyId());
+        BigDecimal postage = wxShopOrderService.calculationPostage(createGroupBuyDTO.getPrice(),sysVipInfo.getCompanyId());
         BigDecimal payPrice = createGroupBuyDTO.getPrice().multiply(BigDecimal.valueOf(createGroupBuyDTO.getCount())).add(postage);
         AjaxResult ajaxResult = new AjaxResult(AjaxResult.STATUS_SUCCESS, null);
         ajaxResult.putInMap("billPrice", createGroupBuyDTO.getPrice().multiply(BigDecimal.valueOf(createGroupBuyDTO.getCount())));
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSalonAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSalonAction.java
index ae9288b..d7a2403 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSalonAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSalonAction.java
@@ -1,12 +1,12 @@
 package com.matrix.system.shopXcx.api.action;
 
-import com.matrix.biz.bean.BizUser;
 import com.matrix.component.redis.RedisUserLoginUtils;
 import com.matrix.core.exception.GlobleException;
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.core.pojo.PaginationVO;
 import com.matrix.core.tools.LogUtil;
 import com.matrix.system.common.interceptor.HostInterceptor;
+import com.matrix.system.hive.bean.SysVipInfo;
 import com.matrix.system.hive.plugin.util.CollectionUtils;
 import com.matrix.system.shopXcx.api.vo.SalonVO;
 import com.matrix.system.shopXcx.bean.ShopActivities;
@@ -24,7 +24,6 @@
 import org.springframework.web.bind.annotation.*;
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
@@ -82,7 +81,7 @@
      */
     @GetMapping(value = "/findSalonInfoById/{id}")
     public AjaxResult findSalonInfoById(@PathVariable("id") Long id) {
-        BizUser user = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo user = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         ShopActivities shopActivities = shopActivitiesDao.selectSalonActivityById(id);
         ShopActivitiesSalonRecord salonRecord = shopActivitiesSalonRecordDao.selectSalonRecordByUserIdAndActId(user.getOpenId(), id);
         AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("获取成功");
@@ -105,7 +104,7 @@
     @PostMapping(value = "/joinSalonActivity")
     @Transactional
     public AjaxResult joinSalonActivity(@RequestBody CreateSalonDTO salonDTO) {
-        BizUser user = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo user = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
 
         ShopActivities shopActivities = shopActivitiesDao.selectById(salonDTO.getActId());
         if (shopActivities == null) {
@@ -128,7 +127,7 @@
 
         ShopActivitiesSalonRecord salonRecord = new ShopActivitiesSalonRecord();
         salonRecord.setActId(salonDTO.getActId());
-        salonRecord.setUserId(user.getOpenId());
+        salonRecord.setUserId(user.getId());
         salonRecord.setCreateBy(user.getNickName());
         salonRecord.setUpdateBy(user.getNickName());
         salonRecord.setStatus(ShopActivitiesSalonRecord.JOIN_STATUS_ING);
@@ -173,7 +172,7 @@
      */
     @RequestMapping(value = "/findSalonListByUser")
     public AjaxResult findSalonListByUser(@RequestBody SalonVO salonVO) {
-        BizUser user = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo user = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         salonVO.setUserId(user.getOpenId());
         List<ShopActivities> list = shopActivitiesDao.selectSalonActivityByUser(salonVO);
         return AjaxResult.buildSuccessInstance(list);
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSecKillAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSecKillAction.java
index d931daf..e42af89 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSecKillAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSecKillAction.java
@@ -1,6 +1,6 @@
 package com.matrix.system.shopXcx.api.action;
 
-import com.matrix.biz.bean.BizUser;
+import com.matrix.system.hive.bean.SysVipInfo;
 import com.matrix.component.redis.RedisUserLoginUtils;
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.system.shopXcx.api.service.WXShopOrderService;
@@ -111,13 +111,13 @@
      */
     @PostMapping(value = "/calSecKillPrice")
     public AjaxResult calSecKillPrice(@RequestBody SecKillVO secKillVO) {
-        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         ShopActivitiesSeckillInfo seckillInfo = shopActivitiesSeckillInfoDao.selectById(secKillVO.getId());
         if (seckillInfo == null) {
             return AjaxResult.buildFailInstance("参数有误");
         }
 
-        BigDecimal postage = wxShopOrderService.calculationPostage(seckillInfo.getSiPrice(),bizUser.getCompanyId());
+        BigDecimal postage = wxShopOrderService.calculationPostage(seckillInfo.getSiPrice(),sysVipInfo.getCompanyId());
         BigDecimal payPrice = seckillInfo.getSiPrice().multiply(BigDecimal.valueOf(secKillVO.getCount())).add(postage);
         AjaxResult ajaxResult = new AjaxResult(AjaxResult.STATUS_SUCCESS, null);
         ajaxResult.putInMap("totalPrice", payPrice);
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSignAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSignAction.java
new file mode 100644
index 0000000..eb8cf7e
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSignAction.java
@@ -0,0 +1,386 @@
+package com.matrix.system.shopXcx.api.action;
+
+import cn.hutool.core.date.DateTime;
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.matrix.component.redis.RedisUserLoginUtils;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.tools.StringUtils;
+import com.matrix.system.activity.dao.ActivitySignAwardSetDao;
+import com.matrix.system.activity.dao.ActivitySignReceiveRecordDao;
+import com.matrix.system.activity.dao.ActivitySignRecordDao;
+import com.matrix.system.activity.dao.ActivitySignWriteoffDao;
+import com.matrix.system.activity.entity.ActivitySignAwardSet;
+import com.matrix.system.activity.entity.ActivitySignReceiveRecord;
+import com.matrix.system.activity.entity.ActivitySignRecord;
+import com.matrix.system.activity.entity.ActivitySignWriteoff;
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.shopXcx.api.dto.ClickSignDTO;
+import com.matrix.system.shopXcx.api.dto.SeeAwardTextDto;
+import com.matrix.system.shopXcx.api.dto.SignAwardDto;
+import com.matrix.system.shopXcx.api.vo.*;
+import com.matrix.system.shopXcx.bean.ShopActivities;
+import com.matrix.system.shopXcx.dao.ShopActivitiesDao;
+import com.matrix.system.shopXcx.vo.SalesOrderVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Date;
+import java.util.List;
+
+@Api(tags = "签到活动接口类")
+@RestController
+@RequestMapping(value = "/wxapi/sign")
+public class WxShopActivitiesSignAction {
+	
+	@Autowired
+    private ShopActivitiesDao shopActivitiesDao;
+	
+	@Autowired
+    private RedisUserLoginUtils redisUserLoginUtils;
+	
+	@Autowired
+	private ActivitySignAwardSetDao activitySignAwardSetDao;
+	
+	@Autowired
+	private ActivitySignReceiveRecordDao activitySignReceiveRecordDao;
+	
+	@Autowired
+	private ActivitySignWriteoffDao activitySignWriteoffDao;
+	
+	@Autowired
+	private ActivitySignRecordDao activitySignRecordDao;
+	
+	@ApiOperation(value = "获取签到基本信息", notes = "")
+	@ApiResponses({
+			@ApiResponse(code = 200, message = "ok", response = SignBasicInfoVo.class)
+	})
+    @GetMapping(value = "/getSignBasicInfo")
+    public AjaxResult getSignBasicInfo() {
+		//获取登录人信息
+		SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+		Long companyId = loginUser.getCompanyId();
+		Long userId = loginUser.getId();
+		//获取签到活动的信息
+        SignBasicInfoVo signBasicInfoVo = new SignBasicInfoVo();
+        ShopActivities shopActivities = shopActivitiesDao.selectOneByCompanyIdAndActTypeAndActStatus(companyId,ShopActivities.ACTIVITIES_TYPE_SIGN,ShopActivities.ACTSTATUS_STATUS_ING);
+        Long actId = shopActivities.getId();
+        signBasicInfoVo.setActName(shopActivities.getActName());
+        signBasicInfoVo.setActCode(shopActivities.getActCode());
+        signBasicInfoVo.setId(shopActivities.getId());
+        String actContent = shopActivities.getActContent();
+        SignBasicInfoJsonVo signBasicInfoJsonVo = JSON.parseObject(actContent, SignBasicInfoJsonVo.class);
+        signBasicInfoVo.setSignBasicInfoJsonVo(signBasicInfoJsonVo);
+        
+		List<ActivitySignAwardSetVo> activitySignAwardSetVos = activitySignAwardSetDao
+				.selectListByActIDAndCompanyId(actId,companyId,ActivitySignAwardSet.AWARDSTATE_WORK);
+		signBasicInfoVo.setActivitySignAwardSetVos(activitySignAwardSetVos);
+
+		//今日是否已经参与
+        ActivitySignRecord activitySignRecord = activitySignRecordDao.selectOneByActIdAndUserIdLikesignTime(actId,userId,new Date());
+        if(ObjectUtil.isNotEmpty(activitySignRecord)) {
+        	signBasicInfoVo.setJoinState(SignBasicInfoVo.JOINSTATE_SIGN);
+        }else {
+        	signBasicInfoVo.setJoinState(SignBasicInfoVo.JOINSTATE_NOTSIGN);
+        }
+        AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("");
+        ajaxResult.setData(signBasicInfoVo);
+        return ajaxResult;
+    }
+	
+	/**
+     * 点击签到
+     *
+     */
+	@ApiOperation(value = "点击签到", notes = "")
+	@ApiResponses({
+			@ApiResponse(code = 200, message = "ok", response = SignSuccessVo.class)
+	})
+    @PostMapping(value = "/clickSign")
+    @Transactional
+    public AjaxResult clickSign(@RequestBody ClickSignDTO clickSignDTO) {
+        SysVipInfo user = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        long actId = clickSignDTO.getActId();
+        Long userId = user.getId();
+        Long companyId = user.getCompanyId();
+        /**
+         * 活动是否存在
+         * 活动是否已经开始
+         * 今日是否已经参与
+         * 新增签到记录表
+         * 判断累计连续签到天数是否+1
+         * 是否已领取
+         * 查询是否有签到奖品
+         * 		日常奖励和自定义奖品
+         * 			生成核销记录
+         */
+        //活动是否存在
+        ShopActivities shopActivities = shopActivitiesDao.selectById(actId);
+        if (ObjectUtil.isEmpty(shopActivities)) {
+            return AjaxResult.buildFailInstance("活动不存在");
+        }
+        //活动是否已经开始
+        Integer actStatus = shopActivities.getActStatus();
+        if(ShopActivities.ACTSTATUS_STATUS_ING != actStatus) {
+        	return AjaxResult.buildFailInstance("活动未开始");
+        }
+        //今日是否已经参与
+        ActivitySignRecord activitySignRecord = activitySignRecordDao.selectOneByActIdAndUserIdLikesignTime(actId,userId,new Date());
+        if (ObjectUtil.isNotEmpty(activitySignRecord)) {
+            return AjaxResult.buildFailInstance("今日用户已经签到成功");
+        }
+        //前一天是否签到
+        Date date = new Date();
+        DateTime offsetDay = DateUtil.offsetDay(date, -1);
+        ActivitySignRecord activitySignRecordOld = activitySignRecordDao.selectOneByActIdAndUserIdLikesignTime(actId,userId,offsetDay);
+        ActivitySignRecord activitySignRecordAdd = new ActivitySignRecord();
+        activitySignRecordAdd.setCompanyId(companyId);
+        activitySignRecordAdd.setCreateBy(user.getName());
+        activitySignRecordAdd.setCreateTime(new Date());
+        activitySignRecordAdd.setUpdateBy(user.getName());
+        activitySignRecordAdd.setUpdateTime(new Date());
+        activitySignRecordAdd.setActivityId(actId);
+        activitySignRecordAdd.setSignTime(date);
+        activitySignRecordAdd.setUserId(userId);
+        if(ObjectUtil.isEmpty(activitySignRecordOld)) {
+        	//新增签到记录表,累计连续签到天数是1
+        	activitySignRecordAdd.setCumulativeDay(1);
+        }else {
+        	Integer cumulativeDay = activitySignRecordOld.getCumulativeDay();
+        	//新增签到记录表,累计连续签到天数是否+1
+        	activitySignRecordAdd.setCumulativeDay(cumulativeDay+1);
+        }
+        activitySignRecordDao.insert(activitySignRecordAdd);
+		/**
+		 * 查询是否有签到奖品
+        * 		日常奖励和自定义奖品
+        */
+        SignSuccessVo signSuccessVo = new SignSuccessVo();
+        //日常奖励,新增奖品领取记录
+        QueryWrapper<ActivitySignAwardSet> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("award_rule",ActivitySignAwardSet.AWARDRULE_NORMAL);
+        queryWrapper.eq("company_id",companyId);
+        queryWrapper.eq("activity_id",actId);
+        ActivitySignAwardSet activitySignAwardSetNormal = activitySignAwardSetDao.selectOne(queryWrapper);
+        if(ObjectUtil.isNotEmpty(activitySignAwardSetNormal)) {
+        	ActivitySignReceiveRecord activitySignReceiveRecord = new ActivitySignReceiveRecord();
+        	activitySignReceiveRecord.setUserId(userId);
+        	activitySignReceiveRecord.setReceiveTime(date);
+        	activitySignReceiveRecord.setAwardId(activitySignAwardSetNormal.getId());
+        	activitySignReceiveRecord.setState(ActivitySignReceiveRecord.STATE_DONE);
+        	activitySignReceiveRecord.setActivityId(actId);
+        	activitySignReceiveRecord.setCompanyId(companyId);
+        	activitySignReceiveRecord.setCreateBy(user.getName());
+        	activitySignReceiveRecord.setCreateTime(new Date());
+        	activitySignReceiveRecord.setUpdateBy(user.getName());
+        	activitySignReceiveRecord.setUpdateTime(new Date());
+        	activitySignReceiveRecordDao.insert(activitySignReceiveRecord);
+        	
+        	signSuccessVo.setNormalAwardName(activitySignAwardSetNormal.getAwardName());
+        	signSuccessVo.setNormalAwardImg(activitySignAwardSetNormal.getIntroduceImg());
+        }
+        //获取当前累计天数
+        int cumulativeDay = getCumulativeDay(actId, userId, date, 0);
+        //自定义奖励
+        QueryWrapper<ActivitySignAwardSet> queryWrapperCumulativeDay = new QueryWrapper<>();
+        queryWrapperCumulativeDay.eq("award_rule",ActivitySignAwardSet.AWARDRULE_CUMULATIVEDAY);
+        queryWrapperCumulativeDay.eq("cumulative_day",cumulativeDay);
+        queryWrapperCumulativeDay.eq("company_id",companyId);
+        queryWrapperCumulativeDay.eq("activity_id",actId);
+        ActivitySignAwardSet activitySignAwardSetCumulativeDay = activitySignAwardSetDao.selectOne(queryWrapperCumulativeDay);
+        if(ObjectUtil.isNotEmpty(activitySignAwardSetCumulativeDay)) {
+        	//是否已领取
+        	Long id = activitySignAwardSetCumulativeDay.getId();
+        	QueryWrapper<ActivitySignReceiveRecord> queryWrapperActivitySignReceiveRecord = new QueryWrapper<>();
+        	queryWrapperActivitySignReceiveRecord.eq("award_id", id);
+        	queryWrapperActivitySignReceiveRecord.eq("company_id", companyId);
+        	queryWrapperActivitySignReceiveRecord.eq("activity_id", actId);
+        	queryWrapperActivitySignReceiveRecord.eq("user_id", userId);
+        	ActivitySignReceiveRecord activitySignReceiveRecordDone = activitySignReceiveRecordDao.selectOne(queryWrapperActivitySignReceiveRecord);
+        	if (ObjectUtil.isNotEmpty(activitySignReceiveRecordDone)) {
+        		String awardNameCumulativeDay = activitySignAwardSetCumulativeDay.getAwardName();
+        		AjaxResult ajaxResult = AjaxResult.buildSuccessInstance(awardNameCumulativeDay+"已经领取过了");
+                ajaxResult.setData(signSuccessVo);
+                return ajaxResult;
+            }
+        	//新增奖品领取记录
+        	ActivitySignReceiveRecord activitySignReceiveRecord = new ActivitySignReceiveRecord();
+        	activitySignReceiveRecord.setUserId(userId);
+        	activitySignReceiveRecord.setReceiveTime(date);
+        	activitySignReceiveRecord.setAwardId(activitySignAwardSetCumulativeDay.getId());
+        	activitySignReceiveRecord.setActivityId(actId);
+        	activitySignReceiveRecord.setCompanyId(companyId);
+        	activitySignReceiveRecord.setState(ActivitySignReceiveRecord.STATE_DONE);
+        	activitySignReceiveRecord.setCreateBy(user.getName());
+        	activitySignReceiveRecord.setCreateTime(new Date());
+        	activitySignReceiveRecord.setUpdateBy(user.getName());
+        	activitySignReceiveRecord.setUpdateTime(new Date());
+        	/**
+        	 * 奖项类型(1:自定义产品2:积分3:优惠券4:店铺商品)
+        	 * 
+        	 * todo:4:店铺商品
+        	 */
+        	//1:自定义产品
+        	if(ActivitySignAwardSet.AWARDTYPE_CUSTOMIZE == activitySignAwardSetCumulativeDay.getAwardType()) {
+            	activitySignReceiveRecord.setState(ActivitySignReceiveRecord.STATE_ING);
+            	String randomString = StringUtils.getRandomString(8);
+            	activitySignReceiveRecord.setWriteOffCode(randomString);
+            	
+            	/**
+            	 * 获取对应奖品的领取方式(兑奖方式(1:线下兑换2:物流配送3:客服兑换)
+            	 */
+            	signSuccessVo.setWriteOffCode(randomString);
+            	signSuccessVo.setAwardType(activitySignAwardSetCumulativeDay.getAwardType());
+            	signSuccessVo.setAwardName(activitySignAwardSetCumulativeDay.getAwardName());
+            	signSuccessVo.setAwardImg(activitySignAwardSetCumulativeDay.getIntroduceImg());
+            	signSuccessVo.setAwardWay(activitySignAwardSetCumulativeDay.getAwardWay());
+				signSuccessVo.setAwardState(activitySignAwardSetCumulativeDay.getAwardState());
+				//2:物流配送
+            	signSuccessVo.setOperationTip(activitySignAwardSetCumulativeDay.getOperationTip());
+            	//1:线下兑换
+            	if(ActivitySignAwardSet.AWARDWAY_ONE == activitySignAwardSetCumulativeDay.getAwardWay()) {
+            		signSuccessVo.setIntroduceTip(activitySignAwardSetCumulativeDay.getIntroduceTip());
+            		signSuccessVo.setPrizeAddress(activitySignAwardSetCumulativeDay.getPrizeAddress());
+            		signSuccessVo.setPrizeStartTime(activitySignAwardSetCumulativeDay.getPrizeStartTime());
+            		signSuccessVo.setPrizeEndTime(activitySignAwardSetCumulativeDay.getPrizeEndTime());
+            	}
+            	//3:客服兑换
+            	if(ActivitySignAwardSet.AWARDWAY_THREE == activitySignAwardSetCumulativeDay.getAwardWay()) {
+            		signSuccessVo.setWechatImg(activitySignAwardSetCumulativeDay.getWechatImg());
+            		signSuccessVo.setPrizeStartTime(activitySignAwardSetCumulativeDay.getPrizeStartTime());
+            		signSuccessVo.setPrizeEndTime(activitySignAwardSetCumulativeDay.getPrizeEndTime());
+            	}
+        	}
+        	//2:积分
+        	if(ActivitySignAwardSet.AWARDTYPE_SCORE == activitySignAwardSetCumulativeDay.getAwardType()) {
+            	signSuccessVo.setScoreCnt(activitySignAwardSetCumulativeDay.getScoreCnt());
+        	}
+        	//3:优惠券
+        	if(ActivitySignAwardSet.AWARDTYPE_COUPON == activitySignAwardSetCumulativeDay.getAwardType()) {
+        		signSuccessVo.setCouponName(activitySignAwardSetCumulativeDay.getCouponName());
+        	}
+        	activitySignReceiveRecordDao.insert(activitySignReceiveRecord);
+        	//生成核销记录
+        	if(ActivitySignAwardSet.AWARDTYPE_CUSTOMIZE == activitySignAwardSetCumulativeDay.getAwardType()) {
+	        	ActivitySignWriteoff activitySignWriteoff = new ActivitySignWriteoff();
+	        	//线下兑换和客服兑换
+	        	if(ActivitySignAwardSet.AWARDWAY_ONE == activitySignAwardSetCumulativeDay.getAwardWay()
+	        			|| ActivitySignAwardSet.AWARDWAY_THREE == activitySignAwardSetCumulativeDay.getAwardWay()) {
+	        		activitySignWriteoff.setWriteoffCode(activitySignReceiveRecord.getWriteOffCode());
+	        	}
+	        	activitySignWriteoff.setActId(actId);
+	        	activitySignWriteoff.setAwardId(activitySignAwardSetCumulativeDay.getId());
+	        	activitySignWriteoff.setWinTime(date);
+	        	if(ActivitySignAwardSet.AWARDWAY_TWO == activitySignAwardSetCumulativeDay.getAwardWay()) {
+	        		activitySignWriteoff.setState(ActivitySignWriteoff.STATE_TWO);
+	        	}else {
+	        		activitySignWriteoff.setState(ActivitySignWriteoff.STATE_ONE);
+	        	}
+	        	activitySignWriteoff.setUserId(userId);
+	        	activitySignWriteoff.setCompanyId(companyId);
+	        	activitySignWriteoff.setReceiveId(activitySignReceiveRecord.getId());
+	        	activitySignWriteoff.setCreateBy(user.getName());
+	        	activitySignWriteoff.setCreateTime(new Date());
+	        	activitySignWriteoff.setUpdateBy(user.getName());
+	        	activitySignWriteoff.setUpdateTime(new Date());
+	        	activitySignWriteoffDao.insert(activitySignWriteoff);
+        	}
+        }
+        
+        AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("签到成功");
+        ajaxResult.setData(signSuccessVo);
+        return ajaxResult;
+    }
+	/**
+     * 获取累计签到天数
+     * @param actId
+     * @param userId
+     * @param date
+     * @return
+     */
+    public int getCumulativeDay(long actId, long userId,Date date, int i) {
+        ActivitySignRecord activitySignRecordOld = activitySignRecordDao.selectOneByActIdAndUserIdLikesignTime(actId,userId,date);
+        if(ObjectUtil.isEmpty(activitySignRecordOld)) {
+            return i;
+        }
+        i++;
+        DateTime offsetDay = DateUtil.offsetDay(date, -i);
+        return getCumulativeDay(actId,userId,offsetDay,i);
+    }
+    
+    /**
+     * 获取累计的签到奖品
+     *
+     * @return
+     */
+    @ApiOperation(value = "获取累计的签到奖品", notes = "")
+    @PostMapping(value = "/getSignAwardList")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = SignAwardListVo.class)
+    })
+    public AjaxResult getSignAwardList(@RequestBody @Validated SignAwardDto signAwardDto) {
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        Page<SalesOrderVo> page=new Page<>(signAwardDto.getPageNum(),signAwardDto.getPageSize());
+        if(StringUtils.isBlank(signAwardDto.getSort())){
+        	signAwardDto.setSort("create_time");
+        	signAwardDto.setOrder("desc");
+        }
+        signAwardDto.setUserId(loginUser.getId());
+        signAwardDto.setCompanyId(loginUser.getCompanyId());
+        IPage<SignAwardListVo> signAwardListVos = activitySignReceiveRecordDao.selectSignAwardList(page,signAwardDto);
+        AjaxResult result=AjaxResult.buildSuccessInstance(signAwardListVos.getRecords());
+        return result;
+    }
+    
+    /**
+     * 查看劵码
+     *
+     * @return
+     */
+    @ApiOperation(value = "查看劵码", notes = "")
+    @PostMapping(value = "/seeAwardText")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = SeeAwardTextVo.class)
+    })
+    public AjaxResult seeAwardText(@RequestBody @Validated SeeAwardTextDto seeAwardTextDto) {
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        seeAwardTextDto.setUserId(loginUser.getId());
+        seeAwardTextDto.setCompanyId(loginUser.getCompanyId());
+        SeeAwardTextVo seeAwardTextVO = activitySignReceiveRecordDao.selectSeeAwardTextVOById(seeAwardTextDto);
+        AjaxResult result=AjaxResult.buildSuccessInstance(seeAwardTextVO);
+        return result;
+    }
+    
+    /**
+     * 物流配送确认
+     *
+     * @return
+     */
+    @ApiOperation(value = "查看劵码", notes = "")
+    @PostMapping(value = "/logisticsInsure")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = SeeAwardTextVo.class)
+    })
+    public AjaxResult logisticsInsure(@RequestBody @Validated SeeAwardTextDto seeAwardTextDto) {
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        seeAwardTextDto.setUserId(loginUser.getId());
+        seeAwardTextDto.setCompanyId(loginUser.getCompanyId());
+        SeeAwardTextVo seeAwardTextVO = activitySignReceiveRecordDao.selectSeeAwardTextVOById(seeAwardTextDto);
+        AjaxResult result=AjaxResult.buildSuccessInstance(seeAwardTextVO);
+        return result;
+    }
+    
+    
+    
+    
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopLogisticsQueryAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopLogisticsQueryAction.java
index bf3e8a1..c77ba64 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopLogisticsQueryAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopLogisticsQueryAction.java
@@ -68,6 +68,8 @@
         }
         logisticsInfo.put("isShipments",AppConstance.IS_SHIPMENTS);
         logisticsInfo.put("logisticsStatus",shopDeliveryInfo.getLogisticsStatus()==null?"0":String.valueOf(shopDeliveryInfo.getLogisticsStatus()));
+        logisticsInfo.put("logisticsCompany", shopDeliveryInfo.getLogisticsCompany());
+        logisticsInfo.put("waybillNo", shopDeliveryInfo.getWaybillNo());
         logisticsInfo.put("describe",describe);
         result.setStatus(AjaxResult.STATUS_SUCCESS);
         result.putInMap("logisticsInfo",logisticsInfo);
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopProduct.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopProduct.java
index 6023fa5..ac983d3 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopProduct.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopProduct.java
@@ -1,18 +1,15 @@
 package com.matrix.system.shopXcx.api.action;
 
-import com.matrix.core.pojo.AjaxResult;
-import com.matrix.core.pojo.PaginationVO;
-import com.matrix.core.tools.StringUtils;
-import com.matrix.biz.bean.BizUser;
-import com.matrix.system.common.bean.CustomerDataDictionary;
-import com.matrix.system.common.dao.CustomerDataDictionaryDao;
+import com.matrix.system.hive.bean.SysVipInfo;
 import com.matrix.component.redis.RedisUserLoginUtils;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.tools.StringUtils;
 import com.matrix.system.common.constance.AppConstance;
-
+import com.matrix.system.common.dao.CustomerDataDictionaryDao;
 import com.matrix.system.common.interceptor.HostInterceptor;
+import com.matrix.system.shopXcx.api.service.WxShopCouponService;
 import com.matrix.system.shopXcx.bean.*;
 import com.matrix.system.shopXcx.dao.*;
-import com.matrix.system.shopXcx.api.service.WxShopCouponService;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -93,7 +90,6 @@
         List<ShopProductAttrRef> shopProductAttrRefs = shopProductAttrRefDao.selectByPid(id);
         List<ShopProductImg> shopProductImgs = shopProductImgDao.selectByPid(id);
         List<ShopSku> shopSkus = shopSkuDao.selectByPid(id);
-//        List<ShopSku> shopSkus = shopSkuDao.selectByPidAndShopid(id, shopId);
         List<ShopProductParamRef> shopProductParamRefs = shopProductParamRefDao.selectByPid(id);
         shopProduct.setAttrRefs(shopProductAttrRefs);
         shopProduct.setProductImgs(shopProductImgs);
@@ -115,7 +111,7 @@
             //查询产品适配的优惠券
             result.putInMap("couponList", shopCouponService.getCouponListByProductId(id));
             //查询产品是否被用户收藏
-            result.putInMap("checkCollect", CollectionUtils.isNotEmpty(collectionDao.selectByUserIdAndProid(id, redisUserLoginUtils.getLoginUser(BizUser.class).getOpenId())));
+            result.putInMap("checkCollect", CollectionUtils.isNotEmpty(collectionDao.selectByUserIdAndProid(id, redisUserLoginUtils.getLoginUser(SysVipInfo.class).getOpenId())));
         } else {
             result.putInMap("checkCollect", false);
         }
@@ -150,7 +146,6 @@
     @ResponseBody
     public AjaxResult getShopProductShowList(@RequestBody ShopProduct shopProduct) {
         List<ShopProduct> shopProducts = null;
-
         //查询是否匹配优惠条件
         ShopCoupon shopCoupon = shopCouponDao.getCouponByTitle(shopProduct.getTitle(),HostInterceptor.getCompanyId());
         if (shopCoupon != null && shopProduct.getOffset() < 1) {
@@ -214,13 +209,13 @@
      * @param shopProduct
      */
     private void saveSearchHistroy(@RequestBody ShopProduct shopProduct) {
-        BizUser bigUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo bigUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         ShopSearchRecord searchBean = new ShopSearchRecord();
         if (StringUtils.isNotBlank(shopProduct.getTitle())) {
             searchBean.setSearchType(AppConstance.SEARCH_TYPE);
             searchBean.setSearchContent(shopProduct.getTitle());
         }
-        searchBean.setUserId(bigUser.getOpenId());
+        searchBean.setUserId(bigUser.getId());
         searchBean.setSearchPriceStart(shopProduct.getStartPrice());
         searchBean.setSearchPriceEnd(shopProduct.getEndPrice());
         searchBean.setSearchDel(AppConstance.DATA_USEABLE);
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopScoreAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopScoreAction.java
index 5fc88e7..7ceed5e 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopScoreAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopScoreAction.java
@@ -1,104 +1,67 @@
 package com.matrix.system.shopXcx.api.action;
 
-import com.matrix.biz.bean.BizUser;
-import com.matrix.biz.service.BizUserService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.matrix.system.hive.bean.SysVipInfo;
 import com.matrix.component.redis.RedisUserLoginUtils;
 import com.matrix.core.pojo.AjaxResult;
-import com.matrix.core.pojo.PaginationVO;
-import com.matrix.component.redis.RedisUserLoginUtils;
-import com.matrix.system.shopXcx.bean.ShopScoreExchange;
-import com.matrix.system.shopXcx.bean.ShopScoreRecord;
-import com.matrix.system.shopXcx.dao.ShopScoreExchangeDao;
-import com.matrix.system.shopXcx.dao.ShopScoreRecordDao;
+import com.matrix.system.score.dao.ScoreUseRecordDao;
+import com.matrix.system.score.dao.ScoreVipDetailDao;
+import com.matrix.system.shopXcx.api.dto.ScoreFlowDto;
+import com.matrix.system.shopXcx.api.vo.ScoreUseRecordVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.CrossOrigin;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-import java.util.List;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
- * @description 用户积分控制器
  * @author jyy
- * @date 2019-08-09 15:10
+ * @date 2021-03-22 15:10
  */
-@Controller
-@RequestMapping(value="/wxapi/shopScoreRecord")
-@CrossOrigin(origins = "*", maxAge = 3600)
+@Api(tags = "用户积分接口类")
+@RestController
+@RequestMapping(value = "/wxapi/score")
 public class WxShopScoreAction {
 
-	@Autowired
-	private ShopScoreRecordDao shopScoreRecordDao;
-	@Autowired
-	private ShopScoreExchangeDao shopScoreExchangeDao;
-	@Autowired
-	private RedisUserLoginUtils redisUserLoginUtils;
-	@Autowired
-	private BizUserService bizUserService;
+    @Autowired
+    RedisUserLoginUtils redisUserLoginUtils;
+
+    @Autowired
+    ScoreUseRecordDao scoreUseRecordDao;
+
+    @Autowired
+    ScoreVipDetailDao scoreVipDetailDao;
+
+    @ApiOperation(value = "获取积分流水", notes = "")
+    @PostMapping(value = "/getFlowList")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = ScoreUseRecordVo.class)
+    })
+    AjaxResult getFlowList(@RequestBody @Validated ScoreFlowDto scoreFlowDto) {
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        Page<ScoreUseRecordVo> page=new Page<>(scoreFlowDto.getPageNum(),scoreFlowDto.getPageSize());
+        scoreFlowDto.setVipId(loginUser.getId());
+        IPage<ScoreUseRecordVo> shopScoreRecord = scoreUseRecordDao.selectFlowList(page,  scoreFlowDto);
+        AjaxResult result=AjaxResult.buildSuccessInstance(shopScoreRecord.getRecords());
+        return result;
+    }
+
+    @ApiOperation(value = "获取用户积分", notes = "")
+    @PostMapping(value = "/getUserScore")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = AjaxResult.class)
+    })
+    AjaxResult getUserScore() {
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        AjaxResult result=AjaxResult.buildSuccessInstance(scoreVipDetailDao.selectUserTotalScore(loginUser.getId()));
+        return result;
+    }
 
 
-	/**
-	 * 查询我的获得积分列表
-	 * @return
-	 */
-	@RequestMapping(value = "/getRecordList")
-	@ResponseBody
-	public AjaxResult getRecordList(@RequestBody PaginationVO pageVo) {
-
-		pageVo.setSort("create_time");
-		pageVo.setOrder("desc");
-		BizUser loginBizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
-		ShopScoreRecord params = new ShopScoreRecord();
-		params.setBeneficiaryId(loginBizUser.getOpenId());
-		List<ShopScoreRecord> dataList = shopScoreRecordDao.selectInPage(params, pageVo);
-		int total = shopScoreRecordDao.selectTotalRecord(params);
-		AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList, total);
-		//查询用户总积分
-		BizUser user = bizUserService.findById(loginBizUser.getUserId());
-		Integer totalScore = 0;
-		if (user != null && user.getTotalScore() != null) {
-			totalScore = user.getTotalScore();
-		}
-		result.putInMap("totalScore", totalScore);
-		//查询下级总人数
-		BizUser peopleSumParams = new BizUser();
-		peopleSumParams.setParentOpenId(loginBizUser.getOpenId());
-		int peopleSum = bizUserService.findTotal(peopleSumParams);
-		result.putInMap("peopleSum", peopleSum);
-		return result;
-	}
-
-
-	/**
-	 * 查询我的积分兑换列表
-	 * @return
-	 */
-	@RequestMapping(value = "/getChangeRecordList")
-	@ResponseBody
-	public AjaxResult getChangeRecordList(@RequestBody PaginationVO pageVo) {
-
-		//不分页
-		pageVo.setOffset(null);
-		pageVo.setLimit(null);
-		//按生成时间倒序排列
-		pageVo.setSort("create_time");
-		pageVo.setOrder("desc");
-		BizUser loginBizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
-		ShopScoreExchange params = new ShopScoreExchange();
-		params.setUserId(loginBizUser.getOpenId());
-		List<ShopScoreExchange> dataList = shopScoreExchangeDao.selectInPage(params, pageVo);
-		int total = shopScoreExchangeDao.selectTotalRecord(params);
-		AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList, total);
-		//查询用户当前积分
-		BizUser user = bizUserService.findById(loginBizUser.getUserId());
-		Integer currentScore = 0;
-		if (user != null && user.getCurrentScore() != null) {
-			currentScore = user.getCurrentScore();
-		}
-		result.putInMap("currentScore", currentScore);
-		return result;
-	}
-  
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShoppingCartAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShoppingCartAction.java
index 1afabd6..3b17f08 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShoppingCartAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShoppingCartAction.java
@@ -1,25 +1,27 @@
 package com.matrix.system.shopXcx.api.action;
 
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.component.redis.RedisUserLoginUtils;
 import com.matrix.core.constance.SystemErrorCode;
 import com.matrix.core.constance.SystemMessageCode;
 import com.matrix.core.exception.GlobleException;
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.core.tools.StringUtils;
-import com.matrix.biz.bean.BizUser;
-import com.matrix.component.redis.RedisUserLoginUtils;
 import com.matrix.system.common.constance.AppConstance;
-
-import com.matrix.system.shopXcx.bean.ShopShoppingCart;
-import com.matrix.system.shopXcx.bean.ShopSku;
-import com.matrix.system.shopXcx.dao.ShopShoppingCartDao;
-import com.matrix.system.shopXcx.dao.ShopSkuDao;
+import com.matrix.system.common.interceptor.HostInterceptor;
+import com.matrix.system.shopXcx.api.service.OrderCouponGroupService;
 import com.matrix.system.shopXcx.api.service.ShoppingCartService;
 import com.matrix.system.shopXcx.api.service.WxShopCouponService;
 import com.matrix.system.shopXcx.api.vo.ShopCartBillVo;
 import com.matrix.system.shopXcx.api.vo.ShopCartVo;
+import com.matrix.system.shopXcx.bean.ShopShoppingCart;
+import com.matrix.system.shopXcx.bean.ShopSku;
+import com.matrix.system.shopXcx.dao.ShopShoppingCartDao;
+import com.matrix.system.shopXcx.dao.ShopSkuDao;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.HashMap;
@@ -32,7 +34,8 @@
  * @date 2019-06-12 19:15
  */
 @CrossOrigin(origins = "*", maxAge = 3600)
-@Controller
+@Api(tags = "购物车类")
+@RestController
 @RequestMapping(value = "wxapi/ShoppingCart")
 public class WxShoppingCartAction {
     @Autowired
@@ -49,13 +52,10 @@
     @Autowired
     ShopSkuDao skuDao;
 
+    @Autowired
+    OrderCouponGroupService orderCouponGroupService;
 
-    /**
-     * 根据ID删除购物车
-     *
-     * @param
-     * @return
-     */
+    @ApiOperation(value = "根据ID删除购物车", notes = "")
     @PostMapping("/deleteByCartId/{cartId}")
     @ResponseBody
     public AjaxResult deleteByCartId(@PathVariable("cartId") Integer cartId) {
@@ -66,18 +66,16 @@
         return new AjaxResult(AjaxResult.STATUS_SUCCESS, "删除成功");
     }
 
-    /**
-     * 根据用户ID查询购物车 没有分页
-     *
-     * @param
-     * @return
-     */
+
+    @ApiOperation(value = "根据用户ID查询购物车 没有分页", notes = "")
     @PostMapping("/findShoppingCart")
     @ResponseBody
     public AjaxResult getShoppingCartByUserId(@RequestBody ShopShoppingCart shoppingCart) {
-        List<ShopCartVo> cartList = shoppingCartService.findUserCartList(shoppingCart.getShopId());
-        AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, cartList, cartList.size());
-        ShopCartBillVo shopCartBill = shoppingCartService.buildShopCartBillVo(cartList);
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        List<ShopShoppingCart> list = shoppingCartDao.selectByCartUserId(shoppingCart.getShopId(),loginUser.getId());
+        List<ShopCartVo> shopCartVoList = shoppingCartService.buildShopCart(list);
+        AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, shopCartVoList, shopCartVoList.size());
+        ShopCartBillVo shopCartBill = shoppingCartService.buildShopCartBillVo(shopCartVoList);
         result.putInMap("billTotal", shopCartBill.getBillTotal().stripTrailingZeros().toPlainString());
         result.putInMap("selectCount", shopCartBill.getSelectCount());
         result.putInMap("cartCount", shopCartBill.getCartCount());
@@ -86,9 +84,8 @@
         return result;
     }
 
-    /**
-     * 批量删除
-     */
+
+    @ApiOperation(value = "批量删除", notes = "")
     @PostMapping(value = "/delShoppingCart/{keys}")
     public
     @ResponseBody
@@ -102,12 +99,13 @@
         }
     }
 
+    @ApiOperation(value = "查询微商城购物车数量", notes = "")
     @PostMapping(value = "/getUserCartCount/{shopId}")
     public
     @ResponseBody
     AjaxResult getUserCartCount(@PathVariable("shopId") Long shopId) {
-        BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class);
-        Integer userCartCount = shoppingCartDao.selectUserCartCount(shopId, loginUser.getOpenId());
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        Integer userCartCount = shoppingCartDao.selectUserCartCount(shopId, loginUser.getId());
         if (userCartCount == null) {
             userCartCount = 0;
         }
@@ -125,17 +123,18 @@
     AjaxResult saveShoppingCart(@RequestBody ShopShoppingCart shoppingCart) {
 
         //查询到sku设置对应的产品id
-        ShopSku sku= skuDao.selectById(shoppingCart.getCartSkuId());
-        if(sku==null){
-            return new AjaxResult(AjaxResult.STATUS_FAIL,"无效的产品id");
+        ShopSku sku = skuDao.selectById(shoppingCart.getCartSkuId());
+        if (sku == null) {
+            return new AjaxResult(AjaxResult.STATUS_FAIL, "无效的产品id");
         }
 
         shoppingCart.setCartProductId(sku.getpId());
 
-        BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         shoppingCart.setCreateBy(loginUser.getOpenId());
         shoppingCart.setUpdateBy(loginUser.getOpenId());
-        shoppingCart.setCartUserId(loginUser.getOpenId());
+        shoppingCart.setCartUserId(loginUser.getId());
+        shoppingCart.setCompanyId(HostInterceptor.getCompanyId());
         ShopShoppingCart shoppCartLimt = shoppingCartDao.selectBuyLimit(shoppingCart.getCartProductId(),
                 shoppingCart.getCartSkuId());
         // Integer buyLimitNum = 0;
@@ -161,7 +160,7 @@
         ShopShoppingCart shopShoppingCart = new ShopShoppingCart();
         shopShoppingCart.setCartProductId(cartProductId);
         shopShoppingCart.setCartSkuId(cartSkuId);
-        shopShoppingCart.setCartUserId(loginUser.getOpenId());
+        shopShoppingCart.setCartUserId(loginUser.getId());
         shopShoppingCart.setShopId(shoppingCart.getShopId());
         List<ShopShoppingCart> shopShoppingCarts = shoppingCartDao.selectByModel(shopShoppingCart);
         int i = 0;
@@ -194,7 +193,7 @@
             return new AjaxResult(AjaxResult.STATUS_FAIL, "保存失败");
         }
         int userCartCount = shoppingCartDao.selectUserCartCount(shoppingCart.getShopId(),
-                loginUser.getOpenId());
+                loginUser.getId());
         AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, "保存成功");
         result.putInMap("userCartCount", userCartCount);
         return result;
@@ -258,7 +257,7 @@
      * @param
      * @return
      */
-    @RequestMapping("/updateCartSelected")
+    @PostMapping("/updateCartSelected")
     @ResponseBody
     public AjaxResult updateCartSelected(@RequestBody ShopShoppingCart shoppingCart) {
         Map<String, Object> modifyMap = new HashMap<>();
@@ -274,13 +273,12 @@
      * @param
      * @return
      */
-    @RequestMapping("/updateCartAllSelected/{shopId}/{isSelected}")
+    @PostMapping("/updateCartAllSelected/{shopId}/{isSelected}")
     @ResponseBody
     public AjaxResult updateCartAllSelected(@PathVariable("isSelected") Integer isSelected,
                                             @PathVariable("shopId") Long shopId) {
-        Map<String, Object> modifyMap = new HashMap<>();
-        BizUser user = redisUserLoginUtils.getLoginUser(BizUser.class);
-        shoppingCartDao.updateAllSelected(user.getOpenId(),shopId, isSelected);
+        SysVipInfo user = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        shoppingCartDao.updateAllSelected(user.getOpenId(), shopId, isSelected);
         return new AjaxResult(AjaxResult.STATUS_SUCCESS, "修改成功");
     }
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSkinCheckAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSkinCheckAction.java
index 2730fb1..7ea213a 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSkinCheckAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSkinCheckAction.java
@@ -1,10 +1,10 @@
 package com.matrix.system.shopXcx.api.action;
 
-import com.matrix.biz.bean.BizUser;
 import com.matrix.component.redis.RedisUserLoginUtils;
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.core.pojo.PaginationVO;
 import com.matrix.core.tools.StringUtils;
+import com.matrix.system.common.interceptor.HostInterceptor;
 import com.matrix.system.hive.bean.SysSkinCheckRecord;
 import com.matrix.system.hive.bean.SysSkinDetail;
 import com.matrix.system.hive.bean.SysVipInfo;
@@ -48,12 +48,12 @@
 
     @RequestMapping(value = "/showSkinList")
     public @ResponseBody AjaxResult showSkinList(@RequestBody SkinCheckDTO skinCheckDTO) {
-        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         PaginationVO pageVo = new PaginationVO();
         pageVo.setLimit(skinCheckDTO.getLimit());
         pageVo.setOffset(skinCheckDTO.getOffset());
         SysSkinCheckRecord skinCheckRecord = new SysSkinCheckRecord();
-        skinCheckRecord.setTelphone(bizUser.getPhoneNumber());
+        skinCheckRecord.setTelphone(sysVipInfo.getPhone());
         List<SysSkinCheckRecord> dataList = sysSkinCheckRecordDao.selectInPage(skinCheckRecord, pageVo);
         AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList,
                 sysSkinCheckRecordDao.selectTotalRecord(skinCheckRecord));
@@ -78,7 +78,7 @@
         });
 
         sysSkinCheckRecord.setSkinDetails(detailList);
-        SysVipInfo vipInfo = vipInfoDao.selectByPhone(sysSkinCheckRecord.getTelphone());
+        SysVipInfo vipInfo = vipInfoDao.selectByPhone(sysSkinCheckRecord.getTelphone(), HostInterceptor.getCompanyId());
         AjaxResult result=AjaxResult.buildSuccessInstance(Arrays.asList(sysSkinCheckRecord));
         result.putInMap("vipInfo",vipInfo);
         return result;
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserAction.java
new file mode 100644
index 0000000..6466163
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserAction.java
@@ -0,0 +1,239 @@
+package com.matrix.system.shopXcx.api.action;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.matrix.component.redis.RedisUserLoginUtils;
+import com.matrix.component.tools.HttpCurlUtil;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.tools.LogUtil;
+import com.matrix.core.tools.StringUtils;
+import com.matrix.core.web.BaseAction;
+import com.matrix.system.activity.dao.ActivitySignReceiveRecordDao;
+import com.matrix.system.common.bean.BusParameterSettings;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
+import com.matrix.system.common.interceptor.HostInterceptor;
+import com.matrix.system.constance.Dictionary;
+import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant;
+import com.matrix.system.fenxiao.dao.ShopSalesmanApplyDao;
+import com.matrix.system.fenxiao.entity.ShopSalesmanApply;
+import com.matrix.system.fenxiao.service.ShopSalesmanApplyService;
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.hive.dao.MoneyCardUseDao;
+import com.matrix.system.hive.dao.SysVipInfoDao;
+import com.matrix.system.hive.service.SysVipInfoService;
+import com.matrix.system.score.dao.ScoreVipDetailDao;
+import com.matrix.system.shopXcx.api.WeChatApiTools;
+import com.matrix.system.shopXcx.api.dto.XcxUserSaveUserInfoDto;
+import com.matrix.system.shopXcx.dao.ShopCouponRecordDao;
+import net.sf.json.JSONObject;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Collections;
+
+/**
+ * @author jyy
+ * @description (用户表)
+ * @date 2019-05-31 10:03
+ */
+@Controller
+@RequestMapping(value = "wxapi/user")
+public class WxUserAction extends BaseAction {
+
+    @Autowired
+    private SysVipInfoService sysVipInfoService;
+
+    @Autowired
+    private SysVipInfoDao sysVipInfoDao;
+
+    @Autowired
+    private ShopSalesmanApplyService shopSalesmanApplyService;
+
+    @Autowired
+    BusParameterSettingsDao busParameterSettingsDao;
+    @Autowired
+    private RedisUserLoginUtils redisUserLoginUtils;
+    @Autowired
+    ShopSalesmanApplyDao salesmanApplyDao;
+
+    @Autowired
+    WeChatApiTools weChatApiTools;
+
+    @Autowired
+    private ScoreVipDetailDao scoreVipDetailDao;
+
+    @Autowired
+    private MoneyCardUseDao moneyCardUseDao;
+
+    @Autowired
+    ShopCouponRecordDao shopCouponRecordDao;
+
+    @Autowired
+    ActivitySignReceiveRecordDao activitySignReceiveRecordDao;
+    @Value("${debug}")
+    private String isDebug;
+
+    /**
+     * 小程序登录
+     *
+     * @param code
+     * @return
+     * @throws Exception
+     * @author JIANGYOUYAO
+     * @email 935090232@qq.com
+     * @date 2018年5月23日
+     */
+    @RequestMapping(value = "/login/{keys}")
+    public @ResponseBody
+    AjaxResult wxLogin(@PathVariable("keys") String code) throws Exception {
+        AjaxResult res = new AjaxResult();
+        LogUtil.info("code:{}" + code);
+        if (StringUtils.isNotBlank(code)) {
+            String requrl = weChatApiTools.getXcxLoginUrl(code, HostInterceptor.getCompanyId());
+            String reslutData = HttpCurlUtil.sendGetHttp(requrl, null);
+            JSONObject json = JSONObject.fromObject(reslutData);
+            LogUtil.debug("微信登录获取到登录信息={}", json);
+
+            if (json.containsKey("errcode")) {
+                res.setStatus(AjaxResult.STATUS_FAIL);
+                res.setInfo("自动登录失败");
+                LogUtil.debug("微信登录获取到异常信息errcode");
+                return res;
+            }
+
+            String openId = json.getString("openid");
+            String sessionKey = json.getString("session_key");
+            LogUtil.debug("openId={},sessionKey={}", openId, sessionKey);
+            // 查询用户是否存在
+            SysVipInfo sysVipInfo = null;
+            synchronized (this) {
+                sysVipInfo = sysVipInfoService.findByOpenId(openId);
+                if (sysVipInfo == null) {
+                    // 新增用户
+                    sysVipInfo = new SysVipInfo();
+                    sysVipInfo.setIsSales(SysVipInfo.NOT_SALES);
+                    sysVipInfo.setOpenId(openId);
+                    sysVipInfo.setSessionKey(sessionKey);
+                    sysVipInfo.setCompanyId(HostInterceptor.getCompanyId());
+                    sysVipInfo.setArrivalWay("微商城");
+                    sysVipInfo.setVipName("微信用户");
+                    sysVipInfo.setVipState(Dictionary.VIP_STATE_HY);
+                    sysVipInfo.setVipType(Dictionary.VIP_TYPE_NOCARD);
+                    sysVipInfo.setIsDeal(SysVipInfo.UNDEAL_VIP);
+                    sysVipInfo.setVipNo(openId);
+                    sysVipInfoService.add(sysVipInfo);
+
+                }else{
+                    sysVipInfo.setSessionKey(sessionKey);
+                    sysVipInfoDao.update(sysVipInfo);
+                }
+            }
+            // 存放redis
+            sysVipInfo.setLevelCard(null);
+            String token = redisUserLoginUtils.saveUserInfo(sysVipInfo);
+            LogUtil.info("用户token={}", token);
+            res.putInMap("token", token);
+            res.putInMap("userInfo", sysVipInfo);
+            res.setStatus(AjaxResult.STATUS_SUCCESS);
+        } else {
+            res.setStatus(AjaxResult.STATUS_FAIL);
+            res.setInfo("自动登录失败");
+        }
+        return res;
+    }
+
+
+
+    /**
+     * 查询用户信息
+     */
+    @RequestMapping(value = "/findUserInfo")
+    public @ResponseBody
+    AjaxResult findUserInfo() {
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        SysVipInfo sysVipInfo = sysVipInfoService.findById(loginUser.getId());
+        sysVipInfo.setPointAll(scoreVipDetailDao.selectUserTotalScore(loginUser.getId()));
+        sysVipInfo.setBalance(moneyCardUseDao.selectVipCardTotalMoney(loginUser.getId()));
+        AjaxResult res = new AjaxResult();
+        res.putInMap("couponCount", shopCouponRecordDao.countUnuseCouponRecord(loginUser.getId()));
+        res.putInMap("prizeCount",activitySignReceiveRecordDao.getSignAwardReceiveCount(loginUser.getId(),loginUser.getCompanyId()));
+        res.putInMap("userInfo", sysVipInfo);
+        res.setStatus(AjaxResult.STATUS_SUCCESS);
+        return res;
+    }
+
+    /**
+     * 根据OpenID查询用户信息
+     */
+    @GetMapping(value = "/findUserInfo/{openId}")
+    public @ResponseBody
+    AjaxResult findUserInfo(@PathVariable String openId) {
+        SysVipInfo sysVipInfo = sysVipInfoService.findByOpenId(openId);
+        SysVipInfo bizUserQuery=new SysVipInfo();
+        bizUserQuery.setNickName(sysVipInfo.getNickName());
+        bizUserQuery.setAvatarUrl(sysVipInfo.getAvatarUrl());
+        bizUserQuery.setOpenId(openId);
+        return AjaxResult.buildSuccessInstance(bizUserQuery);
+    }
+
+
+    /**
+     * 接收用户信息
+     */
+    @PostMapping(value = "/saveUserInfo")
+    public @ResponseBody
+    AjaxResult saveUserInfo(@RequestBody XcxUserSaveUserInfoDto xcxUserSaveUserInfoDto) {
+
+        SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        SysVipInfo sysVipInfo=new SysVipInfo();
+        sysVipInfo.setId(loginUser.getId());
+
+        BeanUtil.copyProperties(xcxUserSaveUserInfoDto,sysVipInfo);
+        sysVipInfo.setPhone(xcxUserSaveUserInfoDto.getPhoneNumber());
+        if(StringUtils.isBlank(loginUser.getVipName())||loginUser.getVipName().equals("微信用户")){
+            sysVipInfo.setVipName(xcxUserSaveUserInfoDto.getNickName());
+        }
+        if(StringUtils.isBlank(loginUser.getSex())){
+            sysVipInfo.setSex(xcxUserSaveUserInfoDto.getGender()==1?"男":"女");
+        }
+
+        int i = sysVipInfoDao.update(sysVipInfo);
+
+        checkNeedToBeSalesman(sysVipInfo, loginUser);
+        if (i == 0) {
+            return new AjaxResult(AjaxResult.STATUS_FAIL, "更新失败");
+        }
+        return new AjaxResult(AjaxResult.STATUS_SUCCESS, Collections.singletonList(sysVipInfo));
+    }
+
+
+
+    void checkNeedToBeSalesman(SysVipInfo sysVipInfo, SysVipInfo loginUser) {
+        //查询是否需要自动成为分销员
+        if ((loginUser.getIsSales() == null || loginUser.getIsSales() == 2)
+                && StringUtils.isNotBlank(sysVipInfo.getNickName())) {//目前还不是分销员
+            BusParameterSettings fxSwith = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_SWITCH, HostInterceptor.getCompanyId());
+            if (fxSwith.getParamValue().equals("1")) {//开启分销
+                BusParameterSettings applyWay = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_APPLY_WAY, loginUser.getCompanyId());
+                if (applyWay.getParamValue().equals(FenxiaoSettingConstant.FX_APPLY_WAY_AUTO)) {//自动成为分销员
+                    QueryWrapper<ShopSalesmanApply> queryWrapper = new QueryWrapper<>();
+                    queryWrapper.eq("user_id", loginUser.getId());
+                    queryWrapper.eq("apply_status", ShopSalesmanApply.APPLY_STATUS_DSH);
+                    ShopSalesmanApply shopSalesmanApply = salesmanApplyDao.selectOne(queryWrapper);
+                    if (shopSalesmanApply == null) {//没有待审核记录
+                        try {
+                            shopSalesmanApplyService.applyToBeAnSalesman(loginUser.getId(), null, null, 2);
+                        }catch (Exception e){
+                            LogUtil.debug(e.getMessage());
+                        }
+
+                    }
+                }
+            }
+        }
+    }
+
+
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserSearchRecord.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserSearchRecord.java
index 84aedfb..e56f7ea 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserSearchRecord.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserSearchRecord.java
@@ -1,7 +1,7 @@
 package com.matrix.system.shopXcx.api.action;
 
 import com.matrix.core.pojo.AjaxResult;
-import com.matrix.biz.bean.BizUser;
+import com.matrix.system.hive.bean.SysVipInfo;
 
 import com.matrix.component.redis.RedisUserLoginUtils;
 import com.matrix.system.shopXcx.dao.ShopSearchRecordDao;
@@ -39,7 +39,7 @@
     @RequestMapping(value = "/getSearchRecordList")
     @ResponseBody
     public AjaxResult getSearchRecordList(){
-        BizUser bigUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo bigUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         if(bigUser == null){
             return new AjaxResult(AjaxResult.STATUS_FAIL,"用户未授权");
         }
@@ -54,7 +54,7 @@
     @RequestMapping(value = "/deleteSearchRecord")
     @ResponseBody
     public AjaxResult deleteSearchRecord(){
-        BizUser bigUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo bigUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         shopSearchRecordDao.deleteByUserId(bigUser.getOpenId());
         return new AjaxResult(AjaxResult.STATUS_SUCCESS,"删除成功");
     }
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/YuyueAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/YuyueAction.java
index abc7fbd..5b50cda 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/YuyueAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/YuyueAction.java
@@ -1,7 +1,5 @@
 package com.matrix.system.shopXcx.api.action;
 
-import com.matrix.biz.bean.BizUser;
-import com.matrix.biz.dao.BizUserDao;
 import com.matrix.component.rabbitmq.RabiitMqTemplate;
 import com.matrix.component.redis.RedisUserLoginUtils;
 import com.matrix.core.exception.GlobleException;
@@ -10,8 +8,12 @@
 import com.matrix.core.tools.DateUtil;
 import com.matrix.core.tools.StringUtils;
 import com.matrix.system.app.mapper.SysProjUseMapper;
-import com.matrix.system.app.vo.*;
+import com.matrix.system.app.vo.ServiceProductListVo;
+import com.matrix.system.app.vo.ServiceProjVo;
+import com.matrix.system.app.vo.ServiceTcVo;
+import com.matrix.system.common.bean.BusParameterSettings;
 import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
 import com.matrix.system.common.dao.SysUsersDao;
 import com.matrix.system.common.interceptor.HostInterceptor;
 import com.matrix.system.common.tools.LocationUtil;
@@ -20,6 +22,9 @@
 import com.matrix.system.hive.dao.*;
 import com.matrix.system.hive.plugin.util.CollectionUtils;
 import com.matrix.system.hive.service.*;
+import com.matrix.system.score.constant.ScoreSettingConstant;
+import com.matrix.system.score.entity.ScoreVipDetail;
+import com.matrix.system.score.service.ScoreVipDetailService;
 import com.matrix.system.shopXcx.api.dto.ErpServiceCommentDto;
 import com.matrix.system.shopXcx.api.dto.ErpServiceOrderListDto;
 import com.matrix.system.shopXcx.api.vo.ErpServiceOrderListVo;
@@ -27,7 +32,9 @@
 import com.matrix.system.shopXcx.dao.ShopSkuDao;
 import com.matrix.system.shopXcx.dto.YYDayOfWeek;
 import com.matrix.system.shopXcx.dto.YYmonth;
-import io.swagger.annotations.*;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Controller;
@@ -36,7 +43,9 @@
 
 import javax.annotation.Resource;
 import java.math.BigDecimal;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
 
 /**
  * @author jiangyouyao
@@ -75,7 +84,7 @@
     SysUsersDao staffInfoDao;
 
     @Autowired
-    BizUserDao bizUserDao;
+    SysVipInfoDao sysVipInfoDao;
 
     @Autowired
     RabiitMqTemplate rabiitMqTemplate;
@@ -91,6 +100,11 @@
 
     @Autowired
     ShoppingGoodsDao shoppingGoodsDao;
+    @Autowired
+    ScoreVipDetailService scoreVipDetailService;
+
+    @Autowired
+    private BusParameterSettingsDao busParameterSettingsDao;
 
     @Value("${evn}")
     private String evn;
@@ -209,7 +223,7 @@
     @ResponseBody
     public
     AjaxResult getUserPro(@PathVariable String phone) {
-        SysVipInfo vipInfo = vipInfoDao.selectByPhone(phone);
+        SysVipInfo vipInfo = vipInfoDao.selectByPhone(phone,HostInterceptor.getCompanyId());
 
         if (vipInfo == null) {
             throw new GlobleException("会员不存在");
@@ -260,8 +274,8 @@
     @RequestMapping(value = "/createServiceOrder")
     public @ResponseBody
     AjaxResult createServiceOrder(@RequestBody Onlinebooking onlinebooking) {
-        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
-        SysVipInfo vipInfo = vipInfoDao.selectByPhone(bizUser.getPhoneNumber());
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        SysVipInfo vipInfo = vipInfoDao.selectByPhone(sysVipInfo.getPhone(),HostInterceptor.getCompanyId());
         SysProjUse sysProjUse = projUseDao.selectById(Long.parseLong(onlinebooking.getProductId() + ""));
         Date yyTime = DateUtil.stringToDate(onlinebooking.getTimeStr(), DateUtil.DATE_FORMAT_MM);
         SysProjServices sysProjServices = new SysProjServices();
@@ -303,6 +317,13 @@
         sysProjServices.setState(Dictionary.SERVICE_STATU_DQR);
         SysProjServices newSysProjServices = projServicesService.addSysProjServices(sysProjServices);
         if (newSysProjServices != null) {
+
+            //添加用户积分
+            BusParameterSettings parameterSetting = busParameterSettingsDao.selectCompanyParamByCode(ScoreSettingConstant.RESERVATION_SERVICE_SHOP, sysVipInfo.getCompanyId());
+            scoreVipDetailService.addScoreByParamSetting(sysVipInfo.getId(), null,null, newSysProjServices.getId(),
+                    ScoreVipDetail.SCORE_VIP_TYPE_JOIN_ACTIVE,"预约送积分", parameterSetting);
+
+
             return AjaxResult.buildSuccessInstance("下单成功");
         } else {
             return new AjaxResult(AjaxResult.STATUS_FAIL, "下单失败!");
@@ -347,8 +368,8 @@
     @PostMapping(value = "/getServiceOrderList")
     @ResponseBody
     public AjaxResult findServiceOrderList(@RequestBody @Validated ErpServiceOrderListDto orderListDto) {
-        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
-        SysVipInfo vipInfo= vipInfoDao.selectByPhone(bizUser.getPhoneNumber());
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        SysVipInfo vipInfo= vipInfoDao.selectByPhone(sysVipInfo.getPhone(),HostInterceptor.getCompanyId());
         orderListDto.setVipId(vipInfo.getId());
         List<ErpServiceOrderListVo> apiServiceOrderListInPage = projServicesDao.findWxServiceOrderList(orderListDto);
         return AjaxResult.buildSuccessInstance(apiServiceOrderListInPage,"查询成功");
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ApplyToBeAnSalesmanDto.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ApplyToBeAnSalesmanDto.java
new file mode 100644
index 0000000..1e59168
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ApplyToBeAnSalesmanDto.java
@@ -0,0 +1,16 @@
+package com.matrix.system.shopXcx.api.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.NotBlank;
+
+@ApiModel(value = "AddVipDto", description = "添加会员接收参数类")
+public class ApplyToBeAnSalesmanDto {
+
+    @NotBlank(message = "性别不能为空")
+    @ApiModelProperty(value = "性别", example = "男/女")
+    private String sex;
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ClickSignDTO.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ClickSignDTO.java
new file mode 100644
index 0000000..b8a7a6b
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ClickSignDTO.java
@@ -0,0 +1,17 @@
+package com.matrix.system.shopXcx.api.dto;
+
+import javax.validation.constraints.NotBlank;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel(value = "ClickSignDTO", description = "点击签到接收参数类")
+@Data
+public class ClickSignDTO {
+	
+	@NotBlank(message = "签到活动ID不能为空")
+    @ApiModelProperty(value = "签到活动ID", example = "1")
+	private long actId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/MoneyCardUseFlowDto.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/MoneyCardUseFlowDto.java
new file mode 100644
index 0000000..138cabb
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/MoneyCardUseFlowDto.java
@@ -0,0 +1,34 @@
+package com.matrix.system.shopXcx.api.dto;
+
+import com.matrix.core.pojo.BasePageQueryDto;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+
+@Data
+@ApiModel(value = "MoneyCardUseFlowDto", description = "储值卡流水查询参数接收类")
+public class MoneyCardUseFlowDto extends BasePageQueryDto {
+
+
+    @NotEmpty(message = "请选择查询时间")
+    @ApiModelProperty(value = "查询月份",example = "2021-03")
+    private String queryTime;
+
+
+    @ApiModelProperty(value = "收支类型 不传全部,1,收入,2支出", example = "1")
+    private Integer  revenueType;
+
+    @NotNull(message = "请选择要查询的储值卡ID")
+    @ApiModelProperty(value = "储值卡id", example = "1")
+    private Long  carUseId;
+
+    @ApiModelProperty(hidden = true)
+    private Long  companyId;
+
+
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/RevenueFlowDto.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/RevenueFlowDto.java
new file mode 100644
index 0000000..7b21018
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/RevenueFlowDto.java
@@ -0,0 +1,26 @@
+package com.matrix.system.shopXcx.api.dto;
+
+import com.matrix.core.pojo.BasePageQueryDto;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+@Data
+@ApiModel(value = "RevenueFlowDto", description = "收益流水查询参数接收类")
+public class RevenueFlowDto extends BasePageQueryDto {
+
+    @NotNull(message = "查询月份不能为空")
+    @ApiModelProperty(value = "查询月份",example = "2021-03")
+    private String queryTime;
+
+
+    @ApiModelProperty(value = "收益类型 不传全部,1,收入,2支出", example = "1")
+    private Integer  revenueType;
+
+    @ApiModelProperty(hidden = true)
+    private Long  userId;
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SaleOrderDto.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SaleOrderDto.java
new file mode 100644
index 0000000..d8593f4
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SaleOrderDto.java
@@ -0,0 +1,27 @@
+package com.matrix.system.shopXcx.api.dto;
+
+import com.matrix.core.pojo.BasePageQueryDto;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+@Data
+@ApiModel(value = "SaleOrderDto", description = "分销订单查询参数接收类")
+public class SaleOrderDto extends BasePageQueryDto {
+
+    @NotNull(message = "订单类型不能为空")
+    @ApiModelProperty(value = "订单类型1推广订单,2邀请订单", example = "1")
+    private Integer revenueType;
+
+
+    @ApiModelProperty(value = "结算状态1,待结算,2,已结算,3已退款", example = "1")
+    private Integer  orderStatus;
+
+    @ApiModelProperty(hidden = true)
+    private Long  userId;
+
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SaleProductDto.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SaleProductDto.java
new file mode 100644
index 0000000..ffd1375
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SaleProductDto.java
@@ -0,0 +1,18 @@
+package com.matrix.system.shopXcx.api.dto;
+
+import com.matrix.core.pojo.BasePageQueryDto;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "SaleProductDto", description = "分销产品查询参数接收类")
+public class SaleProductDto extends BasePageQueryDto {
+
+    @ApiModelProperty(value = "产品分类", example = "1")
+    private Integer categoryId;
+
+
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ScoreFlowDto.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ScoreFlowDto.java
new file mode 100644
index 0000000..ed2d87b
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ScoreFlowDto.java
@@ -0,0 +1,41 @@
+package com.matrix.system.shopXcx.api.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.matrix.core.pojo.BasePageQueryDto;
+import com.matrix.core.tools.DateUtil;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+@Data
+@ApiModel(value = "ScoreFlowDto", description = "积分流水查询参数接收类")
+public class ScoreFlowDto extends BasePageQueryDto {
+
+
+    @ApiModelProperty(value = "查询月份",example = "2021-03")
+    private String queryTime;
+
+    @DateTimeFormat(pattern = DateUtil.DATE_FORMAT_DD)
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
+    private Date beginTime;
+
+    @DateTimeFormat(pattern = DateUtil.DATE_FORMAT_DD)
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
+    private Date endTime;
+
+
+    @ApiModelProperty(value = "收支类型 不传全部,1,收入,2支出", example = "1")
+    private Integer  revenueType;
+
+
+    @ApiModelProperty(value = "会员id", example = "1")
+    private Long  vipId;
+
+    @ApiModelProperty(value = "备注", example = "1")
+    private String  remarks;
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ScoreProductDto.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ScoreProductDto.java
new file mode 100644
index 0000000..cbb8a51
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ScoreProductDto.java
@@ -0,0 +1,20 @@
+package com.matrix.system.shopXcx.api.dto;
+
+import com.matrix.core.pojo.BasePageQueryDto;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "ScoreProductDto", description = "积分产品查询参数接收类")
+public class ScoreProductDto extends BasePageQueryDto {
+
+    @ApiModelProperty(value = "产品分类", example = "1")
+    private Integer scoreCategoryId;
+
+
+    @ApiModelProperty(value = "属性编码", example = "jfscrmtj")
+    private String attrCode;
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SeeAwardTextDto.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SeeAwardTextDto.java
new file mode 100644
index 0000000..f60d919
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SeeAwardTextDto.java
@@ -0,0 +1,24 @@
+package com.matrix.system.shopXcx.api.dto;
+
+import javax.validation.constraints.NotNull;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "SeeAwardTextDto", description = "查询参数接收类")
+public class SeeAwardTextDto {
+
+
+    @NotNull(message = "奖品ID不能为空")
+    @ApiModelProperty(value = "奖品ID", example = "1")
+	private Long  awardId;
+
+    @ApiModelProperty(hidden = true)
+    private Long  userId;
+    
+    @ApiModelProperty(hidden = true)
+    private Long  companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SignAwardDto.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SignAwardDto.java
new file mode 100644
index 0000000..89196d2
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SignAwardDto.java
@@ -0,0 +1,20 @@
+package com.matrix.system.shopXcx.api.dto;
+
+import com.matrix.core.pojo.BasePageQueryDto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+@Data
+@ApiModel(value = "SignAwardDto", description = "查询参数接收类")
+public class SignAwardDto extends BasePageQueryDto {
+
+    @ApiModelProperty(hidden = true)
+    private Long  userId;
+    
+    @ApiModelProperty(hidden = true)
+    private Long  companyId;
+
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/WithdrawalCashDto.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/WithdrawalCashDto.java
new file mode 100644
index 0000000..0502904
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/WithdrawalCashDto.java
@@ -0,0 +1,20 @@
+package com.matrix.system.shopXcx.api.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+@Data
+@ApiModel(value = "WithdrawalCashDto", description = "提现参数接收类")
+public class WithdrawalCashDto  {
+
+    @NotNull(message = "提现金额不能为空")
+    @ApiModelProperty(value = "提现金额", example = "1")
+    private Double amount;
+
+
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/XcxUserSaveUserInfoDto.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/XcxUserSaveUserInfoDto.java
new file mode 100644
index 0000000..c870683
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/XcxUserSaveUserInfoDto.java
@@ -0,0 +1,46 @@
+package com.matrix.system.shopXcx.api.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "XcxUserSaveUserInfoDto", description = "小程序用户授权信息保存接收类")
+public class XcxUserSaveUserInfoDto {
+
+    @ApiModelProperty(value = "手机号码" )
+    private String phoneNumber;
+
+    @ApiModelProperty(value = "昵称" )
+    private String nickName;
+
+
+    @ApiModelProperty(value = "头像" )
+    private String avatarUrl;
+
+
+    @ApiModelProperty(value = "性别" )
+    private Integer gender;
+
+
+    /**
+     * 用户所在国家
+     */
+    private String  country;
+
+    /**
+     * 省
+     */
+    private String province;
+
+    /**
+     * 市
+     */
+    private String city;
+
+    /**
+     * 区
+     */
+    private String area;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/AddShopOrderPOJO.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/AddShopOrderPOJO.java
deleted file mode 100644
index 3398072..0000000
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/AddShopOrderPOJO.java
+++ /dev/null
@@ -1,91 +0,0 @@
-package com.matrix.system.shopXcx.api.pojo;
-
-import java.util.List;
-
-/**
- * @author jyy
- */
-public class AddShopOrderPOJO {
-
-
-    /**
-     *  收货地址ID
-     */
-    private Integer receiveAddrId;
-
-    /**
-     *  配送方式(1=物流,2=门店自取)
-     */
-    private String deliverySelect;
-
-    /**
-     *  配送门店ID
-     */
-    private Long shopId;
-
-    /**
-     *  优惠券记录id
-     */
-    private Integer couponReceiveId;
-
-
-
-    /**
-     *  订单备注
-     */
-    private String  remarks;
-
-    /**
-     *  购买商品规格列表详情
-     */
-    private List<OrderProductSkuPOJO> skuList;
-
-
-    public Integer getReceiveAddrId() {
-        return receiveAddrId;
-    }
-
-    public void setReceiveAddrId(Integer receiveAddrId) {
-        this.receiveAddrId = receiveAddrId;
-    }
-
-    public String getDeliverySelect() {
-        return deliverySelect;
-    }
-
-    public void setDeliverySelect(String deliverySelect) {
-        this.deliverySelect = deliverySelect;
-    }
-
-    public Long getShopId() {
-        return shopId;
-    }
-
-    public void setShopId(Long shopId) {
-        this.shopId = shopId;
-    }
-
-    public Integer getCouponReceiveId() {
-        return couponReceiveId;
-    }
-
-    public void setCouponReceiveId(Integer couponReceiveId) {
-        this.couponReceiveId = couponReceiveId;
-    }
-
-    public String getRemarks() {
-        return remarks;
-    }
-
-    public void setRemarks(String remarks) {
-        this.remarks = remarks;
-    }
-
-    public List<OrderProductSkuPOJO> getSkuList() {
-        return skuList;
-    }
-
-    public void setSkuList(List<OrderProductSkuPOJO> skuList) {
-        this.skuList = skuList;
-    }
-}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/CalculatePostagePOJO.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/CalculatePostagePOJO.java
index ca95377..ccf8fef 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/CalculatePostagePOJO.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/CalculatePostagePOJO.java
@@ -19,7 +19,7 @@
     /**
      * 购买规格信息列表
      */
-    private List<OrderProductSkuPOJO> skuList;
+    private List<OrderItemDto> skuList;
 
 
     public Integer getAddrId() {
@@ -38,11 +38,11 @@
         this.couponId = couponId;
     }
 
-    public List<OrderProductSkuPOJO> getSkuList() {
+    public List<OrderItemDto> getSkuList() {
         return skuList;
     }
 
-    public void setSkuList(List<OrderProductSkuPOJO> skuList) {
+    public void setSkuList(List<OrderItemDto> skuList) {
         this.skuList = skuList;
     }
 
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/OrderCouponGroup.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/OrderCouponGroup.java
new file mode 100644
index 0000000..7de34e4
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/OrderCouponGroup.java
@@ -0,0 +1,43 @@
+package com.matrix.system.shopXcx.api.pojo;
+
+import com.matrix.system.shopXcx.api.vo.CouponReceiveInfoVO;
+import com.matrix.system.shopXcx.bean.ShopCoupon;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * 购物车前台展示对象
+ */
+@Data
+public class OrderCouponGroup {
+
+	private ShopCoupon coupon;
+
+	//是否满足优惠
+	private boolean satisfactionCoupon;
+
+	private List<OrderItemDto> orderItemDtos;
+
+	//提示语
+	private String msg="";
+
+	//优惠小计金额
+	private BigDecimal subtotal=BigDecimal.ZERO;
+
+	//原价
+	private BigDecimal srcPrice=BigDecimal.ZERO;
+
+	//优惠金额
+	private BigDecimal  couponPrice=BigDecimal.ZERO;
+	/**
+	 * 抵用积分
+	 */
+	private BigDecimal scorePay = BigDecimal.ZERO;
+
+	private CouponReceiveInfoVO couponReceiveInfoVO;
+
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/OrderItemDto.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/OrderItemDto.java
new file mode 100644
index 0000000..de86b06
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/OrderItemDto.java
@@ -0,0 +1,47 @@
+package com.matrix.system.shopXcx.api.pojo;
+
+import com.matrix.system.shopXcx.bean.ShopCoupon;
+import com.matrix.system.shopXcx.bean.ShopProduct;
+import com.matrix.system.shopXcx.bean.ShopSku;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author jyy
+ */
+@Data
+public class OrderItemDto {
+    /**
+     * 产品ID
+     */
+    private Integer  productId;
+    /**
+     *  产品规格ID
+     */
+    private Integer skuId;
+    
+    private ShopProduct shopProduct;
+
+    private ShopSku shopSku;
+    
+    /**
+     *  购买数量
+     */
+    private Integer count;
+
+    /**
+     * 支付方式1 直接购买 2,积分兑换
+     */
+    private Integer  payType;
+
+    /**
+     * 购物车id
+     */
+    private Integer cartId;
+
+
+    private List<ShopCoupon> shopCoupons;
+    
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/OrderProductSkuPOJO.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/OrderProductSkuPOJO.java
deleted file mode 100644
index 3e0b92b..0000000
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/OrderProductSkuPOJO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.matrix.system.shopXcx.api.pojo;
-
-/**
- * @author jyy
- */
-public class OrderProductSkuPOJO {
-
-    /**
-     *  产品规格ID
-     */
-    private Integer skuId;
-
-    /**
-     *  购买数量
-     */
-    private Integer count;
-
-
-    public Integer getSkuId() {
-        return skuId;
-    }
-
-    public void setSkuId(Integer skuId) {
-        this.skuId = skuId;
-    }
-
-    public Integer getCount() {
-        return count;
-    }
-
-    public void setCount(Integer count) {
-        this.count = count;
-    }
-}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/ShopOrderDto.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/ShopOrderDto.java
new file mode 100644
index 0000000..a5fa5e3
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/ShopOrderDto.java
@@ -0,0 +1,58 @@
+package com.matrix.system.shopXcx.api.pojo;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @author jyy
+ */
+@Data
+public class ShopOrderDto {
+
+
+    public static final Integer JOIN_ACTIVE = 1;
+    /**
+     *  收货地址ID
+     */
+    @NotNull(message = "请选择正确的收获地址")
+    private Integer receiveAddrId;
+
+    /**
+     *  配送方式(1=物流,2=门店自取)
+     */
+    private String deliverySelect;
+
+    /**
+     *  配送门店ID
+     */
+    private Long shopId;
+
+    /**
+     *  优惠券记录id
+     */
+    private Integer couponReceiveId;
+
+    /**
+     *  参加店铺活动 1参加 2不参加
+     */
+    private Integer joinActive;
+
+    /**
+     *  支付方式1微信,2 vipCard余额
+     */
+    @NotNull(message = "请选择支付方式")
+    private Integer payMethod;
+
+    /**
+     *  订单备注
+     */
+    private String  remarks;
+
+    /**
+     *  购买商品规格列表详情
+     */
+    private List<OrderItemDto> orderItemList;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/OrderCouponGroupService.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/OrderCouponGroupService.java
new file mode 100644
index 0000000..8519518
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/OrderCouponGroupService.java
@@ -0,0 +1,282 @@
+package com.matrix.system.shopXcx.api.service;
+
+import com.matrix.component.redis.RedisUserLoginUtils;
+import com.matrix.core.exception.GlobleException;
+import com.matrix.core.tools.LogUtil;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
+import com.matrix.system.shopXcx.api.pojo.OrderCouponGroup;
+import com.matrix.system.shopXcx.api.pojo.OrderItemDto;
+import com.matrix.system.shopXcx.bean.ShopCoupon;
+import com.matrix.system.shopXcx.bean.ShopShoppingCart;
+import com.matrix.system.shopXcx.dao.ShopProductDao;
+import com.matrix.system.shopXcx.dao.ShopShoppingCartDao;
+import com.matrix.system.shopXcx.dao.ShopSkuDao;
+import org.apache.commons.collections.CollectionUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.*;
+
+/**
+ * 购物车前台展示对象
+ */
+@Service
+public class OrderCouponGroupService {
+    @Autowired
+    private ShopShoppingCartDao shoppingCartDao;
+    @Autowired
+    private RedisUserLoginUtils redisUserLoginUtils;
+
+    @Autowired
+    WxShopCouponService shopCouponService;
+
+    @Autowired
+    BusParameterSettingsDao busParameterSettingsDao;
+
+    @Autowired
+    ShopProductDao shopProductDao;
+
+    @Autowired
+    ShopSkuDao shopSkuDao;
+
+    /**
+     * 初始化OrderCouponElement
+     * @param skuId
+     * @param count
+     * @param payType
+     * @return
+     */
+    public OrderItemDto buildOrderCouponElement(OrderItemDto orderItemDto){
+        orderItemDto.setShopSku(shopSkuDao.selectById(orderItemDto.getSkuId()));
+        orderItemDto.setShopProduct(shopProductDao.selectById(orderItemDto.getProductId()));
+        return orderItemDto;
+    }
+
+    /**
+     * 计算用户的产品可以参与的店铺优惠活动分组
+     */
+    public List<OrderCouponGroup> buildOrderCouponGroupList(List<OrderItemDto> list) {
+
+        //定义购物车优惠分组
+        List<OrderCouponGroup> orderCouponGroupList = new ArrayList<>();
+        // 1表示没有优惠的默认分组
+        OrderCouponGroup def = new OrderCouponGroup();
+        def.setSatisfactionCoupon(true);
+        def.setMsg("商城");
+        def.setOrderItemDtos(new ArrayList<>());
+        // 组合默认分组
+        orderCouponGroupList.add(def);
+
+        // 记录所有优惠券,一个优惠券(活动)表示一组
+        Map<Integer, ShopCoupon> shopCouponMap = new HashMap<>();
+
+        //查询购物车中的产品匹配上的所有优惠活动
+        for (OrderItemDto orderItemDto : list) {
+
+            if(orderItemDto.getPayType()== ShopShoppingCart.CAR_TYPE_SCORE){
+                // 积分兑换产品不参加优惠
+                def.getOrderItemDtos().add(orderItemDto);
+            }else{
+                List<ShopCoupon> shopCouponList = shopCouponService.getHdListByProductId(orderItemDto.getProductId());
+                if (CollectionUtils.isNotEmpty(shopCouponList)) {
+                    // 把所有的优惠券和购物车条目先关联一下,后续可以计算优惠升级的情况
+                    orderItemDto.setShopCoupons(shopCouponList);
+                    for (ShopCoupon shopCoupon : shopCouponList) {
+                        shopCouponMap.put(shopCoupon.getId(), shopCoupon);
+                    }
+                } else {
+                    // 该产品没有参加优惠券
+                    def.getOrderItemDtos().add(orderItemDto);
+                }
+            }
+
+        }
+
+        //计算没有优惠组的价格
+        countPrice(def);
+
+
+        /*
+         * 计算优惠券分组 1、获取到所有的优惠券,从最高满减开始,找寻合适的产品,找到后加入对应的购物车组
+         * 2、计算组内价格
+         */
+        Set<Integer> keys = shopCouponMap.keySet();
+        List<ShopCoupon> allShopCoupons = new ArrayList<>();
+        for (Integer key : keys) {
+            allShopCoupons.add(shopCouponMap.get(key));
+        }
+
+        //根据优惠力度排序,优惠力度大的先参与计算
+        Collections.sort(allShopCoupons, new Comparator() {
+            @Override
+            public int compare(Object o1, Object o2) {
+                ShopCoupon e1 = (ShopCoupon) o1;
+                ShopCoupon e2 = (ShopCoupon) o2;
+                return e2.getMinAmount().compareTo(e1.getMinAmount());
+            }
+        });
+
+
+        // 进行购物车和优惠券的匹配,匹配成功的加入到优惠组中,
+        for (int i = 0; i < allShopCoupons.size(); i++) {
+            ShopCoupon shopCoupon = allShopCoupons.get(i);
+            OrderCouponGroup shopCarVo = new OrderCouponGroup();
+            shopCarVo.setCoupon(shopCoupon);
+            shopCarVo.setOrderItemDtos(new ArrayList<>());
+            orderCouponGroupList.add(i, shopCarVo);
+
+            // 获取所有购物车条目
+            for (OrderItemDto orderItemDto : list) {
+                // 如果匹配到的产品已经出现在其他优惠组中,则需要判断是否移除之前的组
+                boolean needRemove = false;
+
+                // 判断当前购物车条目是否已经在合适的组里了
+                if (isInGroupAndSatisfaction(orderItemDto, orderCouponGroupList)) {
+                    continue;
+
+                } else if (isInGroupNotSatisfaction(orderItemDto, orderCouponGroupList)) {
+                    needRemove = true;
+                }
+
+                List<ShopCoupon> cartCouons = orderItemDto.getShopCoupons();
+                if (cartCouons != null) {
+                    // 获取每个购物车条目满足的优惠
+                    for (ShopCoupon cartCouon : cartCouons) {
+                        if (cartCouon.getId().equals(shopCoupon.getId())) {
+                            //匹配成功,加入本组
+                            LogUtil.debug("购物车" + orderItemDto.getProductId() + "和优惠券" + cartCouon.getCName() + "匹配");
+                            if (needRemove) {
+                                removeNotSatisfaction(orderItemDto, orderCouponGroupList);
+                            }
+                            shopCarVo.getOrderItemDtos().add(orderItemDto);
+                            break;
+                        }
+                    }
+                }
+
+            }
+
+            // 计算本组优惠券是否已经满足优惠条件
+            countPrice(shopCarVo);
+        }
+
+
+        // 因为有些优惠中可能没有产品,所以要去除cartList中没有产品的分组
+        List<OrderCouponGroup> cartListCopy = new ArrayList<>();
+        for (OrderCouponGroup orderCouponGroup : orderCouponGroupList) {
+            if (CollectionUtils.isNotEmpty(orderCouponGroup.getOrderItemDtos())) {
+                cartListCopy.add(orderCouponGroup);
+            }
+        }
+        return cartListCopy;
+    }
+
+
+    /**
+     * 购车条目在组中并且组是否已经满足优惠的
+     *
+     * @param cartList
+     * @return
+     */
+    private boolean isInGroupAndSatisfaction(OrderItemDto orderItemDto, List<OrderCouponGroup> cartList) {
+        boolean result = false;
+        for (OrderCouponGroup cartVo : cartList) {
+            if (cartVo.isSatisfactionCoupon() && cartVo.getOrderItemDtos().contains(orderItemDto)) {
+                result = true;
+            }
+        }
+        return result;
+    }
+
+    /**
+     * 购物车条目在组中,但是组中产品没有达到优惠条件
+     * @param cartList
+     * @return
+     */
+    private boolean isInGroupNotSatisfaction(OrderItemDto orderItemDto, List<OrderCouponGroup> cartList) {
+        boolean result = false;
+        for (OrderCouponGroup cartVo : cartList) {
+            if (!cartVo.isSatisfactionCoupon() && cartVo.getOrderItemDtos().contains(orderItemDto)) {
+                result = true;
+            }
+        }
+        return result;
+    }
+
+    /**
+     * 删除购物车条目所在分组中的引用
+     *
+     * @param cartList
+     */
+    private void removeNotSatisfaction(OrderItemDto orderItemDto, List<OrderCouponGroup> cartList) {
+        for (OrderCouponGroup cartVo : cartList) {
+            if (cartVo.getOrderItemDtos().remove(orderItemDto)) {
+                LogUtil.debug("删除购物车所在组" + cartVo.getCoupon().getCName() + "," + orderItemDto.getProductId());
+            }
+        }
+    }
+
+    /**
+     * 计算购物车价格和优惠信息
+     *
+     * @author JIANGYOUYAO
+     * @email 935090232@qq.com
+     * @date 2019年8月27日
+     */
+    private void countPrice(OrderCouponGroup orderCouponGroup) {
+        List<OrderItemDto> orderItemDtoList = orderCouponGroup.getOrderItemDtos();
+        // 计算总价
+        BigDecimal sum = BigDecimal.ZERO;
+        //抵扣总积分
+        BigDecimal scoreSum = BigDecimal.ZERO;
+
+        for (OrderItemDto orderCouponElement : orderItemDtoList) {
+            if(ShopShoppingCart.CAR_TYPE_MICRO==orderCouponElement.getPayType()){
+                //直接购买
+                sum = sum.add(orderCouponElement.getShopSku().getPrice().multiply(BigDecimal.valueOf(orderCouponElement.getCount())));
+
+            }else if(ShopShoppingCart.CAR_TYPE_SCORE==orderCouponElement.getPayType()){
+                //积分兑换
+                sum = sum.add(orderCouponElement.getShopSku().getScorePrice().multiply(BigDecimal.valueOf(orderCouponElement.getCount())));
+                scoreSum = scoreSum.add(new BigDecimal(orderCouponElement.getShopSku().getScoreCount() * orderCouponElement.getCount()));
+            }else{
+                throw new GlobleException("参数错误");
+            }
+        }
+
+        if (orderCouponGroup.getCoupon() != null) {
+            // 存在优惠券
+            if (sum.compareTo(orderCouponGroup.getCoupon().getMinAmount()) >= 0) {
+                //标记为合理分组
+                orderCouponGroup.setSatisfactionCoupon(true);
+                if (sum.compareTo(orderCouponGroup.getCoupon().getMinAmount()) >= 0) {
+                    orderCouponGroup.setSubtotal(sum.subtract(orderCouponGroup.getCoupon().getOffsetAmount()));
+                    orderCouponGroup.setSrcPrice(sum);
+                    orderCouponGroup.setCouponPrice(orderCouponGroup.getCoupon().getOffsetAmount());
+                    orderCouponGroup.setMsg(orderCouponGroup.getCoupon().getCName() + ",已优惠"
+                            + orderCouponGroup.getCoupon().getOffsetAmount().stripTrailingZeros().toPlainString() + "元");
+                }
+            }
+            if (sum.compareTo(orderCouponGroup.getCoupon().getMinAmount()) < 0) {
+                orderCouponGroup.setSatisfactionCoupon(false);
+                orderCouponGroup.setSubtotal(sum);
+                orderCouponGroup.setSrcPrice(sum);
+                orderCouponGroup.setMsg(orderCouponGroup.getCoupon().getCName());
+                if (sum.doubleValue() > 0) {
+                    orderCouponGroup.setMsg(orderCouponGroup.getCoupon().getCName() + ",再买"
+                            + (orderCouponGroup.getCoupon().getMinAmount().subtract(sum)).stripTrailingZeros()
+                            .toPlainString()
+                            + "元立减" + orderCouponGroup.getCoupon().getOffsetAmount().stripTrailingZeros().toPlainString()
+                            + "元");
+                }
+            }
+        } else {
+            orderCouponGroup.setSubtotal(sum);
+            orderCouponGroup.setSrcPrice(sum);
+            orderCouponGroup.setSatisfactionCoupon(true);
+        }
+        orderCouponGroup.setScorePay(scoreSum);
+    }
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/ShoppingCartService.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/ShoppingCartService.java
index 5180721..ba08465 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/ShoppingCartService.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/ShoppingCartService.java
@@ -1,6 +1,5 @@
 package com.matrix.system.shopXcx.api.service;
 
-import com.matrix.biz.bean.BizUser;
 import com.matrix.component.redis.RedisUserLoginUtils;
 import com.matrix.core.tools.LogUtil;
 import com.matrix.system.common.dao.BusParameterSettingsDao;
@@ -32,15 +31,11 @@
     @Autowired
     BusParameterSettingsDao busParameterSettingsDao;
 
-
+    //计算购车选中项总价以及优惠金额
     public ShopCartBillVo buildShopCartBillVo(List<ShopCartVo> cartList) {
 
         ShopCartBillVo shopCartBillVo = new ShopCartBillVo();
-        //计算购车选中项总价以及优惠金额
-        BigDecimal billTotal = BigDecimal.ZERO;
-        BigDecimal billCouponTotal = BigDecimal.ZERO;
-        //未优惠之前的金额
-        BigDecimal srcTotal = BigDecimal.ZERO;
+
 
         //计算是否存在选中的产品
         Integer selectCount = 0;
@@ -59,8 +54,6 @@
                     shopCartBillVo.setBillCouponTotal(shopCartBillVo.getBillCouponTotal().add(shopCartVo.getCouponPrice()));
                 }
             }
-
-
             for (ShopShoppingCart shopCart : shopCartVo.getCartList()) {
                 if (shopCart.getIsSelected() == 1) {
                     selectCount += shopCart.getCartNumber();
@@ -73,19 +66,7 @@
         return shopCartBillVo;
     }
 
-    /**
-     * 计算用户的购物车产品优惠分组
-     *
-     * @return
-     * @param shopId
-     */
-    public List<ShopCartVo> findUserCartList(Long shopId) {
-        BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class);
-        String userId = loginUser.getOpenId();
-        List<ShopShoppingCart> list = shoppingCartDao.selectByCartUserId(shopId,userId);
-        List<ShopCartVo> cartList = buildShopCart(list);
-        return cartList;
-    }
+
 
 
     /**
@@ -95,7 +76,7 @@
      * @return
      */
     @SuppressWarnings("unchecked")
-    private List<ShopCartVo> buildShopCart(List<ShopShoppingCart> list) {
+    public List<ShopCartVo> buildShopCart(List<ShopShoppingCart> list) {
 
 
         //定义购物车优惠分组
@@ -275,8 +256,14 @@
         for (ShopShoppingCart shopShoppingCart : cartList) {
             sum = sum.add(shopShoppingCart.getPrice().multiply(BigDecimal.valueOf(shopShoppingCart.getCartNumber())));
             if (shopShoppingCart.getIsSelected() == 1) {
-                selectSum = selectSum
-                        .add(shopShoppingCart.getPrice().multiply(BigDecimal.valueOf(shopShoppingCart.getCartNumber())));
+                if(shopShoppingCart.getCartType()==ShopShoppingCart.CAR_TYPE_MICRO){
+                    selectSum = selectSum
+                            .add(shopShoppingCart.getPrice().multiply(BigDecimal.valueOf(shopShoppingCart.getCartNumber())));
+                }else {
+                    selectSum = selectSum
+                            .add(shopShoppingCart.getScorePrice().multiply(BigDecimal.valueOf(shopShoppingCart.getCartNumber())));
+                }
+
             }
         }
 
@@ -307,9 +294,9 @@
                 }
             }
         } else {
-                shopCartVo.setSubtotal(selectSum);
-                shopCartVo.setSrcPrice(selectSum);
-                shopCartVo.setSatisfactionCoupon(true);
+            shopCartVo.setSubtotal(selectSum);
+            shopCartVo.setSrcPrice(selectSum);
+            shopCartVo.setSatisfactionCoupon(true);
         }
     }
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WXShopOrderService.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WXShopOrderService.java
index 3dabe15..8430dc5 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WXShopOrderService.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WXShopOrderService.java
@@ -1,15 +1,12 @@
 package com.matrix.system.shopXcx.api.service;
 
-import com.matrix.core.pojo.AjaxResult;
 import com.matrix.component.wechat.externalInterface.protocol.paramProtocol.BrandWCPayRequestData;
-import com.matrix.system.shopXcx.bean.ShopOrder;
-import com.matrix.system.shopXcx.dto.DiscountExplain;
-import com.matrix.system.shopXcx.api.pojo.AddShopOrderPOJO;
+import com.matrix.core.pojo.AjaxResult;
 import com.matrix.system.shopXcx.api.pojo.OrderInfoQueryPOJO;
-import com.matrix.system.shopXcx.api.vo.ShopCartVo;
+import com.matrix.system.shopXcx.api.pojo.ShopOrderDto;
+import com.matrix.system.shopXcx.bean.ShopOrder;
 
 import java.math.BigDecimal;
-import java.util.List;
 
 /**
  * @author jyy
@@ -22,11 +19,11 @@
 
     /**
      * 创建订单
-     * @param addShopOrderPOJO
+     * @param shopOrderDto
      * @return
      * @throws Exception
      */
-    AjaxResult createShopOrder(AddShopOrderPOJO addShopOrderPOJO) throws Exception;
+    ShopOrder createShopOrder(ShopOrderDto shopOrderDto) throws Exception;
 
     /**
      * 订单结算
@@ -93,5 +90,5 @@
      */
     AjaxResult updateStockAndVolumeById(Integer orderId);
 
-    DiscountExplain buildDiscountExplain(List<ShopCartVo> cartList, Integer id, Long companyId);
+    AjaxResult buildDiscountExplain(ShopOrderDto shopOrderDto);
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WxShopCouponService.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WxShopCouponService.java
index 13d6e99..fd92862 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WxShopCouponService.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WxShopCouponService.java
@@ -2,9 +2,9 @@
 
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.core.pojo.PaginationVO;
-import com.matrix.system.shopXcx.bean.ShopCoupon;
-import com.matrix.system.shopXcx.bean.ShopShoppingCart;
+import com.matrix.system.shopXcx.api.pojo.OrderItemDto;
 import com.matrix.system.shopXcx.api.vo.CouponReceiveInfoVO;
+import com.matrix.system.shopXcx.bean.ShopCoupon;
 
 import java.util.List;
 
@@ -18,7 +18,7 @@
 	 * 根据购物车选中的产品
 	 * @return
 	 */
-	public List<CouponReceiveInfoVO> getCartVoCouponList(Long companyId,List<ShopShoppingCart> shopShoppingCarts);
+	public List<CouponReceiveInfoVO> getCartVoCouponList(Long companyId,List<OrderItemDto> OrderItemDtos);
 
 
 	/**
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WxShopRefundRecordService.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WxShopRefundRecordService.java
index d473bbf..916994d 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WxShopRefundRecordService.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WxShopRefundRecordService.java
@@ -13,12 +13,6 @@
      */
     Boolean refundToUser(String id, ShopRefundRecord shopRefundRecord);
 
-    /**
-     * 退款成功后发送微信提醒
-     * @param shopRefundRecord
-     * @return
-     */
-    int sendRefundInfoToUser(ShopRefundRecord shopRefundRecord);
 
     void updateGroupBuyStatus(Long orderId);
 
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WXShopOrderServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WXShopOrderServiceImpl.java
index dce9db6..9a44280 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WXShopOrderServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WXShopOrderServiceImpl.java
@@ -1,8 +1,8 @@
 package com.matrix.system.shopXcx.api.service.impl;
 
+import cn.hutool.core.collection.CollUtil;
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
-import com.matrix.biz.bean.BizUser;
 import com.matrix.component.rabbitmq.RabiitMqTemplate;
 import com.matrix.component.redis.RedisUserLoginUtils;
 import com.matrix.component.tools.WxUtils;
@@ -11,26 +11,26 @@
 import com.matrix.core.exception.GlobleException;
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.core.tools.LogUtil;
-import com.matrix.core.tools.StringUtils;
 import com.matrix.system.common.bean.BusParameterSettings;
 import com.matrix.system.common.constance.AppConstance;
 import com.matrix.system.common.dao.BusParameterSettingsDao;
 import com.matrix.system.common.dao.CustomerDataDictionaryDao;
 import com.matrix.system.common.interceptor.HostInterceptor;
-import com.matrix.system.constance.Dictionary;
-import com.matrix.system.hive.bean.ShoppingGoods;
+import com.matrix.system.hive.bean.SysVipInfo;
 import com.matrix.system.hive.dao.ShoppingGoodsDao;
+import com.matrix.system.hive.dao.SysVipInfoDao;
+import com.matrix.system.score.dao.ScoreVipDetailDao;
 import com.matrix.system.shopXcx.api.action.PayThreadPool;
-import com.matrix.system.shopXcx.api.pojo.AddShopOrderPOJO;
+import com.matrix.system.shopXcx.api.pojo.OrderCouponGroup;
 import com.matrix.system.shopXcx.api.pojo.OrderInfoQueryPOJO;
+import com.matrix.system.shopXcx.api.pojo.OrderItemDto;
+import com.matrix.system.shopXcx.api.pojo.ShopOrderDto;
+import com.matrix.system.shopXcx.api.service.OrderCouponGroupService;
 import com.matrix.system.shopXcx.api.service.ShoppingCartService;
 import com.matrix.system.shopXcx.api.service.WXShopOrderService;
 import com.matrix.system.shopXcx.api.service.WxShopCouponService;
-import com.matrix.system.shopXcx.api.tools.WxShopCouponUtil;
 import com.matrix.system.shopXcx.api.tools.WxShopOrderUtil;
 import com.matrix.system.shopXcx.api.vo.CouponReceiveInfoVO;
-import com.matrix.system.shopXcx.api.vo.ShopCartBillVo;
-import com.matrix.system.shopXcx.api.vo.ShopCartVo;
 import com.matrix.system.shopXcx.bean.*;
 import com.matrix.system.shopXcx.dao.*;
 import com.matrix.system.shopXcx.dto.DiscountExplain;
@@ -42,6 +42,7 @@
 
 import java.math.BigDecimal;
 import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * @author jyy
@@ -52,8 +53,6 @@
 public class WXShopOrderServiceImpl implements WXShopOrderService {
     @Autowired
     private WxShopOrderUtil wxShopOrderUtil;
-    @Autowired
-    private WxShopCouponUtil wxShopCouponUtil;
     @Autowired
     private RedisUserLoginUtils redisUserLoginUtils;
     @Autowired
@@ -66,8 +65,6 @@
     private ShopOrderDao shopOrderDao;
     @Autowired
     private ShopOrderDetailsDao shopOrderDetailsDao;
-    @Autowired
-    private ShopCouponDao shopCouponDao;
     @Autowired
     private ShopProductDao shopProductDao;
     @Autowired
@@ -90,6 +87,9 @@
     private ShopActivitiesGroupJoinUserDao shopActivitiesGroupJoinUserDao;
 
     @Autowired
+    OrderCouponGroupService orderCouponGroupService;
+
+    @Autowired
     CustomerDataDictionaryDao dataDictionaryDao;
     @Value("${wx_pay_debug_onoff}")
     private boolean isDebug;
@@ -97,125 +97,108 @@
     @Autowired
     private BusParameterSettingsDao busParameterSettingsDao;
 
+    @Autowired
+    private ScoreVipDetailDao scoreVipDetailDao;
+
+
+    @Autowired
+    private SysVipInfoDao sysVipInfoDao;
     @Override
-    public BigDecimal calculationPostage(BigDecimal payPrice,Long companyId) {
+    public BigDecimal calculationPostage(BigDecimal payPrice, Long companyId) {
         BigDecimal postage = BigDecimal.ZERO;
         BusParameterSettings yf = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.PACKAGE_PRICE, companyId);
         BusParameterSettings myje = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.FREE_PACKAGE_PRICE, companyId);
-        if(yf!=null&&myje!=null){
+        if (yf != null && myje != null) {
             if (Double.parseDouble(myje.getParamValue()) > payPrice.doubleValue()) {
                 postage = new BigDecimal(yf.getParamValue());
             }
         }
-
         return postage;
     }
-
-
 
 
     /**
      * 创建订单
      *
-     * @param addShopOrderPOJO
+     * @param shopOrderDto
      * @return
      * @throws Exception
      */
     @Transactional(rollbackFor = Exception.class)
     @Override
-    public AjaxResult createShopOrder(AddShopOrderPOJO addShopOrderPOJO) throws Exception {
-        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+    public ShopOrder createShopOrder(ShopOrderDto shopOrderDto) throws Exception {
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
 
 
-        //校验收货地址
-        ShopReceiveAddress shopReceiveAddress = shopReceiveAddressDao.selectById(addShopOrderPOJO.getReceiveAddrId());
-        if (shopReceiveAddress == null) {
-            return new AjaxResult(AjaxResult.STATUS_FAIL, "请选择正确的收获地址");
-        }
+
+        ShopReceiveAddress shopReceiveAddress = shopReceiveAddressDao.selectById(shopOrderDto.getReceiveAddrId());
 
 
-        List<ShopCartVo> cartList = shoppingCartService.findUserCartList(addShopOrderPOJO.getShopId());
-        //购物车不能为空
-        if (CollectionUtils.isEmpty(cartList)) {
-            return new AjaxResult(AjaxResult.STATUS_FAIL, "请选择您需要购买的产品");
-        }
-
-
-        //取出购物车中选中的产品
-        List<ShopShoppingCart> buyCart = new ArrayList<>();
-        //取出购物车中没有参加店铺活动的产品,和参加了店铺活动但是活动没有达到标准的产品,用来计算是否可以使用优惠券
-        List<ShopShoppingCart> notCouponuyCart = new ArrayList<>();
-        for (ShopCartVo shopCartVo : cartList) {
-            for (ShopShoppingCart shopShoppingCart : shopCartVo.getCartList()) {
-                if (shopShoppingCart.getIsSelected() == 1) {
-                    buyCart.add(shopShoppingCart);
-                    if (shopCartVo.getCoupon() == null || !shopCartVo.isSatisfactionCoupon()) {
-                        notCouponuyCart.add(shopShoppingCart);
-                    }
-                }
+        //计算订单优惠信息
+        AjaxResult caculateResult= buildDiscountExplain(shopOrderDto);
+        DiscountExplain discountExplain= (DiscountExplain) caculateResult.getMapInfo().get("discountExplain");
+        if(discountExplain.getScorePay()!=null){
+            //校验用户积分是否够用
+            int score=scoreVipDetailDao.selectUserTotalScore(sysVipInfo.getId());
+            if(score<discountExplain.getScorePay()){
+                throw new GlobleException("积分不足");
             }
         }
 
-        //计算订单优惠信息
-        DiscountExplain discountExplain = buildDiscountExplain(cartList, addShopOrderPOJO.getCouponReceiveId(), bizUser.getCompanyId());
-
 
         ShopOrder shopOrder = new ShopOrder();
-        shopOrder.setCompanyId(bizUser.getCompanyId());
-        shopOrder.setStoreId(Integer.parseInt(addShopOrderPOJO.getShopId().toString()));
+        shopOrder.setCompanyId(sysVipInfo.getCompanyId());
+        shopOrder.setStoreId(Integer.parseInt(shopOrderDto.getShopId().toString()));
         //默认设置为产品类型
         shopOrder.setOrderType(ShopOrder.ORDER_TYPE_GOODS);
 
         List<ShopOrderDetails> details = new ArrayList<>();
-        Integer cartCount = 0;
-        for (ShopShoppingCart shopShoppingCart : buyCart) {
+        Integer orderCount = 0;
+        for (OrderItemDto orderItemDto : shopOrderDto.getOrderItemList()) {
             ShopOrderDetails shopOrderDetails = new ShopOrderDetails();
             shopOrderDetails.setCreateBy(AppConstance.SYSTEM_USER);
             shopOrderDetails.setUpdateBy(AppConstance.SYSTEM_USER);
-            shopOrderDetails.setpId(shopShoppingCart.getCartProductId());
-            shopOrderDetails.setsId(shopShoppingCart.getCartSkuId());
-            shopOrderDetails.setPrice(shopShoppingCart.getPrice());
-            shopOrderDetails.setCount(shopShoppingCart.getCartNumber());
-            shopOrderDetails.setsTitle(shopShoppingCart.getTitle() + shopShoppingCart.getName());
-            shopOrderDetails.setDiscountAmount(BigDecimal.ZERO);
-            shopOrderDetails.setTotalPrice(shopOrderDetails.getPrice().multiply(BigDecimal.valueOf(shopOrderDetails.getCount())));
-            details.add(shopOrderDetails);
-            cartCount += shopOrderDetails.getCount();
-
-            //查询绑定的产品是否为家居产品,如果已经含家具产品则不再比较
-            if (ShopOrder.ORDER_TYPE_GOODS != shopOrder.getOrderType()) {
-                ShopSku shopSku = shopSkuDao.selectById(shopShoppingCart.getCartSkuId());
-                String stokCode = shopSku.getStockCode();
-                if (StringUtils.isNotBlank(stokCode)) {
-                    ShoppingGoods shoppingGoods = shoppingGoodsDao.selectById(Long.parseLong(stokCode));
-                    if (shoppingGoods != null) {
-                        //根据购买的产品设置订单类型
-                        if (Dictionary.SHOPPING_GOODS_TYPE_JJCP.equals(shoppingGoods.getGoodType())) {
-                            shopOrder.setOrderType(ShopOrder.ORDER_TYPE_GOODS);
-                        } else {
-
-                        }
-                    } else {
-                        shopOrder.setOrderType(ShopOrder.ORDER_TYPE_GOODS);
-                    }
-                }
+            shopOrderDetails.setpId(orderItemDto.getProductId());
+            shopOrderDetails.setsId(orderItemDto.getSkuId());
+            shopOrderDetails.setCount(orderItemDto.getCount());
+            if(ShopOrderDetails.PAYTYPE_MICRO==orderItemDto.getPayType()){
+                shopOrderDetails.setPrice(orderItemDto.getShopSku().getPrice());
+            }else{
+                shopOrderDetails.setPrice(orderItemDto.getShopSku().getScorePrice());
+                shopOrderDetails.setScoreCount(BigDecimal.valueOf(orderItemDto.getShopSku().getScoreCount()));
+                shopOrderDetails.setTotalScoreCount(shopOrderDetails.getScoreCount().multiply(BigDecimal.valueOf(shopOrderDetails.getCount())));
             }
+            shopOrderDetails.setTotalPrice(shopOrderDetails.getPrice().multiply(BigDecimal.valueOf(shopOrderDetails.getCount())));
 
+            shopOrderDetails.setPayType(orderItemDto.getPayType());
+
+            shopOrderDetails.setsTitle(orderItemDto.getShopProduct().getTitle() + orderItemDto.getShopSku().getName());
+
+            shopOrderDetails.setDiscountAmount(BigDecimal.ZERO);
+
+            details.add(shopOrderDetails);
+            orderCount += shopOrderDetails.getCount();
+            if(orderItemDto.getCartId()!=null){
+                //删除用户购物车选中的产品
+                shoppingCartDao.deleteById(orderItemDto.getCartId());
+            }
 
         }
 
         //校验商品是否限购
-        wxShopOrderUtil.verifyProductLimitInfo(details, bizUser.getOpenId());
+        wxShopOrderUtil.verifyProductLimitInfo(details, sysVipInfo.getOpenId());
         //TODO 更新库存和销量 更新库存和销量[考虑和erp库存联动]
         wxShopOrderUtil.updateProductAndSkuInfo(details);
         //用户openId
-        shopOrder.setUserId(bizUser.getOpenId());
+        shopOrder.setUserId(sysVipInfo.getId());
         shopOrder.setCreateBy("微信小程序生成");
         shopOrder.setUpdateBy("微信小程序生成");
+        shopOrder.setPayMethod(shopOrderDto.getPayMethod());
         shopOrder.setCommodityPrice(discountExplain.getBillPrice());
-        shopOrder.setPurchaseQuantity(cartCount);
+        shopOrder.setPurchaseQuantity(orderCount);
+        shopOrder.setOrderType(ShopOrder.ORDER_TYPE_GOODS);
         //购买方式
-        shopOrder.setShippingMethod(addShopOrderPOJO.getDeliverySelect());
+        shopOrder.setShippingMethod(shopOrderDto.getDeliverySelect());
         //生成订单号
         shopOrder.setOrderNo(WxUtils.getOrderNum());
         //设置支付状态
@@ -230,7 +213,7 @@
         //客户姓名
         shopOrder.setUserName(shopReceiveAddress.getAddrLiaisonman());
         //备注
-        shopOrder.setRemarks(addShopOrderPOJO.getRemarks());
+        shopOrder.setRemarks(shopOrderDto.getRemarks());
         //删除标识
         shopOrder.setDelFlag(AppConstance.DATA_USEABLE);
         //微信订单号
@@ -241,13 +224,14 @@
         //获取邮费
         shopOrder.setPostage(discountExplain.getPostage());
         shopOrder.setOrderMoney(discountExplain.getPayPrice());
+        shopOrder.setScorePay(discountExplain.getScorePay());
         Gson g = new GsonBuilder().create();
         shopOrder.setDiscountExplain(g.toJson(discountExplain));
-        shopOrder.setDiscountAmount(discountExplain.getActivity().add(discountExplain.getCoupon()));
+        shopOrder.setDiscountAmount(discountExplain.getActivityPrice().add(discountExplain.getCouponPrice()));
         shopOrder.setCompanyId(HostInterceptor.getCompanyId());
         shopOrderDao.insert(shopOrder);
 
-        wxShopOrderUtil.insertSendPackageInfo(shopOrder, addShopOrderPOJO.getDeliverySelect(), shopReceiveAddress);
+        wxShopOrderUtil.insertSendPackageInfo(shopOrder, shopOrderDto.getDeliverySelect(), shopReceiveAddress);
         //给订单详情表添加订单ID
         for (ShopOrderDetails shopOrderDetails : details) {
             shopOrderDetails.setOrderId(shopOrder.getId());
@@ -256,48 +240,136 @@
             shopOrderDetailsDao.batchInsert(details);
         }
         //更新使用的优惠券状态
-        if (addShopOrderPOJO.getCouponReceiveId() != null) {
+        if (shopOrderDto.getCouponReceiveId() != null) {
             ShopCouponRecord record = new ShopCouponRecord();
             record.setIsUsing(AppConstance.MY_COUPON_USE);
             record.setOrderId(shopOrder.getId());
-            record.setId(addShopOrderPOJO.getCouponReceiveId());
+            record.setId(shopOrderDto.getCouponReceiveId());
             shopCouponRecordDao.updateByModel(record);
         }
 
-        //删除用户购物车选中的产品
-        shoppingCartDao.deleteUserSelectCart(bizUser.getOpenId());
 
 
-        BrandWCPayRequestData payData = startPayment(shopOrder);
-        AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, Arrays.asList(payData));
-        result.putInMap("orderId", shopOrder.getId());
 
-        return result;
+        return shopOrder;
     }
 
     @Override
-    public DiscountExplain buildDiscountExplain(List<ShopCartVo> cartList, Integer receiveId, Long companyId) {
-        ShopCartBillVo shopCartBill = shoppingCartService.buildShopCartBillVo(cartList);
-        DiscountExplain discountExplain = new DiscountExplain();
-        discountExplain.setActivity(shopCartBill.getBillCouponTotal());
-        discountExplain.setBillPrice(shopCartBill.getSrcTotal());
-        discountExplain.setPayPrice(shopCartBill.getBillTotal());
-        //计算优惠券
-        if (receiveId != null) {
-            CouponReceiveInfoVO couponReceiveInfoVO = shopCouponRecordDao.selectMyCouponByReceiveId(receiveId);
-            if (couponReceiveInfoVO != null) {
-                BigDecimal payPrice = discountExplain.getPayPrice().subtract(couponReceiveInfoVO.getOffsetAmount());
-                payPrice = payPrice.compareTo(BigDecimal.ZERO) < 0 ? BigDecimal.ZERO : payPrice;
-                discountExplain.setPayPrice(payPrice);
-                discountExplain.setCoupon(couponReceiveInfoVO.getOffsetAmount());
-            }
+    public AjaxResult buildDiscountExplain(ShopOrderDto shopOrderDto) {
+
+        if(CollUtil.isEmpty(shopOrderDto.getOrderItemList())){
+            return AjaxResult.buildFailInstance("请选择购买的明细");
         }
 
-        discountExplain.setPostage(calculationPostage(discountExplain.getPayPrice(),companyId));
+        //订单计价说明
+        DiscountExplain discountExplain = new DiscountExplain();
+        //账单总金额
+        BigDecimal billPrice = BigDecimal.ZERO;
+        //活动优惠金额
+        BigDecimal activityTotal = BigDecimal.ZERO;
+        //优惠券惠金额
+        BigDecimal couponPrice = BigDecimal.ZERO;
+        //支付总积分
+        Integer scoreCount=0;
 
-        //计算实际支付
-        discountExplain.setPayPrice(discountExplain.getPayPrice().add(discountExplain.getPostage()));
-        return discountExplain;
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+
+        //计算购物车中物品的优惠信息
+        List<OrderItemDto> orderItemDtos = shopOrderDto.getOrderItemList()
+                .stream().map(orderItemDto -> {
+                    return orderCouponGroupService.buildOrderCouponElement(orderItemDto);
+                })
+                .collect(Collectors.toList());
+        //计算未优惠的总金额
+        for (OrderItemDto orderItemDto :orderItemDtos ){
+            if(orderItemDto.getPayType()==ShopShoppingCart.CAR_TYPE_MICRO){
+                billPrice=billPrice.add(orderItemDto.getShopSku().getPrice().multiply(new BigDecimal(orderItemDto.getCount())));
+            }else{
+                billPrice=billPrice.add(orderItemDto.getShopSku().getScorePrice().multiply(new BigDecimal(orderItemDto.getCount())));
+                scoreCount+=orderItemDto.getShopSku().getScoreCount()*orderItemDto.getCount();
+            }
+        }
+        discountExplain.setScorePay(scoreCount);
+
+
+        //计算用户的产品可以参与的店铺优惠活动分组
+        List<ShopCoupon> shopActiveList = new ArrayList<>();//记录用户可以参与的门店活动
+        List<OrderCouponGroup> orderCouponGroupList = new ArrayList<>();
+        int conditionsGroupCount = 0;
+        if (shopOrderDto.getJoinActive() == ShopOrderDto.JOIN_ACTIVE) {//用户参与优惠活动
+            orderCouponGroupList = orderCouponGroupService.buildOrderCouponGroupList(orderItemDtos);
+            conditionsGroupCount = orderCouponGroupList.stream().map(orderCouponGroup -> {
+                if (orderCouponGroup.isSatisfactionCoupon()&&orderCouponGroup.getCoupon()!=null) {
+                    shopActiveList.add(orderCouponGroup.getCoupon());
+                    return 1;
+                } else {
+                    return 0;
+                }
+            }).mapToInt(Integer::intValue).sum();
+        }
+        if(CollUtil.isNotEmpty(shopActiveList)){
+            activityTotal=shopActiveList.stream().map(ShopCoupon:: getOffsetAmount).reduce(BigDecimal.ZERO,BigDecimal::add);
+        }
+
+        //门店活动优惠金额
+        discountExplain.setActivityPrice(activityTotal);
+
+
+        List<CouponReceiveInfoVO> usefulCoupon = new ArrayList<>();
+        CouponReceiveInfoVO shopCoupon = new CouponReceiveInfoVO();
+        //满足店铺活动的订单不能使用优惠券
+        if (conditionsGroupCount > 0) {
+            //计算可用优惠券
+            usefulCoupon = wxShopCouponService.getCartVoCouponList(sysVipInfo.getCompanyId(), orderItemDtos);
+            //获取用户使用的优惠券
+            if (shopOrderDto.getCouponReceiveId() == null) {
+                //如果用户没有选择优惠券则默认选优惠金额最高的
+                //计算使用优惠券后的价格
+                if (CollectionUtils.isNotEmpty(usefulCoupon)) {
+                    //根据优惠券ID用户ID查询优惠券信息
+                    shopCoupon = usefulCoupon.get(0);
+                }
+            } else if (shopOrderDto.getCouponReceiveId() != 1) {
+                //用户选择了优惠券
+                shopCoupon = shopCouponRecordDao.selectMyCouponByReceiveId(shopOrderDto.getCouponReceiveId());
+            } else {
+                //用户不使用优惠券
+            }
+            //计算优惠券
+            if (shopCoupon.getCouponId() != null) {
+                couponPrice=shopCoupon.getOffsetAmount();
+            }
+            //优惠券金额
+            discountExplain.setCouponPrice(couponPrice);
+        }
+
+
+
+        //计算运费
+        discountExplain.setPostage(calculationPostage(discountExplain.getPayPrice(), HostInterceptor.getCompanyId()));
+
+
+
+        //账单总金额
+        discountExplain.setBillPrice(billPrice.add(discountExplain.getPostage()));
+
+        BigDecimal payPrice=discountExplain.getBillPrice().subtract(activityTotal).subtract(couponPrice);
+        //应付金额
+        discountExplain.setPayPrice(payPrice.doubleValue()>0?payPrice:BigDecimal.ONE);
+
+        AjaxResult result = AjaxResult.buildSuccessInstance("");
+        //结算金额信息
+        result.putInMap("discountExplain", discountExplain);
+        //用户优惠券
+        result.putInMap("usefulCoupon", usefulCoupon);
+        //用户选中的优惠券
+        result.putInMap("shopCoupon", shopCoupon);
+
+        //店铺优惠活动
+        result.putInMap("shopActiveList", shopActiveList);
+
+        return result;
+
     }
 
 
@@ -311,12 +383,25 @@
     @Override
     public AjaxResult orderSettlement(int orderId) throws Exception {
         ShopOrder shopOrder = shopOrderDao.selectById(orderId);
+
         if (shopOrder == null) {
-            throw new GlobleException("订单不存在!");
+            return AjaxResult.buildFailInstance("订单不存在!");
+        }
+        if (ShopOrder.SHOP_ORDER_PAY_METHOD_WX != shopOrder.getPayMethod()) {
+            return AjaxResult.buildFailInstance("支付方式错误");
         }
         if (!shopOrder.getPayResult().equals(ShopOrder.ORDER_PAY_STATUS_WAIT)) {
-            throw new GlobleException("该订单不是待支付状态!");
+            return AjaxResult.buildFailInstance("该订单不是待支付状态!");
         }
+
+        if(shopOrder.getScorePay()!=null){
+            //校验用户积分是否够用
+            int score=scoreVipDetailDao.selectUserTotalScore(shopOrder.getUserId());
+            if(score<shopOrder.getScorePay()){
+                return  AjaxResult.buildFailInstance("积分不足");
+            }
+        }
+
         BrandWCPayRequestData payData = startPayment(shopOrder);
         AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, Arrays.asList(payData));
         result.putInMap("orderId", shopOrder.getId());
@@ -336,13 +421,15 @@
         BigDecimal money = new BigDecimal(shopOrder.getOrderMoney().toString());
         BrandWCPayRequestData payData;
         String productNames = wxShopOrderUtil.getProductNames(shopOrder.getUserId(), shopOrder.getId());
+        SysVipInfo vipInfo=sysVipInfoDao.selectById(shopOrder.getUserId());
+
         LogUtil.debug(String.valueOf(isDebug));
         if (isDebug) {
             payData = weixinServiceUtil.createOrder("[测试]" + productNames, shopOrder.getOrderNo(),
-                    1, shopOrder.getUserId(), String.valueOf(shopOrder.getId()));
+                    1, vipInfo.getOpenId(), String.valueOf(shopOrder.getId()));
         } else {
             payData = weixinServiceUtil.createOrder(productNames, shopOrder.getOrderNo(),
-                    unit.multiply(money).intValue(), shopOrder.getUserId(), String.valueOf(shopOrder.getId()));
+                    unit.multiply(money).intValue(),vipInfo.getOpenId(), String.valueOf(shopOrder.getId()));
         }
         ShopOrder updateParam = new ShopOrder();
         updateParam.setId(shopOrder.getId());
@@ -359,12 +446,12 @@
      */
     @Override
     public AjaxResult getMyOrderInfo(OrderInfoQueryPOJO orderInfoQueryPOJO) {
-        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         orderInfoQueryPOJO.setSort("update_time");
         if (orderInfoQueryPOJO.getOffset() >= 1) {
             orderInfoQueryPOJO.setOffset((orderInfoQueryPOJO.getOffset() - 1) * orderInfoQueryPOJO.getLimit());
         }
-        List<ShopOrder> result = shopOrderDao.selectMyOrderByStatus(bizUser.getOpenId(), orderInfoQueryPOJO);
+        List<ShopOrder> result = shopOrderDao.selectMyOrderByStatus(sysVipInfo.getId(), orderInfoQueryPOJO);
         return new AjaxResult(AjaxResult.STATUS_SUCCESS, result);
     }
 
@@ -376,8 +463,8 @@
      */
     @Override
     public AjaxResult getOrderInfoById(Integer orderId) {
-        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
-        ShopOrder shopOrder = shopOrderDao.selectOrderInfoById(bizUser.getOpenId(), orderId);
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        ShopOrder shopOrder = shopOrderDao.selectOrderInfoById(sysVipInfo.getId(), orderId);
         return new AjaxResult(AjaxResult.STATUS_SUCCESS, Arrays.asList(shopOrder));
     }
 
@@ -398,8 +485,8 @@
         }
         if (shopOrder.getDiscountAmount() != null && shopOrder.getDiscountAmount().compareTo(BigDecimal.ZERO) > 0) {
             ShopCouponRecord shopCouponRecord = new ShopCouponRecord();
-            BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
-            shopCouponRecord.setUserId(bizUser.getOpenId());
+            SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+            shopCouponRecord.setUserId(sysVipInfo.getId());
             shopCouponRecord.setOrderId(orderId);
             List<ShopCouponRecord> recordList = shopCouponRecordDao.selectByModel(shopCouponRecord);
             if (CollectionUtils.isNotEmpty(recordList)) {
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopActivitiesGroupServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopActivitiesGroupServiceImpl.java
index 755f560..aefbb92 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopActivitiesGroupServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopActivitiesGroupServiceImpl.java
@@ -2,7 +2,6 @@
 
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
-import com.matrix.biz.bean.BizUser;
 import com.matrix.component.redis.RedisUserLoginUtils;
 import com.matrix.component.tools.WxUtils;
 import com.matrix.component.wechat.externalInterface.protocol.paramProtocol.BrandWCPayRequestData;
@@ -90,7 +89,7 @@
     @Override
     @Transactional(rollbackFor = Exception.class)
     public AjaxResult createGroupBuy(CreateGroupBuyDTO createGroupBuyDTO) throws Exception {
-        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
 
         ShopActivitiesGroupPrice groupPrice = shopActivitiesGroupPriceDao.selectById(createGroupBuyDTO.getGpId());
         ShopActivitiesGroupInfo groupInfo = shopActivitiesGroupInfoDao.selectGroupInfoByActId(groupPrice.getActId());
@@ -102,7 +101,7 @@
 
         // 判断最大开团数量
         if (groupInfo.getGiHeadDiscount() != null && groupInfo.getGiHeadDiscount() != 0) {
-            int createCnt = shopActivitiesGroupJoinDao.selectCreateGroupBuyCount(shopActivities.getId(), bizUser.getOpenId());
+            int createCnt = shopActivitiesGroupJoinDao.selectCreateGroupBuyCount(shopActivities.getId(), sysVipInfo.getOpenId());
             if (createCnt > groupInfo.getGiHeadDiscount()) {
                 return AjaxResult.buildFailInstance("达到最大开团数量");
             }
@@ -113,14 +112,14 @@
                 return AjaxResult.buildFailInstance("达到最大限购数量");
             }
 
-            int count = shopActivitiesGroupJoinUserDao.selectCountHasBuy(groupInfo.getId(), bizUser.getOpenId());
+            int count = shopActivitiesGroupJoinUserDao.selectCountHasBuy(groupInfo.getId(), sysVipInfo.getOpenId());
             if (count + createGroupBuyDTO.getCount() > groupInfo.getGiLimitBuy()) {
                 return AjaxResult.buildFailInstance("达到最大限购数量");
             }
         }
 
         // 判断该用户在这个活动中是否存在拼团,并判断该拼团订单是否已付款
-        ShopActivitiesGroupJoin existGroupJoin = shopActivitiesGroupJoinDao.selectExistGroupingJoinByUser(groupPrice.getActId(), bizUser.getOpenId());
+        ShopActivitiesGroupJoin existGroupJoin = shopActivitiesGroupJoinDao.selectExistGroupingJoinByUser(groupPrice.getActId(), sysVipInfo.getOpenId());
         if (existGroupJoin != null) {
             if (existGroupJoin.getGjStatus() == ShopActivitiesGroupJoin.ACTIVITIES_JOIN_WAIT_PAY) {
                 return new AjaxResult(AjaxResult.STATUS_FAIL, "您该活动有个订单未付款");
@@ -128,7 +127,7 @@
             return new AjaxResult(AjaxResult.STATUS_FAIL, "该活动已存在拼团");
         }
 
-        boolean isOld = isOldUser(bizUser.getPhoneNumber());
+        boolean isOld = isOldUser(sysVipInfo.getPhone());
         // 老用户和老带新的开团都必须是老用户
         if (ShopActivitiesGroupInfo.GROUP_TYPE_ALL_OLD == groupInfo.getGiType() || ShopActivitiesGroupInfo.GROUP_TYPE_OLD_AND_NEW == groupInfo.getGiType()) {
             if (!isOld) {
@@ -145,7 +144,7 @@
 
         createGroupBuyDTO.setPrice(groupPrice.getGpPrice());
         createGroupBuyDTO.setGoodsId(groupInfo.getGoodsId().intValue());
-        createGroupBuyDTO.setOpenId(bizUser.getOpenId());
+        createGroupBuyDTO.setUserId(sysVipInfo.getId());
         ShopOrder shopOrder = createOrderByGroupBuy(createGroupBuyDTO);
 
         ShopActivitiesGroupJoin groupJoin = new ShopActivitiesGroupJoin();
@@ -157,19 +156,19 @@
         groupJoin.setGjEndTime(gjEndTime.getTime());
         groupJoin.setGiId(groupInfo.getId());
         groupJoin.setGjStatus(ShopActivitiesGroupJoin.ACTIVITIES_JOIN_WAIT_PAY);
-        groupJoin.setCreateBy(bizUser.getNickName() == null ? "游客" : bizUser.getNickName());
-        groupJoin.setUpdateBy(bizUser.getNickName() == null ? "游客" : bizUser.getNickName());
-        groupJoin.setGjHeadId(bizUser.getOpenId());
+        groupJoin.setCreateBy(sysVipInfo.getNickName() == null ? "游客" : sysVipInfo.getNickName());
+        groupJoin.setUpdateBy(sysVipInfo.getNickName() == null ? "游客" : sysVipInfo.getNickName());
+        groupJoin.setGjHeadId(sysVipInfo.getId());
         groupJoin.setCompanyId(shopActivities.getCompanyId());
         shopActivitiesGroupJoinDao.insert(groupJoin);
 
         ShopActivitiesGroupJoinUser joinUser = new ShopActivitiesGroupJoinUser();
         joinUser.setGjId(groupJoin.getId());
         joinUser.setGiId(groupInfo.getId());
-        joinUser.setUserId(bizUser.getOpenId());
+        joinUser.setUserId(sysVipInfo.getId());
         joinUser.setIsHead(ShopActivitiesGroupJoinUser.USER_IS_HEAD_Y);
-        joinUser.setCreateBy(bizUser.getNickName() == null ? "游客" : bizUser.getNickName());
-        joinUser.setUpdateBy(bizUser.getNickName() == null ? "游客" : bizUser.getNickName());
+        joinUser.setCreateBy(sysVipInfo.getNickName() == null ? "游客" : sysVipInfo.getNickName());
+        joinUser.setUpdateBy(sysVipInfo.getNickName() == null ? "游客" : sysVipInfo.getNickName());
         joinUser.setIsHasPay(ShopActivitiesGroupJoinUser.IS_HAS_PAY_N);
         joinUser.setIsHasCancel(ShopActivitiesGroupJoinUser.IS_HAS_CANCEL_N);
         Calendar payEndTime = Calendar.getInstance();
@@ -192,7 +191,7 @@
     @Transactional(rollbackFor = Exception.class)
     @Override
     public AjaxResult joinGroupBuy(CreateGroupBuyDTO createGroupBuyDTO) throws Exception {
-        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
 
         // TODO 需判断拼团结束时间以及当前拼团是否已满员
 
@@ -201,7 +200,7 @@
             return AjaxResult.buildFailInstance("该拼团不存在");
         }
 
-        if (groupJoin.getGjHeadId().equals(bizUser.getOpenId())) {
+        if (groupJoin.getGjHeadId().equals(sysVipInfo.getOpenId())) {
             return AjaxResult.buildFailInstance("您是拼团团长,无法加入拼团");
         }
 
@@ -209,7 +208,7 @@
             return AjaxResult.buildFailInstance("该拼团时间已结束");
         }
 
-        ShopActivitiesGroupJoinUser groupJoinUser = shopActivitiesGroupJoinUserDao.selectGroupJoinUserByUserIdAndGjId(bizUser.getOpenId(), groupJoin.getId());
+        ShopActivitiesGroupJoinUser groupJoinUser = shopActivitiesGroupJoinUserDao.selectGroupJoinUserByUserIdAndGjId(sysVipInfo.getOpenId(), groupJoin.getId());
         if (groupJoinUser != null) {
             return AjaxResult.buildFailInstance("您已加入了该拼团");
         }
@@ -227,7 +226,7 @@
                 return AjaxResult.buildFailInstance("达到最大限购数量");
             }
 
-            int count = shopActivitiesGroupJoinUserDao.selectCountHasBuy(groupInfo.getId(), bizUser.getOpenId());
+            int count = shopActivitiesGroupJoinUserDao.selectCountHasBuy(groupInfo.getId(), sysVipInfo.getOpenId());
             if (count + createGroupBuyDTO.getCount() > groupInfo.getGiLimitBuy()) {
                 return AjaxResult.buildFailInstance("达到最大限购数量");
             }
@@ -242,7 +241,7 @@
             return AjaxResult.buildFailInstance("该拼团已满员");
         }
 
-        boolean isOld = isOldUser(bizUser.getPhoneNumber());
+        boolean isOld = isOldUser(sysVipInfo.getPhone());
         // 老用户 -- 加入拼团的都必须是老用户
         if (ShopActivitiesGroupInfo.GROUP_TYPE_ALL_OLD == groupInfo.getGiType()) {
             if (!isOld) {
@@ -271,7 +270,7 @@
 
         createGroupBuyDTO.setPrice(groupPrice.getGpPrice());
         createGroupBuyDTO.setGoodsId(groupInfo.getGoodsId().intValue());
-        createGroupBuyDTO.setOpenId(bizUser.getOpenId());
+        createGroupBuyDTO.setUserId(sysVipInfo.getId());
         ShopOrder shopOrder = createOrderByGroupBuy(createGroupBuyDTO);
 
         ShopActivitiesGroupJoinUser joinUser = new ShopActivitiesGroupJoinUser();
@@ -280,12 +279,12 @@
         Calendar calendar = Calendar.getInstance();
         calendar.set(Calendar.MINUTE, Integer.parseInt(payTimeLimit));
         joinUser.setPayEndTime(calendar.getTime());
-        joinUser.setUserId(bizUser.getOpenId());
+        joinUser.setUserId(sysVipInfo.getId());
         joinUser.setGiId(groupInfo.getId());
         joinUser.setGjId(groupJoin.getId());
         joinUser.setIsHead(ShopActivitiesGroupJoinUser.USER_IS_HEAD_N);
-        joinUser.setCreateBy(bizUser.getNickName() == null ? "游客" : bizUser.getNickName());
-        joinUser.setUpdateBy(bizUser.getNickName() == null ? "游客" : bizUser.getNickName());
+        joinUser.setCreateBy(sysVipInfo.getNickName() == null ? "游客" : sysVipInfo.getNickName());
+        joinUser.setUpdateBy(sysVipInfo.getNickName() == null ? "游客" : sysVipInfo.getNickName());
         joinUser.setIsNewUser(isOld ? 2 : 1);
         joinUser.setIsHasCancel(ShopActivitiesGroupJoinUser.IS_HAS_CANCEL_N);
         joinUser.setCompanyId(groupJoin.getCompanyId());
@@ -317,7 +316,7 @@
         if (shopReceiveAddress == null) {
             throw new GlobleException("请选择正确的收获地址");
         }
-        BizUser user=redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo user=redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         ShopOrder shopOrder = new ShopOrder();
         shopOrder.setCompanyId(user.getCompanyId());
         shopOrder.setStoreId(Integer.parseInt(createGroupBuyDTO.getShopId().toString()));
@@ -360,7 +359,7 @@
         //TODO 更新库存和销量 更新库存和销量[考虑和erp库存联动]
         wxShopOrderUtil.updateProductAndSkuInfo(details);
 
-        shopOrder.setUserId(createGroupBuyDTO.getOpenId());
+        shopOrder.setUserId(createGroupBuyDTO.getUserId());
         shopOrder.setCreateBy("微信小程序生成");
         shopOrder.setUpdateBy("微信小程序生成");
         shopOrder.setCommodityPrice(createGroupBuyDTO.getPrice());
@@ -396,8 +395,8 @@
         DiscountExplain discountExplain = new DiscountExplain();
         discountExplain.setPayPrice(payPrice);
         discountExplain.setPostage(postPrice);
-        discountExplain.setActivity(BigDecimal.ZERO);
-        discountExplain.setCoupon(BigDecimal.ZERO);
+        discountExplain.setActivityPrice(BigDecimal.ZERO);
+        discountExplain.setCouponPrice(BigDecimal.ZERO);
         discountExplain.setBillPrice(payPrice);
         Gson g = new GsonBuilder().create();
         shopOrder.setDiscountExplain(g.toJson(discountExplain));
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopActivitiesSecKillServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopActivitiesSecKillServiceImpl.java
index 1453dca..ab875e9 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopActivitiesSecKillServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopActivitiesSecKillServiceImpl.java
@@ -2,7 +2,7 @@
 
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
-import com.matrix.biz.bean.BizUser;
+import com.matrix.system.hive.bean.SysVipInfo;
 import com.matrix.component.redis.RedisUserLoginUtils;
 import com.matrix.component.tools.WxUtils;
 import com.matrix.component.wechat.externalInterface.protocol.paramProtocol.BrandWCPayRequestData;
@@ -61,7 +61,7 @@
 
     @Override
     public AjaxResult createSecKillOrder(CreateSecKillDTO secKillDTO) throws Exception {
-        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         ShopActivitiesSeckillInfo seckillInfo = shopActivitiesSeckillInfoDao.selectById(secKillDTO.getId());
         if (seckillInfo == null) {
             return AjaxResult.buildFailInstance("秒杀不存在");
@@ -86,7 +86,7 @@
                 return AjaxResult.buildFailInstance("购买数量超过最大限购数量");
             }
 
-            int count = shopActivitiesSeckillRecordDao.selectCountSecKill(seckillInfo.getId(), bizUser.getOpenId());
+            int count = shopActivitiesSeckillRecordDao.selectCountSecKill(seckillInfo.getId(), sysVipInfo.getOpenId());
             if (secKillDTO.getCount() + count > seckillInfo.getSiLimitCnt()) {
                 return AjaxResult.buildFailInstance("购买数量超过最大限购数量");
             }
@@ -94,15 +94,15 @@
 
         secKillDTO.setPrice(seckillInfo.getSiPrice());
         secKillDTO.setGoodsId(seckillInfo.getGoodsId().intValue());
-        secKillDTO.setOpenId(bizUser.getOpenId());
+        secKillDTO.setOpenId(sysVipInfo.getOpenId());
         ShopOrder shopOrder = createOrder(secKillDTO);
 
         ShopActivitiesSeckillRecord seckillRecord = new ShopActivitiesSeckillRecord();
         seckillRecord.setOrderId(shopOrder.getId().longValue());
         seckillRecord.setSiId(seckillInfo.getId());
-        seckillRecord.setUserId(bizUser.getOpenId());
-        seckillRecord.setCreateBy(bizUser.getNickName() == null ? "游客" : bizUser.getNickName());
-        seckillRecord.setUpdateBy(bizUser.getNickName() == null ? "游客" : bizUser.getNickName());
+        seckillRecord.setUserId(sysVipInfo.getId());
+        seckillRecord.setCreateBy(sysVipInfo.getNickName() == null ? "游客" : sysVipInfo.getNickName());
+        seckillRecord.setUpdateBy(sysVipInfo.getNickName() == null ? "游客" : sysVipInfo.getNickName());
         seckillRecord.setCompanyId(seckillInfo.getCompanyId());
 
         // 同步锁
@@ -126,7 +126,7 @@
     }
 
     private ShopOrder createOrder(CreateSecKillDTO secKillDTO) {
-        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         ShopReceiveAddress shopReceiveAddress = shopReceiveAddressDao.selectById(secKillDTO.getAddressId());
         if (shopReceiveAddress == null) {
             throw new GlobleException("请选择正确的收获地址");
@@ -173,12 +173,12 @@
         //TODO 更新库存和销量 更新库存和销量[考虑和erp库存联动]
         wxShopOrderUtil.updateProductAndSkuInfo(details);
 
-        shopOrder.setUserId(secKillDTO.getOpenId());
+        shopOrder.setUserId(secKillDTO.getId());
         shopOrder.setCreateBy("微信小程序生成");
         shopOrder.setUpdateBy("微信小程序生成");
         shopOrder.setCommodityPrice(secKillDTO.getPrice());
         shopOrder.setPurchaseQuantity(1);
-        shopOrder.setCompanyId(bizUser.getCompanyId());
+        shopOrder.setCompanyId(sysVipInfo.getCompanyId());
         //购买方式
         shopOrder.setShippingMethod(secKillDTO.getShippingMethod());
         //生成订单号
@@ -203,15 +203,15 @@
         shopOrder.setPayResult(ShopOrder.ORDER_WX_STATUS_WAIT_PAY);
         //如果没有提交购买方式或配送方式不是物流
         //获取邮费
-        BigDecimal postPrice = wxShopOrderService.calculationPostage(secKillDTO.getPrice(),bizUser.getCompanyId());
+        BigDecimal postPrice = wxShopOrderService.calculationPostage(secKillDTO.getPrice(),sysVipInfo.getCompanyId());
         shopOrder.setPostage(postPrice);
         BigDecimal payPrice = secKillDTO.getPrice().multiply(BigDecimal.valueOf(secKillDTO.getCount())).add(shopOrder.getPostage());
         shopOrder.setOrderMoney(payPrice);
         DiscountExplain discountExplain = new DiscountExplain();
         discountExplain.setPayPrice(payPrice);
         discountExplain.setPostage(postPrice);
-        discountExplain.setActivity(BigDecimal.ZERO);
-        discountExplain.setCoupon(BigDecimal.ZERO);
+        discountExplain.setActivityPrice(BigDecimal.ZERO);
+        discountExplain.setCouponPrice(BigDecimal.ZERO);
         discountExplain.setBillPrice(payPrice);
         Gson g = new GsonBuilder().create();
         shopOrder.setDiscountExplain(g.toJson(discountExplain));
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopCouponServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopCouponServiceImpl.java
index bf87285..d2840d3 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopCouponServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopCouponServiceImpl.java
@@ -1,20 +1,20 @@
 package com.matrix.system.shopXcx.api.service.impl;
 
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.component.redis.RedisUserLoginUtils;
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.core.pojo.PaginationVO;
 import com.matrix.core.tools.LogUtil;
 import com.matrix.core.tools.StringUtils;
-import com.matrix.biz.bean.BizUser;
-import com.matrix.component.redis.RedisUserLoginUtils;
 import com.matrix.system.common.constance.AppConstance;
-
-import com.matrix.system.shopXcx.bean.*;
-import com.matrix.system.shopXcx.dao.*;
+import com.matrix.system.shopXcx.api.pojo.OrderCouponGroup;
+import com.matrix.system.shopXcx.api.pojo.OrderItemDto;
 import com.matrix.system.shopXcx.api.service.WxShopCouponService;
 import com.matrix.system.shopXcx.api.tools.WxShopCouponUtil;
 import com.matrix.system.shopXcx.api.tools.WxShopOrderUtil;
 import com.matrix.system.shopXcx.api.vo.CouponReceiveInfoVO;
-import com.matrix.system.shopXcx.api.vo.ShopCartVo;
+import com.matrix.system.shopXcx.bean.*;
+import com.matrix.system.shopXcx.dao.*;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -54,15 +54,16 @@
      *
      * @return
      */
-    public List<CouponReceiveInfoVO> getCartVoCouponList(Long companyId,List<ShopShoppingCart> shopShoppingCarts) {
+    public List<CouponReceiveInfoVO> getCartVoCouponList(Long companyId,List<OrderItemDto> OrderItemDtos){
 
-        //可用优惠券列表
+
+    //可用优惠券列表
         List<CouponReceiveInfoVO> shopCoupons = new ArrayList<>();
 
 
-        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         //1.找到用户所有的优惠券
-        List<CouponReceiveInfoVO> userAllCoupon = shopCouponRecordDao.selectMyCouponByStatus(companyId, bizUser.getOpenId(), AppConstance.MY_COUPON_NOT_USE,
+        List<CouponReceiveInfoVO> userAllCoupon = shopCouponRecordDao.selectMyCouponByStatus(companyId, sysVipInfo.getId(), AppConstance.MY_COUPON_NOT_USE,
                 null);
         if (CollectionUtils.isNotEmpty(userAllCoupon)) {
             //根据优惠力度排序,优惠力度大的先参与计算
@@ -77,7 +78,7 @@
 
 
             //定义购物车优惠分组
-            List<ShopCartVo> cartList = new ArrayList<>();
+            List<OrderCouponGroup> cartList = new ArrayList<>();
 
             // 记录所有优惠券,一个优惠券(活动)表示一组
             Map<Integer, ShopCoupon> shopCouponMap = new HashMap<>();
@@ -86,24 +87,24 @@
             for (int i = 0; i < userAllCoupon.size(); i++) {
 
                 CouponReceiveInfoVO couponReceiveInfoVO = userAllCoupon.get(i);
-                ShopCartVo shopCarVo = new ShopCartVo();
+                OrderCouponGroup shopCarVo = new OrderCouponGroup();
                 shopCarVo.setCouponReceiveInfoVO(couponReceiveInfoVO);
-                shopCarVo.setCartList(new ArrayList<>());
+                shopCarVo.setOrderItemDtos(new ArrayList<>());
                 cartList.add(i, shopCarVo);
 
 
-                for (ShopShoppingCart shoppingCart : shopShoppingCarts) {
+                for (OrderItemDto orderItemDto : OrderItemDtos) {
 
                     // 如果匹配到的产品已经出现在其他优惠组中,则需要判断是否移除之前的组
                     boolean needRemove = false;
 
 
                     //找到产品所有的优惠券
-                    List<ShopCoupon> productShopCoupons = getCouponListByProductId(shoppingCart.getCartProductId());
+                    List<ShopCoupon> productShopCoupons = getCouponListByProductId(orderItemDto.getProductId());
                     for (ShopCoupon productShopCoupon : productShopCoupons) {
                         if (couponReceiveInfoVO.getCouponId().equals(productShopCoupon.getId())) {
-                            LogUtil.debug("购物车" + shoppingCart.getName() + "和优惠券" + couponReceiveInfoVO.getcName() + "匹配");
-                            shopCarVo.getCartList().add(shoppingCart);
+                            LogUtil.debug("购物车" + orderItemDto.getProductId() + "和优惠券" + couponReceiveInfoVO.getcName() + "匹配");
+                            shopCarVo.getOrderItemDtos().add(orderItemDto);
                             break;
                         }
                     }
@@ -113,9 +114,9 @@
             }
 
             //3.计算各组的金额是否满足,把满足的优惠券全部返回
-            for (ShopCartVo shopCartVo : cartList) {
-                if (shopCartVo.isSatisfactionCoupon() && CollectionUtils.isNotEmpty(shopCartVo.getCartList())) {
-                    shopCoupons.add(shopCartVo.getCouponReceiveInfoVO());
+            for (OrderCouponGroup orderCouponGroup : cartList) {
+                if (orderCouponGroup.isSatisfactionCoupon() && CollectionUtils.isNotEmpty(orderCouponGroup.getOrderItemDtos())) {
+                    shopCoupons.add(orderCouponGroup.getCouponReceiveInfoVO());
                 }
             }
         }
@@ -125,19 +126,19 @@
 
 
 
-    private void countPrice(ShopCartVo shopCartVo) {
-        List<ShopShoppingCart> cartList = shopCartVo.getCartList();
+    private void countPrice(OrderCouponGroup orderCouponGroup) {
+        List<OrderItemDto> orderItemDtoList = orderCouponGroup.getOrderItemDtos();
         // 计算总价
         BigDecimal sum = BigDecimal.ZERO;
-        for (ShopShoppingCart shopShoppingCart : cartList) {
-            sum = sum.add(shopShoppingCart.getPrice().multiply(BigDecimal.valueOf(shopShoppingCart.getCartNumber())));
+        for (OrderItemDto orderItemDto : orderItemDtoList) {
+            sum = sum.add(orderItemDto.getShopSku().getPrice().multiply(BigDecimal.valueOf(orderItemDto.getCount())));
         }
         // 存在优惠券
-        if (sum.compareTo(shopCartVo.getCouponReceiveInfoVO().getMinAmount()) >= 0) {
+        if (sum.compareTo(orderCouponGroup.getCouponReceiveInfoVO().getMinAmount()) >= 0) {
             //标记为合理分组
-            shopCartVo.setSatisfactionCoupon(true);
+            orderCouponGroup.setSatisfactionCoupon(true);
         } else {
-            shopCartVo.setSatisfactionCoupon(false);
+            orderCouponGroup.setSatisfactionCoupon(false);
         }
     }
 
@@ -149,14 +150,14 @@
      */
     @Override
     public AjaxResult getUsableCoupon(PaginationVO pageVo) {
-        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
-        boolean newPeople = wxShopCouponUtil.verifyIsNewPeople(bizUser.getOpenId());
-        List<ShopCoupon> list = shopCouponDao.selectUsableCoupon(newPeople, bizUser.getOpenId(), pageVo);
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        boolean newPeople = wxShopCouponUtil.verifyIsNewPeople(sysVipInfo.getId());
+        List<ShopCoupon> list = shopCouponDao.selectUsableCoupon(newPeople, sysVipInfo.getOpenId(), pageVo);
         return new AjaxResult(AjaxResult.STATUS_SUCCESS, list);
     }
 
     /**
-     * 领取优惠券
+     *
      *
      * @param couponId
      * @return
@@ -165,7 +166,7 @@
     @Override
     public AjaxResult receiveCoupon(Integer couponId) {
         ShopCoupon shopCoupon = shopCouponDao.selectById(couponId);
-        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
 
         // 如果没有找到该优惠券
         if (shopCoupon == null) {
@@ -177,7 +178,7 @@
             return new AjaxResult(AjaxResult.STATUS_FAIL, "优惠券已领完!");
         }
 
-        boolean newPeople = wxShopCouponUtil.verifyIsNewPeople(bizUser.getOpenId());
+        boolean newPeople = wxShopCouponUtil.verifyIsNewPeople(sysVipInfo.getId());
 
         // 如果改券是新人专属且当前用户不是新人
         if (AppConstance.COUPON_GET_LIMT_NEW.equals(shopCoupon.getGetLimit()) && !newPeople) {
@@ -185,7 +186,7 @@
         }
 
         ShopCouponRecord param = new ShopCouponRecord();
-        param.setUserId(bizUser.getOpenId());
+        param.setUserId(sysVipInfo.getId());
         param.setCId(couponId);
         List<ShopCouponRecord> recordList = shopCouponRecordDao.selectByModel(param);
         // 如果已经领取改优惠券
@@ -196,7 +197,7 @@
         insertRecord.setCreateBy(AppConstance.SYSTEM_USER);
         insertRecord.setUpdateBy(AppConstance.SYSTEM_USER);
         insertRecord.setCId(couponId);
-        insertRecord.setUserId(bizUser.getOpenId());
+        insertRecord.setUserId(sysVipInfo.getId());
         insertRecord.setIsUsing(2);
         int i = shopCouponRecordDao.insert(insertRecord);
         // 如果插入领取记录表失败
@@ -218,14 +219,14 @@
      */
     @Override
     public AjaxResult getMyCouponInfoByStatus(Long companyId, Integer status, PaginationVO pageVo) {
-        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         // 如果查询使用或未使用状态的优惠券列表
         if (AppConstance.MY_COUPON_USE.equals(status) || AppConstance.MY_COUPON_NOT_USE.equals(status)) {
-            List<CouponReceiveInfoVO> list = shopCouponRecordDao.selectMyCouponByStatus(companyId,bizUser.getOpenId(), status,
+            List<CouponReceiveInfoVO> list = shopCouponRecordDao.selectMyCouponByStatus(companyId,sysVipInfo.getId(), status,
                     pageVo);
             return new AjaxResult(AjaxResult.STATUS_SUCCESS, list);
         }
-        List<CouponReceiveInfoVO> list = shopCouponRecordDao.selectMyPastCoupon(companyId,bizUser.getOpenId(), pageVo);
+        List<CouponReceiveInfoVO> list = shopCouponRecordDao.selectMyPastCoupon(companyId,sysVipInfo.getId(), pageVo);
         return new AjaxResult(AjaxResult.STATUS_SUCCESS, list);
     }
 
@@ -255,8 +256,8 @@
                 attrIds.addAll(ids);
             }
         }
-        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
-        List<ShopCoupon> list = shopCouponDao.selectUsableCouponByProductInfo(bizUser.getOpenId(), productId,
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        List<ShopCoupon> list = shopCouponDao.selectUsableCouponByProductInfo(sysVipInfo.getOpenId(), productId,
                 attrIds);
         return list;
     }
@@ -299,14 +300,13 @@
      * 通过优惠券标签获取优惠券列表
      *
      * @param tag 标签名称
-     * @param shopId
      * @return
      */
     @Override
     public AjaxResult getCouponListByTag(String tag, Long companyId) {
-        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
-        boolean newPeople = wxShopCouponUtil.verifyIsNewPeople(bizUser.getOpenId());
-        List<ShopCoupon> couponList = shopCouponDao.selectCouponListByTag(newPeople, bizUser.getOpenId(), tag,companyId);
+        SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
+        boolean newPeople = wxShopCouponUtil.verifyIsNewPeople(sysVipInfo.getId());
+        List<ShopCoupon> couponList = shopCouponDao.selectCouponListByTag(newPeople, sysVipInfo.getOpenId(), tag,companyId);
         AjaxResult res = new AjaxResult(AjaxResult.STATUS_SUCCESS, couponList);
         res.putInMap("isNewPeople", newPeople);
         return res;
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopLogisticsQueryServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopLogisticsQueryServiceImpl.java
index 92cf088..d5fc4b5 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopLogisticsQueryServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopLogisticsQueryServiceImpl.java
@@ -79,76 +79,72 @@
         List<ShopLogisticsInfo> shopLogisticsList = new ArrayList<ShopLogisticsInfo>();
         AjaxResult result = new AjaxResult();
         Map<String, String> logisticsInfo = new HashMap<String, String>();
-        try {
-            if (shopDeliveryInfo == null) {
-                return new AjaxResult(AjaxResult.STATUS_FAIL, "找不到发货信息");
-            }
-            if (!StringUtils.isNotBlank(shopDeliveryInfo.getWaybillNo()) || !StringUtils.isNotBlank(shopDeliveryInfo.getLogisticsCompanyCode())) {
-                return new AjaxResult(AjaxResult.STATUS_FAIL, "物流公司信息为空");
-            }
-            logisticsInfo.put("logisticsCompany", shopDeliveryInfo.getLogisticsCompany());
-            logisticsInfo.put("waybillNo", shopDeliveryInfo.getWaybillNo());
 
-            //如果已经签收直接查数据库
-            if (AppConstance.LOGISTICS_STATUS_OF_SIGN_FOR.equals(shopDeliveryInfo.getLogisticsStatus())) {
-
-                List<ShopLogisticsInfo> shopLogisticsInfos = shopLogisticsInfoDao.selectByDelieryId(shopDeliveryInfo.getId());
-                logisticsInfo.put("logisticsStatus", String.valueOf(AppConstance.LOGISTICS_STATUS_OF_SIGN_FOR));
-                result.setStatus(AjaxResult.STATUS_SUCCESS);
-                result.setRows(shopLogisticsInfos);
-                result.putInMap("logisticsInfo", logisticsInfo);
-                return result;
-            }
-            Map<String, String> param = new HashMap<String, String>();
-            param.put("ShipperCode", shopDeliveryInfo.getLogisticsCompanyCode());
-            param.put("LogisticCode", shopDeliveryInfo.getWaybillNo());
-            Map<String, String> paramsUrl = getparams(param);
-            LogUtil.info("物流查询参数" + paramsUrl);
-            String logisticsResult = HttpCurlUtil.sendPost(logisticsUrl, paramsUrl);
-            LogUtil.info("查询物流返回信息" + logisticsResult);
-            LogisticsInfoVo logisticsInfoVo = JSON.parseObject(logisticsResult, LogisticsInfoVo.class);
-            if (logisticsInfoVo.isSuccess()) {
-                ShopDeliveryInfo shopDelivery = new ShopDeliveryInfo();
-                shopDelivery.setLogisticsStatus(Integer.valueOf(logisticsInfoVo.getState()));
-                shopDelivery.setId(shopDeliveryInfo.getId());
-                logisticsInfo.put("logisticsStatus", logisticsInfoVo.getState());
-                //更新物流状态
-                shopDeliveryInfoDao.updateByModel(shopDelivery);
-                if (CollectionUtils.isNotEmpty(logisticsInfoVo.getTraces())) {
-                    List<Map<String, String>> mapTraces = logisticsInfoVo.getTraces();
-                    for (int i = 0; i < mapTraces.size(); i++) {
-                        ShopLogisticsInfo shopLogisticsInfo = new ShopLogisticsInfo();
-                        shopLogisticsInfo.setCreateBy(AppConstance.SYSTEM_USER);
-                        shopLogisticsInfo.setUpdateBy(AppConstance.SYSTEM_USER);
-                        shopLogisticsInfo.setLogisticsTime(mapTraces.get(i).get("AcceptTime"));
-                        String acceptStation = mapTraces.get(i).get("AcceptStation");
-                        shopLogisticsInfo.setDescribe(acceptStation);
-                        shopLogisticsInfo.setDelieryId(shopDeliveryInfo.getId());
-                        if (acceptStation.indexOf(AppConstance.KDN_IS_SIGN) != -1) {
-                            shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_SIGN_FOR);
-                        } else if (acceptStation.indexOf(AppConstance.KDN_IS_RECEIVE) != -1) {
-                            shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_RECEIVE);
-                        } else if (acceptStation.indexOf(AppConstance.KDN_IS_ON_WAY) != -1) {
-                            shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_ON_WAY);
-                        } else if (acceptStation.indexOf(AppConstance.KDN_IS_MISTAKE) != -1) {
-                            shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_MISTAKE);
-                        } else {
-                            shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_NONE);
-                        }
-                        shopLogisticsList.add(shopLogisticsInfo);
-                    }
-                    shopLogisticsInfoDao.deleteByDelieryId(shopDeliveryInfo.getId());
-                    if (CollectionUtils.isNotEmpty(shopLogisticsList)) {
-                        shopLogisticsInfoDao.batchInsert(shopLogisticsList);
-                    }
-                }
-            } else {
-                throw new GlobleException(logisticsInfoVo.getReason());
-            }
-
-        } catch (Exception e) {
-            throw new GlobleException("物流信息查询失败");
+        if (shopDeliveryInfo == null) {
+            return new AjaxResult(AjaxResult.STATUS_FAIL, "找不到发货信息");
         }
+        if (!StringUtils.isNotBlank(shopDeliveryInfo.getWaybillNo()) || !StringUtils.isNotBlank(shopDeliveryInfo.getLogisticsCompanyCode())) {
+            return new AjaxResult(AjaxResult.STATUS_FAIL, "物流公司信息为空");
+        }
+        logisticsInfo.put("logisticsCompany", shopDeliveryInfo.getLogisticsCompany());
+        logisticsInfo.put("waybillNo", shopDeliveryInfo.getWaybillNo());
+
+        //如果已经签收直接查数据库
+        if (AppConstance.LOGISTICS_STATUS_OF_SIGN_FOR.equals(shopDeliveryInfo.getLogisticsStatus())) {
+
+            List<ShopLogisticsInfo> shopLogisticsInfos = shopLogisticsInfoDao.selectByDelieryId(shopDeliveryInfo.getId());
+            logisticsInfo.put("logisticsStatus", String.valueOf(AppConstance.LOGISTICS_STATUS_OF_SIGN_FOR));
+            result.setStatus(AjaxResult.STATUS_SUCCESS);
+            result.setRows(shopLogisticsInfos);
+            result.putInMap("logisticsInfo", logisticsInfo);
+            return result;
+        }
+        Map<String, String> param = new HashMap<String, String>();
+        param.put("ShipperCode", shopDeliveryInfo.getLogisticsCompanyCode());
+        param.put("LogisticCode", shopDeliveryInfo.getWaybillNo());
+        Map<String, String> paramsUrl = getparams(param);
+        LogUtil.info("物流查询参数" + paramsUrl);
+        String logisticsResult = HttpCurlUtil.sendPost(logisticsUrl, paramsUrl);
+        LogUtil.info("查询物流返回信息" + logisticsResult);
+        LogisticsInfoVo logisticsInfoVo = JSON.parseObject(logisticsResult, LogisticsInfoVo.class);
+        if (logisticsInfoVo.isSuccess()) {
+            ShopDeliveryInfo shopDelivery = new ShopDeliveryInfo();
+            shopDelivery.setLogisticsStatus(Integer.valueOf(logisticsInfoVo.getState()));
+            shopDelivery.setId(shopDeliveryInfo.getId());
+            logisticsInfo.put("logisticsStatus", logisticsInfoVo.getState());
+            //更新物流状态
+            shopDeliveryInfoDao.updateByModel(shopDelivery);
+            if (CollectionUtils.isNotEmpty(logisticsInfoVo.getTraces())) {
+                List<Map<String, String>> mapTraces = logisticsInfoVo.getTraces();
+                for (int i = 0; i < mapTraces.size(); i++) {
+                    ShopLogisticsInfo shopLogisticsInfo = new ShopLogisticsInfo();
+                    shopLogisticsInfo.setCreateBy(AppConstance.SYSTEM_USER);
+                    shopLogisticsInfo.setUpdateBy(AppConstance.SYSTEM_USER);
+                    shopLogisticsInfo.setLogisticsTime(mapTraces.get(i).get("AcceptTime"));
+                    String acceptStation = mapTraces.get(i).get("AcceptStation");
+                    shopLogisticsInfo.setDescribe(acceptStation);
+                    shopLogisticsInfo.setDelieryId(shopDeliveryInfo.getId());
+                    if (acceptStation.indexOf(AppConstance.KDN_IS_SIGN) != -1) {
+                        shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_SIGN_FOR);
+                    } else if (acceptStation.indexOf(AppConstance.KDN_IS_RECEIVE) != -1) {
+                        shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_RECEIVE);
+                    } else if (acceptStation.indexOf(AppConstance.KDN_IS_ON_WAY) != -1) {
+                        shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_ON_WAY);
+                    } else if (acceptStation.indexOf(AppConstance.KDN_IS_MISTAKE) != -1) {
+                        shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_MISTAKE);
+                    } else {
+                        shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_NONE);
+                    }
+                    shopLogisticsList.add(shopLogisticsInfo);
+                }
+                shopLogisticsInfoDao.deleteByDelieryId(shopDeliveryInfo.getId());
+                if (CollectionUtils.isNotEmpty(shopLogisticsList)) {
+                    shopLogisticsInfoDao.batchInsert(shopLogisticsList);
+                }
+            }
+        }
+
+
         List<ShopLogisticsInfo> shopLogisticsInfos = shopLogisticsInfoDao.selectByDelieryId(shopDeliveryInfo.getId());
         result.setStatus(AjaxResult.STATUS_SUCCESS);
         result.setRows(shopLogisticsInfos);
@@ -187,14 +183,18 @@
      * @param map
      * @return
      */
-    private Map<String, String> getparams(Map<String, String> map) throws Exception {
+    private Map<String, String> getparams(Map<String, String> map)  {
         String params = JSON.toJSONString(map);
         Map<String, String> paramsUrl = new HashMap<String, String>();
-        paramsUrl.put("RequestData", URLEncoder.encode(params, "UTF-8"));
+        try {
+            paramsUrl.put("RequestData", URLEncoder.encode(params, "UTF-8"));
+            String dataSign = encrypt(params, appKey, "UTF-8");
+            paramsUrl.put("DataSign", URLEncoder.encode(dataSign, "UTF-8"));
+        } catch (Exception e) {
+           throw new GlobleException(e.getMessage());
+        }
         paramsUrl.put("EBusinessID", eBusinessID);
         paramsUrl.put("RequestType", requestType);
-        String dataSign = encrypt(params, appKey, "UTF-8");
-        paramsUrl.put("DataSign", URLEncoder.encode(dataSign, "UTF-8"));
         paramsUrl.put("DataType", AppConstance.DATATYPE);
         return paramsUrl;
     }
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopRefundRecordServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopRefundRecordServiceImpl.java
index 6030d3e..984fefa 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopRefundRecordServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopRefundRecordServiceImpl.java
@@ -1,20 +1,22 @@
 package com.matrix.system.shopXcx.api.service.impl;
 
-import com.matrix.component.wechat.externalInterface.common.WechatConfigure;
+import com.matrix.component.rabbitmq.RabiitMqTemplate;
+import com.matrix.component.tools.WxTempLateMsgUtil;
+import com.matrix.component.wechat.externalInterface.weixinUtil.WeixinServiceUtil;
 import com.matrix.core.exception.GlobleException;
 import com.matrix.core.tools.DateUtil;
 import com.matrix.core.tools.LogUtil;
 import com.matrix.system.common.constance.AppConstance;
-import com.matrix.component.wechat.externalInterface.weixinUtil.WeixinServiceUtil;
-import com.matrix.system.shopXcx.bean.*;
-import com.matrix.system.shopXcx.dao.*;
-import com.matrix.component.tools.WxTempLateMsgUtil;
 import com.matrix.system.shopXcx.api.service.WXShopOrderService;
 import com.matrix.system.shopXcx.api.service.WxShopRefundRecordService;
+import com.matrix.system.shopXcx.bean.*;
+import com.matrix.system.shopXcx.dao.*;
+import com.matrix.system.shopXcx.mqTask.MQTaskRouting;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
 import java.util.ArrayList;
@@ -49,7 +51,15 @@
 
     @Value("${wx_pay_debug_onoff}")
     private boolean isDebug;
+    @Value("${evn}")
+    private  String evn;
+
+    @Autowired
+    private RabiitMqTemplate rabiitMqTemplate;
+
+
     @Override
+    @Transactional
     public Boolean refundToUser(String id, ShopRefundRecord shopRefundRecord) {
         LogUtil.debug("进入退款接口进行退款。。。", id);
         Boolean flag = false;
@@ -101,7 +111,7 @@
                 //退款成功后同时把优惠券退回到用户的账号中
                 if (shopOrder.getDiscountAmount() != null && shopOrder.getDiscountAmount().compareTo(BigDecimal.ZERO) >0) {
                     ShopCouponRecord shopCouponRecord = new ShopCouponRecord();
-                    String userIds = shopRefundRecord.getUserId();
+                    Long userIds = shopRefundRecord.getUserId();
                     shopCouponRecord.setUserId(userIds);
                     shopCouponRecord.setOrderId(shopOrder.getId());
                     List<ShopCouponRecord> recordList = shopCouponRecordDao.selectByModel(shopCouponRecord);
@@ -134,6 +144,10 @@
                 modifyMap.put("orderStatus", ShopOrder.ORDER_STATUS_MONEYBACK_SUCCESS);
                 modifyMap.put("refundCharge", shopRefundRecord.getRefundMoney());
                 shopOrderDao.updateByMap(modifyMap);
+
+                rabiitMqTemplate.sendMsg(MQTaskRouting.SHOP_ORDER_REFUND+evn,shopRefundRecord.getOrderId()+"");
+
+
             }catch (Exception e){
                 LogUtil.debug("退款成功,修改退款表和订单表状态出错。。。", id);
                 e.printStackTrace();
@@ -142,34 +156,7 @@
         return flag;
     }
 
-    /**
-     * 退款成功后发送微信提醒
-     * @param shopRefundRecord
-     * @return
-     */
-    @Override
-    public int sendRefundInfoToUser(ShopRefundRecord shopRefundRecord) {
-        ShopOrder order = shopOrderDao.selectById(shopRefundRecord.getOrderId());
-        if (order == null) {
-            throw new GlobleException("没有找到需要退款的订单信息");
-        }
-        List<String> msg = new ArrayList<>();
-        //退款说明
-        String refundExplain = "退款已经原路返回,具体到账时间可能会有1-3天延迟";
-        msg.add(order.getOrderNo());
-        msg.add(DateUtil.dateToString(shopRefundRecord.getRefundTime(),DateUtil.DATE_FORMAT_SS));
-        msg.add(refundExplain);
-        String formId = null;
-        if(AppConstance.REFUND_GOODS.equals(shopRefundRecord.getRefundType()) && null != shopRefundRecord.getRefundTransactionNo()){
-            formId = shopRefundRecord.getRefundTransactionNo();
-        }else {
-            formId = order.getWxOrderNo().split("=")[1];
-        }
-        String page = "pages/refunDetail/refunDetail?id=" + shopRefundRecord.getId() + "&&status=1" + "&&inform=1";
-        int res = WxTempLateMsgUtil.sendWxTemplateMsg(msg, order.getUserId(),
-                page, WxTempLateMsgUtil.REFUND_SUCCESS, formId);
-        return res;
-    }
+
 
     @Override
     public void updateGroupBuyStatus(Long orderId) {
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/tools/WxShopCouponUtil.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/tools/WxShopCouponUtil.java
index 99cacaa..e7fc64a 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/tools/WxShopCouponUtil.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/tools/WxShopCouponUtil.java
@@ -1,13 +1,11 @@
 package com.matrix.system.shopXcx.api.tools;
 
 import com.matrix.component.redis.RedisUserLoginUtils;
-import com.matrix.system.common.constance.AppConstance;
-
+import com.matrix.system.shopXcx.api.service.WxShopMemberDayService;
 import com.matrix.system.shopXcx.bean.ShopOrder;
 import com.matrix.system.shopXcx.dao.ShopCouponRecordDao;
 import com.matrix.system.shopXcx.dao.ShopOrderDao;
 import com.matrix.system.shopXcx.dao.ShopSkuDao;
-import com.matrix.system.shopXcx.api.service.WxShopMemberDayService;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -39,7 +37,7 @@
      * @param userId 用户ID
      * @return true = 新人
      */
-    public boolean verifyIsNewPeople(String userId) {
+    public boolean verifyIsNewPeople(Long userId) {
         ShopOrder orderParam = new ShopOrder();
         orderParam.setPayResult(ShopOrder.ORDER_WX_STATUS_PAY_SUCCESS);
         orderParam.setUserId(userId);
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/tools/WxShopOrderUtil.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/tools/WxShopOrderUtil.java
index 7c9a66b..1916ac4 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/tools/WxShopOrderUtil.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/tools/WxShopOrderUtil.java
@@ -1,16 +1,14 @@
 package com.matrix.system.shopXcx.api.tools;
 
-import com.matrix.system.common.bean.CustomerDataDictionary;
-import com.matrix.system.common.dao.CustomerDataDictionaryDao;
-import com.matrix.biz.service.BizUserService;
-import com.matrix.component.tools.WxTempLateMsgUtil;
 import com.matrix.core.exception.GlobleException;
 import com.matrix.core.tools.LogUtil;
 import com.matrix.core.tools.StringUtils;
+import com.matrix.system.common.bean.CustomerDataDictionary;
 import com.matrix.system.common.constance.AppConstance;
-import com.matrix.system.shopXcx.api.pojo.AddShopOrderPOJO;
+import com.matrix.system.hive.service.SysVipInfoService;
+import com.matrix.system.shopXcx.api.pojo.OrderItemDto;
 import com.matrix.system.shopXcx.api.pojo.OrderPostageInfoPOJO;
-import com.matrix.system.shopXcx.api.pojo.OrderProductSkuPOJO;
+import com.matrix.system.shopXcx.api.pojo.ShopOrderDto;
 import com.matrix.system.shopXcx.api.service.WxShopMemberDayService;
 import com.matrix.system.shopXcx.bean.*;
 import com.matrix.system.shopXcx.dao.*;
@@ -21,7 +19,10 @@
 
 import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @author jyy
@@ -46,9 +47,7 @@
     @Autowired
     private WxShopMemberDayService wxShopMemberDayService;
     @Autowired
-    private BizUserService bizUserService;
-    @Autowired
-    private ShopScoreRecordDao shopScoreRecordDao;
+    private SysVipInfoService sysVipInfoService;
 
 
     private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日");
@@ -95,12 +94,12 @@
 
     /**
      * 处理产品规格信息
-     * @param addShopOrderPOJO
+     * @param shopOrderDto
      */
-    public List<ShopOrderDetails> processProductSkuInfo(ShopOrder shopOrder, AddShopOrderPOJO addShopOrderPOJO,
+    public List<ShopOrderDetails> processProductSkuInfo(ShopOrder shopOrder, ShopOrderDto shopOrderDto,
                                                         ShopCoupon shopCoupon) {
         List<ShopOrderDetails> resList = new ArrayList<>();
-        List<OrderProductSkuPOJO> skuList = addShopOrderPOJO.getSkuList();
+        List<OrderItemDto> skuList = shopOrderDto.getOrderItemList();
         if (CollectionUtils.isEmpty(skuList)) {
             return resList;
         }
@@ -108,9 +107,9 @@
         //设置购买数量
         int total = 0;
         BigDecimal commodityMoney = new BigDecimal("0");
-        for (OrderProductSkuPOJO orderProductSkuPOJO : skuList) {
-            ids.add(orderProductSkuPOJO.getSkuId());
-            total += orderProductSkuPOJO.getCount();
+        for (OrderItemDto orderItemDto : skuList) {
+            ids.add(orderItemDto.getSkuId());
+            total += orderItemDto.getCount();
         }
         shopOrder.setPurchaseQuantity(total);
         List<ShopSku> contrastList = shopSkuDao.selectByIds(ids);
@@ -131,10 +130,10 @@
 
         BigDecimal couponTotalMoney = new BigDecimal("0");
         Double discountRate = wxShopMemberDayService.getMemberDay();
-        for (OrderProductSkuPOJO orderProductSkuPOJO : skuList) {
+        for (OrderItemDto orderItemDto : skuList) {
             boolean isExist = false;
             for (ShopSku shopSku : contrastList) {
-                if (shopSku.getId().equals(orderProductSkuPOJO.getSkuId())) {
+                if (shopSku.getId().equals(orderItemDto.getSkuId())) {
                     isExist = true;
                     ShopOrderDetails shopOrderDetails = new ShopOrderDetails();
                     shopOrderDetails.setCreateBy(AppConstance.SYSTEM_USER);
@@ -142,9 +141,9 @@
                     shopOrderDetails.setpId(shopSku.getPId());
                     shopOrderDetails.setsId(shopSku.getId());
                     shopOrderDetails.setPrice(shopSku.getPrice());
-                    shopOrderDetails.setCount(orderProductSkuPOJO.getCount());
+                    shopOrderDetails.setCount(orderItemDto.getCount());
                     BigDecimal price = new BigDecimal(shopSku.getPrice().toString());
-                    BigDecimal count = new BigDecimal(orderProductSkuPOJO.getCount().toString());
+                    BigDecimal count = new BigDecimal(orderItemDto.getCount().toString());
                     shopOrderDetails.setsTitle(shopSku.getName());
                     resList.add(shopOrderDetails);
 
@@ -226,6 +225,7 @@
         shopDeliveryInfo.setUserId(shopOrder.getUserId());
         shopDeliveryInfo.setDeliveryWay(shippingMethod);
         shopDeliveryInfo.setShopId(shopOrder.getStoreId().longValue());
+        shopDeliveryInfo.setCompanyId(shopOrder.getCompanyId());
         StringBuffer receiveAddrStr = new StringBuffer();
         if (receiveAddress != null) {
             receiveAddrStr.append(receiveAddress.getAddrProvince());
@@ -349,53 +349,13 @@
     }
 
     /**
-     * 发货后给客户发送微信提醒
-     * @param deliveryInfo
-     * @return
-     */
-    public int deliverSuccessSendWxMsgToUser(ShopDeliveryInfo deliveryInfo) {
-        ShopOrder order = shopOrderDao.selectById(deliveryInfo.getOrderId());
-        if (order == null) {
-            throw new GlobleException("没有找到需要发货的订单信息");
-        }
-        List<String> msg = new ArrayList<>();
-        msg.add(order.getOrderNo());
-        //设置商品名称
-        msg.add(getProductNames(order.getUserId(), order.getId()));
-        msg.add(deliveryInfo.getReceiveAddress());
-        msg.add(deliveryInfo.getLogisticsCompany());
-        msg.add(deliveryInfo.getWaybillNo());
-        String formId = order.getWxOrderNo().split("=")[1];
-        String page = "pages/logistics/logistics?inform=1&id=" + order.getId();
-        int res = WxTempLateMsgUtil.sendWxTemplateMsg(msg, order.getUserId(),
-                page, WxTempLateMsgUtil.ORDER_DELIVERY, formId);
-        return res;
-    }
-
-    /**
-     * 订单付款成功后给客户发送微信提醒
-     * @param order
-     * @return
-     */
-    public int paySuccessSendWxMsgToUser(ShopOrder order) {
-        List<String> msg = new ArrayList<>();
-        msg.add(order.getOrderNo());
-        msg.add(new BigDecimal(order.getOrderMoney().toString()).toString() + "元");
-        msg.add(dateFormat.format(order.getOrderTime()));
-        msg.add(getProductNames(order.getUserId(), order.getId()));
-        String formId = order.getWxOrderNo().split("=")[1];
-        String page = "pages/orderDetails/orderDetails?inform=1&id=" + order.getId();
-        return WxTempLateMsgUtil.sendWxTemplateMsg(msg, order.getUserId(), page, WxTempLateMsgUtil.ORDER_PAY_SUCCESS, formId);
-    }
-
-    /**
      * 根据用户ID和订单ID获取所购买商品名称
      * @param openId 用户openId
      * @param orderId 订单ID
      * @return 所含商品名称(多个以","隔开)
      */
-    public String getProductNames(String openId, Integer orderId) {
-        ShopOrder orderDetail = shopOrderDao.selectOrderInfoById(openId, orderId);
+    public String getProductNames(Long userId, Integer orderId) {
+        ShopOrder orderDetail = shopOrderDao.selectOrderInfoById(userId, orderId);
         List<ShopOrderDetails> details = orderDetail.getDetails();
         if (CollectionUtils.isEmpty(details)) {
             return "";
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ActivitySignAwardSetVo.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ActivitySignAwardSetVo.java
new file mode 100644
index 0000000..32b87ab
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ActivitySignAwardSetVo.java
@@ -0,0 +1,174 @@
+package com.matrix.system.shopXcx.api.vo;
+
+import java.util.Date;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "ActivitySignAwardSetVo", description = "奖品明细")
+public class ActivitySignAwardSetVo{
+	
+	private Long id;
+	
+	/**
+	 * 奖项类型(1:自定义产品2:积分3:优惠券4:店铺商品)
+	 */
+
+	@ApiModelProperty(value ="奖项类型(1:自定义产品2:积分3:优惠券4:店铺商品)")
+	private int  awardType;
+	
+	/**
+	 * 奖项规则(1:每日奖励(默认)2:累计签到天数)
+	 */
+
+
+	@ApiModelProperty(value ="奖项规则(1:每日奖励(默认)2:累计签到天数)")
+	private int  awardRule;
+	
+	/**
+	 * 签到累计天数
+	 */
+
+	@ApiModelProperty(value ="签到累计天数")
+	private int  cumulativeDay;
+	
+	/**
+	 * 奖项名称
+	 */
+
+	@ApiModelProperty(value ="奖项名称")
+	private String  awardName;
+	
+	/**
+	 * 图片介绍
+	 */
+
+	@ApiModelProperty(value ="图片介绍")
+	private String  introduceImg;
+	
+	/**
+	 * 文字介绍
+	 */
+
+
+	@ApiModelProperty(value ="文字介绍")
+	private String  introduceTip;
+	
+	/**
+	 * 奖项库存数量
+	 */
+
+
+	@ApiModelProperty(value ="奖项库存数量")
+	private int  awardInventoryCnt;
+	
+	/**
+	 * 已派发数量
+	 */
+
+
+	@ApiModelProperty(value ="已派发数量")
+	private int  awardDistributeCnt;
+	
+	/**
+	 * 兑奖方式(1:线下兑换2:物流配送3:客服兑换)
+	 */
+
+
+	@ApiModelProperty(value ="兑奖方式(1:线下兑换2:物流配送3:客服兑换)")
+	private int  awardWay;
+	
+	/**
+	 * 奖品是否有效(1:有效 2:无效)
+	 */
+	@ApiModelProperty(value ="奖品是否有效(1:有效 2:无效)")
+	private int  awardState;
+	public static final int AWARDSTATE_WORK = 1;
+	public static final int AWARDSTATE_UNWORK = 2;
+	
+	/**
+	 * 操作提示
+	 */
+
+	@ApiModelProperty(value ="操作提示")
+	private String  operationTip;
+	
+	/**
+	 * 兑奖地址
+	 */
+
+	@ApiModelProperty(value ="兑奖地址")
+	private String  prizeAddress;
+	
+	/**
+	 * 兑奖期限开始日期
+	 */
+
+
+	@ApiModelProperty(value ="兑奖期限开始日期")
+	private Date  prizeStartTime;
+	
+	/**
+	 * 兑奖期限结束日期
+	 */
+
+	@ApiModelProperty(value ="兑奖期限结束日期")
+	private Date  prizeEndTime;
+	
+	/**
+	 * 客服微信
+	 */
+
+	@ApiModelProperty(value ="客服微信")
+	private String  wechatImg;
+	
+	/**
+	 * 积分数量
+	 */
+
+
+	@ApiModelProperty(value ="积分数量")
+	private int  scoreCnt;
+	
+	/**
+	 * 优惠券ID
+	 */
+
+	@ApiModelProperty(value ="优惠券")
+	private String  couponName;
+
+	@ApiModelProperty(value ="优惠券ID")
+	private String  couponId;
+	
+	/**
+	 * 商品ID
+	 */
+
+	@ApiModelProperty(value ="商品")
+	private String  goodsName;
+
+	@ApiModelProperty(value ="商品ID")
+	private String  goodsId;
+	
+	/**
+	 * 活动主表ID
+	 */
+
+
+	@ApiModelProperty(value ="活动主表ID")
+	private Long  activityId;
+	
+	/**
+	 * 公司ID
+	 */
+
+
+	@ApiModelProperty(value ="公司ID")
+	private Long  companyId;
+
+
+
+  
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ScoreUseRecordVo.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ScoreUseRecordVo.java
new file mode 100644
index 0000000..c687093
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ScoreUseRecordVo.java
@@ -0,0 +1,56 @@
+package com.matrix.system.shopXcx.api.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.matrix.core.anotations.Extend;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @description 积分记录表页面展示对象
+ */
+@Data
+@ApiModel(value = "ScoreUseRecordVo", description = "积分记录")
+public class ScoreUseRecordVo {
+
+	@Extend
+	private static final long serialVersionUID = 1L;
+
+	@ApiModelProperty(value = "ID")
+	private Integer  id;
+
+	@ApiModelProperty(value = "记录类型(1:现金消费2:员工划扣3赠送等)")
+	private Integer  recType;
+
+	@ApiModelProperty(value = "调整时间")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone="GMT+8")
+	private Date createTime;
+
+
+	@ApiModelProperty(value = "调整数量")
+	private Integer  recNum;
+
+	@ApiModelProperty(value = "业务记录ID")
+	private Long  businessId;
+
+
+
+	@ApiModelProperty(value = "调整后余额")
+	private Integer  nowScore;
+
+	@ApiModelProperty(value = "操作人")
+	private String  optionName;
+
+	@ApiModelProperty(value = "调整门店")
+	private String shopName;
+	
+
+	@ApiModelProperty(value = "备注")
+	private String  remarks;
+
+
+
+  
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SeeAwardTextVo.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SeeAwardTextVo.java
new file mode 100644
index 0000000..7dd4cfc
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SeeAwardTextVo.java
@@ -0,0 +1,49 @@
+package com.matrix.system.shopXcx.api.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+@ApiModel(value = "SeeAwardTextVo", description = "劵码信息")
+public class SeeAwardTextVo {
+	
+	@ApiModelProperty(value ="奖项名称")
+	private String  awardName;
+
+	@ApiModelProperty(value ="图片介绍")
+	private String  introduceImg;
+	
+	@ApiModelProperty(value ="兑奖方式(1:线下兑换2:物流配送3:客服兑换)")
+	private int  awardWay;
+	
+	@ApiModelProperty(value ="数量")
+	private int  total;
+
+	@ApiModelProperty(value ="兑奖期限开始日期")
+	@JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
+	private Date  prizeStartTime;
+	
+	@ApiModelProperty(value ="兑奖期限结束日期")
+	@JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
+	private Date  prizeEndTime;
+	
+	@ApiModelProperty(value =" 核销码")
+	private String  writeOffCode;
+
+	@ApiModelProperty(value ="兑奖须知")
+	private String  operationTip;
+	
+	@ApiModelProperty(value ="兑奖地址")
+	private String  prizeAddress;
+
+	@ApiModelProperty(value ="客服微信")
+	private String  wechatImg;
+
+	@ApiModelProperty(value =" 是否已领取(1:待领取2:已领取)")
+	private Integer  state;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ShopCartBillVo.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ShopCartBillVo.java
index 6e5c3c1..fca4eb3 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ShopCartBillVo.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ShopCartBillVo.java
@@ -26,6 +26,18 @@
      * 未优惠之前的总金额
      */
     private BigDecimal srcTotal = BigDecimal.ZERO;
+    /**
+     * 抵用积分
+     */
+    private BigDecimal scorePay = BigDecimal.ZERO;
+
+    public BigDecimal getScorePay() {
+        return scorePay;
+    }
+
+    public void setScorePay(BigDecimal scorePay) {
+        this.scorePay = scorePay;
+    }
 
     public BigDecimal getBillTotal() {
         return billTotal;
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ShopCartGroupVo.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ShopCartGroupVo.java
new file mode 100644
index 0000000..0658267
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ShopCartGroupVo.java
@@ -0,0 +1,46 @@
+package com.matrix.system.shopXcx.api.vo;
+
+import com.matrix.system.shopXcx.bean.ShopCoupon;
+import com.matrix.system.shopXcx.bean.ShopShoppingCart;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 购物车前台展示对象
+ */
+@Data
+public class ShopCartGroupVo {
+
+	private ShopCoupon coupon;
+
+	//是否满足优惠
+	private boolean satisfactionCoupon;
+
+
+	private List<ShopShoppingCart> cartList=new ArrayList<>();
+
+
+	//提示语
+	private String msg="";
+
+	//优惠小计金额
+	private BigDecimal subtotal=BigDecimal.ZERO;
+
+	//原价
+	private BigDecimal srcPrice=BigDecimal.ZERO;
+
+	//优惠金额
+	private BigDecimal  couponPrice=BigDecimal.ZERO;
+	/**
+	 * 抵用积分
+	 */
+	private BigDecimal scorePay = BigDecimal.ZERO;
+
+	private CouponReceiveInfoVO couponReceiveInfoVO;
+
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ShopCartVo.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ShopCartVo.java
index 185f984..6d1733e 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ShopCartVo.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ShopCartVo.java
@@ -2,6 +2,7 @@
 
 import com.matrix.system.shopXcx.bean.ShopCoupon;
 import com.matrix.system.shopXcx.bean.ShopShoppingCart;
+import lombok.Data;
 
 import java.math.BigDecimal;
 import java.util.List;
@@ -9,90 +10,33 @@
 /**
  * 购物车前台展示对象
  */
+@Data
 public class ShopCartVo {
 
-	private ShopCoupon coupon;
+    private ShopCoupon coupon;
 
-	private CouponReceiveInfoVO couponReceiveInfoVO;
+    private CouponReceiveInfoVO couponReceiveInfoVO;
 
-	public CouponReceiveInfoVO getCouponReceiveInfoVO() {
-		return couponReceiveInfoVO;
-	}
 
-	public void setCouponReceiveInfoVO(CouponReceiveInfoVO couponReceiveInfoVO) {
-		this.couponReceiveInfoVO = couponReceiveInfoVO;
-	}
+    //是否满足优惠
+    private boolean satisfactionCoupon;
 
-	//是否满足优惠
-	private boolean satisfactionCoupon;
+    private List<ShopShoppingCart> cartList;
 
-	private List<ShopShoppingCart> cartList;
+    //提示语
+    private String msg = "";
 
-	//提示语
-	private String msg="";
+    //优惠小计金额
+    private BigDecimal subtotal = BigDecimal.ZERO;
 
-	//优惠小计金额
-	private BigDecimal subtotal=BigDecimal.ZERO;
+    //原价
+    private BigDecimal srcPrice = BigDecimal.ZERO;
 
-	//原价
-	private BigDecimal srcPrice=BigDecimal.ZERO;
+    //优惠金额
+    private BigDecimal couponPrice = BigDecimal.ZERO;
+    /**
+     * 抵用积分
+     */
+    private BigDecimal scorePay = BigDecimal.ZERO;
 
-	//优惠金额
-	private BigDecimal  couponPrice=BigDecimal.ZERO;
-
-	public ShopCoupon getCoupon() {
-		return coupon;
-	}
-
-	public void setCoupon(ShopCoupon coupon) {
-		this.coupon = coupon;
-	}
-
-	public boolean isSatisfactionCoupon() {
-		return satisfactionCoupon;
-	}
-
-	public void setSatisfactionCoupon(boolean satisfactionCoupon) {
-		this.satisfactionCoupon = satisfactionCoupon;
-	}
-
-	public List<ShopShoppingCart> getCartList() {
-		return cartList;
-	}
-
-	public void setCartList(List<ShopShoppingCart> cartList) {
-		this.cartList = cartList;
-	}
-
-	public String getMsg() {
-		return msg;
-	}
-
-	public void setMsg(String msg) {
-		this.msg = msg;
-	}
-
-	public BigDecimal getSubtotal() {
-		return subtotal;
-	}
-
-	public void setSubtotal(BigDecimal subtotal) {
-		this.subtotal = subtotal;
-	}
-
-	public BigDecimal getSrcPrice() {
-		return srcPrice;
-	}
-
-	public void setSrcPrice(BigDecimal srcPrice) {
-		this.srcPrice = srcPrice;
-	}
-
-	public BigDecimal getCouponPrice() {
-		return couponPrice;
-	}
-
-	public void setCouponPrice(BigDecimal couponPrice) {
-		this.couponPrice = couponPrice;
-	}
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SignAwardListVo.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SignAwardListVo.java
new file mode 100644
index 0000000..b445647
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SignAwardListVo.java
@@ -0,0 +1,37 @@
+package com.matrix.system.shopXcx.api.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+@ApiModel(value = "SignAwardListVo", description = "奖品列表")
+public class SignAwardListVo {
+	/**
+	 * 主键
+	 */
+	private Long  id;
+	
+	@ApiModelProperty(value ="奖项名称")
+	private String  awardName;
+
+	@ApiModelProperty(value ="图片介绍")
+	private String  introduceImg;
+	
+	@ApiModelProperty(value ="兑奖方式(1:线下兑换2:物流配送3:客服兑换)")
+	private int  awardWay;
+	
+	@ApiModelProperty(value ="数量")
+	private int  total;
+	
+	@ApiModelProperty(value ="是否已领取(1:待领取2:已领取)")
+	private Integer  state;
+	
+	@ApiModelProperty(value ="领取时间")
+	@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8")
+	private Date  receiveTime;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SignBasicInfoJsonVo.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SignBasicInfoJsonVo.java
new file mode 100644
index 0000000..1ca4b36
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SignBasicInfoJsonVo.java
@@ -0,0 +1,31 @@
+package com.matrix.system.shopXcx.api.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "SignBasicInfoJsonVo", description = "签到活动")
+public class SignBasicInfoJsonVo {
+	
+	@ApiModelProperty(value ="标题图片")
+	private String imageUrlTitle;
+	@ApiModelProperty(value ="头部图片")
+	private String imageUrlHead;
+	@ApiModelProperty(value ="按钮图片")
+	private String imageUrlButton;
+	@ApiModelProperty(value ="状态图片")
+	private String imageUrlState;
+	
+	@ApiModelProperty(value ="规则内容")
+	private String ruleExplain;
+	@ApiModelProperty(value ="字体颜色")
+	private String typographyColor;
+	@ApiModelProperty(value ="背景颜色")
+	private String backgroundColor;
+	@ApiModelProperty(value ="字体大小")
+	private Integer typographyNum;
+	@ApiModelProperty(value ="字体透明度")
+	private Integer typographyLight;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SignBasicInfoVo.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SignBasicInfoVo.java
new file mode 100644
index 0000000..47689ff
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SignBasicInfoVo.java
@@ -0,0 +1,42 @@
+package com.matrix.system.shopXcx.api.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+@Data
+
+@ApiModel(value = "SignBasicInfoVo", description = "签到活动")
+public class SignBasicInfoVo {
+	
+	/**
+	 * 主键
+	 */
+	private Long  id;
+	@ApiModelProperty(value ="活动今日是否已参与 1:未参与 2:已参与")
+    private int joinState;
+
+	public static final int JOINSTATE_NOTSIGN = 1;
+	public static final int JOINSTATE_SIGN = 2;
+	
+	@ApiModelProperty(value ="活动名称")
+    private String actName;
+	@ApiModelProperty(value ="活动编码")
+	private String actCode;
+	@ApiModelProperty(value ="活动开始时间")
+	@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8")
+	private Date beginTime;
+	@ApiModelProperty(value ="活动结束时间")
+	@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8")
+	private Date endTime;
+	@ApiModelProperty(value ="活动基本参数")
+	private SignBasicInfoJsonVo signBasicInfoJsonVo;
+	@ApiModelProperty(value ="奖品信息")
+	private List<ActivitySignAwardSetVo> activitySignAwardSetVos;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SignSuccessVo.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SignSuccessVo.java
new file mode 100644
index 0000000..298419d
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SignSuccessVo.java
@@ -0,0 +1,154 @@
+package com.matrix.system.shopXcx.api.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+@Data
+
+@ApiModel(value = "SignSuccessVo", description = "签到活动")
+public class SignSuccessVo {
+
+	@ApiModelProperty(value ="日常奖励名称")
+	private String normalAwardName;
+	@ApiModelProperty(value ="日常奖励图片")
+	private String normalAwardImg;
+	
+	@ApiModelProperty(value ="累计奖励名称")
+	private String awardName;
+	@ApiModelProperty(value ="累计奖励图片")
+	private String awardImg;
+	@ApiModelProperty(value ="累计奖励核销码")
+	private String  writeOffCode;
+	
+	@ApiModelProperty(value ="奖项类型(1:自定义产品2:积分3:优惠券4:店铺商品)")
+	private int  awardType;
+
+
+	public static final int AWARDTYPE_CUSTOMIZE = 1;
+	public static final int AWARDTYPE_SCORE = 2;
+	public static final int AWARDTYPE_COUPON = 3;
+	public static final int AWARDTYPE_GOODS = 4;
+	
+	@ApiModelProperty(value ="文字介绍")
+	private String  introduceTip;
+	
+	/**
+	 * 奖项库存数量
+	 */
+
+
+	@ApiModelProperty(value ="奖项库存数量")
+	private int  awardInventoryCnt;
+	
+	/**
+	 * 已派发数量
+	 */
+
+
+	@ApiModelProperty(value ="已派发数量")
+	private int  awardDistributeCnt;
+	
+	/**
+	 * 兑奖方式(1:线下兑换2:物流配送3:客服兑换)
+	 */
+
+
+	@ApiModelProperty(value ="兑奖方式(1:线下兑换2:物流配送3:客服兑换)")
+	private int  awardWay;
+	
+	/**
+	 * 奖品是否有效(1:有效 2:无效)
+	 */
+	@ApiModelProperty(value ="奖品是否有效(1:有效 2:无效)")
+	private int  awardState;
+	public static final int AWARDSTATE_WORK = 1;
+	public static final int AWARDSTATE_UNWORK = 2;
+	
+	/**
+	 * 操作提示
+	 */
+
+	@ApiModelProperty(value ="操作提示")
+	private String  operationTip;
+	
+	/**
+	 * 兑奖地址
+	 */
+
+	@ApiModelProperty(value ="兑奖地址")
+	private String  prizeAddress;
+	
+	/**
+	 * 兑奖期限开始日期
+	 */
+
+
+	@ApiModelProperty(value ="兑奖期限开始日期")
+	@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8")
+	private Date  prizeStartTime;
+	
+	/**
+	 * 兑奖期限结束日期
+	 */
+
+	@ApiModelProperty(value ="兑奖期限结束日期")
+	@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8")
+	private Date  prizeEndTime;
+	
+	/**
+	 * 客服微信
+	 */
+
+	@ApiModelProperty(value ="客服微信")
+	private String  wechatImg;
+	
+	/**
+	 * 积分数量
+	 */
+
+
+	@ApiModelProperty(value ="积分数量")
+	private int  scoreCnt;
+	
+	/**
+	 * 优惠券ID
+	 */
+
+	@ApiModelProperty(value ="优惠券")
+	private String  couponName;
+
+	@ApiModelProperty(value ="优惠券ID")
+	private String  couponId;
+	
+	/**
+	 * 商品ID
+	 */
+
+	@ApiModelProperty(value ="商品")
+	private String  goodsName;
+
+	@ApiModelProperty(value ="商品ID")
+	private String  goodsId;
+	
+	/**
+	 * 活动主表ID
+	 */
+
+
+	@ApiModelProperty(value ="活动主表ID")
+	private Long  activityId;
+	
+	/**
+	 * 公司ID
+	 */
+
+
+	@ApiModelProperty(value ="公司ID")
+	private Long  companyId;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/WxMoneyCardUseVO.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/WxMoneyCardUseVO.java
new file mode 100644
index 0000000..f5d9b25
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/WxMoneyCardUseVO.java
@@ -0,0 +1,56 @@
+package com.matrix.system.shopXcx.api.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.matrix.core.tools.DateUtil;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * @author jyy
+ * @date 2020-04-21 11:36
+ **/
+@Data
+@ApiModel(value = "WxMoneyCardUseVO", description = "储值卡展示类")
+public class WxMoneyCardUseVO   {
+
+    @ApiModelProperty(value ="储值卡ID")
+    private Long  id;
+
+
+    @ApiModelProperty(value ="储值卡名称")
+    private String cardName;
+
+    @ApiModelProperty(value ="失效时间")
+    @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8")
+    @DateTimeFormat(pattern= DateUtil.DATE_FORMAT_DD)
+    private Date failTime;
+
+    @ApiModelProperty(value ="状态,有效,无效,转让,冻结,退款")
+    private String  status;
+
+
+    @ApiModelProperty(value ="总次数")
+    private Integer  useTotal;
+
+    @ApiModelProperty(value ="剩余次数")
+    private Integer  lastCount;
+
+    @ApiModelProperty(value ="来源,购买,转让,赠送")
+    private String  source;
+
+
+    @ApiModelProperty(value ="本金")
+    private Double  realMoney;
+
+
+    @ApiModelProperty(value ="赠送金额")
+    private Double  giftMoney;
+
+    @ApiModelProperty(value ="是会籍卡? Y 是,N否")
+    private String  isVipCar;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivities.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivities.java
index 2028111..5cbb9a8 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivities.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivities.java
@@ -30,6 +30,10 @@
 	 * 活动类型 沙龙
 	 */
 	public static final int ACTIVITIES_TYPE_SALON = 3;
+	/**
+	 * 活动类型 签到
+	 */
+	public static final int ACTIVITIES_TYPE_SIGN = 4;
 
 	/**
 	 * 活动状态 开启
@@ -50,6 +54,10 @@
 	 * 活动名称
 	 */
 	private String  actName;
+	/**
+	 * 活动编码
+	 */
+	private String  actCode;
 			
 	
 	/**
@@ -76,6 +84,17 @@
 	 * 活动状态
 	 */
 	private Integer  actStatus;
+
+	//未发布
+	public static final int ACTSTATUS_STATUS_RELEASE = 2;
+	//未开始
+	public static final int ACTSTATUS_STATUS_READY = 2;
+	//进行中
+	public static final int ACTSTATUS_STATUS_ING = 3;
+	//已结束
+	public static final int ACTSTATUS_STATUS_END = 4;
+	//已删除
+	public static final int ACTSTATUS_STATUS_DEL = 5;
 			
 	
 	/**
@@ -285,4 +304,12 @@
 	public void setSalonRecord(ShopActivitiesSalonRecord salonRecord) {
 		this.salonRecord = salonRecord;
 	}
+
+	public String getActCode() {
+		return actCode;
+	}
+
+	public void setActCode(String actCode) {
+		this.actCode = actCode;
+	}
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesGroupJoin.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesGroupJoin.java
index bbaeb9f..071cf97 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesGroupJoin.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesGroupJoin.java
@@ -81,7 +81,7 @@
 	/**
 	 * 团长ID
 	 */
-	private String  gjHeadId;
+	private Long  gjHeadId;
 
 	private String headName;
 
@@ -200,11 +200,11 @@
 		this.gjStatus=gjStatus;
 	}
 
-	public String getGjHeadId() {
+	public Long getGjHeadId() {
 		return gjHeadId;
 	}
 
-	public void setGjHeadId(String gjHeadId) {
+	public void setGjHeadId(Long gjHeadId) {
 		this.gjHeadId = gjHeadId;
 	}
 
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesGroupJoinUser.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesGroupJoinUser.java
index 54a5b95..a6ab143 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesGroupJoinUser.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesGroupJoinUser.java
@@ -71,7 +71,7 @@
 	/**
 	 * 用户Id
 	 */
-	private String  userId;
+	private Long  userId;
 			
 	
 	/**
@@ -198,11 +198,11 @@
 	}
 
 
-	public String getUserId() {
+	public Long getUserId() {
 		return userId;
 	}
 
-	public void setUserId(String userId) {
+	public void setUserId(Long userId) {
 		this.userId = userId;
 	}
 
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesSalonRecord.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesSalonRecord.java
index 13a92b3..055fbe9 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesSalonRecord.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesSalonRecord.java
@@ -45,7 +45,7 @@
 	/**
 	 * 用户主键
 	 */
-	private String  userId;
+	private Long  userId;
 			
 	
 	/**
@@ -102,11 +102,11 @@
 		this.actId=actId;
 	}
 
-	public String getUserId() {
+	public Long getUserId() {
 		return userId;
 	}
 
-	public void setUserId(String userId) {
+	public void setUserId(Long userId) {
 		this.userId = userId;
 	}
 
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesSeckillRecord.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesSeckillRecord.java
index 597c73d..9d8a9e0 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesSeckillRecord.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesSeckillRecord.java
@@ -36,7 +36,7 @@
 	/**
 	 * 用户主键
 	 */
-	private String  userId;
+	private Long  userId;
 
 	private Long actId;
 
@@ -94,11 +94,11 @@
 		this.orderId=orderId;
 	}
 
-	public String getUserId() {
+	public Long getUserId() {
 		return userId;
 	}
 
-	public void setUserId(String userId) {
+	public void setUserId(Long userId) {
 		this.userId = userId;
 	}
 
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopAdvertis.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopAdvertis.java
index 7e42075..daec16c 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopAdvertis.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopAdvertis.java
@@ -63,12 +63,25 @@
 	 */
 	private String linkUrl;
 
+	/**连接的页面id */
+	private  Long  pageId;
+
 	/**
 	 * 所属分类
 	 */
 	@Extend
 	private String adtName;
+
 	private Long companyId;
+
+	public Long getPageId() {
+		return pageId;
+	}
+
+	public void setPageId(Long pageId) {
+		this.pageId = pageId;
+	}
+
 	public Long getCompanyId() {
 		return companyId;
 	}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopCouponRecord.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopCouponRecord.java
index ff51f0e..33ed315 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopCouponRecord.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopCouponRecord.java
@@ -24,7 +24,7 @@
 	/**
 	 * 用户ID
 	 */
-	private String  userId;
+	private Long  userId;
 			
 	
 	/**
@@ -59,11 +59,11 @@
 	}
    	
 
-	public String getUserId() {
+	public Long getUserId() {
 		return userId;
 	}
    	
-   	public void setUserId(String userId) {
+   	public void setUserId(Long userId) {
 		this.userId=userId;
 	}
    	
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopDeliveryDetail.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopDeliveryDetail.java
index 08b9e4c..707e272 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopDeliveryDetail.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopDeliveryDetail.java
@@ -5,7 +5,7 @@
 
 /**
  * @description 发货明细
- * @author yourName
+ * @author jyy
  * @date 2019-10-21 15:02
  */
 public class ShopDeliveryDetail  extends EntityDTO{
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopDeliveryInfo.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopDeliveryInfo.java
index 75f2487..28519b6 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopDeliveryInfo.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopDeliveryInfo.java
@@ -61,7 +61,7 @@
 	/**
 	 * 用户ID
 	 */
-	private String  userId;
+	private Long  userId;
 			
 	
 	/**
@@ -129,6 +129,7 @@
 
 	private Long shopId;
 	private Long companyId;
+	private Long receiveId;
 	public Long getCompanyId() {
 		return companyId;
 	}
@@ -196,16 +197,14 @@
    	public void setOrderId(Integer orderId) {
 		this.orderId=orderId;
 	}
-   	
 
-	public String getUserId() {
+	public Long getUserId() {
 		return userId;
 	}
-   	
-   	public void setUserId(String userId) {
-		this.userId=userId;
+
+	public void setUserId(Long userId) {
+		this.userId = userId;
 	}
-   	
 
 	public String getOrderNo() {
 		return orderNo;
@@ -304,4 +303,12 @@
 	public void setShopId(Long shopId) {
 		this.shopId = shopId;
 	}
+
+	public Long getReceiveId() {
+		return receiveId;
+	}
+
+	public void setReceiveId(Long receiveId) {
+		this.receiveId = receiveId;
+	}
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopOrder.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopOrder.java
index 46da7f2..f82f46d 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopOrder.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopOrder.java
@@ -17,9 +17,22 @@
 public class ShopOrder extends EntityDTO {
 
     /**
+     * 支付方式-微信支付
+     */
+    public static final int SHOP_ORDER_PAY_METHOD_WX = 1;
+
+    /**
+     * 支付方式-vip会籍卡
+     */
+    public static final int SHOP_ORDER_PAY_METHOD_VIPCARD = 2;
+
+
+
+    /**
      * 订单微信支付状态(待支付)
      */
     public static final int ORDER_WX_STATUS_WAIT_PAY = 1;
+
     /**
      * 订单微信支付状态(支付成功)
      */
@@ -140,8 +153,11 @@
     /**
      * 用户ID
      */
-    private String userId;
-
+    private Long userId;
+    /**
+     * 支付积分
+     */
+    private Integer scorePay;
 
     /**
      * 下单时间
@@ -159,7 +175,10 @@
      * 支付状态(1=待支付,2=支付成功,3=支付失败)
      */
     private Integer payStatus;
-
+    /**
+     *  支付方式1微信,2 vipCard余额
+     */
+    private Integer payMethod;
 
     /**
      * 优惠说明
@@ -336,6 +355,13 @@
         return orderNo;
     }
 
+    public Integer getScorePay() {
+        return scorePay;
+    }
+
+    public void setScorePay(Integer scorePay) {
+        this.scorePay = scorePay;
+    }
 
     public void setOrderNo(String orderNo) {
         this.orderNo = orderNo;
@@ -357,11 +383,11 @@
         this.commodityPrice = commodityPrice;
     }
 
-    public String getUserId() {
+    public Long getUserId() {
         return userId;
     }
 
-    public void setUserId(String userId) {
+    public void setUserId(Long userId) {
         this.userId = userId;
     }
 
@@ -481,10 +507,21 @@
         this.delFlag = delFlag;
     }
 
+
+    public Integer getPayMethod() {
+        return payMethod;
+    }
+
+    public void setPayMethod(Integer payMethod) {
+        this.payMethod = payMethod;
+    }
+
     public String getWxOrderNo() {
         return wxOrderNo;
     }
 
+
+
     public void setWxOrderNo(String wxOrderNo) {
         this.wxOrderNo = wxOrderNo;
     }
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopOrderDetails.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopOrderDetails.java
index f250956..073eb07 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopOrderDetails.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopOrderDetails.java
@@ -1,7 +1,7 @@
 package com.matrix.system.shopXcx.bean;
 
-import com.matrix.core.pojo.EntityDTO;
 import com.matrix.core.anotations.Extend;
+import com.matrix.core.pojo.EntityDTO;
 
 import java.math.BigDecimal;
 
@@ -10,9 +10,18 @@
  * @author jyy
  * @date 2019-06-10 10:58
  */
+
 public class ShopOrderDetails  extends EntityDTO{
 	@Extend
-	private static final long serialVersionUID = 1L; 
+	private static final long serialVersionUID = 1L;
+	/**
+	 *支付方式-直接购买
+	 */
+	public  static final int PAYTYPE_MICRO = 1;
+	/**
+	 *支付方式-积分兑换
+	 */
+	public  static final int PAYTYPE_SCORE=2;
 
 	
 	/**
@@ -43,19 +52,33 @@
 	 * 单价
 	 */
 	private BigDecimal price;
-			
+
+	/**
+	 * 总价
+	 */
+	private BigDecimal  totalPrice;
+
+	/**
+	 * 支付积分单价
+	 */
+	private BigDecimal scoreCount;
+
+	/**
+	 * 支付总积分
+	 */
+	private BigDecimal totalScoreCount;
+
 	
 	/**
 	 * 数量
 	 */
 	private Integer  count;
-			
-	
 	/**
-	 * 总价
+	 * 支付方式1 直接购买 2,积分兑换
 	 */
-	private BigDecimal  totalPrice;
-			
+	private Integer  payType;
+
+
 	
 	/**
 	 * 规格标题
@@ -132,6 +155,30 @@
 		this.price = price;
 	}
 
+	public BigDecimal getTotalPrice() {
+		return totalPrice;
+	}
+
+	public void setTotalPrice(BigDecimal totalPrice) {
+		this.totalPrice = totalPrice;
+	}
+
+	public BigDecimal getScoreCount() {
+		return scoreCount;
+	}
+
+	public void setScoreCount(BigDecimal scoreCount) {
+		this.scoreCount = scoreCount;
+	}
+
+	public BigDecimal getTotalScoreCount() {
+		return totalScoreCount;
+	}
+
+	public void setTotalScoreCount(BigDecimal totalScoreCount) {
+		this.totalScoreCount = totalScoreCount;
+	}
+
 	public Integer getCount() {
 		return count;
 	}
@@ -140,12 +187,12 @@
 		this.count = count;
 	}
 
-	public BigDecimal getTotalPrice() {
-		return totalPrice;
+	public Integer getPayType() {
+		return payType;
 	}
 
-	public void setTotalPrice(BigDecimal totalPrice) {
-		this.totalPrice = totalPrice;
+	public void setPayType(Integer payType) {
+		this.payType = payType;
 	}
 
 	public String getsTitle() {
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopPage.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopPage.java
index 1491fe8..fec783a 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopPage.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopPage.java
@@ -6,7 +6,7 @@
 
 /**
  * @description 小程序页面
- * @author yourName
+ * @author jyy
  * @date 2020-04-03 14:56
  */
 public class ShopPage  extends EntityDTO{
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopProduct.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopProduct.java
index 29865be..440cac1 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopProduct.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopProduct.java
@@ -2,6 +2,7 @@
 
 import com.matrix.core.anotations.Extend;
 import com.matrix.system.common.bean.EntityDTOExt;
+import lombok.Data;
 
 import java.util.List;
 
@@ -10,13 +11,27 @@
  * @author jyy
  * @date 2019-06-10 10:58
  */
+@Data
 public class ShopProduct extends EntityDTOExt {
+	/**
+	 * 可用积分
+	 */
+	public static  final int PAYFOR_SCORE =1;
+	/**
+	 * 不用积分
+	 */
+	public static  final int NOT_PAYFOR_SCORE =2;
 
 	/**
-	 * 产品类型-服务
+	 * 可分销
 	 */
-	public static  final int IS_SERVICE_Y=1;
-	public static  final int IS_SERVICE_N=2;
+	public static  final int ABLE_SALES =1;
+	/**
+	 * 不可分销
+	 */
+	public static  final int NOT_ABLE_SALES=2;
+
+
 	
 	/**
 	 * 主键
@@ -28,7 +43,12 @@
 	 * 分类ID
 	 */
 	private Integer  categoryId;
-			
+
+	/**
+	 * 积分商城分类ID
+	 */
+	private Integer  scoreCategoryId;
+
 	
 	/**
 	 * 标题
@@ -58,10 +78,17 @@
 	 * 手机端封面
 	 */
 	private String  imgMobile;
-			
-	
 
-			
+	/**
+	 * 是否可用积分支付 1是,2不是
+	 */
+	private Integer ableScorePay;
+
+
+	/**
+	 * 是否为分销产品 1是2不是
+	 */
+	private Integer  ableSales;
 	
 	/**
 	 * 原价
@@ -161,6 +188,7 @@
 	 */
 	@Extend
 	private String  paramRefs;
+
 	@Extend
 	private List<ShopProductParamRef> params;
 
@@ -244,366 +272,6 @@
 
 	private Long companyId;
 
-	public Long getCompanyId() {
-		return companyId;
-	}
-
-	public void setCompanyId(Long companyId) {
-		this.companyId = companyId;
-	}
-
-	public String getBrand() {
-		return brand;
-	}
-
-	public void setBrand(String brand) {
-		this.brand = brand;
-	}
-
-	public String getShopIds() {
-		return shopIds;
-	}
-
-	public void setShopIds(String shopIds) {
-		this.shopIds = shopIds;
-	}
-
-	public ShopCoupon getShopCoupon() {
-		return shopCoupon;
-	}
-
-	public void setShopCoupon(ShopCoupon shopCoupon) {
-		this.shopCoupon = shopCoupon;
-	}
-
-	public Integer getCouponId() {
-		return couponId;
-	}
-
-	public void setCouponId(Integer couponId) {
-		this.couponId = couponId;
-	}
-
-	public String getStockNum() {
-		return stockNum;
-	}
-
-	public void setStockNum(String stockNum) {
-		this.stockNum = stockNum;
-	}
-
-	public Integer getIsService() {
-		return isService;
-	}
-
-	public void setIsService(Integer isService) {
-		this.isService = isService;
-	}
-
-	public Integer getIsSpecialPrice() {
-		return isSpecialPrice;
-	}
-
-	public void setIsSpecialPrice(Integer isSpecialPrice) {
-		this.isSpecialPrice = isSpecialPrice;
-	}
-
-	public Double getMarkedPrice() {
-		return markedPrice;
-	}
-
-	public void setMarkedPrice(Double markedPrice) {
-		this.markedPrice = markedPrice;
-	}
-
-	public Integer getId() {
-		return id;
-	}
-   	
-   	public void setId(Integer id) {
-		this.id=id;
-	}
-   	
-
-	public Integer getCategoryId() {
-		return categoryId;
-	}
-   	
-   	public void setCategoryId(Integer categoryId) {
-		this.categoryId=categoryId;
-	}
-   	
-
-	public String getTitle() {
-		return title;
-	}
-   	
-   	public void setTitle(String title) {
-		this.title=title;
-	}
-   	
-
-	public String getBriefIntroduction() {
-		return briefIntroduction;
-	}
-   	
-   	public void setBriefIntroduction(String briefIntroduction) {
-		this.briefIntroduction=briefIntroduction;
-	}
-   	
-
-	public Integer getCarriage() {
-		return carriage;
-	}
-   	
-   	public void setCarriage(Integer carriage) {
-		this.carriage=carriage;
-	}
-   	
-
-	public String getImgPc() {
-		return imgPc;
-	}
-   	
-   	public void setImgPc(String imgPc) {
-		this.imgPc=imgPc;
-	}
-   	
-
-	public String getImgMobile() {
-		return imgMobile;
-	}
-   	
-   	public void setImgMobile(String imgMobile) {
-		this.imgMobile=imgMobile;
-	}
-   	
-
-
-	public Double getPrice() {
-		return price;
-	}
-
-   	public void setPrice(Double price) {
-		this.price=price;
-	}
-
-
-	public String getPcDetails() {
-		return pcDetails;
-	}
-   	
-   	public void setPcDetails(String pcDetails) {
-		this.pcDetails=pcDetails;
-	}
-   	
-
-	public String getMobileDetails() {
-		return mobileDetails;
-	}
-   	
-   	public void setMobileDetails(String mobileDetails) {
-		this.mobileDetails=mobileDetails;
-	}
-   	
-
-	public Integer getBuyLimit() {
-		return buyLimit;
-	}
-   	
-   	public void setBuyLimit(Integer buyLimit) {
-		this.buyLimit=buyLimit;
-	}
-   	
-
-	public Integer getLimitCycle() {
-		return limitCycle;
-	}
-   	
-   	public void setLimitCycle(Integer limitCycle) {
-		this.limitCycle=limitCycle;
-	}
-   	
-
-	public Integer getIsCanComment() {
-		return isCanComment;
-	}
-   	
-   	public void setIsCanComment(Integer isCanComment) {
-		this.isCanComment=isCanComment;
-	}
-   	
-
-	public String getMnemonicCode() {
-		return mnemonicCode;
-	}
-   	
-   	public void setMnemonicCode(String mnemonicCode) {
-		this.mnemonicCode=mnemonicCode;
-	}
-   	
-
-	public Integer getStatus() {
-		return status;
-	}
-   	
-   	public void setStatus(Integer status) {
-		this.status=status;
-	}
-   	
-
-	public Integer getDsVolume() {
-		return dsVolume;
-	}
-   	
-   	public void setDsVolume(Integer dsVolume) {
-		this.dsVolume=dsVolume;
-	}
-   	
-
-	public Integer getRsVolume() {
-		return rsVolume;
-	}
-   	
-   	public void setRsVolume(Integer rsVolume) {
-		this.rsVolume=rsVolume;
-	}
-   	
-
-	public Integer getDelFlag() {
-		return delFlag;
-	}
-   	
-   	public void setDelFlag(Integer delFlag) {
-		this.delFlag=delFlag;
-	}
-
-
-	public String getParamRefs() {
-		return paramRefs;
-	}
-
-	public void setParamRefs(String paramRefs) {
-		this.paramRefs = paramRefs;
-	}
-
-	public String getAttrs() {
-		return attrs;
-	}
-
-	public void setAttrs(String attrs) {
-		this.attrs = attrs;
-	}
-
-	public String getShopSku() {
-		return shopSku;
-	}
-
-	public void setShopSku(String shopSku) {
-		this.shopSku = shopSku;
-	}
-
-	public String getShopProductImg() {
-		return shopProductImg;
-	}
-
-	public void setShopProductImg(String shopProductImg) {
-		this.shopProductImg = shopProductImg;
-	}
-
-	public List<ShopProductParamRef> getParams() {
-		return params;
-	}
-
-	public void setParams(List<ShopProductParamRef> params) {
-		this.params = params;
-	}
-
-	public List<ShopProductAttrRef> getAttrRefs() {
-		return attrRefs;
-	}
-
-	public void setAttrRefs(List<ShopProductAttrRef> attrRefs) {
-		this.attrRefs = attrRefs;
-	}
-
-	public List<ShopSku> getSkus() {
-		return skus;
-	}
-
-	public void setSkus(List<ShopSku> skus) {
-		this.skus = skus;
-	}
-
-	public List<ShopProductImg> getProductImgs() {
-		return productImgs;
-	}
-
-	public void setProductImgs(List<ShopProductImg> productImgs) {
-		this.productImgs = productImgs;
-	}
-
-	public Integer getStartPrice() {
-		return startPrice;
-	}
-
-	public void setStartPrice(Integer startPrice) {
-		this.startPrice = startPrice;
-	}
-
-	public Integer getEndPrice() {
-		return endPrice;
-	}
-
-	public void setEndPrice(Integer endPrice) {
-		this.endPrice = endPrice;
-	}
-
-	public String getSortType() {
-		return sortType;
-	}
-
-	public void setSortType(String sortType) {
-		this.sortType = sortType;
-	}
-
-	public String getQueryType() {
-		return queryType;
-	}
-
-	public void setQueryType(String queryType) {
-		this.queryType = queryType;
-	}
-
-	public String getAttrValues() {
-		return attrValues;
-	}
-
-	public void setAttrValues(String attrValues) {
-		this.attrValues = attrValues;
-	}
-
-	public String getAtrid() {
-		return atrid;
-	}
-
-	public void setAtrid(String atrid) {
-		this.atrid = atrid;
-	}
-
-	public String getScore() {
-		return score;
-	}
-
-	public Integer getServiceTime() {
-		return serviceTime;
-	}
 
-	public void setServiceTime(Integer serviceTime) {
-		this.serviceTime = serviceTime;
-	}
 
-	public void setScore(String score) {
-		this.score = score;
-	}
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopProductComment.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopProductComment.java
index 811dd40..77e678d 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopProductComment.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopProductComment.java
@@ -3,6 +3,7 @@
 import com.matrix.core.anotations.Extend;
 import com.matrix.core.tools.DateUtil;
 import com.matrix.system.common.bean.EntityDTOExt;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.util.Date;
 
@@ -19,7 +20,7 @@
 	/**
 	 * 主键
 	 */
-	private Integer  comId;
+	private Long  comId;
 			
 	
 	/**
@@ -130,14 +131,14 @@
 	/**
 	 * 开始时间
 	 */
-	@Extend
-	private String commentBeginTime;
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+	private Date commentBeginTime;
 
 	/**
 	 * 结束时间
 	 */
-	@Extend
-	private String commentEndTime;
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+	private Date commentEndTime;
 	private Long companyId;
 	public Long getCompanyId() {
 		return companyId;
@@ -157,19 +158,19 @@
 		this.dateToStrTime = dateToStrTime;
 	}
 
-	public String getCommentBeginTime() {
+	public Date getCommentBeginTime() {
 		return commentBeginTime;
 	}
 
-	public void setCommentBeginTime(String commentBeginTime) {
+	public void setCommentBeginTime(Date commentBeginTime) {
 		this.commentBeginTime = commentBeginTime;
 	}
 
-	public String getCommentEndTime() {
+	public Date getCommentEndTime() {
 		return commentEndTime;
 	}
 
-	public void setCommentEndTime(String commentEndTime) {
+	public void setCommentEndTime(Date commentEndTime) {
 		this.commentEndTime = commentEndTime;
 	}
 
@@ -181,14 +182,13 @@
 		auditStatus = auditStatus;
 	}
 
-	public Integer getComId() {
+	public Long getComId() {
 		return comId;
 	}
-   	
-   	public void setComId(Integer comId) {
-		this.comId=comId;
+
+	public void setComId(Long comId) {
+		this.comId = comId;
 	}
-   	
 
 	public String getUserId() {
 		return userId;
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopRefundRecord.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopRefundRecord.java
index 60bb61e..b557b04 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopRefundRecord.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopRefundRecord.java
@@ -40,7 +40,7 @@
 	/**
 	 * 用户ID
 	 */
-	private String  userId;
+	private Long  userId;
 			
 	
 	/**
@@ -301,11 +301,11 @@
 	}
    	
 
-	public String getUserId() {
+	public Long getUserId() {
 		return userId;
 	}
    	
-   	public void setUserId(String userId) {
+   	public void setUserId(Long userId) {
 		this.userId=userId;
 	}
    	
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopScoreRecord.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopScoreRecord.java
deleted file mode 100644
index 59de19f..0000000
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopScoreRecord.java
+++ /dev/null
@@ -1,155 +0,0 @@
-package com.matrix.system.shopXcx.bean;
-
-import com.matrix.core.pojo.EntityDTO;
-import com.matrix.core.anotations.Extend;
-import com.matrix.core.tools.DateUtil;
-
-import java.math.BigDecimal;
-
-/**
- * @description 用户积分获取记录
- * @author jyy
- * @date 2019-08-09 15:10
- */
-public class ShopScoreRecord  extends EntityDTO{
-	@Extend
-	private static final long serialVersionUID = 1L; 
-
-	
-	/**
-	 * 主键
-	 */
-	private Integer  id;
-			
-	
-	/**
-	 * 受益人openID
-	 */
-	private String  beneficiaryId;
-			
-	
-	/**
-	 * 购买人openID
-	 */
-	private String  buyerId;
-			
-	
-	/**
-	 * 购买人名称
-	 */
-	private String  buyerName;
-
-
-	/**
-	 * 购买人头像地址
-	 */
-	private String buyerAvatarUrl;
-
-
-	/**
-	 * 订单ID
-	 */
-	private Integer  orderId;
-			
-	
-	/**
-	 * 订单金额
-	 */
-	private BigDecimal  amount;
-			
-	
-	/**
-	 * 获得积分
-	 */
-	private Integer  score;
-
-
-	/**
-	 * 创建时间格式化成字符串
-	 */
-	@Extend
-	private String createTimeStr;
-
-
-	public String getCreateTimeStr() {
-		if (this.getCreateTime() == null) {
-			return "";
-		}
-		return DateUtil.dateToString(this.getCreateTime(), DateUtil.DATE_FORMAT_DD);
-	}
-	
-
-	public Integer getId() {
-		return id;
-	}
-   	
-   	public void setId(Integer id) {
-		this.id=id;
-	}
-   	
-
-	public String getBeneficiaryId() {
-		return beneficiaryId;
-	}
-   	
-   	public void setBeneficiaryId(String beneficiaryId) {
-		this.beneficiaryId=beneficiaryId;
-	}
-   	
-
-	public String getBuyerId() {
-		return buyerId;
-	}
-   	
-   	public void setBuyerId(String buyerId) {
-		this.buyerId=buyerId;
-	}
-   	
-
-	public String getBuyerName() {
-		return buyerName;
-	}
-   	
-   	public void setBuyerName(String buyerName) {
-		this.buyerName=buyerName;
-	}
-
-
-	public String getBuyerAvatarUrl() {
-		return buyerAvatarUrl;
-	}
-
-	public void setBuyerAvatarUrl(String buyerAvatarUrl) {
-		this.buyerAvatarUrl = buyerAvatarUrl;
-	}
-
-	public Integer getOrderId() {
-		return orderId;
-	}
-   	
-   	public void setOrderId(Integer orderId) {
-		this.orderId=orderId;
-	}
-   	
-
-	public BigDecimal getAmount() {
-		return amount;
-	}
-   	
-   	public void setAmount(BigDecimal amount) {
-		this.amount=amount;
-	}
-   	
-
-	public Integer getScore() {
-		return score;
-	}
-   	
-   	public void setScore(Integer score) {
-		this.score=score;
-	}
-   	
-
-
-  
-}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopSearchRecord.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopSearchRecord.java
index d9a1283..a3196af 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopSearchRecord.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopSearchRecord.java
@@ -22,7 +22,7 @@
 	/**
 	 * 用户id
 	 */
-	private String  userId;
+	private Long  userId;
 			
 	
 	/**
@@ -84,11 +84,11 @@
 	}
    	
 
-	public String getUserId() {
+	public Long getUserId() {
 		return userId;
 	}
    	
-   	public void setUserId(String userId) {
+   	public void setUserId(Long userId) {
 		this.userId=userId;
 	}
    	
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopShareQrcord.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopShareQrcord.java
index 84e645b..0fdbf69 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopShareQrcord.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopShareQrcord.java
@@ -1,10 +1,12 @@
 package com.matrix.system.shopXcx.bean;
 
 import com.matrix.system.common.bean.EntityDTOExt;
+import lombok.Data;
 
 /**
  * 分享二维码
  */
+@Data
 public class  ShopShareQrcord extends EntityDTOExt {
 
 
@@ -23,7 +25,7 @@
     /**
      * 用户ID
      */
-    private String  userId;
+    private Long  userId;
 
 
     /**
@@ -55,69 +57,4 @@
      */
     private Long shopId;
 
-    public Long getShopId() {
-        return shopId;
-    }
-
-    public void setShopId(Long shopId) {
-        this.shopId = shopId;
-    }
-
-
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public Integer getProductId() {
-        return productId;
-    }
-
-    public void setProductId(Integer productId) {
-        this.productId = productId;
-    }
-
-    public String getUserId() {
-        return userId;
-    }
-
-    public void setUserId(String userId) {
-        this.userId = userId;
-    }
-
-    public Integer getStatus() {
-        return status;
-    }
-
-    public void setStatus(Integer status) {
-        this.status = status;
-    }
-
-    public Integer getVisitorCount() {
-        return visitorCount;
-    }
-
-    public void setVisitorCount(Integer visitorCount) {
-        this.visitorCount = visitorCount;
-    }
-
-    public String getRemark() {
-        return remark;
-    }
-
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
-    public String getQrcodeUrl() {
-        return qrcodeUrl;
-    }
-
-    public void setQrcodeUrl(String qrcodeUrl) {
-        this.qrcodeUrl = qrcodeUrl;
-    }
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopShoppingCart.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopShoppingCart.java
index 7259104..4f27e07 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopShoppingCart.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopShoppingCart.java
@@ -14,33 +14,42 @@
  */
 public class ShopShoppingCart  extends EntityDTOExt {
 	@Extend
-	private static final long serialVersionUID = 1L; 
+	private static final long serialVersionUID = 1L;
+	/**
+	 *购物车类型-直接购买
+	 */
+	public static  final int CAR_TYPE_MICRO =1;
+	/**
+	 *购物车类型-积分兑换
+	 */
+	public static  final int CAR_TYPE_SCORE=2;
 
-	
+
+
 	/**
 	 * 主键
 	 */
 	private Integer  cartId;
-			
-	
+
+
 	/**
 	 * 用户ID
 	 */
-	private String  cartUserId;
-			
-	
+	private Long  cartUserId;
+
+
 	/**
 	 * 产品ID
 	 */
 	private Integer  cartProductId;
-			
-	
+
+
 	/**
 	 * 规格ID
 	 */
 	private Integer  cartSkuId;
-			
-	
+
+
 	/**
 	 * 数量
 	 */
@@ -50,6 +59,12 @@
 	 * 用户是否选中 1选中  2未选中
 	 */
 	private Integer isSelected;
+	/**
+	 * 购物车类型 1直接支付  2积分兑换
+	 */
+	private Integer cartType;
+
+
 
 	/**
 	 * 门店id
@@ -67,6 +82,16 @@
 	 */
 	@Extend
 	private BigDecimal price;
+	/**
+	 * 积分兑换所需支付金额
+	 */
+	@Extend
+	private BigDecimal scorePrice;
+	/**
+	 * 积分兑换所需支付积分
+	 */
+	@Extend
+	private Integer scoreCount;
 
 	/**
 	 * 产品手机端封面地址
@@ -165,6 +190,22 @@
 		this.increaseAndDecrease = increaseAndDecrease;
 	}
 
+	public BigDecimal getScorePrice() {
+		return scorePrice;
+	}
+
+	public void setScorePrice(BigDecimal scorePrice) {
+		this.scorePrice = scorePrice;
+	}
+
+	public Integer getScoreCount() {
+		return scoreCount;
+	}
+
+	public void setScoreCount(Integer scoreCount) {
+		this.scoreCount = scoreCount;
+	}
+
 	public Integer getModifyCartNumber() {
 		return modifyCartNumber;
 	}
@@ -251,44 +292,44 @@
 	public Integer getCartId() {
 		return cartId;
 	}
-   	
-   	public void setCartId(Integer cartId) {
+
+	public void setCartId(Integer cartId) {
 		this.cartId=cartId;
 	}
-   	
 
-	public String getCartUserId() {
+
+	public Long getCartUserId() {
 		return cartUserId;
 	}
-   	
-   	public void setCartUserId(String cartUserId) {
+
+	public void setCartUserId(Long cartUserId) {
 		this.cartUserId=cartUserId;
 	}
-   	
+
 
 	public Integer getCartProductId() {
 		return cartProductId;
 	}
-   	
-   	public void setCartProductId(Integer cartProductId) {
+
+	public void setCartProductId(Integer cartProductId) {
 		this.cartProductId=cartProductId;
 	}
-   	
+
 
 	public Integer getCartSkuId() {
 		return cartSkuId;
 	}
-   	
-   	public void setCartSkuId(Integer cartSkuId) {
+
+	public void setCartSkuId(Integer cartSkuId) {
 		this.cartSkuId=cartSkuId;
 	}
-   	
+
 
 	public Integer getCartNumber() {
 		return cartNumber;
 	}
-   	
-   	public void setCartNumber(Integer cartNumber) {
+
+	public void setCartNumber(Integer cartNumber) {
 		this.cartNumber=cartNumber;
 	}
 
@@ -318,12 +359,18 @@
 
 	public void setShopCoupons(List<ShopCoupon> shopCoupons) {
 		this.shopCoupons=shopCoupons;
-		
+
 	}
 
 	public List<ShopCoupon> getShopCoupons() {
 		return shopCoupons;
 	}
-	
-	
+
+	public Integer getCartType() {
+		return cartType;
+	}
+
+	public void setCartType(Integer cartType) {
+		this.cartType = cartType;
+	}
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopSku.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopSku.java
index 5b504d2..5597740 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopSku.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopSku.java
@@ -12,7 +12,7 @@
  */
 public class ShopSku  extends EntityDTO{
 	@Extend
-	private static final long serialVersionUID = 1L; 
+	private static final long serialVersionUID = 1L;
 
 	
 	/**
@@ -51,9 +51,32 @@
 	private BigDecimal price;
 
 	/**
-	 * 积分
+	 *自购提成
+	 */
+	private BigDecimal selfPrice;
+	/**
+	 *推广提成
+	 */
+	private BigDecimal sealesPrice;
+	/**
+	 *邀请提成
+	 */
+	private BigDecimal invitationPrice;
+
+	/**
+	 * 消费可得积分
 	 */
 	private Integer score;
+
+	/**
+	 * 积分兑换所需支付金额
+	 */
+	private BigDecimal scorePrice;
+	/**
+	 * 积分兑换所需支付积分
+	 */
+	private Integer scoreCount;
+
 
 	/**
 	 * 排序
@@ -81,6 +104,31 @@
 
 	@Extend
 	private String goodsName;
+
+
+	public Integer getScoreCount() {
+		return scoreCount;
+	}
+
+	public void setScoreCount(Integer scoreCount) {
+		this.scoreCount = scoreCount;
+	}
+
+	public BigDecimal getSealesPrice() {
+		return sealesPrice;
+	}
+
+	public void setSealesPrice(BigDecimal sealesPrice) {
+		this.sealesPrice = sealesPrice;
+	}
+
+	public BigDecimal getInvitationPrice() {
+		return invitationPrice;
+	}
+
+	public void setInvitationPrice(BigDecimal invitationPrice) {
+		this.invitationPrice = invitationPrice;
+	}
 
 	public Long getCompanyId() {
 		return companyId;
@@ -225,10 +273,26 @@
 		this.goodsName = goodsName;
 	}
 
+	public BigDecimal getScorePrice() {
+		return scorePrice;
+	}
+
+	public void setScorePrice(BigDecimal scorePrice) {
+		this.scorePrice = scorePrice;
+	}
+
 	@Override
 	public boolean equals(Object obj) {
 		//这里以name为判定标准。
 		return id.equals(((ShopSku) obj).getId());
 	}
 
+	public BigDecimal getSelfPrice() {
+		return selfPrice;
+	}
+
+	public void setSelfPrice(BigDecimal selfPrice) {
+		this.selfPrice = selfPrice;
+	}
+
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopActivitiesDao.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopActivitiesDao.java
index fc86fc5..d4a419b 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopActivitiesDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopActivitiesDao.java
@@ -1,11 +1,16 @@
 package com.matrix.system.shopXcx.dao;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.matrix.core.pojo.PaginationVO;
+import com.matrix.system.activity.dto.ActivitiesListDto;
+import com.matrix.system.activity.vo.ActivitiesListVo;
 import com.matrix.system.shopXcx.api.vo.SalonVO;
+import com.matrix.system.shopXcx.bean.ShopActivities;
 import org.apache.ibatis.annotations.Param;
+
 import java.util.List;
 import java.util.Map;
-import com.matrix.core.pojo.PaginationVO;
-import com.matrix.system.shopXcx.bean.ShopActivities;
 
 /**
  * @description 活动主表
@@ -49,4 +54,9 @@
 	public ShopActivities selectSalonActivityById(@Param("id") Long id);
 
 	public List<ShopActivities> selectSalonActivityByUser(@Param("record") SalonVO salonVO);
+
+	public IPage<ActivitiesListVo> findActivitiesList(Page<ActivitiesListVo> page, @Param("record")ActivitiesListDto activitiesListDto);
+
+	public ShopActivities selectOneByCompanyIdAndActTypeAndActStatus(@Param("companyId")Long companyId, @Param("activitiesTypeSign")int activitiesTypeSign,
+			@Param("actstatusStatusIng")int actstatusStatusIng);
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopCouponDao.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopCouponDao.java
index 589f88f..f92e198 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopCouponDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopCouponDao.java
@@ -58,4 +58,5 @@
 	public List<ShopCoupon> selectHdListByProductId(@Param("productId") Integer productId, @Param("attrIds") List<String> attrIds, @Param("companyId")Long companyId);
 
     ShopCoupon getCouponByTitle(@Param("title")String title, @Param("companyId")Long companyId);
+
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopCouponRecordDao.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopCouponRecordDao.java
index 55c2850..0f316fc 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopCouponRecordDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopCouponRecordDao.java
@@ -39,13 +39,14 @@
 	
 	public ShopCouponRecord  selectForUpdate(Integer id);
 
-	List<CouponReceiveInfoVO> selectMyCouponByUserId(@Param("userId") String userId);
+	List<CouponReceiveInfoVO> selectMyCouponByUserId(@Param("userId") Long userId);
 
 	CouponReceiveInfoVO selectMyCouponByReceiveId(@Param("receiveId") Integer receiveId);
 
-	List<CouponReceiveInfoVO> selectMyCouponByStatus(@Param("companyId") Long shopId, @Param("userId") String userId, @Param("status") Integer status,
+	List<CouponReceiveInfoVO> selectMyCouponByStatus(@Param("companyId") Long shopId, @Param("userId") Long userId, @Param("status") Integer status,
                                                      @Param("pageVo") PaginationVO pageVo);
 
-	List<CouponReceiveInfoVO> selectMyPastCoupon(@Param("companyId")Long shopId, @Param("userId") String userId, @Param("pageVo") PaginationVO pageVo);
+	List<CouponReceiveInfoVO> selectMyPastCoupon(@Param("companyId")Long shopId, @Param("userId") Long userId, @Param("pageVo") PaginationVO pageVo);
 
+	int countUnuseCouponRecord(Long id);
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopDeliveryDetailDao.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopDeliveryDetailDao.java
index d9860f1..96bed1a 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopDeliveryDetailDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopDeliveryDetailDao.java
@@ -8,7 +8,7 @@
 
 /**
  * @description 发货明细
- * @author yourName
+ * @author jyy
  * @date 2019-10-21 15:02
  */
 public interface ShopDeliveryDetailDao{
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopOrderDao.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopOrderDao.java
index 5b4c41c..a161313 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopOrderDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopOrderDao.java
@@ -44,9 +44,9 @@
 	
 	public ShopOrder  selectForUpdate(Integer id);
 
-	List<ShopOrder> selectMyOrderByStatus(@Param("userId") String userId, @Param("params") OrderInfoQueryPOJO orderInfoQueryPOJO);
+	List<ShopOrder> selectMyOrderByStatus(@Param("userId") Long userId, @Param("params") OrderInfoQueryPOJO orderInfoQueryPOJO);
 
-	ShopOrder selectOrderInfoById(@Param("userId") String userId, @Param("id") Integer id);
+	ShopOrder selectOrderInfoById(@Param("userId") Long userId, @Param("id") Integer id);
 
 	public ShopOrder  selectMyOrderById(Integer id);
 
@@ -58,12 +58,7 @@
 	 */
 	List<ShopOrder> selectInPageByQueryOfExcel(@Param("record") ShopOrderQueryPOJO orderQuery, @Param("pageVo") PaginationVO pageVo);
 
-	/**
-	 * 根据用户openID查询消费金额
-	 * @param userId
-	 * @return
-	 */
-	Double selectConsumptionSumByUserId(@Param("userId") String userId);
+
 
 	public List<ShopOrder> selectOrdersByIds(@Param("shopId") Long shopId,@Param("comId") Long comId, @Param("list") List<String> list);
 
@@ -75,7 +70,11 @@
 
 	public int selectShopOrderTotalByApplyId(@Param("applyId") Long applyId);
 
-	public List<Map<String,Object>>  selectOrderStatusCount(String openId);
+	public List<Map<String,Object>>  selectOrderStatusCount(Long userId);
 
 	public int batchUpdateOrderStatus(@Param("list") List<ShopOrder> list);
+
+	public ShopOrder selectShopOrderByOrderNo(@Param("orderNo")String orderNo);
+
+
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopOrderV2Dao.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopOrderV2Dao.java
new file mode 100644
index 0000000..b49ab03
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopOrderV2Dao.java
@@ -0,0 +1,20 @@
+package com.matrix.system.shopXcx.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.matrix.system.shopXcx.bean.ShopOrder;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @description 订单表
+ */
+public interface ShopOrderV2Dao extends BaseMapper<ShopOrder> {
+
+	/** 统计已收货订单数 */
+	int selectReceivedOrderCount(Long userId);
+	/** 统计已收货订单金额 */
+	Double countOrderAmount(Long userId);
+
+	/** 统计是否消费过了指定产品 */
+	int countBuyZdcp(@Param("userId") Long userId, @Param("productIds")String productIds);
+
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopPageDao.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopPageDao.java
index af81228..62a630e 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopPageDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopPageDao.java
@@ -8,7 +8,7 @@
 
 /**
  * @description 小程序页面
- * @author yourName
+ * @author jyy
  * @date 2020-04-03 14:56
  */
 public interface ShopPageDao{
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopQrcordVisitorDao.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopQrcordVisitorDao.java
index 2248fd1..52b5a34 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopQrcordVisitorDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopQrcordVisitorDao.java
@@ -8,7 +8,7 @@
 
 /**
  * @description 二维码访问记录
- * @author yourName
+ * @author jyy
  * @date 2019-09-18 09:42
  */
 public interface ShopQrcordVisitorDao{
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopScoreRecordDao.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopScoreRecordDao.java
deleted file mode 100644
index 9475abe..0000000
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopScoreRecordDao.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.matrix.system.shopXcx.dao;
-
-import org.apache.ibatis.annotations.Param;
-import java.util.List;
-import java.util.Map;
-import com.matrix.core.pojo.PaginationVO;
-import com.matrix.system.shopXcx.bean.ShopScoreRecord;
-
-/**
- * @description 用户积分获取记录
- * @author jyy
- * @date 2019-08-09 15:10
- */
-public interface ShopScoreRecordDao{
-
-	public int insert(@Param("item") ShopScoreRecord shopScoreRecord);
-   	
-   	public int batchInsert(@Param("list") List<ShopScoreRecord> shopScoreRecordList);
-   	
-	public int updateByMap(Map<String, Object> modifyMap);
-	
-	public int updateByModel(@Param("record") ShopScoreRecord shopScoreRecord);
-	
-	public int deleteByIds(@Param("list") List<String> list);
-	
-	public int deleteById(Integer id);
-
-	public int deleteByModel(@Param("record") ShopScoreRecord shopScoreRecord);
-	
-	public List<ShopScoreRecord> selectInPage(@Param("record") ShopScoreRecord shopScoreRecord, @Param("pageVo") PaginationVO pageVo);
-
-	public List<ShopScoreRecord> selectByModel(@Param("record") ShopScoreRecord shopScoreRecord);
-	
-	public int selectTotalRecord(@Param("record") ShopScoreRecord shopScoreRecord);
-	
-	public ShopScoreRecord  selectById(Integer id);
-	
-	public ShopScoreRecord  selectForUpdate(Integer id);
-	
-}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopShareQrcordDao.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopShareQrcordDao.java
index 70f5611..785fc05 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopShareQrcordDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopShareQrcordDao.java
@@ -9,7 +9,7 @@
 
 /**
  * @description 分享二维码
- * @author yourName
+ * @author jyy
  * @date 2019-09-18 09:42
  */
 public interface ShopShareQrcordDao{
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopShoppingCartDao.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopShoppingCartDao.java
index bc4a432..b31b054 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopShoppingCartDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopShoppingCartDao.java
@@ -36,15 +36,15 @@
 	
 	public ShopShoppingCart  selectById(Integer cartId);
 
-	public List<ShopShoppingCart> selectByCartUserId(@Param("shopId")Long shopId, @Param("cartUserId") String cartUserId);
+	public List<ShopShoppingCart> selectByCartUserId(@Param("shopId")Long shopId, @Param("cartUserId") Long cartUserId);
 	
 	public ShopShoppingCart  selectForUpdate(Integer cartId);
 
 	public ShopShoppingCart selectBuyLimit(@Param("cartProductId") Integer cartProductId,@Param("cartSkuId") Integer cartSkuId);
 
-	public Integer selectUserCartCount(@Param("shopId")Long shopId, @Param("openId")String openId);
+	public Integer selectUserCartCount(@Param("shopId")Long shopId, @Param("userId")Long userId);
 
-	public int updateAllSelected(@Param("openId") String openId,@Param("shopId") Long shopId, @Param("isSelected") Integer isSelected);
+	public int updateAllSelected(@Param("openId") String openId, @Param("shopId") Long shopId,  @Param("isSelected") Integer isSelected);
 
 	/**
 	 * 删除用户选中的购物车明细
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/dto/CreateGroupBuyDTO.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/dto/CreateGroupBuyDTO.java
index 3f5f706..b0c67a9 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/dto/CreateGroupBuyDTO.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/dto/CreateGroupBuyDTO.java
@@ -1,7 +1,10 @@
 package com.matrix.system.shopXcx.dto;
 
+import lombok.Data;
+
 import java.math.BigDecimal;
 
+@Data
 public class CreateGroupBuyDTO {
 
     /**
@@ -54,111 +57,9 @@
 
     private BigDecimal price;
 
-    private String openId;
+    private Long userId;
 
     private int goodsId;
 
-    public String getOpenId() {
-        return openId;
-    }
 
-    public void setOpenId(String openId) {
-        this.openId = openId;
-    }
-
-    public int getGoodsId() {
-        return goodsId;
-    }
-
-    public void setGoodsId(int goodsId) {
-        this.goodsId = goodsId;
-    }
-
-    public BigDecimal getPrice() {
-        return price;
-    }
-
-    public void setPrice(BigDecimal price) {
-        this.price = price;
-    }
-
-    public int getJoinType() {
-        return joinType;
-    }
-
-    public void setJoinType(int joinType) {
-        this.joinType = joinType;
-    }
-
-    public Long getGpId() {
-        return gpId;
-    }
-
-    public void setGpId(Long gpId) {
-        this.gpId = gpId;
-    }
-
-    public Long getActId() {
-        return actId;
-    }
-
-    public void setActId(Long actId) {
-        this.actId = actId;
-    }
-
-    public Integer getAddressId() {
-        return addressId;
-    }
-
-    public void setAddressId(Integer addressId) {
-        this.addressId = addressId;
-    }
-
-    public Long getShopId() {
-        return shopId;
-    }
-
-    public void setShopId(Long shopId) {
-        this.shopId = shopId;
-    }
-
-    public String getShippingMethod() {
-        return shippingMethod;
-    }
-
-    public void setShippingMethod(String shippingMethod) {
-        this.shippingMethod = shippingMethod;
-    }
-
-    public Long getGjId() {
-        return gjId;
-    }
-
-    public void setGjId(Long gjId) {
-        this.gjId = gjId;
-    }
-
-    public Integer getSkuId() {
-        return skuId;
-    }
-
-    public void setSkuId(Integer skuId) {
-        this.skuId = skuId;
-    }
-
-    public Integer getCount() {
-        return count;
-    }
-
-    public void setCount(Integer count) {
-        this.count = count;
-    }
-
-    public String getRemarks() {
-        return remarks;
-    }
-
-    public void setRemarks(String remarks) {
-        this.remarks = remarks;
-    }
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/dto/DiscountExplain.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/dto/DiscountExplain.java
index fb48cdf..a9519aa 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/dto/DiscountExplain.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/dto/DiscountExplain.java
@@ -1,10 +1,13 @@
 package com.matrix.system.shopXcx.dto;
 
+import lombok.Data;
+
 import java.math.BigDecimal;
 
 /**
  * 订单优惠说明
  */
+@Data
 public class DiscountExplain {
 
     /**
@@ -15,13 +18,13 @@
     /**
      * 优惠券金额
      */
-    private  BigDecimal coupon=BigDecimal.ZERO;
+    private  BigDecimal couponPrice =BigDecimal.ZERO;
 
 
     /**
      * 活动满减金额
      */
-    private BigDecimal activity=BigDecimal.ZERO;
+    private BigDecimal activityPrice =BigDecimal.ZERO;
 
     /**
      * 运费
@@ -32,44 +35,9 @@
      * 最终支付金额
      */
     private BigDecimal payPrice=BigDecimal.ZERO;
+    /**
+     * 最终支付积分
+     */
+    private Integer scorePay;
 
-    public BigDecimal getBillPrice() {
-        return billPrice;
-    }
-
-    public void setBillPrice(BigDecimal billPrice) {
-        this.billPrice = billPrice;
-    }
-
-    public BigDecimal getCoupon() {
-        return coupon;
-    }
-
-    public void setCoupon(BigDecimal coupon) {
-        this.coupon = coupon;
-    }
-
-    public BigDecimal getActivity() {
-        return activity;
-    }
-
-    public void setActivity(BigDecimal activity) {
-        this.activity = activity;
-    }
-
-    public BigDecimal getPostage() {
-        return postage;
-    }
-
-    public void setPostage(BigDecimal postage) {
-        this.postage = postage;
-    }
-
-    public BigDecimal getPayPrice() {
-        return payPrice;
-    }
-
-    public void setPayPrice(BigDecimal payPrice) {
-        this.payPrice = payPrice;
-    }
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/MQTaskRouting.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/MQTaskRouting.java
index 861de97..8bd67c4 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/MQTaskRouting.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/MQTaskRouting.java
@@ -8,6 +8,8 @@
     String CREATE_VIP = "CREATE_VIP";
 
     String CREATE_ORDER = "CREATE_ORDER";
+    String SALES_ORDER = "SALES_ORDER";
+    String SCORE_ORDER = "SCORE_ORDER";
     /**
      * 发送微信消息
      */
@@ -17,6 +19,10 @@
      * 发送小程序统一模板消息
      */
     String SEND_UNIFORM_TEMPLATE_MSG = "SEND_UNIFORM_TEMPLATE_MSG";
+    /**
+     * 订单退款
+     */
+    String SHOP_ORDER_REFUND = "SHOP_ORDER_REFUND";
 
     /**
      * 订单出库
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/OrderTask.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/OrderTask.java
index 2c9ff6d..a8bb1a0 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/OrderTask.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/OrderTask.java
@@ -1,18 +1,19 @@
 package com.matrix.system.shopXcx.mqTask;
 
 
-import com.matrix.biz.bean.BizUser;
-import com.matrix.biz.service.BizUserService;
 import com.matrix.core.tools.LogUtil;
 import com.matrix.core.tools.StringUtils;
 import com.matrix.system.common.constance.AppConstance;
 import com.matrix.system.common.dao.BusParameterSettingsDao;
 import com.matrix.system.constance.Dictionary;
+import com.matrix.system.fenxiao.dao.ShopSalesmanGradeDao;
+import com.matrix.system.fenxiao.dao.ShopSalesmanOrderDao;
 import com.matrix.system.hive.bean.*;
 import com.matrix.system.hive.dao.*;
 import com.matrix.system.hive.service.CodeService;
 import com.matrix.system.hive.service.ShoppingGoodsService;
 import com.matrix.system.hive.service.SysOrderService;
+import com.matrix.system.hive.service.SysVipInfoService;
 import com.matrix.system.shopXcx.bean.ShopOrder;
 import com.matrix.system.shopXcx.bean.ShopOrderDetails;
 import com.matrix.system.shopXcx.bean.ShopSku;
@@ -42,7 +43,7 @@
     ShopOrderDetailsDao shopOrderDetailsDao;
 
     @Autowired
-    BizUserService bizUserService;
+    SysVipInfoService sysVipInfoService;
 
 
     @Autowired
@@ -78,8 +79,14 @@
     @Autowired
     private ShoppingGoodsDao shoppingGoodsDao;
 
+    @Autowired
+    private ShopSalesmanOrderDao shopSalesmanOrderDao;
+
+    @Autowired
+    private ShopSalesmanGradeDao shopSalesmanGradeDao;
+
     @Transactional(rollbackFor = Exception.class)
-    public void createOrder(ShopOrder orderDto) {
+    public void synchronizationOrderToErp(ShopOrder orderDto) {
 
         //判断是否存在需要同步的产品,只有绑定了erp中产品的才同步
         boolean needTb=false;
@@ -91,10 +98,8 @@
         }
         if(needTb){
 
-            BizUser bizUser = bizUserService.findByOpenId(orderDto.getUserId());
+            SysVipInfo vipInfo = sysVipInfoService.findById(orderDto.getUserId());
             SysOrder order = new SysOrder();
-            //TODO 根据公司id区分
-            SysVipInfo vipInfo = vipDao.selectByPhone(bizUser.getPhoneNumber());
             if(SysVipInfo.UNDEAL_VIP==vipInfo.getIsDeal()){
                 //非成交客户下单更新客户为成交客户
                 vipInfo.setIsDeal(SysVipInfo.DEAL_VIP);
@@ -117,7 +122,7 @@
             order.setTotal(orderDto.getOrderMoney().doubleValue());
             order.setZkTotal(orderDto.getOrderMoney().doubleValue());
             order.setPayTime(new Date());
-            order.setArrears(0);
+            order.setArrears(0D);
             int i = sysOrderDao.insert(order);
             // 创建订单明细,并计算总价与折扣总价
             int count = 0;
@@ -237,7 +242,9 @@
         //获取订单详情
         List<ShopOrderDetails> orderDetails = shopOrderDetailsDao.selectByOrderId(Integer.valueOf(orderId));
         order.setDetails(orderDetails);
-        createOrder(order);
+        //同步订单到erp
+        synchronizationOrderToErp(order);
 
     }
+
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/SalesOrderRefundTask.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/SalesOrderRefundTask.java
new file mode 100644
index 0000000..d7eab53
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/SalesOrderRefundTask.java
@@ -0,0 +1,68 @@
+package com.matrix.system.shopXcx.mqTask;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.matrix.core.tools.LogUtil;
+import com.matrix.system.fenxiao.dao.ShopSalesmanOrderDao;
+import com.matrix.system.fenxiao.entity.ShopSalesmanOrder;
+import com.matrix.system.score.entity.ScoreVipDetail;
+import com.matrix.system.score.service.ScoreVipDetailService;
+import com.matrix.system.shopXcx.bean.ShopOrder;
+import com.matrix.system.shopXcx.dao.ShopOrderDao;
+import com.matrix.system.shopXcx.dao.ShopOrderDetailsDao;
+import com.rabbitmq.client.DeliverCallback;
+import com.rabbitmq.client.Delivery;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.io.IOException;
+
+/**
+ * 分销订单退款
+ */
+@Component
+public class SalesOrderRefundTask implements DeliverCallback {
+
+
+    @Autowired
+    private ShopSalesmanOrderDao shopSalesmanOrderDao;
+
+    @Autowired
+        private ShopOrderDao shopOrderDao;
+
+    @Autowired
+    private ScoreVipDetailService scoreVipDetailService;
+
+    @Autowired
+    ShopOrderDetailsDao shopOrderDetailsDao;
+
+
+    @Override
+    public void handle(String consumerTag, Delivery message) throws IOException {
+
+        String orderId = new String(message.getBody(), "UTF-8");
+        LogUtil.debug("收到分销订单退款任务orderId={}", orderId);
+        QueryWrapper queryWrapper=new QueryWrapper();
+        queryWrapper.eq("order_id",orderId);
+        ShopSalesmanOrder shopSalesmanOrder = shopSalesmanOrderDao.selectOne(queryWrapper);
+        if(shopSalesmanOrder!=null){
+            shopSalesmanOrder.setOrderStatus(ShopSalesmanOrder.STATUS_YTK);
+            shopSalesmanOrderDao.updateById(shopSalesmanOrder);
+        }else{
+            LogUtil.debug("改订单为生成分销订单={}", orderId);
+        }
+        ShopOrder order=shopOrderDao.selectById(Integer.parseInt(orderId));
+
+        //如果是积分支付则需要返还积分
+        if(order.getScorePay()!=null && order.getScorePay()>0){
+            LogUtil.debug("处理积分退款={}", orderId);
+            scoreVipDetailService.refundScore(order.getUserId(),order.getScorePay(),Long.parseLong(order.getId()+""), ScoreVipDetail.SCORE_VIP_TYPE_CASH);
+        }
+
+        //消费获得积分返还,如果本订单获得了积分则要扣除获得积分
+        scoreVipDetailService.removeByBusinessId(order.getUserId(),Long.parseLong(order.getId()+""));
+
+
+    }
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/SalesOrderTask.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/SalesOrderTask.java
new file mode 100644
index 0000000..26957ad
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/SalesOrderTask.java
@@ -0,0 +1,241 @@
+package com.matrix.system.shopXcx.mqTask;
+
+
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.matrix.core.constance.MatrixConstance;
+import com.matrix.core.tools.LogUtil;
+import com.matrix.system.common.bean.BusParameterSettings;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
+import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant;
+import com.matrix.system.fenxiao.dao.ShopSalesmanGradeDao;
+import com.matrix.system.fenxiao.dao.ShopSalesmanOrderDao;
+import com.matrix.system.fenxiao.entity.ShopSalesmanGrade;
+import com.matrix.system.fenxiao.entity.ShopSalesmanOrder;
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.hive.dao.SysOrderDao;
+import com.matrix.system.hive.dao.SysOrderItemDao;
+import com.matrix.system.hive.dao.SysVipInfoDao;
+import com.matrix.system.hive.service.CodeService;
+import com.matrix.system.hive.service.ShoppingGoodsService;
+import com.matrix.system.hive.service.SysOrderService;
+import com.matrix.system.hive.service.SysVipInfoService;
+import com.matrix.system.shopXcx.bean.ShopOrder;
+import com.matrix.system.shopXcx.bean.ShopOrderDetails;
+import com.matrix.system.shopXcx.bean.ShopProduct;
+import com.matrix.system.shopXcx.dao.ShopOrderDao;
+import com.matrix.system.shopXcx.dao.ShopOrderDetailsDao;
+import com.matrix.system.shopXcx.dao.ShopSkuDao;
+import com.rabbitmq.client.DeliverCallback;
+import com.rabbitmq.client.Delivery;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.io.IOException;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 分销订单创建
+ */
+@Component
+public class SalesOrderTask implements DeliverCallback {
+
+
+    @Autowired
+    ShopOrderDao shopOrderDao;
+    @Autowired
+    ShopOrderDetailsDao shopOrderDetailsDao;
+
+    @Autowired
+    SysVipInfoService sysVipInfoService;
+
+
+    @Autowired
+    private SysVipInfoDao vipDap;
+
+    @Autowired
+    SysVipInfoDao vipDao;
+
+    @Autowired
+    CodeService codeService;
+
+    @Autowired
+    SysOrderDao sysOrderDao;
+
+    @Autowired
+    ShoppingGoodsService shoppingGoodsService;
+
+    @Autowired
+    SysOrderItemDao orderItemDao;
+
+    @Autowired
+    SysOrderService orderService;
+
+    @Autowired
+    ShopSkuDao shopSkuDao;
+
+    @Autowired
+    BusParameterSettingsDao parameterSettingsDao;
+
+
+    @Autowired
+    private ShopSalesmanOrderDao shopSalesmanOrderDao;
+
+    @Autowired
+    private ShopSalesmanGradeDao shopSalesmanGradeDao;
+
+
+
+    @Override
+    public void handle(String consumerTag, Delivery message) throws IOException {
+
+        String orderId = new String(message.getBody(), "UTF-8");
+        LogUtil.debug("收到分销订单任务orderId={}", orderId);
+        //获取订单信息
+        ShopOrder order = shopOrderDao.selectById(Integer.valueOf(orderId));
+        //获取订单详情
+        List<ShopOrderDetails> orderDetails = shopOrderDetailsDao.selectByOrderId(Integer.valueOf(orderId));
+        order.setDetails(orderDetails);
+        //处理分销订单
+        handleExtensionOrder(order);
+
+    }
+
+    /**
+     * 处理分销订单
+     * @param order
+     */
+    @Transactional
+    void handleExtensionOrder(ShopOrder order) {
+        //判读客户是否存在上级,存在则产生上级的收益
+        SysVipInfo sysVipInfo = sysVipInfoService.findById(order.getUserId());
+        LogUtil.debug("处理分销订单userOpid={}",sysVipInfo.getOpenId());
+        //判断是否重复生成
+        QueryWrapper queryWrapper=new QueryWrapper();
+        queryWrapper.eq("order_id",order.getId());
+        Integer orderCount = shopSalesmanOrderDao.selectCount(queryWrapper);
+        if(orderCount==0){
+            ShopSalesmanOrder salesmanOrder=new ShopSalesmanOrder();
+            salesmanOrder.setCompanyId(order.getCompanyId());
+            salesmanOrder.setCreateBy(MatrixConstance.SYSTEM_USER);
+            salesmanOrder.setUpdateBy(MatrixConstance.SYSTEM_USER);
+            salesmanOrder.setCreateTime(new Date());
+            salesmanOrder.setUpdateTime(new Date());
+            salesmanOrder.setOrderId(Long.parseLong(order.getId()+""));
+            salesmanOrder.setUserId(order.getUserId());
+            salesmanOrder.setRevenueType(ShopSalesmanOrder.REVENUE_TYPE_SALES);
+            salesmanOrder.setOrderStatus(ShopSalesmanOrder.STATUS_DJS);
+        	Double selfAmount=0D;
+            Double zk=1D;
+            //分销订单总额
+            Double orderTotal=0D;
+            for (ShopOrderDetails item:order.getDetails() ){
+                if(item.getShopProduct().getAbleSales()==ShopProduct.ABLE_SALES){
+                	orderTotal+=item.getTotalPrice().doubleValue();
+                }
+            }
+            //自购返佣
+            Integer isSales = sysVipInfo.getIsSales();
+            if(SysVipInfo.IS_SALES == isSales){
+                for (ShopOrderDetails item:order.getDetails() ){
+                    if(item.getShopProduct().getAbleSales()==ShopProduct.ABLE_SALES){
+                        //分销规则是否开启自购返佣
+                        BusParameterSettings zgfy = parameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_ZGFY, sysVipInfo.getCompanyId());
+                        //按分销等级计算
+                        ShopSalesmanGrade shopSalesmanGrade = shopSalesmanGradeDao.selectById(sysVipInfo.getSalesmanGrade());
+                        if(ObjectUtil.isNotEmpty(zgfy)) {
+                            //获取商品的自购返佣价格,如果没有设置,在去获取当前推广人的等级的自购返佣比例
+                            if(StrUtil.isNotEmpty(zgfy.getParamValue()) &&
+                                    FenxiaoSettingConstant.FX_ZGFY_YES.equals(zgfy.getParamValue())) {
+                                if(item.getShopSku().getSelfPrice() == null
+                                        ||item.getShopSku().getSealesPrice().doubleValue() == 0){
+                                    selfAmount+=item.getTotalPrice().doubleValue()*(shopSalesmanGrade.getSelfCommission()/100);
+                                }else {
+                                    //按产品设置的自购返佣金额计算
+                                    selfAmount+=item.getShopSku().getSelfPrice().doubleValue()*item.getCount();
+                                }
+                            }
+                        }
+                    }
+                }
+                //自购返佣记录
+                if(selfAmount > 0) {
+                    //整体的优惠金额折算成折扣,* 佣金
+                    zk=order.getOrderMoney().doubleValue()/orderTotal;
+                    selfAmount=selfAmount*zk;
+                    salesmanOrder.setAmount(selfAmount);
+                    salesmanOrder.setSalesUserId(order.getUserId());
+                    shopSalesmanOrderDao.insert(salesmanOrder);
+                }
+            }
+
+            //存在上级
+            if(sysVipInfo.getRecommendId()!=null) {
+            	SysVipInfo salesMan=sysVipInfoService.findById(sysVipInfo.getRecommendId());
+                Double salesAmount=0D;
+                Double invitationAmount=0D;
+            	SysVipInfo invitationMan=null;
+            	ShopSalesmanOrder invitationOrder=null;
+            	boolean hasInvitationMan=salesMan.getRecommendId()!=null;
+            	//判断推广员是否还存在上级,存在则计算邀请收益
+            	if(hasInvitationMan){
+            		invitationMan=sysVipInfoService.findById(salesMan.getRecommendId());
+            		invitationOrder=new ShopSalesmanOrder();
+            		BeanUtils.copyProperties(salesmanOrder,invitationOrder);
+            		invitationOrder.setSalesUserId(invitationMan.getId());
+            		invitationOrder.setRevenueType(ShopSalesmanOrder.REVENUE_TYPE_INVITATION);
+            	}
+            	//收益计算
+                for (ShopOrderDetails item:order.getDetails() ){
+                    if(item.getShopProduct().getAbleSales()==ShopProduct.ABLE_SALES){
+                        //按分销等级计算
+                        ShopSalesmanGrade shopSalesmanGrade = shopSalesmanGradeDao.selectById(salesMan.getSalesmanGrade());
+                        //推广提成,按分销等级计算或者按产品设置的推广金额计算
+                        if(item.getShopSku().getSealesPrice()==null
+                                ||item.getShopSku().getSealesPrice().doubleValue()==0){
+                            salesAmount+=item.getTotalPrice().doubleValue()*(shopSalesmanGrade.getSealesCommission()/100);
+                        }else{
+                            salesAmount+=item.getShopSku().getSealesPrice().doubleValue()*item.getCount();
+                        }
+                        //邀请提成,获取商品的邀请提成价格和是否有上级推广人,如果没有设置,在去获取当前推广人的等级的自购返佣比例
+                        if(hasInvitationMan) {
+                        	if(item.getShopSku().getInvitationPrice() == null
+                                    ||item.getShopSku().getInvitationPrice().doubleValue() == 0){
+                            	//获取上级的推广等级设置
+                            	ShopSalesmanGrade invitationManGrade = shopSalesmanGradeDao.selectById(invitationMan.getSalesmanGrade());
+                                invitationAmount+=item.getTotalPrice().doubleValue()*(invitationManGrade.getInvitationCommission()/100);
+                            }else {
+                            	//按产品设置的邀请提成价格计算
+                            	invitationAmount+=item.getShopSku().getInvitationPrice().doubleValue()*item.getCount();
+                            }
+                        }
+                    }
+                }
+                //推广提成记录
+                if(salesAmount>0){
+                    //整体的优惠金额折算成折扣,* 佣金
+                    zk=order.getOrderMoney().doubleValue()/orderTotal;
+                    salesAmount=salesAmount*zk;
+                    salesmanOrder.setAmount(salesAmount);
+                    salesmanOrder.setSalesUserId(sysVipInfo.getRecommendId());
+                    shopSalesmanOrderDao.insert(salesmanOrder);
+                }
+                //邀请提成记录
+                if(invitationAmount > 0) {
+                	//整体的优惠金额折算成折扣,* 佣金
+                	invitationAmount=invitationAmount*zk;
+                    invitationOrder.setAmount(invitationAmount);
+                    shopSalesmanOrderDao.insert(invitationOrder);
+                } 
+            }else{
+                LogUtil.debug("不存在父级userOpid={}",sysVipInfo.getOpenId());
+            }
+        }else{
+            LogUtil.debug("重复订单id={}",order.getId());
+        }
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/ScoreOrderTask.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/ScoreOrderTask.java
new file mode 100644
index 0000000..0ad9e03
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/ScoreOrderTask.java
@@ -0,0 +1,141 @@
+package com.matrix.system.shopXcx.mqTask;
+
+
+import com.matrix.core.tools.LogUtil;
+import com.matrix.core.tools.StringUtils;
+import com.matrix.system.common.bean.BusParameterSettings;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.hive.dao.SysVipInfoDao;
+import com.matrix.system.hive.service.SysVipInfoService;
+import com.matrix.system.score.constant.ScoreSettingConstant;
+import com.matrix.system.score.entity.ScoreVipDetail;
+import com.matrix.system.score.service.ScoreVipDetailService;
+import com.matrix.system.shopXcx.bean.ShopOrder;
+import com.matrix.system.shopXcx.bean.ShopOrderDetails;
+import com.matrix.system.shopXcx.dao.ShopOrderDao;
+import com.matrix.system.shopXcx.dao.ShopOrderDetailsDao;
+import com.rabbitmq.client.DeliverCallback;
+import com.rabbitmq.client.Delivery;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * 订单创建积分事件处理
+ */
+@Component
+public class ScoreOrderTask implements DeliverCallback {
+
+
+    @Autowired
+    ShopOrderDao shopOrderDao;
+    @Autowired
+    ShopOrderDetailsDao shopOrderDetailsDao;
+
+    @Autowired
+    SysVipInfoService sysVipInfoService;
+
+
+    @Autowired
+    ScoreVipDetailService scoreVipDetailService;
+
+    @Autowired
+    BusParameterSettingsDao busParameterSettingsDao;
+
+    @Autowired
+    SysVipInfoDao sysVipInfoDao;
+
+    @Override
+    public void handle(String consumerTag, Delivery message) throws IOException {
+
+        String orderId = new String(message.getBody(), "UTF-8");
+        LogUtil.debug("收到订单积分任务orderId={}", orderId);
+        //获取订单信息
+        ShopOrder order = shopOrderDao.selectById(Integer.valueOf(orderId));
+        //获取订单详情
+        List<ShopOrderDetails> orderDetails = shopOrderDetailsDao.selectByOrderId(Integer.valueOf(orderId));
+        order.setDetails(orderDetails);
+        //扣除积分
+        if (order.getScorePay() != null && order.getScorePay() > 0) {
+            scoreVipDetailService.deductionScore(order.getUserId(), null,
+                    Long.parseLong(order.getStoreId() + ""), order.getScorePay(),
+                    Long.parseLong(order.getId() + ""), ScoreVipDetail.SCORE_VIP_TYPE_CASH, "商城积分抵扣");
+        } else {
+
+            //消费获得积分
+            int addScore = 0;
+            BusParameterSettings cashConsumptionShop = busParameterSettingsDao.selectCompanyParamByCode(ScoreSettingConstant.CASH_CONSUMPTION_SHOP, order.getCompanyId());
+            for (ShopOrderDetails shopOrderDetail : orderDetails) {
+                if (shopOrderDetail.getPayType() == ShopOrderDetails.PAYTYPE_MICRO) {
+                    Integer xfkdScore = shopOrderDetail.getShopSku().getScore();
+                    if (xfkdScore != null && xfkdScore > 0) {
+                        addScore += xfkdScore;
+                    } else {
+                        if (StringUtils.isNotBlank(cashConsumptionShop.getParamValue())) {
+                            addScore += shopOrderDetail.getTotalPrice().divide(new BigDecimal(cashConsumptionShop.getParamValue())).intValue();
+                        }
+                    }
+                }
+            }
+            if (addScore > 0) {
+                //插入新的积分
+                scoreVipDetailService.addScore(
+                        order.getUserId(),
+                        null,
+                        Long.parseLong(order.getStoreId() + ""),
+                        addScore,
+                        Long.parseLong(orderId + ""),
+                        ScoreVipDetail.SCORE_VIP_TYPE_CASH,
+                        "微商城消费");
+
+                //插入上级积分
+                SysVipInfo vipInfo = sysVipInfoService.findById(order.getUserId());
+
+
+                if (vipInfo.getRecommendId() != null) {
+                    //推荐注册老带新积分奖励
+                    SysVipInfo referrerVip = sysVipInfoDao.selectById(vipInfo.getRecommendId());
+                    if (StringUtils.isNotBlank(cashConsumptionShop.getParamValue1())) {
+
+                        int parentScore = order.getOrderMoney().divide(new BigDecimal(cashConsumptionShop.getParamValue1())).intValue();
+                        if (parentScore > 0) {
+                            scoreVipDetailService.addScore(
+                                    referrerVip.getId(),
+                                    null,
+                                    Long.parseLong(order.getStoreId() + ""),
+                                    parentScore,
+                                    Long.parseLong(order.getId() + ""),
+                                    ScoreVipDetail.SCORE_VIP_TYPE_CASH,
+                                    "推荐消费奖励"
+                            );
+                        }
+                    }
+
+                    //推荐注册二级带新积分奖励
+                    if (referrerVip.getRecommendId() != null && StringUtils.isNotBlank(cashConsumptionShop.getParamValue2())) {
+                        SysVipInfo topVipInfo = sysVipInfoDao.selectById(referrerVip.getRecommendId());
+                        int topParentScore = order.getOrderMoney().divide(new BigDecimal(cashConsumptionShop.getParamValue2())).intValue();
+                        if (topParentScore > 0) {
+                            scoreVipDetailService.addScore(
+                                    topVipInfo.getId(),
+                                    null,
+                                    Long.parseLong(order.getStoreId() + ""),
+                                    topParentScore,
+                                    Long.parseLong(order.getId() + ""),
+                                    ScoreVipDetail.SCORE_VIP_TYPE_CASH,
+                                    "推荐消费奖励"
+                            );
+                        }
+                    }
+                }
+            }
+        }
+
+
+    }
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/VipCreateTask.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/VipCreateTask.java
deleted file mode 100644
index 67b5bbb..0000000
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/VipCreateTask.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package com.matrix.system.shopXcx.mqTask;
-
-
-import com.matrix.biz.bean.BizUser;
-import com.matrix.biz.service.BizUserService;
-import com.matrix.component.rabbitmq.MqTask;
-import com.matrix.core.tools.LogUtil;
-import com.matrix.core.tools.StringUtils;
-import com.matrix.system.constance.Dictionary;
-import com.matrix.system.hive.bean.SysShopInfo;
-import com.matrix.system.hive.bean.SysVipInfo;
-import com.matrix.system.hive.dao.SysShopInfoDao;
-import com.matrix.system.hive.dao.SysVipInfoDao;
-import com.matrix.system.hive.plugin.util.CollectionUtils;
-import com.rabbitmq.client.DeliverCallback;
-import com.rabbitmq.client.Delivery;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import java.io.IOException;
-import java.util.List;
-
-public class VipCreateTask implements DeliverCallback {
-
-    @Autowired
-    BizUserService bizUserService;
-
-    @Autowired
-    SysShopInfoDao shopInfoDao;
-
-    @Autowired
-    private SysVipInfoDao vipDap;
-
-    //TODO 用户可以都归属一个电商店铺,发货的时候指定仓库出货,微商城的产品可以绑定仓库库存
-
-    @Override
-    public void handle(String consumerTag, Delivery message) throws IOException {
-        try {
-            String messages = new String(message.getBody(), "UTF-8");
-
-            String userId=messages.split(",")[0];
-            Long shopId=Long.parseLong(messages.split(",")[1]);
-
-            BizUser userInfo = bizUserService.findByOpenId(userId);
-
-            // TODO 校验用户是否已存在 , 公司id不能写死
-            SysVipInfo vip = vipDap.selectByPhone(userInfo.getPhoneNumber());
-            if (vip != null) {
-                LogUtil.warn("会员{}已经存在", userInfo.getPhoneNumber());
-                //更新信息
-                vip.setOpenId(userInfo.getOpenId());
-                if(StringUtils.isBlank(vip.getPhoto())){
-                    vip.setPhoto(userInfo.getAvatarUrl());
-                }
-                vipDap.update(vip);
-            } else {
-                SysVipInfo vipInfo = new SysVipInfo();
-                //在备注记下微商城的用户id
-                vipInfo.setOpenId(userInfo.getOpenId());
-                vipInfo.setAddr(userInfo.getProvince() + " " + userInfo.getCity());
-                vipInfo.setPhone(userInfo.getPhoneNumber());
-                if(StringUtils.isBlank(vipInfo.getPhoto())){
-                    vipInfo.setPhoto(userInfo.getAvatarUrl());
-                }
-                if (userInfo.getGender() != null) {
-                    vipInfo.setSex(userInfo.getGender().equals("1") ? "男" : "女");
-                }
-                vipInfo.setVipName(userInfo.getNickName());
-                vipInfo.setCompanyId(userInfo.getCompanyId());
-                vipInfo.setShopId(shopId);
-                vipInfo.setArrivalWay("微商城");
-                vipInfo.setVipState(Dictionary.VIP_STATE_HY);
-                vipInfo.setVipType(Dictionary.VIP_TYPE_NOCARD);
-                vipInfo.setIsDeal(SysVipInfo.UNDEAL_VIP);
-                vipDap.insert(vipInfo);
-            }
-        } catch (Exception e) {
-            LogUtil.error("消费者执行异常", e);
-        }
-
-    }
-}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/pojo/ShopOrderQueryPOJO.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/pojo/ShopOrderQueryPOJO.java
index 83cdfcd..db93b0b 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/pojo/ShopOrderQueryPOJO.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/pojo/ShopOrderQueryPOJO.java
@@ -19,6 +19,10 @@
      * 开始时间
      */
     private String orderBeginTime;
+    /**
+     * 开始时间
+     */
+    private String orderTime;
 
     /**
      * 结束时间
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityGroupJoinTimeOutQuartz.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityGroupJoinTimeOutQuartz.java
index 07927b5..fd0d99e 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityGroupJoinTimeOutQuartz.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityGroupJoinTimeOutQuartz.java
@@ -1,19 +1,14 @@
 package com.matrix.system.shopXcx.quartz;
 
 import com.matrix.core.tools.LogUtil;
-import com.matrix.core.tools.WebUtil;
-
 import com.matrix.system.hive.plugin.util.CollectionUtils;
 import com.matrix.system.shopXcx.bean.ShopActivities;
 import com.matrix.system.shopXcx.bean.ShopActivitiesGroupInfo;
 import com.matrix.system.shopXcx.bean.ShopActivitiesGroupJoin;
 import com.matrix.system.shopXcx.dao.ShopActivitiesDao;
 import com.matrix.system.shopXcx.dao.ShopActivitiesGroupJoinDao;
-
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.scheduling.annotation.Scheduled;
 
 import java.util.List;
@@ -24,7 +19,6 @@
  * @author wzy
  */
 @Configuration
-@EnableScheduling
 public class ShopActivityGroupJoinTimeOutQuartz {
 
     @Autowired
@@ -33,13 +27,11 @@
     @Autowired
     private ShopActivitiesDao shopActivitiesDao ;
 
-    @Value("${scheduling.enabled}")
-    private boolean taskSwitch;
+
 
 
     @Scheduled(cron = "0 */1 * * * ?")
     public boolean executeExt() {
-        if (taskSwitch) {
             LogUtil.info("#开团时间超时任务处理#");
             List<ShopActivitiesGroupJoin> groupJoins = shopActivitiesGroupJoinDao.selectGroupJoinWithEnd();
             ShopActivityTimeOutQuartz timeOutQuartz = new ShopActivityTimeOutQuartz();
@@ -53,7 +45,6 @@
                         timeOutQuartz.doUnVirtualGroup(groupJoin);
                     }
                 }
-            }
         }
         return true;
     }
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityPayTimeOutQuartz.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityPayTimeOutQuartz.java
index 143a2d2..3f85cd5 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityPayTimeOutQuartz.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityPayTimeOutQuartz.java
@@ -1,7 +1,6 @@
 package com.matrix.system.shopXcx.quartz;
 
 import com.matrix.core.tools.LogUtil;
-import com.matrix.core.tools.WebUtil;
 import com.matrix.system.hive.plugin.util.CollectionUtils;
 import com.matrix.system.shopXcx.bean.ShopActivitiesGroupJoin;
 import com.matrix.system.shopXcx.bean.ShopActivitiesGroupJoinUser;
@@ -9,11 +8,8 @@
 import com.matrix.system.shopXcx.dao.ShopActivitiesGroupJoinDao;
 import com.matrix.system.shopXcx.dao.ShopActivitiesGroupJoinUserDao;
 import com.matrix.system.shopXcx.dao.ShopOrderDao;
-
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.scheduling.annotation.Scheduled;
 
 import java.util.List;
@@ -24,7 +20,6 @@
  * @author wzy
  */
 @Configuration
-@EnableScheduling
 public class ShopActivityPayTimeOutQuartz {
 
     @Autowired
@@ -36,13 +31,11 @@
     @Autowired
     private ShopActivitiesGroupJoinDao shopActivitiesGroupJoinDao;
 
-    @Value("${scheduling.enabled}")
-    private boolean taskSwitch;
 
 
     @Scheduled(cron = "0 */1 * * * ?")
     public void executeExt() {
-        if (taskSwitch) {
+
             LogUtil.info("#拼团支付超时处理任务#");
             List<ShopActivitiesGroupJoinUser> joinUserList = shopActivitiesGroupJoinUserDao.selectGroupJoinUserEnd();
             if (CollectionUtils.isNotEmpty(joinUserList)) {
@@ -63,7 +56,7 @@
                     shopOrder.setOrderStatus(ShopOrder.ORDER_STATUS_CANCEL);
                     shopOrderDao.updateByModel(shopOrder);
                 }
-            }
+
         }
     }
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityTimeOutQuartz.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityTimeOutQuartz.java
index ae48bc2..1075d98 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityTimeOutQuartz.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityTimeOutQuartz.java
@@ -1,18 +1,15 @@
 package com.matrix.system.shopXcx.quartz;
 
 import com.matrix.component.tools.WxUtils;
+import com.matrix.core.constance.MatrixConstance;
 import com.matrix.core.tools.LogUtil;
-import com.matrix.core.tools.WebUtil;
 import com.matrix.system.common.constance.AppConstance;
 import com.matrix.system.hive.plugin.util.CollectionUtils;
 import com.matrix.system.shopXcx.api.service.WxShopRefundRecordService;
 import com.matrix.system.shopXcx.bean.*;
 import com.matrix.system.shopXcx.dao.*;
-
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.scheduling.annotation.Scheduled;
 
 import java.util.ArrayList;
@@ -25,7 +22,6 @@
  * @author wzy
  */
 @Configuration
-@EnableScheduling
 public class ShopActivityTimeOutQuartz {
 
     @Autowired
@@ -41,13 +37,11 @@
     @Autowired
     private ShopActivitiesGroupJoinUserDao shopActivitiesGroupJoinUserDao;
 
-    @Value("${scheduling.enabled}")
-    private boolean taskSwitch;
 
 
     @Scheduled(cron = "0 */1 * * * ?")
     public void executeExt() {
-        if (taskSwitch) {
+
             LogUtil.info("#拼团活动自动结束任务#");
             List<ShopActivities> actList = shopActivitiesDao.selectShopActivitiesHasEnd();
             if (CollectionUtils.isNotEmpty(actList)) {
@@ -66,7 +60,7 @@
                     }
                 }
             }
-        }
+
     }
 
     /**
@@ -121,8 +115,8 @@
                 if (joinUser.getIsHasPay() == ShopActivitiesGroupJoinUser.IS_HAS_PAY_Y) {
                     LogUtil.info("#已付款退款逻辑#");
                     ShopRefundRecord refundRecord = new ShopRefundRecord();
-                    refundRecord.setCreateBy(joinUser.getUserId());
-                    refundRecord.setUpdateBy(joinUser.getUserId());
+                    refundRecord.setCreateBy(MatrixConstance.SYSTEM_USER);
+                    refundRecord.setUpdateBy(MatrixConstance.SYSTEM_USER);
                     refundRecord.setUserId(joinUser.getUserId());
                     refundRecord.setRefundNo(WxUtils.getOrderNum());
                     refundRecord.setOrderId(joinUser.getOrderId().intValue());
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopAutomaticReceiveQuartz.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopAutomaticReceiveQuartz.java
index bcf6a1a..a842add 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopAutomaticReceiveQuartz.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopAutomaticReceiveQuartz.java
@@ -1,18 +1,15 @@
 package com.matrix.system.shopXcx.quartz;
 
 import com.matrix.core.tools.LogUtil;
-import com.matrix.core.tools.WebUtil;
 import com.matrix.system.shopXcx.api.tools.WxShopOrderUtil;
 import com.matrix.system.shopXcx.bean.ShopDeliveryInfo;
 import com.matrix.system.shopXcx.bean.ShopOrder;
 import com.matrix.system.shopXcx.dao.ShopDeliveryInfoDao;
 import com.matrix.system.shopXcx.dao.ShopOrderDao;
 import org.apache.commons.collections.CollectionUtils;
-
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.scheduling.annotation.Scheduled;
 
 import java.util.HashMap;
@@ -24,11 +21,7 @@
  * 15天自动确认收货定时任务
  */
 @Configuration
-@EnableScheduling
 public class ShopAutomaticReceiveQuartz {
-
-    @Value("${scheduling.enabled}")
-    private boolean taskSwitch;
 
     @Autowired
     private ShopDeliveryInfoDao shopDeliveryInfoDao;
@@ -41,9 +34,9 @@
 
     @Scheduled(cron = "0/30 * * * * ?")
     public void executeExt() {
-        if(taskSwitch) {
 
 
+            LogUtil.info("#15天自动收货任务处理#");
 
             List<ShopDeliveryInfo> shopDeliveryInfos = shopDeliveryInfoDao.selectAutomaticReceive();
             int flag = 0;
@@ -59,7 +52,7 @@
                 }
             }
             LogUtil.info("自动确认收货更新条数:" + flag);
-        }
+
     }
 
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopCouponQuartz.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopCouponQuartz.java
index 25e4314..22dac6b 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopCouponQuartz.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopCouponQuartz.java
@@ -1,13 +1,9 @@
 package com.matrix.system.shopXcx.quartz;
 
 import com.matrix.core.tools.LogUtil;
-import com.matrix.core.tools.WebUtil;
 import com.matrix.system.shopXcx.dao.ShopCouponDao;
-
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.scheduling.annotation.Scheduled;
 
 /**
@@ -15,24 +11,18 @@
  * 优惠券定时任务
  */
 @Configuration
-@EnableScheduling
 public class ShopCouponQuartz   {
 
 
 
-    @Value("${scheduling.enabled}")
-    private boolean taskSwitch;
 
     @Autowired
     private ShopCouponDao shopCouponDao;
 
     @Scheduled(cron = "0 */1 * * * ?")
     public void executeExt() {
-        if(taskSwitch){
-            int i = shopCouponDao.updateAllCouponStatus();
-            LogUtil.info("优惠券状态更新条数:" + i);
-        }
-
+        int i = shopCouponDao.updateAllCouponStatus();
+        LogUtil.info("优惠券状态更新条数:" + i);
     }
 
 
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/vo/LogisticsImportVo.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/vo/LogisticsImportVo.java
new file mode 100644
index 0000000..5630c47
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/vo/LogisticsImportVo.java
@@ -0,0 +1,20 @@
+package com.matrix.system.shopXcx.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "LogisticsImportVo", description = "信息返回类")
+public class LogisticsImportVo {
+    @ApiModelProperty(value = "订单号")
+    private String orderNo;
+    @ApiModelProperty(value = "快递公司编码")
+    private String logisticsCompanyCode;
+    @ApiModelProperty(value = "快递公司名称")
+    private String logisticsCompany;
+    @ApiModelProperty(value = "快递单号")
+    private String waybillNo;
+    @ApiModelProperty(value = "失败原因")
+    private String failReason;
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/vo/SalesOrderVo.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/vo/SalesOrderVo.java
new file mode 100644
index 0000000..69de0e7
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/vo/SalesOrderVo.java
@@ -0,0 +1,47 @@
+package com.matrix.system.shopXcx.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.util.Date;
+
+@Data
+@ApiModel(value = "SalesOrderVo", description = " 推广订单信息返回类")
+public class SalesOrderVo {
+
+
+    @ApiModelProperty(value = "订单id")
+    private Long  orderId ;
+
+    @ApiModelProperty(value = "创建时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createTime;
+
+    @ApiModelProperty(value = "昵称")
+    private String nickName;
+
+    @ApiModelProperty(value = "头像")
+    private String avatarUrl;
+
+    @ApiModelProperty(value = "订单编号")
+    private String  orderNo;
+
+    @ApiModelProperty(value = "收益金额")
+    private Double  amount;
+
+    @ApiModelProperty(value = "订单金额")
+    private Double  orderMoney;
+
+
+    @ApiModelProperty(value = " 收益类型1,推广收益,2邀请收益")
+    private Integer  revenueType;
+
+    @ApiModelProperty(value = " 结算状态1,待结算,2,已结算,3已退款")
+    private Integer  orderStatus;
+
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/vo/SalesmanApplyCondition.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/vo/SalesmanApplyCondition.java
new file mode 100644
index 0000000..6444d14
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/vo/SalesmanApplyCondition.java
@@ -0,0 +1,35 @@
+package com.matrix.system.shopXcx.vo;
+
+import com.matrix.system.shopXcx.bean.ShopProduct;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+@ApiModel(value = "SalesmanApplyCondition", description = " 销售员申请条件")
+public class SalesmanApplyCondition {
+
+    @ApiModelProperty(value = "是否满足申请条件")
+    private Boolean isAbleApply;
+
+
+
+    @ApiModelProperty(value = "申请条件")
+    private String condition;
+
+    @ApiModelProperty(value = "条件验证结果")
+    private String msg;
+
+
+    @ApiModelProperty(value = "产品信息")
+    private List<ShopProduct> productList;
+
+
+    @ApiModelProperty(value = "最底消费金额")
+    private Double minAmount ;
+
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/vo/SalesmanCenterInfo.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/vo/SalesmanCenterInfo.java
new file mode 100644
index 0000000..7d41aee
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/vo/SalesmanCenterInfo.java
@@ -0,0 +1,45 @@
+package com.matrix.system.shopXcx.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "SalesmanCenterInfo", description = " 销售员中心返回参数")
+public class SalesmanCenterInfo {
+
+    @ApiModelProperty(value = "累计收益")
+    private String totalRevenue;
+
+
+    @ApiModelProperty(value = "分销佣金")
+    private String salesRevenue;
+
+    @ApiModelProperty(value = "邀请奖励")
+    private String invitationRevenue;
+
+
+
+    @ApiModelProperty(value = "待结算收益")
+    private String djsRevenue;
+
+
+    @ApiModelProperty(value = "可提现金额")
+    private String  withdrawalCash;
+
+
+    @ApiModelProperty(value = "邀请订单数")
+    private String  invitationOrderCount;
+
+    @ApiModelProperty(value = "推广订单数")
+    private String  salesorderCount;
+
+
+    @ApiModelProperty(value = "客户数")
+    private Double   customerCount;
+
+    @ApiModelProperty(value = "邀请下级数")
+    private Double   invitationCount;
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/vo/SalesmanVo.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/vo/SalesmanVo.java
new file mode 100644
index 0000000..02d7fbb
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/vo/SalesmanVo.java
@@ -0,0 +1,31 @@
+package com.matrix.system.shopXcx.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "SalesmanVo", description = " 销售员信息返回参数类")
+public class SalesmanVo {
+
+    @ApiModelProperty(value = "昵称")
+    private String nickName;
+
+
+    @ApiModelProperty(value = "头像")
+    private String avatarUrl;
+
+
+    @ApiModelProperty(value = "手机号码")
+    private String  phone;
+
+    @ApiModelProperty(value = "贡献订单数")
+    private String  orderCount;
+
+
+    @ApiModelProperty(value = "贡献收益")
+    private Double   revenueAmount;
+
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/Task/UniformMsgSentTask.java b/zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/Task/UniformMsgSentTask.java
index 7196340..01a5eca 100644
--- a/zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/Task/UniformMsgSentTask.java
+++ b/zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/Task/UniformMsgSentTask.java
@@ -2,8 +2,8 @@
 
 
 import com.alibaba.fastjson.JSONObject;
-import com.matrix.biz.bean.BizUser;
-import com.matrix.biz.service.BizUserService;
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.hive.service.SysVipInfoService;
 import com.matrix.component.tools.HttpClientUtil;
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.core.tools.LogUtil;
diff --git a/zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/Task/messageBulderDemo/DefaultTemplateMessageBulder.java b/zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/Task/messageBulderDemo/DefaultTemplateMessageBulder.java
index d917a1e..acc9a64 100644
--- a/zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/Task/messageBulderDemo/DefaultTemplateMessageBulder.java
+++ b/zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/Task/messageBulderDemo/DefaultTemplateMessageBulder.java
@@ -1,8 +1,8 @@
 package com.matrix.system.wechart.templateMsg.Task.messageBulderDemo;
 
 import com.alibaba.fastjson.JSONObject;
-import com.matrix.biz.bean.BizUser;
-import com.matrix.biz.dao.BizUserDao;
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.hive.dao.SysVipInfoDao;
 import com.matrix.core.tools.DateUtil;
 import com.matrix.core.tools.StringUtils;
 import com.matrix.system.hive.bean.SysBeauticianState;
diff --git a/zq-erp/src/main/resources/config/application.properties b/zq-erp/src/main/resources/config/application.properties
index 0c7163b..9d8a8ef 100644
--- a/zq-erp/src/main/resources/config/application.properties
+++ b/zq-erp/src/main/resources/config/application.properties
@@ -4,9 +4,13 @@
 
 #线上测试环境
 
-spring.datasource.username=ct_test
-spring.datasource.password=123456
-spring.datasource.url=jdbc:mysql://120.27.238.55:3306/hive_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
+#spring.datasource.username=ct_test
+#spring.datasource.password=123456
+#spring.datasource.url=jdbc:mysql://120.27.238.55:3306/hive_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
+
+spring.datasource.username=xc_shop
+spring.datasource.password=xc_shop123!@#
+spring.datasource.url=jdbc:mysql://124.70.222.34/xc_shop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
 
 
 
@@ -25,8 +29,6 @@
 spring.datasource.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
 spring.thymeleaf.prefix: classpath:/templates/views/
 spring.thymeleaf.cache=false
-mybatis.config-location=classpath:mybatis/mybatis-config.xml
-mybatis.mapper-locations=classpath*:mybatis/mapper/*/*.xml
 #设置全局时间返回格式 第三行设置为true表示返回时间戳
 #spring.jackson.date-format=yyyy-MM-dd
 #spring.jackson.time-zone=GMT+8
@@ -57,7 +59,7 @@
 groupBuy.pay.timeLimit=30
 
 #定时任务
-scheduling.enabled=false
+scheduling.enabled=true
 
 swagger.enable=true
 swagger.security.username=admin
@@ -67,3 +69,5 @@
 default.vip.photo.woman=https://filehive2.jyymatrix.cc/uploadeFile/20210125/db53552e688040afb286686f081e1e68f3fe946f75624598828f01898635152e.png
 default.vip.photo.man=https://filehive2.jyymatrix.cc/uploadeFile/20210125/3642f1d827c44c76832fea106c85e0f89e089c16cbcc4dd0a82bb52b9ac700f4.png
 
+mybatis-plus.config-location=classpath:mybatis/mybatis-config.xml
+mybatis-plus.mapper-locations=classpath*:mybatis/mapper/**/*.xml
diff --git a/zq-erp/src/main/resources/config/config.json b/zq-erp/src/main/resources/config/config.json
index 1b5f059..e308302 100644
--- a/zq-erp/src/main/resources/config/config.json
+++ b/zq-erp/src/main/resources/config/config.json
@@ -8,7 +8,7 @@
     "imageCompressEnable": true, /* 是否压缩图片,默认是true */
     "imageCompressBorder": 1600, /* 图片压缩最长边限制 */
     "imageInsertAlign": "none", /* 插入的图片浮动方式 */
-    "imageUrlPrefix": "http://resource.hive.jyymatrix.cc/uploadeFile", /* 图片访问路径前缀 */
+    "imageUrlPrefix": "http://testfile.hive.jyymatrix.cc/uploadeFile", /* 图片访问路径前缀 */
     "imagePathFormat": "/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
                                 /* {filename} 会替换成原文件名,配置这项需要注意中文乱码问题 */
                                 /* {rand:6} 会替换成随机数,后面的数字是随机数的位数 */
@@ -28,13 +28,13 @@
     "scrawlFieldName": "upfile", /* 提交的图片表单名称 */
     "scrawlPathFormat": "/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
     "scrawlMaxSize": 2048000, /* 上传大小限制,单位B */
-    "scrawlUrlPrefix": "http://resource.hive.jyymatrix.cc/uploadeFile", /* 图片访问路径前缀 */
+    "scrawlUrlPrefix": "http://testfile.hive.jyymatrix.cc/uploadeFile", /* 图片访问路径前缀 */
     "scrawlInsertAlign": "none",
 
     /* 截图工具上传 */
     "snapscreenActionName": "uploadimage", /* 执行上传截图的action名称 */
     "snapscreenPathFormat": "/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
-    "snapscreenUrlPrefix": "http://resource.hive.jyymatrix.cc/uploadeFile", /* 图片访问路径前缀 */
+    "snapscreenUrlPrefix": "http://testfile.hive.jyymatrix.cc/uploadeFile", /* 图片访问路径前缀 */
     "snapscreenInsertAlign": "none", /* 插入的图片浮动方式 */
 
     /* 抓取远程图片配置 */
@@ -42,7 +42,7 @@
     "catcherActionName": "catchimage", /* 执行抓取远程图片的action名称 */
     "catcherFieldName": "source", /* 提交的图片列表表单名称 */
     "catcherPathFormat": "/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
-    "catcherUrlPrefix": "http://resource.hive.jyymatrix.cc/uploadeFile", /* 图片访问路径前缀 */
+    "catcherUrlPrefix": "http://testfile.hive.jyymatrix.cc/uploadeFile", /* 图片访问路径前缀 */
     "catcherMaxSize": 2048000, /* 上传大小限制,单位B */
     "catcherAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 抓取图片格式显示 */
 
diff --git "a/zq-erp/src/main/resources/config/db/increment/\346\216\250\345\271\277\345\221\230.sql" "b/zq-erp/src/main/resources/config/db/increment/\346\216\250\345\271\277\345\221\230.sql"
new file mode 100644
index 0000000..dd70f9d
--- /dev/null
+++ "b/zq-erp/src/main/resources/config/db/increment/\346\216\250\345\271\277\345\221\230.sql"
@@ -0,0 +1,243 @@
+ALTER TABLE `biz_user`
+    ADD COLUMN `withdrawal_cash` double(20, 2) NULL COMMENT '可提现金额' AFTER `fenxiao_state`,
+    ADD COLUMN `salesman_grade` bigint(20) NULL COMMENT '推广员等级' AFTER `withdrawal_cash`;
+
+ALTER TABLE `shop_sku`
+    ADD COLUMN `seales_price` decimal(20, 2) NULL COMMENT '推广提成' AFTER `company_id`,
+ADD COLUMN `invitation_price` decimal(20, 2) NULL COMMENT '邀请提成' AFTER `seales_price`;
+
+ALTER TABLE  `bus_parameter_settings`
+    MODIFY COLUMN `param_value3` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL AFTER `param_value2`;
+
+
+/**
+ * 分销单明细
+ * @author yourName
+ * @date 2021-03-12 13:17
+ */
+CREATE TABLE shop_salesman_order_item(
+                                         create_by varchar(100) NOT NULL COMMENT '创建人',
+                                         create_time datetime NOT NULL COMMENT '创建时间',
+                                         update_by varchar(100) NOT NULL COMMENT '更新人',
+                                         update_time datetime NOT NULL COMMENT '更新时间',
+                                         id bigint(20)   NOT NULL  AUTO_INCREMENT  COMMENT '主键',
+
+                                         order_id  bigint(20)    COMMENT '订单id',
+
+                                         salesman_order_id bigint(20)    COMMENT '分销订单id',
+
+                                         order_item_id bigint(20)    COMMENT '订单明细id',
+
+                                         amount double(20,2)    COMMENT '收益金额',
+
+PRIMARY KEY(id)
+)ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='分销单明细';
+
+/**
+ * 收益流水
+ * @author yourName
+ * @date 2021-03-10 17:34
+ */
+CREATE TABLE shop_revenue_flow(
+                                  create_by varchar(100) NOT NULL COMMENT '创建人',
+                                  create_time datetime NOT NULL COMMENT '创建时间',
+                                  update_by varchar(100) NOT NULL COMMENT '更新人',
+                                  update_time datetime NOT NULL COMMENT '更新时间',
+                                  id bigint(20)   NOT NULL  AUTO_INCREMENT  COMMENT '主键',
+
+                                  user_id varchar(100)    COMMENT '用户id',
+
+                                  revenue_content varchar(40)    COMMENT '收益说明',
+
+                                  amount double(20,2)    COMMENT '收益金额',
+
+ business_id bigint(20)    COMMENT '原始订单ID',
+
+ company_id bigint(20)    COMMENT '公司ID',
+
+PRIMARY KEY(id)
+)ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='收益流水';
+
+
+/**
+ * 订单结算记录
+ * @author yourName
+ * @date 2021-03-10 17:34
+ */
+CREATE TABLE shop_saleman_settlement(
+                                        create_by varchar(100) NOT NULL COMMENT '创建人',
+                                        create_time datetime NOT NULL COMMENT '创建时间',
+                                        update_by varchar(100) NOT NULL COMMENT '更新人',
+                                        update_time datetime NOT NULL COMMENT '更新时间',
+                                        id bigint(20)   NOT NULL  AUTO_INCREMENT  COMMENT '主键',
+
+                                        order_no varchar(40)    COMMENT '结算编号',
+
+                                        settlement_way int(2)    COMMENT '结算方式1,线下结算,2余额结算',
+
+                                        man_count int(11)    COMMENT '结算人数',
+
+                                        order_count int(11)    COMMENT '结算单数',
+
+                                        amount double(20,2)    COMMENT '结算金额',
+
+ user_id int(11)    COMMENT '结算人',
+
+ remark varchar(400)    COMMENT '备注',
+
+ company_id bigint(20)    COMMENT '公司ID',
+
+PRIMARY KEY(id)
+)ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='订单结算记录';
+
+
+
+/**
+ * 推广员申请记录
+ * @author yourName
+ * @date 2021-03-10 17:34
+ */
+CREATE TABLE shop_salesman_apply(
+                                    create_by varchar(100) NOT NULL COMMENT '创建人',
+                                    create_time datetime NOT NULL COMMENT '创建时间',
+                                    update_by varchar(100) NOT NULL COMMENT '更新人',
+                                    update_time datetime NOT NULL COMMENT '更新时间',
+                                    id bigint(20)   NOT NULL  AUTO_INCREMENT  COMMENT '主键',
+
+                                    apply_way int(2)    COMMENT '申请方式1、自主申请,2、自动添加,3上级邀请,4、手动添加',
+
+                                    user_id varchar(100)    COMMENT '申请用户id',
+
+                                    parent_user_id varchar(100)    COMMENT '邀请用户ID',
+
+                                    apply_status int(2)    COMMENT '申请状态1、待审核,2通过,3未通过',
+
+                                    remark varchar(4000)    COMMENT '备注',
+
+                                    company_id bigint(20)    COMMENT '公司ID',
+
+                                    PRIMARY KEY(id)
+)ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='推广员申请记录';
+
+
+/**
+ * 推广员等级
+ * @author yourName
+ * @date 2021-03-10 17:34
+ */
+CREATE TABLE shop_salesman_grade(
+                                    create_by varchar(100) NOT NULL COMMENT '创建人',
+                                    create_time datetime NOT NULL COMMENT '创建时间',
+                                    update_by varchar(100) NOT NULL COMMENT '更新人',
+                                    update_time datetime NOT NULL COMMENT '更新时间',
+                                    id bigint(20)   NOT NULL  AUTO_INCREMENT  COMMENT '主键',
+
+                                    name varchar(200)    COMMENT '等级名称',
+
+                                    seales_commission double(20,2)    COMMENT '推广提成%',
+
+ invitation_commission double(20,2)    COMMENT '邀请提成 %',
+
+ grade_condition double(20,2)    COMMENT '等级条件(推广金额额)',
+
+ is_default int(2)    COMMENT '默认等级1是,2不是',
+
+ company_id bigint(20)    COMMENT '公司ID',
+
+PRIMARY KEY(id)
+)ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='推广员等级';
+
+
+
+/**
+ * 分销订单
+ * @author yourName
+ * @date 2021-03-10 17:34
+ */
+CREATE TABLE shop_salesman_order(
+                                    create_by varchar(100) NOT NULL COMMENT '创建人',
+                                    create_time datetime NOT NULL COMMENT '创建时间',
+                                    update_by varchar(100) NOT NULL COMMENT '更新人',
+                                    update_time datetime NOT NULL COMMENT '更新时间',
+                                    id bigint(20)   NOT NULL  AUTO_INCREMENT  COMMENT '主键',
+
+                                    order_id  bigint(20)    COMMENT '订单id',
+
+                                    user_id varchar(100)    COMMENT '用户id',
+
+                                    sales_user_id varchar(100)    COMMENT '收益人id',
+
+                                    revenue_type int(2)    COMMENT '收益类型1,推广收益,2邀请收益',
+
+                                    amount double(20,2)    COMMENT '收益金额',
+
+ order_status int(2)    COMMENT '结算状态',
+
+ settlement_id bigint(20)    COMMENT '结算单ID',
+
+ company_id bigint(20)    COMMENT '公司ID',
+
+PRIMARY KEY(id)
+)ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='分销订单';
+
+biz_user原来的userId改成了自增长的bigint
+
+
+ALTER TABLE `shop_sku`
+    ADD COLUMN `score_price` decimal(10, 2) NULL COMMENT '积分兑换价格' AFTER `invitation_price`;
+
+ALTER TABLE `shop_product`
+    ADD COLUMN `score_category_id` bigint(20) NULL COMMENT '积分商城分类ID' AFTER `company_id`,
+ADD COLUMN `able_sales` int(2) NULL COMMENT '是否为分销产品1是2不是' AFTER `score_category_id`,
+ADD COLUMN `able_score_pay` int(2) NULL COMMENT '是否可用积分支付1是2不是' AFTER `able_sales`;
+
+ALTER TABLE `shop_shopping_cart`
+    ADD COLUMN `cart_type` int(2) NOT NULL COMMENT '购物车类型 1微商城  2积分商城' AFTER `company_id`;
+
+update shop_product set able_score_pay=1;
+update shop_product set able_sales=2;
+
+ALTER TABLE `shop_sku`
+    MODIFY COLUMN `score_price` decimal(10, 2) NULL DEFAULT NULL COMMENT '兑换所需支付价格' AFTER `invitation_price`,
+    ADD COLUMN `score_count` decimal(10, 2) NULL COMMENT '兑换所需积分数量' AFTER `score_price`;
+
+ALTER TABLE `shop_order_details`
+    ADD COLUMN `pay_type` int(2) NULL COMMENT '支付方式1 直接购买 2,积分兑换' AFTER `company_id`,
+ADD COLUMN `score_count` decimal(20, 2) NULL COMMENT '支付积分单价' AFTER `pay_type`,
+ADD COLUMN `total_score_count` decimal(20, 2) NULL COMMENT '支付总积分' AFTER `score_count`;
+
+ALTER TABLE `shop_order`
+ADD COLUMN `score_pay` int(20) NULL COMMENT '支付积分' AFTER `company_id`;
+
+
+ALTER TABLE `shop_advertis`
+    ADD COLUMN `page_id` bigint(0) NULL COMMENT '连接页面' AFTER `company_id`;
+
+ALTER TABLE `shop_sku`
+DROP COLUMN `self_price`,
+ADD COLUMN `self_price`  decimal(20,2) NULL AFTER `score_count`;
+
+ALTER TABLE `shop_salesman_grade`
+DROP COLUMN `self_commission`,
+ADD COLUMN `self_commission`  double(20,2) NULL COMMENT '自购返佣比例%' AFTER `company_id`;
+
+
+ALTER TABLE `money_card_use_flow`
+ADD COLUMN `pay_no`  varchar(32) NULL COMMENT '微信充值订单号';
+
+
+ALTER TABLE `shop_order`
+    ADD COLUMN `pay_method`  int(2) NULL COMMENT '支付方式1微信,2 vipCard余额';
+update shop_order set pay_method=1;
+
+ALTER TABLE `sys_vip_info`
+    ADD COLUMN `fenxiao_state` int(11) NULL DEFAULT NULL COMMENT '分销审核状态' AFTER `recommend_id`,
+ADD COLUMN `withdrawal_cash` double(20, 2) NULL DEFAULT NULL COMMENT '可提现金额' AFTER `fenxiao_state`,
+ADD COLUMN `salesman_grade` bigint(20) NULL DEFAULT NULL COMMENT '推广员等级' AFTER `withdrawal_cash`,
+ADD COLUMN `is_sales` int(1) NULL DEFAULT NULL AFTER `salesman_grade`,
+ADD COLUMN `user_is_authorize` datetime(0) NULL DEFAULT NULL AFTER `is_sales`,
+ADD COLUMN `binding_parent_time` datetime(0) NULL DEFAULT NULL AFTER `user_is_authorize`,
+ADD COLUMN `country` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL AFTER `binding_parent_time`,
+ADD COLUMN `gender` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL AFTER `country`,
+ADD COLUMN `nick_name` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL AFTER `gender`,
+ADD COLUMN `avatar_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL AFTER `nick_name`;
diff --git "a/zq-erp/src/main/resources/config/db/increment/\347\255\276\345\210\260\346\264\273\345\212\250.sql" "b/zq-erp/src/main/resources/config/db/increment/\347\255\276\345\210\260\346\264\273\345\212\250.sql"
new file mode 100644
index 0000000..966c947
--- /dev/null
+++ "b/zq-erp/src/main/resources/config/db/increment/\347\255\276\345\210\260\346\264\273\345\212\250.sql"
@@ -0,0 +1,203 @@
+
+/**
+ * 奖品设置表
+ * @author yourName
+ * @date 2021-03-31 16:57
+ */
+ CREATE TABLE activity_sign_award_set(
+  create_by varchar(100) NOT NULL COMMENT '创建人',
+  create_time datetime NOT NULL COMMENT '创建时间',
+  update_by varchar(100) NOT NULL COMMENT '更新人',
+  update_time datetime NOT NULL COMMENT '更新时间',
+ id bigint(20)   NOT NULL  AUTO_INCREMENT  COMMENT '主键',
+ 
+ award_type int(4)    COMMENT '奖项类型(1:自定义产品2:积分3:优惠券4:店铺商品)',
+ 
+ award_rule int(4)    COMMENT '奖项规则(1:每日奖励(默认)2:累计签到天数)',
+ 
+ cumulative_day int(4)    COMMENT '签到累计天数',
+ 
+ award_name varchar(100)    COMMENT '奖项名称',
+ 
+ introduce_img varchar(500)    COMMENT '图片介绍',
+ 
+ introduce_tip varchar(500)    COMMENT '文字介绍',
+ 
+ award_inventory_cnt int(4)    COMMENT '奖项库存数量',
+ 
+ award_distribute_cnt int(4)    COMMENT '已派发数量',
+ 
+ award_way int(4)    COMMENT '兑奖方式(1:线下兑换2:物流配送3:客服兑换)',
+ 
+ operation_tip varchar(500)    COMMENT '操作提示',
+ 
+ prize_address varchar(500)    COMMENT '兑奖地址',
+ 
+ prize_start_time datetime    COMMENT '兑奖期限开始日期',
+ 
+ prize_end_time datetime    COMMENT '兑奖期限结束日期',
+ 
+ wechat_img varchar(500)    COMMENT '客服微信',
+ 
+ score_cnt int(4)    COMMENT '积分数量',
+ 
+ coupon_id varchar(100)    COMMENT '优惠券ID',
+ 
+ goods_id varchar(100)    COMMENT '商品ID',
+ 
+ activity_id bigint(20)    COMMENT '活动主表ID',
+ 
+ company_id bigint(20)    COMMENT '公司ID',
+ 
+PRIMARY KEY(id)
+)ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='奖品设置表';
+
+
+
+/**
+ * 领
+ * @author yourName
+ * @date 2021-03-31 16:57
+ */
+ CREATE TABLE activity_sign_receive_record(
+  create_by varchar(100) NOT NULL COMMENT '创建人',
+  create_time datetime NOT NULL COMMENT '创建时间',
+  update_by varchar(100) NOT NULL COMMENT '更新人',
+  update_time datetime NOT NULL COMMENT '更新时间',
+ id bigint(20)   NOT NULL  AUTO_INCREMENT  COMMENT '主键',
+ 
+ open_id varchar(100)    COMMENT 'openID',
+ 
+ receive_time datetime    COMMENT '领取时间',
+ 
+ remark varchar(500)    COMMENT '备注',
+ 
+ award_id bigint(20)    COMMENT '奖品设置表ID',
+ 
+ state int(4)    COMMENT '是否已领取(1:待领取2:已领取)',
+ 
+ write_off_code varchar(100)    COMMENT '核销码',
+ 
+ activity_id bigint(20)    COMMENT '活动主表ID',
+ 
+ company_id bigint(20)    COMMENT '公司ID',
+ 
+PRIMARY KEY(id)
+)ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='领取记录表';
+
+
+
+
+/**
+ * 签到记录表
+ * @author yourName
+ * @date 2021-03-31 16:57
+ */
+ CREATE TABLE activity_sign_record(
+  create_by varchar(100) NOT NULL COMMENT '创建人',
+  create_time datetime NOT NULL COMMENT '创建时间',
+  update_by varchar(100) NOT NULL COMMENT '更新人',
+  update_time datetime NOT NULL COMMENT '更新时间',
+ id bigint(20)   NOT NULL  AUTO_INCREMENT  COMMENT '主键',
+ 
+ open_id varchar(100)    COMMENT 'openID',
+ 
+ sign_time datetime    COMMENT '签到时间',
+ 
+ cumulative_day int(4)    COMMENT '累计签到天数',
+ 
+ activity_id bigint(20)    COMMENT '活动主表ID',
+ 
+ company_id bigint(20)    COMMENT '公司ID',
+ 
+PRIMARY KEY(id)
+)ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='签到记录表';
+
+ALTER TABLE `shop_activities`
+    ADD COLUMN `act_code`  varchar(200) NULL COMMENT '活动编码' AFTER `id`;
+
+ALTER TABLE `activity_sign_award_set`
+    ADD COLUMN `award_state`  int(4) NULL COMMENT '奖品是否有效(1:有效 2:无效)' AFTER `company_id`;
+
+ALTER TABLE `activity_sign_award_set`
+    ADD COLUMN `goods_name`  varchar(200) NULL COMMENT '产品名称' AFTER `coupon_id`;
+
+ALTER TABLE `activity_sign_award_set`
+    ADD COLUMN `coupon_name`  varchar(200) NULL COMMENT '优惠券名' AFTER `score_cnt`;
+
+ALTER TABLE `activity_sign_record`
+    CHANGE COLUMN `open_id` `user_id`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'openID' AFTER `id`;
+
+ALTER TABLE `activity_sign_receive_record`
+    CHANGE COLUMN `open_id` `user_id`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'openID' AFTER `id`;
+	
+	/**
+ * 核销记录
+ * @author yourName
+ * @date 2021-04-08 14:25
+ */
+ CREATE TABLE activity_sign_writeoff(
+  create_by varchar(100) NOT NULL COMMENT '创建人',
+  create_time datetime NOT NULL COMMENT '创建时间',
+  update_by varchar(100) NOT NULL COMMENT '更新人',
+  update_time datetime NOT NULL COMMENT '更新时间',
+ id bigint(20)   NOT NULL  AUTO_INCREMENT  COMMENT '主键',
+ 
+ writeoff_time datetime    COMMENT '核销时间',
+ 
+ writeoff_user varchar(100)    COMMENT '核销员',
+ 
+ writeoff_code varchar(100)    COMMENT '兑奖码',
+ 
+ act_id bigint(20)    COMMENT '活动ID',
+ 
+ award_id bigint(20)    COMMENT '奖品ID',
+ 
+ win_time datetime    COMMENT '中奖时间',
+ 
+ state int(4)    COMMENT '状态',
+ 
+ user_id bigint(20)    COMMENT '中奖者ID',
+ 
+ logistics_id bigint(20)    COMMENT '物流ID',
+ 
+ receive_id bigint(20)    COMMENT '中奖记录ID',
+ 
+ company_id bigint(20)    COMMENT '公司ID',
+ 
+ shop_id bigint(20)    COMMENT '店铺ID',
+ 
+ writeoff_userid bigint(20)    COMMENT '核销员ID',
+ 
+PRIMARY KEY(id)
+)ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='核销记录';
+
+ALTER TABLE `activity_sign_receive_record`
+ADD COLUMN `consignee`  varchar(200) NULL COMMENT '收货人' AFTER `user_id`;
+
+ALTER TABLE `activity_sign_receive_record`
+ADD COLUMN `consignee_phone`  varchar(50) NULL COMMENT '联系电话' AFTER `user_id`;
+
+ALTER TABLE `activity_sign_receive_record`
+ADD COLUMN `consignee_address`  varchar(300) NULL COMMENT '收货地址' AFTER `consignee_phone`;
+
+ALTER TABLE `shop_delivery_info`
+ADD COLUMN `receive_id`  bigint(20) NULL COMMENT '奖品领取ID' AFTER `company_id`;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git "a/zq-erp/src/main/resources/config/db/increment/\347\276\216\345\272\246\344\270\232\347\273\251\345\215\207\347\272\247.sql" "b/zq-erp/src/main/resources/config/db/increment/\347\276\216\345\272\246\344\270\232\347\273\251\345\215\207\347\272\247.sql"
new file mode 100644
index 0000000..0a352f7
--- /dev/null
+++ "b/zq-erp/src/main/resources/config/db/increment/\347\276\216\345\272\246\344\270\232\347\273\251\345\215\207\347\272\247.sql"
@@ -0,0 +1,15 @@
+ALTER TABLE `achieve_new`
+    ADD COLUMN `achieveMoney` double(10, 0) NULL AFTER `company_id`;
+
+
+ALTER TABLE `sys_order`
+    ADD COLUMN `orderType` int(2) NULL COMMENT '订单类型1,销售订单,2退款订单' AFTER `company_id`;
+
+
+ALTER TABLE `achieve_new`
+    CHANGE COLUMN `t3` `achieveType` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL AFTER `t2`;
+
+ALTER TABLE `sys_order_item`
+    ADD COLUMN `refundCount` int(11) NULL COMMENT '退款数量' AFTER `pay_method_detail`;
+
+
diff --git a/zq-erp/src/main/resources/config/system.properties b/zq-erp/src/main/resources/config/system.properties
index 88fc5f6..36cb7f1 100644
--- a/zq-erp/src/main/resources/config/system.properties
+++ b/zq-erp/src/main/resources/config/system.properties
@@ -17,7 +17,8 @@
 
 #文件保存地址
 #file_storage_path=/mnt/hive/static/uploadeFile/
-file_storage_path=E:\\20210116
+file_storage_path=D:\\test\\
+
 #文件上传大小字节为单位  10MB
 maxUploadSize=10485760
 
@@ -29,7 +30,7 @@
 redis.password=xcong123
 #\u5BA2\u6237\u7AEF\u8D85\u65F6\u65F6\u95F4\u5355\u4F4D\u662F\u6BEB\u79D2 \u9ED8\u8BA4\u662F2000
 redis.timeout=10000  
-redis.database=1
+redis.database=2
 redis_time_out=1800000
 cookie_time_out=36000
 
@@ -99,9 +100,9 @@
 
 #是否启用异常上报
 is_open_exception_report=false
-showExcptionUrl=http://erp.hive.jyymatrix.cc/showException
+showExcptionUrl=http://test.hive.jyymatrix.cc/showException
 
 
 #异常信息查询接口
-showExcptionUrl=http://erp.hive.jyymatrix.cc/showException
+showExcptionUrl=http://test.hive.jyymatrix.cc/showException
 
diff --git a/zq-erp/src/main/resources/config/test/application.properties b/zq-erp/src/main/resources/config/test/application.properties
index 87fc89f..cd48b66 100644
--- a/zq-erp/src/main/resources/config/test/application.properties
+++ b/zq-erp/src/main/resources/config/test/application.properties
@@ -30,8 +30,9 @@
 spring.datasource.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
 spring.thymeleaf.prefix: classpath:/templates/views/
 spring.thymeleaf.cache=false
-mybatis.config-location=classpath:mybatis/mybatis-config.xml
-mybatis.mapper-locations=classpath*:mybatis/mapper/*/*.xml
+mybatis-plus.config-location=classpath:mybatis/mybatis-config.xml
+mybatis-plus.mapper-locations=classpath*:mybatis/mapper/**/*.xml
+
 #设置全局时间返回格式 第三行设置为true表示返回时间戳
 #spring.jackson.date-format=yyyy-MM-dd
 #spring.jackson.time-zone=GMT+8
@@ -64,7 +65,7 @@
 #定时任务
 scheduling.enabled=false
 
-swagger.enable=false
+swagger.enable=true
 swagger.security.username=admin
 swagger.security.password=admin
 
diff --git a/zq-erp/src/main/resources/config/test/config.json b/zq-erp/src/main/resources/config/test/config.json
index 1b5f059..5b0e824 100644
--- a/zq-erp/src/main/resources/config/test/config.json
+++ b/zq-erp/src/main/resources/config/test/config.json
@@ -8,7 +8,7 @@
     "imageCompressEnable": true, /* 是否压缩图片,默认是true */
     "imageCompressBorder": 1600, /* 图片压缩最长边限制 */
     "imageInsertAlign": "none", /* 插入的图片浮动方式 */
-    "imageUrlPrefix": "http://resource.hive.jyymatrix.cc/uploadeFile", /* 图片访问路径前缀 */
+    "imageUrlPrefix": "http://testfile.hive.jyymatrix.cc", /* 图片访问路径前缀 */
     "imagePathFormat": "/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
                                 /* {filename} 会替换成原文件名,配置这项需要注意中文乱码问题 */
                                 /* {rand:6} 会替换成随机数,后面的数字是随机数的位数 */
@@ -28,13 +28,13 @@
     "scrawlFieldName": "upfile", /* 提交的图片表单名称 */
     "scrawlPathFormat": "/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
     "scrawlMaxSize": 2048000, /* 上传大小限制,单位B */
-    "scrawlUrlPrefix": "http://resource.hive.jyymatrix.cc/uploadeFile", /* 图片访问路径前缀 */
+    "scrawlUrlPrefix": "http://testfile.hive.jyymatrix.cc", /* 图片访问路径前缀 */
     "scrawlInsertAlign": "none",
 
     /* 截图工具上传 */
     "snapscreenActionName": "uploadimage", /* 执行上传截图的action名称 */
     "snapscreenPathFormat": "/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
-    "snapscreenUrlPrefix": "http://resource.hive.jyymatrix.cc/uploadeFile", /* 图片访问路径前缀 */
+    "snapscreenUrlPrefix": "http://testfile.hive.jyymatrix.cc", /* 图片访问路径前缀 */
     "snapscreenInsertAlign": "none", /* 插入的图片浮动方式 */
 
     /* 抓取远程图片配置 */
@@ -42,7 +42,7 @@
     "catcherActionName": "catchimage", /* 执行抓取远程图片的action名称 */
     "catcherFieldName": "source", /* 提交的图片列表表单名称 */
     "catcherPathFormat": "/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
-    "catcherUrlPrefix": "http://resource.hive.jyymatrix.cc/uploadeFile", /* 图片访问路径前缀 */
+    "catcherUrlPrefix": "http://testfile.hive.jyymatrix.cc", /* 图片访问路径前缀 */
     "catcherMaxSize": 2048000, /* 上传大小限制,单位B */
     "catcherAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 抓取图片格式显示 */
 
diff --git a/zq-erp/src/main/resources/config/test/system.properties b/zq-erp/src/main/resources/config/test/system.properties
index 8731cd3..2a201f8 100644
--- a/zq-erp/src/main/resources/config/test/system.properties
+++ b/zq-erp/src/main/resources/config/test/system.properties
@@ -93,9 +93,9 @@
 
 #是否启用异常上报
 is_open_exception_report=true
-showExcptionUrl=http://erp.hive.jyymatrix.cc/showException
+showExcptionUrl=http://test.hive.jyymatrix.cc/showException
 
 
 #异常信息查询接口
-showExcptionUrl=http://erp.hive.jyymatrix.cc/showException
+showExcptionUrl=http://test.hive.jyymatrix.cc/showException
 
diff --git a/zq-erp/src/main/resources/config/xcshop/application.properties b/zq-erp/src/main/resources/config/xcshop/application.properties
new file mode 100644
index 0000000..d871e87
--- /dev/null
+++ b/zq-erp/src/main/resources/config/xcshop/application.properties
@@ -0,0 +1,75 @@
+evn=xcshop
+server.port=8080
+
+
+#线上测试环境
+
+spring.datasource.username=xc_shop
+spring.datasource.password=xc_shop123!@#
+spring.datasource.url=jdbc:mysql://124.70.222.34/xc_shop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
+
+#spring.datasource.username=chuhuan
+#spring.datasource.password=chuhuan
+#spring.datasource.url=jdbc:mysql://175.6.132.141:3306/hive_v2_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
+
+
+
+
+spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
+spring.datasource.initialSize=3
+spring.datasource.minIdle=3
+spring.datasource.maxActive=20
+spring.datasource.maxWait=60000
+spring.datasource.timeBetweenEvictionRunsMillis=60000
+spring.datasource.minEvictableIdleTimeMillis=300000
+spring.datasource.validationQuery=SELECT 1 FROM DUAL
+spring.datasource.testWhileIdle=true
+spring.datasource.testOnBorrow=true
+spring.datasource.testOnReturn=true
+spring.datasource.filters=stat,wall,log4j
+spring.datasource.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
+spring.thymeleaf.prefix: classpath:/templates/views/
+spring.thymeleaf.cache=false
+mybatis-plus.config-location=classpath:mybatis/mybatis-config.xml
+mybatis-plus.mapper-locations=classpath*:mybatis/mapper/**/*.xml
+
+#设置全局时间返回格式 第三行设置为true表示返回时间戳
+#spring.jackson.date-format=yyyy-MM-dd
+#spring.jackson.time-zone=GMT+8
+#spring.jackson.serialization.write-dates-as-timestamps=true
+#文件上传时的大小限制 单位M
+spring.servlet.multipart.max-file-size=100MB
+spring.servlet.multipart.max-request-size=100MB
+#--------------------------------------
+
+
+#rabbitMQ配置
+rabbitmq.host=47.111.134.136
+rabbitmq.port=5672
+rabbitmq.username=hivequeue
+rabbitmq.password=hivequeueadmin
+useRabbit=false
+
+server.session.timeout=120
+
+ali.sms.accessKeyId=LTAI4FrjY9R9iDfC6YQTHfne
+ali.sms.accessKeySecret=eSvQslpHpDSGlI9Hxm4y5MynNgLbCp
+ali.sms.regionId=cn-hangzhou
+ali.sms.signName=\u80bd\u598d
+
+#hour
+activities.groupBuy.limit=24
+#minute
+groupBuy.pay.timeLimit=30
+
+#定时任务
+scheduling.enabled=false
+
+swagger.enable=true
+swagger.security.username=admin
+swagger.security.password=admin
+
+
+#默认头像
+default.vip.photo.woman=https://filehive2.jyymatrix.cc/uploadeFile/20210125/db53552e688040afb286686f081e1e68f3fe946f75624598828f01898635152e.png
+default.vip.photo.man=https://filehive2.jyymatrix.cc/uploadeFile/20210125/3642f1d827c44c76832fea106c85e0f89e089c16cbcc4dd0a82bb52b9ac700f4.png
diff --git a/zq-erp/src/main/resources/config/xcshop/config.json b/zq-erp/src/main/resources/config/xcshop/config.json
new file mode 100644
index 0000000..bffbd4a
--- /dev/null
+++ b/zq-erp/src/main/resources/config/xcshop/config.json
@@ -0,0 +1,94 @@
+/* 前后端通信相关的配置,注释只允许使用多行方式 */
+{
+    /* 上传图片配置项 */
+    "imageActionName": "uploadimage", /* 执行上传图片的action名称 */
+    "imageFieldName": "upfile", /* 提交的图片表单名称 */
+    "imageMaxSize": 2048000, /* 上传大小限制,单位B */
+    "imageAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 上传图片格式显示 */
+    "imageCompressEnable": true, /* 是否压缩图片,默认是true */
+    "imageCompressBorder": 1600, /* 图片压缩最长边限制 */
+    "imageInsertAlign": "none", /* 插入的图片浮动方式 */
+    "imageUrlPrefix": "http://xcshop.csxuncong.com/uploadfile", /* 图片访问路径前缀 */
+    "imagePathFormat": "/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
+                                /* {filename} 会替换成原文件名,配置这项需要注意中文乱码问题 */
+                                /* {rand:6} 会替换成随机数,后面的数字是随机数的位数 */
+                                /* {time} 会替换成时间戳 */
+                                /* {yyyy} 会替换成四位年份 */
+                                /* {yy} 会替换成两位年份 */
+                                /* {mm} 会替换成两位月份 */
+                                /* {dd} 会替换成两位日期 */
+                                /* {hh} 会替换成两位小时 */
+                                /* {ii} 会替换成两位分钟 */
+                                /* {ss} 会替换成两位秒 */
+                                /* 非法字符 \ : * ? " < > | */
+                                /* 具请体看线上文档: fex.baidu.com/ueditor/#use-format_upload_filename */
+
+    /* 涂鸦图片上传配置项 */
+    "scrawlActionName": "uploadscrawl", /* 执行上传涂鸦的action名称 */
+    "scrawlFieldName": "upfile", /* 提交的图片表单名称 */
+    "scrawlPathFormat": "/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
+    "scrawlMaxSize": 2048000, /* 上传大小限制,单位B */
+    "scrawlUrlPrefix": "http://xcshop.csxuncong.com/uploadfile", /* 图片访问路径前缀 */
+    "scrawlInsertAlign": "none",
+
+    /* 截图工具上传 */
+    "snapscreenActionName": "uploadimage", /* 执行上传截图的action名称 */
+    "snapscreenPathFormat": "/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
+    "snapscreenUrlPrefix": "http://xcshop.csxuncong.com/uploadfile", /* 图片访问路径前缀 */
+    "snapscreenInsertAlign": "none", /* 插入的图片浮动方式 */
+
+    /* 抓取远程图片配置 */
+    "catcherLocalDomain": ["127.0.0.1", "localhost", "img.baidu.com"],
+    "catcherActionName": "catchimage", /* 执行抓取远程图片的action名称 */
+    "catcherFieldName": "source", /* 提交的图片列表表单名称 */
+    "catcherPathFormat": "/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
+    "catcherUrlPrefix": "http://xcshop.csxuncong.com/uploadfile", /* 图片访问路径前缀 */
+    "catcherMaxSize": 2048000, /* 上传大小限制,单位B */
+    "catcherAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 抓取图片格式显示 */
+
+    /* 上传视频配置 */
+    "videoActionName": "uploadvideo", /* 执行上传视频的action名称 */
+    "videoFieldName": "upfile", /* 提交的视频表单名称 */
+    "videoPathFormat": "/ueditor/jsp/upload/video/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
+    "videoUrlPrefix": "http://127.0.0.1:1088/uploadeFile/", /* 视频访问路径前缀 */
+    "videoMaxSize": 102400000, /* 上传大小限制,单位B,默认100MB */
+    "videoAllowFiles": [
+        ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg",
+        ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid"], /* 上传视频格式显示 */
+
+    /* 上传文件配置 */
+    "fileActionName": "uploadfile", /* controller里,执行上传视频的action名称 */
+    "fileFieldName": "upfile", /* 提交的文件表单名称 */
+    "filePathFormat": "/ueditor/jsp/upload/file/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
+    "fileUrlPrefix": "http://127.0.0.1:1088/uploadeFile/", /* 文件访问路径前缀 */
+    "fileMaxSize": 51200000, /* 上传大小限制,单位B,默认50MB */
+    "fileAllowFiles": [
+        ".png", ".jpg", ".jpeg", ".gif", ".bmp",
+        ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg",
+        ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid",
+        ".rar", ".zip", ".tar", ".gz", ".7z", ".bz2", ".cab", ".iso",
+        ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt", ".md", ".xml"
+    ], /* 上传文件格式显示 */
+
+    /* 列出指定目录下的图片 */
+    "imageManagerActionName": "listimage", /* 执行图片管理的action名称 */
+    "imageManagerListPath": "http://127.0.0.1:1088/uploadeFile/", /* 指定要列出图片的目录 */
+    "imageManagerListSize": 20, /* 每次列出文件数量 */
+    "imageManagerUrlPrefix": "", /* 图片访问路径前缀 */
+    "imageManagerInsertAlign": "none", /* 插入的图片浮动方式 */
+    "imageManagerAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 列出的文件类型 */
+
+    /* 列出指定目录下的文件 */
+    "fileManagerActionName": "listfile", /* 执行文件管理的action名称 */
+    "fileManagerListPath": "http://127.0.0.1:1088/uploadeFile/", /* 指定要列出文件的目录 */
+    "fileManagerUrlPrefix": "", /* 文件访问路径前缀 */
+    "fileManagerListSize": 20, /* 每次列出文件数量 */
+    "fileManagerAllowFiles": [
+        ".png", ".jpg", ".jpeg", ".gif", ".bmp",
+        ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg",
+        ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid",
+        ".rar", ".zip", ".tar", ".gz", ".7z", ".bz2", ".cab", ".iso",
+        ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt", ".md", ".xml"
+    ] /* 列出的文件类型 */
+
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/config/xcshop/system.properties b/zq-erp/src/main/resources/config/xcshop/system.properties
new file mode 100644
index 0000000..db3c494
--- /dev/null
+++ b/zq-erp/src/main/resources/config/xcshop/system.properties
@@ -0,0 +1,98 @@
+#是否启用debug模式
+debug=false
+# 日志文件保存地址
+log_path=/mnt/xcshop/log
+
+# 系统语言环境 zh中文,us英文
+system_language=zh
+
+# 错误密码允许输入的次数,大于五次后账号锁定,0表示不锁账号
+error_password_times=5
+# 默认密码
+default_password=123
+
+#nginx静态资源访问地址
+static_resource_url=http://xcshop.csxuncong.com/uploadfile/
+#文件保存地址
+file_storage_path=/mnt/xcshop/uploadfile/
+#文件上传大小字节为单位  10MB
+maxUploadSize=10485760
+
+
+#Matser\u7684ip\u5730\u5740
+redis.hostname=120.27.238.55
+#\u7AEF\u53E3\u53F7
+redis.port=6379
+#\u5982\u679C\u6709\u5BC6\u7801
+redis.password=xcong123
+#\u5BA2\u6237\u7AEF\u8D85\u65F6\u65F6\u95F4\u5355\u4F4D\u662F\u6BEB\u79D2 \u9ED8\u8BA4\u662F2000
+redis.timeout=10000  
+redis.database=2
+redis_time_out=1800000
+cookie_time_out=36000
+
+#APP登录公钥
+login_public_key=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCWvK6UWCtSp/8qnTqyUfO0wbg4CuxOe7IeiDSAmATfHnWqBPnbZ73qQ4A90vGowB7mp5XnmBvgTwfXtDh08yd4btlHwSD3ShbRyGfGfV8lc47ZTLiJH0xuuN2iHfnfj8zQ5kcqijeotggo2rF8Uu7KSR3HxVyN9mO22C6p1r5wVQIDAQAB
+#APP登录秘钥
+login_private_key=MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAJa8rpRYK1Kn/yqdOrJR87TBuDgK7E57sh6INICYBN8edaoE+dtnvepDgD3S8ajAHuanleeYG+BPB9e0OHTzJ3hu2UfBIPdKFtHIZ8Z9XyVzjtlMuIkfTG643aId+d+PzNDmRyqKN6i2CCjasXxS7spJHcfFXI32Y7bYLqnWvnBVAgMBAAECgYBNzQFGq+NgfDllo1WCaG4jI8GTm3+wWoPq4l5G6S/KgYw1vu+/YOJTIZf1UQVOFitc3a6vpIDu25uup+Rj6IS8B4V8NDfc8P+iMNwdIKqqBj8wHu0/SaxYdW1uqlU5+XkJMxsNMgNRRGPSIQhla5OPHtBzIa7t4lmypETMZtXEmQJBAMsa1OIQzAKU05GweCnNNSoqo/nAQLqp8zfbJypxRx24uaCyS7C+KxN+O4FyaYmM9n0X+cgkr+RYHAIa7mg3gccCQQC9/nJvRBum8+4TINnz6QrvTmTlhi8QKW/CiRYpGgmo5PtQYw4BkRQbYO8ktFDM2yeO75XBv09qnGQaivDCeL0DAkEAisFg8LSy+4x7YcvivAQirxUEg2qRjjTvIZjKEBflkuuRfbRxO2Uf/qg9tPjaGwu/lcScc9yEggaj09hcSbyqHwJAN8QLiqUPCL3oTy0BTBpG316/Nq9f+Ppwl0TtgDroQu6S5VFttwACStb02m0imj5pKgcgibHBeaVVrITDjhEqSQJAaCHD/ytTzgtgLoVVyZZxOB272W7PI3mnzL8qQSldx1/QOBs1NmmEZuo7ELFMrfTmlxa1qR4gsq/ImfIdUdXewQ==
+
+
+#日志文件清理阈值  单位:MB
+log_max=20
+#日志清理天数
+log_clear_day=5
+
+
+
+
+wechar_login_url =https://api.weixin.qq.com/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code
+xcx_appid =wx5cc58f796224af61
+xcx_secret =facea088aae414e5c2ee86b459887721
+gzh_appid=wx57e6335559bdbda6
+gzh_secret=ecb408af170e3890e6544290cad33760
+
+#微信支付调试开关
+wx_pay_debug_onoff = false
+
+#快递鸟用户id
+logistics.eBusinessID=1530881
+#快递鸟密钥
+logistics.appKey=f1cf9777-26fb-4e3f-a14d-896075e6384e
+#快递鸟接口地址
+logistics.url=http://api.kdniao.com/Ebusiness/EbusinessOrderHandle.aspx
+#快递鸟接口指令
+logistics.requestType=1002
+
+
+
+
+#发送短信配置
+crm.request_url = http://192.168.1.248
+sms.request_url = http://smssh1.253.com
+sms.login_account = M7315130
+sms.login_password = J7FAoehPkv63e3
+sms.login_accountNe = N4617160
+sms.login_passwordNe = rb1cxLitRB83e0
+
+#接入统一登录平台配置
+platform_app_code = wx_shop
+platform_secret_key = b21e309f07964e4fae5b156d74b5d66z
+#platform_verity_url = http://localhost:8080/platform/getUserInfo
+platform_verity_url = http://stg1-xcerp-ca.xc.jyymatrix.cc/platform/getUserInfo
+
+qrcodeBackgroundImgPath=/mnt/xcshop/webresource/static/xcxresource/bj1.png
+qrcodeFrontImgPath=/mnt/xcshop/webresource/static/xcxresource/qj2.png
+
+#hive仓库地址
+hive.service=http://localhost:8082/meidu-crm/
+
+
+
+#是否启用异常上报
+is_open_exception_report=true
+showExcptionUrl=http://xcshop.csxuncong.com/showException
+
+
+#异常信息查询接口
+showExcptionUrl=http://xcshop.csxuncong.com/showException
+
diff --git a/zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignAwardSetDao.xml b/zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignAwardSetDao.xml
new file mode 100644
index 0000000..886a2fe
--- /dev/null
+++ b/zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignAwardSetDao.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.matrix.system.activity.dao.ActivitySignAwardSetDao">
+
+	<select id="selectListByActIDAndCompanyId" resultType="com.matrix.system.shopXcx.api.vo.ActivitySignAwardSetVo">
+		SELECT
+			*
+		FROM
+			activity_sign_award_set a
+		where
+			a.activity_id = #{actId}
+		  and a.company_id = #{companyId}
+		  and a.award_state = #{awardState}
+	</select>
+
+</mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignReceiveRecordDao.xml b/zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignReceiveRecordDao.xml
new file mode 100644
index 0000000..4892c5c
--- /dev/null
+++ b/zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignReceiveRecordDao.xml
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.matrix.system.activity.dao.ActivitySignReceiveRecordDao">
+
+
+	<select id="findSignReceiveList" resultType="com.matrix.system.activity.vo.SignReceiveListVo">
+		SELECT
+		a.id id,
+		b.nick_name nickName,
+		a.receive_time reciveTime,
+		a.state,
+		c.cumulative_day cumulativeDay,
+		c.award_type awardType,
+		c.award_name awardName,
+		c.award_rule awardRule
+		FROM
+		activity_sign_receive_record a
+		LEFT JOIN biz_user b ON a.user_id = b.user_id
+		LEFT JOIN activity_sign_award_set c ON a.award_id = c.id
+		<where>
+			a.company_id = #{record.companyId}
+			and a.activity_id = #{record.actId}
+			<if test="record.yhmc != null and record.yhmc != ''">
+				and b.nick_name like concat('%',#{record.yhmc},'%')
+			</if>
+			<if test="record.startTime != null ">
+				and a.receive_time >= #{record.startTime}
+			</if>
+			<if test="record.endTime != null">
+				and  #{record.endTime} >= a.receive_time
+			</if>
+		</where>
+		<if test="record.sort !=null">
+			order by
+			a.${record.sort} ${record.order}
+		</if>
+	</select>
+
+	<select id="selectCouponList" resultType="com.matrix.system.activity.vo.CouponVo">
+		SELECT
+		a.id id,
+		a.c_name cName,
+		a.end_time endTime
+		FROM
+		shop_coupon a
+		<where>
+			a.company_id = #{record.companyId}
+			<if test="record.yhjmc != null and record.yhjmc != ''">
+				and a.c_name like concat('%',#{record.yhjmc},'%')
+			</if>
+		</where>
+		<if test="record.sort !=null">
+			order by
+			a.${record.sort} ${record.order}
+		</if>
+	</select>
+
+	<select id="selectGoodsList" resultType="com.matrix.system.activity.vo.GoodsVo">
+		SELECT
+		a.id id,
+		a.name name,
+		a.good_type goodType,
+		a.code code,
+		a.seal_pice sealPice
+		FROM
+		shopping_goods a
+		<where>
+			a.company_id = #{record.companyId}
+			<if test="record.cpmc != null and record.cpmc != ''">
+				and a.name like concat('%',#{record.cpmc},'%')
+			</if>
+		</where>
+		<if test="record.sort !=null">
+			order by
+			a.${record.sort} ${record.order}
+		</if>
+	</select>
+
+	<select id="getSignAwardReceiveCount" resultType="int">
+		SELECT
+			count(a.id)
+		FROM
+			activity_sign_receive_record a
+		LEFT JOIN activity_sign_award_set b ON a.award_id = b.id
+		where
+		      b.award_type = 1
+		  	and a.state = 1
+		  	and a.company_id = #{companyId}
+			and a.user_id = #{userId}
+
+	</select>
+
+	<select id="selectSignAwardList" resultType="com.matrix.system.shopXcx.api.vo.SignAwardListVo">
+		SELECT
+		a.id id,
+		a.state state,
+		1 total,
+		a.receive_time receiveTime,
+		b.award_way awardWay,
+		b.introduce_img introduceImg,
+		b.award_name awardName
+
+		FROM
+		activity_sign_receive_record a
+		LEFT JOIN activity_sign_award_set b ON a.award_id = b.id
+		WHERE
+		b.award_type = 1
+		AND a.state = 1
+		and a.company_id = #{record.companyId}
+		and a.user_id = #{record.userId}
+		<if test="record.sort !=null">
+			order by
+			a.${record.sort} ${record.order}
+		</if>
+	</select>
+
+	<select id="selectSeeAwardTextVOById" resultType="com.matrix.system.shopXcx.api.vo.SeeAwardTextVo">
+		SELECT
+			a.id id,
+			a.state state,
+			a.receive_time receiveTime,
+			a.write_off_code writeOffCode,
+			1 total,
+			b.wechat_img wechatImg,
+			b.prize_address prizeAddress,
+			b.operation_tip operationTip,
+			b.prize_end_time prizeEndTime,
+			b.prize_start_time prizeStartTime,
+			b.award_way awardWay,
+			b.introduce_img introduceImg,
+			b.award_name awardName
+		FROM
+			activity_sign_receive_record a
+				LEFT JOIN activity_sign_award_set b ON a.award_id = b.id
+		WHERE
+		a.id = #{record.awardId}
+		and a.company_id = #{record.companyId}
+		and a.user_id = #{record.userId}
+	</select>
+
+</mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignRecordDao.xml b/zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignRecordDao.xml
new file mode 100644
index 0000000..ad83bc6
--- /dev/null
+++ b/zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignRecordDao.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.matrix.system.activity.dao.ActivitySignRecordDao">
+    <select id="selectOneByActIdAndUserIdLikesignTime" resultType="com.matrix.system.activity.entity.ActivitySignRecord">
+        SELECT
+        *
+        FROM
+        activity_sign_record a
+        where
+            a.activity_id = #{actId}
+            and a.user_id = #{userId}
+            and a.sign_time like concat('%',DATE(#{format}),'%')
+    </select>
+
+</mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignWriteoffDao.xml b/zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignWriteoffDao.xml
new file mode 100644
index 0000000..2a3fa33
--- /dev/null
+++ b/zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignWriteoffDao.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.matrix.system.activity.dao.ActivitySignWriteoffDao">
+	<!-- 定义ActivitySignWriteoff 的复杂关联map -->
+	<resultMap type="com.matrix.system.activity.entity.ActivitySignWriteoff" id="ActivitySignWriteoffMap">
+		<id property="id" column="id" />
+		<result property="createBy" column="create_by" />
+		<result property="createTime" column="create_time" />
+		<result property="updateBy" column="update_by" />
+		<result property="updateTime" column="update_time" />
+			<result property="writeoffTime" column="writeoff_time" />
+			<result property="writeoffUser" column="writeoff_user" />
+			<result property="writeoffCode" column="writeoff_code" />
+			<result property="actId" column="act_id" />
+			<result property="awardId" column="award_id" />
+			<result property="winTime" column="win_time" />
+			<result property="state" column="state" />
+			<result property="userId" column="user_id" />
+			<result property="logisticsId" column="logistics_id" />
+			<result property="receiveId" column="receive_id" />
+			<result property="companyId" column="company_id" />
+			<result property="shopId" column="shop_id" />
+			<result property="writeoffUserid" column="writeoff_userid" />
+	</resultMap>
+	
+	
+	<!-- 定义ActivitySignWriteoff 的简单map  ,本map不添加其他的关联属性 -->
+	<resultMap type="com.matrix.system.activity.entity.ActivitySignWriteoff" id="ActivitySignWriteoffSimpleMap">
+		<id property="id" column="id" />
+		<result property="createBy" column="create_by" />
+		<result property="createTime" column="create_time" />
+		<result property="updateBy" column="update_by" />
+		<result property="updateTime" column="update_time" />
+			<result property="writeoffTime" column="writeoff_time" />
+			<result property="writeoffUser" column="writeoff_user" />
+			<result property="writeoffCode" column="writeoff_code" />
+			<result property="actId" column="act_id" />
+			<result property="awardId" column="award_id" />
+			<result property="winTime" column="win_time" />
+			<result property="state" column="state" />
+			<result property="userId" column="user_id" />
+			<result property="logisticsId" column="logistics_id" />
+			<result property="receiveId" column="receive_id" />
+			<result property="companyId" column="company_id" />
+			<result property="shopId" column="shop_id" />
+			<result property="writeoffUserid" column="writeoff_userid" />
+	</resultMap>
+
+	<select id="findSignWriteoffList" resultType="com.matrix.system.activity.vo.SignWriteoffListVo">
+		SELECT
+		a.id id,
+		a.writeoff_time writeoffTime,
+		a.writeoff_user writeoffUser,
+		a.writeoff_code writeoffCode,
+		a.state state,
+		b.nick_name receiveName,
+		c.act_name actName,
+		d.award_way awardWay,
+		d.award_name awardName,
+		e.receive_time winTime,
+		f.receive_address receiveAddress
+		FROM
+		activity_sign_writeoff a
+		left join biz_user b on a.user_id= b.user_id
+		left join shop_activities c on a.act_id= c.id
+		left join activity_sign_award_set d on a.award_id= d.id
+		left join activity_sign_receive_record e on a.receive_id= e.id
+		left join shop_delivery_info f on a.logistics_id= f.id
+		<where>
+			a.company_id = #{record.companyId}
+			<if test="record.zjzxm != null and record.zjzxm != ''">
+				and b.nick_name like concat('%',#{record.zjzxm},'%')
+			</if>
+			<if test="record.hdmcbm != null and record.hdmcbm != ''">
+				and (c.act_name like concat('%',#{record.hdmcbm},'%') or c.act_code like concat('%',#{record.hdmcbm},'%'))
+			</if>
+		</where>
+		<if test="record.sort !=null">
+			order by
+			a.${record.sort} ${record.order}
+		</if>
+	</select>
+
+	<select id="selectUsernameByUserId" resultType="com.matrix.system.activity.vo.ZjrVo">
+		SELECT
+			a.receive_time zjsj,
+		       b.nick_name zjr
+		FROM
+		activity_sign_receive_record a
+		left join biz_user b on a.user_id= b.user_id
+		where a.user_id = #{userId} and a.award_id = #{receiveId}
+	</select>
+
+	<select id="selectShopDeliveryInfoByLogisticsId" resultType="com.matrix.system.shopXcx.bean.ShopDeliveryInfo">
+		SELECT
+			*
+		FROM
+			shop_delivery_info a
+		where a.id = #{logisticsId}
+	</select>
+
+</mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/common/BusParameterSettingsDao.xml b/zq-erp/src/main/resources/mybatis/mapper/common/BusParameterSettingsDao.xml
index 7a0cfce..f6c6831 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/common/BusParameterSettingsDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/common/BusParameterSettingsDao.xml
@@ -1,397 +1,407 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.matrix.system.common.dao.BusParameterSettingsDao">
-    <!-- 定义BusParameterSettings 的复杂关联map -->
-    <resultMap type="com.matrix.system.common.bean.BusParameterSettings" id="BusParameterSettingsMap">
-        <id property="paramId" column="param_id"/>
-        <result property="paramCode" column="param_code"/>
-        <result property="paramValue" column="param_value"/>
-        <result property="paramValue1" column="param_value1"/>
-        <result property="paramValue2" column="param_value2"/>
-        <result property="paramValue3" column="param_value3"/>
-        <result property="companyId" column="company_id"/>
-        <result property="shopId" column="shop_id"/>
-    </resultMap>
-
-
-    <!-- 定义BusParameterSettings 的简单map  ,本map不添加其他的关联属性 -->
-    <resultMap type="com.matrix.system.common.bean.BusParameterSettings" id="BusParameterSettingsSimpleMap">
-        <id property="paramId" column="param_id"/>
-        <result property="paramCode" column="param_code"/>
-        <result property="paramValue" column="param_value"/>
-        <result property="paramValue1" column="param_value1"/>
-        <result property="paramValue2" column="param_value2"/>
-        <result property="paramValue3" column="param_value3"/>
-        <result property="companyId" column="company_id"/>
-        <result property="shopId" column="shop_id"/>
-    </resultMap>
-
-
-    <!--  插入方法   -->
-    <insert id="insert" parameterType="com.matrix.system.common.bean.BusParameterSettings"
-            useGeneratedKeys="true" keyProperty="paramId">
-		INSERT INTO bus_parameter_settings (
-			param_id,
-			param_code,
-			param_value,
-			param_value1,
-			param_value2,
-			param_value3,
-			company_id,
-			shop_id
-		)
-	VALUES (
-			#{paramId},
-			#{paramCode},
-			#{paramValue},
-			#{paramValue1},
-			#{paramValue2},
-			#{paramValue3},
-			#{companyId},
-			#{shopId}
-	)
-	</insert>
-
-
-    <!--  批量插入   -->
-    <insert id="batchInsert" parameterType="java.util.List">
-        INSERT INTO bus_parameter_settings (
-        param_id,
-        param_code,
-        param_value,
-        param_value1,
-        param_value2,
-        param_value3,
-        company_id,
-        shop_id
-        )
-        VALUES
-        <foreach collection="list" item="item" index="index" separator=",">(
-            #{item.paramId},
-            #{item.paramCode},
-            #{item.paramValue},
-            #{item.paramValue1},
-            #{item.paramValue2},
-            #{item.paramValue3},
-            #{item.companyId},
-            #{item.shopId}
-            )
-        </foreach>
-    </insert>
-
-
-    <!--  根据Map更新 部分更新   -->
-    <update id="updateByMap" parameterType="java.util.HashMap">
-        UPDATE bus_parameter_settings
-        <set>
-            <if test="_parameter.containsKey('paramCode')">
-                param_code = #{paramCode},
-            </if>
-            <if test="_parameter.containsKey('paramValue')">
-                param_value = #{paramValue},
-            </if>
-            <if test="_parameter.containsKey('paramValue1')">
-                param_value1 = #{paramValue1},
-            </if>
-            <if test="_parameter.containsKey('paramValue2')">
-                param_value2 = #{paramValue2},
-            </if>
-            <if test="_parameter.containsKey('paramValue3')">
-                param_value3 = #{paramValue3},
-            </if>
-            <if test="_parameter.containsKey('companyId')">
-                company_id = #{companyId},
-            </if>
-            <if test="_parameter.containsKey('shopId')">
-                shop_id = #{shopId},
-            </if>
-        </set>
-        WHERE param_id=#{paramId}
-    </update>
-
-
-    <!--  根据对象更新 部分更新   -->
-    <update id="updateByModel" parameterType="Long">
-        UPDATE bus_parameter_settings
-        <set>
-            <if test="(paramCode!=null and paramCode!='') or (paramCode!='' and paramCode==0)">
-                param_code = #{paramCode},
-            </if>
-            <if test="(paramValue!=null and paramValue!='') or (paramValue!='' and paramValue==0)">
-                param_value = #{paramValue},
-            </if>
-            <if test="(paramValue1!=null and paramValue1!='') or (paramValue1!='' and paramValue1==0)">
-                param_value1 = #{paramValue1},
-            </if>
-            <if test="(paramValue2!=null and paramValue2!='') or (paramValue2!='' and paramValue2==0)">
-                param_value2 = #{paramValue2},
-            </if>
-            <if test="(paramValue3!=null and paramValue3!='') or (paramValue3!='' and paramValue3==0)">
-                param_value3 = #{paramValue3},
-            </if>
-            <if test="(companyId!=null and companyId!='') ">
-                company_id = #{companyId}
-            </if>
-             <if test="(shopId!=null and shopId!='') ">
-                 shop_id = #{shopId}
-            </if>
-        </set>
-        WHERE param_id=#{paramId}
-    </update>
-
-    <update id="updateParams" parameterType="java.util.List">
-        <foreach collection="list" index="index" item="item" separator=";">
-            UPDATE bus_parameter_settings
-            <set>
-                <if test="(item.paramValue!=null ) ">
-                    param_value = #{item.paramValue},
-                </if>
-                <if test="(item.paramValue1!=null) ">
-                    param_value1 = #{item.paramValue1},
-                </if>
-                <if test="(item.paramValue2!=null) ">
-                    param_value2 = #{item.paramValue2},
-                </if>
-                <if test="(item.paramValue3!=null ) ">
-                    param_value3 = #{item.paramValue3},
-                </if>
-                <if test="(item.shopId!=null ) ">
-                    shop_id = #{item.shopId},
-                </if>
-            </set>
-            where param_code = #{item.paramCode} and company_id = #{companyId}
-        </foreach>
-    </update>
-
-
-    <!-- 批量删除 -->
-    <delete id="deleteByIds" parameterType="java.util.List">
-        delete from bus_parameter_settings where param_id in
-        <foreach collection="list" index="index" item="item" open="("
-                 separator="," close=")">
-            #{item}
-        </foreach>
-    </delete>
-
-    <!-- 根据id删除-->
-    <delete id="deleteById" parameterType="Long">
-		DELETE FROM bus_parameter_settings
-		where  param_id=#{paramId} 
-	</delete>
-
-    <!-- 根据对象删除-->
-    <delete id="deleteByModel" parameterType="Long">
-        DELETE FROM bus_parameter_settings
-        where 1=1
-        <if test="record!=null">
-            <if test="(record.paramId!=null and record.paramId!='') or (record.paramId!='' and record.paramId==0)">
-                and param_id = #{record.paramId}
-            </if>
-            <if test="(record.paramCode!=null and record.paramCode!='') or (record.paramCode!='' and record.paramCode==0)">
-                and param_code = #{record.paramCode}
-            </if>
-            <if test="(record.paramValue!=null and record.paramValue!='') or (record.paramValue!='' and record.paramValue==0)">
-                and param_value = #{record.paramValue}
-            </if>
-            <if test="(record.paramValue1!=null and record.paramValue1!='') or (record.paramValue1!='' and record.paramValue1==0)">
-                and param_value1 = #{record.paramValue1}
-            </if>
-            <if test="(record.paramValue2!=null and record.paramValue2!='') or (record.paramValue2!='' and record.paramValue2==0)">
-                and param_value2 = #{record.paramValue2}
-            </if>
-            <if test="(record.paramValue3!=null and record.paramValue3!='') or (record.paramValue3!='' and record.paramValue3==0)">
-                and param_value3 = #{record.paramValue3}
-            </if>
-            <if test="(record.companyId!=null and record.companyId!='') ">
-                and company_id = #{record.companyId}
-            </if>
-            <if test="(record.shopId!=null and record.shopId!='') ">
-                and shop_id = #{record.shopId}
-            </if>
-        </if>
-    </delete>
-
-
-    <!-- 分页查询 -->
-    <select id="selectInPage" resultMap="BusParameterSettingsMap">
-        select
-        param_id,
-        param_code,
-        param_value,
-        param_value1,
-        param_value2,
-        param_value3,
-        company_id,
-        shop_id
-        from bus_parameter_settings
-        where 1=1
-        <if test="record!=null">
-            <if test="(record.paramId!=null and record.paramId!='') or (record.paramId!='' and record.paramId==0)">
-                and param_id = #{record.paramId}
-            </if>
-            <if test="(record.paramCode!=null and record.paramCode!='') or (record.paramCode!='' and record.paramCode==0)">
-                and param_code = #{record.paramCode}
-            </if>
-            <if test="(record.paramValue!=null and record.paramValue!='') or (record.paramValue!='' and record.paramValue==0)">
-                and param_value = #{record.paramValue}
-            </if>
-            <if test="(record.paramValue1!=null and record.paramValue1!='') or (record.paramValue1!='' and record.paramValue1==0)">
-                and param_value1 = #{record.paramValue1}
-            </if>
-            <if test="(record.paramValue2!=null and record.paramValue2!='') or (record.paramValue2!='' and record.paramValue2==0)">
-                and param_value2 = #{record.paramValue2}
-            </if>
-            <if test="(record.paramValue3!=null and record.paramValue3!='') or (record.paramValue3!='' and record.paramValue3==0)">
-                and param_value3 = #{record.paramValue3}
-            </if>
-            <if test="(record.companyId!=null and record.companyId!='') ">
-                and company_id = #{record.companyId}
-            </if>
-            <if test="(record.shopId!=null and record.shopId!='') ">
-                and shop_id = #{record.shopId}
-            </if>
-        </if>
-        <if test="pageVo !=null"><!-- 判断pageVo对象是否为空 -->
-            <if test="pageVo.sort !=null  and pageVo.order !=null">
-                order by
-                ${pageVo.sort} ${pageVo.order}
-            </if>
-            <if test="pageVo.offset >=0  and pageVo.limit >0">
-                limit
-                #{pageVo.offset},#{pageVo.limit}
-            </if>
-        </if>
-    </select>
-
-    <!-- 查询总条数 -->
-    <select id="selectTotalRecord" parameterType="long" resultType="java.lang.Integer">
-        select count(*)
-        from bus_parameter_settings
-        where 1=1
-        <if test="record!=null">
-            <if test="(record.paramId!=null and record.paramId!='') or (record.paramId!='' and record.paramId==0)">
-                and param_id = #{record.paramId}
-            </if>
-            <if test="(record.paramCode!=null and record.paramCode!='') or (record.paramCode!='' and record.paramCode==0)">
-                and param_code = #{record.paramCode}
-            </if>
-            <if test="(record.paramValue!=null and record.paramValue!='') or (record.paramValue!='' and record.paramValue==0)">
-                and param_value = #{record.paramValue}
-            </if>
-            <if test="(record.paramValue1!=null and record.paramValue1!='') or (record.paramValue1!='' and record.paramValue1==0)">
-                and param_value1 = #{record.paramValue1}
-            </if>
-            <if test="(record.paramValue2!=null and record.paramValue2!='') or (record.paramValue2!='' and record.paramValue2==0)">
-                and param_value2 = #{record.paramValue2}
-            </if>
-            <if test="(record.paramValue3!=null and record.paramValue3!='') or (record.paramValue3!='' and record.paramValue3==0)">
-                and param_value3 = #{record.paramValue3}
-            </if>
-            <if test="(record.companyId!=null and record.companyId!='') ">
-                and company_id = #{record.companyId}
-            </if>
-
-            <if test="(record.shopId!=null and record.shopId!='') ">
-                and shop_id = #{record.shopId}
-            </if>
-        </if>
-    </select>
-
-    <!-- 根据id查询-->
-    <select id="selectById" resultMap="BusParameterSettingsMap">
-		select 
-			param_id,
-			param_code,
-			param_value,
-			param_value1,
-			param_value2,
-			param_value3,
-			company_id,
-			shop_id
-		from bus_parameter_settings
-		where  param_id=#{paramId} 
-	</select>
-
-
-    <!-- 根据id 锁表查询-->
-    <select id="selectForUpdate" resultMap="BusParameterSettingsMap">
-		select 
-			param_id,
-			param_code,
-			param_value,
-			param_value1,
-			param_value2,
-			param_value3,
-			company_id,
-			shop_id
-		from bus_parameter_settings
-		where  param_id=#{param_id} 
-		for update
-	</select>
-
-
-    <!-- 根据对象查询-->
-    <select id="selectByModel" resultMap="BusParameterSettingsMap">
-        select
-        param_id,
-        param_code,
-        param_value,
-        param_value1,
-        param_value2,
-        param_value3,
-        company_id,
-        shop_id
-        from bus_parameter_settings
-        where 1=1
-        <if test="record!=null">
-            <if test="(record.paramId!=null and record.paramId!='') or (record.paramId!='' and record.paramId==0)">
-                and param_id = #{record.paramId}
-            </if>
-            <if test="(record.paramCode!=null and record.paramCode!='') or (record.paramCode!='' and record.paramCode==0)">
-                and param_code = #{record.paramCode}
-            </if>
-            <if test="(record.paramValue!=null and record.paramValue!='') or (record.paramValue!='' and record.paramValue==0)">
-                and param_value = #{record.paramValue}
-            </if>
-            <if test="(record.paramValue1!=null and record.paramValue1!='') or (record.paramValue1!='' and record.paramValue1==0)">
-                and param_value1 = #{record.paramValue1}
-            </if>
-            <if test="(record.paramValue2!=null and record.paramValue2!='') or (record.paramValue2!='' and record.paramValue2==0)">
-                and param_value2 = #{record.paramValue2}
-            </if>
-            <if test="(record.paramValue3!=null and record.paramValue3!='') or (record.paramValue3!='' and record.paramValue3==0)">
-                and param_value3 = #{record.paramValue3}
-            </if>
-            <if test="(record.companyId!=null and record.companyId!='') ">
-                and company_id = #{record.companyId}
-            </if>
-
-            <if test="(record.shopId!=null and record.shopId!='') ">
-                and shop_id = #{record.shopId}
-            </if>
-        </if>
-    </select>
-
-    <select id="selectByCodes" resultMap="BusParameterSettingsMap">
-
-        select * from bus_parameter_settings where company_id=#{companyId} and  shop_id=#{shopId}
-        and param_code in
-        <foreach collection="list" index="index" item="item" open="("
-                 separator="," close=")">
-            #{item}
-        </foreach>
-    </select>
-
-    <select id="selectByCode" resultMap="BusParameterSettingsMap">
-         select * from bus_parameter_settings where
-         param_code=#{code}
-         and company_id=#{companyId} and  shop_id=#{shopId}
-    </select>
-    <select id="selectCompanyParamByCode" resultMap="BusParameterSettingsMap">
-         select * from bus_parameter_settings where
-         param_code=#{code}
-         and company_id=#{companyId}
-    </select>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.matrix.system.common.dao.BusParameterSettingsDao">
+    <!-- 定义BusParameterSettings 的复杂关联map -->
+    <resultMap type="com.matrix.system.common.bean.BusParameterSettings" id="BusParameterSettingsMap">
+        <id property="paramId" column="param_id"/>
+        <result property="paramCode" column="param_code"/>
+        <result property="paramValue" column="param_value"/>
+        <result property="paramValue1" column="param_value1"/>
+        <result property="paramValue2" column="param_value2"/>
+        <result property="paramValue3" column="param_value3"/>
+        <result property="companyId" column="company_id"/>
+        <result property="shopId" column="shop_id"/>
+    </resultMap>
+
+
+    <!-- 定义BusParameterSettings 的简单map  ,本map不添加其他的关联属性 -->
+    <resultMap type="com.matrix.system.common.bean.BusParameterSettings" id="BusParameterSettingsSimpleMap">
+        <id property="paramId" column="param_id"/>
+        <result property="paramCode" column="param_code"/>
+        <result property="paramValue" column="param_value"/>
+        <result property="paramValue1" column="param_value1"/>
+        <result property="paramValue2" column="param_value2"/>
+        <result property="paramValue3" column="param_value3"/>
+        <result property="companyId" column="company_id"/>
+        <result property="shopId" column="shop_id"/>
+    </resultMap>
+
+
+    <!--  插入方法   -->
+    <insert id="insert" parameterType="com.matrix.system.common.bean.BusParameterSettings"
+            useGeneratedKeys="true" keyProperty="paramId">
+		INSERT INTO bus_parameter_settings (
+			param_id,
+			param_code,
+			param_value,
+			param_value1,
+			param_value2,
+			param_value3,
+			company_id,
+			shop_id
+		)
+	VALUES (
+			#{paramId},
+			#{paramCode},
+			#{paramValue},
+			#{paramValue1},
+			#{paramValue2},
+			#{paramValue3},
+			#{companyId},
+			#{shopId}
+	)
+	</insert>
+
+
+    <!--  批量插入   -->
+    <insert id="batchInsert" parameterType="java.util.List">
+        INSERT INTO bus_parameter_settings (
+        param_id,
+        param_code,
+        param_value,
+        param_value1,
+        param_value2,
+        param_value3,
+        company_id,
+        shop_id
+        )
+        VALUES
+        <foreach collection="list" item="item" index="index" separator=",">(
+            #{item.paramId},
+            #{item.paramCode},
+            #{item.paramValue},
+            #{item.paramValue1},
+            #{item.paramValue2},
+            #{item.paramValue3},
+            #{item.companyId},
+            #{item.shopId}
+            )
+        </foreach>
+    </insert>
+
+
+    <!--  根据Map更新 部分更新   -->
+    <update id="updateByMap" parameterType="java.util.HashMap">
+        UPDATE bus_parameter_settings
+        <set>
+            <if test="_parameter.containsKey('paramCode')">
+                param_code = #{paramCode},
+            </if>
+            <if test="_parameter.containsKey('paramValue')">
+                param_value = #{paramValue},
+            </if>
+            <if test="_parameter.containsKey('paramValue1')">
+                param_value1 = #{paramValue1},
+            </if>
+            <if test="_parameter.containsKey('paramValue2')">
+                param_value2 = #{paramValue2},
+            </if>
+            <if test="_parameter.containsKey('paramValue3')">
+                param_value3 = #{paramValue3},
+            </if>
+            <if test="_parameter.containsKey('companyId')">
+                company_id = #{companyId},
+            </if>
+            <if test="_parameter.containsKey('shopId')">
+                shop_id = #{shopId},
+            </if>
+        </set>
+        WHERE param_id=#{paramId}
+    </update>
+
+
+    <!--  根据对象更新 部分更新   -->
+    <update id="updateByModel" parameterType="Long">
+        UPDATE bus_parameter_settings
+        <set>
+            <if test="(paramCode!=null and paramCode!='') or (paramCode!='' and paramCode==0)">
+                param_code = #{paramCode},
+            </if>
+            <if test="(paramValue!=null and paramValue!='') or (paramValue!='' and paramValue==0)">
+                param_value = #{paramValue},
+            </if>
+            <if test="(paramValue1!=null and paramValue1!='') or (paramValue1!='' and paramValue1==0)">
+                param_value1 = #{paramValue1},
+            </if>
+            <if test="(paramValue2!=null and paramValue2!='') or (paramValue2!='' and paramValue2==0)">
+                param_value2 = #{paramValue2},
+            </if>
+            <if test="(paramValue3!=null and paramValue3!='') or (paramValue3!='' and paramValue3==0)">
+                param_value3 = #{paramValue3},
+            </if>
+            <if test="(companyId!=null and companyId!='') ">
+                company_id = #{companyId}
+            </if>
+             <if test="(shopId!=null and shopId!='') ">
+                 shop_id = #{shopId}
+            </if>
+        </set>
+        WHERE param_id=#{paramId}
+    </update>
+
+    <update id="updateParams" parameterType="java.util.List">
+        <foreach collection="list" index="index" item="item" separator=";">
+            UPDATE bus_parameter_settings
+            <set>
+                <if test="(item.paramValue!=null ) ">
+                    param_value = #{item.paramValue},
+                </if>
+                <if test="(item.paramValue1!=null) ">
+                    param_value1 = #{item.paramValue1},
+                </if>
+                <if test="(item.paramValue2!=null) ">
+                    param_value2 = #{item.paramValue2},
+                </if>
+                <if test="(item.paramValue3!=null ) ">
+                    param_value3 = #{item.paramValue3},
+                </if>
+                <if test="(item.shopId!=null ) ">
+                    shop_id = #{item.shopId},
+                </if>
+            </set>
+            where param_code = #{item.paramCode} and company_id = #{companyId}
+        </foreach>
+    </update>
+
+
+    <!-- 批量删除 -->
+    <delete id="deleteByIds" parameterType="java.util.List">
+        delete from bus_parameter_settings where param_id in
+        <foreach collection="list" index="index" item="item" open="("
+                 separator="," close=")">
+            #{item}
+        </foreach>
+    </delete>
+
+    <!-- 根据id删除-->
+    <delete id="deleteById" parameterType="Long">
+		DELETE FROM bus_parameter_settings
+		where  param_id=#{paramId} 
+	</delete>
+
+    <!-- 根据对象删除-->
+    <delete id="deleteByModel" parameterType="Long">
+        DELETE FROM bus_parameter_settings
+        where 1=1
+        <if test="record!=null">
+            <if test="(record.paramId!=null and record.paramId!='') or (record.paramId!='' and record.paramId==0)">
+                and param_id = #{record.paramId}
+            </if>
+            <if test="(record.paramCode!=null and record.paramCode!='') or (record.paramCode!='' and record.paramCode==0)">
+                and param_code = #{record.paramCode}
+            </if>
+            <if test="(record.paramValue!=null and record.paramValue!='') or (record.paramValue!='' and record.paramValue==0)">
+                and param_value = #{record.paramValue}
+            </if>
+            <if test="(record.paramValue1!=null and record.paramValue1!='') or (record.paramValue1!='' and record.paramValue1==0)">
+                and param_value1 = #{record.paramValue1}
+            </if>
+            <if test="(record.paramValue2!=null and record.paramValue2!='') or (record.paramValue2!='' and record.paramValue2==0)">
+                and param_value2 = #{record.paramValue2}
+            </if>
+            <if test="(record.paramValue3!=null and record.paramValue3!='') or (record.paramValue3!='' and record.paramValue3==0)">
+                and param_value3 = #{record.paramValue3}
+            </if>
+            <if test="(record.companyId!=null and record.companyId!='') ">
+                and company_id = #{record.companyId}
+            </if>
+            <if test="(record.shopId!=null and record.shopId!='') ">
+                and shop_id = #{record.shopId}
+            </if>
+        </if>
+    </delete>
+
+
+    <!-- 分页查询 -->
+    <select id="selectInPage" resultMap="BusParameterSettingsMap">
+        select
+        param_id,
+        param_code,
+        param_value,
+        param_value1,
+        param_value2,
+        param_value3,
+        company_id,
+        shop_id
+        from bus_parameter_settings
+        where 1=1
+        <if test="record!=null">
+            <if test="(record.paramId!=null and record.paramId!='') or (record.paramId!='' and record.paramId==0)">
+                and param_id = #{record.paramId}
+            </if>
+            <if test="(record.paramCode!=null and record.paramCode!='') or (record.paramCode!='' and record.paramCode==0)">
+                and param_code = #{record.paramCode}
+            </if>
+            <if test="(record.paramValue!=null and record.paramValue!='') or (record.paramValue!='' and record.paramValue==0)">
+                and param_value = #{record.paramValue}
+            </if>
+            <if test="(record.paramValue1!=null and record.paramValue1!='') or (record.paramValue1!='' and record.paramValue1==0)">
+                and param_value1 = #{record.paramValue1}
+            </if>
+            <if test="(record.paramValue2!=null and record.paramValue2!='') or (record.paramValue2!='' and record.paramValue2==0)">
+                and param_value2 = #{record.paramValue2}
+            </if>
+            <if test="(record.paramValue3!=null and record.paramValue3!='') or (record.paramValue3!='' and record.paramValue3==0)">
+                and param_value3 = #{record.paramValue3}
+            </if>
+            <if test="(record.companyId!=null and record.companyId!='') ">
+                and company_id = #{record.companyId}
+            </if>
+            <if test="(record.shopId!=null and record.shopId!='') ">
+                and shop_id = #{record.shopId}
+            </if>
+        </if>
+        <if test="pageVo !=null"><!-- 判断pageVo对象是否为空 -->
+            <if test="pageVo.sort !=null  and pageVo.order !=null">
+                order by
+                ${pageVo.sort} ${pageVo.order}
+            </if>
+            <if test="pageVo.offset >=0  and pageVo.limit >0">
+                limit
+                #{pageVo.offset},#{pageVo.limit}
+            </if>
+        </if>
+    </select>
+
+    <!-- 查询总条数 -->
+    <select id="selectTotalRecord" parameterType="long" resultType="java.lang.Integer">
+        select count(*)
+        from bus_parameter_settings
+        where 1=1
+        <if test="record!=null">
+            <if test="(record.paramId!=null and record.paramId!='') or (record.paramId!='' and record.paramId==0)">
+                and param_id = #{record.paramId}
+            </if>
+            <if test="(record.paramCode!=null and record.paramCode!='') or (record.paramCode!='' and record.paramCode==0)">
+                and param_code = #{record.paramCode}
+            </if>
+            <if test="(record.paramValue!=null and record.paramValue!='') or (record.paramValue!='' and record.paramValue==0)">
+                and param_value = #{record.paramValue}
+            </if>
+            <if test="(record.paramValue1!=null and record.paramValue1!='') or (record.paramValue1!='' and record.paramValue1==0)">
+                and param_value1 = #{record.paramValue1}
+            </if>
+            <if test="(record.paramValue2!=null and record.paramValue2!='') or (record.paramValue2!='' and record.paramValue2==0)">
+                and param_value2 = #{record.paramValue2}
+            </if>
+            <if test="(record.paramValue3!=null and record.paramValue3!='') or (record.paramValue3!='' and record.paramValue3==0)">
+                and param_value3 = #{record.paramValue3}
+            </if>
+            <if test="(record.companyId!=null and record.companyId!='') ">
+                and company_id = #{record.companyId}
+            </if>
+
+            <if test="(record.shopId!=null and record.shopId!='') ">
+                and shop_id = #{record.shopId}
+            </if>
+        </if>
+    </select>
+
+    <!-- 根据id查询-->
+    <select id="selectById" resultMap="BusParameterSettingsMap">
+		select 
+			param_id,
+			param_code,
+			param_value,
+			param_value1,
+			param_value2,
+			param_value3,
+			company_id,
+			shop_id
+		from bus_parameter_settings
+		where  param_id=#{paramId} 
+	</select>
+
+
+    <!-- 根据id 锁表查询-->
+    <select id="selectForUpdate" resultMap="BusParameterSettingsMap">
+		select 
+			param_id,
+			param_code,
+			param_value,
+			param_value1,
+			param_value2,
+			param_value3,
+			company_id,
+			shop_id
+		from bus_parameter_settings
+		where  param_id=#{param_id} 
+		for update
+	</select>
+
+
+    <!-- 根据对象查询-->
+    <select id="selectByModel" resultMap="BusParameterSettingsMap">
+        select
+        param_id,
+        param_code,
+        param_value,
+        param_value1,
+        param_value2,
+        param_value3,
+        company_id,
+        shop_id
+        from bus_parameter_settings
+        where 1=1
+        <if test="record!=null">
+            <if test="(record.paramId!=null and record.paramId!='') or (record.paramId!='' and record.paramId==0)">
+                and param_id = #{record.paramId}
+            </if>
+            <if test="(record.paramCode!=null and record.paramCode!='') or (record.paramCode!='' and record.paramCode==0)">
+                and param_code = #{record.paramCode}
+            </if>
+            <if test="(record.paramValue!=null and record.paramValue!='') or (record.paramValue!='' and record.paramValue==0)">
+                and param_value = #{record.paramValue}
+            </if>
+            <if test="(record.paramValue1!=null and record.paramValue1!='') or (record.paramValue1!='' and record.paramValue1==0)">
+                and param_value1 = #{record.paramValue1}
+            </if>
+            <if test="(record.paramValue2!=null and record.paramValue2!='') or (record.paramValue2!='' and record.paramValue2==0)">
+                and param_value2 = #{record.paramValue2}
+            </if>
+            <if test="(record.paramValue3!=null and record.paramValue3!='') or (record.paramValue3!='' and record.paramValue3==0)">
+                and param_value3 = #{record.paramValue3}
+            </if>
+            <if test="(record.companyId!=null and record.companyId!='') ">
+                and company_id = #{record.companyId}
+            </if>
+
+            <if test="(record.shopId!=null and record.shopId!='') ">
+                and shop_id = #{record.shopId}
+            </if>
+        </if>
+    </select>
+
+    <select id="selectByCodes" resultMap="BusParameterSettingsMap">
+
+        select * from bus_parameter_settings where company_id=#{companyId} and  shop_id=#{shopId}
+        and param_code in
+        <foreach collection="list" index="index" item="item" open="("
+                 separator="," close=")">
+            #{item}
+        </foreach>
+    </select>
+
+    <select id="selectByCodesAndCompanyId" resultMap="BusParameterSettingsMap">
+
+        select * from bus_parameter_settings where company_id=#{companyId}
+        and param_code in
+        <foreach collection="list" index="index" item="item" open="("
+                 separator="," close=")">
+            #{item}
+        </foreach>
+    </select>
+
+    <select id="selectByCode" resultMap="BusParameterSettingsMap">
+         select * from bus_parameter_settings where
+         param_code=#{code}
+         and company_id=#{companyId} and  shop_id=#{shopId}
+    </select>
+    <select id="selectCompanyParamByCode" resultMap="BusParameterSettingsMap">
+         select * from bus_parameter_settings where
+         param_code=#{code}
+         and company_id=#{companyId}
+    </select>
 </mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/fenxiao/BizUserDao.xml b/zq-erp/src/main/resources/mybatis/mapper/fenxiao/BizUserDao.xml
new file mode 100644
index 0000000..536b462
--- /dev/null
+++ b/zq-erp/src/main/resources/mybatis/mapper/fenxiao/BizUserDao.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.matrix.system.fenxiao.dao.BizUserDao">
+
+</mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopRevenueFlowDao.xml b/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopRevenueFlowDao.xml
new file mode 100644
index 0000000..4e5490d
--- /dev/null
+++ b/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopRevenueFlowDao.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.matrix.system.fenxiao.dao.ShopRevenueFlowDao">
+	<!-- 定义ShopRevenueFlow 的复杂关联map -->
+	<resultMap type="com.matrix.system.fenxiao.entity.ShopRevenueFlow" id="ShopRevenueFlowMap">
+		<id property="id" column="id" />
+		<result property="createBy" column="create_by" />
+		<result property="createTime" column="create_time" />
+		<result property="updateBy" column="update_by" />
+		<result property="updateTime" column="update_time" />
+			<result property="userId" column="user_id" />
+			<result property="revenueContent" column="revenue_content" />
+			<result property="amount" column="amount" />
+			<result property="businessId" column="business_id" />
+			<result property="companyId" column="company_id" />
+	</resultMap>
+	
+	
+	<!-- 定义ShopRevenueFlow 的简单map  ,本map不添加其他的关联属性 -->
+	<resultMap type="com.matrix.system.fenxiao.entity.ShopRevenueFlow" id="ShopRevenueFlowSimpleMap">
+		<id property="id" column="id" />
+		<result property="createBy" column="create_by" />
+		<result property="createTime" column="create_time" />
+		<result property="updateBy" column="update_by" />
+		<result property="updateTime" column="update_time" />
+			<result property="userId" column="user_id" />
+			<result property="revenueContent" column="revenue_content" />
+			<result property="amount" column="amount" />
+			<result property="businessId" column="business_id" />
+			<result property="companyId" column="company_id" />
+	</resultMap>
+
+
+    <select id="selectRevenuFlowList" resultType="com.matrix.system.fenxiao.entity.ShopRevenueFlow">
+		select * from shop_revenue_flow
+		where user_id=#{record.userId}
+		  and DATE_FORMAT(create_time,'%Y-%m')=#{record.queryTime}
+		<if test="record.revenueType==1">
+			and amount>0
+		</if>
+		<if test="record.revenueType==2">
+			<![CDATA[ and amount<0 ]]>
+		</if>
+		order by create_time desc
+	</select>
+
+</mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalemanSettlementDao.xml b/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalemanSettlementDao.xml
new file mode 100644
index 0000000..d414a05
--- /dev/null
+++ b/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalemanSettlementDao.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.matrix.system.fenxiao.dao.ShopSalemanSettlementDao">
+	<!-- 定义ShopSalemanSettlement 的复杂关联map -->
+	<resultMap type="com.matrix.system.fenxiao.entity.ShopSalemanSettlement" id="ShopSalemanSettlementMap">
+		<id property="id" column="id" />
+		<result property="createBy" column="create_by" />
+		<result property="createTime" column="create_time" />
+		<result property="updateBy" column="update_by" />
+		<result property="updateTime" column="update_time" />
+			<result property="orderNo" column="order_no" />
+			<result property="settlementWay" column="settlement_way" />
+			<result property="manCount" column="man_count" />
+			<result property="orderCount" column="order_count" />
+			<result property="amount" column="amount" />
+			<result property="userId" column="user_id" />
+			<result property="remark" column="remark" />
+			<result property="companyId" column="company_id" />
+	</resultMap>
+	
+	
+	<!-- 定义ShopSalemanSettlement 的简单map  ,本map不添加其他的关联属性 -->
+	<resultMap type="com.matrix.system.fenxiao.entity.ShopSalemanSettlement" id="ShopSalemanSettlementSimpleMap">
+		<id property="id" column="id" />
+		<result property="createBy" column="create_by" />
+		<result property="createTime" column="create_time" />
+		<result property="updateBy" column="update_by" />
+		<result property="updateTime" column="update_time" />
+			<result property="orderNo" column="order_no" />
+			<result property="settlementWay" column="settlement_way" />
+			<result property="manCount" column="man_count" />
+			<result property="orderCount" column="order_count" />
+			<result property="amount" column="amount" />
+			<result property="userId" column="user_id" />
+			<result property="remark" column="remark" />
+			<result property="companyId" column="company_id" />
+	</resultMap>
+
+</mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanApplyDao.xml b/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanApplyDao.xml
new file mode 100644
index 0000000..1d001af
--- /dev/null
+++ b/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanApplyDao.xml
@@ -0,0 +1,300 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.matrix.system.fenxiao.dao.ShopSalesmanApplyDao">
+	<!-- 定义ShopSalesmanApply 的复杂关联map -->
+	<resultMap type="com.matrix.system.fenxiao.entity.ShopSalesmanApply" id="ShopSalesmanApplyMap">
+		<id property="id" column="id" />
+		<result property="createBy" column="create_by" />
+		<result property="createTime" column="create_time" />
+		<result property="updateBy" column="update_by" />
+		<result property="updateTime" column="update_time" />
+			<result property="applyWay" column="apply_way" />
+			<result property="userId" column="user_id" />
+			<result property="parentUserId" column="parent_user_id" />
+			<result property="applyStatus" column="apply_status" />
+			<result property="remark" column="remark" />
+			<result property="companyId" column="company_id" />
+	</resultMap>
+	
+	
+	<!-- 定义ShopSalesmanApply 的简单map  ,本map不添加其他的关联属性 -->
+	<resultMap type="com.matrix.system.fenxiao.entity.ShopSalesmanApply" id="ShopSalesmanApplySimpleMap">
+		<id property="id" column="id" />
+		<result property="createBy" column="create_by" />
+		<result property="createTime" column="create_time" />
+		<result property="updateBy" column="update_by" />
+		<result property="updateTime" column="update_time" />
+			<result property="applyWay" column="apply_way" />
+			<result property="userId" column="user_id" />
+			<result property="parentUserId" column="parent_user_id" />
+			<result property="applyStatus" column="apply_status" />
+			<result property="remark" column="remark" />
+			<result property="companyId" column="company_id" />
+	</resultMap>
+
+	<select id="selectInvitationuserInPage" resultType="com.matrix.system.shopXcx.vo.SalesmanVo">
+		SELECT
+			a.nick_name,
+			a.avatar_url,
+			a.phone,
+			(
+				SELECT
+					IFNULL(sum(IFNULL( b.amount, 0 )),0)
+				FROM
+					shop_salesman_order b
+				WHERE
+					b.user_id = a.id
+				  and order_status=2
+				  AND b.sales_user_id = #{userId}
+
+			) AS revenueAmount,
+			( SELECT count( * ) FROM shop_salesman_order c WHERE c.user_id = a.id AND c.sales_user_id = #{userId} ) AS orderCount
+		FROM
+			sys_vip_info a
+		WHERE
+			a.recommend_id = #{userId}
+		  AND a.is_sales = #{isSales}
+	</select>
+
+	<select id="findShopSalesmanApplyList" resultType="com.matrix.system.fenxiao.vo.ShopSalesmanApplyVo">
+		SELECT
+		a.id id,
+		a.user_id userId,
+		b.avatar_url avatarUrl,
+		b.nick_name nickname,
+		(SELECT s.nick_name FROM sys_vip_info s
+		WHERE s.id = a.parent_user_id ) parentUser,
+		c.nick_name parentUserNow,
+		( SELECT COUNT(*) FROM sys_vip_info
+		WHERE recommend_id = a.user_id AND is_sales != 1 ) lowerLevelNum,
+		( SELECT COUNT(*) FROM sys_vip_info
+		WHERE recommend_id = a.user_id AND is_sales = 1 ) invitedNum,
+		( SELECT IFNULL(sum(IFNULL(amount, 0)), 0) FROM shop_salesman_order
+		WHERE  order_status = 2 AND sales_user_id = a.user_id ) totalRevenue,
+		( SELECT IFNULL(sum(IFNULL(amount, 0)), 0) FROM shop_salesman_order
+		WHERE  order_status = 1 AND sales_user_id = a.user_id ) balance,
+		g.NAME grade,
+		a.create_time createTime,
+		a.apply_status applyStatus,
+		a.apply_way applyWay
+		FROM
+		shop_salesman_apply a
+		LEFT JOIN sys_vip_info b ON a.user_id = b.id
+		LEFT JOIN shop_salesman_grade g ON a.grade_id = g.id
+		LEFT JOIN sys_vip_info c ON c.id = b.recommend_id
+		<where>
+		 	a.company_id=#{record.companyId}
+			<if test="record.shenheState != null and record.shenheState != ''">
+				and a.apply_status=#{record.shenheState}
+			</if>
+			<if test="record.salemanGrade != null and record.salemanGrade != ''">
+				and a.grade_id=#{record.salemanGrade}
+			</if>
+			<if test="record.userName != null and record.userName != ''">
+				and b.nick_name like concat('%',#{record.userName},'%')
+			</if>
+		</where>
+		<if test="record.sort !=null">
+			order by
+			a.${record.sort} ${record.order}
+		</if>
+	</select>
+	<select id="findShopSalesmanAppliingList" resultType="com.matrix.system.fenxiao.vo.ShopSalesmanAppliingVo">
+		SELECT
+		a.user_id userId,
+		b.nick_name nickName
+		FROM
+		shop_salesman_apply a
+		LEFT JOIN sys_vip_info b ON a.user_id = b.id
+		<where>
+			a.company_id = #{record.companyId}
+		    and a.apply_status = #{record.applyStatus}
+			<if test="record.nickName != null and record.nickName != ''">
+				and b.nick_name like concat('%',#{record.nickName},'%')
+			</if>
+		</where>
+		<if test="record.sort !=null">
+			order by
+			a.${record.sort} ${record.order}
+		</if>
+	</select>
+	<select id="selectBizUserApplyList" resultType="com.matrix.system.fenxiao.vo.ShopSalesmanAppliingVo">
+		SELECT
+		a.id userId,
+		a.nick_name nickName,
+		a.avatar_url avatarUrl,
+		a.create_time createTime,
+		a.phone
+		FROM
+		sys_vip_info a
+		<where>
+			a.company_id = #{record.companyId}
+			and a.is_sales != 1
+			<if test="record.nickName != null and record.nickName != ''">
+				and a.nick_name like concat('%',#{record.nickName},'%')
+			</if>
+		</where>
+		<if test="record.sort !=null">
+			order by
+			a.${record.sort} ${record.order}
+		</if>
+	</select>
+
+	<select id="selectSalesmanCenterInfo" resultType="com.matrix.system.shopXcx.vo.SalesmanCenterInfo">
+	select
+	IFNULL(withdrawal_cash,0) as withdrawal_cash,
+	(
+		SELECT
+			IFNULL(sum(IFNULL( b.amount, 0 )),0)
+		FROM
+			shop_salesman_order b
+		WHERE order_status=2
+		  AND b.sales_user_id = #{openId}
+
+	) AS totalRevenue,
+	(
+		SELECT
+			IFNULL(sum(IFNULL( b.amount, 0 )),0)
+		FROM
+			shop_salesman_order b
+		WHERE order_status=2 and revenue_type=1
+		  AND b.sales_user_id = #{openId}
+
+	) AS salesRevenue,
+	(
+		SELECT
+			IFNULL(sum(IFNULL( b.amount, 0 )),0)
+		FROM
+			shop_salesman_order b
+		WHERE order_status=2 and revenue_type=2
+		  AND b.sales_user_id = #{openId}
+
+	) AS invitationRevenue,
+	IFNULL(withdrawal_cash,0) as withdrawal_cash,
+	(
+		SELECT
+			IFNULL(sum(IFNULL( b.amount, 0 )),0)
+		FROM
+			shop_salesman_order b
+		WHERE order_status=1
+		  AND b.sales_user_id = #{openId}
+
+	) AS djsRevenue,
+
+	( SELECT count( * ) FROM shop_salesman_order c WHERE  c.sales_user_id = #{openId} and revenue_type =1 ) AS salesorderCount,
+	( SELECT count( * ) FROM shop_salesman_order c WHERE  c.sales_user_id = #{openId} and revenue_type =2 ) AS invitationOrderCount,
+	(select count(*) from sys_vip_info where recommend_id=#{openId} and is_sales=1) as invitationCount,
+	(select count(*) from sys_vip_info where recommend_id=#{openId} and is_sales=2) as customerCount
+	from sys_vip_info a where
+	a.id=#{id}
+
+	</select>
+
+	<select id="selectShopSalesmanDetailByOpenId" resultType="com.matrix.system.fenxiao.vo.SalesmanBasicDetailVo">
+		SELECT
+		a.user_id userId,
+		b.avatar_url avatarUrl,
+		b.nick_name nickname,
+		g.NAME grade,
+		b.phone,
+		(SELECT s.nick_name FROM sys_vip_info s
+		WHERE s.id = a.parent_user_id ) parentUser,
+		( SELECT COUNT(*) FROM sys_vip_info
+		WHERE recommend_id = a.user_id AND is_sales != 1 ) lowerLevelNum,
+		( SELECT COUNT(*) FROM sys_vip_info
+		WHERE recommend_id = a.user_id AND is_sales = 1 ) invitedNum,
+		( SELECT IFNULL(sum(IFNULL(amount, 0)), 0) FROM shop_salesman_order
+		WHERE order_status = 2 AND sales_user_id = a.user_id ) totalRevenue,
+		( SELECT IFNULL(sum(IFNULL(amount, 0)), 0) FROM shop_salesman_order
+		WHERE order_status = 1 AND sales_user_id = a.user_id ) balance,
+		a.create_time createTime,
+		a.apply_status applyStatus,
+		a.apply_way applyWay
+		FROM
+		shop_salesman_apply a
+		LEFT JOIN sys_vip_info b ON a.user_id = b.id
+		LEFT JOIN shop_salesman_grade g ON a.grade_id = g.id
+		    where a.id = #{applyId}
+	</select>
+
+	<select id="findCustomDetail" resultType="com.matrix.system.fenxiao.vo.ShopCustomDetailVo">
+		SELECT
+		b.id userId,
+		b.avatar_url avatarUrl,
+		b.nick_name nickname,
+		b.binding_parent_time createTime,
+		(select COUNT(*) from shop_salesman_order c where c.order_status = 1 and c.sales_user_id = b.id) doneNum
+		FROM sys_vip_info b
+		<where>
+			b.company_id = #{record.companyId}
+			AND b.is_sales != 1
+			and b.recommend_id = #{record.userId}
+			<if test="record.userName != null and record.userName != ''">
+				and b.nick_name like concat('%',#{record.userName},'%')
+			</if>
+		</where>
+		<if test="record.sort !=null">
+			order by
+			b.${record.sort} ${record.order}
+		</if>
+	</select>
+	<select id="findCustomLow" resultType="com.matrix.system.fenxiao.vo.ShopCustomDetailVo">
+		SELECT
+		b.id userId,
+		b.avatar_url avatarUrl,
+		b.nick_name nickname,
+		a.create_time createTime,
+		a.apply_way applyWay
+		FROM
+		shop_salesman_apply a
+		LEFT JOIN sys_vip_info b ON b.id = a.user_id
+		<where>
+			a.company_id = #{record.companyId}
+			AND b.is_sales = 1
+			and b.recommend_id = #{record.userId}
+			and a.apply_status = 2
+			<if test="record.userName != null and record.userName != ''">
+				and b.nick_name like concat('%',#{record.userName},'%')
+			</if>
+		</where>
+		<if test="record.sort !=null">
+			order by
+			a.${record.sort} ${record.order}
+		</if>
+	</select>
+
+	<select id="findShopOrderDetail" resultType="com.matrix.system.fenxiao.vo.ShopOrderDetailVo">
+		select
+		a.order_id orderId,
+		a.create_time createTime,
+		a.amount amount,
+		a.revenue_type revenueType,
+		a.order_status orderStatus,
+		b.nick_name nickName,
+		b.avatar_url avatarUrl,
+		c.order_no orderNo,
+		c.order_money orderMoney,
+		c.order_status orderState,
+		f.shop_name storeName
+		from shop_salesman_order a
+		left join sys_vip_info b on b.id=a.user_id
+		left join shop_order c on a.order_id=c.id
+		LEFT JOIN sys_shop_info f on f.id = c.store_id
+		<where>
+			a.sales_user_id = #{record.userId}
+			<if test="record.orderType != null and record.orderType != ''">
+				and a.order_status = #{record.orderType}
+			</if>
+			<if test="record.userName != null and record.userName != ''">
+				and b.nick_name like concat('%',#{record.userName},'%')
+			</if>
+		</where>
+		<if test="record.sort !=null">
+			order by
+			a.${record.sort} ${record.order}
+		</if>
+	</select>
+
+</mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanGradeDao.xml b/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanGradeDao.xml
new file mode 100644
index 0000000..3b3a30a
--- /dev/null
+++ b/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanGradeDao.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.matrix.system.fenxiao.dao.ShopSalesmanGradeDao">
+	<!-- 定义ShopSalesmanGrade 的复杂关联map -->
+	<resultMap type="com.matrix.system.fenxiao.entity.ShopSalesmanGrade" id="ShopSalesmanGradeMap">
+		<id property="id" column="id" />
+		<result property="createBy" column="create_by" />
+		<result property="createTime" column="create_time" />
+		<result property="updateBy" column="update_by" />
+		<result property="updateTime" column="update_time" />
+			<result property="name" column="name" />
+			<result property="sealesCommission" column="seales_commission" />
+			<result property="invitationCommission" column="invitation_commission" />
+			<result property="gradeCondition" column="grade_condition" />
+			<result property="isDefault" column="is_default" />
+			<result property="companyId" column="company_id" />
+	</resultMap>
+	
+	
+	<!-- 定义ShopSalesmanGrade 的简单map  ,本map不添加其他的关联属性 -->
+	<resultMap type="com.matrix.system.fenxiao.entity.ShopSalesmanGrade" id="ShopSalesmanGradeSimpleMap">
+		<id property="id" column="id" />
+		<result property="createBy" column="create_by" />
+		<result property="createTime" column="create_time" />
+		<result property="updateBy" column="update_by" />
+		<result property="updateTime" column="update_time" />
+			<result property="name" column="name" />
+			<result property="sealesCommission" column="seales_commission" />
+			<result property="invitationCommission" column="invitation_commission" />
+			<result property="gradeCondition" column="grade_condition" />
+			<result property="isDefault" column="is_default" />
+			<result property="companyId" column="company_id" />
+	</resultMap>
+
+
+	<select id="getShopSalesmanGradeVo" resultType="com.matrix.system.fenxiao.vo.ShopSalesmanGradeVo">
+		SELECT
+		a.id,
+		a.name
+		FROM
+		shop_salesman_grade a
+		where
+		a.company_id = #{companyId}
+	</select>
+
+	<select id="findFyfaManageList" resultType="com.matrix.system.fenxiao.vo.FyfaManageVo">
+		SELECT
+			a.id id,
+			a.name name,
+			a.self_commission selfCommission,
+			a.seales_commission sealesCommission,
+			a.invitation_commission invitationCommission,
+			a.grade_condition gradeCondition,
+			a.is_default isDefault
+		FROM
+		shop_salesman_grade a
+		<where>
+			a.company_id = #{record.companyId}
+		</where>
+		<if test="record.sort !=null">
+			order by
+			a.${record.sort} ${record.order}
+		</if>
+	</select>
+
+</mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanOrderDao.xml b/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanOrderDao.xml
new file mode 100644
index 0000000..a594e68
--- /dev/null
+++ b/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanOrderDao.xml
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.matrix.system.fenxiao.dao.ShopSalesmanOrderDao">
+	<!-- 定义ShopSalesmanOrder 的复杂关联map -->
+	<resultMap type="com.matrix.system.fenxiao.entity.ShopSalesmanOrder" id="ShopSalesmanOrderMap">
+		<id property="id" column="id" />
+		<result property="createBy" column="create_by" />
+		<result property="createTime" column="create_time" />
+		<result property="updateBy" column="update_by" />
+		<result property="updateTime" column="update_time" />
+			<result property="orderId " column="order_id " />
+			<result property="userId" column="user_id" />
+			<result property="salesUserId" column="sales_user_id" />
+			<result property="revenueType" column="revenue_type" />
+			<result property="amount" column="amount" />
+			<result property="orderStatus" column="order_status" />
+			<result property="settlementId" column="settlement_id" />
+			<result property="companyId" column="company_id" />
+	</resultMap>
+	
+	
+	<!-- 定义ShopSalesmanOrder 的简单map  ,本map不添加其他的关联属性 -->
+	<resultMap type="com.matrix.system.fenxiao.entity.ShopSalesmanOrder" id="ShopSalesmanOrderSimpleMap">
+		<id property="id" column="id" />
+		<result property="createBy" column="create_by" />
+		<result property="createTime" column="create_time" />
+		<result property="updateBy" column="update_by" />
+		<result property="updateTime" column="update_time" />
+			<result property="orderId " column="order_id " />
+			<result property="userId" column="user_id" />
+			<result property="salesUserId" column="sales_user_id" />
+			<result property="revenueType" column="revenue_type" />
+			<result property="amount" column="amount" />
+			<result property="orderStatus" column="order_status" />
+			<result property="settlementId" column="settlement_id" />
+			<result property="companyId" column="company_id" />
+	</resultMap>
+
+    <select id="selectSalesManOrder" resultType="com.matrix.system.shopXcx.vo.SalesOrderVo">
+		select
+			a.order_id,
+			a.create_time,
+			a.amount,
+			a.revenue_type,
+			a.order_status,
+			b.nick_name,
+			b.avatar_url,
+			c.order_no,
+			c.order_money
+		from shop_salesman_order a
+				 left join sys_vip_info b on b.id=a.user_id
+				 left join shop_order c on a.order_id=c.id
+		where
+			a.sales_user_id=#{record.userId}
+			and	a.revenue_type=#{record.revenueType}
+		<if test="record.orderStatus!=null" >
+			and a.order_status=#{record.orderStatus}
+		</if>
+		<if test="record.sort!=null and record.order!=null" >
+		order by ${record.sort} ${record.order}
+		</if>
+
+	</select>
+
+	<select id="selectFenxiaoOrderBasicByCompanyId" resultType="com.matrix.system.fenxiao.vo.LoadFenxiaoOrderBasicVo">
+		SELECT
+			COUNT(*) num,
+			(SELECT IFNULL(sum(IFNULL(amount, 0)), 0)
+				FROM shop_salesman_order
+				WHERE order_status = 1 and company_id=#{companyId}) balance,
+			(SELECT COUNT(*) FROM
+					(SELECT DISTINCT user_id
+						FROM shop_salesman_order
+						WHERE order_status = 1 and company_id=#{companyId} ) a) waitNum,
+			(SELECT COUNT(*)
+				FROM shop_salesman_order
+				WHERE order_status = 1 and company_id=#{companyId}) waitOrderNum
+		FROM
+			shop_salesman_order
+		where company_id=#{companyId}
+	</select>
+
+	<select id="findFenxiaoOrderList" resultType="com.matrix.system.fenxiao.vo.LoadFenxiaoOrderListVo">
+		SELECT
+		a.id id,
+		d.order_no,
+		d.order_money actualBalance,
+		f.shop_name address,
+		d.order_status orderState,
+		b.nick_name custom,
+		b.id customUserId,
+		e.nick_name parentSale,
+		a.revenue_type profitType,
+		a.amount profitBalance,
+		a.order_status settleType,
+		c.order_no settleNo,
+		c.create_time settleTime,
+		g.su_name settler
+		FROM
+		shop_salesman_order a
+		LEFT JOIN sys_vip_info b on a.user_id = b.id
+		LEFT JOIN shop_saleman_settlement c on a.settlement_id = c.id
+		LEFT JOIN shop_order d on d.id = a.order_id
+		LEFT JOIN sys_vip_info e on a.sales_user_id = e.id
+		LEFT JOIN sys_shop_info f on f.id = d.store_id
+		LEFT JOIN sys_users g on c.user_id = g.su_id
+		<where>
+			a.company_id = #{record.companyId}
+			<if test="record.userName != null and record.userName != ''">
+				and b.nick_name like concat('%',#{record.userName},'%')
+			</if>
+			<if test="record.ddType != null and record.ddType != ''">
+				and d.order_status = #{record.ddType}
+			</if>
+			<if test="record.startTime != null ">
+				and a.create_time >= #{record.startTime}
+			</if>
+			<if test="record.endTime != null">
+				and  #{record.endTime} >= a.create_time
+			</if>
+			<if test="record.tgy != null and record.tgy != ''">
+				and e.nick_name like concat('%',#{record.tgy},'%')
+			</if>
+			<if test="record.orderType != null and record.orderType != ''">
+				and a.order_status = #{record.orderType}
+			</if>
+			<if test="record.jsbh != null and record.jsbh != ''">
+				and c.order_no = #{record.jsbh}
+			</if>
+			<if test="record.ddh != null and record.ddh != ''">
+				and d.order_no = #{record.ddh}
+			</if>
+		</where>
+		<if test="record.sort !=null">
+			order by
+			a.${record.sort} ${record.order}
+		</if>
+	</select>
+
+	<select id="findSetOrderList" resultType="com.matrix.system.fenxiao.vo.LoadSetOrderListDtoVo">
+		select
+		a.id id,
+		a.order_no orderNo,
+		a.amount actualBalance,
+		a.order_count setNum,
+		a.man_count setManNum,
+		a.create_time setTime,
+		b.su_name setMan,
+		a.settlement_way settlementWay,
+		a.remark remark
+		from
+		shop_saleman_settlement a
+		left join sys_users b on a.user_id = b.su_id
+		<where>
+			a.company_id = #{record.companyId}
+			<if test="record.userName != null and record.userName != ''">
+				and b.su_name like concat('%',#{record.userName},'%')
+			</if>
+			<if test="record.startTime != null ">
+				and a.create_time >= #{record.startTime}
+			</if>
+			<if test="record.endTime != null">
+				and  #{record.endTime} >= a.create_time
+			</if>
+		</where>
+		<if test="record.sort !=null">
+			order by
+			a.${record.sort} ${record.order}
+		</if>
+	</select>
+
+</mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanOrderItemDao.xml b/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanOrderItemDao.xml
new file mode 100644
index 0000000..4d73645
--- /dev/null
+++ b/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanOrderItemDao.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.matrix.system.fenxiao.dao.ShopSalesmanOrderItemDao">
+	<!-- 定义ShopSalesmanOrderItem 的复杂关联map -->
+	<resultMap type="com.matrix.system.fenxiao.entity.ShopSalesmanOrderItem" id="ShopSalesmanOrderItemMap">
+		<id property="id" column="id" />
+		<result property="createBy" column="create_by" />
+		<result property="createTime" column="create_time" />
+		<result property="updateBy" column="update_by" />
+		<result property="updateTime" column="update_time" />
+			<result property="orderId " column="order_id " />
+			<result property="salesmanOrderId" column="salesman_order_id" />
+			<result property="orderItemId" column="order_item_id" />
+			<result property="amount" column="amount" />
+	</resultMap>
+	
+	
+	<!-- 定义ShopSalesmanOrderItem 的简单map  ,本map不添加其他的关联属性 -->
+	<resultMap type="com.matrix.system.fenxiao.entity.ShopSalesmanOrderItem" id="ShopSalesmanOrderItemSimpleMap">
+		<id property="id" column="id" />
+		<result property="createBy" column="create_by" />
+		<result property="createTime" column="create_time" />
+		<result property="updateBy" column="update_by" />
+		<result property="updateTime" column="update_time" />
+			<result property="orderId " column="order_id " />
+			<result property="salesmanOrderId" column="salesman_order_id" />
+			<result property="orderItemId" column="order_item_id" />
+			<result property="amount" column="amount" />
+	</resultMap>
+
+</mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml
index f28efbf..4d98102 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml
@@ -17,10 +17,8 @@
 		<result property="vipId" column="vip_id" />
 		<result property="freeConsume" column="free_consume" />
 		<result property="hisConsume" column="his_consume" />
-		<result property="consume" column="consume" />
-		<result property="cardCash" column="card_cash" />
-		<result property="projCash" column="proj_cash" />
 		<result property="goodsCash" column="goods_cash" />
+		<result property="cardCash" column="card_cash" />
 		<result property="projNum" column="proj_num" />
 		<result property="numberOfPeople" column="number_of_people" />
 		<result property="shopName" column="shop_name" />
@@ -30,7 +28,7 @@
 		<result property="projPercentage" column="proj_percentage" />
 		<result property="t1" column="t1" />
 		<result property="t2" column="t2" />
-		<result property="t3" column="t3" />
+		<result property="achieveType" column="achieveType" />
 		<result property="t4" column="t4" />
 		<result property="t5" column="t5" />
 		<result property="t6" column="t6" />
@@ -47,12 +45,13 @@
 		<result property="guwen" column="guwen" />
 		<result property="meiliao" column="meiliao" />
 		<result property="zkTotal" column="zk_total" />
-
+		<result property="payMethod" column="pay_method" />
 		<result property="arriveCnt" column="arrive_cnt" />
 
 		<result property="goodsNo" column="goodsNo" />
 		<result property="goodsName" column="goodsName" />
-		<result property="zkPrice" column="zkPrice" />
+
+		<result property="cateName" column="cateName" />
 
 	</resultMap>
 
@@ -67,13 +66,7 @@
 		d.level_name,
 		c.vip_name,
 		e.name as pro_name,
-		a.card_cash,
-		(IFNULL(a.card_cash,0) +IFNULL(a.proj_cash,0) + IFNULL(a.goods_cash,0)
-		) as zk_total,
-		a.proj_cash,
-		a.goods_cash,
-		a.card_cash,
-		a.consume,
+		b.ZK_TOTAL as zk_total,
 		a.his_consume,
 		a.free_consume,
 		f.su_name meiliao,
@@ -82,9 +75,13 @@
 		a.number_of_people,
 		a.proj_num,
 		a.proj_time,
-		i.name as module_subName,
-		h.SHOP_NAME shop_name,
-		a.order_type
+		i.name as cateName,
+		h.shop_short_name shop_name,
+		a.order_type,
+		a.achieveType,
+		case when a.pay_method = '现金' then goods_cash end goods_cash,
+		case when a.pay_method = '划扣' then goods_cash end card_cash,
+		j.pay_method
 		from
 		achieve_new a
 		left join sys_order b on a.order_id=b.id
@@ -96,6 +93,7 @@
 		LEFT JOIN sys_shop_info h ON a.SHOP_ID = h.ID
 		LEFT JOIN shopping_goods_category i ON e.cate_id = i.id
 		left join sys_proj_services l on a.service_order_id=l.id
+		left join sys_order_item j on a.order_item_id=j.ID
 		<where>
 			<if test="record!=null">
 				<if
@@ -206,12 +204,8 @@
 		YEAR (a.datatime) year,
 		MONTH (a.datatime) month,
 		DAY(a.datatime) day,
-		SUM(a.card_cash) as card_cash ,
-		SUM((IFNULL(a.card_cash,0) +IFNULL(a.proj_cash,0) + IFNULL(a.goods_cash,0) ) )as zk_total,
-		SUM(a.proj_cash) as proj_cash,
+		SUM( IFNULL(a.goods_cash,0)  )as zk_total,
 		SUM(a.goods_cash) as goods_cash,
-		SUM(a.card_cash) as card_cash,
-		SUM(a.consume) as consume,
 		SUM(a.his_consume) as his_consume,
 		SUM(a.free_consume) as free_consume,
 		SUM(a.proj_percentage) as proj_percentage,
@@ -287,9 +281,6 @@
 		<result property="vipId" column="vip_id" />
 		<result property="freeConsume" column="free_consume" />
 		<result property="hisConsume" column="his_consume" />
-		<result property="consume" column="consume" />
-		<result property="cardCash" column="card_cash" />
-		<result property="projCash" column="proj_cash" />
 		<result property="goodsCash" column="goods_cash" />
 		<result property="projNum" column="proj_num" />
 		<result property="numberOfPeople" column="number_of_people" />
@@ -298,9 +289,10 @@
 		<result property="remark" column="remark" />
 		<result property="orderType" column="order_type" />
 		<result property="projPercentage" column="proj_percentage" />
+		<result property="payMethod" column="pay_method" />
 		<result property="t1" column="t1" />
 		<result property="t2" column="t2" />
-		<result property="t3" column="t3" />
+		<result property="achieveType" column="achieveType" />
 		<result property="t4" column="t4" />
 		<result property="t5" column="t5" />
 		<result property="t6" column="t6" />
@@ -323,9 +315,6 @@
 		vip_id,
 		free_consume,
 		his_consume,
-		consume,
-		card_cash,
-		proj_cash,
 		goods_cash,
 		proj_num,
 		number_of_people,
@@ -334,15 +323,17 @@
 		remark,
 		order_type,
 		proj_percentage,
+
 		t1,
 		t2,
-		t3,
+		achieveType,
 		t4,
 		t5,
 		t6,
 		t8,
 		t9,
-		company_id
+		company_id,
+pay_method
 	</sql>
 
 	<!-- 属性sql -->
@@ -359,9 +350,6 @@
 		#{item.vipId},
 		#{item.freeConsume},
 		#{item.hisConsume},
-		#{item.consume},
-		#{item.cardCash},
-		#{item.projCash},
 		#{item.goodsCash},
 		#{item.projNum},
 		#{item.numberOfPeople},
@@ -370,15 +358,17 @@
 		#{item.remark},
 		#{item.orderType},
 		#{item.projPercentage},
+
 		#{item.t1},
 		#{item.t2},
-		#{item.t3},
+		#{item.achieveType},
 		#{item.t4},
 		#{item.t5},
 		#{item.t6},
 		#{item.t8},
 		#{item.t9},
-		#{item.companyId}
+		#{item.companyId},
+		#{item.payMethod}
 	</sql>
 
 	<!-- where sql -->
@@ -436,18 +426,8 @@
 				test="(record.hisConsume!=null and record.hisConsume!='') or  (record.hisConsume!='' and record.hisConsume==0)  ">
 				and his_consume = #{record.hisConsume}
 			</if>
-			<if
-				test="(record.consume!=null and record.consume!='') or  (record.consume!='' and record.consume==0)  ">
-				and consume = #{record.consume}
-			</if>
-			<if
-				test="(record.cardCash!=null and record.cardCash!='') or  (record.cardCash!='' and record.cardCash==0)  ">
-				and card_cash = #{record.cardCash}
-			</if>
-			<if
-				test="(record.projCash!=null and record.projCash!='') or  (record.projCash!='' and record.projCash==0)  ">
-				and proj_cash = #{record.projCash}
-			</if>
+
+
 			<if
 				test="(record.goodsCash!=null and record.goodsCash!='') or  (record.goodsCash!='' and record.goodsCash==0)  ">
 				and goods_cash = #{record.goodsCash}
@@ -489,8 +469,8 @@
 				and t2 = #{record.t2}
 			</if>
 			<if
-				test="(record.t3!=null and record.t3!='') or  (record.t3!='' and record.t3==0)  ">
-				and t3 = #{record.t3}
+				test="(record.achieveType!=null and record.achieveType!='') or  (record.achieveType!='' and record.achieveType==0)  ">
+				and achieveType = #{record.achieveType}
 			</if>
 			<if
 				test="(record.t4!=null and record.t4!='') or  (record.t4!='' and record.t4==0)  ">
@@ -584,15 +564,9 @@
 			<if test="_parameter.containsKey('hisConsume')">
 				his_consume = #{hisConsume},
 			</if>
-			<if test="_parameter.containsKey('consume')">
-				consume = #{consume},
-			</if>
-			<if test="_parameter.containsKey('cardCash')">
-				card_cash = #{cardCash},
-			</if>
-			<if test="_parameter.containsKey('projCash')">
-				proj_cash = #{projCash},
-			</if>
+
+
+
 			<if test="_parameter.containsKey('goodsCash')">
 				goods_cash = #{goodsCash},
 			</if>
@@ -617,14 +591,15 @@
 			<if test="_parameter.containsKey('projPercentage')">
 				proj_percentage = #{projPercentage},
 			</if>
+
 			<if test="_parameter.containsKey('t1')">
 				t1 = #{t1},
 			</if>
 			<if test="_parameter.containsKey('t2')">
 				t2 = #{t2},
 			</if>
-			<if test="_parameter.containsKey('t3')">
-				t3 = #{t3},
+			<if test="_parameter.containsKey('achieveType')">
+				achieveType = #{achieveType},
 			</if>
 			<if test="_parameter.containsKey('t4')">
 				t4 = #{t4},
@@ -640,6 +615,9 @@
 			</if>
 			<if test="_parameter.containsKey('t9')">
 				t9 = #{t9},
+			</if>
+			<if test="_parameter.containsKey('payMethod')">
+				pay_method = #{payMethod},
 			</if>
 		</set>
 		WHERE id=#{id}
@@ -703,15 +681,8 @@
 			<if test="record.hisConsume != null ">
 				his_consume = #{record.hisConsume},
 			</if>
-			<if test="record.consume != null ">
-				consume = #{record.consume},
-			</if>
-			<if test="record.cardCash != null ">
-				card_cash = #{record.cardCash},
-			</if>
-			<if test="record.projCash != null ">
-				proj_cash = #{record.projCash},
-			</if>
+
+
 			<if test="record.goodsCash != null ">
 				goods_cash = #{record.goodsCash},
 			</if>
@@ -736,14 +707,15 @@
 			<if test="record.projPercentage != null ">
 				proj_percentage = #{record.projPercentage},
 			</if>
+
 			<if test="record.t1 != null and record.t1 != '' ">
 				t1 = #{record.t1},
 			</if>
 			<if test="record.t2 != null and record.t2 != '' ">
 				t2 = #{record.t2},
 			</if>
-			<if test="record.t3 != null and record.t3 != '' ">
-				t3 = #{record.t3},
+			<if test="record.achieveType != null and record.achieveType != '' ">
+				achieveType = #{record.achieveType},
 			</if>
 			<if test="record.t4 != null and record.t4 != '' ">
 				t4 = #{record.t4},
@@ -759,6 +731,9 @@
 			</if>
 			<if test="record.t9 != null and record.t9 != '' ">
 				t9 = #{record.t9},
+			</if>
+			<if test="record.payMethod != null and record.payMethod != '' ">
+				pay_method = #{record.payMethod},
 			</if>
 		</set>
 		WHERE id=#{record.id}
@@ -784,6 +759,11 @@
 		DELETE FROM achieve_new
 		where 1=1
 		<include refid="where_sql"></include>
+	</delete>
+
+
+	<delete id="deleteByOrderId">
+		DELETE FROM achieve_new where order_id=#{orderId}
 	</delete>
 
 
@@ -857,7 +837,7 @@
 			sum(b.hisConsume) his_consume
 		from sys_vip_info a
 		inner join (
-			select vip_id,datatime, sum(a.free_consume) freeConsume, sum(a.his_consume) hisConsume, sum(IFNULL(goods_cash, 0) + IFNULL(card_cash, 0)) buyConsume from achieve_new a group by vip_id
+			select vip_id,datatime, sum(a.free_consume) freeConsume, sum(a.his_consume) hisConsume, sum(IFNULL(goods_cash, 0) )) buyConsume from achieve_new a group by vip_id
 		) b on a.ID = b.vip_id
 		inner join (
 			select vip_id, count(1) cnt from (
@@ -904,7 +884,7 @@
 		select count(1)
 		from sys_vip_info a
 		inner join (
-		select vip_id,datatime, sum(a.free_consume) freeConsume, sum(a.his_consume) hisConsume, sum(IFNULL(goods_cash, 0) + IFNULL(card_cash, 0)) buyConsume from achieve_new a group by vip_id
+		select vip_id,datatime, sum(a.free_consume) freeConsume, sum(a.his_consume) hisConsume, sum(IFNULL(goods_cash, 0)  ) buyConsume from achieve_new a group by vip_id
 		) b on a.ID = b.vip_id
 		inner join (
 		select vip_id, count(1) cnt from (
@@ -940,8 +920,16 @@
 	<select id="selectUserAchieveByTime" resultType="com.matrix.system.app.vo.UserAchieveVo">
 		select
 			sale_id id,
-			sum(case t3 when '现金业绩' then card_cash else 0 end) orderCash,
-			sum(case t3 when '划扣业绩' then consume else 0 end) cash,
+			(select ifnull(sum(case pay_method when '现金' then goods_cash else 0 end),0)
+				from achieve_new a
+			where a.beault_id=#{userId}
+			and (date_format(datatime, '%Y-%m-%d') >= date_format(#{startTime}, '%Y-%m-%d') and date_format(#{endTime}, '%Y-%m-%d') >= date_format(datatime, '%Y-%m-%d'))
+			) orderCash,
+			(select ifnull(sum(case pay_method when '划扣' then goods_cash else 0 end),0)
+				from achieve_new a
+			where  a.beault_id=#{userId}
+			and (date_format(datatime, '%Y-%m-%d') >= date_format(#{startTime}, '%Y-%m-%d') and date_format(#{endTime}, '%Y-%m-%d') >= date_format(datatime, '%Y-%m-%d'))
+			) cash,
 			sum(case order_type when '订单' then proj_percentage else 0 end) cardUse,
 			sum(IFNULL(his_consume, 0)) hisConsume,
 			sum(IFNULL(free_consume, 0)) freeConsume,
@@ -954,7 +942,7 @@
 	<select id="selectApiOrderItemAchieve" resultType="com.matrix.system.app.vo.OrderDetailAchieveItemVo">
 		select
 			b.su_name name,
-			IFNULL(a.card_cash, 0) + IFNULL(a.proj_cash, 0) + IFNULL(a.goods_cash, 0) achieve
+			IFNULL(a.goods_cash, 0) achieve
 		from achieve_new a
 		inner join sys_users b on (a.beault_id=b.su_id or a.sale_id = b.su_id)
 		where a.order_item_id=#{itemId} and order_type = '订单'
@@ -989,7 +977,8 @@
 		select
 			b.su_name name,
 			b.su_id id,
-			sum(IFNULL(a.free_consume,0) + IFNULL(a.his_consume, 0) + IFNULL(a.consume, 0)) amount,
+			b.su_photo photo,
+			sum(IFNULL(a.free_consume,0) + IFNULL(a.his_consume, 0) ) amount,
 			c.shop_short_name shopName
 		from achieve_new a
 		inner join sys_users b on a.beault_id=b.su_id
@@ -1035,7 +1024,7 @@
 		b.su_name name,
 		b.su_id id,
 		b.su_photo photo,
-		sum(ifnull(card_cash,0)) amount,
+		sum(ifnull(goods_cash,0)) amount,
 		c.shop_short_name shopName
 		from achieve_new a
 		inner join sys_users b on a.beault_id=b.su_id
@@ -1065,21 +1054,23 @@
 		select
 			b.shop_short_name name,
 			b.SHOP_IMAG photo,
-			sum(IFNULL(a.consume,0) + IFNULL(a.card_cash,0)) amount
-		from achieve_new a
-		left join sys_shop_info b on a.shop_id=b.ID and shop_type!=1
+			sum(IFNULL(a.amount,0)) amount
+		from sys_order_flow a
+		inner join sys_order c on a.order_id=c.id and c.STATU != '已取消'
+		inner join sys_shop_info b on a.shop_id=b.id and shop_type!=1
 		<where>
+			a.pay_method not in ('储值卡', '欠款')
 			<if test="record.companyId != null">
 				and a.company_id=#{record.companyId}
 			</if>
 			<if test='record.t1 == "1" and record.datatime != null'>
-				and date_format(datatime, '%Y-%m-%d') = date_format(#{record.datatime}, '%Y-%m-%d')
+				and date_format(a.create_time, '%Y-%m-%d') = date_format(#{record.datatime}, '%Y-%m-%d')
 			</if>
 			<if test='record.t1 == "2" and record.datatime != null'>
-				and date_format(datatime, '%Y-%m') = date_format(#{record.datatime}, '%Y-%m')
+				and date_format(a.create_time, '%Y-%m') = date_format(#{record.datatime}, '%Y-%m')
 			</if>
 			<if test='record.t1 == "3" and record.datatime != null'>
-				and date_format(datatime, '%Y') = date_format(#{record.datatime}, '%Y')
+				and date_format(a.create_time, '%Y') = date_format(#{record.datatime}, '%Y')
 			</if>
 		</where>
 		group by a.shop_id
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml
index c74aeca..493f7d5 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml
@@ -619,7 +619,7 @@
 	</select>
 
     <select id="selectVipCardTotalMoney" resultType="java.lang.Double">
-            SELECT TRUNCATE( SUM(gift_money)+SUM(real_money) ,2 ) from money_card_use where vip_id=#{vipId}  and `status` ='有效'
+            SELECT  IFNULL(sum(IFNULL(gift_money, 0)),0)+ IFNULL(sum(IFNULL(real_money, 0)),0)  from money_card_use where vip_id=#{vipId}  and `status` ='有效'
     </select>
 
 
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseFlowDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseFlowDao.xml
index a40157c..d9d505a 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseFlowDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseFlowDao.xml
@@ -7,6 +7,7 @@
 	<resultMap type="com.matrix.system.hive.bean.MoneyCardUseFlow" id="MoneyCardUseFlowMap">
 		<id property="id" column="id" />
 		<result property="orderNo" column="order_no" />
+		<result property="payNo" column="pay_no" />
 		<result property="operationId" column="operation_id" />
 		<result property="content" column="content" />
 		<result property="createTime" column="create_time" />
@@ -31,6 +32,7 @@
 	<resultMap type="com.matrix.system.hive.bean.MoneyCardUseFlow" id="MoneyCardUseFlowSimpleMap">
 		<id property="id" column="id" />
 		<result property="orderNo" column="order_no" />
+		<result property="payNo" column="pay_no" />
 		<result property="operationId" column="operation_id" />
 		<result property="content" column="content" />
 		<result property="createTime" column="create_time" />
@@ -51,6 +53,7 @@
 		INSERT INTO money_card_use_flow (
 		id,
 		order_no,
+		pay_no,
 		operation_id,
 		content,
 		create_time,
@@ -66,6 +69,7 @@
 		VALUES (
 		#{id},
 		#{orderNo},
+		#{payNo},
 		#{operationId},
 		#{content},
 		#{createTime},
@@ -94,7 +98,7 @@
 			<if test="content != null and content !='' ">
 				content = #{content},
 			</if>
-			<if test="createTime != null and createTime !='' ">
+			<if test="createTime != null  ">
 				create_time = #{createTime},
 			</if>
 			<if test="vipId != null and vipId !='' ">
@@ -109,8 +113,8 @@
 			<if test="type != null and type !='' ">
 				type = #{type},
 			</if>
-			<if test="taotal != null and taotal !='' ">
-				taotal = #{taotal},
+			<if test="total != null and total !='' ">
+				total = #{total},
 			</if>
 			<if test="times != null and times !='' ">
 				times = #{times},
@@ -149,6 +153,7 @@
 		select
 		id,
 		order_no,
+		pay_no,
 		operation_id,
 		content,
 		create_time,
@@ -171,6 +176,9 @@
 			</if>
 			<if test="record.orderNo != null and record.orderNo !='' ">
 				and order_no = #{record.orderNo}
+			</if>
+			<if test="record.payNo != null and record.payNo !='' ">
+				and pay_no = #{record.payNo}
 			</if>
 			<if test="record.operationId != null and record.operationId !='' ">
 				and operation_id = #{record.operationId}
@@ -215,6 +223,9 @@
 			<if test="record.orderNo != null and record.orderNo !='' ">
 				and order_no = #{record.orderNo}
 			</if>
+			<if test="record.payNo != null and record.payNo !='' ">
+				and pay_no = #{record.payNo}
+			</if>
 			<if test="record.operationId != null and record.operationId !='' ">
 				and operation_id = #{record.operationId}
 			</if>
@@ -245,6 +256,7 @@
 		select
 		id,
 		order_no,
+		pay_no,
 		operation_id,
 		content,
 		create_time,
@@ -269,6 +281,7 @@
 		select
 		id,
 		order_no,
+		pay_no,
 		operation_id,
 		content,
 		create_time,
@@ -292,6 +305,9 @@
 			<if test="record.orderNo != null and record.orderNo !='' ">
 				and order_no = #{record.orderNo}
 			</if>
+			<if test="record.payNo != null and record.payNo !='' ">
+				and pay_no = #{record.payNo}
+			</if>
 			<if test="record.operationId != null and record.operationId !='' ">
 				and operation_id = #{record.operationId}
 			</if>
@@ -315,6 +331,35 @@
 			</if>
 		</if>
 	</select>
+
+	<select id="selectForWxInPage" resultMap="MoneyCardUseFlowMap">
+		select
+			id,
+			order_no,
+			pay_no,
+			content,
+			create_time,
+			type,
+			total,
+			times,
+			gift_money,
+			balance,
+			(SELECT su_name from sys_users a WHERE operation_id=a.su_id) staffName
+		from money_card_use_flow
+		<where>
+				and car_use_id=#{record.carUseId}
+			<if test="record.queryTime!=null and record.queryTime!=''">
+				and DATE_FORMAT(create_time,'%Y-%m')=#{record.queryTime}
+			</if>
+			<if test="record.revenueType==1">
+				and  total>0
+			</if>
+			<if test="record.revenueType==2">
+				<![CDATA[ and total<0 ]]>
+			</if>
+		</where>
+		order by  create_time desc
+	</select>
 </mapper>
 
 		
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseV2Dao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseV2Dao.xml
new file mode 100644
index 0000000..86ef51f
--- /dev/null
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseV2Dao.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.matrix.system.hive.dao.MoneyCardUseV2Dao">
+
+</mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/OnlinebookingDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/OnlinebookingDao.xml
index 4bb2b75..a60b9d8 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/OnlinebookingDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/OnlinebookingDao.xml
@@ -17,7 +17,7 @@
 			<result property="staffId" column="staff_id" />
 			<result property="vipName" column="vip_name" />
 			<result property="tel" column="tel" />
-			<result property="bizUserId" column="biz_user_id" />
+			<result property="bizUserId" column="sys_vip_info_id" />
 			<result property="formId" column="form_id" />
 
 		<result property="productId" column="product_id" />
@@ -42,7 +42,7 @@
 			<result property="staffId" column="staff_id" />
 			<result property="vipName" column="vip_name" />
 			<result property="tel" column="tel" />
-			<result property="bizUserId" column="biz_user_id" />
+			<result property="bizUserId" column="sys_vip_info_id" />
 			<result property="productId" column="product_id" />
 		<result property="orderNo" column="order_no" />
 		<result property="formId" column="form_id" />
@@ -66,7 +66,7 @@
 			staff_id,
 			vip_name,
 			tel,
-			biz_user_id,
+			sys_vip_info_id,
 			product_id,
 			order_no,
 			form_id
@@ -129,7 +129,7 @@
 					tel = #{tel},
 				</if>
 				<if test="(bizUserId!=null and bizUserId!='') or (bizUserId!='' and bizUserId==0)">
-					biz_user_id = #{bizUserId},
+					sys_vip_info_id = #{bizUserId},
 				</if>
 				<if test="(productId!=null and productId!='') or (productId!='' and productId==0)">
 					product_id = #{productId},
@@ -199,7 +199,7 @@
 		staff_id,
 		vip_name,
 		tel,
-		biz_user_id,
+		sys_vip_info_id,
 		product_id,
 		order_no,
 		form_id,
@@ -303,7 +303,7 @@
 		staff_id,
 		vip_name,
 		tel,
-		biz_user_id,
+		sys_vip_info_id,
 		product_id
 		from onlinebooking
 		where 1=1
@@ -417,7 +417,7 @@
 			staff_id,
 			vip_name,
 			tel,
-			biz_user_id,
+			sys_vip_info_id,
 			product_id,
 			order_no
 		from onlinebooking
@@ -442,7 +442,7 @@
 		staff_id,
 		vip_name,
 		tel,
-		biz_user_id,
+		sys_vip_info_id,
 		product_id
 		from onlinebooking
 		where 1=1
@@ -495,7 +495,7 @@
 		staff_id,
 		vip_name,
 		tel,
-		biz_user_id,
+		sys_vip_info_id,
 		product_id,
 		order_no
 		from onlinebooking
@@ -547,7 +547,7 @@
 		staff_id,
 		vip_name,
 		tel,
-		biz_user_id,
+		sys_vip_info_id,
 		product_id,
 		order_no,
 		form_id,
@@ -565,7 +565,7 @@
 				and vip_Id  = #{record.vipId}
 			</if>
 			<if test="(record.bizUserId!=null and record.bizUserId!='') or (record.bizUserId!='' and record.bizUserId==0)">
-				and biz_user_id  = #{record.bizUserId}
+				and sys_vip_info_id  = #{record.bizUserId}
 			</if>
 			<if test="(record.time!=null and record.time!='') or (record.time!='' and record.time==0)">
 				and time  = #{record.time}
@@ -611,7 +611,7 @@
 				and vip_Id  = #{record.vipId}
 			</if>
 			<if test="(record.bizUserId!=null and record.bizUserId!='') or (record.bizUserId!='' and record.bizUserId==0)">
-				and biz_user_id  = #{record.bizUserId}
+				and sys_vip_info_id  = #{record.bizUserId}
 			</if>
 			<if test="(record.time!=null and record.time!='') or (record.time!='' and record.time==0)">
 				and time  = #{record.time}
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml
index 5e75ca7..0c6cb3c 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml
@@ -1296,4 +1296,14 @@
 			and a.good_type=#{record.goodType}
 		</if>
 	</select>
+
+	<select id="selectByIds" resultMap="ShoppingGoodsSimpleMap">
+		select
+		*
+		from shopping_goods
+		where id in
+		<foreach collection="ids" item="item" separator="," open="(" close=")">
+			#{item}
+		</foreach>
+	</select>
 </mapper>
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysBeauticianStateDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysBeauticianStateDao.xml
index 6262844..144ab7e 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysBeauticianStateDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysBeauticianStateDao.xml
@@ -137,9 +137,9 @@
             d.id as pu_id,
             d.SURPLUS_COUNT as pu_SURPLUS_COUNT,
             d.ASSEMBLE_ID as pu_ASSEMBLE_ID,
-            d.price as pu_price
-
-
+            d.price as pu_price,
+		    d.taocan_id as pu_taocan_id,
+		    d.source as pu_source
 		from sys_beautician_state a
 		left join sys_users b on a.staff_id= b.su_id
 		left  join  shopping_goods c on a.proj_id=c.id
@@ -147,10 +147,14 @@
 		 where  a.SERVICES_ID =#{serId}
 	</select>
 
+    <!-- EXC_TIME =TIMESTAMPDIFF(MINUTE,BEGIN_TIME,now()) -->
     <update id="chengItemState">
-        update sys_beautician_state set  state=#{record.state},
-          EXC_TIME =TIMESTAMPDIFF(MINUTE,BEGIN_TIME,now())
-        where STAFF_ID=#{record.staffId} and SERVICES_ID =#{record.servicesId}
+        update sys_beautician_state set  state=#{record.state}
+        where 1=1
+        <if test="record.staffId != null">
+            and STAFF_ID=#{record.staffId}
+        </if>
+          and SERVICES_ID =#{record.servicesId}
     </update>
 
     <!--  根据id更新 部分更新   -->
@@ -172,7 +176,7 @@
             <if test="servicesId != null and servicesId !='' ">
                 SERVICES_ID = #{servicesId},
             </if>
-            <if test="servicesId != null and servicesId !='' ">
+            <if test="excTime != null and excTime !='' ">
                 EXC_TIME = #{excTime},
             </if>
 
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysBusinessDataDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysBusinessDataDao.xml
index ccd87a3..ddb5b13 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysBusinessDataDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysBusinessDataDao.xml
@@ -636,7 +636,7 @@
                     )totalPay,
                 (select IFNULL(sum(a.amount),0) from sys_order_flow a
                     inner join sys_order b on a.order_id=b.id and b.statu!='已取消'
-                    where a.pay_method not in ('储值卡', '欠款') and a.flow_type != '退款' and <![CDATA[ a.create_time > #{item.beginTime} and a.create_time < #{item.endTime}]]>
+                    where a.pay_method not in ('储值卡', '欠款') and <![CDATA[ a.create_time > #{item.beginTime} and a.create_time < #{item.endTime}]]>
                     <if test="shopId != null">
                         and a.shop_id=#{shopId}
                     </if>
@@ -716,8 +716,30 @@
                         and a.company_id=#{companyId}
                     </if>
                 ) refund,
+                (select sum(IFNULL(amount, 0))
+                    from sys_order_flow a
+                    inner join sys_order b on a.order_id=b.id and b.STATU!='已取消'
+                    where a.pay_method='储值卡' and a.is_gift='N' and <![CDATA[ a.create_time > #{item.beginTime} and a.create_time < #{item.endTime}]]>
+                    <if test="shopId != null">
+                        and a.shop_id=#{shopId}
+                    </if>
+                    <if test="companyId != null">
+                        and a.company_id=#{companyId}
+                    </if>
+                ) cardAmount,
+                (select sum(IFNULL(amount, 0))
+                    from sys_order_flow a
+                    inner join sys_order b on a.order_id=b.id and b.STATU!='已取消'
+                    where a.pay_method='储值卡' and a.is_gift='Y' and <![CDATA[ a.create_time > #{item.beginTime} and a.create_time < #{item.endTime}]]>
+                    <if test="shopId != null">
+                        and a.shop_id=#{shopId}
+                    </if>
+                    <if test="companyId != null">
+                        and a.company_id=#{companyId}
+                    </if>
+                ) cardFreeAmount,
                 (select IFNULL(count(1),0) from sys_order
-                    where STATU in ('已付款', '欠款') and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
+                    where STATU in ('已付款', '欠款') and orderType=1 and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
                     <if test="shopId != null">
                         and shop_id=#{shopId}
                     </if>
@@ -726,7 +748,7 @@
                     </if>
                     ) perCustomCnt,
                 (select IFNULL(sum(b.COUNT),0) from sys_order a inner join sys_order_item b on a.ID=b.ORDER_ID
-                    where a.STATU in ('已付款', '欠款') and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
+                    where a.STATU in ('已付款', '欠款') and a.orderType=1 and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
                     <if test="shopId != null">
                         and shop_id=#{shopId}
                     </if>
@@ -740,7 +762,7 @@
                     inner join sys_store_info d on c.store_id = d.ID
                     inner join sys_order_item e on a.ID=e.ORDER_ID
                     inner join shopping_goods f on e.goods_id=f.id and f.good_type='家居产品'
-                    where a.STATU in ('已付款', '欠款') and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
+                    where a.STATU in ('已付款', '欠款') and a.orderType=1 and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
                     <if test="shopId != null">
                         and a.shop_id=#{shopId}
                     </if>
@@ -751,7 +773,7 @@
                 (select IFNULL(sum(b.COUNT * IFNULL(c.price, 0)),0) from sys_order a
                     inner join sys_order_item b on a.ID=b.ORDER_ID
                     inner join shopping_goods c on c.good_type != '家居产品' and b.goods_id=c.id
-                    where a.STATU in ('已付款', '欠款') and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
+                    where a.STATU in ('已付款', '欠款') and a.orderType=1 and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
                     <if test="shopId != null">
                         and a.shop_id=#{shopId}
                     </if>
@@ -814,7 +836,7 @@
             #{item.beginTime} dataTime,
             (select shop_short_name from sys_shop_info where id=#{shopId}) shopName,
             (select sum(total) shouldPay from sys_order
-                where STATU in ('已付款', '欠款') and <![CDATA[ create_time > #{item.beginTime} and create_time < #{item.endTime}]]>
+                where STATU in ('已付款', '欠款') and orderType=1 and <![CDATA[ create_time > #{item.beginTime} and create_time < #{item.endTime}]]>
                 <if test="shopId != null">
                     and shop_id=#{shopId}
                 </if>
@@ -877,13 +899,13 @@
             </if>
             ) refund,
             (select IFNULL(count(1),0) from sys_order
-            where STATU in ('已付款', '欠款') and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
+            where STATU in ('已付款', '欠款') and orderType=1 and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
             <if test="shopId != null">
                 and shop_id=#{shopId}
             </if>
             ) perCustomCnt,
             (select IFNULL(sum(b.COUNT),0) from sys_order a inner join sys_order_item b on a.ID=b.ORDER_ID
-            where a.STATU in ('已付款', '欠款') and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
+            where a.STATU in ('已付款', '欠款') and a.orderType=1 and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
             <if test="shopId != null">
                 and shop_id=#{shopId}
             </if>
@@ -894,7 +916,7 @@
             inner join sys_store_info d on c.store_id = d.ID
             inner join sys_order_item e on a.ID=e.ORDER_ID
             inner join shopping_goods f on e.goods_id=f.id and f.good_type='家居产品'
-            where a.STATU in ('已付款', '欠款') and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
+            where a.STATU in ('已付款', '欠款') and a.orderType=1 and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
             <if test="shopId != null">
                 and a.shop_id=#{shopId}
             </if>
@@ -902,7 +924,7 @@
             (select IFNULL(sum(b.COUNT * IFNULL(c.price, 0)),0) from sys_order a
             inner join sys_order_item b on a.ID=b.ORDER_ID
             inner join shopping_goods c on c.good_type != '家居产品' and b.goods_id=c.id
-            where a.STATU in ('已付款', '欠款') and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
+            where a.STATU in ('已付款', '欠款') and a.orderType=1 and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
             <if test="shopId != null">
                 and a.shop_id=#{shopId}
             </if>
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml
index 1e64c24..7bdfec4 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml
@@ -23,6 +23,7 @@
         <result property="vipNo" column="VIP_NO"/>
         <result property="staffName" column="STAFF_NAME"/>
         <result property="changeId" column="CHANGE_ID"/>
+        <result property="orderType" column="orderType"/>
 
         <result property="cashPay" column="cash_Pay"/>
         <result property="cardPay" column="card_Pay"/>
@@ -61,7 +62,9 @@
 		beatuyId,
 		beatuyName,
 		pay_time,
-		company_id
+		company_id,
+		orderType,
+        is_has_refund
 		)
 		VALUES (
 		#{id},
@@ -83,7 +86,9 @@
 		#{beatuyId},
 		#{beatuyName},
 		#{payTime},
-		#{companyId}
+		#{companyId},
+		#{orderType},
+		#{isHasRefund}
 		)
 	</insert>
 
@@ -140,9 +145,11 @@
             <if test="cashPay != null and cashPay  !='' ">
                 cash_Pay = #{cashPay},
             </if>
-
             <if test="payTime != null  ">
                 pay_time = #{payTime},
+            </if>
+            <if test="isHasRefund != null  ">
+                is_has_refund = #{isHasRefund},
             </if>
 
         </set>
@@ -229,6 +236,9 @@
             <if test="(record.companyId!=null and record.companyId!='') ">
                 and a.company_id = #{record.companyId}
             </if>
+            <if test="(record.orderType!=null and record.orderType!='') ">
+                and a.orderType = #{record.orderType}
+            </if>
             <if test="record.beginTimeVo != null  ">
                 and a.ORDER_TIME >= #{record.beginTimeVo}
             </if>
@@ -282,6 +292,9 @@
             </if>
             <if test="(record.companyId!=null and record.companyId!='') ">
                 and a.company_id = #{record.companyId}
+            </if>
+            <if test="(record.orderType!=null and record.orderType!='') ">
+                and a.orderType = #{record.orderType}
             </if>
             <if test="record.isCross != null and record.isCross !='' ">
                 and a.IS_CROSS = #{record.isCross}
@@ -405,6 +418,9 @@
             <if test="(record.companyId!=null and record.companyId!='') ">
                 and a.company_id = #{record.companyId}
             </if>
+            <if test="(record.orderType!=null and record.orderType!='') ">
+                and a.orderType = #{record.orderType}
+            </if>
 
         </if>
     </sql>
@@ -434,6 +450,9 @@
             <if test="(record.companyId!=null and record.companyId!='') ">
                 and a.company_id = #{record.companyId}
             </if>
+            <if test="(record.orderType!=null and record.orderType!='') ">
+                and a.orderType = #{record.orderType}
+            </if>
             <if test="record.activity != null and record.activity !='' ">
                 and a.ACTIVITY = #{record.activity}
             </if>
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderItemDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderItemDao.xml
index 6be411c..846e27b 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderItemDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderItemDao.xml
@@ -10,6 +10,7 @@
         <!-- <result property="projId" column="PROJ_ID" />
         <result property="skuId" column="SKU_ID" /> -->
         <result property="count" column="COUNT"/>
+        <result property="refundCount" column="refundCount"/>
         <!-- <result property="taocanId" column="TAOCAN_ID" /> -->
         <result property="isFree" column="IS_FREE"/>
         <result property="type" column="TYPE"/>
@@ -49,6 +50,7 @@
 		a.TOTAL,
 		a.SKU_ID,
 		b.COUNT,
+		b.refundCount,
 		b.ID,
 		b.IS_FREE,
 		b.ORDER_ID,
@@ -89,6 +91,7 @@
 		ID,
 		ORDER_ID,
 		COUNT,
+		refundCount,
 		TYPE,
 		IS_FREE,
 		PRICE,
@@ -106,6 +109,7 @@
 		#{id},
 		#{orderId},
 		#{count},
+		#{refundCount},
 		#{type},
 		#{isFree},
 		#{price},
@@ -131,6 +135,9 @@
             </if>
             <if test="count != null and count !='' or count == 0 ">
                 COUNT = #{count},
+            </if>
+            <if test="refundCount != null and refundCount !='' or refundCount == 0 ">
+                refundCount = #{refundCount},
             </if>
             <if test="isFree != null and isFree !='' ">
                 IS_FREE = #{isFree},
@@ -232,6 +239,7 @@
 		i.ID,
 		i.ORDER_ID,
 		i.COUNT,
+		i.refundCount,
 		i.TYPE,
 		i.IS_FREE,
 		i.PRICE,
@@ -289,6 +297,7 @@
 		ID,
 		ORDER_ID,
 		COUNT,
+		refundCount,
 		TYPE,
 		IS_FREE,
 		PRICE,
@@ -341,6 +350,7 @@
         c.name as goodsName,
         g.name as cateName,
         a.COUNT,
+        a.refundCount,
         a.ZK_PRICE,
         a.IS_FREE,
         a.pay_method,
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml
index cdb7e50..28022f2 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml
@@ -700,4 +700,10 @@
 	</select>
 
 
+	<select id="selectProjServicesByOrderItemId" resultMap="SysProjServicesMap">
+		select a.* from sys_proj_services a
+		  inner join sys_beautician_state b on a.id=b.SERVICES_ID
+		  inner join sys_proj_use c on c.id=b.puse_id
+		where ORDER_ITEM_ID=#{itemId} and a.STATE!='预约取消'
+	</select>
 </mapper>
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml
index 3ba6f8c..295413f 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml
@@ -859,5 +859,79 @@
         where date_format(now(), '%Y-%m-%d') > date_format(FAIL_TIME, '%Y-%m-%d') and STATUS='有效'
     </select>
 
+    <resultMap type="SysProjUse" id="TaoCanWithProjMap">
+
+        <id property="id" column="ID"/>
+        <result property="createBy" column="create_by" />
+        <result property="createTime" column="create_time" />
+        <result property="updateBy" column="update_by" />
+        <result property="updateTime" column="update_time" />
+        <result property="orderItemId" column="ORDER_ITEM_ID"/>
+        <result property="projId" column="PROJ_ID"/>
+        <result property="surplusCount" column="SURPLUS_COUNT"/>
+        <result property="isOver" column="IS_OVER"/>
+        <result property="taocanId" column="TAOCAN_ID"/>
+        <result property="vipId" column="VIP_ID"/>
+        <result property="failTime" column="FAIL_TIME"/>
+        <result property="assembleId" column="ASSEMBLE_ID"/>
+        <result property="source" column="SOURCE"/>
+        <result property="status" column="STATUS"/>
+        <result property="platformFlag" column="PLATFORM_FLAG"/>
+        <result property="type" column="type"/>
+        <result property="balance" column="balance"/>
+        <result property="remark" column="remark"/>
+        <result property="price" column="price"/>
+        <result property="tcName" column="tcName"/>
+        <result property="projName" column="proj_name"/>
+        <result property="deductionNum" column="deductionNum"/>
+        <result property="isCourse" column="is_course"/>
+        <result property="timeLength" column="time_length"/>
+        <result property="orderId" column="orderId"/>
+
+        <collection property="taocanProjUse" ofType="com.matrix.system.hive.bean.SysProjUse">
+            <id property="id" column="proj_info_id" />
+            <result property="projName" column="proj_proj_name"/>
+            <result property="failTime" column="proj_FAIL_TIME"/>
+            <result property="surplusCount" column="proj_SURPLUS_COUNT"/>
+            <result property="timeLength" column="proj_time_length"/>
+            <result property="img" column="proj_img"/>
+            <result property="projId" column="proj_projId"/>
+        </collection>
+    </resultMap>
+
+    <select id="selectTaoCanListWithProj" resultMap="TaoCanWithProjMap">
+        select
+            a.*,
+            d.id as orderId,
+            b.TIME_LENGTH,
+            b.img,
+            b.code,
+            e.proj_name proj_proj_name,
+            e.FAIL_TIME proj_FAIL_TIME,
+            e.SURPLUS_COUNT proj_SURPLUS_COUNT,
+            e.id proj_info_id,
+            e.proj_id proj_projId,
+            f.time_length proj_time_length,
+            f.img proj_img
+        from sys_proj_use a
+            left join shopping_goods b on a.proj_id=b.id
+            left join sys_order_item c on a.ORDER_ITEM_ID=c.id
+            left join sys_order d on c.ORDER_ID=d.id
+            left join sys_proj_use e on a.id = e.TAOCAN_ID and e.VIP_ID=a.vip_id
+            left join shopping_goods f on e.proj_id=f.id
+        where 1=1 and a.type='套餐' and a.TAOCAN_ID IS NULL
+        <if test="record.queryKey != null and record.queryKey !='' ">
+            and (instr(b.name, #{record.queryKey}) or instr(b.zjm, #{record.queryKey}) or instr(goods_no, #{record.queryKey}))
+        </if>
+        <if test="record.isOver != null and record.isOver !='' ">
+            and a.IS_OVER = #{record.isOver}
+        </if>
+        <if test="record.status != null and record.status !='' ">
+            and a.STATUS = #{record.status}
+        </if>
+        <if test="record.vipId != null and record.vipId !='' ">
+            and a.VIP_ID = #{record.vipId}
+        </if>
+    </select>
 
 </mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml
index 5203a47..9724622 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml
@@ -52,6 +52,15 @@
         <result property="isDeal" column="is_deal"/>
         <result property="createDistributionTime" column="create_distribution_time"/>
 
+        <result property="isSales" column="is_sales" />
+        <result property="withdrawalCash" column="withdrawal_cash" />
+        <result property="salesmanGrade" column="salesman_grade" />
+        <result property="nickName" column="nick_name" />
+        <result property="avatarUrl" column="avatar_url" />
+        <result property="gender" column="gender" />
+        <result property="country" column="country" />
+        <result property="sessionKey" column="session_key" />
+        <result property="userIsAuthorize" column="user_is_authorize" />
 
         <!-- 扩展属性 -->
         <result property="staffName" column="STAFF_NAME"/>
@@ -105,6 +114,17 @@
         <result property="createDistributionTime" column="create_distribution_time"/>
         <result property="disease" column="disease"/>
         <result property="companyId" column="company_id"/>
+
+        <result property="isSales" column="is_sales" />
+        <result property="withdrawalCash" column="withdrawal_cash" />
+        <result property="salesmanGrade" column="salesman_grade" />
+        <result property="nickName" column="nick_name" />
+        <result property="avatarUrl" column="avatar_url" />
+        <result property="gender" column="gender" />
+        <result property="country" column="country" />
+        <result property="sessionKey" column="session_key" />
+        <result property="userIsAuthorize" column="user_is_authorize" />
+
         <!-- 扩展属性 -->
         <result property="staffName" column="STAFF_NAME"/>
         <result property="shopName" column="SHOP_NAME"/>
@@ -286,7 +306,16 @@
         province,
         city,
         area,
-        recommend_id
+        recommend_id,
+        is_sales,
+        withdrawal_cash,
+        salesman_grade,
+        nick_name,
+        avatar_url,
+        gender,
+        country,
+        session_key,
+        user_is_authorize
         )
 
 
@@ -334,7 +363,16 @@
         #{province},
         #{city},
         #{area},
-        #{recommendId}
+        #{recommendId},
+        #{isSales},
+        #{withdrawalCash},
+        #{salesmanGrade},
+        #{nickName},
+        #{avatarUrl},
+        #{gender},
+        #{country},
+        #{sessionKey},
+        #{userIsAuthorize}
         )
 
     </insert>
@@ -473,6 +511,34 @@
             <if test="area != null and area !=''  ">
                 area = #{area},
             </if>
+            <if test="isSales != null ">
+                is_sales  = #{isSales},
+            </if>
+            <if test="withdrawalCash != null ">
+                withdrawal_cash  = #{withdrawalCash},
+            </if>
+            <if test="salesmanGrade != null ">
+                salesman_grade  = #{salesmanGrade},
+            </if>
+
+            <if test="gender != null and gender != '' ">
+                gender  = #{gender},
+            </if>
+            <if test="country != null and country != '' ">
+                country  = #{country},
+            </if>
+            <if test="sessionKey != null and sessionKey != '' ">
+                session_key  = #{sessionKey},
+            </if>
+            <if test="userIsAuthorize != null ">
+                user_is_authorize  = #{userIsAuthorize},
+            </if>
+            <if test="nickName != null and nickName != '' ">
+                nick_name  = #{nickName},
+            </if>
+            <if test="avatarUrl != null and avatarUrl != '' ">
+                avatar_url  = #{avatarUrl},
+            </if>
 
 
         </set>
@@ -482,6 +548,10 @@
     <update id="pointClose">
 		UPDATE sys_vip_info set POINT_ALL = 0
 	</update>
+
+    <update id="unbundlingSaleMan">
+        UPDATE sys_vip_info set recommend_id = NULL where id=#{userId};
+    </update>
 
     <!-- 批量删除 -->
     <delete id="deleteByIds" parameterType="java.util.List">
@@ -538,7 +608,10 @@
         where a.ID=#{id}
     </select>
 
-
+    <select id="findByOpenId" resultMap="SysVipInfoMap">
+        select *
+        from sys_vip_info where openid=#{openId}
+    </select>
 
     <!-- 根据手机和密码查询 -->
     <select id="selectVipByPhonePassWord" resultMap="SysVipInfoMap">
@@ -813,6 +886,28 @@
             <if test="(record.companyId!=null and record.companyId!='') ">
                 and a.company_id = #{record.companyId}
             </if>
+
+            <if test="(record.nickName!=null and record.nickName!='') or  (record.nickName!='' and record.nickName==0)  ">
+                and a.nick_name  like concat('%',#{record.nickName},'%')
+            </if>
+            <if test="(record.avatarUrl!=null and record.avatarUrl!='') or  (record.avatarUrl!='' and record.avatarUrl==0)  ">
+                and a.avatar_url  = #{record.avatarUrl}
+            </if>
+            <if test="record.isSales != null and record.isSales !='' ">
+                and a.is_sales = #{record.isSales}
+            </if>
+
+            <if test="record.withdrawalCash != null and record.withdrawalCash !='' ">
+                and a.withdrawal_cash = #{record.withdrawalCash}
+            </if>
+
+            <if test="record.salesmanGrade != null and record.salesmanGrade !='' ">
+                and a.salesman_grade = #{record.salesmanGrade}
+            </if>
+            <if test="(record.userIsAuthorize!=null and record.userIsAuthorize!='') or  (record.userIsAuthorize!='' and record.userIsAuthorize==0)  ">
+                and a.user_is_authorize  = #{record.userIsAuthorize}
+            </if>
+
         </if>
     </sql>
 
@@ -918,57 +1013,34 @@
             <if test="record.isDeal != null and record.isDeal !='' ">
                 and a.is_deal = #{record.isDeal}
             </if>
+            <if test="(record.nickName!=null and record.nickName!='') or  (record.nickName!='' and record.nickName==0)  ">
+                and a.nick_name  like concat('%',#{record.nickName},'%')
+            </if>
+            <if test="(record.avatarUrl!=null and record.avatarUrl!='') or  (record.avatarUrl!='' and record.avatarUrl==0)  ">
+                and a.avatar_url  = #{record.avatarUrl}
+            </if>
+            <if test="record.isSales != null and record.isSales !='' ">
+                and a.is_sales = #{record.isSales}
+            </if>
+
+            <if test="record.withdrawalCash != null and record.withdrawalCash !='' ">
+                and a.withdrawal_cash = #{record.withdrawalCash}
+            </if>
+
+            <if test="record.salesmanGrade != null and record.salesmanGrade !='' ">
+                and a.salesman_grade = #{record.salesmanGrade}
+            </if>
+            <if test="(record.userIsAuthorize!=null and record.userIsAuthorize!='') or  (record.userIsAuthorize!='' and record.userIsAuthorize==0)  ">
+                and a.user_is_authorize  = #{record.userIsAuthorize}
+            </if>
         </if>
     </sql>
 
     <sql id="select">
 		select
-	 	a.ID,
-		a.VIP_NO,
-		a.VIP_NAME,
-		a.PHONE,
-		a.SEX,
-		a.BIRTHDAY1,
-		a.photo,
-		a.ADDR,
-		a.CONSTELL,
-		a.ANIMAL_SIGN,
-		a.ARRIVAL_WAY,
-		a.VIP_TYPE,
-		a.VIP_STATE,
-		a.POINT_ALL,
-		a.COMMISSION_ALL,
-		a.IN_DATE,
-		a.REMARK,
-		a.SHOP_ID,
-		a.IS_DELETE,
-		a.EMAIL,
-		a.STAFF_ID,
-		a.CREATE_TIME,
-		a.LEVEL_ID,
-		a.UUID,
-		a.BALANCE,
-		a.BEATUY_ID,
-		a.PASSWORD,
+	 	a.*,
 		c.su_name as STAFF_NAME,
 		d.SHOP_NAME,
-		a.blood,
-		a.sfCard,
-		a.link,
-		a.marry,
-		a.vocation,
-		a.handle_time,
-		a.statu,
-		a.openid,
-		a.parent_id,
-		a.create_distribution_time,
-		a.birthdayType,
-		a.disease,
-		a.is_deal,
-		a.province,
-		a.city,
-		a.area,
-		a.recommend_id,
 		e.level_name levelName,
 		e.vip_level vipLevel
 	</sql>
@@ -1135,7 +1207,7 @@
 
     <select id="selectByPhone" resultMap="SysVipInfoMapSimple">
 
-		select * from sys_vip_info where  PHONE = #{phone}
+		select * from sys_vip_info where  PHONE = #{phone} and company_id=#{companyId}
 	</select>
 
 
@@ -1205,7 +1277,22 @@
         create_distribution_time,
         birthdayType,
         disease,
-        is_deal
+        is_deal,
+        zjm,
+        company_id,
+        province,
+        city,
+        area,
+        recommend_id,
+        is_sales,
+        withdrawal_cash,
+        salesman_grade,
+        nick_name,
+        avatar_url,
+        gender,
+        country,
+        session_key,
+        user_is_authorize
         )
         VALUES
         <foreach collection="list" item="item" index="index" separator=",">(
@@ -1246,7 +1333,22 @@
             #{item.createDistributionTime},
             #{item.birthdayType},
             #{item.disease},
-            #{item.isDeal}
+            #{item.isDeal},
+            #{zjm},
+            #{companyId},
+            #{province},
+            #{city},
+            #{area},
+            #{recommendId},
+            #{isSales},
+            #{withdrawalCash},
+            #{salesmanGrade},
+            #{nickName},
+            #{avatarUrl},
+            #{gender},
+            #{country},
+            #{sessionKey},
+            #{userIsAuthorize}
             )</foreach>
     </insert>
 
@@ -1366,5 +1468,11 @@
         left join sys_shop_info e on a.SHOP_ID=e.ID
         where a.ID=#{id}
     </select>
+
+
+
+
+
+
 </mapper>
 	
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml
index aa09081..e020304 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml
@@ -90,13 +90,14 @@
 		select
 		<foreach collection="list" index="index" item="item"   separator=","  >
 			(
-			select IFNULL(sum(amount),0) from sys_order_flow
-			where pay_method not in ('储值卡', '欠款') and flow_type != '退款' and <![CDATA[ create_time > #{item.beginTime} and create_time < #{item.endTime}]]>
+			select IFNULL(sum(a.amount),0) from sys_order_flow a
+			inner join sys_order b on a.order_id=b.id and b.statu!='已取消'
+			where a.pay_method not in ('储值卡', '欠款') and <![CDATA[ a.create_time > #{item.beginTime} and a.create_time < #{item.endTime}]]>
 			<if test="shopId != null">
-				and shop_id=#{shopId}
+				and a.shop_id=#{shopId}
 			</if>
 			<if test="companyId != null">
-				and company_id=#{companyId}
+				and a.company_id=#{companyId}
 			</if>
 			) as t${index}
 
@@ -126,13 +127,14 @@
 		select
 		<foreach collection="list" index="index" item="item"   separator=","  >
 			(
-			select IFNULL(sum(amount),0) from sys_order_flow
-			where pay_method = '欠款' and <![CDATA[ create_time > #{item.beginTime} and create_time < #{item.endTime}]]>
+			select IFNULL(sum(a.amount),0) from sys_order_flow a
+			inner join sys_order b on a.order_id=b.id and b.statu!='已取消'
+			where a.pay_method = '欠款' and <![CDATA[ a.create_time > #{item.beginTime} and a.create_time < #{item.endTime}]]>
 			<if test="shopId != null">
-				and shop_id=#{shopId}
+				and a.shop_id=#{shopId}
 			</if>
 			<if test="companyId != null">
-				and company_id=#{companyId}
+				and a.company_id=#{companyId}
 			</if>
 			) as t${index}
 
@@ -230,10 +232,10 @@
 		select
 		<foreach collection="list" index="index" item="item"   separator=","  >
 			(
-			select IFNULL(sum(zk_price),0) from sys_order_item a
+			select IFNULL(sum(zk_price*count),0) from sys_order_item a
 			inner join shopping_goods b on a.goods_id=b.id
-			inner join sys_order c on a.ORDER_ID=c.id
-			where b.good_type='家居产品' and <![CDATA[ a.create_time > #{item.beginTime} and a.create_time < #{item.endTime}]]>
+			inner join sys_order c on a.ORDER_ID=c.id and c.statu!='已取消'
+			where b.good_type='家居产品' and <![CDATA[ c.pay_time > #{item.beginTime} and c.pay_time < #{item.endTime}]]>
 			<if test="shopId != null">
 				and c.shop_id=#{shopId}
 			</if>
@@ -249,10 +251,10 @@
 		select
 		<foreach collection="list" index="index" item="item"   separator=","  >
 			(
-			select IFNULL(sum(zk_price),0) from sys_order_item a
+			select IFNULL(sum(zk_price*count),0) from sys_order_item a
 			inner join shopping_goods b on a.goods_id=b.id
-			inner join sys_order c on a.ORDER_ID=c.id
-			where b.good_type!='家居产品' and <![CDATA[ a.create_time > #{item.beginTime} and a.create_time < #{item.endTime}]]>
+			inner join sys_order c on a.ORDER_ID=c.id and c.statu!='已取消'
+			where b.good_type!='家居产品' and <![CDATA[ c.pay_time > #{item.beginTime} and c.pay_time < #{item.endTime}]]>
 			<if test="shopId != null">
 				and c.shop_id=#{shopId}
 			</if>
@@ -268,12 +270,14 @@
 		select
 		<foreach collection="list" index="index" item="item"   separator=","  >
 			(
-			select IFNULL(sum(amount),0) from sys_order_flow where flow_type = '还款' and <![CDATA[ create_time > #{item.beginTime} and create_time < #{item.endTime}]]>
+			select IFNULL(sum(a.amount),0) from sys_order_flow a
+			inner join sys_order b on a.order_id=b.id and b.statu!='已取消'
+			where a.flow_type = '还款' and <![CDATA[ a.create_time > #{item.beginTime} and a.create_time < #{item.endTime}]]>
 			<if test="shopId != null">
-				and shop_id=#{shopId}
+				and a.shop_id=#{shopId}
 			</if>
 			<if test="companyId != null">
-				and company_id=#{companyId}
+				and a.company_id=#{companyId}
 			</if>
 			) as t${index}
 		</foreach>
@@ -285,7 +289,7 @@
 		<foreach collection="list" index="index" item="item"   separator=","  >
 			(
 			select IFNULL(count(1),0) from sys_order
-			where STATU in ('已付款', '欠款') and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
+			where STATU in ('已付款', '欠款') and orderType=1 and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
 			<if test="shopId != null">
 				and shop_id=#{shopId}
 			</if>
@@ -304,7 +308,7 @@
 			select case a.perCustomCnt when 0 then 0 else a.totalSaleCnt/a.perCustomCnt end from (
 				select
 				(select IFNULL(count(1),0) from sys_order
-					where STATU in ('已付款', '欠款') and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
+					where STATU in ('已付款', '欠款') and orderType=1 and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
 					<if test="shopId != null">
 						and shop_id=#{shopId}
 					</if>
@@ -313,7 +317,7 @@
 					</if>
 				) perCustomCnt,
 				(select IFNULL(sum(b.COUNT),0) from sys_order a inner join sys_order_item b on a.ID=b.ORDER_ID
-					where a.STATU in ('已付款', '欠款') and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
+					where a.STATU in ('已付款', '欠款') and a.orderType=1 and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
 					<if test="shopId != null">
 						and shop_id=#{shopId}
 					</if>
@@ -334,7 +338,7 @@
 			select case a.perCustomCnt when 0 then 0 else a.totalPay/a.perCustomCnt end from (
 			select
 			(select IFNULL(count(1),0) from sys_order
-			where STATU in ('已付款', '欠款') and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
+			where STATU in ('已付款', '欠款') and orderType=1 and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
 			<if test="shopId != null">
 				and shop_id=#{shopId}
 			</if>
@@ -369,7 +373,7 @@
 						inner join sys_store_info d on c.store_id = d.ID
 						inner join sys_order_item e on a.ID=e.ORDER_ID
 						inner join shopping_goods f on e.goods_id=f.id and f.good_type='家居产品'
-						where a.STATU in ('已付款', '欠款') and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
+						where a.STATU in ('已付款', '欠款') and a.orderType=1 and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
 						<if test="shopId != null">
 							and a.shop_id=#{shopId}
 						</if>
@@ -380,7 +384,7 @@
 					(select IFNULL(sum(b.COUNT * IFNULL(c.price, 0)),0) from sys_order a
 						inner join sys_order_item b on a.ID=b.ORDER_ID
 						inner join shopping_goods c on c.good_type != '家居产品' and b.goods_id=c.id
-						where a.STATU in ('已付款', '欠款') and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
+						where a.STATU in ('已付款', '欠款') and a.orderType=1 and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
 						<if test="shopId != null">
 							and a.shop_id=#{shopId}
 						</if>
@@ -406,7 +410,7 @@
 						inner join sys_store_info d on c.store_id = d.ID
 						inner join sys_order_item e on a.ID=e.ORDER_ID
 						inner join shopping_goods f on e.goods_id=f.id and f.good_type='家居产品'
-						where a.STATU in ('已付款', '欠款') and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
+						where a.STATU in ('已付款', '欠款') and a.orderType=1 and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
 						<if test="shopId != null">
 							and a.shop_id=#{shopId}
 						</if>
@@ -417,7 +421,7 @@
 					(select IFNULL(sum(b.COUNT * IFNULL(c.price, 0)),0) from sys_order a
 						inner join sys_order_item b on a.ID=b.ORDER_ID
 						inner join shopping_goods c on c.good_type != '家居产品' and b.goods_id=c.id
-						where a.STATU in ('已付款', '欠款') and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
+						where a.STATU in ('已付款', '欠款') and a.orderType=1 and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
 						<if test="shopId != null">
 							and a.shop_id=#{shopId}
 						</if>
@@ -452,7 +456,7 @@
 						inner join sys_store_info d on c.store_id = d.ID
 						inner join sys_order_item e on a.ID=e.ORDER_ID
 						inner join shopping_goods f on e.goods_id=f.id and f.good_type='家居产品'
-						where a.STATU in ('已付款', '欠款') and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
+						where a.STATU in ('已付款', '欠款') and a.orderType=1 and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
 						<if test="shopId != null">
 							and a.shop_id=#{shopId}
 						</if>
@@ -463,7 +467,7 @@
 					(select IFNULL(sum(b.COUNT * IFNULL(c.price, 0)),0) from sys_order a
 						inner join sys_order_item b on a.ID=b.ORDER_ID
 						inner join shopping_goods c on c.good_type != '家居产品' and b.goods_id=c.id
-						where a.STATU in ('已付款', '欠款') and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
+						where a.STATU in ('已付款', '欠款') and a.orderType=1 and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
 						<if test="shopId != null">
 							and a.shop_id=#{shopId}
 						</if>
@@ -490,13 +494,14 @@
 		select
 		<foreach collection="list" index="index" item="item"   separator=","  >
 			(
-			select IFNULL(sum(amount),0) from sys_order_flow
-			where pay_method not in ('储值卡', '欠款') and flow_type = '退款' and <![CDATA[ create_time > #{item.beginTime} and create_time < #{item.endTime}]]>
+			select IFNULL(sum(a.amount),0) from sys_order_flow a
+			inner join sys_order b on a.order_id=b.id and b.statu!='已取消'
+			where a.pay_method not in ('储值卡', '欠款') and a.flow_type = '退款' and <![CDATA[ a.create_time > #{item.beginTime} and a.create_time < #{item.endTime}]]>
 			<if test="shopId != null">
-				and shop_id=#{shopId}
+				and a.shop_id=#{shopId}
 			</if>
 			<if test="companyId != null">
-				and company_id=#{companyId}
+				and a.company_id=#{companyId}
 			</if>
 			) as t${index}
 
@@ -509,13 +514,54 @@
 		select
 		<foreach collection="list" index="index" item="item"   separator=","  >
 			(
-			select IFNULL(sum(amount),0) from sys_order_flow
-			where pay_method in ('储值卡') and flow_type = '退款' and <![CDATA[ create_time > #{item.beginTime} and create_time < #{item.endTime}]]>
+			select IFNULL(sum(a.amount),0) from sys_order_flow a
+			inner join sys_order b on a.order_id=b.id and b.statu!='已取消'
+			where a.pay_method in ('储值卡') and a.flow_type = '退款' and <![CDATA[ a.create_time > #{item.beginTime} and a.create_time < #{item.endTime}]]>
 			<if test="shopId != null">
-				and shop_id=#{shopId}
+				and a.shop_id=#{shopId}
 			</if>
 			<if test="companyId != null">
-				and company_id=#{companyId}
+				and a.company_id=#{companyId}
+			</if>
+			) as t${index}
+
+		</foreach>
+		from area where id=1
+	</select>
+
+	<select id="selectCardAmount" resultType="java.util.TreeMap">
+		select
+		<foreach collection="list" index="index" item="item"   separator=","  >
+			(
+			select IFNULL(sum(IFNULL(amount, 0)), 0)
+			from sys_order_flow a
+			inner join sys_order b on a.order_id=b.id and b.STATU!='已取消'
+			where a.pay_method='储值卡' and a.is_gift='N' and <![CDATA[ a.create_time > #{item.beginTime} and a.create_time < #{item.endTime}]]>
+			<if test="shopId != null">
+				and a.shop_id=#{shopId}
+			</if>
+			<if test="companyId != null">
+				and a.company_id=#{companyId}
+			</if>
+			) as t${index}
+
+		</foreach>
+		from area where id=1
+	</select>
+
+	<select id="selectFreeAmount" resultType="java.util.TreeMap">
+		select
+		<foreach collection="list" index="index" item="item"   separator=","  >
+			(
+			select IFNULL(sum(IFNULL(amount, 0)), 0)
+			from sys_order_flow a
+			inner join sys_order b on a.order_id=b.id and b.STATU!='已取消'
+			where a.pay_method='储值卡' and a.is_gift='Y' and <![CDATA[ a.create_time > #{item.beginTime} and a.create_time < #{item.endTime}]]>
+			<if test="shopId != null">
+				and a.shop_id=#{shopId}
+			</if>
+			<if test="companyId != null">
+				and a.company_id=#{companyId}
 			</if>
 			) as t${index}
 
@@ -528,9 +574,18 @@
 			select
 				#{item.beginTime} time,
 				(select ifnull(sum(ifnull(card_cash,0) + ifnull(consume,0)),0) from achieve_new a where a.beault_id=#{userId} and <![CDATA[datatime > #{item.beginTime} and datatime < #{item.endTime} ]]>) orderAmount,
-				(select ifnull(sum(case t3 when '现金业绩' then card_cash else 0 end),0) from achieve_new a where a.beault_id=#{userId} and <![CDATA[datatime > #{item.beginTime} and datatime < #{item.endTime} ]]>) cashAmount,
-				(select ifnull(sum(case t3 when '划扣业绩' then consume else 0 end),0) from achieve_new a where a.beault_id=#{userId} and <![CDATA[datatime > #{item.beginTime} and datatime < #{item.endTime} ]]>) cardAmount,
-				(select ifnull(sum(case t3 when '划扣业绩' then consume else 0 end),0) from achieve_new a where a.beault_id=#{userId} and <![CDATA[datatime > #{item.beginTime} and datatime < #{item.endTime} ]]>) cardUseAmount,
+				(select ifnull(sum(case b.pay_method when '现金' then goods_cash else 0 end),0)
+					from achieve_new a
+					inner join sys_order_item b on a.order_item_id=b.ID
+				where a.beault_id=#{userId} and <![CDATA[datatime > #{item.beginTime} and datatime < #{item.endTime} ]]>) cashAmount,
+				(select ifnull(sum(case b.pay_method when '划扣' then goods_cash else 0 end),0)
+					from achieve_new a
+					inner join sys_order_item b on a.order_item_id=b.ID
+				where a.beault_id=#{userId} and <![CDATA[datatime > #{item.beginTime} and datatime < #{item.endTime} ]]>) cardAmount,
+				(select ifnull(sum(case b.pay_method when '划扣' then goods_cash else 0 end),0)
+					from achieve_new a
+					inner join sys_order_item b on a.order_item_id=b.ID
+				where a.beault_id=#{userId} and <![CDATA[datatime > #{item.beginTime} and datatime < #{item.endTime} ]]>) cardUseAmount,
 				(select ifnull(sum(ifnull(proj_percentage, 0)),0) from achieve_new a where a.beault_id=#{userId} and <![CDATA[datatime > #{item.beginTime} and datatime < #{item.endTime} ]]> and order_type='订单') goodsAmount,
 				(select ifnull(sum(ifnull(his_consume, 0)),0) from achieve_new a where a.beault_id=#{userId} and <![CDATA[datatime > #{item.beginTime} and datatime < #{item.endTime} ]]>) hisConsume,
 				(select ifnull(sum(ifnull(free_consume, 0)),0) from achieve_new a where a.beault_id=#{userId} and <![CDATA[datatime > #{item.beginTime} and datatime < #{item.endTime} ]]>) freeConsume,
@@ -560,14 +615,14 @@
 	<select id="selectStaffCashAchieve" resultType="java.util.TreeMap">
 		select
 		<foreach collection="list" index="index" item="item"   separator=","  >
-			(select ifnull(sum(case t3 when '现金业绩' then card_cash else 0 end),0)
+			(select ifnull(sum(case b.pay_method when '现金' then goods_cash else 0 end),0)
 				from achieve_new a
-				where <![CDATA[datatime > #{item.beginTime} and datatime < #{item.endTime} ]]>
-				<if test="staffId != null and staffId != 0">
-					and a.beault_id=#{staffId}
-				</if>
+				inner join sys_order_item b on a.order_item_id=b.ID
+			where <![CDATA[datatime > #{item.beginTime} and datatime < #{item.endTime} ]]>
+			<if test="staffId != null and staffId != 0">
+				and a.beault_id=#{staffId}
+			</if>
 			) as t${index}
-
 		</foreach>
 		from area where id=1
 	</select>
@@ -575,8 +630,9 @@
 	<select id="selectStaffCardAchieve" resultType="java.util.TreeMap">
 		select
 		<foreach collection="list" index="index" item="item"   separator=","  >
-			(select ifnull(sum(case t3 when '划扣业绩' then consume else 0 end),0)
-			from achieve_new a
+			(select ifnull(sum(case b.pay_method when '划扣' then goods_cash else 0 end),0)
+				from achieve_new a
+				inner join sys_order_item b on a.order_item_id=b.ID
 			where <![CDATA[datatime > #{item.beginTime} and datatime < #{item.endTime} ]]>
 			<if test="staffId != null and staffId != 0">
 				and a.beault_id=#{staffId}
diff --git a/zq-erp/src/main/resources/mybatis/mapper/score/ScoreUseRecordDao.xml b/zq-erp/src/main/resources/mybatis/mapper/score/ScoreUseRecordDao.xml
new file mode 100644
index 0000000..b8a1a41
--- /dev/null
+++ b/zq-erp/src/main/resources/mybatis/mapper/score/ScoreUseRecordDao.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.matrix.system.score.dao.ScoreUseRecordDao">
+
+
+    <select id="selectFlowList" resultType="com.matrix.system.shopXcx.api.vo.ScoreUseRecordVo">
+
+        select a.*,
+        b.SHOP_NAME,
+        c.su_name as optionName
+        from score_use_record a
+        left join sys_shop_info b on a.shop_id=b.id
+        left join sys_users c on a.opration_user_id=c.su_id
+        <where>
+
+            <if test="(record.vipId!=null and record.vipId!='')">
+                and a.vip_id=#{record.vipId}
+            </if>
+
+            <if test="record.remarks!=null and record.remarks!=''">
+                and a.remarks like concat('%',#{record.remarks},'%')
+            </if>
+
+            <if test="record.queryTime!=null and record.queryTime!=''">
+                and DATE_FORMAT(a.create_time,'%Y-%m')=#{record.queryTime}
+            </if>
+
+            <if test="record.beginTime != null and record.endTime!=null">
+                and (date(a.create_time) between #{record.beginTime} and #{record.endTime})
+            </if>
+
+            <if test="record.revenueType==1">
+                and a.rec_num>0
+            </if>
+            <if test="record.revenueType==2">
+                <![CDATA[ and a.rec_num<0 ]]>
+            </if>
+        </where>
+        order by a.create_time desc
+
+    </select>
+
+
+</mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/score/ScoreVipDetailDao.xml b/zq-erp/src/main/resources/mybatis/mapper/score/ScoreVipDetailDao.xml
new file mode 100644
index 0000000..bc19396
--- /dev/null
+++ b/zq-erp/src/main/resources/mybatis/mapper/score/ScoreVipDetailDao.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.matrix.system.score.dao.ScoreVipDetailDao">
+
+    <select id="selectUserTotalScore" resultType="java.lang.Integer">
+        select IFNULL(sum(IFNULL(remain_score, 0 )),0) from score_vip_detail
+        where  state=1 and vip_id=#{vipId}
+
+
+    </select>
+
+    <select id="selectEffectiveScore" resultType="com.matrix.system.score.entity.ScoreVipDetail">
+        select *
+        from score_vip_detail
+        where state = 1  and vip_id = #{vipId}
+         order by create_time
+
+    </select>
+
+
+    <select id="selectInvalidaVipScore" resultType="com.matrix.system.score.entity.ScoreVipDetail">
+        select * from score_vip_detail where  state=1 and remain_score>0 and validite_time <![CDATA[ < now()]]>
+    </select>
+
+    <update id="invalidVipScore">
+        update score_vip_detail set state = 2 , remain_score=0  where state=1 and validite_time <![CDATA[ < now()]]>
+    </update>
+
+</mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/BizUserDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/BizUserDao.xml
deleted file mode 100644
index dc38d94..0000000
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/BizUserDao.xml
+++ /dev/null
@@ -1,492 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.matrix.biz.dao.BizUserDao">
-	<!-- 定义BizUser 的复杂关联map -->
-	<resultMap type="com.matrix.biz.bean.BizUser" id="BizUserMap">
-		<id property="userId" column="user_id" />
-		<result property="createBy" column="create_by" />
-		<result property="createTime" column="create_time" />
-		<result property="updateBy" column="update_by" />
-		<result property="updateTime" column="update_time" />
-			<result property="userName" column="user_name" />
-			<result property="userPassword" column="user_password" />
-			<result property="nickName" column="nick_name" />
-			<result property="avatarUrl" column="avatar_url" />
-			<result property="openId" column="open_id" />
-			<result property="unionId" column="union_id" />
-			<result property="gender" column="gender" />
-			<result property="phoneNumber" column="phone_number" />
-			<result property="area" column="area" />
-			<result property="city" column="city" />
-			<result property="province" column="province" />
-			<result property="country" column="country" />
-			<result property="sessionKey" column="session_key" />
-			<result property="lastLoginTime" column="last_login_time" />
-			<result property="userStatus" column="user_status" />
-			<result property="userVip" column="user_vip" />
-			<result property="userExpiryTime" column="user_expiry_time" />
-			<result property="userAuthentication" column="user_authentication" />
-			<result property="userIsAuthorize" column="user_is_authorize" />
-			<result property="userTempName" column="user_temp_name" />
-			<result property="userTempAvatarUrl" column="user_temp_avatar_url" />
-			<result property="userType" column="user_type" />
-			<result property="companyId" column="company_id" />
-	</resultMap>
-	
-	
-	<!-- 定义BizUser 的简单map  ,本map不添加其他的关联属性 -->
-	<resultMap type="com.matrix.biz.bean.BizUser" id="BizUserSimpleMap">
-		<id property="userId" column="user_id" />
-		<result property="createBy" column="create_by" />
-		<result property="createTime" column="create_time" />
-		<result property="updateBy" column="update_by" />
-		<result property="updateTime" column="update_time" />
-			<result property="userName" column="user_name" />
-			<result property="userPassword" column="user_password" />
-			<result property="nickName" column="nick_name" />
-			<result property="avatarUrl" column="avatar_url" />
-			<result property="openId" column="open_id" />
-			<result property="unionId" column="union_id" />
-			<result property="gender" column="gender" />
-			<result property="phoneNumber" column="phone_number" />
-			<result property="area" column="area" />
-			<result property="city" column="city" />
-			<result property="province" column="province" />
-			<result property="country" column="country" />
-			<result property="sessionKey" column="session_key" />
-			<result property="lastLoginTime" column="last_login_time" />
-			<result property="userStatus" column="user_status" />
-			<result property="userVip" column="user_vip" />
-			<result property="userExpiryTime" column="user_expiry_time" />
-			<result property="userAuthentication" column="user_authentication" />
-			<result property="userIsAuthorize" column="user_is_authorize" />
-			<result property="userTempName" column="user_temp_name" />
-			<result property="userTempAvatarUrl" column="user_temp_avatar_url" />
-			<result property="userType" column="user_type" />
-			<result property="companyId" column="company_id" />
-	</resultMap>
-	
-	<!-- 字段sql -->
-	<sql id="columns">
-		create_by,
-		create_time,
-		update_by,
-		update_time,
-			user_id,
-			user_name,
-			user_password,
-			nick_name,
-			avatar_url,
-			open_id,
-			union_id,
-			gender,
-			phone_number,
-			area,
-			city,
-			province,
-			country,
-			session_key,
-			last_login_time,
-			user_status,
-			user_vip,
-			user_expiry_time,
-			user_authentication,
-			user_is_authorize,
-			user_temp_name,
-			user_temp_avatar_url,
-			user_type,
-            company_id
-	</sql>
-	
-	<!-- 属性sql -->
-	<sql id="propertys">
-		#{item.createBy},
-		now(),
-		#{item.updateBy},
-		now(),
-			#{item.userId},
-			#{item.userName},
-			#{item.userPassword},
-			#{item.nickName},
-			#{item.avatarUrl},
-			#{item.openId},
-			#{item.unionId},
-			#{item.gender},
-			#{item.phoneNumber},
-			#{item.area},
-			#{item.city},
-			#{item.province},
-			#{item.country},
-			#{item.sessionKey},
-			#{item.lastLoginTime},
-			#{item.userStatus},
-			#{item.userVip},
-			#{item.userExpiryTime},
-			#{item.userAuthentication},
-			#{item.userIsAuthorize},
-			#{item.userTempName},
-			#{item.userTempAvatarUrl},
-			#{item.userType},
-			#{item.companyId}
-	</sql>
-	
-	<!-- where sql -->
-	<sql id="where_sql">
-		 
-		 <if test="record!=null">
-			<if test="(record.userId!=null and record.userId!='') or  (record.userId!='' and record.userId==0)  ">
-				and user_id  = #{record.userId} 
-			</if>
-			<if test="(record.userName!=null and record.userName!='') or  (record.userName!='' and record.userName==0)  ">
-				and user_name  = #{record.userName} 
-			</if>
-			<if test="(record.userPassword!=null and record.userPassword!='') or  (record.userPassword!='' and record.userPassword==0)  ">
-				and user_password  = #{record.userPassword} 
-			</if>
-			<if test="(record.nickName!=null and record.nickName!='') or  (record.nickName!='' and record.nickName==0)  ">
-				and nick_name  like concat('%',#{record.nickName},'%')
-			</if>
-			<if test="(record.avatarUrl!=null and record.avatarUrl!='') or  (record.avatarUrl!='' and record.avatarUrl==0)  ">
-				and avatar_url  = #{record.avatarUrl} 
-			</if>
-			<if test="(record.openId!=null and record.openId!='') or  (record.openId!='' and record.openId==0)  ">
-				and open_id  = #{record.openId} 
-			</if>
-			<if test="(record.unionId!=null and record.unionId!='') or  (record.unionId!='' and record.unionId==0)  ">
-				and union_id  = #{record.unionId} 
-			</if>
-			<if test="(record.gender!=null and record.gender!='') or  (record.gender!='' and record.gender==0)  ">
-				and gender  = #{record.gender}
-				<if test="record.gender==0">
-					or gender is null
-				</if>
-			</if>
-			<if test="(record.phoneNumber!=null and record.phoneNumber!='') or  (record.phoneNumber!='' and record.phoneNumber==0)  ">
-				and phone_number  = #{record.phoneNumber} 
-			</if>
-			<if test="(record.area!=null and record.area!='') or  (record.area!='' and record.area==0)  ">
-				and area  = #{record.area} 
-			</if>
-			<if test="(record.city!=null and record.city!='') or  (record.city!='' and record.city==0)  ">
-				and city  = #{record.city} 
-			</if>
-			<if test="(record.province!=null and record.province!='') or  (record.province!='' and record.province==0)  ">
-				and province  = #{record.province} 
-			</if>
-			<if test="(record.country!=null and record.country!='') or  (record.country!='' and record.country==0)  ">
-				and country  = #{record.country} 
-			</if>
-			<if test="(record.sessionKey!=null and record.sessionKey!='') or  (record.sessionKey!='' and record.sessionKey==0)  ">
-				and session_key  = #{record.sessionKey} 
-			</if>
-			<if test="(record.lastLoginTime!=null and record.lastLoginTime!='') or  (record.lastLoginTime!='' and record.lastLoginTime==0)  ">
-				and last_login_time  = #{record.lastLoginTime} 
-			</if>
-			<if test="(record.userStatus!=null and record.userStatus!='') or  (record.userStatus!='' and record.userStatus==0)  ">
-				and user_status  = #{record.userStatus} 
-			</if>
-			<if test="(record.userVip!=null and record.userVip!='') or  (record.userVip!='' and record.userVip==0)  ">
-				and user_vip  = #{record.userVip} 
-			</if>
-			<if test="(record.userExpiryTime!=null and record.userExpiryTime!='') or  (record.userExpiryTime!='' and record.userExpiryTime==0)  ">
-				and user_expiry_time  = #{record.userExpiryTime} 
-			</if>
-			<if test="(record.userAuthentication!=null and record.userAuthentication!='') or  (record.userAuthentication!='' and record.userAuthentication==0)  ">
-				and user_authentication  = #{record.userAuthentication} 
-			</if>
-			<if test="(record.userIsAuthorize!=null and record.userIsAuthorize!='') or  (record.userIsAuthorize!='' and record.userIsAuthorize==0)  ">
-				and user_is_authorize  = #{record.userIsAuthorize} 
-			</if>
-			<if test="(record.userTempName!=null and record.userTempName!='') or  (record.userTempName!='' and record.userTempName==0)  ">
-				and user_temp_name  = #{record.userTempName} 
-			</if>
-			<if test="(record.userTempAvatarUrl!=null and record.userTempAvatarUrl!='') or  (record.userTempAvatarUrl!='' and record.userTempAvatarUrl==0)  ">
-				and user_temp_avatar_url  = #{record.userTempAvatarUrl} 
-			</if>
-			<if test="(record.userType!=null and record.userType!='') or  (record.userType!='' and record.userType==0)  ">
-				and user_type  = #{record.userType} 
-			</if>
-
-			 <if test="record.companyId != null and record.companyId !='' ">
-				 and company_id = #{record.companyId}
-			 </if>
-			<if test="(record.startTime!=null and record.startTime!='') or  (record.startTime!='' and record.startTime==0) ">
-				and date_format(create_time,'%Y-%m-%d') &gt;= #{record.startTime}
-			</if>
-            <if test="(record.endTime!=null and record.endTime!='') or  (record.endTime!='' and record.endTime==0) ">
-              and date_format(create_time,'%Y-%m-%d') &lt;= #{record.endTime}
-            </if>
-		</if>
-		 
-	</sql>
-	
-	<!--  插入方法   -->
-	<insert id="insert" parameterType="com.matrix.biz.bean.BizUser"
-		useGeneratedKeys="true" keyProperty="item.userId">
-		INSERT INTO biz_user (
-			 <include refid="columns"></include>
-		)
-	VALUES (
-		 <include refid="propertys"></include>
-	)
-	</insert>
-	
-	
-	
-	<!--  批量插入   -->
-	<insert id="batchInsert" parameterType="java.util.List">
-		INSERT INTO biz_user (
-		<include refid="columns"></include>	
-		)
-	VALUES 
-	<foreach collection="list" item="item" index="index" separator=",">(
-		<include refid="propertys"></include>	
-	)</foreach>
-	</insert>
-	
-	
-	
-	
-	
-	<!--  根据Map更新 部分更新   -->
-	<update id="updateByMap" parameterType="java.util.HashMap" >
-		UPDATE biz_user
-		<set>
-			<if test="_parameter.containsKey('userName')">
-					user_name = #{userName},
-				</if>		
-			<if test="_parameter.containsKey('userPassword')">
-					user_password = #{userPassword},
-				</if>		
-			<if test="_parameter.containsKey('nickName')">
-					nick_name = #{nickName},
-				</if>		
-			<if test="_parameter.containsKey('avatarUrl')">
-					avatar_url = #{avatarUrl},
-				</if>		
-			<if test="_parameter.containsKey('openId')">
-					open_id = #{openId},
-				</if>		
-			<if test="_parameter.containsKey('unionId')">
-					union_id = #{unionId},
-				</if>		
-			<if test="_parameter.containsKey('gender')">
-					gender = #{gender},
-				</if>		
-			<if test="_parameter.containsKey('phoneNumber')">
-					phone_number = #{phoneNumber},
-				</if>		
-			<if test="_parameter.containsKey('area')">
-					area = #{area},
-				</if>		
-			<if test="_parameter.containsKey('city')">
-					city = #{city},
-				</if>		
-			<if test="_parameter.containsKey('province')">
-					province = #{province},
-				</if>		
-			<if test="_parameter.containsKey('country')">
-					country = #{country},
-				</if>		
-			<if test="_parameter.containsKey('sessionKey')">
-					session_key = #{sessionKey},
-				</if>		
-			<if test="_parameter.containsKey('lastLoginTime')">
-					last_login_time = #{lastLoginTime},
-				</if>		
-			<if test="_parameter.containsKey('userStatus')">
-					user_status = #{userStatus},
-				</if>		
-			<if test="_parameter.containsKey('userVip')">
-					user_vip = #{userVip},
-				</if>		
-			<if test="_parameter.containsKey('userExpiryTime')">
-					user_expiry_time = #{userExpiryTime},
-				</if>		
-			<if test="_parameter.containsKey('userAuthentication')">
-					user_authentication = #{userAuthentication},
-				</if>		
-			<if test="_parameter.containsKey('userIsAuthorize')">
-					user_is_authorize = #{userIsAuthorize},
-				</if>		
-			<if test="_parameter.containsKey('userTempName')">
-					user_temp_name = #{userTempName},
-				</if>		
-			<if test="_parameter.containsKey('userTempAvatarUrl')">
-					user_temp_avatar_url = #{userTempAvatarUrl},
-				</if>		
-			<if test="_parameter.containsKey('userType')">
-					user_type = #{userType},
-				</if>		
-		</set>
-		WHERE user_id=#{userId} 
-	</update> 
-	
-	
-	<!--  根据对象更新 部分更新   -->
-	<update id="updateByModel" parameterType="String">
-		UPDATE biz_user
-		<set>
-			<if test="record.userName != null and record.userName != '' ">
-				user_name  = #{record.userName}, 
-			</if>
-			<if test="record.userPassword != null and record.userPassword != '' ">
-				user_password  = #{record.userPassword}, 
-			</if>
-			<if test="record.nickName != null and record.nickName != '' ">
-				nick_name  = #{record.nickName}, 
-			</if>
-			<if test="record.avatarUrl != null and record.avatarUrl != '' ">
-				avatar_url  = #{record.avatarUrl}, 
-			</if>
-			<if test="record.openId != null and record.openId != '' ">
-				open_id  = #{record.openId}, 
-			</if>
-			<if test="record.unionId != null and record.unionId != '' ">
-				union_id  = #{record.unionId}, 
-			</if>
-			<if test="record.gender != null and record.gender != '' ">
-				gender  = #{record.gender}, 
-			</if>
-			<if test="record.phoneNumber != null and record.phoneNumber != '' ">
-				phone_number  = #{record.phoneNumber}, 
-			</if>
-			<if test="record.area != null and record.area != '' ">
-				area  = #{record.area}, 
-			</if>
-			<if test="record.city != null and record.city != '' ">
-				city  = #{record.city}, 
-			</if>
-			<if test="record.province != null and record.province != '' ">
-				province  = #{record.province}, 
-			</if>
-			<if test="record.country != null and record.country != '' ">
-				country  = #{record.country}, 
-			</if>
-			<if test="record.sessionKey != null and record.sessionKey != '' ">
-				session_key  = #{record.sessionKey}, 
-			</if>
-			<if test="record.lastLoginTime != null ">
-				last_login_time  = #{record.lastLoginTime}, 
-			</if>
-			<if test="record.userStatus != null ">
-				user_status  = #{record.userStatus}, 
-			</if>
-			<if test="record.userVip != null ">
-				user_vip  = #{record.userVip}, 
-			</if>
-			<if test="record.userExpiryTime != null ">
-				user_expiry_time  = #{record.userExpiryTime}, 
-			</if>
-			<if test="record.userAuthentication != null and record.userAuthentication != '' ">
-				user_authentication  = #{record.userAuthentication}, 
-			</if>
-			<if test="record.userIsAuthorize != null ">
-				user_is_authorize  = #{record.userIsAuthorize}, 
-			</if>
-			<if test="record.userTempName != null and record.userTempName != '' ">
-				user_temp_name  = #{record.userTempName}, 
-			</if>
-			<if test="record.userTempAvatarUrl != null and record.userTempAvatarUrl != '' ">
-				user_temp_avatar_url  = #{record.userTempAvatarUrl}, 
-			</if>
-			<if test="record.userType != null ">
-				user_type  = #{record.userType}, 
-			</if>
-		</set>
-		WHERE user_id=#{record.userId} 
-	</update>
-	
-	<!-- 批量删除 -->
-	<delete id="deleteByIds" parameterType="java.util.List">
-		delete from biz_user where  user_id in
-		<foreach collection="list" index="index" item="item" open="("
-			separator="," close=")">
-			#{item}
-		</foreach>
-	</delete>
-		
-	<!-- 根据id删除-->
-	<delete id="deleteById" parameterType="String">
-		DELETE FROM biz_user
-		where  user_id=#{userId} 
-	</delete>
-	
-	<!-- 根据对象删除-->
-	<delete id="deleteByModel" parameterType="com.matrix.biz.bean.BizUser">
-		DELETE FROM biz_user
-		<where>
-		<include refid="where_sql" ></include>
-		</where>
-	</delete>
-	
-	
-	
-	<!-- 分页查询 -->
-	<select id="selectInPage" resultMap="BizUserMap">
-		select 
-		<include refid="columns" ></include>
-		from biz_user
-		<where>
-		  <include refid="where_sql"></include>
-		 </where>
-		<if test="pageVo !=null"><!-- 判断pageVo对象是否为空 -->
-			<if test="pageVo.sort !=null  and pageVo.order !=null">
-				order by
-				${pageVo.sort} ${pageVo.order}
-			</if>
-			<if test="pageVo.offset >=0  and pageVo.limit >0">
-				limit
-				#{pageVo.offset},#{pageVo.limit}
-			</if>
-		</if>
-	</select>
-	
-	<!-- 查询总条数 -->
-	<select id="selectTotalRecord" parameterType="long"   resultType="java.lang.Integer">
-	select count(*)
-	from biz_user
-		<where>
-		   <include refid="where_sql"></include>
-		</where>
-	</select>
-
-	<!-- 根据id查询-->
-	<select id="selectById" resultMap="BizUserMap">
-		select 
-		<include refid="columns" ></include>
-		from biz_user
-		where  user_id=#{userId} 
-	</select>	
-	
-	
-	<!-- 根据id 锁表查询-->
-	<select id="selectForUpdate" resultMap="BizUserMap">
-		select 
-		<include refid="columns" ></include>
-		from biz_user
-		where  user_id=#{user_id} 
-		for update
-	</select>	
-	
-	
-	
-	<!-- 根据对象查询-->
-	<select id="selectByModel" resultMap="BizUserMap">
-		select 
-		<include refid="columns" ></include>
-		from biz_user
-		<where>
-		  <include refid="where_sql"></include>
-		 </where>
-	</select>
-
-
-	<select id="findByOpenId" resultMap="BizUserMap">
-		select
-		<include refid="columns" ></include>
-		from biz_user where open_id=#{openId}
-	</select>
-</mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesDao.xml
index 78a0c37..7bc1f4c 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesDao.xml
@@ -7,6 +7,7 @@
 	<resultMap type="com.matrix.system.shopXcx.bean.ShopActivities" id="ShopActivitiesMap">
 		<id property="id" column="id" />
 			<result property="actName" column="act_name" />
+			<result property="actCode" column="act_code" />
 			<result property="actType" column="act_type" />
 			<result property="actBeginTime" column="act_begin_time" />
 			<result property="actEndTime" column="act_end_time" />
@@ -47,6 +48,7 @@
 	<resultMap type="com.matrix.system.shopXcx.bean.ShopActivities" id="ShopActivitiesSimpleMap">
 		<id property="id" column="id" />
 			<result property="actName" column="act_name" />
+			<result property="actCode" column="act_code" />
 			<result property="actType" column="act_type" />
 			<result property="actBeginTime" column="act_begin_time" />
 			<result property="actEndTime" column="act_end_time" />
@@ -65,6 +67,7 @@
 		update_time,
 			id,
 			act_name,
+			act_code,
 			act_type,
 			act_begin_time,
 			act_end_time,
@@ -85,6 +88,7 @@
 		now(),
 			#{item.id},
 			#{item.actName},
+			#{item.actCode},
 			#{item.actType},
 			#{item.actBeginTime},
 			#{item.actEndTime},
@@ -208,6 +212,13 @@
 		<set>
 			<if test="record.actName != null and record.actName != '' ">
 				act_name  = #{record.actName},
+			</if>
+			<if test="record.actCode != null ">
+				act_code  = #{record.actCode},
+			</if>
+
+			<if test="record.actContent != null ">
+				act_content  = #{record.actContent},
 			</if>
 			<if test="record.actType != null ">
 				act_type  = #{record.actType}, 
@@ -386,4 +397,35 @@
 			</if>
 		</if>
 	</select>
+
+	<select id="findActivitiesList" resultType="com.matrix.system.activity.vo.ActivitiesListVo">
+		SELECT
+			*
+		FROM
+		shop_activities a
+		<where>
+			a.company_id=#{record.companyId}
+			<if test="record.hdzt != null and record.hdzt != ''">
+				and a.act_status=#{record.hdzt}
+			</if>
+			<if test="record.hdmc != null and record.hdmc != ''">
+				and a.act_name like concat('%',#{record.hdmc},'%')
+			</if>
+		</where>
+		<if test="record.sort !=null">
+			order by
+			a.${record.sort} ${record.order}
+		</if>
+	</select>
+
+	<select id="selectOneByCompanyIdAndActTypeAndActStatus" resultType="com.matrix.system.shopXcx.bean.ShopActivities">
+		SELECT
+		*
+		FROM
+		shop_activities a
+		where
+			a.company_id=#{companyId}
+			and a.act_type=#{activitiesTypeSign}
+			and a.act_status=#{actstatusStatusIng}
+	</select>
 </mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesGroupJoinDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesGroupJoinDao.xml
index f429e8c..2e74316 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesGroupJoinDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesGroupJoinDao.xml
@@ -247,7 +247,7 @@
 			t3.nick_name headName
 		from shop_activities_group_join t1
 		inner join shop_activities_group_price t2 on t1.gp_id=t2.id
-		inner join biz_user t3 on t1.gj_head_id=t3.open_id
+		inner join sys_vip_info t3 on t1.gj_head_id=t3.id
 		where t1.act_id  = #{record.actId}
 		<if test="pageVo !=null"><!-- 判断pageVo对象是否为空 -->
 			<if test="pageVo.sort !=null  and pageVo.order !=null">
@@ -310,7 +310,7 @@
 			t3.avatar_url avatarUrl
 		from shop_activities_group_join t1
 		inner join shop_activities_group_join_user t2 on t1.id=t2.gj_id and t2.is_has_cancel=2 and t2.is_has_pay=1
-		left join biz_user t3 on t2.user_id=t3.open_id
+		left join sys_vip_info t3 on t2.user_id=t3.id
 		where t1.id=#{gjId}
 	</select>
 
@@ -327,7 +327,7 @@
 			t3.avatar_url avatarUrl
 		from shop_activities_group_join t1
 		inner join shop_activities_group_join_user t2 on t1.id=t2.gj_id and t2.is_has_cancel=2
-		left join biz_user t3 on t2.user_id=t3.open_id
+		left join sys_vip_info t3 on t2.user_id=t3.id
 		where t1.id=#{gjId}
 	</select>
 
@@ -350,7 +350,7 @@
 			t3.avatar_url
 		from shop_activities_group_join t1
 		inner join shop_activities_group_price t2 on t1.gp_id=t2.id
-		left join biz_user t3 on t1.gj_head_id=t3.open_id
+		left join sys_vip_info t3 on t1.gj_head_id=t3.id
 		where t1.act_id=#{actId} and t1.gj_status=3
 	</select>
 
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesGroupJoinUserDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesGroupJoinUserDao.xml
index c98ffff..0ed3811 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesGroupJoinUserDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesGroupJoinUserDao.xml
@@ -317,7 +317,7 @@
 		   t3.nick_name
 		from shop_activities_group_join_user t1
 		inner join shop_order t2 on t1.order_id=t2.id
-		inner join biz_user t3 on t1.user_id=t3.open_id
+		inner join sys_vip_info t3 on t1.user_id=t3.id
 		where t1.gj_id=#{gjId}
 	</select>
 
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesSalonRecordDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesSalonRecordDao.xml
index da0bb54..a759d6f 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesSalonRecordDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesSalonRecordDao.xml
@@ -16,7 +16,7 @@
 		<result property="status" column="status" />
 		<result property="nickName" column="nick_name" />
 		<result property="shopName" column="shop_short_name" />
-		<result property="phone" column="phone_number" />
+		<result property="phone" column="phone" />
 		<collection property="salonAttr" ofType="com.matrix.system.shopXcx.bean.ShopActivitiesSalonAttrRecord">
 			<id property="id" column="asd_id" />
 			<result property="attrName" column="attr_name" />
@@ -184,10 +184,10 @@
 	
 	<!-- 分页查询 -->
 	<select id="selectInPage" resultMap="ShopActivitiesSalonRecordMap">
-		select t1.*, t3.nick_name, t3.phone_number, t4.shop_short_name, t2.id asd_id, t2.attr_name, t2.attr_value, t2.asr_id
+		select t1.*, t3.nick_name, t3.phone, t4.shop_short_name, t2.id asd_id, t2.attr_name, t2.attr_value, t2.asr_id
 		from shop_activities_salon_record t1
 		inner join shop_activities_salon_attr_record t2 on t1.id=t2.asr_id
-		left join biz_user t3 on t1.user_id=open_id
+		left join sys_vip_info t3 on t1.user_id=id
 		left join sys_shop_info t4 on t1.shop_id=t4.id
 		<where>
 		  <include refid="where_sql"></include>
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesSeckillRecordDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesSeckillRecordDao.xml
index b577b01..0a420e7 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesSeckillRecordDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesSeckillRecordDao.xml
@@ -181,12 +181,12 @@
 			t3.purchase_quantity,
 			t4.shop_short_name,
 			t5.nick_name userName,
-			t5.phone_number phone
+			t5.phone
 		from shop_activities_seckill_record t1
 		inner join shop_activities_seckill_info t2 on t1.si_id=t2.id
 		inner join shop_order t3 on t1.order_id=t3.id
 		left join sys_shop_info t4 on t3.store_id=t4.id
-		left join biz_user t5 on t1.user_id=t5.open_id
+		left join sys_vip_info t5 on t1.user_id=t5.id
 		left join shop_product t6 on t2.goods_id=t6.id
 		where t2.act_id=#{record.actId}
 		<if test="pageVo !=null"><!-- 判断pageVo对象是否为空 -->
@@ -208,7 +208,7 @@
 		inner join shop_activities_seckill_info t2 on t1.si_id=t2.id
 		inner join shop_order t3 on t1.order_id=t3.id
 		left join sys_shop_info t4 on t3.store_id=t4.id
-		left join biz_user t5 on t1.user_id=t5.open_id
+		left join sys_vip_info t5 on t1.user_id=t5.id
 		left join shop_product t6 on t2.goods_id=t6.id
 		where t2.act_id=#{record.actId}
 	</select>
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopAdvertisDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopAdvertisDao.xml
index e8b87b0..b0a7931 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopAdvertisDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopAdvertisDao.xml
@@ -20,6 +20,7 @@
 		<result property="linkType" column="link_type"/>
 		<result property="linkUrl" column="link_url"/>
 		<result property="companyId" column="company_id" />
+		<result property="pageId" column="page_id" />
 	</resultMap>
 	
 	
@@ -38,6 +39,7 @@
 			<result property="remarks" column="remarks" />
 		<result property="linkType" column="link_type"/>
 		<result property="linkUrl" column="link_url"/>
+		<result property="pageId" column="page_id" />
 		<result property="companyId" column="company_id" />
 	</resultMap>
 	
@@ -56,6 +58,7 @@
 			remarks,
 link_type,
 link_url,
+page_id,
             company_id
 	</sql>
 	
@@ -74,6 +77,7 @@
 			#{item.remarks},
 			#{item.linkType},
 			#{item.linkUrl},
+			#{item.pageId},
         #{item.companyId}
 	</sql>
 	
@@ -101,6 +105,9 @@
 			</if>
 			<if test="(record.remarks!=null and record.remarks!='') or  (record.remarks!='' and record.remarks==0)  ">
 				and remarks  = #{record.remarks} 
+			</if>
+			<if test="(record.pageId!=null and record.pageId!='') or  (record.pageId!='' and record.pageId==0)  ">
+				and page_id  = #{record.pageId}
 			</if>
 			 <if test="record.companyId != null and record.companyId !='' ">
 				 and company_id = #{record.companyId}
@@ -167,6 +174,10 @@
 				link_type = #{linkType},
 			</if>
 
+			<if test="_parameter.containsKey('pageId')">
+				page_id = #{pageId},
+			</if>
+
 
 		</set>
 		WHERE id=#{id} 
@@ -206,6 +217,10 @@
 				 company_id = #{record.companyId}
 			</if>
 
+			<if test="record.pageId != null and record.pageId !='' ">
+				page_id = #{record.pageId}
+			</if>
+
 		</set>
 		WHERE id=#{record.id} 
 	</update>
@@ -232,8 +247,8 @@
 		<include refid="where_sql" ></include>
 		</where>
 	</delete>
-	
-	
+
+
 	
 	<!-- 分页查询 -->
 	<select id="selectInPage" resultType="com.matrix.system.shopXcx.bean.ShopAdvertis">
@@ -249,6 +264,7 @@
 		ad.type_id typeId,
 		ad.sort,
 		ad.remarks,
+		       ad.page_id,
 		IFNULL(adType.adt_name ,'无分类') adtName
 		from shop_advertis ad
 		left join shop_advertis_type adType
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopCollectionDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopCollectionDao.xml
index 1ed2da7..e55332e 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopCollectionDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopCollectionDao.xml
@@ -32,7 +32,7 @@
 			<result property="delFlag" column="del_flag" />
 			<result property="userName" column="user_name" />
 			<result property="nickName" column="nick_name" />
-			<result property="phoneNumber" column="phone_number" />
+			<result property="phoneNumber" column="phone" />
 		<result property="companyId" column="company_id" />
 	</resultMap>
 	
@@ -215,10 +215,10 @@
 		c.coll_productid,
 		u.user_name,
 		u.nick_name,
-		u.phone_number,
+		u.phone,
 		p.title
 		from shop_collection c
-		LEFT JOIN biz_user u ON c.coll_userid = u.open_id
+		LEFT JOIN sys_vip_info u ON c.coll_userid = u.id
 		LEFT JOIN shop_product p ON c.coll_productid = p.id
 		<where>
 		  <include refid="where_sql"></include>
@@ -236,7 +236,7 @@
 	<select id="selectTotalRecord" parameterType="long"   resultType="java.lang.Integer">
 	select count(*)
 	from shop_collection c
-		LEFT JOIN biz_user u ON c.coll_userid = u.open_id
+		LEFT JOIN sys_vip_info u ON c.coll_userid = u.id
 		LEFT JOIN shop_product p ON c.coll_productid = p.id
 		<where>
 		   <include refid="where_sql"></include>
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopCouponRecordDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopCouponRecordDao.xml
index cbb939b..4a915c2 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopCouponRecordDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopCouponRecordDao.xml
@@ -311,4 +311,8 @@
         </if>
     </select>
 
+    <select id="countUnuseCouponRecord" resultType="java.lang.Integer">
+        select  count(*) from shop_coupon_record where user_id = #{userId} and   is_using = 2
+    </select>
+
 </mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopDeliveryInfoDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopDeliveryInfoDao.xml
index fecc71b..0a9cbab 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopDeliveryInfoDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopDeliveryInfoDao.xml
@@ -65,6 +65,7 @@
 			logistics_status,
 			delivery_time,
 			pick_up_status,
+			receive_id,
 			shop_id
 	</sql>
 
@@ -87,6 +88,7 @@
 			#{item.logisticsStatus},
 			#{item.deliveryTime},
 			#{item.pickUpStatus},
+			#{item.receiveId},
 			#{item.shopId}
 	</sql>
 
@@ -239,6 +241,9 @@
 			<if test="record.orderId != null ">
 				order_id  = #{record.orderId},
 			</if>
+			<if test="record.receiveId != null ">
+				receive_id  = #{record.receiveId},
+			</if>
 			<if test="record.userId != null and record.userId != '' ">
 				user_id  = #{record.userId},
 			</if>
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopInvoiceDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopInvoiceDao.xml
index 15b7e08..fadeb51 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopInvoiceDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopInvoiceDao.xml
@@ -366,7 +366,7 @@
 		FROM
 		shop_invoice i
 		LEFT JOIN shop_order o ON i.order_id = o.id
-		LEFT JOIN biz_user b on i.user_id = b.open_id
+		LEFT JOIN sys_vip_info b on i.user_id = b.id
 		<where>
 		  <include refid="where_sql"></include>
 		 </where>
@@ -385,7 +385,7 @@
 		FROM
 		shop_invoice i
 		LEFT JOIN shop_order o ON i.order_id = o.id
-		LEFT JOIN biz_user b on i.user_id = b.open_id
+		LEFT JOIN sys_vip_info b on i.user_id = b.id
 		<where>
 		   <include refid="where_sql"></include>
 		</where>
@@ -419,7 +419,7 @@
 		FROM
 		shop_invoice i
 		LEFT JOIN shop_order o ON i.order_id = o.id
-		LEFT JOIN biz_user b on i.user_id = b.open_id
+		LEFT JOIN sys_vip_info b on i.user_id = b.id
 		where  invo_id=#{invoId} 
 	</select>	
 	
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDao.xml
index 8ec31fb..ba616cb 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDao.xml
@@ -33,7 +33,12 @@
 			<result property="storeName" column="shop_name" />
 			<result property="orderType" column="order_type" />
 			<result property="applyStatus" column="apply_status" />
+			<result property="scorePay" column="score_pay" />
+			<result property="payMethod" column="pay_method" />
 			<result property="companyId" column="company_id" />
+			<!--返回详情列表-->
+			<collection property="details" column="{orderId=id}"
+						select="com.matrix.system.shopXcx.dao.ShopOrderDetailsDao.selectByOrderId"/>
 	</resultMap>
 
 
@@ -44,6 +49,7 @@
 		<result property="createTime" column="create_time" />
 		<result property="updateBy" column="update_by" />
 		<result property="updateTime" column="update_time" />
+		<result property="payMethod" column="pay_method" />
 			<result property="orderNo" column="order_no" />
 			<result property="orderMoney" column="order_money" />
 			<result property="commodityPrice" column="commodity_price" />
@@ -66,6 +72,7 @@
 			<result property="postage" column="postage" />
 			<result property="orderType" column="order_type" />
 			<result property="storeName" column="shop_name" />
+		<result property="scorePay" column="score_pay" />
 			<result property="companyId" column="company_id" />
 		<result property="activityType" column="activity_type" />
 		<!--支付时间-->
@@ -127,6 +134,9 @@
 			postage,
 			order_type,
 			activity_type,
+score_pay,
+
+		pay_method,
 			company_id
 	</sql>
 	
@@ -159,6 +169,8 @@
 			#{item.postage},
 			#{item.orderType},
 			#{item.activityType},
+			#{item.scorePay},
+			#{item.payMethod},
 			#{item.companyId}
 	</sql>
 	
@@ -235,6 +247,7 @@
 			 <if test="(record.companyId!=null and record.companyId!='') or  (record.companyId!='' and record.companyId==0)  ">
 				 and company_id  = #{record.companyId}
 			 </if>
+
 		</if>
 		 
 	</sql>
@@ -337,6 +350,9 @@
 			<if test="_parameter.containsKey('orderType')">
 				order_type  = #{orderType},
 			</if>
+			<if test="_parameter.containsKey('scorePay')">
+				score_pay  = #{scorePay},
+			</if>
 		</set>
 		WHERE id=#{id} 
 	</update> 
@@ -405,6 +421,9 @@
 			</if>
 			<if test="record.postage != null and record.postage != '' ">
 				postage  = #{record.postage},
+			</if>
+			<if test="record.scorePay != null and record.scorePay != '' ">
+				score_pay  = #{record.scorePay},
 			</if>
 			<if test="true">
 				update_time  = now(),
@@ -529,36 +548,10 @@
 	</select>
 
 	<!-- 分页查询 -->
-	<select id="selectInPageByQuery" resultMap="ShopOrderMap">
+	<select id="selectInPageByQuery" resultMap="ShopOrderComplexMap">
 		select
-		o.create_by,
-		o.create_time,
-		o.update_by,
-		o.update_time,
-		o.id,
-		o.order_no,
-		o.order_money,
-		o.commodity_price,
-		o.user_id,
-		o.order_time,
-		o.pay_status,
-		o.discount_explain,
-		o.discount_amount,
-		o.order_status,
-		o.refund_charge,
-		o.user_name,
-		o.user_tel,
-		o.remarks,
-		o.shipping_method,
-		o.store_id,
-		o.purchase_quantity,
-		o.del_flag,
-		o.wx_order_no,
-		o.pay_result,
-		o.postage,
-		s.shop_name,
-		o.order_type,
-		o.apply_status
+		o.*,
+		s.shop_name
 		from shop_order o
 		INNER JOIN sys_shop_info s on o.store_id = s.ID
 		where del_flag = 2 and o.company_id  = #{record.companyId}
@@ -587,6 +580,8 @@
 			<if test="(record.shopId!=null and record.shopId!='')">
 				and o.store_id=#{record.shopId}
 			</if>
+
+
 		</if>
 		<if test="pageVo !=null"><!-- 判断pageVo对象是否为空 -->
 			<if test="pageVo.sort !=null  and pageVo.order !=null">
@@ -628,10 +623,11 @@
 		o.wx_order_no,
 		o.pay_result,
 		o.postage,
-		s.store_name,
+		       o.pay_method,
+		s.shop_name,
 		o.order_type
 		from shop_order o
-		LEFT JOIN shop_store s on o.store_id = s.store_id
+		LEFT JOIN sys_shop_info s on o.store_id = s.ID
 		where del_flag = 2 and o.company_id  = #{record.companyId}
 
 		<if test="record != null">
@@ -654,7 +650,7 @@
 				and  o.order_status = #{record.orderStatus}
 			</if>
 			<if test="(record.storeName!=null and record.storeName!='')">
-				and s.store_name like concat('%', #{record.storeName}, '%')
+				and s.shop_name like concat('%', #{record.storeName}, '%')
 			</if>
 		</if>
 		<if test="pageVo !=null"><!-- 判断pageVo对象是否为空 -->
@@ -756,10 +752,17 @@
     <select id="selectOrderStatusCount"  resultType="java.util.HashMap"  >
 		select  count(order_status) as count , order_status as orderStatus
 		from shop_order
-		where user_id=#{openId}
+		where user_id=#{userId}
 		group by order_status
 	</select>
 
+	<select id="selectShopOrderByOrderNo"  resultType="com.matrix.system.shopXcx.bean.ShopOrder"  >
+		select
+		a.*
+		from shop_order a
+		where a.order_no=#{orderNo}
+	</select>
+
 	<update id="batchUpdateOrderStatus">
 		<foreach collection="list" index="index" item="item" separator=";">
 			update shop_order set order_status=#{item.orderStatus}
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDetailsDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDetailsDao.xml
index c1263ab..46254ee 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDetailsDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDetailsDao.xml
@@ -19,6 +19,9 @@
 			<result property="sTitle" column="s_title" />
 			<result property="discountExplain" column="discount_explain" />
 			<result property="discountAmount" column="discount_amount" />
+			<result property="payType" column="pay_type" />
+			<result property="scoreCount" column="score_count" />
+			<result property="totalScoreCount" column="total_score_count" />
 	</resultMap>
 
 	<!-- 定义ShopOrderDetails 的复杂map -->
@@ -37,22 +40,19 @@
 			<result property="sTitle" column="s_title" />
 			<result property="discountExplain" column="discount_explain" />
 			<result property="discountAmount" column="discount_amount" />
+		<result property="payType" column="pay_type" />
+		<result property="scoreCount" column="score_count" />
+		<result property="totalScoreCount" column="total_score_count" />
+
 		<!--产品信息-->
 		<association property="shopProduct" column="p_id"
 			select="com.matrix.system.shopXcx.dao.ShopProductDao.selectById"/>
 		<!--规格信息-->
 		<association property="shopSku" column="s_id"
 			select="com.matrix.system.shopXcx.dao.ShopSkuDao.selectById"/>
-		<!--查询生产企业-->
-		<association property="productionEnterprise" column="{pId=p_id}"
-					 select="selectProductionEnterpriseByPid"/>
+
 	</resultMap>
 
-	<!--查询产品生产企业-->
-	<select id="selectProductionEnterpriseByPid" resultType="java.lang.String">
-		select ifnull(param_value, '') from shop_product_param_ref
-		where p_id = ${pId} and param_name = '生产企业'
-	</select>
 	
 	<!-- 字段sql -->
 	<sql id="columns">
@@ -69,7 +69,10 @@
 			total_price,
 			s_title,
 			discount_explain,
-			discount_amount
+			discount_amount,
+			pay_type,
+		score_count,
+		total_score_count
 	</sql>
 	
 	<!-- 属性sql -->
@@ -87,7 +90,10 @@
 			#{item.totalPrice},
 			#{item.sTitle},
 			#{item.discountExplain},
-			#{item.discountAmount}
+			#{item.discountAmount},
+			#{item.payType},
+			#{item.scoreCount},
+			#{item.totalScoreCount}
 	</sql>
 	
 	<!-- where sql -->
@@ -123,6 +129,17 @@
 			</if>
 			<if test="(record.discountAmount!=null and record.discountAmount!='') or  (record.discountAmount!='' and record.discountAmount==0)  ">
 				and discount_amount  = #{record.discountAmount} 
+			</if>
+			<if test="(record.payType!=null and record.payType!='') or  (record.payType!='' and record.payType==0)  ">
+				and pay_type  = #{record.payType}
+			</if>
+
+			<if test="(record.scoreCount!=null and record.scoreCount!='') or  (record.scoreCount!='' and record.scoreCount==0)  ">
+				and score_count  = #{record.scoreCount}
+			</if>
+
+			<if test="(record.totalScoreCount!=null and record.totalScoreCount!='') or  (record.totalScoreCount!='' and record.totalScoreCount==0)  ">
+				and total_score_count  = #{record.totalScoreCount}
 			</if>
 		</if>
 		 
@@ -186,7 +203,20 @@
 				</if>		
 			<if test="_parameter.containsKey('discountAmount')">
 					discount_amount = #{discountAmount},
-				</if>		
+				</if>
+
+			<if test="_parameter.containsKey('payType')">
+				pay_type = #{payType},
+				</if>
+
+			<if test="_parameter.containsKey('scoreCount')">
+				score_count = #{scoreCount},
+				</if>
+
+			<if test="_parameter.containsKey('totalScoreCount')">
+				total_score_count = #{totalScoreCount},
+				</if>
+
 		</set>
 		WHERE id=#{id} 
 	</update> 
@@ -223,10 +253,18 @@
 			<if test="record.discountAmount != null ">
 				discount_amount  = #{record.discountAmount}, 
 			</if>
+			<if test="record.payType != null ">
+				pay_type  = #{record.payType},
+			</if>
+			<if test="record.scoreCount != null ">
+				score_count  = #{record.scoreCount},
+			</if>
+			<if test="record.totalScoreCount != null ">
+				total_score_count  = #{record.totalScoreCount},
+			</if>
 		</set>
 		WHERE id=#{record.id} 
 	</update>
-	
 	<!-- 批量删除 -->
 	<delete id="deleteByIds" parameterType="java.util.List">
 		delete from shop_order_details where  id in
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderSearchDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderSearchDao.xml
index 6404029..9c86499 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderSearchDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderSearchDao.xml
@@ -95,13 +95,13 @@
         select
         so.order_no,so.order_status,sp.title pro_name,spa.attr_name pro_type,sp.attrs_values pro_attrs,sku.`NAME` pro_specification,sod.count 'count',sod.price*sod.count order_money,bu.nick_name nick_name,so.order_time
         from
-        shop_order_details sod,shop_product sp,shop_product_attribute spa,shop_order so,biz_user bu,shop_sku sku
+        shop_order_details sod,shop_product sp,shop_product_attribute spa,shop_order so,sys_vip_info bu,shop_sku sku
         where
         so.del_flag = 2
         and sod.p_id = sp.id
         and sp.category_id = spa.attr_id
         and sod.order_id = so.id
-        and bu.open_id = so.user_id
+        and bu.id = so.user_id
         and sku.p_id = sod.p_id
 		and so.company_id=#{record.companyId}
 		<if test="record != null">
@@ -152,13 +152,13 @@
 	<select id="selectTotalRecordByQuery" resultType="java.lang.Integer">
 		select count(*)
 		from
-		shop_order_details sod,shop_product sp,shop_product_attribute spa,shop_order so,biz_user bu,shop_sku sku
+		shop_order_details sod,shop_product sp,shop_product_attribute spa,shop_order so,sys_vip_info bu,shop_sku sku
 		where
 		so.del_flag = 2
 		and sod.p_id = sp.id
 		and sp.category_id = spa.attr_id
 		and sod.order_id = so.id
-		and bu.open_id = so.user_id
+		and bu.id = so.user_id
 		and sku.p_id = sod.p_id
 		and so.company_id=#{record.companyId}
 		<if test="record != null">
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderV2Dao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderV2Dao.xml
new file mode 100644
index 0000000..a282ab6
--- /dev/null
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderV2Dao.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.matrix.system.shopXcx.dao.ShopOrderV2Dao">
+
+	<select id="selectReceivedOrderCount" resultType="java.lang.Integer">
+		select count(*)  from shop_order where user_id = #{userId} and order_status in (4,5)
+	</select>
+
+	<select id="countOrderAmount" resultType="java.lang.Double">
+		select IFNULL(sum(IFNULL( order_money, 0 )),0)  from shop_order where user_id = #{userId} and order_status in (4,5)
+	</select>
+
+	<select id="countBuyZdcp" resultType="java.lang.Integer">
+		select count(*) from shop_order a
+						  left join shop_order_details b on a.id=b.order_id
+		where a.user_id=#{userId}
+		  and  order_status in (4,5)
+		  and find_in_set(b.p_id,#{productIds})
+	</select>
+
+
+
+</mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductCommentDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductCommentDao.xml
index c32a212..3c34532 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductCommentDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductCommentDao.xml
@@ -104,7 +104,7 @@
 			</if>
 
 			 <if test="record.companyId != null and record.companyId !='' ">
-				 and company_id = #{record.companyId}
+				 and c.company_id = #{record.companyId}
 			 </if>
 
 			<if test="(record.comContent!=null and record.comContent!='') or  (record.comContent!='' and record.comContent==0)  ">
@@ -318,7 +318,7 @@
 		shop_product_comment c
 		LEFT JOIN shop_product p ON c.product_id = p.id
 		LEFT JOIN shop_order o ON c.order_id = o.id
-		LEFT JOIN biz_user b ON c.user_id = b.open_id
+		LEFT JOIN sys_vip_info b ON c.user_id = b.id
 		<where>
 		  <include refid="where_sql"></include>
 		 </where>
@@ -338,7 +338,7 @@
 		shop_product_comment c
 		LEFT JOIN shop_product p ON c.product_id = p.id
 		LEFT JOIN shop_order o ON c.order_id = o.id
-		LEFT JOIN biz_user b ON c.user_id = b.open_id
+		LEFT JOIN sys_vip_info b ON c.user_id = b.id
 		<where>
 		   <include refid="where_sql"></include>
 		</where>
@@ -379,7 +379,7 @@
 			shop_product_comment c
 			LEFT JOIN shop_product p ON c.product_id = p.id
 			LEFT JOIN shop_order o ON c.order_id = o.id
-			LEFT JOIN biz_user b ON c.user_id = b.open_id
+			LEFT JOIN sys_vip_info b ON c.user_id = b.id
 		<where>
 			<if test="record!=null">
 				<if test="(record.userId!=null and record.userId!='') or  (record.userId!='' and record.userId==0)  ">
@@ -425,7 +425,7 @@
 			shop_product_comment c
 			LEFT JOIN shop_product p ON c.product_id = p.id
 			LEFT JOIN shop_order o ON c.order_id = o.id
-			LEFT JOIN biz_user b ON c.user_id = b.open_id
+			LEFT JOIN sys_vip_info b ON c.user_id = b.openid
 		<where>
 			and c.product_id = #{record.productId}
 			AND p.del_flag = 2
@@ -448,13 +448,14 @@
 		shop_product_comment c
 		LEFT JOIN shop_product p ON c.product_id = p.id
 		LEFT JOIN shop_order o ON c.order_id = o.id
-		LEFT JOIN biz_user b ON c.user_id = b.open_id
+		LEFT JOIN sys_vip_info b ON c.user_id = b.openid
 		<where>
 			<if test="record!=null">
 				<if test="(record.productId!=null and record.productId!='') or  (record.productId!='' and record.productId==0)  ">
 					and c.product_id = #{record.productId}
 				</if>
 			</if>
+		    and c.com_audit_status=1
 			AND p.del_flag = 2
 			AND o.del_flag = 2
 			AND c.del_flag = 2
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductDao.xml
index 2c2cf8c..91c105d 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductDao.xml
@@ -42,6 +42,10 @@
         <result property="couponId" column="couponId"></result>
         <result property="serviceTime" column="service_time"></result>
         <result property="companyId" column="company_id"/>
+        <result property="ableScorePay" column="able_score_pay"/>
+        <result property="ableSales" column="able_sales"/>
+        <result property="scoreCategoryId" column="score_category_id"/>
+
         <association property="shopCoupon" select="com.matrix.system.shopXcx.dao.ShopCouponDao.selectById"
                      column="{id=couponId}"></association>
     </resultMap>
@@ -80,6 +84,9 @@
         <result property="couponId" column="couponId"></result>
         <result property="serviceTime" column="service_time"></result>
         <result property="companyId" column="company_id"/>
+        <result property="ableScorePay" column="able_score_pay"/>
+        <result property="ableSales" column="able_sales"/>
+        <result property="scoreCategoryId" column="score_category_id"/>
     </resultMap>
 
     <sql id="columns">
@@ -113,7 +120,11 @@
 			is_service,
 			service_time,
 			shop_ids,
-			company_id
+			company_id,
+        able_score_pay,
+        able_sales,
+        score_category_id
+
 	</sql>
 
     <!-- 属性sql -->
@@ -148,7 +159,11 @@
 			#{item.isService},
 			#{item.serviceTime},
 			#{item.shopIds},
-			#{item.companyId}
+			#{item.companyId},
+			#{item.ableScorePay},
+			#{item.ableSales},
+			#{item.scoreCategoryId}
+
 	</sql>
     <!-- where sql -->
     <sql id="where_sql">
@@ -237,6 +252,15 @@
                 and a.company_id = #{record.companyId}
             </if>
 
+            <if test="record.ableScorePay != null and record.ableScorePay !='' ">
+                and a.able_score_pay = #{record.ableScorePay}
+            </if>
+            <if test="record.ableSales != null and record.ableSales !='' ">
+                and a.able_sales = #{record.ableSales}
+            </if>
+            <if test="record.scoreCategoryId != null and record.scoreCategoryId ">
+                and a.score_category_id = #{record.scoreCategoryId}
+            </if>
 
         </if>
 
@@ -311,6 +335,17 @@
 
                 and b.attr_full_path like concat('%/',#{record.attrs},'/%')
             </if>
+
+            <if test="record.ableScorePay != null and record.ableScorePay !='' ">
+                and a.able_score_pay = #{record.ableScorePay}
+            </if>
+            <if test="record.ableSales != null and record.ableSales !='' ">
+                and a.able_sales = #{record.ableSales}
+            </if>
+            <if test="record.scoreCategoryId != null and record.scoreCategoryId ">
+                and a.score_category_id = #{record.scoreCategoryId}
+            </if>
+
 
         </if>
 
@@ -418,6 +453,16 @@
             <if test="_parameter.containsKey('companyId')">
                 company_id = #{companyId},
             </if>
+            <if test="_parameter.containsKey('scoreCategoryId')">
+                score_category_id = #{scoreCategoryId},
+            </if>
+            <if test="_parameter.containsKey('ableSales')">
+                able_sales = #{ableSales},
+            </if>
+            <if test="_parameter.containsKey('ableScorePay')">
+                able_score_pay = #{ableScorePay},
+            </if>
+
 
         </set>
         WHERE id=#{id}
@@ -500,6 +545,15 @@
                 shop_ids = #{record.shopIds},
             </if>
 
+            <if test="record.ableScorePay != null and record.ableScorePay !='' ">
+                able_score_pay = #{record.ableScorePay},
+            </if>
+            <if test="record.ableSales != null and record.ableSales !='' ">
+                able_sales = #{record.ableSales},
+            </if>
+            <if test="record.scoreCategoryId != null and record.scoreCategoryId ">
+               score_category_id = #{record.scoreCategoryId},
+            </if>
 
         </set>
         WHERE id=#{record.id}
@@ -588,6 +642,9 @@
 		a.marked_price,
 		b.attr_full_path,
 		a.couponId,
+		a.able_score_pay,
+		a.able_sales,
+		a.score_category_id,
 		(SELECT ROUND(SUM(ss.stock),2) from shop_sku  ss where ss.p_id = a.id) as stockNum,
 		GROUP_CONCAT(DISTINCT(s.atrid) order by a.id SEPARATOR ',') atrid
 		from shop_product a left join shop_product_attr_ref b on a.id = b.p_id
@@ -628,6 +685,9 @@
 		a.marked_price,
 		a.service_time,
 		a.couponId,
+        a.able_score_pay,
+        a.able_sales,
+        a.score_category_id,
 		(SELECT ROUND(SUM(ss.stock),2) from shop_sku  ss where ss.p_id = a.id) as stockNum
 		from shop_product a
 		where  a.id in (${productIds}) and shop_ids=#{shopId}
@@ -665,6 +725,9 @@
         a.marked_price,
         b.attr_full_path,
         a.couponId,
+        a.able_score_pay,
+        a.able_sales,
+        a.score_category_id,
         a.service_time,
         (SELECT ROUND(SUM(ss.stock),2) from shop_sku ss where ss.p_id = a.id) as stockNum,
         GROUP_CONCAT(DISTINCT(s.atrid) order by a.id SEPARATOR ',') atrid
@@ -730,6 +793,9 @@
         b.attr_full_path,
         a.service_time,
         a.couponId,
+        a.able_score_pay,
+        a.able_sales,
+        a.score_category_id,
         (SELECT ROUND(SUM(s.stock),2) from shop_sku s where s.p_id = a.id) as stockNum,
         (SELECT COUNT(p.com_id) from shop_product_comment p where p.product_id=a.id and p.del_flag=2 and p.com_audit_status=1 and p.com_score=5) as comment
         from shop_product a
@@ -771,6 +837,18 @@
             <if test="(record.shopIds!=null and record.shopIds!='') or  (record.shopIds!='' and record.shopIds==0)  ">
                 and find_in_set(#{record.shopIds}, a.shop_ids)
             </if>
+
+            <if test="record.ableScorePay != null and record.ableScorePay !='' ">
+                and a.able_score_pay = #{record.ableScorePay}
+            </if>
+            <if test="record.ableSales != null and record.ableSales !='' ">
+                and a.able_sales = #{record.ableSales}
+            </if>
+            <if test="record.scoreCategoryId != null and record.scoreCategoryId ">
+                and a.score_category_id = #{record.scoreCategoryId}
+            </if>
+
+
         </where>
         GROUP BY a.id
         <if test="record.queryType != null and record.queryType == 1">
@@ -828,6 +906,9 @@
 			is_special_price,
 			marked_price,
 			couponId,
+            a.able_score_pay,
+            a.able_sales,
+            a.score_category_id,
 			(SELECT SUM(s.stock) from shop_sku  s where s.p_id = a.id) as stockNum,
 			(SELECT ROUND(SUM(s.stock),2) from shop_sku  s where s.p_id = a.id) as stockNum,
 			shop_ids
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopRefundRecordDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopRefundRecordDao.xml
index 374a982..75e8591 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopRefundRecordDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopRefundRecordDao.xml
@@ -465,7 +465,7 @@
 		u.nick_name
 		from shop_refund_record r
 		left join shop_order o on r.order_id = o.id
-		LEFT JOIN biz_user u ON r.user_id = u.open_id
+		LEFT JOIN sys_vip_info u ON r.user_id = u.id
 		<where>
 		  <include refid="where_sql"></include>
 		 </where>
@@ -483,7 +483,7 @@
 	select count(*)
 		from shop_refund_record r
 		left join shop_order o on r.order_id = o.id
-		LEFT JOIN biz_user u ON r.user_id = u.open_id
+		LEFT JOIN sys_vip_info u ON r.user_id = u.id
 		<where>
 		   <include refid="where_sql"></include>
 		</where>
@@ -520,7 +520,7 @@
 		u.nick_name
 		from shop_refund_record r
 		left join shop_order o on r.order_id = o.id
-		LEFT JOIN biz_user u ON r.user_id = u.open_id
+		LEFT JOIN sys_vip_info u ON r.user_id = u.id
 		where  r.id=#{id}
 	</select>
 
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopShoppingCartDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopShoppingCartDao.xml
index 8e59026..5f88fc6 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopShoppingCartDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopShoppingCartDao.xml
@@ -27,6 +27,7 @@
 		    <result property="isSelected" column="isSelected" />
 		    <result property="shopId" column="shop_id" />
 		<result property="companyId" column="company_id" />
+		<result property="cartType" column="cart_type" />
 	</resultMap>
 	
 	
@@ -44,6 +45,8 @@
 		<result property="isSelected" column="isSelected" />
 		<result property="shopId" column="shop_id" />
 		<result property="companyId" column="company_id" />
+		<result property="cartType" column="cart_type" />
+
 	</resultMap>
 	
 	<!-- 字段sql -->
@@ -59,7 +62,9 @@
 			cart_number,
 			isSelected,
 			shop_id,
-            company_id
+            company_id,
+		cart_type
+
 	</sql>
 	
 	<!-- 属性sql -->
@@ -75,7 +80,9 @@
 			#{item.cartNumber},
 			#{item.isSelected},
 			#{item.shopId},
-		#{item.companyId}
+		#{item.companyId},
+		#{item.cartType}
+
 	</sql>
 	
 	<!-- where sql -->
@@ -122,6 +129,7 @@
 			 <if test="record.companyId != null and record.companyId !='' ">
 				 and c.company_id = #{record.companyId}
 			 </if>
+
 
 		</if>
 		 
@@ -268,11 +276,12 @@
 		p.img_mobile,
 		p.img_pc,
 		u.nick_name,
-		s.NAME
+		s.NAME,
+		    c.cart_type,
 		from shop_shopping_cart c
 		LEFT JOIN shop_product p ON c.cart_product_id = p.id
 		LEFT JOIN shop_sku s ON c.cart_sku_id = s.id
-		LEFT JOIN biz_user u ON c.cart_user_id = u.open_id
+		LEFT JOIN sys_vip_info u ON c.cart_user_id = u.id
 		<where>
 		  <include refid="where_sql"></include>
 		 </where>
@@ -291,7 +300,7 @@
 	from shop_shopping_cart c
 		LEFT JOIN shop_product p ON c.cart_product_id = p.id
 		LEFT JOIN shop_sku s ON c.cart_sku_id = s.id
-		LEFT JOIN biz_user u ON c.cart_user_id = u.open_id
+		LEFT JOIN sys_vip_info u ON c.cart_user_id = u.id
 		<where>
 		   <include refid="where_sql"></include>
 		</where>
@@ -325,7 +334,10 @@
 			p.img_pc,
 			p.buy_limit,
 			s.NAME,
-			s.stock
+			s.stock,
+			s.score_count,
+			s.score_price,
+		       c.cart_type
 		from shop_shopping_cart c
 		LEFT JOIN shop_product p ON c.cart_product_id = p.id
 		LEFT JOIN shop_sku s ON c.cart_sku_id = s.id
@@ -349,9 +361,9 @@
 
 	<!-- 统计用户购物车数量 -->
 	<select id="selectUserCartCount" resultType="java.lang.Integer" >
-		select sum(cart_number) from shop_shopping_cart  c
+		select ifnull(sum(cart_number),0) from shop_shopping_cart  c
 LEFT JOIN shop_product p on p.id = c.cart_product_id
-where c.shop_Id=#{shopId} and  p.del_flag = 2 and cart_user_id=#{openId};
+where c.shop_Id=#{shopId} and  p.del_flag = 2 and cart_user_id=#{userId}
 	</select>
 
 	<!-- 根据id 锁表查询-->
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopSkuDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopSkuDao.xml
index 0e5d2a5..13a8e2e 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopSkuDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopSkuDao.xml
@@ -22,6 +22,11 @@
         <result property="sealCount" column="seal_count"/>
         <result property="stockCode" column="stock_code"/>
         <result property="shopId" column="shop_id"/>
+        <result property="selfPrice" column="self_price"/>
+        <result property="sealesPrice" column="seales_price"/>
+        <result property="invitationPrice" column="invitation_price"/>
+        <result property="scorePrice" column="score_price"/>
+        <result property="scoreCount" column="score_count"/>
 
 
 
@@ -46,6 +51,11 @@
         <result property="sealCount" column="seal_count"/>
         <result property="stockCode" column="stock_code"/>
         <result property="shopId" column="shop_id"/>
+        <result property="selfPrice" column="self_price"/>
+        <result property="sealesPrice" column="seales_price"/>
+        <result property="invitationPrice" column="invitation_price"/>
+        <result property="scorePrice" column="score_price"/>
+        <result property="scoreCount" column="score_count"/>
     </resultMap>
 
     <!-- 字段sql -->
@@ -66,7 +76,14 @@
 			purchase_price,
 			seal_count,
 			stock_code,
-			shop_id
+			shop_id,
+self_price,
+seales_price,
+invitation_price,
+        score_price,
+score_count
+
+
 	</sql>
 
     <!-- 属性sql -->
@@ -87,7 +104,13 @@
 			#{item.purchasePrice},
 			#{item.sealCount},
 			#{item.stockCode},
-			#{item.shopId}
+			#{item.shopId},
+			#{item.selfPrice},
+			#{item.sealesPrice},
+			#{item.invitationPrice},
+			#{item.scorePrice},
+			#{item.scoreCount}
+
 
 	</sql>
 
@@ -128,6 +151,18 @@
             <if test="(record.shopId!=null and record.shopId!='') or  (record.shopId!='' and record.shopId==0)  ">
                 and shop_id = #{record.shopId}
             </if>
+
+            <if test="(record.scorePrice!=null and record.scorePrice!='') or  (record.scorePrice!='' and record.scorePrice==0)  ">
+                and score_price = #{record.scorePrice}
+            </if>
+
+
+            <if test="(record.scoreCount!=null and record.scoreCount!='') or  (record.scoreCount!='' and record.scoreCount==0)  ">
+                and score_count = #{record.scoreCount}
+            </if>
+
+
+
         </if>
 
     </sql>
@@ -188,6 +223,26 @@
             <if test="_parameter.containsKey('stockCode')">
                 stock_code = #{stockCode},
             </if>
+            <if test="_parameter.containsKey('invitationPrice')">
+                invitation_price = #{invitationPrice},
+            </if>
+            <if test="_parameter.containsKey('sealesPrice')">
+                seales_price = #{sealesPrice},
+            </if>
+
+            <if test="_parameter.containsKey('scorePrice')">
+                score_price = #{scorePrice},
+            </if>
+
+            <if test="_parameter.containsKey('scoreCount')">
+                score_count = #{scoreCount},
+            </if>
+
+            <if test="_parameter.containsKey('selfPrice')">
+                self_price = #{selfPrice},
+            </if>
+
+
         </set>
         WHERE id=#{id}
     </update>
@@ -231,6 +286,24 @@
             <if test="record.stockCode != null ">
                 stock_code = #{record.stockCode},
             </if>
+            <if test="record.sealesPrice != null ">
+                seales_price = #{record.sealesPrice},
+            </if>
+            <if test="record.invitationPrice != null ">
+                invitation_price = #{record.invitationPrice},
+            </if>
+
+            <if test="record.scorePrice != null ">
+                score_price = #{record.scorePrice},
+            </if>
+
+            <if test="record.scoreCount != null ">
+                score_count = #{record.scoreCount},
+            </if>
+
+            <if test="record.selfPrice != null ">
+                self_price = #{record.selfPrice},
+            </if>
 
 
         </set>
diff --git a/zq-erp/src/main/resources/readme-jyy b/zq-erp/src/main/resources/readme-jyy
new file mode 100644
index 0000000..a6787a0
--- /dev/null
+++ b/zq-erp/src/main/resources/readme-jyy
@@ -0,0 +1,11 @@
+删除
+cardCash
+projCash
+只留下
+goodsCash
+产品现金业绩和划扣业绩consume
+
+重构订单,收款,退款等方法不要共用逻辑
+
+把所有历史订单的订单类型区分销售订单和退款订单
+
diff --git a/zq-erp/src/main/resources/static/demoPage/soketLoginTest.html b/zq-erp/src/main/resources/static/demoPage/soketLoginTest.html
new file mode 100644
index 0000000..0598c8d
--- /dev/null
+++ b/zq-erp/src/main/resources/static/demoPage/soketLoginTest.html
@@ -0,0 +1,138 @@
+<!DOCTYPE html>
+<html xmlns:th="http://www.thymeleaf.org">
+<head>
+    <meta charset="utf-8">
+    <!-- 启用360浏览器的极速模式(webkit) -->
+    <meta name="renderer" content="webkit">
+    <meta name="viewport"
+          content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+    <title>soketTest</title>
+    <link th:href="@{/images/}"
+          rel="SHORTCUT ICON">
+    <meta name="keywords"
+          content=""/>
+    <meta name="description"
+          content=""/>
+    <style type="text/css">
+        .row > div:nth-child(1) {
+            background: url(../../images/login-title.jpg) no-repeat;
+            background-size: 100% 100%;
+            height: 380px;
+        }
+
+        .row > div:nth-child(2) {
+            background: #fff;
+            height: 380px;
+        }
+        .download-bar {
+            margin-top: 15px;
+            color: #fff;
+        }
+
+        .download-bar a {
+            color: #fff;
+            margin: 0 5px;
+        }
+
+        .download-bar a:hover {
+            text-decoration: underline;
+            color: #fff;
+        }
+    </style>
+    <script>
+        var isoldIE = false;
+        if (navigator.userAgent.indexOf("MSIE") > 0) {
+            if (navigator.userAgent.indexOf("MSIE 6.0") > 0
+                || navigator.userAgent.indexOf("MSIE 7.0") > 0
+                || avigator.userAgent.indexOf("MSIE 8.0") > 0) {
+                isoldIE = true;
+            }
+        }
+        if (window.top !== window.self) {
+            window.top.location = window.location
+        }
+        ;
+    </script>
+    <script type="text/javascript"
+            th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+    <script type="text/javascript" th:src="@{/js/systools/MBase.js}"></script>
+    <link th:href="@{/css/styleOne/login.min.css}" rel="stylesheet">
+
+</head>
+
+<body  >
+<h3>hello socket</h3>
+<p>【sendMsg】:<div><input style="width: 700px;" id="sendMsg" name="sendMsg" type="text" value='{ "webClientId":"123", "loginQrCodeKey":"1231" "appUserId":"1010","msgType":"1","loginOperation":"1"}';></div>
+<p>
+</p>
+
+
+<p>操作:<div><button onclick="openSocket()">开启socket</button></div>
+<p>【操作】:<div><button onclick="sendMessage()">发送消息</button></div>
+<p>【操作】:<div><button onclick="colseSocket()">关闭连接</button></div>
+</body>
+<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
+    <script>
+
+        var socket;
+        function openSocket() {
+            if(typeof(WebSocket) == "undefined") {
+                console.log("您的浏览器不支持WebSocket");
+            }else{
+                console.log("您的浏览器支持WebSocket");
+                //实现化WebSocket对象,指定要连接的服务器地址与端口  建立连接
+
+                //var socketUrl="ws://test.hive.jyymatrix.cc/webSocketServer?userId=123";
+                var socketUrl="ws://192.168.0.6:8080/webSocketServer?userId=123";
+                console.log(socketUrl);
+                if(socket!=null){
+                    socket.close();
+                    socket=null;
+                }
+                socket = new WebSocket(socketUrl);
+                //打开事件
+                socket.onopen = function() {
+                    console.log("websocket已打开");
+                    //socket.send("这是来自客户端的消息" + location.href + new Date());
+                };
+                //获得消息事件
+                socket.onmessage = function(msg) {
+				console.log("获得消息:"+msg);
+                    var serverMsg =  msg.data;
+                    console.log(serverMsg);
+
+                };
+                //关闭事件
+                socket.onclose = function() {
+                    console.log("websocket已关闭");
+                };
+                //发生了错误事件
+                socket.onerror = function() {
+                    console.log("websocket发生了错误");
+                }
+            }
+        }
+
+        function sendMessage() {
+            if(typeof(WebSocket) == "undefined") {
+                console.log("您的浏览器不支持WebSocket");
+            }else {
+                // console.log("您的浏览器支持WebSocket");
+                var sendMsg = document.getElementById('sendMsg').value;
+                //var msg = '{ "webClientId":"'+webClientId+'","appUserId":"'+appUserId+'"}';
+                console.log("发送消息"+sendMsg);
+                socket.send(sendMsg);
+					
+            }
+        }
+        function colseSocket() {
+            if(typeof(WebSocket) == "undefined") {
+                console.log("您的浏览器不支持WebSocket");
+            }else {
+                socket.close();
+            }
+        }
+    </script>
+
+
+</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/static/demoPage/soketTest.html b/zq-erp/src/main/resources/static/demoPage/soketTest.html
index 4e4b932..d2f6b24 100644
--- a/zq-erp/src/main/resources/static/demoPage/soketTest.html
+++ b/zq-erp/src/main/resources/static/demoPage/soketTest.html
@@ -87,7 +87,7 @@
                 console.log("您的浏览器支持WebSocket");
                 //实现化WebSocket对象,指定要连接的服务器地址与端口  建立连接
                 var userId = document.getElementById('userId').value;
-                var socketUrl="ws://192.168.111.175:8091/webSocketServer?userId="+userId;
+                var socketUrl="ws://localhost:8080/webSocketServer?userId="+userId;
                 console.log(socketUrl);
                 if(socket!=null){
                     socket.close();
diff --git a/zq-erp/src/main/resources/static/images/dui.png b/zq-erp/src/main/resources/static/images/dui.png
new file mode 100644
index 0000000..fa086b7
--- /dev/null
+++ b/zq-erp/src/main/resources/static/images/dui.png
Binary files differ
diff --git a/zq-erp/src/main/resources/static/images/pc.png b/zq-erp/src/main/resources/static/images/pc.png
new file mode 100644
index 0000000..7787899
--- /dev/null
+++ b/zq-erp/src/main/resources/static/images/pc.png
Binary files differ
diff --git a/zq-erp/src/main/resources/static/images/qrcode.png b/zq-erp/src/main/resources/static/images/qrcode.png
new file mode 100644
index 0000000..1d5d2fc
--- /dev/null
+++ b/zq-erp/src/main/resources/static/images/qrcode.png
Binary files differ
diff --git a/zq-erp/src/main/resources/static/images/qrcodeBack.png b/zq-erp/src/main/resources/static/images/qrcodeBack.png
new file mode 100644
index 0000000..2dd3faf
--- /dev/null
+++ b/zq-erp/src/main/resources/static/images/qrcodeBack.png
Binary files differ
diff --git a/zq-erp/src/main/resources/static/js/function/vip.js b/zq-erp/src/main/resources/static/js/function/vip.js
index 06e6fd5..c0fa8b9 100644
--- a/zq-erp/src/main/resources/static/js/function/vip.js
+++ b/zq-erp/src/main/resources/static/js/function/vip.js
@@ -73,7 +73,6 @@
             $("#levelName").html(loj.getString(0, "vipLevel.levelName"));
 
             vipId = loj.getString(0, "id");
-            updateHistory();
             if (isActive) {
                 $(".isActive").removeAttr("disabled");
                 isActive = false;
@@ -83,25 +82,7 @@
     }
 }
 
-/**
- * 更新最近查询客户
- */
-function updateHistory() {
-    $
-        .AjaxProxy()
-        .invoke(
-            basePath + "/admin/showHistoryUser",
-            function (loj) {
-                var html = "";
-                for (var i = 0; i < loj.getRowCount(); i++) {
-                    html += "<li class='list-group-item'onclick='selectHistory(\""
-                        + loj.getString(i, "phone")
-                        + "\")' >"
-                        + loj.getString(i, "vipName") + "</li>";
-                }
-                $("#historyList").html(html);
-            });
-}
+
 
 /*
  * 点击切换最近查询用户
@@ -125,7 +106,7 @@
         title: "修改预约排班",
         maxmin: true,
         area: [MUI.SIZE_L, '500px'],
-        content: [basePath + '/admin/projService/yypb?pageFlae=1&id=' + id]
+        content: [basePath + '/admin/projService/yypb?pageFlae=2&id=' + id]
     }));
 }
 
@@ -222,13 +203,13 @@
 }
 
 
-function openAddService() {
+function openAddService(id) {
     layer.full(layer.open({
         type: 2,
         title: "添加服务单",
         maxmin: true,
         area: [MUI.SIZE_L, '500px'],
-        content: [basePath + '/admin/redirect/hive/beautySalon/servicceAddForm']
+        content: [basePath + '/admin/redirect/hive/beautySalon/servicceAddForm?id='+id]
     }));
 }
 
diff --git a/zq-erp/src/main/resources/static/js/plugin/qrcode.js b/zq-erp/src/main/resources/static/js/plugin/qrcode.js
new file mode 100644
index 0000000..1b31fb1
--- /dev/null
+++ b/zq-erp/src/main/resources/static/js/plugin/qrcode.js
@@ -0,0 +1,614 @@
+/**
+ * @fileoverview
+ * - Using the 'QRCode for Javascript library'
+ * - Fixed dataset of 'QRCode for Javascript library' for support full-spec.
+ * - this library has no dependencies.
+ *
+ * @author davidshimjs
+ * @see <a href="http://www.d-project.com/" target="_blank">http://www.d-project.com/</a>
+ * @see <a href="http://jeromeetienne.github.com/jquery-qrcode/" target="_blank">http://jeromeetienne.github.com/jquery-qrcode/</a>
+ */
+var QRCode;
+
+(function () {
+    //---------------------------------------------------------------------
+    // QRCode for JavaScript
+    //
+    // Copyright (c) 2009 Kazuhiko Arase
+    //
+    // URL: http://www.d-project.com/
+    //
+    // Licensed under the MIT license:
+    //   http://www.opensource.org/licenses/mit-license.php
+    //
+    // The word "QR Code" is registered trademark of
+    // DENSO WAVE INCORPORATED
+    //   http://www.denso-wave.com/qrcode/faqpatent-e.html
+    //
+    //---------------------------------------------------------------------
+    function QR8bitByte(data) {
+        this.mode = QRMode.MODE_8BIT_BYTE;
+        this.data = data;
+        this.parsedData = [];
+
+        // Added to support UTF-8 Characters
+        for (var i = 0, l = this.data.length; i < l; i++) {
+            var byteArray = [];
+            var code = this.data.charCodeAt(i);
+
+            if (code > 0x10000) {
+                byteArray[0] = 0xF0 | ((code & 0x1C0000) >>> 18);
+                byteArray[1] = 0x80 | ((code & 0x3F000) >>> 12);
+                byteArray[2] = 0x80 | ((code & 0xFC0) >>> 6);
+                byteArray[3] = 0x80 | (code & 0x3F);
+            } else if (code > 0x800) {
+                byteArray[0] = 0xE0 | ((code & 0xF000) >>> 12);
+                byteArray[1] = 0x80 | ((code & 0xFC0) >>> 6);
+                byteArray[2] = 0x80 | (code & 0x3F);
+            } else if (code > 0x80) {
+                byteArray[0] = 0xC0 | ((code & 0x7C0) >>> 6);
+                byteArray[1] = 0x80 | (code & 0x3F);
+            } else {
+                byteArray[0] = code;
+            }
+
+            this.parsedData.push(byteArray);
+        }
+
+        this.parsedData = Array.prototype.concat.apply([], this.parsedData);
+
+        if (this.parsedData.length != this.data.length) {
+            this.parsedData.unshift(191);
+            this.parsedData.unshift(187);
+            this.parsedData.unshift(239);
+        }
+    }
+
+    QR8bitByte.prototype = {
+        getLength: function (buffer) {
+            return this.parsedData.length;
+        },
+        write: function (buffer) {
+            for (var i = 0, l = this.parsedData.length; i < l; i++) {
+                buffer.put(this.parsedData[i], 8);
+            }
+        }
+    };
+
+    function QRCodeModel(typeNumber, errorCorrectLevel) {
+        this.typeNumber = typeNumber;
+        this.errorCorrectLevel = errorCorrectLevel;
+        this.modules = null;
+        this.moduleCount = 0;
+        this.dataCache = null;
+        this.dataList = [];
+    }
+
+    QRCodeModel.prototype={addData:function(data){var newData=new QR8bitByte(data);this.dataList.push(newData);this.dataCache=null;},isDark:function(row,col){if(row<0||this.moduleCount<=row||col<0||this.moduleCount<=col){throw new Error(row+","+col);}
+            return this.modules[row][col];},getModuleCount:function(){return this.moduleCount;},make:function(){this.makeImpl(false,this.getBestMaskPattern());},makeImpl:function(test,maskPattern){this.moduleCount=this.typeNumber*4+17;this.modules=new Array(this.moduleCount);for(var row=0;row<this.moduleCount;row++){this.modules[row]=new Array(this.moduleCount);for(var col=0;col<this.moduleCount;col++){this.modules[row][col]=null;}}
+            this.setupPositionProbePattern(0,0);this.setupPositionProbePattern(this.moduleCount-7,0);this.setupPositionProbePattern(0,this.moduleCount-7);this.setupPositionAdjustPattern();this.setupTimingPattern();this.setupTypeInfo(test,maskPattern);if(this.typeNumber>=7){this.setupTypeNumber(test);}
+            if(this.dataCache==null){this.dataCache=QRCodeModel.createData(this.typeNumber,this.errorCorrectLevel,this.dataList);}
+            this.mapData(this.dataCache,maskPattern);},setupPositionProbePattern:function(row,col){for(var r=-1;r<=7;r++){if(row+r<=-1||this.moduleCount<=row+r)continue;for(var c=-1;c<=7;c++){if(col+c<=-1||this.moduleCount<=col+c)continue;if((0<=r&&r<=6&&(c==0||c==6))||(0<=c&&c<=6&&(r==0||r==6))||(2<=r&&r<=4&&2<=c&&c<=4)){this.modules[row+r][col+c]=true;}else{this.modules[row+r][col+c]=false;}}}},getBestMaskPattern:function(){var minLostPoint=0;var pattern=0;for(var i=0;i<8;i++){this.makeImpl(true,i);var lostPoint=QRUtil.getLostPoint(this);if(i==0||minLostPoint>lostPoint){minLostPoint=lostPoint;pattern=i;}}
+            return pattern;},createMovieClip:function(target_mc,instance_name,depth){var qr_mc=target_mc.createEmptyMovieClip(instance_name,depth);var cs=1;this.make();for(var row=0;row<this.modules.length;row++){var y=row*cs;for(var col=0;col<this.modules[row].length;col++){var x=col*cs;var dark=this.modules[row][col];if(dark){qr_mc.beginFill(0,100);qr_mc.moveTo(x,y);qr_mc.lineTo(x+cs,y);qr_mc.lineTo(x+cs,y+cs);qr_mc.lineTo(x,y+cs);qr_mc.endFill();}}}
+            return qr_mc;},setupTimingPattern:function(){for(var r=8;r<this.moduleCount-8;r++){if(this.modules[r][6]!=null){continue;}
+            this.modules[r][6]=(r%2==0);}
+            for(var c=8;c<this.moduleCount-8;c++){if(this.modules[6][c]!=null){continue;}
+                this.modules[6][c]=(c%2==0);}},setupPositionAdjustPattern:function(){var pos=QRUtil.getPatternPosition(this.typeNumber);for(var i=0;i<pos.length;i++){for(var j=0;j<pos.length;j++){var row=pos[i];var col=pos[j];if(this.modules[row][col]!=null){continue;}
+            for(var r=-2;r<=2;r++){for(var c=-2;c<=2;c++){if(r==-2||r==2||c==-2||c==2||(r==0&&c==0)){this.modules[row+r][col+c]=true;}else{this.modules[row+r][col+c]=false;}}}}}},setupTypeNumber:function(test){var bits=QRUtil.getBCHTypeNumber(this.typeNumber);for(var i=0;i<18;i++){var mod=(!test&&((bits>>i)&1)==1);this.modules[Math.floor(i/3)][i%3+this.moduleCount-8-3]=mod;}
+            for(var i=0;i<18;i++){var mod=(!test&&((bits>>i)&1)==1);this.modules[i%3+this.moduleCount-8-3][Math.floor(i/3)]=mod;}},setupTypeInfo:function(test,maskPattern){var data=(this.errorCorrectLevel<<3)|maskPattern;var bits=QRUtil.getBCHTypeInfo(data);for(var i=0;i<15;i++){var mod=(!test&&((bits>>i)&1)==1);if(i<6){this.modules[i][8]=mod;}else if(i<8){this.modules[i+1][8]=mod;}else{this.modules[this.moduleCount-15+i][8]=mod;}}
+            for(var i=0;i<15;i++){var mod=(!test&&((bits>>i)&1)==1);if(i<8){this.modules[8][this.moduleCount-i-1]=mod;}else if(i<9){this.modules[8][15-i-1+1]=mod;}else{this.modules[8][15-i-1]=mod;}}
+            this.modules[this.moduleCount-8][8]=(!test);},mapData:function(data,maskPattern){var inc=-1;var row=this.moduleCount-1;var bitIndex=7;var byteIndex=0;for(var col=this.moduleCount-1;col>0;col-=2){if(col==6)col--;while(true){for(var c=0;c<2;c++){if(this.modules[row][col-c]==null){var dark=false;if(byteIndex<data.length){dark=(((data[byteIndex]>>>bitIndex)&1)==1);}
+            var mask=QRUtil.getMask(maskPattern,row,col-c);if(mask){dark=!dark;}
+            this.modules[row][col-c]=dark;bitIndex--;if(bitIndex==-1){byteIndex++;bitIndex=7;}}}
+            row+=inc;if(row<0||this.moduleCount<=row){row-=inc;inc=-inc;break;}}}}};QRCodeModel.PAD0=0xEC;QRCodeModel.PAD1=0x11;QRCodeModel.createData=function(typeNumber,errorCorrectLevel,dataList){var rsBlocks=QRRSBlock.getRSBlocks(typeNumber,errorCorrectLevel);var buffer=new QRBitBuffer();for(var i=0;i<dataList.length;i++){var data=dataList[i];buffer.put(data.mode,4);buffer.put(data.getLength(),QRUtil.getLengthInBits(data.mode,typeNumber));data.write(buffer);}
+        var totalDataCount=0;for(var i=0;i<rsBlocks.length;i++){totalDataCount+=rsBlocks[i].dataCount;}
+        if(buffer.getLengthInBits()>totalDataCount*8){throw new Error("code length overflow. ("
+            +buffer.getLengthInBits()
+            +">"
+            +totalDataCount*8
+            +")");}
+        if(buffer.getLengthInBits()+4<=totalDataCount*8){buffer.put(0,4);}
+        while(buffer.getLengthInBits()%8!=0){buffer.putBit(false);}
+        while(true){if(buffer.getLengthInBits()>=totalDataCount*8){break;}
+            buffer.put(QRCodeModel.PAD0,8);if(buffer.getLengthInBits()>=totalDataCount*8){break;}
+            buffer.put(QRCodeModel.PAD1,8);}
+        return QRCodeModel.createBytes(buffer,rsBlocks);};QRCodeModel.createBytes=function(buffer,rsBlocks){var offset=0;var maxDcCount=0;var maxEcCount=0;var dcdata=new Array(rsBlocks.length);var ecdata=new Array(rsBlocks.length);for(var r=0;r<rsBlocks.length;r++){var dcCount=rsBlocks[r].dataCount;var ecCount=rsBlocks[r].totalCount-dcCount;maxDcCount=Math.max(maxDcCount,dcCount);maxEcCount=Math.max(maxEcCount,ecCount);dcdata[r]=new Array(dcCount);for(var i=0;i<dcdata[r].length;i++){dcdata[r][i]=0xff&buffer.buffer[i+offset];}
+        offset+=dcCount;var rsPoly=QRUtil.getErrorCorrectPolynomial(ecCount);var rawPoly=new QRPolynomial(dcdata[r],rsPoly.getLength()-1);var modPoly=rawPoly.mod(rsPoly);ecdata[r]=new Array(rsPoly.getLength()-1);for(var i=0;i<ecdata[r].length;i++){var modIndex=i+modPoly.getLength()-ecdata[r].length;ecdata[r][i]=(modIndex>=0)?modPoly.get(modIndex):0;}}
+        var totalCodeCount=0;for(var i=0;i<rsBlocks.length;i++){totalCodeCount+=rsBlocks[i].totalCount;}
+        var data=new Array(totalCodeCount);var index=0;for(var i=0;i<maxDcCount;i++){for(var r=0;r<rsBlocks.length;r++){if(i<dcdata[r].length){data[index++]=dcdata[r][i];}}}
+        for(var i=0;i<maxEcCount;i++){for(var r=0;r<rsBlocks.length;r++){if(i<ecdata[r].length){data[index++]=ecdata[r][i];}}}
+        return data;};var QRMode={MODE_NUMBER:1<<0,MODE_ALPHA_NUM:1<<1,MODE_8BIT_BYTE:1<<2,MODE_KANJI:1<<3};var QRErrorCorrectLevel={L:1,M:0,Q:3,H:2};var QRMaskPattern={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var QRUtil={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:(1<<10)|(1<<8)|(1<<5)|(1<<4)|(1<<2)|(1<<1)|(1<<0),G18:(1<<12)|(1<<11)|(1<<10)|(1<<9)|(1<<8)|(1<<5)|(1<<2)|(1<<0),G15_MASK:(1<<14)|(1<<12)|(1<<10)|(1<<4)|(1<<1),getBCHTypeInfo:function(data){var d=data<<10;while(QRUtil.getBCHDigit(d)-QRUtil.getBCHDigit(QRUtil.G15)>=0){d^=(QRUtil.G15<<(QRUtil.getBCHDigit(d)-QRUtil.getBCHDigit(QRUtil.G15)));}
+            return((data<<10)|d)^QRUtil.G15_MASK;},getBCHTypeNumber:function(data){var d=data<<12;while(QRUtil.getBCHDigit(d)-QRUtil.getBCHDigit(QRUtil.G18)>=0){d^=(QRUtil.G18<<(QRUtil.getBCHDigit(d)-QRUtil.getBCHDigit(QRUtil.G18)));}
+            return(data<<12)|d;},getBCHDigit:function(data){var digit=0;while(data!=0){digit++;data>>>=1;}
+            return digit;},getPatternPosition:function(typeNumber){return QRUtil.PATTERN_POSITION_TABLE[typeNumber-1];},getMask:function(maskPattern,i,j){switch(maskPattern){case QRMaskPattern.PATTERN000:return(i+j)%2==0;case QRMaskPattern.PATTERN001:return i%2==0;case QRMaskPattern.PATTERN010:return j%3==0;case QRMaskPattern.PATTERN011:return(i+j)%3==0;case QRMaskPattern.PATTERN100:return(Math.floor(i/2)+Math.floor(j/3))%2==0;case QRMaskPattern.PATTERN101:return(i*j)%2+(i*j)%3==0;case QRMaskPattern.PATTERN110:return((i*j)%2+(i*j)%3)%2==0;case QRMaskPattern.PATTERN111:return((i*j)%3+(i+j)%2)%2==0;default:throw new Error("bad maskPattern:"+maskPattern);}},getErrorCorrectPolynomial:function(errorCorrectLength){var a=new QRPolynomial([1],0);for(var i=0;i<errorCorrectLength;i++){a=a.multiply(new QRPolynomial([1,QRMath.gexp(i)],0));}
+            return a;},getLengthInBits:function(mode,type){if(1<=type&&type<10){switch(mode){case QRMode.MODE_NUMBER:return 10;case QRMode.MODE_ALPHA_NUM:return 9;case QRMode.MODE_8BIT_BYTE:return 8;case QRMode.MODE_KANJI:return 8;default:throw new Error("mode:"+mode);}}else if(type<27){switch(mode){case QRMode.MODE_NUMBER:return 12;case QRMode.MODE_ALPHA_NUM:return 11;case QRMode.MODE_8BIT_BYTE:return 16;case QRMode.MODE_KANJI:return 10;default:throw new Error("mode:"+mode);}}else if(type<41){switch(mode){case QRMode.MODE_NUMBER:return 14;case QRMode.MODE_ALPHA_NUM:return 13;case QRMode.MODE_8BIT_BYTE:return 16;case QRMode.MODE_KANJI:return 12;default:throw new Error("mode:"+mode);}}else{throw new Error("type:"+type);}},getLostPoint:function(qrCode){var moduleCount=qrCode.getModuleCount();var lostPoint=0;for(var row=0;row<moduleCount;row++){for(var col=0;col<moduleCount;col++){var sameCount=0;var dark=qrCode.isDark(row,col);for(var r=-1;r<=1;r++){if(row+r<0||moduleCount<=row+r){continue;}
+            for(var c=-1;c<=1;c++){if(col+c<0||moduleCount<=col+c){continue;}
+                if(r==0&&c==0){continue;}
+                if(dark==qrCode.isDark(row+r,col+c)){sameCount++;}}}
+            if(sameCount>5){lostPoint+=(3+sameCount-5);}}}
+            for(var row=0;row<moduleCount-1;row++){for(var col=0;col<moduleCount-1;col++){var count=0;if(qrCode.isDark(row,col))count++;if(qrCode.isDark(row+1,col))count++;if(qrCode.isDark(row,col+1))count++;if(qrCode.isDark(row+1,col+1))count++;if(count==0||count==4){lostPoint+=3;}}}
+            for(var row=0;row<moduleCount;row++){for(var col=0;col<moduleCount-6;col++){if(qrCode.isDark(row,col)&&!qrCode.isDark(row,col+1)&&qrCode.isDark(row,col+2)&&qrCode.isDark(row,col+3)&&qrCode.isDark(row,col+4)&&!qrCode.isDark(row,col+5)&&qrCode.isDark(row,col+6)){lostPoint+=40;}}}
+            for(var col=0;col<moduleCount;col++){for(var row=0;row<moduleCount-6;row++){if(qrCode.isDark(row,col)&&!qrCode.isDark(row+1,col)&&qrCode.isDark(row+2,col)&&qrCode.isDark(row+3,col)&&qrCode.isDark(row+4,col)&&!qrCode.isDark(row+5,col)&&qrCode.isDark(row+6,col)){lostPoint+=40;}}}
+            var darkCount=0;for(var col=0;col<moduleCount;col++){for(var row=0;row<moduleCount;row++){if(qrCode.isDark(row,col)){darkCount++;}}}
+            var ratio=Math.abs(100*darkCount/moduleCount/moduleCount-50)/5;lostPoint+=ratio*10;return lostPoint;}};var QRMath={glog:function(n){if(n<1){throw new Error("glog("+n+")");}
+            return QRMath.LOG_TABLE[n];},gexp:function(n){while(n<0){n+=255;}
+            while(n>=256){n-=255;}
+            return QRMath.EXP_TABLE[n];},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(var i=0;i<8;i++){QRMath.EXP_TABLE[i]=1<<i;}
+    for(var i=8;i<256;i++){QRMath.EXP_TABLE[i]=QRMath.EXP_TABLE[i-4]^QRMath.EXP_TABLE[i-5]^QRMath.EXP_TABLE[i-6]^QRMath.EXP_TABLE[i-8];}
+    for(var i=0;i<255;i++){QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]]=i;}
+    function QRPolynomial(num,shift){if(num.length==undefined){throw new Error(num.length+"/"+shift);}
+        var offset=0;while(offset<num.length&&num[offset]==0){offset++;}
+        this.num=new Array(num.length-offset+shift);for(var i=0;i<num.length-offset;i++){this.num[i]=num[i+offset];}}
+    QRPolynomial.prototype={get:function(index){return this.num[index];},getLength:function(){return this.num.length;},multiply:function(e){var num=new Array(this.getLength()+e.getLength()-1);for(var i=0;i<this.getLength();i++){for(var j=0;j<e.getLength();j++){num[i+j]^=QRMath.gexp(QRMath.glog(this.get(i))+QRMath.glog(e.get(j)));}}
+            return new QRPolynomial(num,0);},mod:function(e){if(this.getLength()-e.getLength()<0){return this;}
+            var ratio=QRMath.glog(this.get(0))-QRMath.glog(e.get(0));var num=new Array(this.getLength());for(var i=0;i<this.getLength();i++){num[i]=this.get(i);}
+            for(var i=0;i<e.getLength();i++){num[i]^=QRMath.gexp(QRMath.glog(e.get(i))+ratio);}
+            return new QRPolynomial(num,0).mod(e);}};function QRRSBlock(totalCount,dataCount){this.totalCount=totalCount;this.dataCount=dataCount;}
+    QRRSBlock.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];QRRSBlock.getRSBlocks=function(typeNumber,errorCorrectLevel){var rsBlock=QRRSBlock.getRsBlockTable(typeNumber,errorCorrectLevel);if(rsBlock==undefined){throw new Error("bad rs block @ typeNumber:"+typeNumber+"/errorCorrectLevel:"+errorCorrectLevel);}
+        var length=rsBlock.length/3;var list=[];for(var i=0;i<length;i++){var count=rsBlock[i*3+0];var totalCount=rsBlock[i*3+1];var dataCount=rsBlock[i*3+2];for(var j=0;j<count;j++){list.push(new QRRSBlock(totalCount,dataCount));}}
+        return list;};QRRSBlock.getRsBlockTable=function(typeNumber,errorCorrectLevel){switch(errorCorrectLevel){case QRErrorCorrectLevel.L:return QRRSBlock.RS_BLOCK_TABLE[(typeNumber-1)*4+0];case QRErrorCorrectLevel.M:return QRRSBlock.RS_BLOCK_TABLE[(typeNumber-1)*4+1];case QRErrorCorrectLevel.Q:return QRRSBlock.RS_BLOCK_TABLE[(typeNumber-1)*4+2];case QRErrorCorrectLevel.H:return QRRSBlock.RS_BLOCK_TABLE[(typeNumber-1)*4+3];default:return undefined;}};function QRBitBuffer(){this.buffer=[];this.length=0;}
+    QRBitBuffer.prototype={get:function(index){var bufIndex=Math.floor(index/8);return((this.buffer[bufIndex]>>>(7-index%8))&1)==1;},put:function(num,length){for(var i=0;i<length;i++){this.putBit(((num>>>(length-i-1))&1)==1);}},getLengthInBits:function(){return this.length;},putBit:function(bit){var bufIndex=Math.floor(this.length/8);if(this.buffer.length<=bufIndex){this.buffer.push(0);}
+            if(bit){this.buffer[bufIndex]|=(0x80>>>(this.length%8));}
+            this.length++;}};var QRCodeLimitLength=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];
+
+    function _isSupportCanvas() {
+        return typeof CanvasRenderingContext2D != "undefined";
+    }
+
+    // android 2.x doesn't support Data-URI spec
+    function _getAndroid() {
+        var android = false;
+        var sAgent = navigator.userAgent;
+
+        if (/android/i.test(sAgent)) { // android
+            android = true;
+            var aMat = sAgent.toString().match(/android ([0-9]\.[0-9])/i);
+
+            if (aMat && aMat[1]) {
+                android = parseFloat(aMat[1]);
+            }
+        }
+
+        return android;
+    }
+
+    var svgDrawer = (function() {
+
+        var Drawing = function (el, htOption) {
+            this._el = el;
+            this._htOption = htOption;
+        };
+
+        Drawing.prototype.draw = function (oQRCode) {
+            var _htOption = this._htOption;
+            var _el = this._el;
+            var nCount = oQRCode.getModuleCount();
+            var nWidth = Math.floor(_htOption.width / nCount);
+            var nHeight = Math.floor(_htOption.height / nCount);
+
+            this.clear();
+
+            function makeSVG(tag, attrs) {
+                var el = document.createElementNS('http://www.w3.org/2000/svg', tag);
+                for (var k in attrs)
+                    if (attrs.hasOwnProperty(k)) el.setAttribute(k, attrs[k]);
+                return el;
+            }
+
+            var svg = makeSVG("svg" , {'viewBox': '0 0 ' + String(nCount) + " " + String(nCount), 'width': '100%', 'height': '100%', 'fill': _htOption.colorLight});
+            svg.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink");
+            _el.appendChild(svg);
+
+            svg.appendChild(makeSVG("rect", {"fill": _htOption.colorLight, "width": "100%", "height": "100%"}));
+            svg.appendChild(makeSVG("rect", {"fill": _htOption.colorDark, "width": "1", "height": "1", "id": "template"}));
+
+            for (var row = 0; row < nCount; row++) {
+                for (var col = 0; col < nCount; col++) {
+                    if (oQRCode.isDark(row, col)) {
+                        var child = makeSVG("use", {"x": String(col), "y": String(row)});
+                        child.setAttributeNS("http://www.w3.org/1999/xlink", "href", "#template")
+                        svg.appendChild(child);
+                    }
+                }
+            }
+        };
+        Drawing.prototype.clear = function () {
+            while (this._el.hasChildNodes())
+                this._el.removeChild(this._el.lastChild);
+        };
+        return Drawing;
+    })();
+
+    var useSVG = document.documentElement.tagName.toLowerCase() === "svg";
+
+    // Drawing in DOM by using Table tag
+    var Drawing = useSVG ? svgDrawer : !_isSupportCanvas() ? (function () {
+        var Drawing = function (el, htOption) {
+            this._el = el;
+            this._htOption = htOption;
+        };
+
+        /**
+         * Draw the QRCode
+         *
+         * @param {QRCode} oQRCode
+         */
+        Drawing.prototype.draw = function (oQRCode) {
+            var _htOption = this._htOption;
+            var _el = this._el;
+            var nCount = oQRCode.getModuleCount();
+            var nWidth = Math.floor(_htOption.width / nCount);
+            var nHeight = Math.floor(_htOption.height / nCount);
+            var aHTML = ['<table style="border:0;border-collapse:collapse;">'];
+
+            for (var row = 0; row < nCount; row++) {
+                aHTML.push('<tr>');
+
+                for (var col = 0; col < nCount; col++) {
+                    aHTML.push('<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:' + nWidth + 'px;height:' + nHeight + 'px;background-color:' + (oQRCode.isDark(row, col) ? _htOption.colorDark : _htOption.colorLight) + ';"></td>');
+                }
+
+                aHTML.push('</tr>');
+            }
+
+            aHTML.push('</table>');
+            _el.innerHTML = aHTML.join('');
+
+            // Fix the margin values as real size.
+            var elTable = _el.childNodes[0];
+            var nLeftMarginTable = (_htOption.width - elTable.offsetWidth) / 2;
+            var nTopMarginTable = (_htOption.height - elTable.offsetHeight) / 2;
+
+            if (nLeftMarginTable > 0 && nTopMarginTable > 0) {
+                elTable.style.margin = nTopMarginTable + "px " + nLeftMarginTable + "px";
+            }
+        };
+
+        /**
+         * Clear the QRCode
+         */
+        Drawing.prototype.clear = function () {
+            this._el.innerHTML = '';
+        };
+
+        return Drawing;
+    })() : (function () { // Drawing in Canvas
+        function _onMakeImage() {
+            this._elImage.src = this._elCanvas.toDataURL("image/png");
+            this._elImage.style.display = "block";
+            this._elCanvas.style.display = "none";
+        }
+
+        // Android 2.1 bug workaround
+        // http://code.google.com/p/android/issues/detail?id=5141
+        if (this._android && this._android <= 2.1) {
+            var factor = 1 / window.devicePixelRatio;
+            var drawImage = CanvasRenderingContext2D.prototype.drawImage;
+            CanvasRenderingContext2D.prototype.drawImage = function (image, sx, sy, sw, sh, dx, dy, dw, dh) {
+                if (("nodeName" in image) && /img/i.test(image.nodeName)) {
+                    for (var i = arguments.length - 1; i >= 1; i--) {
+                        arguments[i] = arguments[i] * factor;
+                    }
+                } else if (typeof dw == "undefined") {
+                    arguments[1] *= factor;
+                    arguments[2] *= factor;
+                    arguments[3] *= factor;
+                    arguments[4] *= factor;
+                }
+
+                drawImage.apply(this, arguments);
+            };
+        }
+
+        /**
+         * Check whether the user's browser supports Data URI or not
+         *
+         * @private
+         * @param {Function} fSuccess Occurs if it supports Data URI
+         * @param {Function} fFail Occurs if it doesn't support Data URI
+         */
+        function _safeSetDataURI(fSuccess, fFail) {
+            var self = this;
+            self._fFail = fFail;
+            self._fSuccess = fSuccess;
+
+            // Check it just once
+            if (self._bSupportDataURI === null) {
+                var el = document.createElement("img");
+                var fOnError = function() {
+                    self._bSupportDataURI = false;
+
+                    if (self._fFail) {
+                        self._fFail.call(self);
+                    }
+                };
+                var fOnSuccess = function() {
+                    self._bSupportDataURI = true;
+
+                    if (self._fSuccess) {
+                        self._fSuccess.call(self);
+                    }
+                };
+
+                el.onabort = fOnError;
+                el.onerror = fOnError;
+                el.onload = fOnSuccess;
+                el.src = "data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="; // the Image contains 1px data.
+                return;
+            } else if (self._bSupportDataURI === true && self._fSuccess) {
+                self._fSuccess.call(self);
+            } else if (self._bSupportDataURI === false && self._fFail) {
+                self._fFail.call(self);
+            }
+        };
+
+        /**
+         * Drawing QRCode by using canvas
+         *
+         * @constructor
+         * @param {HTMLElement} el
+         * @param {Object} htOption QRCode Options
+         */
+        var Drawing = function (el, htOption) {
+            this._bIsPainted = false;
+            this._android = _getAndroid();
+
+            this._htOption = htOption;
+            this._elCanvas = document.createElement("canvas");
+            this._elCanvas.width = htOption.width;
+            this._elCanvas.height = htOption.height;
+            el.appendChild(this._elCanvas);
+            this._el = el;
+            this._oContext = this._elCanvas.getContext("2d");
+            this._bIsPainted = false;
+            this._elImage = document.createElement("img");
+            this._elImage.alt = "Scan me!";
+            this._elImage.style.display = "none";
+            this._el.appendChild(this._elImage);
+            this._bSupportDataURI = null;
+        };
+
+        /**
+         * Draw the QRCode
+         *
+         * @param {QRCode} oQRCode
+         */
+        Drawing.prototype.draw = function (oQRCode) {
+            var _elImage = this._elImage;
+            var _oContext = this._oContext;
+            var _htOption = this._htOption;
+
+            var nCount = oQRCode.getModuleCount();
+            var nWidth = _htOption.width / nCount;
+            var nHeight = _htOption.height / nCount;
+            var nRoundedWidth = Math.round(nWidth);
+            var nRoundedHeight = Math.round(nHeight);
+
+            _elImage.style.display = "none";
+            this.clear();
+
+            for (var row = 0; row < nCount; row++) {
+                for (var col = 0; col < nCount; col++) {
+                    var bIsDark = oQRCode.isDark(row, col);
+                    var nLeft = col * nWidth;
+                    var nTop = row * nHeight;
+                    _oContext.strokeStyle = bIsDark ? _htOption.colorDark : _htOption.colorLight;
+                    _oContext.lineWidth = 1;
+                    _oContext.fillStyle = bIsDark ? _htOption.colorDark : _htOption.colorLight;
+                    _oContext.fillRect(nLeft, nTop, nWidth, nHeight);
+
+                    // 안티 앨리어싱 방지 처리
+                    _oContext.strokeRect(
+                        Math.floor(nLeft) + 0.5,
+                        Math.floor(nTop) + 0.5,
+                        nRoundedWidth,
+                        nRoundedHeight
+                    );
+
+                    _oContext.strokeRect(
+                        Math.ceil(nLeft) - 0.5,
+                        Math.ceil(nTop) - 0.5,
+                        nRoundedWidth,
+                        nRoundedHeight
+                    );
+                }
+            }
+
+            this._bIsPainted = true;
+        };
+
+        /**
+         * Make the image from Canvas if the browser supports Data URI.
+         */
+        Drawing.prototype.makeImage = function () {
+            if (this._bIsPainted) {
+                _safeSetDataURI.call(this, _onMakeImage);
+            }
+        };
+
+        /**
+         * Return whether the QRCode is painted or not
+         *
+         * @return {Boolean}
+         */
+        Drawing.prototype.isPainted = function () {
+            return this._bIsPainted;
+        };
+
+        /**
+         * Clear the QRCode
+         */
+        Drawing.prototype.clear = function () {
+            this._oContext.clearRect(0, 0, this._elCanvas.width, this._elCanvas.height);
+            this._bIsPainted = false;
+        };
+
+        /**
+         * @private
+         * @param {Number} nNumber
+         */
+        Drawing.prototype.round = function (nNumber) {
+            if (!nNumber) {
+                return nNumber;
+            }
+
+            return Math.floor(nNumber * 1000) / 1000;
+        };
+
+        return Drawing;
+    })();
+
+    /**
+     * Get the type by string length
+     *
+     * @private
+     * @param {String} sText
+     * @param {Number} nCorrectLevel
+     * @return {Number} type
+     */
+    function _getTypeNumber(sText, nCorrectLevel) {
+        var nType = 1;
+        var length = _getUTF8Length(sText);
+
+        for (var i = 0, len = QRCodeLimitLength.length; i <= len; i++) {
+            var nLimit = 0;
+
+            switch (nCorrectLevel) {
+                case QRErrorCorrectLevel.L :
+                    nLimit = QRCodeLimitLength[i][0];
+                    break;
+                case QRErrorCorrectLevel.M :
+                    nLimit = QRCodeLimitLength[i][1];
+                    break;
+                case QRErrorCorrectLevel.Q :
+                    nLimit = QRCodeLimitLength[i][2];
+                    break;
+                case QRErrorCorrectLevel.H :
+                    nLimit = QRCodeLimitLength[i][3];
+                    break;
+            }
+
+            if (length <= nLimit) {
+                break;
+            } else {
+                nType++;
+            }
+        }
+
+        if (nType > QRCodeLimitLength.length) {
+            throw new Error("Too long data");
+        }
+
+        return nType;
+    }
+
+    function _getUTF8Length(sText) {
+        var replacedText = encodeURI(sText).toString().replace(/\%[0-9a-fA-F]{2}/g, 'a');
+        return replacedText.length + (replacedText.length != sText ? 3 : 0);
+    }
+
+    /**
+     * @class QRCode
+     * @constructor
+     * @example
+     * new QRCode(document.getElementById("test"), "http://jindo.dev.naver.com/collie");
+     *
+     * @example
+     * var oQRCode = new QRCode("test", {
+     *    text : "http://naver.com",
+     *    width : 128,
+     *    height : 128
+     * });
+     *
+     * oQRCode.clear(); // Clear the QRCode.
+     * oQRCode.makeCode("http://map.naver.com"); // Re-create the QRCode.
+     *
+     * @param {HTMLElement|String} el target element or 'id' attribute of element.
+     * @param {Object|String} vOption
+     * @param {String} vOption.text QRCode link data
+     * @param {Number} [vOption.width=256]
+     * @param {Number} [vOption.height=256]
+     * @param {String} [vOption.colorDark="#000000"]
+     * @param {String} [vOption.colorLight="#ffffff"]
+     * @param {QRCode.CorrectLevel} [vOption.correctLevel=QRCode.CorrectLevel.H] [L|M|Q|H]
+     */
+    QRCode = function (el, vOption) {
+        this._htOption = {
+            width : 256,
+            height : 256,
+            typeNumber : 4,
+            colorDark : "#000000",
+            colorLight : "#ffffff",
+            correctLevel : QRErrorCorrectLevel.H
+        };
+
+        if (typeof vOption === 'string') {
+            vOption	= {
+                text : vOption
+            };
+        }
+
+        // Overwrites options
+        if (vOption) {
+            for (var i in vOption) {
+                this._htOption[i] = vOption[i];
+            }
+        }
+
+        if (typeof el == "string") {
+            el = document.getElementById(el);
+        }
+
+        if (this._htOption.useSVG) {
+            Drawing = svgDrawer;
+        }
+
+        this._android = _getAndroid();
+        this._el = el;
+        this._oQRCode = null;
+        this._oDrawing = new Drawing(this._el, this._htOption);
+
+        if (this._htOption.text) {
+            this.makeCode(this._htOption.text);
+        }
+    };
+
+    /**
+     * Make the QRCode
+     *
+     * @param {String} sText link data
+     */
+    QRCode.prototype.makeCode = function (sText) {
+        this._oQRCode = new QRCodeModel(_getTypeNumber(sText, this._htOption.correctLevel), this._htOption.correctLevel);
+        this._oQRCode.addData(sText);
+        this._oQRCode.make();
+        this._el.title = sText;
+        this._oDrawing.draw(this._oQRCode);
+        this.makeImage();
+    };
+
+    /**
+     * Make the Image from Canvas element
+     * - It occurs automatically
+     * - Android below 3 doesn't support Data-URI spec.
+     *
+     * @private
+     */
+    QRCode.prototype.makeImage = function () {
+        if (typeof this._oDrawing.makeImage == "function" && (!this._android || this._android >= 3)) {
+            this._oDrawing.makeImage();
+        }
+    };
+
+    /**
+     * Clear the QRCode
+     */
+    QRCode.prototype.clear = function () {
+        this._oDrawing.clear();
+    };
+
+    /**
+     * @name QRCode.CorrectLevel
+     */
+    QRCode.CorrectLevel = QRErrorCorrectLevel;
+})();
diff --git a/zq-erp/src/main/resources/static/js/systools/MBase.js b/zq-erp/src/main/resources/static/js/systools/MBase.js
index d754c18..648d3ef 100644
--- a/zq-erp/src/main/resources/static/js/systools/MBase.js
+++ b/zq-erp/src/main/resources/static/js/systools/MBase.js
@@ -5,9 +5,16 @@
  */
 function getRootPath() {
 	var curWwwPath = window.document.location.href;
-	console.log(curWwwPath);
+	let url="";
 	var pathName = window.document.location.pathname;
-	var url=curWwwPath.substring(0, curWwwPath.indexOf(pathName));
+	if(pathName&&pathName!="/"){
+		url= curWwwPath.substring(0, curWwwPath.indexOf(pathName));
+	}else{
+		url= curWwwPath;
+	}
+	console.log(url);
+	return url;
+
 //	if(url.indexOf('localhost')>0){
 //		return url++- pathName.substring(0, pathName.substr(1).indexOf('/') + 1); 
 //		console.log("1"+url);
@@ -16,7 +23,7 @@
 //		return  url+ pathName.substring(0, pathName.substr(1).indexOf('/') + 1); 
 //		console.log("2"+url);
 //	}
-	return url; 
+
 }
 /** 全局路径,代表当前网站的根URL */
 var basePath = getRootPath();
diff --git a/zq-erp/src/main/resources/static/templates/logisticsImport.xls b/zq-erp/src/main/resources/static/templates/logisticsImport.xls
new file mode 100644
index 0000000..4e7e566
--- /dev/null
+++ b/zq-erp/src/main/resources/static/templates/logisticsImport.xls
Binary files differ
diff --git a/zq-erp/src/main/resources/static/templates/vipInfoImport.xls b/zq-erp/src/main/resources/static/templates/vipInfoImport.xls
index 1f0f4c4..78f4a0b 100644
--- a/zq-erp/src/main/resources/static/templates/vipInfoImport.xls
+++ b/zq-erp/src/main/resources/static/templates/vipInfoImport.xls
Binary files differ
diff --git a/zq-erp/src/main/resources/static/templates/vipProjUse.xls b/zq-erp/src/main/resources/static/templates/vipProjUse.xls
index 46f3c7d..845fce5 100644
--- a/zq-erp/src/main/resources/static/templates/vipProjUse.xls
+++ b/zq-erp/src/main/resources/static/templates/vipProjUse.xls
Binary files differ
diff --git a/zq-erp/src/main/resources/templates/views/admin/activity/activity-list.html b/zq-erp/src/main/resources/templates/views/admin/activity/activity-list.html
new file mode 100644
index 0000000..a0a285b
--- /dev/null
+++ b/zq-erp/src/main/resources/templates/views/admin/activity/activity-list.html
@@ -0,0 +1,530 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
+<head>
+    <meta charset="utf-8">
+    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta http-equiv="Cache-Control" content="no-siteapp"/>
+    <!-- 本框架基本脚本和样式 -->
+    <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
+    <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
+    <link rel="stylesheet" th:href="@{/plugin/bootstrap-3.3.5/css/bootstrap.min.css}">
+    <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
+
+    <!-- 富文本编辑器 -->
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/ueditor.config.js}"></script>
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/ueditor.all.js}">
+    </script>
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/lang/zh-cn/zh-cn.js}"></script>
+    <style>
+        .panel-body{
+            overflow: hidden;
+        }
+        .paginationStyle{
+            background: #ffffff;
+            padding: 10px 10px;
+            margin: 0px 0px 10px 0px;
+            text-align: right;
+        }
+    </style>
+</head>
+
+<body>
+<div class="panel-body" id="app" v-cloak>
+    <el-row>
+        <el-row justify="space-between" type="flex">
+                    <el-col>
+                        <el-form ref="form" :model="form" inline >
+                            <el-form-item prop="hdmc" >
+                                <el-input v-model="form.hdmc" placeholder="活动名称"></el-input>
+                            </el-form-item>
+                            <el-form-item label="活动状态" prop="hdzt">
+                                <el-select v-model="form.hdzt" placeholder="活动状态">
+                                    <el-option
+                                            v-for="item in hdztList"
+                                            :key="item.value"
+                                            :label="item.label"
+                                            :value="item.value"
+                                    >
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                            <el-button type="primary" @click="searchFormActivitys" >搜索</el-button>
+                            <el-button @click="resetFormActivitys('form')">重置</el-button>
+                        </el-form>
+                    </el-col>
+                </el-row>
+
+                <el-row class="table-style" >
+                    <el-table ref="multipleTable"
+                              :data="activitysList.rows"
+                              :height="height"
+                              stripe:true
+                              @sort-change="sortChange"
+                              @selection-change="handleSelectionChange">
+                        <el-table-column
+                                type="selection">
+                        </el-table-column>
+                        <el-table-column
+                                prop="actName"
+                                label="活动名称"
+                                show-overflow-tooltip>
+                        </el-table-column>
+                        <el-table-column
+                                prop="actCode"
+                                label="活动编号"
+                                show-overflow-tooltip>
+                        </el-table-column>
+                        <el-table-column
+                                label="活动类型">
+                            <template slot-scope="scope">
+                                <span v-if="scope.row.actType == 1">团购</span>
+                                <span v-if="scope.row.actType == 2">秒杀</span>
+                                <span v-if="scope.row.actType == 3">沙龙</span>
+                                <span v-if="scope.row.actType == 4">每日签到</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                                label="状态">
+                            <template slot-scope="scope">
+
+                                <div v-if="scope.row.actType == 4">
+                                    <span v-if="scope.row.actStatus == 1">未发布</span>
+                                </div>
+                                <div v-if="scope.row.actType != 4">
+                                    <span v-if="scope.row.actStatus == 1">开启</span>
+                                </div>
+                                <div v-if="scope.row.actType == 4">
+                                    <span v-if="scope.row.actStatus == 2">未开始</span>
+                                </div>
+                                <div v-if="scope.row.actType != 4">
+                                    <span v-if="scope.row.actStatus == 2">关闭</span>
+                                </div>
+                                <span v-if="scope.row.actStatus == 3">进行中</span>
+                                <span v-if="scope.row.actStatus == 4">已结束</span>
+                                <span v-if="scope.row.actStatus == 5">已删除</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                                prop="actBeginTime"
+                                label="开始时间"
+                                show-overflow-tooltip>
+                        </el-table-column>
+                        <el-table-column
+                                prop="actEndTime"
+                                label="结束时间"
+                                show-overflow-tooltip>
+                        </el-table-column>
+                        <el-table-column
+                                prop="createBy"
+                                label="创建人"
+                                show-overflow-tooltip>
+                        </el-table-column>
+                        <el-table-column
+                                prop="actRemark"
+                                label="备注"
+                                show-overflow-tooltip>
+                        </el-table-column>
+                        <el-table-column label="操作" width="400">
+                            <template slot-scope="scope">
+                                <el-row style="display:flex;" v-if="scope.row.actType == 4">
+                                    <el-button type="primary" v-if="scope.row.actStatus == 1" size="mini" @click="beReady(scope.row)">发布</el-button>
+                                    <el-button type="primary" v-if="[1,2,3].includes(scope.row.actStatus)" @click="beUpdate(scope.row)" size="mini">修改</el-button>
+                                    <el-button type="primary" v-if="scope.row.actStatus == 3" size="mini">推广</el-button>
+                                    <el-button type="primary" v-if="[3,4,5].includes(scope.row.actStatus)" @click="openSignReceive(scope.row)" size="mini">活动统计</el-button>
+                                    <el-button type="primary" v-if="scope.row.actStatus == 3" @click="beClose(scope.row)" size="mini">关闭</el-button>
+                                    <el-button type="danger" v-if="scope.row.actStatus != 5" size="mini" @click="delRow(scope.row)">删除</el-button>
+                                </el-row>
+                                <el-row style="display:flex;" v-if="scope.row.actType != 4">
+                                    <el-button type="primary" @click="openEdit(scope.row)" size="mini">编辑</el-button>
+                                    <el-button type="primary" @click="activityStatistics(scope.row)" size="mini">活动统计</el-button>
+                                    <el-button type="primary" @click="closeAct(scope.row)" size="mini">关闭</el-button>
+                                    <el-button type="danger" @click="delAct(scope.row)" size="mini">删除</el-button>
+                                </el-row>
+                            </template>
+                        </el-table-column>
+                    </el-table>
+                </el-row>
+                <el-row class="paginationStyle"  >
+                    <el-pagination background
+                                   @size-change="changePageSizeActivitys"
+                                   @current-change="changeCurrentPageActivitys"
+                                   :current-page="activitysList.currentPage"
+                                   :page-sizes="[10, 20, 30, 50]"
+                                   :page-size="activitysList.pageSize"
+                                   layout="total, sizes, prev, pager, next, jumper"
+                                   :total="activitysList.total">
+                    </el-pagination>
+                </el-row>
+    </el-row>
+</div>
+</body>
+<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/bootstrap-3.3.5/js/bootstrap.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/layer/layer.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script>
+
+<script>
+    var app = new Vue({
+        el: '#app',
+        data: {
+            height:'calc(100vh - 200px)',
+            // 条件查询
+            hdztList:[
+                {value:'',label:'全部'},
+                {value:1,label:'未发布'},
+                {value:2,label:'未开始'},
+                {value:3,label:'进行中'},
+                {value:4,label:'已结束'},
+                {value:5,label:'已删除'},
+            ],
+            form:{
+                hdmc:'',
+                hdzt:'',
+                order:'',
+                sort:''
+            },
+            //活动列表
+            activitysList:{
+                rows:[],
+                total:0,
+                pageSize:10,
+                currentPage:1,
+            },
+        },
+        created: function () {
+            this.loadInfo();
+        },
+        mounted: function () {
+        },
+        methods: {
+            //加载分类
+            loadInfo() {
+                let _this = this;
+                _this.loadActivitysList();
+            },
+            //删除
+            delAct(row){
+                let _this = this;
+                _this.$confirm('确认删除活动吗?', '删除', {
+                    distinguishCancelAndClose: true,//设置关闭按钮和不通过按钮的区别
+                    confirmButtonText: '确认',
+                    cancelButtonText: '取消',
+                    type: 'info'
+                }).then(() => {
+                    //通过
+                    let id = row.id;
+                    $.AjaxProxy().invoke(basePath + "/admin/shopActivities/del?keys="+id, function(loj) {
+                        if (loj[0].result.status == '200') {
+                            _this.loadActivitysList();
+                        }
+                    });
+                }).catch(action => {
+                    //不通过
+                    if(action === 'cancel'){
+                        console.log("cancel");
+                    }else{
+                        //关闭按钮
+                        console.log("close");
+                    }
+                });
+            },
+            //关闭
+            closeAct(row){
+                let _this = this;
+                _this.$confirm('确认关闭活动吗?', '关闭', {
+                    distinguishCancelAndClose: true,//设置关闭按钮和不通过按钮的区别
+                    confirmButtonText: '确认',
+                    cancelButtonText: '取消',
+                    type: 'info'
+                }).then(() => {
+                    //通过
+                    let id = row.id;
+                    $.AjaxProxy().invoke(basePath + "/admin/shopActivities/closeAct?id="+id, function(loj) {
+                        if (loj[0].result.status == '200') {
+                            layer.msg(loj[0].result.info, {
+                                icon: 1
+                            });
+                        }
+                    });
+                    _this.loadActivitysList();
+                }).catch(action => {
+                    //不通过
+                    if(action === 'cancel'){
+                        console.log("cancel");
+                    }else{
+                        //关闭按钮
+                        console.log("close");
+                    }
+                });
+            },
+            // 活动统计
+            activityStatistics(row) {
+                let type = row.actType;
+                let id = row.id;
+                let name = row.actName;
+                console.log("-------");
+                if (type == 2) {
+                    layer.full(layer.open({
+                        type : 2,
+                        title : name + "-活动统计",
+                        area : [ MUI.SIZE_L, MUI.SIZE_L ],
+                        maxmin : true,
+                        content : [ basePath+'/admin/redirect/shop/activities/shopActivitiesSecKill-list?id=' + id]
+                    }));
+                }
+
+                if (type == 1) {
+                    layer.full(layer.open({
+                        type : 2,
+                        title : name + "-活动统计",
+                        area : [ MUI.SIZE_L, MUI.SIZE_L ],
+                        maxmin : true,
+                        content : [ basePath+'/admin/redirect/shop/activities/shopActivitiesGroupBuy-list?id=' + id]
+                    }));
+                }
+
+                if (type == 3) {
+                    layer.full(layer.open({
+                        type : 2,
+                        title : name + "-活动统计",
+                        area : [ MUI.SIZE_L, MUI.SIZE_L ],
+                        maxmin : true,
+                        content : [ basePath+'/admin/redirect/shop/activities/shopActivitiesSalon-list?id=' + id]
+                    }));
+                }
+            },
+            //打开编辑界面
+            openEdit(row) {
+                let type = row.actType;
+                let id = row.id;
+                if (type == 1) {
+                    layer.full(layer.open({
+                        type : 2,
+                        title : "编辑拼团",
+                        area : [ MUI.SIZE_L, MUI.SIZE_L ],
+                        maxmin : true,
+                        content : [ basePath+'/admin/redirect/shop/activities/activitiesGroupBuy-form?id=' + id]
+                    }));
+                } else if (type == 2) {
+                    layer.full(layer.open({
+                        type : 2,
+                        title : "编辑秒杀",
+                        area : [ MUI.SIZE_L, MUI.SIZE_L ],
+                        maxmin : true,
+                        content : [ basePath+'/admin/redirect/shop/activities/activitiesSecKill-form?id=' + id]
+                    }));
+                } else if (type == 3) {
+                    layer.full(layer.open({
+                        type : 2,
+                        title : "编辑沙龙",
+                        area : [ MUI.SIZE_L, MUI.SIZE_L ],
+                        maxmin : true,
+                        content : [ basePath+'/admin/redirect/shop/activities/activitiesSalon-form?id=' + id]
+                    }));
+                }
+            },
+            //修改
+            beUpdate(row){
+                layer.full(layer.open({
+                    type: 2,
+                    title: "修改",
+                    maxmin: true,
+                    area: [MUI.SIZE_L, '500px'],
+                    content : [ basePath + '/admin/redirect/activity/activity-sign-update?actId=' + row.id]
+                }));
+            },
+            //活动统计
+            openSignReceive(row){
+                layer.full(layer.open({
+                    type: 2,
+                    title: "活动统计",
+                    maxmin: true,
+                    area: [MUI.SIZE_L, '500px'],
+                    content : [ basePath + '/admin/redirect/activity/activity-sign-receive?actId=' + row.id]
+                }));
+            },
+            //发布
+            beReady(row){
+                let _this = this;
+                let actState = row.actStatus;
+                if(actState !== 1){
+                    this.$notify({
+                        title: '提示',
+                        message: '状态为【未发布】才能发布',
+                        type: 'warning'
+                    });
+                }
+                _this.$confirm('确认发布活动吗?', '发布', {
+                    distinguishCancelAndClose: true,//设置关闭按钮和不通过按钮的区别
+                    confirmButtonText: '确认',
+                    cancelButtonText: '取消',
+                    type: 'info'
+                }).then(() => {
+                    //通过
+                    let id = row.id;
+                    let obj = {
+                        actId: id,
+                    }
+                    AjaxProxy.requst({
+                        app: _this,
+                        data:obj,
+                        url: basePath + '/admin/activitySignAwardSet/beReady',
+                        callback: function (data) {
+                            _this.$message.success(data.info);
+                            _this.loadActivitysList();
+                        }
+                    });
+                }).catch(action => {
+                    //不通过
+                    if(action === 'cancel'){
+                        console.log("cancel");
+                    }else{
+                        //关闭按钮
+                        console.log("close");
+                    }
+                });
+            },
+            //关闭
+            beClose(row){
+                let _this = this;
+                _this.$confirm('确认关闭活动吗?', '关闭', {
+                    distinguishCancelAndClose: true,//设置关闭按钮和不通过按钮的区别
+                    confirmButtonText: '确认',
+                    cancelButtonText: '取消',
+                    type: 'info'
+                }).then(() => {
+                    //通过
+                    let id = row.id;
+                    let obj = {
+                        actId: id,
+                    }
+                    AjaxProxy.requst({
+                        app: _this,
+                        data:obj,
+                        url: basePath + '/admin/activitySignAwardSet/beClose',
+                        callback: function (data) {
+                            _this.$message.success(data.info);
+                            _this.loadActivitysList();
+                        }
+                    });
+                }).catch(action => {
+                    //不通过
+                    if(action === 'cancel'){
+                        console.log("cancel");
+                    }else{
+                        //关闭按钮
+                        console.log("close");
+                    }
+                });
+            },
+            //删除
+            delRow(row){
+                let _this = this;
+                _this.$confirm('确认删除活动吗?', '删除', {
+                    distinguishCancelAndClose: true,//设置关闭按钮和不通过按钮的区别
+                    confirmButtonText: '确认',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    //通过
+                    let id = row.id;
+                    let obj = {
+                        actId: id,
+                    }
+                    AjaxProxy.requst({
+                        app: _this,
+                        data:obj,
+                        url: basePath + '/admin/activitySignAwardSet/delRow',
+                        callback: function (data) {
+                            _this.$message.success(data.info);
+                            _this.loadActivitysList();
+                        }
+                    });
+                }).catch(action => {
+                    //不通过
+                    if(action === 'cancel'){
+                        console.log("cancel");
+                    }else{
+                        //关闭按钮
+                        console.log("close");
+                    }
+                });
+            },
+
+            //--活动列表
+            loadActivitysList() {
+                let _this = this;
+                let data=_this.getRequestParamActivitys();
+                data.pageSize=_this.activitysList.pageSize;
+                data.pageNum=_this.activitysList.currentPage;
+                AjaxProxy.requst({
+                    app: _this,
+                    data:data,
+                    url: basePath + '/admin/activitySignAwardSet/findActivitiesList',
+                    callback: function (data) {
+                        _this.activitysList.rows = data.rows;
+                        _this.activitysList.total = data.total;
+                    }
+                });
+            },//查询参数
+            getRequestParamActivitys(){
+                let _this = this;
+                return   {
+                    hdmc:_this.form.hdmc,
+                    hdzt:_this.form.hdzt,
+                    order:_this.form.order,
+                    sort:_this.form.sort,
+                }
+            },
+            //查询
+            searchFormActivitys:function(){
+                this.activitysList.currentPage=1;
+                this.loadActivitysList();
+            },
+            //重置
+            resetFormActivitys(formName) {
+                this.$refs[formName].resetFields();
+            },
+            changePageSizeActivitys(val) {
+                this.activitysList.pageSize = val;
+                this.loadActivitysList();
+            },
+            changeCurrentPageActivitys(val) {
+                this.activitysList.currentPage = val;
+                this.loadActivitysList();
+            },
+            //排序
+            sortChange:function (column){
+                if(column.order){
+                    if(column.order.indexOf("desc")){
+                        this.form.order="desc";
+                    }else{
+                        this.form.order="asc";
+                    }
+                    this.form.sort=column.prop;
+                    this.loadInfo();
+                }
+            },
+            //选择
+            handleSelectionChange(val) {
+                let _this = this;
+                _this.multipleSelection = val;
+            },
+        }
+    })
+</script>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/activity/activity-market.html b/zq-erp/src/main/resources/templates/views/admin/activity/activity-market.html
new file mode 100644
index 0000000..ea543fc
--- /dev/null
+++ b/zq-erp/src/main/resources/templates/views/admin/activity/activity-market.html
@@ -0,0 +1,169 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
+<head>
+    <meta charset="utf-8">
+    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta http-equiv="Cache-Control" content="no-siteapp"/>
+    <!-- 本框架基本脚本和样式 -->
+    <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
+    <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
+    <link rel="stylesheet" th:href="@{/plugin/bootstrap-3.3.5/css/bootstrap.min.css}">
+    <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
+
+    <!-- 富文本编辑器 -->
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/ueditor.config.js}"></script>
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/ueditor.all.js}">
+    </script>
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/lang/zh-cn/zh-cn.js}"></script>
+    <style>
+
+        .button {
+            padding: 0;
+            float: right;
+        }
+
+        .image {
+            width: 100%;
+            display: block;
+        }
+
+        .clearfix:before,
+        .clearfix:after {
+            display: table;
+            content: "";
+        }
+
+        .clearfix:after {
+            clear: both
+        }
+
+        .box-card {
+            padding: 5px 5px;
+            margin-right: 40px;
+        }
+    </style>
+</head>
+
+<body>
+<div class="panel-body" id="app" v-cloak>
+    <el-row>
+        <el-col :span="4">
+            <el-card class="box-card" :body-style="{ padding: '10px 10px'}">
+                <img src="https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png" class="image">
+                <div style="padding: 5px;">
+                    <span style="padding:5px;font-size: 30px;">每日签到</span>
+                    <div class="bottom clearfix">
+                        <el-button type="primary" class="button" @click="createSign()" round>马上创建</el-button>
+                    </div>
+                </div>
+            </el-card>
+        </el-col>
+        <el-col :span="4">
+            <el-card class="box-card" :body-style="{ padding: '10px 10px'}">
+                <img src="https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png" class="image">
+                <div style="padding: 5px;">
+                    <span style="padding:5px;font-size: 30px;">拼团</span>
+                    <div class="bottom clearfix">
+                        <el-button type="primary" class="button" @click="openAdd(1)" round>马上创建</el-button>
+                    </div>
+                </div>
+            </el-card>
+        </el-col>
+        <el-col :span="4">
+            <el-card class="box-card" :body-style="{ padding: '10px 10px'}">
+                <img src="https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png" class="image">
+                <div style="padding: 5px;">
+                    <span style="padding:5px;font-size: 30px;">秒杀</span>
+                    <div class="bottom clearfix">
+                        <el-button type="primary" class="button" @click="openSecKill()" round>马上创建</el-button>
+                    </div>
+                </div>
+            </el-card>
+        </el-col>
+        <el-col :span="4">
+            <el-card class="box-card" :body-style="{ padding: '10px 10px'}">
+                <img src="https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png" class="image">
+                <div style="padding: 5px;">
+                    <span style="padding:5px;font-size: 30px;">沙龙</span>
+                    <div class="bottom clearfix">
+                        <el-button type="primary" class="button" @click="openSalon()" round>马上创建</el-button>
+                    </div>
+                </div>
+            </el-card>
+        </el-col>
+    </el-row>
+
+</div>
+</body>
+<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/bootstrap-3.3.5/js/bootstrap.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/layer/layer.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script>
+
+<script>
+    var app = new Vue({
+        el: '#app',
+        data: {},
+        created: function () {
+        },
+        methods: {
+            //跳转到设置签到活动
+            createSign(){
+                layer.full(layer.open({
+                    type: 2,
+                    title: "签到管理",
+                    maxmin: true,
+                    area: [MUI.SIZE_L, '500px'],
+                    content : [ basePath + '/admin/redirect/activity/activity-sign']
+                }));
+            },
+            // 打新增拼团界面
+            openAdd(value) {
+                layer.full(layer.open({
+                    type : 2,
+                    title : "新建拼团",
+                    area : [ MUI.SIZE_L, MUI.SIZE_L ],
+                    maxmin : true,
+                    content : [ basePath+'/admin/redirect/shop/activities/activitiesGroupBuy-form']
+                }));
+            },
+
+            // 打开新增秒杀界面
+            openSecKill() {
+                layer.full(layer.open({
+                    type : 2,
+                    title : "新建秒杀",
+                    area : [ MUI.SIZE_L, MUI.SIZE_L ],
+                    maxmin : true,
+                    content : [ basePath+'/admin/redirect/shop/activities/activitiesSecKill-form']
+                }));
+            },
+
+            // 打开新增沙龙界面
+            openSalon() {
+                layer.full(layer.open({
+                    type : 2,
+                    title : "新建秒杀",
+                    area : [ MUI.SIZE_L, MUI.SIZE_L ],
+                    maxmin : true,
+                    content : [ basePath+'/admin/redirect/shop/activities/activitiesSalon-form']
+                }));
+            },
+        }
+    })
+</script>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-logistics-info.html b/zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-logistics-info.html
new file mode 100644
index 0000000..a57d98d
--- /dev/null
+++ b/zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-logistics-info.html
@@ -0,0 +1,336 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
+<head>
+    <meta charset="utf-8">
+    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta http-equiv="Cache-Control" content="no-siteapp"/>
+    <!-- 本框架基本脚本和样式 -->
+    <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
+    <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
+    <link rel="stylesheet" th:href="@{/plugin/bootstrap-3.3.5/css/bootstrap.min.css}">
+    <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
+
+    <style>
+
+        .el-aside {
+            background-color: #fff;
+            color: #333;
+        }
+        .el-main {
+            background-color: #fff;
+            color: #333;
+        }
+        body > .el-container {
+            margin-bottom: 1000px;
+        }
+
+    </style>
+</head>
+
+<body>
+<div class="ibox-content" id="app" v-cloak>
+    <el-container>
+        <el-aside width="50%">
+            <el-row style="padding: 20px">
+                <p class="el-big-title">中奖信息</p>
+            </el-row>
+            <el-row style="margin-top: 10px;">
+                <el-col>
+                    <el-form :model="formSelect">
+                        <el-row>
+                            <el-form-item label="奖品名称:" :label-width="formLabelWidth">
+                                {{formSelect.jpmc}}
+                            </el-form-item>
+                        </el-row>
+                        <el-row style="display:flex;">
+                            <el-col>
+                                <el-form-item label="奖品图片:" :label-width="formLabelWidth">
+                                    {{formSelect.jptp}}
+                                </el-form-item>
+                            </el-col>
+                            <el-col>
+                                <el-form-item label="数量:" :label-width="formLabelWidth">
+                                    {{formSelect.sl}}
+                                </el-form-item>
+                            </el-col>
+                        </el-row>
+                        <el-row style="display:flex;">
+                            <el-col>
+                                <el-form-item label="中奖人:" :label-width="formLabelWidth">
+                                    {{formSelect.zjr}}
+                                </el-form-item>
+                            </el-col>
+                            <el-col>
+                                <el-form-item label="中奖时间:" :label-width="formLabelWidth">
+                                    {{formSelect.zjsj}}
+                                </el-form-item>
+                            </el-col>
+                        </el-row>
+                        <el-row style="display:flex;">
+                            <el-col>
+                                <el-form-item label="活动名称:" :label-width="formLabelWidth">
+                                    {{formSelect.hdmc}}
+                                </el-form-item>
+                            </el-col>
+                            <el-col>
+                                <el-form-item label="活动编号:" :label-width="formLabelWidth">
+                                    {{formSelect.hdbh}}
+                                </el-form-item>
+                            </el-col>
+                        </el-row>
+                        <el-row style="display:flex;">
+                            <el-col>
+                                <el-form-item label="兑奖方式:" :label-width="formLabelWidth">
+                                    <span v-if="formSelect.djfs == 1">线下兑换</span>
+                                    <span v-if="formSelect.djfs == 2">物流配送</span>
+                                    <span v-if="formSelect.djfs == 3">客服兑换</span>
+                                </el-form-item>
+                            </el-col>
+                            <el-col>
+                                <el-form-item label="兑奖时间:" :label-width="formLabelWidth">
+                                    {{formSelect.djsj}}
+                                </el-form-item>
+                            </el-col>
+                        </el-row>
+                    </el-form>
+                </el-col>
+            </el-row>
+            <el-row style="padding: 20px">
+                <p class="el-big-title">收货地址</p>
+            </el-row>
+            <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px">
+                <el-row style="padding: 10px">
+                    <el-col class="col-sm-10" >
+                        <el-form-item label="收货人:" prop="shr">
+                            <el-input v-model="ruleForm.shr" :disabled="(formSelect.state == 3 ? true:false)"></el-input>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row style="padding: 10px">
+                    <el-col class="col-sm-10" >
+                        <el-form-item label="联系电话:" prop="lxdh">
+                            <el-input v-model="ruleForm.lxdh" :disabled="(formSelect.state == 3 ? true:false)"></el-input>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row style="padding: 10px">
+                    <el-col class="col-sm-10" >
+                        <el-form-item label="收货地址:" prop="shdz">
+                            <el-input v-model="ruleForm.shdz" :disabled="(formSelect.state == 3 ? true:false)"></el-input>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+
+                <el-row style="padding: 20px">
+                    <p class="el-big-title">发货信息</p>
+                </el-row>
+                <el-row style="padding: 10px">
+                    <el-col class="col-sm-10" >
+                        <el-form-item label="配送方式:" >
+                            <span>物流配送</span>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row style="padding: 10px">
+                    <el-col class="col-sm-10" >
+                        <el-form-item label="快递公司编码:">
+                            <el-input v-model="ruleForm.kdgs" :disabled="(formSelect.state == 3 ? true:false)"></el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col class="col-sm-10" >
+                        <el-form-item label="快递公司" prop="kdgs">
+                            <el-select v-model="ruleForm.kdgs" :disabled="(formSelect.state == 3 ? true:false)"  placeholder="请选择" filterable>
+                                <el-option v-for="item in logisticsList " :key="item.code" :label="item.name" :value="item.code">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row style="padding: 10px">
+                    <el-col class="col-sm-10" >
+                        <el-form-item label="快递单号:" prop="kddh">
+                            <el-input :disabled="(formSelect.state == 3 ? true:false)" v-model="ruleForm.kddh"></el-input>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row style="padding: 10px">
+                    <el-col class="col-sm-12 text-center">
+                        <el-button type="primary" v-if="formSelect.djfs == 2 && formSelect.state != 3"  @click="dataSubmit('ruleForm')">发货</el-button>
+                        <el-button type="danger" @click="cancelSubmit">关闭</el-button>
+                    </el-col>
+                </el-row>
+            </el-form>
+        </el-aside>
+
+        <el-main width="50%">
+            <el-row>
+                <p class="el-big-title">物流跟踪</p>
+            </el-row>
+
+            <el-row style="padding: 10px">
+                <div class="block">
+                    <el-timeline :reverse="reverse">
+                        <el-timeline-item
+                                v-for="(activity, index) in activities"
+                                :key="index"
+                                :timestamp="activity.timestamp" placement="top">
+                            <el-card>
+                                <p>{{activity.content}}</p>
+                            </el-card>
+                        </el-timeline-item>
+                    </el-timeline>
+                </div>
+            </el-row>
+
+        </el-main>
+
+    </el-container>
+</div>
+</body>
+<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/bootstrap-3.3.5/js/bootstrap.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
+
+<script>
+    var writeoffId = $.query.get("writeoffId");
+    var app = new Vue({
+        el: '#app',
+        data: {
+            formLabelWidth: '120px',
+            //基本信息
+            formSelect: {
+                jpmc: '',
+                jptp: '',
+                sl: '',
+                zjr: '',
+                zjsj: '',
+                hdmc: '',
+                hdbh: '',
+                djfs: '',
+                state: '',
+                djsj: '',
+                consignee: '',
+                consigneePhone: '',
+                consigneeAddress: '',
+            },
+            //物流信息
+            logisticsList:[],
+            ruleForm : {
+                shr:'',
+                lxdh:'',
+                shdz:'',
+                kdgs:'',
+                kddh:'',
+            },
+            //物流跟踪
+            reverse: true,
+            activities: [],
+
+            rules : {
+                shr : [
+                    { required: true, message: '请输入收货人', trigger: 'blur' }
+                ],
+                lxdh : [
+                    { required: true, message: '请输入联系电话', trigger: 'blur' }
+                ],
+                shdz : [
+                    { required: true, message: '请输入收货地址', trigger: 'blur' }
+                ],
+                kdgs : [
+                    { required: true, message: '请选择快递公司', trigger: 'change' }
+                ],
+                kddh : [
+                    { required: true, message: '请输入快递单号', trigger: 'blur' }
+                ],
+            },
+        },
+        created: function () {
+            this.loadInfo();
+            this.getlogisticsList();
+        },
+        mounted: function () {
+        },
+        methods: {
+            //加载分类
+            loadInfo() {
+                let _this = this;
+                //加载配置
+                AjaxProxy.requst({
+                    app: _this,
+                    data: {writeoffId},
+                    url: basePath + '/admin/activitySignWriteoff/findSignWriteoff',
+                    callback: function (data) {
+                        _this.formSelect = data.mapInfo.signWriteoffVo;
+                        _this.activities = data.mapInfo.signWriteoffVo.activities;
+                    }
+                });
+            },
+            // 下拉框数据源---快递公司
+            getlogisticsList() {
+                let _this = this;
+                AjaxProxy.requst({
+                    app: _this,
+                    contentType: 'application/x-www-form-urlencoded',
+                    data:{
+                        type: '快递公司'
+                    },
+                    url: basePath + '/admin/dataDictionary/showDataDictionary',
+                    callback: function (data) {
+                        _this.logisticsList = data.rows;
+                    }
+                });
+            },
+            //发货
+            dataSubmit : function(formName) {
+                const _this = this;
+                let flag = false;
+                _this.$refs[formName].validate((valid) => {
+                    if (!valid) {
+                        flag = true;
+                        return;
+                    }
+                });
+                if (flag) {
+                    return;
+                }
+                let resultData = {
+                    writeoffId : writeoffId,
+                    shr : _this.ruleForm.shr,
+                    lxdh : _this.ruleForm.lxdh,
+                    shdz : _this.ruleForm.shdz,
+                    kdgs : _this.ruleForm.kdgs,
+                    kddh : _this.ruleForm.kddh,
+                }
+                AjaxProxy.requst({
+                    app: _this,
+                    data: resultData,
+                    url: basePath + '/admin/activitySignWriteoff/logisticsSubmit',
+                    callback: function (data) {
+                        _this.$message({
+                            message: data.info,
+                            type: 'success',
+                        });
+                    }
+                });
+            },
+            //关闭
+            cancelSubmit() {
+                this.closeFrame();
+            },
+            closeFrame() {
+                parent.layer.close(parent.layer.getFrameIndex(window.name));
+            },
+        }
+    })
+</script>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-receive.html b/zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-receive.html
new file mode 100644
index 0000000..8c2f2e4
--- /dev/null
+++ b/zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-receive.html
@@ -0,0 +1,281 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
+<head>
+    <meta charset="utf-8">
+    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta http-equiv="Cache-Control" content="no-siteapp"/>
+    <!-- 本框架基本脚本和样式 -->
+    <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
+    <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
+    <link rel="stylesheet" th:href="@{/plugin/bootstrap-3.3.5/css/bootstrap.min.css}">
+    <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
+
+    <!-- 富文本编辑器 -->
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/ueditor.config.js}"></script>
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/ueditor.all.js}">
+    </script>
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/lang/zh-cn/zh-cn.js}"></script>
+    <style>
+        .panel-body{
+            overflow: hidden;
+        }
+        .paginationStyle{
+            background: #ffffff;
+            padding: 10px 10px;
+            margin: 0px 0px 10px 0px;
+            text-align: right;
+        }
+    </style>
+</head>
+
+<body>
+<div class="panel-body" id="app" v-cloak>
+    <el-row>
+        <el-row justify="space-between" type="flex">
+            <el-col>
+                <el-form ref="form" :model="form" inline >
+                    <el-form-item label="用户名称" prop="yhmc" >
+                        <el-input v-model="form.yhmc" placeholder="用户名称"></el-input>
+                    </el-form-item>
+                    <el-form-item prop="qdsj" label="签到时间">
+                        <el-date-picker
+                                v-model="form.qdsj"
+                                type="datetimerange"
+                                :picker-options="pickerOptions"
+                                range-separator="至"
+                                start-placeholder="开始日期"
+                                end-placeholder="结束日期"
+                                align="right">
+                        </el-date-picker>
+                    </el-form-item>
+                    <el-button type="primary" @click="searchFormSignReceive" >搜索</el-button>
+                    <el-button @click="resetFormSignReceive('form')">重置</el-button>
+                </el-form>
+            </el-col>
+        </el-row>
+
+        <el-row class="table-style" >
+            <el-table ref="multipleTable"
+                      :data="signReceiveList.rows"
+                      :height="height"
+                      stripe:true
+                      @sort-change="sortChange"
+                      @selection-change="handleSelectionChange">
+                <el-table-column
+                        type="selection">
+                </el-table-column>
+                <el-table-column
+                        prop="nickName"
+                        label="用户"
+                        show-overflow-tooltip>
+                </el-table-column>
+                <el-table-column
+                        prop="reciveTime"
+                        label="签到时间"
+                        show-overflow-tooltip>
+                </el-table-column>
+                <el-table-column
+                        label="状态"
+                        show-overflow-tooltip>
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.state == 1">待领取</span>
+                        <span v-if="scope.row.state == 2">已领取</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        label="签到类型"
+                        show-overflow-tooltip>
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.awardRule == 1">日常奖励</span>
+                        <span v-if="scope.row.awardRule == 2">累计签到奖励</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        label="连续签到天数"
+                        show-overflow-tooltip>
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.awardRule == 2">{{scope.row.cumulativeDay}}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        label="奖品类型">
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.awardType == 1">自定义礼品</span>
+                        <span v-if="scope.row.awardType == 2">积分</span>
+                        <span v-if="scope.row.awardType == 3">优惠券</span>
+                        <span v-if="scope.row.awardType == 4">店铺商品</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="awardName"
+                        label="获得奖励"
+                        show-overflow-tooltip>
+                </el-table-column>
+            </el-table>
+        </el-row>
+        <el-row class="paginationStyle"  >
+            <el-pagination background
+                           @size-change="changePageSignReceive"
+                           @current-change="changeCurrentPageSignReceive"
+                           :current-page="signReceiveList.currentPage"
+                           :page-sizes="[10, 20, 30, 50]"
+                           :page-size="signReceiveList.pageSize"
+                           layout="total, sizes, prev, pager, next, jumper"
+                           :total="signReceiveList.total">
+            </el-pagination>
+        </el-row>
+    </el-row>
+</div>
+</body>
+<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/bootstrap-3.3.5/js/bootstrap.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/layer/layer.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script>
+
+<script>
+    //获取传输的活动对象
+    var actId = $.query.get("actId");
+
+    var app = new Vue({
+        el: '#app',
+        data: {
+            height:'calc(100vh - 200px)',
+            //--时间选择
+            pickerOptions: {
+                shortcuts: [{
+                    text: '最近一周',
+                    onClick(picker) {
+                        const end = new Date();
+                        const start = new Date();
+                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+                        picker.$emit('pick', [start, end]);
+                    }
+                }, {
+                    text: '最近一个月',
+                    onClick(picker) {
+                        const end = new Date();
+                        const start = new Date();
+                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+                        picker.$emit('pick', [start, end]);
+                    }
+                }, {
+                    text: '最近三个月',
+                    onClick(picker) {
+                        const end = new Date();
+                        const start = new Date();
+                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+                        picker.$emit('pick', [start, end]);
+                    }
+                }]
+            },
+            // 条件查询
+            form:{
+                yhmc:'',
+                qdsj:'',
+                order:'',
+                sort:''
+            },
+            //活动列表
+            signReceiveList:{
+                rows:[],
+                total:0,
+                pageSize:10,
+                currentPage:1,
+            },
+        },
+        created: function () {
+            this.loadInfo();
+        },
+        mounted: function () {
+        },
+        methods: {
+            //加载分类
+            loadInfo() {
+                let _this = this;
+                _this.loadSignReceiveList();
+            },
+            //--列表
+            loadSignReceiveList() {
+                let _this = this;
+                let data=_this.getRequestParamSignReceive();
+                data.pageSize=_this.signReceiveList.pageSize;
+                data.pageNum=_this.signReceiveList.currentPage;
+                AjaxProxy.requst({
+                    app: _this,
+                    data:data,
+                    url: basePath + '/admin/activitySignAwardSet/findSignReceiveList',
+                    callback: function (data) {
+                        _this.signReceiveList.rows = data.rows;
+                        _this.signReceiveList.total = data.total;
+                    }
+                });
+            },//查询参数
+            getRequestParamSignReceive(){
+                let _this = this;
+                let startTime = '';
+                let endTime = '';
+                if(_this.form.qdsj.length > 0){
+                    startTime = _this.form.qdsj[0];
+                    endTime = _this.form.qdsj[1];
+                }
+                return   {
+                    yhmc:_this.form.yhmc,
+                    startTime:startTime,
+                    endTime:endTime,
+                    actId:actId,
+                    order:_this.form.order,
+                    sort:_this.form.sort,
+                }
+            },
+            //查询
+            searchFormSignReceive:function(){
+                this.signReceiveList.currentPage=1;
+                this.loadSignReceiveList();
+            },
+            //重置
+            resetFormSignReceive(formName) {
+                this.$refs[formName].resetFields();
+            },
+            changePageSignReceive(val) {
+                this.signReceiveList.pageSize = val;
+                this.loadSignReceiveList();
+            },
+            changeCurrentPageSignReceive(val) {
+                this.signReceiveList.currentPage = val;
+                this.loadSignReceiveList();
+            },
+            //排序
+            sortChange:function (column){
+                if(column.order){
+                    if(column.order.indexOf("desc")){
+                        this.form.order="desc";
+                    }else{
+                        this.form.order="asc";
+                    }
+                    this.form.sort=column.prop;
+                    this.loadInfo();
+                }
+            },
+            //选择
+            handleSelectionChange(val) {
+                let _this = this;
+                _this.multipleSelection = val;
+            },
+        }
+    })
+</script>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-update.html b/zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-update.html
new file mode 100644
index 0000000..8c6e40b
--- /dev/null
+++ b/zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-update.html
@@ -0,0 +1,1030 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
+<head>
+    <meta charset="utf-8">
+    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta http-equiv="Cache-Control" content="no-siteapp"/>
+    <!-- 本框架基本脚本和样式 -->
+    <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
+    <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
+    <link rel="stylesheet" th:href="@{/plugin/bootstrap-3.3.5/css/bootstrap.min.css}">
+    <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
+
+    <!-- 富文本编辑器 -->
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/ueditor.config.js}"></script>
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/ueditor.all.js}">
+    </script>
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/lang/zh-cn/zh-cn.js}"></script>
+    <style>
+
+        .el-aside {
+            background-color: #D3DCE6;
+            color: #333;
+            text-align: center;
+        }
+        .el-main {
+            background-color: #E9EEF3;
+            color: #333;
+        }
+        body > .el-container {
+            margin-bottom: 1000px;
+        }
+        .button {
+            padding: 5px;
+            text-align: center;
+        }
+
+        .imageOne {
+            display: block;
+            height: 50px;
+            padding: 5px 5px;
+            text-align: center;
+        }
+        .imageTwo {
+            display: block;
+            height: 50px;
+            padding: 5px 5px;
+            text-align: center;
+        }
+        .imageThree {
+            display: block;
+            height: 50px;
+            padding: 5px 5px;
+            text-align: center;
+        }
+
+        .box-card {
+            padding: 5px 5px;
+        }
+
+    </style>
+</head>
+
+<body>
+<div class="panel-body" id="app" v-cloak>
+    <el-form :model="ruleForm" :rules="rules"  class="form-horizontal" id="dataform" ref="ruleForm" label-width="120px">
+
+        <el-container>
+            <el-aside width="30%">
+                <el-card class="box-card" :body-style="{ padding: '10px 10px'}">
+                    <div @click="uploadImg()" class="imageOne">
+                        <img v-if="imageUrlTitle" :src="imageUrlTitle" style="width: 100%;">
+                        <el-button type="primary" v-show="imageUrlTitle == ''" round><span style="font-size: 20px;">标题</span><span style="padding:5px;font-size: 15px;color: red;">(上传图片)</span></span></el-button>
+                    </div>
+                    <div @click="uploadImg()" class="imageTwo" >
+                        <img v-if="imageUrlHead" :src="imageUrlHead" style="width: 100%;">
+                        <el-button type="primary" v-show="imageUrlHead == ''" round><span style="font-size: 20px;">头部</span><span style="padding:5px;font-size: 15px;color: red;">(上传图片)</span></span></el-button>
+                    </div>
+                    <el-row style="display:flex;">
+                        <el-col>
+                            <div style="padding:5px;font-size: 15px;text-align: left;"><span>您已累计签到<span style="color: red;">3</span>天</span></div>
+                        </el-col>
+                        <el-col>
+                            <div style="padding:5px;font-size: 15px;text-align: right;"><span>签到提醒</span></div>
+                        </el-col>
+                    </el-row>
+                    <div @click="uploadImg()">
+                        <el-calendar :range="['2019-03-04', '2019-03-24']"></el-calendar>
+                        <img v-if="imageUrlState" :src="imageUrlState" style="width: 100%;">
+                        <el-button type="primary" v-show="imageUrlState == ''" round><span style="font-size: 20px;">日历签到背景</span><span style="padding:5px;font-size: 15px;color: red;">(上传图片)</span></span></el-button>
+                    </div>
+                    <div @click="uploadImg()" class="imageThree" >
+                        <el-button type="primary" v-show="imageUrlButton == ''" round><span style="font-size: 20px;">签到按钮</span><span style="padding:5px;font-size: 15px;color: red;">(上传图片)</span></span></el-button>
+                        <img v-if="imageUrlButton" :src="imageUrlButton" style="width: 100%;">
+                    </div>
+
+                    <div style="text-align: center;padding: 5px;" @click="gzsmSet()">
+                        <div class="col-sm-8 col-sm-offset-2" style="text-align: left;">
+                            <span style="padding:5px;font-size: 30px;">-- 规则说明--</span>
+                        </div>
+                        <div class="el-col-sm-24" style="text-align: center;">
+                            <span style="padding:5px;font-size: 15px;color: red;">(点击,编辑规则内容,背景颜色,字体颜色、大小、透明度)</span>
+                        </div>
+                        <div class="col-sm-8 col-sm-offset-2" style="text-align: left;">
+                            <span style="padding:5px;font-size: 15px;">1、每天参与签到可获得积分</span>
+                        </div>
+                        <div class="col-sm-8 col-sm-offset-2" style="text-align: left;">
+                            <span style="padding:5px;font-size: 15px;">2、连续签到7天将获得赠送大礼包</span>
+                        </div>
+                        <div class="col-sm-8 col-sm-offset-2" style="text-align: left;">
+                            <span style="padding:5px;font-size: 15px;">3、每7天重新开始计算</span>
+                        </div>
+                    </div>
+                </el-card>
+            </el-aside>
+
+            <el-main width="70%">
+                <div>
+                    <el-tabs v-model="activeName" >
+                        <el-tab-pane label="活动设置" name="first">
+                            <div class="col-sm-8 col-sm-offset-1" style="padding: 10px">
+                                <el-form-item label="活动名称" prop="actName">
+                                    <el-input v-model="ruleForm.actName" placeholder="请输入活动名称"></el-input>
+                                </el-form-item>
+                            </div>
+                            <div class="col-sm-8 col-sm-offset-1" style="padding: 10px">
+                                <el-form-item label="活动编码" prop="actCode">
+                                    <el-input v-model.number="ruleForm.actCode" placeholder="请输入最大开团数量"></el-input>
+                                </el-form-item>
+                            </div>
+                            <div class="col-sm-4 col-sm-offset-1" style="padding: 10px">
+                                <el-form-item label="活动时间" prop="actTime">
+                                    <div class="block">
+                                        <el-date-picker
+                                                v-model="ruleForm.actTime"
+                                                type="daterange"
+                                                range-separator="至"
+                                                start-placeholder="开始日期"
+                                                end-placeholder="结束日期">
+                                        </el-date-picker>
+                                    </div>
+                                </el-form-item>
+                            </div>
+                        </el-tab-pane>
+
+                        <el-tab-pane label="奖品设置" name="second">
+                            <el-row style="display:flex;">
+                                <el-col :span="20">
+                                    <el-tabs v-model="editableTabsValue" type="card" closable @tab-remove="removeTab">
+                                        <el-tab-pane v-for="(item, index) in editableTabs" :key="item.name" :label="item.title" :name="item.name">
+                                            <el-row v-show="editableTabsValue !== '1'">
+                                                <el-form-item label="签到累计天数">
+                                                    <el-input v-model.number="item.content.cumulativeDay" oninput ="value=value.replace(/[^0-9.]/g,'')"></el-input>
+                                                </el-form-item>
+                                            </el-row>
+                                            <el-row>
+                                                <el-form-item label="奖项类型">
+                                                    <el-col>
+                                                        <el-radio-group v-model="item.content.awardType" @change="jxlxChange">
+                                                            <el-radio :label="1">自定义奖品</el-radio>
+                                                            <el-radio :label="2">积分</el-radio>
+                                                            <el-radio :label="3">优惠券</el-radio>
+                                                            <el-radio :label="4">商品</el-radio>
+                                                        </el-radio-group>
+                                                    </el-col>
+                                                </el-form-item >
+                                            </el-row>
+                                            <el-row >
+                                                <el-col>
+                                                    <el-form-item label="奖项名称">
+                                                        <el-input v-model="item.content.awardName" placeholder="奖项名称"></el-input>
+                                                    </el-form-item>
+                                                </el-col>
+                                            </el-row>
+                                            <el-row >
+                                                <el-col>
+                                                    <el-form-item label="图片介绍">
+                                                        <el-upload
+                                                                action="/admin/multipleUploadFile/doUpload"
+                                                                :show-file-list="false"
+                                                                :on-success="introduceImgSuccess">
+                                                            <img v-if="item.content.introduceImg" :src="item.content.introduceImg" style="max-width: 200px;">
+                                                        </el-upload>
+                                                    </el-form-item>
+                                                </el-col>
+                                            </el-row>
+
+                                            <div v-show="item.content.awardType !== 2">
+                                                <el-row style="display:flex;">
+                                                    <el-col>
+                                                        <el-form-item label="奖项库存">
+                                                            <el-input v-model="item.content.awardInventoryCnt" oninput ="value=value.replace(/[^0-9.]/g,'')"></el-input>
+                                                        </el-form-item>
+                                                    </el-col>
+                                                    <el-col>
+                                                        <el-form-item label="已派发">
+                                                            <el-input v-model="item.content.awardDistributeCnt"></el-input>
+                                                        </el-form-item>
+                                                    </el-col>
+                                                </el-row>
+                                            </div>
+                                            <div v-show="item.content.awardType === 1">
+                                                <el-row >
+                                                    <el-col>
+                                                        <el-form-item label="文字介绍">
+                                                            <el-input type="textarea" v-model="item.content.introduceTip"></el-input>
+                                                        </el-form-item>
+                                                    </el-col>
+                                                </el-row>
+                                                <el-row >
+                                                    <el-col>
+                                                        <el-form-item label="兑奖方式">
+                                                            <el-col>
+                                                                <el-radio-group v-model="item.content.awardWay" @change="awardWayChange">
+                                                                    <el-radio :label="1">线下兑换</el-radio>
+                                                                    <el-radio :label="2">物流配送</el-radio>
+                                                                    <el-radio :label="3">客服兑换</el-radio>
+                                                                </el-radio-group>
+                                                            </el-col>
+                                                        </el-form-item >
+                                                    </el-col>
+                                                </el-row>
+                                                <el-row >
+                                                    <el-col>
+                                                        <el-form-item label="操作提示">
+                                                            <el-input v-model="item.content.operationTip"></el-input>
+                                                        </el-form-item>
+                                                    </el-col>
+                                                </el-row>
+                                                <div v-show="item.content.awardWay === 1">
+                                                    <el-row >
+                                                        <el-col>
+                                                            <el-form-item label="兑奖地址">
+                                                                <el-input v-model="item.content.prizeAddress"></el-input>
+                                                            </el-form-item>
+                                                        </el-col>
+                                                    </el-row>
+
+                                                </div>
+                                                <div v-show="item.content.awardWay === 3">
+                                                    <el-row >
+                                                        <el-col>
+                                                            <el-form-item label="客服微信">
+                                                                <el-upload
+                                                                        action="/admin/multipleUploadFile/doUpload"
+                                                                        :show-file-list="false"
+                                                                        :on-success="wechatImgSuccess">
+                                                                    <img v-if="item.content.wechatImg" :src="item.content.wechatImg" style="max-width: 200px;">
+                                                                </el-upload>
+                                                            </el-form-item>
+                                                        </el-col>
+                                                    </el-row>
+                                                </div>
+                                                <div v-show="item.content.awardWay !== 2">
+                                                    <el-row >
+                                                        <el-col>
+                                                            <el-form-item label="兑奖期限">
+                                                                <div class="block">
+                                                                    <el-date-picker
+                                                                            v-model="item.content.prizeTime"
+                                                                            type="daterange"
+                                                                            range-separator="至"
+                                                                            start-placeholder="开始日期"
+                                                                            end-placeholder="结束日期">
+                                                                    </el-date-picker>
+                                                                </div>
+                                                            </el-form-item>
+                                                        </el-col>
+                                                    </el-row>
+                                                </div>
+                                            </div>
+                                            <div v-show="item.content.awardType === 2">
+                                                <el-row >
+                                                    <el-col>
+                                                        <el-form-item label="积分数量">
+                                                            <el-input v-model="item.content.scoreCnt" oninput ="value=value.replace(/[^0-9.]/g,'')"></el-input>
+                                                        </el-form-item>
+                                                    </el-col>
+                                                </el-row>
+                                            </div>
+                                            <div v-show="item.content.awardType === 3">
+                                                <el-row style="display:flex;">
+                                                    <el-col>
+                                                        <el-form-item label="优惠券名称">
+                                                            <el-input v-model="item.content.couponName"></el-input>
+                                                        </el-form-item>
+                                                    </el-col>
+                                                    <el-col>
+                                                        <el-form-item label="优惠券">
+                                                            <el-input v-model="item.content.couponId"></el-input>
+                                                        </el-form-item>
+                                                    </el-col>
+                                                    <el-col>
+                                                        <el-button type="primary" @click="chooseCoupon(item.content.couponName,item.name)">
+                                                            选择优惠券
+                                                        </el-button>
+                                                    </el-col>
+                                                </el-row>
+
+                                                <el-drawer
+                                                        title="选择商城优惠券"
+                                                        :visible.sync="drawerCoupon"
+                                                        :direction="directionCoupon"
+                                                        size="90%">
+                                                    <el-row style="margin-left: 50px;">
+                                                        <el-col :span="24">
+                                                            <el-row>
+                                                                <el-form ref="formCoupon" :model="formCoupon" inline >
+                                                                    <el-form-item prop="yhjmc">
+                                                                        <el-input v-model="formCoupon.yhjmc" placeholder="请输入优惠券名称"></el-input>
+                                                                    </el-form-item>
+                                                                    <el-button type="primary" @click="searchFormCoupon" >搜索</el-button>
+                                                                    <el-button @click="resetFormCoupon('formCoupon')">重置</el-button>
+                                                                </el-form>
+                                                            </el-row>
+
+                                                            <el-row class="table-style" >
+                                                                <el-table ref="multipleTable"
+                                                                          :data="couponList.rows"
+                                                                          :height="tableHeightCoupon"
+                                                                          stripe:true
+                                                                          style="width: 100%">
+                                                                    <el-table-column
+                                                                            prop="cname"
+                                                                            label="优惠券名称"
+                                                                            show-overflow-tooltip>
+                                                                    </el-table-column>
+                                                                    <el-table-column
+                                                                            prop="endTime"
+                                                                            label="截止日期"
+                                                                            show-overflow-tooltip>
+                                                                    </el-table-column>
+                                                                    <el-table-column
+                                                                            prop="address"
+                                                                            label="操作">
+                                                                        <template slot-scope="scope">
+                                                                            <el-button type="primary"
+                                                                                       size="mini"
+                                                                                       @click="chooseOneCoupon(scope.row)">选择
+                                                                            </el-button>
+                                                                        </template>
+                                                                    </el-table-column>
+                                                                </el-table>
+                                                            </el-row>
+                                                            <el-row class="paginationStyle"  >
+                                                                <el-pagination background
+                                                                               @size-change="changePageSizeCoupon"
+                                                                               @current-change="changeCurrentPageCoupon"
+                                                                               :current-page="couponList.currentPage"
+                                                                               :page-sizes="[10, 20, 30, 50]"
+                                                                               :page-size="couponList.pageSize"
+                                                                               layout="total, sizes, prev, pager, next, jumper"
+                                                                               :total="couponList.total">
+                                                                </el-pagination>
+                                                            </el-row>
+                                                        </el-col>
+                                                    </el-row>
+                                                </el-drawer>
+
+                                            </div>
+                                            <div v-show="item.content.awardType === 4">
+                                                <el-row style="display:flex;">
+                                                    <el-col>
+                                                        <el-form-item label="品项名称">
+                                                            <el-input v-model="item.content.goodsName"></el-input>
+                                                        </el-form-item>
+                                                    </el-col>
+                                                    <el-col>
+                                                        <el-form-item label="品项">
+                                                            <el-input v-model="item.content.goodsId"></el-input>
+                                                        </el-form-item>
+                                                    </el-col>
+                                                    <el-col>
+                                                        <el-button type="primary" @click="chooseGoods(item.content.goodsName,item.name)">
+                                                            选择品项
+                                                        </el-button>
+                                                    </el-col>
+                                                </el-row>
+
+                                                <el-drawer
+                                                        title="选择ERP产品"
+                                                        :visible.sync="drawerGoods"
+                                                        :direction="directionGoods"
+                                                        size="90%">
+                                                    <el-row style="margin-left: 50px;">
+                                                        <el-col :span="24">
+                                                            <el-row>
+                                                                <el-form ref="formGoods" :model="formGoods" inline >
+                                                                    <el-form-item prop="cpmc">
+                                                                        <el-input v-model="formGoods.cpmc" placeholder="请输入产品名称"></el-input>
+                                                                    </el-form-item>
+                                                                    <el-button type="primary" @click="searchFormGoods" >搜索</el-button>
+                                                                    <el-button @click="resetFormGoods('formGoods')">重置</el-button>
+                                                                </el-form>
+                                                            </el-row>
+
+                                                            <el-row class="table-style" >
+                                                                <el-table ref="multipleTable"
+                                                                          :data="goodsList.rows"
+                                                                          :height="tableHeightGoods"
+                                                                          stripe:true
+                                                                          style="width: 100%">
+                                                                    <el-table-column
+                                                                            prop="cname"
+                                                                            label="优惠券名称"
+                                                                            show-overflow-tooltip>
+                                                                    </el-table-column>
+                                                                    <el-table-column
+                                                                            prop="endTime"
+                                                                            label="截止日期"
+                                                                            show-overflow-tooltip>
+                                                                    </el-table-column>
+                                                                    <el-table-column
+                                                                            prop="address"
+                                                                            label="操作">
+                                                                        <template slot-scope="scope">
+                                                                            <el-button type="primary"
+                                                                                       size="mini"
+                                                                                       @click="chooseOneGoods(scope.row)">选择
+                                                                            </el-button>
+                                                                        </template>
+                                                                    </el-table-column>
+                                                                </el-table>
+                                                            </el-row>
+                                                            <el-row class="paginationStyle"  >
+                                                                <el-pagination background
+                                                                               @size-change="changePageSizeGoods"
+                                                                               @current-change="changeCurrentPageGoods"
+                                                                               :current-page="goodsList.currentPage"
+                                                                               :page-sizes="[10, 20, 30, 50]"
+                                                                               :page-size="goodsList.pageSize"
+                                                                               layout="total, sizes, prev, pager, next, jumper"
+                                                                               :total="goodsList.total">
+                                                                </el-pagination>
+                                                            </el-row>
+                                                        </el-col>
+                                                    </el-row>
+                                                </el-drawer>
+
+                                            </div>
+                                        </el-tab-pane>
+                                    </el-tabs>
+                                </el-col>
+                                <el-col :span="4">
+                                    <el-button type="primary" @click="addTab(editableTabsValue)">
+                                        新增奖品
+                                    </el-button>
+                                </el-col>
+                            </el-row>
+                        </el-tab-pane>
+
+                        <el-tab-pane label="背景图片上传" name="third">
+                            <div class="col-sm-8 col-sm-offset-1" style="padding: 10px">
+                                <el-form-item label="标题">
+                                    <el-upload
+                                            action="/admin/multipleUploadFile/doUpload"
+                                            :show-file-list="false"
+                                            :on-success="imageUrlTitleSuccess">
+                                        <img v-if="imageUrlTitle" :src="imageUrlTitle" style="max-width: 300px;">
+                                    </el-upload>
+                                </el-form-item>
+                            </div>
+                            <div class="col-sm-8 col-sm-offset-1" style="padding: 10px">
+                                <el-form-item label="头部">
+                                    <el-upload
+                                            action="/admin/multipleUploadFile/doUpload"
+                                            :show-file-list="false"
+                                            :on-success="imageUrlHeadSuccess">
+                                        <img v-if="imageUrlHead" :src="imageUrlHead" style="max-width: 300px;">
+                                    </el-upload>
+                                </el-form-item>
+                            </div>
+                            <div class="col-sm-8 col-sm-offset-1" style="padding: 10px">
+                                <el-form-item label="日历签到背景">
+                                    <el-upload
+                                            action="/admin/multipleUploadFile/doUpload"
+                                            :show-file-list="false"
+                                            :on-success="imageUrlStateSuccess">
+                                        <img v-if="imageUrlState" :src="imageUrlState" style="max-width: 300px;">
+                                    </el-upload>
+                                </el-form-item>
+                            </div>
+                            <div class="col-sm-8 col-sm-offset-1" style="padding: 10px">
+                                <el-form-item label="签到按钮">
+                                    <el-upload
+                                            action="/admin/multipleUploadFile/doUpload"
+                                            :show-file-list="false"
+                                            :on-success="imageUrlButtonSuccess">
+                                        <img v-if="imageUrlButton" :src="imageUrlButton" style="max-width: 300px;">
+                                        <i v-else></i>
+                                    </el-upload>
+                                </el-form-item>
+                            </div>
+                        </el-tab-pane>
+
+                        <el-tab-pane label="规则说明" name="fourth">
+                            <div class="col-sm-8 col-sm-offset-1">
+                                <el-form-item label="规则内容" prop="ruleExplain" style="padding: 10px">
+                                    <el-input type="textarea" v-model="ruleForm.ruleExplain"></el-input>
+                                </el-form-item>
+                                <el-form-item label="背景颜色" style="padding: 10px">
+                                    <el-color-picker v-model="backgroundColor"></el-color-picker>
+                                </el-form-item>
+                                <el-form-item label="字体颜色" style="padding: 10px">
+                                    <el-color-picker v-model="typographyColor"></el-color-picker>
+                                </el-form-item>
+                                <el-form-item label="字体大小" style="padding: 10px">
+                                    <el-input-number v-model="typographyNum" :min="10" :max="20" label="描述文字"></el-input-number>
+                                </el-form-item>
+                                <el-form-item label="字体透明度" style="padding: 10px">
+                                    <el-input-number v-model="typographyLight" :min="1" :max="100" label="描述文字">%</el-input-number>
+                                </el-form-item>
+                            </div>
+                        </el-tab-pane>
+                    </el-tabs>
+                </div>
+
+                <div class="form-group ">
+                    <div class="col-sm-12 text-center">
+                        <el-button type="primary" @click="updateSignAwardSet('ruleForm')">保存</el-button>
+                        <el-button type="danger" @click="cancelSubmit">关闭</el-button>
+                    </div>
+                </div>
+            </el-main>
+
+        </el-container>
+
+    </el-form>
+</div>
+</body>
+<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/bootstrap-3.3.5/js/bootstrap.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/layer/layer.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script>
+
+<script>
+    //获取传输的活动对象
+    var actId = $.query.get("actId");
+    const prize = {
+        //奖品基本信息
+        id:'',
+        cumulativeDay:'',
+        awardType:1,
+        awardName:'',
+        introduceImg:'',
+        introduceTip:'',
+        awardInventoryCnt:'',
+        awardDistributeCnt:'',
+        awardWay:1,
+        operationTip:'',
+        prizeAddress:'',
+        prizeTime: '',
+        wechatImg:'',
+        scoreCnt:'',
+        couponId:'',
+        goodsId:'',
+        couponName:'',
+        goodsName:'',
+    }
+    var app = new Vue({
+        el: '#app',
+        data: {
+            activeName: 'first',
+            formLabelWidth: '120px',
+            //标题图片
+            imageUrlTitle: '',
+            imageUrlHead: '',
+            imageUrlButton: '',
+            imageUrlState: '',
+
+            activeClickTab:0,
+
+            //优惠券搜索弹出
+            drawerCoupon: false,
+            directionCoupon: 'rtl',
+            tableHeightCoupon: 500,
+            //--优惠券
+            formCoupon:{
+                yhjmc:'',
+                order:'',
+                sort:''
+            },
+            couponList:{
+                rows:[],
+                total:0,
+                pageSize:10,
+                currentPage:1,
+            },
+
+            //品项搜索弹出
+            drawerGoods: false,
+            directionGoods: 'rtl',
+            tableHeightGoods: 500,
+            //--品项
+            formGoods:{
+                cpmc:'',
+                order:'',
+                sort:''
+            },
+            goodsList:{
+                rows:[],
+                total:0,
+                pageSize:10,
+                currentPage:1,
+            },
+
+            //字体颜色
+            typographyColor: '#409EFF',
+            //背景颜色
+            backgroundColor: '#409EFF',
+            //字体大小
+            typographyNum: '5',
+            //字体透明度
+            typographyLight: '50',
+            //奖品设置
+            prize:JSON.parse(JSON.stringify(prize)),
+            editableTabsValue: '1',
+            editableTabs: [{
+                title: '签到日常奖励',
+                name: '1',
+                content: JSON.parse(JSON.stringify(prize))
+            }],
+            tabIndex: 1,
+
+            ruleForm : {
+                //商品基本信息
+                actName : '',
+                actCode : '',
+                actTime : '',
+                //规则说明
+                ruleExplain : '',
+            },
+            rules : {
+                //商品基本信息
+                actName : [
+                    { required: true, message: '请输入活动名称', trigger: 'blur' }
+                ],
+                actCode : [
+                    { required: true, message: '请输入活动编码', trigger: 'blur' }
+                ],
+                actTime : [
+                    { required: true, message: '请选择日期', trigger: 'change' }
+                ],
+                ruleExplain : [
+                    { required: true, message: '请输入规则内容', trigger: 'blur' }
+                ]
+            },
+        },
+        created: function () {
+            this.loadInfo();
+        },
+        methods: {
+            //选择优惠券
+            chooseCoupon(val,name){
+                let _this = this;
+                _this.drawerCoupon = true;
+                _this.activeClickTab = parseInt(name);
+                _this.formCoupon.yhjmc = val;
+                _this.loadCouponList();
+            },
+            //--优惠券
+            loadCouponList() {
+                let _this = this;
+                let data=_this.getRequestParamCoupon();
+                data.pageSize=_this.couponList.pageSize;
+                data.pageNum=_this.couponList.currentPage;
+                AjaxProxy.requst({
+                    app: _this,
+                    data:data,
+                    url: basePath + '/admin/activitySignAwardSet/selectCouponList',
+                    callback: function (data) {
+                        _this.couponList.rows = data.rows;
+                        _this.couponList.total = data.total;
+                    }
+                });
+            },
+            //查询参数
+            getRequestParamCoupon(){
+                let _this = this;
+                return   {
+                    yhjmc:_this.formCoupon.yhjmc,
+                    order:_this.formCoupon.order,
+                    sort:_this.formCoupon.sort,
+                }
+            },
+            //查询
+            searchFormCoupon:function(){
+                this.couponList.currentPage=1;
+                this.loadCouponList();
+            },
+            //重置
+            resetFormCoupon(formName) {
+                // this.formCoupon.yhjmc = ''
+                // console.log(this.$refs[formName].resetFields)
+                (this.$refs[formName])[0].resetFields();
+            },
+            changePageSizeCoupon(val) {
+                this.couponList.pageSize = val;
+                this.loadCouponList();
+            },
+            changeCurrentPageCoupon(val) {
+                this.couponList.currentPage = val;
+                this.loadCouponList();
+            },
+            //选择
+            chooseOneCoupon(row) {
+                let _this = this;
+                _this.editableTabs[_this.activeClickTab-1].content.couponId = row.id;
+                _this.editableTabs[_this.activeClickTab-1].content.couponName = row.cname;
+                _this.drawerCoupon = false;
+            },
+
+            //选择品项
+            chooseGoods(val,name){
+                let _this = this;
+                _this.drawerGoods = true;
+                _this.activeClickTab = parseInt(name);
+                _this.formGoods.cpmc = val;
+                _this.loadGoodsList();
+            },
+            //--品项
+            loadGoodsList() {
+                let _this = this;
+                let data=_this.getRequestParamGoods();
+                data.pageSize=_this.goodsList.pageSize;
+                data.pageNum=_this.goodsList.currentPage;
+                AjaxProxy.requst({
+                    app: _this,
+                    data:data,
+                    url: basePath + '/admin/activitySignAwardSet/selectGoodsList',
+                    callback: function (data) {
+                        _this.goodsList.rows = data.rows;
+                        _this.goodsList.total = data.total;
+                    }
+                });
+            },
+            //查询参数
+            getRequestParamGoods(){
+                let _this = this;
+                return   {
+                    cpmc:_this.formCoupon.cpmc,
+                    order:_this.formCoupon.order,
+                    sort:_this.formCoupon.sort,
+                }
+            },
+            //查询
+            searchFormGoods:function(){
+                this.goodsList.currentPage=1;
+                this.loadGoodsList();
+            },
+            //重置
+            resetFormGoods(formName) {
+                (this.$refs[formName])[0].resetFields();
+            },
+            changePageSizeGoods(val) {
+                this.goodsList.pageSize = val;
+                this.loadGoodsList();
+            },
+            changeCurrentPageGoods(val) {
+                this.goodsList.currentPage = val;
+                this.loadGoodsList();
+            },
+            //选择
+            chooseOneGoods(row) {
+                let _this = this;
+                _this.editableTabs[_this.activeClickTab-1].content.goodsId = row.id;
+                _this.editableTabs[_this.activeClickTab-1].content.goodsName = row.name;
+                _this.drawerGoods = false;
+            },
+
+            //加载活动详情
+            loadInfo() {
+                let _this = this;
+                _this.loadSign();
+            },
+            loadSign() {
+                let _this = this;
+                let data={
+                    actId:actId,
+                };
+                AjaxProxy.requst({
+                    app: _this,
+                    data:data,
+                    url: basePath + '/admin/activitySignAwardSet/findSignForUpdate',
+                    callback: function (data) {
+                        _this.ruleForm.actName = data.mapInfo.addSignAwardSetVo.actName;
+                        _this.ruleForm.actCode = data.mapInfo.addSignAwardSetVo.actCode;
+                        let arrayObj = new Array();
+                        arrayObj.push(new Date(data.mapInfo.addSignAwardSetVo.beginTime));
+                        arrayObj.push(new Date(data.mapInfo.addSignAwardSetVo.endTime));
+                        _this.ruleForm.actTime = arrayObj;
+                        //字体颜色
+                        _this.ruleForm.ruleExplain = data.mapInfo.addSignAwardSetVo.signSetBasicJsonDto.ruleExplain;
+                        _this.typographyColor = data.mapInfo.addSignAwardSetVo.signSetBasicJsonDto.typographyColor;
+                        _this.backgroundColor = data.mapInfo.addSignAwardSetVo.signSetBasicJsonDto.backgroundColor;
+                        _this.typographyNum = data.mapInfo.addSignAwardSetVo.signSetBasicJsonDto.typographyNum;
+                        _this.typographyLight = data.mapInfo.addSignAwardSetVo.signSetBasicJsonDto.typographyLight;
+                        _this.imageUrlTitle = data.mapInfo.addSignAwardSetVo.signSetBasicJsonDto.imageUrlTitle;
+                        _this.imageUrlHead = data.mapInfo.addSignAwardSetVo.signSetBasicJsonDto.imageUrlHead;
+                        _this.imageUrlButton = data.mapInfo.addSignAwardSetVo.signSetBasicJsonDto.imageUrlButton;
+                        _this.imageUrlState = data.mapInfo.addSignAwardSetVo.signSetBasicJsonDto.imageUrlState;
+
+                        for (let i = 0; i < data.mapInfo.addSignAwardSetVo.activitySignAwardSets.length; i++) {
+                            _this.tabIndex = data.mapInfo.addSignAwardSetVo.activitySignAwardSets.length;
+                            let prizeVo = data.mapInfo.addSignAwardSetVo.activitySignAwardSets[i];
+                            let arrayObjs = new Array();
+                            arrayObjs.push(new Date(prizeVo.prizeStartTime));
+                            arrayObjs.push(new Date(prizeVo.prizeEndTime));
+                            let content = JSON.parse(JSON.stringify(prize));
+                            content = {
+                                id: prizeVo.id,
+                                cumulativeDay: prizeVo.cumulativeDay,
+                                awardType: parseInt(prizeVo.awardType),
+                                awardName: prizeVo.awardName,
+                                introduceImg: prizeVo.introduceImg,
+                                introduceTip: prizeVo.introduceTip,
+                                awardInventoryCnt: prizeVo.awardInventoryCnt,
+                                awardDistributeCnt: prizeVo.awardDistributeCnt,
+                                awardWay: parseInt(prizeVo.awardWay),
+                                operationTip: prizeVo.operationTip,
+                                prizeAddress: prizeVo.prizeAddress,
+                                wechatImg: prizeVo.wechatImg,
+                                scoreCnt: prizeVo.scoreCnt,
+                                couponId: prizeVo.couponId,
+                                goodsId: prizeVo.goodsId,
+                                couponName: prizeVo.couponName,
+                                goodsName: prizeVo.goodsName,
+                                prizeTime: arrayObjs,
+                            }
+                            if(i === 0){
+                                _this.editableTabs[0].content = content;
+                            }else{
+                                let newTabName =  i+1 +'';
+                                _this.editableTabs.push({
+                                    title: "商品奖励"+"("+newTabName+")",
+                                    name: newTabName,
+                                    content: content,
+                                });
+                                this.editableTabsValue = newTabName;
+                            }
+                        }
+                    }
+                });
+            },
+            //保存
+            updateSignAwardSet : function(formName) {
+                const _this = this;
+                let flag = false;
+                _this.$refs[formName].validate((valid) => {
+                    if (!valid) {
+                        _this.$notify({
+                            title: '提示',
+                            message: '请完善签到活动信息',
+                            type: 'warning'
+                        });
+                        flag = true;
+                        return;
+                    }
+                });
+                if (flag) {
+                    return;
+                }
+                //活动基本信息
+                let signSetBasicJsonDto = {
+                    ruleExplain: _this.ruleForm.ruleExplain,
+                    //字体颜色
+                    typographyColor: _this.typographyColor,
+                    //背景颜色
+                    backgroundColor: _this.backgroundColor,
+                    //字体大小
+                    typographyNum: _this.typographyNum,
+                    //字体透明度
+                    typographyLight: _this.typographyNum,
+                    //标题图片
+                    imageUrlTitle: _this.imageUrlTitle,
+                    imageUrlHead: _this.imageUrlHead,
+                    imageUrlButton: _this.imageUrlButton,
+                    imageUrlState: _this.imageUrlState,
+                }
+                //奖品信息
+                let activitySignAwardSets = [];
+                for (let i = 0; i < _this.editableTabs.length; i++) {
+                    let prize = _this.editableTabs[i].content;
+                    let name = _this.editableTabs[i].title;
+                    let awardRule = 2;
+                    if(name == "签到日常奖励"){
+                        awardRule = 1;
+                    }
+                    let activitySignAwardSet = {
+                        id: prize.id,
+                        cumulativeDay: prize.cumulativeDay,
+                        awardRule: awardRule,
+                        awardType: prize.awardType,
+                        awardName: prize.awardName,
+                        introduceImg: prize.introduceImg,
+                        introduceTip: prize.introduceTip,
+                        awardInventoryCnt: prize.awardInventoryCnt,
+                        awardDistributeCnt: prize.awardDistributeCnt,
+                        awardWay: prize.awardWay,
+                        operationTip: prize.operationTip,
+                        prizeAddress: prize.prizeAddress,
+                        wechatImg: prize.wechatImg,
+                        scoreCnt: prize.scoreCnt,
+                        couponId: prize.couponId,
+                        goodsId: prize.goodsId,
+                        couponName: prize.couponName,
+                        goodsName: prize.goodsName,
+                        prizeStartTime: prize.prizeTime[0],
+                        prizeEndTime: prize.prizeTime[1],
+                    }
+                    activitySignAwardSets.push(activitySignAwardSet);
+                }
+                let resultData = {
+                    actMainId: actId,
+                    actName: _this.ruleForm.actName,
+                    actCode: _this.ruleForm.actCode,
+                    beginTime : _this.ruleForm.actTime[0],
+                    endTime : _this.ruleForm.actTime[1],
+                    signSetBasicJsonDto,
+                    activitySignAwardSets,
+                }
+                AjaxProxy.requst({
+                    app: _this,
+                    data: resultData,
+                    url: basePath + '/admin/activitySignAwardSet/updateSignAwardSet',
+                    callback: function (data) {
+                        _this.$message({
+                            message: data.info,
+                            type: 'success',
+                        });
+                    }
+                });
+            },
+            //奖品设置
+            addTab(targetName) {
+                let newTabName = ++this.tabIndex + '';
+                this.editableTabs.push({
+                    title: "商品奖励"+"("+newTabName+")",
+                    name: newTabName,
+                    content: JSON.parse(JSON.stringify(prize)),
+                });
+                this.editableTabsValue = newTabName;
+            },
+            removeTab(targetName) {
+                let tabs = this.editableTabs;
+                let activeName = this.editableTabsValue;
+                if(activeName === '1' || targetName === '1'){
+                    this.$notify({
+                        title: '提示',
+                        message: '【签到日常奖励】不能删除',
+                        type: 'warning'
+                    });
+                }else{
+                    if (activeName === targetName) {
+                        tabs.forEach((tab, index) => {
+                            if (tab.name === targetName && tab.title !== "签到日常奖励") {
+                                let nextTab = tabs[index + 1] || tabs[index - 1];
+                                if (nextTab) {
+                                    activeName = nextTab.name;
+                                }
+                            }
+                        });
+                    }
+                    this.editableTabsValue = activeName;
+                    this.editableTabs = tabs.filter(tab => tab.name !== targetName);
+                    this.tabIndex = this.editableTabs.length;
+                }
+            },
+            //切换奖项类型,显示不同内容
+            jxlxChange(val){
+                let _this = this;
+                _this.isShow=val;
+            },
+            //切换兑奖方式,显示不同内容
+            awardWayChange(val){
+                let _this = this;
+                _this.isShow=val;
+            },
+            //跳转到图片上传
+            uploadImg(){
+                this.activeName = 'third';
+            },
+            //跳转到规则说明
+            gzsmSet(){
+                this.activeName = 'fourth';
+            },
+            //标题图片
+            imageUrlTitleSuccess(res, file) {
+                this.imageUrlTitle = res.path;
+            },
+            imageUrlHeadSuccess(res, file) {
+                this.imageUrlHead = res.path;
+            },
+            imageUrlButtonSuccess(res, file) {
+                this.imageUrlButton = res.path;
+            },
+            imageUrlStateSuccess(res, file) {
+                this.imageUrlState = res.path;
+            },
+            //奖品设置的图片介绍
+            introduceImgSuccess(res, file) {
+                this.editableTabs[this.activeClickTab-1].content.introduceImg = res.path;
+            },
+            //奖品设置的客服微信
+            wechatImgSuccess(res, file) {
+                this.editableTabs[this.activeClickTab-1].content.wechatImg = res.path;
+            },
+            cancelSubmit() {
+                this.closeFrame();
+            },
+            closeFrame() {
+                parent.layer.close(parent.layer.getFrameIndex(window.name));
+            },
+        }
+    })
+</script>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-writeoff-info.html b/zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-writeoff-info.html
new file mode 100644
index 0000000..26b52d1
--- /dev/null
+++ b/zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-writeoff-info.html
@@ -0,0 +1,198 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
+<head>
+    <meta charset="utf-8">
+    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta http-equiv="Cache-Control" content="no-siteapp"/>
+    <!-- 本框架基本脚本和样式 -->
+    <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
+    <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
+    <link rel="stylesheet" th:href="@{/plugin/bootstrap-3.3.5/css/bootstrap.min.css}">
+    <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
+</head>
+
+<body>
+<div class="ibox-content" id="app" v-cloak>
+    <el-row>
+        <p class="el-big-title">中奖信息</p>
+    </el-row>
+    <el-row style="margin-top: 20px;">
+        <el-col>
+            <el-form :model="formSelect">
+                <el-row>
+                    <el-form-item label="奖品名称:" :label-width="formLabelWidth">
+                        {{formSelect.jpmc}}
+                    </el-form-item>
+                </el-row>
+                <el-row style="display:flex;">
+                    <el-col :span="6">
+                        <el-form-item label="奖品图片:" :label-width="formLabelWidth">
+                            {{formSelect.jptp}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="6">
+                        <el-form-item label="数量:" :label-width="formLabelWidth">
+                            {{formSelect.sl}}
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row style="display:flex;">
+                    <el-col :span="6">
+                        <el-form-item label="中奖人:" :label-width="formLabelWidth">
+                            {{formSelect.zjr}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="6">
+                        <el-form-item label="中奖时间:" :label-width="formLabelWidth">
+                            {{formSelect.zjsj}}
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row style="display:flex;">
+                    <el-col :span="6">
+                        <el-form-item label="活动名称:" :label-width="formLabelWidth">
+                            {{formSelect.hdmc}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="6">
+                    <el-form-item label="活动编号:" :label-width="formLabelWidth">
+                        {{formSelect.hdbh}}
+                    </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row style="display:flex;">
+                    <el-col :span="6">
+                        <el-form-item label="兑奖方式:" :label-width="formLabelWidth">
+                            <span v-if="formSelect.djfs == 1">线下兑换</span>
+                            <span v-if="formSelect.djfs == 2">物流配送</span>
+                            <span v-if="formSelect.djfs == 3">客服兑换</span>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="6">
+                        <el-form-item label="兑奖时间:" :label-width="formLabelWidth">
+                            {{formSelect.djsj}}
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+            </el-form>
+        </el-col>
+    </el-row>
+
+    <el-row style="margin-top: 20px;">
+        <el-col class="col-sm-2" >
+            <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" v-if="formSelect.state == 1">
+                <el-form-item label="兑奖码" prop="writeOffCode">
+                    <el-input v-model="ruleForm.writeOffCode" placeholder="请输入兑奖码"></el-input>
+                </el-form-item>
+            </el-form>
+        </el-col>
+        <el-col class="col-sm-2 text-center">
+            <el-button type="primary" v-if="formSelect.state == 1"  @click="dataSubmit('ruleForm')">核销</el-button>
+            <el-button type="danger" @click="cancelSubmit">关闭</el-button>
+        </el-col>
+    </el-row>
+</div>
+</body>
+<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/bootstrap-3.3.5/js/bootstrap.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
+
+<script>
+    var writeoffId = $.query.get("writeoffId");
+    var app = new Vue({
+        el: '#app',
+        data: {
+            formLabelWidth: '120px',
+            formSelect: {
+                jpmc: '',
+                jptp: '',
+                sl: '',
+                zjr: '',
+                zjsj: '',
+                hdmc: '',
+                hdbh: '',
+                djfs: '',
+                state: '',
+                djsj: ''
+            },
+            ruleForm : {
+                writeOffCode:'',
+            },
+            rules : {
+                writeOffCode : [
+                    { required: true, message: '请输入兑奖码', trigger: 'blur' }
+                ],
+            },
+        },
+        created: function () {
+            this.loadInfo();
+        },
+        mounted: function () {
+        },
+        methods: {
+            //加载分类
+            loadInfo() {
+                let _this = this;
+                //加载配置
+                AjaxProxy.requst({
+                    app: _this,
+                    data: {writeoffId},
+                    url: basePath + '/admin/activitySignWriteoff/findSignWriteoff',
+                    callback: function (data) {
+                        _this.formSelect = data.mapInfo.signWriteoffVo;
+                    }
+                });
+            },
+            //核销
+            dataSubmit : function(formName) {
+                const _this = this;
+                let flag = false;
+                _this.$refs[formName].validate((valid) => {
+                    if (!valid) {
+                        flag = true;
+                        return;
+                    }
+                });
+                if (flag) {
+                    return;
+                }
+                let resultData = {
+                    writeoffId : writeoffId,
+                    writeOffCode : _this.ruleForm.writeOffCode,
+                }
+                AjaxProxy.requst({
+                    app: _this,
+                    data: resultData,
+                    url: basePath + '/admin/activitySignWriteoff/writeoffCodeSubmit',
+                    callback: function (data) {
+                        _this.$message({
+                            message: data.info,
+                            type: 'success',
+                        });
+                        parent.layer.close(parent.layer.getFrameIndex(window.name));
+                        parent.location.reload();
+                    }
+                });
+            },
+
+            cancelSubmit() {
+                this.closeFrame();
+            },
+            closeFrame() {
+                parent.layer.close(parent.layer.getFrameIndex(window.name));
+                parent.location.reload();
+            },
+        }
+    })
+</script>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-writeoff.html b/zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-writeoff.html
new file mode 100644
index 0000000..3c585e0
--- /dev/null
+++ b/zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-writeoff.html
@@ -0,0 +1,298 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
+<head>
+    <meta charset="utf-8">
+    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta http-equiv="Cache-Control" content="no-siteapp"/>
+    <!-- 本框架基本脚本和样式 -->
+    <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
+    <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
+    <link rel="stylesheet" th:href="@{/plugin/bootstrap-3.3.5/css/bootstrap.min.css}">
+    <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
+
+    <!-- 富文本编辑器 -->
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/ueditor.config.js}"></script>
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/ueditor.all.js}">
+    </script>
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/lang/zh-cn/zh-cn.js}"></script>
+    <style>
+        .panel-body{
+            overflow: hidden;
+        }
+        .paginationStyle{
+            background: #ffffff;
+            padding: 10px 10px;
+            margin: 0px 0px 10px 0px;
+            text-align: right;
+        }
+    </style>
+</head>
+
+<body>
+<div class="panel-body" id="app" v-cloak>
+    <el-row>
+        <el-row style="display:flex;">
+            <el-col>
+                <el-form ref="form" :model="form" inline >
+                    <el-form-item label="中奖人名称" prop="yhmc" >
+                        <el-input v-model="form.yhmc" placeholder="中奖人名称"></el-input>
+                    </el-form-item>
+                    <el-form-item label="输入活动名称/编码" prop="hdmcbm" >
+                        <el-input v-model="form.hdmcbm" placeholder="输入活动名称/编码"></el-input>
+                    </el-form-item>
+                    <el-button type="primary" @click="searchFormSignReceive" >搜索</el-button>
+                    <el-button @click="resetFormSignReceive('form')">重置</el-button>
+                </el-form>
+            </el-col>
+        </el-row>
+
+        <el-row class="table-style" >
+            <el-table ref="multipleTable"
+                      :data="signWriteoffList.rows"
+                      :height="height"
+                      stripe:true
+                      @sort-change="sortChange">
+                <el-table-column
+                        prop="writeoffTime"
+                        label="核销时间"
+                        show-overflow-tooltip>
+                </el-table-column>
+                <el-table-column
+                        prop="writeoffUser"
+                        label="核销员"
+                        show-overflow-tooltip>
+                </el-table-column>
+                <el-table-column
+                        label="兑奖码"
+                        show-overflow-tooltip>
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.state == 3">{{scope.row.writeoffCode}}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="actName"
+                        label="活动名称"
+                        show-overflow-tooltip>
+                </el-table-column>
+                <el-table-column
+                        prop="awardName"
+                        label="奖品名称"
+                        show-overflow-tooltip>
+                </el-table-column>
+                <el-table-column
+                        prop="winTime"
+                        label="中奖时间"
+                        show-overflow-tooltip>
+                </el-table-column>
+                <el-table-column
+                        label="状态">
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.state == 1">待兑换</span>
+                        <span v-if="scope.row.state == 2">待发货</span>
+                        <span v-if="scope.row.state == 3">已兑换</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        label="兑奖方式">
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.awardWay == 1">线下兑换</span>
+                        <span v-if="scope.row.awardWay == 2">物流配送</span>
+                        <span v-if="scope.row.awardWay == 3">客服兑换</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="receiveName"
+                        label="中奖者"
+                        show-overflow-tooltip>
+                </el-table-column>
+                <el-table-column
+                        prop="receiveAddress"
+                        label="收货地址"
+                        show-overflow-tooltip>
+                </el-table-column>
+                <el-table-column label="操作" width="200">
+                    <template slot-scope="scope">
+                        <el-button type="primary" v-if="scope.row.awardWay == 2 && scope.row.state == 2"  @click="jumpTologistics(scope.row)" size="mini">发货</el-button>
+                        <el-button type="primary" v-if="scope.row.awardWay != 2 && scope.row.state == 1"  @click="jumpToWriteOff(scope.row)" size="mini">核销</el-button>
+
+                        <el-button type="primary" v-if="scope.row.awardWay == 2"  @click="jumpTologistics(scope.row)" size="mini">查看</el-button>
+                        <el-button type="primary" v-if="scope.row.awardWay != 2"  @click="jumpToWriteOff(scope.row)" size="mini">查看</el-button>
+                    </template>
+                </el-table-column>
+
+            </el-table>
+        </el-row>
+        <el-row class="paginationStyle"  >
+            <el-pagination background
+                           @size-change="changePageSignReceive"
+                           @current-change="changeCurrentPageSignReceive"
+                           :current-page="signWriteoffList.currentPage"
+                           :page-sizes="[10, 20, 30, 50]"
+                           :page-size="signWriteoffList.pageSize"
+                           layout="total, sizes, prev, pager, next, jumper"
+                           :total="signWriteoffList.total">
+            </el-pagination>
+        </el-row>
+    </el-row>
+</div>
+</body>
+<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/bootstrap-3.3.5/js/bootstrap.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/layer/layer.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script>
+
+<script>
+    //获取传输的活动对象
+    var actId = $.query.get("actId");
+
+    var app = new Vue({
+        el: '#app',
+        data: {
+            height:'calc(100vh - 200px)',
+            //--时间选择
+            pickerOptions: {
+                shortcuts: [{
+                    text: '最近一周',
+                    onClick(picker) {
+                        const end = new Date();
+                        const start = new Date();
+                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+                        picker.$emit('pick', [start, end]);
+                    }
+                }, {
+                    text: '最近一个月',
+                    onClick(picker) {
+                        const end = new Date();
+                        const start = new Date();
+                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+                        picker.$emit('pick', [start, end]);
+                    }
+                }, {
+                    text: '最近三个月',
+                    onClick(picker) {
+                        const end = new Date();
+                        const start = new Date();
+                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+                        picker.$emit('pick', [start, end]);
+                    }
+                }]
+            },
+            // 条件查询
+            form:{
+                yhmc:'',
+                hdmcbm:'',
+                order:'',
+                sort:''
+            },
+            //核销列表
+            signWriteoffList:{
+                rows:[],
+                total:0,
+                pageSize:10,
+                currentPage:1,
+            },
+        },
+        created: function () {
+            this.loadInfo();
+        },
+        mounted: function () {
+        },
+        methods: {
+            //加载分类
+            loadInfo() {
+                let _this = this;
+                _this.loadSignWriteoffList();
+            },
+            //跳转到核销
+            jumpToWriteOff(row){
+                layer.full(layer.open({
+                    type: 2,
+                    title: "核销",
+                    maxmin: true,
+                    area: [MUI.SIZE_L, '500px'],
+                    content : [ basePath + '/admin/redirect/activity/activity-sign-writeoff-info?writeoffId=' + row.id]
+                }));
+            },
+            //跳转到发货
+            jumpTologistics(row){
+                layer.full(layer.open({
+                    type: 2,
+                    title: "发货",
+                    maxmin: true,
+                    area: [MUI.SIZE_L, '500px'],
+                    content : [ basePath + '/admin/redirect/activity/activity-sign-logistics-info?writeoffId=' + row.id]
+                }));
+            },
+            //--列表
+            loadSignWriteoffList() {
+                let _this = this;
+                let data=_this.getRequestParamSignWriteoff();
+                data.pageSize=_this.signWriteoffList.pageSize;
+                data.pageNum=_this.signWriteoffList.currentPage;
+                AjaxProxy.requst({
+                    app: _this,
+                    data:data,
+                    url: basePath + '/admin/activitySignWriteoff/findSignWriteoffList',
+                    callback: function (data) {
+                        _this.signWriteoffList.rows = data.rows;
+                        _this.signWriteoffList.total = data.total;
+                    }
+                });
+            },
+            //查询参数
+            getRequestParamSignWriteoff(){
+                let _this = this;
+                return   {
+                    zjzxm:_this.form.yhmc,
+                    hdmcbm:_this.form.hdmcbm,
+                    order:_this.form.order,
+                    sort:_this.form.sort,
+                }
+            },
+            //查询
+            searchFormSignReceive:function(){
+                this.signWriteoffList.currentPage=1;
+                this.loadSignWriteoffList();
+            },
+            //重置
+            resetFormSignReceive(formName) {
+                this.$refs[formName].resetFields();
+            },
+            changePageSignReceive(val) {
+                this.signWriteoffList.pageSize = val;
+                this.loadSignWriteoffList();
+            },
+            changeCurrentPageSignReceive(val) {
+                this.signWriteoffList.currentPage = val;
+                this.loadSignWriteoffList();
+            },
+            //排序
+            sortChange:function (column){
+                if(column.order){
+                    if(column.order.indexOf("desc")){
+                        this.form.order="desc";
+                    }else{
+                        this.form.order="asc";
+                    }
+                    this.form.sort=column.prop;
+                    this.loadInfo();
+                }
+            },
+        }
+    })
+</script>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/activity/activity-sign.html b/zq-erp/src/main/resources/templates/views/admin/activity/activity-sign.html
new file mode 100644
index 0000000..a134b2f
--- /dev/null
+++ b/zq-erp/src/main/resources/templates/views/admin/activity/activity-sign.html
@@ -0,0 +1,959 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
+<head>
+    <meta charset="utf-8">
+    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta http-equiv="Cache-Control" content="no-siteapp"/>
+    <!-- 本框架基本脚本和样式 -->
+    <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
+    <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
+    <link rel="stylesheet" th:href="@{/plugin/bootstrap-3.3.5/css/bootstrap.min.css}">
+    <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
+
+    <!-- 富文本编辑器 -->
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/ueditor.config.js}"></script>
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/ueditor.all.js}">
+    </script>
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/lang/zh-cn/zh-cn.js}"></script>
+    <style>
+
+        .paginationStyle{
+            background: #ffffff;
+            padding: 10px 10px;
+            margin: 0px 0px 10px 0px;
+            text-align: right;
+        }
+
+        .el-aside {
+            background-color: #D3DCE6;
+            color: #333;
+            text-align: center;
+        }
+        .el-main {
+            background-color: #E9EEF3;
+            color: #333;
+        }
+        body > .el-container {
+            margin-bottom: 1000px;
+        }
+        .button {
+            padding: 5px;
+            text-align: center;
+        }
+
+        .imageOne {
+            display: block;
+            height: 50px;
+            padding: 5px 5px;
+            text-align: center;
+        }
+        .imageTwo {
+            display: block;
+            height: 50px;
+            padding: 5px 5px;
+            text-align: center;
+        }
+        .imageThree {
+            display: block;
+            height: 50px;
+            padding: 5px 5px;
+            text-align: center;
+        }
+
+        .box-card {
+            padding: 5px 5px;
+        }
+
+    </style>
+</head>
+
+<body>
+<div class="panel-body" id="app" v-cloak>
+    <el-form :model="ruleForm" :rules="rules"  class="form-horizontal" id="dataform" ref="ruleForm" label-width="120px">
+
+    <el-container>
+        <el-aside width="30%">
+            <el-card class="box-card" :body-style="{ padding: '10px 10px'}">
+                <div @click="uploadImg()" class="imageOne">
+                    <img v-if="imageUrlTitle" :src="imageUrlTitle" style="width: 100%;">
+                    <el-button type="primary" v-show="imageUrlTitle == ''" round><span style="font-size: 20px;">标题</span><span style="padding:5px;font-size: 15px;color: red;">(上传图片)</span></span></el-button>
+                </div>
+                <div @click="uploadImg()" class="imageTwo" >
+                    <img v-if="imageUrlHead" :src="imageUrlHead" style="width: 100%;">
+                    <el-button type="primary" v-show="imageUrlHead == ''" round><span style="font-size: 20px;">头部</span><span style="padding:5px;font-size: 15px;color: red;">(上传图片)</span></span></el-button>
+                </div>
+                <el-row style="display:flex;">
+                    <el-col>
+                        <div style="padding:5px;font-size: 15px;text-align: left;"><span>您已累计签到<span style="color: red;">3</span>天</span></div>
+                    </el-col>
+                    <el-col>
+                        <div style="padding:5px;font-size: 15px;text-align: right;"><span>签到提醒</span></div>
+                    </el-col>
+                </el-row>
+                <div @click="uploadImg()">
+                    <el-calendar :range="['2019-03-04', '2019-03-24']"></el-calendar>
+                    <img v-if="imageUrlState" :src="imageUrlState" style="width: 100%;">
+                    <el-button type="primary" v-show="imageUrlState == ''" round><span style="font-size: 20px;">日历签到背景</span><span style="padding:5px;font-size: 15px;color: red;">(上传图片)</span></span></el-button>
+                </div>
+                <div @click="uploadImg()" class="imageThree" >
+                    <el-button type="primary" v-show="imageUrlButton == ''" round><span style="font-size: 20px;">签到按钮</span><span style="padding:5px;font-size: 15px;color: red;">(上传图片)</span></span></el-button>
+                    <img v-if="imageUrlButton" :src="imageUrlButton" style="width: 100%;">
+                </div>
+
+                <div style="text-align: center;padding: 5px;" @click="gzsmSet()">
+                    <div class="col-sm-8 col-sm-offset-2" style="text-align: left;">
+                        <span style="padding:5px;font-size: 30px;">-- 规则说明--</span>
+                    </div>
+                    <div class="el-col-sm-24" style="text-align: center;">
+                        <span style="padding:5px;font-size: 15px;color: red;">(点击,编辑规则内容,背景颜色,字体颜色、大小、透明度)</span>
+                    </div>
+                    <div class="col-sm-8 col-sm-offset-2" style="text-align: left;">
+                        <span style="padding:5px;font-size: 15px;">1、每天参与签到可获得积分</span>
+                    </div>
+                    <div class="col-sm-8 col-sm-offset-2" style="text-align: left;">
+                        <span style="padding:5px;font-size: 15px;">2、连续签到7天将获得赠送大礼包</span>
+                    </div>
+                    <div class="col-sm-8 col-sm-offset-2" style="text-align: left;">
+                        <span style="padding:5px;font-size: 15px;">3、每7天重新开始计算</span>
+                    </div>
+                </div>
+            </el-card>
+        </el-aside>
+
+        <el-main width="70%">
+            <div>
+                <el-tabs v-model="activeName" >
+                            <el-tab-pane label="活动设置" name="first">
+                                <div class="col-sm-8 col-sm-offset-1" style="padding: 10px">
+                                    <el-form-item label="活动名称" prop="actName">
+                                        <el-input v-model="ruleForm.actName" placeholder="请输入活动名称"></el-input>
+                                    </el-form-item>
+                                </div>
+                                <div class="col-sm-8 col-sm-offset-1" style="padding: 10px">
+                                    <el-form-item label="活动编码" prop="actCode">
+                                        <el-input v-model.number="ruleForm.actCode" placeholder="请输入最大开团数量"></el-input>
+                                    </el-form-item>
+                                </div>
+                                <div class="col-sm-4 col-sm-offset-1" style="padding: 10px">
+                                    <el-form-item label="活动时间" prop="actTime">
+                                        <div class="block">
+                                            <el-date-picker
+                                                    v-model="ruleForm.actTime"
+                                                    type="daterange"
+                                                    range-separator="至"
+                                                    start-placeholder="开始日期"
+                                                    end-placeholder="结束日期">
+                                            </el-date-picker>
+                                        </div>
+                                    </el-form-item>
+                                </div>
+                            </el-tab-pane>
+
+                            <el-tab-pane label="奖品设置" name="second">
+                                <el-row style="display:flex;">
+                                    <el-col :span="20">
+                                        <el-tabs v-model="editableTabsValue" type="card" closable @tab-remove="removeTab">
+                                            <el-tab-pane v-for="(item, index) in editableTabs" :key="item.name" :label="item.title" :name="item.name">
+                                                <el-row v-show="editableTabsValue !== '1'">
+                                                    <el-form-item label="签到累计天数">
+                                                        <el-input v-model.number="item.content.cumulativeDay" oninput ="value=value.replace(/[^0-9.]/g,'')"></el-input>
+                                                    </el-form-item>
+                                                </el-row>
+                                                <el-row>
+                                                    <el-form-item label="奖项类型">
+                                                        <el-col>
+                                                            <el-radio-group v-model="item.content.awardType" @change="jxlxChange">
+                                                                <el-radio :label="'1'">自定义奖品</el-radio>
+                                                                <el-radio :label="'2'">积分</el-radio>
+                                                                <el-radio :label="'3'">优惠券</el-radio>
+                                                                <el-radio :label="'4'">商品</el-radio>
+                                                            </el-radio-group>
+                                                        </el-col>
+                                                    </el-form-item >
+                                                </el-row>
+                                                <el-row >
+                                                    <el-col>
+                                                        <el-form-item label="奖项名称">
+                                                            <el-input v-model="item.content.awardName" placeholder="奖项名称"></el-input>
+                                                        </el-form-item>
+                                                    </el-col>
+                                                </el-row>
+                                                <el-row >
+                                                    <el-col>
+                                                        <el-form-item label="图片介绍">
+                                                            <el-upload
+                                                                    action="/admin/multipleUploadFile/doUpload"
+                                                                    :show-file-list="false"
+                                                                    :on-success="introduceImgSuccess">
+                                                                <img v-if="item.content.introduceImg" :src="item.content.introduceImg" style="max-width: 200px;">
+                                                            </el-upload>
+                                                        </el-form-item>
+                                                    </el-col>
+                                                </el-row>
+
+                                                <div v-show="item.content.awardType !== '2'">
+                                                    <el-row style="display:flex;">
+                                                        <el-col>
+                                                            <el-form-item label="奖项库存">
+                                                                <el-input v-model="item.content.awardInventoryCnt" oninput ="value=value.replace(/[^0-9.]/g,'')"></el-input>
+                                                            </el-form-item>
+                                                        </el-col>
+                                                        <el-col>
+                                                            <el-form-item label="已派发">
+                                                                <el-input v-model="item.content.awardDistributeCnt"></el-input>
+                                                            </el-form-item>
+                                                        </el-col>
+                                                    </el-row>
+                                                </div>
+                                                <div v-show="item.content.awardType === '1'">
+                                                    <el-row >
+                                                        <el-col>
+                                                            <el-form-item label="文字介绍">
+                                                                <el-input type="textarea" v-model="item.content.introduceTip"></el-input>
+                                                            </el-form-item>
+                                                        </el-col>
+                                                    </el-row>
+                                                    <el-row >
+                                                        <el-col>
+                                                            <el-form-item label="兑奖方式">
+                                                                <el-col>
+                                                                    <el-radio-group v-model="item.content.awardWay" @change="awardWayChange">
+                                                                        <el-radio :label="'1'">线下兑换</el-radio>
+                                                                        <el-radio :label="'2'">物流配送</el-radio>
+                                                                        <el-radio :label="'3'">客服兑换</el-radio>
+                                                                    </el-radio-group>
+                                                                </el-col>
+                                                            </el-form-item >
+                                                        </el-col>
+                                                    </el-row>
+                                                    <el-row >
+                                                        <el-col>
+                                                            <el-form-item label="操作提示">
+                                                                <el-input v-model="item.content.operationTip"></el-input>
+                                                            </el-form-item>
+                                                        </el-col>
+                                                    </el-row>
+                                                    <div v-show="item.content.awardWay === '1'">
+                                                        <el-row >
+                                                            <el-col>
+                                                                <el-form-item label="兑奖地址">
+                                                                    <el-input v-model="item.content.prizeAddress"></el-input>
+                                                                </el-form-item>
+                                                            </el-col>
+                                                        </el-row>
+
+                                                    </div>
+                                                    <div v-show="item.content.awardWay === '3'">
+                                                        <el-row >
+                                                            <el-col>
+                                                                <el-form-item label="客服微信">
+                                                                    <el-upload
+                                                                            action="/admin/multipleUploadFile/doUpload"
+                                                                            :show-file-list="false"
+                                                                            :on-success="wechatImgSuccess">
+                                                                        <img v-if="item.content.wechatImg" :src="item.content.wechatImg" style="max-width: 200px;">
+                                                                    </el-upload>
+                                                                </el-form-item>
+                                                            </el-col>
+                                                        </el-row>
+                                                    </div>
+                                                    <div v-show="item.content.awardWay !== '2'">
+                                                        <el-row >
+                                                            <el-col>
+                                                                <el-form-item label="兑奖期限">
+                                                                    <div class="block">
+                                                                        <el-date-picker
+                                                                                v-model="item.content.prizeTime"
+                                                                                type="daterange"
+                                                                                range-separator="至"
+                                                                                start-placeholder="开始日期"
+                                                                                end-placeholder="结束日期">
+                                                                        </el-date-picker>
+                                                                    </div>
+                                                                </el-form-item>
+                                                            </el-col>
+                                                        </el-row>
+                                                    </div>
+                                                </div>
+                                                <div v-show="item.content.awardType === '2'">
+                                                    <el-row >
+                                                        <el-col>
+                                                            <el-form-item label="积分数量">
+                                                                <el-input v-model="item.content.scoreCnt" oninput ="value=value.replace(/[^0-9.]/g,'')"></el-input>
+                                                            </el-form-item>
+                                                        </el-col>
+                                                    </el-row>
+                                                </div>
+                                                <div v-show="item.content.awardType === '3'">
+                                                    <el-row style="display:flex;">
+                                                        <el-col>
+                                                            <el-form-item label="优惠券名称">
+                                                                <el-input v-model="item.content.couponName"></el-input>
+                                                            </el-form-item>
+                                                        </el-col>
+                                                        <el-col>
+                                                            <el-form-item label="优惠券">
+                                                                <el-input v-model="item.content.couponId"></el-input>
+                                                            </el-form-item>
+                                                        </el-col>
+                                                        <el-col>
+                                                            <el-button type="primary" @click="chooseCoupon(item.content.couponName,item.name)">
+                                                                选择优惠券
+                                                            </el-button>
+                                                        </el-col>
+                                                    </el-row>
+
+                                                    <el-drawer
+                                                            title="选择商城优惠券"
+                                                            :visible.sync="drawerCoupon"
+                                                            :direction="directionCoupon"
+                                                            size="90%">
+                                                        <el-row style="margin-left: 50px;">
+                                                            <el-col :span="24">
+                                                                <el-row>
+                                                                    <el-form ref="formCoupon" :model="formCoupon" inline >
+                                                                        <el-form-item prop="yhjmc">
+                                                                            <el-input v-model="formCoupon.yhjmc" placeholder="请输入优惠券名称"></el-input>
+                                                                        </el-form-item>
+                                                                        <el-button type="primary" @click="searchFormCoupon" >搜索</el-button>
+                                                                        <el-button @click="resetFormCoupon('formCoupon')">重置</el-button>
+                                                                    </el-form>
+                                                                </el-row>
+
+                                                                <el-row class="table-style" >
+                                                                    <el-table ref="multipleTable"
+                                                                              :data="couponList.rows"
+                                                                              :height="tableHeightCoupon"
+                                                                              stripe:true
+                                                                              style="width: 100%">
+                                                                        <el-table-column
+                                                                                prop="cname"
+                                                                                label="优惠券名称"
+                                                                                show-overflow-tooltip>
+                                                                        </el-table-column>
+                                                                        <el-table-column
+                                                                                prop="endTime"
+                                                                                label="截止日期"
+                                                                                show-overflow-tooltip>
+                                                                        </el-table-column>
+                                                                        <el-table-column
+                                                                                prop="address"
+                                                                                label="操作">
+                                                                            <template slot-scope="scope">
+                                                                                <el-button type="primary"
+                                                                                           size="mini"
+                                                                                           @click="chooseOneCoupon(scope.row)">选择
+                                                                                </el-button>
+                                                                            </template>
+                                                                        </el-table-column>
+                                                                    </el-table>
+                                                                </el-row>
+                                                                <el-row class="paginationStyle"  >
+                                                                    <el-pagination background
+                                                                                   @size-change="changePageSizeCoupon"
+                                                                                   @current-change="changeCurrentPageCoupon"
+                                                                                   :current-page="couponList.currentPage"
+                                                                                   :page-sizes="[10, 20, 30, 50]"
+                                                                                   :page-size="couponList.pageSize"
+                                                                                   layout="total, sizes, prev, pager, next, jumper"
+                                                                                   :total="couponList.total">
+                                                                    </el-pagination>
+                                                                </el-row>
+                                                            </el-col>
+                                                        </el-row>
+                                                    </el-drawer>
+                                                </div>
+                                                <div v-show="item.content.awardType === '4'">
+                                                    <el-row style="display:flex;">
+                                                        <el-col>
+                                                            <el-form-item label="品项名称">
+                                                                <el-input v-model="item.content.goodsName"></el-input>
+                                                            </el-form-item>
+                                                        </el-col>
+                                                        <el-col>
+                                                            <el-form-item label="品项">
+                                                                <el-input v-model="item.content.goodsId"></el-input>
+                                                            </el-form-item>
+                                                        </el-col>
+                                                        <el-col>
+                                                            <el-button type="primary" @click="chooseGoods(item.content.goodsName,item.name)">
+                                                                选择品项
+                                                            </el-button>
+                                                        </el-col>
+                                                    </el-row>
+
+                                                    <el-drawer
+                                                            title="选择ERP产品"
+                                                            :visible.sync="drawerGoods"
+                                                            :direction="directionGoods"
+                                                            size="90%">
+                                                        <el-row style="margin-left: 50px;">
+                                                            <el-col :span="24">
+                                                                <el-row>
+                                                                    <el-form ref="formGoods" :model="formGoods" inline >
+                                                                        <el-form-item prop="cpmc">
+                                                                            <el-input v-model="formGoods.cpmc" placeholder="请输入产品名称"></el-input>
+                                                                        </el-form-item>
+                                                                        <el-button type="primary" @click="searchFormGoods" >搜索</el-button>
+                                                                        <el-button @click="resetFormGoods('formGoods')">重置</el-button>
+                                                                    </el-form>
+                                                                </el-row>
+
+                                                                <el-row class="table-style" >
+                                                                    <el-table ref="multipleTable"
+                                                                              :data="goodsList.rows"
+                                                                              :height="tableHeightGoods"
+                                                                              stripe:true
+                                                                              style="width: 100%">
+                                                                        <el-table-column
+                                                                                prop="cname"
+                                                                                label="优惠券名称"
+                                                                                show-overflow-tooltip>
+                                                                        </el-table-column>
+                                                                        <el-table-column
+                                                                                prop="endTime"
+                                                                                label="截止日期"
+                                                                                show-overflow-tooltip>
+                                                                        </el-table-column>
+                                                                        <el-table-column
+                                                                                prop="address"
+                                                                                label="操作">
+                                                                            <template slot-scope="scope">
+                                                                                <el-button type="primary"
+                                                                                           size="mini"
+                                                                                           @click="chooseOneGoods(scope.row)">选择
+                                                                                </el-button>
+                                                                            </template>
+                                                                        </el-table-column>
+                                                                    </el-table>
+                                                                </el-row>
+                                                                <el-row class="paginationStyle"  >
+                                                                    <el-pagination background
+                                                                                   @size-change="changePageSizeGoods"
+                                                                                   @current-change="changeCurrentPageGoods"
+                                                                                   :current-page="goodsList.currentPage"
+                                                                                   :page-sizes="[10, 20, 30, 50]"
+                                                                                   :page-size="goodsList.pageSize"
+                                                                                   layout="total, sizes, prev, pager, next, jumper"
+                                                                                   :total="goodsList.total">
+                                                                    </el-pagination>
+                                                                </el-row>
+                                                            </el-col>
+                                                        </el-row>
+                                                    </el-drawer>
+
+                                                </div>
+                                            </el-tab-pane>
+                                        </el-tabs>
+                                    </el-col>
+                                    <el-col :span="4">
+                                        <el-button type="primary" @click="addTab(editableTabsValue)">
+                                            新增奖品
+                                        </el-button>
+                                    </el-col>
+                                </el-row>
+                            </el-tab-pane>
+
+                            <el-tab-pane label="背景图片上传" name="third">
+                                <div class="col-sm-8 col-sm-offset-1" style="padding: 10px">
+                                    <el-form-item label="标题">
+                                        <el-upload
+                                                action="/admin/multipleUploadFile/doUpload"
+                                                :show-file-list="false"
+                                                :on-success="imageUrlTitleSuccess">
+                                            <img v-if="imageUrlTitle" :src="imageUrlTitle" style="max-width: 300px;">
+                                        </el-upload>
+                                    </el-form-item>
+                                </div>
+                                <div class="col-sm-8 col-sm-offset-1" style="padding: 10px">
+                                    <el-form-item label="头部">
+                                        <el-upload
+                                                action="/admin/multipleUploadFile/doUpload"
+                                                :show-file-list="false"
+                                                :on-success="imageUrlHeadSuccess">
+                                            <img v-if="imageUrlHead" :src="imageUrlHead" style="max-width: 300px;">
+                                        </el-upload>
+                                    </el-form-item>
+                                </div>
+                                <div class="col-sm-8 col-sm-offset-1" style="padding: 10px">
+                                    <el-form-item label="日历签到背景">
+                                        <el-upload
+                                                action="/admin/multipleUploadFile/doUpload"
+                                                :show-file-list="false"
+                                                :on-success="imageUrlStateSuccess">
+                                            <img v-if="imageUrlState" :src="imageUrlState" style="max-width: 300px;">
+                                        </el-upload>
+                                    </el-form-item>
+                                </div>
+                                <div class="col-sm-8 col-sm-offset-1" style="padding: 10px">
+                                    <el-form-item label="签到按钮">
+                                        <el-upload
+                                                action="/admin/multipleUploadFile/doUpload"
+                                                :show-file-list="false"
+                                                :on-success="imageUrlButtonSuccess">
+                                            <img v-if="imageUrlButton" :src="imageUrlButton" style="max-width: 300px;">
+                                            <i v-else></i>
+                                        </el-upload>
+                                    </el-form-item>
+                                </div>
+                            </el-tab-pane>
+
+                            <el-tab-pane label="规则说明" name="fourth">
+                                <div class="col-sm-8 col-sm-offset-1">
+                                    <el-form-item label="规则内容" prop="ruleExplain" style="padding: 10px">
+                                        <el-input type="textarea" v-model="ruleForm.ruleExplain"></el-input>
+                                    </el-form-item>
+                                    <el-form-item label="背景颜色" style="padding: 10px">
+                                        <el-color-picker v-model="backgroundColor"></el-color-picker>
+                                    </el-form-item>
+                                    <el-form-item label="字体颜色" style="padding: 10px">
+                                        <el-color-picker v-model="typographyColor"></el-color-picker>
+                                    </el-form-item>
+                                    <el-form-item label="字体大小" style="padding: 10px">
+                                        <el-input-number v-model="typographyNum" :min="10" :max="20" label="描述文字"></el-input-number>
+                                    </el-form-item>
+                                    <el-form-item label="字体透明度" style="padding: 10px">
+                                        <el-input-number v-model="typographyLight" :min="1" :max="100" label="描述文字">%</el-input-number>
+                                    </el-form-item>
+                                </div>
+                           </el-tab-pane>
+                        </el-tabs>
+                    </div>
+
+                <div class="form-group ">
+                    <div class="col-sm-12 text-center">
+                        <el-button type="primary" @click="dataSubmit('ruleForm')">保存</el-button>
+                        <el-button type="danger" @click="cancelSubmit">关闭</el-button>
+                    </div>
+                </div>
+        </el-main>
+
+    </el-container>
+
+    </el-form>
+</div>
+</body>
+<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/bootstrap-3.3.5/js/bootstrap.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/layer/layer.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script>
+
+<script>
+    //获取传输的活动对象
+    var actId = $.query.get("actId");
+    const prize = {
+        //奖品基本信息
+        cumulativeDay:'',
+        awardType:'1',
+        awardName:'',
+        introduceImg:'',
+        introduceTip:'',
+        awardInventoryCnt:'',
+        awardDistributeCnt:'',
+        awardWay:'1',
+        operationTip:'',
+        prizeAddress:'',
+        prizeTime: '',
+        wechatImg:'',
+        scoreCnt:'',
+        couponId:'',
+        goodsId:'',
+        couponName:'',
+        goodsName:'',
+    }
+    var app = new Vue({
+        el: '#app',
+        data: {
+            activeName: 'first',
+            formLabelWidth: '120px',
+
+            activeClickTab:0,
+            //优惠券搜索弹出
+            drawerCoupon: false,
+            directionCoupon: 'rtl',
+            tableHeightCoupon: 500,
+            //--优惠券
+            formCoupon:{
+                yhjmc:'',
+                order:'',
+                sort:''
+            },
+            couponList:{
+                rows:[],
+                total:0,
+                pageSize:10,
+                currentPage:1,
+            },
+
+            //品项搜索弹出
+            drawerGoods: false,
+            directionGoods: 'rtl',
+            tableHeightGoods: 500,
+            //--品项
+            formGoods:{
+                cpmc:'',
+                order:'',
+                sort:''
+            },
+            goodsList:{
+                rows:[],
+                total:0,
+                pageSize:10,
+                currentPage:1,
+            },
+
+            //标题图片
+            imageUrlTitle: '',
+            imageUrlHead: '',
+            imageUrlButton: '',
+            imageUrlState: '',
+
+            //字体颜色
+            typographyColor: '#409EFF',
+            //背景颜色
+            backgroundColor: '#409EFF',
+            //字体大小
+            typographyNum: '5',
+            //字体透明度
+            typographyLight: '50',
+            //奖品设置
+            prize:JSON.parse(JSON.stringify(prize)),
+            editableTabsValue: '1',
+            editableTabs: [{
+                title: '签到日常奖励',
+                name: '1',
+                content: JSON.parse(JSON.stringify(prize))
+            }],
+            tabIndex: 1,
+
+            ruleForm : {
+                //商品基本信息
+                actName : '',
+                actCode : '',
+                actTime : '',
+                //规则说明
+                ruleExplain : '',
+            },
+            rules : {
+                //商品基本信息
+                actName : [
+                    { required: true, message: '请输入活动名称', trigger: 'blur' }
+                ],
+                actCode : [
+                    { required: true, message: '请输入活动编码', trigger: 'blur' }
+                ],
+                actTime : [
+                    { required: true, message: '请选择日期', trigger: 'change' }
+                ],
+                ruleExplain : [
+                    { required: true, message: '请输入规则内容', trigger: 'blur' }
+                ]
+            },
+        },
+        created: function () {
+        },
+        methods: {
+            //选择优惠券
+            chooseCoupon(val,name){
+                let _this = this;
+                _this.drawerCoupon = true;
+                _this.activeClickTab = parseInt(name);
+                _this.formCoupon.yhjmc = val;
+                _this.loadCouponList();
+            },
+            //--优惠券
+            loadCouponList() {
+                let _this = this;
+                let data=_this.getRequestParamCoupon();
+                data.pageSize=_this.couponList.pageSize;
+                data.pageNum=_this.couponList.currentPage;
+                AjaxProxy.requst({
+                    app: _this,
+                    data:data,
+                    url: basePath + '/admin/activitySignAwardSet/selectCouponList',
+                    callback: function (data) {
+                        _this.couponList.rows = data.rows;
+                        _this.couponList.total = data.total;
+                    }
+                });
+            },
+            //查询参数
+            getRequestParamCoupon(){
+                let _this = this;
+                return   {
+                    yhjmc:_this.formCoupon.yhjmc,
+                    order:_this.formCoupon.order,
+                    sort:_this.formCoupon.sort,
+                }
+            },
+            //查询
+            searchFormCoupon:function(){
+                this.couponList.currentPage=1;
+                this.loadCouponList();
+            },
+            //重置
+            resetFormCoupon(formName) {
+                // this.formCoupon.yhjmc = ''
+                // console.log(this.$refs[formName].resetFields)
+                (this.$refs[formName])[0].resetFields();
+            },
+            changePageSizeCoupon(val) {
+                this.couponList.pageSize = val;
+                this.loadCouponList();
+            },
+            changeCurrentPageCoupon(val) {
+                this.couponList.currentPage = val;
+                this.loadCouponList();
+            },
+            //选择
+            chooseOneCoupon(row) {
+                let _this = this;
+                _this.editableTabs[_this.activeClickTab-1].content.couponId = row.id;
+                _this.editableTabs[_this.activeClickTab-1].content.couponName = row.cname;
+                _this.drawerCoupon = false;
+            },
+
+            //选择品项
+            chooseGoods(val,name){
+                let _this = this;
+                _this.drawerGoods = true;
+                _this.activeClickTab = parseInt(name);
+                _this.formGoods.cpmc = val;
+                _this.loadGoodsList();
+            },
+            //--品项
+            loadGoodsList() {
+                let _this = this;
+                let data=_this.getRequestParamGoods();
+                data.pageSize=_this.goodsList.pageSize;
+                data.pageNum=_this.goodsList.currentPage;
+                AjaxProxy.requst({
+                    app: _this,
+                    data:data,
+                    url: basePath + '/admin/activitySignAwardSet/selectGoodsList',
+                    callback: function (data) {
+                        _this.goodsList.rows = data.rows;
+                        _this.goodsList.total = data.total;
+                    }
+                });
+            },
+            //查询参数
+            getRequestParamGoods(){
+                let _this = this;
+                return   {
+                    cpmc:_this.formCoupon.cpmc,
+                    order:_this.formCoupon.order,
+                    sort:_this.formCoupon.sort,
+                }
+            },
+            //查询
+            searchFormGoods:function(){
+                this.goodsList.currentPage=1;
+                this.loadGoodsList();
+            },
+            //重置
+            resetFormGoods(formName) {
+                (this.$refs[formName])[0].resetFields();
+            },
+            changePageSizeGoods(val) {
+                this.goodsList.pageSize = val;
+                this.loadGoodsList();
+            },
+            changeCurrentPageGoods(val) {
+                this.goodsList.currentPage = val;
+                this.loadGoodsList();
+            },
+            //选择
+            chooseOneGoods(row) {
+                let _this = this;
+                _this.editableTabs[_this.activeClickTab-1].content.goodsId = row.id;
+                _this.editableTabs[_this.activeClickTab-1].content.goodsName = row.name;
+                _this.drawerGoods = false;
+            },
+
+            //保存
+            dataSubmit : function(formName) {
+                const _this = this;
+                let flag = false;
+                _this.$refs[formName].validate((valid) => {
+                    if (!valid) {
+                        _this.$notify({
+                            title: '提示',
+                            message: '请完善签到活动信息',
+                            type: 'warning'
+                        });
+                        flag = true;
+                        return;
+                    }
+                });
+                if (flag) {
+                    return;
+                }
+                //活动基本信息
+                let signSetBasicJsonDto = {
+                    ruleExplain: _this.ruleForm.ruleExplain,
+                    //字体颜色
+                    typographyColor: _this.typographyColor,
+                    //背景颜色
+                    backgroundColor: _this.backgroundColor,
+                    //字体大小
+                    typographyNum: _this.typographyNum,
+                    //字体透明度
+                    typographyLight: _this.typographyNum,
+                    //标题图片
+                    imageUrlTitle: _this.imageUrlTitle,
+                    imageUrlHead: _this.imageUrlHead,
+                    imageUrlButton: _this.imageUrlButton,
+                    imageUrlState: _this.imageUrlState,
+                }
+                //奖品信息
+                let activitySignAwardSets = [];
+                for (let i = 0; i < _this.editableTabs.length; i++) {
+                    let prize = _this.editableTabs[i].content;
+                    let name = _this.editableTabs[i].title;
+                    let awardRule = 2;
+                    if(name == "签到日常奖励"){
+                        awardRule = 1;
+                    }
+                    let activitySignAwardSet = {
+                        cumulativeDay: prize.cumulativeDay,
+                        awardRule: awardRule,
+                        awardType: prize.awardType,
+                        awardName: prize.awardName,
+                        introduceImg: prize.introduceImg,
+                        introduceTip: prize.introduceTip,
+                        awardInventoryCnt: prize.awardInventoryCnt,
+                        awardDistributeCnt: prize.awardDistributeCnt,
+                        awardWay: prize.awardWay,
+                        operationTip: prize.operationTip,
+                        prizeAddress: prize.prizeAddress,
+                        wechatImg: prize.wechatImg,
+                        scoreCnt: prize.scoreCnt,
+                        couponId: prize.couponId,
+                        goodsId: prize.goodsId,
+                        couponName: prize.couponName,
+                        goodsName: prize.goodsName,
+                        prizeStartTime: prize.prizeTime[0],
+                        prizeEndTime: prize.prizeTime[1],
+                    }
+                    activitySignAwardSets.push(activitySignAwardSet);
+                }
+                let resultData = {
+                    actName: _this.ruleForm.actName,
+                    actCode: _this.ruleForm.actCode,
+                    beginTime : _this.ruleForm.actTime[0],
+                    endTime : _this.ruleForm.actTime[1],
+                    signSetBasicJsonDto,
+                    activitySignAwardSets,
+                }
+                AjaxProxy.requst({
+                    app: _this,
+                    data: resultData,
+                    url: basePath + '/admin/activitySignAwardSet/addSignAwardSet',
+                    callback: function (data) {
+                        _this.$message({
+                            message: data.info,
+                            type: 'success',
+                        });
+                    }
+                });
+            },
+            //奖品设置
+            addTab(targetName) {
+                let newTabName = ++this.tabIndex + '';
+                this.editableTabs.push({
+                    title: "商品奖励"+"("+newTabName+")",
+                    name: newTabName,
+                    content: JSON.parse(JSON.stringify(prize)),
+                });
+                this.editableTabsValue = newTabName;
+            },
+            removeTab(targetName) {
+                let tabs = this.editableTabs;
+                let activeName = this.editableTabsValue;
+                if(activeName === '1' || targetName === '1'){
+                    this.$notify({
+                        title: '提示',
+                        message: '【签到日常奖励】不能删除',
+                        type: 'warning'
+                    });
+                }else{
+                    if (activeName === targetName) {
+                        tabs.forEach((tab, index) => {
+                            if (tab.name === targetName && tab.title !== "签到日常奖励") {
+                                let nextTab = tabs[index + 1] || tabs[index - 1];
+                                if (nextTab) {
+                                    activeName = nextTab.name;
+                                }
+                            }
+                        });
+                    }
+                    this.editableTabsValue = activeName;
+                    this.editableTabs = tabs.filter(tab => tab.name !== targetName);
+                    this.tabIndex = this.editableTabs.length;
+                }
+            },
+            //切换奖项类型,显示不同内容
+            jxlxChange(val){
+                let _this = this;
+                _this.isShow=val;
+            },
+            //切换兑奖方式,显示不同内容
+            awardWayChange(val){
+                let _this = this;
+                _this.isShow=val;
+            },
+            //跳转到图片上传
+            uploadImg(){
+                this.activeName = 'third';
+            },
+            //跳转到规则说明
+            gzsmSet(){
+                this.activeName = 'fourth';
+            },
+            //标题图片
+            imageUrlTitleSuccess(res, file) {
+                this.imageUrlTitle = res.path;
+            },
+            imageUrlHeadSuccess(res, file) {
+                this.imageUrlHead = res.path;
+            },
+            imageUrlButtonSuccess(res, file) {
+                this.imageUrlButton = res.path;
+            },
+            imageUrlStateSuccess(res, file) {
+                this.imageUrlState = res.path;
+            },
+            //奖品设置的图片介绍
+            introduceImgSuccess(res, file) {
+                this.editableTabs[this.activeClickTab-1].content.introduceImg = res.path;
+                // this.prize.introduceImg = URL.createObjectURL(file.raw);
+            },
+            //奖品设置的客服微信
+            wechatImgSuccess(res, file) {
+                this.editableTabs[this.activeClickTab-1].content.wechatImg = res.path;
+            },
+            cancelSubmit() {
+                this.closeFrame();
+            },
+            closeFrame() {
+                parent.layer.close(parent.layer.getFrameIndex(window.name));
+            },
+        }
+    })
+</script>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-apply.html b/zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-apply.html
new file mode 100644
index 0000000..71bded8
--- /dev/null
+++ b/zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-apply.html
@@ -0,0 +1,219 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
+<head>
+    <meta charset="utf-8">
+    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta http-equiv="Cache-Control" content="no-siteapp"/>
+    <LINK rel="Bookmark" href="../images/favicon.ico">
+    <!-- 本框架基本脚本和样式 -->
+    <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
+    <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
+    <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
+    <title></title>
+    <style>
+        .panel-body{
+            overflow: hidden;
+        }
+        .paginationStyle{
+            background: #ffffff;
+            padding: 10px 10px;
+            margin: 0px 0px 10px 0px;
+            text-align: right;
+        }
+    </style>
+</head>
+<body>
+<div class="panel-body" id="app">
+    <el-row style="display:flex;align-items: center;text-align: right;">
+        <el-col>
+            <el-form ref="form" :model="form" inline >
+                <el-form-item prop="nickName">
+                    <el-input v-model="form.nickName" placeholder="请输入会员姓名"></el-input>
+                </el-form-item>
+
+                <el-button type="primary" @click="search" >搜索</el-button>
+                <el-button @click="resetForm('form')">重置</el-button>
+            </el-form>
+        </el-col>
+    </el-row>
+
+    <el-row class="table-style"  style="margin-left: 50px;">
+        <el-table id="proj" :data="table.rows"  :height="height" stripe @sort-change="sortChange">
+            <el-table-column
+                    label="会员">
+                <template slot-scope="scope">
+                    <img :src="scope.row.avatarUrl" width="40" height="40" class="head_pic"/>
+                    {{scope.row.nickname}}
+                </template>
+            </el-table-column>
+            <el-table-column
+                    prop="phone"
+                    label="手机号码">
+            </el-table-column>
+            <el-table-column
+                    prop="createTime"
+                    label="注册时间">
+            </el-table-column>
+            <el-table-column
+                    prop="salesGrade"
+                    label="分销等级"
+                    width="180">
+                <template slot-scope="scope">
+                    <el-select v-model="scope.row.proJbruserValue"  @focus="getDatalist(scope.row)" placeholder="请选择" filterable allow-create>
+                        <el-option v-for="item in salesGradeList " :key="item.id" :label="item.name" :value="item.id">
+                        </el-option>
+                    </el-select>
+                </template>
+            </el-table-column>
+            <el-table-column label="操作">
+                <template slot-scope="scope">
+                    <el-button type="text" size="small" @click="addSaleManApply(scope.row)">设置为分销员</el-button>
+                </template>
+            </el-table-column>
+        </el-table>
+    </el-row>
+    <el-row class="paginationStyle"  >
+        <el-pagination background
+                       @size-change="changePageSize"
+                       @current-change="changeCurrentPage"
+                       :current-page="table.currentPage"
+                       :page-sizes="[10, 20, 30, 50]"
+                       :page-size="table.pageSize"
+                       layout="total, sizes, prev, pager, next, jumper"
+                       :total="table.total">
+        </el-pagination>
+    </el-row>
+
+</div>
+</body>
+<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/layer/layer.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script>
+<script type="text/javascript" th:inline="javascript">
+
+    var vue = new Vue({
+        el: '#app',
+        data: {
+            table:{
+                rows:[],
+                total:0,
+                pageSize:10,
+                currentPage:1,
+            },
+            form:{
+                nickName:'',
+                order:'',
+                sort:''
+            },
+            proJbruserValue : "",
+            salesGradeList: [],
+            height:'calc(100vh - 240px)',
+        },
+        created: function () {
+            this.loadData();
+            window.addEventListener("keydown", this.keydown);
+        },
+        methods: {
+            //设置为分销员
+            addSaleManApply(row){
+                let _this = this;
+                let userId = row.userId;
+                let openId = row.openId;
+                let gradeId = row.proJbruserValue;
+                let obj = {
+                    userId: userId,
+                    openId: openId,
+                    gradeId: gradeId,
+                }
+                AjaxProxy.requst({
+                    app: _this,
+                    data:obj,
+                    url: basePath + '/fenXiao/fenXiaoUser/addSaleManApply',
+                    callback: function (data) {
+                        _this.$message.success(data.info);
+                        this.loadData();
+                    }
+                });
+            },
+            // select下拉框获取焦点的时候查询对应的下拉框数据源
+            getDatalist(row) {
+                let _this = this;
+                AjaxProxy.requst({
+                    app: _this,
+                    data:[],
+                    url: basePath + '/fenXiao/fenXiaoUser/getShopSalesmanGrade',
+                    callback: function (data) {
+                        _this.salesGradeList = data.mapInfo.salesGrade;
+                    }
+                });
+            },
+            changePageSize(val) {
+                this.table.pageSize = val;
+                this.loadData();
+            },
+            changeCurrentPage(val) {
+                this.table.currentPage = val;
+                this.loadData();
+            },
+            resetForm(formName) {
+                this.$refs[formName].resetFields();
+            },
+            sortChange:function (column){
+                if(column.order){
+                    if(column.order.indexOf("desc")){
+                        this.form.order="desc";
+                    }else{
+                        this.form.order="asc";
+                    }
+                    this.form.sort=column.prop;
+                    this.loadData();
+                }
+            },
+            loadData:function(){
+                let _this = this;
+                let data=_this.getRequestParam();
+                data.pageSize=_this.table.pageSize;
+                data.pageNum=_this.table.currentPage;
+                AjaxProxy.requst({
+                    app: _this,
+                    data:data,
+                    url: basePath + '/fenXiao/fenXiaoUser/findShopSalesmanAppliingList',
+                    callback: function (data) {
+                        _this.table.rows = data.rows;
+                        _this.table.total=data.total;
+                    }
+                });
+            },
+            getRequestParam(){
+                let _this = this;
+                return   {
+                    nickName:_this.form.nickName,
+                    order:_this.form.order,
+                    sort:_this.form.sort,
+                }
+            },
+            search:function(){
+                this.table.currentPage=1;
+                this.loadData();
+            },
+            keydown(evt){
+                if(evt.keyCode==13) {
+                    this.search();
+                }
+            }
+
+        }
+    });
+
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-order.html b/zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-order.html
new file mode 100644
index 0000000..d3566c6
--- /dev/null
+++ b/zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-order.html
@@ -0,0 +1,689 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
+<head>
+    <meta charset="utf-8">
+    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta http-equiv="Cache-Control" content="no-siteapp"/>
+    <!-- 本框架基本脚本和样式 -->
+    <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
+    <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
+    <link rel="stylesheet" th:href="@{/plugin/bootstrap-3.3.5/css/bootstrap.min.css}">
+    <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
+
+    <!-- 富文本编辑器 -->
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/ueditor.config.js}"></script>
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/ueditor.all.js}">
+    </script>
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/lang/zh-cn/zh-cn.js}"></script>
+    <style>
+        .panel-body{
+            overflow: hidden;
+        }
+        .paginationStyle{
+            background: #ffffff;
+            padding: 10px 10px;
+            margin: 0px 0px 10px 0px;
+            text-align: right;
+        }
+
+        .box-card {
+            width: 240px;
+            border-radius: 5px;
+            color: #ffffff;
+            padding: 2px 0px;
+            margin-right: 20px;
+            cursor: pointer;
+            float: left;
+            text-align: center;
+        }
+        .el-card__body {
+            padding: 0px;
+        }
+    </style>
+</head>
+
+<body>
+<div class="panel-body" id="app" v-cloak>
+        <el-row>
+                <el-card class="box-card" style="background-color: #0f9aef;">
+                    <div style="padding:10px;font-size: 20px;">¥{{basicdetail.balance}}</div>
+                    <div>待计算金额</div>
+                </el-card >
+                <el-card class="box-card" style="background: #67C23A;">
+                    <div style="padding:10px;font-size: 20px;">{{basicdetail.waitNum}}人</div>
+                    <div>待结算人数</div>
+                </el-card >
+                <el-card class="box-card" style="background: rgb(121, 187, 255);">
+                    <div style="padding:10px;font-size: 20px;">{{basicdetail.waitOrderNum}}笔</div>
+                    <div>待结算订单</div>
+                </el-card >
+        </el-row>
+    <el-row>
+        <el-tabs v-model="activeName" >
+            <el-tab-pane label="分销订单" name="first">
+                <el-row justify="space-between" type="flex">
+                    <el-col :span="6">
+                        <el-button type="primary" @click="setOrderDone()">批量结算</el-button>
+                    </el-col>
+                    <el-dialog title="本次结算分销订单" :visible.sync="dialogFormVisible">
+                        <el-form :model="formSelect">
+                            <el-form-item label="结算金额:" :label-width="formLabelWidth">
+                                <div style="font-size: 30px;color: #ff0000">¥{{formSelect.jsje}}</div>
+                            </el-form-item>
+                            <el-form-item label="结算订单:" :label-width="formLabelWidth">
+                                <div style="font-size: 20px;">{{formSelect.jsdds}}单</div>
+                            </el-form-item>
+                            <el-form-item label="结算人数:" :label-width="formLabelWidth">
+                                <div style="font-size: 20px;">{{formSelect.jsrs}}人</div>
+                            </el-form-item>
+                            <el-form-item label="结算方式:" :label-width="formLabelWidth">
+                                <el-radio-group v-model="formSelect.jsfs">
+                                    <el-radio-button label="1">线下结算</el-radio-button>
+                                    <el-radio-button label="2">微信余额支付</el-radio-button>
+                                </el-radio-group>
+                            </el-form-item>
+                            <el-form-item label="备注:" :label-width="formLabelWidth">
+                                <el-input type="textarea" :rows="3" v-model="formSelect.bz" autocomplete="off"></el-input>
+                            </el-form-item>
+                        </el-form>
+                        <div slot="footer" class="dialog-footer">
+                            <el-button @click="dialogFormVisible = false">取 消</el-button>
+                            <el-button type="primary" @click="updateSetOrderDone()">确 定</el-button>
+                        </div>
+                    </el-dialog>
+
+                    <el-col>
+                        <el-form ref="form" :model="form" inline >
+                            <el-form-item label="订单状态" prop="ddType">
+                                <el-select v-model="form.ddType" placeholder="订单状态">
+                                    <el-option
+                                            v-for="item in ddTypeList"
+                                            :key="item.value"
+                                            :label="item.label"
+                                            :value="item.value"
+                                    >
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                            <el-form-item label="结算状态" prop="orderType">
+                                <el-select v-model="form.orderType" placeholder="结算状态">
+                                    <el-option
+                                            v-for="item in orderTypeList"
+                                            :key="item.value"
+                                            :label="item.label"
+                                            :value="item.value"
+                                    >
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                            <el-form-item prop="userName" >
+                                <el-input v-model="form.userName" placeholder="请输入客户名称"></el-input>
+                            </el-form-item>
+                            <el-form-item prop="tgy" >
+                                <el-input v-model="form.tgy" placeholder="请输入推广员名称"></el-input>
+                            </el-form-item>
+                            <el-form-item prop="ddsj" >
+                                <el-date-picker
+                                        v-model="form.ddsj"
+                                        type="datetimerange"
+                                        :picker-options="pickerOptions"
+                                        range-separator="至"
+                                        start-placeholder="开始日期"
+                                        end-placeholder="结束日期"
+                                        align="right">
+                                </el-date-picker>
+                            </el-form-item>
+                            <el-form-item prop="jsbh" >
+                                <el-input v-model="form.jsbh" placeholder="请输入结算编号"></el-input>
+                            </el-form-item>
+                            <el-form-item prop="ddh" >
+                                <el-input v-model="form.ddh" placeholder="请输入订单号"></el-input>
+                            </el-form-item>
+                            <el-button type="primary" @click="search" >搜索</el-button>
+                            <el-button @click="resetForm('form')">重置</el-button>
+                        </el-form>
+                    </el-col>
+                </el-row>
+
+                <el-row class="table-style" >
+                    <el-table ref="multipleTable"
+                              :data="fxyList.rows"
+                              :height="height"
+                              stripe:true
+                              @sort-change="sortChange"
+                              @selection-change="handleSelectionChange">
+                        <el-table-column
+                                type="selection">
+                        </el-table-column>
+                        <el-table-column
+                                prop="orderNo"
+                                label="订单编号"
+                                show-overflow-tooltip>
+                        </el-table-column>
+                        <el-table-column
+                                prop="actualBalance"
+                                label="实付金额(元)">
+                        </el-table-column>
+                        <el-table-column
+                                label="订单状态">
+                            <template slot-scope="scope">
+                                <span v-if="scope.row.orderState == 1">待付款</span>
+                                <span v-if="scope.row.orderState == 2">待配送</span>
+                                <span v-if="scope.row.orderState == 3">待收货</span>
+                                <span v-if="scope.row.orderState == 4">待评价</span>
+                                <span v-if="scope.row.orderState == 5">已评价</span>
+                                <span v-if="scope.row.orderState == 6">申请退款</span>
+                                <span v-if="scope.row.orderState == 7">退款成功</span>
+                                <span v-if="scope.row.orderState == 8">退款拒绝</span>
+                                <span v-if="scope.row.orderState == 9">已取消</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                                prop="address"
+                                label="下单门店"
+                                show-overflow-tooltip>
+                        </el-table-column>
+                        <el-table-column
+                                prop="custom"
+                                label="客户"
+                                show-overflow-tooltip>
+                        </el-table-column>
+                        <el-table-column
+                                prop="parentSale"
+                                label="推广员"
+                                show-overflow-tooltip>
+                        </el-table-column>
+                        <el-table-column
+                                label="收益类型">
+                            <template slot-scope="scope">
+                                <span v-if="scope.row.profitType == 1">推广收益</span>
+                                <span v-if="scope.row.profitType == 2">邀请收益</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                                prop="profitBalance"
+                                label="收益金额">
+                        </el-table-column>
+                        <el-table-column
+                                label="结算状态">
+                            <template slot-scope="scope">
+                                <span v-if="scope.row.settleType == 1">待结算</span>
+                                <span v-if="scope.row.settleType == 2">已结算</span>
+                                <span v-if="scope.row.settleType == 3">已退款</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                                prop="settleNo"
+                                label="结算编号"
+                                show-overflow-tooltip
+                                width="150">
+                        </el-table-column>
+                        <el-table-column
+                                prop="settleTime"
+                                label="结算时间"
+                                show-overflow-tooltip>
+                        </el-table-column>
+                        <el-table-column
+                                prop="settler"
+                                label="结算人"
+                                show-overflow-tooltip>
+                        </el-table-column>
+                        <el-table-column label="操作">
+                        </el-table-column>
+                    </el-table>
+                </el-row>
+                <el-row class="paginationStyle"  >
+                    <el-pagination background
+                                   @size-change="changePageSize"
+                                   @current-change="changeCurrentPage"
+                                   :current-page="fxyList.currentPage"
+                                   :page-sizes="[10, 20, 30, 50]"
+                                   :page-size="fxyList.pageSize"
+                                   layout="total, sizes, prev, pager, next, jumper"
+                                   :total="fxyList.total">
+                    </el-pagination>
+                </el-row>
+            </el-tab-pane>
+
+            <el-tab-pane label="结算记录" name="second">
+                <el-row style="display:flex;align-items: center;text-align: right;">
+                    <el-col>
+                        <el-form ref="formOrder" :model="formOrder" inline >
+                            <el-form-item prop="jssj" >
+                            <el-date-picker
+                                    v-model="formOrder.jssj"
+                                    type="datetimerange"
+                                    :picker-options="pickerOptions"
+                                    range-separator="至"
+                                    start-placeholder="开始日期"
+                                    end-placeholder="结束日期"
+                                    align="right">
+                            </el-date-picker>
+                        </el-form-item>
+                            <el-form-item prop="userName">
+                                <el-input v-model="formOrder.userName" placeholder="请输入结算人姓名"></el-input>
+                            </el-form-item>
+                            <el-button type="primary" @click="searchFormOrder" >搜索</el-button>
+                            <el-button @click="resetFormOrder('formOrder')">重置</el-button>
+                        </el-form>
+                    </el-col>
+                </el-row>
+                <el-row class="table-style" >
+                    <el-table :data="orderLevelList.rows"  :height="height" stripe:true  @sort-change="sortChange">
+                        <el-table-column
+                                prop="orderNo"
+                                label="结算编号"
+                                show-overflow-tooltip>
+                        </el-table-column>
+                        <el-table-column
+                                prop="actualBalance"
+                                label="结算金额">
+                        </el-table-column>
+                        <el-table-column
+                                prop="setNum"
+                                label="结算订单数">
+                        </el-table-column>
+                        <el-table-column
+                                prop="setManNum"
+                                label="结算人数">
+                        </el-table-column>
+                        <el-table-column
+                                prop="setTime"
+                                label="结算时间"
+                                show-overflow-tooltip>
+                        </el-table-column>
+                        <el-table-column
+                                prop="setMan"
+                                label="结算人"
+                                show-overflow-tooltip>
+                        </el-table-column>
+                        <el-table-column
+                                label="结算方式">
+                            <template slot-scope="scope">
+                                <span v-if="scope.row.settlementWay == 1">线下结算</span>
+                                <span v-if="scope.row.settlementWay == 2">微信余额结算</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                                prop="remark"
+                                label="备注"
+                                show-overflow-tooltip>
+                        </el-table-column>
+                    </el-table>
+                </el-row>
+                <el-row class="paginationStyle"  >
+                    <el-pagination background
+                                   @size-change="changePageSizeOrder"
+                                   @current-change="changeCurrentPageOrder"
+                                   :current-page="orderLevelList.currentPage"
+                                   :page-sizes="[10, 20, 30, 50]"
+                                   :page-size="orderLevelList.pageSize"
+                                   layout="total, sizes, prev, pager, next, jumper"
+                                   :total="orderLevelList.total">
+                    </el-pagination>
+                </el-row>
+            </el-tab-pane>
+        </el-tabs>
+    </el-row>
+</div>
+</body>
+<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/bootstrap-3.3.5/js/bootstrap.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/layer/layer.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script>
+
+<script>
+    //获取传输的USERID对象
+    var userId = $.query.get("userId");
+    var applyId = $.query.get("applyId");
+
+    var app = new Vue({
+        el: '#app',
+        data: {
+            activeName: 'first',
+            height:'calc(100vh - 340px)',
+            //--基本数据
+            basicdetail:{},
+            //--时间选择
+            pickerOptions: {
+                shortcuts: [{
+                    text: '最近一周',
+                    onClick(picker) {
+                        const end = new Date();
+                        const start = new Date();
+                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+                        picker.$emit('pick', [start, end]);
+                    }
+                }, {
+                    text: '最近一个月',
+                    onClick(picker) {
+                        const end = new Date();
+                        const start = new Date();
+                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+                        picker.$emit('pick', [start, end]);
+                    }
+                }, {
+                    text: '最近三个月',
+                    onClick(picker) {
+                        const end = new Date();
+                        const start = new Date();
+                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+                        picker.$emit('pick', [start, end]);
+                    }
+                }]
+            },
+
+            //--批量审核选中操作
+            multipleSelection: [],
+            orderIds:"",
+            orderNums:0,
+            orderNumsDones:0,
+            dialogFormVisible: false,
+            formSelect: {
+                jsje: '',
+                jsdds: '',
+                jsrs: '',
+                jsfs: 2,
+                bz: ''
+            },
+            formLabelWidth: '120px',
+            //--分销订单
+            // 条件查询结算状态
+            orderTypeList:[
+                {value:'',label:'全部'},
+                {value:1,label:'待结算'},
+                {value:2,label:'已结算'},
+                {value:3,label:'已退款'}
+            ],
+            ddTypeList:[
+                {value:'',label:'全部'},
+                {value:1,label:'待付款'},
+                {value:2,label:'待配送'},
+                {value:3,label:'待收货'},
+                {value:4,label:'待评价'},
+                {value:5,label:'已评价'},
+                {value:6,label:'申请退款'},
+                {value:7,label:'退款成功'},
+                {value:8,label:'退款拒绝'},
+                {value:9,label:'已取消'}
+            ],
+            form:{
+                userName:'',
+                orderType:'',
+                ddType:'',
+                ddsj: '',
+                tgy:'',
+                jsbh:'',
+                ddh:'',
+                order:'',
+                sort:''
+            },
+            fxyList:{
+                rows:[],
+                total:0,
+                pageSize:10,
+                currentPage:1,
+            },
+            //--结算记录
+            formOrder:{
+                userName:'',
+                jssj:'',
+                order:'',
+                sort:''
+            },
+            orderLevelList:{
+                rows:[],
+                total:0,
+                pageSize:10,
+                currentPage:1,
+            },
+        },
+        created: function () {
+            this.loadInfo();
+        },
+        mounted: function () {
+        },
+        methods: {
+            //加载分类
+            loadInfo() {
+                let _this = this;
+                _this.loadFenxiaoOrderBasic();
+                _this.loadFenxiaoOrderList();
+                _this.loadSetOrderList();
+            },
+            //--基础数据
+            loadFenxiaoOrderBasic() {
+                let _this = this;
+                let obj = {};
+                AjaxProxy.requst({
+                    app: _this,
+                    data:obj,
+                    url: basePath + '/fenXiao/fenXiaoOrder/loadFenxiaoOrderBasic',
+                    callback: function (data) {
+                        _this.basicdetail = data.mapInfo.basicdetail;
+                    }
+                });
+            },
+            //--结算记录
+            loadSetOrderList() {
+                let _this = this;
+                let data=_this.getRequestParamOrder();
+                data.pageSize=_this.orderLevelList.pageSize;
+                data.pageNum=_this.orderLevelList.currentPage;
+                AjaxProxy.requst({
+                    app: _this,
+                    data:data,
+                    url: basePath + '/fenXiao/fenXiaoOrder/loadSetOrderList',
+                    callback: function (data) {
+                        _this.orderLevelList.rows = data.rows;
+                        _this.orderLevelList.total = data.total;
+                        _this.loadFenxiaoOrderBasic();
+                    }
+                });
+            },
+            //查询参数
+            getRequestParamOrder(){
+                let _this = this;
+                let startTime = '';
+                let endTime = '';
+                if(_this.formOrder.jssj.length > 0){
+                    startTime = _this.formOrder.jssj[0];
+                    endTime = _this.formOrder.jssj[1];
+                }
+                return   {
+                    userName:_this.formOrder.userName,
+                    startTime:startTime,
+                    endTime:endTime,
+                    order:_this.formOrder.order,
+                    sort:_this.formOrder.sort,
+                }
+            },
+            //查询
+            searchFormOrder:function(){
+                this.orderLevelList.currentPage=1;
+                this.loadSetOrderList();
+            },
+            //重置
+            resetFormOrder(formName) {
+                this.$refs[formName].resetFields();
+            },
+            changePageSizeOrder(val) {
+                this.orderLevelList.pageSize = val;
+                this.loadSetOrderList();
+            },
+            changeCurrentPageOrder(val) {
+                this.orderLevelList.currentPage = val;
+                this.loadSetOrderList();
+            },
+            //--分销订单
+            loadFenxiaoOrderList() {
+                let _this = this;
+                let data=_this.getRequestParam();
+                data.pageSize=_this.fxyList.pageSize;
+                data.pageNum=_this.fxyList.currentPage;
+                AjaxProxy.requst({
+                    app: _this,
+                    data:data,
+                    url: basePath + '/fenXiao/fenXiaoOrder/loadFenxiaoOrderList',
+                    callback: function (data) {
+                        _this.fxyList.rows = data.rows;
+                        _this.fxyList.total = data.total;
+                        _this.loadFenxiaoOrderBasic();
+                    }
+                });
+            },
+            //查询参数
+            getRequestParam(){
+                let _this = this;
+                let startTime = '';
+                let endTime = '';
+                if(_this.form.ddsj.length > 0){
+                    startTime = _this.form.ddsj[0];
+                    endTime = _this.form.ddsj[1];
+                }
+                return   {
+                    orderType:_this.form.orderType,
+                    ddType:_this.form.ddType,
+                    tgy:_this.form.tgy,
+                    userName:_this.form.userName,
+                    jsbh:_this.form.jsbh,
+                    startTime:startTime,
+                    endTime:endTime,
+                    ddh:_this.form.ddh,
+                    order:_this.form.order,
+                    sort:_this.form.sort,
+                }
+            },
+            //查询
+            search:function(){
+                this.fxyList.currentPage=1;
+                this.loadFenxiaoOrderList();
+            },
+            //重置
+            resetForm(formName) {
+                this.$refs[formName].resetFields();
+            },
+            changePageSize(val) {
+                this.fxyList.pageSize = val;
+                this.loadFenxiaoOrderList();
+            },
+            changeCurrentPage(val) {
+                this.fxyList.currentPage = val;
+                this.loadFenxiaoOrderList();
+            },
+            //排序
+            sortChange:function (column){
+                if(column.order){
+                    if(column.order.indexOf("desc")){
+                        this.form.order="desc";
+                    }else{
+                        this.form.order="asc";
+                    }
+                    this.form.sort=column.prop;
+                    this.loadInfo();
+                }
+            },
+            //选择
+            handleSelectionChange(val) {
+                let _this = this;
+                _this.multipleSelection = val;
+                //拼接出一个逗号隔开的字符串
+                let submitDate = "";
+                let orderNum = 0;
+                let orderBalance = 0;
+                let orderNumsDone = 0;
+                let name = [];
+                for (let i = 0; i < _this.multipleSelection.length; i++) {
+                    let order = _this.multipleSelection[i];
+                    //待审核的计算到弹出框
+                    let orderState = order.orderState;
+                    let settleType = order.settleType;
+                    if((orderState == 4 || orderState == 5) && settleType == 1){
+                        let orderId = order.id;
+                        name.push(order.customUserId);
+                        orderNum = orderNum + 1;
+                        orderBalance = orderBalance + order.profitBalance;
+                        submitDate = submitDate +orderId+",";
+                    }else{
+                        orderNumsDone = orderNumsDone + 1;
+                    }
+                }
+                _this.orderNumsDones = orderNumsDone;
+                _this.orderIds = submitDate;
+                _this.orderNums = orderNum;
+                _this.formSelect.jsdds = orderNum;
+                _this.formSelect.jsje = orderBalance;
+                _this.formSelect.jsrs = _this.distinctFunction(name).length;
+            },
+            //去重
+            distinctFunction(name){
+                var arr = name,
+                    result = [],
+                    i,
+                    j,
+                    len = arr.length;
+                for(i = 0; i < len; i++){
+                    for(j = i + 1; j < len; j++){
+                        if(arr[i] === arr[j]){
+                            j = ++i;
+                        }
+                    }
+                    result.push(arr[i]);
+                }
+                return result;
+            },
+            //批量结算
+            setOrderDone() {
+                if(this.orderNumsDones > 0){
+                    this.$message({
+                        message: '【待评价】和【已评价】状态下的【待结算】订单,才允许结算',
+                        type: 'warning'
+                    });
+                }else if(this.orderNums > 0){
+                    this.dialogFormVisible = true;
+                }else{
+                    this.$message({
+                        message: '至少需要选中一条数据',
+                        type: 'warning'
+                    });
+                }
+            },
+            updateSetOrderDone(){
+                let _this = this;
+                let obj = {
+                    orderIds: _this.orderIds,
+                    setType: _this.formSelect.jsfs,
+                    manCount: _this.formSelect.jsrs,
+                    orderCount: _this.formSelect.jsdds,
+                    amount: _this.formSelect.jsje,
+                    remark: _this.formSelect.bz,
+                }
+                AjaxProxy.requst({
+                    app: _this,
+                    data:obj,
+                    url: basePath + '/fenXiao/fenXiaoOrder/updateSetOrderDone',
+                    callback: function (data) {
+                        _this.$message.success(data.info);
+                        _this.loadFenxiaoOrderList();
+                        _this.dialogFormVisible = false;
+                    }
+                });
+            },
+        }
+    })
+</script>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-setting.html b/zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-setting.html
new file mode 100644
index 0000000..888cad5
--- /dev/null
+++ b/zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-setting.html
@@ -0,0 +1,565 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
+<head>
+    <meta charset="utf-8">
+    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta http-equiv="Cache-Control" content="no-siteapp"/>
+    <!-- 本框架基本脚本和样式 -->
+    <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
+    <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
+    <link rel="stylesheet" th:href="@{/plugin/bootstrap-3.3.5/css/bootstrap.min.css}">
+    <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
+</head>
+
+<body>
+<div class="ibox-content" id="app" v-cloak>
+    <el-form label-width="120px" >
+        <el-row>
+            <p class="el-big-title">分销设置</p>
+        </el-row>
+        <el-row style="margin-top: 20px;">
+            <el-col>
+                <template v-for="paramSettingOne in fxkg">
+                    <el-form-item>
+                        <span slot="label">{{paramSettingOne.paramName}}</span>
+                        <el-col >
+                            <el-radio-group v-model="paramSettingOne.paramValue">
+                                <el-radio v-model="paramSettingOne.paramValue" :label="'1'">开启分销</el-radio>
+                                <el-radio v-model="paramSettingOne.paramValue" :label="'2'">关闭分销</el-radio>
+                            </el-radio-group>
+                        </el-col>
+                    </el-form-item >
+                </template>
+            </el-col>
+        </el-row>
+
+        <el-row style="margin-top: 20px;">
+            <el-col>
+                <template v-for="paramSettingzgfy in zgfy">
+                    <el-form-item>
+                        <span slot="label">{{paramSettingzgfy.paramName}}</span>
+                        <el-col>
+                            <el-radio-group v-model="paramSettingzgfy.paramValue">
+                                <el-radio :label="'1'">是</el-radio>
+                                <el-radio :label="'2'">否</el-radio>
+                            </el-radio-group>
+                        </el-col>
+                    </el-form-item >
+                </template>
+            </el-col>
+        </el-row>
+
+        <el-row style="margin-top: 20px;">
+            <el-col>
+                <template v-for="paramSettingTwo in fxms">
+                    <el-form-item>
+                        <span slot="label">{{paramSettingTwo.paramName}}</span>
+                        <el-col>
+                            <el-radio-group v-model="paramSettingTwo.paramValue">
+                                <el-radio :label="'1'">一级分销</el-radio>
+                                <el-radio :label="'2'">二级分销</el-radio>
+                            </el-radio-group>
+                        </el-col>
+                    </el-form-item >
+                </template>
+            </el-col>
+        </el-row>
+
+        <el-row style="margin-top: 20px;">
+            <el-col>
+                <template v-for="paramSettingThree in sqfs">
+                    <el-form-item>
+                        <span slot="label">{{paramSettingThree.paramName}}</span>
+                        <el-col>
+                            <el-radio-group v-model="paramSettingThree.paramValue" @change="sqfsChange">
+                                <div style="margin-top: 12px;"><el-radio :label="'1'">无需申请满足条件自动成为分销员</el-radio></div>
+                                <div style="margin-top: 20px;"><el-radio :label="'2'">需要客户主动申请</el-radio></div>
+                            </el-radio-group>
+                        </el-col>
+                    </el-form-item >
+                </template>
+            </el-col>
+        </el-row>
+
+        <el-row v-show="isShow" style="margin-top: 20px;">
+            <el-col>
+                <template v-for="paramSettingFive in sqtj">
+                    <el-form-item>
+                        <span slot="label">{{paramSettingFive.paramName}}</span>
+                        <el-col>
+                            <el-radio-group v-model="paramSettingFive.paramValue">
+                                <div style="margin-top: 12px;"><el-radio :label="'1'">无条件注册即可成为分销员</el-radio></div>
+                                <div style="margin-top: 25px;"><el-radio :label="'2'">消费任意产品可成为分销员</el-radio></div>
+                                <div style="margin-top: 25px;display:flex;align-items: center;">
+                                    <el-radio :label="'3'">消费指定产品可成为分销员</el-radio>
+                                    <div style="display:flex;align-items: center;">
+                                        <el-button type="primary" @click="drawer = true">设置产品</el-button>
+                                        <el-input  style="width:100px;display: none;" v-model="paramSettingFive.paramValue1"></el-input>
+                                        <el-input  style="width:100px;display: none;" v-model="cpid"></el-input>
+                                    </div>
+                                </div>
+                                <div style="margin-top: 25px;display:flex;align-items: center;">
+                                    <el-radio :label="'4'">消费指定金额可成为分销员</el-radio>
+                                    <div style="display:flex;align-items: center;">
+                                        <el-input style="width:100px;" v-model="paramSettingFive.paramValue2" oninput ="value=value.replace(/[^0-9.]/g,'')"></el-input>
+                                        <div style="font-size: 14px;align-items: center;">元</div>
+                                    </div>
+                                </div>
+                            </el-radio-group>
+                        </el-col>
+                    </el-form-item >
+                </template>
+            </el-col>
+        </el-row>
+
+        <el-row style="margin-top: 20px;">
+            <el-col>
+                <template v-for="paramSettingFour in shfs">
+                    <el-form-item>
+                        <span slot="label">{{paramSettingFour.paramName}}</span>
+                        <el-col>
+                            <el-radio-group v-model="paramSettingFour.paramValue">
+                                <div style="margin-top: 12px;"><el-radio :label="'1'">系统自动审核</el-radio></div>
+                                <div style="margin-top: 20px;"><el-radio :label="'2'">人工审核</el-radio></div>
+                            </el-radio-group>
+                        </el-col>
+                    </el-form-item >
+                </template>
+            </el-col>
+        </el-row>
+
+
+        <el-drawer
+                title="分销产品"
+                :visible.sync="drawer"
+                :direction="direction"
+                size="90%"
+        >
+            <el-row style="margin-left: 50px;">
+                <el-col :span="24">
+                    <el-row class="vertical  ">
+                        <el-input class="searchInput" @input="searchGoods()" v-model="queryKey"
+                                  placeholder="搜索添加产品"></el-input>
+                        <el-button @click="searchGoods()" type="primary">搜索</el-button>
+                    </el-row>
+
+                    <div class="searchResultTable" style="width: 50%" v-show="showSearchTable">
+                        <!-- 搜索加载数据表格 -->
+                        <el-table
+                                ref="dataTable"
+                                v-loading="loading"
+                                element-loading-text="拼命加载中"
+                                element-loading-spinner="el-icon-loading"
+                                element-loading-background="rgba(0, 0, 0, 0.8)"
+                                @selection-change="handleSelectionChange"
+                                @row-click="handleClickTableRow"
+                                :max-height="400"
+                                :data="searchTableData"
+                                style="width: 100%">
+                            <el-table-column
+                                    type="selection"
+                                    width="50">
+                            </el-table-column>
+                            <el-table-column
+                                    prop="id"
+                                    label="ID">
+                            </el-table-column>
+
+                            <el-table-column
+                                    prop="title"
+                                    label="产品名称">
+                            </el-table-column>
+                            <el-table-column
+                                    prop="price"
+                                    label="价格">
+                            </el-table-column>
+                            <el-table-column
+                                    prop="score"
+                                    label="积分">
+                            </el-table-column>
+                            <el-table-column
+                                    prop="attrValues"
+                                    label="产品属性">
+                            </el-table-column>
+                            <el-table-column
+                                    label="是否上架">
+                                <template slot-scope="scope">
+                                    <span v-if="scope.row.status == 1">是</span>
+                                    <span v-if="scope.row.status == 2">否</span>
+                                </template>
+                            </el-table-column>
+                            <el-table-column
+                                    width="150"
+                                    prop="address"
+                                    label="操作">
+                                <template slot-scope="scope">
+                                    <el-button type="primary"
+                                               size="mini"
+                                               @click="handleEdit(scope.$index, scope.row)">选择
+                                    </el-button>
+                                </template>
+                            </el-table-column>
+                        </el-table>
+                        <el-row class="btn-box">
+                            <el-button size="mini" type="danger" @click="closeXm()">关闭</el-button>
+                            <el-button size="mini" type="primary" @click="chouseGoods()">确认</el-button>
+                        </el-row>
+                    </div>
+
+                    <el-row class="mt-10">
+                        <el-table
+                                :stripe="true"
+                                :border="true"
+                                :height="tableHeight"
+                                :data="order"
+                                style="width: 100%">
+                            <el-table-column
+                                    type="index"
+                                    width="50">
+                            </el-table-column>
+                            <el-table-column
+                                    prop="id"
+                                    width="280"
+                                    label="产品ID">
+                            </el-table-column>
+                            <el-table-column
+                                    prop="title"
+                                    width="280"
+                                    label="产品名称">
+                            </el-table-column>
+                            <el-table-column
+                                    prop="attrValues"
+                                    width="80"
+                                    label="产品属性">
+                            </el-table-column>
+                            <el-table-column
+                                    prop="price"
+                                    label="单价">
+                            </el-table-column>
+                            <el-table-column
+                                    prop="address"
+                                    label="操作">
+                                <template slot-scope="scope">
+                                    <el-button type="primary"
+                                               size="mini"
+                                               @click="removeItem(scope.$index, scope.row)">删除
+                                    </el-button>
+                                </template>
+                            </el-table-column>
+                        </el-table>
+
+                    </el-row>
+                    <el-row class="mt-20 vertical">
+                        <el-col :span="14" class="btn-box">
+                            <el-button type="primary" @click="submitOrder()">保存</el-button>
+                            <el-button type="danger" @click="drawer = false">取消</el-button>
+                        </el-col>
+                    </el-row>
+                </el-col>
+            </el-row>
+        </el-drawer>
+        <el-row justify="center" type="flex">
+            <el-button type="primary" @click="submit()">保存</el-button>
+        </el-row>
+    </el-form>
+</div>
+</body>
+<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/bootstrap-3.3.5/js/bootstrap.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
+
+<script>
+    var app = new Vue({
+        el: '#app',
+        data: {
+            cpid:"",
+            //业绩设置框
+            drawer: false,
+            direction: 'rtl',
+            order: [],
+            tableHeight: 500,
+            /*****搜索表格数据*********/
+            //搜索关键词
+            queryKey: '',
+            //是否展示搜索表格
+            showSearchTable: false,
+            //搜索表格数据
+            searchTableData: [],
+            //表格加载效果
+            loading: false,
+            /******搜索表格数据END********/
+            val:'',
+            isShow:true,
+            fxkg:[],
+            fxms:[],
+            sqfs:[],
+            shfs:[],
+            sqtj:[],
+            zgfy:[],
+        },
+        created: function () {
+            this.loadInfo();
+        },
+        mounted: function () {
+        },
+
+        methods: {
+            //加载分类
+            loadInfo() {
+                let _this = this;
+                _this.loadParamSetting();
+            },
+            sqfsChange(val){
+                let _this = this;
+                _this.isShow=(val==2)?true:false;
+            },
+            loadParamSetting() {
+                let _this = this;
+                //加载配置
+                AjaxProxy.requst({
+                    app: _this,
+                    data: {},
+                    url: basePath + '/fenXiao/ruleSetting/selectFenXiaoSetting',
+                    callback: function (data) {
+                        _this.fxkg = data.mapInfo.fxkg;
+                        _this.fxms = data.mapInfo.fxms;
+                        _this.sqfs = data.mapInfo.sqfs;
+                        _this.zgfy = data.mapInfo.zgfy;
+                        if(_this.sqfs.length > 0){
+                            let paramssqfs = _this.sqfs[0].paramValue;
+                            if(paramssqfs == 2){
+                                _this.isShow = true;
+                            }else{
+                                _this.isShow = false;
+                            }
+                        }
+                        _this.shfs = data.mapInfo.shfs;
+                        _this.sqtj = data.mapInfo.sqtj;
+                        _this.order = data.mapInfo.order;
+                    }
+                });
+            },
+            setSelectGoods(data){
+                console.log(data);
+            },
+
+            //选择产品
+            handleEdit(index, row) {
+                this.pushToSelectGoods(row);
+            },
+            pushToSelectGoods(goods) {
+
+                //判断是否被选中
+                let selected = false;
+                for(let i = 0; i < this.order.length; i++){
+                    if (this.order[i].id === goods.id) {
+                        selected = true;
+                        return;
+                    }
+                }
+                if (!selected) {
+                    //未选中产品加入列表
+                    let item = {};
+                    item.ShopProduct = goods;
+                    item.goodsId = goods.id;
+                    item.count = 1;
+                    this.order.push(item.ShopProduct);
+                }
+
+            },
+
+            /**
+             * 点击多选
+             */
+            handleSelectionChange(val) {
+                this.multipleSelection = val;
+            },
+            /**
+             * 提交表单订单
+             * submitType 1 提交,2保存
+             */
+            submitOrder(submitType) {
+                let _this = this;
+                let submitDate ="";
+                for (let i = 0; i < _this.order.length; i++) {
+                    let ShopProduct = _this.order[i];
+                    let goodsId = ShopProduct.id;
+                    submitDate = submitDate +goodsId+",";
+                }
+                _this.cpid = submitDate;
+                _this.drawer = false;
+            },
+            /**
+             * 批量选择产品
+             */
+            chouseGoods() {
+                let _this = this;
+                this.closeXm();
+            },
+            /**
+             * 行点击事件
+             */
+            handleClickTableRow(row, event, column) {
+                this.pushToSelectGoods(row);
+            },
+            /**
+             * 删除组合产品
+             */
+            removeItem(index, row) {
+                this.order.splice(index, 1);
+            },
+            /**
+             * 搜索项目绑定的产品信息
+             */
+            searchGoods() {
+                let _this = this;
+                if (this.queryKey && this.queryKey.trim().length > 0) {
+                    this.showSearchTable = true;
+                    this.loading = true;
+                    AjaxProxy.requst({
+                        app: _this,
+                        contentType: 'application/x-www-form-urlencoded',
+                        //TODO 优化下拉加载
+                        data: {name: _this.queryKey, limit: 10000},
+                        url: basePath + "/fenXiao/ruleSetting/selectProduct",
+                        callback: function (data) {
+                            _this.searchTableData = data.rows;
+                            _this.loading = false;
+                        }
+                    });
+                } else {
+                    this.showSearchTable = false;
+                }
+            },
+            closeXm() {
+                this.showSearchTable = false;
+            },
+
+            submit() {
+                console.log("提交");
+                let _this = this;
+                let submitDate = [];
+                for (let i = 0; i < _this.fxkg.length; i++) {
+                    let paramSetting = _this.fxkg[i];
+                    let paramCode = paramSetting.paramCode;
+                    let paramValue = paramSetting.paramValue;
+                    let paramValue1 = paramSetting.paramValue1;
+                    let paramValue2 = paramSetting.paramValue2;
+
+                    let obj = {
+                        paramCode: paramCode,
+                        paramValue: paramValue,
+                        paramValue1: paramValue1,
+                        paramValue2: paramValue2,
+                    }
+                    submitDate.push(obj);
+                }
+                for (let i = 0; i < _this.zgfy.length; i++) {
+                    let paramSetting = _this.zgfy[i];
+                    let paramCode = paramSetting.paramCode;
+                    let paramValue = paramSetting.paramValue;
+                    let paramValue1 = paramSetting.paramValue1;
+                    let paramValue2 = paramSetting.paramValue2;
+
+                    let obj = {
+                        paramCode: paramCode,
+                        paramValue: paramValue,
+                        paramValue1: paramValue1,
+                        paramValue2: paramValue2,
+                    }
+                    submitDate.push(obj);
+                }
+                for (let i = 0; i < _this.fxms.length; i++) {
+                    let paramSetting = _this.fxms[i];
+                    let paramCode = paramSetting.paramCode;
+                    let paramValue = paramSetting.paramValue;
+                    let paramValue1 = paramSetting.paramValue1;
+                    let paramValue2 = paramSetting.paramValue2;
+
+                    let obj = {
+                        paramCode: paramCode,
+                        paramValue: paramValue,
+                        paramValue1: paramValue1,
+                        paramValue2: paramValue2,
+                    }
+                    submitDate.push(obj);
+                }
+                for (let i = 0; i < _this.sqfs.length; i++) {
+                    let paramSetting = _this.sqfs[i];
+                    let paramCode = paramSetting.paramCode;
+                    let paramValue = paramSetting.paramValue;
+                    let paramValue1 = paramSetting.paramValue1;
+                    let paramValue2 = paramSetting.paramValue2;
+
+                    let obj = {
+                        paramCode: paramCode,
+                        paramValue: paramValue,
+                        paramValue1: paramValue1,
+                        paramValue2: paramValue2,
+                    }
+                    submitDate.push(obj);
+                }
+                for (let i = 0; i < _this.shfs.length; i++) {
+                    let paramSetting = _this.shfs[i];
+                    let paramCode = paramSetting.paramCode;
+                    let paramValue = paramSetting.paramValue;
+                    let paramValue1 = paramSetting.paramValue1;
+                    let paramValue2 = paramSetting.paramValue2;
+
+                    let obj = {
+                        paramCode: paramCode,
+                        paramValue: paramValue,
+                        paramValue1: paramValue1,
+                        paramValue2: paramValue2,
+                    }
+                    submitDate.push(obj);
+                }
+                for (let i = 0; i < _this.sqtj.length; i++) {
+                    let paramSetting = _this.sqtj[i];
+                    let paramCode = paramSetting.paramCode;
+                    let paramValue = paramSetting.paramValue;
+                    let paramValue1;
+                    let paramValue2;
+                    if(paramValue === '3'){
+                        paramValue1 = _this.cpid;
+                    }else if(paramValue === '4'){
+                        paramValue2 = paramSetting.paramValue2;
+                    }
+                    let obj = {
+                        paramCode: paramCode,
+                        paramValue: paramValue,
+                        paramValue1: paramValue1,
+                        paramValue2: paramValue2,
+                    }
+                    submitDate.push(obj);
+                }
+
+                AjaxProxy.requst({
+                    app: _this,
+                    data: submitDate,
+                    url: basePath + '/fenXiao/ruleSetting/updateFenXiaoSetting',
+                    callback: function (data) {
+                        _this.$message({
+                            message: data.info,
+                            type: 'success',
+                            onClose: function () {
+                                _this.loadParamSetting();
+                            }
+                        });
+                    }
+                });
+            }
+        }
+    })
+</script>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-update.html b/zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-update.html
new file mode 100644
index 0000000..7611622
--- /dev/null
+++ b/zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-update.html
@@ -0,0 +1,672 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
+<head>
+    <meta charset="utf-8">
+    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta http-equiv="Cache-Control" content="no-siteapp"/>
+    <!-- 本框架基本脚本和样式 -->
+    <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
+    <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
+    <link rel="stylesheet" th:href="@{/plugin/bootstrap-3.3.5/css/bootstrap.min.css}">
+    <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
+
+    <!-- 富文本编辑器 -->
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/ueditor.config.js}"></script>
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/ueditor.all.js}">
+    </script>
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/lang/zh-cn/zh-cn.js}"></script>
+    <style>
+        .paginationStyle{
+            background: #ffffff;
+            padding: 10px 10px;
+            margin: 0px 0px 10px 0px;
+            text-align: right;
+        }
+        .el-aside {
+            color: #333;
+            line-height: 15px;
+        }
+        .el-main {
+            color: #333;
+            line-height: 15px;
+        }
+        .box-card {
+            width: 160px;
+            border-radius: 5px;
+            color: #ffffff;
+            padding: 5px 5px;
+            margin-right: 20px;
+            cursor: pointer;
+            float: right;
+        }
+        .el-card__body {
+            padding: 0px;
+        }
+    </style>
+</head>
+
+<body>
+<div class="ibox-content" id="app" v-cloak>
+    <el-container>
+        <el-aside width="60px" style="display:flex;align-items: center;">
+            <el-avatar :size="50" :src="basicdetail.avatarUrl" style="display:flex;align-items: center;margin-left: 10px"></el-avatar>
+        </el-aside>
+        <el-main>
+            <el-row style="display:flex;align-items: center;padding: 10px;">
+                <el-col :span="8" style="display:flex;align-items: center;">
+                    <span style="font-size: 20px;">{{basicdetail.nickname}} </span>
+                </el-col>
+                <el-col :span="6">
+                    <el-select v-model="basicdetail.grade" @focus="getDatalist()" @change="changeSaleManGrade(basicdetail.grade)" placeholder="请选择" filterable allow-create>
+                        <el-option v-for="item in salemanGradeList " :key="item.id" :label="item.name" :value="item.id"></el-option>
+                    </el-select>
+                </el-col>
+                <el-col :span="10">
+                </el-col>
+            </el-row>
+            <el-row style="display:flex;padding: 5px;">
+                <el-col>
+                    <span>
+                        手机号码:{{basicdetail.phone}}   |
+                        加入时间:{{basicdetail.createTime}}
+                    </span>
+                </el-col>
+            </el-row>
+            <el-row style="display:flex;padding: 5px;">
+                <el-col>
+                    <span>
+                        邀请人:{{basicdetail.parentUser}}   |
+                        来源:
+                            <span v-if="basicdetail.applyWay == 1">自主申请</span>
+                            <span v-if="basicdetail.applyWay == 2">自动添加</span>
+                            <span v-if="basicdetail.applyWay == 3">上级邀请</span>
+                            <span v-if="basicdetail.applyWay == 4">手动添加</span>   |
+                        状态:
+                            <span v-if="basicdetail.applyStatus == 1">待审核</span>
+                            <span v-if="basicdetail.applyStatus == 2">通过</span>
+                            <span v-if="basicdetail.applyStatus == 3">未通过</span>
+                    </span>
+                </el-col>
+            </el-row>
+        </el-main>
+        <el-main>
+            <el-row>
+                <el-row style="display:flex;align-items: center;text-align: center;">
+                    <el-card class="box-card" style="background-color: #0f9aef;">
+                        <div style="padding:10px;font-size: 20px;">{{basicdetail.lowerLevelNum}}人</div>
+                        <div>绑定客户</div>
+                    </el-card >
+                    <el-card class="box-card" style="background: #67C23A;">
+                        <div style="padding:10px;font-size: 20px;">{{basicdetail.invitedNum}}人</div>
+                        <div>邀请下级</div>
+                    </el-card >
+                    <el-card class="box-card" style="background: rgb(121, 187, 255);">
+                        <div style="padding:10px;font-size: 20px;">{{basicdetail.totalRevenue}}元</div>
+                        <div>累计收益</div>
+                    </el-card >
+                    <el-card class="box-card" style="background: rgb(93 191 45);">
+                        <div style="padding:10px;font-size: 20px;">{{basicdetail.balance}}元</div>
+                        <div>待结算</div>
+                    </el-card >
+                </el-row>
+            </el-row>
+        </el-main>
+    </el-container>
+
+    <el-row>
+        <el-tabs v-model="activeName" >
+            <el-tab-pane label="绑定客户" name="first">
+                <el-row style="display:flex;align-items: center;text-align: right;">
+                    <el-col>
+                        <el-form ref="form" :model="form" inline >
+                            <el-form-item prop="userName" >
+                                <el-input v-model="form.userName" placeholder="请输入会员姓名"></el-input>
+                            </el-form-item>
+
+                            <el-button type="primary" @click="search" >搜索</el-button>
+                            <el-button @click="resetForm('form')">重置</el-button>
+                        </el-form>
+                    </el-col>
+                </el-row>
+                <el-row class="table-style" >
+                    <el-table id="proj" :data="fxyList.rows"  :height="height" stripe:true  @sort-change="sortChange">
+                        <el-table-column
+                                type="selection">
+                        </el-table-column>
+                        <el-table-column
+                                label="客户"
+                                show-overflow-tooltip>
+                            <template slot-scope="scope">
+                                <img :src="scope.row.avatarUrl" width="40" height="40" class="head_pic"/>
+                                {{scope.row.nickname}}
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                                prop="createTime"
+                                label="绑定时间"
+                                show-overflow-tooltip>
+                        </el-table-column>
+                        <el-table-column
+                                label="客户状态">
+                            <template slot-scope="scope">
+                                <span v-if="scope.row.doneNum == 0">已成交</span>
+                                <span v-if="scope.row.doneNum > 0">未成交</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column label="操作" width="240">
+                            <template slot-scope="scope">
+                                <el-row style="display:flex;">
+                                    <el-button type="primary" size="mini" @click="openExamineSaleMan(scope.row)">解绑</el-button>
+                                </el-row>
+                            </template>
+                        </el-table-column>
+                    </el-table>
+                </el-row>
+                <el-row class="paginationStyle"  >
+                    <el-pagination background
+                                   @size-change="changePageSize"
+                                   @current-change="changeCurrentPage"
+                                   :current-page="fxyList.currentPage"
+                                   :page-sizes="[10, 20, 30, 50]"
+                                   :page-size="fxyList.pageSize"
+                                   layout="total, sizes, prev, pager, next, jumper"
+                                   :total="fxyList.total">
+                    </el-pagination>
+                </el-row>
+            </el-tab-pane>
+
+            <el-tab-pane label="邀请下级" name="second">
+                <el-row style="display:flex;align-items: center;text-align: right;">
+                    <el-col>
+                        <el-form ref="formlow" :model="formlow" inline >
+                            <el-form-item prop="userName">
+                                <el-input v-model="formlow.userName" placeholder="请输入会员姓名"></el-input>
+                            </el-form-item>
+
+                            <el-button type="primary" @click="searchlow" >搜索</el-button>
+                            <el-button @click="resetFormlow('formlow')">重置</el-button>
+                        </el-form>
+                    </el-col>
+                </el-row>
+                <el-row class="table-style" >
+                    <el-table id="proj" :data="lowLevelList.rows"  :height="height" stripe:true  @sort-change="sortChange">
+                        <el-table-column
+                                type="selection">
+                        </el-table-column>
+                        <el-table-column
+                                label="客户">
+                            <template slot-scope="scope">
+                                <img :src="scope.row.avatarUrl" width="40" height="40" class="head_pic"/>
+                                {{scope.row.nickname}}
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                                prop="createTime"
+                                label="绑定时间">
+                        </el-table-column>
+                        <el-table-column
+                                label="绑定方式">
+                            <template slot-scope="scope">
+                                <span v-if="scope.row.applyWay == 1">自主申请</span>
+                                <span v-if="scope.row.applyWay == 2">自动添加</span>
+                                <span v-if="scope.row.applyWay == 3">上级邀请</span>
+                                <span v-if="scope.row.applyWay == 4">手动添加</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column label="操作" width="240">
+                            <template slot-scope="scope">
+                                <el-row style="display:flex;">
+                                    <el-button type="primary" size="mini" @click="openExamineSaleMan(scope.row)">解绑</el-button>
+                                </el-row>
+                            </template>
+                        </el-table-column>
+                    </el-table>
+                </el-row>
+                <el-row class="paginationStyle"  >
+                    <el-pagination background
+                                   @size-change="changePageSizelow"
+                                   @current-change="changeCurrentPagelow"
+                                   :current-page="lowLevelList.currentPage"
+                                   :page-sizes="[10, 20, 30, 50]"
+                                   :page-size="lowLevelList.pageSize"
+                                   layout="total, sizes, prev, pager, next, jumper"
+                                   :total="lowLevelList.total">
+                    </el-pagination>
+                </el-row>
+            </el-tab-pane>
+
+            <el-tab-pane label="收益订单" name="third">
+                <el-row style="display:flex;align-items: center;text-align: right;">
+                    <el-col>
+                        <el-form ref="formOrder" :model="formOrder" inline >
+                            <el-form-item label="结算状态" prop="orderType">
+                                <el-select v-model="formOrder.orderType" placeholder="请选择">
+                                    <el-option
+                                            v-for="item in orderTypeList"
+                                            :key="item.value"
+                                            :label="item.label"
+                                            :value="item.value"
+                                    >
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                            <el-form-item prop="userName">
+                                <el-input v-model="formOrder.userName" placeholder="请输入会员姓名"></el-input>
+                            </el-form-item>
+                            <el-button type="primary" @click="searchFormOrder" >搜索</el-button>
+                            <el-button @click="resetFormOrder('formOrder')">重置</el-button>
+                        </el-form>
+                    </el-col>
+                </el-row>
+                <el-row class="table-style" >
+                    <el-table id="proj" :data="orderLevelList.rows"  :height="height" stripe:true  @sort-change="sortChange">
+                        <el-table-column
+                                prop="orderNo"
+                                label="订单编号"
+                                show-overflow-tooltip>
+                        </el-table-column>
+                        <el-table-column
+                                prop="orderMoney"
+                                label="实付金额">
+                        </el-table-column>
+                        <el-table-column
+                                label="订单状态">
+                            <template slot-scope="scope">
+                                <span v-if="scope.row.orderState == 1">待付款</span>
+                                <span v-if="scope.row.orderState == 2">待配送</span>
+                                <span v-if="scope.row.orderState == 3">待收货</span>
+                                <span v-if="scope.row.orderState == 4">待评价</span>
+                                <span v-if="scope.row.orderState == 5">已评价</span>
+                                <span v-if="scope.row.orderState == 6">申请退款</span>
+                                <span v-if="scope.row.orderState == 7">退款成功</span>
+                                <span v-if="scope.row.orderState == 8">退款拒绝</span>
+                                <span v-if="scope.row.orderState == 9">已取消</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                                prop="storeName"
+                                label="下单门店"
+                                show-overflow-tooltip>
+                        </el-table-column>
+                        <el-table-column
+                                label="客户"
+                                show-overflow-tooltip>
+                            <template slot-scope="scope">
+                                <img :src="scope.row.avatarUrl" width="40" height="40" class="head_pic"/>
+                                {{scope.row.nickName}}
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                                prop="createTime"
+                                label="时间"
+                                show-overflow-tooltip>
+                        </el-table-column>
+                        <el-table-column
+                                label="收益类型">
+                            <template slot-scope="scope">
+                                <span v-if="scope.row.revenueType == 1">推广收益</span>
+                                <span v-if="scope.row.revenueType == 2">邀请收益</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                                prop="amount"
+                                label="收益金额">
+                        </el-table-column>
+                        <el-table-column
+                                label="结算状态">
+                            <template slot-scope="scope">
+                                <span v-if="scope.row.orderStatus == 1">待结算</span>
+                                <span v-if="scope.row.orderStatus == 2">已结算</span>
+                                <span v-if="scope.row.orderStatus == 3">已退款</span>
+                            </template>
+                        </el-table-column>
+                    </el-table>
+                </el-row>
+                <el-row class="paginationStyle"  >
+                    <el-pagination background
+                                   @size-change="changePageSizeOrder"
+                                   @current-change="changeCurrentPageOrder"
+                                   :current-page="orderLevelList.currentPage"
+                                   :page-sizes="[10, 20, 30, 50]"
+                                   :page-size="orderLevelList.pageSize"
+                                   layout="total, sizes, prev, pager, next, jumper"
+                                   :total="orderLevelList.total">
+                    </el-pagination>
+                </el-row>
+            </el-tab-pane>
+        </el-tabs>
+    </el-row>
+</div>
+</body>
+<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/bootstrap-3.3.5/js/bootstrap.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/layer/layer.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script>
+
+<script>
+    //获取传输的USERID对象
+    var userId = $.query.get("userId");
+    var applyId = $.query.get("applyId");
+
+    var app = new Vue({
+        el: '#app',
+        data: {
+            activeName: 'first',
+            basicdetail:{},
+            //绑定客户
+            form:{
+                userName:'',
+                order:'',
+                sort:''
+            },
+            salemanGradeList:[],
+            fxyList:{
+                rows:[],
+                total:0,
+                pageSize:10,
+                currentPage:1,
+            },
+            //邀请下级
+            formlow:{
+                userName:'',
+                order:'',
+                sort:''
+            },
+            lowLevelList:{
+                rows:[],
+                total:0,
+                pageSize:10,
+                currentPage:1,
+            },
+            //收益订单
+            formOrder:{
+                userName:'',
+                orderType:'',
+                order:'',
+                sort:''
+            },
+            //条件查询结算状态
+            orderTypeList:[
+                {value:'',label:'全部'},
+                {value:1,label:'待结算'},
+                {value:2,label:'已结算'},
+                {value:3,label:'已退款'}
+            ],
+            orderLevelList:{
+                rows:[],
+                total:0,
+                pageSize:10,
+                currentPage:1,
+            },
+            height:'calc(100vh - 400px)',
+        },
+
+        created: function () {
+            this.loadInfo();
+        },
+        mounted: function () {
+        },
+        methods: {
+            //加载分类
+            loadInfo() {
+                let _this = this;
+                _this.loadParamSettingBasic();
+                _this.loadParamSetting();
+                _this.loadParamSettinglow();
+                _this.loadParamSettingOrder();
+                _this.getDatalist();
+            },
+            //修改等级
+            changeSaleManGrade(id){
+                let _this = this;
+                let obj = {
+                    userId: userId,
+                    gradeId: id,
+                }
+                AjaxProxy.requst({
+                    app: _this,
+                    data:obj,
+                    url: basePath + '/fenXiao/fenXiaoUser/changeSaleManGrade',
+                    callback: function (data) {
+                        _this.$message.success(data.info);
+                        this.loadInfo();
+                    }
+                });
+            },
+            //加载基本数据信息
+            loadParamSettingBasic() {
+                let _this = this;
+                let data={
+                    userId:userId,
+                    applyId:applyId,
+                };
+                AjaxProxy.requst({
+                    app: _this,
+                    data:data,
+                    url: basePath + '/fenXiao/fenXiaoUser/loadParamSettingBasic',
+                    callback: function (data) {
+                        _this.basicdetail = data.mapInfo.basicdetail;
+                    }
+                });
+            },
+            //绑定客户
+            loadParamSetting() {
+                let _this = this;
+                let data=_this.getRequestParam();
+                data.pageSize=_this.fxyList.pageSize;
+                data.pageNum=_this.fxyList.currentPage;
+                AjaxProxy.requst({
+                    app: _this,
+                    data:data,
+                    url: basePath + '/fenXiao/fenXiaoUser/loadParamSetting',
+                    callback: function (data) {
+                        _this.fxyList.rows = data.mapInfo.customDetailRecords;
+                        _this.fxyList.total = data.mapInfo.customDetailTotal;
+                        _this.loadParamSettingBasic();
+                    }
+                });
+            },
+            //查询参数
+            getRequestParam(){
+                let _this = this;
+                return   {
+                    userName:_this.form.userName,
+                    order:_this.form.order,
+                    sort:_this.form.sort,
+                    userId:userId,
+                    applyId:applyId,
+                }
+            },
+            //查询
+            search:function(){
+                this.fxyList.currentPage=1;
+                this.loadParamSetting();
+            },
+            //重置
+            resetForm(formName) {
+                this.$refs[formName].resetFields();
+            },
+            changePageSize(val) {
+                this.fxyList.pageSize = val;
+                this.loadParamSetting();
+            },
+            changeCurrentPage(val) {
+                this.fxyList.currentPage = val;
+                this.loadParamSetting();
+            },
+            //邀请下级
+            loadParamSettinglow() {
+                let _this = this;
+                let data=_this.getRequestParamlow();
+                data.pageSize=_this.lowLevelList.pageSize;
+                data.pageNum=_this.lowLevelList.currentPage;
+                AjaxProxy.requst({
+                    app: _this,
+                    data:data,
+                    url: basePath + '/fenXiao/fenXiaoUser/loadParamSettinglow',
+                    callback: function (data) {
+                        _this.lowLevelList.rows = data.mapInfo.customLowRecords;
+                        _this.lowLevelList.total = data.mapInfo.customLowTotal;
+                        _this.loadParamSettingBasic();
+                    }
+                });
+            },
+            //查询参数
+            getRequestParamlow(){
+                let _this = this;
+                return   {
+                    userName:_this.formlow.userName,
+                    order:_this.formlow.order,
+                    sort:_this.formlow.sort,
+                    userId:userId,
+                    applyId:applyId,
+                }
+            },
+            //查询
+            searchlow:function(){
+                this.lowLevelList.currentPage=1;
+                this.loadParamSettinglow();
+            },
+            //重置
+            resetFormlow(formName) {
+                this.$refs[formName].resetFields();
+            },
+            changePageSizelow(val) {
+                this.lowLevelList.pageSize = val;
+                this.loadParamSettinglow();
+            },
+            changeCurrentPagelow(val) {
+                this.lowLevelList.currentPage = val;
+                this.loadParamSettinglow();
+            },
+
+            //收益订单
+            loadParamSettingOrder() {
+                let _this = this;
+                let data=_this.getRequestParamOrder();
+                data.pageSize=_this.orderLevelList.pageSize;
+                data.pageNum=_this.orderLevelList.currentPage;
+                AjaxProxy.requst({
+                    app: _this,
+                    data:data,
+                    url: basePath + '/fenXiao/fenXiaoUser/loadParamSettingOrder',
+                    callback: function (data) {
+                        _this.orderLevelList.rows = data.mapInfo.orderRecords;
+                        _this.orderLevelList.total = data.mapInfo.orderTotal;
+                        _this.loadParamSettingBasic();
+                    }
+                });
+            },
+            //查询参数
+            getRequestParamOrder(){
+                let _this = this;
+                return   {
+                    userName:_this.formOrder.userName,
+                    orderType:_this.formOrder.orderType,
+                    order:_this.formOrder.order,
+                    sort:_this.formOrder.sort,
+                    userId:userId,
+                    applyId:applyId,
+                }
+            },
+            //查询
+            searchFormOrder:function(){
+                this.orderLevelList.currentPage=1;
+                this.loadParamSettingOrder();
+            },
+            //重置
+            resetFormOrder(formName) {
+                this.$refs[formName].resetFields();
+            },
+            changePageSizeOrder(val) {
+                this.orderLevelList.pageSize = val;
+                this.loadParamSettingOrder();
+            },
+            changeCurrentPageOrder(val) {
+                this.orderLevelList.currentPage = val;
+                this.loadParamSettingOrder();
+            },
+
+            // select下拉框获取焦点的时候下拉框数据源---分销员等级
+            getDatalist() {
+                let _this = this;
+                AjaxProxy.requst({
+                    app: _this,
+                    data:[],
+                    url: basePath + '/fenXiao/fenXiaoUser/getShopSalesmanGrade',
+                    callback: function (data) {
+                        _this.salemanGradeList = data.mapInfo.salesGrade;
+                    }
+                });
+            },
+            sortChange:function (column){
+                if(column.order){
+                    if(column.order.indexOf("desc")){
+                        this.form.order="desc";
+                    }else{
+                        this.form.order="asc";
+                    }
+                    this.form.sort=column.prop;
+                    this.loadInfo();
+                }
+            },
+            //解绑
+            openExamineSaleMan(row) {
+                this.$confirm('是否解绑?', '解绑', {
+                    distinguishCancelAndClose: true,//设置关闭按钮和不通过按钮的区别
+                    confirmButtonText: '同意',
+                    cancelButtonText: '取消',
+                    type: 'info'
+                }).then(() => {
+                    //通过
+                    console.log("conform");
+                    this.unbundlingSaleMan(row);
+                }).catch(action => {
+                    //不通过
+                    if(action === 'cancel'){
+                        console.log("cancel");
+                    }else{
+                        //关闭按钮
+                        console.log("close");
+                    }
+                });
+            },
+            unbundlingSaleMan(row){
+                let _this = this;
+                let userId = row.userId;
+                let obj = {
+                    userId: userId,
+                }
+                AjaxProxy.requst({
+                    app: _this,
+                    data:obj,
+                    url: basePath + '/fenXiao/fenXiaoUser/unbundlingSaleMan',
+                    callback: function (data) {
+                        _this.$message.success(data.info);
+                        if(_this.activeName == "first"){
+                            _this.loadParamSetting();
+                        }
+                        if(_this.activeName == "second"){
+                            _this.loadParamSettinglow();
+                        }
+                    }
+                });
+            },
+        }
+    })
+</script>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-user.html b/zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-user.html
new file mode 100644
index 0000000..2e975b3
--- /dev/null
+++ b/zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-user.html
@@ -0,0 +1,770 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
+<head>
+    <meta charset="utf-8">
+    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta http-equiv="Cache-Control" content="no-siteapp"/>
+    <!-- 本框架基本脚本和样式 -->
+    <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
+    <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
+    <link rel="stylesheet" th:href="@{/plugin/bootstrap-3.3.5/css/bootstrap.min.css}">
+    <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
+
+    <!-- 富文本编辑器 -->
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/ueditor.config.js}"></script>
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/ueditor.all.js}">
+    </script>
+    <script type="text/javascript" charset="utf-8"
+            th:src="@{/plugin/beditor/lang/zh-cn/zh-cn.js}"></script>
+    <style>
+        .panel-body{
+            overflow: hidden;
+        }
+        .paginationStyle{
+            background: #ffffff;
+            padding: 10px 10px;
+            margin: 0px 0px 10px 0px;
+            text-align: right;
+        }
+        .avatar-uploader .el-upload {
+            border: 1px dashed #d9d9d9;
+            border-radius: 6px;
+            cursor: pointer;
+            position: relative;
+            overflow: hidden;
+        }
+        .avatar-uploader .el-upload:hover {
+            border-color: #409EFF;
+        }
+        .avatar-uploader-icon {
+            font-size: 28px;
+            color: #8c939d;
+            width: 178px;
+            height: 178px;
+            line-height: 178px;
+            text-align: center;
+        }
+        .avatar {
+            width: 178px;
+            height: 178px;
+            display: block;
+        }
+    </style>
+</head>
+
+<body>
+<div class="panel-body" id="app" v-cloak>
+        <el-row>
+            <el-tabs v-model="activeName" >
+                <el-tab-pane label="分销员管理" name="first">
+                    <el-row >
+                        <el-col :span="6" style="display:flex;align-items: center;">
+                            <el-button type="primary" @click="addSaleMan()">新增分销员</el-button>
+                        </el-col>
+                        <el-col :span="12" style="display: flex;align-items: center;">
+                            <el-form ref="form" :model="form" inline >
+                                <el-form-item label="审核状态" prop="shenheState">
+                                    <el-select v-model="form.shenheState" placeholder="请选择">
+                                        <el-option
+                                                v-for="item in shenheStateList"
+                                                :key="item.value"
+                                                :label="item.label"
+                                                :value="item.value"
+                                        >
+                                        </el-option>
+                                    </el-select>
+                                </el-form-item>
+                                <el-form-item label="分销员等级" prop="salemanGrade">
+                                    <el-select v-model="form.salemanGrade"  placeholder="请选择" filterable allow-create>
+                                        <el-option v-for="item in salemanGradeList " :key="item.id" :label="item.name" :value="item.id">
+                                        </el-option>
+                                    </el-select>
+                                </el-form-item>
+                                <el-form-item prop="userName">
+                                    <el-input v-model="form.userName" placeholder="请输入会员姓名"></el-input>
+                                </el-form-item>
+                            </el-form>
+                        </el-col>
+                        <el-col :span="6" style="display:flex;align-items: center;">
+                            <el-button type="primary" @click="search" >搜索</el-button>
+                            <el-button @click="resetForm('form')">重置</el-button>
+                        </el-col>
+                    </el-row>
+                    <el-row class="table-style" >
+                            <el-table id="proj" :data="fxyList.rows"  :height="height" stripe:true  @sort-change="sortChange">
+                                <el-table-column
+                                        type="selection">
+                                </el-table-column>
+                                <el-table-column
+                                        label="分销员"
+                                        show-overflow-tooltip
+                                        width="150">
+                                    <template slot-scope="scope">
+                                        <img :src="scope.row.avatarUrl" width="40" height="40" class="head_pic"/>
+                                        {{scope.row.nickname}}
+                                    </template>
+                                </el-table-column>
+                                <el-table-column
+                                        prop="parentUserNow"
+                                        label="当前上级">
+                                </el-table-column>
+                                <el-table-column
+                                        prop="lowerLevelNum"
+                                        label="推广客户">
+                                </el-table-column>
+                                <el-table-column
+                                        prop="invitedNum"
+                                        label="邀请下级">
+                                </el-table-column>
+                                <el-table-column
+                                        prop="totalRevenue"
+                                        label="累计收益">
+                                </el-table-column>
+                                <el-table-column
+                                        prop="balance"
+                                        label="待结算">
+                                </el-table-column>
+                                <el-table-column
+                                        prop="grade"
+                                        label="等级">
+                                </el-table-column>
+                                <el-table-column
+                                        prop="createTime"
+                                        label="加入时间"
+                                        show-overflow-tooltip
+                                        :formatter="formatDate">
+                                </el-table-column>
+                                <el-table-column
+                                        label="状态">
+                                    <template slot-scope="scope">
+                                        <span v-if="scope.row.applyStatus == 1">待审核</span>
+                                        <span v-if="scope.row.applyStatus == 2">通过</span>
+                                        <span v-if="scope.row.applyStatus == 3">未通过</span>
+                                        <span v-if="scope.row.applyStatus == 4">系统删除</span>
+                                    </template>
+                                </el-table-column>
+                                <el-table-column
+                                        prop="parentUser"
+                                        label="注册邀请人">
+                                </el-table-column>
+                                <el-table-column
+                                        label="来源">
+                                    <template slot-scope="scope">
+                                        <span v-if="scope.row.applyWay == 1">自主申请</span>
+                                        <span v-if="scope.row.applyWay == 2">自动添加</span>
+                                        <span v-if="scope.row.applyWay == 3">上级邀请</span>
+                                        <span v-if="scope.row.applyWay == 4">手动添加</span>
+                                    </template>
+                                </el-table-column>
+                                <el-table-column label="操作" width="240">
+                                    <template slot-scope="scope">
+                                        <el-row style="display:flex;">
+                                            <el-button type="primary" v-if="scope.row.applyStatus == 1" size="mini" @click="openExamineSaleManApply(scope.row)">审核</el-button>
+                                            <el-button type="primary" v-if="scope.row.applyStatus == 2" size="mini" @click="openUpdateSaleManGrade(scope.row)">修改等级</el-button>
+                                            <el-button type="primary" size="mini" @click="openUpdateSaleManGrade(scope.row)">详情</el-button>
+                                            <el-button type="danger" v-if="scope.row.applyStatus == 2" size="mini" @click="delSaleManGradeApply(scope.row)">删除</el-button>
+                                        </el-row>
+                                    </template>
+                                </el-table-column>
+                            </el-table>
+                    </el-row>
+                    <el-row class="paginationStyle"  >
+                        <el-pagination background
+                                       @size-change="changePageSize"
+                                       @current-change="changeCurrentPage"
+                                       :current-page="fxyList.currentPage"
+                                       :page-sizes="[10, 20, 30, 50]"
+                                       :page-size="fxyList.pageSize"
+                                       layout="total, sizes, prev, pager, next, jumper"
+                                       :total="fxyList.total">
+                        </el-pagination>
+                    </el-row>
+                </el-tab-pane>
+
+                <el-tab-pane label="分佣方案" name="second">
+                    <el-row class="table-style" >
+                        <el-table id="proj" :data="fyfaList.rows"  :height="height">
+                            <el-table-column
+                                    prop="name"
+                                    label="方案名称">
+                                <template slot-scope="scope">
+                                    <el-input class="edit-input" v-model="scope.row.name" placeholder="方案名称"></el-input>
+                                </template>
+                            </el-table-column>
+                            <el-table-column
+                                    prop="sealesCommission"
+                                    label="自购返佣 %">
+                                <template slot-scope="scope">
+                                    <el-input class="edit-input" v-model="scope.row.selfCommission" oninput ="value=value.replace(/[^0-9.]/g,'')" placeholder="自购返佣"></el-input>
+                                </template>
+                            </el-table-column>
+                            <el-table-column
+                                    prop="sealesCommission"
+                                    label="推广提成 %">
+                                <template slot-scope="scope">
+                                    <el-input class="edit-input" v-model="scope.row.sealesCommission" oninput ="value=value.replace(/[^0-9.]/g,'')" placeholder="推广提成"></el-input>
+                                </template>
+                            </el-table-column>
+                            <el-table-column
+                                    prop="invitationCommission"
+                                    label="邀请提成 %">
+                                <template slot-scope="scope">
+                                    <el-input class="edit-input" v-model="scope.row.invitationCommission" oninput ="value=value.replace(/[^0-9.]/g,'')" placeholder="邀请提成"></el-input>
+                                </template>
+                            </el-table-column>
+                            <el-table-column
+                                    prop="gradeCondition"
+                                    label="等级条件(推广金额)">
+                                <template slot-scope="scope">
+                                    <el-input class="edit-input" v-model="scope.row.gradeCondition" oninput ="value=value.replace(/[^0-9.]/g,'')" placeholder="等级条件(推广金额)"></el-input>
+                                </template>
+                            </el-table-column>
+                            <el-table-column label="操作" width="240">
+                                <template slot-scope="scope">
+                                    <el-row style="display:flex;">
+                                        <el-button type="primary" v-if="scope.row.isDefault == 1" size="mini" @click="addFyfaReady()">新增</el-button>
+                                        <el-button type="primary" size="mini" @click="updateFyfa(scope.row)">保存</el-button>
+                                        <el-button type="danger" v-if="scope.row.isDefault == 2" size="mini" @click="delFyfa(scope.row)">删除</el-button>
+                                    </el-row>
+                                </template>
+                            </el-table-column>
+                        </el-table>
+                    </el-row>
+                    <el-row class="paginationStyle"  >
+                        <el-pagination background
+                                       @size-change="changePageSizelow"
+                                       @current-change="changeCurrentPagelow"
+                                       :current-page="fyfaList.currentPage"
+                                       :page-sizes="[10, 20, 30, 50]"
+                                       :page-size="fyfaList.pageSize"
+                                       layout="total, sizes, prev, pager, next, jumper"
+                                       :total="fyfaList.total">
+                        </el-pagination>
+                    </el-row>
+                </el-tab-pane>
+
+                <el-tab-pane label="推广文案" name="third">
+                    <p class="el-big-title">文案描述</p>
+                    <el-row justify="center" type="flex">
+                            <script style="height: 400px;width: 375px;" id="description" name="description"
+                                    type="text/plain">
+                            </script>
+                    </el-row>
+                    <el-row justify="center" type="flex">
+                        <el-button type="primary" size="mini" @click="wamsSubmit()">保存</el-button>
+                    </el-row>
+                </el-tab-pane>
+
+                <el-tab-pane label="推广图片" name="fourth">
+                    <p class="el-big-title">上传图片</p>
+                    <el-row justify="center" type="flex">
+                        <el-upload
+                                class="avatar-uploader"
+                                action="/admin/multipleUploadFile/doUpload"
+                                :show-file-list="false"
+                                :on-success="handleAvatarSuccess"
+                                :before-upload="beforeAvatarUpload">
+                            <img v-if="imageUrl" :src="imageUrl" class="avatar">
+                            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+                        </el-upload>
+                    </el-row>
+                    <el-row justify="center" type="flex">
+                        <el-button type="primary" size="mini" @click="tgtpSubmit()">保存</el-button>
+                    </el-row>
+                </el-tab-pane>
+
+            </el-tabs>
+        </el-row>
+</div>
+</body>
+<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/bootstrap-3.3.5/js/bootstrap.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/layer/layer.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script>
+
+<script>
+    //百度编辑器
+    var ue = {
+        initialFrameWidth :750
+    };
+    var app = new Vue({
+        el: '#app',
+        data: {
+            height:'calc(100vh - 240px)',
+            activeName: 'first',
+            fenxiaoGrade: "",
+            //推广文案
+            tgwa: {},
+            //图片上传
+            imageUrl: '',
+            //分佣方案
+            fyfaList:{
+                rows:[],
+                total:0,
+                pageSize:10,
+                currentPage:1,
+            },
+            //分销员管理
+            shenheAgreeType : 2,
+            shenheDisagreeType : 3,
+            form:{
+                shenheState:'',
+                salemanGrade:'',
+                userName:'',
+                order:'',
+                sort:''
+            },
+            //条件查询审核状态
+            shenheStateList:[
+                {value:'',label:'全部'},
+                {value:1,label:'未审核'},
+                {value:2,label:'通过'},
+                {value:3,label:'未通过'}
+            ],
+            //条件查询分销员等级
+            salemanGradeList:[],
+            fxyList:{
+                rows:[],
+                total:0,
+                pageSize:10,
+                currentPage:1,
+            },
+        },
+        created: function () {
+            this.loadInfo();
+            window.addEventListener("keydown", this.keydown);
+            //初始化编辑器
+            ue = UE.getEditor('description', {
+                toolbars: [
+                    [
+                        'anchor',
+                        'bold', //加粗
+                        'indent', //首行缩进
+                        'italic', //斜体
+                        'underline', //下划线
+                        'strikethrough', //删除线
+                        'subscript', //下标
+                        'fontborder', //字符边框
+                        'superscript', //上标
+                        'formatmatch', //格式刷
+                        'pasteplain', //纯文本粘贴模式
+                        'selectall', //全选
+                        'horizontal', //分隔线
+                        'removeformat', //清除格式
+                        'unlink', //取消链接
+                        'inserttitle', //插入标题
+                        'cleardoc', //清空文档
+                        'fontfamily', //字体
+                        'fontsize', //字号
+                        'paragraph', //段落格式
+                        'simpleupload', //单图上传
+                        'insertimage', //多图上传
+                        'link', //超链接
+                        'emotion', //表情
+                        'justifyleft', //居左对齐
+                        'justifyright', //居右对齐
+                        'justifycenter', //居中对齐
+                        'justifyjustify', //两端对齐
+                        'forecolor', //字体颜色
+                        'backcolor', //背景色
+                        'insertorderedlist', //有序列表
+                        'insertunorderedlist', //无序列表
+                        'fullscreen', //全屏
+                        'rowspacingtop', //段前距
+                        'rowspacingbottom', //段后距
+                        'imagecenter', //居中
+                        'lineheight', //行间距
+                        'customstyle', //自定义标题
+                        'autotypeset', //自动排版
+                        'background', //背景
+                    ]
+                ]});
+        },
+        mounted: function () {
+        },
+        methods: {
+            //加载分类
+            loadInfo() {
+                let _this = this;
+                _this.loadParamSetting();
+                _this.loadFyfaSetting();
+                _this.loadTgwaSetting();
+                _this.loadTgtpSetting();
+                _this.getSalemanGradeList();
+            },
+            //推广文案
+            loadTgwaSetting() {
+                let _this = this;
+                AjaxProxy.requst({
+                    app: _this,
+                    data:[],
+                    url: basePath + '/fenXiao/fenXiaoUser/loadTgwaSetting',
+                    callback: function (data) {
+                        _this.tgwa = data.mapInfo.tgwa;
+                        var ue = UE.getEditor('description');
+                        ue.ready(function() {//编辑器初始化完成再赋值
+                            ue.setContent(_this.tgwa.paramValue3);  //赋值给UEditor
+                        });
+                    }
+                });
+            },
+            wamsSubmit(){
+                let _this = this;
+                let tgfa = ue.getContent();
+                let data= {
+                    tgfa:tgfa,
+                };
+                AjaxProxy.requst({
+                    app: _this,
+                    data:data,
+                    url: basePath + '/fenXiao/fenXiaoUser/updateTgjh',
+                    callback: function (data) {
+                        _this.$message.success(data.info);
+                        _this.loadTgwaSetting();
+                    }
+                });
+            },
+            //图片上传
+            loadTgtpSetting() {
+                let _this = this;
+                AjaxProxy.requst({
+                    app: _this,
+                    data:[],
+                    url: basePath + '/fenXiao/fenXiaoUser/loadTgtpSetting',
+                    callback: function (data) {
+                        _this.imageUrl = data.mapInfo.tgtp.paramValue;
+                    }
+                });
+            },
+            tgtpSubmit(){
+                let _this = this;
+                let imageUrl = _this.imageUrl;
+                let data= {
+                    imageUrl:imageUrl,
+                };
+                AjaxProxy.requst({
+                    app: _this,
+                    data:data,
+                    url: basePath + '/fenXiao/fenXiaoUser/updateTgtp',
+                    callback: function (data) {
+                        _this.$message.success(data.info);
+                        _this.loadTgtpSetting();
+                    }
+                });
+            },
+            handleAvatarSuccess(res, file) {
+                this.imageUrl = res.path;
+            },
+            beforeAvatarUpload(file) {
+                const isJPG = file.type === 'image/jpeg';
+                const isLt2M = file.size / 1024 / 1024 < 2;
+
+                if (!isJPG) {
+                    this.$message.error('上传头像图片只能是 JPG 格式!');
+                }
+                if (!isLt2M) {
+                    this.$message.error('上传头像图片大小不能超过 2MB!');
+                }
+                return isJPG && isLt2M;
+            },
+            //分佣方案
+            loadFyfaSetting() {
+                let _this = this;
+                let data=_this.getRequestParam();
+                data.pageSize=_this.fyfaList.pageSize;
+                data.pageNum=_this.fyfaList.currentPage;
+                AjaxProxy.requst({
+                    app: _this,
+                    data:data,
+                    url: basePath + '/fenXiao/fenXiaoUser/findFyfaManageList',
+                    callback: function (data) {
+                        _this.fyfaList.rows = data.rows;
+                        _this.fyfaList.total = data.total;
+                    }
+                });
+            },
+            changePageSizelow(val) {
+                this.fyfaList.pageSize = val;
+                this.loadFyfaSetting();
+            },
+            changeCurrentPagelow(val) {
+                this.fyfaList.currentPage = val;
+                this.loadFyfaSetting();
+            },
+            //新增
+            addFyfaReady(){
+                let _this = this;
+                let fyfaReady = {};
+                _this.fyfaList.rows.push(fyfaReady);
+            },
+            // addFyfa(){
+            //     let _this = this;
+            //     AjaxProxy.requst({
+            //         app: _this,
+            //         data:[],
+            //         url: basePath + '/fenXiao/fenXiaoUser/addFyfa',
+            //         callback: function (data) {
+            //             _this.$message.success(data.info);
+            //             _this.loadFyfaSetting();
+            //         }
+            //     });
+            // },
+            updateFyfa(row){
+                let _this = this;
+                let id = row.id;
+                let name = row.name;
+                let sealesCommission = row.sealesCommission;
+                let selfCommission = row.selfCommission;
+                let invitationCommission = row.invitationCommission;
+                let gradeCondition = row.gradeCondition;
+                let obj = {
+                    id: id,
+                    name: name,
+                    sealesCommission: sealesCommission,
+                    selfCommission: selfCommission,
+                    invitationCommission: invitationCommission,
+                    gradeCondition: gradeCondition,
+                }
+                AjaxProxy.requst({
+                    app: _this,
+                    data:obj,
+                    url: basePath + '/fenXiao/fenXiaoUser/updateFyfa',
+                    callback: function (data) {
+                        _this.$message.success(data.info);
+                        _this.loadFyfaSetting();
+                    }
+                });
+            },
+            //删除
+            delFyfa(row){
+                let _this = this;
+                _this.$confirm('是否删除?', '删除', {
+                    distinguishCancelAndClose: true,//设置关闭按钮和不通过按钮的区别
+                    confirmButtonText: '确认',
+                    cancelButtonText: '取消',
+                    type: 'info'
+                }).then(() => {
+                    //通过
+                    _this.delFyfaApply(row);
+
+                }).catch(action => {
+                    //不通过
+                    if(action === 'cancel'){
+                        console.log("cancel");
+                    }else{
+                        //关闭按钮
+                        console.log("close");
+                        //this.$message({type: 'info',message: ''})
+                    }
+                });
+            },
+            delFyfaApply(row){
+                let _this = this;
+                let id = row.id;
+                let obj = {
+                    gradeId: id,
+                }
+                AjaxProxy.requst({
+                    app: _this,
+                    data:obj,
+                    url: basePath + '/fenXiao/fenXiaoUser/delFyfaApply',
+                    callback: function (data) {
+                        _this.$message.success(data.info);
+                        _this.loadFyfaSetting();
+                    }
+                });
+            },
+            //分销员管理
+            loadParamSetting() {
+                let _this = this;
+                let data=_this.getRequestParam();
+                data.pageSize=_this.fxyList.pageSize;
+                data.pageNum=_this.fxyList.currentPage;
+                AjaxProxy.requst({
+                    app: _this,
+                    data:data,
+                    url: basePath + '/fenXiao/fenXiaoUser/findShopSalesmanApplyList',
+                    callback: function (data) {
+                        _this.fxyList.rows = data.rows;
+                        _this.fxyList.total=data.total;
+                    }
+                });
+            },
+            // 下拉框数据源---分销员等级
+            getSalemanGradeList() {
+                let _this = this;
+                AjaxProxy.requst({
+                    app: _this,
+                    data:[],
+                    url: basePath + '/fenXiao/fenXiaoUser/getShopSalesmanGrade',
+                    callback: function (data) {
+                        _this.salemanGradeList = data.mapInfo.salesGrade;
+                    }
+                });
+            },
+            getRequestParam(){
+                let _this = this;
+                return   {
+                    shenheState:_this.form.shenheState,
+                    salemanGrade:_this.form.salemanGrade,
+                    userName:_this.form.userName,
+                    order:_this.form.order,
+                    sort:_this.form.sort,
+                }
+            },
+            search:function(){
+                this.fxyList.currentPage=1;
+                this.loadParamSetting();
+            },
+            keydown(evt){
+                if(evt.keyCode==13) {
+                    this.search();
+                }
+            },
+            resetForm(formName) {
+                this.$refs[formName].resetFields();
+            },
+            sortChange:function (column){
+                if(column.order){
+                    if(column.order.indexOf("desc")){
+                        this.form.order="desc";
+                    }else{
+                        this.form.order="asc";
+                    }
+                    this.form.sort=column.prop;
+                    this.loadParamSetting();
+                }
+            },
+            changePageSize(val) {
+                this.fxyList.pageSize = val;
+                this.loadParamSetting();
+            },
+            changeCurrentPage(val) {
+                this.fxyList.currentPage = val;
+                this.loadParamSetting();
+            },
+            //时间格式化
+            formatDate(row,column){
+                    let data = row[column.property]
+                    if (data ===null) {
+                        return ''
+                    }
+                    let dt = new Date(data)
+                    return dt.getFullYear() + '-' + (dt.getMonth() + 1) + '-' + dt.getDate() + ' ' + dt.getHours() + ':' + dt.getMinutes()
+            },
+            //新增分销员页面
+            addSaleMan(){
+                layer.full(layer.open({
+                    type: 2,
+                    title: "选择会员",
+                    maxmin: true,
+                    area: [MUI.SIZE_L, '500px'],
+                    content : [ basePath + '/admin/redirect/fenxiao/fenxiao-apply']
+                }));
+            },
+            //删除
+            delSaleManGradeApply(row){
+                this.$confirm('是否删除?', '删除', {
+                    distinguishCancelAndClose: true,//设置关闭按钮和不通过按钮的区别
+                    confirmButtonText: '确认',
+                    cancelButtonText: '取消',
+                    type: 'info'
+                }).then(() => {
+                    //通过
+                    this.examineDelSaleManGradeApply(row);
+                }).catch(action => {
+                    //不通过
+                    if(action === 'cancel'){
+                        console.log("cancel");
+                    }else{
+                        //关闭按钮
+                        console.log("close");
+                        //this.$message({type: 'info',message: ''})
+                    }
+                });
+            },
+            examineDelSaleManGradeApply(row){
+                let _this = this;
+                let userId = row.userId;
+                let id = row.id;
+                let obj = {
+                    userId: userId,
+                    applyId: id,
+                }
+                AjaxProxy.requst({
+                    app: _this,
+                    data:obj,
+                    url: basePath + '/fenXiao/fenXiaoUser/delSaleManGradeApply',
+                    callback: function (data) {
+                        _this.$message.success(data.info);
+                        _this.loadParamSetting();
+                    }
+                });
+            },
+            //修改等级跳转
+            openUpdateSaleManGrade(row){
+                layer.full(layer.open({
+                    type: 2,
+                    title: "查看",
+                    maxmin: true,
+                    area: [MUI.SIZE_L, '500px'],
+                    content : [ basePath + '/admin/redirect/fenxiao/fenxiao-update?userId=' + row.userId+'&applyId='+row.id ]
+                }));
+            },
+            //审核
+            openExamineSaleManApply(row) {
+                this.$confirm('是否通过?', '审核', {
+                    distinguishCancelAndClose: true,//设置关闭按钮和不通过按钮的区别
+                    confirmButtonText: '通过',
+                    cancelButtonText: '不通过',
+                    type: 'info'
+                }).then(() => {
+                    //通过
+                    this.examineSaleManApply(row,this.shenheAgreeType);
+                }).catch(action => {
+                    //不通过
+                    if(action === 'cancel'){
+                        this.examineSaleManApply(row,this.shenheDisagreeType);
+                    }else{
+                        //关闭按钮
+                        console.log("close");
+                        //this.$message({type: 'info',message: ''})
+                    }
+                });
+            },
+            examineSaleManApply(row,type){
+                let _this = this;
+                let userId = row.userId;
+                let applyId = row.id;
+                let obj = {
+                    userId: userId,
+                    applyId: applyId,
+                    applyState: type,
+                }
+                AjaxProxy.requst({
+                    app: _this,
+                    data:obj,
+                    url: basePath + '/fenXiao/fenXiaoUser/examineSaleManApply',
+                    callback: function (data) {
+                        _this.$message.success(data.info);
+                        _this.loadParamSetting();
+                    }
+                });
+            }
+        }
+    })
+</script>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/orderXq-form.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/orderXq-form.html
index 6029100..0f3eb7d 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/orderXq-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/orderXq-form.html
@@ -108,7 +108,8 @@
                         </el-col>
                         <el-col :span="14" style="text-align: right;">
                             <label>¥ {{order.total}}</label>
-                            <label>¥ {{(order.zkTotal - order.total).toFixed(2)}}</label>
+                            <!-- 退款订单不能显示为负数 -->
+                            <label>¥ {{(order.zkTotal - order.total>0?order.zkTotal - order.total:0).toFixed(2)}}</label>
                             <label>¥ {{order.zkTotal}}</label>
                             <label>¥ {{order.arrears}}</label>
                             <label>¥ {{order.repay}}</label>
@@ -133,14 +134,14 @@
                 </el-col>
             </el-row>
             <el-row type="flex" justify="center" style="margin: 20px;">
-                <el-button size="medium" type="primary">打印</el-button>
+                <el-button size="medium" type="primary" @click="printf">打印</el-button>
             </el-row>
         </el-aside>
         <el-main style="background-color: white; margin-right: 15px; margin-left: 15px; padding: 20px 30px;">
             <el-tabs v-model="activeName" @tab-click="handleClick">
                 <el-tab-pane label="订单明细" name="first">
                     <el-row>
-                        <el-button size="mini" type="primary" @click="openPayMoneyDialog" v-if="isRefund">提交退款</el-button>
+                        <el-button size="mini" type="primary" @click="openPayMoneyDialog" v-if="isRefund">提交退款<span v-if="totalRefund"> ¥ {{totalRefund}}</span></el-button>
                         <el-button size="mini" type="danger" @click="isRefund = false" v-if="isRefund">取消</el-button>
                         <el-button size="mini" type="primary" @click="isRefund = true" v-if="order.statu == '已付款' && !isRefund">退款</el-button>
                     </el-row>
@@ -180,6 +181,8 @@
                             </el-table-column>
                             <el-table-column  label="小计" :formatter="calOrderTotalFormatter">
                             </el-table-column>
+                            <el-table-column  label="支付方式"  prop="payMethod">
+                            </el-table-column>
                         </el-table>
                     </el-row>
                     <el-row v-show="isRefund">
@@ -214,12 +217,12 @@
                             </el-table-column>
                             <el-table-column label="退款单价">
                                 <template slot-scope="scope">
-                                    <el-input v-model="scope.row.refundPrice" v-if="scope.row.count > 0"></el-input>
+                                    <el-input @change="calRefund" v-model="scope.row.refundPrice" v-if="scope.row.count > 0"></el-input>
                                 </template>
                             </el-table-column>
                             <el-table-column label="退款数量">
                                 <template slot-scope="scope">
-                                    <el-input v-model.number="scope.row.refundCount" v-if="scope.row.count > 0"></el-input>
+                                    <el-input @change="calRefund" v-model.number="scope.row.refundCount" v-if="scope.row.count > 0"></el-input>
                                 </template>
                             </el-table-column>
                             <el-table-column label="是否退库存" align="center">
@@ -254,11 +257,15 @@
                                         label="收款">
                                 </el-table-column>
                                 <el-table-column
-                                        prop="t3"
+                                        prop="payMethod"
+                                        label="支付方式">
+                                </el-table-column>
+                                <el-table-column
+                                        prop="achieveType"
                                         label="业绩类型">
                                 </el-table-column>
                                 <el-table-column
-                                        prop="t1"
+                                        prop="goodsCash"
                                         label="原业绩">
                                 </el-table-column>
                                 <el-table-column
@@ -308,15 +315,19 @@
                                 label="收款">
                         </el-table-column>
                         <el-table-column
+                                prop="payMethod"
+                                label="支付方式">
+                        </el-table-column>
+                        <el-table-column
                                 prop="t3"
                                 label="业绩类型">
                             <template slot-scope="scope">
-                                <el-select v-model="scope.row.t3" placeholder="请选择业绩类型">
+                                <el-select v-model="scope.row.achieveType" placeholder="请选择业绩类型">
                                     <el-option
                                             v-for="item in achieveTypeList"
-                                            :key="item.key"
+                                            :key="item.value"
                                             :label="item.value"
-                                            :value="item.key">
+                                            :value="item.value">
                                     </el-option>
                                 </el-select>
                             </template>
@@ -325,7 +336,7 @@
                                 prop="achieve"
                                 label="业绩">
                             <template slot-scope="scope">
-                                <el-input v-model="scope.row.t1"></el-input>
+                                <el-input  @input="checkAchieveMoney" v-model="scope.row.goodsCash"></el-input>
                             </template>
                         </el-table-column>
                         <el-table-column
@@ -354,9 +365,9 @@
                                            size="mini"
                                            @click="delAchieve(scope.$index, scope.row)">删除
                                 </el-button>
-                                <el-tooltip content="分享业绩" placement="top">
-                                    <el-button @click="shareAchieve(scope.$index, scope.row)" icon="el-icon-share"
-                                               size="mini" type="primary"></el-button>
+                                <el-tooltip content="分享业绩" placement="top" v-if="!scope.row.isShare">
+                                    <el-button  @click="shareAchieve(scope.$index, scope.row)" icon="el-icon-share"
+                                                size="mini" type="primary"></el-button>
                                 </el-tooltip>
                             </template>
                         </el-table-column>
@@ -379,6 +390,10 @@
                                 prop="flowContent"
                                 label="交易内容"
                                 width="300">
+                        </el-table-column>
+                        <el-table-column
+                                prop="createTime"
+                                label="交易时间">
                         </el-table-column>
                         <el-table-column
                                 prop="flowType"
@@ -449,9 +464,9 @@
             </el-col>
         </el-row>
 
-<!--        <el-row style="text-align: center; margin: 20px 0 10px 0">-->
-<!--            <el-checkbox v-model="printPaper">打印小票</el-checkbox>-->
-<!--        </el-row>-->
+        <!--        <el-row style="text-align: center; margin: 20px 0 10px 0">-->
+        <!--            <el-checkbox v-model="printPaper">打印小票</el-checkbox>-->
+        <!--        </el-row>-->
 
         <el-row style="text-align: center; margin: 10px 0 0 0">
             <el-button type="primary" @click="confirmSubmit">确认收款</el-button>
@@ -478,21 +493,14 @@
             activeName : "first",
             circleUrl : "https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png",
             userList : [],
-            achieveTypeList : [
-                {
-                    "key" : "现金业绩",
-                    "value" : "现金业绩"
-                },{
-                    "key" : "划扣业绩",
-                    "value" : "划扣业绩"
-                },
-            ],
+            achieveTypeList : [],
             orderItems : [],
             achieveItems : [],
             flowItems : [],
             payMethodItems : [],
             isRefund : false,
             isReturnAchieve : false,
+            totalRefund : "",
             payMethods: [{
                 value: '现金支付',
                 img: '/images/pay/cash.png',
@@ -541,15 +549,42 @@
         created : function() {
             let _this = this;
             this.orderParam = /*[[${orderParam}]]*/
-            this.queryOrderDetailData(this.orderParam);
+            var orderId = /*[[${orderId}]]*/
+            var orderNo = /*[[${orderNo}]]*/
 
+            var param = {};
+            if(orderId) {
+                param.id = orderId;
+            } else {
+                param.orderNo = orderNo;
+            }
+            this.queryOrderDetailData(param);
+            // 业绩类型
+            AjaxProxy.requst({
+                app: _this,
+                url: basePath + '/admin/customerDictionary/getListByParentCode/YJLX',
+                callback: function (data) {
+                    _this.achieveTypeList = data.rows;
+                }
+            });
         },
         methods : {
+            calRefund() {
+                let _this = this;
+                var total = 0;
+                _this.orderItems.forEach(item => {
+                    if (item.refundPrice && item.refundCount) {
+                        total += parseFloat(item.refundPrice * item.refundCount);
+                    }
+                })
+
+                _this.totalRefund = total;
+            },
             queryOrderDetailData(param) {
                 let _this = this;
                 AjaxProxy.requst({
                     app: _this,
-                    data: {id: param, orderNo:param},
+                    data: param,
                     contentType: 'application/x-www-form-urlencoded',
                     url: basePath + '/admin/order/findOrderDetailByIdOrNo',
                     callback: function (data) {
@@ -643,6 +678,10 @@
                 }
 
                 _this.data.items = dataItems;
+                _this.data.zkTotal =  _this.refundMoney;
+                _this.data.total =  _this.total;
+
+
                 AjaxProxy.requst({
                     app: _this,
                     data: _this.data,
@@ -651,7 +690,9 @@
                     callback: function (data) {
                         _this.isRefund = false;
                         _this.dialogSettleVisible = false;
-                        _this.queryOrderDetailData(_this.data.oldOrderId);
+                        var param = {};
+                        param.id = _this.data.oldOrderId;
+                        _this.queryOrderDetailData(param);
                     }
                 });
 
@@ -682,7 +723,7 @@
                     }
 
                     if(_this.order.zkTotal - _this.order.refund - _this.order.arrears < total) {
-                        this.$message.warning("退款金额不能超过收取金额");
+                        this.$message.warning("退款金额不能超过收款金额");
                         return false;
                     }
                     _this.data.flows = flows;
@@ -696,6 +737,7 @@
                 let _this = this;
                 let items = this.orderItems;
                 _this.refundMoney = 0;
+                _this.total = 0;
 
                 for(var i = 0; i < items.length; i++) {
                     let item = items[i]
@@ -711,6 +753,8 @@
                         }
 
                         _this.refundMoney += parseFloat(item.refundPrice * item.refundCount);
+                        //记录一下未优惠之前的价格
+                        _this.total += parseFloat(item.price * item.refundCount);
                     }
                 }
 
@@ -721,7 +765,7 @@
                 _this.dialogSettleVisible = true;
             },
             calOrderTotalFormatter(row, column) {
-                return row.count * row.price;
+                return row.count * row.zkPrice;
             },
             getVipMoneyCards() {
                 let _this = this;
@@ -839,34 +883,77 @@
             },
             saveAchieve() {
                 let _this = this;
-                AjaxProxy.requst({
-                    app: _this,
-                    data: _this.achieveItems,
-                    contentType: 'application/json',
-                    url: basePath + '/admin/achieve/add',
-                    callback: function (data) {
-                        _this.$message.success(data.info);
-                    }
-                });
-            },
-            shareAchieve(index, row) {
-                var row2 = JSON.parse(JSON.stringify(row));
-                row2.id = null;
-                row2.isShare = true;
-                this.achieveItems.push(row2);
-            },
-            delAchieve(index, row) {
-                let _this = this;
-                if (row.id) {
+                if(_this.checkAchieveMoney()){
                     AjaxProxy.requst({
                         app: _this,
-                        url: basePath + '/admin/achieve/del?id=' + row.id,
+                        data: _this.achieveItems,
+                        contentType: 'application/json',
+                        url: basePath + '/admin/achieve/add',
                         callback: function (data) {
+                            _this.$message.success(data.info);
                         }
                     });
                 }
 
+            },
+
+            shareAchieve(index, row) {
+                var row2 = JSON.parse(JSON.stringify(row));
+                row2.id = null;
+                row2.isShare = true;
+                this.achieveItems.splice(index+1,0,row2);
+                this.calculationAchieve();
+            },
+            //业绩均分订单金额
+            calculationAchieve(){
+                console.log("计算业绩");
+                let jsqMap={};
+                this.achieveItems.forEach(achieve=>{
+                    key=achieve.achieveType+achieve.orderItemId;
+                    if(!jsqMap[key]){
+                        jsqMap[key]=1;
+                    }else{
+                        jsqMap[key]++;
+                    }
+                });
+                this.achieveItems.forEach(achieve=>{
+                    key=achieve.achieveType+achieve.orderItemId;
+                    achieve.goodsCash=(achieve.zkTotal/jsqMap[key]).toFixed(2);
+                });
+            },
+            //校验业绩是否大于订单收款金额
+            checkAchieveMoney(){
+                console.log("校验业绩是否大于订单收款金额");
+                let jsqMap={};
+                let isOk=true;
+                for(let i=0 ; i< this.achieveItems.length; i++){
+                    let achieve=this.achieveItems[i];
+                    if(!isNaN(achieve.goodsCash)  ){
+                        key=achieve.achieveType+achieve.orderItemId;
+                        if(!jsqMap[key]){
+                            jsqMap[key]=parseFloat(achieve.goodsCash);
+                        }else{
+                            jsqMap[key]=jsqMap[key]+parseFloat(achieve.goodsCash);
+                        }
+                        if(jsqMap[key]>achieve.zkTotal) {
+                            this.$message.error("【"+achieve.goodsName + "】业绩分配金额大于支付金额");
+                            isOk = false;
+                            break;
+                        }
+                    }else{
+                        this.$message.error("【"+achieve.goodsName + "】业绩分配金额请填写数字");
+                        isOk=false;
+                        break;
+                    }
+                }
+                console.log("isOk",isOk);
+                return isOk;
+            },
+            //删除业绩
+            delAchieve(index, row) {
+                let _this = this;
                 _this.achieveItems.splice(index, 1);
+                this.calculationAchieve();
             },
             checkAchieveIsDel(items) {
                 var achieveIds = [];
@@ -886,7 +973,7 @@
                 var id = this.order.id;
                 layer.open({
                     type: 2,
-                    title: "打印服务单",
+                    title: "打印订单",
                     area: ['250px', '550px'],
                     maxmin: true,
                     content: [basePath + '/admin/redirect/hive/beautySalon/print-order?id=' + id]
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/score/score-setting.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/score/score-setting.html
new file mode 100644
index 0000000..da44764
--- /dev/null
+++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/score/score-setting.html
@@ -0,0 +1,339 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
+<head>
+    <meta charset="utf-8">
+    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta http-equiv="Cache-Control" content="no-siteapp"/>
+    <!-- 本框架基本脚本和样式 -->
+    <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
+    <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
+    <link rel="stylesheet" th:href="@{/plugin/bootstrap-3.3.5/css/bootstrap.min.css}">
+    <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
+</head>
+
+<body>
+<div class="ibox-content" id="app" v-cloak>
+    <el-form label-width="120px" >
+        <el-row>
+            <p class="el-big-title">积分统计</p>
+        </el-row>
+        <el-row>
+            <el-row>
+                <el-col :span="18">
+                    <el-form-item>
+                        <el-col class="line" :span="6" style="text-align: center">积分总额</el-col>
+                        <el-col class="line" :span="6" style="text-align: center">可使用积分</el-col>
+                        <el-col class="line" :span="6" style="text-align: center">已消耗积分</el-col>
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="18">
+                    <el-form-item>
+                        <el-col class="line" :span="6" style="text-align: center">0</el-col>
+                        <el-col class="line" :span="6" style="text-align: center">0</el-col>
+                        <el-col class="line" :span="6" style="text-align: center">0</el-col>
+                    </el-form-item>
+                </el-col>
+            </el-row>
+        </el-row>
+        <el-row>
+            <p class="el-big-title">积分规则</p>
+        </el-row>
+        <el-row>
+            <el-col :span="10">
+                <template v-for="paramSettingOnes in jfyxq">
+                    <el-form-item label-width="200px;">
+                        <span slot="label">{{paramSettingOnes.paramName}}</span>
+                        <el-col :span="8">
+                            <el-select v-model="paramSettingOnes.paramValue" placeholder="请选择">
+                                <el-option label="本年后" value="1"></el-option>
+                                <el-option label="1年后" value="2"></el-option>
+                                <el-option label="2年后" value="3"></el-option>
+                                <el-option label="3年后" value="4"></el-option>
+                                <el-option label="4年后" value="5"></el-option>
+                                <el-option label="5年后" value="6"></el-option>
+                            </el-select>
+                        </el-col>
+                        <el-col :span="2" style="margin-left: 10px;display: flex;align-items: center;height: 40px">
+                            <el-tooltip class="item" effect="dark" content="设置为“1年后”,表示在今年获得的用户积分将在明年的12月31号23:59:59失效,以此类推" placement="top">
+                                <i class="el-icon-question" style="font-size: 18px;color:#999999" ></i>
+                            </el-tooltip>
+                        </el-col>
+                    </el-form-item >
+                </template>
+            </el-col>
+            <el-col :span="14">
+                <template v-for="paramSettingTwos in jfdxj">
+                    <el-form-item>
+                        <span slot="label">{{paramSettingTwos.paramName}}</span>
+                        <el-col :span="1">
+                            <el-switch v-model="paramSettingTwos.paramSwitch" active-color="#13ce66" inactive-color="#ccc" @change="change">
+                            </el-switch>
+                        </el-col>
+                        <el-col :span="2" style="margin-left: 10px;display: flex;align-items: center;height: 40px">
+                            <el-tooltip class="item" effect="dark" content="客户付款时,可以选择积分抵现付款" placement="top">
+                                <i class="el-icon-question" style="font-size: 18px;color:#999999" ></i>
+                            </el-tooltip>
+                        </el-col>
+                        <el-col :span="11">
+                            <transition>
+                            <div v-show="paramSettingTwos.paramSwitch">
+                                <el-col :span="6">
+                                    <el-input v-model="paramSettingTwos.paramValue" oninput ="value=value.replace(/[^0-9.]/g,'')"></el-input>
+                                </el-col>
+                                <el-col class="line" :span="5" style="margin-left: 10px">积分=1元</el-col>
+                            </div>
+                            </transition>
+                        </el-col>
+                    </el-form-item>
+                </template>
+            </el-col>
+        </el-row>
+        <el-row>
+            <el-tabs v-model="activeName" >
+                <el-tab-pane label="门店积分规则" name="first">
+                <el-row>
+                    <el-col :span="21">
+                            <el-form-item>
+                                <el-col class="line" :span="7" style="margin-left: 10px">本人积分</el-col>
+                                <el-col class="line" :span="7" style="margin-left: 10px">老带新积分</el-col>
+                                <el-col class="line" :span="7" style="margin-left: 10px">二级老带新积分</el-col>
+                            </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="21">
+                        <template v-for="paramSetting in mdjf">
+                            <el-form-item>
+                                <span slot="label">{{paramSetting.paramName}}</span>
+                                <el-col :span="3">
+                                    <el-input v-model="paramSetting.paramValue" oninput ="value=value.replace(/[^0-9.]/g,'')"></el-input>
+                                </el-col>
+                                <div v-show="paramSetting.paramName === '转介客户'">
+                                    <el-col class="line" :span="4" style="margin-left: 10px">积分/位</el-col>
+                                </div>
+                                <div v-show="paramSetting.paramName !== '转介客户'">
+                                    <el-col class="line" :span="4" style="margin-left: 10px">元/积分</el-col>
+                                </div>
+                                <el-col :span="3">
+                                    <el-input v-model="paramSetting.paramValue1" oninput ="value=value.replace(/[^0-9.]/g,'')"></el-input>
+                                </el-col>
+                                <div v-show="paramSetting.paramName === '转介客户'">
+                                    <el-col class="line" :span="4" style="margin-left: 10px">积分/位</el-col>
+                                </div>
+                                <div v-show="paramSetting.paramName !== '转介客户'">
+                                    <el-col class="line" :span="4" style="margin-left: 10px">元/积分</el-col>
+                                </div>
+                                <div v-show="paramSetting.paramName !== '转介客户'">
+                                    <el-col :span="3">
+                                        <el-input v-model="paramSetting.paramValue2" oninput ="value=value.replace(/[^0-9.]/g,'')"></el-input>
+                                    </el-col>
+                                    <el-col class="line" :span="4" style="margin-left: 10px">元/积分</el-col>
+                                </div>
+                            </el-form-item>
+                        </template>
+                    </el-col>
+                </el-row>
+            </el-tab-pane>
+                <el-tab-pane label="商城积分规则" name="second">
+                    <el-row>
+                        <el-col :span="21">
+                            <el-form-item>
+                                <el-col class="line" :span="7" style="margin-left: 10px">本人积分</el-col>
+                                <el-col class="line" :span="7" style="margin-left: 10px">老带新积分</el-col>
+                                <el-col class="line" :span="7" style="margin-left: 10px">二级老带新积分</el-col>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                    <el-row>
+                        <el-col :span="21">
+                            <template v-for="paramSettingShop in scjf">
+                                <el-form-item>
+                                    <span slot="label">{{paramSettingShop.paramName}}</span>
+                                    <el-col :span="3">
+                                        <el-input v-model="paramSettingShop.paramValue" oninput ="value=value.replace(/[^0-9.]/g,'')"></el-input>
+                                    </el-col>
+                                    <div v-show="paramSettingShop.paramName !== '现金消费'">
+                                        <el-col class="line" :span="4" style="margin-left: 10px">积分/次</el-col>
+                                    </div>
+                                    <div v-show="paramSettingShop.paramName === '现金消费'">
+                                        <el-col class="line" :span="4" style="margin-left: 10px">元/积分</el-col>
+                                    </div>
+                                    <el-col :span="3">
+                                        <el-input v-model="paramSettingShop.paramValue1" oninput ="value=value.replace(/[^0-9.]/g,'')"></el-input>
+                                    </el-col>
+                                    <div v-show="paramSettingShop.paramName !== '现金消费'">
+                                        <el-col class="line" :span="4" style="margin-left: 10px">积分/次</el-col>
+                                    </div>
+                                    <div v-show="paramSettingShop.paramName === '现金消费'">
+                                        <el-col class="line" :span="4" style="margin-left: 10px">元/积分</el-col>
+                                    </div>
+                                    <el-col :span="3">
+                                        <el-input v-model="paramSettingShop.paramValue2" oninput ="value=value.replace(/[^0-9.]/g,'')"></el-input>
+                                    </el-col>
+                                    <div v-show="paramSettingShop.paramName !== '现金消费'">
+                                        <el-col class="line" :span="4" style="margin-left: 10px">积分/次</el-col>
+                                    </div>
+                                    <div v-show="paramSettingShop.paramName === '现金消费'">
+                                        <el-col class="line" :span="4" style="margin-left: 10px">元/积分</el-col>
+                                    </div>
+                                </el-form-item>
+                            </template>
+                        </el-col>
+                    </el-row>
+                </el-tab-pane>
+            </el-tabs>
+        </el-row>
+        <el-row justify="center" type="flex">
+            <el-button matrix:btn="scoreSetting-save"  type="primary" @click="submit()">保存</el-button>
+        </el-row>
+    </el-form>
+</div>
+</body>
+<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/bootstrap-3.3.5/js/bootstrap.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
+
+<script>
+    var app = new Vue({
+        el: '#app',
+        data: {
+            activeName: 'first',
+            jfyxq:[],
+            jfdxj:[],
+            mdjf:[],
+            scjf:[],
+        },
+        created: function () {
+            this.loadInfo();
+        },
+        mounted: function () {
+        },
+        methods: {
+            //加载分类
+            loadInfo() {
+                let _this = this;
+                _this.loadParamSetting();
+            },
+            loadParamSetting() {
+                let _this = this;
+                //加载配置
+                AjaxProxy.requst({
+                    app: _this,
+                    data: {},
+                    url: basePath + '/score/ruleSetting/selectScoreRule',
+                    callback: function (data) {
+                        _this.jfyxq = data.mapInfo.jfyxq;
+                        _this.jfdxj = data.mapInfo.jfdxj;
+                        _this.mdjf = data.mapInfo.mdjf;
+                        _this.scjf = data.mapInfo.scjf;
+                        console.log("over");
+                    }
+                });
+            },
+            change(data){
+                if(data){
+                    this.paramSwitch = true;
+                }else{
+                    this.paramSwitch = false;
+                }
+            },
+
+            submit() {
+                console.log("提交");
+                let _this = this;
+                let submitDate = [];
+                for (let i = 0; i < _this.jfyxq.length; i++) {
+                    let paramSetting = _this.jfyxq[i];
+                    let paramCode = paramSetting.paramCode;
+                    let paramValue = paramSetting.paramValue;
+                    let paramValue1 = paramSetting.paramValue1;
+                    let paramValue2 = paramSetting.paramValue2;
+
+                    let obj = {
+                        paramCode: paramCode,
+                        paramValue: paramValue,
+                        paramValue1: paramValue1,
+                        paramValue2: paramValue2,
+                    }
+                    submitDate.push(obj);
+                }
+                for (let i = 0; i < _this.scjf.length; i++) {
+                    let paramSetting = _this.scjf[i];
+                    let paramCode = paramSetting.paramCode;
+                    let paramValue = paramSetting.paramValue;
+                    let paramValue1 = paramSetting.paramValue1;
+                    let paramValue2 = paramSetting.paramValue2;
+
+                    let obj = {
+                        paramCode: paramCode,
+                        paramValue: paramValue,
+                        paramValue1: paramValue1,
+                        paramValue2: paramValue2,
+                    }
+                    submitDate.push(obj);
+                }
+                for (let i = 0; i < _this.mdjf.length; i++) {
+                    let paramSetting = _this.mdjf[i];
+                    let paramCode = paramSetting.paramCode;
+                    let paramValue = paramSetting.paramValue;
+                    let paramValue1 = paramSetting.paramValue1;
+                    let paramValue2 = paramSetting.paramValue2;
+
+                    let obj = {
+                        paramCode: paramCode,
+                        paramValue: paramValue,
+                        paramValue1: paramValue1,
+                        paramValue2: paramValue2,
+                    }
+                    submitDate.push(obj);
+                }
+                for (let i = 0; i < _this.jfdxj.length; i++) {
+                    let paramSetting = _this.jfdxj[i];
+                    let paramCode = paramSetting.paramCode;
+                    let paramSwitch = paramSetting.paramSwitch;
+                    let paramValue;
+                    if(paramSwitch){
+                        paramValue = paramSetting.paramValue;
+                    }
+                    let paramValue1 = paramSetting.paramValue1;
+                    let paramValue2 = paramSetting.paramValue2;
+
+                    let obj = {
+                        paramCode: paramCode,
+                        paramValue: paramValue,
+                        paramValue1: paramValue1,
+                        paramValue2: paramValue2,
+                    }
+                    submitDate.push(obj);
+                }
+
+                AjaxProxy.requst({
+                    app: _this,
+                    data: submitDate,
+                    url: basePath + '/score/ruleSetting/updateScoreRule',
+                    callback: function (data) {
+                        _this.$message({
+                            message: data.info,
+                            type: 'success',
+                            onClose: function () {
+                                _this.loadParamSetting();
+                            }
+                        });
+                    }
+                });
+            }
+        }
+    })
+</script>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/daily-list-new.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/daily-list-new.html
index 43018b0..f19c967 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/daily-list-new.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/daily-list-new.html
@@ -11,218 +11,275 @@
 <meta http-equiv="Cache-Control" content="no-siteapp" />
 <LINK rel="Bookmark" href="../images/favicon.ico">
 <!-- 本框架基本脚本和样式 -->
-<script type="text/javascript"
-        th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript" th:src="@{/js/systools/MBase.js}"></script>
- 
+<script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script>
+<link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
+<link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" th:src="@{/js/function/public.js}"></script>
 </head>
-<body class="gray-bg">
-	 
+<style>
+	.table-style {
+		margin: 20px 0;
+		padding: 20px 10px;
+		border: 1px solid #DCDFE6;
+		background-color: white;
+	}
+	.search-form {
+		background-color: white;
+		padding-top: 10px;
+		padding-left: 20px;
+		padding-bottom: 10px;
+	}
+</style>
+<body>
+<div id="app" style="">
+	<el-row class="search-form">
+		<el-form ref="form" :model="form" inline>
+			<el-form-item label="选择年月">
+				<el-select v-model="form.year" style="width:120px;" placeholder="请选择">
+					<el-option v-for="item in years"
+							   :key="item"
+							   :label="item"
+							   :value="item"></el-option>
+				</el-select>
+			</el-form-item>
+			<el-form-item>
+				<el-select v-model="form.month" style="width:120px;" placeholder="请选择">
+					<el-option v-for="item in months"
+							   :key="item"
+							   :label="item"
+							   :value="item"></el-option>
+				</el-select>
+			</el-form-item>
+			<el-form-item>
+				<el-select v-model="form.day" style="width:120px;" placeholder="请选择">
+					<el-option v-for="item in days"
+							   :key="item"
+							   :label="item"
+							   :value="item"></el-option>
+				</el-select>
+			</el-form-item>
+			<el-form-item label="日期范围">
+				<el-date-picker v-model="form.timeRange"
+								type="datetimerange"
+								range-separator="至"
+								start-placeholder="开始日期"
+								end-placeholder="结束日期">
+				</el-date-picker>
+			</el-form-item>
 
-	<div class="ibox-content">
-		<!-- 搜索框部分start -->
-		<form class="form-inline" id="serchform">
-		<div class="row mb-10">
-				<div class="col-sm-8">
-					<button  onclick="myGrid.serchData()" type="button" class="btn btn-info btn-sm"><i class="fa fa-search" ></i> 搜索</button>
-					<button  onclick="myGrid.resetForm()" type="button"   class="btn btn-default btn-sm"><i class="fa fa-refresh " ></i> 重置</button>
-					<button  matrix:btn="ygyjbbZb-exportExcel" onclick="exportExcel()" type="button" class="btn btn-default btn-sm"><i class="fa fa-download" ></i> 导出</button>
-				</div>
-			</div>
-			<div class="form-group mr-20">
-				<label >选择年月</label> <select
-					class="form-control" name="year" id="select_year">
-					<option value="">年份</option>
-					<option value="2010">2010</option>
-					<option value="2011">2011</option>
-					<option value="2012">2012</option>
-					<option value="2013">2013</option>
-					<option value="2014">2014</option>
-					<option value="2015">2015</option>
-					<option value="2016">2016</option>
-					<option value="2017">2017</option>
-					<option value="2018">2018</option>
-					<option value="2019">2019</option>
-					<option value="2020">2020</option>
-					<option value="2021">2021</option>
-				</select> <select class="form-control" name="month" id="select_month">
-					<option value="01">1</option>
-					<option value="02">2</option>
-					<option value="03">3</option>
-					<option value="04">4</option>
-					<option value="05">5</option>
-					<option value="06">6</option>
-					<option value="07">7</option>
-					<option value="08">8</option>
-					<option value="09">9</option>
-					<option value="10">10</option>
-					<option value="11">11</option>
-					<option value="12">12</option>
-				</select>
-				<select class="form-control" name="day" id="select_day">
-				 <option value="">日</option>
-				<th:block th:each="i:${#numbers.sequence(1, 31)}"   >
-					<option th:value="${i }" th:text="${i }"></option>
-				</th:block>
-				</select>
-			</div>
-			<div class="form-group mr-20">
-				<label>日期范围</label>
-				<input name="beginTime" type="text" class="form-control datetimepicker" id="beginTime">-
-				<input name="endTime"  type="text" class="form-control datetimepicker" id="endTime">
-			</div>
-			<div class="form-group mr-20">
-				<label >所属门店</label> <select id="select_id"
-					class="form-control autoFull"
-					th:data-url="@{/admin/shopInfo/findShops}" data-value="id"
-					data-filed="shopName" data-def="${obj.shopId}" name="shopId">
-					<option value="">--请选择所属门店--</option>
-				</select>
-			</div>
-		</form>
+			<el-form-item label="会员">
+				<el-input v-model="form.vipQueryKey"></el-input>
+			</el-form-item>
 
+			<el-form-item label="业绩归属人">
+				<el-select v-model="form.beaultId" placeholder="请选择">
+					<el-option v-for="item in achieveUsers"
+							   :key="item.suId"
+							   :label="item.suName"
+							   :value="item.suId"></el-option>
+				</el-select>
+			</el-form-item>
 
-		<table id="mgrid">
-			<thead>
-				<tr>
-					<th data-formatter="MGrid.indexfn" data-align="center"
-						data-width="30px" data-footer-formatter="footCountTitle">序号</th>
-						<th data-field="datatime"  >时间</th>
-					<th data-field="orderType">订单类型</th>
-					<th data-field="orderNo"  data-formatter="buildOpenDetail" >订单编号</th>
-					<th data-field="levelName">会员级别</th>
-					<th data-field="vipName">姓名</th>
-					<th data-field="proName">项目名称</th>
-					<th data-field="zkTotal" data-footer-formatter="countColumn">总现金业绩
-						<i data-toggle="tooltip" data-placement="top" title="总现金业绩=售卡+项目+产品" class="fa fa-question-circle"></i>
-					</th>
+			<el-form-item label="门店">
+				<el-select v-model="form.shopId" placeholder="请选择所属门店">
+					<el-option v-for="item in shopList"
+							:key="item.id"
+							:label="item.shopName"
+							:value="item.id">
+					</el-option>
+				</el-select>
+			</el-form-item>
 
-					<th data-field="cardCash"  data-footer-formatter="countColumn"  >售卡业绩
-						<i data-toggle="tooltip" data-placement="top" title="售卡业绩:现金购买充值卡,套餐,充值的收款金额" class="fa fa-question-circle"></i>
-					</th>
+			<el-button type="primary" @click="search" >搜索</el-button>
+			<el-button @click="resetForm('form')">重置</el-button>
+			<el-button type="warning" @click="exportExcel">导出</el-button>
+		</el-form>
 
-					<th data-field="projCash" data-footer-formatter="countColumn">项目业绩
-						<i data-toggle="tooltip" data-placement="top" title="项目业绩:现金购买单个项目的业绩" class="fa fa-question-circle"></i>
-					</th>
-
-					<th data-field="goodsCash" data-footer-formatter="countColumn">产品业绩
-						<i data-toggle="tooltip" data-placement="top" title="产品业绩:现金购买产品的业绩" class="fa fa-question-circle"></i>
-					</th>
-
-					<th data-field="consume" data-footer-formatter="countColumn">余额划扣业绩
-						<i data-toggle="tooltip" data-placement="top" title="余额划扣业绩:从客户的充值卡余额中划扣消费的金额" class="fa fa-question-circle"></i>
-					</th>
-
-					<th data-field="hisConsume" data-footer-formatter="countColumn">本金消耗
-						<i data-toggle="tooltip" data-placement="top" title="消耗金额:客户做服务时划扣的本金" class="fa fa-question-circle"></i>
-					</th>
-					<th data-field="freeConsume" data-footer-formatter="countColumn">赠送消耗
-						<i data-toggle="tooltip" data-placement="top" title="赠送消耗:客户做服务时划扣的赠送金额" class="fa fa-question-circle"></i>
-					</th>
-					<th data-field="projPercentage" data-footer-formatter="countColumn">服务提成
-						<i data-toggle="tooltip" data-placement="top" title="服务提成:为美疗师手动设置的项目服务提成" class="fa fa-question-circle"></i>
-					</th>
-					<th data-field="guwen">顾问</th>
-					<th data-field="meiliao">美疗师</th>
-					<th data-field="numberOfPeople" data-footer-formatter="countColumn">人头</th>
-					<th data-field="projNum" data-footer-formatter="countColumn">项目个数</th>
-					<th data-field="projTime" data-footer-formatter="countColumn">项目时间</th>
-					<th data-field="shopName">门店</th>
-					
-				</tr>
-			</thead>
-		</table>
-	</div>
-
-	<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
-	<script type="text/javascript" th:src="@{/js/function/public.js}"></script>
-	<script type="text/javascript">
-		var myGrid;
-		var initParam = {
-				format : "yyyy-mm-dd hh:ii", //默认显示年与日,如果想显示十分秒:"yyyy-mm-dd hh:ii:ss"
-				minView: "hour", 	//"month",只显示年月日的选择,不会再跳转去选择时分秒;如果想要选择时分秒的:"hour"
+	</el-row>
+	<el-row class="table-style">
+		<el-table :data="tableData" style="width: 100%">
+			<el-table-column type="index" width="30"></el-table-column>
+			<el-table-column prop="datatime" width="150" label="时间"></el-table-column>
+			<el-table-column prop="orderNo" width="180" label="订单编号">
+				<template slot-scope="scope">
+					<el-link @click="jumpOrder(scope.row.orderType, scope.row.orderNo)" type="primary">{{scope.row.orderNo}}</el-link>
+				</template>
+			</el-table-column>
+			<el-table-column prop="orderType" label="订单类型"></el-table-column>
+			<el-table-column prop="vipName" label="会员姓名"></el-table-column>
+			<el-table-column prop="proName" label="产品" width="200"></el-table-column>
+			<el-table-column prop="cateName" label="产品分类"></el-table-column>
+			<el-table-column prop="zkTotal" label="订单金额"></el-table-column>
+			<el-table-column prop="goodsCash" label="现金"></el-table-column>
+			<el-table-column prop="cardCash" label="划扣"></el-table-column>
+<!--			<el-table-column prop="goodsCash" label="订单业绩"></el-table-column>-->
+			<el-table-column prop="meiliao" label="员工"></el-table-column>
+			<el-table-column v-for="(item, index) in customColumns" width="120" :key="index" :label="item.value">
+				<template slot-scope="scope">
+					<span v-if="item.value == scope.row.achieveType">{{scope.row.goodsCash}}</span>
+				</template>
+			</el-table-column>
+			<el-table-column prop="hisConsume" label="本金消耗"></el-table-column>
+			<el-table-column prop="freeConsume" label="赠送消耗"></el-table-column>
+			<el-table-column prop="projPercentage" label="服务提成"></el-table-column>
+			<el-table-column prop="numberOfPeople" label="人头"></el-table-column>
+			<el-table-column prop="projNum" label="项目个数"></el-table-column>
+			<el-table-column prop="projTime" label="服务时间"></el-table-column>
+			<el-table-column prop="guwen" label="操作人"></el-table-column>
+			<el-table-column prop="shopName" label="门店"></el-table-column>
+		</el-table>
+		<el-row style="margin-top: 10px;">
+			<el-pagination
+					@size-change="handleSizeChange"
+					@current-change="handleCurrentChange"
+					:current-page="page.currentPage"
+					:page-sizes="[10, 20, 30, 50]"
+					:page-size="page.size"
+					layout="total, sizes, prev, pager, next, jumper"
+					:total="page.total">
+			</el-pagination>
+		</el-row>
+	</el-row>
+</div>
+<script type="text/javascript" th:src="@{/plugin/layer/layer.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
+<script type="text/javascript" th:inline="javascript">
+	var vue = new Vue({
+		el : "#app",
+		data : {
+			tableData : [],
+			customColumns : [],
+			shopList : [],
+			achieveUsers : [],
+			years : [2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021],
+			months : ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"],
+			days : [],
+			form : {
+				year : '',
+				month : '',
+				day : '',
+				timeRange : '',
+				vipQueryKey : '',
+				beaultId : '',
+				shopId : ''
+			},
+			page : {
+				currentPage : 1,
+				size : 10,
+				total : 0
 			}
-		 MTools.ininDatetimepicker(initParam);
-		//限制结束时间不小于开始时间
-		 MTools.limitStartEndTime({}); 
-		
-		var date = new Date();
-		var year = date.getFullYear();
-		var month = date.getMonth() + 1;
-		var year_options = "";
-		for (var i = 9; i > 0; i--) {
-			year_options += "<option value='" + (year - i) + "'>" + (year - i)
-					+ "</option>";
-		}
-		year_options += "<option value='"+year+"' selected='selected'>" + year
-				+ "</option>";
-		$("#select_year").html(year_options);
-		$("#select_month").find("option").each(function(row) {
-			var option_month = $(this).val();
-			if (month == option_month) {
-				$(this).attr("selected", true);
-			}
-		});
+		},
+		created : function() {
+			this.initDays();
+			this.queryCustomColumns();
+			this.queryShops();
+			this.queryAchieveUsers();
+		},
+		methods : {
+			queryTableData () {
+				let _this = this;
+				var form = _this.form;
+				var page = _this.page;
+				var params = _this.form;
+				params.limit = page.size;
+				params.offset = (page.currentPage - 1) * page.size;
 
-		$(function() {
-			MTools.autoFullSelect();
-			myGrid = MGrid.initGrid({
-				url : basePath+"/admin/achieve/findDailyInfoNew",
-				showExport : true,
-				showFooter : true,
-				height:'auto',
-				width:'auto',
-				exportDataType : "basic", //basic', 'all', 'selected'.
-				exportTypes : [ 'excel', 'xlsx' ], //导出类型
-				exportOptions : {
-					ignoreColumn : [ 0 ],
-					fileName : "每日单据统计" + MTools.getTime(), //文件名称设置  
-					worksheetName : 'Sheet1', //表格工作区名称  
-					tableName : '每日单据统计',
-					excelstyles : [ 'background-color', 'color', 'font-size',
-							'font-weight' ],
+				if (form.timeRange) {
+					params.beginTime = form.timeRange?moment(form.timeRange[0]).format("YYYY-MM-DD HH:mm"):'';
+					params.endTime = form.timeRange?moment(form.timeRange[1]).format("YYYY-MM-DD HH:mm"):'';
 				}
-			});
-
-			$('[data-toggle="tooltip"]').tooltip()
-
-		});
-
-
-		function footCountTitle(data) {
-			return "<b>合计</b>";
-		};
-		function countColumn(data) {
-			console.log(data)
-			 field = this.field;
-			    var resultsumQuantity = parseFloat((data.reduce(function(sum, row) { 
-			    	console.log(sum,row[field]);
-			        return sum + (+row[field]);
-			    }, 0)).toFixed(2));//保留有效数字
-			    return "<b>"+resultsumQuantity+"</b>";
-		};
-		
-		
-		function exportExcel(){
-			var param=MForm.toUrlParam("#serchform");
-
-			window.location.href=basePath+"/admin/achieve/exportDailyInfoNew?"+param;
-		}
-
-		function buildOpenDetail(value, row, index){
-			var html = [];
-			if(row.orderType=='服务单'){
-				html[0] = '<a  onClick="fnPublci.showServiceOrder(1 , \'' + value +'\')"   class="text-primary " >'+value+'</a>'
-			}else{
-				html[0] = '<a  onClick="fnPublci.showOrder(1 , \'' + value +'\')"   class="text-primary " >'+value+'</a>'
+				$.AjaxProxy({
+					p:params
+				}).invoke(basePath + "/admin/achieve/findDailyInfoNew", function (loj) {
+					_this.tableData = loj.getValue("rows");
+					_this.page.total = loj.getResult().total;
+				});
+			},
+			queryCustomColumns() {
+				let _this = this;
+				AjaxProxy.requst({
+					app: _this,
+					url: basePath + '/admin/customerDictionary/getListByParentCode/YJLX',
+					callback: function (data) {
+						_this.customColumns = data.rows;
+						_this.queryTableData();
+					}
+				});
+			},
+			queryShops() {
+				let _this = this;
+				AjaxProxy.requst({
+					app: _this,
+					url: basePath + '/admin/shopInfo/findAllWithPermi',
+					callback: function (data) {
+						_this.shopList = data.rows;
+					}
+				});
+			},
+			queryAchieveUsers() {
+				let _this = this;
+				AjaxProxy.requst({
+					app: _this,
+					url: basePath + '/admin/getShopStaffByRoleName?roleName=美疗师',
+					callback: function (data) {
+						_this.achieveUsers = data.rows;
+					}
+				});
+			},
+			resetForm(formName) {
+				// this.$refs[formName].resetFields();
+				this.form = {
+					timeRange : '',
+					vipQueryKey : '',
+					beaultId : '',
+					shopId : ''
+				}
+			},
+			search() {
+				this.queryTableData();
+			},
+			handleSizeChange(val) {
+				this.page.size = val;
+				this.queryTableData();
+			},
+			handleCurrentChange(val) {
+				this.page.currentPage = val;
+				this.queryTableData();
+			},
+			initDays() {
+				let _this = this;
+				for (var i = 1; i <= 31 ; i++) {
+					_this.days.push(i);
+				}
+			},
+			getRequestParam() {
+				var form = this.form;
+				var params = form;
+				if (form.timeRange) {
+					params.beginTime = form.timeRange?moment(form.timeRange[0]).format("YYYY-MM-DD HH:mm"):'';
+					params.endTime = form.timeRange?moment(form.timeRange[1]).format("YYYY-MM-DD HH:mm"):'';
+				}
+				return params;
+			},
+			exportExcel() {
+				window.location.href=basePath+"/admin/achieve/exportDailyInfoNew?"+MTools.jsonToUrlParam(this.getRequestParam());
+			},
+			jumpOrder(type, value) {
+				if(type=='服务单') {
+					fnPublci.showServiceOrder(1, value);
+				} else {
+					fnPublci.showOrder(1, value);
+				}
 			}
-
-			return html.join("");
 		}
-
-
-
-
-	</script>
+	});
+</script>
 </body>
 </html>
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/daily-sale-list.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/daily-sale-list.html
index e738a10..83c8a58 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/daily-sale-list.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/daily-sale-list.html
@@ -116,7 +116,8 @@
 		}
 
 		function zkAmountFormat(value, row, index) {
-			return row.shouldPay + row.refund - row.arrears - row.totalPay;
+			var result = row.shouldPay + row.refund - row.arrears - row.totalPay;
+			return result.toFixed(2);
 		}
 
 		function footCountTitle(data) {
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html
index 12f1b8c..d3837fd 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html
@@ -101,9 +101,22 @@
 							width="50">
 					</el-table-column>
 					<el-table-column
+							label="业绩类型" width="150">
+						<template slot-scope="scope">
+							<el-select v-model="scope.row.achieveType" @change="calculationAchieve" placeholder="请选择业绩类型">
+								<el-option
+										v-for="item in achieveTypeList"
+										:key="item.value"
+										:label="item.value"
+										:value="item.value">
+								</el-option>
+							</el-select>
+						</template>
+					</el-table-column>
+					<el-table-column
 							label="业绩" width="100">
 						<template slot-scope="scope">
-							<el-input v-model="scope.row.achieveMoney"></el-input>
+							<el-input @input="checkAchieveMoney" v-model="scope.row.goodsCash"></el-input>
 						</template>
 					</el-table-column>
 					<el-table-column
@@ -169,6 +182,7 @@
 			cardInfo : "",
 			loginUser : "",
 			rechargeMoney : 0,
+			achieveTypeList : [],
 			payMethods: [{
 				value: '现金支付',
 				img: '/images/pay/cash.png',
@@ -219,28 +233,40 @@
 				}
 			});
 
-			//获取登录用户信息
+
+			// 业绩类型
 			AjaxProxy.requst({
 				app: _this,
-				url: basePath + '/admin/getLoginUser',
+				url: basePath + '/admin/customerDictionary/getListByParentCode/YJLX',
 				callback: function (data) {
-					_this.loginUser = data.mapInfo.user;
+					_this.achieveTypeList = data.rows;
 
-					_this.achieveList.push({
-						saleId: _this.loginUser.suId,
-						achieveMoney: 0,
-						commission : 0,
-						isShare: false,
+					//获取登录用户信息
+					AjaxProxy.requst({
+						app: _this,
+						url: basePath + '/admin/getLoginUser',
+						callback: function (data) {
+							_this.loginUser = data.mapInfo.user;
+
+							_this.achieveList.push({
+								saleId: _this.loginUser.suId,
+								goodsCash: 0,
+								achieveType : _this.achieveTypeList[0].value,
+								commission : 0,
+								isShare: false
+							});
+						}
 					});
 				}
 			});
+
 		},
 		methods : {
 			//修改充值金额同步修改业绩
 			changeRechargeMoney(){
 				let aMoeny=(this.rechargeMoney/this.achieveList.length).toFixed(2);
 				this.achieveList.forEach(item=>{
-					item.achieveMoney=aMoeny;
+					item.goodsCash=aMoeny;
 				});
 			},
 			submitRecharge() {
@@ -280,37 +306,40 @@
 				_this.achieveList.forEach(achieve => {
 					let achieveNew = {
 						beaultId: achieve.saleId,
-						t1: achieve.achieveMoney,
-						t3: '现金业绩',
+						goodsCash: achieve.goodsCash,
+						achieveType: achieve.achieveType,
 						projPercentage: achieve.commission,
+						payMethod:"现金",
 					};
 					achaeveList.push(achieveNew);
 				})
 				_this.cardInfo.bjmoney = _this.rechargeMoney;
 				_this.cardInfo.achaeveList = achaeveList;
-				let url = basePath + "/admin/moneyCardUse/cz";
+				if (_this.checkAchieveMoney()) {
+					let url = basePath + "/admin/moneyCardUse/cz";
 
-				console.log(_this.cardInfo);
-				AjaxProxy.requst({
-					app: _this,
-					data: _this.cardInfo,
-					url: url,
-					callback: function (data) {
-						if (_this.printPaper) {
-							_this.print();
+					console.log(_this.cardInfo);
+					AjaxProxy.requst({
+						app: _this,
+						data: _this.cardInfo,
+						url: url,
+						callback: function (data) {
+							if (_this.printPaper) {
+								_this.print();
+							}
+
+							if(parent.myGrid) {
+								parent.myGrid.serchData();
+							}
+
+							if (parent.app) {
+								parent.app.vipInfoFn();
+							}
+
+							_this.closeFrame();
 						}
-
-						if(parent.myGrid) {
-							parent.myGrid.serchData();
-						}
-
-						if (parent.app) {
-							parent.app.vipInfoFn();
-						}
-
-						_this.closeFrame();
-					}
-				});
+					});
+				}
 			},
 			cancelSubmit() {
 				this.closeFrame();
@@ -379,10 +408,56 @@
 				row2 = JSON.parse(JSON.stringify(row));
 				row2.isShare = true;
 				this.achieveList.push(row2);
+				this.calculationAchieve();
+			},
+			calculationAchieve() {
+				let _this = this;
+				let jsqMap = {};
+				this.achieveList.forEach(achieve=>{
+					key=achieve.achieveType;
+					if(!jsqMap[key]) {
+						jsqMap[key]=1;
+					} else {
+						jsqMap[key]++;
+					}
+				});
+				this.achieveList.forEach(achieve=>{
+					key = achieve.achieveType;
+					achieve.goodsCash=(_this.rechargeMoney/jsqMap[key]).toFixed(2);
+				});
 			},
 			//删除业绩
 			delAchieve(index, row) {
 				this.achieveList.splice(index, 1);
+				this.calculationAchieve();
+			},
+			checkAchieveMoney(){
+				console.log("校验业绩是否大于订单收款金额");
+				let _this = this;
+				let jsqMap={};
+				let isOk=true;
+				for(let i=0 ; i< this.achieveList.length; i++){
+					let achieve=this.achieveList[i];
+					if(!isNaN(achieve.goodsCash)  ){
+						key=achieve.achieveType;
+						if(!jsqMap[key]){
+							jsqMap[key]=parseFloat(achieve.goodsCash);
+						}else{
+							jsqMap[key]=jsqMap[key]+parseFloat(achieve.goodsCash);
+						}
+						if(jsqMap[key]>_this.rechargeMoney) {
+							this.$message.error("业绩分配金额大于支付金额");
+							isOk = false;
+							return;
+						}
+					}else{
+						this.$message.error("业绩分配金额请填写数字");
+						isOk=false;
+						return;
+					}
+				};
+				console.log("isOk",isOk);
+				return isOk;
 			},
 		}
 	});
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html
index 054b762..0bee811 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html
@@ -237,6 +237,18 @@
                         </template>
                     </el-table-column>
                 </el-table>
+
+                <el-row style="text-align: center; margin-top: 10px;">
+                    <el-pagination
+                            @size-change="handleSizeChange"
+                            @current-change="handleCurrentChange"
+                            :current-page="page.currentPage"
+                            :page-sizes="[10, 20, 30, 50]"
+                            :page-size="page.pageSize"
+                            layout="total, prev, pager, next, jumper"
+                            :total="page.total">
+                    </el-pagination>
+                </el-row>
                 <el-row class="btn-box">
                     <el-button size="mini" type="danger" @click="closeXm()">关闭</el-button>
                     <el-button size="mini" type="primary" @click="chouseGoods()">确认</el-button>
@@ -287,6 +299,7 @@
                             <el-input @change="calculationTotal" v-model="scope.row.zkPrice"></el-input>
                         </template>
                     </el-table-column>
+
                     <el-table-column
                             label="小计">
                         <template slot-scope="scope">
@@ -377,7 +390,7 @@
         </el-col>
     </el-row>
 
-
+    <!-- 业绩设置 -->
     <el-drawer
             title="业绩设置"
             :visible.sync="drawer"
@@ -414,27 +427,43 @@
                                 prop="orderItem.payMoney"
                                 label="收款">
                         </el-table-column>
-
                         <el-table-column
-                                label="业绩类型" width="150">
+                                label="支付方式"
+                                width="130">
                             <template slot-scope="scope">
-                                <el-select v-model="scope.row.t3" placeholder="请选择业绩类型">
+                                <el-select  v-model="scope.row.payMethod"
+                                            placeholder="请选择支付方式">
                                     <el-option
-                                            v-for="item in achieveTypeList"
-                                            :key="item.key"
-                                            :label="item.value"
-                                            :value="item.key">
+                                            v-for="item in itemSimplePayMethods"
+                                            :key="item.value"
+                                            :label="item.label"
+                                            :value="item.value"
+                                            :disabled="item.disabled">
                                     </el-option>
                                 </el-select>
                             </template>
                         </el-table-column>
                         <el-table-column
-                                label="业绩" width="100">
+                                label="业绩类型" width="150">
                             <template slot-scope="scope">
-                                <el-input v-model="scope.row.achieveMoney"></el-input>
+                                <el-select v-model="scope.row.achieveType" @change="calculationAchieve" placeholder="请选择业绩类型">
+                                    <el-option
+                                            v-for="item in achieveTypeList"
+                                            :key="item.value"
+                                            :label="item.value"
+                                            :value="item.value">
+                                    </el-option>
+                                </el-select>
                             </template>
                         </el-table-column>
+
                         <el-table-column
+                                label="业绩" >
+                            <template slot-scope="scope">
+                                <el-input @input="checkAchieveMoney" v-model="scope.row.goodsCash"></el-input>
+                            </template>
+                        </el-table-column>
+                        <el-table-column width="100"
                                 label="提成">
                             <template slot-scope="scope">
                                 <el-input v-model="scope.row.commission"></el-input>
@@ -461,7 +490,7 @@
                                            size="mini"
                                            @click="delAchieve(scope.$index, scope.row)">删除
                                 </el-button>
-                                <el-tooltip content="分享业绩" placement="top">
+                                <el-tooltip content="分享业绩" placement="top" v-if="!scope.row.isShare">
                                     <el-button @click="shareAchieve(scope.$index, scope.row)" icon="el-icon-share"
                                                size="mini" type="primary"></el-button>
                                 </el-tooltip>
@@ -474,6 +503,7 @@
         </el-row>
     </el-drawer>
 
+    <!-- 收款 -->
     <el-dialog title="收款" :visible.sync="dialogSettleVisible">
         <el-row type="flex" align="middle" style="padding: 0 0 10px 0;">
             <el-col :span="5" style="text-align: center;">应收</el-col>
@@ -574,6 +604,13 @@
             vipList: [],
             currentVipInfo: {},
             vipLoading: false,
+            itemSimplePayMethods:[{
+                value: '现金',
+                label:'现金',
+            },{
+                value: '划扣',
+                label:'划扣',
+            }],
             payMethods: [{
                 value: '现金支付',
                 img: '/images/pay/cash.png',
@@ -611,14 +648,11 @@
                 type: '欠款'
             },],
             achieveList: [],
+            //业绩岗位
+            achievePostList : [
+            ],
+            //业绩类型
             achieveTypeList : [
-                {
-                    "key" : "现金业绩",
-                    "value" : "现金业绩"
-                },{
-                    "key" : "划扣业绩",
-                    "value" : "划扣业绩"
-                },
             ],
             //会员可用的充值卡
             moneyCards: [],
@@ -637,6 +671,11 @@
             searchTableData: [],
             //表格加载效果
             loading: false,
+            page : {
+                currentPage : 1,
+                pageSize : 10,
+                total : 0
+            },
             /******搜索表格数据END********/
 
             dialogSettleVisible : false,
@@ -660,12 +699,22 @@
             if (vipId) {
                 _this.changeVip(vipId);
             }
-            //获取用户列表
+            //获取业绩用户列表
             AjaxProxy.requst({
                 app: _this,
                 url: basePath + '/admin/shopAll',
                 callback: function (data) {
                     _this.userList = data.rows;
+                }
+            });
+
+
+            // 业绩类型
+            AjaxProxy.requst({
+                app: _this,
+                url: basePath + '/admin/customerDictionary/getListByParentCode/YJLX',
+                callback: function (data) {
+                    _this.achieveTypeList = data.rows;
                 }
             });
 
@@ -714,10 +763,11 @@
                                                     orderItem: item,
                                                     staff: _this.staffUser,
                                                     saleId: _this.staffUser.suId,
-                                                    achieveMoney: item.payMoney,
+                                                    goodsCash: item.payMoney,
                                                     commission : 0,
-                                                    t3 : '现金业绩',
+                                                    achieveType : _this.achieveTypeList[0].value,
                                                     isShare: false,
+                                                    payMethod:item.payMethod,
                                                 });
                                             });
                                             _this.order.payMoney = orderPayMoney;
@@ -801,7 +851,7 @@
              * @param{type} 1 = 购买 2=赠送
              * */
             pushToSelectGoods(goods, type) {
-
+                let _this=this;
                 //判断是否被选中
                 let selected = false;
                 this.order.items.forEach(item => {
@@ -822,7 +872,6 @@
                     item.price = goods.sealPice;
                     item.goodsId = goods.id;
                     item.isFree = '否';
-                    item.payMethod = '现金';
                     if (type == BUY_TYPE_NOT_FREE) {
                         //购买
                         item.zkPrice = goods.sealPice;
@@ -841,10 +890,11 @@
                             orderItem: item,
                             staff: this.staffUser,
                             saleId: this.staffUser.suId,
-                            achieveMoney: item.payMoney,
-                            t3: '现金业绩',
+                            goodsCash: item.payMoney,
+                            achieveType : _this.achieveTypeList[0].value,
                             commission: 0,
                             isShare: false,
+                            payMethod:'现金',
                         });
                     } else {
                         //加入业绩
@@ -852,10 +902,11 @@
                             orderItem: item,
                             staff: this.loginUser,
                             saleId: this.loginUser.suId,
-                            achieveMoney: item.payMoney,
-                            t3: '现金业绩',
+                            goodsCash: item.payMoney,
+                            achieveType : _this.achieveTypeList[0].value,
                             commission: 0,
                             isShare: false,
+                            payMethod:'现金',
                         });
                     }
                     this.order.items.push(item);
@@ -900,11 +951,15 @@
                                 // }
                                 _this.order.payMoney += parseFloat(item.payMoney);
 
+                                //重新计算业绩金额
                                 _this.achieveList.forEach(achieve=>{
-                                    if(achieve.orderItem==item){
-                                        achieve.achieveMoney=item.payMoney;
+                                    if(achieve.orderItem.uuid==item.uuid){
+                                        achieve.orderItem.payMoney=item.payMoney;
                                     }
                                 })
+                                _this.calculationAchieve();
+
+
                             });
                             _this.order.payMoney = _this.order.payMoney.toFixed(2);
                             //计算欠款
@@ -946,14 +1001,18 @@
                     let _this = this;
 
                     if(submitType == 1) {
+                        //校验支付方式
                         if (_this.payMoneys.length > 0) {
                             let flows = []
                             var total = 0;
-                            _this.payMoneys.forEach(item => {
+                            let isPayMethodOk=true;
+                            for(let i=0; i<_this.payMoneys.length;i++){
+                                let item = _this.payMoneys[i];
                                 let flow = {};
                                 flow.payMethod = item.type;
                                 if (!item.money) {
-                                    this.$message.warning("请输入" + item.type + "的付款金额");
+                                    _this.$message.warning("请输入" + item.type + "的付款金额");
+                                    isPayMethodOk=false;
                                     return false;
                                 }
                                 flow.amount = parseFloat(item.money);
@@ -963,7 +1022,7 @@
                                 }
                                 total += parseFloat(item.money);
                                 flows.push(flow)
-                            })
+                            }
                             if (total != _this.order.payMoney) {
                                 this.$message.warning("输入付款总金额与应付金额不符");
                                 return false;
@@ -979,29 +1038,19 @@
                     _this.achieveList.forEach(achieve => {
                         for (let i = 0; i < _this.order.items.length; i++) {
                             let item = _this.order.items[i];
-                            if (!item.achaeveList){
-                                item.achaeveList = [];
+                            if (!item.achieveList){
+                                item.achieveList = [];
                             }
                             if (item.uuid == achieve.orderItem.uuid) {
                                 let achieveNew = {
                                     uuid:item.uuid,
                                     beaultId: achieve.saleId,
-                                    t1: achieve.achieveMoney,
-                                    t3: achieve.t3,
                                     projPercentage: achieve.commission,
+                                    achieveType: achieve.achieveType,
+                                    goodsCash: achieve.goodsCash,
+                                    payMethod: achieve.payMethod,
                                 };
-
-                                var flag = true;
-                                for(var j = 0; j < item.achaeveList.length; j++) {
-                                    if(item.achaeveList[j].uuid == achieveNew.uuid && item.achaeveList[j].beaultId == achieveNew.beaultId) {
-                                        flag = false;
-                                        break;
-                                    }
-                                }
-
-                                if (flag) {
-                                    item.achaeveList.push(achieveNew);
-                                }
+                               item.achieveList.push(achieveNew);
                                 break;
                             }
                         }
@@ -1009,7 +1058,7 @@
 
                     console.log(_this.order);
                     //校验业绩金额
-                    if (_this.checkAchieve()) {
+                    if (_this.checkAchieveMoney()) {
                         let url = basePath + "/admin/order/payOrder";
                         if (submitType == 2) {
                             url = basePath + "/admin/order/saveOrder";
@@ -1065,29 +1114,7 @@
 
                 }
             },
-            /**
-             * 校验订单业绩设置是否合理
-             */
-            checkAchieve() {
-               /*
-               //TODO 前端展示不检测,因为考虑到储值卡支付问题
-               let _this = this;
-                for (let i = 0; i < _this.order.items.length; i++) {
-                    if (_this.achieveList.length > 0) {
-                        let item = _this.order.items[i];
-                        let sum = 0;
-                        item.achieveList.forEach(achieve => {
-                            console.log(sum, achieve);
-                            sum += parseFloat(achieve.t1);
-                        });
-                        if (sum > item.payMoney) {
-                            this.$message.warning("业绩金额不能大于支付金额【" + item.shoppingGoods.name + "】");
-                            return false;
-                        }
-                    }
-                }*/
-                return true;
-            },
+
 
             /**
              * 检查订单是否能够提交
@@ -1164,6 +1191,9 @@
              */
             searchGoods() {
                 let _this = this;
+                var currentPage = this.page.currentPage;
+                var pageSize = this.page.pageSize;
+                var offset = (currentPage - 1) * pageSize;
                 if (this.queryKey && this.queryKey.trim().length > 0) {
                     this.showSearchTable = true;
                     this.loading = true;
@@ -1171,10 +1201,11 @@
                         app: _this,
                         contentType: 'application/x-www-form-urlencoded',
                         //TODO 优化下拉加载
-                        data: {name: _this.queryKey, limit: 10000},
+                        data: {name: _this.queryKey, limit: pageSize, offset : offset},
                         url: basePath + "/admin/shoppinggoods/showList",
                         callback: function (data) {
                             _this.searchTableData = data.rows;
+                            _this.page.total = data.total;
                             _this.loading = false;
                         }
                     });
@@ -1182,8 +1213,14 @@
                     this.showSearchTable = false;
                 }
             },
-
-
+            handleSizeChange(val) {
+                this.page.pageSize = val;
+                this.searchGoods();
+            },
+            handleCurrentChange(val) {
+                this.page.currentPage = val;
+                this.searchGoods();
+            },
             remoteMethod(query) {
                 if (query !== '') {
                     this.vipLoading = true;
@@ -1231,11 +1268,61 @@
             shareAchieve(index, row) {
                 row2 = JSON.parse(JSON.stringify(row));
                 row2.isShare = true;
-                this.achieveList.push(row2);
+                this.achieveList.splice(index+1,0,row2);
+                //this.achieveList=;
+                this.calculationAchieve();
             },
+
+            //业绩均分订单金额
+            calculationAchieve(){
+                console.log("计算业绩");
+                let jsqMap={};
+                this.achieveList.forEach(achieve=>{
+                    key=achieve.achieveType+achieve.orderItem.uuid;
+                    if(!jsqMap[key]){
+                        jsqMap[key]=1;
+                    }else{
+                        jsqMap[key]++;
+                    }
+                });
+                this.achieveList.forEach(achieve=>{
+                    key=achieve.achieveType+achieve.orderItem.uuid;
+                    achieve.goodsCash=(achieve.orderItem.payMoney/jsqMap[key]).toFixed(2);
+                });
+            },
+            //校验业绩是否大于订单收款金额
+            checkAchieveMoney(){
+                console.log("校验业绩是否大于订单收款金额");
+                let jsqMap={};
+                let isOk=true;
+                for(let i=0 ; i< this.achieveList.length; i++){
+                    let achieve=this.achieveList[i];
+                    if(!isNaN(achieve.goodsCash)  ){
+                        key=achieve.achieveType+achieve.orderItem.uuid;
+                        if(!jsqMap[key]){
+                            jsqMap[key]=parseFloat(achieve.goodsCash);
+                        }else{
+                            jsqMap[key]=jsqMap[key]+parseFloat(achieve.goodsCash);
+                        }
+                        if(jsqMap[key]>achieve.orderItem.payMoney) {
+                            this.$message.error("【"+achieve.orderItem.shoppingGoods.name + "】业绩分配金额大于支付金额");
+                            isOk = false;
+                            return;
+                        }
+                    }else{
+                        this.$message.error("【"+achieve.orderItem.shoppingGoods.name + "】业绩分配金额请填写数字");
+                        isOk=false;
+                        return;
+                    }
+                };
+                console.log("isOk",isOk);
+                return isOk;
+            },
+
             //删除业绩
             delAchieve(index, row) {
                 this.achieveList.splice(index, 1);
+                this.calculationAchieve();
             },
             print() {
                 let _this = this;
@@ -1342,6 +1429,10 @@
                     return false;
                 }
 
+                if(!this.checkAchieveMoney()){
+                    return ;
+                }
+
                 _this.dialogSettleVisible = true;
             }
         }
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html
index bd63766..58db52c 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html
@@ -108,7 +108,8 @@
                         </el-col>
                         <el-col :span="14" style="text-align: right;">
                             <label>¥ {{order.total}}</label>
-                            <label>¥ {{(order.zkTotal - order.total).toFixed(2)}}</label>
+                            <!-- 退款订单不能显示为负数 -->
+                            <label>¥ {{(order.zkTotal - order.total>0?order.zkTotal - order.total:0).toFixed(2)}}</label>
                             <label>¥ {{order.zkTotal}}</label>
                             <label>¥ {{order.arrears}}</label>
                             <label>¥ {{order.repay}}</label>
@@ -179,6 +180,8 @@
                                     label="折扣单价">
                             </el-table-column>
                             <el-table-column  label="小计" :formatter="calOrderTotalFormatter">
+                            </el-table-column>
+                            <el-table-column  label="支付方式"  prop="payMethod">
                             </el-table-column>
                         </el-table>
                     </el-row>
@@ -254,11 +257,15 @@
                                         label="收款">
                                 </el-table-column>
                                 <el-table-column
-                                        prop="t3"
+                                        prop="payMethod"
+                                        label="支付方式">
+                                </el-table-column>
+                                <el-table-column
+                                        prop="achieveType"
                                         label="业绩类型">
                                 </el-table-column>
                                 <el-table-column
-                                        prop="t1"
+                                        prop="goodsCash"
                                         label="原业绩">
                                 </el-table-column>
                                 <el-table-column
@@ -307,16 +314,33 @@
                                 prop="zkTotal"
                                 label="收款">
                         </el-table-column>
+
+                        <el-table-column
+                                label="支付方式"
+                                width="130">
+                            <template slot-scope="scope">
+                                <el-select  v-model="scope.row.payMethod"
+                                            placeholder="请选择支付方式">
+                                    <el-option
+                                            v-for="item in itemSimplePayMethods"
+                                            :key="item.value"
+                                            :label="item.label"
+                                            :value="item.value"
+                                            :disabled="item.disabled">
+                                    </el-option>
+                                </el-select>
+                            </template>
+                        </el-table-column>
                         <el-table-column
                                 prop="t3"
                                 label="业绩类型">
                             <template slot-scope="scope">
-                                <el-select v-model="scope.row.t3" placeholder="请选择业绩类型">
+                                <el-select v-model="scope.row.achieveType" placeholder="请选择业绩类型">
                                     <el-option
                                             v-for="item in achieveTypeList"
-                                            :key="item.key"
+                                            :key="item.value"
                                             :label="item.value"
-                                            :value="item.key">
+                                            :value="item.value">
                                     </el-option>
                                 </el-select>
                             </template>
@@ -325,7 +349,7 @@
                                 prop="achieve"
                                 label="业绩">
                             <template slot-scope="scope">
-                                <el-input v-model="scope.row.t1"></el-input>
+                                <el-input  @input="checkAchieveMoney" v-model="scope.row.goodsCash"></el-input>
                             </template>
                         </el-table-column>
                         <el-table-column
@@ -354,9 +378,9 @@
                                            size="mini"
                                            @click="delAchieve(scope.$index, scope.row)">删除
                                 </el-button>
-                                <el-tooltip content="分享业绩" placement="top">
-                                    <el-button @click="shareAchieve(scope.$index, scope.row)" icon="el-icon-share"
-                                               size="mini" type="primary"></el-button>
+                                <el-tooltip content="分享业绩" placement="top" v-if="!scope.row.isShare">
+                                    <el-button  @click="shareAchieve(scope.$index, scope.row)" icon="el-icon-share"
+                                                size="mini" type="primary"></el-button>
                                 </el-tooltip>
                             </template>
                         </el-table-column>
@@ -453,9 +477,9 @@
             </el-col>
         </el-row>
 
-<!--        <el-row style="text-align: center; margin: 20px 0 10px 0">-->
-<!--            <el-checkbox v-model="printPaper">打印小票</el-checkbox>-->
-<!--        </el-row>-->
+        <!--        <el-row style="text-align: center; margin: 20px 0 10px 0">-->
+        <!--            <el-checkbox v-model="printPaper">打印小票</el-checkbox>-->
+        <!--        </el-row>-->
 
         <el-row style="text-align: center; margin: 10px 0 0 0">
             <el-button type="primary" @click="confirmSubmit">确认收款</el-button>
@@ -482,15 +506,7 @@
             activeName : "first",
             circleUrl : "https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png",
             userList : [],
-            achieveTypeList : [
-                {
-                    "key" : "现金业绩",
-                    "value" : "现金业绩"
-                },{
-                    "key" : "划扣业绩",
-                    "value" : "划扣业绩"
-                },
-            ],
+            achieveTypeList : [],
             orderItems : [],
             achieveItems : [],
             flowItems : [],
@@ -498,6 +514,13 @@
             isRefund : false,
             isReturnAchieve : false,
             totalRefund : "",
+            itemSimplePayMethods:[{
+                value: '现金',
+                label:'现金',
+            },{
+                value: '划扣',
+                label:'划扣',
+            }],
             payMethods: [{
                 value: '现金支付',
                 img: '/images/pay/cash.png',
@@ -546,8 +569,24 @@
         created : function() {
             let _this = this;
             this.orderParam = /*[[${orderParam}]]*/
-            this.queryOrderDetailData(this.orderParam);
+            var orderId = /*[[${orderId}]]*/
+            var orderNo = /*[[${orderNo}]]*/
 
+            var param = {};
+            if(orderId) {
+                param.id = orderId;
+            } else {
+                param.orderNo = orderNo;
+            }
+            this.queryOrderDetailData(param);
+            // 业绩类型
+            AjaxProxy.requst({
+                app: _this,
+                url: basePath + '/admin/customerDictionary/getListByParentCode/YJLX',
+                callback: function (data) {
+                    _this.achieveTypeList = data.rows;
+                }
+            });
         },
         methods : {
             calRefund() {
@@ -565,7 +604,7 @@
                 let _this = this;
                 AjaxProxy.requst({
                     app: _this,
-                    data: {id: param, orderNo:param},
+                    data: param,
                     contentType: 'application/x-www-form-urlencoded',
                     url: basePath + '/admin/order/findOrderDetailByIdOrNo',
                     callback: function (data) {
@@ -659,6 +698,10 @@
                 }
 
                 _this.data.items = dataItems;
+                _this.data.zkTotal =  _this.refundMoney;
+                _this.data.total =  _this.total;
+
+
                 AjaxProxy.requst({
                     app: _this,
                     data: _this.data,
@@ -667,7 +710,9 @@
                     callback: function (data) {
                         _this.isRefund = false;
                         _this.dialogSettleVisible = false;
-                        _this.queryOrderDetailData(_this.data.oldOrderId);
+                        var param = {};
+                        param.id = _this.data.oldOrderId;
+                        _this.queryOrderDetailData(param);
                     }
                 });
 
@@ -712,6 +757,7 @@
                 let _this = this;
                 let items = this.orderItems;
                 _this.refundMoney = 0;
+                _this.total = 0;
 
                 for(var i = 0; i < items.length; i++) {
                     let item = items[i]
@@ -727,6 +773,8 @@
                         }
 
                         _this.refundMoney += parseFloat(item.refundPrice * item.refundCount);
+                        //记录一下未优惠之前的价格
+                        _this.total += parseFloat(item.price * item.refundCount);
                     }
                 }
 
@@ -737,7 +785,7 @@
                 _this.dialogSettleVisible = true;
             },
             calOrderTotalFormatter(row, column) {
-                return row.count * row.price;
+                return row.count * row.zkPrice;
             },
             getVipMoneyCards() {
                 let _this = this;
@@ -855,34 +903,77 @@
             },
             saveAchieve() {
                 let _this = this;
-                AjaxProxy.requst({
-                    app: _this,
-                    data: _this.achieveItems,
-                    contentType: 'application/json',
-                    url: basePath + '/admin/achieve/add',
-                    callback: function (data) {
-                        _this.$message.success(data.info);
-                    }
-                });
-            },
-            shareAchieve(index, row) {
-                var row2 = JSON.parse(JSON.stringify(row));
-                row2.id = null;
-                row2.isShare = true;
-                this.achieveItems.push(row2);
-            },
-            delAchieve(index, row) {
-                let _this = this;
-                if (row.id) {
+                if(_this.checkAchieveMoney()){
                     AjaxProxy.requst({
                         app: _this,
-                        url: basePath + '/admin/achieve/del?id=' + row.id,
+                        data: _this.achieveItems,
+                        contentType: 'application/json',
+                        url: basePath + '/admin/achieve/add',
                         callback: function (data) {
+                            _this.$message.success(data.info);
                         }
                     });
                 }
 
+            },
+
+            shareAchieve(index, row) {
+                var row2 = JSON.parse(JSON.stringify(row));
+                row2.id = null;
+                row2.isShare = true;
+                this.achieveItems.splice(index+1,0,row2);
+                this.calculationAchieve();
+            },
+            //业绩均分订单金额
+            calculationAchieve(){
+                console.log("计算业绩");
+                let jsqMap={};
+                this.achieveItems.forEach(achieve=>{
+                    key=achieve.achieveType+achieve.orderItemId;
+                    if(!jsqMap[key]){
+                        jsqMap[key]=1;
+                    }else{
+                        jsqMap[key]++;
+                    }
+                });
+                this.achieveItems.forEach(achieve=>{
+                    key=achieve.achieveType+achieve.orderItemId;
+                    achieve.goodsCash=(achieve.zkTotal/jsqMap[key]).toFixed(2);
+                });
+            },
+            //校验业绩是否大于订单收款金额
+            checkAchieveMoney(){
+                console.log("校验业绩是否大于订单收款金额");
+                let jsqMap={};
+                let isOk=true;
+                for(let i=0 ; i< this.achieveItems.length; i++){
+                    let achieve=this.achieveItems[i];
+                    if(!isNaN(achieve.goodsCash)  ){
+                        key=achieve.achieveType+achieve.orderItemId;
+                        if(!jsqMap[key]){
+                            jsqMap[key]=parseFloat(achieve.goodsCash);
+                        }else{
+                            jsqMap[key]=jsqMap[key]+parseFloat(achieve.goodsCash);
+                        }
+                        if(jsqMap[key]>achieve.zkTotal) {
+                            this.$message.error("【"+achieve.goodsName + "】业绩分配金额大于支付金额");
+                            isOk = false;
+                            break;
+                        }
+                    }else{
+                        this.$message.error("【"+achieve.goodsName + "】业绩分配金额请填写数字");
+                        isOk=false;
+                        break;
+                    }
+                }
+                console.log("isOk",isOk);
+                return isOk;
+            },
+            //删除业绩
+            delAchieve(index, row) {
+                let _this = this;
                 _this.achieveItems.splice(index, 1);
+                this.calculationAchieve();
             },
             checkAchieveIsDel(items) {
                 var achieveIds = [];
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/pbxq-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/pbxq-form.html
index 59504c6..05fd426 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/pbxq-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/pbxq-form.html
@@ -76,17 +76,22 @@
                         <el-table-column
                                 prop="projInfo.name"
                                 label="商品名称"
-                                width="280">
+                                width="400">
+                        </el-table-column>
+                        <el-table-column
+                                prop="projUse.source"
+                                label="来源"
+                                width="400">
                         </el-table-column>
                         <el-table-column
                                 :formatter="hkPrice"
                                 label="划扣金额"
-                                width="200">
+                                width="100">
                         </el-table-column>
                         <el-table-column
                                 prop="count"
                                 label="次数"
-                                width="200">
+                                width="100">
                         </el-table-column>
                         <el-table-column
                                 prop="projInfo.timeLength"
@@ -172,11 +177,9 @@
                 MTools.closeForm();
             },
             serviceTime(row, column) {
-                console.log(column);
-                console.log(row);
-                // if (!column.bedState) {
-                //     return "-";
-                // }
+                  if (!row.beginTime) {
+                     return "-";
+                 }
                 var startTime = this.dateFormat(row.beginTime);
                 var endTime = this.dateFormat(row.endTime);
                 return startTime + " - " + endTime;
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/servicceAddForm.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/servicceAddForm.html
index 13f7806..2b3de69 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/servicceAddForm.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/servicceAddForm.html
@@ -124,8 +124,8 @@
 
 				</el-tab-pane>
 				<el-tab-pane label="套餐" name="tab2">
-					<template v-for="item in taocanList" >
-						<p class="el-big-title">【{{item.isCourse=='N'?'固定套餐':'任选套餐'}}】{{item.projName}}
+					<template v-for="(item,index) in taocanList" v-if="index > 3 ? tcIsOpen : true">
+						<p class="el-big-title">{{index}}【{{item.isCourse=='N'?'固定套餐':'任选套餐'}}】{{item.projName}}
 							<span style="float: right" v-if="item.failTime != null">有效期:{{item.failTime}}</span>
 							<code v-if="item.projInfo.isCourse=='Y'" > 剩余次数:<span v-if="item.projInfo.isInfinite == 'Y'">无限次</span><span v-else>{{item.surplusCount}}</span> </code>
 						</p>
@@ -165,7 +165,10 @@
 							</el-table-column>
 						</el-table>
 					</template>
-
+					<el-row style="text-align: center; margin-top: 5px;">
+						<el-link type="primary" v-if="!tcIsOpen && taocanList.length > 0" @click="tcIsOpen = true">点击展开</el-link>
+						<el-link type="primary" v-if="tcIsOpen" @click="tcIsOpen = false">点击隐藏</el-link>
+					</el-row>
 				</el-tab-pane>
 
 			</el-tabs>
@@ -238,6 +241,7 @@
 			orderItemList:[],
 			projList:[],
 			taocanList:[],
+			tcIsOpen : false,
 			yyTime:new Date(),
 
 
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service_all_list.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service_all_list.html
index 7eeaf03..17397a9 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service_all_list.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service_all_list.html
@@ -187,11 +187,13 @@
                 break;
             case '需配料':
                 html +=btns[3].replace('VALUE',value);
+                html += btns[2].replace('VALUE',value);
                 break;
             case '配料完成':
                 break;
             case '服务完成':
                 html +=btns[4].replace('VALUE',value);
+                html += btns[2].replace('VALUE',value);
                 break;
         }
         html += btns[5].replace('VALUE',value);
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/underlineOrder.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/underlineOrder.html
index 71fde37..787fd6f 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/underlineOrder.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/underlineOrder.html
@@ -220,20 +220,26 @@
     function cancelOrder() {
         var id=myGrid.getSelectItemId();
         layer.confirm('确定取消此订单?', {
-            btn: ['确认', '取消并删除', '取消'] //可以无限个按钮
+            btn: ['确认', '取消'] //可以无限个按钮
         }, function(index, layero){
             $.post(basePath+'/admin/order/cancelOrder?id='+id+'&del=0', {}, function(data){
-                parent.layer.msg(data.info,{icon: 1});
+                if (data.status == '200') {
+                    parent.layer.msg(data.info,{icon: 1});
+                } else {
+                    parent.layer.msg(data.info,{icon: 2});
+                }
                 layer.closeAll();
                 myGrid.serchData();
             });
-        }, function(index){
-            $.post(basePath+'/admin/order/cancelOrder?id='+id+'&del=1', {}, function(data){
-                parent.layer.msg(data.info,{icon: 1});
-                layer.closeAll();
-                myGrid.serchData();
-            });
-        }, function(index){
+        },
+        //     function(index){
+        //     $.post(basePath+'/admin/order/cancelOrder?id='+id+'&del=1', {}, function(data){
+        //         parent.layer.msg(data.info,{icon: 1});
+        //         layer.closeAll();
+        //         myGrid.serchData();
+        //     });
+        // },
+            function(index){
             //按钮【按钮二】的回调
         });
     }
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html
index 5311542..cd511b3 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html
@@ -276,6 +276,11 @@
                                     </template>
                                 </el-table-column>
                                 <el-table-column
+                                        prop="source"
+                                        label="来源"
+                                        width="180">
+                                </el-table-column>
+                                <el-table-column
                                         prop="status"
                                         label="状态"
                                         width="180">
@@ -458,8 +463,8 @@
                                     <template slot-scope="scope">
                                         <el-button type="text" size="small" @click="lookServiceOrder(scope.$index, scope.row)">查看</el-button>
                                         <el-button matrix:btn="serviceClub-paiban" type="text" size="small" v-if="scope.row.state=='待预约'" @click="paiban(scope.$index, scope.row)">排班</el-button>
-                                        <el-button matrix:btn="serviceClub-paidan" type="text" size="small" v-if="scope.row.state=='预约成功待处理'" @click="giveServiceOrder(scope.$index, scope.row)">派单</el-button>
-                                        <el-button matrix:btn="serviceClub-edit" type="text" size="small" v-if="scope.row.state=='预约成功待处理'" @click="modifyServiceOrder(scope.$index, scope.row)">修改</el-button>
+<!--                                        <el-button matrix:btn="serviceClub-paidan" type="text" size="small" v-if="scope.row.state=='预约成功待处理'" @click="giveServiceOrder(scope.$index, scope.row)">派单</el-button>-->
+                                        <el-button matrix:btn="serviceClub-edit" type="text" size="small" v-if="scope.row.state=='待预约'" @click="modifyServiceOrder(scope.$index, scope.row)">修改</el-button>
                                         <el-button matrix:btn="serviceClub-peiliao" type="text" size="small" v-if="scope.row.state=='需配料'" @click="peiliao(scope.$index, scope.row)">配料</el-button>
                                         <el-button matrix:btn="serviceClub-huakou" type="text" size="small" v-if="scope.row.state=='服务完成'" @click="hkService(scope.$index, scope.row)">划扣</el-button>
                                         <el-button matrix:btn="serviceClub-edit" type="text" size="small" @click="modifyTime(scope.$index, scope.row)">修改时间</el-button>
@@ -534,14 +539,6 @@
                                         label="下单顾问">
                                 </el-table-column>
                                 <el-table-column
-                                        prop="cashPay"
-                                        label="现金支付金额">
-                                </el-table-column>
-                                <el-table-column
-                                        prop="cardPay"
-                                        label="卡支付金额">
-                                </el-table-column>
-                                <el-table-column
                                         prop="arrears"
                                         label="欠款金额">
                                 </el-table-column>
@@ -573,6 +570,69 @@
                                     :page-size="orderTab.page.pageSize"
                                     layout="total, sizes, prev, pager, next, jumper"
                                     :total="orderTab.page.total">
+                            </el-pagination>
+                        </el-row>
+                    </el-tab-pane>
+                    <el-tab-pane label="积分记录" name="scoreTab">
+                        <el-row style="line-height: 40px;">
+                            <el-col :span="8">
+                                <el-date-picker v-model="scoreTab.selectTime"
+                                                type="daterange"
+                                                range-separator="至"
+                                                format="yyyy-MM-dd"
+                                                start-placeholder="开始日期"
+                                                end-placeholder="结束日期">
+                                </el-date-picker>
+                            </el-col>
+                            <el-col :span="8">   <el-input v-model="scoreTab.remarks" placeholder="请输入备注查询" ></el-input></el-col>
+                            <el-col :span="6" style="margin-left: 5px;">
+                                <el-button type="primary" @click="scoreCheckQuery">查询</el-button>
+                                <el-button type="primary"  @click="changeScore">调整</el-button>
+                            </el-col>
+                        </el-row>
+                        <el-row class="table-style">
+                            <el-table :data="scoreTab.scoreTableDate"
+                                      style="width: 100%;">
+                                <el-table-column
+                                        type="index"
+                                        width="50">
+                                </el-table-column>
+                                <el-table-column
+                                        prop="createTime"
+                                        label="时间">
+                                </el-table-column>
+                                <el-table-column
+                                        prop="optionName"
+                                        label="操作人员">
+                                </el-table-column>
+                                <el-table-column
+                                        prop="shopName"
+                                        label="门店">
+                                </el-table-column>
+                                <el-table-column
+                                        prop="recNum"
+                                        label="修改数量">
+                                </el-table-column>
+                                <el-table-column
+                                        prop="nowScore"
+                                        label="余额">
+                                </el-table-column>
+                                <el-table-column
+                                        prop="remarks"
+                                        label="备注">
+                                </el-table-column>
+                            </el-table>
+                        </el-row>
+                        <el-row>
+                            <el-pagination
+                                    background
+                                    @size-change="scoreCheckSizeChange"
+                                    @current-change="scoreCheckCurrentChange"
+                                    :current-page="scoreTab.page.currentPage"
+                                    :page-sizes="[10, 20, 30, 50]"
+                                    :page-size="scoreTab.page.pageSize"
+                                    layout="total, sizes, prev, pager, next, jumper"
+                                    :total="scoreTab.page.total">
                             </el-pagination>
                         </el-row>
                     </el-tab-pane>
@@ -632,10 +692,31 @@
                             </el-pagination>
                         </el-row>
                     </el-tab-pane>
+
+
                 </el-tabs>
             </el-main>
         </el-container>
     </el-container>
+
+    <el-dialog title="积分调整" :visible.sync="scoreTab.showChangePaln">
+        <el-form :model="scoreTab.form">
+             <h3>可用积分:{{vipInfo.pointAll}}</h3>
+            <el-form-item label="调整数量" >
+                <el-input v-model="scoreTab.form.amount" autocomplete="off"></el-input>
+            </el-form-item>
+            <el-form-item label="调整备注" >
+                <el-input v-model="scoreTab.form.remarks" autocomplete="off"></el-input>
+            </el-form-item>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+            <el-button @click="scoreTab.showChangePaln = false">取 消</el-button>
+            <el-button type="primary" @click="submitChangeScore" >确 定</el-button>
+        </div>
+    </el-dialog>
+
+
+
 </div>
 </body>
 <script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
@@ -700,6 +781,23 @@
                     total : 0
                 }
             },
+            //用户积分tab
+            scoreTab : {
+                scoreTableDate : [],
+                selectTime : '',
+                remarks:'',
+                showChangePaln:false,
+                page : {
+                    currentPage : 1,
+                    pageSize : 10,
+                    total : 0
+                },
+                form:{
+                    amount:'',
+                    remarks:'',
+                }
+
+            },
             // 皮肤检测tab
             skinTab : {
                 skinTableDate : [],
@@ -748,6 +846,7 @@
             },
             handleSelect(row) {
                 this.vipInfoFn(row.key);
+                this.searchValue=row.key;
             },
             // 请求会员信息
             vipInfoFn(key) {
@@ -1133,7 +1232,7 @@
             },
             // 取消
             cancelServiceOrder(index, row) {
-                MTools.handleItem(basePath + "/admin/projService/cancelOrder?id=" + row.row, "确定取消订单吗?", this.serviceOrderQuery);
+                MTools.handleItem(basePath + "/admin/projService/cancelOrder?id=" + row.id, "确定取消订单吗?", this.serviceOrderQuery);
             },
             // 修改时间
             modifyTime(index, row) {
@@ -1222,6 +1321,85 @@
                 });
             },
             /********* 订单Tab end ***********/
+
+            /************** 积分tab start **************/
+            submitChangeScore(){
+                let _this=this;
+
+                var params={
+                    amount:this.scoreTab.form.amount,
+                    remarks:this.scoreTab.form.remarks,
+                    vipId:this.vipInfo.id
+                };
+
+
+
+                $.AjaxProxy({
+                    p:params,
+                    json:"json"
+                }).invoke(basePath + "/admin/score/changeUserScore", function (loj) {
+                    _this.$message.success('调整成功');
+                    _this.scoreTab.showChangePaln=false;
+                    _this.scoreTab.form={
+                        amount:'',
+                        remarks:''
+                    }
+                    _this.vipInfoFn(_this.searchValue);
+                    _this.scoreCheckQuery();
+
+                });
+
+            },
+            changeScore(){
+                if (!this.vipInfo.id) {
+                    this.$message.error('请选择用户');
+                    return;
+                }else {
+                    this.scoreTab.showChangePaln=true;
+                }
+
+            },
+
+            scoreCheckQuery() {
+                this.scoreCheckTableDataQueryFn();
+            },
+            scoreCheckTableDataQueryFn() {
+                let _this = this;
+                let scoreTab = _this.scoreTab;
+                let page = scoreTab.page;
+                var params = {};
+
+                if (!_this.vipInfo.id) {
+                    return;
+                }
+
+                params.pageSize = page.pageSize;
+                params.pageNum =page.currentPage ;
+                params.vipId = _this.vipInfo.id;
+                params.remarks = scoreTab.remarks;
+                if (scoreTab.selectTime) {
+                    params.beginTime = scoreTab.selectTime?moment(scoreTab.selectTime[0]).format("YYYY-MM-DD"):'';
+                    params.endTime = scoreTab.selectTime?moment(scoreTab.selectTime[1]).format("YYYY-MM-DD"):'';
+                }
+                $.AjaxProxy({
+                    p:params,
+                    json:"json"
+                }).invoke(basePath + "/admin/score/getFlowList", function (loj) {
+                    scoreTab.page.total = loj.getResult().total;
+                    scoreTab.scoreTableDate = loj.getValue("rows");
+                });
+            },
+            scoreCheckSizeChange(val) {
+                this.scoreTab.page.pageSize = val;
+                this.scoreCheckTableDataQueryFn()
+            },
+            scoreCheckCurrentChange(val) {
+                this.scoreTab.page.currentPage = val;
+                this.scoreCheckTableDataQueryFn()
+            },
+            /************** 积分tab end **************/
+
+
 
             /************** 皮肤检测tab start **************/
             skinCheckQuery() {
@@ -1312,6 +1490,11 @@
                         this.skinCheckTableDataQueryFn();
                     }
                 }
+                if (tab.name === "scoreTab") {
+                    if (_this.scoreTab.scoreTableDate.length <= 0) {
+                        this.scoreCheckTableDataQueryFn();
+                    }
+                }
             },
 
             /********** 标签代码 start ************/
@@ -1357,7 +1540,7 @@
                     return;
                 }
                 vipId = this.vipInfo.id;
-                openAddService();
+                openAddService(vipId);
             },
             // 开订单
             addOrder() {
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip_bak.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip_bak.html
index 6b949bb..ae7dd75 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip_bak.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip_bak.html
@@ -268,7 +268,6 @@
                     $("#userList").hide();
                 }
             });
-        updateHistory();
         $("#userList").mouseleave(function () {
             $(this).hide();
         })
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yyServiceAddForm.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yyServiceAddForm.html
new file mode 100644
index 0000000..6720171
--- /dev/null
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yyServiceAddForm.html
@@ -0,0 +1,347 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
+<head>
+	<meta charset="utf-8">
+	<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+	<meta name="renderer" content="webkit|ie-comp|ie-stand">
+	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+	<meta name="viewport"
+		  content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+	<meta http-equiv="Cache-Control" content="no-siteapp"/>
+	<!-- 本框架基本脚本和样式 -->
+	<script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
+	<link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
+	<script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script>
+	<link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
+
+	<!-- 富文本编辑器 -->
+	<script type="text/javascript" charset="utf-8"
+			th:src="@{/plugin/beditor/ueditor.config.js}"></script>
+	<script type="text/javascript" charset="utf-8"
+			th:src="@{/plugin/beditor/ueditor.all.js}">
+	</script>
+	<script type="text/javascript" charset="utf-8"
+			th:src="@{/plugin/beditor/lang/zh-cn/zh-cn.js}"></script>
+
+
+	<style>
+
+		.mform{
+			display: flex;
+			align-items: center;
+			margin-top: 10px;
+		}
+
+
+		.mixSearchBox .searchResultTable {
+			position: absolute;
+			padding: 10px;
+			border: 1px solid #e4e7ed;
+			border-radius: 4px;
+			background-color: #fff;
+			box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
+			box-sizing: border-box;
+			margin: 10px 0;
+			z-index: 99999999;
+		}
+		.el-icon-delete{
+			cursor: pointer;
+		}
+		.el-icon-delete:hover{
+			color: #F56C6C;
+		}
+		.tabs {
+			margin-bottom: 80px;
+		}
+		.foot_bar2 {
+			top: 98%;
+			position: absolute;
+			width: 98%;
+			height: 80px;
+			overflow: hidden;
+			left: 0px;
+			display: flex;
+			align-items: center;
+			z-index: 99;
+			justify-content: center;
+
+		}
+		.max-height{
+			height: 98%;
+		}
+		.orderBox{
+			position: relative;
+			border-left: 1px solid #EFEFEF;
+			padding-left: 10px;
+			margin-left:10px ;
+		}
+	</style>
+</head>
+<body>
+<div  class="ibox-content max-height" id="app" v-cloak>
+
+	<el-row class="max-height">
+		<el-col :span="16" >
+			<el-tabs class="tabs" type="card" v-model="activeName" >
+				<el-tab-pane label="项目" name="tab1">
+
+					<el-table
+							:data="projList"
+							style="width: 98%">
+						<el-table-column
+								prop="projName"
+								label="项目">
+						</el-table-column>
+						<el-table-column
+								prop="balance"
+								label="余额"
+								width="180">
+						</el-table-column>
+						<el-table-column
+								prop="surplusCount"
+								label="余次">
+						</el-table-column>
+						<el-table-column
+								prop="failTimeStr"
+								label="有效期">
+						</el-table-column>
+						<el-table-column
+								prop="source"
+								label="来源">
+						</el-table-column>
+						<el-table-column
+								prop="address"
+								label="操作">
+							<template slot-scope="scope">
+								<el-button v-if="scope.row.surplusCount>0"  type="primary"
+										   size="mini"
+										   @click="selected(scope.$index, scope.row)">添加
+								</el-button>
+							</template>
+						</el-table-column>
+					</el-table>
+
+
+				</el-tab-pane>
+				<el-tab-pane label="套餐" name="tab2">
+					<template v-for="(item,index) in taocanList" v-if="index > 3 ? tcIsOpen : true">
+						<p class="el-big-title">【{{item.isCourse=='N'?'固定套餐':'任选套餐'}}】{{item.projName}}
+							<span style="float: right" v-if="item.failTime != null">有效期:{{item.failTime}}</span>
+							<code v-if="item.projInfo.isCourse=='Y'" > 剩余次数:<span v-if="item.projInfo.isInfinite == 'Y'">无限次</span><span v-else>{{item.surplusCount}}</span> </code>
+						</p>
+						<el-table
+								:data="item.taocanProjUse"
+								style="width: 98%">
+							<el-table-column
+									prop="projName"
+									label="项目">
+							</el-table-column>
+							<el-table-column
+									prop="balance"
+									label="余额"
+									width="180">
+							</el-table-column>
+							<el-table-column
+									prop="surplusCount"
+									label="余次">
+							</el-table-column>
+<!--							<el-table-column-->
+<!--									prop="failTimeStr"-->
+<!--									label="有效期">-->
+<!--							</el-table-column>-->
+							<el-table-column
+									prop="source"
+									label="来源">
+							</el-table-column>
+							<el-table-column
+									prop="address"
+									label="操作">
+								<template slot-scope="scope">
+									<el-button v-if="scope.row.surplusCount>0"  type="primary"
+											   size="mini"
+											   @click="selected(scope.$index, scope.row, item.projName)">添加
+									</el-button>
+								</template>
+							</el-table-column>
+						</el-table>
+					</template>
+					<el-row style="text-align: center; margin-top: 5px;">
+						<el-link type="primary" v-if="!tcIsOpen && taocanList.length > 0" @click="tcIsOpen = true">点击展开</el-link>
+						<el-link type="primary" v-if="tcIsOpen" @click="tcIsOpen = false">点击隐藏</el-link>
+					</el-row>
+				</el-tab-pane>
+
+			</el-tabs>
+		</el-col>
+		<el-col :span="7" class="orderBox max-height"  >
+			<p class="el-big-title">服务开单</p>
+			<el-row class="mform"  v-for="(item,index) in orderItemList" >
+				<el-col :span="16" >{{item.projUse.projName}}</el-col>
+				<el-col :span="6" >
+					<el-input @blur="checkCount(item)"  type="number"  v-model="item.count">
+					</el-input>
+				</el-col>
+				<el-col :offset="1" :span="1" >
+					<i @click="remove(index)" class="el-icon-delete "></i>
+				</el-col>
+			</el-row>
+			<el-row class="foot_bar2">
+				<el-button :loading="submiting" type="primary" @click="submitForm('form')" >添加</el-button>
+				<el-button @click="closeFram()">取消</el-button>
+			</el-row>
+		</el-col>
+	</el-row>
+
+
+
+</div>
+</body>
+<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
+<script src="https://cdn.jsdelivr.net/npm/@riophae/vue-treeselect@^0.4.0/dist/vue-treeselect.umd.min.js"></script>
+<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@riophae/vue-treeselect@^0.4.0/dist/vue-treeselect.min.css">
+
+
+<script>
+	var id = $.query.get("id");
+	//校验方法
+	var ValidatorFactory = {
+		validateUseCount: function (rule, value, callback) {
+			if ((true)) {
+				return callback;
+			} else {
+				return callback(new Error('请输入套餐最大使用次数'));
+			}
+		}
+	};
+
+	Vue.component('ValidatorFactory', ValidatorFactory);
+	Vue.component('treeselect', VueTreeselect.Treeselect)
+
+	var app = new Vue({
+		el: '#app',
+		data: {
+			submiting:false,
+			activeName:"tab1",
+			orderItemList:[],
+			projList:[],
+			taocanList:[],
+			tcIsOpen : false,
+			yyTime:new Date(),
+
+
+		},
+
+		/**
+		 * 初始化数据表
+		 */
+		created: function () {
+			this.loadinfo();
+		},
+
+		methods: {
+			/**
+			 * 提交表单
+			 * */
+			submitForm(formName) {
+				let _this=this;
+				_this.submiting = true;
+				if(_this.orderItemList.length<1){
+					_this.$message.error('请选择下单项目');
+					return false;
+				}
+				 let formData={
+					 vipId:id,
+					 serviceItems:[],
+				 }
+
+				parent.app.addProjItems(_this.orderItemList);
+				_this.closeFram();
+			},
+			open(data) {
+				let _this=this;
+				this.$confirm('服务创建成功是否马上排班?', '确认信息', {
+					distinguishCancelAndClose: true,
+					confirmButtonText: '马上排班',
+					cancelButtonText: '暂不排班'
+				}).then(() => {
+							window.location.href=basePath+"/admin/projService/yypb?pageFlae=1&id="+data.rows[0].id;
+						})
+						.catch(action => {
+							 if(action === 'cancel'){
+								 _this.submiting = false;
+								 _this.closeFram();
+							 }
+						});
+			},
+
+			remove(index){
+				this.orderItemList.splice(index, 1);
+			},
+			checkCount(item){
+				if(item.count>item.projUse.surplusCount){
+					item.count=item.projUse.surplusCount;
+					this.$message.error('下单次数不能大于余次');
+				}else if(item.count<0){
+					item.count=1;
+					this.$message.error('下单次数不能小于0');
+				}
+			},
+			/**
+			 * 选择产品
+			 * */
+			selected(index, row, name) {
+
+					//是否已经被选择了
+					let selected = false;
+					this.orderItemList.forEach(item => {
+						if (item.projUse.id == row.id) {
+							selected = true;
+							//叠加次数
+							if(item.count<item.projUse.surplusCount){
+								item.count=item.count+1;
+							}else{
+								this.$message.error('下单次数不能大于余次');
+							}
+
+							return;
+						}
+					});
+					if (!selected) {
+						if(row.surplusCount>0){
+							this.orderItemList.push({
+								projUse: row,
+								count: 1,
+								name : name
+							});
+						}
+
+					}
+
+			},
+			loadinfo(){
+				let _this=this;
+				AjaxProxy.requst({
+					app: _this,
+					url: basePath + "/admin/projService/getUserProjInfo?vipId="+id,
+					callback: function (data) {
+						_this.projList = data.mapInfo.projList;
+						_this.taocanList = data.mapInfo.taoCanList;
+					}
+				});
+			},
+			closeFram: function () {
+				parent.layer.close(parent.layer.getFrameIndex(window.name));
+			},
+
+		}
+
+	})
+</script>
+
+</body>
+</html>
+
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form-bak.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form-bak.html
new file mode 100644
index 0000000..9a6be74
--- /dev/null
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form-bak.html
@@ -0,0 +1,498 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
+<head>
+    <meta charset="utf-8">
+    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta http-equiv="Cache-Control" content="no-siteapp"/>
+    <LINK rel="Bookmark" href="../images/favicon.ico">
+    <!-- 本框架基本脚本和样式 -->
+
+    <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
+    <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
+    <link rel="stylesheet" th:href="@{/plugin/bootstrap-3.3.5/css/bootstrap.min.css}">
+    <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
+</head>
+<body>
+<div class="ibox-content" id="app" v-cloak>
+    <form class="form-horizontal" id="dataform"
+          onsubmit="javascripr:return false;">
+        <input autocomplete="off"   type="hidden" v-model="projService.id">
+
+        <div class="form-group">
+            <label class="col-md-2 control-label">&nbsp;</label>
+            <div class="col-md-12">
+                <div class="panel panel-primary">
+                    <div class="panel-heading">
+                        <div class="row">
+                            <div class="col-md-6">
+                                <h2>客户:{{projService.vipInfo.vipName}}</h2>
+                            </div>
+                            <div class="col-md-6 text-right">
+                                <sapn style="line-height: 30px;">订单编号:{{projService.serviceNo}}</sapn>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="panel-body">
+                        <div class="form-group">
+                            <label class="col-md-1 control-label">预约时间:</label>
+                            <div class="col-md-3">
+                                <el-date-picker @change="changeYyTime()"
+                                                v-model="projService.yyTime"
+                                                type="date"
+                                                placeholder="选择日期">
+                                </el-date-picker>
+                            </div>
+                            <label class="col-md-1 control-label">服务时长</label>
+                            <div class="col-md-3">
+                                <!--                                <el-input @change="changeYyTime()" v-model="projService.totalTime"></el-input>-->
+                                <label class="control-label">{{projService.totalTime}}</label>
+                            </div>
+                        </div>
+                        <div class="form-group">
+
+                            <label class="col-md-1 control-label">床位准备时间</label>
+                            <div class="col-md-3 ">
+                                <el-time-select
+                                        @change="getFreedBed()"
+                                        v-model="projService.bedState.startTimeForm"
+                                        :picker-options="{
+                                            start: startTime,
+                                            step: '00:10',
+                                            end: endTime
+                                          }"
+                                        placeholder="选择时间">
+                                </el-time-select>
+
+                            </div>
+                            <label class="col-md-1 control-label">选择床位</label>
+                            <div class="col-md-3" style="display: flex;">
+                                <el-select style="flex: 5" v-model="projService.bedId" placeholder="请选择床位">
+                                    <el-option
+                                            v-for="item in beds"
+                                            :key="item.id"
+                                            :label="item.bedName"
+                                            :value="item.id">
+                                    </el-option>
+                                </el-select>
+                                <button style="flex: 1" type="button" class="btn btn-success  btn-sm "
+                                        onclick="selectCwqk()"
+                                        title="查看床位情况">
+                                    <i style="font-size: 18px;" class="el-icon-search"></i>
+                                </button>
+                            </div>
+                        </div>
+
+
+                        <div class="form-group">
+                            <label class="col-md-1 control-label">配料师</label>
+                            <div class="col-md-3">
+                                <el-select v-model="projService.devisionId" placeholder="请选择">
+                                    <el-option
+                                            v-for="item in pls"
+                                            :key="item.suId"
+                                            :label="item.suName"
+                                            :value="item.suId">
+                                    </el-option>
+                                </el-select>
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-md-1 control-label">服务设置</label>
+                            <div class="col-md-11">
+                                <table class="table table-bordered">
+                                    <tr>
+                                        <th>项目名称</th>
+                                        <th width="100px">服务时长(分钟)</th>
+                                        <th>服务时间</th>
+                                        <th width="300px">美疗师</th>
+                                        <th style="width: 100px;">提成</th>
+                                    </tr>
+
+                                    <tr v-for="(item,index) in projService.serviceItems">
+                                        <td>{{item.projInfo.name}}</td>
+                                        <td><el-input @change="changeTimeLength" v-model="item.projInfo.timeLength"></el-input></td>
+
+                                        <td>
+                                            <div style="display: flex;">
+                                                <el-time-select style="flex: 6" @change="getFreedBeautyd(index)"
+                                                                v-model="item.beginTimeForm"
+                                                                :picker-options="{
+                                                        start: startTime,
+                                                        step: '00:10',
+                                                        end: endTime,
+                                                      }"
+                                                                placeholder="选择时间">
+                                                </el-time-select>
+                                                <span style="flex: 2;text-align: center;line-height: 30px">至</span>
+                                                <el-time-select style="flex: 6" @change="getFreedBeautyd(index)"
+                                                                v-model="item.endTimeForm"
+                                                                :picker-options="{
+                                                        start: startTime,
+                                                        step: '00:10',
+                                                        end: endTime,
+                                                        minTime: item.beginTimeForm
+                                                      }"
+                                                                placeholder="选择时间">
+                                                </el-time-select>
+                                            </div>
+                                        </td>
+                                        <td>
+                                            <el-select v-model="item.staffId" placeholder="请选择美疗师">
+                                                <el-option
+                                                        v-for="item in beauty"
+                                                        :key="item.suId"
+                                                        :label="item.suName"
+                                                        :value="item.suId">
+                                                </el-option>
+                                            </el-select>
+                                        </td>
+                                        <td>
+                                            <el-input v-model="item.extract"></el-input>
+                                        </td>
+
+                                    </tr>
+
+                                </table>
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-md-1 control-label">备  注:</label>
+                            <div class="col-md-7">
+                <textarea name="remark" type="text" id="remark"
+                          class="form-control" rows="4"
+                          v-model="projService.remark"></textarea>
+                            </div>
+                        </div>
+
+                        <div class="form-group ">
+                            <div class="col-md-12 text-center">
+                                <a href="javascript:;" @click="submit()"
+                                   class="btn btn-success radius">保存</a>&nbsp;&nbsp;&nbsp;&nbsp;
+                                <button @click="closeFram()" class="btn btn-danger radius" type="button">取消</button>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+
+            </div>
+        </div>
+
+    </form>
+</div>
+</div>
+<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/bootstrap-3.3.5/js/bootstrap.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
+<script type="text/javascript">
+
+    var id = $.query.get("id");
+    var app = new Vue({
+        el: '#app',
+        data: {
+            projService: {
+                bedState: {startTimeForm: ''}
+            },
+            //美疗师分配列表
+            serviceItems: [],
+            //美疗师
+            beauty: [],
+            pls: [],
+            beds: [],
+            startTime:'08:00',
+            endTime:'23:00',
+        },
+        created: function () {
+            this.loadWorkTime();
+            this.loadInfo();
+        },
+
+        mounted: function () {
+
+        },
+
+        methods: {
+
+
+            loadWorkTime:function(){
+                var _this=this;
+                AjaxProxy.requst({
+                    app: _this,
+                    url: basePath + '/admin/workTime/getWorkTime',
+                    callback: function (data) {
+                        _this.startTime=data.rows[0];
+                        _this.endTime=data.rows[1];
+                    }
+                });
+            },
+
+            loadInfo: function () {
+
+                console.log('加载服务器数据');
+                var _this = this;
+
+
+
+
+                AjaxProxy.requst({
+                    app: _this,
+                    async: false,
+                    url: basePath + '/admin/projService/findProjServiceInfo?id=' + id,
+                    callback: function (data) {
+
+
+                        //处理空对象和时间
+                        let projService = data.mapInfo.projService;
+
+                        let serviceItems = projService.serviceItems;
+
+                        //转换床位时间格式
+                        if (!projService.bedState) {
+                            projService.bedState = {}
+                            projService.bedState.startTimeForm= MTools.formatDate(new Date(), 'hh:mm');
+                        } else {
+                            projService.bedState.startTimeForm = MTools.formatDate(projService.bedState.startTime, 'hh:mm')
+                        }
+
+                        _this.projService = projService;
+
+                        //转换时间格式,服务加载的时间格式要做处理,截取时分展示
+                        for (let i = 0; i < serviceItems.length; i++) {
+                            let beStates = serviceItems[i];
+                            if(beStates.beginTime){
+                                beStates.beginTimeForm = MTools.formatDate(beStates.beginTime, 'hh:mm');
+                                beStates.endTimeForm = MTools.formatDate(beStates.endTime, 'hh:mm');
+                            }else{
+                                beStates.beginTimeForm = MTools.formatDate(new Date(), 'hh:mm');
+                                var today=new Date();
+                                today.setMinutes(today.getMinutes()+beStates.projInfo.timeLength)
+                                beStates.endTimeForm= MTools.formatDate(today, 'hh:mm');
+                            }
+                            _this.getFreedBeautyd(i);
+
+
+                        }
+
+                        //加载床位
+                        _this.getFreedBed();
+
+                        //获取配料师
+                        AjaxProxy.requst({
+                            app: _this,
+                            url: basePath + '/admin/getShopStaffByRoleName?roleName=配料师',
+                            callback: function (data) {
+                                _this.pls = data.rows;
+                            }
+                        });
+
+
+                    }
+                });
+
+
+            }
+            ,
+            closeFram: function () {
+                parent.layer.close(parent.layer.getFrameIndex(window.name));
+            },
+
+            submit: function () {
+                console.log("提交");
+                let _this = this;
+                let projService = _this.projService;
+
+                //床位时间
+                let dateStr = MTools.formatDate(projService.yyTime, 'yyyy/MM/dd') + " " + projService.bedState.startTimeForm + ":00";
+                let startTime = new Date(dateStr);
+
+                let serviceItems = [];
+                for (let i = 0; i < projService.serviceItems.length; i++) {
+                    let beStates = projService.serviceItems[i];
+                    let beginTimeStr = MTools.formatDate(_this.projService.yyTime, 'yyyy/MM/dd') + " " + beStates.beginTimeForm + ":00";
+                    let beginTime = new Date(beginTimeStr);
+                    let endTimeStr = MTools.formatDate(_this.projService.yyTime, 'yyyy/MM/dd') + " " + beStates.endTimeForm + ":00";
+                    let endTime = new Date(endTimeStr);
+
+                    serviceItems.push({
+                        beginTime: beginTime,
+                        endTime: endTime,
+                        staffId: beStates.staffId,
+                        extract: beStates.extract,
+                        excTime : beStates.projInfo.timeLength,
+                        id: beStates.id,
+                    });
+
+                }
+
+
+                var params = {
+                    id: projService.id,
+                    totalTime: projService.totalTime,
+                    remark: projService.remark,
+                    bedId: projService.bedId,
+                    devisionId: projService.devisionId,
+                    yyTime: projService.yyTime,
+                    serviceItems: serviceItems,
+                    //床位时间
+                    bedState: {
+                        startTime: startTime,
+                    }
+                }
+
+
+                if (_this.validate(params)) {
+                    AjaxProxy.requst({
+                        app: _this,
+                        data: params,
+                        url: basePath + '/admin/projService/servicePaiBan',
+                        callback: function (data) {
+                            _this.$message({
+                                message: data.info,
+                                type: 'success',
+                                onClose: function () {
+                                    _this.closeFram();
+                                }
+                            });
+                            if (parent.myGrid) {
+                                parent.myGrid.serchData();
+                            }
+
+                            if (parent.app) {
+                                parent.app.serviceOrderQuery();
+                            }
+                        }
+                    });
+                }
+            }
+            ,
+            validate: function (params) {
+                if (!params.bedId) {
+                    this.$message({
+                        message: '床位不能为空',
+                        type: 'error'
+                    });
+                    return false;
+                }
+                if (!params.totalTime) {
+                    this.$message({
+                        message: '请填写服务时长',
+                        type: 'error'
+                    });
+                    return false;
+                }
+                if (!params.yyTime) {
+                    this.$message({
+                        message: '请填写预约时间',
+                        type: 'error'
+                    });
+                    return false;
+                }
+                for (let i = 0; i < params.serviceItems.length; i++) {
+                    let b = params.serviceItems[i];
+                    if (!b.staffId) {
+                        this.$message({
+                            message: '请选择第' + (i + 1) + '位美疗师',
+                            type: 'error'
+                        });
+                        return false;
+                    }
+                }
+                return true;
+            }
+            ,
+
+            //触发预约时间修改
+            changeYyTime: function () {
+                this.getFreedBed();
+                this.getFreedBeautyd();
+            }
+            ,
+            getFreedBed: function () {
+                console.log('获取空闲床位');
+                let _this = this;
+                let dateStr = MTools.formatDate(_this.projService.yyTime, 'yyyy/MM/dd') + " " + _this.projService.bedState.startTimeForm + ":00";
+                let startTime = new Date(dateStr);
+                if (!_this.projService.bedState.startTimeForm || !_this.projService.totalTime) {
+                    return;
+                }
+                AjaxProxy.requst({
+                    app: _this,
+                    data: {
+                        startTime: startTime,
+                        totalTime: _this.projService.totalTime,
+                        id: _this.projService.id
+                    },
+                    url: basePath + '/admin/bedInfo/showFreedBed',
+                    callback: function (data) {
+                        _this.beds = data.rows;
+                    }
+                });
+            }
+            ,
+            getFreedBeautyd: function (index) {
+                console.log("获取美疗师");
+                let _this = this;
+                let projService = _this.projService;
+                let beStates = projService.serviceItems[index];
+
+                if (beStates == null ||  MTools.isBlank(beStates.beginTimeForm) ||    MTools.isBlank(beStates.endTimeForm )  ){
+                    return;
+                }
+                let beginTimeStr = MTools.formatDate(_this.projService.yyTime, 'yyyy/MM/dd') + " " + beStates.beginTimeForm + ":00";
+                let beginTime = new Date(beginTimeStr);
+                let endTimeStr = MTools.formatDate(_this.projService.yyTime, 'yyyy/MM/dd') + " " + beStates.endTimeForm + ":00";
+                let endTime = new Date(endTimeStr);
+
+                AjaxProxy.requst({
+                    app: _this,
+                    data: {
+                        beginTime: beginTime,
+                        endTime: endTime,
+                        servicesId: _this.projService.id
+                    },
+                    url: basePath + '/admin/beautiWork/getPaiBanBeauticianList',
+                    callback: function (data) {
+
+                        if (data.rows.length > 0) {
+                            _this.beauty = data.rows;
+                        }
+
+                    }
+                });
+
+
+            },
+            changeTimeLength:function() {
+                let _this = this;
+
+                var totalTime = 0;
+                _this.projService.serviceItems.forEach(item => {
+                    totalTime += parseInt(item.projInfo.timeLength);
+                });
+                _this.projService.totalTime = totalTime;
+                _this.changeYyTime();
+            }
+
+        },
+        filters:
+            {
+                format: function (value, patten) {
+                    if (!value) return '';
+                    return MTools.formatDate(value, patten)
+                }
+                ,
+            }
+        ,
+
+    })
+
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html
index c8421ac..ad8fde8 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html
@@ -19,7 +19,7 @@
 <body>
 <div class="ibox-content" id="app" v-cloak>
     <form class="form-horizontal" id="dataform"
-          onsubmit="javascripr:return false;">
+          onsubmit="javascript:return false;">
         <input autocomplete="off"   type="hidden" v-model="projService.id">
 
         <div class="form-group">
@@ -48,7 +48,8 @@
                             </div>
                             <label class="col-md-1 control-label">服务时长</label>
                             <div class="col-md-3">
-                                <el-input @change="changeYyTime()" v-model="projService.totalTime"></el-input>
+<!--                                <el-input @change="changeYyTime()" v-model="projService.totalTime"></el-input>-->
+                                <label class="control-label">{{projService.totalTime}}</label>
                             </div>
                         </div>
                         <div class="form-group">
@@ -100,20 +101,27 @@
                             </div>
                         </div>
                         <div class="form-group">
+                            <label class="col-md-1 control-label"></label>
+                            <div class="col-md-11">
+                                <el-button size="medium" type="primary" @click="addProjForm">新增项目</el-button>
+                            </div>
+                        </div>
+                        <div class="form-group">
                             <label class="col-md-1 control-label">服务设置</label>
                             <div class="col-md-11">
                                 <table class="table table-bordered">
                                     <tr>
                                         <th>项目名称</th>
-                                        <th width="50px">服务时长</th>
+                                        <th width="100px">服务时长(分钟)</th>
                                         <th>服务时间</th>
                                         <th width="300px">美疗师</th>
                                         <th style="width: 100px;">提成</th>
+                                        <th>操作</th>
                                     </tr>
 
                                     <tr v-for="(item,index) in projService.serviceItems">
                                         <td>{{item.projInfo.name}}</td>
-                                        <td>{{item.projInfo.timeLength}}(分钟)</td>
+                                        <td><el-input @change="changeTimeLength" v-model="item.projInfo.timeLength"></el-input></td>
 
                                         <td>
                                             <div style="display: flex;">
@@ -152,6 +160,10 @@
                                         <td>
                                             <el-input v-model="item.extract"></el-input>
                                         </td>
+                                        <td>
+                                            <el-button size="mini" type="danger"
+                                                    @click="handleDelete(index)">删除</el-button>
+                                        </td>
 
                                     </tr>
 
@@ -185,6 +197,7 @@
 </div>
 <script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
 <script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
 <script type="text/javascript" th:src="@{/plugin/bootstrap-3.3.5/js/bootstrap.min.js}"></script>
 <script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
 <script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
@@ -200,6 +213,8 @@
             },
             //美疗师分配列表
             serviceItems: [],
+            // 删除的服务单明细
+            deleteItems : [],
             //美疗师
             beauty: [],
             pls: [],
@@ -248,7 +263,7 @@
 
                         //处理空对象和时间
                         let projService = data.mapInfo.projService;
-
+                        console.log(projService);
                         let serviceItems = projService.serviceItems;
 
                         //转换床位时间格式
@@ -323,6 +338,7 @@
                         endTime: endTime,
                         staffId: beStates.staffId,
                         extract: beStates.extract,
+                        excTime : beStates.projInfo.timeLength,
                         id: beStates.id,
                     });
 
@@ -331,12 +347,14 @@
 
                 var params = {
                     id: projService.id,
+                    state : projService.state,
                     totalTime: projService.totalTime,
                     remark: projService.remark,
                     bedId: projService.bedId,
                     devisionId: projService.devisionId,
                     yyTime: projService.yyTime,
                     serviceItems: serviceItems,
+                    deleteItems : _this.deleteItems,
                     //床位时间
                     bedState: {
                         startTime: startTime,
@@ -465,8 +483,102 @@
                 });
 
 
-            }
-            ,
+            },
+            changeTimeLength:function() {
+                let _this = this;
+
+                var totalTime = 0;
+                _this.projService.serviceItems.forEach(item => {
+                    totalTime += parseInt(item.projInfo.timeLength);
+                });
+                _this.projService.totalTime = totalTime;
+                _this.changeYyTime();
+            },
+            handleDelete : function(index) {
+                let _this = this;
+                var items = this.projService.serviceItems;
+                if (items.length > 1) {
+                    let delItem = items.splice(index, 1);
+                    if (delItem[0].servicesId) {
+                        AjaxProxy.requst({
+                            app: _this,
+                            url: basePath + "/admin/projService/delServiceOrderItems?id="+delItem[0].id,
+                            callback: function (data) {
+                                _this.$message({
+                                    message: data.info,
+                                    type: 'success'
+                                });
+                            }
+                        });
+                    }
+
+                } else {
+                    this.$message({
+                        message: '需保留一个项目',
+                        type: 'error'
+                    });
+                }
+            },
+            addProjForm() {
+                var vipId = this.projService.vipInfo.id;
+                layer.full(layer.open({
+                    type: 2,
+                    title: "添加项目",
+                    maxmin: true,
+                    area: [MUI.SIZE_L, '500px'],
+                    content: [basePath + '/admin/redirect/hive/beautySalon/yyServiceAddForm?id='+vipId]
+                }));
+            },
+            addProjItems(rows) {
+                let _this = this;
+                var serviceItems = this.projService.serviceItems;
+
+                for (let i = 0; i < rows.length; i++) {
+                    let row = rows[i]
+
+                    let flag = false;
+                    for (let j = 0; j < serviceItems.length; j++) {
+                        let item = serviceItems[j];
+                        if (item.puseId == row.projUse.id) {
+                            flag = true;
+                            break;
+                        }
+                    }
+
+                    if (flag) {
+                        continue;
+                    }
+
+                    let items = [];
+                    row.projUse.projInfo.name = row.name + "--" + row.projUse.projName;
+                    items.push({
+                        puseId : row.projUse.id,
+                        count : row.count,
+                        projUse : row.projUse,
+                        projInfo : row.projUse.projInfo
+                    });
+
+                    let data = {};
+                    data.id = _this.projService.id;
+                    data.state = _this.projService.state;
+                    data.serviceItems = items;
+
+                    AjaxProxy.requst({
+                        app: _this,
+                        data : data,
+                        url: basePath + "/admin/projService/addService",
+                        callback: function (data) {
+                            _this.$message({
+                                message: "添加成功",
+                                type: 'success'
+                            });
+
+                            _this.loadInfo();
+                        }
+                    });
+                }
+
+            },
 
 
         },
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-card.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-card.html
deleted file mode 100644
index 66fd807..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-card.html
+++ /dev/null
@@ -1,161 +0,0 @@
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingCRMcard.css}">
-<style type="text/css">
-body {
-	background: #eee;
-}
-
-.am-list-news {
-	margin: 1.6rem 1.6rem;
-}
-
-.am-list-news li {
-	margin: 1.0rem 0;
-}
-
-.am-list-news-default .am-list>li {
-	border: none;
-	border-top: 5px solid red;
-	border-radius: 5px;
-}
-
-.half-card {
-	width: 1rem;
-	height: 1rem;
-	border-radius: 50%;
-	position: relative;
-	background: #eee;
-	left: -0.5rem;
-	z-index: 10;
-}
-
-.half-card2 {
-	width: 1rem;
-	height: 1rem;
-	border-radius: 50%;
-	position: relative;
-	background: #eee;
-	float: right;
-	left: 0.5rem;
-	top: -1.1rem;
-	z-index: 10;
-}
-
-.am-list-date {
-	top: 0;
-	right: 2rem;
-}
-
-.line-card {
-	size: 1px;
-	width: 100%;
-	top: -1.5rem;
-	position: relative;
-	border: none;
-	height: 1px;
-	background: #333;
-	background-image: linear-gradient(to right, #ccc, #EFE3E3, #F51515);
-	margin: 0;
-}
-
-.card-name {
-	padding: 0 1rem;
-	height: 4rem;
-	line-height: 4rem;
-}
-
-.am-list-item-text {
-	height: 3rem;
-	padding: 0 1rem;
-}
-</style>
-</head>
-<body>
-	<!-- 会员注册页面 -->
-	<!-- 头部开始 -->
-	<header data-am-widget="header"
-		class="am-header color-w am-header-fixed back-m1">
-		<div class="am-header-left am-header-nav">
-		  <a th:href="@{/admin/redirect/hive/mobile/CRM-account}" class="">
-                <i class="am-header-icon am-icon-chevron-left"></i>
-          </a>
-		</div>
-
-		<h1 class="am-header-title">
-			<a href="#title-link" class=""> 会员卡信息 </a>
-		</h1>
-
-		<!-- <div class="am-header-right am-header-nav">
-			<a href="user.html" class=""> <i
-				class="am-header-icon am-icon-bars"></i>
-			</a>
-		</div> -->
-	</header>
-	<!-- 头部结束 -->
-
-	<div data-am-widget="list_news"
-		class="am-list-news am-list-news-default">
-		<div class="am-list-news-bd">
-
-  				 <div th:if="${#lists.size(session.lookVipInfo.cards) eq 0}" class="no-msg">该会员无卡!</div>
-
-					<ul th:if="${#lists.size(session.lookVipInfo.cards) ne 0}" class="am-list">
-							<li th:each="item:${session.lookVipInfo.cards }" class="am-g am-list-item-dated">
-								<div class="card-name">
-									<a href="##" class="am-list-item-hd " th:text="${item.cardName }"></a>
-									<span class="am-list-date">
-										余额: <span th:text="${item.money }"  ></span>  余次:
-										<strong  th:if="${item.lastCount >100000}" th:text="不限"></strong>
-										<strong  th:if="${item.lastCount < 100000}" th:text="${item.lastCount}"></strong>
-									</span>
-								</div>
-								<div class="half-card"></div>
-								<div class="half-card2"></div>
-								<hr class="line-card"></hr>
-								<div class="am-list-item-text"
-									 th:value="'失效时间'+${#dates.format(item.failTime,'yyyy-MM-dd')}"  >
-								</div>
-							</li>
-					</ul>
-		</div>
-	</div>
-
-
-
-
-
-
-	<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-	<script
-		th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<!-- index js -->
-	<script type="text/javascript">
-		
-	</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-choice.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-choice.html
deleted file mode 100644
index 34fed68..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-choice.html
+++ /dev/null
@@ -1,176 +0,0 @@
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-
-
-
-<meta name="msapplication-TileColor" content="#0e90d2">
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingOrderList.css}">
-
-</head>
-<script>
- 
-</script>
-
-
-<body >
-	<!-- 商品列表页面 -->
-	<div class="wrap">
-		<!-- 头部开始 -->
-		<header data-am-widget="header" class="back-m1 am-header color-w am-header-fixed">
-			<div class="am-header-left am-header-nav">
-				<a th:href="@{/admin/redirect/CRM-account}" class=""> <i
-					class="am-header-icon am-icon-chevron-left"></i>
-				</a>
-			</div>
-
-			<h1 class="am-header-title">
-				<a href="#title-link" class="">点牌客户 </a>
-			</h1>
-
-			<!-- <div class="am-header-right am-header-nav">
-				<a class=""> <i class="am-header-icon am-icon-bars"></i>
-				</a>
-			</div> -->
-		</header>
-		<!-- 头部结束 -->
-	      
-		<!-- 订单内容 -->
-		<div class="main main1">
-			<form class="am-form am-form-horizontal" action="">
-				<!-- <input autocomplete="off"   class="am-form-field am-input-sm" type="text" placeholder="">
-        <br/> -->
-
-				<div
-					class="am-form-group am-form-select am-input-group  am-input-group-primary am-g  title">
-					<div class="am-u-sm-1 ">
-						<span>&nbsp;</span>
-					</div>
-					<div class="am-u-sm-8 search">
-						<input autocomplete="off"   type="text" class="searchIn" placeholder="用户姓名/手机号"/>
-					</div>
-					<div class="am-u-sm-3 btn">
-						<button class="am-btn am-btn-default am-radius searchBtn" >搜索</button>
-					</div>
-					
-				</div>
-				
-				<!-- 商品表格 -->
-				<div data-am-widget="list_news"
-					class="am-list-news am-list-news-default">
-					<!--列表标题-->
-					<div class="am-list-news-hd am-cf am-g">
-						<!--带更多链接-->
-						<div class="am-u-sm-3 ">
-							<h2 class="am-list-news-more am-fr">客户姓名</h2>
-						</div>		
-						<div class="am-u-sm-5 ">
-							<h2 class="am-list-news-more am-fr">电话 </h2>
-						</div>
-						<div class="am-u-sm-2 ">
-							<h2 class="am-list-news-more am-fr">等级 </h2>
-						</div>
-						<div class="am-u-sm-2 ">
-							<h2 class="am-list-news-more am-fr">操作 </h2>
-						</div>
-
-					</div>
-
-					<div class="am-list-news-bd">
-						<ul class="am-list">							
-								<li
-									class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">
-									<div class="am-u-sm-3 ">
-										<h3 class="am-list-item-hd">张全蛋</h3>
-									</div>
-
-									
-									<div class="am-u-sm-5 ">
-										<h3 class="am-list-item-hd">15095828513</h3>
-									</div>
-									<div class="am-u-sm-2 ">
-										<h3 class="am-list-item-hd">尊贵会</h3>
-									</div>
-									<div class="am-u-sm-2 ">
-										<a class="am-list-item-hd" th:href="@{/admin/redirect/CRM-account-msg}">详情</a>
-									</div>
-									
-								</li>
-								<li
-									class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">
-									<div class="am-u-sm-3 ">
-										<h3 class="am-list-item-hd">张全蛋</h3>
-									</div>
-
-									
-									<div class="am-u-sm-5 ">
-										<h3 class="am-list-item-hd">15095828513</h3>
-									</div>
-									<div class="am-u-sm-2 ">
-										<h3 class="am-list-item-hd">尊贵会</h3>
-									</div>
-									<div class="am-u-sm-2 ">
-										<a class="am-list-item-hd">详情</a>
-									</div>
-									
-								</li>
-								<li
-									class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">
-									<div class="am-u-sm-3 ">
-										<h3 class="am-list-item-hd">张全蛋</h3>
-									</div>
-									<div class="am-u-sm-5 ">
-										<h3 class="am-list-item-hd">15095828513</h3>
-									</div>
-									<div class="am-u-sm-2 ">
-										<h3 class="am-list-item-hd">尊贵会</h3>
-									</div>
-									<div class="am-u-sm-2 ">
-										<a class="am-list-item-hd">详情</a>
-									</div>
-									
-								</li>
-						</ul>
-					</div>
-					
-				</div>
-				
-				
-				<!-- 商品展示结束 -->
-				<!-- 测试 -->
-
-			</form>
-		</div>
-		<!-- 订单内容结束 -->
-
-	</div>
-	
-	
-	
-	<script	th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<script th:src="@{/plugin/amazingUI/js/amazeui.min.js}"></script>
-	<script>
-				
-		  
-	</script>
-	<!-- index js -->
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-detail.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-detail.html
deleted file mode 100644
index 5a97c3e..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-detail.html
+++ /dev/null
@@ -1,156 +0,0 @@
-
-
-
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text=" ${webTitle }"></title>
-
-
-
-
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingCRMdetail.css}">
-
-</head>
-<script>
- 
-</script>
-
-
-<body >
-	<!-- 商品列表页面 -->
-	<div class="wrap">
-		<!-- 头部开始 -->
-		<header data-am-widget="header" class="am-header color-w back-m1 am-header-fixed">
-			<div class="am-header-left am-header-nav">
-				<a th:href="@{/admin/redirect/CRM-account}" class=""> <i
-					class="am-header-icon am-icon-chevron-left"></i>
-				</a>
-			</div>
-
-			<h1 class="am-header-title">
-				<a href="#title-link" class=""> 会员详细信息 </a>
-			</h1>
-
-			<!-- <div class="am-header-right am-header-nav">
-				<a class=""> <i class="am-header-icon am-icon-bars"></i>
-				</a>
-			</div> -->
-		</header>
-		<!-- 头部结束 -->
-	      
-		<form class="am-form am-form-horizontal" id="myForm" name="hobbyform" onsubmit="javascripr:return false;">
-		<div class="main main1">
-			<section data-am-widget="accordion"
-				class="am-accordion am-accordion-gapped" data-am-accordion='{  }'>
-				 <input autocomplete="off"   type="hidden" name="id" th:value="${session.lookVipInfo.id }">
-				
-				 <c:set var="num" value="0"/>
-                 <c:forEach items="${questions}" var="items" varStatus="st" >
-                	<dl class="am-accordion-item am-active">
-					<dt class="am-accordion-title">${items[0].category}</dt>
-					<dd class="am-accordion-bd am-collapse am-in">
-                    <c:forEach items="${items}" var="item" varStatus="itemSt">
-                  	 	<div class="am-accordion-content">
-								 <input autocomplete="off"   type="hidden" name="vipAnswers[${num }].quesionId" th:value="${item.id }">
-             	  	 			 <input autocomplete="off"   type="hidden" name="vipAnswers[${num }].vipId" th:value="${session.lookVipInfo.id }">
-								 <div class="am-input-group am-form-group am-g">
-									<div class="am-u-sm-4">
-										<span class="am-input-group-label">${item.question}</span>
-									</div>
-					<c:choose>
-					<c:when test="${item.type eq '标题' }">
-					</c:when>
-					<c:when test="${item.type eq '长文本' }">
-					<div class="am-u-sm-8">
-							<textarea class="form-control" name="vipAnswers[${num }].answerText" cols="30px">${item.vipAnswer.answerText }</textarea>
-					</div>
-					</c:when>
-					<c:when test="${item.type eq '文本' }">
-						<div class="am-u-sm-8">
-							<input autocomplete="off"   type="text"  class="form-control" name="vipAnswers[${num }].answerText" th:value="${item.vipAnswer.answerText }"  />
-						</div>
-	                    <c:set var="index" th:value="${index+1}" ></c:set>
-					</c:when>
-					<c:otherwise>
-						<div class="am-u-sm-8">
-							<select name="vipAnswers[${num }].answerId" class="form-control select2"   <c:if test="${item.type eq '多选'}">multiple="multiple">
-							<c:if test="${item.type eq '单选'}">
-							<option value="">--请选择-- </option>
-
-							
-							<c:forEach items="${item.answers }" var="answer" >
-							<c:set var="temp" th:value="${answer.id}"/>
-							<option th:value="${answer.id}" <c:if test="${fn:contains(item.vipAnswer.answerId,temp) }">selected="selected">
-							${answer.answer} </option>
-							</c:forEach>
-							</select>
-						</div>
-					</c:otherwise>
-					</c:choose>
-					</div>
-					</div>
-					<c:set var="num" th:value="${num+1 }"/>
-                    </c:forEach>
-                   	</dd>
-				</dl>
-                 </c:forEach>
-				
-				
-				
-			</section>
-
-		</div>
-		</form>
-	
-	</div>
-		<div class="inputBtn">
-			<input autocomplete="off"   type="button" onclick="myForm.submit()"
-				class="am-btn btn-m1 am-radius am-btn-block" value="保存"></input>
-		</div>
-	<script	th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<script th:src="@{/plugin/amazingUI/js/amazeui.min.js}"></script>
-
-
-	<script>
-	$(".select2").select2();
-		/* 会员爱好表单条件 */
-		var myForm = MForm.initForm({
-			invokeUrl :  basePath+"/admin/customer/addOrModifyVipAnswer",
-			formSelecter : "#myForm",
-			afterSubmit : function(loj) {
-				layer.open({
-					shade:false,
-					content : '操作成功',
-					className : 'showBox',
-					time : 1,
-					end: function(elem){
-						 MTools.redirect( basePath+"/admin/redirect/CRM-account");
-					} 
-				});
-			} 
-		});		
-		
-		
-		
-	</script>
-	<!-- index js -->
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-follow-add.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-follow-add.html
deleted file mode 100644
index 13621db..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-follow-add.html
+++ /dev/null
@@ -1,218 +0,0 @@
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-
-
-
-	<script type="text/javascript"th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-	<script type="text/javascript"th:src="@{/js/systools/DDMBase.js}"></script>
-	<link rel="stylesheet" th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-	<link rel="stylesheet" th:href="@{/plugin/amazingUI/css/app.css}">
-	<link rel="stylesheet" type="text/css" th:href="@{/css/dingUserVip.css}">
- <style type="text/css">
-	.loadingbig{
-		max-width: 100%;
-	}
-
-</style>
-
-</head>
-<script>
-	
-</script>
-
-
-<body>
-	<!-- 商品列表页面 -->
-	<div class="wrap">
-		<!-- 头部开始 -->
-		<header data-am-widget="header"
-			class="am-header color-w back-m1 am-header-fixed">
-			<div class="am-header-left am-header-nav">
-				<a th:href="@{/admin/redirect/hive/mobile/CRM-account-follow}" class=""> <i
-					class="am-header-icon am-icon-chevron-left"></i>
-				</a>
-			</div>
-
-			<h1 class="am-header-title">
-				<a href="#title-link" class=""> 新增跟进记录 </a>
-			</h1>
-
-			<!-- <div class="am-header-right am-header-nav">
-				<a class=""> <i class="am-header-icon am-icon-bars"></i>
-				</a>
-			</div> -->
-		</header>
-		<!-- 头部结束 -->
-
-		<!-- 订单内容 -->
-		<div class="main main2"  >
-			<form class="am-form am-form-horizontal" method="post" id="dataform" onsubmit="javascripr:return false;">
-
-				<input autocomplete="off"   type="hidden" name="id" th:value="${obj?.id}" >
-				<div class="am-input-group am-form-group  am-input-group-primary am-g bot">
-					<div class="am-u-sm-4">
-						<span  class="am-input-group-label ">会员姓名</span>
-					</div>
-					<div class="am-u-sm-8">
-						<input autocomplete="off"   type="text" class="am-form-field " th:value="${session.lookVipInfo.vipName}"
-							   readonly="readonly" />
-					</div>
-				</div>
-
-				<div class="am-input-group am-form-group  am-input-group-primary am-g bot">
-					<div class="am-u-sm-4">
-						<span   class="am-input-group-label">项目</span>
-					</div>
-					<div class="am-u-sm-8">
-						<input autocomplete="off"   type="text" th:value="${obj?.info0}" class="am-form-field "    name="info0"    >
-					</div>
-				</div>
-
-
-				<div class="am-input-group am-form-group  am-input-group-primary am-g bot">
-					<div class="am-u-sm-4">
-						<span   class="am-input-group-label">导入仪器</span>
-					</div>
-					<div class="am-u-sm-8">
-						<input autocomplete="off"   type="text"   th:value="${obj?.info1}"  class="am-form-field "  name="info1"    >
-					</div>
-				</div>
-
-
-				<div class="am-input-group am-form-group  am-input-group-primary am-g bot">
-					<div class="am-u-sm-4">
-						<span   class="am-input-group-label">产品搭配</span>
-					</div>
-					<div class="am-u-sm-8">
-						<input autocomplete="off"   type="text"  th:value="${obj?.info2}" class="am-form-field "    name="info2"    >
-					</div>
-				</div>
-
-
-
-
-				<div class="am-input-group am-form-group  am-input-group-primary am-g bot">
-					<div class="am-u-sm-4">
-						<span   class="am-input-group-label">家居产品</span>
-					</div>
-					<div class="am-u-sm-8">
-						<input autocomplete="off"   type="text"  th:value="${obj?.info3}" class="am-form-field "    name="info3"    >
-					</div>
-				</div>
-
-
-
-				<div class="am-input-group am-form-group  am-input-group-primary am-g bot">
-					<div class="am-u-sm-4">
-						<span   class="am-input-group-label">回访时间</span>
-					</div>
-					<div class="am-u-sm-8">
-
-						<input autocomplete="off"   type="date"  th:value="${#dates.format(obj?.followTime,'yyyy-MM-dd')}"   id="voInDate" name="followTime" class="am-form-field "  />
-					</div>
-				</div>
-
-
-
-
-				<div class="am-input-group am-form-group  am-input-group-primary am-g bot">
-					<div class="am-u-sm-4">
-						<span   class="am-input-group-label">肌肤现状</span>
-					</div>
-					<div class="am-u-sm-8">
-						<input autocomplete="off"   type="text" th:value="${obj?.info5}" class="am-form-field "  dataType="*1-100"  name="info5"    >
-					</div>
-				</div>
-				<div class="am-input-group am-form-group  am-input-group-primary am-g bot">
-					<div class="am-u-sm-4">
-						<span   class="am-input-group-label">效果图1</span>
-					</div>
-				</div>
-
-				<div class="am-input-group am-form-group  am-input-group-primary am-g bot">
-					<div class="am-u-sm-12">
-						<input autocomplete="off"   th:value="${obj?.info6}" name="info6" id="img1"
-							   class="form-control  upload-input" type="text" /> <a
-							class="btn btn-primary radius upload-a">选择图片
-					</a>
-					</div>
-				</div>
-				<div class="am-input-group am-form-group  am-input-group-primary am-g bot">
-					<div class="am-u-sm-4">
-						<span   class="am-input-group-label">效果图2</span>
-					</div>
-
-				</div>
-				<div class="am-input-group am-form-group  am-input-group-primary am-g bot">
-
-					<div class="am-u-sm-12">
-						<input autocomplete="off"   th:value="${obj?.info7}" name="info7" id="img2"
-							   class="form-control  upload-input" type="text" /> <a
-							class="btn btn-primary radius upload-a">选择图片
-					</a>
-					</div>
-				</div>
-
-
-
-				<div class="inputBtn">
-					<input autocomplete="off"   type="button" onclick="myForm.submit()" class="am-btn btn-m1 am-radius am-btn-block" value="保存"></input>
-				</div>
-				<!-- 测试 -->
-
-			</form>
-		</div>
-	</div>
-
-	<script
-		th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<script th:src="@{/plugin/amazingUI/js/amazeui.min.js}"></script>
-	<script th:src="@{/js/systools/AjaxProxyVue.js}"></script>
-
-
-	<script>
-		MTools.initImgUpload(".upload-input");
-	var myForm = MForm.initForm({
-		invokeUrl :  basePath+"/admin/serviceRecord/addOrModify",
-		beforeSubmit:function(){
-
-		},
-		afterSubmit : function(loj) {
-			
-			var msg = '';
-			if (loj.attr("result").status == '200') {
-				msg = '添加成功';
-				layer.open({
-					shade : false,
-					content : msg,
-					className : 'showBox',
-					time : 1,
-					end : function(elem) {
-						MTools.redirect( basePath+"/admin/redirect/hive/mobile/CRM-account-follow");
-					}
-				});
-			}
-		}
-	}); 
-	
-	
-
-
-	</script>
-	<!-- index js -->
-</body>
-</html> 
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-follow.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-follow.html
deleted file mode 100644
index 19e830e..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-follow.html
+++ /dev/null
@@ -1,188 +0,0 @@
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-
-
-
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingCRMaccount-service.css}">
-<!-- <style type="text/css">
-	.divList{
-		_height:200px; 
-		min-height:100px; 
-		border:1px solid #000; 
-	}
-
-</style> -->
-
-</head>
-<script>
-	
-</script>
-
-
-<body>
-	<!-- 商品列表页面 -->
-	<div class="wrap">
-		<!-- 头部开始 -->
-		<header data-am-widget="header"
-			class="am-header color-w back-m1 am-header-fixed">
-			<div class="am-header-left am-header-nav">
-				<a th:href="@{/admin/redirect/hive/mobile/CRM-account}" class=""> <i
-					class="am-header-icon am-icon-chevron-left"></i>
-				</a>
-			</div>
-
-			<h1 class="am-header-title">
-				<a href="#title-link" class="" th:text="${session.lookVipInfo.vipName}+'跟进记录'">  </a>
-			</h1>
-
-
-		</header>
-		<!-- 头部结束 -->
-
-		<!-- 订单内容 -->
-		<div class="main main1">
-
-			<div class="am-g">
-				<div class="col-sm-12" style="text-align: right"><a th:href="@{/admin/redirect/hive/mobile/CRM-account-follow-add}"
-											   class="am-btn am-btn-primary">新增跟进记录</a></div>
-			</div>
-
-
-			<!-- 套餐表格 -->
-			<div data-am-widget="list_news" 
-				class="am-list-news am-list-news-default divList" style="margin-bottom: 60px">
-				<!--列表标题-->
-				<div class="am-list-news-hd am-cf am-g" id="ul_title">
-					<!--带更多链接-->
-					<div class="am-u-sm-4 ">
-						<h2 class="am-list-news-more am-fr">计划跟进时间</h2>
-					</div>
-					<div class="am-u-sm-6	 ">
-						<h2 class="am-list-news-more am-fr">肌肤现状</h2>
-					</div>
-					<div class="am-u-sm-2 ">
-						<h2 class="am-list-news-more am-fr">操作</h2>
-					</div>
-
-				</div>
-				
-				<div class="am-list-news-bd " >
-					<ul class="am-list" id="showdataBox">
-						
-					</ul>
-				</div>
-				<div id="pagingBox" align="center" style="margin-top: 10px;margin-bottom: 100px">
-				  		
-				 </div>
-			</div>
-
-
-
-		</div>
-	</div>
-	<form class="am-form" method="post"
-		  id="dataform" onsubmit="javascripr:return false;">
-	<input autocomplete="off"   type="hidden" name="offset" id="_offset"  value="0" />
-	<input autocomplete="off"   type="hidden" id="limit" name="limit"   value="10" />
-	</form>
-	<script
-		th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<script th:src="@{/plugin/amazingUI/js/amazeui.min.js}"></script>
-
-	<script>
-		var delBtn="";
-	</script>
-
-	<script matrix:btn="servicefollow-dels"  >
-		delBtn='<a class="am-list-item-hd" onClick="del(\'VALUE\')"  >删除</a>';
-	</script>
-
-
-	<script>
-	
-
-	
-	
-	/**
-		加载数据
-		 **/
-		 $(function(){
-			 
-			var pageSize=$("#limit").val();
-			var flag = $.query.get("flag");
-			if(flag){
-				$("#order-select").val(flag);
-			}
-			 Pagination.init({
-					url: basePath+"/admin/serviceRecord/showList",
-					pageSize : pageSize,
-					builderDate:function(loj){
-						var html='';
-						if(loj.getRowCount() >0){
-							for(var i=0 ; i<loj.getRowCount(); i++ ){
-								html+=' <li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left"> <div class="am-u-sm-4 "> <h3 class="am-list-item-hd">'
-								+loj.getDateYMH(i,"followTime")
-								+'</h3> </div> <div class="am-u-sm-6 "><h3 class="am-list-item-hd">'
-								+loj.getString(i,"info5")
-								+'</h3> </div> <div class="am-u-sm-2 ">'
-								+'<a class="am-list-item-hd" href="'+basePath+'/admin/serviceRecord/editForm?id='+loj.getString(i,"id")+'"  >编辑</a>&nbsp;&nbsp;'
-								+delBtn.replace("VALUE",loj.getString(i,"id"))+'</div></li>';
-							}
-						}else{
-							html ='<Div style="text-align: center;width:100%;">暂无跟进记录</div>'
-							$("#pagingBox").hide();
-						}
-						return html;
-					}	
-				}).serchDate();
-			 })
-				
-
-		function del(id){
-			 layer.open({
-				    content: '确认要删除这条记录吗?',
-				    btn: ['确认', '取消'],
-				    shadeClose: false,
-				    yes: function(){
-				        $.AjaxProxy({p:{keys:id}}).invoke( basePath+"/admin/serviceRecord/del",function(loj){
-				        	layer.open({content: '删除成功', time: 1});
-				        	Pagination.serchDate();
-				        });
-				    	
-				    }
-				});
-		}
-	</script>
-
-
-
-
-
-
-
-	<!-- index js -->
-</body>
-</html> 
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-mealuse.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-mealuse.html
deleted file mode 100644
index 17cf4c8..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-mealuse.html
+++ /dev/null
@@ -1,177 +0,0 @@
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href= "@{/css/dingOrderUseNew.css}">
-<link rel="stylesheet" type="text/css"
-	th:href= "@{/plugin/LCalendar/src/css/LCalendar.css}">
-
-</head>
-
-<body>
-	<!-- 购物车页面 -->
-	<!-- 头部开始 -->
-	<header data-am-widget="header" class="am-header color-w back-m1">
-		<div class="am-header-left am-header-nav">
-    	  <a th:href="@{/admin/redirect/hive/mobile/CRM-account}" class="">
-                <i class="am-header-icon am-icon-chevron-left"></i>
-          </a>
-		</div>
-
-		<h1 class="am-header-title">
-			<a href="#title-link" class=""> 套餐项目情况 </a>
-		</h1>
-
-		<!-- <div class="am-header-right am-header-nav">
-			<a href="###" class=""> <i class="am-header-icon am-icon-bars"></i>
-			</a>
-		</div> -->
-	</header>
-	<!-- 头部结束 -->
-
-	<!-- 购物车表单开始 -->
-		<div class="main main1">
-			<div data-am-widget="list_news"
-				class="am-list-news am-list-news-default">
-				<div class="am-list-news-bd">
-					<ul class="am-list" id="ul_order_use">
-
-					</ul>
-				</div>
-			</div>
-		</div>
-
-	<!-- 购物车表单结束 -->
-
-
-	<script type="text/x-handlebars-template" id="amz-tpl">
-  {{>header header}}
-
-  {{>menu menu}}
-
-  {{>slider slider}}
-
-  {{>list_news list1}}
-
-  {{>gallery gallery}}
-
-  {{>list_news list2}}
-
-  {{>footer footer}}
-
-  {{>navbar navbar}}
-</script>
-	<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-	<script
-		th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<script th:src="@{/plugin/LCalendar/src/js/LCalendar.js}"></script>
-	<!-- index js -->
-	<script type="text/javascript">
-		/* $('.datetimepicker').datetimepicker({
-			format : "yyyy-mm-dd hh:ii",
-			autoclose: true,
-		}); */
-
-		$(function() {
-			MTools.autoFullSelect();
-			$(".check").uCheck('enable');
-			$
-					.AjaxProxy()
-					.invoke(
-							 basePath+"/admin/projUser/findAllUseService",
-							function(loj) {
-								var html = "";
-								var taocanProjMap = loj.attr("result")["mapInfo"].taocanProjMap; //mapInfo对象
-
-
-								if (loj.getRowCount() > 0  || taocanProjMap.length> 0) {
-
-									//循环取出套餐的信息		
-
-									for ( var i=0 ; i<taocanProjMap.length;i++ ) {
-										var taocanInfo =taocanProjMap[i];
-										html +=  '<div class="card">'
-												+ '<li class="lic am-g " >'
-												+ '<div class=" am-u-sm-8 am-list-main"><h2 class="am-list-item-hd">'
-												+ taocanInfo.tcName
-												+ '</h2></div><div class=" am-u-sm-3 am-list-main"><h3 class="am-list-item-hd">余额 &yen;'
-												+ taocanInfo.balance
-												+ '</h3></li>';
-
-										//循环取出一个套餐中包含的项目
-										for (var j = 0; j < taocanInfo.taocanProjUse.length; j++) {
-
-											var projUse = taocanInfo.taocanProjUse[j];
-
-											html += '<li class="lic am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left " >'
-													
-													+ '<div class=" am-u-sm-4 "><h3 class="am-list-item-hd">'
-													+ projUse.name
-													+ '</h3></div><div class=" am-u-sm-3 "><h3 class="am-list-item-hd">余额&yen;'
-													+ projUse.balance
-													+ '</h3></div><div class="am-u-sm-3 ">&nbsp;<span>余'
-													+ projUse.surplusCount
-													+ '次</span></div></li>';
-										}
-										html += '<div class="taocan"></div>'
-												+ '</div>';
-									}
-									//循环取出项目列表
-									for (var i = 0; i < loj.getRowCount(); i++) {
-
-										html += '<div class="card">'
-												+ ' <li class=" lic  am-g  " >'
-												
-												+ '<div class=" am-u-sm-4 am-list-main"><h3 class="am-list-item-hd">'
-												+ loj.getString(i, "projInfo").projName
-												+ '</h3></div><div class=" am-u-sm-3 am-list-main"><h3 class="am-list-item-hd">余额&yen;'
-												+ loj.getString(i, "balance")
-												+ '</h3></div><div class="am-u-sm-3 am-list-thumb">&nbsp;<span>余'
-												+ loj.getString(i,
-														"surplusCount")
-												+ '次</span></div></li>'
-												+ '<div class="taocan"></div></div>';
-									}
-
-								} else {
-									html = '<div class="empty-car">'
-											+ '<p id="empty-car">没有可消耗项目</p>'
-											+ '<p>'
-											+ '<a href='+basePath+'"/admin/redirect/hive/mobile/order-list"> 马上去选购! </a>'
-											+ '</p>'
-											+ '</div>'
-											$("#submitBtn").hide();
-								}
-								//显示数据
-								$("#ul_order_use").html(html);
-							});
-			
-		})
-	</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-msg.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-msg.html
deleted file mode 100644
index c80fda5..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-msg.html
+++ /dev/null
@@ -1,185 +0,0 @@
-
-
-
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-  <meta charset="utf-8">
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
-  
- <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
-  <title th:text="${session.userInfo.shopName }"></title>
-
-  <!-- Set render engine for 360 browser -->
-  <meta name="renderer" content="webkit">
-
-  <!-- No Baidu Siteapp-->
-  <meta http-equiv="Cache-Control" content="no-siteapp"/>
-
-
-  <script type="text/javascript"th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-  <script type="text/javascript"th:src="@{/js/systools/DDMBase.js}"></script>
-  <link rel="stylesheet" th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-  <link rel="stylesheet" th:href="@{/plugin/amazingUI/css/app.css}">
-  <link rel="stylesheet" type="text/css" th:href="@{/css/dingUserVip.css}">
-  
-</head>
-<body>
-	<!-- 会员注册页面 -->
-    <!-- 头部开始 -->
-    <header data-am-widget="header"
-          class="am-header color-w back-m1 am-header-fixed">
-      <div class="am-header-left am-header-nav">
-     	 <a th:href="@{/admin/redirect/hive/mobile/CRM-account}" class="">
-                <i class="am-header-icon am-icon-chevron-left"></i>
-          </a>
-      </div>
-
-      <h1 class="am-header-title">
-          <a href="#title-link" class="">
-            会员信息
-          </a>
-      </h1>
-
-     <!--  <div class="am-header-right am-header-nav">
-          <a href="user.html" class="">
-
-                <i class="am-header-icon am-icon-bars"></i>
-          </a>
-      </div> -->
-  </header>
-  <!-- 头部结束 -->
-
-
-
-   <!-- 会员注册表单开始 -->
-  <div class="main main2"  >
-    <form class="am-form am-form-horizontal" method="post" id="dataform" onsubmit="javascripr:return false;">
-  	
-  		<input autocomplete="off"   type="hidden" th:value="${session.lookVipInfo.id }" name="id">
-      <div class="am-input-group am-form-group  am-input-group-primary am-g">
-        <div class="am-u-sm-4">
-        	<span class="am-input-group-label color-gray">会员姓名</span>
-        </div>
-       	<div class="am-u-sm-8">	
-       		 <span class="am-input-group-label" th:text="${session.lookVipInfo.vipName }"></span>
-      	</div>
-      </div>
-      <div class="am-input-group am-form-group  am-input-group-primary am-g bot">
-        <div class="am-u-sm-4">
-        	<span class="am-input-group-label color-gray">会员电话</span>
-        </div>
-        <div class="am-u-sm-8">
-        	<input autocomplete="off"   id="input-bottom" th:value="${session.lookVipInfo.phone }" placeholder="会员手机号"  name="phone"
-        		type="text" dataType="m"  nullmsg="请填写会员手机号" errormsg="请填写正确手机号"/>	
-      	</div>
-      </div>
-      <div class="Validform_checktip"></div>
-            
-       <div class="am-input-group am-form-group  am-input-group-primary am-g bot">
-         <div class="am-u-sm-4">
-        	<span class="am-input-group-label color-gray">会员地址</span>         
-         </div>
-        
-        <div class="am-u-sm-8">	
-        	<input autocomplete="off"   id="input-bottom" th:value="${session.lookVipInfo.addr }" placeholder="会员地址" name="addr"
-        		type="text" dataType="*"  nullmsg="请填写会员地址"/>	
-      	</div>
-      </div>
-      <div class="Validform_checktip"></div>
-      
-      <div class="am-form-group am-form-select am-input-group  am-input-group-primary am-g">
-        <div class="am-u-sm-4">
-        	<span class="am-input-group-label color-gray">会员星座</span>
-        </div>
-        <div class="am-u-sm-8">
-	         <span class="am-input-group-label" th:text="${session.lookVipInfo.constell }"></span>
-        </div>
-      </div>
-      <div class="am-form-group am-form-select am-input-group  am-input-group-primary am-g">
-        <div class="am-u-sm-4">
-        	<span class="am-input-group-label color-gray">会员生肖</span>
-        </div>
-        <div class="am-u-sm-8">
-        	 <span class="am-input-group-label" th:text="${session.lookVipInfo.animalSign }"></span>
-        </div>
-      </div>
-      <div class="am-form-group am-form-select am-input-group  am-input-group-primary am-g">
-        <div class="am-u-sm-4">
-        	<span class="am-input-group-label color-gray">到店途径</span>
-        </div>
-	    <div class="am-u-sm-8">  
-	         <span class="am-input-group-label" th:text="${session.lookVipInfo.arrivalWay }"></span>
-      	</div>
-      </div>
-      <div class="am-form-group am-form-select am-input-group  am-input-group-primary am-g" >
-        <div class="am-u-sm-4">
-        	<span class="am-input-group-label color-gray">性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别</span>
-        </div>
-		<div class="am-u-sm-8">	        
-	         <span class="am-input-group-label" th:text="${session.lookVipInfo.sex }"></span>
-        </div>
-      </div>
-    
-      <div class="am-form-group am-form-select am-input-group am-input-group-primary am-g">
-        <div class="am-u-sm-4">
-        	<span class="am-input-group-label color-gray">会员类型</span>
-       	</div>
-        <div class="am-u-sm-8">
-       	 	 <span class="am-input-group-label" th:text="${session.lookVipInfo.vipType }">
-       	 	 </span>    
-      	</div>
-      </div>
-      <div class="am-form-group am-form-select am-input-group am-input-group-primary am-g">
-        <div class="am-u-sm-4">
-        	<span class="am-input-group-label color-gray">会员生日</span>
-        </div>
-        <div class="am-u-sm-8">
-            <span class="am-input-group-label"   th:value="${#dates.format(session.lookVipInfo.birthday1, 'yyyy-MM-dd')}"></span>
-      	</div>
-      </div>
-        <div class="am-form-group am-form-select am-input-group am-input-group-primary am-g">
-            <div class="am-u-sm-4">
-                <span class="am-input-group-label color-gray">疾病历史</span>
-            </div>
-            <div class="am-u-sm-8">
-       	 	 <span class="am-input-group-label" th:text="${session.lookVipInfo.disease }">
-       	 	 </span>
-            </div>
-        </div>
-      <div class="inputBtn">
-        <input autocomplete="off"   type="button" onclick="myForm.submit()" class="am-btn btn-m1 am-radius am-btn-block" value="保存"></input>
-      </div>
-      
-    </form>
-  </div>
-  <!-- 会员到访表单结束 -->
-
-  
- 
-  
-
-<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-<script th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-<!-- index js --> 
-<script type="text/javascript">
-/*会员注册判断  */
-var myForm = MForm.initForm({
-	invokeUrl :  basePath+"/admin/vipInfo/modifyVip",
-	afterSubmit : function(loj) {
-		layer.open({
-			shade:false,
-			content : '保存成功',
-			className : 'showBox',
-			time : 1,
-			end: function(elem){
-		        MTools.redirect( basePath+"/admin/redirect/hive/mobile/CRM-account-my");
-		     }   
-		});
-	}
-}); 
-</script> 
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-my.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-my.html
deleted file mode 100644
index 2bfecaa..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-my.html
+++ /dev/null
@@ -1,259 +0,0 @@
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingOrderList.css}">
-<style type="text/css">
-.m_ul{
-	list-style: none;
-}
-
-.m_ul li span{
-margin-left: 2em;
-}
-</style>
-</head>
-
-
-
-<body>
-	<!-- 商品列表页面 -->
-	<div class="wrap">
-		<!-- 头部开始 -->
-		<header data-am-widget="header"
-			class="am-header color-w back-m1 am-header-fixed">
-			<div class="am-header-left am-header-nav">
-				<a th:href="@{/admin/redirect/hive/mobile/CRM?foot=3}" class=""> <i
-					class="am-header-icon am-icon-chevron-left"></i>
-				</a>
-			</div>
-
-			<h1 class="am-header-title">
-				<a href="#title-link" class=""> 我的客户 </a>
-			</h1>
-
-
-		</header>
-		<!-- 头部结束 -->
-
-		<!-- 订单内容 -->
-		<div class="main main1" id="main" style="display: none;">
-			<form class="am-form am-form-horizontal" id="dataform"
-				onsubmit="javascripr:return false;">
-				<div class="am-form-group am-form-select am-input-group  am-input-group-primary am-g  title">
-					<div class="am-u-sm-6 margin-b1">
-						<select class="form-control autoFull border" 
-							th:data-url="@{/admin/vipInfo/findVipLevel}"
-							data-filed="levelName" 
-							name="levelId"> 
-							<option value=''>等级</option> 
-						</select>
-					</div>	
-					
-						<!-- <label class="col-sm-2 control-label">会员活跃度</label> -->
-						<div class="am-u-sm-6 margin-b1" >
-							<select class="form-control autoFull border" 
-							th:data-url="@{/admin/dataDictionary/showDataDictionary}"
-							data-param="{type:'会员活跃度'}" 
-							data-value="name"
-							name="vipState"> 
-							<option value=''>活跃度</option>  
-							</select>
-						</div>
-						<div class="am-u-sm-6 margin-b1">
-							<select name="select" id="select" onchange="option()"> 
-								<option value=''>--类型选择--</option>
-								<option value="absentDay">未到店日期</option>
-								<option value="birthdays">生日</option>
-								<option value="followDays">跟进</option>
-								<option value="appointDays">预约</option>
-							</select>
-						</div>
-						<div class="am-u-sm-6 margin-b1">
-							<select name="time" id="time">
-								<option value='' class="option time">--时间选择--</option>
-								<option value="3"  class="option option1 ">3天</option>
-								<option value="7" class="option option1">7天</option>
-								<option value="14" class="option option1">14天</option>
-								<option value="1"  class="option option2">今天</option>
-								<option value="3" class="option option2">3天内</option>
-								<option value="30" class="option option2">一个月</option>
-							</select>
-						</div>
-
-					<div class="am-u-sm-8 ">
-						<input autocomplete="off"   type="text" class="searchIn" name="keyWord"	placeholder="用户姓名/手机号" />
-
-					</div>
-					<div class="am-u-sm-4 ">
-						<button type="button"
-							class="am-btn am-btn-default am-radius searchBtn"
-							onclick="Pagination.serchDate()">搜索</button>
-					</div>
-					
-						<!-- 记录当前页 -->
-						<input autocomplete="off"   type="hidden" name="offset" id="_offset" value="0" />
-						<input autocomplete="off"  	type="hidden" name="limit" id="limit"  value="10" />
-				</div>
-
-				
-				<div data-am-widget="list_news"
-					class="am-list-news am-list-news-default">
-					<!--列表标题-->
-					<div class="am-list-news-hd am-cf am-g">
-						<!--带更多链接-->
-						<div class="am-u-sm-3 ">
-							<h2 class="am-list-news-more am-fr">客户姓名</h2>
-						</div>
-						<div class="am-u-sm-3 ">
-							<h2 class="am-list-news-more am-fr">电话</h2>
-						</div>
-						<div class="am-u-sm-3 ">
-							<h2 class="am-list-news-more am-fr">会员等级</h2>
-						</div> 
-						<div class="am-u-sm-3 ">
-							<h2 class="am-list-news-more am-fr">操作</h2>
-						</div>
-					</div>
-					<div class="am-list-news-bd">
-						<ul class="am-list am-list-striped" id="showdataBox">
-
-						</ul>
-					</div>
-					<div id="pagingBox" align="center" style="margin-top: 10px"></div>
-				</div>
-				<!-- 商品展示结束 -->
-				<!-- 测试 -->
-			</form>
-		</div>
-		<!-- 订单内容结束 -->
-
-	</div>
-
-	<script
-		th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<script th:src="@{/plugin/amazingUI/js/amazeui.min.js}"></script>
-	<script>
-	
-		/**
-		加载数据
-		 **/
-		$(function() {
-			var pageSize=$("#limit").val();
-			Pagination
-					.init(
-							{
-								url :  basePath+"/admin/customer/showMyCustomerByModel",
-								pageSize : pageSize,
-								builderDate : function(loj) {
-									if (loj.getRowCount() > 0) {
-										$("#main").show();
-										var html = "";
-										//构建数据
-										for (var i = 0; i < loj.getRowCount(); i++) {
-											var phone=' ';
-											var tphone=' ';
-											if(loj.getString(i, "phone")&&loj.getString(i, "phone")!=''){
-												phone=loj.getString(i, "phone");
-												if(phone.length=11){
-												    tphone=phone.substring(0,3)+"****"+phone.substring(8,11);
-												}else{
-												    tphone=phone;
-												}
-											}
-										
-											html += ' <li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">' 
-											+'<div class="am-u-sm-3 "><h3 class="am-list-item-hd">'+ loj.getString(i,"vipName") + '</h3> </div>'
-											+'<div class="am-u-sm-3 "><h3 class="am-list-item-hd">' + tphone + '</h3> </div> '
-											+'<div class="am-u-sm-3 "><h3 class="am-list-item-hd">' +(loj.getString(i, "vipLevel").levelName==null?' ':loj.getString(i, "vipLevel").levelName) + '</h3> </div> ' 
-											+'<div class="am-u-sm-3 "><a class="am-list-item-hd" href="tel:'+phone+'">拨号</a>&nbsp;&nbsp;<a class="am-list-item-hd" href="sms:'+phone+'">短信</a>&nbsp;&nbsp;<a class="am-list-item-hd" href="'+basePath+'/admin/customer/toVipInfoSearch?id='+ loj.getString(i, "id")+ '&lookInfo=0">详情</a></div></li>';
-										}
-										return html;
-									} else {
-										$("#pagingBox").hide();
-
-										
-									}
-								}
-							}).serchDate();
-			
-			
-			//筛选点击事件
-			
-			
-			
-			$(".m_ul li span").click(function(){
-				
-				var normal="am-badge am-badge-secondary am-radius";		
-				var selected="am-badge am-badge-warning am-radius";
-				var myAttr=	$(this).attr("class");
-				if(myAttr==selected){
-					$(".m_ul li span").attr("class",normal);
-					$(this).attr("class",normal);
-					Pagination.serchDate();
-				}else{
-					$(".m_ul li span").attr("class",normal);
-					$(this).attr("class",selected);
-					onserch($(this).attr("kind"),$(this).attr("day"))
-				}
-				
-			});
-			
-			//下拉框
-			MTools.autoFullSelect();
-			//
-			//style="display:none"
-			$(".option1").css("display","none");
-			$(".option2").css("display","none");
-			
-		}
-		);
-		function option(){
-			$(".option").removeAttr("selected");
-			$('.time').attr('selected', true);
-			if($("#select").val() != null && $("#select").val() != ""){
-				if($("#select").val() != "absentDay"){
-					$(".option1").css("display","none");
-					$(".option2").css("display","block");
-				}else{
-					$(".option2").css("display","none");
-					$(".option1").css("display","block");
-				}
-			}else{
-				$(".option1").css("display","none");
-				$(".option2").css("display","none");
-			}
-		}
-		
-
-		
-	</script>
-	<!-- index js -->
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-potential.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-potential.html
deleted file mode 100644
index f536b1a..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-potential.html
+++ /dev/null
@@ -1,184 +0,0 @@
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingOrderList.css}">
-
-</head>
-<script>
- 
-</script>
-
-
-<body >
-	<!-- 商品列表页面 -->
-	<div class="wrap">
-		<!-- 头部开始 -->
-		<header data-am-widget="header" class="am-header color-w back-m1 am-header-fixed">
-			<div class="am-header-left am-header-nav">
-				<a th:href="@{/admin/redirect/CRM-account}" class=""> <i
-					class="am-header-icon am-icon-chevron-left"></i>
-				</a>
-			</div>
-
-			<h1 class="am-header-title">
-				<a href="#title-link" class=""> 潜在客户 </a>
-			</h1>
-
-			<!-- <div class="am-header-right am-header-nav">
-				<a class=""> <i class="am-header-icon am-icon-bars"></i>
-				</a>
-			</div> -->
-		</header>
-		<!-- 头部结束 -->
-	      
-		<!-- 订单内容 -->
-		<div class="main main1">
-			<form class="am-form am-form-horizontal" action="">
-				<!-- <input autocomplete="off"   class="am-form-field am-input-sm" type="text" placeholder="">
-        <br/> -->
-
-				<div
-					class="am-form-group am-form-select am-input-group  am-input-group-primary am-g  title">
-					<div class="am-u-sm-1 ">
-						<span>&nbsp;</span>
-					</div>
-					<div class="am-u-sm-8 search">
-						<input autocomplete="off"   type="text" class="searchIn" placeholder="用户姓名/手机号"/>
-					</div>
-					<div class="am-u-sm-3 btn">
-						<button class="am-btn am-btn-default am-radius searchBtn" >搜索</button>
-					</div>
-					
-				</div>
-				
-				<!-- 商品表格 -->
-				<div data-am-widget="list_news"
-					class="am-list-news am-list-news-default">
-					<!--列表标题-->
-					<div class="am-list-news-hd am-cf am-g">
-						<!--带更多链接-->
-						<div class="am-u-sm-3 ">
-							<h2 class="am-list-news-more am-fr">客户姓名</h2>
-						</div>		
-						<div class="am-u-sm-5 ">
-							<h2 class="am-list-news-more am-fr">电话 </h2>
-						</div>
-						<div class="am-u-sm-2 ">
-							<h2 class="am-list-news-more am-fr">等级 </h2>
-						</div>
-						<div class="am-u-sm-2 ">
-							<h2 class="am-list-news-more am-fr">操作 </h2>
-						</div>
-
-					</div>
-
-					<div class="am-list-news-bd">
-						<ul class="am-list">							
-								<li
-									class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">
-									<div class="am-u-sm-3 ">
-										<h3 class="am-list-item-hd">张全蛋</h3>
-									</div>
-
-									
-									<div class="am-u-sm-5 ">
-										<h3 class="am-list-item-hd">15095828513</h3>
-									</div>
-									<div class="am-u-sm-2 ">
-										<h3 class="am-list-item-hd">尊贵会</h3>
-									</div>
-									<div class="am-u-sm-2 ">
-										<a class="am-list-item-hd" th:href="@{/admin/redirect/CRM-account-msg}">详情</a>
-									</div>
-									
-								</li>
-								<li
-									class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">
-									<div class="am-u-sm-3 ">
-										<h3 class="am-list-item-hd">张全蛋</h3>
-									</div>
-
-									
-									<div class="am-u-sm-5 ">
-										<h3 class="am-list-item-hd">15095828513</h3>
-									</div>
-									<div class="am-u-sm-2 ">
-										<h3 class="am-list-item-hd">尊贵会</h3>
-									</div>
-									<div class="am-u-sm-2 ">
-										<a class="am-list-item-hd">详情</a>
-									</div>
-									
-								</li>
-								<li
-									class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">
-									<div class="am-u-sm-3 ">
-										<h3 class="am-list-item-hd">张全蛋</h3>
-									</div>
-
-									
-									<div class="am-u-sm-5 ">
-										<h3 class="am-list-item-hd">15095828513</h3>
-									</div>
-									<div class="am-u-sm-2 ">
-										<h3 class="am-list-item-hd">尊贵会</h3>
-									</div>
-									<div class="am-u-sm-2 ">
-										<a class="am-list-item-hd">详情</a>
-									</div>
-									
-								</li>
-						</ul>
-					</div>
-					
-				</div>
-				
-				
-				<!-- 商品展示结束 -->
-				<!-- 测试 -->
-
-			</form>
-		</div>
-		<!-- 订单内容结束 -->
-
-	</div>
-	
-	
-	
-	<script	th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<script th:src="@{/plugin/amazingUI/js/amazeui.min.js}"></script>
-	<script>
-				
-		  
-	</script>
-	<!-- index js -->
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-service.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-service.html
deleted file mode 100644
index 1cc29ab..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-service.html
+++ /dev/null
@@ -1,186 +0,0 @@
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingCRMaccount-service.css}">
-
-</head>
-<script>
- 
-</script>
-
-
-<body >
-	<!-- 商品列表页面 -->
-	<div class="wrap">
-		<!-- 头部开始 -->
-		<header data-am-widget="header" class="am-header color-w back-m1 am-header-fixed">
-			<div class="am-header-left am-header-nav">
-				<a th:href="@{/admin/redirect/CRM-account}" class=""> <i
-					class="am-header-icon am-icon-chevron-left"></i>
-				</a>
-			</div>
-
-			<h1 class="am-header-title">
-				<a href="#title-link" class=""> 服务记录 </a>
-			</h1>
-
-			<!-- <div class="am-header-right am-header-nav">
-				<a class=""> <i class="am-header-icon am-icon-bars"></i>
-				</a>
-			</div> -->
-		</header>
-		<!-- 头部结束 -->
-	      
-		<!-- 订单内容 -->
-		<div class="main main1">
-			
-				
-				
-				<!-- 套餐表格 -->
-				<div data-am-widget="list_news"
-					class="am-list-news am-list-news-default">
-					<!--列表标题-->
-					<div class="am-list-news-hd am-cf am-g">
-						<!--带更多链接-->
-						<div class="am-u-sm-3 ">
-							<h2 class="am-list-news-more am-fr">服务人</h2>
-						</div>		
-						<div class="am-u-sm-4 ">
-							<h2 class="am-list-news-more am-fr">跟进时间</h2>
-						</div>
-						<div class="am-u-sm-5 ">
-							<h2 class="am-list-news-more am-fr">服务项目</h2>
-						</div>
-						
-					</div>
-					<div class="am-list-news-bd">
-						<ul class="am-list" id="showdataBox">							
-							<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left"> 
-								<div class="am-u-sm-3 ">
-									<span class="am-list-item-hd">罗总</span>
-								</div>		
-								<div class="am-u-sm-4 ">
-									<span class="am-list-item-hd">1993/12/01</span>
-								</div>
-								<div class="am-u-sm-5 ">
-									<span class="am-list-item-hd">大保健</span>
-								</div>
-							</li>
-							<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left"> 
-								<div class="am-u-sm-3 ">
-									<span class="am-list-item-hd">丁川</span>
-								</div>		
-								<div class="am-u-sm-4 ">
-									<span class="am-list-item-hd">1999/02/12</span>
-								</div>
-								<div class="am-u-sm-5 ">
-									<span class="am-list-item-hd">大保健</span>
-								</div>
-							</li>
-						</ul>
-					</div>
-					
-					<div id="pagingBox" >
-					</div>
-				</div>
-				<div data-am-widget="navbar" class="am-navbar am-cf am-navbar-default " id="">
-			      <ul class="am-navbar-nav am-cf am-avg-sm-1">
-			          <li >
-			            <div>
-							<form class="am-form">
-							 
-							    
-							
-							    <div class="am-form-group ">
-							    
-							      
-								      <span class="color-w">服务时间</span> <button type="submit" class="am-btn am-btn-default btn-add">添加</button>
-								      <input autocomplete="off"   type="date" class="" id="doc-ipt-email-1" >
-								  		
-								  
-							   
-							     
-							    	 <span class="color-w">服务项目</span>
-								      <select id="doc-select-1">
-								        <option value="option1">大保健</option>
-								        <option value="option2">小暴击</option>
-								        <option value="option3">选项三</option>
-								      </select>
-							       
-							     </div>
-				
-					   			 
-					 		 
-							</form>	
-						</div>
-			          </li>
-			          
-			      </ul>
-			  	</div>
-				
-				<!-- 商品展示结束 -->
-				<!-- 测试 -->
-			
-		</div>
-		<!-- 订单内容结束 -->
-
-	</div>
-	
-	<script	th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<script th:src="@{/plugin/amazingUI/js/amazeui.min.js}"></script>
-	<script>
-
-	/**
-	加载数据
-	**/
-	/* $(function(){
-		Pagination.init({url: basePath+"/admin/customer/showMyCustomer",
-			builderDate:function(loj){
-				var html="";
-				//构建数据
-				for(var i=0 ; i<loj.getRowCount(); i++ ){
-					html+=' <li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left"> <div class="am-u-sm-3 "> <h3 class="am-list-item-hd">'
-					+loj.getString(i,"vipName")
-					+'</h3> </div> <div class="am-u-sm-4 "><h3 class="am-list-item-hd">'
-					+loj.getString(i,"phone")
-					+'</h3> </div> <div class="am-u-sm-3 "> <h3 class="am-list-item-hd">'
-					+'待做'
-					+'</h3> </div> <div class="am-u-sm-2 ">'
-					+'<a class="am-list-item-hd" th:href="@{/admin/redirect/CRM-account?id='+loj.getString(i,"id")+'"  >详情</a></div></li>';
-				}
-				return html;
-			}
-		}).serchDate();
-	})
-		 */  
-	</script>
-	<!-- index js -->
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-turn.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-turn.html
deleted file mode 100644
index c6dbdc7..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-turn.html
+++ /dev/null
@@ -1,184 +0,0 @@
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingOrderList.css}">
-
-</head>
-<script>
- 
-</script>
-
-
-<body >
-	<!-- 商品列表页面 -->
-	<div class="wrap">
-		<!-- 头部开始 -->
-		<header data-am-widget="header" class="am-header color-w back-m1 am-header-fixed">
-			<div class="am-header-left am-header-nav">
-				<a th:href="@{/admin/redirect/CRM-account}" class=""> <i
-					class="am-header-icon am-icon-chevron-left"></i>
-				</a>
-			</div>
-
-			<h1 class="am-header-title">
-				<a href="#title-link" class=""> 轮牌客户 </a>
-			</h1>
-
-			<!-- <div class="am-header-right am-header-nav">
-				<a class=""> <i class="am-header-icon am-icon-bars"></i>
-				</a>
-			</div> -->
-		</header>
-		<!-- 头部结束 -->
-	      
-		<!-- 订单内容 -->
-		<div class="main main1">
-			<form class="am-form am-form-horizontal" action="">
-				<!-- <input autocomplete="off"   class="am-form-field am-input-sm" type="text" placeholder="">
-        <br/> -->
-
-				<div
-					class="am-form-group am-form-select am-input-group  am-input-group-primary am-g  title">
-					<div class="am-u-sm-1 ">
-						<span>&nbsp;</span>
-					</div>
-					<div class="am-u-sm-8 search">
-						<input autocomplete="off"   type="text" class="searchIn" placeholder="用户姓名/手机号"/>
-					</div>
-					<div class="am-u-sm-3 btn">
-						<button class="am-btn am-btn-default am-radius searchBtn" >搜索</button>
-					</div>
-					
-				</div>
-				
-				<!-- 商品表格 -->
-				<div data-am-widget="list_news"
-					class="am-list-news am-list-news-default">
-					<!--列表标题-->
-					<div class="am-list-news-hd am-cf am-g">
-						<!--带更多链接-->
-						<div class="am-u-sm-3 ">
-							<h2 class="am-list-news-more am-fr">客户姓名</h2>
-						</div>		
-						<div class="am-u-sm-5 ">
-							<h2 class="am-list-news-more am-fr">电话 </h2>
-						</div>
-						<div class="am-u-sm-2 ">
-							<h2 class="am-list-news-more am-fr">等级 </h2>
-						</div>
-						<div class="am-u-sm-2 ">
-							<h2 class="am-list-news-more am-fr">操作 </h2>
-						</div>
-
-					</div>
-
-					<div class="am-list-news-bd">
-						<ul class="am-list">							
-								<li
-									class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">
-									<div class="am-u-sm-3 ">
-										<h3 class="am-list-item-hd">张全蛋</h3>
-									</div>
-
-									
-									<div class="am-u-sm-5 ">
-										<h3 class="am-list-item-hd">15095828513</h3>
-									</div>
-									<div class="am-u-sm-2 ">
-										<h3 class="am-list-item-hd">尊贵会</h3>
-									</div>
-									<div class="am-u-sm-2 ">
-										<a class="am-list-item-hd" th:href="@{/admin/redirect/CRM-account-msg}">详情</a>
-									</div>
-									
-								</li>
-								<li
-									class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">
-									<div class="am-u-sm-3 ">
-										<h3 class="am-list-item-hd">张全蛋</h3>
-									</div>
-
-									
-									<div class="am-u-sm-5 ">
-										<h3 class="am-list-item-hd">15095828513</h3>
-									</div>
-									<div class="am-u-sm-2 ">
-										<h3 class="am-list-item-hd">尊贵会</h3>
-									</div>
-									<div class="am-u-sm-2 ">
-										<a class="am-list-item-hd">详情</a>
-									</div>
-									
-								</li>
-								<li
-									class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">
-									<div class="am-u-sm-3 ">
-										<h3 class="am-list-item-hd">张全蛋</h3>
-									</div>
-
-									
-									<div class="am-u-sm-5 ">
-										<h3 class="am-list-item-hd">15095828513</h3>
-									</div>
-									<div class="am-u-sm-2 ">
-										<h3 class="am-list-item-hd">尊贵会</h3>
-									</div>
-									<div class="am-u-sm-2 ">
-										<a class="am-list-item-hd">详情</a>
-									</div>
-									
-								</li>
-						</ul>
-					</div>
-					
-				</div>
-				
-				
-				<!-- 商品展示结束 -->
-				<!-- 测试 -->
-
-			</form>
-		</div>
-		<!-- 订单内容结束 -->
-
-	</div>
-	
-	
-	
-	<script	th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<script th:src="@{/plugin/amazingUI/js/amazeui.min.js}"></script>
-	<script>
-				
-		  
-	</script>
-	<!-- index js -->
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account.html
deleted file mode 100644
index f7f90b0..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account.html
+++ /dev/null
@@ -1,126 +0,0 @@
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-    <meta
-            content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-            name="viewport"/>
-    <title th:text="${session.userInfo.shopName }"></title>
-
-    <!-- Set render engine for 360 browser -->
-    <meta name="renderer" content="webkit">
-
-    <!-- No Baidu Siteapp-->
-    <meta http-equiv="Cache-Control" content="no-siteapp"/>
-
-
-    <!-- Add to homescreen for Chrome on Android -->
-    <meta name="mobile-web-app-capable" content="yes">
-
-
-    <!-- Add to homescreen for Safari on iOS -->
-    <meta name="apple-mobile-web-app-capable" content="yes">
-    <meta name="apple-mobile-web-app-status-bar-style" content="black">
-    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
-
-
-    <script type="text/javascript"
-            th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-    <script type="text/javascript"
-            th:src="@{/js/systools/DDMBase.js}"></script>
-    <link rel="stylesheet"
-          th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-    <link rel="stylesheet"
-          th:href="@{/plugin/amazingUI/css/app.css}">
-    <link rel="stylesheet" type="text/css"
-          th:href="@{/css/dingCRMAccount.css}">
-
-</head>
-<body>
-<!-- 我的客户页面 -->
-<!-- 头部开始 -->
-<header data-am-widget="header" class="am-header color-w back-m1  ">
-    <div class="am-header-left am-header-nav">
-
-        <a th:if="${lookInfo >0}" th:href="@{/admin/redirect/hive/mobile/CRM-vipInfo-search}" class="">
-            <i class="am-header-icon am-icon-chevron-left"></i>
-        </a>
-
-        <a th:if="${lookInfo <=0}" th:href="@{/admin/redirect/hive/mobile/CRM-account-my}" class="">
-            <i class="am-header-icon am-icon-chevron-left"></i>
-        </a>
-
-    </div>
-    <h1 class="am-header-title">
-        <a href="#title-link" class="" th:text="${session.lookVipInfo.vipName}+'客户信息'">  </a>
-    </h1>
-    <!-- <div class="am-header-right am-header-nav">
-        <a href="user.html" class=""> <i
-            class="am-header-icon am-icon-bars"></i>
-        </a>
-    </div> -->
-</header>
-<!-- 头部结束 -->
-<!-- 内容开始 -->
-<ul class="am-avg-sm-3 boxes" id="boxs">
-
-    <li class="box box-1"><a
-            th:href="@{/admin/redirect/hive/mobile/CRM-account-msg}"> <img
-            th:src="@{/images/dingImg/jbmsg.png}"></img><br>
-        <small class="boxs">会员基本信息</small>
-    </a></li>
-
-
-    <li class="box box-2"><a
-            th:href="@{/admin/redirect/hive/mobile/CRM-account-card}"> <img
-            th:src="@{/images/dingImg/vipmsg.png}"></img><br>
-        <small class="boxs">会员卡信息</small>
-    </a></li>
-
-
-    <li class="box box-3"><a
-            th:href="@{/admin/redirect/hive/mobile/CRM-account-mealuse}"> <img
-            th:src="@{/images/dingImg/tcuse.png}"></img><br>
-        <small class="boxs">套餐项目使用情况</small>
-    </a></li>
-
-
-    <li class="box box-5"><a
-            th:href="'/admin/customer/showVipMoneyCardList?vipId='+${session.lookVipInfo?.id}"> <img
-            th:src="@{/images/dingImg/xjdd.png}"></img><br> <small
-            class="boxs">充值卡使用情况</small>
-    </a></li>
-    <li class="box box-6">
-        <a th:href="@{/admin/redirect/hive/mobile/CRM-account-follow}"> <img
-                th:src="@{/images/dingImg/gjjl.png}"><br> <small class="boxs">跟进记录</small>
-        </a></li>
-    <li class="box box-6">
-        <a th:href="@{/admin/redirect/hive/mobile/vip-archives?id=__${session.lookVipInfo.id}__}"> <img
-                th:src="@{/images/dingImg/gjjl.png}"><br> <small class="boxs">会员档案</small>
-        </a></li>
-</ul>
-<!-- 内容结束 -->
-<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-<script
-        th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-<!-- index js -->
-<script type="text/javascript">
-    $(function () {
-        var count = $("#boxs").find("li").length;
-        var index = count % 3;
-        if (index == 1) {
-            $("#boxs").append(" <li class='box'>" + "</li>");
-            $("#boxs").append(" <li class='box'>" + "</li>");
-
-        }
-        if (index == 2) {
-            $("#boxs").append(" <li class='box'>" + "</li>");
-
-        }
-
-    })
-</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-card-user.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-card-user.html
deleted file mode 100644
index 888adfe..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-card-user.html
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
- 
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-  <meta charset="utf-8">
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
-  
-  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
-  <title th:text="${session.userInfo.shopName }"></title>
-
-  <!-- Set render engine for 360 browser -->
-  <meta name="renderer" content="webkit">
-
-  <!-- No Baidu Siteapp-->
-  <meta http-equiv="Cache-Control" content="no-siteapp"/>
-
-  
-
-  <!-- Add to homescreen for Chrome on Android -->
-  <meta name="mobile-web-app-capable" content="yes">
- 
-
-  <!-- Add to homescreen for Safari on iOS -->
-  <meta name="apple-mobile-web-app-capable" content="yes">
-  <meta name="apple-mobile-web-app-status-bar-style" content="black">
-  <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
- 
-
-  <!-- Tile icon for Win8 (144x144 + tile color) -->
-  
-  <meta name="msapplication-TileColor" content="#0e90d2">
-  <script type="text/javascript"th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-  <script type="text/javascript"th:src="@{/js/systools/DDMBase.js}"></script>
-  <link rel="stylesheet" th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-  <link rel="stylesheet" th:href="@{/plugin/amazingUI/css/app.css}">
-  <link rel="stylesheet" type="text/css" th:href="@{/css/dingOrderMsg3.css}">
-  
-</head>
-<body>
-<!-- 套餐详情页面 -->
-  <!-- 头部开始 -->
-    <header data-am-widget="header"
-          class="am-header color-w back-m1">
-      <div class="am-header-left am-header-nav">
-          <a href="javascript:history.back(-1)" class="">
-                <i class="am-header-icon am-icon-chevron-left"></i>
-          </a>
-      </div>
-      <h1 class="am-header-title">
-          <a href="#title-link" class="">
-            充值卡使用详情
-          </a>
-      </h1>
-  </header>
-  <!-- 头部结束 -->
-  <div class=" main1 all" >
-      <div data-am-widget="list_news" class="am-list-news am-list-news-default" >
-      	<!-- 项目详情 -->
-      <div th:each="item:${list}" class="am-panel am-panel-secondary" id="vipLevel">
-        <div class="am-panel-hd">
-          <h2 class="am-panel-title" th:text="${item.cardName}" ></h2>
-          <span  class="down down1" ></span>
-        </div>
-        <div class="vipMsg">
-          <ul class="am-list am-list-static am-list-border" id="projDetails">            
-          	<li th:text="'总次数:'+${item.useTotal }"></li>
-          	<li th:text="'剩余次数:'+${item.lastCount }"></li>
-          	<li th:text="'本金:'+${item.realMoney }"></li>
-          	<li th:text="'赠送金额:'+${item.giftMoney }"></li>
-          	<li th:text="'来源:'+${item.source }"></li>
-          	<li th:text="'状态:'+${item.status }"></li>
-          	<li th:text="'到期时间: '+${#dates.format(item.failTime,'yyyy-MM-dd')}" > </li>
-          </ul>
-        </div>
-      </div>
-      <!-- 项目详情结束 -->
-      <input autocomplete="off"   type="hidden"  id="hidval" value="0">
-  </div>
-  </div>
-  <!-- 客户到访表单结束 -->
-  
-  
-
-
-<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-<script th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-<!-- index js -->  
-<script type="text/javascript">
-$(function () {
-    $("#vipLevel").bind("click", function () {
-        if ($("#hidval").val() == 1) {
-            $(".down1").css("transform","rotate(0deg)");
-            $(".vipMsg").slideUp(500,function(){
-                $("#hidval").val(0);
-                
-            })
-        } else {
-            $(".down1").css("transform","rotate(180deg)");
-            $(".vipMsg").slideDown(500,function(){
-            $("#hidval").val(1);                          
-            })
-        }
-    })
-});
-</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-search.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-search.html
deleted file mode 100644
index 24d6d0d..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-search.html
+++ /dev/null
@@ -1,127 +0,0 @@
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-<!-- Add to homescreen for Chrome on Android -->
-<meta name="mobile-web-app-capable" content="yes">
-
-
-<!-- Add to homescreen for Safari on iOS -->
-<meta name="apple-mobile-web-app-capable" content="yes">
-<meta name="apple-mobile-web-app-status-bar-style" content="black">
-<meta name="apple-mobile-web-app-title" content="Amaze UI" />
-
-
-
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href= "@{/css/dingCRMAccount.css}">
-
-</head>
-<body>
-	<!-- 我的客户页面 -->
-	<!-- 头部开始 -->
-	<header data-am-widget="header" class="am-header color-w back-m1  ">
-		<div class="am-header-left am-header-nav">
-			<a th:href="@{/admin/redirect/CRM-vipInfo-search}" class=""> <i
-				class="am-header-icon am-icon-chevron-left"></i>
-			</a>
-		</div>
-		<h1 class="am-header-title">
-			<a href="#title-link" class=""> 我的客户 </a>
-		</h1>
-		<!-- <div class="am-header-right am-header-nav">
-			<a href="user.html" class=""> <i
-				class="am-header-icon am-icon-bars"></i>
-			</a>
-		</div> -->
-	</header>
-	<!-- 头部结束 -->
-	<!-- 内容开始 -->
-	<ul class="am-avg-sm-3 boxes" id="boxs">
-		<matrix:fn value="accountMsg">
-			<li class="box box-1"><a
-				th:href="@{/admin/redirect/CRM-account-msg}"> <img
-					th:src="@{/images/dingImg/jbmsg.png}"></img><br>
-					<small class="boxs">会员基本信息</small>
-			</a></li>
-
-		<matrix:fn value="vipInfoMsg">
-			<li class="box box-5"><a
-				th:href="@{/admin/customer/findVipDetailByVipId}">
-					<img th:src="@{/images/dingImg/xxmsg.png}"></img><br>
-					<small class="boxs">会员详细信息</small>
-			</a></li>
-
-		<matrix:fn value="vipCardMsg">
-			<li class="box box-2"><a
-				th:href="@{/admin/redirect/CRM-account-card"> <img
-					th:src="@{/images/dingImg/vipmsg.png}"></img><br>
-					<small class="boxs">会员卡信息</small>
-			</a></li>
-
-		<matrix:fn value="mealuse">
-			<li class="box box-3"><a
-				th:href="@{/admin/redirect/CRM-account-mealuse"> <img
-					th:src="@{/images/dingImg/tcuse.png}"></img><br>
-					<small class="boxs">套餐项目使用情况</small>
-			</a></li>
-
-		<matrix:fn value="CRMAccountFollow">
-			<li class="box box-5"><a
-				th:href="@{/admin/redirect/CRM-account-follow"> <img
-					th:src="@{/images/dingImg/gjjl.png}"></img><br> <small
-					class="boxs">跟进记录</small>
-			</a></li>
-
-			<li class="box box-6"><a>
-				
-			</a></li>
-	</ul>
-	<!-- 内容结束 -->
-	<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-	<script
-		th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<!-- index js -->
-	<script type="text/javascript">
-	$(function(){
-		var count=$("#boxs").find("li").length;			
-		var index=count%3;
-		if(index==1){
-			$("#boxs").append(" <li class='box'>"+"</li>");
-			$("#boxs").append(" <li class='box'>"+"</li>");
-			
-		}
-		if(index==2){
-			$("#boxs").append(" <li class='box'>"+"</li>");
-			
-		}
-		
-	})
-	</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-vip.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-vip.html
deleted file mode 100644
index 3b0e67d..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-vip.html
+++ /dev/null
@@ -1,245 +0,0 @@
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-  <meta charset="utf-8">
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
-  
- <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
-  <title th:text="${session.userInfo.shopName }"></title>
-
-  <!-- Set render engine for 360 browser -->
-  <meta name="renderer" content="webkit">
-
-  <!-- No Baidu Siteapp-->
-  <meta http-equiv="Cache-Control" content="no-siteapp"/>
-
-  
-
-  <!-- Add to homescreen for Chrome on Android -->
-  <meta name="mobile-web-app-capable" content="yes">
- 
-
-  <!-- Add to homescreen for Safari on iOS -->
-  <meta name="apple-mobile-web-app-capable" content="yes">
-  <meta name="apple-mobile-web-app-status-bar-style" content="black">
-  <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
-
-  <meta name="msapplication-TileColor" content="#0e90d2">
-  <script type="text/javascript"th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-  <script type="text/javascript"th:src="@{/js/systools/DDMBase.js}"></script>
-  <link rel="stylesheet" th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-  <link rel="stylesheet" th:href="@{/plugin/amazingUI/css/app.css}">
-  <link rel="stylesheet" type="text/css" th:href="@{/css/dingUserVip.css}">
-  
-</head>
-<body>
-	<!-- 会员注册页面 -->
-    <!-- 头部开始 -->
-    <header data-am-widget="header"
-          class="am-header color-w back-m1 back-m1 am-header-fixed">
-      <div class="am-header-left am-header-nav">
-          <a th:href="@{/admin/redirect/hive/mobile/CRM?foot=3}" class="">
-
-                <i class="am-header-icon am-icon-chevron-left"></i>
-          </a>
-      </div>
-
-      <h1 class="am-header-title">
-          <a href="#title-link" class="">
-            会员注册
-          </a>
-      </h1>
-
-      <!-- <div class="am-header-right am-header-nav">
-          <a href="user.html" class="">
-
-                <i class="am-header-icon am-icon-bars"></i>
-          </a>
-      </div> -->
-  </header>
-  <!-- 头部结束 -->
-
-
-
-   <!-- 会员注册表单开始 -->
-  <div class="main main2"  >
-    <form class="am-form am-form-horizontal" method="post" id="dataform" onsubmit="javascripr:return false;">
-      
-     
-      <div class="am-input-group am-form-group  am-input-group-primary am-g bot">
-        <div class="am-u-sm-4">
-        	<span  class="am-input-group-label ">会员姓名</span>
-        </div>
-       	<div class="am-u-sm-8">	
-       		 <input autocomplete="off"   type="text" class="am-form-field " name="vipName"
-       		 	placeholder="会员姓名" dataType="*1-20"  nullmsg="请填写会员姓名" errormsg="长度为1-20" />       
-      	</div>
-      </div>
-      
-      <div class="am-input-group am-form-group  am-input-group-primary am-g bot">
-        <div class="am-u-sm-4">
-        	<span   class="am-input-group-label">会员电话</span>
-        </div>
-        <div class="am-u-sm-8">	
-        	<input autocomplete="off"   type="text" class="am-form-field "   name="phone" placeholder="手机号" nullmsg="请填写会员手机号" errormsg="请填写正确手机号">
-      	</div>
-      </div> 
-
-       <div class="am-input-group am-form-group  am-input-group-primary am-g bot">
-         <div class="am-u-sm-4">
-        	<span class="am-input-group-label">会员地址</span>         
-         </div>        
-        <div class="am-u-sm-8">	
-        	<input autocomplete="off"   type="text" class="am-form-field " name="addr"
-        		placeholder="会员地址" dataType="*" nullmsg="请填写会员地址">        
-      	</div>
-      </div>
-      
-     
-      
-      <!-- <input autocomplete="off"   class="am-form-field am-input-sm" type="text" placeholder="">
-      <br/> -->
-      
-      
-      <div class="am-form-group am-form-select am-input-group  am-input-group-primary am-g bot">
-        <div class="am-u-sm-4">
-        	<span class="am-input-group-label">到店途径</span>
-        </div>
-	    <div class="am-u-sm-8">  
-	        <select class="" name="arrivalWay" datatype="*" nullmsg="请选择到店途径">
-	        	<option value="">-- 请选择到店途径 --</option>
-				<option th:each="item:${ddtj}" th:value="${item.value}" th:text="${item.value}"></option>
-	        </select>
-      	</div>
-      </div>
-      <div class="Validform_checktip"></div>
-      
-      <div class="am-form-group am-form-select am-input-group  am-input-group-primary am-g bot" >
-        <div class="am-u-sm-4">
-        	<span class="am-input-group-label">性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别</span>
-        </div>
-		<div class="am-u-sm-8">	        
-	        <select class=" " name="sex" datatype="*" nullmsg="请选择性别">
-	          <option value="女">女</option>
-	          <option value="男">男</option>
-	        </select>
-        </div>
-      </div>
-      <div class="Validform_checktip"></div>
-      
-    
-      <div class="am-form-group am-form-select am-input-group am-input-group-primary am-g bot">
-        <div class="am-u-sm-4">
-        	<span class="am-input-group-label">会员生日</span>
-       	</div>
-        <div class="am-u-sm-8">
-       	 	<input autocomplete="off"   type="date" id="voInDate" name="voBirthday"
-       	 		class="am-form-field " datatype="*" nullmsg="请选择会员生日" onchange="changeBirthday(this.value)"/>     
-      	</div>
-      </div>
-      <div class="Validform_checktip"></div>
- 	
- 		<div class="am-form-group am-form-select am-input-group  am-input-group-primary am-g bot">
-        <div class="am-u-sm-4">
-        	<span class="am-input-group-label">会员星座</span>
-        </div>
-        <div class="am-u-sm-8">
-	        <select name="constell" id="constell">
-	          	<option value="">-- 请选择会员星座 --</option>
-				<option th:each="item:${xz}" th:value="${item.name}" th:text="${item.name}"></option>
-	        </select>
-        </div>
-      </div>
-      <div class="Validform_checktip"></div>
-      
-      <div class="am-form-group am-form-select am-input-group  am-input-group-primary am-g bot">
-        <div class="am-u-sm-4">
-        	<span class="am-input-group-label ">会员生肖</span>
-        </div>
-        <div class="am-u-sm-8">
-        	<select class=" " name="animalSign" id="animalSign" ><!-- datatype="*" nullmsg="请选择会员生肖" -->
-        		<option value="">-- 请选择会员生肖 --</option>
-					<option th:each="item:${sx}" th:value="${item.name}" th:text="${item.name}"></option>
-        	</select>
-        </div>
-      </div>
- 		<div class="Validform_checktip"></div>
-      <div class="am-form-group  am-input-group am-input-group-primary am-g ">
-		<div class="am-u-sm-4">
-			<span class="am-input-group-label ">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</span>
-		</div>
-		<div class="am-u-sm-8">
-			<textarea name="remark"  class="border " clos="100" rows="3" warp="virtual"></textarea>
-		</div>
-	 </div>
-      
-      <div class="inputBtn">
-        <input autocomplete="off"   type="button" onclick="myForm.submit()" class="am-btn btn-m1 am-radius am-btn-block" value="注册"></input>
-      </div>
-      <!-- 测试 -->
-      
-    </form>
-  </div>
-  <!-- 会员到访表单结束 -->
-
-  
- 
-  
-
-<script type="text/x-handlebars-template" id="amz-tpl">
-  {{>header header}}
-
-  {{>menu menu}}
-
-  {{>slider slider}}
-
-  {{>list_news list1}}
-
-  {{>gallery gallery}}
-
-  {{>list_news list2}}
-
-  {{>footer footer}}
-
-  {{>navbar navbar}}
-</script>
-<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-<script th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-<!-- index js --> 
-<script type="text/javascript">
-
- /*会员注册判断  */
-var myForm = MForm.initForm({
-	invokeUrl :  basePath+"/admin/vipInfo/registerVipInfo",
-	afterSubmit : function(loj) {
-		layer.open({
-			shade:false,
-			content : '注册成功',
-			className : 'showBox',
-			time : 1,
-			end: function(elem){
-		        MTools.redirect( basePath+"/admin/redirect/hive/mobile/CRM?foot=3");
-		     }   
-		});
-	}
-}); 
- 
- function changeBirthday(birthday){
-	 /* $("#constell").removeAttr("option:selected"); */
-	 $.AjaxProxy({gs_parameter:{birthday1:birthday}}).invoke(
-				 basePath+"/admin/vipInfo/getBirthday" , function(loj){
-					if(loj.getRowCount()>0){
-						$("#constell option:selected").html(loj.getString(0,"constell"));
-						$("#animalSign option:selected").html(loj.getString(0,"animalSign")); 
-						
-						/* console.log($("#constell").find("option:selected").html());
-						$("#constell").find("option[text="+loj.getString(0,"constell")+"]").attr("selected",true);
-						$("#animalSign").find("option[text="+loj.getString(0,"animalSign")+"]").attr("selected",true); */
-					}
-		});
- }
-</script> 
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-vipInfo-search.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-vipInfo-search.html
deleted file mode 100644
index 4dd0d14..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-vipInfo-search.html
+++ /dev/null
@@ -1,265 +0,0 @@
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-<!-- Add to homescreen for Chrome on Android -->
-<meta name="mobile-web-app-capable" content="yes">
-
-
-<!-- Add to homescreen for Safari on iOS -->
-<meta name="apple-mobile-web-app-capable" content="yes">
-<meta name="apple-mobile-web-app-status-bar-style" content="black">
-<meta name="apple-mobile-web-app-title" content="Amaze UI" />
-
-
-<!-- Tile icon for Win8 (144x144 + tile color) -->
-
-<meta name="msapplication-TileColor" content="#0e90d2">
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href= "@{/css/dingOrderSearch.css}">
-<style type="text/css">
-#userList {
-	height: 200px;
-	overflow: scroll;
-	overflow-x: hidden;
-}
-</style>
-</head>
-<body onkeypress="dosearch(event)">
-	<header data-am-widget="header" class="am-header color-w back-m1 back-m1">
-		<div class="am-header-left am-header-nav">
-			<a th:href="@{/admin/redirect/hive/mobile/CRM?foot=3}" class=""> <i
-				class="am-header-icon am-icon-chevron-left"></i>
-			</a>
-		</div>
-		<h1 class="am-header-title">
-			<a href="#title-link" class=""> 会员搜索 </a>
-		</h1>
-	</header>
-	<!-- 商品搜索页面 -->
-	<div class="wrap">
-		<div class="am-g">
-			<div class="am-u-sm-9 no-right">
-				<input autocomplete="off"   id="userName" name="acctNo" type="text"
-					class="am-form-field id-in am-dropdown-up" placeholder="请输入手机号或者姓名" />
-				<ul id="userList" class="userList " style="display: none">
-				</ul>
-
-			</div>
-			<div class="am-u-sm-3 no-left">
-				<button class="am-btn am-btn-default" type="button"
-					onclick="searchUser()">
-					<span class="am-icon-search"></span>
-				</button>
-			</div>
-		</div>
-	</div>
-
-	<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-	<script
-		th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<!-- index js -->
-	<script>
-	$(function() {
-		
-		$("#userName").bind('input propertychange', function() { 
-
-			var $input = $("#userName");
-			if ($input.length < 1) {
-				return false;
-			}
-
-			if ($input.val().length > 1) {
-				$
-						.AjaxProxy({
-							p : {
-								keyWord : $input.val(),
-							},
-							c : false,
-							a : false,
-						})
-						.invoke(
-								 basePath+"/admin/vipInfo/findUserByPhoto",
-								function(loj) {
-									var html = "";
-									if (loj.getRowCount() > 0) {
-										for (var i = 0; i < loj
-												.getRowCount(); i++) {
-											html += '<li onclick="selectList(\''
-													+ loj
-															.getString(
-																	i,
-																	'phone')
-													+ '\')" >'
-													+ loj
-															.getString(
-																	i,
-																	'phone')
-													+ "-"
-													+ loj
-															.getString(
-																	i,
-																	'vipName')
-													+ "-"
-													+ loj
-															.getString(
-																	i,
-																	'vipNo')
-													+ '</li>';
-										}
-										$("#userList")
-												.html(html)
-												.show();
-									} else {
-										$("#userList")
-												.empty()
-												.hide();
-									}
-
-								});
-			} else {
-				$("#userList").hide();
-			}
-		});
-
-		/* $("#userName")
-				.keyup(
-						function() {
-							var $input = $("#userName");
-							if ($input.length < 1) {
-								return false;
-							}
-
-							if ($input.val().length > 1) {
-								$
-										.AjaxProxy({
-											p : {
-												keyWord : $input.val(),
-											},
-											c : false,
-											a : false,
-										})
-										.invoke(
-												 basePath+"/admin/vipInfo/findUserByPhoto",
-												function(loj) {
-													var html = "";
-													if (loj.getRowCount() > 0) {
-														for (var i = 0; i < loj
-																.getRowCount(); i++) {
-															html += '<li onclick="selectList(\''
-																	+ loj
-																			.getString(
-																					i,
-																					'phone')
-																	+ '\')" >'
-																	+ loj
-																			.getString(
-																					i,
-																					'phone')
-																	+ "-"
-																	+ loj
-																			.getString(
-																					i,
-																					'vipName')
-																	+ "-"
-																	+ loj
-																			.getString(
-																					i,
-																					'vipNo')
-																	+ '</li>';
-														}
-														$("#userList")
-																.html(html)
-																.show();
-													} else {
-														$("#userList")
-																.empty()
-																.hide();
-													}
-
-												});
-							} else {
-								$("#userList").hide();
-							}
-						}); */
-	})
-		function searchUser() {
-			if($("#userName").val().length<1){
-				layer
-				.open({
-					shade : false,
-					content : "请输入关键词后再查询",
-					className : 'showBox',
-					time : 1,
-				});
-				return false;
-			}
-			$.AjaxProxy({p : {keyWord : $("#userName").val(),},
-						c : false,
-					})
-					.invoke(
-							 basePath+"/admin/vipInfo/findUserByPhoneOrNo",
-							function(loj) {
-								if (loj.getRowCount() > 0) {
-									layer
-											.open({
-												shade : false,
-												content : "查找成功",
-												className : 'showBox',
-												time : 1,
-												end : function(elem) {
-													MTools.redirect( basePath+"/admin/customer/toVipInfoSearch?id="+loj.getString(0,"id")+"&lookInfo=1");
-												}
-											});
-
-								} else {
-									layer.open({
-										shade : false,
-										content : "未查询到此会员",
-										className : 'showBox',
-										time : 2
-									});
-								}
-							});
-		}
-		function dosearch(e) {
-			if (e.keyCode == 13) {
-				e.preventDefault();
-				window.event.returnValue = false;
-				searchUser();
-				return false;
-			}
-		}
-		
-		function selectList(phone){
-			$("#userList").hide();
-			$("#userName").val(phone);
-			searchUser();
-		}
-		
-		
-	</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-visit-info.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-visit-info.html
deleted file mode 100644
index cb567f2..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-visit-info.html
+++ /dev/null
@@ -1,213 +0,0 @@
-
-
-
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-
-
-<!-- Add to homescreen for Safari on iOS -->
-<meta name="apple-mobile-web-app-capable" content="yes">
-<meta name="apple-mobile-web-app-status-bar-style" content="black">
-<meta name="apple-mobile-web-app-title" content="Amaze UI" />
-
-<meta name="msapplication-TileColor" content="#0e90d2">
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingUserVip.css}">
-<style type="text/css">
-	.span1{
-		white-space:nowrap;  
-   		overflow:hidden;					
-   		text-overflow:ellipsis;		
-   		padding-top: 10px ;
-	}
-
-</style>
-
-</head>
-<body>
-	<!-- 会员注册页面 -->
-	<!-- 头部开始 -->
-	<header data-am-widget="header"
-		class="am-header color-w back-m1 am-header-fixed">
-		<div class="am-header-left am-header-nav">
-			<a th:href="@{/admin/redirect/hive/mobile/CRM-visit-list}" class=""> <i
-				class="am-header-icon am-icon-chevron-left"></i>
-			</a>
-		</div>
-
-		<h1 class="am-header-title">
-			<a href="#title-link" class="">访问记录详情</a>
-		</h1>
-
-		<!-- <div class="am-header-right am-header-nav">
-			<a href="user.html" class=""> <i
-				class="am-header-icon am-icon-bars"></i>
-			</a>
-		</div> -->
-	</header>
-	<!-- 头部结束 -->
-
-
-
-	<!-- 会员注册表单开始 -->
-	<div class="main3">
-		<form class="form-horizontal" id="dataform"
-						onsubmit="javascripr:return false;">
-			<div
-				class="am-input-group am-form-group  am-input-group-primary am-g">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label color-gray">客户姓名</span>
-				</div>
-				<div class="am-u-sm-8">
-					<span class="am-input-group-label" th:text="${obj?.custName }"></span>
-				</div>
-			</div>
-			<div
-				class="am-input-group am-form-group  am-input-group-primary am-g">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label color-gray">客户手机号</span>
-				</div>
-				<div class="am-u-sm-8">
-					<span class="am-input-group-label" th:text="${obj?.custTel }"></span>
-				</div>
-			</div>
-			<div
-				class="am-input-group am-form-group  am-input-group-primary am-g">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label color-gray">客户编号</span>
-				</div>
-
-				<div class="am-u-sm-8">
-					<span class="am-input-group-label" th:text="${obj?.arrivalWay }"></span>
-
-				</div>
-			</div>
-
-
-			<div
-				class="am-form-group am-form-select am-input-group  am-input-group-primary am-g">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label color-gray">咨询版块</span>
-				</div>
-				<div class="am-u-sm-8 span1" th:text="${obj?.advicePlate }">
-
-				</div>
-			</div>
-			<div
-				class="am-form-group am-form-select am-input-group  am-input-group-primary am-g">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label  color-gray">业务类型</span>
-				</div>
-				<div class="am-u-sm-8 span1" th:text="${obj?.businessType }">
-
-				</div>
-			</div>
-
-
-
-			<div
-				class="am-form-group am-form-select am-input-group  am-input-group-primary am-g">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label color-gray">拜访门店</span>
-				</div>
-				<div class="am-u-sm-8">
-					<span class="am-input-group-label" th:text="${obj?.shopName }"></span>
-				</div>
-			</div>
-
-			<div
-				class="am-form-group am-form-select am-input-group  am-input-group-primary am-g">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label color-gray">健康顾问</span>
-				</div>
-				<div class="am-u-sm-8">
-					<span class="am-input-group-label" th:text="${obj?.adviser }"></span>
-				</div>
-			</div>
-			<div
-				class="am-form-group am-form-select am-input-group  am-input-group-primary am-g">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label color-gray">美疗师</span>
-				</div>
-				<div class="am-u-sm-8">
-					<span class="am-input-group-label" th:text="${obj?.beautician }"></span>
-				</div>
-			</div>
-			<div
-				class="am-form-group am-form-select am-input-group  am-input-group-primary am-g">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label color-gray">是否老客</span>
-				</div>
-				<div class="am-u-sm-8">
-					<span class="am-input-group-label" th:text="${obj?.isOld }"></span>
-				</div>
-			</div>
-			<div
-				class="am-form-group am-form-select am-input-group  am-input-group-primary am-g">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label color-gray">备注</span>
-				</div>
-				<div class="am-u-sm-8">
-					<span class="am-input-group-label" th:text="${obj?.remark }"></span>
-				</div>
-			</div>
-				<div th:if="${flag eq 1}" class="input-btn">
-					<input autocomplete="off"   type="button" onclick="myForm.submit()"
-						class="am-btn btn-m1 am-radius am-btn-block" value="提交">
-				</div>
-			<!-- 测试 -->
-		</form>
-	</div>
-	<!-- 会员到访表单结束 -->
-
-
-	<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-	<script
-		th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<!-- index js -->
-	<script type="text/javascript">
-	var myForm = MForm.initForm({
-		invokeUrl :  basePath+"/admin/chance/modifyChange",
-		afterSubmit : function(loj) {
-			layer.open({
-				shade:false,
-				content : loj.getValue("info"),
-				className : 'showBox',
-				time : 2,
-				end: function(elem){
-		        	MTools.redirect( basePath+"/admin/redirect/hive/mobiel/CRM-business-no");
-		        }
-			});
-		},
-		
-	});
-	</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-visit-list.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-visit-list.html
deleted file mode 100644
index 083d838..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-visit-list.html
+++ /dev/null
@@ -1,161 +0,0 @@
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-<!-- Add to homescreen for Chrome on Android -->
-<meta name="mobile-web-app-capable" content="yes">
-
-<!-- Add to homescreen for Safari on iOS -->
-<meta name="apple-mobile-web-app-capable" content="yes">
-<meta name="apple-mobile-web-app-status-bar-style" content="black">
-<meta name="apple-mobile-web-app-title" content="Amaze UI" />
-
-
-
-<meta name="msapplication-TileColor" content="#0e90d2">
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingOrderList.css}">
-
-</head>
-<script>
- 
-</script>
-
-
-<body >
-	<!-- 商品列表页面 -->
-	<div class="wrap">
-		<!-- 头部开始 -->
-		<header data-am-widget="header" class="am-header color-w back-m1 am-header-fixed">
-			<div class="am-header-left am-header-nav">
-				<a th:href="@{/admin/redirect/hive/mobile/CRM?foot=3}" class=""> <i
-					class="am-header-icon am-icon-chevron-left"></i>
-				</a>
-			</div>
-
-			<h1 class="am-header-title">
-				<a href="#title-link" class="">到访记录</a>
-			</h1>
-			<!-- <div class="am-header-right am-header-nav">
-				<a class=""> <i class="am-header-icon am-icon-bars"></i>
-				</a>
-			</div> -->
-		</header>
-		<!-- 头部结束 -->
-	      
-		<!-- 订单内容 -->
-		<div class="main main1" id="main" style="display: none;">
-			<form class="am-form am-form-horizontal"  id="dataform" onsubmit="javascripr:return false;">
-				<div
-					class="am-form-group am-form-select am-input-group  am-input-group-primary am-g  title">
-					<div class="am-u-sm-1 ">
-						<span>&nbsp;</span>
-					</div>
-					<div class="am-u-sm-8 search">
-						<input autocomplete="off"   type="text" class="searchIn" name="keyWord" placeholder="姓名/手机号/编号"/>
-						<!-- 记录当前页 -->
-						<input autocomplete="off"   type="hidden" name="offset" id="_offset"  value="0" />
-						<input autocomplete="off"   type="hidden" name="limit"   value="10" />
-					</div>
-					<div class="am-u-sm-3 btn">
-						<button type="button" class="am-btn am-btn-default am-radius searchBtn"  onclick="Pagination.serchDate()">搜索</button>
-					</div>
-				</div>
-				
-				<!-- 商品表格 -->
-				<div data-am-widget="list_news"
-					class="am-list-news am-list-news-default">
-					<!--列表标题-->
-					<div class="am-list-news-hd am-cf am-g">
-						<!--带更多链接-->
-						<div class="am-u-sm-3 ">
-							<h2 class="am-list-news-more am-fr">姓名</h2>
-						</div>		
-						<div class="am-u-sm-5 ">
-							<h2 class="am-list-news-more am-fr">时间</h2>
-						</div>
-						<div class="am-u-sm-2 ">
-							<h2 class="am-list-news-more am-fr">创建人</h2>
-						</div>
-						
-						<div class="am-u-sm-2 ">
-							<h2 class="am-list-news-more am-fr">操作</h2>
-						</div>
-					</div>
-					<div class="am-list-news-bd">
-						<ul class="am-list" id="showdataBox">							
-						</ul>
-					</div>
-					<div id="pagingBox" align="center" style="margin-top: 10px">
-					</div>
-				</div>
-				<!-- 商品展示结束 -->
-				<!-- 测试 -->
-			</form>
-		</div>
-		<!-- 订单内容结束 -->
- 
-	</div>
-	
-	<script	th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<script th:src="@{/plugin/amazingUI/js/amazeui.min.js}"></script>
-	<script>
-
-	/**
-	加载数据
-	**/
-	$(function(){
-		Pagination.init({url: basePath+"/admin/vipInfo/visitorList",
-			builderDate:function(loj){
-				if(loj.getRowCount()>0){
-					$("#main").show();
-					var html="";
-					//构建数据
-					for(var i=0 ; i<loj.getRowCount(); i++ ){
-						html+=' <li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left"> <div class="am-u-sm-3 "> <h3 class="am-list-item-hd">'
-						+loj.getString(i,"custName")
-						+'</h3> </div> <div class="am-u-sm-5 "><h3 class="am-list-item-hd">'
-						+loj.getDate(i,"arrivalTime")
-						+'</h3> </div> <div class="am-u-sm-2 "><h3 class="am-list-item-hd">'
-						+loj.getString(i,"adviser")
-						+'</h3> </div> <div class="am-u-sm-2 ">'
-						+'<a class="am-list-item-hd"  href="'+basePath+'/admin/vipInfo/lookVisitInfo?id='+loj.getString(i,"id")+'&flag=2"  >详情</a></div></li>';
-					}
-					return html;
-				}else{
-					$("#pagingBox").hide();
-
-				}				
-			}
-		}).serchDate();
-	})
-		  
-	</script>
-	<!-- index js -->
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-visit.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-visit.html
deleted file mode 100644
index 62d8ea1..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-visit.html
+++ /dev/null
@@ -1,273 +0,0 @@
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu SiteFapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-<!-- Add to homescreen for Chrome on Android -->
-<meta name="mobile-web-app-capable" content="yes">
-
-
-<!-- Add to homescreen for Safari on iOS -->
-<meta name="apple-mobile-web-app-capable" content="yes">
-<meta name="apple-mobile-web-app-status-bar-style" content="black">
-<meta name="apple-mobile-web-app-title" content="Amaze UI" />
-
-
-
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingUserVip.css}">
-
-</head>
-<body> 
-	<!-- 访客登记页面 -->
-	<!-- 头部开始 -->
-	<header data-am-widget="header" class="am-header color-w am-header-fixed back-m1">
-		<div class="am-header-left am-header-nav ">
-			<a th:href="@{/admin/redirect/hive/mobile/CRM?foot=3}" class=""> <i
-				class="am-header-icon am-icon-chevron-left"></i>
-			</a>
-		</div>
-
-		<h1 class="am-header-title">
-			<a href="#title-link" class=""> 客户到访登记 </a>
-		</h1>
-
-		<!-- <div class="am-header-right am-header-nav">
-			<a href="user.html" class=""> <i
-				class="am-header-icon am-icon-bars"></i>
-			</a>
-		</div> -->
-	</header>
-	<!-- 头部结束 -->
-
-
-	<!-- 客户到访表单开始 -->
-	<div class="main main2">
-		<form class="am-form am-form-horizontal" id="dataform"
-			onsubmit="javascripr:return false;">
-			
-			
-			<div class="am-form-group am-form-select am-input-group am-input-group-primary am-g bot">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">新客/老客</span> 
-				</div>
-				<div class="am-u-sm-8" style="padding-top: 10px">	
-					<input autocomplete="off"   class="static-form-control" name="isOld"   type="radio"  value="新客"/>新客
-					<input autocomplete="off"   class="static-form-control" name="isOld"  type="radio" value="老客"/>老客
-				</div>
-			</div>
-			<div class="Validform_checktip" style="margin-bottom: 10px"></div> 
-		
-			
-			<div class="am-input-group am-form-group  am-input-group-primary am-g bot">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">客户电话</span> 
-				</div>
-				<div class="am-u-sm-8">	
-					<input autocomplete="off"     onchange="getVipData('phone')" id="custTel" name="custTel" type="text" class="am-form-field " placeholder="输入电话后自动查询"
-						datatype="m" nullmsg="请填写客户手机号" errormsg="请填写正确手机号">
-				</div>
-			</div>
-			
-			<div class="am-input-group am-form-group  am-input-group-primary am-g bot">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">客户姓名</span> 
-				</div>
-				<div class="am-u-sm-8">
-					<input autocomplete="off"    name="custName" onchange="getVipData('vipName')" id="vipName" type="text" class="am-form-field "
-						placeholder="客户姓名" datatype="*1-20" nullmsg="请填写客户姓名" errormsg="长度为1-20">
-				</div>
-			</div>
-		
-		
-		   <!-- 客户后来添加了一个会员编号,去掉了到店途径,因此性别这个字段实际存储的是会员编号 -->
-			<div class="am-input-group am-form-group  am-input-group-primary am-g bot">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">会员编号</span> 
-				</div>
-				<div class="am-u-sm-8">	
-					<input autocomplete="off"    name="arrivalWay" onchange="getVipData('vipNo')" id="vipNo" type="text" class="am-form-field " placeholder="会员编号"  ignore="ignore"
-					datatype="*1-20" nullmsg="请填写会员编号" errormsg="长度为1-20">
-				</div>
-			</div>
-		
-			
-
-			<div class="Validform_checktip"></div>
-			<div class="am-form-group am-form-select am-input-group am-input-group-primary am-g ">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">业务类型</span> 
-				</div>
-				<div class="am-u-sm-8">
-					<select class=" " name="businessType"   multiple="multiple">
-						<!-- <option value="">-- 请选择业务类型 --</option> -->
-							<option th:each="item:${ywlx}" th:value="${item.name}" th:text="${item.name}"></option>
-					</select>
-				</div>
-			</div>
-			<div class="Validform_checktip"></div>
-			
-
-			
-			
-			<div class="am-form-group  am-input-group am-input-group-primary am-g ">
-				<div class="am-u-sm-4">	
-					<span class="am-input-group-label">所属门店</span> 
-				</div>
-				<div class="am-u-sm-8">
-					<input autocomplete="off"   type="text" class="am-form-field" readonly="readonly" th:value="${shopNmae}">
-				</div>
-			</div>
-			
-			<div class="am-form-group am-form-select am-input-group  am-input-group-primary am-g bot">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">到店途径</span>
-				</div>
-				<div class="am-u-sm-8">
-					 <select class=" " name="arrivalWay" datatype="*" nullmsg="请选择到店途径">
-						<!-- 动态添加 -->
-						<option value="">-- 请选择到店途径 --</option>
-							<option th:each="item:${ddtj}" th:value="${item.name}" th:text="${item.name}"></option>
-					</select>
-				</div>
-			</div>
-			<div class="Validform_checktip"></div>
-			
-			
-			
-
-			
-			<div class="am-form-group  am-input-group am-input-group-primary am-g ">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label ">健康顾问</span> 
-				</div>
-				<div class="am-u-sm-8">	
-					<input autocomplete="off"   type="text" class="am-form-field " readonly="readonly"
-						th:value="${staffName}">
-				</div>
-			</div>
-			
-			<div class="am-form-group am-form-select am-input-group am-input-group-primary am-g bot">
-				<div class="am-u-sm-4">	
-					<span class="am-input-group-label">美&nbsp;&nbsp;疗&nbsp;师</span> 
-				</div>
-				<div class="am-u-sm-8">	
-					<select class=" " name="beauticianId" datatype="*" nullmsg="请选择美疗师">
-						<option value="">-- 请选择美疗师--</option>
-						<option th:each="item:${mls}" th:value="${item.suId}" th:text="${item.suName}"></option>
-					</select>
-				</div>
-			</div>
-			<div class="Validform_checktip"></div>
-			
-			<div class="am-form-group  am-input-group am-input-group-primary am-g ">
-				<div class="am-u-sm-4">	
-					<span class="am-input-group-label ">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</span>
-				</div>
-				<div class="am-u-sm-8">	
-					<textarea name="remark"  class="border " clos="100" rows="3" warp="virtual"></textarea>
-				</div>
-			</div>
-			<div class="inputBtn">
-				<input autocomplete="off"   type="button" onclick="myForm.submit()"
-					class="am-btn btn-m1 am-radius am-btn-block" value="提交"></input>
-			</div>
-			<!-- 测试 -->
-
-		</form>
-	</div>
-
-  
-	<!-- 客户到访表单结束 -->
-
- 
-	<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-	<script th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<!-- index js -->
-	<script type="text/javascript">
-		
-		//自动填充
-		function getVipData(key){
-			 if($("input[name='isOld']:checked").val() == "老客"){
-				if(key=="phone"){
-					$("#vipName").val("");
-					$("#vipNo").val("");
-					//$("input[name=isOld]").removeAttr("checked");
-					queryInfo($("#custTel").val(),"","");
-				}else if(key == "vipName"){
-					$("#custTel").val("");
-					$("#vipNo").val("");
-					//$("input[name=isOld]").removeAttr("checked");
-					queryInfo("",$("#vipName").val(),"");
-				}else if(key == "vipNo"){
-					$("#custTel").val("");
-					$("#vipName").val("");
-					//$("input[name=isOld]").removeAttr("checked");
-					queryInfo("","",$("#vipNo").val());
-				}
-			}
-		}
-		
-		
-		
-		function queryInfo(phone,vipName,vipNo){
-			$.AjaxProxy({gs_parameter:{phone:phone,vipName:vipName,vipNo:vipNo}}).invoke(
-					 basePath+"/admin/vipInfo/findUserPho" , function(loj){
-						if(loj.getRowCount()>0){
-							$("#custTel").val(loj.getString(0,"phone"));
-							$("#vipName").val(loj.getString(0,"vipName"));
-							$("#vipNo").val(loj.getString(0,"vipNo"));
-							//$("input[name=isOld]").get(1).checked=true; 
-						}
-			});
-		    return false;
-		}
-		
-		
-		
-		
-		 var myForm = MForm.initForm({
-			invokeUrl :  basePath+"/admin/vipInfo/visitorInfo",
-			afterSubmit : function(loj) {
-				layer.open({
-					shade:false,
-					content : '操作成功',
-					className : 'showBox',
-					time : 1,
-					end: function(elem){
-						 MTools.redirect( basePath+"/admin/redirect/hive/mobile/CRM?foot=3");
-					} 
-				});
-			} 
-		}); 
-		 $(document).ready(function(){
-
-			 $("input[name=isOld]").get(0).checked=true; 
-		 });
-	
-	</script>
-</body>  
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM.html
deleted file mode 100644
index cacf522..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM.html
+++ /dev/null
@@ -1,226 +0,0 @@
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-<meta http-equiv="Cache-Control" content="no-transform" />
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-<!-- Add to homescreen for Chrome on Android -->
-<meta name="mobile-web-app-capable" content="yes">
-
-
-<!-- Add to homescreen for Safari on iOS -->
-<meta name="apple-mobile-web-app-capable" content="yes">
-<meta name="apple-mobile-web-app-status-bar-style" content="black">
-<meta name="apple-mobile-web-app-title" content="Amaze UI" />
-
-
-
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingOrder.css}">
-
-</head>
-<body>
-	<!-- 商机管理页面-->
-	<div class="wrap">
-		<!-- 图片栏开始 -->
-		<div data-am-widget="slider" class="am-slider am-slider-c2"
-			data-am-slider='{&quot;directionNav&quot;:false}'>
-			<ul class="am-slides" >
-				<li><img th:src="@{/images/dingImg/banner-img5.jpg}">
-					<div class="am-slider-desc" th:text="${session.userInfo.shopName }"></div></li>
-			</ul>
-		</div>
-		<!-- 图片结束 -->
-		<!-- 表格部分开始 -->
-		<ul class="am-avg-sm-4 boxes" id="boxs">
-
-			<li class="box box-1"><a th:href="@{/admin/vipInfo/toVisitInfo}">
-					<img th:src="@{/images/dingImg/dfdj2.png}"></img><br>
-					<small class="boxs">到访登记</small>
-			</a></li>
-
-
-			<li class="box box-1"><a th:href="@{/admin/redirect/hive/mobile/CRM-visit-list}">
-					<img th:src="@{/images/dingImg/khcx.png}"></img><br>
-					<small class="boxs">到访记录</small>
-			</a></li>
-
-
-			<li class="box box-2"><a th:href="@{/admin/vipInfo/toRegister}">
-					<img th:src="@{/images/dingImg/hyzc.png}"></img><br>
-					<small class="boxs">会员注册</small>
-			</a></li>
-
-
-			<li class="box box-3"><a
-				th:href="@{/admin/redirect/hive/mobile/CRM-account-my}"> <img
-					th:src="@{/images/dingImg/wdkh.png}"></img><br> <small
-					class="boxs">我的客户</small>
-			</a></li>
-
-			<li class="box box-3"><a
-				th:href="@{/admin/redirect/hive/mobile/CRM-vipInfo-search}"> <img
-					th:src="@{/images/dingImg/wdkh.png}"></img><br> <small
-					class="boxs">客户查询</small>
-			</a></li>
-
-
-		</ul>
-
-
-		<!-- foot开始 -->
-		<div class="footr" th:fragment="footr">
-    <div data-am-widget="navbar" class="am-navbar am-cf am-navbar-default "
-      id="">
-      <ul class="am-navbar-nav am-cf am-avg-sm-4">
-       	  <li >
-            <a th:href="@{/admin/redirect/hive/mobile/personal?foot=1}"class="change1" >
-                <img th:src="@{\images\dingImg\grzx2.png}" alt="个人中心"/>
-                <span class="am-navbar-label ">个人中心</span>
-            </a>
-          </li>
-
-           <li >
-            <a th:href="@{/admin/redirect/hive/mobile/CRM?foot=3}"  class="change3">
-                <img th:src="@{\images\dingImg\crm1.png}" alt="订单管理"/>
-                <span class="am-navbar-label">CRM</span>
-            </a>
-          </li>
-          <li >
-            <a th:href="@{/admin/redirect/hive/mobile/order?foot=4}"  class="change4">
-                <img th:src="@{\images\dingImg\ddgl1.png}" alt="商机管理"/>
-                <span class="am-navbar-label">订单管理</span>
-            </a>
-          </li>
-
-      </ul>
-    </div>
-  </div>
-
-
-		<!-- foot结束 -->
-	</div>
-
-	<script type="text/x-handlebars-template" id="amz-tpl">
-  {{>header header}}
-
-  {{>menu menu}}
-
-  {{>slider slider}}
-
-  {{>list_news list1}}
-
-  {{>gallery gallery}}
-
-  {{>list_news list2}}
-
-  {{>footer footer}}
-
-  {{>navbar navbar}}
-</script>
-	<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-	<script
-		th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<!-- index js -->
-	<script type="text/javascript">
-		$(function() {
-			$("#vipLevel").bind("click", function() {
-				if ($("#hidval").val() == 1) {
-					$(".down").css("transform", "rotate(0deg)");
-					$(".vipMsg").slideUp(500, function() {
-						$("#hidval").val(0);
-
-					})
-				} else {
-					$(".down").css("transform", "rotate(180deg)");
-					$(".vipMsg").slideDown(500, function() {
-						$("#hidval").val(1);
-					})
-				}
-			})
-		});
-		$(function(){
-			var count=$("#boxs").find("li").length;			
-			var index=count%4;
-			if(index==1){
-				$("#boxs").append(" <li class='box'>"+"</li>");
-				$("#boxs").append(" <li class='box'>"+"</li>");
-				$("#boxs").append(" <li class='box'>"+"</li>");
-			}
-			if(index==2){
-				$("#boxs").append(" <li class='box'>"+"</li>");
-				$("#boxs").append(" <li class='box'>"+"</li>");
-			}
-			if(index==3){
-				$("#boxs").append(" <li class='box'>"+"</li>");				
-			}
-		})
-
-
-
-		$(function(){
-			var id=$.query.get('foot');
-
-
-
-
-			$(".change"+id).children("span").css('color','#dfbd88');
-			switch(id){
-				case 1:
-
-					$(".change"+id).children("img").attr('src',basePath+'/images/dingImg/grzx.png');
-
-					break;
-
-				case 2:
-
-					$(".change"+id).children("img").attr('src',basePath+'/images/dingImg/customer3.png');
-
-					break;
-				case 3:
-
-					$(".change"+id).children("img").attr('src',basePath+'/images/dingImg/crm.png');
-
-					break;
-
-				case 4:
-
-					$(".change"+id).children("img").attr('src',basePath+'/images/dingImg/ddgl.png');
-
-					break;
-				default:
-					$(".change1").children("span").css('color','#dfbd88');
-					$(".change1").children("img").attr('src',basePath+'/images/dingImg/grzx.png');
-
-			}
-
-
-
-		});
-		
-	</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/_foot.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/_foot.html
deleted file mode 100644
index 4c097f7..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/_foot.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<!-- foot开始 -->
-
-
-
-  <script type="text/javascript">
-<!--
-
-//-->
-  // 控制footer部分变色
-
-
-
-</script>
-
-
-
-
-  <!-- foot结束 -->
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/_pageNav.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/_pageNav.html
deleted file mode 100644
index 39fe65e..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/_pageNav.html
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-<%
-	String path = request.getContextPath();
-	String basePath = request.getScheme() + "://"
-			+ request.getServerName() + ":" + request.getServerPort()
-			+ path + "/";
-%>
-
-		<div class="pageNav" >
-				<b>共<span  class='text-primary'>${pageVo.pageCount}</span>页 当前 <span class='text-primary'>${pageVo.pageNow}</span>页</b>
-				<%--上一页 --%>
-				<c:choose>
-					<c:when test="${pageVo.pageNow eq 1 }">
-							<a class="pageNum">&lt;上一页</a>
-					</c:when>
-					<c:otherwise>
-							<a onclick="changePage(${pageVo.pageNow-1 })"  href="javascript:void(0)" class="pageNum">&lt;上一页</a>
-					</c:otherwise>
-				</c:choose>
-				<c:choose>
-					<c:when test="${pageVo.pageCount <= 6 }">
-						<c:set var="begin" value="1" />
-						<c:set var="end" th:value="${pageVo.pageCount }" />
-					</c:when>
-					<c:otherwise>
-						<c:set var="begin" th:value="${pageVo.pageNow-2 }" />
-						<c:set var="end" th:value="${pageVo.pageNow + 3}" />
-						<c:if test="${begin < 1 }">
-							<c:set var="begin" value="1" />
-							<c:set var="end" value="6" />
-
-						<c:if test="${end > pageVo.pageCount }">
-							<c:set var="begin" th:value="${pageVo.pageCount-5 }" />
-							<c:set var="end" th:value="${pageVo.pageCount }" />
-
-					</c:otherwise>
-				</c:choose>
-
-				<c:if test="${pageVo.pageNow >3 }">
-					<a class="pageNum" onclick="changePage(1)"   href="javascript:void(0)" >首页</a> 
-
-
-
-				<c:forEach begin="${begin }" end="${end }" var="i">
-					<c:choose>
-						<c:when test="${i eq pageVo.pageNow }">
-							<b>${i }</b><!-- 当前页 -->
-						</c:when>
-						<c:otherwise>
-						<a class="pageNum" onclick="changePage(${i })"   href="javascript:void(0)">${i }</a>
-						</c:otherwise>
-					</c:choose>
-				</c:forEach>
-				<c:if test="${end < pageVo.pageCount }">
-				<a class="pageNum"  onclick="changePage(${pageVo.pageCount })"   href="javascript:void(0)" >尾页</a> 
-
-				<%--下一页 --%>
-				<c:choose>
-					<c:when test="${pageVo.pageNow eq pageVo.pageCount }">
-							<a class="pageNum">下san页&gt;</a>
-					</c:when>
-					<c:otherwise>
-						<a class="pageNum"  onclick="changePage(${pageVo.pageNow+1 })"  href="javascript:void(0)">下san页&gt;</a>
-					</c:otherwise>
-				</c:choose>
-</div>	
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/cwqk-list.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/cwqk-list.html
deleted file mode 100644
index 34485d0..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/cwqk-list.html
+++ /dev/null
@@ -1,227 +0,0 @@
-
-
-
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-<!-- Add to homescreen for Chrome on Android -->
-<meta name="mobile-web-app-capable" content="yes">
-
-
-<!-- Add to homescreen for Safari on iOS -->
-<meta name="apple-mobile-web-app-capable" content="yes">
-<meta name="apple-mobile-web-app-status-bar-style" content="black">
-<meta name="apple-mobile-web-app-title" content="Amaze UI" />
-
-
-<!-- Tile icon for Win8 (144x144 + tile color) -->
-
-<meta name="msapplication-TileColor" content="#0e90d2">
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingPersonalAchieveReport.css}">
-<style>
-	.table-box{
-		width:initial;
-		overflow-y: scroll;
-    	overflow-x: inherit;
-	}
-	.warptable{
-		width:initial;
-		overflow-y: scroll;
-    	overflow-x: inherit;
-	}
-</style>
-</head>
-<body>
-	<!-- 头部开始 -->
-	<header data-am-widget="header"
-		class="am-header color-w back-m1 am-header-fixed">
-		<div class="am-header-left am-header-nav">
-			<a th:href="@{/admin/redirect/hive/mobile/personal?foot=1}" class=""> <i
-				class="am-header-icon am-icon-chevron-left"></i>
-			</a>
-		</div>
-		<h1 class="am-header-title">
-			<a href="#title-link" class=""> 床位占用</a>
-		</h1>
-		<div class="am-header-right am-header-nav">
-			<div class="am-dropdown" data-am-dropdown>
-				<button class="am-btn  am-dropdown-toggle am-btn-secondary"
-					data-am-dropdown-toggle>
-
-					<i class="am-header-icon am-icon-bars"></i>
-				</button>
-				<ul class="am-dropdown-content">
-					<li class="am-active"><a
-						th:href="@{/admin/occupancy/showCwzyList}">床位占用</a></li>
-					<li><a th:href="@{/admin/occupancy/editMlsForm}">美疗师占用</a></li>
-				</ul>
-
-			</div>
-		</div>
-	</header>
-	<!-- 头部结束 -->
-
-	<div class="report ">
-		<div class="am-g">
-			<a href="##" class="am-u-sm-2 center" onclick="last()"><i
-				class="am-icon-arrow-circle-left am-icon-fw"></i></a> <input autocomplete="off"   type="date"
-				class="choice-time am-u-sm-8 " id="date" th:value="${timeStr}">
-			<a class="am-u-sm-2 center" onclick="next()"><i
-				class="am-icon-arrow-circle-right am-icon-fw"></i></a>
-		</div>
-	</div>
-	<div class="table-box">
-
-			<table th:if="${mlsList eq null && timePark eq null}" class="box-table">
-				<thead style="display: table-footer-group;">
-					<tr class="am-primary">
-						<th align="center">门店暂无排班情况</th>
-					</tr>
-				</thead>
-			</table>
-
-
-
-		<div class="warptable">
-			<table class="box-table "  id="mgridThead">
-				<thead style="display: table-footer-group;">
-					<tr class="am-primary">
-						<th>时&nbsp;&nbsp;&nbsp;间</th>
-							<th th:each="item:${bedList }"  ><span th:text="${item.bedName }"></span></th>
-					</tr>
-				</thead>
-				<tbody>
-
-					<tr th:each="item,counter:${timePark }" >
-						<td th:text="${#dates.format(item,'HH:mm')}"
-						</td  >
-							<td th:each="td,counter:${chart[counter.index] }"  th:class="${td.css }+ ' msg'" th:msg="${td.msg}">
-								<span th:if="${  td.msg ne null }" th:class="${td.css }+ ' msg'" th:msg="${td.msg}"></span>
-								<span th:if="${  td.msg eq null}" th:class="${td.css }  "  ></span>
-							</td>
-					</tr>
-
-				</tbody>
-			</table>
-		</div>
-
-	</div>
-	<div>
-		<div class="exp-warp">
-			<div class="exp-box box_success"></div>
-			<div class="exp-title">可预约</div>
-		</div>
-		<div class="exp-warp">
-			<div class="exp-box box_warning"></div>
-			<div class="exp-title">已预约</div>
-		</div>
-		<div class="exp-warp">
-			<div class="exp-box box_primary"></div>
-			<div class="exp-title">服务中</div>
-		</div>
-		<div class="exp-warp">
-			<div class="exp-box box_danger"></div>
-			<div class="exp-title">服务结束</div>
-		</div>
-	</div>
-	<script type="text/javascript">
-		$(function() {
-			/*修改表格宽度*/
-			var o = document.getElementById("mgridThead");
-			/*scrollWidth取得真实宽度,不包括滚动条,但是可以取得被隐藏的宽度*/
-			var h = o.scrollWidth; 
-			console.log(h);
-			console.log('aaa')
-			$(".warptable").css('width',h);
-			/*事件*/
-			$(".msg").mouseenter(function(event) {
-				var adNode = $("#ad");
-				adNode.html($(this).attr("msg"));
-				adNode.css("left", event.pageX + 10 + "px");
-				adNode.css("top", event.pageY + 10 + "px");
-				adNode.show();
-			});
-			$(".msg").mouseleave(function(event) {
-				$("#ad").hide();
-			});
-		})
-
-		function next() {
-			var myDate = new Date();
-			var ndate = $("#date").val();
-			console.log(ndate);
-			var newms = Date.parse(ndate);
-			var msdate = newms + (60 * 60 * 24 * 1000);
-
-			myDate.setTime(msdate);
-
-			var mon = myDate.getMonth() + 1;
-			var da = myDate.getDate();
-			if (myDate.getMonth() + 1 < 10) {
-				mon = "0" + (myDate.getMonth() + 1);
-			}
-			if (myDate.getDate() < 10) {
-				da = "0" + myDate.getDate();
-			}
-			var date2 = myDate.getFullYear() + "-" + mon + "-" + da;
-			$("#date").val(date2);
-			var time = $("#date").val();
-			if (time != '') {
-				MTools
-						.redirect( basePath+"/admin/occupancy/showCwzyList?timeStr="
-								+ time);
-			}
-		}
-		function last() {
-			var myDate = new Date();
-			var ndate = $("#date").val();
-			var newms = Date.parse(ndate);
-			var msdate = newms - (60 * 60 * 24 * 1000);
-			myDate.setTime(msdate);
-			var mon = myDate.getMonth() + 1;
-			var da = myDate.getDate();
-			if (myDate.getMonth() + 1 < 10) {
-				mon = "0" + (myDate.getMonth() + 1);
-			}
-			if (myDate.getDate() < 10) {
-				da = "0" + myDate.getDate();
-			}
-			var date2 = myDate.getFullYear() + "-" + mon + "-" + da;
-			$("#date").val(date2);
-			var time = $("#date").val();
-			if (time != '') {
-				MTools
-						.redirect( basePath+"/admin/occupancy/showCwzyList?timeStr="
-								+ time);
-			}
-		}
-	</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/mls-list.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/mls-list.html
deleted file mode 100644
index 958e025..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/mls-list.html
+++ /dev/null
@@ -1,248 +0,0 @@
-
-
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-<!-- Add to homescreen for Chrome on Android -->
-<meta name="mobile-web-app-capable" content="yes">
-
-
-<!-- Add to homescreen for Safari on iOS -->
-<meta name="apple-mobile-web-app-capable" content="yes">
-<meta name="apple-mobile-web-app-status-bar-style" content="black">
-<meta name="apple-mobile-web-app-title" content="Amaze UI" />
-
-
-<!-- Tile icon for Win8 (144x144 + tile color) -->
-
-<meta name="msapplication-TileColor" content="#0e90d2">
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingPersonalAchieveReport.css}">
-<link rel="stylesheet" type="text/css"
-	href= basePath+"/css/common-style.css">
-<style>
-	.table-box{
-		width:initial;
-		overflow-y: scroll;
-    	overflow-x: inherit;
-	}
-	.warptable{
-		width:initial;
-		overflow-y: scroll;
-    	overflow-x: inherit;
-	}
-</style>
-</head>
-<body>
-	<!-- 个人业绩 -->
-	<!-- 头部开始 -->
-
-	<header data-am-widget="header"
-		class="am-header color-w back-m1 am-header-fixed">
-		<div class="am-header-left am-header-nav">
-			<a th:href="@{/admin/redirect/hive/mobile/personal?foot=1}" class=""> <i
-				class="am-header-icon am-icon-chevron-left"></i>
-			</a>
-		</div>
-		<h1 class="am-header-title">
-			<a href="#title-link" class=""> 美疗师占用</a>
-		</h1>
-		<div class="am-header-right am-header-nav">
-			<div class="am-dropdown" data-am-dropdown>
-				<button class="am-btn  am-dropdown-toggle am-btn-secondary"
-					data-am-dropdown-toggle>
-
-					<i class="am-header-icon am-icon-bars"></i>
-				</button>
-				<ul class="am-dropdown-content">
-					<li><a th:href="@{/admin/occupancy/showCwzyList}">床位占用</a></li>
-					<li class="am-active"><a
-						th:href="@{/admin/occupancy/editMlsForm}">美疗师占用</a></li>
-				</ul>
-
-			</div>
-		</div>
-	</header>
-	<!-- 头部结束 -->
-	<div class="report ">
-		<div class="am-g">
-			<a href="##" class="am-u-sm-2 center" onclick="last()"><i
-				class="am-icon-arrow-circle-left am-icon-fw"></i></a> <input autocomplete="off"   type="date"
-				class="choice-time am-u-sm-8 " id="date" th:value="${timeStr}">
-			<a class="am-u-sm-2 center" onclick="next()"><i
-				class="am-icon-arrow-circle-right am-icon-fw"></i></a>
-		</div>
-	</div>
-	
-	<div class="table-box">
-			<table th:if="${mlsList eq null && timePark eq null}" class="box-table">
-				<thead style="display: table-footer-group;">
-					<tr class="am-primary">
-						<th align="center">门店暂无排班情况</th>
-					</tr>
-				</thead>
-			</table>
-
-
-		<table th:if="${mlsList ne null && timePark ne null}" class="box-table" id="mgridThead">
-			<thead>
-				<tr class="am-primary">
-					<th>时&nbsp;&nbsp;&nbsp;间</th>
-						<th th:each="item:${mlsList }" >
-							<span th:text="${item.staffName }"></span>
-						</th>
-				</tr>
-			</thead>
-		</table>
-		<div class="warptable">
-			<table class="box-table">
-				<thead style="display: table-footer-group;">
-					<tr class="am-primary">
-						<th>时&nbsp;&nbsp;&nbsp;间</th>
-						<th th:each="item:${mlsList }" >
-							<span th:text="${item.staffName }"></span>
-						</th>
-					</tr>
-				</thead>
-				<tbody>
-
-						<tr th:each="item,counter:${timePark }" >
-							<td th:text="${#dates.format(item, 'HH:mm')}" >
-							</td>
-							<th:block th:each="td:${chart[counter.index] }">
-									<td th:if="${td.msg ne null }" th:class="${td.css } msg" th:msg="${td.msg}"></td>
-									<td th:if="${td.msg eq null}" th:class="${td.css }"></td>
-							</th:block>
-						</tr>
-
-				</tbody>
-			</table>
-		</div>
-
-	</div>
-	<div>
-		<div class="exp-warp">
-			<div class="exp-box box_success"></div>
-			<div class="exp-title">可预约</div>
-		</div>
-		<div class="exp-warp">
-			<div class="exp-box box_warning"></div>
-			<div class="exp-title">已预约</div>
-		</div>
-		<div class="exp-warp">
-			<div class="exp-box box_primary"></div>
-			<div class="exp-title">服务中</div>
-		</div>
-		<div class="exp-warp">
-			<div class="exp-box box_danger"></div>
-			<div class="exp-title">服务结束</div>
-		</div>
-		<div class="exp-warp">
-			<div class="exp-box box_no"></div>
-			<div class="exp-title">未上班</div>
-		</div>
-
-	</div>
-
-
-	<div id="ad" class="adbox" style="display: none"></div>
-
-
-	<script type="text/javascript">
-		$(function() {
-			/*修改表格宽度*/
-			var o = document.getElementById("mgridThead");
-			/*scrollWidth取得真实宽度,不包括滚动条,但是可以取得被隐藏的宽度*/
-			var h = o.scrollWidth;
-			console.log(h);
-			console.log('aaa')
-			$(".warptable").css('width',h);
-			/*事件*/
-			$(".msg").mouseenter(function(event) {
-				var adNode = $("#ad");
-				adNode.html($(this).attr("msg"));
-				adNode.css("left", event.pageX + 10 + "px");
-				adNode.css("top", event.pageY + 10 + "px");
-				adNode.show();
-			});
-			$(".msg").mouseleave(function(event) {
-				$("#ad").hide();
-			});
-		});
-
-		function next() {
-			var myDate = new Date();
-			var ndate = $("#date").val();
-			console.log(ndate);
-			var newms = Date.parse(ndate);
-			var msdate = newms + (60 * 60 * 24 * 1000);
-
-			myDate.setTime(msdate);
-
-			var mon = myDate.getMonth() + 1;
-			var da = myDate.getDate();
-			if (myDate.getMonth() + 1 < 10) {
-				mon = "0" + (myDate.getMonth() + 1);
-			}
-			if (myDate.getDate() < 10) {
-				da = "0" + myDate.getDate();
-			}
-			var date2 = myDate.getFullYear() + "-" + mon + "-" + da;
-			$("#date").val(date2);
-			var time = $("#date").val();
-			if (time != '') {
-				MTools.redirect( basePath+"/admin/occupancy/editMlsForm?timeStr="
-						+ time);
-			}
-		}
-		function last() {
-			var myDate = new Date();
-			var ndate = $("#date").val();
-			var newms = Date.parse(ndate);
-			var msdate = newms - (60 * 60 * 24 * 1000);
-			myDate.setTime(msdate);
-			var mon = myDate.getMonth() + 1;
-			var da = myDate.getDate();
-			if (myDate.getMonth() + 1 < 10) {
-				mon = "0" + (myDate.getMonth() + 1);
-			}
-			if (myDate.getDate() < 10) {
-				da = "0" + myDate.getDate();
-			}
-			var date2 = myDate.getFullYear() + "-" + mon + "-" + da;
-			$("#date").val(date2);
-			var time = $("#date").val();
-			if (time != '') {
-				MTools.redirect( basePath+"/admin/occupancy/editMlsForm?timeStr="
-						+ time);
-			}
-		}
-	</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/mobileLogin.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/mobileLogin.html
deleted file mode 100644
index 7fbcdfa..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/mobileLogin.html
+++ /dev/null
@@ -1,142 +0,0 @@
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<html class="no-js">
-<head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/>
-    <title>HIVE</title>
-
-    <!-- Set render engine for 360 browser -->
-    <meta name="renderer" content="webkit">
-
-    <!-- No Baidu Siteapp-->
-    <meta http-equiv="Cache-Control" content="no-siteapp"/>
-    <script type="text/javascript"
-            th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-    <script type="text/javascript"
-            th:src="@{/js/systools/DDMBase.js}"></script>
-    <link rel="stylesheet"
-          th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-    <link rel="stylesheet"
-          th:href="@{/plugin/amazingUI/css/app.css}">
-
-    <link rel="stylesheet" type="text/css"
-          th:href="@{/css/dingLogin.css}">
-
-</head>
-<body onkeypress="dologin(event)">
-<!-- 登陆页面-->
-<div class="wrap">
-    <img th:src="@{/images/dingIcon.png}" class="login-img"></img>
-    <div class="am-g">
-        <div class="main am-u-sm-9 am-u-sm-centered">
-            <form class="am-form am-form-horizontal dataForm ">
-                <div class=" am-g">
-                    <input autocomplete="off"   id="account" name="account"
-                           type="text" class="back-hui am-form-field id-in" placeholder="账号">
-                </div>
-
-                <div class=" am-g">
-                    <input autocomplete="off"   id="password" name="password"
-                           type="password" class="back-hui am-form-field psw-in"
-                           placeholder="密码">
-                </div>
-
-                <div class=" am-g">
-                    <input autocomplete="off"   id="reId" type="checkbox" checked="" name="">
-                    记住密码
-                </div>
-
-
-                <!--登陆按钮-->
-                <div class="am-form-group am-g">
-
-                    <button type="button" onclick="login()"
-                            class="am-btn am-btn-default am-u-sm-12 back-hui">登&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp入
-                    </button>
-
-                </div>
-                <input autocomplete="off"   type="hidden" name="isDing" value="1"/>
-            </form>
-        </div>
-    </div>
-</div>
-<script
-        th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-<script th:src="@{/plugin/amazingUI/js/amazeui.min.js}"></script>
-
-<script th:src="@{/js/function/MCookies.js}"></script>
-<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-<script type="text/javascript" th:src="@{/js/plugin/jsencrypt.min.js}"></script>
-
-
-<!-- index js -->
-<script type="text/javascript" th:inline="javascript">
-
-    var crypt = new JSEncrypt();
-
-    /*<![CDATA[*/
-
-    var publicKey =/*[[${session.publicKey}]]*/
-
-        /*]]>*/
-
-        crypt.setKey(publicKey);
-
-
-    //登陆
-
-    function login() {
-        if ($("#account").val() == "") {
-            layer
-                .open({
-                    content: '请输入账号!',
-                    className: 'showBox',
-                    time: 2
-                });
-            return false;
-        } else if ($("#password").val() == "") {
-            layer
-                .open({
-                    content: '请输入密码!',
-                    className: 'showBox',
-                    time: 2
-                });
-            return false;
-        }
-
-
-        var encAcc = crypt.encrypt($("#account").val());
-        var encPwd = crypt.encrypt($("#password").val());
-        $.AjaxProxy({
-            p: {
-                suAccount: encAcc,
-                suPassword: encPwd
-            }
-        }).invoke("/common/doHiveMobilelogin", function (loj) {
-			if ($('#reId').is(':checked'))  {
-				// do something
-				MCookies.add("account",$("#account").val());
-				MCookies.add("password",$("#password").val());
-			}else{
-				MCookies.del("account");
-				MCookies.del("password");
-			}
-            MTools.redirect("/" + loj.getValue("page"));
-        });
-
-    }
-
-
-    $(function () {
-        if (MCookies.isExist("account")) {
-            $("#reId").attr("checked", 'true');
-            $("#account").val(MCookies.get("account"));
-            $("#password").val(MCookies.get("password"));
-        }
-    })
-</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-car.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-car.html
deleted file mode 100644
index 6e2ddd7..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-car.html
+++ /dev/null
@@ -1,308 +0,0 @@
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-    <meta
-            content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-            name="viewport"/>
-    <title th:text="${session.userInfo.shopName }"></title>
-
-    <!-- Set render engine for 360 browser -->
-    <meta name="renderer" content="webkit">
-
-    <!-- No Baidu Siteapp-->
-    <meta http-equiv="Cache-Control" content="no-siteapp"/>
-
-
-    <!-- Add to homescreen for Chrome on Android -->
-    <meta name="mobile-web-app-capable" content="yes">
-
-
-    <!-- Add to homescreen for Safari on iOS -->
-    <meta name="apple-mobile-web-app-capable" content="yes">
-    <meta name="apple-mobile-web-app-status-bar-style" content="black">
-    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
-
-
-    <meta name="msapplication-TileColor" content="#0e90d2">
-    <script type="text/javascript"
-            th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-    <script type="text/javascript"
-            th:src="@{/js/systools/DDMBase.js}"></script>
-    <link rel="stylesheet"
-          th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-    <link rel="stylesheet"
-          th:href="@{/plugin/amazingUI/css/app.css}">
-    <link rel="stylesheet" type="text/css"
-          th:href="@{/css/dingPersonalCar.css}" >
-
-</head>
-<style>
-    .foot-c {
-        background: #999
-    }
-
-    .am-navbar .am-navbar-nav {
-        padding-left: 0;
-    }
-
-    .am-header-right a {
-        color: #fff;
-    }
-</style>
-<script th:if="${session.CURRENT_CUSTOMER eq null}">
-
-    MTools.redirect(basePath + "/admin/redirect/hive/mobile/order-search");
-
-</script>
-<body>
-<!-- 购物车页面 -->
-<!-- 头部开始 -->
-<header data-am-widget="header" class="am-header color-w back-m1">
-    <div class="am-header-left am-header-nav">
-        <a th:href="@{/admin/redirect/hive/mobile/order?foot=4}" class=""> <i
-                class="am-header-icon am-icon-chevron-left"></i>
-        </a>
-    </div>
-
-    <h1 class="am-header-title">
-        <a href="#title-link" class=""> 我的购物车 </a>
-    </h1>
-
-    <div class="am-header-right am-header-nav">
-        <a id="clearCar"> 清空 </a>
-    </div>
-</header>
-<!-- 头部结束 -->
-
-
-<!-- 购物车表单开始 -->
-<div class="main main1" id="carItemsBox">
-    <div class="empty-car" th:if="${session.SHOPPING_CAR} eq null or ${#lists.size(session.SHOPPING_CAR)} eq 0">
-        <p id="empty-car">购物车空空的~</p>
-        <p>
-            <a th:href="@{/admin/redirect/hive/mobile/order-list}"> 马上去选购! </a>
-        </p>
-    </div>
-    <form th:if="${session.SHOPPING_CAR} ne null and ${#lists.size(session.SHOPPING_CAR)} ne 0" class="am-form am-form-horizontal" action=""
-          id="dataform"
-          onsubmit="javascripr:return false;">
-        <!-- <input    class="am-form-field am-input-sm" type="text" placeholder="">
-              <br/> -->
-        <div data-am-widget="list_news"
-             class="am-list-news am-list-news-default">
-
-            <div class="am-list-news-bd">
-                <ul class="am-list">
-                    <!--缩略图在标题右边-->
-                    <!-- 如果是商品 -->
-                    <li th:each="item,flag:${session.SHOPPING_CAR}"
-                        class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-right">
-                        <div class=" am-u-sm-2 am-list-thumb am-checkbox">
-                            <label class="am-checkbox">
-                                <input    type="checkbox" onclick="caculateMoney()" th:isF="${item.isFree}"
-                                       th:name="'carItems['+${flag.index}+'].id'"
-                                       th:value="${item.id}" class="check" data-am-ucheck>
-
-                            </label>
-                            <!-- 增加隐藏域名 -->
-
-
-                            <input    type="hidden" th:name="'carItems['+${flag.index}+'].type'"  th:value="${item.type}">
-                            <input    type="hidden" th:name="'carItems['+${flag.index}+'].isFree'"
-                                   th:value="${item.isFree }">
-                            <input    type="hidden" th:name="'carItems['+${flag.index}+'].goodsId'"
-                                   th:value="${item.goodsId}">
-                        </div>
-
-                        <div class=" am-u-sm-10 am-list-main am-list-item-thumb-left">
-
-                            <h3 class="am-list-item-hd">
-                                <span th:text="${item.shoppingGoods.name }"> </span>
-                                <br/>
-                                <span>价格<strong class="color-r" th:text="${item.shoppingGoods.sealPice }"></strong></span>
-                                <span th:if="${item.isFree eq '是'}">【赠】 </span>
-                            </h3>
-                            <div class="am-list-item-text">
-                                <div class="am-input-group   am-input-group-primary">
-                                    <a class="am-input-group-label reduce">
-                                        <i class="am-header-icon am-icon-minus"></i>
-                                    </a>
-                                    <input  th:name="'carItems['+${flag.index}+'].count'" type="tel"
-                                           id="num" class="am-form-field " th:value="${item.count }"/>
-                                    <a class="am-input-group-label add">
-                                        <i class="am-header-icon am-icon-plus"></i>
-                                    </a>
-                                </div>
-                            </div>
-
-                        </div>
-                    </li>
-
-                    <li  class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-right">
-                        <div class=" am-u-sm-2 am-list-thumb am-checkbox">
-                            <label class="am-checkbox">
-                                <input   type="checkbox" onclick="sellectAll(this)"  class="check" data-am-ucheck>
-                            </label>
-                        </div>
-                        <div class=" am-u-sm-10 am-list-main am-list-item-thumb-left">
-                            <h3 class="am-list-item-hd">  <span>全选</span><br/>  </h3>
-                        </div>
-                    </li>
-                </ul>
-            </div>
-            <div>
-
-
-
-            </div>
-
-
-            <div class="ps">
-						<textarea name="remark" class=" border " clos="100"
-                                  rows="2" warp="virtual" placeholder="备注信息"></textarea>
-            </div>
-
-
-            <div data-am-widget="navbar" class="am-navbar am-cf am-navbar-default back-m1" id="">
-                <ul class="am-navbar-nav am-cf am-avg-sm-3 back-m1">
-                    <li class="foot-c">
-                        <a href="" class="">
-                            <span class="">共<span id="goodsNum">0</span>件商品</span>
-                        </a>
-                    </li>
-                    <li class="foot-c ">
-                        <a href="###" class="">
-
-                            <span class="">合计:&yen;<strong id="orderTotalMoney">0</strong></span>
-
-                        </a>
-                    </li>
-                    <li class="back-m1">
-                        <a href="###" onclick="myForm.submit()">
-                            <span class="">下单</span>
-
-                        </a>
-                    </li>
-
-                </ul>
-            </div>
-
-
-        </div>
-
-    </form>
-
-
-
-
-
-</div>
-
-
-<!-- 购物车表单结束 -->
-<!-- 弹出 -->
-<div class="am-modal am-modal-confirm" tabindex="-1" id="my-confirm">
-    <div class="am-modal-dialog">
-        <div class="am-modal-hd">提示</div>
-        <div class="am-modal-bd">你确定要清空购物车吗?</div>
-        <div class="am-modal-footer">
-            <span class="am-modal-btn" data-am-modal-cancel>取消</span> <span
-                class="am-modal-btn" data-am-modal-confirm>确定</span>
-        </div>
-    </div>
-</div>
-<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-<script th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-<!-- index js -->
-<script type="text/javascript">
-    $(function () {
-        $(".select2").select2({'width': '100%'});
-        MTools.autoFullSelect();
-        //数量
-        $(".add").bind("click", function () {
-            if ($(this).prev().val() >= 0) {
-                $(this).prev().val(parseInt($(this).prev().val()) + 1);
-            }
-            caculateMoney();
-        });
-        $(".reduce").bind("click", function () {
-            if ($(this).next().val() > 1) {
-                $(this).next().val(parseInt($(this).next().val()) - 1);
-            }
-            caculateMoney();
-        });
-    });
-
-    function sellectAll(node) {
-        //
-        var checked=node.checked;
-        $(".am-ucheck-checkbox").each(function(){
-            this.checked=checked;
-        });
-        caculateMoney();
-
-    }
-    //下单
-    var myForm = MForm.initForm({
-        invokeUrl: basePath + "/admin/order/addOrder",
-        isvalid: false,
-        afterSubmit: function (loj) {
-            var msg = '';
-            if (loj.attr("result").status == '200') {
-                msg = '下单成功';
-                layer.open({
-                    shade: false,
-                    content: msg,
-                    className: 'showBox',
-                    time: 1,
-                    end: function (elem) {
-                        MTools.redirect(basePath + "/admin/redirect/hive/mobile/order?foot=4");
-                    }
-                });
-            }
-        }
-    });
-
-    /* 弹出JS */
-    $(function () {
-        $('#clearCar').on('click', function () {
-            $('#my-confirm').modal({
-                relatedTarget: this,
-                onConfirm: function (options) {
-                    //请求服务器清空session	
-                    $.AjaxProxy().invoke(
-                        basePath + "/admin/shoppingCar/clearShoppingCar",
-                        function (loj) {
-                            location.reload();
-                        })
-                },
-            });
-            //清空列表
-        });
-    });
-
-    function caculateMoney() {
-        // 找到所有被选中的元素
-        var money = 0.00;
-        var goodsNum = 0;
-        $("input:checked").each(function (i) {
-            var _this = $(this);
-            var freeFlag = _this.attr("isF");
-            if (freeFlag == '否') {
-                m = parseFloat(_this.parent().parent().next('div').find('strong').html());
-                n = parseInt(_this.parent().parent().next('div').find('#num').val());
-                money += m * n;
-                goodsNum += n;
-            }
-        });
-        console.log(money);
-        $("#orderTotalMoney").html(money);
-        $("#goodsNum").html($("input:checked").length);
-    }
-</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-history-msg.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-history-msg.html
deleted file mode 100644
index 5a66a8f..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-history-msg.html
+++ /dev/null
@@ -1,280 +0,0 @@
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-    <meta
-            content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-            name="viewport"/>
-    <title th:text="${session.userInfo.shopName }"></title>
-
-    <!-- Set render engine for 360 browser -->
-    <meta name="renderer" content="webkit">
-
-    <!-- No Baidu Siteapp-->
-    <meta http-equiv="Cache-Control" content="no-siteapp"/>
-
-
-    <!-- Add to homescreen for Chrome on Android -->
-    <meta name="mobile-web-app-capable" content="yes">
-
-
-    <!-- Add to homescreen for Safari on iOS -->
-    <meta name="apple-mobile-web-app-capable" content="yes">
-    <meta name="apple-mobile-web-app-status-bar-style" content="black">
-    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
-
-
-    <!-- Tile icon for Win8 (144x144 + tile color) -->
-
-
-    <script type="text/javascript"
-            th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-    <script type="text/javascript"
-            th:src="@{/js/systools/DDMBase.js}"></script>
-    <link rel="stylesheet"
-          th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-    <link rel="stylesheet"
-          th:href="@{/plugin/amazingUI/css/app.css}">
-    <link rel="stylesheet" type="text/css"
-          th:href="@{/css/dingUserVip.css}">
-
-</head>
-<style>
-    .msg {
-        padding-left: 0;
-    }
-</style>
-<body>
-<!-- 会员注册页面 -->
-<!-- 头部开始 -->
-
-<header data-am-widget="header"
-        class="am-header color-w back-m1 am-header-fixed">
-    <div class="am-header-left am-header-nav">
-
-        <a onclick="window.history.go(-1)" > <i
-                class="am-header-icon am-icon-chevron-left"></i>
-        </a>
-
-
-
-    </div>
-
-    <h1 class="am-header-title">
-        <a href="#title-link" class=""> 订单详情 </a>
-    </h1>
-
-</header>
-<!-- 头部结束 -->
-
-
-<!-- 会员注册表单开始 -->
-<div class=" main2">
-    <form class="am-form am-form-horizontal   " method="post"
-          id="dataform" onsubmit="javascripr:return false;">
-        <div
-                class="am-input-group am-form-group  am-input-group-primary am-g">
-            <div class="am-u-sm-4">
-                <span class="am-input-group-label color-gray">订单编号</span>
-            </div>
-            <div class="am-u-sm-8">
-                <span class="am-input-group-label " th:text="${order.orderNo }"></span>
-            </div>
-            <div class="am-u-sm-12 ">
-                <div class="line"></div>
-            </div>
-        </div>
-
-        <div
-                class="am-input-group am-form-group  am-input-group-primary am-g">
-            <div class="am-u-sm-4">
-                <span class="am-input-group-label color-gray">订单日期</span>
-            </div>
-            <div class="am-u-sm-8">
-                <span class="am-input-group-label " th:text=" ${#dates.format(order.orderTime,'yyyy-MM-dd')}"> </span>
-            </div>
-            <div class="am-u-sm-12 ">
-                <div class="line"></div>
-            </div>
-        </div>
-
-        <div
-                class="am-input-group am-form-group  am-input-group-primary am-g">
-            <div class="am-u-sm-4">
-                <span class="am-input-group-label color-gray">订单总价</span>
-            </div>
-
-            <div class="am-u-sm-8">
-                <strong class="am-input-group-label color-r" th:text="'¥'+${order.zkTotal }"></strong>
-
-            </div>
-            <div class="am-u-sm-12 ">
-                <div class="line"></div>
-            </div>
-        </div>
-        <div th:if="${order.statu ne '待付款'}">
-            <div
-                    class="am-input-group am-form-group  am-input-group-primary am-g">
-                <div class="am-u-sm-4">
-                    <span class="am-input-group-label color-gray">现金付款</span>
-                </div>
-
-                <div class="am-u-sm-8">
-                    <strong class="am-input-group-label color-r" th:text="'¥'+${order.cashPay }"></strong>
-
-                </div>
-                <div class="am-u-sm-12 ">
-                    <div class="line"></div>
-                </div>
-            </div>
-            <div
-                    class="am-input-group am-form-group  am-input-group-primary am-g">
-                <div class="am-u-sm-4">
-                    <span class="am-input-group-label color-gray">卡付款</span>
-                </div>
-
-                <div class="am-u-sm-8">
-                    <strong class="am-input-group-label color-r" th:text="'¥'+${order.cardPay }"></strong>
-
-                </div>
-                <div class="am-u-sm-12 ">
-                    <div class="line"></div>
-                </div>
-            </div>
-        </div>
-
-        <div th:if="${order.statu eq '欠款'}">
-            <div
-                    class="am-input-group am-form-group  am-input-group-primary am-g">
-                <div class="am-u-sm-4">
-                    <span class="am-input-group-label color-gray">欠款</span>
-                </div>
-
-                <div class="am-u-sm-8">
-                    <strong class="am-input-group-label color-r" th:text="'¥'+${order.arrears }"></strong>
-
-                </div>
-                <div class="am-u-sm-12 ">
-                    <div class="line"></div>
-                </div>
-            </div>
-        </div>
-        <div
-                class="am-input-group am-form-group  am-input-group-primary am-g">
-            <div class="am-u-sm-4">
-                <span class="am-input-group-label color-gray">购买人</span>
-            </div>
-
-            <div class="am-u-sm-8">
-                <span class="am-input-group-label " th:text="${order.vipName }"></span>
-
-            </div>
-            <div class="am-u-sm-12 ">
-                <div class="line"></div>
-            </div>
-        </div>
-
-        <div
-                class="am-input-group am-form-group  am-input-group-primary am-g">
-            <div class="am-u-sm-4">
-                <span class="am-input-group-label color-gray">备注</span>
-            </div>
-
-            <div class="am-u-sm-8">
-                <span class="am-input-group-label " th:text="${order.remark }"></span>
-            </div>
-            <div class="am-u-sm-12 ">
-                <div class="line"></div>
-            </div>
-        </div>
-        <div
-                class="am-input-group am-form-group  am-input-group-primary am-g">
-            <div class="am-u-sm-4">
-                <span class="am-input-group-label color-gray">订单状态</span>
-            </div>
-
-            <div class="am-u-sm-8">
-                <span class="am-input-group-label " th:text="${order.statu }"></span>
-            </div>
-            <div class="am-u-sm-12 ">
-                <div class="line"></div>
-            </div>
-        </div>
-        <div class="am-input-group am-form-group  am-input-group-primary am-g">
-            <div class="am-u-sm-12 ">
-                <h2 class="msghead color-gray">订单明细</h2>
-            </div>
-        </div>
-        <div th:if="${order.items!= null}">
-            <div th:each="item:${order.items }">
-
-                <div class="am-input-group am-form-group  am-input-group-primary am-g">
-
-
-                    <div class="am-u-sm-6">
-                        <span class="msg" th:text="${item.shoppingGoods.name }"></span>
-                    </div>
-                    <div class="am-u-sm-6">
-                        <span class="msg color-r" th:text="'¥'+${item.zkPrice * item.count }"></span>
-                    </div>
-                    <div class="am-u-sm-6">
-                        <span class=" msg" th:text="'数量:'+${item.count }"></span>
-                    </div>
-                    <div class="am-u-sm-6">
-                        <span class=" msg" th:text="${item.shoppingGoods.name }"></span>
-                    </div>
-                    <div class="am-u-sm-12 ">
-                        <div class="line"></div>
-                    </div>
-                </div>
-
-
-            </div>
-        </div>
-
-        <div th:if="${order.items eq null}"
-             class="am-input-group am-form-group  am-input-group-primary am-g">
-            <div class="am-u-sm-4">
-                <span class="am-input-group-label">暂无商品详情</span>
-            </div>
-        </div>
-
-        <div th:if="${order.statu eq '待付款' }" class="inputBtn">
-            <button class="am-btn am-btn-danger am-radius am-btn-block"
-                    type="button" onclick="cancelOrder()">取消订单
-            </button>
-        </div>
-        <input type="hidden" id="orderId" th:value="${order.id}">
-    </form>
-</div>
-<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-<script
-        th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-<!-- index js -->
-<script type="text/javascript">
-    function cancelOrder() {
-        $
-            .AjaxProxy({p: {id: $("#orderId").val()}})
-            .invoke(
-                basePath + "/admin/order/cancelOrder",
-                function (loj) {
-                    if (loj.status = '200') {
-                        layer
-                            .open({
-                                content: "订单已取消",
-                                className: 'shouBox',
-                                time: 2,
-                                end: function (elem) {
-                                    MTools
-                                        .redirect(basePath + "/admin/redirect/hive/mobile/order-dfk");
-                                }
-                            });
-
-                    }
-                })
-    }
-</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-history.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-history.html
deleted file mode 100644
index c8ffea0..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-history.html
+++ /dev/null
@@ -1,194 +0,0 @@
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-<!-- Add to homescreen for Chrome on Android -->
-<meta name="mobile-web-app-capable" content="yes">
-
-
-<!-- Add to homescreen for Safari on iOS -->
-<meta name="apple-mobile-web-app-capable" content="yes">
-<meta name="apple-mobile-web-app-status-bar-style" content="black">
-<meta name="apple-mobile-web-app-title" content="Amaze UI" />
-
-
-
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingOrderList.css}">
-
-</head>
-<body >
-	
-	<!-- 商品列表页面 -->
-	<div class="wrap">
-		<!-- 头部开始 -->
-		<header data-am-widget="header" class="am-header color-w back-m1 am-header-fixed">
-			<div class="am-header-left am-header-nav">
-				<a th:href="@{/admin/redirect/hive/mobile/order?foot=4}" class=""> <i
-					class="am-header-icon am-icon-chevron-left"></i>
-				</a>
-			</div>
-
-			<h1 class="am-header-title">
-				<a href="#title-link" class=""> 订单 </a>
-			</h1>
-
-		</header>
-		<!-- 头部结束 -->
-	      
-		<!-- 订单内容 -->
-		<div class="main main1">
-			<form class="am-form am-form-horizontal" id="dataform" onsubmit="javascripr:return false;">				
-				
-				
-				<div
-					class="am-form-group am-form-select am-input-group  am-input-group-primary am-g  title">
-
-					<div id="orderSelect" class="am-u-sm-4">
-						<select name="statu" id="statu" >
-							<option value=''>订单状态</option>
-							<option value='欠款'>欠款</option>
-							<option value='待付款'>待付款</option>
-							<option value='已付款'>已付款</option>
-							<option value='已取消'>已取消</option>
-							<option value='退款'>退款</option>
-						</select>
-					</div>
-					<div class="am-u-sm-5 search">
-						<input autocomplete="off"   type="text" class="searchIn" name="keyWordVo" placeholder="姓名/编号/手机号码" />
-						<!-- <label>开始时间:</label>
-						<input autocomplete="off"   type="date" name="beginTimeVo" id="beginTime"/>
-						<label>结束时间:</label>
-						<input autocomplete="off"   type="date" name="endTimeVo" id="endTime"/>	 -->
-						<!-- 记录当前页 -->
-						<input autocomplete="off"   type="hidden" name="offset" id="_offset"  value="0" />
-						<input autocomplete="off"   type="hidden" name="limit"   value="10" />
-					</div>
-					<div class="am-u-sm-3 btn">
-						<button type="button" class="am-btn am-btn-default am-radius searchBtn" onclick="Pagination.serchDate()">搜索</button>
-					</div>
-					
-				</div>
-				
-				<!-- 订单表格 -->
-				<div data-am-widget="list_news"
-					class="am-list-news am-list-news-default">
-					<!--列表标题-->
-					<div class="am-list-news-hd am-cf am-g" id="ur_title">
-						<!--带更多链接-->
-						<div class="am-u-sm-3 ">
-							<h2 class="am-list-news-more am-fr">订单号 </h2>
-						</div>
-						<div class="am-u-sm-2 ">
-							<h2 class="am-list-news-more am-fr ">购买人 </h2>
-						</div>
-						<div class="am-u-sm-3 ">
-							<h2 class="am-list-news-more am-fr">时间 </h2>
-						</div>
-						<div class="am-u-sm-2 ">
-							<h2 class="am-list-news-more am-fr ">总价</h2>
-
-						</div>				
-						<div class="am-u-sm-2 ">
-							<h2 class="am-list-news-more am-fr">操作 </h2>
-						</div>
-					</div>
-
-					<div class="am-list-news-bd">
-						<ul class="am-list" id="showdataBox"></ul>
-					</div>
-					<div id="pagingBox" align="center" style="margin-top: 10px">
-					</div>
-										
-				</div>
-				
-				
-				<!-- 商品展示结束 -->
-				<!-- 测试 -->
-
-			</form>
-		</div>
-		<!-- 订单内容结束 -->
-
-	</div>
-	<script	th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<script th:src="@{/plugin/amazingUI/js/amazeui.min.js}"></script>
-	<script type="text/javascript">
-		/*
-		*加载订单信息
-		*/
-		$(function(){
-			Pagination.init({
-				url :  basePath+"/admin/order/showStaffOrder",
-				builderDate:function(loj){										
-					var html="";
-					if(loj.getRowCount()>0){
-						$("#pagingBox").show();
-						$("#ur_title").show();
-						//构建数据
-						for(var i=0; i<loj.getRowCount(); i++){
-							html += "<li class='am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left'><div class='am-u-sm-3 '><h3 class='am-list-item-hd'>"
-							+loj.getString(i,'orderNo')
-							+"</h3></div><div class='am-u-sm-2 '><h3 class='am-list-item-hd'>"
-							+loj.getString(i,'vipName')
-							+"</h3></div><div class='am-u-sm-3 '><h3 class='am-list-item-hd'>"
-							+loj.getDate(i,'orderTime')
-							+"</h3></div><div class='am-u-sm-2 color-r'><h3 class='am-list-item-hd'><strong>"
-							+loj.getString(i,'total')
-							+"</strong></h3></div><div class='am-u-sm-2 '>"
-							+"<a class='am-list-item-hd' href='"+basePath+"/admin/order/findOrderDetailById?id="+loj.getString(i,'id')+"'>详情</a></div></li>";
-						}
-						return html;
-					}else{
-						$("#pagingBox").hide();
-						$("#ur_title").hide();
-
-					}
-					
-					
-				}
-			}).serchDate();
-			
-			//开始时间小于结束时间
-			$("#beginTime").change(function(){
-				var beginTime = $("#beginTime").val();
-				  if(beginTime!=""){
-					  $("#endTime").attr("min",beginTime);
-				  }
-			});
-					
-		});
-		
-		
-		
-		
-		  
-	</script>
-	<!-- index js -->
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-list.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-list.html
deleted file mode 100644
index 135fb76..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-list.html
+++ /dev/null
@@ -1,281 +0,0 @@
-
-
-
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-<!-- Add to homescreen for Chrome on Android -->
-<meta name="mobile-web-app-capable" content="yes">
-
-
-<!-- Add to homescreen for Safari on iOS -->
-<meta name="apple-mobile-web-app-capable" content="yes">
-<meta name="apple-mobile-web-app-status-bar-style" content="black">
-<meta name="apple-mobile-web-app-title" content="Amaze UI" />
-
-
-
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingOrderList.css}">
-<style type="text/css">
-.box-2{
-width: 50px;
-    text-align: center;
-    position: fixed;
-    bottom: 30px;
-    right: 5px;
-    z-index: 999999;
-    background: #fff;
-
-}
-.dot{
-    width: 14px;
-    height: 14px;
-    border-radius: 7px;
-    background: red;
-    display: inline-block;
-    font-size: 5px;
-    color: #fff;
-    line-height: 15px;
-    position: relative;
-    top: 15px;
-    left: 15px;}
-</style>
-</head>
-<script th:if="${session.CURRENT_CUSTOMER eq null}">
-
-	MTools.redirect(basePath + "/admin/redirect/hive/mobile/order-search");
-
-</script>
-
-
-<body >
-	<!-- 商品列表页面 -->
-	<div class="wrap">
-		<!-- 头部开始 -->
-		<header data-am-widget="header" class="am-header color-w back-m1 back-m1 am-header-fixed">
-			<div class="am-header-left am-header-nav">
-				<a th:href="@{/admin/redirect/hive/mobile/order?foot=4}" class=""> <i
-					class="am-header-icon am-icon-chevron-left"></i>
-				</a>
-			</div>
-
-			<h1 class="am-header-title">
-				<a href="#title-link" class=""> 商品列表 </a>
-			</h1>
-
-			<!-- <div class="am-header-right am-header-nav">
-				<a class=""> <i class="am-header-icon am-icon-bars"></i>
-				</a>
-			</div> -->
-		</header>
-		<!-- 头部结束 -->
-	      
-		<!-- 订单内容 -->
-		<div class="main main1">
-			<form class="am-form am-form-horizontal"  id="dataform" onsubmit="javascripr:return false;">
-				<div
-					class="am-form-group am-form-select am-input-group  am-input-group-primary am-g  title">
-					<div id="orderSelect" class="am-u-sm-4">
-						<select name=type id="order-select">
-							<option value="家居产品">商品</option>
-							<option value="项目">项目</option>
-							<option value="套餐">套餐</option>
-							<option value="充值卡">充值卡</option>
-							<option value="综合卡">综合卡</option>
-						</select>
-					</div>
-					<div class="am-u-sm-5 search">
-					<!-- 记录当前页 -->
-						<input autocomplete="off"   type="hidden" name="offset" id="_offset"  value="0" />
-						<input autocomplete="off"   type="hidden" id="limit" name="limit"   value="10" />
-						<input autocomplete="off"   type="text" class="searchIn" placeholder="产品名称" name="keyword" />
-					</div>
-					<div class="am-u-sm-3 btn">
-						<button class="am-btn am-btn-default am-radius searchBtn" onclick="Pagination.serchDate()">搜索</button>
-					</div>
-				</div>
-			<div  id="main" style="display: none">	
-				<!-- 商品表格 -->
-				<div data-am-widget="list_news"
-					class="am-list-news am-list-news-default">
-					<!--列表标题-->
-					<div class="am-list-news-hd am-cf am-g">
-						<!--带更多链接-->
-						<div class="am-u-sm-5 ">
-							<h2 class="am-list-news-more am-fr">商品名</h2>
-						</div>
-						<div class="am-u-sm-4 " id="isgoods">
-							<h2 class="am-list-news-more am-fr">价格</h2>
-
-						</div>
-						<div class="am-u-sm-3 ">
-							<h2 class="am-list-news-more am-fr">操作 </h2>
-						</div>
-					</div>
-					<div class="am-list-news-bd" >
-						<ul class="am-list" id="showdataBox">							
-						</ul>
-					</div>
-					<div id="pagingBox" align="center" style="margin-top: 10px">
-					</div>
-				</div>
-				<!-- 商品展示结束 -->
-				<!-- 测试 -->
-			</div>
-			</form>			
-		</div>
-		<!-- 订单内容结束 -->
-
-	</div>
-	<div class="box box-2">
-	<span class="dot" id="dot"  th:if="${session.SHOPPING_CAR ne null}" th:text="${#lists.size(session.SHOPPING_CAR)}"></span>
-		<span class="dot" id="dot"  th:if="${session.SHOPPING_CAR eq null}"  >0</span>
-
-	<a th:href="@{/admin/redirect/hive/mobile/order-car}">
-		<img width="50px" th:src= "@{/images/dingImg/gwc.png}"><br>
-	</a></div>
-				
-	<script	th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<script th:src="@{/plugin/amazingUI/js/amazeui.min.js}"></script>
-	<script>
-	var $dot=$("#dot");
-	
-	function addCar(_id,_type,_assembleId){
-		var param={
-		isFree:'否',
-		type:_type,
-		goodsId:_id,
-		count:1,
-		assembleId:_assembleId
-		}
-		
-		$.AjaxProxy({p:param}).invoke( basePath+"/admin/shoppingCar/addItemToCar",function(){
-			msg='成功加入购物车';
-			layer.open({
-		    	shade:false,
-		        content :msg,
-		        className : 'showBox',
-		        time : 1,
-		    });
-			var count=$dot.html();
-			if(!count){
-				count=0
-			}
-			count=parseInt(count)+1;
-			$dot.html(count);
-			
-		});
-	}
-	//获取详情
-	var getOrderDetialPath=["order-msg","order-msg2","order-msg3","order-msg4","order-msg5"];
-	
-	
-	/**
-	加载数据
-	**/
-	$(function(){
-		var pageSize=$("#limit").val();
-		var flag = $.query.get("flag");
-		if(flag){
-			$("#order-select").val(flag);
-		}
-		Pagination.init({
-			url: basePath+"/admin/shoppinggoods/showGoodsList",
-			pageSize : pageSize,
-			builderDate:function(loj){
-				var initType=$("#order-select").val();
-				if(loj.getRowCount()>0){
-					$("#main").show();									
-					//构建数据
-					var html="";
-					var name;
-					var price;
-					var priceFlag='¥';
-					var pageType=0;
-					var car='<i style="font-size:12px;    line-height: 25px; width:25px; height:25px;" class="am-icon-btn am-success am-icon-cart-plus  am-success am-icon-sm "  ></i> ';
-					if(initType=='家居产品'){
-						pageType=1;
-					}
-					else if(initType=='项目'){
-						pageType=2;
-					}
-					else if(initType=='套餐'){
-						pageType=3;
-					}else if(initType=='充值卡'){
-						pageType=4;
-					}else if(initType=='综合卡'){
-						pageType=5;
-					}
-					for(var i=0 ; i<loj.getRowCount(); i++ ){
-						html +='<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">'
-							+'<div class="am-u-sm-5 ">';
-							console.log(initType);
-							if(initType=='家居产品'){
-								html +='<h3 onclick="addCar('+loj.getString(i,'id')+',\''+initType+'\','+''+')"  class="am-list-item-hd">'+car+loj.getString(i,"name")+'</h3>'
-							}
-							else if(initType=='项目'){
-								//var assembleId=loj.getString(i,"assembleProj")[0].id;
-								//console.log(assembleId);
-								html +='<h3 onclick="addCar('+loj.getString(i,'id')+',\''+initType+'\','+''+')" class="am-list-item-hd">'+car+loj.getString(i,"name")+'</h3>';
-							 }
-							else{	html +='<h3 onclick="addCar('+loj.getString(i,'id')+',\''+initType+'\')" class="am-list-item-hd">'+car+loj.getString(i,"name")+'</h3>';
-							}
-							var sealPice=loj.getString(i,"sealPice");
-							if(!sealPice){sealPice=0}
-							
-							html+='</div>'
-							+'<div class="am-u-sm-4 ">'
-							+'	<h3 class="am-list-item-hd color-r">'+priceFlag+sealPice+'</h3>'
-							+'</div>'
-							+'<div class="am-u-sm-3 ">'
-							+'<a href="'+getOrderDetialPath[pageType-1]+'?ding_order_id='+loj.getString(i,"id")+'">详情</a>'
-							+'</div>'
-						    +'</li>';
-					}
-					return html;
-				}else{
-					$("#main").hide();
-					$("#pagingBox").hide();
-
-				}			
-			}
-		}).serchDate();
-	})
-		
-		//fn2 下拉列表,添加change事件
-		$("#order-select").change(function(){
-			$("#_offset").val(0)
-			Pagination.serchDate();
-		});
-	
-
-	</script>
-	<!-- index js -->
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg.html
deleted file mode 100644
index acfa11f..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg.html
+++ /dev/null
@@ -1,253 +0,0 @@
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-    <meta
-            content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-            name="viewport"/>
-    <title th:text="${session.userInfo.shopName }"></title>
-
-    <!-- Set render engine for 360 browser -->
-    <meta name="renderer" content="webkit">
-
-    <!-- No Baidu Siteapp-->
-    <meta http-equiv="Cache-Control" content="no-siteapp"/>
-
-
-    <!-- Add to homescreen for Chrome on Android -->
-    <meta name="mobile-web-app-capable" content="yes">
-
-
-    <!-- Add to homescreen for Safari on iOS -->
-    <meta name="apple-mobile-web-app-capable" content="yes">
-    <meta name="apple-mobile-web-app-status-bar-style" content="black">
-    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
-
-
-    <script type="text/javascript"
-            th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-    <script type="text/javascript"
-            th:src="@{/js/systools/DDMBase.js}"></script>
-    <link rel="stylesheet"
-          th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-    <link rel="stylesheet"
-          th:href="@{/plugin/amazingUI/css/app.css}">
-    <link rel="stylesheet" type="text/css"
-          th:href="@{/css/dingOrderMsg3.css}">
-
-</head>
-<style>
-</style>
-<body>
-<!-- 商品详情页面 -->
-<!-- 头部开始 -->
-<header data-am-widget="header" class="am-header color-w back-m1">
-    <div class="am-header-left am-header-nav">
-        <a th:href="@{/admin/redirect/hive/mobile/order-list?flag=家居产品}" class="">
-            <i class="am-header-icon am-icon-chevron-left"></i>
-        </a>
-    </div>
-
-    <h1 class="am-header-title">
-        <a href="#title-link" class=""> 商品详情 </a>
-    </h1>
-
-    <!-- <div class="am-header-right am-header-nav">
-        <a href="###" class=""> <i class="am-header-icon am-icon-bars"></i>
-        </a>
-    </div> -->
-</header>
-<!-- 头部结束 -->
-<form class="am-form am-form-horizontal " action="" id="dataform"
-      onsubmit="javascripr:return false;">
-    <div data-am-widget="list_news"
-         class="am-list-news am-list-news-default all">
-        <div class="goods-img">
-            <img id="shopImg">
-        </div>
-
-        <div class="am-list-news-bd">
-
-            <ul class="am-list">
-                <li class="am-g am-list-item-dated"><a href="##"
-                                                       class="am-list-item-hd ">&nbsp;商品名称</a> <strong
-                        class="am-list-date color-black" id="name"></strong></li>
-                <li class="am-g am-list-item-dated"><a href="##"
-                                                       class="am-list-item-hd ">&nbsp;商品销量</a> <strong
-                        class="am-list-date color-r" id="sealCount"></strong></li>
-                <li class="am-g am-list-item-dated"><a href="##"
-                                                       class="am-list-item-hd ">&nbsp;商品价格</a> <strong
-                        class="am-list-date color-r" id="price"></strong></li>
-                <!-- <li class="am-g am-list-item-dated">
-                    <a href="##" class="am-list-item-hd ">&nbsp;绑定数量</a>
-                    <strong class="am-list-date color-black" id="total"></strong>
-                </li> -->
-                <li class="am-g am-list-item-dated"><a href="##"
-                                                       class="am-list-item-hd ">&nbsp;商品介绍</a> <span
-                        class="am-list-date"
-                        id="introduction"></span></li>
-                <li class="am-g ">
-
-                    <div class=" am-u-sm-12 guige ">
-                        <!-- 数量选择 -->
-                        <div
-                                class="am-input-group am-form-group  am-input-group-primary ">
-                            <span class="am-input-group-label num">项目数量</span> <a
-                                onclick="num(1)" class="am-input-group-label"> <i
-                                class="am-header-icon am-icon-minus"></i>
-                        </a> <input autocomplete="off" type="tel" id="num" class="am-form-field "
-                                    readonly="readonly" value="1" name="count"/> <a
-                                onclick="num(2)" class=" am-input-group-label"> <i
-                                class="am-header-icon am-icon-plus"></i>
-                        </a>
-                        </div>
-                    </div>
-
-                </li>
-
-                <li class="am-g ">
-                    <div class="am-u-sm-4 guige">
-                        <span class="am-list-item-hd color-gray">&nbsp;详细描述</span>
-                    </div>
-                </li>
-                <li class="am-g ">
-
-                    <div class=" am-u-sm-12 guige ">
-                        <p id="description" class="color-gray"></p>
-                    </div>
-
-                </li>
-
-
-            </ul>
-        </div>
-
-
-        <!-- 测试 -->
-        <!-- 增加隐藏域 -->
-        <input type="hidden" name="goodsId" id="goodsId">
-        <input type="hidden" name="assembleId" id="assembleId">
-        <input type="hidden" name="type" value="家居产品" id="type">
-    </div>
-    <div class="inputBtn am-g">
-        <div class="am-u-sm-4" id="isPresent" style="display: none">
-            <button class="am-btn btn-m1 am-radius am-btn-block"
-                    type="button" onclick="mysubmit('是')">赠送
-            </button>
-
-        </div>
-
-        <div class="am-u-sm-4 ">
-            <button class="am-btn btn-m1  am-btn-block" type="button"
-                    onclick="mysubmit('否')">加入购物车
-            </button>
-        </div>
-
-    </div>
-</form>
-<!-- 客户到访表单结束 -->
-
-
-<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-<script
-        th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-<!-- index js -->
-<script type="text/javascript">
-    //数量
-    function num(obj) {
-        if (obj == 1) {
-            if ($("#num").val() > 1) {
-                $("#num").val($("#num").val() - 1);
-            }
-
-        }
-        if (obj == 2) {
-            if ($("#num").val() >= 0) {
-                $("#num").val(parseInt($("#num").val()) + 1);
-            }
-        }
-    }
-
-    // 弹出页面层
-
-    function showBox() {
-        var myForm = MForm.initForm({
-            invokeUrl: basePath + "/admin/shoppingCar/addItemToCar",
-            isvalid: false
-
-        });
-    }
-
-    $(function () {
-        var ding_order_id = $.query.get('ding_order_id');
-        $.AjaxProxy({
-            p: {
-                id: ding_order_id
-            },
-            a: true,
-            c: true,
-        })
-            .invoke(
-                basePath + "/admin/shoppinggoods/findShoppingGoods",
-                function (loj) {
-                  
-                    $("#name").html(loj.getString(0, "name"));
-                    $("#sealCount").html(
-                        loj.getString(0, "sealCount"));
-                    $("#introduction").html(
-                        loj.getString(0, "introduction"));
-                    $("#price").html(
-                        '¥' + loj.getString(0, "sealPice"));
-                    $("#goodsId").val(loj.getString(0, "id"));
-                    $("#shopImg").attr("src",
-                        loj.getString(0, "img"));
-                    $("#description").html(
-                        loj.getString(0, "description"));
-                    var isPresent = loj.getString(0, "isPresent");
-                    if (isPresent == '是') {
-                        $("#isPresent").show();
-                    }
-
-                });
-    })
-
-    function changePrice() {
-
-    }
-
-    function mysubmit(isFree) {
-        var myForm = MForm
-            .initForm({
-                invokeUrl: basePath + "/admin/shoppingCar/addItemToCar",
-                isvalid: false,
-                extendParam: {
-                    isFree: isFree
-                },
-                beforeSubmit: function () {
-
-                },
-                afterSubmit: function (loj) {
-                    var msg = '';
-                    if (loj.attr("result").status == '200') {
-                        msg = '操作成功';
-                        layer
-                            .open({
-                                shade: false,
-                                content: msg,
-                                className: 'showBox',
-                                time: 1,
-                                end: function (elem) {
-                                    MTools
-                                        .redirect(basePath + "/admin/redirect/hive/mobile/order-list?flag=家居产品");
-                                }
-                            });
-                    }
-                }
-            });
-        myForm.submit();
-    }
-</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg2.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg2.html
deleted file mode 100644
index 8ebc6de..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg2.html
+++ /dev/null
@@ -1,264 +0,0 @@
-
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-  <meta charset="utf-8">
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
-  
-  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
-  <title th:text="${session.userInfo.shopName }"></title>
-
-  <!-- Set render engine for 360 browser -->
-  <meta name="renderer" content="webkit">
-
-  <!-- No Baidu Siteapp-->
-  <meta http-equiv="Cache-Control" content="no-siteapp"/>
-
- 
-
-  <!-- Add to homescreen for Chrome on Android -->
-  <meta name="mobile-web-app-capable" content="yes">
- 
-
-  <!-- Add to homescreen for Safari on iOS -->
-  <meta name="apple-mobile-web-app-capable" content="yes">
-  <meta name="apple-mobile-web-app-status-bar-style" content="black">
-  <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
-  
-
- 
-  <script type="text/javascript"th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-  <script type="text/javascript"th:src="@{/js/systools/DDMBase.js}"></script>
-  <link rel="stylesheet" th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-  <link rel="stylesheet" th:href="@{/plugin/amazingUI/css/app.css}">
-  <link rel="stylesheet" type="text/css" th:href="@{/css/dingOrderMsg3.css}">
-  
-</head>
-<body>
-	<!-- 项目详情页面 -->
-  <!-- 头部开始 -->
-    <header data-am-widget="header"
-          class="am-header color-w back-m1">
-      <div class="am-header-left am-header-nav">
-          <a th:href="@{/admin/redirect/hive/mobile/order-list?flag=项目}" class="">
-
-                <i class="am-header-icon am-icon-chevron-left"></i>
-          </a>
-      </div>
-
-      <h1 class="am-header-title">
-          <a href="#title-link" class="">
-            项目详情
-          </a>
-      </h1>
-
-    <!--   <div class="am-header-right am-header-nav">
-          <a href="###" class="">
-
-                <i class="am-header-icon am-icon-bars"></i>
-          </a>
-      </div> -->
-  </header>
-  <!-- 头部结束 -->
-  <form class="am-form am-form-horizontal" action="" id="dataform" onsubmit="javascripr:return false;">
-  <div data-am-widget="list_news" class="am-list-news am-list-news-default all" >
-         <div class="goods-img"><img  id="shopImg"  ></div>	  
-  		<div class="am-list-news-bd">
-  			<ul class="am-list">
-
-      			<li class="am-g am-list-item-dated">
-         			 <a href="##" class="am-list-item-hd ">&nbsp;项目名称</a>
-
-        			  <strong class="am-list-date color-black"id="projName"></strong>
-
-
-      			</li>
-      			<li class="am-g am-list-item-dated">
-         			 <a href="##" class="am-list-item-hd ">&nbsp;项目价格</a>
-
-        			  <strong class="am-list-date color-r"id="projPrice"></strong>
-
-
-      			</li>
-      			<li class="am-g am-list-item-dated">
-         			 <a href="##" class="am-list-item-hd ">&nbsp;销量</a>
-
-        			  <strong class="am-list-date color-r"id="sealCount"></strong>
-
-
-      			</li>
-
-     			 <li class="am-g am-list-item-dated">
-          				<a href="##" class="am-list-item-hd ">&nbsp;项目编号</a>
-
-         				 <span class="am-list-date" id="projNo"></span>
-
-
-      			</li>
-      			 <li class="am-g am-list-item-dated">
-          				<a href="##" class="am-list-item-hd  ">&nbsp;项目服务时长</a>
-
-         				 <span class="am-list-date color-y" id="timeLength"></span>
-
-      			</li>
-      			<li class="am-g ">
-
-						<div class=" am-u-sm-12 guige ">
-							<!-- 数量选择 -->
-							<div
-								class="am-input-group am-form-group  am-input-group-primary ">
-								<span class="am-input-group-label num">项目数量</span> <a
-									onclick="num(1)" class="am-input-group-label"> <i
-									class="am-header-icon am-icon-minus"></i>
-								</a> <input autocomplete="off"   type="tel" id="num" class="am-form-field "
-									readonly="readonly" value="1" name="count" /> <a
-									onclick="num(2)" class=" am-input-group-label"> <i
-									class="am-header-icon am-icon-plus"></i>
-								</a>
-							</div>
-						</div>
-					</li>
-					
-      			<!-- 详细描述 -->
-      			<li class="am-g ">
-					<div class="am-u-sm-4 guige">
-						<span  class="am-list-item-hd color-gray">&nbsp;详细描述</span> 
-					</div>
-				</li>
-				<li class="am-g ">
-					
-					<div class=" am-u-sm-12 guige " >
-						 <p id="description" class="color-gray"></p>
-					</div> 
-						
-				</li>
-      			<!-- 详细描述结束 -->
-  			</ul>
-  		</div>
-  
-  
-     
-      
-      
-      
-      
-      <!-- 测试 -->
-        <!-- 增加隐藏域 -->
-      <input autocomplete="off"   type="hidden" name="goodsId" id="goodsId">
-      <input autocomplete="off"   type="hidden" name="type" value="项目" id="type">
-   </div>
-   		<div class="inputBtn am-g">
-				<div class="am-u-sm-4" id="isPresent" style="display:none">
-					<button class="am-btn btn-m1 am-radius am-btn-block"
-						type="button" onclick="mysubmit('是')">赠送</button>
-
-				</div>
-
-				<div class="am-u-sm-4 ">
-					<button class="am-btn btn-m1  am-btn-block"
-						type="button" onclick="mysubmit('否')">加入购物车</button>
-				</div>
-
-		</div>
-   </form>
-  
-  <!-- 客户到访表单结束 -->
-  
-  
-
-
-<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-<script th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-<!-- index js -->  
-<script type="text/javascript">
-//数量
-  function num(obj){
-    if(obj==1){
-      if($("#num").val()>1){
-        $("#num").val($("#num").val()-1);
-      }
-      
-    }
-    if(obj==2){
-      if($("#num").val()>=0){
-        $("#num").val(parseInt($("#num").val())+1);
-      }
-    }
-  }
-  
-  // 弹出页面层
-  
- function showBox() {  
-    layer.open({
-    type: 0,
-    content: '操作成功',
-    style: 'position:fixed; left:10%; top:25%; width:80%; height:30%; border-radius:5%;'
-    });
-}
-  
-  //項目详情页面
- $(function(){
-	    var ding_order_id=$.query.get('ding_order_id');
-	  	$.AjaxProxy({
-			p : {
-				id:ding_order_id
-			},
-			a : true,
-			c : true,
-		}).invoke( basePath+"/admin/shoppinggoods/findShoppingGoods", function(loj){
-
-			// 获取组合中包含的项目信息
-			$("#projName").html(loj.getString(0,"name")==''?'&nbsp;&nbsp;':loj.getString(0,"name"));
-			$("#projPrice").html('¥'+loj.getString(0,"sealPice"));
-			$("#sealCount").html(loj.getString(0,"sealCount"));
-			$("#projNo").html(loj.getString(0,"code"));
-			$("#timeLength").html(loj.getString(0,"timeLength")+" 分钟");
-			$("#goodsId").val(loj.getString(0,"id")); 
-			$("#shopImg").attr("src",loj.getString(0, "img"));
-			$("#description").html(loj.getString(0, "description"));
-			//商品类型为项目时候,只有一个项目,因此直接去下表为0的项目
-			var isPresent=loj.getString(0, "isPresent");
-			if(isPresent=='是'){
-				$("#isPresent").show();
-			}
-			
-		});
-	 })
-	 //加入购物车和赠送
-	  function mysubmit(isFree){
-		 var myForm=MForm.initForm({
-				invokeUrl: basePath+"/admin/shoppingCar/addItemToCar",
-				isvalid:false,
-				extendParam:{isFree:isFree},
-				afterSubmit:function(loj){
-					var msg='';
-					if(loj.attr("result").status=='200'){
-						msg='操作成功';
-						layer.open({
-					    	shade:false,
-					        content :msg,
-					        className : 'showBox',
-					        time : 1,
-					        end: function(elem){
-					        	MTools.redirect( basePath+"/admin/redirect/hive/mobile/order-list?flag=项目");
-					        } 
-					    });
-					}
-					else{
-						msg='操作失败';
-						layer.open({
-					    	shade:false,
-					        content :msg,
-					        className : 'showBox',
-					        time : 2
-					    });
-					}
-				}
-			}); 
-		 myForm.submit();
-	 }
-</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg3.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg3.html
deleted file mode 100644
index 2e12c06..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg3.html
+++ /dev/null
@@ -1,289 +0,0 @@
-
- 
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-  <meta charset="utf-8">
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
-  
-  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
-  <title th:text="${session.userInfo.shopName }"></title>
-
-  <!-- Set render engine for 360 browser -->
-  <meta name="renderer" content="webkit">
-
-  <!-- No Baidu Siteapp-->
-  <meta http-equiv="Cache-Control" content="no-siteapp"/>
-
-  
-
-  <!-- Add to homescreen for Chrome on Android -->
-  <meta name="mobile-web-app-capable" content="yes">
- 
-
-  <!-- Add to homescreen for Safari on iOS -->
-  <meta name="apple-mobile-web-app-capable" content="yes">
-  <meta name="apple-mobile-web-app-status-bar-style" content="black">
-  <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
- 
-
-  <!-- Tile icon for Win8 (144x144 + tile color) -->
-  
-  <meta name="msapplication-TileColor" content="#0e90d2">
-  <script type="text/javascript"th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-  <script type="text/javascript"th:src="@{/js/systools/DDMBase.js}"></script>
-  <link rel="stylesheet" th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-  <link rel="stylesheet" th:href="@{/plugin/amazingUI/css/app.css}">
-  <link rel="stylesheet" type="text/css" th:href="@{/css/dingOrderMsg3.css}">
-  
-</head>
-<body>
-<!-- 套餐详情页面 -->
-  <!-- 头部开始 -->
-    <header data-am-widget="header"
-          class="am-header color-w back-m1">
-      <div class="am-header-left am-header-nav">
-          <a th:href="@{/admin/redirect/hive/mobile/order-list?flag=套餐}" class="">
-                <i class="am-header-icon am-icon-chevron-left"></i>
-          </a>
-      </div>
-      <h1 class="am-header-title">
-          <a href="#title-link" class="">
-            套餐详情
-          </a>
-      </h1>
-  </header>
-  <!-- 头部结束 -->
-  <form class="am-form am-form-horizontal" action="" id="dataform" onsubmit="javascripr:return false;">
-  <div class=" main1 all" >
-      <div data-am-widget="list_news" class="am-list-news am-list-news-default" >
-  
-         <div class="goods-img"><img src="" id="shopImg"  ></div>
-  		<div class="am-list-news-bd">
-  			<ul class="am-list">
-
-      			<li class="am-g am-list-item-dated">
-         			 <a href="##" class="am-list-item-hd ">&nbsp;套餐名称</a>
-        			  <span class="am-list-date color-black" id="taocanName"></span>
-      			</li>
-      			
-     			 <li class="am-g am-list-item-dated">
-          				<a href="##" class="am-list-item-hd ">&nbsp;套餐价格</a>
-         				 <span class="am-list-date color-r" id="sale"></span>
-      			</li>
-      			
-      			<li class="am-g am-list-item-dated">
-          				<a href="##" class="am-list-item-hd ">&nbsp;销量</a>
-          				<span class="am-list-date  color-r" id="sealCount"></span>
-      			</li>
-      			
-      			
-      			 <li class="am-g am-list-item-dated">
-          				<a  class="am-list-item-hd ">&nbsp;有效期限</a>
-         				 <span class="am-list-date" id="validity"></span>
-      			</li>
-      			 <li class="am-g am-list-item-dated"></li>
-  			</ul>
-  		</div>
-  
-  
-      <!-- 数量选择 -->
-      <div class="am-input-group am-form-group  am-input-group-primary">
-        <span class="am-input-group-label num">套餐数量</span>
-        <a onclick="num(1)" class="am-input-group-label">
-            <i class="am-header-icon am-icon-minus"></i>
-        </a>
-        <input autocomplete="off"   type="tel" id="num"class="am-form-field " readonly="readonly" value="1" name="count">
-        <a onclick="num(2)" class=" am-input-group-label">
-              <i class="am-header-icon am-icon-plus"></i>
-        </a>
-      </div>
-      <!-- 项目详情 -->
-      <div class="am-panel am-panel-secondary" id="vipLevel">
-        <div class="am-panel-hd">
-          <h2 class="am-panel-title" >项目详情</h2>
-          <span  class="down down1" ></span>
-        </div>
-        <div class="vipMsg">
-          <ul class="am-list am-list-static am-list-border" id="projDetails">            
-          </ul>
-        </div>
-      </div>
-      <!-- 项目详情结束 -->
-      <!-- 商品详情开始 -->
-      <div class="am-panel am-panel-secondary" id="vipLevel2">
-          <div class="am-panel-hd">
-            <h2 class="am-panel-title" >商品详情</h2>
-            <span  class="down down2" ></span>
-          </div>
-          <div class="vipMsg2">
-            <ul class="am-list am-list-static am-list-border" id="goodsDetails">            
-            </ul>
-            
-          </div>
-      </div>
-      <!-- 商品详情结束 -->
-      
-      <ul class="am-list">
-      <li class="am-g ">
-						<div class="am-u-sm-4 guige">
-							<span  class="am-list-item-hd color-gray">&nbsp;详细描述</span> 
-						</div>
-						<div class=" am-u-sm-7 guige " >
-						      <p id="description" class="color-gray"></p>
-						</div> 
-						
-				</li>
-	</ul>
-				
-				
-      
-      <!-- 测试 -->
-       <!-- 增加隐藏域 -->
-      <input autocomplete="off"   type="hidden" name="goodsId" id="goodsId">
-      <input autocomplete="off"   type="hidden" name="type" value="套餐" id="type">
-      <input autocomplete="off"   type="hidden"  id="hidval" value="0">
-      <input autocomplete="off"   type="hidden"  id="hidval2" value="0">
-  </div>
-  </div>
-  <div class="inputBtn am-g">
-				<div class="am-u-sm-4" id="isPresent" style="display:none">
-					<button class="am-btn btn-m1 am-radius am-btn-block"
-						type="button" onclick="mysubmit('是')">赠送</button>
-
-				</div>
-
-				<div class="am-u-sm-4 ">
-					<button class="am-btn btn-m1  am-btn-block"
-						type="button" onclick="mysubmit('否')">加入购物车</button>
-				</div>
-
-</div>
-</form>
-  <!-- 客户到访表单结束 -->
-  
-  
-
-
-<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-<script th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-<!-- index js -->  
-<script type="text/javascript">
-
-	// 数量增加减少js
-  	function num(obj){
-	    if(obj==1){
-	      if($("#num").val()>1){
-	        $("#num").val($("#num").val()-1);
-	      }
-	      
-	    }
-	    if(obj==2){
-	      if($("#num").val()>=0){
-	        $("#num").val(parseInt($("#num").val())+1);
-	      }
-	    }
-	  }
-	  // 商品项目详情js
-	  $(function () {
-               $("#vipLevel").bind("click", function () {
-                   if ($("#hidval").val() == 1) {
-	                   $(".down1").css("transform","rotate(0deg)");
-	                   $(".vipMsg").slideUp(500,function(){
-	                       $("#hidval").val(0);
-                           
-                       })
-                   } else {
-	                   $(".down1").css("transform","rotate(180deg)");
-	                   $(".vipMsg").slideDown(500,function(){
-	                   $("#hidval").val(1);                          
-                       })
-                   }
-               })
-           });
-  		$(function () {
-               $("#vipLevel2").bind("click", function () {
-                   if ($("#hidval2").val() == 1) {
-                   $(".down2").css("transform","rotate(0deg)");
-                   $(".vipMsg2").slideUp(500,function(){
-                           $("#hidval2").val(0);
-                           
-                       })
-                   } else {
-                   $(".down2").css("transform","rotate(180deg)");
-                   $(".vipMsg2").slideDown(500,function(){
-                           $("#hidval2").val(1);
-                           
-                       })
-                   }
-               });
-             
-           });
- 
-   
-  
-	//套餐详情页面
-  	$(function(){
- 	    var ding_order_id=$.query.get('ding_order_id');
- 	  	$.AjaxProxy({
- 			p : {
- 				id:ding_order_id
- 			},
- 			a : true,
- 			c : true,
- 		}).invoke( basePath+"/admin/shoppinggoods/findShoppingGoods", function(loj) {
- 			
-			//销售套餐的基本信息
- 			$("#taocanName").html(loj.getString(0,"name")==''?'&nbsp;&nbsp;':loj.getString(0,"name"));
- 			$("#sale").html('¥'+(loj.getString(0,"sealPice")==''?'&nbsp;&nbsp;':loj.getString(0,"sealPice")));
- 			$("#sealCount").html(loj.getString(0,"sealCount")==''?'&nbsp;&nbsp;':loj.getString(0,"sealCount"));
- 			$("#validity").html(loj.getString(0,"validity")==''?'&nbsp;&nbsp;':loj.getString(0,"validity")+" 月"); 
- 			$("#goodsId").val(loj.getString(0,"id"));
- 			$("#shopImg").attr("src",loj.getString(0, "img"));
-			$("#description").html(loj.getString(0, "description"));
-			var isPresent=loj.getString(0, "isPresent");
-			if(isPresent=='是'){
-				$("#isPresent").show();
-			}
-
- 		});
- 	 })
- 	//赠送和加入购物车
- 	 function mysubmit(isFree){
-		 var myForm=MForm.initForm({
-				invokeUrl: basePath+"/admin/shoppingCar/addItemToCar",
-				isvalid:false,
-				extendParam:{isFree:isFree},
-				afterSubmit:function(loj){
-					var msg='';
-					if(loj.attr("result").status=='200'){
-						msg='操作成功';
-						layer
-					      .open({
-					    	shade:false,
-					        content :msg,
-					        className : 'showBox',
-					        time : 1,
-					        end: function(elem){
-					        	MTools.redirect( basePath+"/admin/redirect/hive/mobile/order-list?flag=套餐");
-					        } 
-					        });
-					}
-					else{
-						msg='操作失败';
-						layer
-					      .open({
-					    	shade:false,
-					        content :msg,
-					        className : 'showBox',
-					        time : 2
-					        });
-					}
-				}
-			}); 
-		 myForm.submit();
-	 }
-</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg4.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg4.html
deleted file mode 100644
index 17b9cb9..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg4.html
+++ /dev/null
@@ -1,245 +0,0 @@
-
- 
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-  <meta charset="utf-8">
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
-  
-  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
-  <title th:text="${session.userInfo.shopName }"></title>
-
-  <!-- Set render engine for 360 browser -->
-  <meta name="renderer" content="webkit">
-
-  <!-- No Baidu Siteapp-->
-  <meta http-equiv="Cache-Control" content="no-siteapp"/>
-
-  
-
-  <!-- Add to homescreen for Chrome on Android -->
-  <meta name="mobile-web-app-capable" content="yes">
- 
-
-  <!-- Add to homescreen for Safari on iOS -->
-  <meta name="apple-mobile-web-app-capable" content="yes">
-  <meta name="apple-mobile-web-app-status-bar-style" content="black">
-  <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
- 
-
-  <!-- Tile icon for Win8 (144x144 + tile color) -->
-  
-  <meta name="msapplication-TileColor" content="#0e90d2">
-  <script type="text/javascript"th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-  <script type="text/javascript"th:src="@{/js/systools/DDMBase.js}"></script>
-  <link rel="stylesheet" th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-  <link rel="stylesheet" th:href="@{/plugin/amazingUI/css/app.css}">
-  <link rel="stylesheet" type="text/css" th:href="@{/css/dingOrderMsg3.css}">
-  
-</head>
-<body>
-<!-- 套餐详情页面 -->
-  <!-- 头部开始 -->
-    <header data-am-widget="header"
-          class="am-header color-w back-m1">
-      <div class="am-header-left am-header-nav">
-          <a th:href="@{/admin/redirect/hive/mobile/order-list?flag=充值卡}" class="">
-                <i class="am-header-icon am-icon-chevron-left"></i>
-          </a>
-      </div>
-      <h1 class="am-header-title">
-          <a href="#title-link" class="">
-            充值卡详情
-          </a>
-      </h1>
-  </header>
-  <!-- 头部结束 -->
-  <form class="am-form am-form-horizontal" action="" id="dataform" onsubmit="javascripr:return false;">
-  <div class=" main1 all" >
-      <div data-am-widget="list_news" class="am-list-news am-list-news-default" >
-  
-         <div class="goods-img"><img src="" id="shopImg"  ></div>
-  		<div class="am-list-news-bd">
-  			<ul class="am-list">
-
-      			<li class="am-g am-list-item-dated">
-         			 <a href="##" class="am-list-item-hd ">&nbsp;卡名</a>
-        			  <span class="am-list-date color-black" id="taocanName"></span>
-      			</li>
-     			 <li class="am-g am-list-item-dated">
-          				<a href="##" class="am-list-item-hd ">&nbsp;价格</a>
-         				 <span class="am-list-date color-r" id="sale"></span>
-      			</li>
-      			 <li class="am-g am-list-item-dated">
-          				<a href="##" class="am-list-item-hd ">&nbsp;赠送金额</a>
-         				 <span class="am-list-date " id="referencePice"></span>
-      			</li>
-      			 <li class="am-g am-list-item-dated">
-          				<a href="##" class="am-list-item-hd ">&nbsp;可消费总金额</a>
-         				 <span class="am-list-date color-r" id="totalMoney"></span>
-      			</li>
-      			<li class="am-g am-list-item-dated">
-          				<a href="##" class="am-list-item-hd ">&nbsp;会籍卡</a>
-         				 <span class="am-list-date " id="isVipCar"></span>
-      			</li>
-      			<li class="am-g am-list-item-dated">
-          				<a href="##" class="am-list-item-hd ">&nbsp;使用次数</a>
-         				 <span class="am-list-date " id="carUseCount"></span>
-      			</li>
-      			 <li class="am-g am-list-item-dated">
-          				<a href="##" class="am-list-item-hd ">&nbsp;最大发卡次数</a>
-         				 <span class="am-list-date " id="carMaxSaleCount"></span>
-      			</li>
-      			 <li class="am-g am-list-item-dated">
-          				<a  class="am-list-item-hd ">&nbsp;有效期限</a>
-         				 <span class="am-list-date" id="validity"></span>
-      			</li>	
-      			<li class="am-g am-list-item-dated">
-          				<a href="##" class="am-list-item-hd ">&nbsp;销量</a>
-          				<span class="am-list-date  color-r" id="sealCount"></span>
-      			</li>
-      			
-      			 <li class="am-g am-list-item-dated"></li>
-  			</ul>
-  		</div>
-  
-  
-      <!-- 数量选择 -->
-      <div class="am-input-group am-form-group  am-input-group-primary">
-        <span class="am-input-group-label num">套餐数量</span>
-        <a onclick="num(1)" class="am-input-group-label">
-            <i class="am-header-icon am-icon-minus"></i>
-        </a>
-        <input autocomplete="off"   type="tel" id="num"class="am-form-field " readonly="readonly" value="1" name="count">
-        <a onclick="num(2)" class=" am-input-group-label">
-              <i class="am-header-icon am-icon-plus"></i>
-        </a>
-      </div>
-      
-      <ul class="am-list">
-      <li class="am-g ">
-						<div class="am-u-sm-4 guige">
-							<span  class="am-list-item-hd color-gray">&nbsp;详细描述</span> 
-						</div>
-						<div class=" am-u-sm-7 guige " >
-						      <p id="description" class="color-gray"></p>
-						</div> 
-						
-				</li>
-	</ul>
-       <!-- 增加隐藏域 -->
-      <input autocomplete="off"   type="hidden" name="goodsId" id="goodsId">
-      <input autocomplete="off"   type="hidden" name="type" value="充值卡" id="type">
-  </div>
-  </div>
-  <div class="inputBtn am-g">
-				<div class="am-u-sm-4" id="isPresent" style="display:none">
-					<button class="am-btn btn-m1 am-radius am-btn-block"
-						type="button" onclick="mysubmit('是')">赠送</button>
-
-				</div>
-
-				<div class="am-u-sm-4 ">
-					<button class="am-btn btn-m1  am-btn-block"
-						type="button" onclick="mysubmit('否')">加入购物车</button>
-				</div>
-
-</div>
-</form>
-
-<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-<script th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-<!-- index js -->  
-<script type="text/javascript">
-
-	// 数量增加减少js
-  	function num(obj){
-	    if(obj==1){
-	      if($("#num").val()>1){
-	        $("#num").val($("#num").val()-1);
-	      }
-	      
-	    }
-	    if(obj==2){
-	      if($("#num").val()>=0){
-	        $("#num").val(parseInt($("#num").val())+1);
-	      }
-	    }
-	  }
-
-  	
-   
-  
-	//套餐详情页面
-  	$(function(){
- 	    var ding_order_id=$.query.get('ding_order_id');
- 	  	$.AjaxProxy({
- 			p : {
- 				id:ding_order_id
- 			},
- 			a : true,
- 			c : true,
- 		}).invoke( basePath+"/admin/shoppinggoods/findShoppingGoods", function(loj) {
- 			
-			//销售套餐的基本信息
- 			$("#taocanName").html(loj.getString(0,"name")==''?'&nbsp;&nbsp;':loj.getString(0,"name"));
- 			$("#sale").html('¥'+(loj.getString(0,"sealPice")==''?'&nbsp;&nbsp;':loj.getString(0,"sealPice")));
- 			$("#sealCount").html('¥'+loj.getString(0,"sealCount")==''?'&nbsp;&nbsp;':loj.getString(0,"sealCount"));
- 			$("#referencePice").html(loj.getString(0,"referencePice"));
- 			$("#validity").html(loj.getString(0,"validity")==''?'&nbsp;&nbsp;':loj.getString(0,"validity")+" 月"); 
- 			$("#goodsId").val(loj.getString(0,"id"));
- 			$("#shopImg").attr("src",loj.getString(0, "img"));
- 			$("#isVipCar").html(loj.getString(0, "isVipCar"));
-			$("#description").html(loj.getString(0, "description"));
-			var sealPice =loj.getString(0, "sealPice") == '' ? 0 : loj.getString(0, "sealPice");
-			var referencePice = loj.getString(0, "referencePice") == '' ? 0 :loj.getString(0, "referencePice");
-			var totalMoney = parseFloat(sealPice) + parseFloat(referencePice);
-			$("#totalMoney").html('¥'+totalMoney);
-			$("#carMaxSaleCount").html(loj.getString(0, "carMaxSaleCount")==0?'无限制':loj.getString(0, "carMaxSaleCount"));
-			$("#carUseCount").html(loj.getString(0, "carUseCount")==0?'无限制':loj.getString(0, "carUseCount"));
-			var isPresent=loj.getString(0, "isPresent");
-			if(isPresent=='是'){
-				$("#isPresent").show();
-			}
-
- 		});
- 	 })
- 	//赠送和加入购物车
- 	 function mysubmit(isFree){
-		 var myForm=MForm.initForm({
-				invokeUrl: basePath+"/admin/shoppingCar/addItemToCar",
-				isvalid:false,
-				extendParam:{isFree:isFree},
-				afterSubmit:function(loj){
-					var msg='';
-					if(loj.attr("result").status=='200'){
-						msg='操作成功';
-						layer
-					      .open({
-					    	shade:false,
-					        content :msg,
-					        className : 'showBox',
-					        time : 1,
-					        end: function(elem){
-					        	MTools.redirect( basePath+"/admin/redirect/hive/mobile/order-list?flag=充值卡");
-					        } 
-					        });
-					}
-					else{
-						msg='操作失败';
-						layer
-					      .open({
-					    	shade:false,
-					        content :msg,
-					        className : 'showBox',
-					        time : 2
-					        });
-					}
-				}
-			}); 
-		 myForm.submit();
-	 }
-</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg5.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg5.html
deleted file mode 100644
index 88e91b3..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg5.html
+++ /dev/null
@@ -1,269 +0,0 @@
-
- 
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-  <meta charset="utf-8">
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
-  
-  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
-  <title th:text="${session.userInfo.shopName }"></title>
-
-  <!-- Set render engine for 360 browser -->
-  <meta name="renderer" content="webkit">
-
-  <!-- No Baidu Siteapp-->
-  <meta http-equiv="Cache-Control" content="no-siteapp"/>
-
-  
-
-  <!-- Add to homescreen for Chrome on Android -->
-  <meta name="mobile-web-app-capable" content="yes">
- 
-
-  <!-- Add to homescreen for Safari on iOS -->
-  <meta name="apple-mobile-web-app-capable" content="yes">
-  <meta name="apple-mobile-web-app-status-bar-style" content="black">
-  <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
- 
-
-  <!-- Tile icon for Win8 (144x144 + tile color) -->
-  
-  <meta name="msapplication-TileColor" content="#0e90d2">
-  <script type="text/javascript"th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-  <script type="text/javascript"th:src="@{/js/systools/DDMBase.js}"></script>
-  <link rel="stylesheet" th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-  <link rel="stylesheet" th:href="@{/plugin/amazingUI/css/app.css}">
-  <link rel="stylesheet" type="text/css" th:href="@{/css/dingOrderMsg3.css}">
-  
-</head>
-<body>
-<!-- 套餐详情页面 -->
-  <!-- 头部开始 -->
-    <header data-am-widget="header"
-          class="am-header color-w back-m1">
-      <div class="am-header-left am-header-nav">
-          <a th:href="@{/admin/redirect/hive/mobile/order-list?flag=综合卡}" class="">
-                <i class="am-header-icon am-icon-chevron-left"></i>
-          </a>
-      </div>
-      <h1 class="am-header-title">
-          <a href="#title-link" class="">
-            综合卡详情
-          </a>
-      </h1>
-  </header>
-  <!-- 头部结束 -->
-  <form class="am-form am-form-horizontal" action="" id="dataform" onsubmit="javascripr:return false;">
-  <div class=" main1 all" >
-      <div data-am-widget="list_news" class="am-list-news am-list-news-default" >
-  
-         <div class="goods-img"><img src="" id="shopImg"  ></div>
-  		<div class="am-list-news-bd">
-  			<ul class="am-list">
-
-      			<li class="am-g am-list-item-dated">
-         			 <a href="##" class="am-list-item-hd ">&nbsp;卡名</a>
-        			  <span class="am-list-date color-black" id="taocanName"></span>
-      			</li>
-     			 <li class="am-g am-list-item-dated">
-          				<a href="##" class="am-list-item-hd ">&nbsp;价格</a>
-         				 <span class="am-list-date color-r" id="sale"></span>
-      			</li>
-      			 <li class="am-g am-list-item-dated">
-          				<a href="##" class="am-list-item-hd ">&nbsp;赠送金额</a>
-         				 <span class="am-list-date " id="referencePice"></span>
-      			</li>
-      			 <li class="am-g am-list-item-dated">
-          				<a href="##" class="am-list-item-hd ">&nbsp;可消费总金额</a>
-         				 <span class="am-list-date color-r" id="totalMoney"></span>
-      			</li>
-      			
-      			<li class="am-g am-list-item-dated">
-          				<a href="##" class="am-list-item-hd ">&nbsp;使用次数</a>
-         				 <span class="am-list-date " id="carUseCount"></span>
-      			</li>
-      			 <li class="am-g am-list-item-dated">
-          				<a href="##" class="am-list-item-hd ">&nbsp;最大发卡次数</a>
-         				 <span class="am-list-date " id="carMaxSaleCount"></span>
-      			</li>
-      			 <li class="am-g am-list-item-dated">
-          				<a  class="am-list-item-hd ">&nbsp;有效期限</a>
-         				 <span class="am-list-date" id="validity"></span>
-      			</li>	
-      			<li class="am-g am-list-item-dated">
-          				<a href="##" class="am-list-item-hd ">&nbsp;销量</a>
-          				<span class="am-list-date  color-r" id="sealCount"></span>
-      			</li>
-      			
-      			 <li class="am-g am-list-item-dated"></li>
-  			</ul>
-  		</div>
-  
-  
-      <!-- 数量选择 -->
-      <div class="am-input-group am-form-group  am-input-group-primary">
-        <span class="am-input-group-label num">数量</span>
-        <a onclick="num(1)" class="am-input-group-label">
-            <i class="am-header-icon am-icon-minus"></i>
-        </a>
-        <input autocomplete="off"   type="tel" id="num"class="am-form-field " readonly="readonly" value="1" name="count">
-        <a onclick="num(2)" class=" am-input-group-label">
-              <i class="am-header-icon am-icon-plus"></i>
-        </a>
-      </div>
-        <!-- 项目详情 -->
-      <div class="am-panel am-panel-secondary" id="vipLevel">
-        <div class="am-panel-hd">
-          <h2 class="am-panel-title" >综合卡详情</h2>
-          <span  class="down down1" ></span>
-        </div>
-        <div class="vipMsg">
-          <ul class="am-list am-list-static am-list-border" id="projDetails">            
-          </ul>
-        </div>
-      </div>
-      
-      
-      <ul class="am-list">
-      <li class="am-g ">
-						<div class="am-u-sm-4 guige">
-							<span  class="am-list-item-hd color-gray">&nbsp;详细描述</span> 
-						</div>
-						<div class=" am-u-sm-7 guige " >
-						      <p id="description" class="color-gray"></p>
-						</div> 
-						
-				</li>
-	</ul>
-       <!-- 增加隐藏域 -->
-      <input autocomplete="off"   type="hidden" name="goodsId" id="goodsId">
-      <input autocomplete="off"   type="hidden" name="type" value="综合卡" id="type">
-  </div>
-  </div>
-  <div class="inputBtn am-g">
-				<div class="am-u-sm-4" id="isPresent" style="display:none">
-					<button class="am-btn btn-m1 am-radius am-btn-block"
-						type="button" onclick="mysubmit('是')">赠送</button>
-
-				</div>
-
-				<div class="am-u-sm-4 ">
-					<button class="am-btn btn-m1  am-btn-block"
-						type="button" onclick="mysubmit('否')">加入购物车</button>
-				</div>
-
-</div>
-</form>
-  <input autocomplete="off"   type="hidden"  id="hidval" value="0">
-<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-<script th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-<!-- index js -->  
-<script type="text/javascript">
-
-$("#vipLevel").bind("click", function () {
-console.log($("#hidval").val());
-	if ($("#hidval").val() == 1) {
-        $(".down1").css("transform","rotate(0deg)");
-        $(".vipMsg").slideUp(500,function(){
-            $("#hidval").val(0);
-            
-        })
-    } else {
-        $(".down1").css("transform","rotate(180deg)");
-        $(".vipMsg").slideDown(500,function(){
-        $("#hidval").val(1);                          
-        })
-    }
-})
-
-	// 数量增加减少js
-  	function num(obj){
-	    if(obj==1){
-	      if($("#num").val()>1){
-	        $("#num").val($("#num").val()-1);
-	      }
-	      
-	    }
-	    if(obj==2){
-	      if($("#num").val()>=0){
-	        $("#num").val(parseInt($("#num").val())+1);
-	      }
-	    }
-	  }
-
-  	
-   
-  
-	//套餐详情页面
-  	$(function(){
- 	    var ding_order_id=$.query.get('ding_order_id');
- 	  	$.AjaxProxy({
- 			p : {
- 				id:ding_order_id
- 			},
- 			a : true,
- 			c : true,
- 		}).invoke( basePath+"/admin/shoppinggoods/findShoppingGoods", function(loj) {
- 			
-			//销售套餐的基本信息
- 			$("#taocanName").html(loj.getString(0,"name")==''?'&nbsp;&nbsp;':loj.getString(0,"name"));
- 			$("#sale").html('¥'+(loj.getString(0,"sealPice")==''?'&nbsp;&nbsp;':loj.getString(0,"sealPice")));
- 			$("#sealCount").html('¥'+loj.getString(0,"sealCount")==''?'&nbsp;&nbsp;':loj.getString(0,"sealCount"));
- 			$("#referencePice").html(loj.getString(0,"referencePice"));
- 			$("#validity").html(loj.getString(0,"validity")==''?'&nbsp;&nbsp;':loj.getString(0,"validity")+" 月"); 
- 			$("#goodsId").val(loj.getString(0,"id"));
- 			$("#shopImg").attr("src",loj.getString(0, "img"));
-			$("#description").html(loj.getString(0, "description"));
-			var sealPice =loj.getString(0, "sealPice") == '' ? 0 : loj.getString(0, "sealPice");
-			var referencePice = loj.getString(0, "referencePice") == '' ? 0 :loj.getString(0, "referencePice");
-			var totalMoney = parseFloat(sealPice) + parseFloat(referencePice);
-			$("#totalMoney").html('¥'+totalMoney);
-			$("#carMaxSaleCount").html(loj.getString(0, "carMaxSaleCount")==0?'无限制':loj.getString(0, "carMaxSaleCount"));
-			$("#carUseCount").html(loj.getString(0, "carUseCount")==0?'无限制':loj.getString(0, "carUseCount"));
-			var isPresent=loj.getString(0, "isPresent");
-			if(isPresent=='是'){
-				$("#isPresent").show();
-			}
-
- 		});
- 	 })
- 	//赠送和加入购物车
- 	 function mysubmit(isFree){
-		 var myForm=MForm.initForm({
-				invokeUrl: basePath+"/admin/shoppingCar/addItemToCar",
-				isvalid:false,
-				extendParam:{isFree:isFree},
-				afterSubmit:function(loj){
-					var msg='';
-					if(loj.attr("result").status=='200'){
-						msg='操作成功';
-						layer
-					      .open({
-					    	shade:false,
-					        content :msg,
-					        className : 'showBox',
-					        time : 1,
-					        end: function(elem){
-					        	MTools.redirect( basePath+"/admin/redirect/hive/mobile/order-list?flag=综合卡");
-					        }
-					        });
-					}
-					else{
-						msg='操作失败';
-						layer
-					      .open({
-					    	shade:false,
-					        content :msg,
-					        className : 'showBox',
-					        time : 2
-					        });
-					}
-				}
-			}); 
-		 myForm.submit();
-	 }
-</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-search.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-search.html
deleted file mode 100644
index cfc9102..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-search.html
+++ /dev/null
@@ -1,209 +0,0 @@
-
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-<!-- Add to homescreen for Chrome on Android -->
-<meta name="mobile-web-app-capable" content="yes">
-
-
-<!-- Add to homescreen for Safari on iOS -->
-<meta name="apple-mobile-web-app-capable" content="yes">
-<meta name="apple-mobile-web-app-status-bar-style" content="black">
-<meta name="apple-mobile-web-app-title" content="Amaze UI" />
-
-
-<!-- Tile icon for Win8 (144x144 + tile color) -->
-
-<meta name="msapplication-TileColor" content="#0e90d2">
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href= "@{/css/dingOrderSearch.css}">
-<style type="text/css">
-#userList {
-	height: 200px;
-	overflow: scroll;
-	overflow-x: hidden;
-}
-</style>
-</head>
-<body onkeypress="dosearch(event)">
-	<header data-am-widget="header"
-		class="am-header color-w back-m1 back-m1">
-		<div class="am-header-left am-header-nav">
-			<a th:href="@{/admin/redirect/hive/mobile/order?foot=4}" class=""> <i
-				class="am-header-icon am-icon-chevron-left"></i>
-			</a>
-		</div>
-		<h1 class="am-header-title">
-			<a href="#title-link" class=""> 会员搜索 </a>
-		</h1>
-	</header>
-	<!-- 商品搜索页面 -->
-	<div class="wrap">
-		<div class="am-g">
-			<div class="am-u-sm-9 no-right">
-				<input autocomplete="off"   id="userName" name="acctNo" type="text"
-					class="am-form-field id-in am-dropdown-up" placeholder="请输入手机号或者姓名" />
-				<ul id="userList" class="userList " style="display: none">
-				</ul>
-
-			</div>
-			<div class="am-u-sm-3 no-left">
-				<button class="am-btn am-btn-default" type="button"
-					onclick="searchUser()">
-					<span class="am-icon-search"></span>
-				</button>
-			</div>
-		</div>
-	</div>
-
-	<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-	<script
-		th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<!-- index js -->
-	<script>
-		$(function() {
-
-			$("#userName").bind('input propertychange', function() {
-								console.log(1);
-								var $input = $("#userName");
-								if ($input.length < 1) {
-									return false;
-								}
-
-								if ($input.val().length > 1) {
-									$
-											.AjaxProxy({
-												p : {
-													keyWord : $input.val(),
-												},
-												c : false,
-											})
-											.invoke(
-													 basePath+"/admin/vipInfo/findUserByPhoto",
-													function(loj) {
-														var html = "";
-														if (loj.getRowCount() > 0) {
-															for (var i = 0; i < loj
-																	.getRowCount(); i++) {
-																html += '<li onclick="selectList(\''
-																		+ loj
-																				.getString(
-																						i,
-																						'phone')
-																		+ '\')" >'
-																		+ loj
-																				.getString(
-																						i,
-																						'phone')
-																		+ "-"
-																		+ loj
-																				.getString(
-																						i,
-																						'vipName')
-																		+ "-"
-																		+ loj
-																				.getString(
-																						i,
-																						'vipNo')
-																		+ '</li>';
-															}
-															$("#userList")
-																	.html(html)
-																	.show();
-														} else {
-															$("#userList")
-																	.empty()
-																	.hide();
-														}
-
-													});
-								} else {
-									$("#userList").hide();
-								}
-							});
-		})
-
-		function searchUser() {
-			if ($("#userName").val().length < 1) {
-				layer.open({
-					shade : false,
-					content : "请输入关键词后再查询",
-					className : 'showBox',
-					time : 1,
-				});
-				return false;
-			}
-
-			$
-					.AjaxProxy({
-						p : {
-							keyWord : $("#userName").val(),
-						},
-						c : false,
-					})
-					.invoke(
-							 basePath+"/admin/vipInfo/showVipInfo",
-							function(loj) {
-								if (loj.getRowCount() > 0) {
-									layer
-											.open({
-												shade : false,
-												content : "查找成功",
-												className : 'showBox',
-												time : 1,
-												end : function(elem) {
-													MTools
-															.redirect( basePath+"/admin/redirect/hive/mobile/order?foot=4");
-												}
-											});
-
-								} else {
-									layer.open({
-										shade : false,
-										content : "未查询到此会员",
-										className : 'showBox',
-										time : 2
-									});
-								}
-							});
-		}
-		function dosearch(e) {
-			if (e.keyCode == 13) {
-				e.preventDefault();
-				window.event.returnValue = false;
-				searchUser();
-				return false;
-			}
-		}
-
-		function selectList(phone) {
-			$("#userList").hide();
-			$("#userName").val(phone);
-			searchUser();
-		}
-	</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-service.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-service.html
deleted file mode 100644
index 56c22fc..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-service.html
+++ /dev/null
@@ -1,289 +0,0 @@
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-  <meta charset="utf-8">
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
-  <meta name="description" content="">
-  <meta name="keywords" content="">
-  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
-  <title th:text="${session.userInfo.shopName }"></title>
-
- 
- 
-  <script type="text/javascript"th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-  <script type="text/javascript"th:src="@{/js/systools/DDMBase.js}"></script>
-  <link rel="stylesheet" th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-  <link rel="stylesheet" th:href="@{/plugin/amazingUI/css/app.css}">
-  <link rel="stylesheet" type="text/css" href= basePath+"/css/dingOrderService.css">
-  
-</head>
-<body>
-  <div class="wrap">
-  	  <!-- 头部开始 -->
-      <header data-am-widget="header"
-            class="am-header color-w back-m1">
-        <div class="am-header-left am-header-nav">
-            <a th:href="@{/admin/redirect/hive/mobile/order?foot=4}" class="">
-
-                  <i class="am-header-icon am-icon-chevron-left"></i>
-            </a>
-        </div>
-
-        <h1 class="am-header-title">
-            <a href="#title-link" class="">
-              服务列表
-            </a>
-        </h1>
-
-       <!--  <div class="am-header-right am-header-nav">
-            <a class="">
-
-                  <i class="am-header-icon am-icon-bars"></i>
-            </a>
-        </div> -->
-    </header>
-    <!-- 头部结束 -->
-      <div data-am-widget="tabs"
-           class="am-tabs am-tabs-d2"
-            >
-          <ul class="am-tabs-nav am-cf">
-              <li class="am-active"><a href="[data-tab-panel-0]">完成服务单</a></li>
-              <li class=""><a href="[data-tab-panel-1]">未完成服务单</a></li>
-              
-          </ul>
-          <div class="am-tabs-bd">
-              <div data-tab-panel-0 class="am-tab-panel am-active">
-               	<div class="main main1">
-					<form class="am-form am-form-horizontal" action="">
-				
-						<div
-							class="am-form-group am-form-select am-input-group  am-input-group-primary am-g  title">
-							<div  class="am-u-sm-1">
-								<span>&nbsp;</span>
-							</div>
-							<div class="am-u-sm-7 search">
-								<input autocomplete="off"   type="search" class="searchIn" />
-							</div>
-							<div class="am-u-sm-3 btn">
-								<button class="am-btn am-btn-default am-radius searchBtn" >搜索</button>
-							</div>
-							<div  class="am-u-sm-1">
-								<span>&nbsp;</span>
-							</div>
-					
-						</div>
-						
-				
-						<!-- 商品表格 -->
-						<div data-am-widget="list_news"
-							class="am-list-news am-list-news-default">
-							<!--列表标题-->
-							<div class="am-list-news-hd am-cf am-g">
-								<!--带更多链接-->
-								<div class="am-u-sm-3 ">
-									<h2 class="am-list-news-more am-fr">编号</h2>
-								</div>
-								<div class="am-u-sm-3 ">
-									<h2 class="am-list-news-more am-fr">总价</h2>
-		
-								</div>
-								<div class="am-u-sm-3 ">
-									<h2 class="am-list-news-more am-fr">时间 </h2>
-								</div>
-								<div class="am-u-sm-3 ">
-									<h2 class="am-list-news-more am-fr">购买人 </h2>
-								</div>
-		
-							</div>
-		
-							<div class="am-list-news-bd">
-								<ul class="am-list">							
-										<li
-											class="am-g  ">
-											<div class="am-u-sm-3 ">
-												<h3 class="am-list-item-hd">110</h3>
-											</div>
-		
-											<div class="am-u-sm-3 ">
-												<h3 class="am-list-item-hd">2000</h3>
-											</div>
-											<div class="am-u-sm-3 ">
-												<h3 class="am-list-item-hd">2014-02-02</h3>
-											</div>
-											<div class="am-u-sm-3 ">
-												<h3 class="am-list-item-hd">周杰伦</h3>
-											</div>
-										</li>
-										<li
-											class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">
-											<div class="am-u-sm-3 ">
-												<h3 class="am-list-item-hd">110</h3>
-											</div>
-		
-											<div class="am-u-sm-3 ">
-												<h3 class="am-list-item-hd">2000</h3>
-											</div>
-											<div class="am-u-sm-3 ">
-												<h3 class="am-list-item-hd">2014-02-02</h3>
-											</div>
-											<div class="am-u-sm-3 ">
-												<h3 class="am-list-item-hd">小外</h3>
-											</div>
-										</li>
-										<li
-											class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">
-											<div class="am-u-sm-3 ">
-												<h3 class="am-list-item-hd">110</h3>
-											</div>
-		
-											<div class="am-u-sm-3 ">
-												<h3 class="am-list-item-hd">2000</h3>
-											</div>
-											<div class="am-u-sm-3 ">
-												<h3 class="am-list-item-hd">2014-02-02</h3>
-											</div>
-											<div class="am-u-sm-3 ">
-												<h3 class="am-list-item-hd">小外</h3>
-											</div>
-										</li>
-								</ul>
-							</div>
-							
-						</div>
-				
-				
-				<!-- 商品展示结束 -->
-				<!-- 测试 -->
-					</form>
-				</div>
-              </div>
-              <div data-tab-panel-1 class="am-tab-panel ">
-               		<div class="main main1">
-					<form class="am-form am-form-horizontal" action="">
-				
-						<div
-							class="am-form-group am-form-select am-input-group  am-input-group-primary am-g  title">
-							<div  class="am-u-sm-1">
-								<span>&nbsp;</span>
-							</div>
-							<div class="am-u-sm-7 search">
-								<input autocomplete="off"   type="search" class="searchIn" />
-							</div>
-							<div class="am-u-sm-3 btn">
-								<button class="am-btn am-btn-default am-radius searchBtn" >搜索</button>
-							</div>
-							<div  class="am-u-sm-1">
-								<span>&nbsp;</span>
-							</div>
-					
-						</div>
-						
-				
-						<!-- 商品表格 -->
-						<div data-am-widget="list_news"
-							class="am-list-news am-list-news-default">
-							<!--列表标题-->
-							<div class="am-list-news-hd am-cf am-g">
-								<!--带更多链接-->
-								<div class="am-u-sm-3 ">
-									<h2 class="am-list-news-more am-fr">编号</h2>
-								</div>
-								<div class="am-u-sm-3 ">
-									<h2 class="am-list-news-more am-fr">总价</h2>
-		
-								</div>
-								<div class="am-u-sm-3 ">
-									<h2 class="am-list-news-more am-fr">时间 </h2>
-								</div>
-								<div class="am-u-sm-3 ">
-									<h2 class="am-list-news-more am-fr">购买人 </h2>
-								</div>
-		
-							</div>
-		
-							<div class="am-list-news-bd">
-								<ul class="am-list">							
-										<li
-											class="am-g  ">
-											<div class="am-u-sm-3 ">
-												<h3 class="am-list-item-hd">110</h3>
-											</div>
-		
-											<div class="am-u-sm-3 ">
-												<h3 class="am-list-item-hd">2000</h3>
-											</div>
-											<div class="am-u-sm-3 ">
-												<h3 class="am-list-item-hd">2014-02-02</h3>
-											</div>
-											<div class="am-u-sm-3 ">
-												<h3 class="am-list-item-hd">陈奕迅</h3>
-											</div>
-										</li>
-										<li
-											class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">
-											<div class="am-u-sm-3 ">
-												<h3 class="am-list-item-hd">110</h3>
-											</div>
-		
-											<div class="am-u-sm-3 ">
-												<h3 class="am-list-item-hd">2000</h3>
-											</div>
-											<div class="am-u-sm-3 ">
-												<h3 class="am-list-item-hd">2014-02-02</h3>
-											</div>
-											<div class="am-u-sm-3 ">
-												<h3 class="am-list-item-hd">小外</h3>
-											</div>
-										</li>
-										<li
-											class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">
-											<div class="am-u-sm-3 ">
-												<h3 class="am-list-item-hd">110</h3>
-											</div>
-		
-											<div class="am-u-sm-3 ">
-												<h3 class="am-list-item-hd">2000</h3>
-											</div>
-											<div class="am-u-sm-3 ">
-												<h3 class="am-list-item-hd">2014-02-02</h3>
-											</div>
-											<div class="am-u-sm-3 ">
-												<h3 class="am-list-item-hd">小外</h3>
-											</div>
-										</li>
-								</ul>
-							</div>
-							
-						</div>
-				
-				
-				<!-- 商品展示结束 -->
-				<!-- 测试 -->
-					</form>
-				</div>
-              </div>
-             
-          </div>
-      </div>
-    
-       
-     
-        
-      
-    
-  
-  </div>
-	
-
-
-
-
-<script th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-
-
-
-
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-completed.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-completed.html
deleted file mode 100644
index d1053e2..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-completed.html
+++ /dev/null
@@ -1,234 +0,0 @@
-
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-<!-- Add to homescreen for Chrome on Android -->
-<meta name="mobile-web-app-capable" content="yes">
-
-
-<!-- Add to homescreen for Safari on iOS -->
-<meta name="apple-mobile-web-app-capable" content="yes">
-<meta name="apple-mobile-web-app-status-bar-style" content="black">
-<meta name="apple-mobile-web-app-title" content="Amaze UI" />
-
-
-<!-- Tile icon for Win8 (144x144 + tile color) -->
-
-<meta name="msapplication-TileColor" content="#0e90d2">
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingOrderList.css}">
-
-</head>
-<script>
- 
-</script>
-
-
-<body >
-	<!-- 已完成列表页面 -->
-	<div class="wrap">
-		<!-- 头部开始 -->
-		<header data-am-widget="header" class="am-header color-w back-m1 am-header-fixed">
-			<div class="am-header-left am-header-nav">
-				<a th:href="@{/admin/redirect/hive/mobile/order}" class=""> <i
-					class="am-header-icon am-icon-chevron-left"></i>
-				</a>
-			</div>
-
-			<h1 class="am-header-title">
-				<a href="#title-link" class=""> 服务单 </a>
-			</h1>
-
-			<!-- <div class="am-header-right am-header-nav">
-				
-			</div> -->
-		</header>
-		<!-- 头部结束 -->
-	      
-		<!-- 订单内容 -->
-		<div class="main main1">
-			<form class="am-form am-form-horizontal"  id="dataform" onsubmit="javascripr:return false;">
-				<div id="serach" style="display: none"
-					class="am-form-group am-form-select am-input-group  am-input-group-primary am-g  title">
-					<div id="orderSelect" class="am-u-sm-4">
-						<select name="state" id="state" >
-							<option value=''>服务单状态</option>
-							<option value="待预约">待预约</option>
-							<option value="预约成功待处理">预约成功待处理</option>
-							<option value="预约失败">预约失败</option>
-							<option value="预约取消">预约取消</option>
-							<option value="需配料">需配料</option>
-							<option value="配料完成">配料完成</option>
-							<option value="服务中">服务中</option>
-							<option value="服务完成">服务完成</option>
-							<option value="服务单结束">服务单结束</option>
-						</select>
-					</div>
-					<div class="am-u-sm-5 search">
-						<input autocomplete="off"   type="text" class="searchIn" name="vipName" placeholder="用户姓名"/>
-						<!-- 记录当前页 -->
-						<input autocomplete="off"   type="hidden" name="offset" id="_offset"  value="0" />
-						<input autocomplete="off"   type="hidden" name="limit"   value="10" />
-					</div>
-					<div class="am-u-sm-3 btn">
-						<button type="button" class="am-btn am-btn-default am-radius searchBtn"  onclick="Pagination.serchDate()">搜索</button>
-					</div>
-				</div>
-				
-				<!-- 商品表格 -->
-				<div data-am-widget="list_news" id="context" style="display: none;"
-					class="am-list-news am-list-news-default">
-					<!--列表标题-->
-					<div class="am-list-news-hd am-cf am-g">
-						<div class="am-u-sm-4 ">
-							<h2 class="am-list-news-more am-fr">编号</h2>
-						</div>		
-						<div class="am-u-sm-3 ">
-							<h2 class="am-list-news-more am-fr">客户姓名</h2>
-						</div>
-						<div class="am-u-sm-3 ">
-							<h2 class="am-list-news-more am-fr">状态</h2>
-						</div>
-						<div class="am-u-sm-2 ">
-							<h2 class="am-list-news-more am-fr">操作</h2>
-						</div>
-					</div>
-					<div class="am-list-news-bd">
-						<ul class="am-list" id="showdataBox">							
-						</ul>
-					</div>
-					<div id="pagingBox" align="center" style="margin-top: 10px">
-					</div>
-				</div>
-				<!-- 商品展示结束 -->
-				<!-- 测试 -->
-			</form>
-		</div>
-		<!-- 订单内容结束 -->
-
-	</div>
-	
-	<script	th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<script th:src="@{/plugin/amazingUI/js/amazeui.min.js}"></script>
-	<script>
-
-	/**
-	加载数据
-	**/
-	$(function(){
-		Pagination.init({
-			url: basePath+"/admin/projService/getStaffServiceOrder",
-			builderDate:function(loj){
-				var html="";
-				//构建数据
-				if(loj.getRowCount()>0){
-					$("#serach").show();
-					$("#context").show();
-
-
-
-					for(var i=0 ; i<loj.getRowCount(); i++ ){
-						var option='';
-						var id=loj.getString(i,"id");
-						if(loj.getString(i,"state")=='配料完成'){
-							option='<a class="am-list-item-hd"   onclick="startService('+id+')" >开始服务</a>';
-						}else if(loj.getString(i,"state")=='服务中'){
-							option='<a class="am-list-item-hd"   onclick="endService('+id+')" >结束服务</a>';
-						}
-
-						html+=' <li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left"> <div class="am-u-sm-4 "> <h3 class="am-list-item-hd">'
-							+loj.getString(i,"serviceNo")+
-							'</h3> </div> <div class="am-u-sm-3 "><h3 class="am-list-item-hd">'
-							+loj.getString(i,"vipInfo.vipName")+
-							'</h3> </div> <div class="am-u-sm-3 "> <h3 class="am-list-item-hd">'
-							+loj.getString(i,"state")+
-							'</h3> </div><div class="am-u-sm-2 ">'
-							+'<a class="am-list-item-hd"   href="'+basePath+'/admin/projService/serviceInfo?id='+loj.getString(i,"id")+'&page=mobile" >详情</a> | ' +option+ '</div></li>'
-					}
-					//显示数据
-					//$("#showdataBox").html(html);
-					return html;
-				}else{
-					$("#pagingBox").hide();
-
-				}
-			}
-		}).serchDate();
-	})
-
-	function endService(id) {
-
-		var url = basePath + "/admin/projService/endService?id=" + id;
-		$
-				.AjaxProxy()
-				.invoke(
-						url,
-						function (loj) {
-							console.log(loj);
-							if (loj.status = '200') {
-								layer
-										.open({
-											content: "服务结束~",
-											className: 'shouBox',
-											time: 2,
-											end: function (elem) {
-												Pagination.serchDate();
-											}
-										});
-
-							}
-						})
-	}
-
-	function startService(id) {
-		var url = basePath + "/admin/projService/startService?id=" + id;
-		$
-				.AjaxProxy()
-				.invoke(
-						url,
-						function (loj) {
-							console.log(loj);
-							if (loj.status = '200') {
-								layer
-										.open({
-											content: "服务开始~",
-											className: 'shouBox',
-											time: 2,
-											end: function (elem) {
-												Pagination.serchDate();
-											}
-										});
-							}
-						})
-	}
-		  
-	</script>
-	<!-- index js -->
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-end-service.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-end-service.html
deleted file mode 100644
index 8804a15..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-end-service.html
+++ /dev/null
@@ -1,303 +0,0 @@
-
-
-
-
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-<!-- Add to homescreen for Chrome on Android -->
-<meta name="mobile-web-app-capable" content="yes">
-
-
-<!-- Add to homescreen for Safari on iOS -->
-<meta name="apple-mobile-web-app-capable" content="yes">
-<meta name="apple-mobile-web-app-status-bar-style" content="black">
-<meta name="apple-mobile-web-app-title" content="Amaze UI" />
-
-
-<!-- Tile icon for Win8 (144x144 + tile color) -->
-
-<meta name="msapplication-TileColor" content="#0e90d2">
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	href= basePath+"/css/dingOrderUseNew.css">
-<link rel="stylesheet" type="text/css"
-	  th:href="@{/plugin/LCalendar/src/css/LCalendar.css">
-
-</head>
-<script>
-	
-</script>
-<body>
-	<!-- 待预约详情页面 -->
-	<!-- 头部开始 -->
-	<header data-am-widget="header" class="am-header color-w back-m1">
-		<div class="am-header-left am-header-nav">
-			<a th:href="@{/admin/redirect/hive/mobile/order-use-inservice" class=""> <i
-				class="am-header-icon am-icon-chevron-left"></i>
-			</a>
-		</div>
-
-		<h1 class="am-header-title">
-			<a href="#title-link" class="">服务单</a>
-		</h1>
-
-		<!-- <div class="am-header-right am-header-nav">
-			
-		</div> -->
-	</header>
-	<!-- 头部结束 -->
-
-	<form class="am-form am-form-horizontal" id="dataform"
-		onsubmit="javascripr:return false;">
-		<div class="main main2">	 
-		<input autocomplete="off"   type="hidden" id="serviceId" name="id"
-			value="${projServices.id }" />
-		<div class="am-input-group am-form-group  am-input-group-primary am-g">
-			<div class="am-u-sm-4">
-				<span class="am-input-group-label">服务编号</span>
-			</div>
-			<div class="am-u-sm-8">
-				<span class="am-input-group-label" th:text="${projServices.serviceNo }"></span>
-			</div>
-		</div>
-		<div class="am-input-group am-form-group  am-input-group-primary am-g">
-			<div class="am-u-sm-4">
-				<span class="am-input-group-label">客户姓名</span>
-			</div>
-			<div class="am-u-sm-8">
-				<span class="am-input-group-label" th:text="${projServices.vipName }"></span>
-			</div>
-		</div>
-		
-		<div class="am-input-group am-form-group  am-input-group-primary am-g">
-			<div class="am-u-sm-4">
-				<span class="am-input-group-label">下单顾问</span>
-			</div>
-			<div class="am-u-sm-8">
-				<span class="am-input-group-label" th:text="${projServices.createStaffName }"></span>
-			</div>
-		</div>
-		<div class="am-input-group am-form-group  am-input-group-primary am-g">
-			<div class="am-u-sm-4">
-				<span class="am-input-group-label">创建时间</span>
-			</div>
-			<div class="am-u-sm-8">
-				<span class="am-input-group-label"
-					  th:text="${#dates.format(projServices.createTime,'yyyy-MM-dd HH:mm')}"
-				> </span>
-			</div>
-		</div>
-		<div class="am-input-group am-form-group  am-input-group-primary am-g">
-			<div class="am-u-sm-4">
-				<span class="am-input-group-label">配料师</span>
-			</div>
-			<div class="am-u-sm-8">
-				<span class="am-input-group-label" th:text="${projServices.plsName }"></span>
-			</div>
-		</div>
-		<div class="am-input-group am-form-group  am-input-group-primary am-g">
-			<div class="am-u-sm-4">
-				<span class="am-input-group-label">美疗师</span>
-			</div>
-			<div class="am-u-sm-8">
-				<span class="am-input-group-label" th:each="item:${projServices.beauticianStates }">
-					<span th:if="${projServices.beauticianId eq item.beautiStaffInfo.suId}" th:text="'【主:'+${item.beautiStaffInfo.suName }+'】'" ></span>
-					<span th:if="${projServices.beauticianId ne item.beautiStaffInfo.suId}" th:text="'【'+${item.beautiStaffInfo.suName }+'】'"></span>
-				<br>
-				</span>
-			</div>
-		</div>
-
-
-		<c:if test="">
-			<div th:if="${not empty projServices.projUses}"  th:each="item:${projServices.projUses }">
-				<hr>
-				<div
-					class="am-input-group am-form-group  am-input-group-primary am-g">
-					<div class="am-u-sm-4">
-						<span class="am-input-group-label">项目名称</span>
-					</div>
-					<div class="am-u-sm-8">
-						<span class="am-input-group-label" th:text="${item.name  }"></span>
-					</div>
-				</div>
-				<div
-					class="am-input-group am-form-group  am-input-group-primary am-g">
-					<div class="am-u-sm-4">
-						<span class="am-input-group-label">剩余次数</span>
-					</div>
-					<div class="am-u-sm-8">
-						<span class="am-input-group-label" th:text="${item.surplusCount  }"></span>
-					</div>
-				</div>
-				<div
-					class="am-input-group am-form-group  am-input-group-primary am-g">
-					<div class="am-u-sm-4">
-						<span class="am-input-group-label">服务时长</span>
-					</div>
-					<div class="am-u-sm-8">
-						<span class="am-input-group-label" th:text="${item.projInfo.timeLength  }"></span>
-					</div>
-				</div>
-
-			</div>
-
-		<hr>
-		<div class="am-input-group am-form-group  am-input-group-primary am-g">
-			<div class="am-u-sm-4">
-				<span class="am-input-group-label">预约时间</span>
-			</div>
-			<div class="am-u-sm-8">
-				<div>
-					<span class="am-input-group-label" th:text="${#dates.format(projServices.yyTime,'yyyy-MM-dd HH:mm')}" >
-					</span>
-				</div>
-			</div>
-		</div>
-		<div class="am-input-group am-form-group  am-input-group-primary am-g">
-			<div class="am-u-sm-4">
-				<span class="am-input-group-label">服务开始时间</span>
-			</div>
-			<div class="am-u-sm-8">
-				<div>
-					<span class="am-input-group-label" th:text="${#dates.format(projServices.startTime,'yyyy-MM-dd HH:mm')}">
-					</span>
-				</div>
-			</div>
-		</div>
-
-		<div class="am-input-group am-form-group  am-input-group-primary am-g">
-			<div class="am-u-sm-4">
-				<span class="am-input-group-label">服务预计时长</span>
-			</div>
-			<div class="am-u-sm-8">
-				<div>
-					<span class="am-input-group-label" th:text="${projServices.totalTime }">
-						分钟 </span>
-				</div>
-			</div>
-		</div>
-
-
-		<div class="am-input-group am-form-group  am-input-group-primary am-g">
-			<div class="am-u-sm-4">
-				<span class="am-input-group-label">预约床位</span>
-			</div>
-			<div class="am-u-sm-8">
-				<div>
-					<span class="am-input-group-label" th:text="${projServices.bedName }">
-					</span>
-				</div>
-			</div>
-		</div>
-		<div class="am-input-group am-form-group  am-input-group-primary am-g">
-			<div class="am-u-sm-4">
-				<span class="am-input-group-label">备注</span>
-			</div>
-			<div class="am-u-sm-8">
-				<span class="am-input-group-label" th:text="${projServices.remark  }"></span>
-			</div>
-		</div>
-		<div class="am-input-group am-form-group  am-input-group-primary am-g">
-			<div class="am-u-sm-4">
-				<span class="am-input-group-label">皮肤状况</span>
-			</div>
-			<div class="am-u-sm-8">
-				<span class="am-input-group-label" th:text="${projServices.skinCond  }"></span>
-			</div>
-		</div>
-		<div class="am-input-group am-form-group  am-input-group-primary am-g">
-			<div class="am-u-sm-4">
-				<span class="am-input-group-label">其他信息</span>
-			</div>
-
-		</div>
-		<div class="Validform_checktip"></div>
-			
-
-					<div th:if="  " class="inputBtn">
-						<button class="am-btn btn-m1 am-radius am-btn-block"
-							type="button" onclick="toResult()">结束服务</button>
-					</div>
-
-		</div>
-	</form>
-
-
-	<script type="text/x-handlebars-template" id="amz-tpl">
-  {{>header header}}
-
-  {{>menu menu}}
-
-  {{>slider slider}}
-
-  {{>list_news list1}}
-
-  {{>gallery gallery}}
-
-  {{>list_news list2}}
-
-  {{>footer footer}}
-
-  {{>navbar navbar}}
-</script>
-	<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-	<script
-		th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<script th:src="@{/plugin/LCalendar/src/js/LCalendar.js}"></script>
-	<!-- index js -->
-	<script type="text/javascript">
-		function toResult() {
-			var id = $("#serviceId").val();
-			var url =  basePath+"/admin/projService/endService?id=" + id;
-			$
-					.AjaxProxy()
-					.invoke(
-							url,
-							function(loj) {
-								console.log(loj);
-								if (loj.status = '200') {
-									layer
-											.open({
-												content : "服务结束~",
-												className : 'shouBox',
-												time : 2,
-												end : function(elem) {
-													MTools
-															.redirect( basePath+"/admin/redirect/hive/mobile/order-use-inservice");
-												}
-											});
-
-								}
-							})
-		}
-	</script>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-look-endService.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-look-endService.html
deleted file mode 100644
index 003014f..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-look-endService.html
+++ /dev/null
@@ -1,320 +0,0 @@
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-    <meta
-            content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-            name="viewport"/>
-    <title th:text="${session.userInfo.shopName }"></title>
-
-    <!-- Set render engine for 360 browser -->
-    <meta name="renderer" content="webkit">
-
-    <!-- No Baidu Siteapp-->
-    <meta http-equiv="Cache-Control" content="no-siteapp"/>
-
-
-    <!-- Add to homescreen for Chrome on Android -->
-    <meta name="mobile-web-app-capable" content="yes">
-
-
-    <!-- Add to homescreen for Safari on iOS -->
-    <meta name="apple-mobile-web-app-capable" content="yes">
-    <meta name="apple-mobile-web-app-status-bar-style" content="black">
-    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
-
-
-    <!-- Tile icon for Win8 (144x144 + tile color) -->
-
-    <meta name="msapplication-TileColor" content="#0e90d2">
-    <script type="text/javascript"
-            th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-    <script type="text/javascript"
-            th:src="@{/js/systools/DDMBase.js}"></script>
-    <link rel="stylesheet"
-          th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-    <link rel="stylesheet"
-          th:href="@{/plugin/amazingUI/css/app.css}">
-    <link rel="stylesheet" type="text/css"
-          th:href="@{/css/dingUserVip.css}">
-    <link rel="stylesheet" type="text/css"
-		  th:href="@{/plugin/LCalendar/src/css/LCalendar.css}">
-
-</head>
-<script>
-
-</script>
-<body>
-<!-- 待预约详情页面 -->
-<!-- 头部开始 -->
-<!-- 头部开始 -->
-<header data-am-widget="header" class="am-header color-w back-m1">
-    <div class="am-header-left am-header-nav">
-        <a onclick="javascript:history.back(-1)" class=""> <i
-                class="am-header-icon am-icon-chevron-left"></i>
-        </a>
-    </div>
-
-    <h1 class="am-header-title">
-        <a href="#title-link" class="">服务单</a>
-    </h1>
-
-    <!-- <div class="am-header-right am-header-nav">
-
-    </div> -->
-</header>
-<!-- 头部结束 -->
-<div th:if="${obj== null}">
-    <p id="empty-car">查询失败</p>
-</div>
-<div class="main3">
-    <form class="am-form am-form-horizontal" id="dataform"
-          onsubmit="javascripr:return false;">
-        <!-- <div class="main main1">	 -->
-        <input autocomplete="off"   type="hidden" id="serviceId" name="id"
-               th:value="${obj.id }"/>
-		<div class="am-input-group am-form-group  am-input-group-primary am-g">
-			<div class="am-u-sm-4">
-				<span class="am-input-group-label">服务编号</span>
-			</div>
-			<div class="am-u-sm-8">
-				<span class="am-input-group-label" th:text="${obj?.serviceNo }"></span>
-			</div>
-		</div>
-		<div class="am-input-group am-form-group  am-input-group-primary am-g">
-			<div class="am-u-sm-4">
-				<span class="am-input-group-label">客户姓名</span>
-			</div>
-			<div class="am-u-sm-8">
-				<span class="am-input-group-label" th:text="${obj?.vipInfo.vipName }"></span>
-			</div>
-		</div>
-
-		<div class="am-input-group am-form-group  am-input-group-primary am-g">
-			<div class="am-u-sm-4">
-				<span class="am-input-group-label">下单顾问</span>
-			</div>
-			<div class="am-u-sm-8">
-				<span class="am-input-group-label" th:text="${obj?.createStaffName }"></span>
-			</div>
-		</div>
-		<div class="am-input-group am-form-group  am-input-group-primary am-g">
-			<div class="am-u-sm-4">
-				<span class="am-input-group-label">创建时间</span>
-			</div>
-			<div class="am-u-sm-8">
-				<span class="am-input-group-label"
-					  th:text="${#dates.format(obj.createTime,'yyyy-MM-dd HH:mm')}"
-				> </span>
-			</div>
-		</div>
-		<div class="am-input-group am-form-group  am-input-group-primary am-g">
-			<div class="am-u-sm-4">
-				<span class="am-input-group-label">配料师</span>
-			</div>
-			<div class="am-u-sm-8">
-				<span class="am-input-group-label" th:text="${obj?.plsName }"></span>
-			</div>
-		</div>
-
-			<div   th:each="item:${obj.serviceItems }">
-				<hr>
-				<div
-						class="am-input-group am-form-group  am-input-group-primary am-g">
-					<div class="am-u-sm-4">
-						<span class="am-input-group-label">项目名称</span>
-					</div>
-					<div class="am-u-sm-8">
-						<span class="am-input-group-label" th:text="${item.projInfo.name  }"></span>
-					</div>
-				</div>
-				<div
-						class="am-input-group am-form-group  am-input-group-primary am-g">
-					<div class="am-u-sm-4">
-						<span class="am-input-group-label">美疗师</span>
-					</div>
-					<div class="am-u-sm-8">
-						<span class="am-input-group-label" th:text="${item.beautiStaffInfo?.suName  }"></span>
-					</div>
-				</div>
-				<div
-						class="am-input-group am-form-group  am-input-group-primary am-g">
-					<div class="am-u-sm-4">
-						<span class="am-input-group-label">剩余次数</span>
-					</div>
-					<div class="am-u-sm-8">
-						<span class="am-input-group-label" th:text="${item.projUse.surplusCount  }"></span>
-					</div>
-				</div>
-				<div
-						class="am-input-group am-form-group  am-input-group-primary am-g">
-					<div class="am-u-sm-4">
-						<span class="am-input-group-label">服务时长</span>
-					</div>
-					<div class="am-u-sm-8">
-						<span class="am-input-group-label" th:text="${item.projInfo.timeLength  }"></span>
-					</div>
-				</div>
-
-			</div>
-
-			<hr>
-			<div class="am-input-group am-form-group  am-input-group-primary am-g">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">预约时间</span>
-				</div>
-				<div class="am-u-sm-8">
-					<div>
-					<span class="am-input-group-label" th:text="${#dates.format(obj.yyTime,'yyyy-MM-dd HH:mm')}" >
-					</span>
-					</div>
-				</div>
-			</div>
-			<div class="am-input-group am-form-group  am-input-group-primary am-g">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">服务开始时间</span>
-				</div>
-				<div class="am-u-sm-8">
-					<div>
-					<span class="am-input-group-label" th:text="${#dates.format(obj.startTime,'yyyy-MM-dd HH:mm')}">
-					</span>
-					</div>
-				</div>
-			</div>
-
-			<div class="am-input-group am-form-group  am-input-group-primary am-g">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">服务预计时长</span>
-				</div>
-				<div class="am-u-sm-8">
-					<div>
-					<span class="am-input-group-label" th:text="${obj?.totalTime }">
-						分钟 </span>
-					</div>
-				</div>
-			</div>
-
-
-			<div class="am-input-group am-form-group  am-input-group-primary am-g">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">预约床位</span>
-				</div>
-				<div class="am-u-sm-8">
-					<div>
-					<span class="am-input-group-label" th:text="${obj?.bedName }">
-					</span>
-					</div>
-				</div>
-			</div>
-			<div class="am-input-group am-form-group  am-input-group-primary am-g">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">备注</span>
-				</div>
-				<div class="am-u-sm-8">
-					<span class="am-input-group-label" th:text="${obj?.remark  }"></span>
-				</div>
-			</div>
-			<div class="am-input-group am-form-group  am-input-group-primary am-g">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">皮肤状况</span>
-				</div>
-				<div class="am-u-sm-8">
-					<span class="am-input-group-label" th:text="${obj?.skinCond  }"></span>
-				</div>
-			</div>
-			<div class="am-input-group am-form-group  am-input-group-primary am-g">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">其他信息</span>
-				</div>
-
-			</div>
-
-            <div th:if="${obj.state eq '配料完成'}" class="inputBtn">
-                <button class="am-btn btn-m1 am-radius am-btn-block"
-                        type="button" onclick="startService()">开始服务
-                </button>
-            </div>
-            <div th:if="${obj.state eq '服务中' }" class="inputBtn">
-                <button class="am-btn btn-m1 am-radius am-btn-block"
-                        type="button" onclick="endService()">结束服务
-                </button>
-            </div>
-    </form>
-</div>
-
-<script type="text/x-handlebars-template" id="amz-tpl">
-    {{>header header}}
-
-    {{>menu menu}}
-
-    {{>slider slider}}
-
-    {{>list_news list1}}
-
-    {{>gallery gallery}}
-
-    {{>list_news list2}}
-
-    {{>footer footer}}
-
-    {{>navbar navbar}}
-</script>
-<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-<script
-        th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-<script th:src="@{/plugin/LCalendar/src/js/LCalendar.js}"></script>
-<!-- index js -->
-<script type="text/javascript">
-    function endService() {
-        var id = $("#serviceId").val();
-        var url = basePath + "/admin/projService/endService?id=" + id;
-        $
-            .AjaxProxy()
-            .invoke(
-                url,
-                function (loj) {
-                    console.log(loj);
-                    if (loj.status = '200') {
-                        layer
-                            .open({
-                                content: "服务结束~",
-                                className: 'shouBox',
-                                time: 2,
-                                end: function (elem) {
-									history.back(-1);
-                                }
-                            });
-
-                    }
-                })
-    }
-
-    function startService() {
-        var id = $("#serviceId").val();
-        var url = basePath + "/admin/projService/startService?id=" + id;
-        $
-            .AjaxProxy()
-            .invoke(
-                url,
-                function (loj) {
-                    console.log(loj);
-                    if (loj.status = '200') {
-                        layer
-                            .open({
-                                content: "服务开始~",
-                                className: 'shouBox',
-                                time: 2,
-                                end: function (elem) {
-									history.back(-1);
-                                }
-                            });
-
-                    }
-                })
-    }
-</script>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-new.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-new.html
deleted file mode 100644
index 0ce22aa..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-new.html
+++ /dev/null
@@ -1,320 +0,0 @@
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-    <meta
-            content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-            name="viewport"/>
-    <title th:text="${session.userInfo.shopName }"></title>
-
-    <!-- Set render engine for 360 browser -->
-    <meta name="renderer" content="webkit">
-
-    <!-- No Baidu Siteapp-->
-    <meta http-equiv="Cache-Control" content="no-siteapp"/>
-
-    <!-- Add to homescreen for Chrome on Android -->
-    <meta name="mobile-web-app-capable" content="yes">
-
-
-    <!-- Add to homescreen for Safari on iOS -->
-    <meta name="apple-mobile-web-app-capable" content="yes">
-    <meta name="apple-mobile-web-app-status-bar-style" content="black">
-    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
-
-
-    <!-- Tile icon for Win8 (144x144 + tile color) -->
-
-    <meta name="msapplication-TileColor" content="#0e90d2">
-    <script type="text/javascript"
-            th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-    <script type="text/javascript"
-            th:src="@{/js/systools/DDMBase.js}"></script>
-    <link rel="stylesheet"
-          th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-    <link rel="stylesheet"
-          th:href="@{/plugin/amazingUI/css/app.css}">
-    <link rel="stylesheet" type="text/css"
-          th:href="@{/css/dingOrderUseNew.css}">
-    <link rel="stylesheet" type="text/css"
-          th:href="@{/plugin/LCalendar/src/css/LCalendar.css}">
-    <style>
-        .am-form .input-num[type=number] {
-            padding: 0;
-            text-align: center;
-            border: 1px solid #eee
-        }
-    </style>
-</head>
-<script th:if="${session.CURRENT_CUSTOMER eq null}">
-
-    MTools.redirect(basePath + "/admin/redirect/hive/mobile/order-search");
-
-</script>
-
-<body>
-<!-- 购物车页面 -->
-<!-- 头部开始 -->
-<header data-am-widget="header" class="am-header color-w back-m1">
-    <div class="am-header-left am-header-nav">
-        <a onclick="javascript:history.back(-1)" class=""> <i
-                class="am-header-icon am-icon-chevron-left"></i>
-        </a>
-    </div>
-
-    <h1 class="am-header-title">
-        <a href="#title-link" class=""> 新建服务 </a>
-    </h1>
-
-    <!-- <div class="am-header-right am-header-nav">
-        <a href="###" class=""> <i class="am-header-icon am-icon-bars"></i>
-        </a>
-    </div> -->
-</header>
-<!-- 头部结束 -->
-
-<!-- 购物车表单开始 -->
-<form class="am-form am-form-horizontal" id="dataform"
-      onsubmit="javascripr:return false;">
-    <input type="hidden"  th:value="${session.CURRENT_CUSTOMER?.id }" name="vipId" />
-    <div class="main main1">
-        <div data-am-widget="list_news"
-             class="am-list-news am-list-news-default">
-            <h3 style="text-align: center;" id="tite">可消耗的项目</h3>
-            <div class="am-list-news-bd">
-                <ul class="am-list" id="ul_order_use">
-
-                </ul>
-            </div>
-        </div>
-
-        <div class="am-input-group am-form-group  am-input-group-primary am-g" id="ps">
-            <div class="am-u-sm-4">
-                <span class="am-input-group-label">备注</span>
-            </div>
-            <div class="am-u-sm-8">
-                <div>
-                    <textarea rows="3" name="remark"></textarea>
-                </div>
-            </div>
-        </div>
-        <div id="submitBtn">
-
-            <div
-                    class="am-input-group am-form-group  am-input-group-primary am-g">
-                <div class="am-u-sm-4">
-                    <span class="am-input-group-label">预约时间</span>
-                </div>
-                <div class="am-u-sm-8">
-                    <!--  <div>
-                        <input    id="demo1" style="display: none" type="text" readonly=""
-                            placeholder="日期选择特效"  />
-                    </div>  -->
-                    <div>
-                        <input id="time" name="yyTime" type="text" readonly=""
-                               placeholder="请选择时间" dataType="*" nullmsg="请选择时间" data-lcalendar="2016-05-11,2016-05-11"/>
-                    </div>
-                </div>
-            </div>
-            <input type="hidden" id="projIds" name="projIds"/>
-
-            <div class="Validform_checktip"></div>
-            <div class="inputBtn">
-                <button class="am-btn btn-m1 am-radius am-btn-block"
-                        type="button" onclick="myForm.submit()">新建服务
-                </button>
-            </div>
-
-        </div>
-    </div>
-
-</form>
-
-<!-- 购物车表单结束 -->
-<script type="text/javascript">
-
-    /* $("#time").attr("data-lcalendar",date2+","+date3); */
-
-</script>
-
-<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-<script
-        th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-<script th:src="@{/plugin/LCalendar/src/js/LCalendar.js}"></script>
-<!-- index js -->
-<script type="text/javascript">
-    /* $('.datetimepicker').datetimepicker({
-        format : "yyyy-mm-dd hh:ii",
-        autoclose: true,
-    }); */
-
-
-    $(function () {
-        /* 计算当前时间 */
-
-
-        MTools.autoFullSelect();
-
-        $
-            .AjaxProxy()
-            .invoke(
-                basePath + "/admin/projService/getUserProjInfo",
-                function (loj) {
-                    var html = "";
-                    var taoCanList = loj.attr("result")["mapInfo"].taoCanList;
-
-                    var projList=loj.attr("result")["mapInfo"].projList;
-
-                    if (projList.length > 0 || taoCanList.length > 0) {
-
-                        var flag = -1; //用来设置不同name的值
-                        //循环取出套餐的信息
-
-                        for (var i = 0; i < taoCanList.length; i++) {
-                            var taocanInfo = taoCanList[i];
-                            html += '<li class="lic am-g " >'
-                                + '<div class=" am-u-sm-9 am-list-main"><h3 class="am-list-item-hd">'
-                                + taocanInfo.projName
-                                + '</h3></div><div class="  am-list-main"><h3 class="am-list-item-hd color-r"> <strong>余次'
-                                + taocanInfo.surplusCount
-                                + '</strong></h3></li>';
-
-                            //循环取出一个套餐中包含的项目
-                            for (var j = 0; j < taocanInfo.taocanProjUse.length; j++) {
-                                flag += 1;
-                                var projUse = taocanInfo.taocanProjUse[j];
-
-                                html += '<li class="lic am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left " >'
-                                    + '<div class=" am-u-sm-1 am-list-thumb ">'
-                                    + '<label class=" am-checkbox ">'
-                                    + '<input    id="box' + flag + '"  type="checkbox"   name="projBox" class="check" value='
-                                    + projUse.id
-                                    + '></label></div>'
-                                    + '<div class=" am-u-sm-5 am-list-main"><h3 class="am-list-item-hd">'
-                                    + projUse.projName
-                                    + '</h3></div><div class=" am-u-sm-2 am-list-main"><h3 class="am-list-item-hd color-y">'
-                                    + projUse.projInfo.timeLength
-                                    + '&nbsp;分钟</h3></div><div class="am-u-sm-2 am-list-thumb color-num">&nbsp;<span>'
-                                    + projUse.surplusCount
-                                    + '</span></div>'
-                                    + '<div class="am-u-sm-2 am-list-thumb color-num">'
-                                    + '<input    class="input-num" id="inputbox' + flag + '" placeholder="次数" value="1" type="number" max="8" min="1"/>'
-                                    + '</div>'
-                                    + '</li>';
-                            }
-                            html += '<div class="taocan"></div>'
-                                + '</div>';
-                        }
-
-                        if (projList.length > 0) {
-                            //循环取出项目列表
-                            for (var i = 0; i < projList.length; i++) {
-                                var  projUse=projList[i];
-                                flag += 1;
-                                html += ' <li class=" lic  am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left " >'
-                                    + '<div class=" am-u-sm-1 am-list-thumb "><label class=" am-checkbox ">'
-                                    + '<input     id="box' + flag + '" type="checkbox" name="projBox" class="check " value='
-                                    + projUse.id
-                                    + '></label></div>'
-                                    + '<div class=" am-u-sm-5 am-list-main"><h3 class="am-list-item-hd">'
-                                    + projUse.projName
-                                    + '</h3></div><div class="am-u-sm-2 am-list-thumb color-num">&nbsp;<span>余'
-                                    + projUse.surplusCount
-                                    + '次</span></div>'
-                                    + '<div class="am-u-sm-2 am-list-thumb color-num">'
-                                    + '<input    class="input-num" type="number" id="inputbox' + flag + '" value="1" max="8" min="1"/>'
-                                    + '</div></li><div class="taocan"></div>';
-                            }
-                        }
-
-
-                    } else {
-                        $("#ps").remove();
-                        $("#tite").remove();
-                        html = '<p style="text-align:center">没有可消耗的项目!</p>'
-                            + '<p style="text-align:center"><a  href="' + basePath + '/admin/redirect/hive/mobile/order-list"> 马上去选购! </a></p>'
-                        $("#submitBtn").hide();
-                    }
-                    //显示数据
-                    $("#ul_order_use").html(html);
-                    //初始化表单
-                    myForm = MForm
-                        .initForm({
-                            invokeUrl: basePath + "/admin/projService/addServiceForForm",
-
-                            beforeSubmit: function () {
-
-                                var projIds = "";
-
-                                var param = this.extendParam;
-
-                                $('input:checkbox[name=projBox]:checked').each(function (i) {
-                                    var num = $("#input" + $(this).attr("id")).val();
-                                    var puseId = $(this).val();
-                                    param["serviceItems[" + i + "].puseId"] = puseId;
-                                    param["serviceItems[" + i + "].count"] = num;
-                                    projIds += puseId;
-                                });
-
-                                if (projIds == "") {
-                                    layer.alert("请选择要消耗的项目!");
-                                    return false;
-                                }
-                                return true;
-                            },
-                            afterSubmit: function (loj) {
-                                var msg = '';
-                                if (loj.attr("result").status == '200') {
-                                    msg = '消耗成功';
-                                    layer
-                                        .open({
-                                            shade: false,
-                                            content: msg,
-                                            className: 'showBox',
-                                            time: 1,
-                                            end: function (
-                                                elem) {
-                                                history.back(-1);
-                                            }
-                                        });
-                                }
-                            }
-                        });
-                    $(".check").uCheck('enable');
-
-
-                });
-
-    })
-</script>
-
-<script type="text/javascript">
-
-    $(function () {
-        var d = new Date();
-        if (d.getMonth() + 1 < 10) {
-            var mon = "0" + d.getMonth();
-        }
-        if (d.getDate() < 10) {
-            var da = "0" + d.getDate();
-        }
-
-        var date1 = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate();
-        var date2 = d.getFullYear() + "-" + (d.getMonth() + 2) + "-" + d.getDate();
-
-
-        var calendardatetime = new LCalendar();
-        calendardatetime.init({
-            'trigger': '#time',
-            'type': 'datetime',
-            'minDate': date1, //最小日期
-            'maxDate': date2 //最大日期
-        });
-    });
-
-
-</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-start-service.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-start-service.html
deleted file mode 100644
index 249976b..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-start-service.html
+++ /dev/null
@@ -1,298 +0,0 @@
-
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-<!-- Add to homescreen for Chrome on Android -->
-<meta name="mobile-web-app-capable" content="yes">
-
-
-<!-- Add to homescreen for Safari on iOS -->
-<meta name="apple-mobile-web-app-capable" content="yes">
-<meta name="apple-mobile-web-app-status-bar-style" content="black">
-<meta name="apple-mobile-web-app-title" content="Amaze UI" />
-
-
-<!-- Tile icon for Win8 (144x144 + tile color) -->
-
-<meta name="msapplication-TileColor" content="#0e90d2">
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	  th:href="@{/css/dingOrderUseNew.css}">
-<link rel="stylesheet" type="text/css"
-	  th:href="@{/plugin/LCalendar/src/css/LCalendar.css}">
-<style>
-	.inputBtn{
-		margin-bottom:10px;
-	}
-</style>
-</head>
-<script>
-	
-</script>
-<body>
-	<!-- 待预约详情页面 -->
-	<!-- 头部开始 -->
-	<header data-am-widget="header" class="am-header color-w back-m1">
-		<div class="am-header-left am-header-nav">
-			<a th:href="@{/admin/redirect/hive/mobile/order-use-waitservice}" class="">
-				<i class="am-header-icon am-icon-chevron-left"></i>
-			</a>
-		</div>
-
-		<h1 class="am-header-title">
-			<a href="#title-link" class="">开始服务</a>
-		</h1>
-
-		<!-- <div class="am-header-right am-header-nav"></div> -->
-	</header>
-	<!-- 头部结束 -->
-
-				<form class="am-form am-form-horizontal" id="dataform"
-					  onsubmit="javascripr:return false;">
-					<div class="main main2">
-						<input autocomplete="off"   type="hidden" id="serviceId" name="id"
-							   value="${projServices.id }" />
-						<div class="am-input-group am-form-group  am-input-group-primary am-g">
-							<div class="am-u-sm-4">
-								<span class="am-input-group-label">服务编号</span>
-							</div>
-							<div class="am-u-sm-8">
-								<span class="am-input-group-label" th:text="${projServices.serviceNo }"></span>
-							</div>
-						</div>
-						<div class="am-input-group am-form-group  am-input-group-primary am-g">
-							<div class="am-u-sm-4">
-								<span class="am-input-group-label">客户姓名</span>
-							</div>
-							<div class="am-u-sm-8">
-								<span class="am-input-group-label" th:text="${projServices.vipName }"></span>
-							</div>
-						</div>
-
-						<div class="am-input-group am-form-group  am-input-group-primary am-g">
-							<div class="am-u-sm-4">
-								<span class="am-input-group-label">下单顾问</span>
-							</div>
-							<div class="am-u-sm-8">
-								<span class="am-input-group-label" th:text="${projServices.createStaffName }"></span>
-							</div>
-						</div>
-						<div class="am-input-group am-form-group  am-input-group-primary am-g">
-							<div class="am-u-sm-4">
-								<span class="am-input-group-label">创建时间</span>
-							</div>
-							<div class="am-u-sm-8">
-				<span class="am-input-group-label"
-					  th:text="${#dates.format(projServices.createTime,'yyyy-MM-dd HH:mm')}"
-				> </span>
-							</div>
-						</div>
-						<div class="am-input-group am-form-group  am-input-group-primary am-g">
-							<div class="am-u-sm-4">
-								<span class="am-input-group-label">配料师</span>
-							</div>
-							<div class="am-u-sm-8">
-								<span class="am-input-group-label" th:text="${projServices.plsName }"></span>
-							</div>
-						</div>
-						<div class="am-input-group am-form-group  am-input-group-primary am-g">
-							<div class="am-u-sm-4">
-								<span class="am-input-group-label">美疗师</span>
-							</div>
-							<div class="am-u-sm-8">
-				<span class="am-input-group-label" th:each="item:${projServices.beauticianStates }">
-					<span th:if="${projServices.beauticianId eq item.beautiStaffInfo.suId}" th:text="'【主:'+${item.beautiStaffInfo.suName }+'】' >"></span>
-					<span th:if="${projServices.beauticianId ne item.beautiStaffInfo.suId}" th:text="'【'+${item.beautiStaffInfo.suName }+'】' >"></span>
-				<br>
-				</span>
-							</div>
-						</div>
-
-
-						<c:if test="">
-							<div th:if="${not empty projServices.projUses}"  th:each="item:${projServices.projUses }">
-								<hr>
-								<div
-										class="am-input-group am-form-group  am-input-group-primary am-g">
-									<div class="am-u-sm-4">
-										<span class="am-input-group-label">项目名称</span>
-									</div>
-									<div class="am-u-sm-8">
-										<span class="am-input-group-label" th:text="${item.name  }"></span>
-									</div>
-								</div>
-								<div
-										class="am-input-group am-form-group  am-input-group-primary am-g">
-									<div class="am-u-sm-4">
-										<span class="am-input-group-label">剩余次数</span>
-									</div>
-									<div class="am-u-sm-8">
-										<span class="am-input-group-label" th:text="${item.surplusCount  }"></span>
-									</div>
-								</div>
-								<div
-										class="am-input-group am-form-group  am-input-group-primary am-g">
-									<div class="am-u-sm-4">
-										<span class="am-input-group-label">服务时长</span>
-									</div>
-									<div class="am-u-sm-8">
-										<span class="am-input-group-label" th:text="${item.projInfo.timeLength  }"></span>
-									</div>
-								</div>
-
-							</div>
-
-						<hr>
-						<div class="am-input-group am-form-group  am-input-group-primary am-g">
-							<div class="am-u-sm-4">
-								<span class="am-input-group-label">预约时间</span>
-							</div>
-							<div class="am-u-sm-8">
-								<div>
-					<span class="am-input-group-label" th:text="${#dates.format(projServices.yyTime,'yyyy-MM-dd HH:mm')}" >
-					</span>
-								</div>
-							</div>
-						</div>
-						<div class="am-input-group am-form-group  am-input-group-primary am-g">
-							<div class="am-u-sm-4">
-								<span class="am-input-group-label">服务开始时间</span>
-							</div>
-							<div class="am-u-sm-8">
-								<div>
-					<span class="am-input-group-label" th:text="${#dates.format(projServices.startTime,'yyyy-MM-dd HH:mm')}">
-					</span>
-								</div>
-							</div>
-						</div>
-
-						<div class="am-input-group am-form-group  am-input-group-primary am-g">
-							<div class="am-u-sm-4">
-								<span class="am-input-group-label">服务预计时长</span>
-							</div>
-							<div class="am-u-sm-8">
-								<div>
-					<span class="am-input-group-label" th:text="${projServices.totalTime }">
-						分钟 </span>
-								</div>
-							</div>
-						</div>
-
-
-						<div class="am-input-group am-form-group  am-input-group-primary am-g">
-							<div class="am-u-sm-4">
-								<span class="am-input-group-label">预约床位</span>
-							</div>
-							<div class="am-u-sm-8">
-								<div>
-					<span class="am-input-group-label" th:text="${projServices.bedName }">
-					</span>
-								</div>
-							</div>
-						</div>
-						<div class="am-input-group am-form-group  am-input-group-primary am-g">
-							<div class="am-u-sm-4">
-								<span class="am-input-group-label">备注</span>
-							</div>
-							<div class="am-u-sm-8">
-								<span class="am-input-group-label" th:text="${projServices.remark  }"></span>
-							</div>
-						</div>
-						<div class="am-input-group am-form-group  am-input-group-primary am-g">
-							<div class="am-u-sm-4">
-								<span class="am-input-group-label">皮肤状况</span>
-							</div>
-							<div class="am-u-sm-8">
-								<span class="am-input-group-label" th:text="${projServices.skinCond  }"></span>
-							</div>
-						</div>
-						<div class="am-input-group am-form-group  am-input-group-primary am-g">
-							<div class="am-u-sm-4">
-								<span class="am-input-group-label">其他信息</span>
-							</div>
-
-			</div>
-
-					<div class="inputBtn">
-						<button class="am-btn btn-m1 am-radius am-btn-block"
-							type="button" onclick="toResult()">开始服务</button>
-
-		</div>
-	</form>
-
-	<script type="text/x-handlebars-template" id="amz-tpl">
-  {{>header header}}
-
-  {{>menu menu}}
-
-  {{>slider slider}}
-
-  {{>list_news list1}}
-
-  {{>gallery gallery}}
-
-  {{>list_news list2}}
-
-  {{>footer footer}}
-
-  {{>navbar navbar}}
-</script>
-	<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-	<script
-		th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<script th:src="@{/plugin/LCalendar/src/js/LCalendar.js}"></script>
-	<!-- index js -->
-	<script type="text/javascript">
-		function toResult() {
-			var id = $("#serviceId").val();
-			var url =  basePath+"/admin/projService/startService?id=" + id;
-			$
-					.AjaxProxy()
-					.invoke(
-							url,
-							function(loj) {
-								console.log(loj);
-								if (loj.status = '200') {
-									layer
-											.open({
-												content : "服务开始~",
-												className : 'shouBox',
-												time : 2,
-												end : function(elem) {
-													MTools
-															.redirect( basePath+"/admin/redirect/hive/mobile/order-use-waitservice");
-												}
-											});
-
-								}
-							})
-		}
-	</script>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-time.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-time.html
deleted file mode 100644
index b4e9595..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-time.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-<!-- Add to homescreen for Chrome on Android -->
-<meta name="mobile-web-app-capable" content="yes">
-
-
-<!-- Add to homescreen for Safari on iOS -->
-<meta name="apple-mobile-web-app-capable" content="yes">
-<meta name="apple-mobile-web-app-status-bar-style" content="black">
-<meta name="apple-mobile-web-app-title" content="Amaze UI" />
-
-
-<!-- Tile icon for Win8 (144x144 + tile color) -->
-
-<meta name="msapplication-TileColor" content="#0e90d2">
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	  th:href="@{/css/dingPersonalCar.css}" >
- 
-    
-  
-   
-<link rel="stylesheet" type="text/css"
-	  th:href="@{/plugin/LCalendar/src/css/LCalendar.css}">
-</head>
-<body>
-	<!-- 购物车页面 -->
-	<!-- 头部开始 -->
-	<header data-am-widget="header" class="am-header color-w back-m1">
-		<div class="am-header-left am-header-nav">
-			<a th:href="@{/admin/redirect/hive/mobile/order-use?foot=3}" class=""> <i
-				class="am-header-icon am-icon-chevron-left"></i>
-			</a>
-		</div>
-
-		<h1 class="am-header-title">
-			<a href="#title-link" class=""> 新建消耗 </a>
-		</h1>
-
-		<!-- <div class="am-header-right am-header-nav">
-			<a href="###" class=""> <i class="am-header-icon am-icon-bars"></i>
-			</a>
-		</div> -->
-	</header>
-	<!-- 头部结束 -->
-
-				<!-- 购物车表单开始 -->
-		<form class="am-form am-form-horizontal" id="dataform"
-						onsubmit="javascripr:return false;">
-				<div class="main main1">
-					<div data-am-widget="list_news"
-						class="am-list-news am-list-news-default">
-						<div class="am-list-news-bd">
-							<ul class="am-list" id="ul_order_use">
-							
-							</ul>
-						</div>
-					</div>
-					<div id="submitBtn">
-						<div class="am-input-group am-form-group  am-input-group-primary am-g">
-							<div class="am-u-sm-4">
-								<span class="am-input-group-label">预约时间</span> 
-							</div>
-							<!-- 
-							<div class="am-u-sm-8">	
-								<input autocomplete="off"   type="text" readonly="readonly"
-									name="yyTime" class="am-form-field  datetimepicker"  />
-							 -->
-							 </div>
-							<div class="am-u-sm-8">
-								<div>
-	            					<input autocomplete="off"   id="demo2" type="text" readonly="" placeholder="日期和时间选择特效" value="2016-05-11 17:44" data-lcalendar="2016-05-11,2016-05-11" />
-	       						</div>
-       						</div>
-						</div>
-						<div  class="inputBtn">
-							<button  class="am-btn btn-m1 am-radius am-btn-block"
-								type="button" onclick="myForm.submit()">消耗</button>
-						</div>
-					</div>
-			</div>
-	</form>
-		<div>
-            <input autocomplete="off"   id="demo1" type="text" readonly="" placeholder="日期选择特效" data-lcalendar="2016-05-11,2016-05-11" />
-        </div>
-        
-        <div>
-            <input autocomplete="off"   id="demo3" type="text" readonly="" placeholder="时间选择特效" />
-        </div>
-        <div>
-            <input autocomplete="off"   id="demo4" type="text" readonly="" placeholder="年月选择特效" />
-        </div>
-			
-	<!-- 购物车表单结束 -->
-
-
-	<script type="text/x-handlebars-template" id="amz-tpl">
-  {{>header header}}
-
-  {{>menu menu}}
-
-  {{>slider slider}}
-
-  {{>list_news list1}}
-
-  {{>gallery gallery}}
-
-  {{>list_news list2}}
-
-  {{>footer footer}}
-
-  {{>navbar navbar}}
-</script>
-	<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-	<script
-		th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<!-- index js -->
-	<script type="text/javascript">
-	$('.datetimepicker').datetimepicker({
-		format : "yyyy-mm-dd hh:ii",
-		autoclose: true,
-	});
-	
-		//查询消耗列表 isOver=1表示完成,isOver=2未完成
-		$(function() {
-			$
-					.AjaxProxy({
-						p : {
-							isOver : 2
-						}
-					})
-					.invoke(
-							 basePath+"/admin/projService/findAllUnUseService",
-							function(loj) {
-								var html = "";
-								var ids = "";
-								if(loj.getRowCount()>0){
-								
-								for (var i = 0; i < loj.getRowCount(); i++) {
-									html += ' <li class=" lic  am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-right " >'
-											+ '<div class=" am-u-sm-2 am-list-thumb ">'
-											+ '<label class=" am-checkbox ">'
-											+ '<input autocomplete="off"    type="checkbox" name="projUses['+i+'].id" class="check " value='
-											+ loj.getString(i, "id")
-											+ '>'
-											+ '</label>'
-											+ '</div>'
-											+ '<div class=" am-u-sm-7 am-list-main">'
-											+ '<h3 class="am-list-item-hd">';
-									if (loj.getString(i, "projInfo")) {
-										html += loj.getString(i, "projInfo").projName
-									} else {
-										html += loj.getString(i, "taocanInfo").name
-									}
-									html += '</h3>'
-
-											+ ' </div>'
-											+ '<div class="am-u-sm-3 am-list-thumb">'
-											+ ' <span>余'
-											+ loj.getString(i, "surplusCount")
-											+ '次</span>' + '</div>' + '  </li>';
-
-								}
-								}else{
-									html="没有可消耗的项目!"
-									$("#submitBtn").hide();
-								}
-								//显示数据
-								$("#ul_order_use").html(html);
-
-								//初始化表单
-								myForm = MForm
-										.initForm({
-											invokeUrl :  basePath+"/admin/projService/addService",
-											afterSubmit : function(loj) {
-												var msg = '';
-												if (loj.attr("result").status == '200') {
-													msg = '消耗成功';
-													layer
-															.open({
-																shade : false,
-																content : msg,
-																className : 'showBox',
-																time : 1,
-																end : function(
-																		elem) {
-																	MTools
-																			.redirect( basePath+"/admin/redirect/hive/mobile/order-use");
-																}
-															});
-												} 
-											}
-										});
-
-							});
-		});
-		
-		$(function() {
-			$(".check").uCheck('enable');
-		})
-	</script>
-</body>    
-    <script 
-		th:src="@{/plugin/LCalendar/src/js/LCalendar.js}"></script>
-    <script>
-    var calendar = new LCalendar();
-    calendar.init({
-        'trigger': '#demo1', //标签id
-        'type': 'date', //date 调出日期选择 datetime 调出日期时间选择 time 调出时间选择 ym 调出年月选择,
-        'minDate': '1900-1-1', //最小日期
-        'maxDate': new Date().getFullYear() + '-' + (new Date().getMonth() + 1) + '-' + new Date().getDate() //最大日期
-    });
-    var calendardatetime = new LCalendar();
-    calendardatetime.init({
-        'trigger': '#demo2',
-        'type': 'datetime'
-    });
-    var calendartime = new LCalendar();
-    calendartime.init({
-        'trigger': '#demo3',
-        'type': 'time'
-    });
-    var calendarym = new LCalendar();
-    calendarym.init({
-        'trigger': '#demo4',
-        'type': 'ym',
-        'minDate': '1900-1',
-        'maxDate': new Date().getFullYear() + '-' + (new Date().getMonth() + 1)
-    });
-    </script>
-
-
-</html>
-	
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order.html
deleted file mode 100644
index 4a95988..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/order.html
+++ /dev/null
@@ -1,255 +0,0 @@
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<meta http-equiv="Cache-Control" content="no-transform" />
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-<head>
-<script>
-	if (window.top !== window.self) {
-		window.top.location = window.location
-	};
-</script>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-<!-- Add to homescreen for Chrome on Android -->
-<meta name="mobile-web-app-capable" content="yes">
-
-
-<!-- Add to homescreen for Safari on iOS -->
-<meta name="apple-mobile-web-app-capable" content="yes">
-<meta name="apple-mobile-web-app-status-bar-style" content="black">
-<meta name="apple-mobile-web-app-title" content="Amaze UI" />
-
-
-<!-- Tile icon for Win8 (144x144 + tile color) -->
-
-<meta name="msapplication-TileColor" content="#0e90d2">
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingOrder.css}">
- 
-</head>
-<body>
-	<!-- 订单管理页面 -->
-	<!-- 判断会员是否存在 -->
-
-	<div class="wrap">
-		<!-- 图片栏开始 -->
-		<div data-am-widget="slider" class="am-slider am-slider-c2"
-			data-am-slider='{&quot;directionNav&quot;:false}'>
-			<ul class="am-slides">
-				<li><img th:src="@{/images/dingImg/banner-img6.jpg}">
-					<div class="am-slider-desc" th:text="${session.userInfo.shopName }"></div></li>
-			</ul>
-		</div>
-		<!-- 图片结束 -->
-		<!-- 会员信息开始 -->
-
-
-			<div class="am-panel am-panel-secondary">
-				<div class="am-panel-hd">
-					<!-- 用来记录等级信息是否显示 -->
-					<input autocomplete="off"   type="hidden" vlaue="1" id="hidval">
-					<h2 class="am-panel-title" id="vipLevel"  th:if="${session.CURRENT_CUSTOMER ne null }" >
-						<span th:text="${session.CURRENT_CUSTOMER?.vipName }" ></span>
-						<a th:href="@{/admin/redirect/hive/mobile/order-search}">&nbsp;&nbsp;|<small>切换会员</small></a>
-					</h2>
-					<h2 class="am-panel-title" id="vipLevel" th:if="${session.CURRENT_CUSTOMER eq null }">
-						<a th:href="@{/admin/redirect/hive/mobile/order-search}">&nbsp;&nbsp;|<small>切换会员</small></a>
-					</h2>
-					<span class="down" alt="等级详情"></span>
-				</div>
-				<div class="vipMsg">
-					<ul class="am-list am-list-static am-list-border">
-						<li th:text="'会员手机: '+${session.CURRENT_CUSTOMER?.phone }"></li>
-						<li th:text="'会员积分:'+${session.CURRENT_CUSTOMER?.pointAll }"></li>
-					</ul>
-				</div>
-			</div>
-
-		<!--会员信息结束  -->
-		<!-- 表格部分开始 -->
-		<ul class="am-avg-sm-4 boxes " id="boxs">
-
-				<li class="box box-1"><a
-					th:href="@{/admin/redirect/hive/mobile/order-list}"> <img
-						th:src="@{/images/dingImg/xjdd.png}"></img><br>
-						<small class="boxs">新建订单</small>
-				</a></li>
-
-
-				<li class="box box-2"><a
-					th:href="@{/admin/redirect/hive/mobile/order-car}"> <img
-						th:src="@{/images/dingImg/gwc.png}"></img><br>
-						<small class="boxs">购物车</small>
-				</a></li>
-
-
-
-			<li class="box box-3"><a
-				th:href="@{/admin/redirect/hive/mobile/order-history}"> <img
-					th:src="@{/images/dingImg/wcdd.png}"></img><br> <small
-					class="boxs">订单</small>
-			</a></li>
-
-			<li class="box box-1"><a
-					th:href="@{/admin/redirect/hive/mobile/order-use-new}"> <img
-					th:src="@{/images/dingImg/cjff.png}"></img><br> <small
-					class="boxs">创建服务</small>
-			</a></li>
-
-			<li class="box box-4"><a
-				th:href="@{/admin/redirect/hive/mobile/order-use-completed}"> <img
-					th:src="@{/images/dingImg/xmfw.png}"></img><br>
-					<small class="boxs">项目服务</small>
-			</a></li>
-
-			
-		</ul>
-		<!-- 表格结束 -->
-		<!-- 表格结束 -->
-
-		<!-- foot开始 -->
-		<div class="footr" th:fragment="footr">
-    <div data-am-widget="navbar" class="am-navbar am-cf am-navbar-default "
-      id="">
-      <ul class="am-navbar-nav am-cf am-avg-sm-4">
-       	  <li >
-            <a th:href="@{/admin/redirect/hive/mobile/personal?foot=1}"class="change1" >
-                <img th:src="@{/images/dingImg/grzx2.png}" alt="个人中心"/>
-                <span class="am-navbar-label ">个人中心</span>
-            </a>
-          </li>
-
-           <li >
-            <a th:href="@{/admin/redirect/hive/mobile/CRM?foot=3}"  class="change3">
-                <img th:src="@{/images/dingImg/crm1.png}" alt="订单管理"/>
-                <span class="am-navbar-label">CRM</span>
-            </a>
-          </li>
-          <li >
-            <a th:href="@{/admin/redirect/hive/mobile/order?foot=4}"  class="change4">
-                <img th:src="@{/images/dingImg/ddgl1.png}" alt="商机管理"/>
-                <span class="am-navbar-label">订单管理</span>
-            </a>
-          </li>
-
-      </ul>
-    </div>
-  </div>
-
-		<!-- foot结束 -->
-
-	</div>
-
-	
-
-	<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-	<script
-		th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<!-- index js -->
-	<script type="text/javascript">
-		$(function() {
-			$("#vipLevel").bind("click", function() {
-				
-				 if ($("#hidval").val() == 1) {
-					$(".vipMsg").find('li').css('border','0');
-					$(".down").css("transform", "rotate(0deg)");
-					$(".vipMsg").slideUp(500, function() {
-						$("#hidval").val(0);
-						
-
-					})
-				} else {
-					$(".down").css("transform", "rotate(180deg)");
-					$(".vipMsg").slideDown(500, function() {
-						$("#hidval").val(1);
-						$(".vipMsg").find('li').css('border-bootom','1px solid #eee');
-
-					})
-				} 
-				
-			})
-		});
-		$(function(){
-			var count=$("#boxs").find("li").length;			
-			var index=count%4;
-			if(index==1){
-				$("#boxs").append(" <li class='box'>"+"</li>");
-				$("#boxs").append(" <li class='box'>"+"</li>");
-				$("#boxs").append(" <li class='box'>"+"</li>");
-			}
-			if(index==2){
-				$("#boxs").append(" <li class='box'>"+"</li>");
-				$("#boxs").append(" <li class='box'>"+"</li>");
-			}
-			if(index==3){
-				$("#boxs").append(" <li class='box'>"+"</li>");				
-			}
-		})
-
-
-		$(function(){
-			var id=$.query.get('foot');
-
-
-
-
-			$(".change"+id).children("span").css('color','#dfbd88');
-			switch(id){
-				case 1:
-
-					$(".change"+id).children("img").attr('src',basePath+'/images/dingImg/grzx.png');
-
-					break;
-
-				case 2:
-
-					$(".change"+id).children("img").attr('src',basePath+'/images/dingImg/customer3.png');
-
-					break;
-				case 3:
-
-					$(".change"+id).children("img").attr('src',basePath+'/images/dingImg/crm.png');
-
-					break;
-
-				case 4:
-
-					$(".change"+id).children("img").attr('src',basePath+'/images/dingImg/ddgl.png');
-
-					break;
-				default:
-					$(".change1").children("span").css('color','#dfbd88');
-					$(".change1").children("img").attr('src',basePath+'/images/dingImg/grzx.png');
-
-			}
-
-
-
-		});
-	</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-msg.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-msg.html
deleted file mode 100644
index c5971e3..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-msg.html
+++ /dev/null
@@ -1,288 +0,0 @@
-
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-<!-- Add to homescreen for Chrome on Android -->
-<meta name="mobile-web-app-capable" content="yes">
-
-
-<!-- Add to homescreen for Safari on iOS -->
-<meta name="apple-mobile-web-app-capable" content="yes">
-<meta name="apple-mobile-web-app-status-bar-style" content="black">
-<meta name="apple-mobile-web-app-title" content="Amaze UI" />
-
-<meta name="msapplication-TileColor" content="#0e90d2">
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingUserVip.css}">
-<style>
-	#img1_img {
-		width: 100px;
-		height: 100px;
-	}
-</style>
-</head>
-<body>
-
-	<!-- 个人资料修改页面 -->
-	<!-- 头部开始 -->
-	<header data-am-widget="header"
-		class="am-header color-w back-m1 back-m1 am-header-fixed">
-		<div class="am-header-left am-header-nav">
-			<a th:href="@{/admin/redirect/hive/mobile/personal?foot=1}" class=""> <i
-				class="am-header-icon am-icon-chevron-left"></i>
-			</a>
-		</div>
-
-		<h1 class="am-header-title">
-			<a href="#title-link" class=""> 个人资料 </a>
-		</h1>
-
-	</header>
-	<!-- 头部结束 -->
-
-	<!-- 会员注册表单开始 -->
-	<div class="main main2">
-		<form class="am-form am-form-horizontal" method="post" id="dataform"
-			onsubmit="javascripr:return false;">
-
-			<div class="am-input-group am-form-group  am-input-group-primary am-g bot">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">头像</span>
-				</div>
-				<div class="am-u-sm-8">
-					<input autocomplete="off"   th:value="${obj.suPhoto}" name="suPhoto" id="img1"
-						   class="form-control  upload-input" type="text" /> <a
-						class="btn btn-primary radius upload-a">
-				</a>
-				</div>
-			</div>
-
-
-			<div
-				class="am-input-group am-form-group  am-input-group-primary am-g bot">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">姓名</span>
-				</div>
-				<div class="am-u-sm-8">
-					<input autocomplete="off"   type="text" dataType="*1-20" class="am-form-field"
-						name="suName" th:value="${obj.suName}">
-				</div>
-			</div>
-
-
-			<div
-				class="am-input-group am-form-group  am-input-group-primary am-g bot">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">英文名</span>
-				</div>
-				<div class="am-u-sm-8">
-					<input autocomplete="off"   type="text" dataType="*1-20" class="am-form-field"
-						th:value="${obj.enName }" name="enName" ignore="ignore">
-				</div>
-			</div>
-			
-			<div
-				class="am-input-group am-form-group  am-input-group-primary am-g bot">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">编号</span>
-				</div>
-				<div class="am-u-sm-8">
-					<input autocomplete="off"   type="text" dataType="*1-30" class="am-form-field"
-						readonly="readonly"  th:value="${obj.suJobNo}" />
-				</div>
-			</div>
-			<div
-				class="am-input-group am-form-group  am-input-group-primary am-g bot">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">身份证号码</span>
-				</div>
-				<div class="am-u-sm-8">
-					<input autocomplete="off"   type="text" dataType="*1-30" class="am-form-field"
-						name="suIdcard" th:value="${obj.suIdcard}">
-				</div>
-			</div>
-			<div
-				class="am-input-group am-form-group  am-input-group-primary am-g bot">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">联系电话</span>
-				</div>
-				<div class="am-u-sm-8">
-					<input autocomplete="off"   type="text" dataType="m" class="am-form-field"
-						ignore="ignore" name="suTel" th:value="${obj.suTel}">
-				</div>
-			</div>
-			<div
-				class="am-input-group am-form-group  am-input-group-primary am-g bot">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">紧急联系电话</span>
-				</div>
-				<div class="am-u-sm-8">
-					<input autocomplete="off"   type="text" dataType="m" class="am-form-field"
-						ignore="ignore" name="emergTel" th:value="${obj.emergTel}">
-				</div>
-			</div>
-			<div
-				class="am-input-group am-form-group  am-input-group-primary am-g bot">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">住址</span>
-				</div>
-				<div class="am-u-sm-8">
-					<input autocomplete="off"   type="text" dataType="*1-200" class="am-form-field"
-						ignore="ignore" name="suAddress" th:value="${obj.suAddress}">
-				</div>
-			</div>
-			<div
-				class="am-input-group am-form-group  am-input-group-primary am-g bot">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">微信号</span>
-				</div>
-				<div class="am-u-sm-8">
-					<input autocomplete="off"   type="text" dataType="*1-40" class="am-form-field"
-						ignore="ignore" name="wxNo" th:value="${obj.wxNo}">
-				</div>
-			</div>
-
-			<div
-				class="am-input-group am-form-group  am-input-group-primary am-g bot">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">生日</span>
-				</div>
-				<div class="am-u-sm-8">
-					<input autocomplete="off"   type="date" class="am-form-field" name="suBirthday"
-						dataType="*" th:value="${obj.suBirthday}">
-				</div>
-			</div>
-
-			<div
-				class="am-input-group am-form-group  am-input-group-primary am-g bot">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">所属门店</span>
-				</div>
-				<div class="am-u-sm-8">
-					<input autocomplete="off"   type="text" class="am-form-field" readonly="readonly"
-						dataType="*"  th:value="${obj.shopName}">
-				</div>
-			</div>
-
-			<div
-				class="am-input-group am-form-group  am-input-group-primary am-g bot">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">所属岗位</span>
-				</div>
-				<div class="am-u-sm-8">
-					<input autocomplete="off"   type="text" class="am-form-field" readonly="readonly" dataType="*"
-						 th:value="${obj.roleName}">
-				</div>
-			</div>
-			<div
-				class="am-input-group am-form-group  am-input-group-primary am-g bot">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">上级领导</span>
-				</div>
-				<div class="am-u-sm-8">
-					<input autocomplete="off"   type="text" class="am-form-field" readonly="readonly"
-						 th:value="${obj.parDirectName}">
-				</div>
-			</div>
-			<div
-				class="am-input-group am-form-group  am-input-group-primary am-g bot">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">工作经历</span>
-				</div>
-				<div class="am-u-sm-8">
-					<input autocomplete="off"   type="text" class="am-form-field" name="workExp"
-						ignore="ignore" dataType="*1-200" th:value="${obj.workExp}">
-				</div>
-			</div>
-			<div
-				class="am-form-group  am-input-group am-input-group-primary am-g ">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label ">服务签名</span>
-				</div>
-				<div class="am-u-sm-8">
-					<textarea name="serviceSignature" class="border" clos="100"
-						rows="3" warp="virtual" dataType="*1-300" ignore="ignore" th:text="${obj?.serviceSignature }" ></textarea>
-				</div>
-			</div>
-
-			<div class="inputBtn">
-				<input autocomplete="off"   type="button" onclick="myForm.submit()"
-					class="am-btn btn-m1 am-radius am-btn-block" value="保存"></input>
-			</div>
-		</form>
-	</div>
-	<!-- 会员到访表单结束 -->
-
-	<script type="text/x-handlebars-template" id="amz-tpl">
-  {{>header header}}
-
-  {{>menu menu}}
-
-  {{>slider slider}}
-
-  {{>list_news list1}}
-
-  {{>gallery gallery}}
-
-  {{>list_news list2}}
-
-  {{>footer footer}}
-
-  {{>navbar navbar}}
-</script>
-	<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-	<script
-		th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<script th:src="@{/js/systools/AjaxProxyVue.js}"></script>
-	<!-- index js -->
-	<script type="text/javascript">
-		MTools.initImgUpload(".upload-input");
-		var myForm;
-		$(function() {
-			myForm = MForm.initForm({
-				invokeUrl :  basePath+"/admin/updateStaffInfo",
-				afterSubmit : function(loj) {
-					if (loj.status = '200') {
-						layer.open({
-							shade : false,
-							content : '修改成功',
-							className : 'showBox',
-							time : 2
-						});
-					}
-				}
-			});
-			
-
-		});
-
-
-	</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-resetPassWord.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-resetPassWord.html
deleted file mode 100644
index 4970371..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-resetPassWord.html
+++ /dev/null
@@ -1,156 +0,0 @@
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
-
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-<!-- Add to homescreen for Chrome on Android -->
-<meta name="mobile-web-app-capable" content="yes">
-
-
-<!-- Add to homescreen for Safari on iOS -->
-<meta name="apple-mobile-web-app-capable" content="yes">
-<meta name="apple-mobile-web-app-status-bar-style" content="black">
-<meta name="apple-mobile-web-app-title" content="Amaze UI" />
-
-<meta name="msapplication-TileColor" content="#0e90d2">
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingUserVip.css}">
-
-</head>
-<body>
-	<!-- 个人资料修改页面 -->
-	<!-- 头部开始 -->
-	<header data-am-widget="header"
-		class="am-header color-w back-m1 am-header-fixed">
-		<div class="am-header-left am-header-nav">
-			<a th:href="@{/admin/redirect/hive/mobile/personal?foot=1}" class=""> <i
-				class="am-header-icon am-icon-chevron-left"></i>
-			</a>
-		</div>
-
-		<h1 class="am-header-title">
-			<a href="#title-link" class=""> 重置密码 </a>
-		</h1>
-
-	</header>
-	<!-- 头部结束 -->
-
-	<div class="main main2">
-		
-		<form class="am-form am-form-horizontal" method="post" id="dataform"
-			onsubmit="javascripr:return false;">
-
-
-			<div
-				class="am-input-group am-form-group  am-input-group-primary am-g bot">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">原始密码</span>
-				</div>
-				<div class="am-u-sm-8">
-					<input autocomplete="off"   type="password" class="am-form-field " dataType="*"
-						name="oldPassword" placeholder="原始密码" nullmsg="请填写原始密码">
-				</div>
-			</div>
-
-			<div
-				class="am-input-group am-form-group  am-input-group-primary am-g bot">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">新密码</span>
-				</div>
-				<div class="am-u-sm-8">
-					<input autocomplete="off"   type="password" class="am-form-field " dataType="*"
-						name="newPassword" placeholder="新密码" nullmsg="请填写新密码"
-						errormsg="长度为6至16">
-				</div>
-			</div>
-
-			<div
-				class="am-input-group am-form-group  am-input-group-primary am-g bot">
-				<div class="am-u-sm-4">
-					<span class="am-input-group-label">确认密码</span>
-				</div>
-				<div class="am-u-sm-8">
-					<input autocomplete="off"   type="password" class="am-form-field " dataType="*"
-						name="reNewPassword" recheck="newPassword" placeholder="重复新密码"
-						nullmsg="请重复新密码" errormsg="请填写相同密码">
-				</div>
-			</div>
-
-			<div class="inputBtn">
-				<input autocomplete="off"   type="button" onclick="myForm.submit()"
-					class="am-btn btn-m1 am-radius am-btn-block" value="保存"></input>
-			</div>
-			
-		</form>
-	</div>
-
-	<script type="text/x-handlebars-template" id="amz-tpl">
-  {{>header header}}
-
-  {{>menu menu}}
-
-  {{>slider slider}}
-
-  {{>list_news list1}}
-
-  {{>gallery gallery}}
-
-  {{>list_news list2}}
-
-  {{>footer footer}}
-
-  {{>navbar navbar}}
-</script>
-	<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-	<script
-		th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<!-- index js -->
-	<script type="text/javascript">
-
-
-		var myForm = MForm
-				.initForm({
-					invokeUrl :  basePath+"/admin/updatePassword",
-					afterSubmit : function(loj) {
-						if (loj.status = '200') {
-							layer
-									.open({
-										shade : false,
-										content : '密码修改成功',
-										className : 'showBox',
-										time : 2,
-										end : function(elem) {
-											MTools
-													.redirect( basePath+"/admin/redirect/hive/mobile/personal?foot=1");
-										}
-									});
-						}
-					}
-				});
-	</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-shop-list.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-shop-list.html
deleted file mode 100644
index c0bcf1e..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-shop-list.html
+++ /dev/null
@@ -1,279 +0,0 @@
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingOrderList.css}">
-<style type="text/css">
-.m_ul{
-	list-style: none;
-}
-
-.m_ul li span{
-margin-left: 2em;
-}
-</style>
-</head>
-
-
-
-<body>
-	<!-- 商品列表页面 -->
-	<div class="wrap">
-		<!-- 头部开始 -->
-		<header data-am-widget="header"
-			class="am-header color-w back-m1 am-header-fixed">
-			<div class="am-header-left am-header-nav">
-				<a th:href="@{/admin/redirect/personal?foot=1" class=""> <i
-					class="am-header-icon am-icon-chevron-left"></i>
-				</a>
-			</div>
-
-			<h1 class="am-header-title">
-				<a href="#title-link" class="">门店列表 </a>
-			</h1>
-
-
-		</header>
-		<!-- 头部结束 -->
-
-		<!-- 订单内容 -->
-		<div class="main main1" id="main" style="display: none;">
-			<form class="am-form am-form-horizontal" id="dataform"
-				onsubmit="javascripr:return false;">
-				<div class="am-form-group am-form-select am-input-group  am-input-group-primary am-g  title">
-						
-					<!-- 	<div class="am-u-sm-4 margin-b1">
-							<select name=absentDay id="order-select" class=" border" >
-							<option value=''>未到店日期</option>
-							<option value="3">3天</option>
-							<option value="7">7天</option>
-							<option value="14">14天</option>
-						</select>
-						</div>
-						<div class="am-u-sm-4 margin-b1">
-						<select  name="birthdays"  class=" border" >
-							<option value=''>生日</option>
-							<option value="1">今天</option>
-							<option value="3">3天内</option>
-							<option value="30">一个月</option>
-						</select>
-						</div>
-						<div class="am-u-sm-4 margin-b1">
-						<select  name="followDays" class=" border" >
-							<option value=''>跟进</option>
-							<option value="1">今天</option>
-							<option value="3">3天内</option>
-							<option value="30">一个月</option>
-						</select>
-					</div>	
-						<label class="col-sm-2 control-label">会员活跃度</label>
-						<div class="am-u-sm-4 margin-b1" >
-							<select  name="appointDays" class=" border" >
-							<option value=''>预约</option>
-							<option value="1">今天</option>
-							<option value="3">3天内</option>
-							<option value="30">一个月</option>
-						</select>
-						</div> -->
-					
-					<div class="am-u-sm-8 ">
-						<input autocomplete="off"   type="text" class="searchIn" name="shopName"	placeholder="门店名称" />
-					<!-- 	<label class="col-sm-2 control-label">会员等级</label> -->
-						
-						
-					</div>
-					<div class="am-u-sm-4 ">
-						<button type="button"
-							class="am-btn am-btn-default am-radius searchBtn"
-							onclick="Pagination.serchDate()">搜索</button>
-					</div>
-					
-						<!-- 记录当前页 -->
-						<input autocomplete="off"   type="hidden" name="offset" id="_offset" value="0" />
-						<input autocomplete="off"  	type="hidden" name="limit" id="limit"  value="10" />
-				</div>
-					<!-- <ul class="m_ul">
-						<li>生日:<span class="am-badge am-badge-secondary am-radius"  kind="1" day="0"  >&nbsp;&nbsp;今天&nbsp;&nbsp; </span>
-								<span class="am-badge am-badge-secondary am-radius"  kind="1" day="3" >&nbsp;&nbsp;3天内&nbsp;&nbsp;</span>
-								<span class="am-badge am-badge-secondary am-radius"  kind="1" day="30" >&nbsp;&nbsp;一月内&nbsp;&nbsp;</span></li>
-								
-						<li>跟进:<span class="am-badge am-badge-secondary am-radius"  kind="2" day="0" >&nbsp;&nbsp;今天&nbsp;&nbsp;</span>
-								<span class="am-badge am-badge-secondary am-radius"   kind="2" day="3" >&nbsp;&nbsp;3天内&nbsp;&nbsp;</span>
-								<span class="am-badge am-badge-secondary am-radius"  kind="2" day="30"  >&nbsp;&nbsp;一月内&nbsp;&nbsp;</span></li>
-						<li>预约:<span class="am-badge am-badge-secondary am-radius" kind="3" day="0" >&nbsp;&nbsp;今天&nbsp;&nbsp;</span>
-								<span class="am-badge am-badge-secondary am-radius"  kind="3" day="3" >&nbsp;&nbsp;3天内&nbsp;&nbsp;</span>
-								<span class="am-badge am-badge-secondary am-radius"   kind="3" day="30" >&nbsp;&nbsp;一月内&nbsp;&nbsp;</span></li>
-					</ul> -->
-				
-				<!-- 商品表格 -->
-				<div data-am-widget="list_news"
-					class="am-list-news am-list-news-default">
-					<!--列表标题-->
-					<div class="am-list-news-hd am-cf am-g">
-						<!--带更多链接-->
-						<div class="am-u-sm-9 ">
-							<h2 class="am-list-news-more am-fr">门店名称</h2>
-						</div>
-						<div class="am-u-sm-3 ">
-							<h2 class="am-list-news-more am-fr">操作</h2>
-						</div>
-					</div>
-					<div class="am-list-news-bd">
-						<ul class="am-list am-list-striped" id="showdataBox">
-
-						</ul>
-					</div>
-					<div id="pagingBox" align="center" style="margin-top: 10px"></div>
-				</div>
-				<!-- 商品展示结束 -->
-				<!-- 测试 -->
-			</form>
-		</div>
-		<!-- 订单内容结束 -->
-
-	</div>
-
-	<script
-		th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<script th:src="@{/plugin/amazingUI/js/amazeui.min.js}"></script>
-	<script>
-	
-		/**
-		加载数据
-		 **/
-		$(function() {
-			var pageSize=$("#limit").val();
-			Pagination
-					.init(
-							{
-								url :  basePath+"/admin/achieveTargetShop/showList",
-								pageSize : pageSize,
-								builderDate : function(loj) {
-									if (loj.getRowCount() > 0) {
-										$("#main").show();
-										var html = "";
-										//构建数据
-										for (var i = 0; i < loj.getRowCount(); i++) {
-										
-											html += ' <li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">' 
-											+'<div class="am-u-sm-3 "><h3 class="am-list-item-hd">' + loj.getString(i,"shopName") + '</h3> </div> '
-											+'<div class="am-u-sm-3 "><a class="am-list-item-hd" th:href="@{/admin/achieveTargetShop/dayAchieve?id='+ loj.getString(i, "id")+ '&lookInfo=0">查看业绩</a></div></li>';
-										}
-										return html;
-									} else {
-										$("#pagingBox").hide();
-
-										
-									}
-								}
-							}).serchDate();
-			
-			
-			//筛选点击事件
-			
-			
-			
-			$(".m_ul li span").click(function(){
-				
-				var normal="am-badge am-badge-secondary am-radius";		
-				var selected="am-badge am-badge-warning am-radius";
-				var myAttr=	$(this).attr("class");
-				if(myAttr==selected){
-					$(".m_ul li span").attr("class",normal);
-					$(this).attr("class",normal);
-					Pagination.serchDate();
-				}else{
-					$(".m_ul li span").attr("class",normal);
-					$(this).attr("class",selected);
-					onserch($(this).attr("kind"),$(this).attr("day"))
-				}
-				
-			});
-			
-			//下拉框
-			MTools.autoFullSelect();
-			//
-			//style="display:none"
-			$(".option1").css("display","none");
-			$(".option2").css("display","none");
-			
-		}
-		);
-		function option(){
-			$(".option").removeAttr("selected");
-			$('.time').attr('selected', true);
-			if($("#select").val() != null && $("#select").val() != ""){
-				if($("#select").val() != "absentDay"){
-					$(".option1").css("display","none");
-					$(".option2").css("display","block");
-				}else{
-					$(".option2").css("display","none");
-					$(".option1").css("display","block");
-				}
-			}else{
-				$(".option1").css("display","none");
-				$(".option2").css("display","none");
-			}
-		}
-		
-		/*条件筛选加载 
-		function onserch(kind,day){
-			
-			$.AjaxProxy({p:{"kind":kind,"day":day}}).invoke( basePath+"/admin/customer/showCustomerByDay",function(loj){
-			
-				if (loj.getRowCount() > 0) {
-				var html = "";
-				//构建数据
-				for (var i = 0; i < loj.getRowCount(); i++) {
-					html += ' <li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">' 
-					+'<div class="am-u-sm-3 "><h3 class="am-list-item-hd">'+ loj.getString(i,"vipName") + '</h3> </div>'
-					+'<div class="am-u-sm-3 "><h3 class="am-list-item-hd">' + loj.getString(i, "phone") + '</h3> </div> '
-					+'<div class="am-u-sm-3 "><h3 class="am-list-item-hd">' + loj.getString(i, "vipLevel").levelName + '</h3> </div> '
-					+'<div class="am-u-sm-3 "><a class="am-list-item-hd" href="tel:'+phone+'">拨号</a><a class="am-list-item-hd" th:href="@{/admin/customer/toVipInfoList?id='+ loj.getString(i, "id")+ '">详情</a></div></li>';
-				}
-				$("#showdataBox").html(html);
-				$("#pagingBox").html("");
-			} else {
-				$("#showdataBox").html("<hr><div class='am-u-sm-6 am-u-sm-centered '>没有查询到相关数据~</div>");
-				$("#pagingBox").html("");
-			
-		}})};
-			
-		 */
-		
-		
-		
-		
-		
-		
-		
-	</script>
-	<!-- index js -->
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-staff-list.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-staff-list.html
deleted file mode 100644
index 86314bc..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-staff-list.html
+++ /dev/null
@@ -1,302 +0,0 @@
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingOrderList.css}">
-<style type="text/css">
-.m_ul{
-	list-style: none;
-}
-
-.m_ul li span{
-margin-left: 2em;
-}
-</style>
-</head>
-
-
-
-<body>
-	<!-- 商品列表页面 -->
-	<div class="wrap">
-		<!-- 头部开始 -->
-		<header data-am-widget="header"
-			class="am-header color-w back-m1 am-header-fixed">
-			<div class="am-header-left am-header-nav">
-				<a th:href="@{/admin/redirect/personal?foot=1" class=""> <i
-					class="am-header-icon am-icon-chevron-left"></i>
-				</a>
-			</div>
-
-			<h1 class="am-header-title">
-				<a href="#title-link" class="">员工列表 </a>
-			</h1>
-
-
-		</header>
-		<!-- 头部结束 -->
-
-		<!-- 订单内容 -->
-		<div class="main main1" id="main" style="display: none;">
-			<form class="am-form am-form-horizontal" id="dataform"
-				onsubmit="javascripr:return false;">
-				<div class="am-form-group am-form-select am-input-group  am-input-group-primary am-g  title">
-					<div class="am-u-sm-6 margin-b1">
-						<select class="form-control autoFull" 
-						th:data-url="@{/admin/achieveTargetShop/findShopByRole}"
-						data-value="id"
-						data-filed="shopName"
-						name="shopId" 
-						id="shopId"> 
-						<option value="">--门店选择--</option>
-						</select>
-					</div>	
-					
-						<!-- <label class="col-sm-2 control-label">会员活跃度</label> -->
-						<div class="am-u-sm-6 margin-b1" >
-							<select class="form-control" name="staffPost"> 
-							<option value=''>--员工岗位--</option>
-							<option value='1'>健康顾问</option>
-							<option value='2'>美疗师</option>  
-							</select>
-						</div>
-						
-					<!-- 	<div class="am-u-sm-4 margin-b1">
-							<select name=absentDay id="order-select" class=" border" >
-							<option value=''>未到店日期</option>
-							<option value="3">3天</option>
-							<option value="7">7天</option>
-							<option value="14">14天</option>
-						</select>
-						</div>
-						<div class="am-u-sm-4 margin-b1">
-						<select  name="birthdays"  class=" border" >
-							<option value=''>生日</option>
-							<option value="1">今天</option>
-							<option value="3">3天内</option>
-							<option value="30">一个月</option>
-						</select>
-						</div>
-						<div class="am-u-sm-4 margin-b1">
-						<select  name="followDays" class=" border" >
-							<option value=''>跟进</option>
-							<option value="1">今天</option>
-							<option value="3">3天内</option>
-							<option value="30">一个月</option>
-						</select>
-					</div>	
-						<label class="col-sm-2 control-label">会员活跃度</label>
-						<div class="am-u-sm-4 margin-b1" >
-							<select  name="appointDays" class=" border" >
-							<option value=''>预约</option>
-							<option value="1">今天</option>
-							<option value="3">3天内</option>
-							<option value="30">一个月</option>
-						</select>
-						</div> -->
-					
-					<div class="am-u-sm-8 ">
-						<input autocomplete="off"   type="text" class="searchIn" name="staffName"	placeholder="员工姓名" />
-					<!-- 	<label class="col-sm-2 control-label">会员等级</label> -->
-						
-						
-					</div>
-					<div class="am-u-sm-4 ">
-						<button type="button"
-							class="am-btn am-btn-default am-radius searchBtn"
-							onclick="Pagination.serchDate()">搜索</button>
-					</div>
-					
-						<!-- 记录当前页 -->
-						<input autocomplete="off"   type="hidden" name="offset" id="_offset" value="0" />
-						<input autocomplete="off"  	type="hidden" name="limit" id="limit"  value="10" />
-				</div>
-					<!-- <ul class="m_ul">
-						<li>生日:<span class="am-badge am-badge-secondary am-radius"  kind="1" day="0"  >&nbsp;&nbsp;今天&nbsp;&nbsp; </span>
-								<span class="am-badge am-badge-secondary am-radius"  kind="1" day="3" >&nbsp;&nbsp;3天内&nbsp;&nbsp;</span>
-								<span class="am-badge am-badge-secondary am-radius"  kind="1" day="30" >&nbsp;&nbsp;一月内&nbsp;&nbsp;</span></li>
-								
-						<li>跟进:<span class="am-badge am-badge-secondary am-radius"  kind="2" day="0" >&nbsp;&nbsp;今天&nbsp;&nbsp;</span>
-								<span class="am-badge am-badge-secondary am-radius"   kind="2" day="3" >&nbsp;&nbsp;3天内&nbsp;&nbsp;</span>
-								<span class="am-badge am-badge-secondary am-radius"  kind="2" day="30"  >&nbsp;&nbsp;一月内&nbsp;&nbsp;</span></li>
-						<li>预约:<span class="am-badge am-badge-secondary am-radius" kind="3" day="0" >&nbsp;&nbsp;今天&nbsp;&nbsp;</span>
-								<span class="am-badge am-badge-secondary am-radius"  kind="3" day="3" >&nbsp;&nbsp;3天内&nbsp;&nbsp;</span>
-								<span class="am-badge am-badge-secondary am-radius"   kind="3" day="30" >&nbsp;&nbsp;一月内&nbsp;&nbsp;</span></li>
-					</ul> -->
-				
-				<!-- 商品表格 -->
-				<div data-am-widget="list_news"
-					class="am-list-news am-list-news-default">
-					<!--列表标题-->
-					<div class="am-list-news-hd am-cf am-g">
-						<!--带更多链接-->
-						<div class="am-u-sm-4 ">
-							<h2 class="am-list-news-more am-fr">员工姓名</h2>
-						</div>
-						<div class="am-u-sm-4 ">
-							<h2 class="am-list-news-more am-fr">所属门店</h2>
-						</div>
-						<div class="am-u-sm-4 ">
-							<h2 class="am-list-news-more am-fr">操作</h2>
-						</div>
-					</div>
-					<div class="am-list-news-bd">
-						<ul class="am-list am-list-striped" id="showdataBox">
-
-						</ul>
-					</div>
-					<div id="pagingBox" align="center" style="margin-top: 10px"></div>
-				</div>
-				<!-- 商品展示结束 -->
-				<!-- 测试 -->
-			</form>
-		</div>
-		<!-- 订单内容结束 -->
-
-	</div>
-
-	<script
-		th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<script th:src="@{/plugin/amazingUI/js/amazeui.min.js}"></script>
-	<script>
-	
-		/**
-		加载数据
-		 **/
-		$(function() {
-			var pageSize=$("#limit").val();
-			Pagination
-					.init(
-							{
-								url :  basePath+"/admin/achieveTarget/showAllMlsAndJkgw",
-								pageSize : pageSize,
-								builderDate : function(loj) {
-									if (loj.getRowCount() > 0) {
-										$("#main").show();
-										var html = "";
-										//构建数据
-										for (var i = 0; i < loj.getRowCount(); i++) {
-										
-											html += ' <li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">' 
-											+'<div class="am-u-sm-3 "><h3 class="am-list-item-hd">'+ loj.getString(i,"staffName") + '</h3> </div>'
-											+'<div class="am-u-sm-3 "><h3 class="am-list-item-hd">' + loj.getString(i,"shopName") + '</h3> </div> '
-											+'<div class="am-u-sm-3 "><a class="am-list-item-hd" th:href="@{/admin/achieveTarget/dayAchieve?id='+ loj.getString(i, "id")+ '&lookInfo=0">查看业绩</a></div></li>';
-										}
-										return html;
-									} else {
-										$("#pagingBox").hide();
-
-										
-									}
-								}
-							}).serchDate();
-			
-			
-			//筛选点击事件
-			
-			
-			
-			$(".m_ul li span").click(function(){
-				
-				var normal="am-badge am-badge-secondary am-radius";		
-				var selected="am-badge am-badge-warning am-radius";
-				var myAttr=	$(this).attr("class");
-				if(myAttr==selected){
-					$(".m_ul li span").attr("class",normal);
-					$(this).attr("class",normal);
-					Pagination.serchDate();
-				}else{
-					$(".m_ul li span").attr("class",normal);
-					$(this).attr("class",selected);
-					onserch($(this).attr("kind"),$(this).attr("day"))
-				}
-				
-			});
-			
-			//下拉框
-			MTools.autoFullSelect();
-			//
-			//style="display:none"
-			$(".option1").css("display","none");
-			$(".option2").css("display","none");
-			
-		}
-		);
-		function option(){
-			$(".option").removeAttr("selected");
-			$('.time').attr('selected', true);
-			if($("#select").val() != null && $("#select").val() != ""){
-				if($("#select").val() != "absentDay"){
-					$(".option1").css("display","none");
-					$(".option2").css("display","block");
-				}else{
-					$(".option2").css("display","none");
-					$(".option1").css("display","block");
-				}
-			}else{
-				$(".option1").css("display","none");
-				$(".option2").css("display","none");
-			}
-		}
-		
-		/*条件筛选加载 
-		function onserch(kind,day){
-			
-			$.AjaxProxy({p:{"kind":kind,"day":day}}).invoke( basePath+"/admin/customer/showCustomerByDay",function(loj){
-			
-				if (loj.getRowCount() > 0) {
-				var html = "";
-				//构建数据
-				for (var i = 0; i < loj.getRowCount(); i++) {
-					html += ' <li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">' 
-					+'<div class="am-u-sm-3 "><h3 class="am-list-item-hd">'+ loj.getString(i,"vipName") + '</h3> </div>'
-					+'<div class="am-u-sm-3 "><h3 class="am-list-item-hd">' + loj.getString(i, "phone") + '</h3> </div> '
-					+'<div class="am-u-sm-3 "><h3 class="am-list-item-hd">' + loj.getString(i, "vipLevel").levelName + '</h3> </div> '
-					+'<div class="am-u-sm-3 "><a class="am-list-item-hd" href="tel:'+phone+'">拨号</a><a class="am-list-item-hd" th:href="@{/admin/customer/toVipInfoList?id='+ loj.getString(i, "id")+ '">详情</a></div></li>';
-				}
-				$("#showdataBox").html(html);
-				$("#pagingBox").html("");
-			} else {
-				$("#showdataBox").html("<hr><div class='am-u-sm-6 am-u-sm-centered '>没有查询到相关数据~</div>");
-				$("#pagingBox").html("");
-			
-		}})};
-			
-		 */
-		
-		
-		
-		
-		
-		
-		
-	</script>
-	<!-- index js -->
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-trainingMaterials-data.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-trainingMaterials-data.html
deleted file mode 100644
index 17140db..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-trainingMaterials-data.html
+++ /dev/null
@@ -1,114 +0,0 @@
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-<!-- Add to homescreen for Chrome on Android -->
-<meta name="mobile-web-app-capable" content="yes">
-
-
-<!-- Add to homescreen for Safari on iOS -->
-<meta name="apple-mobile-web-app-capable" content="yes">
-<meta name="apple-mobile-web-app-status-bar-style" content="black">
-<meta name="apple-mobile-web-app-title" content="Amaze UI" />
-
-<meta name="msapplication-TileColor" content="#0e90d2">
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingUserVip.css}">
-
-</head>
-<body>
-	<!-- 个人资料修改页面 -->
-	<!-- 头部开始 -->
-	<input autocomplete="off"   type="hidden" id="typeId" th:value="${param.id}">
-	<header data-am-widget="header"
-		class="am-header color-w back-m1 am-header-fixed">
-		<div class="am-header-left am-header-nav">
-			<a href="javascript:history.back(-1)" class=""> <i
-				class="am-header-icon am-icon-chevron-left"></i>
-			</a>
-		</div>
-
-		<h1 class="am-header-title">
-			<a href="#title-link" class="">HIVE学院</a>
-		</h1>
-
-	</header>
-	<!-- 头部结束 -->
-
-	<div class="" >
-		<ul class="am-list" id="accordion">
-
-
-		
-		</ul>	
-	</div>
-
-	<script type="text/x-handlebars-template" id="amz-tpl">
-  {{>header header}}
-
-  {{>menu menu}}
-
-  {{>slider slider}}
-
-  {{>list_news list1}}
-
-  {{>gallery gallery}}
-
-  {{>list_news list2}}
-
-  {{>footer footer}}
-
-  {{>navbar navbar}}
-</script>
-	<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-	<script
-		th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<!-- index js -->
-	<script type="text/javascript">
-	//文章加载
-	 $(function(){
-		 $.AjaxProxy({p:{typeId:$("#typeId").val()},a:false}).invoke( basePath+"/admin/trainingArticle/queryTrainingMaterials",function(loj) {
-			 	var html="";
-				for (var i = 0; i < loj.getRowCount(); i++) {
-					html=html+" <li class='am-g'>"
-							+"<a href='"+basePath+"/admin/trainingArticle/queryOne?id="+loj.getString(i, "id")+"\'  class='am-list-item-hd ' style='padding-left: 10px;color: black;'>"
-							+loj.getString(i, "title")
-							+"</a>"
-							+"<span class='am-list-date am-icon-angle-right go-right'></span> </li>"
-				}
-				$("#accordion").empty().html(html);
-				if(html==""){
-
-				}
-		 })
-		 
-	 })
-
-	</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-trainingMaterials-info.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-trainingMaterials-info.html
deleted file mode 100644
index 15fcbf5..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-trainingMaterials-info.html
+++ /dev/null
@@ -1,98 +0,0 @@
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-<!-- Add to homescreen for Chrome on Android -->
-<meta name="mobile-web-app-capable" content="yes">
-
-
-<!-- Add to homescreen for Safari on iOS -->
-<meta name="apple-mobile-web-app-capable" content="yes">
-<meta name="apple-mobile-web-app-status-bar-style" content="black">
-<meta name="apple-mobile-web-app-title" content="Amaze UI" />
-
-<meta name="msapplication-TileColor" content="#0e90d2">
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingUserVip.css}">
-<style type="text/css">
-img {
-	max-width:100% !important;
-}
-.writer{
-	padding:10px;
-}
-</style>
-</head>
-<body>
-	<!-- 个人资料修改页面 -->
-	<!-- 头部开始 -->
-
-	<header data-am-widget="header"
-		class="am-header color-w back-m1 am-header-fixed">
-		<div class="am-header-left am-header-nav">
-			<a href="javascript:history.back(-1)" class=""> <i
-				class="am-header-icon am-icon-chevron-left"></i>
-			</a>
-		</div>
-
-		<h1 class="am-header-title">
-			<a href="#title-link" class="" th:text="${article.title}"> </a>
-		</h1>
-
-	</header>
-	<!-- 头部结束 -->
-	
-	<div class="writer" th:utext="${article.content}" >
-
-	
-	</div>
-
-	<script type="text/x-handlebars-template" id="amz-tpl">
-  {{>header header}}
-
-  {{>menu menu}}
-
-  {{>slider slider}}
-
-  {{>list_news list1}}
-
-  {{>gallery gallery}}
-
-  {{>list_news list2}}
-
-  {{>footer footer}}
-
-  {{>navbar navbar}}
-</script>
-	<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-	<script
-		th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<!-- index js -->
-
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-trainingMaterials1.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-trainingMaterials1.html
deleted file mode 100644
index 0842fdd..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-trainingMaterials1.html
+++ /dev/null
@@ -1,104 +0,0 @@
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-    <meta
-            content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-            name="viewport"/>
-    <title th:text="${session.userInfo.shopName }"></title>
-
-    <!-- Set render engine for 360 browser -->
-    <meta name="renderer" content="webkit">
-
-    <!-- No Baidu Siteapp-->
-    <meta http-equiv="Cache-Control" content="no-siteapp"/>
-
-
-    <!-- Add to homescreen for Chrome on Android -->
-    <meta name="mobile-web-app-capable" content="yes">
-
-
-    <!-- Add to homescreen for Safari on iOS -->
-    <meta name="apple-mobile-web-app-capable" content="yes">
-    <meta name="apple-mobile-web-app-status-bar-style" content="black">
-    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
-
-    <meta name="msapplication-TileColor" content="#0e90d2">
-    <script type="text/javascript"
-            th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-    <script type="text/javascript"
-            th:src="@{/js/systools/DDMBase.js}"></script>
-    <link rel="stylesheet"
-          th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-    <link rel="stylesheet"
-          th:href="@{/plugin/amazingUI/css/app.css}">
-    <link rel="stylesheet" type="text/css"
-          th:href="@{/css/dingUserVip.css}">
-
-
-</head>
-<body>
-<!-- 个人资料修改页面 -->
-<!-- 头部开始 -->
-<header data-am-widget="header"
-        class="am-header color-w back-m1 am-header-fixed">
-    <div class="am-header-left am-header-nav">
-        <a href="javascript:history.back(-1)" class=""> <i
-                class="am-header-icon am-icon-chevron-left"></i>
-        </a>
-    </div>
-
-    <h1 class="am-header-title">
-        <a href="#title-link" class="">HIVE学院 </a>
-    </h1>
-
-</header>
-<!-- 头部结束 -->
-<div class="">
-    <ul class="am-list" id="accordion">
-
-
-        <li class="am-g" th:each="item:${articlelist}">
-            <a th:href="@{/admin/trainingArticle/queryM?id=}+${item.id}" id="a1" class="am-list-item-hd" th:text=" ${item.articleTypeName}"
-               style="padding-left: 10px;color: black;">
-
-            </a>
-        </li>
-
-
-    </ul>
-</div>
-
-<script type="text/x-handlebars-template" id="amz-tpl">
-    {{>header header}}
-
-    {{>menu menu}}
-
-    {{>slider slider}}
-
-    {{>list_news list1}}
-
-    {{>gallery gallery}}
-
-    {{>list_news list2}}
-
-    {{>footer footer}}
-
-    {{>navbar navbar}}
-</script>
-<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-<script
-        th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-<!-- index js -->
-<script type="text/javascript">
-    $(function () {
-        if ('${empty articleList}' == 'true') {
-
-        }
-    })
-</script>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-trainingMaterials2.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-trainingMaterials2.html
deleted file mode 100644
index f5a576e..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-trainingMaterials2.html
+++ /dev/null
@@ -1,104 +0,0 @@
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-    <meta
-            content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-            name="viewport"/>
-    <title th:text="${session.userInfo.shopName }"></title>
-
-    <!-- Set render engine for 360 browser -->
-    <meta name="renderer" content="webkit">
-
-    <!-- No Baidu Siteapp-->
-    <meta http-equiv="Cache-Control" content="no-siteapp"/>
-
-
-    <!-- Add to homescreen for Chrome on Android -->
-    <meta name="mobile-web-app-capable" content="yes">
-
-
-    <!-- Add to homescreen for Safari on iOS -->
-    <meta name="apple-mobile-web-app-capable" content="yes">
-    <meta name="apple-mobile-web-app-status-bar-style" content="black">
-    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
-
-    <meta name="msapplication-TileColor" content="#0e90d2">
-    <script type="text/javascript"
-            th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-    <script type="text/javascript"
-            th:src="@{/js/systools/DDMBase.js}"></script>
-    <link rel="stylesheet"
-          th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-    <link rel="stylesheet"
-          th:href="@{/plugin/amazingUI/css/app.css}">
-    <link rel="stylesheet" type="text/css"
-          th:href="@{/css/dingUserVip.css}">
-
-
-</head>
-<body>
-<!-- 个人资料修改页面 -->
-<!-- 头部开始 -->
-<header data-am-widget="header"
-        class="am-header color-w back-m1 am-header-fixed">
-    <div class="am-header-left am-header-nav">
-        <a href="javascript:history.back(-1)" class=""> <i
-                class="am-header-icon am-icon-chevron-left"></i>
-        </a>
-    </div>
-
-    <h1 class="am-header-title">
-        <a href="#title-link" class="">HIVE学院 </a>
-    </h1>
-
-</header>
-<!-- 头部结束 -->
-<div class="">
-    <ul class="am-list" id="accordion">
-
-
-
-        <li class="am-g" th:each="item:${articleList}">
-            <a th:href="@{/admin/redirect/hive/mobile/personal-trainingMaterials-data?id=}+${item.id}" id="a1" class="am-list-item-hd" th:text=" ${item.articleTypeName}"
-               style="padding-left: 10px;color: black;">
-            </a>
-        </li>
-
-
-    </ul>
-</div>
-
-<script type="text/x-handlebars-template" id="amz-tpl">
-    {{>header header}}
-
-    {{>menu menu}}
-
-    {{>slider slider}}
-
-    {{>list_news list1}}
-
-    {{>gallery gallery}}
-
-    {{>list_news list2}}
-
-    {{>footer footer}}
-
-    {{>navbar navbar}}
-</script>
-<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-<script
-        th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-<!-- index js -->
-<script type="text/javascript">
-    $(function () {
-        if ('${empty articleList}' == 'true') {
-
-        }
-    })
-</script>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal.html
deleted file mode 100644
index b077c2d..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal.html
+++ /dev/null
@@ -1,229 +0,0 @@
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head> 
-  <meta charset="utf-8"> 
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
-  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
-  <meta http-equiv="Cache-Control" content="no-transform" />
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-  <title th:text="${session.userInfo.shopName }"></title>
-
-  <!-- Set render engine for 360 browser -->
-  <meta name="renderer" content="webkit">
-
-  <!-- No Baidu Siteapp-->
-  <meta http-equiv="Cache-Control" content="no-siteapp"/>
-
-  
-
-  <!-- Add to homescreen for Chrome on Android -->
-  <meta name="mobile-web-app-capable" content="yes">
-  
-
-  <!-- Add to homescreen for Safari on iOS -->
-  <meta name="apple-mobile-web-app-capable" content="yes">
-  <meta name="apple-mobile-web-app-status-bar-style" content="black">
-  <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
-  
-
-  <!-- Tile icon for Win8 (144x144 + tile color) -->
-  
-  <meta name="msapplication-TileColor" content="#0e90d2">
-  <script type="text/javascript"th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-  <script type="text/javascript"th:src="@{/js/systools/DDMBase.js}"></script>
-  <link rel="stylesheet" th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-  <link rel="stylesheet" th:href="@{/plugin/amazingUI/css/app.css}">
-  <link rel="stylesheet" type="text/css" th:href="@{/css/dingOrder.css}">
-   
-</head>
-<body>
-	<!-- 个人中心页面 -->
-  <div class="wrap"> 
-  	
-  	<!-- 图片栏开始 -->
-     <div data-am-widget="slider" class="am-slider am-slider-c2" data-am-slider='{&quot;directionNav&quot;:false}' >
-      <ul class="am-slides">
-          <li>
-            	<img th:src="@{/images/dingImg/banner-img4.jpg}">
-              <div class="am-slider-desc" th:text="${session.userInfo.shopName }"></div>
-          </li>        
-      </ul>
-    </div>
-    <!-- 图片结束 -->
-    <!-- 表格部分开始 -->
-    <ul class="am-avg-sm-4 boxes" id="boxs">
-      
-      <li class="box box-4">
-      	 <a th:href="@{/admin/goStaffEditForm}" >
-      		<img th:src="@{/images/dingImg/grzl.png}" ></img><br>
-      		<small class="boxs">个人资料</small>
-      	</a> 
-      </li>
-       <li class="box box-4">
-      	 <a th:href="@{/admin/trainingArticle/queryMaterials}" >
-      		<img th:src="@{/images/dingImg/mdxy.png}" ></img><br>
-      		<small class="boxs">HIVE学院</small>
-      	</a> 
-      </li>
-       <li class="box box-4">
-      	 <a th:href="@{/admin/occupancy/editMlsForm}" >
-      		<img th:src="@{/images/dingImg/mdxy.png}" ></img><br>
-      		<small class="boxs">占用情况</small>
-      	</a> 
-      </li>
-
-        <li class="box box-4">
-            <a th:href="@{/admin/redirect/hive/mobile/store-check}" >
-                <img th:src="@{/images/dingImg/mdxy.png}" /><br>
-                <small class="boxs">库存盘点</small>
-            </a>
-        </li>
-
-       <li class="box box-5">
-      	 <a th:href="@{/admin/redirect/hive/mobile/personal-resetPassWord}" >
-      		<img th:src="@{/images/dingImg/xgmm.png}" ></img><br>
-      		<small class="boxs">修改密码</small>
-      	</a> 
-      </li>
-      <li class="box box-6">
-      	<a id="doc-confirm-toggle">
-      		<img th:src="@{/images/dingImg/aqtc.png}" ></img><br>
-      		<small class="boxs">退出</small>
-      	</a> 
-      </li>
-
-    </ul>
-    <!-- 表格结束 -->
-    
-   <div class="am-modal am-modal-confirm" tabindex="-1" id="my-confirm">
-	  <div class="am-modal-dialog">
-	    <div class="am-modal-hd">提示</div>
-	    <div class="am-modal-bd">
-	          确定返回登录页面么?
-	    </div>
-	    <div class="am-modal-footer">
-	      <span class="am-modal-btn" data-am-modal-cancel>取消</span>
-	      <span class="am-modal-btn" data-am-modal-confirm>确定</span>
-	    </div>
-	  </div>
-	</div>
-  <!-- foot开始 -->
-      <div class="footr" th:fragment="footr">
-          <div data-am-widget="navbar" class="am-navbar am-cf am-navbar-default "
-               id="">
-              <ul class="am-navbar-nav am-cf am-avg-sm-4">
-                  <li >
-                      <a th:href="@{/admin/redirect/hive/mobile/personal?foot=1}"class="change1" >
-                          <img th:src="@{/images/dingImg/grzx2.png}" alt="个人中心"/>
-                          <span class="am-navbar-label ">个人中心</span>
-                      </a>
-                  </li>
-
-                  <li >
-                      <a th:href="@{/admin/redirect/hive/mobile/CRM?foot=3}"  class="change3">
-                          <img th:src="@{/images/dingImg/crm1.png}" alt="订单管理"/>
-                          <span class="am-navbar-label">CRM</span>
-                      </a>
-                  </li>
-                  <li >
-                      <a th:href="@{/admin/redirect/hive/mobile/order?foot=4}"  class="change4">
-                          <img th:src="@{/images/dingImg/ddgl1.png}" alt="商机管理"/>
-                          <span class="am-navbar-label">订单管理</span>
-                      </a>
-                  </li>
-
-              </ul>
-          </div>
-      </div>
-
-
-      <!-- foot结束 -->
-  </div>
-
-
-<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
-<script th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-<!-- index js -->  
-<script type="text/javascript">
-$(function() {
-	  $('#doc-confirm-toggle').on('click', function() {
-	      $('#my-confirm').modal({
-	        relatedTarget: this,
-	        onConfirm: function(options) {
-	        	MTools.redirect(basePath + "/common/hiveMobileLoginOut");
-	         
-	        },
-	        // closeOnConfirm: false,
-	        onCancel: function() {
-	          
-	        }
-	      });
-	    });
-	});
-$(function(){
-	var count=$("#boxs").find("li").length;			
-	var index=count%4;
-	if(index==1){
-		$("#boxs").append(" <li class='box'>"+"</li>");
-		$("#boxs").append(" <li class='box'>"+"</li>");
-		$("#boxs").append(" <li class='box'>"+"</li>");
-	}
-	if(index==2){
-		$("#boxs").append(" <li class='box'>"+"</li>");
-		$("#boxs").append(" <li class='box'>"+"</li>");
-	}
-	if(index==3){
-		$("#boxs").append(" <li class='box'>"+"</li>");				
-	}
-})
-
-
-
-
-$(function(){
-	var id=$.query.get('foot');
-
-
-
-
-	$(".change"+id).children("span").css('color','#dfbd88');
-	switch(id){
-		case 1:
-
-			$(".change"+id).children("img").attr('src',basePath+'/images/dingImg/grzx.png');
-
-			break;
-
-		case 2:
-
-			$(".change"+id).children("img").attr('src',basePath+'/images/dingImg/customer3.png');
-
-			break;
-		case 3:
-
-			$(".change"+id).children("img").attr('src',basePath+'/images/dingImg/crm.png');
-
-			break;
-
-		case 4:
-
-			$(".change"+id).children("img").attr('src',basePath+'/images/dingImg/ddgl.png');
-
-			break;
-		default:
-			$(".change1").children("span").css('color','#dfbd88');
-			$(".change1").children("img").attr('src',basePath+'/images/dingImg/grzx.png');
-
-	}
-
-
-
-});
-
-
-
-</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/store-check-detail.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/store-check-detail.html
deleted file mode 100644
index d56899e..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/store-check-detail.html
+++ /dev/null
@@ -1,248 +0,0 @@
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingOrderList.css}">
-<style type="text/css">
-.m_ul{
-	list-style: none;
-}
-
-.m_ul li span{
-margin-left: 2em;
-}
-</style>
-</head>
-
-
-
-<body>
-	<!-- 商品列表页面 -->
-	<div class="wrap">
-		<!-- 头部开始 -->
-		<header data-am-widget="header"
-			class="am-header color-w back-m1 am-header-fixed">
-			<div class="am-header-left am-header-nav">
-				<a th:href="@{/admin/redirect/hive/mobile/store-check}" class=""> <i
-					class="am-header-icon am-icon-chevron-left"></i>
-				</a>
-			</div>
-
-			<h1 class="am-header-title">
-				<a href="#title-link" class=""> 库存盘点 </a>
-			</h1>
-
-
-		</header>
-		<!-- 头部结束 -->
-
-		<!-- 订单内容 -->
-		<div class="main main1" id="main" style="display: none;">
-			<form class="am-form am-form-horizontal" id="dataform"
-				onsubmit="javascripr:return false;">
-				<div class="am-form-group am-form-select am-input-group  am-input-group-primary am-g  title">
-					<div class="am-u-sm-4 ">
-						<input autocomplete="off"   type="text" class="searchIn" name="goods.name"	placeholder="产品名称" />
-					</div>
-					<div class="am-u-sm-4 ">
-						<button type="button"
-							class="am-btn am-btn-default am-radius searchBtn"
-							onclick="Pagination.serchDate()">搜索</button>
-					</div>
-
-					<div class="am-u-sm-4 ">
-						<button type="button"
-								class="am-btn am-btn-default am-radius searchBtn"
-								onclick="submitDetail()">保存</button>
-					</div>
-						<!-- 记录当前页 -->
-						<input autocomplete="off"   type="hidden" name="offset" id="_offset" value="0" />
-						<input autocomplete="off"  	type="hidden" name="limit" id="limit"  value="10" />
-						<input autocomplete="off"  	type="hidden" name="checkId" id="checkId"  th:value="${obj.id }" />
-				</div>
-
-				
-				<div data-am-widget="list_news"
-					class="am-list-news am-list-news-default">
-					<!--列表标题-->
-					<div class="am-list-news-hd am-cf am-g">
-						<!--带更多链接-->
-						<div class="am-u-sm-3 ">
-							<h2 class="am-list-news-more am-fr">存货编号</h2>
-						</div>
-						<div class="am-u-sm-3 ">
-							<h2 class="am-list-news-more am-fr">存货名称</h2>
-						</div>
-						<div class="am-u-sm-2 ">
-							<h2 class="am-list-news-more am-fr">库存数量</h2>
-						</div>
-						<div class="am-u-sm-3 ">
-							<h2 class="am-list-news-more am-fr">实盘数</h2>
-						</div> 
-<!--						<div class="am-u-sm-2 ">-->
-<!--							<h2 class="am-list-news-more am-fr">操作</h2>-->
-<!--						</div>-->
-					</div>
-					<div class="am-list-news-bd">
-						<ul class="am-list am-list-striped" id="showdataBox">
-
-						</ul>
-					</div>
-					<div id="pagingBox" align="center" style="margin-top: 10px"></div>
-				</div>
-				<!-- 商品展示结束 -->
-				<!-- 测试 -->
-			</form>
-		</div>
-		<!-- 订单内容结束 -->
-
-	</div>
-
-	<script
-		th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<script th:src="@{/plugin/amazingUI/js/amazeui.min.js}"></script>
-	<script>
-
-		var temp;
-		var a=[[${obj.makingManId}]];
-		var b=[[${session.userInfo.suId}]];
-		if (a == b) {
-			temp = true;
-		} else {
-			temp = false;
-		}
-
-		var myForm = MForm.initForm({
-			invokeUrl : basePath+"/admin/checkDetail/editCheckDetail",
-			afterSubmit : function() {
-				Pagination.serchDate();
-			},
-		});
-
-		function submitDetail() {
-			myForm.submit();
-		}
-		/**
-		加载数据
-		 **/
-		$(function() {
-			var pageSize=$("#limit").val();
-			Pagination
-					.init(
-							{
-								url :  basePath+"/admin/checkDetail/showList",
-								pageSize : pageSize,
-								builderDate : function(loj) {
-									if (loj.getRowCount() > 0) {
-										$("#main").show();
-										var html = "";
-										//构建数据
-										for (var i = 0; i < loj.getRowCount(); i++) {
-											var result = loj[0].result.rows[i];
-
-											// if (temp) {
-											// 	html = '<input autocomplete="off"   type="hidden"   name="checkDetails['+index+'].id" width="50px" value="'+id+'"/> '
-											// 			+ '<input autocomplete="off"   type="number" maxlength="8" style="width: 60px" name="checkDetails['+index+'].actuallySum" width="50px" value="'+actuallySum+'" /> ';
-											// 	return html;
-											// } else {
-											// 	return actuallySum;
-											// }
-											var id = result.id;
-											var actuallySum = result.actuallySum;
-
-											html += ' <li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">' 
-											+'<div class="am-u-sm-3 "><h3 class="am-list-item-hd">'+ result.goods.goodsNo + '</h3> </div>'
-											+'<div class="am-u-sm-3 "><h3 class="am-list-item-hd">' + result.goods.name + '</h3> </div> '
-											+'<div class="am-u-sm-2 "><h3 class="am-list-item-hd">' + result.beginBalance  + '</h3> </div> '
-											+'<div class="am-u-sm-3 "><input autocomplete="off"   type="hidden"   name="checkDetails['+i+'].id" width="50px" value="'+id+'"/> <input autocomplete="off"   type="number" maxlength="8" style="width: 60px" name="checkDetails['+i+'].actuallySum" width="50px" value="'+actuallySum+'" /></div> ';
-											// +'<div class="am-u-sm-2 "><a class="am-list-item-hd" href="'+basePath+'/admin/customer/toVipInfoSearch?id='+ loj.getString(i, "id")+ '&lookInfo=0">查看盘点</a></div></li>';
-										}
-										return html;
-									} else {
-										$("#pagingBox").hide();
-
-										
-									}
-								}
-							}).serchDate();
-			
-			
-			//筛选点击事件
-			
-			
-			
-			$(".m_ul li span").click(function(){
-				
-				var normal="am-badge am-badge-secondary am-radius";		
-				var selected="am-badge am-badge-warning am-radius";
-				var myAttr=	$(this).attr("class");
-				if(myAttr==selected){
-					$(".m_ul li span").attr("class",normal);
-					$(this).attr("class",normal);
-					Pagination.serchDate();
-				}else{
-					$(".m_ul li span").attr("class",normal);
-					$(this).attr("class",selected);
-					onserch($(this).attr("kind"),$(this).attr("day"))
-				}
-				
-			});
-			
-			//下拉框
-			MTools.autoFullSelect();
-			//
-			//style="display:none"
-			$(".option1").css("display","none");
-			$(".option2").css("display","none");
-			
-		}
-		);
-		function option(){
-			$(".option").removeAttr("selected");
-			$('.time').attr('selected', true);
-			if($("#select").val() != null && $("#select").val() != ""){
-				if($("#select").val() != "absentDay"){
-					$(".option1").css("display","none");
-					$(".option2").css("display","block");
-				}else{
-					$(".option2").css("display","none");
-					$(".option1").css("display","block");
-				}
-			}else{
-				$(".option1").css("display","none");
-				$(".option2").css("display","none");
-			}
-		}
-		
-
-		
-	</script>
-	<!-- index js -->
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/store-check.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/store-check.html
deleted file mode 100644
index a7920bf..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/store-check.html
+++ /dev/null
@@ -1,261 +0,0 @@
-
-
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-<meta
-	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-	name="viewport" />
-<title th:text="${session.userInfo.shopName }"></title>
-
-<!-- Set render engine for 360 browser -->
-<meta name="renderer" content="webkit">
-
-<!-- No Baidu Siteapp-->
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-
-
-
-<script type="text/javascript"
-	th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript"
-	th:src="@{/js/systools/DDMBase.js}"></script>
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-<link rel="stylesheet"
-	th:href="@{/plugin/amazingUI/css/app.css}">
-<link rel="stylesheet" type="text/css"
-	th:href="@{/css/dingOrderList.css}">
-<style type="text/css">
-.m_ul{
-	list-style: none;
-}
-
-.m_ul li span{
-margin-left: 2em;
-}
-</style>
-</head>
-
-
-
-<body>
-	<!-- 商品列表页面 -->
-	<div class="wrap">
-		<!-- 头部开始 -->
-		<header data-am-widget="header"
-			class="am-header color-w back-m1 am-header-fixed">
-			<div class="am-header-left am-header-nav">
-				<a th:href="@{/admin/redirect/hive/mobile/personal?foot=1}" class=""> <i
-					class="am-header-icon am-icon-chevron-left"></i>
-				</a>
-			</div>
-
-			<h1 class="am-header-title">
-				<a href="#title-link" class=""> 库存盘点 </a>
-			</h1>
-
-
-		</header>
-		<!-- 头部结束 -->
-
-		<!-- 订单内容 -->
-		<div class="main main1" id="main" style="display: none;">
-			<form class="am-form am-form-horizontal" id="dataform"
-				onsubmit="javascripr:return false;">
-				<div class="am-form-group am-form-select am-input-group  am-input-group-primary am-g  title">
-					<div class="am-u-sm-6 margin-b1">
-						<select class="form-control" name="checkStatus" id="checkStatus" >
-							<option value=''>--请选择盘点状态--</option>
-							<option value='待审核' >待审核</option>
-							<option value='已完成'>已完成</option>
-						</select>
-					</div>
-<!--					-->
-<!--						&lt;!&ndash; <label class="col-sm-2 control-label">会员活跃度</label> &ndash;&gt;-->
-<!--						<div class="am-u-sm-6 margin-b1" >-->
-<!--							<select class="form-control autoFull border" -->
-<!--							th:data-url="@{/admin/dataDictionary/showDataDictionary}"-->
-<!--							data-param="{type:'会员活跃度'}" -->
-<!--							data-value="name"-->
-<!--							name="vipState"> -->
-<!--							<option value=''>活跃度</option>  -->
-<!--							</select>-->
-<!--						</div>-->
-<!--						<div class="am-u-sm-6 margin-b1">-->
-<!--							<select name="select" id="select" onchange="option()"> -->
-<!--								<option value=''>&#45;&#45;类型选择&#45;&#45;</option>-->
-<!--								<option value="absentDay">未到店日期</option>-->
-<!--								<option value="birthdays">生日</option>-->
-<!--								<option value="followDays">跟进</option>-->
-<!--								<option value="appointDays">预约</option>-->
-<!--							</select>-->
-<!--						</div>-->
-<!--						<div class="am-u-sm-6 margin-b1">-->
-<!--							<select name="time" id="time">-->
-<!--								<option value='' class="option time">&#45;&#45;时间选择&#45;&#45;</option>-->
-<!--								<option value="3"  class="option option1 ">3天</option>-->
-<!--								<option value="7" class="option option1">7天</option>-->
-<!--								<option value="14" class="option option1">14天</option>-->
-<!--								<option value="1"  class="option option2">今天</option>-->
-<!--								<option value="3" class="option option2">3天内</option>-->
-<!--								<option value="30" class="option option2">一个月</option>-->
-<!--							</select>-->
-<!--						</div>-->
-
-<!--					<div class="am-u-sm-8 ">-->
-<!--						<input autocomplete="off"   type="text" class="searchIn" name="keyWord"	placeholder="用户姓名/手机号" />-->
-
-<!--					</div>-->
-					<div class="am-u-sm-4 ">
-						<button type="button"
-							class="am-btn am-btn-default am-radius searchBtn"
-							onclick="Pagination.serchDate()">搜索</button>
-					</div>
-					
-						<!-- 记录当前页 -->
-						<input autocomplete="off"   type="hidden" name="offset" id="_offset" value="0" />
-						<input autocomplete="off"  	type="hidden" name="limit" id="limit"  value="10" />
-				</div>
-
-				
-				<div data-am-widget="list_news"
-					class="am-list-news am-list-news-default">
-					<!--列表标题-->
-					<div class="am-list-news-hd am-cf am-g">
-						<!--带更多链接-->
-						<div class="am-u-sm-3 ">
-							<h2 class="am-list-news-more am-fr">盘点编号</h2>
-						</div>
-						<div class="am-u-sm-3 ">
-							<h2 class="am-list-news-more am-fr">盘点时间</h2>
-						</div>
-						<div class="am-u-sm-2 ">
-							<h2 class="am-list-news-more am-fr">制单人</h2>
-						</div>
-						<div class="am-u-sm-2 ">
-							<h2 class="am-list-news-more am-fr">盘点状态</h2>
-						</div> 
-						<div class="am-u-sm-2 ">
-							<h2 class="am-list-news-more am-fr">操作</h2>
-						</div>
-					</div>
-					<div class="am-list-news-bd">
-						<ul class="am-list am-list-striped" id="showdataBox">
-
-						</ul>
-					</div>
-					<div id="pagingBox" align="center" style="margin-top: 10px"></div>
-				</div>
-				<!-- 商品展示结束 -->
-				<!-- 测试 -->
-			</form>
-		</div>
-		<!-- 订单内容结束 -->
-
-	</div>
-
-	<script
-		th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-	<script th:src="@{/plugin/amazingUI/js/amazeui.min.js}"></script>
-	<script>
-	
-		/**
-		加载数据
-		 **/
-		$(function() {
-			var pageSize=$("#limit").val();
-			Pagination
-					.init(
-							{
-								url :  basePath+"/admin/check/showList",
-								pageSize : pageSize,
-								builderDate : function(loj) {
-									if (loj.getRowCount() > 0) {
-										$("#main").show();
-										var html = "";
-										//构建数据
-										for (var i = 0; i < loj.getRowCount(); i++) {
-											var createTime=' ';
-											var status=' ';
-											if(loj.getString(i, "createDate")&&loj.getString(i, "createDate")!=''){
-												createTime = MGrid.getTime(loj.getString(i, "createDate"));
-											}
-
-											if(loj.getString(i, "checkStatus")&&loj.getString(i, "checkStatus")!=''){
-												createTime = MGrid.getTime(loj.getString(i, "createDate"));
-											}
-										
-											html += ' <li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">' 
-											+'<div class="am-u-sm-3 "><h3 class="am-list-item-hd">'+ loj.getString(i,"checkNo") + '</h3> </div>'
-											+'<div class="am-u-sm-3 "><h3 class="am-list-item-hd">' + createTime + '</h3> </div> '
-											+'<div class="am-u-sm-2 "><h3 class="am-list-item-hd">' + loj.getString(i,"makingManName")  + '</h3> </div> '
-											+'<div class="am-u-sm-2 "><h3 class="am-list-item-hd">' + loj.getString(i,"checkStatus")  + '</h3> </div> '
-											+'<div class="am-u-sm-2 "><a class="am-list-item-hd" href="'+basePath+'/admin/check/toMobileCheckDetail?checkId='+ loj.getString(i, "id")+ '&lookInfo=0">查看盘点</a></div></li>';
-										}
-										return html;
-									} else {
-										$("#pagingBox").hide();
-
-										
-									}
-								}
-							}).serchDate();
-			
-			
-			//筛选点击事件
-			
-			
-			
-			$(".m_ul li span").click(function(){
-				
-				var normal="am-badge am-badge-secondary am-radius";		
-				var selected="am-badge am-badge-warning am-radius";
-				var myAttr=	$(this).attr("class");
-				if(myAttr==selected){
-					$(".m_ul li span").attr("class",normal);
-					$(this).attr("class",normal);
-					Pagination.serchDate();
-				}else{
-					$(".m_ul li span").attr("class",normal);
-					$(this).attr("class",selected);
-					onserch($(this).attr("kind"),$(this).attr("day"))
-				}
-				
-			});
-			
-			//下拉框
-			MTools.autoFullSelect();
-			//
-			//style="display:none"
-			$(".option1").css("display","none");
-			$(".option2").css("display","none");
-			
-		}
-		);
-		function option(){
-			$(".option").removeAttr("selected");
-			$('.time').attr('selected', true);
-			if($("#select").val() != null && $("#select").val() != ""){
-				if($("#select").val() != "absentDay"){
-					$(".option1").css("display","none");
-					$(".option2").css("display","block");
-				}else{
-					$(".option2").css("display","none");
-					$(".option1").css("display","block");
-				}
-			}else{
-				$(".option1").css("display","none");
-				$(".option2").css("display","none");
-			}
-		}
-		
-
-		
-	</script>
-	<!-- index js -->
-</body>
-</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/vip-archives.html b/zq-erp/src/main/resources/templates/views/admin/hive/mobile/vip-archives.html
deleted file mode 100644
index 162f4b7..0000000
--- a/zq-erp/src/main/resources/templates/views/admin/hive/mobile/vip-archives.html
+++ /dev/null
@@ -1,251 +0,0 @@
-<!doctype html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-    <meta
-            content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
-            name="viewport"/>
-    <title th:text="${session.userInfo.shopName }"></title>
-
-    <!-- Set render engine for 360 browser -->
-    <meta name="renderer" content="webkit">
-    <script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-    <script type="text/javascript" th:src="@{/js/systools/DDMBase.js}"></script>
-    <link rel="stylesheet" th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
-    <link rel="stylesheet" th:href="@{/plugin/amazingUI/css/app.css}">
-    <link rel="stylesheet" type="text/css" th:href="@{/css/dingUserVip.css}">
-    <style type="text/css">
-        .loadingbig {
-            max-width: 100%;
-        }
-
-    </style>
-
-</head>
-<script>
-
-</script>
-
-
-<body>
-<!-- 商品列表页面 -->
-<div class="wrap">
-    <!-- 头部开始 -->
-    <header data-am-widget="header"
-            class="am-header color-w back-m1 am-header-fixed">
-        <div class="am-header-left am-header-nav">
-            <a th:href="@{/admin/redirect/hive/mobile/CRM-account}" class=""> <i
-                    class="am-header-icon am-icon-chevron-left"></i>
-            </a>
-        </div>
-
-        <h1 class="am-header-title">
-            <a href="#title-link" class="">客户档案</a>
-        </h1>
-
-    </header>
-    <!-- 头部结束 -->
-
-    <!-- 订单内容 -->
-    <div class="main main2" id="app">
-        <form class="am-form am-form-horizontal" method="post" id="dataform" onsubmit="javascripr:return false;">
-
-            <div class="am-input-group am-form-group  am-input-group-primary am-g bot">
-                <div class="am-u-sm-12">
-                    <span class="am-input-group-label ">会员姓名</span>
-                </div>
-                <div class="am-u-sm-12">
-                    <input autocomplete="off"   type="text" class="am-form-field " th:value="${session.lookVipInfo.vipName}"
-                           readonly="readonly"/>
-                </div>
-            </div>
-
-
-            <template v-for="question in questions">
-                <div v-if="question.type=='标题'"
-                     class="am-input-group am-form-group  am-input-group-primary am-g bot">
-                    <div class="am-u-sm-12">
-                        <span class="am-input-group-label">{{question.question}}</span>
-                    </div>
-                </div>
-
-
-                <div v-if="question.type=='文本'" class="am-input-group am-form-group  am-input-group-primary am-g bot">
-                    <div class="am-u-sm-12">
-                        <span class="am-input-group-label">{{question.question}}</span>
-                    </div>
-                    <div class="am-u-sm-12">
-                        <input autocomplete="off"   type="text" v-model="question.vipAnswer.answerText" class="am-form-field ">
-                    </div>
-                </div>
-
-                <div v-if="question.type=='单选'" class="am-input-group am-form-group  am-input-group-primary am-g bot">
-					<div class="am-u-sm-12">
-						<span class="am-input-group-label">{{question.question}}</span>
-					</div>
-					<div class="am-u-sm-12">
-						<select v-model="question.vipAnswer.answerId">
-							<option v-for="item in question.answers" v-bind:value="item.id" >{{item.answer}}</option>
-						</select>
-					</div>
-				</div>
-
-				<div v-if="question.type=='多选'" class="am-input-group am-form-group  am-input-group-primary am-g bot">
-					<div class="am-u-sm-12">
-						<span class="am-input-group-label">{{question.question}}</span>
-					</div>
-					<div class="am-u-sm-12">
-						<div class="am-checkbox">
-							<template  v-for="item in question.answers" >
-								<div class="am-checkbox">
-									<label>
-										<input autocomplete="off"   type="checkbox"  v-model="question.vipAnswer.answerId"  v-bind:value="item.id" > {{item.answer}}
-									</label>
-								</div>
-							</template>
-						</div>
-					</div>
-				</div>
-
-
-
-
-			</template>
-
-
-            <div class="inputBtn">
-                <input autocomplete="off"   type="button" @click="submit()" class="am-btn btn-m1 am-radius am-btn-block"
-                       value="保存"></input>
-            </div>
-            <!-- 测试 -->
-
-        </form>
-    </div>
-</div>
-
-<script
-        th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
-<script th:src="@{/plugin/amazingUI/js/amazeui.min.js}"></script>
-<script th:src="@{/js/systools/mobile/AjaxProxyVue-mobile.js}"></script>
-<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
-<script>
-
-
-    var id = $.query.get("id");
-    var app = new Vue({
-        el: '#app',
-        data: {
-            id: id,
-            questions: [{
-                answers: [{}],
-                category: "",
-                id: "",
-                orderField: "",
-                question: "",
-                type: "",
-                vipAnswer: {vipAnswer:''},
-            }]
-        },
-        created: function () {
-            this.loadInfo();
-        },
-
-        mounted: function () {
-
-        },
-
-        methods: {
-
-
-            loadInfo: function () {
-
-                console.log('加载服务器数据');
-                var _this = this;
-                AjaxProxy.requst({
-                    async: false,
-                    url: basePath + '/admin/vipInfo/getVipQuestions?id=' + id,
-                    callback: function (data) {
-                        var questions= data.mapInfo.questions;
-                        for(let i =0;i<questions.length;i++){
-                            if(questions[i].vipAnswer==null){
-                                questions[i].vipAnswer={vipAnswer:'',answerId:''};
-                            }
-                            if(questions[i].type=='多选'){
-                                if(questions[i].vipAnswer){
-                                    questions[i].vipAnswer.answerId=questions[i].vipAnswer.answerId.split(",");
-                                }
-                            }else if(questions[i].type=='单选'){
-                                if(questions[i].vipAnswer){
-                                    questions[i].vipAnswer.answerId= parseInt(
-                                        questions[i].vipAnswer.answerId
-                                    ) ;
-                                }
-                            }
-                        }
-                        _this.questions = questions;
-                    }
-                });
-
-
-            }
-            ,
-            submit: function () {
-                console.log("提交");
-                let _this = this;
-				let vipAnswers=[];
-				for(let i=0; i<_this.questions.length ; i++){
-					var quesion=_this.questions[i];
-
-					let vipAnswer=quesion.vipAnswer.answerId;
-					if(quesion.type=='多选'){
-                        vipAnswer=quesion.vipAnswer.answerId.join(",");
-                    }
-					let obj={
-						quesionId:quesion.id,
-						vipId:id,
-						answerId:vipAnswer,
-						answerText:quesion.vipAnswer.answerText,
-					}
-
-					vipAnswers.push(obj);
-				}
-                var params = {
-                    id:id,
-					vipAnswers:vipAnswers
-                }
-
-
-                if (_this.validate(params)) {
-                    AjaxProxy.requst({
-                        app: _this,
-                        data: params,
-                        url: basePath + '/admin/vipInfo/modifyVipArchives',
-                        callback: function (data) {
-                           layer.open({
-                               content: data.info
-                               ,time: 2 //2秒后自动关闭
-
-                            });
-                        }
-                    });
-                }
-            }
-            ,
-            validate: function (params) {
-
-                return true;
-            }
-            ,
-
-
-        },
-
-    })
-
-
-</script>
-<!-- index js -->
-</body>
-</html> 
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new-bak.html b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new-bak.html
new file mode 100644
index 0000000..3bcdc67
--- /dev/null
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new-bak.html
@@ -0,0 +1,229 @@
+
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
+<head>
+<meta charset="utf-8">
+<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+<meta name="renderer" content="webkit|ie-comp|ie-stand">
+<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+<meta name="viewport"
+	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+<meta http-equiv="Cache-Control" content="no-siteapp" />
+<LINK rel="Bookmark" href="../images/favicon.ico">
+<!-- 本框架基本脚本和样式 -->
+<script type="text/javascript"
+        th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/MBase.js}"></script>
+ 
+</head>
+<body class="gray-bg">
+	 
+
+	<div class="ibox-content">
+		<!-- 搜索框部分start -->
+		<form class="form-inline" id="serchform">
+		<div class="row mb-10">
+				<div class="col-sm-8">
+					<button  onclick="myGrid.serchData()" type="button" class="btn btn-info btn-sm"><i class="fa fa-search" ></i> 搜索</button>
+					<button  onclick="myGrid.resetForm()" type="button"   class="btn btn-default btn-sm"><i class="fa fa-refresh " ></i> 重置</button>
+					<button  matrix:btn="ygyjbb-exportExcel"  onclick="exportExcel()" type="button" class="btn btn-default btn-sm"><i class="fa fa-download" ></i> 导出</button>
+				</div>
+			</div>
+			<div class="form-group mr-20">
+				<label >选择年月</label> <select
+					class="form-control" name="year" id="select_year">
+					<option value="">年份</option>
+					<option value="2010">2010</option>
+					<option value="2011">2011</option>
+					<option value="2012">2012</option>
+					<option value="2013">2013</option>
+					<option value="2014">2014</option>
+					<option value="2015">2015</option>
+					<option value="2016">2016</option>
+					<option value="2017">2017</option>
+					<option value="2018">2018</option>
+					<option value="2019">2019</option>
+					<option value="2020">2020</option>
+					<option value="2021">2021</option>
+				</select> <select class="form-control" name="month" id="select_month">
+					<option value="01">1</option>
+					<option value="02">2</option>
+					<option value="03">3</option>
+					<option value="04">4</option>
+					<option value="05">5</option>
+					<option value="06">6</option>
+					<option value="07">7</option>
+					<option value="08">8</option>
+					<option value="09">9</option>
+					<option value="10">10</option>
+					<option value="11">11</option>
+					<option value="12">12</option>
+				</select>
+				<select class="form-control" name="day" id="select_day">
+				 <option value="">日</option>
+				<th:block th:each="i:${#numbers.sequence(1, 31)}"   >
+					<option th:value="${i }" th:text="${i }"></option>
+				</th:block>
+				</select>
+			</div>
+			<div class="form-group mr-20">
+				<label>日期范围</label>
+				<input name="beginTime" type="text" class="form-control datetimepicker" id="beginTime">-
+				<input name="endTime"  type="text" class="form-control datetimepicker" id="endTime">
+			</div>
+
+			<div class="form-group mr-20">
+				<label>会员</label>
+				<input autocomplete="off" placeholder="姓名/编号/电话"  name="vipQueryKey" type="text" class="form-control"  >
+			</div>
+
+			<div class="form-group mr-20">
+				<label>业绩归属人</label>
+				<select class="form-control autoFull select2"
+						th:data-url="@{/admin/getShopStaffByRoleName?roleName=美疗师}"
+						data-value="suId"
+						data-filed="suName"
+						name="beaultId"
+						id="beaultId">
+					<option value="">--请选择--</option>
+				</select>
+			</div>
+
+			<div class="form-group mr-20">
+				<label>门店</label>
+				<select class="form-control autoFull" data-filed="shopName" name="shopId" id="shopId"
+						th:data-url="@{/admin/shopInfo/findAllWithPermi}">
+					<option value=''>--请选择部所属门店--</option>
+				</select>
+			</div>
+		</form>
+
+
+		<table id="mgrid">
+			<thead>
+				<tr>
+					<th data-formatter="MGrid.indexfn" data-align="center"
+						data-width="30px" data-footer-formatter="footCountTitle">序号</th>
+					<th data-field="datatime">时间</th>
+					<th data-field="orderNo" data-formatter="buildOpenDetail" >订单编号</th>
+					<th data-field="orderType">订单类型</th>
+					<th data-field="vipName">会员姓名</th>
+					<th data-field="proName">产品</th>
+					<th data-field="cateName">产品分类</th>
+					<th data-field="zkTotal" data-footer-formatter="countColumn">订单金额</th>
+					<th data-field="goodsCash" data-footer-formatter="countColumn">订单业绩</th>
+					<th data-field="payMethod">收款方式</th>
+					<th data-field="achieveType">业绩类型</th>
+					<th data-field="meiliao">员工</th>
+					<th data-field="hisConsume" data-footer-formatter="countColumn">本金消耗
+						<i data-toggle="tooltip" data-placement="top" title="消耗金额:客户做服务时划扣的本金" class="fa fa-question-circle"></i>
+					</th>
+					<th data-field="freeConsume" data-footer-formatter="countColumn">赠送消耗
+						<i data-toggle="tooltip" data-placement="top" title="赠送消耗:客户做服务时划扣的赠送金额" class="fa fa-question-circle"></i>
+					</th>
+					<th data-field="projPercentage" data-footer-formatter="countColumn">服务提成
+						<i data-toggle="tooltip" data-placement="top" title="服务提成:为美疗师手动设置的项目服务提成" class="fa fa-question-circle"></i>
+					</th>
+					<th data-field="numberOfPeople" data-footer-formatter="countColumn">人头</th>
+					<th data-field="projNum" data-footer-formatter="countColumn">项目个数</th>
+					<th data-field="projTime" data-footer-formatter="countColumn">项目时间</th>
+					<th data-field="guwen">操作人</th>
+					<th data-field="shopName">门店</th>
+					
+				</tr>
+			</thead>
+		</table>
+	</div>
+
+	<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
+	<script type="text/javascript" th:src="@{/js/function/public.js}"></script>
+	<script type="text/javascript">
+		var myGrid;
+		var initParam = {
+				format : "yyyy-mm-dd hh:ii", //默认显示年与日,如果想显示十分秒:"yyyy-mm-dd hh:ii:ss"
+				minView: "hour", 	//"month",只显示年月日的选择,不会再跳转去选择时分秒;如果想要选择时分秒的:"hour"
+			}
+		 MTools.ininDatetimepicker(initParam);
+		//限制结束时间不小于开始时间
+		 MTools.limitStartEndTime({});
+		
+		var date = new Date();
+		var year = date.getFullYear();
+		var month = date.getMonth() + 1;
+		var year_options = "";
+		for (var i = 9; i > 0; i--) {
+			year_options += "<option value='" + (year - i) + "'>" + (year - i)
+					+ "</option>";
+		}
+		year_options += "<option value='"+year+"' selected='selected'>" + year
+				+ "</option>";
+		$("#select_year").html(year_options);
+		$("#select_month").find("option").each(function(row) {
+			var option_month = $(this).val();
+			if (month == option_month) {
+				$(this).attr("selected", true);
+			}
+		});
+
+		function buildOpenDetail(value, row, index){
+			var html = [];
+			if(row.orderType=='服务单'){
+				html[0] = '<a  onClick="fnPublci.showServiceOrder(1 , \'' + value +'\')"   class="text-primary " >'+value+'</a>'
+			}else{
+				html[0] = '<a  onClick="fnPublci.showOrder(1 , \'' + value +'\')"   class="text-primary " >'+value+'</a>'
+			}
+
+			return html.join("");
+		}
+
+
+
+
+		$(function() {
+			MTools.autoFullSelect();
+			myGrid = MGrid.initGrid({
+				url : basePath+"/admin/achieve/findDailyInfoNew",
+				showExport : true,
+				showFooter : true,
+				height:'auto',
+				width:'auto',
+				exportDataType : "basic", //basic', 'all', 'selected'.
+				exportTypes : [ 'excel', 'xlsx' ], //导出类型
+				exportOptions : {
+					ignoreColumn : [ 0 ],
+					fileName : "每日单据统计" + MTools.getTime(), //文件名称设置  
+					worksheetName : 'Sheet1', //表格工作区名称  
+					tableName : '每日单据统计',
+					excelstyles : [ 'background-color', 'color', 'font-size',
+							'font-weight' ],
+				}
+			});
+
+			$('[data-toggle="tooltip"]').tooltip()
+
+		});
+
+		function footCountTitle(data) {
+			return "<b>合计</b>";
+		};
+		function countColumn(data) {
+			console.log(data)
+			 field = this.field;
+			    var resultsumQuantity = parseFloat((data.reduce(function(sum, row) { 
+			    	console.log(sum,row[field]);
+			        return sum + (+row[field]);
+			    }, 0)).toFixed(2));//保留有效数字
+			    return "<b>"+resultsumQuantity+"</b>";
+		};
+		
+		
+		function exportExcel(){
+
+			var param=MForm.toUrlParam("#serchform");
+
+			window.location.href=basePath+"/admin/achieve/exportDailyInfoNew?"+param;
+		}
+		
+	</script>
+</body>
+</html>
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new.html b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new.html
index e833811..f19c967 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new.html
@@ -11,235 +11,275 @@
 <meta http-equiv="Cache-Control" content="no-siteapp" />
 <LINK rel="Bookmark" href="../images/favicon.ico">
 <!-- 本框架基本脚本和样式 -->
-<script type="text/javascript"
-        th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript" th:src="@{/js/systools/MBase.js}"></script>
- 
+<script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script>
+<link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
+<link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" th:src="@{/js/function/public.js}"></script>
 </head>
-<body class="gray-bg">
-	 
+<style>
+	.table-style {
+		margin: 20px 0;
+		padding: 20px 10px;
+		border: 1px solid #DCDFE6;
+		background-color: white;
+	}
+	.search-form {
+		background-color: white;
+		padding-top: 10px;
+		padding-left: 20px;
+		padding-bottom: 10px;
+	}
+</style>
+<body>
+<div id="app" style="">
+	<el-row class="search-form">
+		<el-form ref="form" :model="form" inline>
+			<el-form-item label="选择年月">
+				<el-select v-model="form.year" style="width:120px;" placeholder="请选择">
+					<el-option v-for="item in years"
+							   :key="item"
+							   :label="item"
+							   :value="item"></el-option>
+				</el-select>
+			</el-form-item>
+			<el-form-item>
+				<el-select v-model="form.month" style="width:120px;" placeholder="请选择">
+					<el-option v-for="item in months"
+							   :key="item"
+							   :label="item"
+							   :value="item"></el-option>
+				</el-select>
+			</el-form-item>
+			<el-form-item>
+				<el-select v-model="form.day" style="width:120px;" placeholder="请选择">
+					<el-option v-for="item in days"
+							   :key="item"
+							   :label="item"
+							   :value="item"></el-option>
+				</el-select>
+			</el-form-item>
+			<el-form-item label="日期范围">
+				<el-date-picker v-model="form.timeRange"
+								type="datetimerange"
+								range-separator="至"
+								start-placeholder="开始日期"
+								end-placeholder="结束日期">
+				</el-date-picker>
+			</el-form-item>
 
-	<div class="ibox-content">
-		<!-- 搜索框部分start -->
-		<form class="form-inline" id="serchform">
-		<div class="row mb-10">
-				<div class="col-sm-8">
-					<button  onclick="myGrid.serchData()" type="button" class="btn btn-info btn-sm"><i class="fa fa-search" ></i> 搜索</button>
-					<button  onclick="myGrid.resetForm()" type="button"   class="btn btn-default btn-sm"><i class="fa fa-refresh " ></i> 重置</button>
-					<button  matrix:btn="ygyjbb-exportExcel"  onclick="exportExcel()" type="button" class="btn btn-default btn-sm"><i class="fa fa-download" ></i> 导出</button>
-				</div>
-			</div>
-			<div class="form-group mr-20">
-				<label >选择年月</label> <select
-					class="form-control" name="year" id="select_year">
-					<option value="">年份</option>
-					<option value="2010">2010</option>
-					<option value="2011">2011</option>
-					<option value="2012">2012</option>
-					<option value="2013">2013</option>
-					<option value="2014">2014</option>
-					<option value="2015">2015</option>
-					<option value="2016">2016</option>
-					<option value="2017">2017</option>
-					<option value="2018">2018</option>
-					<option value="2019">2019</option>
-					<option value="2020">2020</option>
-					<option value="2021">2021</option>
-				</select> <select class="form-control" name="month" id="select_month">
-					<option value="01">1</option>
-					<option value="02">2</option>
-					<option value="03">3</option>
-					<option value="04">4</option>
-					<option value="05">5</option>
-					<option value="06">6</option>
-					<option value="07">7</option>
-					<option value="08">8</option>
-					<option value="09">9</option>
-					<option value="10">10</option>
-					<option value="11">11</option>
-					<option value="12">12</option>
-				</select>
-				<select class="form-control" name="day" id="select_day">
-				 <option value="">日</option>
-				<th:block th:each="i:${#numbers.sequence(1, 31)}"   >
-					<option th:value="${i }" th:text="${i }"></option>
-				</th:block>
-				</select>
-			</div>
-			<div class="form-group mr-20">
-				<label>日期范围</label>
-				<input name="beginTime" type="text" class="form-control datetimepicker" id="beginTime">-
-				<input name="endTime"  type="text" class="form-control datetimepicker" id="endTime">
-			</div>
+			<el-form-item label="会员">
+				<el-input v-model="form.vipQueryKey"></el-input>
+			</el-form-item>
 
-			<div class="form-group mr-20">
-				<label>会员</label>
-				<input autocomplete="off" placeholder="姓名/编号/电话"  name="vipQueryKey" type="text" class="form-control"  >
-			</div>
+			<el-form-item label="业绩归属人">
+				<el-select v-model="form.beaultId" placeholder="请选择">
+					<el-option v-for="item in achieveUsers"
+							   :key="item.suId"
+							   :label="item.suName"
+							   :value="item.suId"></el-option>
+				</el-select>
+			</el-form-item>
 
-			<div class="form-group mr-20">
-				<label>美疗师</label>
-				<select class="form-control autoFull select2"
-						th:data-url="@{/admin/getShopStaffByRoleName?roleName=美疗师}"
-						data-value="suId"
-						data-filed="suName"
-						name="beaultId"
-						id="beaultId">
-					<option value="">--请选择美容师--</option>
-				</select>
-			</div>
+			<el-form-item label="门店">
+				<el-select v-model="form.shopId" placeholder="请选择所属门店">
+					<el-option v-for="item in shopList"
+							:key="item.id"
+							:label="item.shopName"
+							:value="item.id">
+					</el-option>
+				</el-select>
+			</el-form-item>
 
-			<div class="form-group mr-20">
-				<label>门店</label>
-				<select class="form-control autoFull" data-filed="shopName" name="shopId" id="shopId"
-						th:data-url="@{/admin/shopInfo/findAllWithPermi}">
-					<option value=''>--请选择部所属门店--</option>
-				</select>
-			</div>
-		</form>
+			<el-button type="primary" @click="search" >搜索</el-button>
+			<el-button @click="resetForm('form')">重置</el-button>
+			<el-button type="warning" @click="exportExcel">导出</el-button>
+		</el-form>
 
-
-		<table id="mgrid">
-			<thead>
-				<tr>
-					<th data-formatter="MGrid.indexfn" data-align="center"
-						data-width="30px" data-footer-formatter="footCountTitle">序号</th>
-					<th data-field="datatime">时间</th>
-					<th data-field="orderType">订单类型</th>
-					<th data-field="orderNo" data-formatter="buildOpenDetail" >订单编号</th>
-					<th data-field="levelName">会员级别</th>
-					<th data-field="vipName">姓名</th>
-					<th data-field="proName">项目名称</th>
-					<th data-field="zkTotal" data-footer-formatter="countColumn">总现金业绩
-						<i data-toggle="tooltip" data-placement="top" title="总现金业绩=售卡+项目+产品" class="fa fa-question-circle"></i>
-					</th>
-
-					<th data-field="cardCash"  data-footer-formatter="countColumn"  >售卡业绩
-						<i data-toggle="tooltip" data-placement="top" title="售卡业绩:现金购买充值卡,套餐,充值的收款金额" class="fa fa-question-circle"></i>
-					</th>
-
-					<th data-field="projCash" data-footer-formatter="countColumn">项目业绩
-						<i data-toggle="tooltip" data-placement="top" title="项目业绩:现金购买单个项目的业绩" class="fa fa-question-circle"></i>
-					</th>
-
-					<th data-field="goodsCash" data-footer-formatter="countColumn">产品业绩
-						<i data-toggle="tooltip" data-placement="top" title="产品业绩:现金购买产品的业绩" class="fa fa-question-circle"></i>
-					</th>
-
-					<th data-field="consume" data-footer-formatter="countColumn">余额划扣业绩
-						<i data-toggle="tooltip" data-placement="top" title="余额划扣业绩:从客户的充值卡余额中划扣消费的金额" class="fa fa-question-circle"></i>
-					</th>
-
-					<th data-field="hisConsume" data-footer-formatter="countColumn">本金消耗
-						<i data-toggle="tooltip" data-placement="top" title="消耗金额:客户做服务时划扣的本金" class="fa fa-question-circle"></i>
-					</th>
-					<th data-field="freeConsume" data-footer-formatter="countColumn">赠送消耗
-						<i data-toggle="tooltip" data-placement="top" title="赠送消耗:客户做服务时划扣的赠送金额" class="fa fa-question-circle"></i>
-					</th>
-					<th data-field="projPercentage" data-footer-formatter="countColumn">服务提成
-						<i data-toggle="tooltip" data-placement="top" title="服务提成:为美疗师手动设置的项目服务提成" class="fa fa-question-circle"></i>
-					</th>
-					<th data-field="guwen">顾问</th>
-					<th data-field="meiliao">美疗师</th>
-					<th data-field="numberOfPeople" data-footer-formatter="countColumn">人头</th>
-					<th data-field="projNum" data-footer-formatter="countColumn">项目个数</th>
-					<th data-field="projTime" data-footer-formatter="countColumn">项目时间</th>
-					<th data-field="shopName">门店</th>
-					
-				</tr>
-			</thead>
-		</table>
-	</div>
-
-	<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
-	<script type="text/javascript" th:src="@{/js/function/public.js}"></script>
-	<script type="text/javascript">
-		var myGrid;
-		var initParam = {
-				format : "yyyy-mm-dd hh:ii", //默认显示年与日,如果想显示十分秒:"yyyy-mm-dd hh:ii:ss"
-				minView: "hour", 	//"month",只显示年月日的选择,不会再跳转去选择时分秒;如果想要选择时分秒的:"hour"
+	</el-row>
+	<el-row class="table-style">
+		<el-table :data="tableData" style="width: 100%">
+			<el-table-column type="index" width="30"></el-table-column>
+			<el-table-column prop="datatime" width="150" label="时间"></el-table-column>
+			<el-table-column prop="orderNo" width="180" label="订单编号">
+				<template slot-scope="scope">
+					<el-link @click="jumpOrder(scope.row.orderType, scope.row.orderNo)" type="primary">{{scope.row.orderNo}}</el-link>
+				</template>
+			</el-table-column>
+			<el-table-column prop="orderType" label="订单类型"></el-table-column>
+			<el-table-column prop="vipName" label="会员姓名"></el-table-column>
+			<el-table-column prop="proName" label="产品" width="200"></el-table-column>
+			<el-table-column prop="cateName" label="产品分类"></el-table-column>
+			<el-table-column prop="zkTotal" label="订单金额"></el-table-column>
+			<el-table-column prop="goodsCash" label="现金"></el-table-column>
+			<el-table-column prop="cardCash" label="划扣"></el-table-column>
+<!--			<el-table-column prop="goodsCash" label="订单业绩"></el-table-column>-->
+			<el-table-column prop="meiliao" label="员工"></el-table-column>
+			<el-table-column v-for="(item, index) in customColumns" width="120" :key="index" :label="item.value">
+				<template slot-scope="scope">
+					<span v-if="item.value == scope.row.achieveType">{{scope.row.goodsCash}}</span>
+				</template>
+			</el-table-column>
+			<el-table-column prop="hisConsume" label="本金消耗"></el-table-column>
+			<el-table-column prop="freeConsume" label="赠送消耗"></el-table-column>
+			<el-table-column prop="projPercentage" label="服务提成"></el-table-column>
+			<el-table-column prop="numberOfPeople" label="人头"></el-table-column>
+			<el-table-column prop="projNum" label="项目个数"></el-table-column>
+			<el-table-column prop="projTime" label="服务时间"></el-table-column>
+			<el-table-column prop="guwen" label="操作人"></el-table-column>
+			<el-table-column prop="shopName" label="门店"></el-table-column>
+		</el-table>
+		<el-row style="margin-top: 10px;">
+			<el-pagination
+					@size-change="handleSizeChange"
+					@current-change="handleCurrentChange"
+					:current-page="page.currentPage"
+					:page-sizes="[10, 20, 30, 50]"
+					:page-size="page.size"
+					layout="total, sizes, prev, pager, next, jumper"
+					:total="page.total">
+			</el-pagination>
+		</el-row>
+	</el-row>
+</div>
+<script type="text/javascript" th:src="@{/plugin/layer/layer.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
+<script type="text/javascript" th:inline="javascript">
+	var vue = new Vue({
+		el : "#app",
+		data : {
+			tableData : [],
+			customColumns : [],
+			shopList : [],
+			achieveUsers : [],
+			years : [2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021],
+			months : ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"],
+			days : [],
+			form : {
+				year : '',
+				month : '',
+				day : '',
+				timeRange : '',
+				vipQueryKey : '',
+				beaultId : '',
+				shopId : ''
+			},
+			page : {
+				currentPage : 1,
+				size : 10,
+				total : 0
 			}
-		 MTools.ininDatetimepicker(initParam);
-		//限制结束时间不小于开始时间
-		 MTools.limitStartEndTime({});
-		
-		var date = new Date();
-		var year = date.getFullYear();
-		var month = date.getMonth() + 1;
-		var year_options = "";
-		for (var i = 9; i > 0; i--) {
-			year_options += "<option value='" + (year - i) + "'>" + (year - i)
-					+ "</option>";
-		}
-		year_options += "<option value='"+year+"' selected='selected'>" + year
-				+ "</option>";
-		$("#select_year").html(year_options);
-		$("#select_month").find("option").each(function(row) {
-			var option_month = $(this).val();
-			if (month == option_month) {
-				$(this).attr("selected", true);
-			}
-		});
+		},
+		created : function() {
+			this.initDays();
+			this.queryCustomColumns();
+			this.queryShops();
+			this.queryAchieveUsers();
+		},
+		methods : {
+			queryTableData () {
+				let _this = this;
+				var form = _this.form;
+				var page = _this.page;
+				var params = _this.form;
+				params.limit = page.size;
+				params.offset = (page.currentPage - 1) * page.size;
 
-		function buildOpenDetail(value, row, index){
-			var html = [];
-			if(row.orderType=='服务单'){
-				html[0] = '<a  onClick="fnPublci.showServiceOrder(1 , \'' + value +'\')"   class="text-primary " >'+value+'</a>'
-			}else{
-				html[0] = '<a  onClick="fnPublci.showOrder(1 , \'' + value +'\')"   class="text-primary " >'+value+'</a>'
-			}
-
-			return html.join("");
-		}
-
-
-
-
-		$(function() {
-			MTools.autoFullSelect();
-			myGrid = MGrid.initGrid({
-				url : basePath+"/admin/achieve/findDailyInfoNew",
-				showExport : true,
-				showFooter : true,
-				height:'auto',
-				width:'auto',
-				exportDataType : "basic", //basic', 'all', 'selected'.
-				exportTypes : [ 'excel', 'xlsx' ], //导出类型
-				exportOptions : {
-					ignoreColumn : [ 0 ],
-					fileName : "每日单据统计" + MTools.getTime(), //文件名称设置  
-					worksheetName : 'Sheet1', //表格工作区名称  
-					tableName : '每日单据统计',
-					excelstyles : [ 'background-color', 'color', 'font-size',
-							'font-weight' ],
+				if (form.timeRange) {
+					params.beginTime = form.timeRange?moment(form.timeRange[0]).format("YYYY-MM-DD HH:mm"):'';
+					params.endTime = form.timeRange?moment(form.timeRange[1]).format("YYYY-MM-DD HH:mm"):'';
 				}
-			});
-
-			$('[data-toggle="tooltip"]').tooltip()
-
-		});
-
-		function footCountTitle(data) {
-			return "<b>合计</b>";
-		};
-		function countColumn(data) {
-			console.log(data)
-			 field = this.field;
-			    var resultsumQuantity = parseFloat((data.reduce(function(sum, row) { 
-			    	console.log(sum,row[field]);
-			        return sum + (+row[field]);
-			    }, 0)).toFixed(2));//保留有效数字
-			    return "<b>"+resultsumQuantity+"</b>";
-		};
-		
-		
-		function exportExcel(){
-
-			var param=MForm.toUrlParam("#serchform");
-
-			window.location.href=basePath+"/admin/achieve/exportDailyInfoNew?"+param;
+				$.AjaxProxy({
+					p:params
+				}).invoke(basePath + "/admin/achieve/findDailyInfoNew", function (loj) {
+					_this.tableData = loj.getValue("rows");
+					_this.page.total = loj.getResult().total;
+				});
+			},
+			queryCustomColumns() {
+				let _this = this;
+				AjaxProxy.requst({
+					app: _this,
+					url: basePath + '/admin/customerDictionary/getListByParentCode/YJLX',
+					callback: function (data) {
+						_this.customColumns = data.rows;
+						_this.queryTableData();
+					}
+				});
+			},
+			queryShops() {
+				let _this = this;
+				AjaxProxy.requst({
+					app: _this,
+					url: basePath + '/admin/shopInfo/findAllWithPermi',
+					callback: function (data) {
+						_this.shopList = data.rows;
+					}
+				});
+			},
+			queryAchieveUsers() {
+				let _this = this;
+				AjaxProxy.requst({
+					app: _this,
+					url: basePath + '/admin/getShopStaffByRoleName?roleName=美疗师',
+					callback: function (data) {
+						_this.achieveUsers = data.rows;
+					}
+				});
+			},
+			resetForm(formName) {
+				// this.$refs[formName].resetFields();
+				this.form = {
+					timeRange : '',
+					vipQueryKey : '',
+					beaultId : '',
+					shopId : ''
+				}
+			},
+			search() {
+				this.queryTableData();
+			},
+			handleSizeChange(val) {
+				this.page.size = val;
+				this.queryTableData();
+			},
+			handleCurrentChange(val) {
+				this.page.currentPage = val;
+				this.queryTableData();
+			},
+			initDays() {
+				let _this = this;
+				for (var i = 1; i <= 31 ; i++) {
+					_this.days.push(i);
+				}
+			},
+			getRequestParam() {
+				var form = this.form;
+				var params = form;
+				if (form.timeRange) {
+					params.beginTime = form.timeRange?moment(form.timeRange[0]).format("YYYY-MM-DD HH:mm"):'';
+					params.endTime = form.timeRange?moment(form.timeRange[1]).format("YYYY-MM-DD HH:mm"):'';
+				}
+				return params;
+			},
+			exportExcel() {
+				window.location.href=basePath+"/admin/achieve/exportDailyInfoNew?"+MTools.jsonToUrlParam(this.getRequestParam());
+			},
+			jumpOrder(type, value) {
+				if(type=='服务单') {
+					fnPublci.showServiceOrder(1, value);
+				} else {
+					fnPublci.showOrder(1, value);
+				}
+			}
 		}
-		
-	</script>
+	});
+</script>
 </body>
 </html>
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-sale-list.html b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-sale-list.html
index a9c2d1b..33f01ce 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-sale-list.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-sale-list.html
@@ -116,7 +116,8 @@
 		}
 
 		function zkAmountFormat(value, row, index) {
-			return row.shouldPay + row.refund - row.arrears - row.totalPay;
+			var result = row.shouldPay + row.refund - row.arrears - row.totalPay;
+			return result.toFixed(2);
 		}
 
 		function footCountTitle(data) {
diff --git a/zq-erp/src/main/resources/templates/views/admin/shop/logisticsImport-form.html b/zq-erp/src/main/resources/templates/views/admin/shop/logisticsImport-form.html
new file mode 100644
index 0000000..a1ea86c
--- /dev/null
+++ b/zq-erp/src/main/resources/templates/views/admin/shop/logisticsImport-form.html
@@ -0,0 +1,125 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org">
+<head>
+    <meta charset="utf-8">
+    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <meta http-equiv="Cache-Control" content="no-siteapp" />
+    <!-- 本框架基本脚本和样式 -->
+    <script type="text/javascript"
+            th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+    <script type="text/javascript"
+            th:src="@{/js/systools/MBase.js}"></script>
+    <script src="https://cdn.jsdelivr.net/gh/jquery-form/form@4.2.2/dist/jquery.form.min.js" integrity="sha384-FzT3vTVGXqf7wRfy8k4BiyzvbNfeYjK+frTVqZeNDFl8woCbF0CYG6g2fMEFFo/i" crossorigin="anonymous"></script>
+</head>
+<body>
+<div class="ibox-content">
+    <form name="uploadExcel"
+          style="display: contents; margin-left: 20px;"
+          action="/admin/shopOrder/logisticsImport" method="post"
+          enctype="multipart/form-data" id="uploadForm">
+
+        <div class="form-group">
+            <input onclick="importChances()"
+                   class="input-text upload-url radius form-control" type="text"
+                   id="showFileName" readonly
+                   style="width: 200px; display: inline; margin-left: 50px;">
+            <a onclick="importChances()" class="btn btn-primary radius">
+                <i class="fa fa-cloud-upload"></i> 浏览文件
+            </a>
+            <input type="file" name="file" accept=".xls,.xlsx"
+                   id="chanceUploadId" style="display: none">
+            <button type="button" onclick="download()"
+                    class="btn btn-success radius">下载模板</button></div>
+        <div class="form-group ">
+            <div class="col-sm-12 text-center">
+
+                <button type="submit" onclick="return submitFile()"
+                        class="btn btn-success radius">导入快递单</button>
+                <a
+                        class="btn btn-danger radius" href="javascript:;" onclick="MTools.closeForm()" ><i class="fa fa-close"></i> 关闭</a>
+            </div>
+        </div>
+    </form>
+</div>
+</body>
+<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
+<script th:inline="javascript">
+    MTools.autoFullSelect();
+    $(".select2").select2();
+
+    /*<![CDATA[*/
+    var obj=/*[[${obj}]]*/
+    /*]]>*/
+
+    var invokeUrl=basePath+"/admin/shopOrder/showList";
+    var myForm=MForm.initForm({
+        invokeUrl:invokeUrl,
+        afterSubmit:function(){
+            parent.myGrid.serchData();
+        },
+    });
+
+
+    //绑定文件的点击事件
+    function importChances() {
+        var file = $("#chanceUploadId").click();
+
+        //选中文件,文件名字显示在文本框中
+        $("#chanceUploadId").change(
+            function() {
+                $("#showFileName").val('');
+                var fileName = $(this).val();
+                fileName = fileName.substring(
+                    fileName.lastIndexOf("\\") + 1, fileName
+                        .lastIndexOf("."));
+                $("#showFileName").val(fileName);
+            })
+    }
+    //提交文件
+    function submitFile() {
+        if ($("#showFileName").val() == ''
+            || $("#showFileName").val().length < 1) {
+            layer.msg("请选择上传文件!", {
+                icon : 2
+            });
+            return false;
+        }
+
+        layer.load(2, {
+            time : 100 * 1000,
+            shade : [ 0.4, '#aeaeae' ]
+        });
+
+        $("#uploadForm").ajaxForm(function (data) {
+            layer.closeAll('loading');
+            console.log(data)
+            if (data.status == "200") {
+                parent.layer.close(parent.layer.getFrameIndex(window.name));
+                parent.myGrid.serchData();
+            } else {
+                layer.open({
+                    title: '导入快递单,部分失败',
+                    content: data.info
+                });
+                var url = basePath + "/admin/shopOrder/exportLogisticsImportExcel";
+                window.open(url);
+                parent.myGrid.serchData();
+            }
+            $("#showFileName").val('');
+            var file = $("#chanceUploadId");
+            file.after(file.clone().val(''));
+            file.remove();
+        });
+    }
+
+
+    function download() {
+        window.location.href=basePath + "/uploadfile/image/logisticsImport.xls";
+    }
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/shop/shopAdvertisType-list.html b/zq-erp/src/main/resources/templates/views/admin/shop/shopAdvertisType-list.html
index 020f4fc..911708e 100644
--- a/zq-erp/src/main/resources/templates/views/admin/shop/shopAdvertisType-list.html
+++ b/zq-erp/src/main/resources/templates/views/admin/shop/shopAdvertisType-list.html
@@ -244,7 +244,7 @@
                 <el-table
                         :data="currentNode.ads"
                         :default-sort="{prop: '', order: 'descending'}"
-                        style="width: 100%" max-height="250">
+                        style="width: 100%" >
 
                     <el-table-column
                             label="排序"
@@ -518,7 +518,10 @@
 
             //改变编辑页面,切换页面元素
             changePage(index){
+
                 this.currentPage=this.pageList[index];
+                this.currentPageCode=this.pageList[index].code;
+                console.log(this.currentPageCode);
                 this.loadPageAds();
             },
             loadPageAds() {
diff --git a/zq-erp/src/main/resources/templates/views/admin/shop/shopOrder-list.html b/zq-erp/src/main/resources/templates/views/admin/shop/shopOrder-list.html
index 29e3350..ae18480 100644
--- a/zq-erp/src/main/resources/templates/views/admin/shop/shopOrder-list.html
+++ b/zq-erp/src/main/resources/templates/views/admin/shop/shopOrder-list.html
@@ -13,120 +13,113 @@
             th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
     <script type="text/javascript"
             th:src="@{/js/systools/MBase.js}"></script>
+    <style type="text/css">
+
+        .btn-my {
+            background-color: #f8ac59;
+            border-color: #f8ac59;
+            color: #fff
+        }
+
+        .btn-my:hover {
+            background-color: #FFD19F;
+            border-color: #FFD19F;
+            color: #fff
+        }
+
+        .btn-my:focus {
+            outline: 0 !important;
+        }
+
+        .btn-my.active {
+            background-color: rgb(185, 136, 85);
+            border-color: rgb(185, 136, 85);
+            color: #fff;
+            outline: 0;
+        }
+
+    </style>
+
+
 </head>
 <body class=" container-fluid">
 
 <div class="pd-10">
     <!-- 搜索框部分start -->
+    <!-- 搜索框部分start -->
     <div class="row form-head">
-        <div class="col-md-2 col-xs-12">
-            <!-- 功能按钮部分 -->
-            <div class="">
-                <!--<button onclick="myGrid.delItems('id')" type="button"-->
-                <!--class="btn btn-danger btn-sm">-->
-                <!--<i class="fa fa-trash"></i>批量删除-->
-                <!--</button>-->
-            </div>
-        </div>
-        <div class="col-md-10 col-xs-12">
-            <div class="row">
-                <div class="col-md-11" style="text-align: right">
-                    <form class="form-inline" id="serchform">
-                        <div class="input-group">
-                            <div class="btn-group search-list " data-for="search-text">
-                                <button type="button"
-                                        class="btn btn-default dropdown-toggle searchlist"
-                                        data-toggle="dropdown">
-                                    用户姓名 <span class="caret "></span>
-                                </button>
-                                <ul class="dropdown-menu" role="menu">
-                                    <li data-field="userName"><a>用户姓名</a></li>
-                                    <li data-field="userTel"><a>用户电话 </a></li>
-                                    <li data-field="orderNo"><a>订单号 </a></li>
-                                    <li data-field="storeName"><a>门店名称 </a></li>
-                                </ul>
-                            </div>
-                            <div class="form-group mr-20 ml-20">
-                                <input autocomplete="off"   id="search-text" name="userName" placeholder="输入查询关键词"
-                                       type="text" class="form-control">
-                            </div>
-                            <div class="form-group">
-                                <button onclick="myGrid.serchData(1)" type="button"
-                                        class="btn btn-info">
-                                    <i class="fa fa-search "></i> 搜索
-                                </button>
-                                <button onclick="exportExcel()" type="button"
-                                        class="btn btn-info"
-                                        matrix:btn="order-exportExcel">
-                                    <i class="fa fa-search "></i> 导出EXCEL
-                                </button>
-                                <button type="reset" class="btn btn-info ">
-                                    <i class="fa fa-refresh "></i> 重置
-                                </button>
-                                <button type="reset" class="btn btn-info " onclick="applyMoney()">
-                                    <i class="fa fa-bank "></i> 申请提现
-                                </button>
-                            </div>
-                        </div>
-                        <!-- 高级搜索 -->
-                        <div class="senior-content">
-                            <!-- <div><a class="serch-close closestyle">×</a></div> -->
-                            <div class="serch-headline">高级搜索</div>
-                            <div>
-                                <div style="margin-bottom: 20px!important;">
-                                    <div class="col-sm-6" style="text-align: right!important;">
-                                        <label class="col-sm-12 control-label">
-                                            开始日期:
-                                        </label>
-                                    </div>
-                                    <div class="col-sm-6">
-                                        <input autocomplete="off"   name="orderBeginTime" readonly="readonly"
-                                               type="text" class="form-control datetimepicker" style="width: 98%">
-                                    </div>
-                                </div>
 
-                                <div style="margin-bottom: 20px!important;">
-                                    <div class="col-sm-6" style="text-align: right!important;">
-                                        <label class="col-sm-12 control-label">
-                                            结束日期:
-                                        </label>
-                                    </div>
-                                    <div class="col-sm-6">
-                                        <input autocomplete="off"   name="orderEndTime" readonly="readonly"
-                                               type="text" class="form-control datetimepicker" style="width: 98%">
-                                    </div>
-                                </div>
+        <!-- ------------搜索服务单开始---------------- -->
+        <form class="form-inline" id="serchform">
 
-                                <div style="margin-bottom: 20px!important;">
-                                    <div class="col-sm-6" style="text-align: right!important;">
-                                        <label class="col-sm-12 control-label">
-                                            订单状态:
-                                        </label>
-                                    </div>
-                                    <div class="col-sm-6">
-                                        <select class="form-control autoFull select2" dataType="*"
-                                                th:data-url="@{/admin/shopOrder/getOrderStatusSelectValue}"
-                                                data-value="code"
-                                                data-filed="name" name="orderStatus" style="width: 98%">
-                                            <option value=''>请选择</option>
-                                        </select>
-                                    </div>
-                                </div>
 
-                            </div>
-                            <div class="button col-sm-12">
-                                <button type="button" class="btn btn-sm btn-info mr20" onclick="myGrid.serchData()">确认
-                                </button>
-                                <button type="button" class="btn btn-warning serch-close">取消</button>
-                            </div>
-                        </div>
-                    </form>
-                </div>
-                <div class="col-md-1 text-r layui-anim" data-anim="layui-anim-up">
-                    <a class="senior-serch">高级搜索</a>
+            <div class="form-group mr-20">
+                <div class="btn-group search-list " data-for="search-text">
+                    <button type="button"
+                            class="btn btn-default dropdown-toggle searchlist"
+                            data-toggle="dropdown">
+                        用户姓名 <span class="caret "></span>
+                    </button>
+                    <ul class="dropdown-menu" role="menu">
+                        <li data-field="userName"><a>用户姓名</a></li>
+                        <li data-field="userTel"><a>用户电话 </a></li>
+                        <li data-field="orderNo"><a>订单号 </a></li>
+                        <li data-field="storeName"><a>门店名称 </a></li>
+                    </ul>
                 </div>
             </div>
-        </div>
+            <div class="form-group mr-20">
+                <input autocomplete="off"   id="search-text" name="userName" placeholder="输入查询关键词"
+                       type="text" class="form-control">
+            </div>
+
+            <div class="form-group mr-20">
+                <label>开始日期:</label>
+                <input autocomplete="off"   name="orderBeginTime" type="text"
+                       class="form-control datetimepicker" id="orderBeginTime">
+            </div>
+            <div class="form-group mr-20">
+                <label>结束日期:</label>
+                <input autocomplete="off"   name="orderEndTime" type="text"
+                       class="form-control datetimepicker" id="orderEndTime">
+            </div>
+
+            <input type="hidden" value="2" name="orderStatus" id="orderStatus"/>
+            <div class="form-group mr-20">
+                <button type="button" class="btn btn-my btn-sm" id="btn0" value="">全部</button>
+                <button type="button" class="btn btn-my btn-sm" id="btn1" value="1">待付款</button>
+                <button type="button" class="btn btn-my btn-sm active" id="btn2" value="2">待配送</button>
+                <button type="button" class="btn btn-my btn-sm" id="btn3" value="3">待收货</button>
+                <button type="button" class="btn btn-my btn-sm" id="btn4" value="4">待评价</button>
+                <button type="button" class="btn btn-my btn-sm" id="btn5" value="5">已评价</button>
+                <button type="button" class="btn btn-my btn-sm" id="btn6" value="6">申请退款</button>
+                <button type="button" class="btn btn-my btn-sm" id="btn7" value="7">退款成功</button>
+                <button type="button" class="btn btn-my btn-sm" id="btn8" value="8">退款拒绝</button>
+                <button type="button" class="btn btn-my btn-sm" id="btn9" value="9">已取消</button>
+            </div>
+            <div class="form-group mr-20">
+                <button onclick="myGrid.serchData(1)" type="button"
+                        class="btn btn-info">
+                    <i class="fa fa-search "></i> 搜索
+                </button>
+                <button onclick="exportExcel()" type="button"
+                        class="btn btn-info"
+                        matrix:btn="order-exportExcel">
+                    <i class="fa fa-search "></i> 导出EXCEL
+                </button>
+                <button onclick="importLogisticsInfo()" type="button"
+                        class="btn btn-info"
+                        matrix:btn="order-exportExcel">
+                    <i class="fa fa-search "></i> 导入快递单
+                </button>
+                <button type="reset" class="btn btn-info ">
+                    <i class="fa fa-refresh "></i> 重置
+                </button>
+                <!--<button type="reset" class="btn btn-info " onclick="applyMoney()">
+                    <i class="fa fa-bank "></i> 申请提现
+                </button>-->
+            </div>
+        </form>
     </div>
 
     <div class="row">
@@ -137,18 +130,17 @@
                     <th data-checkbox="true"></th>
                     <th data-formatter="MGrid.indexfn" data-align="center" data-width="30px">序号</th>
                     <th data-align="center" data-width="195px" data-field="id" data-formatter="buidOperate">操作</th>
-                    <th data-field="userName">客户姓名</th>
-                    <th data-field="userTel">客户电话</th>
-                    <th data-field="storeName">店铺名称</th>
+                    <th data-field="userName">客户</th>
+                    <th data-field="details" data-formatter="buildDetails">购买商品</th>
+                    <th data-field="deliveryInfo.receiveAddress" data-formatter="buildLogistics">收货信息</th>
                     <th data-field="orderStatus" data-formatter="buildOrderStatus">订单状态</th>
+                    <th data-field="deliveryInfo.waybillNo" data-formatter="buildDelivery">物流信息</th>
                     <th data-field="orderTime" data-formatter="MGrid.getTime">下单时间</th>
-                    <th data-field="purchaseQuantity">购买件数</th>
                     <th data-field="orderMoney">订单金额</th>
                     <th data-field="discountAmount">优惠总金额</th>
-                    <th data-field="shippingMethod" >配送方式</th>
-                    <th data-field="orderType" data-formatter="orderTypeFormatter">订单类型</th>
                     <th data-field="orderNo">订单编号</th>
-                    <th data-field="applyStatus" data-formatter="applyStatusFormatter">是否已提现</th>
+                    <th data-field="shippingMethod"  data-formatter="buildShippingMethod" >配送方式</th>
+                    <th data-field="storeName">店铺名称</th>
                 </tr>
                 </thead>
             </table>
@@ -172,6 +164,26 @@
 
     });
 
+    $(".btn-my").click(function () {
+        var btnValue = $(this).val();
+        $("#orderStatus").val(btnValue);
+        myGrid.serchData();
+        /* $("#state").val(""); */
+        $(".btn-my").removeClass("active");
+        $(this).addClass("active");
+    });
+
+    function importLogisticsInfo() {
+        layer.open({
+            type: 2,
+            title: "导入快递单",
+            area: [MUI.SIZE_L, '400px'],
+            content : [ basePath+'/admin/redirect/shop/logisticsImport-form']
+        });
+    }
+
+
+
     function exportExcel() {
         var userName = $('input[name=userName]').val();
         if (typeof userName == 'undefined') {
@@ -191,7 +203,7 @@
         }
         var orderBeginTime = $('input[name=orderBeginTime]').val();
         var orderEndTime = $('input[name=orderEndTime]').val();
-        var orderStatus = $('select[name=orderStatus]').val();
+        var orderStatus = $('input[name=orderStatus]').val();
         var url = basePath + "/admin/shopOrder/exportOrderExcel";
         url += "?userName=" + userName;
         url += "&orderNo=" + orderNo;
@@ -201,6 +213,25 @@
         url += "&userTel=" + userTel;
         url += "&storeName=" + storeName;
         window.open(url);
+    }
+
+    function buildDetails(value, row, index) {
+        var details = "";
+        for(var i= 0;i<value.length;i++){
+            details = details +value[i].shopProduct.title+ "("+value[i].shopSku.name+ ")*"+value[i].count+";";
+        }
+        return details;
+    }
+
+    // 发货信息
+    function buildLogistics(value, row, index) {
+        return (row.userName==null?"":row.userName)+" <br/>"+ (row.userTel==null?"":row.userTel) +" <br/>"+value  ;
+    }
+    // 物流信息
+    function buildDelivery(value, row, index) {
+        return (row.deliveryInfo.logisticsCompanyCode==null?"":"快递编码:"+row.deliveryInfo.logisticsCompanyCode)
+            +" <br/>"+ (row.deliveryInfo.logisticsCompany==null?"":"快递名称:"+row.deliveryInfo.logisticsCompany)
+            +" <br/>"+(value==null?"":"快递单号:"+value)  ;
     }
 
 
@@ -227,6 +258,16 @@
         return "";
     }
 
+    function buildShippingMethod(value, row, index) {
+        if (value == 1) {
+            return "物流配送";
+        } else if (value == 2) {
+            return "<lable class='label label-warning' >门店自取</lable>";
+        }else {
+            return "-";
+        }
+    }
+
     var btns = [];
     btns[0] = "", btns[1] = "", btns[2] = "";
 
@@ -237,11 +278,16 @@
             + '操作 <span class="caret"></span>' + '</button>'
             + '<ul class="dropdown-menu" role="menu">'
             + btns[0].replace('VALUE', value)
+        if (row.deliveryInfo.waybillNo != null && typeof row.deliveryInfo.waybillNo != 'undefined' && row.deliveryInfo.waybillNo != '') {
+            html += btns[3].replace('orderId',row.id).replace('waybillNo',row.deliveryInfo.waybillNo);
+        }
         if (row.orderStatus == 2) {
-            html += btns[1].replace('VALUE', value)
+            html += btns[1].replace('VALUE', value);
+            html += btns[4].replace('orderId',row.id);
         }
         if (row.orderStatus == 3) {
-            html += btns[2].replace('VALUE', value)
+            html += btns[2].replace('VALUE', value);
+            html += btns[4].replace('orderId',row.id);
         }
         html += '</ul>' + '</div>';
         return html;
@@ -258,6 +304,40 @@
                 content: [basePath + '/admin/shopOrder/editForm?id=' + id]
             })
         )
+    }
+
+    /**
+     * 查看物流信息
+     * @param id
+     */
+    function showLogisticsInfo(orderId,waybillNo){
+        if(waybillNo == '' || waybillNo == null){
+            layer.msg("订单还未发货,暂无物流信息", {
+                icon : 2,
+                time : 2000
+            });
+            return false;
+        }
+        layer.open({
+            type : 2,
+            title : "查看物流信息",
+            area : [ MUI.SIZE_L, '500px' ],
+            maxmin : true,
+            content : [ basePath+'/admin/redirect/shop/shopLogisticsInfo-list?orderId=' + orderId]
+        });
+    }
+    /**
+     * 编辑物流信息
+     * @param id
+     */
+    function editDeliveryInfo(orderId){
+        layer.open({
+            type : 2,
+            title : "编辑物流信息",
+            area : [ MUI.SIZE_L, '500px' ],
+            maxmin : true,
+            content : [ basePath + '/admin/shopDeliveryInfo/editDeliveryInfoForm?orderId=' + orderId]
+        });
     }
 
     //修改订单为发货
@@ -334,6 +414,8 @@
 btns[0] = '<li><a href="javascript:void(0)" onClick="openEdit(\'VALUE\')" title="编辑">编辑</a></li>'
 btns[1] = '<li><a href="javascript:void(0)" onClick="openSendPackage(\'VALUE\')" title="开始发货">开始发货</a></li>'
 btns[2] = '<li><a href="javascript:void(0)" onClick="openSendPackageOver(\'VALUE\')" title="配送完成">配送完成</a></li>'
+btns[3] = '<li><a href="javascript:void(0)" onclick="showLogisticsInfo(\'orderId\',\'waybillNo\')" title="查看物流">查看物流</a></li>'
+btns[4] = '<li><a href="javascript:void(0)" onclick="editDeliveryInfo(\'orderId\')" title="编辑快递">编辑快递</a></li>'
 
 </script>
 
diff --git a/zq-erp/src/main/resources/templates/views/admin/shop/shopProduct-form.html b/zq-erp/src/main/resources/templates/views/admin/shop/shopProduct-form.html
index 47957c3..d8ed383 100644
--- a/zq-erp/src/main/resources/templates/views/admin/shop/shopProduct-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/shop/shopProduct-form.html
@@ -42,7 +42,7 @@
                         <div class="panel-heading">基本信息</div>
                         <div class="panel-body">
                             <div class="form-group">
-                                <label class="col-sm-2 control-label">分类ID
+                                <label class="col-sm-2 control-label">产品分类
                                     <span class="text-danger">*</span>
                                 </label>
                                 <div class="col-sm-4">
@@ -69,6 +69,40 @@
                                            maxLength="1000" dataType="*"
                                            th:value="${obj.briefIntroduction}" nullmsg="产品简介不能为空">
                                 </div>
+                                <label class="col-sm-2 control-label">是否可分销
+                                    <span class="text-danger">*</span>
+                                </label>
+                                <div class="col-sm-4">
+                                    <select th:field="${obj.ableSales}" class="form-control select2 " size="1"
+                                            name="ableSales"
+                                            id="ableSales" style="width: 100%">
+                                        <option value="1" th:selected="${obj.ableSales == '1'}">可分销</option>
+                                        <option value="2" th:selected="${obj.ableSales == '2'}">不可分销</option>
+                                        </option>
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="form-group">
+                                <label class="col-sm-2 control-label">是否积分抵
+                                    <span class="text-danger">*</span>
+                                </label>
+                                <div class="col-sm-4">
+                                    <select th:field="${obj.ableScorePay}" class="form-control select2 " size="1"
+                                            name="ableScorePay"
+                                            id="ableScorePay" style="width: 100%">
+                                        <option value="2" th:selected="${obj.ableScorePay == '2'}">不可抵扣</option>
+                                        <option value="1" th:selected="${obj.ableScorePay == '1'}">可抵扣</option>
+                                        </option>
+                                    </select>
+                                </div>
+                                <label class="col-sm-2 control-label">积分商城分类
+                                    <span class="text-danger">*</span>
+                                </label>
+                                <div class="col-sm-4">
+                                    <select class="form-control select2 " size="1" name="scoreCategoryId"
+                                            id="scoreCategoryId" style="width: 100%">
+                                    </select>
+                                </div>
 
                             </div>
                             <div class="form-group">
@@ -87,14 +121,7 @@
                                            dataType="n" nullmsg="展示销量不能为空"
                                            th:value="${obj.dsVolume}" errormsg="请填写数字">
                                 </div>
-                                <!--<label class="col-sm-2 control-label">运费
-                                    <span class="text-danger">*</span>
-                                </label>
-                                <div class="col-sm-4">
-                                    <input autocomplete="off"   type="text" class="form-control" name="carriage"
-                                           maxLength="250" datatype="*"
-                                           th:value="${obj.carriage}" nullmsg="运费不能为空">
-                                </div>-->
+
                             </div>
                             <div class="form-group">
                                 <label class="col-sm-2 control-label">限购数量
@@ -117,42 +144,7 @@
                                 </div>
                             </div>
 
-                            <div class="form-group">
 
-                                <label class="col-sm-2 control-label">是否为服务项目
-                                </label>
-                                <div class="col-sm-4">
-                                    <select th:field="${obj.isService}" class="form-control " size="1"
-                                            name="isService"
-                                            id="isService" style="width: 100%">
-                                        <option value="2" th:selected="${obj.isService == '2'}">否</option>
-                                        <option value="1" th:selected="${obj.isService == '1'}">是</option>
-                                        </option>
-
-                                    </select>
-                                </div>
-
-                                <label class="col-sm-2 control-label">服务时长
-                                </label>
-                                <div class="col-sm-4">
-                                    <input autocomplete="off"   type="text" class="form-control" name="serviceTime"
-                                           maxLength="50"
-                                           th:value="${obj.serviceTime}" >
-                                </div>
-
-
-                            </div>
-
-                            <!--<div class="form-group">
-
-                                <label class="col-sm-2 control-label">真实销量
-                                </label>
-                                <div class="col-sm-4">
-                                    <input autocomplete="off"   type="text" class="form-control" name="rsVolume"
-
-                                           th:value="${obj.rsVolume}" errormsg="请填写数字">
-                                </div>
-                            </div>-->
                             <div class="form-group">
                                 <label class="col-sm-2 control-label">属性设置 </label>
                                 <input autocomplete="off"     name="attrs" id="attrs" type="hidden" >
@@ -226,9 +218,14 @@
                                     <th>规格图片地址<span class="text-danger">*</span></th>
                                     <th>库存<span class="text-danger">*</span></th>
                                     <th>价格<span class="text-danger">*</span></th>
-                                    <th>积分</th>
+                                    <th>消费可得积分</th>
                                     <th>关联ERP产品</th>
                                     <th>排序</th>
+                                    <th>自购返佣</th>
+                                    <th>推广提成</th>
+                                    <th>邀请提成</th>
+                                    <th>兑换所需金额</th>
+                                    <th>兑换所需积分</th>
                                     <th>操作</th>
                                 </tr>
                             </table>
@@ -357,6 +354,11 @@
         <input autocomplete="off"   type="hidden" class="form-control" name="erpGoodsCode">
     </div></td>
     <td><input autocomplete="off"   type="text" class="form-control" name=""></td>
+        <td><input autocomplete="off"   type="text" class="form-control" name=""></td>
+        <td><input autocomplete="off"   type="text" class="form-control" name=""></td>
+        <td><input autocomplete="off"   type="text" class="form-control" name=""></td>
+        <td><input autocomplete="off"   type="text" class="form-control" name=""></td>
+        <td><input autocomplete="off"   type="text" class="form-control" name=""></td>
     <td><i class="fa fa-trash form-control-static" onclick="delThis('trId')"></i></td>
     </tr>
 </script>
@@ -391,6 +393,9 @@
     });
     $(function () {
         initSeclect("#parentId",[[${obj.categoryId}]]);
+        initScoreSeclect("#scoreCategoryId",[[${obj.scoreCategoryId}]]);
+
+
         initAttrSeclect("#attrIds");
         $("#mobileDetails").html(obj.mobileDetails);
         $("#pcDetails").html(obj.pcDetails);
@@ -525,6 +530,27 @@
             if (goodsName == null || typeof stockCode == 'undefined') {
                 goodsName = "";
             }
+            var selfPrice = shopSkus[c].selfPrice;
+            if (selfPrice == null || typeof selfPrice == 'undefined') {
+                selfPrice = "";
+            }
+            var sealesPrice = shopSkus[c].sealesPrice;
+            if (sealesPrice == null || typeof sealesPrice == 'undefined') {
+                sealesPrice = "";
+            }
+            var invitationPrice = shopSkus[c].invitationPrice;
+            if (invitationPrice == null || typeof invitationPrice == 'undefined') {
+                invitationPrice = "";
+            }
+   var scorePrice = shopSkus[c].scorePrice;
+            if (scorePrice == null || typeof scorePrice == 'undefined') {
+                scorePrice = "";
+            }
+ var scoreCount = shopSkus[c].scoreCount;
+            if (scoreCount == null || typeof scoreCount == 'undefined') {
+                scoreCount = "";
+            }
+
 
             var html=
                 '<tr id="'+trId+'">'
@@ -538,6 +564,11 @@
                 +'<td><div id="erpNoDiv"><button class="btn btn-info" onclick="selectProduct(\'shopIdValue\',\''+trId+'\')"><i class="fa fa-plus"></i></button>'
                 +'<p class="form-control-static erpGoodsName">'+ goodsName +'</p><input autocomplete="off" class="form-control" type="hidden"  value="'+stockCode+'" name="erpGoodsCode"></div></td>'
                 +'<td><input autocomplete="off"   type="text" class="form-control"  value="'+sort+'" name=""></td>'
+                +'<td><input autocomplete="off"   type="text" class="form-control"  value="'+selfPrice+'" name=""></td>'
+                +'<td><input autocomplete="off"   type="text" class="form-control"  value="'+sealesPrice+'" name=""></td>'
+                +'<td><input autocomplete="off"   type="text" class="form-control"  value="'+invitationPrice+'" name=""></td>'
+                +'<td><input autocomplete="off"   type="text" class="form-control"  value="'+scorePrice+'" name=""></td>'
+                +'<td><input autocomplete="off"   type="text" class="form-control"  value="'+scoreCount+'" name=""></td>'
                 +'<td><i class="fa fa-trash form-control-static"	onclick="delThis(\''+trId+'\')"></i></td>'
                 +'</tr>';
             $("#skutable").find("tbody").append(html);
@@ -601,10 +632,6 @@
                     layer.msg(result.info, {
                         icon : 2,
                         time : 1000,
-                        end:function(){
-                            parent.myGrid.serchData();
-                            MTools.closeForm()
-                        }
                     });
                     return null;
                 }
@@ -617,7 +644,7 @@
 
     //初始化属性下拉选
     function initAttrSeclect(seler, def) {
-        $.AjaxProxy().invoke(basePath + "/admin/shopProductAttribute/showSonAttribute?attrCode=service",
+        $.AjaxProxy().invoke(basePath + "/admin/shopProductAttribute/showSonAttribute?attrCode=productColumn",
             function (loj) {
                 $(seler).createSelectTree(
                     loj.attr("result").rows,
@@ -639,6 +666,22 @@
     //初始化分类ID
     function initSeclect(seler, def) {
         $.AjaxProxy().invoke(basePath + "/admin/shopProductAttribute/showSonAttribute?attrCode=cpfl&status=1",
+            function (loj) {
+                $(seler).createSelectTree(
+                    loj.attr("result").rows,
+                    {
+                        id: "attrId",
+                        parent: "parentId",
+                        value: "attrName",
+                        append: false,
+                        defaultValue: def,
+                        defaultHtml: ''
+                    });
+            });
+    }
+    //初始化分积分商城分类ID
+    function initScoreSeclect(seler, def) {
+        $.AjaxProxy().invoke(basePath + "/admin/shopProductAttribute/showSonAttribute?attrCode=jfsccpfl&status=1",
             function (loj) {
                 $(seler).createSelectTree(
                     loj.attr("result").rows,
@@ -708,61 +751,77 @@
             if (i != 0) {
                 var tds = $(this).find("td");
                 var length = tds.length - 1;
-                var id = tds.eq(length - 8).find("input").val();
+                var id = tds.eq(length - 13).find("input").val();
                 if(id == null){
                     id ="";
                 }
                 sku.id = id;
 
                 //规格名称
-                var name = tds.eq(length - 7).find("input").val();
+                var name = tds.eq(length - 12).find("input").val();
                 if(name == null){
                     name = "";
                 }
                 sku.name = name;
 
                 //图片地址
-                var path = tds.eq(length - 6).find("img").attr("src");
+                var path = tds.eq(length - 11).find("img").attr("src");
                 if(path == null){
                     path = "";
                 }
                 sku.imgPath = path;
 
                 //库存
-                var stock = tds.eq(length - 5).find("input").val();
+                var stock = tds.eq(length - 10).find("input").val();
                 if(stock == ""){
                     stock = 0;
                 }
                 sku.stock = stock;
 
                 //价格
-                var price = tds.eq(length - 4).find("input").val();
+                var price = tds.eq(length -9).find("input").val();
                 if(price == ""){
                     price =0;
                 }
                 sku.price = price;
 
                 //积分
-                var score = tds.eq(length - 3).find("input").val();
+                var score = tds.eq(length - 8).find("input").val();
                 if(score == ""){
                     score = 0;
                 }
                 sku.score = score;
 
                 //品种编码
-                var stockCode = tds.eq(length - 2).find("input").val();
+                var stockCode = tds.eq(length - 7).find("input").val();
                 if(stockCode == null || typeof stockCode == 'undefined'){
                     stockCode = '';
                 }
                 sku.stockCode = stockCode;
 
                 //排序
-                var sort = tds.eq(length - 1).find("input").val();
+                var sort = tds.eq(length - 6).find("input").val();
                 if(sort == ""){
                     sort = 0;
                 }
                 sku.sort = sort;
+                //推广提成
+                var selfPrice = tds.eq(length - 5).find("input").val();
+                sku.selfPrice = selfPrice;
+                //推广提成
+                var sealesPrice = tds.eq(length - 4).find("input").val();
+                sku.sealesPrice = sealesPrice;
 
+                //邀请提成
+                var invitationPrice = tds.eq(length - 3).find("input").val();
+                sku.invitationPrice = invitationPrice;
+
+                //兑换所需金额
+                var scorePrice = tds.eq(length - 2).find("input").val();
+                sku.scorePrice = scorePrice;
+                //兑换所需积分
+                var scoreCount = tds.eq(length - 1).find("input").val();
+                sku.scoreCount = scoreCount;
 
                 skus.push(sku);
             }
@@ -771,8 +830,14 @@
         return skus;
     }
 
+
     /*验证sku表格中的参数*/
     function getSkusValues() {
+
+        var ableScorePay=$("#ableScorePay").val();
+        var ableSales=$("#ableSales").val();
+
+
         var flag = false;
         var reg = new RegExp("(^[1-9]([0-9]+)?(\\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\\.[0-9]([0-9])?$)");
         $("#skutable tbody").find("tr").each(function(i) {
@@ -780,7 +845,24 @@
             if (i != 0) {
                 var tds = $(this).find("td");
                 var length = tds.length - 1;
-                var name = tds.eq(length - 7).find("input").val();
+
+
+                if(ableScorePay==1){
+                    //兑换所需金额
+                    var scorePrice = tds.eq(length - 2).find("input").val();
+                    //兑换所需积分
+                    var scoreCount = tds.eq(length - 1).find("input").val();
+                    if(scorePrice == ""||scoreCount==""){
+                        layer.msg("请填写兑换所需金额和积分",{
+                            icon : 2,
+                            time : 2000
+                        });
+                        flag = true;
+                        return false;
+                    }
+                }
+
+                var name = tds.eq(length - 12).find("input").val();
                 if(name == ""){
                     layer.msg("请填写规格名称",{
                         icon : 2,
@@ -798,7 +880,7 @@
                     return false;
                 }
 
-                var stock = tds.eq(length - 5).find("input").val();
+                var stock = tds.eq(length -10).find("input").val();
                 if(stock == ""){
                     layer.msg("请填写库存",{
                         icon : 2,
@@ -807,7 +889,7 @@
                     flag = true;
                     return false;
                 }
-                var price = tds.eq(length - 4).find("input").val();
+                var price = tds.eq(length - 9 ).find("input").val();
                 if(price == ""){
                     layer.msg("请填写价格",{
                         icon : 2,
diff --git a/zq-erp/src/main/resources/templates/views/admin/shop/shopProduct-list.html b/zq-erp/src/main/resources/templates/views/admin/shop/shopProduct-list.html
index a7e7d16..6f7468a 100644
--- a/zq-erp/src/main/resources/templates/views/admin/shop/shopProduct-list.html
+++ b/zq-erp/src/main/resources/templates/views/admin/shop/shopProduct-list.html
@@ -35,10 +35,18 @@
                 <input autocomplete="off" id="search-text" name="title" placeholder="输入查询关键词"
                        type="text" class="form-control">
             </div>
-
+            <div class="form-group">
+                <label class="control-label">积分抵扣</label>
+                <select style="width:100px;" class="form-control select2" size="1"
+                        name="ableScorePay" >
+                    <option value="">请选择</option>
+                    <option value="1">可抵扣</option>
+                    <option value="2">不可抵扣</option>
+                </select>
+            </div>
             <div class="form-group">
                 <label class="control-label">是否上架</label>
-                <select style="width:200px;" class="form-control select2" size="1"
+                <select style="width:100px;" class="form-control select2" size="1"
                         name="status"
                         id="status">
                     <option value="">请选择</option>
@@ -47,10 +55,10 @@
                 </select>
             </div>
             <div class="form-group">
-                <label class="control-label">是否为服务</label>
-                <select style="width:200px;" class="form-control select2" size="1"
-                        name="isService"
-                        id="isService">
+                <label class="control-label">是否可分销</label>
+                <select style="width:100px;" class="form-control select2" size="1"
+                        name="ableSales"
+                        id="ableSales">
                     <option value="">请选择</option>
                     <option value="1">是</option>
                     <option value="2">否</option>
@@ -114,12 +122,13 @@
                 <tr>
                     <th data-checkbox="true"></th>
                     <th data-formatter="MGrid.indexfn" data-align="center">序号</th>
-                    <th data-field="id" data-align="center">产品ID</th>
+                    <th data-field="id" data-align="center" >ID</th>
+                    <th data-field="ableScorePay" data-align="center" data-formatter="ableScorePay">积分抵扣</th>
                     <th data-field="title" data-align="center">产品名称</th>
                     <th data-field="imgMobile" data-align="center" data-formatter="MGrid.getImage">产品图片</th>
                     <th data-field="attrValues" data-align="center" data-formatter="formatAttr">产品属性</th>
                     <th data-field="price" data-align="center">价格</th>
-                    <th data-field="score" data-align="center">积分</th>
+                    <th data-field="scorePrice" data-align="center">兑换所需积分</th>
                     <th data-field="status" data-align="center" data-formatter="isStatus">是否上架</th>
                     <th data-field="rsVolume" data-align="center">真实销量</th>
 
@@ -275,7 +284,7 @@
     //初始化属性下拉选
     function initAttrsSeclect(seler, def) {
         console.log(1);
-        $.AjaxProxy().invoke(basePath + "/admin/shopProductAttribute/showSonAttribute?attrCode=cpfl",
+        $.AjaxProxy().invoke(basePath + "/admin/shopProductAttribute/showSonAttribute?attrCode=productColumn",
             function (loj) {
                 $(seler).createSelectTree(
                     loj.attr("result").rows,
@@ -290,6 +299,16 @@
             });
     }
 
+    function ableScorePay(value, row, index) {
+        var html = "";
+        if (value ==1) {
+          html="可抵扣"
+        }else{
+            html="不可抵扣"
+        }
+        return html;
+    }
+
     /**
      * 格式化属性
      */
diff --git a/zq-erp/src/main/resources/templates/views/admin/shop/shopProductComment-list.html b/zq-erp/src/main/resources/templates/views/admin/shop/shopProductComment-list.html
index 4bbe610..c2634e8 100644
--- a/zq-erp/src/main/resources/templates/views/admin/shop/shopProductComment-list.html
+++ b/zq-erp/src/main/resources/templates/views/admin/shop/shopProductComment-list.html
@@ -52,6 +52,22 @@
 										<input autocomplete="off"   id="search-text" name="nickName" placeholder="输入查询关键词"
 											type="text" class="form-control">
 									</div>
+									<div class="form-group mr-20 ml-20">
+										<select class="form-control select2" size="1"
+												name="comAuditStatus"
+												id="comAuditStatus" style="width: 98%">
+											<option value="">请选择</option>
+											<option value="0" >未审核</option>
+											<option value="1" >审核通过</option>
+											<option value="2" >审核不通过</option>
+										</select>
+									</div>
+									<div class="form-group mr-20 ml-20">
+										<input autocomplete="off"   name="commentBeginTime"
+											   type="text" class="form-control datetimepicker" >
+										<input autocomplete="off"   name="commentEndTime"
+											   type="text" class="form-control datetimepicker">
+									</div>
 									<div class="form-group">
 										<button onclick="myGrid.serchData(1)" type="button"
 											class="btn btn-info">
@@ -62,64 +78,10 @@
 										</button>
 									</div>
 								</div>
-								<!-- 高级搜索 -->
-								<div class="senior-content">
-									<!-- <div><a class="serch-close closestyle">×</a></div> -->
-									<div class="serch-headline">高级搜索</div>
-									<div>
-										<div style="margin-bottom: 20px!important;">
-											<div class="col-sm-6" style="text-align: right!important;">
-												<label class="col-sm-12 control-label">
-													开始日期:
-												</label>
-											</div>
-											<div class="col-sm-6">
-												<input autocomplete="off"   name="commentBeginTime" readonly="readonly"
-													   type="text" class="form-control datetimepicker" style="width: 98%">
-											</div>
-										</div>
 
-										<div style="margin-bottom: 20px!important;">
-											<div class="col-sm-6" style="text-align: right!important;">
-												<label class="col-sm-12 control-label">
-													结束日期:
-												</label>
-											</div>
-											<div class="col-sm-6">
-												<input autocomplete="off"   name="commentEndTime" readonly="readonly"
-													   type="text" class="form-control datetimepicker" style="width: 98%">
-											</div>
-										</div>
-
-										<div style="margin-bottom: 20px!important;">
-											<div class="col-sm-6" style="text-align: right!important;">
-												<label class="col-sm-12 control-label">
-													审核状态:
-												</label>
-											</div>
-											<div class="col-sm-6">
-												<select class="form-control select2" size="1"
-														name="comAuditStatus"
-														id="comAuditStatus" style="width: 98%">
-													<option value="">请选择</option>
-													<option value="0" >未审核</option>
-													<option value="1" >审核通过</option>
-													<option value="2" >审核不通过</option>
-												</select>
-											</div>
-										</div>
-
-									</div>
-									<div class="button col-sm-12">
-										<button type="button" class="btn btn-sm btn-info mr20" onclick="myGrid.serchData()">确认</button>
-										<button type="button" class="btn btn-warning serch-close">取消</button>
-									</div>
-								</div>
 							</form>
 						</div>
-						<div class="col-md-1 text-r layui-anim" data-anim="layui-anim-up">
-							<a class="senior-serch">高级搜索</a>
-						</div>
+
 					</div>
 				</div>
 			</div>
@@ -151,7 +113,14 @@
 	<script type="text/javascript">
 		 var myGrid;
 		$(function(){
-			MTools.ininDatetimepicker(".datetimepicker");
+			var _initParam = {format : 'yyyy-mm-dd hh:ii',
+				todayBtn : true,
+				autoclose : true,
+				startView : 2,
+				maxView : 3,
+				minView : 0};
+			MTools.ininDatetimepicker(_initParam);
+			MTools.limitStartEndTime(_initParam);
 			var delUrl="";
 			delUrl=basePath+"/admin/shopProductComment/del" ;
 			myGrid=MGrid.initGrid({
diff --git a/zq-erp/src/main/resources/templates/views/admin/shop/shopUser-list.html b/zq-erp/src/main/resources/templates/views/admin/shop/shopUser-list.html
index 04342bd..3678ccb 100644
--- a/zq-erp/src/main/resources/templates/views/admin/shop/shopUser-list.html
+++ b/zq-erp/src/main/resources/templates/views/admin/shop/shopUser-list.html
@@ -21,14 +21,7 @@
             <div class="col-md-2 col-xs-12">
                 <!-- 功能按钮部分 -->
                 <div class="">
-                    <button onclick="setUserSales('1')" type="button"
-                            class="btn btn-success btn-sm" matrix:btn="shopUser-exchangeScore">
-                        <i class="fa fa-plus"></i>设为销售员
-                    </button>
-                    <button onclick="setUserSales('0')" type="button"
-                            class="btn btn-success btn-sm" matrix:btn="shopUser-exchangeScore">
-                        <i class="fa fa-minus-square"></i> 解除销售员
-                    </button>
+
                 </div>
             </div>
             <div class="col-md-10 col-xs-12">
@@ -152,7 +145,7 @@
         MTools.ininDatetimepicker(".datetimepicker");
         var delUrl="";
         myGrid=MGrid.initGrid({
-            url:basePath+"/admin/bizUser/showList",
+            url:basePath+"/admin/sysVipInfo/showList",
             delUrl:delUrl,
         });
 
@@ -199,63 +192,14 @@
     function buildOperate(value, row, index){
         var html = "";
         html += '<div class="btn-group">'
-        if (row.userVip == 1) {
-            html += btns[0].replace('VALUE',value)
-            html += btns[1].replace('VALUE',value)
-        }
         html += '</div>';
         return html;
     }
 
-    function exchangeScore(_userId) {
-        layer.open({
-            type : 2,
-            title : "兑换积分",
-            area : [ MUI.SIZE_L, '400px' ],
-            maxmin : true,
-            content : [ basePath+'/admin/bizUserScore/intoExchangePage?userId=' + _userId]
-        })
-    }
 
-    function getScoreFlow(_userId) {
-        layer.open({
-            type : 2,
-            title : "积分流水",
-            area : [ MUI.SIZE_L, '400px' ],
-            maxmin : true,
-            content : [ basePath+'/admin/redirect/shop/user-score-flow?userId=' + _userId]
-        })
-    }
 
-    //设置用户销售员身份
-    function setUserSales(_status) {
 
-        var ids = myGrid.getSelectItemsIds("userId");
-        if(ids.length < 1){
-            layer.msg("请选择要操作的数据", {
-                icon : 5
-            });
-            return false;
-        }
-        var url = basePath + "/admin/bizUser/setUserSales?ids=" + ids + "&status=" + _status;
-
-        if(_status == '1'){
-            MTools.handleItem(url,"确认要将这" + ids.split(",").length + "个用户设置为销售员吗?",function(){
-                myGrid.serchData(1)
-            });
-        } else {
-            MTools.handleItem(url,"确认要取消这" + ids.split(",").length + "个用户的销售员身份吗?",function(){
-                myGrid.serchData(1)
-            });
-        }
-    }
 </script>
-<!--权限按钮-->
-<script matrix:btn="shopUser-exchangeScore">
-    btns[0] = '<button  type="button" class="btn btn-info mr10" onClick="exchangeScore(\'VALUE\')">兑换积分</button>'
-</script>
-<script matrix:btn="shopUser-scoreFlow">
-    btns[1] = '<button type="button" class="btn btn-primary ml10" onClick="getScoreFlow(\'VALUE\')">查看流水</button>'
-</script>
+
 </body>
 </html>
diff --git a/zq-erp/src/main/resources/templates/views/admin/sys/customerDataDictionary-list.html b/zq-erp/src/main/resources/templates/views/admin/sys/customerDataDictionary-list.html
index 38260b0..3bf4210 100644
--- a/zq-erp/src/main/resources/templates/views/admin/sys/customerDataDictionary-list.html
+++ b/zq-erp/src/main/resources/templates/views/admin/sys/customerDataDictionary-list.html
@@ -87,7 +87,7 @@
                             </div>
                             <label class="col-sm-2 control-label">排序</label>
                             <div class="col-sm-4">
-                                <input autocomplete="off" name="fnSequence" type="number" class="form-control"
+                                <input autocomplete="off" name="sort" type="number" class="form-control"
                                        id="sortIndex">
                             </div>
                         </div>
@@ -150,7 +150,7 @@
                     initFunctionSelected(loj.getString(0,"parentId"));
                     $("#id").val(loj.getString(0, "id"));
                     $("#value").val(loj.getString(0, "value"));
-                    $("#sort").val(loj.getString(0, "sort"));
+                    $("#sortIndex").val(loj.getString(0, "sort"));
                     $("#typeCode").val(loj.getString(0, "typeCode"));
                 });
 
diff --git a/zq-erp/src/main/resources/templates/views/common/login.html b/zq-erp/src/main/resources/templates/views/common/login.html
index f8bf84f..6750c36 100644
--- a/zq-erp/src/main/resources/templates/views/common/login.html
+++ b/zq-erp/src/main/resources/templates/views/common/login.html
@@ -24,6 +24,7 @@
             background: #fff;
             height: 450px;
         }
+
         .download-bar {
             margin-top: 15px;
             color: #4968bd;
@@ -40,6 +41,8 @@
         }
     </style>
     <script>
+
+
         var isoldIE = false;
         if (navigator.userAgent.indexOf("MSIE") > 0) {
             if (navigator.userAgent.indexOf("MSIE 6.0") > 0
@@ -67,7 +70,8 @@
             display: block;
             padding: 20px 12px;
             width: 100%;
-            font-size: 14px -webkit-box-shadow: none !important;
+            font-size: 14px
+            -webkit-box-shadow: none !important;
             box-shadow: none !important;
             border-radius: 0px !important;
         }
@@ -114,6 +118,78 @@
                 height: 200px;
             }
         }
+
+        .qrloginBox {
+            float: right;
+        }
+
+        .qrloginSpan {
+            background: #edf4ff;
+            border: 1px solid #155bd4;
+            position: relative;
+            padding: 4px 8px;
+            border-radius: 2px;
+            font-size: 14px;
+            color: #155bd4;
+            cursor: pointer;
+        }
+
+        .qrImg {
+            width: 50px;
+            cursor: pointer;
+        }
+
+        #qrCodeIcon {
+            margin: 20px auto;
+            text-align: center;
+            overflow: hidden;
+            width: 220px;
+            height: 220px;
+            border: 1px solid #dcd0d0;
+        }
+
+        #qrCodeIcon img {
+            margin: 10px;
+        }
+        #scanResult{
+            text-align: center;
+            color: #333333;
+        }
+        #scanResult{
+        text-align: center;
+        }
+        #scanResult img{
+            width: 50px;
+            margin: 50px auto;
+        }
+        #wxQrcode{
+            text-align: center;
+            color: #333333;
+            width: 220px;
+            height: 220px;
+            overflow: hidden;
+            position: relative;
+            margin: 20px auto;
+        }
+        .wxQrcodeInfo{
+            position: absolute;
+            top: 0px;
+            background: rgb(255 255 255 / 94%);
+            width: 220px;
+            height: 220px;
+            display: flex;
+            z-index: 999999;
+            justify-content: center;
+            align-items: center;
+            flex-direction: column;
+        }
+        .wxQrcodeImg{
+            position: absolute;
+            width: 200px;
+            top: 10px;
+            z-index: 11;
+            left: 10px;
+        }
     </style>
 </head>
 
@@ -122,33 +198,69 @@
 <div class="signinpanel">
     <div class="row" style="box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);">
         <div class="col-sm-6"></div>
-        <div class="col-sm-6">
-            <form method="post" class="dataForm">
-                <h3 class="no-margins text-center title" style="color: #666666;font-size: 24px;font-weight: bold">欢迎登录</h3>
-                <div>
-                    <input autocomplete="off"   id="account" type="text" placeholder="请输入用户名"
-                           class="form-control uname"/>
-                    <img alt="" src="../../images/user.png">
-                </div>
-                <br>
-                <div>
-                    <input autocomplete="off"   id="password"
-                           type="password" class="form-control pword m-b" nullmsg="密码不能为空"
-                           placeholder="请输入密码"/>
-                    <img alt="" src="../../images/locked.png">
-                </div>
-                <br> <br>
+        <div class="col-sm-6 " style="padding: 0px;">
+            <div id="accountWarp">
+                <div onclick="changeLoginType()" class="qrloginBox"><span class="qrloginSpan">扫码登录</span><img
+                        class="qrImg"
+                        src="../../images/qrcode.png"></div>
+                <form method="post" class="dataForm">
+                    <h3 class="no-margins text-center title" style="color: #666666;font-size: 24px;font-weight: bold">
+                        密码登录</h3>
+                    <div>
+                        <input autocomplete="off" id="account" type="text" placeholder="请输入用户名"
+                               class="form-control uname"/>
+                        <img alt="" src="../../images/user.png">
+                    </div>
+                    <br>
+                    <div>
+                        <input autocomplete="off" id="password"
+                               type="password" class="form-control pword m-b" nullmsg="密码不能为空"
+                               placeholder="请输入密码"/>
+                        <img alt="" src="../../images/locked.png">
+                    </div>
+                    <br> <br>
 
-                <button type="button" onclick="login()" style="background-color: #4f6cff;border: none;font-size: 18px;"
-                        class="btn btn-success btn-block">登录
-                </button>
+                    <button type="button" onclick="login()"
+                            style="background-color: #4f6cff;border: none;font-size: 18px;"
+                            class="btn btn-success btn-block">登录
+                    </button>
 
-            </form>
+                </form>
+            </div>
+            <div id="qrCodeWarp">
+                <div onclick="changeLoginType()" class="qrloginBox"><span class="qrloginSpan">密码登录</span><img
+                        class="qrImg"
+                        src="../../images/pc.png"></div>
+                <div style="border-radius: 3px;
+    padding: 30px;">
+                    <h3 class="no-margins text-center title" style="color: #666666;font-size: 24px;font-weight: bold">
+                        扫码登录</h3>
+                    <div id="qrCodeIcon">
+                        
+                    </div>
+                    <div id="wxQrcode">
+
+                        <img class="wxQrcodeImg" src=" ../../images/qrcodeBack.png">
+                        <div class="wxQrcodeInfo">
+                            <p>二维码已失效</p>
+                            <button onclick="flushQrcode()" class="btn btn-primary">刷新二维码</button>
+                        </div>
+
+
+                    </div>
+                    <div id="scanResult" style="display: none">
+
+                        <img src="../../images/dui.png">
+                        <p>扫描成功!</p>
+                        <p>请在手机上根据提示确认登录</p>
+                    </div>
+                </div>
+            </div>
         </div>
 
     </div>
     <div class="signup-footer" style="color: #4968bd;">
-        <div class="" style="font-size: 16px;">HIVE管理系统V2.2.0</div>
+        <div class="" style="font-size: 16px;">讯聪管理系统V2.3.0</div>
         <div class="">
 
             <p class="download-bar" style="font-size: 12px;"><strong>浏览器:</strong>Win7以上<a
@@ -167,9 +279,46 @@
 </body>
 <script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
 <script type="text/javascript" th:src="@{/js/plugin/jsencrypt.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/qrcode.js}"></script>
 <script th:inline="javascript">
     var crypt = new JSEncrypt();
+    let loginType = 1;
+    $("#qrCodeWarp").hide();
+    $("#wxQrcode").hide();
+    function changeLoginType() {
+        if (loginType == 1) {
+            $("#accountWarp").hide();
+            $("#qrCodeWarp").show();
+            loginType = 2;
+        } else {
 
+            $("#accountWarp").show();
+            $("#qrCodeWarp").hide();
+            loginType = 1;
+        }
+    }
+
+    //soket用户标识
+    let webClientId = "webClientId_" + MTools.randomStr();
+    let loginQrCodeKey="";
+
+
+    markQrcode();
+    function markQrcode(){
+
+        var qrcode = new QRCode(document.getElementById("qrCodeIcon"), {
+            width: 200,
+            height: 200
+        });
+        loginQrCodeKey="loginQrCodeKey_" + MTools.randomStr();
+        let qrInfo={webClientId:webClientId,loginQrCodeKey:loginQrCodeKey}
+        qrcode.makeCode(JSON.stringify(qrInfo));
+        $('#qrCodeIcon canvas').show();
+
+    }
+
+
+    openSocket();
     /*<![CDATA[*/
 
     var publicKey =/*[[${session.publicKey}]]*/
@@ -178,7 +327,25 @@
 
         crypt.setKey(publicKey);
 
+
+    function  flushQrcode(){
+
+        $("#scanResult").hide();
+        $("#wxQrcode").hide();
+        webClientId = "XCMY_SCAN_QRCODE" + MTools.randomStr();
+
+        $("#qrCodeIcon").html("");
+        $("#qrCodeIcon").show();
+        markQrcode();
+
+
+
+
+    }
+
+
     function login() {
+
         if ($("#account").val() == "") {
             layer.tips('请输入账号!', '#account');
             return false;
@@ -191,12 +358,16 @@
         $.AjaxProxy({
             p: {
                 suAccount: encAcc,
-                suPassword: encPwd
+                suPassword: encPwd,
+                loginType: 1
             }
         }).invoke("/common/dologin", function (loj) {
             MTools.redirect("/" + loj.getValue("page"));
         });
     }
+
+
+
 
     function dologin(e) {
         if (e.keyCode == 13) {
@@ -206,5 +377,87 @@
             return false;
         }
     }
+
+
+
+    var socket;
+    function openSocket() {
+        if(typeof(WebSocket) == "undefined") {
+            console.log("您的浏览器不支持WebSocket");
+        }else{
+            console.log("您的浏览器支持WebSocket");
+            //实现化WebSocket对象,指定要连接的服务器地址与端口  建立连接
+            let  wsPath= getRootPath();
+            var socketUrl=  wsPath.replace("http","ws")+ "/webSocketServer?userId="+webClientId;
+
+            if(socket!=null){
+                socket.close();
+                socket=null;
+            }
+            socket = new WebSocket(socketUrl);
+            //打开事件
+            socket.onopen = function() {
+                console.log("websocket已打开");
+                sendMessage();
+            };
+            //获得消息事件
+            socket.onmessage = function(msg) {
+
+                var serverMsg = JSON.parse(msg.data);
+
+                if(serverMsg.msgType==1){
+
+                    $("#scanResult").show();
+                    $("#qrCodeIcon").hide();
+
+                }else if(serverMsg.msgType==2){
+
+                    if(serverMsg.loginOperation==1){
+                        $.AjaxProxy({
+                            p: {
+                                loginQrCodeKey: loginQrCodeKey,
+                                loginType: 2
+                            }
+                        }).invoke("/common/dologin", function (loj) {
+                            MTools.redirect("/" + loj.getValue("page"));
+                        });
+                    }else if(serverMsg.loginOperation==2){
+                        layer.msg("取消登录", {
+                            icon : 2
+                        });
+                        $("#scanResult").hide();
+                        $("#wxQrcode").show();
+                    }
+                }
+            };
+            //关闭事件
+            socket.onclose = function() {
+                console.log("websocket已关闭");
+            };
+            //发生了错误事件
+            socket.onerror = function() {
+                console.log("websocket发生了错误");
+            }
+        }
+    }
+
+    function sendMessage() {
+        if(typeof(WebSocket) == "undefined") {
+            console.log("您的浏览器不支持WebSocket");
+        }else {
+            var msg = '{   }';
+            socket.send(msg);
+        }
+    }
+    function colseSocket() {
+        if(typeof(WebSocket) == "undefined") {
+            console.log("您的浏览器不支持WebSocket");
+        }else {
+            socket.close();
+        }
+    }
+
+
+
 </script>
 </html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/common/showprojException.html b/zq-erp/src/main/resources/templates/views/common/showprojException.html
new file mode 100644
index 0000000..4fca1cd
--- /dev/null
+++ b/zq-erp/src/main/resources/templates/views/common/showprojException.html
@@ -0,0 +1,51 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
+<head>
+    <meta charset="utf-8">
+    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta http-equiv="Cache-Control" content="no-siteapp"/>
+    <LINK rel="Bookmark" href="../images/favicon.ico">
+    <!-- 本框架基本脚本和样式 -->
+
+    <link rel="stylesheet" th:href="@{/plugin/bootstrap-3.3.5/css/bootstrap.min.css}">
+    <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
+</head>
+<body>
+<div class="ibox-content" id="app">
+    <table class="table table-striped table-bordered" style="width: 800px;">
+        <tr>
+            <td>ID</td>
+            <td th:text="${obj.id}" ></td>
+            <td  >姓名</td>
+            <td th:text="${obj.owner}" ></td>
+        </tr>
+        <tr>
+            <td  >异常类型</td>
+            <td th:text="${obj.simpleMsg}" ></td>
+            <td  >发生时间</td>
+            <td th:text="${#dates.format(obj.createTime, 'yyyy-MM-dd HH:mm:sss')}" >
+        </tr>
+        <tr>
+            <td  >访问地址</td>
+            <td th:text="${obj.cause}" ></td>
+            <td  >mdc</td>
+            <td th:text="${obj.mdc}" ></td>
+        </tr>
+    </table>
+    <pre  th:text="${obj.errorMsg}" ></pre>
+
+</div>
+<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/bootstrap-3.3.5/js/bootstrap.min.js}"></script>
+
+<script type="text/javascript">
+
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/zq-erp/src/test/java/com/matrix/BizUserToVipInfoTool.java b/zq-erp/src/test/java/com/matrix/BizUserToVipInfoTool.java
new file mode 100644
index 0000000..81bed05
--- /dev/null
+++ b/zq-erp/src/test/java/com/matrix/BizUserToVipInfoTool.java
@@ -0,0 +1,93 @@
+package com.matrix;
+
+import com.matrix.core.tools.StringUtils;
+import com.matrix.system.constance.Dictionary;
+import com.matrix.system.fenxiao.dao.BizUserDao;
+import com.matrix.system.fenxiao.entity.BizUser;
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.hive.dao.SysVipInfoDao;
+import com.matrix.system.hive.service.CodeService;
+import com.matrix.system.hive.service.SysVipInfoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * bizuser转到vipinfo表工具类
+ * 
+ * @author jiangyouyao
+ * @email 512061637@qq.com
+ * @date 2019年2月25日
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = {ZqErpApplication.class},webEnvironment =SpringBootTest.WebEnvironment.RANDOM_PORT)
+public class BizUserToVipInfoTool {
+
+	@Autowired
+	BizUserDao bizUserDao;
+
+	@Autowired
+	SysVipInfoDao sysVipInfoDao;
+
+	@Autowired
+	CodeService codeService;
+
+	@Autowired
+	SysVipInfoService sysVipInfoService;
+
+	@Test
+	@Transactional
+	public void addSettings(){
+		HashMap columnMap=new HashMap();
+		columnMap.put("company_id",17);
+		List<BizUser> bizUsers = bizUserDao.selectByMap(columnMap);
+		for (BizUser bizUser : bizUsers) {
+			SysVipInfo sysVipInfo = sysVipInfoDao.selectByPhone(bizUser.getPhoneNumber(),17L);
+			if(sysVipInfo!=null){
+				sysVipInfo=sysVipInfoService.findByOpenId(bizUser.getOpenId());
+			}
+			if(sysVipInfo!=null){
+				sysVipInfo.setNickName(bizUser.getNickName());
+				sysVipInfo.setAvatarUrl(bizUser.getAvatarUrl());
+				sysVipInfo.setOpenId(bizUser.getOpenId());
+				sysVipInfo.setSessionKey(bizUser.getSessionKey());
+				sysVipInfoDao.update(sysVipInfo);
+			}else{
+				SysVipInfo	sysVipInfoNew = new SysVipInfo();
+				if(bizUser.getGender()!=null){
+					sysVipInfoNew.setSex(bizUser.getGender().equals("1")?"男":"女");
+				}
+				sysVipInfoNew.setNickName(bizUser.getNickName());
+				sysVipInfoNew.setAvatarUrl(bizUser.getAvatarUrl());
+				sysVipInfoNew.setIsSales(SysVipInfo.NOT_SALES);
+				sysVipInfoNew.setOpenId(bizUser.getOpenId());
+				sysVipInfoNew.setSessionKey(bizUser.getSessionKey());
+				sysVipInfoNew.setCompanyId(17L);
+				sysVipInfoNew.setShopId(13L);
+				sysVipInfoNew.setArrivalWay("微商城");
+				sysVipInfoNew.setVipName("微信用户");
+				sysVipInfoNew.setVipState(Dictionary.VIP_STATE_HY);
+				sysVipInfoNew.setVipType(Dictionary.VIP_TYPE_NOCARD);
+				sysVipInfoNew.setIsDeal(SysVipInfo.UNDEAL_VIP);
+				sysVipInfoNew.setVipNo(StringUtils.getRandomString(10));
+				sysVipInfoNew.setCity(bizUser.getCity());
+				sysVipInfoNew.setArea(bizUser.getArea());
+				sysVipInfoNew.setProvince(bizUser.getProvince());
+				sysVipInfoNew.setPhone(bizUser.getPhoneNumber());
+				sysVipInfoNew.setPhoto(bizUser.getAvatarUrl());
+				sysVipInfoService.add(sysVipInfoNew);
+			}
+			System.out.println("处理进度"+ bizUsers.indexOf(bizUser)+"/"+bizUsers.size());
+		}
+	}
+
+
+
+
+}
diff --git a/zq-erp/src/test/java/com/matrix/FenxiaoSoreInitTest.java b/zq-erp/src/test/java/com/matrix/FenxiaoSoreInitTest.java
new file mode 100644
index 0000000..5cd4a9d
--- /dev/null
+++ b/zq-erp/src/test/java/com/matrix/FenxiaoSoreInitTest.java
@@ -0,0 +1,113 @@
+package com.matrix;
+
+import com.alibaba.fastjson.JSON;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.system.activity.dao.ActivitySignAwardSetDao;
+import com.matrix.system.activity.entity.ActivitySignAwardSet;
+import com.matrix.system.common.bean.BusParameterSettings;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
+import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant;
+import com.matrix.system.score.constant.ScoreSettingConstant;
+import com.matrix.system.shopXcx.api.vo.ActivitySignAwardSetVo;
+import com.matrix.system.shopXcx.api.vo.SignBasicInfoJsonVo;
+import com.matrix.system.shopXcx.api.vo.SignBasicInfoVo;
+import com.matrix.system.shopXcx.bean.ShopActivities;
+import com.matrix.system.shopXcx.dao.ShopActivitiesDao;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = {ZqErpApplication.class},webEnvironment =SpringBootTest.WebEnvironment.RANDOM_PORT)
+public class FenxiaoSoreInitTest {
+	
+	@Autowired
+    private BusParameterSettingsDao busParameterSettingsDao;
+    @Autowired
+    private ShopActivitiesDao shopActivitiesDao;
+    @Autowired
+    private ActivitySignAwardSetDao activitySignAwardSetDao;
+
+
+    @Test
+    public void getSignBasicInfo() {
+        Long companyId = 36L;
+        //获取签到活动的信息
+        SignBasicInfoVo signBasicInfoVo = new SignBasicInfoVo();
+        ShopActivities shopActivities = shopActivitiesDao.selectOneByCompanyIdAndActTypeAndActStatus(companyId,ShopActivities.ACTIVITIES_TYPE_SIGN,ShopActivities.ACTSTATUS_STATUS_ING);
+        Long actId = shopActivities.getId();
+        signBasicInfoVo.setActName(shopActivities.getActName());
+        signBasicInfoVo.setActCode(shopActivities.getActCode());
+        signBasicInfoVo.setId(shopActivities.getId());
+        String actContent = shopActivities.getActContent();
+        SignBasicInfoJsonVo signBasicInfoJsonVo = JSON.parseObject(actContent, SignBasicInfoJsonVo.class);
+        signBasicInfoVo.setSignBasicInfoJsonVo(signBasicInfoJsonVo);
+
+        List<ActivitySignAwardSetVo> activitySignAwardSetVos = activitySignAwardSetDao
+                .selectListByActIDAndCompanyId(actId,companyId, ActivitySignAwardSet.AWARDSTATE_WORK);
+        signBasicInfoVo.setActivitySignAwardSetVos(activitySignAwardSetVos);
+
+        AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("");
+        ajaxResult.setData(signBasicInfoVo);
+       System.out.println(signBasicInfoVo);
+
+    }
+	public void InitByCompanyId() {
+	    //对应的公司ID
+//		long companyId = 36L;
+//		initBusParameterSetting(companyId);
+//		//initBusParameterFenxiaoSetting(companyId);
+	}
+
+    /**
+     * 初始化默认积分规则设置
+     */
+    public void initBusParameterSetting(long companyId) {
+        List<BusParameterSettings> ruleSettings=new ArrayList<>();
+
+        ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.VALID_PERIOD_POINTS, companyId));
+        ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.CREDIT_POINTS_CASH, companyId));
+
+        ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.CASH_CONSUMPTION, companyId));
+        ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.PRINCIPAL_BALANCE_CONSUMPTION, companyId));
+        ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.BONUS_BALANCE_CONSUMPTION, companyId));
+        ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.PRINCIPAL_CONSUMPTION, companyId));
+        ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.GIVE_CONSUMPTION, companyId));
+        ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.REFERRALS_CONSUMPTION, companyId));
+
+        ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.CASH_CONSUMPTION_SHOP, companyId));
+        ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.RESERVATION_SERVICE_SHOP, companyId));
+        ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.EVALUATUIN_ORDER_SHOP, companyId));
+
+        busParameterSettingsDao.batchInsert(ruleSettings);
+    }
+
+    /**
+     * 初始化默认分销规则设置
+     */
+    public void initBusParameterFenxiaoSetting(long companyId) {
+        List<BusParameterSettings> ruleSettings=new ArrayList<>();
+        ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_SWITCH, companyId));
+        ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_MODEL, companyId));
+        ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_APPLY_WAY, companyId));
+        ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_AUDIT_METHOD, companyId));
+        ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_APPLY_CONDITION, companyId));
+        ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_TG_PLAN, companyId));
+        ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_TG_POSTER, companyId));
+        ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_ZGFY, companyId));
+        busParameterSettingsDao.batchInsert(ruleSettings);
+    }
+
+    private BusParameterSettings addScoreRuleSetting(String code,long companyId) {
+        BusParameterSettings busParameterSetting = new BusParameterSettings();
+        busParameterSetting.setParamCode(code);
+        busParameterSetting.setCompanyId(companyId);
+        return busParameterSetting;
+    }
+
+}
diff --git a/zq-erp/src/test/java/com/matrix/JyyTests.java b/zq-erp/src/test/java/com/matrix/JyyTests.java
new file mode 100644
index 0000000..bac5650
--- /dev/null
+++ b/zq-erp/src/test/java/com/matrix/JyyTests.java
@@ -0,0 +1,84 @@
+package com.matrix;
+
+import cn.hutool.json.JSONArray;
+import cn.hutool.json.JSONObject;
+import cn.hutool.json.JSONUtil;
+import com.matrix.component.redis.RedisClient;
+import com.matrix.system.common.bean.SysFunction;
+import com.matrix.system.hive.service.imp.SysVipInfoServiceImpl;
+import com.matrix.system.score.dao.ScoreVipDetailDao;
+import com.matrix.system.score.service.ScoreVipDetailService;
+import com.matrix.system.shopXcx.dao.ShopOrderV2Dao;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 测试类示例
+ *
+ * @author jiangyouyao
+ * @email 512061637@qq.com
+ * @date 2019年2月25日
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = {ZqErpApplication.class}, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
+public class JyyTests {
+
+
+    @Autowired
+    private ShopOrderV2Dao shopOrderV2Dao;
+
+    @Autowired
+    ScoreVipDetailDao scoreVipDetailDao;
+
+    @Autowired
+    ScoreVipDetailService scoreVipDetailService;
+
+
+    @Autowired
+    SysVipInfoServiceImpl sysVipInfoService;
+
+    @Autowired
+    RedisClient redisClient;
+
+    @Test
+    public void testRedis() {
+
+        List<SysFunction> fnList = new ArrayList<>();
+        fnList.add(new SysFunction());
+
+        Map map = new HashMap();
+        map.put("a", fnList);
+        redisClient.saveMapValue("map", map);
+
+
+    }
+
+
+    @Test
+    public void testRedis2() {
+
+        String map = redisClient.getCachedValue("map");
+        JSONObject json = JSONUtil.parseObj(map);
+        String a = json.get("a").toString();
+
+
+        JSONArray jsonArray = JSONUtil.parseArray(a);
+       for (int i=0;i<jsonArray.size();i++){
+           SysFunction sysFunction = jsonArray.get(i, SysFunction.class);
+           System.out.println(sysFunction.getHasThisFn());
+       }
+
+
+
+
+    }
+
+}
diff --git a/zq-erp/src/test/java/com/matrix/ParameterSettingsTool.java b/zq-erp/src/test/java/com/matrix/ParameterSettingsTool.java
new file mode 100644
index 0000000..eccda8a
--- /dev/null
+++ b/zq-erp/src/test/java/com/matrix/ParameterSettingsTool.java
@@ -0,0 +1,116 @@
+package com.matrix;
+
+import cn.hutool.core.collection.CollectionUtil;
+import com.matrix.system.common.bean.BusParameterSettings;
+import com.matrix.system.common.bean.SysCompany;
+import com.matrix.system.common.constance.AppConstance;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
+import com.matrix.system.common.dao.SysCompanyDao;
+import com.matrix.system.hive.bean.ParameterSettings;
+import com.matrix.system.hive.dao.ParameterSettingsDao;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 配置工具
+ * 
+ * @author jiangyouyao
+ * @email 512061637@qq.com
+ * @date 2019年2月25日
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = {ZqErpApplication.class},webEnvironment =SpringBootTest.WebEnvironment.RANDOM_PORT)
+public class ParameterSettingsTool {
+
+
+	@Autowired
+	private ParameterSettingsDao parameterSettingsDao;
+
+	@Autowired
+	private BusParameterSettingsDao busParameterSettingsDao;
+
+	@Autowired
+	private SysCompanyDao sysCompanyDao;
+
+	/*
+	给所有公司加上多个配置,如果已经存在则跳过
+	 */
+	@Test
+	public void addSettings(){
+
+		List<ParameterSettings> newSettings=new ArrayList<>();
+
+
+		ParameterSettings newSetting1=new ParameterSettings();
+		newSetting1.setCode("APP_BANNER_GL");
+		newSetting1.setName("APP管理模块Banner");
+		newSetting1.setType(1);
+		newSetting1.setCategory("APP设置");
+		newSettings.add(newSetting1);
+
+		ParameterSettings newSetting2=new ParameterSettings();
+		newSetting2.setCode(AppConstance.WAREHOUSE_MANAGE_STOCK);
+		newSetting2.setName("是否管理产品库存");
+		newSetting2.setType(1);
+		newSetting2.setCategory("仓库设置");
+		newSettings.add(newSetting2);
+
+		ParameterSettings newSetting3=new ParameterSettings();
+		newSetting3.setCode(AppConstance.WECHARPAY_RECHARGE_NOTIFYURL);
+		newSetting3.setName("储值卡充值回调地址");
+		newSetting3.setType(1);
+		newSetting3.setCategory("微信开发配置");
+		newSettings.add(newSetting3);
+
+		ParameterSettings newSetting4=new ParameterSettings();
+		newSetting4.setCode(AppConstance.SHOP_MANAGE_JJCPAS_CONSUME);
+		newSetting4.setName("家居产品销售是否生成消耗业绩");
+		newSetting4.setType(1);
+		newSetting4.setCategory("店务配置");
+		newSettings.add(newSetting4);
+
+
+
+		for (ParameterSettings newSetting : newSettings) {
+			List<ParameterSettings> parameterSettings = parameterSettingsDao.selectByModel(newSetting);
+			if(CollectionUtil.isEmpty(parameterSettings)){
+				parameterSettingsDao.insert(newSetting);
+				System.out.println("新增配置"+newSetting.getName());
+			}else {
+				System.out.println("配置"+newSetting.getName()+"已经存在");
+			}
+			addSettingsTOAllCompany(newSetting);
+		}
+	}
+
+	private void addSettingsTOAllCompany(ParameterSettings newSetting) {
+
+		List<SysCompany> allCompany = sysCompanyDao.selectByModel(null);
+
+		for (SysCompany sysCompany : allCompany) {
+			BusParameterSettings checkExist = busParameterSettingsDao.selectCompanyParamByCode(newSetting.getCode(), sysCompany.getComId());
+			if(checkExist==null){
+				BusParameterSettings busParameterSettings=new BusParameterSettings();
+				busParameterSettings.setCompanyId(sysCompany.getComId());
+				busParameterSettings.setParamCode(newSetting.getCode());
+				busParameterSettings.setParamValue("");
+				busParameterSettingsDao.insert(busParameterSettings);
+				System.out.println(sysCompany.getComName()+"新增成功");
+			}else{
+				System.out.println("公司"+sysCompany.getComName()+"已经存在配置"+newSetting.getName());
+			}
+
+		}
+
+
+
+	}
+
+
+}
diff --git a/zq-erp/src/test/java/com/matrix/SalesOrderTaskTest.java b/zq-erp/src/test/java/com/matrix/SalesOrderTaskTest.java
new file mode 100644
index 0000000..196c2c1
--- /dev/null
+++ b/zq-erp/src/test/java/com/matrix/SalesOrderTaskTest.java
@@ -0,0 +1,247 @@
+package com.matrix;
+
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.hive.service.SysVipInfoService;
+import com.matrix.core.constance.MatrixConstance;
+import com.matrix.core.tools.LogUtil;
+import com.matrix.core.tools.StringUtils;
+import com.matrix.system.common.bean.BusParameterSettings;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
+import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant;
+import com.matrix.system.fenxiao.dao.ShopSalesmanGradeDao;
+import com.matrix.system.fenxiao.dao.ShopSalesmanOrderDao;
+import com.matrix.system.fenxiao.entity.ShopSalesmanGrade;
+import com.matrix.system.fenxiao.entity.ShopSalesmanOrder;
+import com.matrix.system.hive.dao.SysOrderDao;
+import com.matrix.system.hive.dao.SysOrderItemDao;
+import com.matrix.system.hive.dao.SysVipInfoDao;
+import com.matrix.system.hive.service.CodeService;
+import com.matrix.system.hive.service.ShoppingGoodsService;
+import com.matrix.system.hive.service.SysOrderService;
+import com.matrix.system.shopXcx.bean.ShopOrder;
+import com.matrix.system.shopXcx.bean.ShopOrderDetails;
+import com.matrix.system.shopXcx.bean.ShopProduct;
+import com.matrix.system.shopXcx.bean.ShopSku;
+import com.matrix.system.shopXcx.dao.ShopOrderDao;
+import com.matrix.system.shopXcx.dao.ShopOrderDetailsDao;
+import com.matrix.system.shopXcx.dao.ShopSkuDao;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = {ZqErpApplication.class},webEnvironment =SpringBootTest.WebEnvironment.RANDOM_PORT)
+public class SalesOrderTaskTest {
+	
+
+
+
+    @Autowired
+    ShopOrderDao shopOrderDao;
+    @Autowired
+    ShopOrderDetailsDao shopOrderDetailsDao;
+
+    @Autowired
+    SysVipInfoService sysVipInfoService;
+
+
+    @Autowired
+    SysVipInfoDao vipDap;
+
+    @Autowired
+    SysVipInfoDao vipDao;
+
+    @Autowired
+    CodeService codeService;
+
+    @Autowired
+    SysOrderDao sysOrderDao;
+
+    @Autowired
+    ShoppingGoodsService shoppingGoodsService;
+
+    @Autowired
+    SysOrderItemDao orderItemDao;
+
+    @Autowired
+    SysOrderService orderService;
+
+    @Autowired
+    ShopSkuDao shopSkuDao;
+
+    @Autowired
+    BusParameterSettingsDao parameterSettingsDao;
+
+
+    @Autowired
+    private ShopSalesmanOrderDao shopSalesmanOrderDao;
+
+    @Autowired
+    private ShopSalesmanGradeDao shopSalesmanGradeDao;
+    
+    /**
+     * 处理分销订单
+     * @param order
+     */
+    @Test
+    public void handleExtensionOrder() {
+    	ShopOrder order = new ShopOrder();
+
+    	order.setId(1190);
+    	order.setCompanyId(36L);
+    	
+    	List<ShopOrderDetails> details = new ArrayList<ShopOrderDetails>();
+    	ShopOrderDetails shopOrderDetails = new ShopOrderDetails();
+    	shopOrderDetails.setTotalPrice(new BigDecimal(0.01));
+    	
+    	ShopProduct shopProduct = new ShopProduct();
+    	shopProduct.setAttrValues("测试");
+    	shopProduct.setAbleSales(1);
+    	
+    	ShopSku shopSku = new ShopSku();
+    	shopOrderDetails.setShopSku(shopSku);
+    	shopOrderDetails.setShopProduct(shopProduct);
+    	shopOrderDetails.setCount(1);
+    	details.add(shopOrderDetails);
+    	
+    	order.setDetails(details);
+    	order.setOrderMoney(new BigDecimal(0.01));
+        //判读客户是否存在上级,存在则产生上级的收益
+        SysVipInfo sysVipInfo = sysVipInfoService.findById(order.getUserId());
+        LogUtil.debug("处理分销订单userOpid={}",sysVipInfo.getId());
+        //判断是否重复生成
+        QueryWrapper queryWrapper=new QueryWrapper();
+        queryWrapper.eq("order_id",order.getId());
+        Integer orderCount = shopSalesmanOrderDao.selectCount(queryWrapper);
+        if(orderCount==0){
+            ShopSalesmanOrder salesmanOrder=new ShopSalesmanOrder();
+            salesmanOrder.setCompanyId(order.getCompanyId());
+            salesmanOrder.setCreateBy(MatrixConstance.SYSTEM_USER);
+            salesmanOrder.setUpdateBy(MatrixConstance.SYSTEM_USER);
+            salesmanOrder.setCreateTime(new Date());
+            salesmanOrder.setUpdateTime(new Date());
+            salesmanOrder.setOrderId(Long.parseLong(order.getId()+""));
+            salesmanOrder.setUserId(order.getUserId());
+            salesmanOrder.setRevenueType(ShopSalesmanOrder.REVENUE_TYPE_SALES);
+            salesmanOrder.setOrderStatus(ShopSalesmanOrder.STATUS_DJS);
+        	Double selfAmount=0D;
+            Double zk=1D;
+            //分销订单总额
+            Double orderTotal=0D;
+            for (ShopOrderDetails item:order.getDetails() ){
+                if(StringUtils.isNotBlank(item.getShopProduct().getAttrValues())
+                        && item.getShopProduct().getAbleSales()==ShopProduct.ABLE_SALES){
+                	orderTotal+=item.getTotalPrice().doubleValue();
+                }
+            }
+            //自购返佣
+            for (ShopOrderDetails item:order.getDetails() ){
+                if(StringUtils.isNotBlank(item.getShopProduct().getAttrValues())
+                        && item.getShopProduct().getAbleSales()==ShopProduct.ABLE_SALES){
+                    //分销规则是否开启自购返佣
+                    BusParameterSettings zgfy = parameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_ZGFY, sysVipInfo.getCompanyId());
+                    //按分销等级计算
+                    ShopSalesmanGrade shopSalesmanGrade = shopSalesmanGradeDao.selectById(sysVipInfo.getSalesmanGrade());
+                    if(ObjectUtil.isNotEmpty(zgfy)) {
+                        //获取商品的自购返佣价格,如果没有设置,在去获取当前推广人的等级的自购返佣比例
+                    	if(StrUtil.isNotEmpty(zgfy.getParamValue()) && 
+                    			FenxiaoSettingConstant.FX_ZGFY_YES.equals(zgfy.getParamValue())) {
+                    		if(item.getShopSku().getSelfPrice() == null
+                                    ||item.getShopSku().getSealesPrice().doubleValue() == 0){
+                                selfAmount+=item.getTotalPrice().doubleValue()*(shopSalesmanGrade.getSelfCommission()/100);
+                    		}else {
+                    			//按产品设置的自购返佣金额计算
+                    			selfAmount+=item.getShopSku().getSelfPrice().doubleValue()*item.getCount();
+                    		}
+                    	}
+                    }
+                }
+            }
+            //自购返佣记录
+            if(selfAmount > 0) {
+            	//整体的优惠金额折算成折扣,* 佣金
+                zk=order.getOrderMoney().doubleValue()/orderTotal;
+                selfAmount=selfAmount*zk;
+                salesmanOrder.setAmount(selfAmount);
+                salesmanOrder.setSalesUserId(order.getUserId());
+                shopSalesmanOrderDao.insert(salesmanOrder);
+            }
+            //存在上级
+            if(sysVipInfo.getRecommendId()!=null) {
+            	SysVipInfo salesMan=sysVipInfoService.findById(sysVipInfo.getRecommendId());
+                Double salesAmount=0D;
+                Double invitationAmount=0D;
+            	SysVipInfo invitationMan=null;
+            	ShopSalesmanOrder invitationOrder=null;
+            	boolean hasInvitationMan=salesMan.getRecommendId()!=null;
+            	//判断推广员是否还存在上级,存在则计算邀请收益
+            	if(hasInvitationMan){
+            		invitationMan=sysVipInfoService.findById(salesMan.getRecommendId());
+            		invitationOrder=new ShopSalesmanOrder();
+            		BeanUtils.copyProperties(salesmanOrder,invitationOrder);
+            		invitationOrder.setSalesUserId(invitationMan.getId());
+            		invitationOrder.setRevenueType(ShopSalesmanOrder.REVENUE_TYPE_INVITATION);
+            	}
+            	//收益计算
+                for (ShopOrderDetails item:order.getDetails() ){
+                    if(StringUtils.isNotBlank(item.getShopProduct().getAttrValues())
+                            && item.getShopProduct().getAbleSales()==ShopProduct.ABLE_SALES){
+                        //按分销等级计算
+                        ShopSalesmanGrade shopSalesmanGrade = shopSalesmanGradeDao.selectById(salesMan.getSalesmanGrade());
+                        //推广提成,按分销等级计算或者按产品设置的推广金额计算
+                        if(item.getShopSku().getSealesPrice()==null
+                                ||item.getShopSku().getSealesPrice().doubleValue()==0){
+                            salesAmount+=item.getTotalPrice().doubleValue()*(shopSalesmanGrade.getSealesCommission()/100);
+                        }else{
+                            salesAmount+=item.getShopSku().getSealesPrice().doubleValue()*item.getCount();
+                        }
+                        //邀请提成,获取商品的邀请提成价格和是否有上级推广人,如果没有设置,在去获取当前推广人的等级的自购返佣比例
+                        if(hasInvitationMan) {
+                        	if(item.getShopSku().getInvitationPrice() == null
+                                    ||item.getShopSku().getInvitationPrice().doubleValue() == 0){
+                            	//获取上级的推广等级设置
+                            	ShopSalesmanGrade invitationManGrade = shopSalesmanGradeDao.selectById(invitationMan.getSalesmanGrade());
+                                invitationAmount+=item.getTotalPrice().doubleValue()*(invitationManGrade.getInvitationCommission()/100);
+                            }else {
+                            	//按产品设置的邀请提成价格计算
+                            	invitationAmount+=item.getShopSku().getInvitationPrice().doubleValue()*item.getCount();
+                            }
+                        }
+                    }
+                }
+                //推广提成记录
+                if(salesAmount>0){
+                    //整体的优惠金额折算成折扣,* 佣金
+                    zk=order.getOrderMoney().doubleValue()/orderTotal;
+                    salesAmount=salesAmount*zk;
+                    salesmanOrder.setAmount(salesAmount);
+                    salesmanOrder.setSalesUserId(sysVipInfo.getRecommendId());
+                    shopSalesmanOrderDao.insert(salesmanOrder);
+                }
+                //邀请提成记录
+                if(invitationAmount > 0) {
+                	//整体的优惠金额折算成折扣,* 佣金
+                	invitationAmount=invitationAmount*zk;
+                    invitationOrder.setAmount(invitationAmount);
+                    shopSalesmanOrderDao.insert(invitationOrder);
+                } 
+            }else{
+                LogUtil.debug("不存在父级userOpid={}",sysVipInfo.getId());
+            }
+        }else{
+            LogUtil.debug("重复订单id={}",order.getId());
+        }
+    }
+
+}
diff --git a/zq-erp/src/test/java/com/matrix/SourceFlowTests.java b/zq-erp/src/test/java/com/matrix/SourceFlowTests.java
index 6cc43c8..8f30c3b 100644
--- a/zq-erp/src/test/java/com/matrix/SourceFlowTests.java
+++ b/zq-erp/src/test/java/com/matrix/SourceFlowTests.java
@@ -1,11 +1,16 @@
 package com.matrix;
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.matrix.component.rabbitmq.RabiitMqTemplate;
+import com.matrix.component.wechat.externalInterface.weixinUtil.WeixinServiceUtil;
+import com.matrix.config.RabbitMqConfig;
 import com.matrix.core.tools.StringUtils;
-import com.matrix.system.constance.Dictionary;
+import com.matrix.system.fenxiao.dao.ShopSalesmanApplyDao;
 import com.matrix.system.hive.bean.*;
 import com.matrix.system.hive.dao.*;
 import com.matrix.system.hive.service.CodeService;
-import com.matrix.system.hive.service.SysOrderService;
+import com.matrix.system.shopXcx.mqTask.MQTaskRouting;
+import com.matrix.system.shopXcx.vo.SalesmanVo;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -48,7 +53,31 @@
 	@Autowired
 	private SysVipInfoDao vipInfoDao;
 
+	@Autowired
+	RabiitMqTemplate rabiitMqTemplate;
+@Autowired
+WeixinServiceUtil weixinServiceUtil;
 
+	/**
+	 * 企业付款到个人
+	 * @throws InterruptedException
+	 */
+	@Test
+	public void testPay() throws InterruptedException {
+		weixinServiceUtil.comPay("提现","TX123",1,"oJkRK4yelehsY4S7I6Ee1ydWtQMI",36L);
+	}
+
+
+
+	/**
+	 * 发送订阅消息
+	 * @throws InterruptedException
+	 */
+	@Test
+	public void testTopic() throws InterruptedException {
+		rabiitMqTemplate.sendTopicMsg(RabbitMqConfig.MQ_EXCHANGE_TOPIC +"dev", MQTaskRouting.CREATE_ORDER+"dev", "123");
+		Thread.sleep(10000);
+	}
 
 	@Test
 	@Transactional
@@ -124,7 +153,7 @@
 
 		for (SysOrder sysOrder : sysOrders) {
 			sysOrder.setCashPay(sysOrder.getZkTotal());
-			sysOrder.setCardPay(0);
+			sysOrder.setCardPay(0D);
 			sysOrderDao.update(sysOrder);
 
 			List<SysOrderItem> items = sysOrderItemDao.selectByOrderId(sysOrder.getId());
@@ -171,4 +200,9 @@
 		}
 	}
 
+	@Autowired
+	private ShopSalesmanApplyDao salesmanApplyDao;
+
+
+
 }
diff --git a/zq-erp/src/test/java/com/matrix/TcProjTest.java b/zq-erp/src/test/java/com/matrix/TcProjTest.java
new file mode 100644
index 0000000..a6c485c
--- /dev/null
+++ b/zq-erp/src/test/java/com/matrix/TcProjTest.java
@@ -0,0 +1,33 @@
+package com.matrix;
+
+import cn.hutool.core.collection.CollUtil;
+import com.matrix.system.hive.bean.SysProjUse;
+import com.matrix.system.hive.dao.SysProjUseDao;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.util.List;
+
+/**
+ * @author wzy
+ * @date 2021-04-12
+ **/
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = {ZqErpApplication.class},webEnvironment =SpringBootTest.WebEnvironment.RANDOM_PORT)
+public class TcProjTest {
+
+    @Autowired
+    private SysProjUseDao sysProjUseDao;
+
+    @Test
+    public void tcProjTest() {
+//        List<SysProjUse> projUses = sysProjUseDao.selectTaoCanListWithProj();
+//        if (CollUtil.isNotEmpty(projUses)) {
+//
+//        }
+    }
+}

--
Gitblit v1.9.1