From dc1a4670261bc852f643d19a83ffc53eeac1b902 Mon Sep 17 00:00:00 2001
From: jyy <935090232@qq.com>
Date: Mon, 25 Jan 2021 16:16:45 +0800
Subject: [PATCH] Merge branch 'hive2.0' into api

---
 zq-erp/src/main/java/com/matrix/core/tools/rr/GroovyDome.java                             |   34 ++++++++
 zq-erp/src/main/java/com/matrix/system/hive/statistics/StatisticsBusinessDataJob.java     |    2 
 zq-erp/src/main/resources/templates/views/admin/hive-erp/products/shoppinggoods-list.html |   18 ++--
 zq-erp/pom.xml                                                                            |    1 
 zq-erp/src/main/java/com/matrix/system/common/actions/CustomerDictionaryAction.java       |    4 +
 zq-xcx/project.config.json                                                                |    6 -
 zq-erp/src/main/java/com/matrix/system/hiveErp/action/DataAnalysisCustomer.java           |    2 
 zq-erp/src/main/java/com/matrix/config/RabbitMqConfig.java                                |    3 
 zq-erp/src/main/resources/templates/views/admin/hive/products/shoppinggoods-md-list.html  |   14 +-
 /dev/null                                                                                 |   78 -------------------
 zq-erp/src/main/java/com/matrix/system/hive/action/GoodsTypeController.java               |    5 +
 zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/Task/UniformMsgSentTask.java   |    5 +
 zq-erp/src/main/resources/config/prd/application.properties                               |   11 ++
 zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsController.java           |    7 +
 zq-erp/src/main/java/com/matrix/system/hive/action/ArticleTypeController.java             |    6 +
 zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpShoppingGoodsController.java     |    7 +
 zq-erp/src/main/resources/config/lhx/application.properties                               |    1 
 zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsCategoryController.java   |    6 +
 zq-erp/src/main/resources/templates/views/admin/hive/products/shoppinggoods-zb-list.html  |   16 ++--
 zq-erp/src/main/java/com/matrix/system/hive/action/DepartInfoController.java              |    5 +
 zq-erp/src/main/java/com/matrix/system/app/action/ApiFollowupAction.java                  |    6 +
 21 files changed, 112 insertions(+), 125 deletions(-)

diff --git a/zq-erp/pom.xml b/zq-erp/pom.xml
index 2e09258..c3a9d87 100644
--- a/zq-erp/pom.xml
+++ b/zq-erp/pom.xml
@@ -392,7 +392,6 @@
                     -->
 
 
-
                     <exclude>**/*.woff</exclude>
                     <exclude>**/*.woff2</exclude>
                     <exclude>**/*.ttf</exclude>
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 2effc80..b05d58b 100644
--- a/zq-erp/src/main/java/com/matrix/config/RabbitMqConfig.java
+++ b/zq-erp/src/main/java/com/matrix/config/RabbitMqConfig.java
@@ -4,6 +4,7 @@
 import com.matrix.component.rabbitmq.MqTask;
 import com.matrix.component.rabbitmq.RabiitMqTemplate;
 import com.matrix.component.rabbitmq.RabiitMqTemplateFactory;
+import com.matrix.core.tools.LogUtil;
 import com.matrix.system.shopXcx.mqTask.*;
 import com.matrix.system.wechart.templateMsg.Task.UniformMsgSentTask;
 import org.springframework.beans.factory.annotation.Value;
@@ -62,7 +63,7 @@
 
     @Bean
     public RabiitMqTemplate rabiitMqTemplate() throws IOException {
-
+        LogUtil.info("rabbitmq: {}, {}, {}, {}", host, port, username, password);
         RabiitMqTemplate rabiitMqTemplate = RabiitMqTemplateFactory.buildTemplate(host, port, username, password);
 
         //声明一个交换机
diff --git a/zq-erp/src/main/java/com/matrix/core/tools/rr/GroovyDome.java b/zq-erp/src/main/java/com/matrix/core/tools/rr/GroovyDome.java
index 8b849cb..07d7357 100644
--- a/zq-erp/src/main/java/com/matrix/core/tools/rr/GroovyDome.java
+++ b/zq-erp/src/main/java/com/matrix/core/tools/rr/GroovyDome.java
@@ -1,12 +1,42 @@
 package com.matrix.core.tools.rr;
 
+import com.alibaba.druid.pool.DruidDataSource;
+import com.alibaba.fastjson.JSONArray;
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.core.tools.LogUtil;
+import com.matrix.core.tools.StringUtils;
+import org.apache.commons.io.FileUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jdbc.core.JdbcOperations;
+import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
 
 public class GroovyDome implements GroovyRunable {
 
-    @Override
+    @Autowired
+    DruidDataSource datasource;
     public AjaxResult run() {
-        return new AjaxResult();
+        String tables="back_no, back_test, chy_clean_vip_price, code_relation_ks, crm_order_operator_config, customer_test, dept_batch_no, detail, ds_order_record, erp_adjust_price, erp_adjust_price_detail, erp_approva_apply, erp_approval_record, erp_approver_configuration, erp_business_with_product, erp_business_with_store, erp_conservation_detail, erp_conservation_record, erp_cus_update_record, erp_custom_bf0624, erp_customer, erp_customer_copy1, erp_customer0618, erp_data_dictionary, erp_distribution_detail, erp_distribution_info, erp_ent_business_scope, erp_ent_certificate_info, erp_ent_contact_user, erp_ent_first_practice, erp_ent_first_practice_reocrd, erp_ent_prohibit, erp_enterprise_bank, erp_enterprise_info, erp_export_record, erp_field_update_record, erp_file_upload, erp_function_browse, erp_function_collection, erp_inventory_detail, erp_inventory_enter_detail, erp_inventory_enter_info, erp_inventory_plan_info, erp_message_receive, erp_message_send, erp_order_no_record, erp_order_record, erp_outbound_review, erp_overflow_loss_detail, erp_overflow_loss_info, erp_param_configure, erp_picking_detail, erp_picking_info, erp_print_record, erp_pro_certificate, erp_pro_first_practice, erp_pro_first_practice_reocrd, erp_product_img_detail, erp_product_info, erp_product_other_info, erp_product_prohibit, erp_product_quality_attr, erp_product_revise_price, erp_product_sale_attr, erp_product_stock, erp_purchase_back_detail, erp_purchase_backgoods, erp_purchase_backgoods_copy, erp_purchase_order_detail, erp_purchase_order_info, erp_purchase_plan_detail, erp_purchase_plan_info, erp_purchase_receivegoods, erp_purchase_receivegoods_detail, erp_purchase_rejection, erp_purchase_rejection_detail, erp_quality_review_detail, erp_quality_review_record, erp_recharge_record, erp_region, erp_resource_auth_role, erp_resources_auth, erp_resources_auth_value, erp_resources_group, erp_revise_price_detail, erp_revise_price_info, erp_settings, erp_stock_flow_detail, erp_store_info, erp_table_test_price, erp_value_card_flow, erp_vip_integral_flow, erp_vip_integral_record, erp_vip_integral_rule, erp_vip_type, erp_wait_conservation_record, erp_warehouse_area, erp_warehouses, erp_wave_detail, erp_wave_info, his_item_pay_detail, inventory_allocation, inventory_change_record, item, jiagetiaozheng, lingshoujia, menzhen_0927, pandian, pandianxiugai, pos_aaa, pos_activity, pos_activity_gift_info, pos_activity_gifts, pos_activity_integral, pos_activity_package, pos_activity_product, pos_activity_recharge, pos_activity_with_store, pos_approva_apply, pos_approval_record, pos_bill_template_detail, pos_bill_template_store_default, pos_bucket_record, pos_bucket_record_detail, pos_bucket_stock, pos_business_data, pos_business_data_detail, pos_cashier_handover, pos_conservation_detail, pos_conservation_record, pos_destory_loss_mode, pos_enter_invalid_detail, pos_integral_convert_money, pos_inventory_detail, pos_inventory_enter_detail, pos_inventory_enter_info, pos_inventory_plan_info, pos_item_pay_detail, pos_loss_destory, pos_no_qd_damaged_detail, pos_no_qd_damaged_info, pos_no_qd_move_record, pos_order_stock_detail, pos_overflow_loss_detail, pos_overflow_loss_info, pos_package_product, pos_prescription_record, pos_product_destroy, pos_product_info, pos_product_info_copy1, pos_product_sale_detail, pos_product_stock, pos_product_stock_temp, pos_product_update_record, pos_purchase_back_detail, pos_purchase_back_goods, pos_purchase_plan_detail, pos_purchase_plan_info, pos_purchase_rejection, pos_purchase_rejection_detail, pos_quality_review_detail, pos_quality_review_record, pos_receive_detail, pos_receive_goods, pos_refund_order, pos_refund_order_detail, pos_refund_stock_detail, pos_retail_order, pos_retail_order_detail, pos_retail_package_pro, pos_scatter_stock, pos_scattered_record, pos_scattered_stock, pos_special_product_detail, pos_special_product_info, pos_special_tube_record, pos_stock_flow_detail, pos_temperature_humidity, pos_transfer_slip, pos_transfer_slip_detail, pos_transfer_slip_out_stock, pos_wait_conservation, pos_wholesale_goods, pos_wholesale_plan_detail, pos_wholesale_plan_info, product_info, productCode, qrtz_calendars, qrtz_job_details, qrtz_locks, qrtz_paused_trigger_grps, qrtz_scheduler_state, receive_temp, retail_team, Sheet1, stock_init, stock_price, stock_test, sys_api_access_record, sys_app, sys_button, sys_company, sys_department, sys_fn_btn_rel, sys_function, sys_log, sys_role, sys_role_pwoer_fn, sys_role_pwoer_fn_audit, sys_user_login_record, sys_users, tementiaojia, test_jinheyuan, xlyb, xxl_job_group, xxl_job_info, xxl_job_lock, xxl_job_log, xxl_job_logglue, xxl_job_registry, xxl_job_user";
+        String tableArry[] = StringUtils.stringToArray(tables,",");
+        for(String table : tableArry) {
+
+            System.out.println("开始处理====》" + table);
+        }
+        AjaxResult r=  AjaxResult.buildSuccessInstance("成功");
+        return r;
+    }
+
+    public static void main(String[] args) {
+        String tables="back_no, back_test, chy_clean_vip_price, code_relation_ks, crm_order_operator_config, customer_test, dept_batch_no, detail, ds_order_record, erp_adjust_price, erp_adjust_price_detail, erp_approva_apply, erp_approval_record, erp_approver_configuration, erp_business_with_product, erp_business_with_store, erp_conservation_detail, erp_conservation_record, erp_cus_update_record, erp_custom_bf0624, erp_customer, erp_customer_copy1, erp_customer0618, erp_data_dictionary, erp_distribution_detail, erp_distribution_info, erp_ent_business_scope, erp_ent_certificate_info, erp_ent_contact_user, erp_ent_first_practice, erp_ent_first_practice_reocrd, erp_ent_prohibit, erp_enterprise_bank, erp_enterprise_info, erp_export_record, erp_field_update_record, erp_file_upload, erp_function_browse, erp_function_collection, erp_inventory_detail, erp_inventory_enter_detail, erp_inventory_enter_info, erp_inventory_plan_info, erp_message_receive, erp_message_send, erp_order_no_record, erp_order_record, erp_outbound_review, erp_overflow_loss_detail, erp_overflow_loss_info, erp_param_configure, erp_picking_detail, erp_picking_info, erp_print_record, erp_pro_certificate, erp_pro_first_practice, erp_pro_first_practice_reocrd, erp_product_img_detail, erp_product_info, erp_product_other_info, erp_product_prohibit, erp_product_quality_attr, erp_product_revise_price, erp_product_sale_attr, erp_product_stock, erp_purchase_back_detail, erp_purchase_backgoods, erp_purchase_backgoods_copy, erp_purchase_order_detail, erp_purchase_order_info, erp_purchase_plan_detail, erp_purchase_plan_info, erp_purchase_receivegoods, erp_purchase_receivegoods_detail, erp_purchase_rejection, erp_purchase_rejection_detail, erp_quality_review_detail, erp_quality_review_record, erp_recharge_record, erp_region, erp_resource_auth_role, erp_resources_auth, erp_resources_auth_value, erp_resources_group, erp_revise_price_detail, erp_revise_price_info, erp_settings, erp_stock_flow_detail, erp_store_info, erp_table_test_price, erp_value_card_flow, erp_vip_integral_flow, erp_vip_integral_record, erp_vip_integral_rule, erp_vip_type, erp_wait_conservation_record, erp_warehouse_area, erp_warehouses, erp_wave_detail, erp_wave_info, his_item_pay_detail, inventory_allocation, inventory_change_record, item, jiagetiaozheng, lingshoujia, menzhen_0927, pandian, pandianxiugai, pos_aaa, pos_activity, pos_activity_gift_info, pos_activity_gifts, pos_activity_integral, pos_activity_package, pos_activity_product, pos_activity_recharge, pos_activity_with_store, pos_approva_apply, pos_approval_record, pos_bill_template_detail, pos_bill_template_store_default, pos_bucket_record, pos_bucket_record_detail, pos_bucket_stock, pos_business_data, pos_business_data_detail, pos_cashier_handover, pos_conservation_detail, pos_conservation_record, pos_destory_loss_mode, pos_enter_invalid_detail, pos_integral_convert_money, pos_inventory_detail, pos_inventory_enter_detail, pos_inventory_enter_info, pos_inventory_plan_info, pos_item_pay_detail, pos_loss_destory, pos_no_qd_damaged_detail, pos_no_qd_damaged_info, pos_no_qd_move_record, pos_order_stock_detail, pos_overflow_loss_detail, pos_overflow_loss_info, pos_package_product, pos_prescription_record, pos_product_destroy, pos_product_info, pos_product_info_copy1, pos_product_sale_detail, pos_product_stock, pos_product_stock_temp, pos_product_update_record, pos_purchase_back_detail, pos_purchase_back_goods, pos_purchase_plan_detail, pos_purchase_plan_info, pos_purchase_rejection, pos_purchase_rejection_detail, pos_quality_review_detail, pos_quality_review_record, pos_receive_detail, pos_receive_goods, pos_refund_order, pos_refund_order_detail, pos_refund_stock_detail, pos_retail_order, pos_retail_order_detail, pos_retail_package_pro, pos_scatter_stock, pos_scattered_record, pos_scattered_stock, pos_special_product_detail, pos_special_product_info, pos_special_tube_record, pos_stock_flow_detail, pos_temperature_humidity, pos_transfer_slip, pos_transfer_slip_detail, pos_transfer_slip_out_stock, pos_wait_conservation, pos_wholesale_goods, pos_wholesale_plan_detail, pos_wholesale_plan_info, product_info, productCode, qrtz_calendars, qrtz_job_details, qrtz_locks, qrtz_paused_trigger_grps, qrtz_scheduler_state, receive_temp, retail_team, Sheet1, stock_init, stock_price, stock_test, sys_api_access_record, sys_app, sys_button, sys_company, sys_department, sys_fn_btn_rel, sys_function, sys_log, sys_role, sys_role_pwoer_fn, sys_role_pwoer_fn_audit, sys_user_login_record, sys_users, tementiaojia, test_jinheyuan, xlyb, xxl_job_group, xxl_job_info, xxl_job_lock, xxl_job_log, xxl_job_logglue, xxl_job_registry, xxl_job_user";
+        String tableArry[] = StringUtils.stringToArray(tables,",");
+        for(String table : tableArry) {
+
+            System.out.println("开始处理====》" + table);
+        }
+
     }
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiFollowupAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiFollowupAction.java
index a792454..25fa419 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/action/ApiFollowupAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiFollowupAction.java
@@ -6,6 +6,8 @@
 import com.matrix.core.tools.WebUtil;
 import com.matrix.system.app.dto.*;
 import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.common.tools.DataAuthUtil;
+import com.matrix.system.hive.action.util.QueryUtil;
 import com.matrix.system.hive.bean.*;
 import com.matrix.system.hive.dao.*;
 import com.matrix.system.hive.plugin.util.CollectionUtils;
@@ -157,7 +159,9 @@
     @PostMapping(value = "/findFollowup")
     public AjaxResult findFollowup(@RequestBody @Validated FollowupListDto followupListDto) {
         SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
-        followupListDto.setShopId(user.getShopId());
+        if(!DataAuthUtil.hasAllShopAuth()){
+            followupListDto.setShopId(user.getShopId());
+        }
         followupListDto.setCompanyId(user.getCompanyId());
         followupListDto.setSelfStaff(user.getSuId());
         //TODO 需要设置跨店数据权限
diff --git a/zq-erp/src/main/java/com/matrix/system/common/actions/CustomerDictionaryAction.java b/zq-erp/src/main/java/com/matrix/system/common/actions/CustomerDictionaryAction.java
index f41b1b5..6052076 100644
--- a/zq-erp/src/main/java/com/matrix/system/common/actions/CustomerDictionaryAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/common/actions/CustomerDictionaryAction.java
@@ -111,6 +111,10 @@
     @RequestMapping(value = "/modifyDataDictionary")
     public @ResponseBody
     AjaxResult modifyDataDictionary(CustomerDataDictionary newDataDictionary) {
+        // 自己不能是自己的父节点
+        if (newDataDictionary.getParentId() != null && newDataDictionary.getParentId().equals(newDataDictionary.getId())) {
+            throw new GlobleException("父级不能是自己");
+        }
         dataDictionaryDao.updateByModel(newDataDictionary);
         return new AjaxResult(AjaxResult.STATUS_SUCCESS, SystemMessageCode.UPDATE_SUCCES, "数据字典");
 
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/ArticleTypeController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/ArticleTypeController.java
index 3811381..716ebb0 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/ArticleTypeController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/ArticleTypeController.java
@@ -7,6 +7,7 @@
 import javax.annotation.Resource;
 
 import com.matrix.core.constance.MatrixConstance;
+import com.matrix.core.exception.GlobleException;
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.core.pojo.PaginationVO;
 import com.matrix.core.tools.StringUtils;
@@ -126,7 +127,10 @@
 
 		articleType.setParentIds(CollectionUtils.isNotEmpty(ids) ? StringUtils.collToStr(ids, ",") : null);
 		if (articleType.getId() != null) {
-
+			// 自己不能是自己的父节点
+			if (articleType.getParentId() != null && articleType.getParentId().equals(articleType.getId())) {
+				throw new GlobleException("父级不能是自己");
+			}
 			return modify(currentService, articleType, "文章类型");
 		} else {
 
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/DepartInfoController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/DepartInfoController.java
index 7a5e5d7..eb30467 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/DepartInfoController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/DepartInfoController.java
@@ -1,5 +1,6 @@
 package com.matrix.system.hive.action;
 
+import com.matrix.core.exception.GlobleException;
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.core.pojo.PaginationVO;
 import com.matrix.core.tools.WebUtil;
@@ -58,7 +59,9 @@
 	public @ResponseBody AjaxResult addOrModify(SysDepartInfo departInfo) {
 
 		if (departInfo.getId() != null) {
-
+			if (departInfo.getParentId() != null && departInfo.getParentId().equals(departInfo.getId())) {
+				throw new GlobleException("父级不能是自己");
+			}
 			return modify(currentService, departInfo, "部门");
 		} else {
 			QueryUtil.setQueryLimit(departInfo);
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/GoodsTypeController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/GoodsTypeController.java
index 4348e50..c5ce387 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/GoodsTypeController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/GoodsTypeController.java
@@ -1,6 +1,7 @@
 package com.matrix.system.hive.action;
 
 import com.matrix.core.constance.MatrixConstance;
+import com.matrix.core.exception.GlobleException;
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.core.tools.WebUtil;
 import com.matrix.system.common.bean.SysUsers;
@@ -47,7 +48,9 @@
 	AjaxResult addOrModify(SysGoodsType sysGoodsType) {
    		SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
 		if (sysGoodsType.getId() != null) {
-
+			if (sysGoodsType.getParentId() != null && sysGoodsType.getParentId().equals(sysGoodsType.getId())) {
+				throw new GlobleException("父级不能是自己");
+			}
 			return modify(currentService, sysGoodsType, "产品分类");
 		} else {
 
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsCategoryController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsCategoryController.java
index b141bdd..ddf679b 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsCategoryController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsCategoryController.java
@@ -1,5 +1,6 @@
 package com.matrix.system.hive.action;
 
+import com.matrix.core.exception.GlobleException;
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.system.common.bean.SysUsers;
 import com.matrix.system.hive.action.util.QueryUtil;
@@ -45,6 +46,11 @@
     AjaxResult addOrModify(ShoppingGoodsCategory shoppingGoodsCategory) {
         if (shoppingGoodsCategory.getId() != null) {
 
+            // 自己不能是自己的父节点
+            if (shoppingGoodsCategory.getParentId() != null && shoppingGoodsCategory.getParentId().equals(shoppingGoodsCategory.getId())) {
+                throw new GlobleException("父级不能是自己");
+            }
+
             return modify(goodsCategoryService, shoppingGoodsCategory, "商品类型");
         } else {
             QueryUtil.setQueryLimit(shoppingGoodsCategory);
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsController.java
index 26d1c64..f70a262 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsController.java
@@ -176,8 +176,11 @@
     public @ResponseBody
     AjaxResult showList(ShoppingGoods shoppingGoods, PaginationVO pageVo) {
         QueryUtil.setQueryLimit(shoppingGoods);
-        pageVo.setOrder("desc");
-        pageVo.setSort("createTime");
+       if(StringUtils.isBlank(pageVo.getSort())){
+           pageVo.setOrder("desc");
+           pageVo.setSort("createTime");
+       }
+
         //2表示查询总部产品
         if (shoppingGoods.getHeadquarters()!=null && 2==shoppingGoods.getHeadquarters()) {
             //仅查询本店产品
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 ed112b3..4e80ff7 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
@@ -48,7 +48,7 @@
      */
     public boolean executeExt2() {
 
-        Date today = DateUtil.stringToDate("2020-11-01",DateUtil.DATE_FORMAT_DD);
+        Date today = DateUtil.stringToDate("2020-11-27",DateUtil.DATE_FORMAT_DD);
         Date now=new Date();
         while (DateUtil.isBeforeDate(now,today)){
             LogUtil.info("日期:"+DateUtil.dateFormatStr(today,DateUtil.DATE_FORMAT_DD));
diff --git a/zq-erp/src/main/java/com/matrix/system/hiveErp/action/DataAnalysisCustomer.java b/zq-erp/src/main/java/com/matrix/system/hiveErp/action/DataAnalysisCustomer.java
index 8c1a271..8b00027 100644
--- a/zq-erp/src/main/java/com/matrix/system/hiveErp/action/DataAnalysisCustomer.java
+++ b/zq-erp/src/main/java/com/matrix/system/hiveErp/action/DataAnalysisCustomer.java
@@ -1,5 +1,6 @@
 package com.matrix.system.hiveErp.action;
 
+import com.matrix.component.redis.RedisClient;
 import com.matrix.core.constance.MatrixConstance;
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.core.tools.WebUtil;
@@ -34,7 +35,6 @@
 
     @Autowired
     DataAnalysisCustomerServiceImpl dataAnalysisCustomerService;
-
 
     /**
      * 会员人头数统计
diff --git a/zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpShoppingGoodsController.java b/zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpShoppingGoodsController.java
index e0e3f79..6e78a24 100644
--- a/zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpShoppingGoodsController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpShoppingGoodsController.java
@@ -4,6 +4,7 @@
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.core.pojo.PaginationVO;
 import com.matrix.core.tools.DateUtil;
+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.ExcelVersion;
@@ -66,8 +67,10 @@
     @RequestMapping(value = "/showList")
     public @ResponseBody
     AjaxResult showList(ShoppingGoods shoppingGoods, PaginationVO pageVo) {
-        pageVo.setOrder("desc");
-        pageVo.setSort("createTime");
+        if(StringUtils.isBlank(pageVo.getSort())){
+            pageVo.setOrder("desc");
+            pageVo.setSort("createTime");
+        }
         QueryUtil.setQueryLimitCom(shoppingGoods);
         shoppingGoods.setIsDel(ShoppingGoods.NORMAL);
         List<ShoppingGoods> dataList = shoppingGoodsService.findInPage(shoppingGoods, pageVo);
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 3549c4a..058af77 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
@@ -95,7 +95,9 @@
 
             if(msgResult.containsKey("error")){
                 //错误消息处理
-                LogUtil.error("模板消息发送失败:"+msgResult.get("error"));
+
+
+                LogUtil.error("模板消息发送内容:"+msgResult.get("error"));
                 return;
             }else{
                 //正常返回消息
@@ -105,6 +107,7 @@
                 String url = "https://api.weixin.qq.com/cgi-bin/message/wxopen/template/uniform_send?access_token=ACCESS_TOKEN".replaceAll("ACCESS_TOKEN", ACCESS_TOKEN);
                 for (Object msg : msgList) {
                     UniformMsgPojo uniformMsgPojo = (UniformMsgPojo) msg;
+                    LogUtil.debug("微信小程序模板消息推送:" + JSONObject.toJSON(uniformMsgPojo).toString());
                     //推送消息到微信
                     JSONObject result = HttpClientUtil.sendPostWithJson(url, JSONObject.toJSON(uniformMsgPojo).toString());
                     //微信返回值
diff --git a/zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/demo/MsgDemo.java b/zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/demo/MsgDemo.java
deleted file mode 100644
index 8c211a2..0000000
--- a/zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/demo/MsgDemo.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package com.matrix.system.wechart.templateMsg.demo;
-
-import com.alibaba.fastjson.JSONObject;
-import com.matrix.component.tools.HttpClientUtil;
-import com.matrix.core.pojo.AjaxResult;
-import com.matrix.system.hive.plugin.util.HttpUtils;
-import com.matrix.system.shopXcx.api.WeChatGzhApiTools;
-import com.matrix.system.shopXcx.bean.ShopAdvertisType;
-import com.matrix.system.wechart.templateMsg.GzhTemplateMessagePojo;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpException;
-import org.apache.commons.httpclient.NameValuePair;
-import org.apache.commons.httpclient.methods.PostMethod;
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.DocumentHelper;
-import org.dom4j.Element;
-import org.springframework.beans.factory.annotation.Value;
-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 javax.swing.text.html.HTML;
-import java.io.IOException;
-@Controller
-@RequestMapping(value = "test")
-public class MsgDemo {
-
-    @Value("${gzh_appid}")
-    String gzhAppId;
-
-    @Value("${gzh_secret}")
-    String gzhSecret;
-
-
-    @RequestMapping("/template")
-    @ResponseBody
-    public AjaxResult template() {
-        GzhTemplateMessagePojo messagePojo=new GzhTemplateMessagePojo();
-        messagePojo.setTouser("o8EB656NQYwhUuKPMhVVwP_wtLJI");
-        messagePojo.setTemplate_id("Mqu9xPYj_JFhXNj7nLJS7LESQUy6Z7FoCOmVO66Oxe8");
-        //messagePojo.setUrl("www.baidu.com");
-       // messagePojo.setMiniprogram(gzhAppId,"/123/234123412");
-        messagePojo.setFirst("尊敬的谭娅:","#453454");
-        messagePojo.setKeyWord("活细胞肩部护理","#453454");
-        messagePojo.setKeyWord("2014年7月21日 18:36","#453454");
-        messagePojo.setRemark("您的护理课程剩余3次。","#453454");
-
-        String ACCESS_TOKEN=WeChatGzhApiTools.getAccessToken(gzhAppId,gzhSecret);
-        String url="https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+ACCESS_TOKEN;
-
-        System.out.println(JSONObject.toJSON(messagePojo).toString());
-        JSONObject result= HttpClientUtil.sendPostWithJson(url,JSONObject.toJSON(messagePojo).toString());
-        System.out.println(result.toString());
-        return AjaxResult.buildSuccessInstance("1");
-
-
-    }
-
-
-    @RequestMapping("/getUserList")
-    @ResponseBody
-    public AjaxResult getUserList() {
-
-        String ACCESS_TOKEN=WeChatGzhApiTools.getAccessToken(gzhAppId,gzhSecret);
-
-        String url="https://api.weixin.qq.com/cgi-bin/user/get?access_token=ACCESS_TOKEN&next_openid=NEXT_OPENID".replaceAll("ACCESS_TOKEN",ACCESS_TOKEN);
-
-
-        String result= HttpUtils.sendGet(url,"");
-        System.out.println(result.toString());
-        return AjaxResult.buildSuccessInstance("1");
-
-
-    }
-
-}
diff --git a/zq-erp/src/main/resources/config/lhx/application.properties b/zq-erp/src/main/resources/config/lhx/application.properties
index 681f70d..44b584e 100644
--- a/zq-erp/src/main/resources/config/lhx/application.properties
+++ b/zq-erp/src/main/resources/config/lhx/application.properties
@@ -41,7 +41,6 @@
 rabbitmq.port=5672
 rabbitmq.username=ct_rabbit
 rabbitmq.password=123456
-useRabbit=false
 
 server.session.timeout=120
 
diff --git a/zq-erp/src/main/resources/config/prd/application.properties b/zq-erp/src/main/resources/config/prd/application.properties
index 3d5e977..dc05d4e 100644
--- a/zq-erp/src/main/resources/config/prd/application.properties
+++ b/zq-erp/src/main/resources/config/prd/application.properties
@@ -1,9 +1,14 @@
 evn=prd
 server.port=8080
 
-spring.datasource.username=hive_data
-spring.datasource.password=hive_4321#&@
-spring.datasource.url=jdbc:mysql://119.3.52.84:3306/hive_prd?useUnicode=true&characterEncoding=utf8mb4&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
+
+#spring.datasource.username=hive_data
+#spring.datasource.password=hive_4321#&@
+#spring.datasource.url=jdbc:mysql://119.3.52.84:3306/hive_prd?useUnicode=true&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
+
 
 
 
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/products/shoppinggoods-list.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/products/shoppinggoods-list.html
index d5ee48e..15facb0 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/products/shoppinggoods-list.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/products/shoppinggoods-list.html
@@ -107,18 +107,18 @@
             <tr>
                 <th data-checkbox="true"></th>
                 <th data-formatter="MGrid.indexfn" data-align="center" data-width="30px">序号</th>
-                <th data-field="code">商品编号</th>
-                <th data-field="name">商品名称</th>
-                <th data-field="sealPice">售价/(本金)</th>
+                <th data-field="code"  data-sortable="true">商品编号</th>
+                <th data-field="name"  data-sortable="true">商品名称</th>
+                <th data-field="sealPice" data-sortable="true">售价/(本金)</th>
                 <th data-field="referencePice">参考价/(赠送金额)</th>
-                <th data-field="realSealCount">真实销量</th>
-                <th data-field="staus">状态</th>
-                <th data-field="isPresent">是否赠送</th>
-                <th data-field="goodType">类型</th>
+                <th data-field="realSealCount" data-sortable="true">真实销量</th>
+                <th data-field="staus" data-sortable="true">状态</th>
+                <th data-field="isPresent" data-sortable="true">是否赠送</th>
+                <th data-field="goodType" data-sortable="true" >类型</th>
                 <th data-field="cateName">分类</th>
                 <th data-field="isCourse" data-formatter="getCourse">套餐卡</th>
-                <th  data-field="shopName">所属门店</th>
-                <th data-field="createTime" data-formatter="MGrid.getTime">创建时间</th>
+                <th  data-field="shopName" >所属门店</th>
+                <th data-field="createTime" data-sortable="true" data-formatter="MGrid.getTime">创建时间</th>
             </tr>
             </thead>
         </table>
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/products/shoppinggoods-md-list.html b/zq-erp/src/main/resources/templates/views/admin/hive/products/shoppinggoods-md-list.html
index e3e4b38..8608af7 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/products/shoppinggoods-md-list.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/products/shoppinggoods-md-list.html
@@ -105,16 +105,16 @@
             <tr>
                 <th data-checkbox="true"></th>
                 <th data-formatter="MGrid.indexfn" data-align="center" data-width="30px">序号</th>
-                <th data-field="code">商品编号</th>
-                <th data-field="name">商品名称</th>
-                <th data-field="sealPice">售价/(本金)</th>
+                <th data-field="code"  data-sortable="true">商品编号</th>
+                <th data-field="name" data-sortable="true">商品名称</th>
+                <th data-field="sealPice" data-sortable="true">售价/(本金)</th>
                 <th data-field="giftMoney">赠送金额</th>
-                <th data-field="realSealCount">真实销量</th>
-                <th data-field="staus">状态</th>
+                <th data-field="realSealCount" data-sortable="true">真实销量</th>
+                <th data-field="staus" data-sortable="true">状态</th>
                 <th data-field="isPresent">是否赠送</th>
-                <th data-field="goodType">类型</th>
+                <th data-field="goodType" data-sortable="true">类型</th>
                 <th data-field="cateName">分类</th>
-                <th data-field="createTime" data-formatter="MGrid.getTime">创建时间</th>
+                <th data-field="createTime"  data-sortable="true" data-formatter="MGrid.getTime">创建时间</th>
             </tr>
             </thead>
         </table>
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/products/shoppinggoods-zb-list.html b/zq-erp/src/main/resources/templates/views/admin/hive/products/shoppinggoods-zb-list.html
index 0e1ef0e..b2d8c30 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/products/shoppinggoods-zb-list.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/products/shoppinggoods-zb-list.html
@@ -101,16 +101,16 @@
             <tr>
                 <th data-checkbox="true"></th>
                 <th data-formatter="MGrid.indexfn" data-align="center" data-width="30px">序号</th>
-                <th data-field="code">商品编号</th>
-                <th data-field="name">商品名称</th>
-                <th data-field="sealPice">售价/(本金)</th>
+                <th data-field="code"  data-sortable="true">商品编号</th>
+                <th data-field="name" data-sortable="true">商品名称</th>
+                <th data-field="sealPice" data-sortable="true">售价/(本金)</th>
                 <th data-field="giftMoney">赠送金额</th>
-                <th data-field="realSealCount">真实销量</th>
-                <th data-field="staus">状态</th>
+                <th data-field="realSealCount" data-sortable="true">真实销量</th>
+                <th data-field="staus" data-sortable="true">状态</th>
                 <th data-field="isPresent">是否赠送</th>
-                <th data-field="goodType">类型</th>
-                <th data-field="cateName">分类</th>
-                <th data-field="createTime" data-formatter="MGrid.getTime">创建时间</th>
+                <th data-field="goodType" data-sortable="true">类型</th>
+                <th data-field="cateName" >分类</th>
+                <th data-field="createTime"  data-sortable="true" data-formatter="MGrid.getTime">创建时间</th>
             </tr>
             </thead>
         </table>
diff --git a/zq-xcx/project.config.json b/zq-xcx/project.config.json
index 6c43c36..ca6dfcb 100644
--- a/zq-xcx/project.config.json
+++ b/zq-xcx/project.config.json
@@ -28,16 +28,14 @@
       "disablePlugins": [],
       "outputPath": ""
     },
-    "enableEngineNative": false,
-    "bundle": false,
     "useIsolateContext": true,
     "useCompilerModule": true,
     "userConfirmedUseCompilerModuleSwitch": false,
     "userConfirmedBundleSwitch": false,
     "packNpmManually": false,
     "packNpmRelationList": [],
-    "minifyWXSS": true,
-    "useApiHostProcess": false
+    "enableEngineNative": false,
+    "minifyWXSS": true
   },
   "compileType": "miniprogram",
   "libVersion": "1.9.98",

--
Gitblit v1.9.1