1
0
Переглянути джерело

Merge branch 'master' of http://git.ds-bay.com/project/kmall-pt

csk 5 роки тому
батько
коміт
da67bf717a
100 змінених файлів з 6102 додано та 313 видалено
  1. 0 1
      README.md
  2. 10 0
      kmall-admin/src/main/java/com/kmall/admin/controller/AdController.java
  3. 13 1
      kmall-admin/src/main/java/com/kmall/admin/controller/BrandController.java
  4. 18 0
      kmall-admin/src/main/java/com/kmall/admin/controller/CategoryController.java
  5. 11 0
      kmall-admin/src/main/java/com/kmall/admin/controller/FreightController.java
  6. 2 2
      kmall-admin/src/main/java/com/kmall/admin/controller/GoodsController.java
  7. 19 2
      kmall-admin/src/main/java/com/kmall/admin/controller/OrderController.java
  8. 2 0
      kmall-admin/src/main/java/com/kmall/admin/controller/ProductController.java
  9. 30 5
      kmall-admin/src/main/java/com/kmall/admin/controller/ProductStoreRelaController.java
  10. 69 19
      kmall-admin/src/main/java/com/kmall/admin/controller/StoreController.java
  11. 35 0
      kmall-admin/src/main/java/com/kmall/admin/controller/SysOssController.java
  12. 4 1
      kmall-admin/src/main/java/com/kmall/admin/controller/ThirdMerchantBizController.java
  13. 95 0
      kmall-admin/src/main/java/com/kmall/admin/controller/faceid/CheckFaceLivenessRecogController.java
  14. 2 3
      kmall-admin/src/main/java/com/kmall/admin/controller/mk/dist/MkDistHierController.java
  15. 35 0
      kmall-admin/src/main/java/com/kmall/admin/controller/test.java
  16. 1 0
      kmall-admin/src/main/java/com/kmall/admin/dao/BrandDao.java
  17. 22 0
      kmall-admin/src/main/java/com/kmall/admin/dao/FaceLivenessRecognitionReturnDataDao.java
  18. 2 0
      kmall-admin/src/main/java/com/kmall/admin/dao/FreightDao.java
  19. 1 0
      kmall-admin/src/main/java/com/kmall/admin/dao/FreightItemDao.java
  20. 2 0
      kmall-admin/src/main/java/com/kmall/admin/dao/GoodsDao.java
  21. 10 0
      kmall-admin/src/main/java/com/kmall/admin/dao/OrderDao.java
  22. 4 1
      kmall-admin/src/main/java/com/kmall/admin/dao/StoreDao.java
  23. 3 0
      kmall-admin/src/main/java/com/kmall/admin/dao/ThirdMerchantBizDao.java
  24. 30 0
      kmall-admin/src/main/java/com/kmall/admin/dto/CateStoreDto.java
  25. 30 0
      kmall-admin/src/main/java/com/kmall/admin/dto/CopyAdDto.java
  26. 39 0
      kmall-admin/src/main/java/com/kmall/admin/dto/CopyBrandDto.java
  27. 39 0
      kmall-admin/src/main/java/com/kmall/admin/dto/CopyCategoryDto.java
  28. 30 0
      kmall-admin/src/main/java/com/kmall/admin/dto/CopyFreightDto.java
  29. 54 0
      kmall-admin/src/main/java/com/kmall/admin/dto/FaceByOrderDto.java
  30. 1160 0
      kmall-admin/src/main/java/com/kmall/admin/dto/OrderRecognitionDto.java
  31. 73 0
      kmall-admin/src/main/java/com/kmall/admin/dto/SendTempDto.java
  32. 113 0
      kmall-admin/src/main/java/com/kmall/admin/dto/StoreDto.java
  33. 122 0
      kmall-admin/src/main/java/com/kmall/admin/dto/StoreGoodsDto.java
  34. 21 0
      kmall-admin/src/main/java/com/kmall/admin/dto/StoreIdDto.java
  35. 83 0
      kmall-admin/src/main/java/com/kmall/admin/dto/SysUserDto.java
  36. 20 0
      kmall-admin/src/main/java/com/kmall/admin/entity/AdEntity.java
  37. 278 0
      kmall-admin/src/main/java/com/kmall/admin/entity/FaceLivenessRecognitionReturnDataEntity.java
  38. 11 0
      kmall-admin/src/main/java/com/kmall/admin/entity/OrderEntity.java
  39. 20 0
      kmall-admin/src/main/java/com/kmall/admin/entity/ProductStoreRelaEntity.java
  40. 11 1
      kmall-admin/src/main/java/com/kmall/admin/entity/ThirdMerchantBizEntity.java
  41. 11 0
      kmall-admin/src/main/java/com/kmall/admin/entity/UserEntity.java
  42. 735 0
      kmall-admin/src/main/java/com/kmall/admin/entity/WxOrderEntity.java
  43. 30 0
      kmall-admin/src/main/java/com/kmall/admin/entity/mk/store/StoreTopicEntity.java
  44. 33 0
      kmall-admin/src/main/java/com/kmall/admin/fromcomm/controller/SysUserController.java
  45. 111 0
      kmall-admin/src/main/java/com/kmall/admin/fromcomm/controller/UploadStoreIdController.java
  46. 3 0
      kmall-admin/src/main/java/com/kmall/admin/fromcomm/dao/SysRoleDao.java
  47. 2 0
      kmall-admin/src/main/java/com/kmall/admin/fromcomm/dao/SysSmsLogDao.java
  48. 2 0
      kmall-admin/src/main/java/com/kmall/admin/fromcomm/service/SysRoleService.java
  49. 9 0
      kmall-admin/src/main/java/com/kmall/admin/fromcomm/service/SysUserService.java
  50. 5 0
      kmall-admin/src/main/java/com/kmall/admin/fromcomm/service/impl/SysRoleServiceImpl.java
  51. 5 0
      kmall-admin/src/main/java/com/kmall/admin/fromcomm/service/impl/SysSmsLogServiceImpl.java
  52. 183 4
      kmall-admin/src/main/java/com/kmall/admin/fromcomm/service/impl/SysUserServiceImpl.java
  53. 3 0
      kmall-admin/src/main/java/com/kmall/admin/service/AdService.java
  54. 7 0
      kmall-admin/src/main/java/com/kmall/admin/service/BrandService.java
  55. 6 0
      kmall-admin/src/main/java/com/kmall/admin/service/CategoryService.java
  56. 3 0
      kmall-admin/src/main/java/com/kmall/admin/service/FreightService.java
  57. 12 0
      kmall-admin/src/main/java/com/kmall/admin/service/OrderService.java
  58. 9 0
      kmall-admin/src/main/java/com/kmall/admin/service/ProductStoreRelaService.java
  59. 14 0
      kmall-admin/src/main/java/com/kmall/admin/service/StoreService.java
  60. 7 0
      kmall-admin/src/main/java/com/kmall/admin/service/UserService.java
  61. 19 0
      kmall-admin/src/main/java/com/kmall/admin/service/faceid/FaceIdService.java
  62. 40 0
      kmall-admin/src/main/java/com/kmall/admin/service/impl/AdServiceImpl.java
  63. 111 7
      kmall-admin/src/main/java/com/kmall/admin/service/impl/BrandServiceImpl.java
  64. 148 1
      kmall-admin/src/main/java/com/kmall/admin/service/impl/CategoryServiceImpl.java
  65. 64 16
      kmall-admin/src/main/java/com/kmall/admin/service/impl/FreightServiceImpl.java
  66. 2 2
      kmall-admin/src/main/java/com/kmall/admin/service/impl/GoodsServiceImpl.java
  67. 57 1
      kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderServiceImpl.java
  68. 303 17
      kmall-admin/src/main/java/com/kmall/admin/service/impl/ProductStoreRelaServiceImpl.java
  69. 155 5
      kmall-admin/src/main/java/com/kmall/admin/service/impl/StoreServiceImpl.java
  70. 46 3
      kmall-admin/src/main/java/com/kmall/admin/service/impl/UserServiceImpl.java
  71. 246 0
      kmall-admin/src/main/java/com/kmall/admin/service/impl/faceid/FaceIdServiceImpl.java
  72. 18 0
      kmall-admin/src/main/resources/XmlTemplate/CateStoreDtoList.xml
  73. 27 0
      kmall-admin/src/main/resources/XmlTemplate/StoreDtoList.xml
  74. 27 0
      kmall-admin/src/main/resources/XmlTemplate/StoreGoodsDtoList.xml
  75. 17 0
      kmall-admin/src/main/resources/XmlTemplate/StoreIdDtoList.xml
  76. 24 0
      kmall-admin/src/main/resources/XmlTemplate/SysUserDtoList.xml
  77. 47 47
      kmall-admin/src/main/resources/conf/fastdfs.properties
  78. 1 1
      kmall-admin/src/main/resources/logback.xml
  79. 4 2
      kmall-admin/src/main/resources/mybatis/mapper/AdDao.xml
  80. 2 2
      kmall-admin/src/main/resources/mybatis/mapper/AddressDao.xml
  81. 29 2
      kmall-admin/src/main/resources/mybatis/mapper/BrandDao.xml
  82. 17 17
      kmall-admin/src/main/resources/mybatis/mapper/CartDao.xml
  83. 7 7
      kmall-admin/src/main/resources/mybatis/mapper/CategoryDao.xml
  84. 212 0
      kmall-admin/src/main/resources/mybatis/mapper/FaceLivenessRecognitionReturnDataDao.xml
  85. 28 8
      kmall-admin/src/main/resources/mybatis/mapper/FreightDao.xml
  86. 21 8
      kmall-admin/src/main/resources/mybatis/mapper/FreightItemDao.xml
  87. 60 8
      kmall-admin/src/main/resources/mybatis/mapper/GoodsDao.xml
  88. 337 53
      kmall-admin/src/main/resources/mybatis/mapper/OrderDao.xml
  89. 17 6
      kmall-admin/src/main/resources/mybatis/mapper/ProductStoreRelaDao.xml
  90. 46 6
      kmall-admin/src/main/resources/mybatis/mapper/StoreDao.xml
  91. 23 19
      kmall-admin/src/main/resources/mybatis/mapper/SysRoleDao.xml
  92. 26 1
      kmall-admin/src/main/resources/mybatis/mapper/SysSmsLogDao.xml
  93. 2 2
      kmall-admin/src/main/resources/mybatis/mapper/TemplateConfDao.xml
  94. 33 8
      kmall-admin/src/main/resources/mybatis/mapper/ThirdMerchantBizDao.xml
  95. 2 2
      kmall-admin/src/main/resources/mybatis/mapper/UserCouponDao.xml
  96. 12 8
      kmall-admin/src/main/resources/mybatis/mapper/UserDao.xml
  97. 17 10
      kmall-admin/src/main/resources/mybatis/mapper/mk/store/StoreTopicDao.xml
  98. 79 0
      kmall-admin/src/main/webapp/WEB-INF/page/faceid/type10ordernopay.html
  99. 26 2
      kmall-admin/src/main/webapp/WEB-INF/page/shop/ad.html
  100. 36 2
      kmall-admin/src/main/webapp/WEB-INF/page/shop/brand.html

+ 0 - 1
README.md

@@ -65,7 +65,6 @@ kmall-pt
 
 * 生成环境打包 
     * mvn clean package
-    * mvn package -P prod
     
 ## 打印机设置
 * 360急速浏览器

+ 10 - 0
kmall-admin/src/main/java/com/kmall/admin/controller/AdController.java

@@ -1,5 +1,6 @@
 package com.kmall.admin.controller;
 
+import com.kmall.admin.dto.CopyAdDto;
 import com.kmall.admin.entity.AdEntity;
 import com.kmall.admin.service.AdService;
 import com.kmall.admin.utils.ParamUtils;
@@ -103,4 +104,13 @@ public class AdController {
 
         return R.ok().put("list", list);
     }
+    /**
+     * 保存
+     */
+    @RequestMapping("/saveCopyAd")
+//    @RequiresPermissions("ad:saveCopyAd")
+    public R saveCopyAd(@RequestBody CopyAdDto copyAdDto) {
+        adService.saveCopyAd(copyAdDto);
+        return R.ok();
+    }
 }

+ 13 - 1
kmall-admin/src/main/java/com/kmall/admin/controller/BrandController.java

@@ -1,6 +1,8 @@
 package com.kmall.admin.controller;
 
 import com.google.common.collect.ImmutableBiMap;
+import com.kmall.admin.dto.CopyBrandDto;
+import com.kmall.admin.dto.CopyCategoryDto;
 import com.kmall.admin.entity.BrandEntity;
 import com.kmall.admin.service.BrandService;
 import com.kmall.admin.utils.ParamUtils;
@@ -31,8 +33,8 @@ public class BrandController {
     @RequestMapping("/list")
     @RequiresPermissions("brand:list")
     public R list(@RequestParam Map<String, Object> params) {
-
         ParamUtils.setQueryPowerByRoleType(params, "storeId", "merchSn", "thirdPartyMerchCode");
+        ParamUtils.setName(params, "name");
 
         //查询列表数据
         Query query = new Query(params);
@@ -123,4 +125,14 @@ public class BrandController {
 
         return R.ok().put("list", list);
     }
+
+    /**
+     * 保存
+     */
+    @RequestMapping("/saveCopyBrand")
+//    @RequiresPermissions("brand:saveCopyBrand")
+    public R saveCopyBrand(@RequestBody CopyBrandDto copyBrandDto) {
+        brandService.saveCopyCategory(copyBrandDto);
+        return R.ok();
+    }
 }

+ 18 - 0
kmall-admin/src/main/java/com/kmall/admin/controller/CategoryController.java

@@ -1,12 +1,18 @@
 package com.kmall.admin.controller;
 
+import com.kmall.admin.dto.CopyCategoryDto;
+import com.kmall.admin.dto.StoreDto;
+import com.kmall.admin.dto.StoreIdDto;
 import com.kmall.admin.entity.CategoryEntity;
 import com.kmall.admin.service.CategoryService;
 import com.kmall.admin.utils.ParamUtils;
+import com.kmall.common.constant.JxlsXmlTemplateName;
 import com.kmall.common.utils.*;
+import com.kmall.common.utils.excel.ExcelUtil;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -25,6 +31,8 @@ import java.util.Map;
 public class CategoryController {
     @Autowired
     private CategoryService categoryService;
+    @Autowired
+    private ExcelUtil excelUtil;
 
     /**
      * 查看列表
@@ -183,4 +191,14 @@ public class CategoryController {
         List<CategoryEntity> list = categoryService.queryList(map);
         return R.ok().put("list", list);
     }
+
+    /**
+     * 保存
+     */
+    @RequestMapping("/saveCopyCategory")
+//    @RequiresPermissions("category:saveCopyCategory")
+    public R saveCopyCategory(@RequestBody CopyCategoryDto copyCategoryDto) {
+        categoryService.saveCopyCategory(copyCategoryDto);
+        return R.ok();
+    }
 }

+ 11 - 0
kmall-admin/src/main/java/com/kmall/admin/controller/FreightController.java

@@ -4,6 +4,7 @@ import java.util.List;
 import java.util.Map;
 
 import com.google.common.collect.ImmutableBiMap;
+import com.kmall.admin.dto.CopyFreightDto;
 import com.kmall.admin.entity.FreightEntity;
 import com.kmall.admin.entity.FreightItemEntity;
 import com.kmall.admin.service.FreightService;
@@ -141,4 +142,14 @@ public class FreightController {
 
         return R.ok().put("list", list);
     }
+
+    /**
+     * 保存
+     */
+    @RequestMapping("/saveCopyFreight")
+//    @RequiresPermissions("freight:saveCopyFreight")
+    public R saveCopyFreight(@RequestBody CopyFreightDto copyFreightDto) {
+        freightService.saveCopyFreight(copyFreightDto);
+        return R.ok();
+    }
 }

+ 2 - 2
kmall-admin/src/main/java/com/kmall/admin/controller/GoodsController.java

@@ -227,7 +227,7 @@ public class GoodsController {
             e.printStackTrace();
             return R.error("导入失败!");
         }
-        goodsService.uploadExcel(goodsDtoList,1);
+        goodsService.uploadExcel(goodsDtoList,Integer.parseInt(Dict.exportDataType.item_1.getItem()));
         //上传文件
         return R.ok();
     }
@@ -248,7 +248,7 @@ public class GoodsController {
             e.printStackTrace();
             return R.error("导入失败!");
         }
-        goodsService.uploadExcel(generalGoodsDtoList,2);
+        goodsService.uploadExcel(generalGoodsDtoList,Integer.parseInt(Dict.exportDataType.item_2.getItem()));
         //上传文件
         return R.ok();
     }

+ 19 - 2
kmall-admin/src/main/java/com/kmall/admin/controller/OrderController.java

@@ -635,7 +635,7 @@ public class OrderController {
             List<OrderWXPayRecordEntity> orderWXPayRecordEntitys =
                     orderWXPayRecordService.getRecordsByOutTradeNo(orderEntity.getOrderSn());
             for (OrderWXPayRecordEntity orderWXPayRecordTemp : orderWXPayRecordEntitys) {
-                //查询出来的记录不等于当前记录,并且未撤销,未关闭时,撤销订单
+                //查询出来的记录排除当前已支付成功的记录,对其他记录交易状态为未撤销,未关闭的订单,调用撤销订单
                 if (orderWXPayRecordTemp.getId() != orderWXPayRecordCurrent.getId() &&
                     (!WechatUtil.WXTradeState.REVOKED.getCode().equals(orderWXPayRecordTemp.getTradeState()) ||
                      !WechatUtil.WXTradeState.CLOSED.getCode().equals(orderWXPayRecordTemp.getTradeState()))) {
@@ -699,7 +699,7 @@ public class OrderController {
 
         ExcelExport ee = new ExcelExport("订单信息");
 
-        String[] header = new String[]{"订单编号","商户订单编号", "所属门店", "供应商", "订单状态", "SKU", "商品名称", "数量", "销售价", "实际支付金额", "保税模式", "快递公司名称", "快递单编号", "海关清单编号", "收货人姓名", "收件人手机", "收件人省份", "收件人城市", "收件人区县", "收件人地址", "下单时间", "支付流水号","身份证号"
+        String[] header = new String[]{"订单编号","商户订单编号", "所属门店", "供应商", "供应商第三方商户代码", "订单状态", "SKU", "商品名称", "数量", "销售价", "实际支付金额", "保税模式", "快递公司名称", "快递单编号", "海关清单编号", "收货人姓名", "收件人手机", "收件人省份", "收件人城市", "收件人区县", "收件人地址", "下单时间", "支付流水号","身份证号"
                 ,"原产国","规格型号","品牌","单位","毛重(kg)","净重"};
 
         List<Map<String, Object>> list = new ArrayList<>();
@@ -713,6 +713,7 @@ public class OrderController {
                 map.put("MerchOrderSn", orderEntity.getMerchOrderSn());
                 map.put("StoreName", orderEntity.getStoreName());
                 map.put("SupplierThirdPartyMerchName", orderEntity.getSupplierThirdPartyMerchName());
+                map.put("SupplierThirdPartyMerchCode", orderEntity.getSupplierThirdPartyMerchCode());
                 map.put("OrderStatus", StringUtils.isEmpty(orderStatus.toString())? "":Dict.orderStatus.valueOf("item_"+ orderStatus).getItemName());
                 map.put("SKU", orderEntity.getSku());
                 map.put("GoodsName", orderEntity.getGoodsName());
@@ -803,4 +804,20 @@ public class OrderController {
         //上传文件
         return R.ok();
     }
+
+    /**
+     * 获取ccnet需要重发的订单数据
+     */
+    @RequestMapping("/wxOrderResendQueryAllList")
+    public R wxOrderResendQueryAllList(@RequestParam Map<String, Object> params) {
+        ParamUtils.setQueryPowerByRoleType(params, "storeId", "merchSn", "thirdPartyMerchCode");
+        //查询列表数据
+        Query query = new Query(params);
+
+        List<WxOrderEntity> orderList = orderService.wxOrderResendQueryAllList(query);
+
+        PageUtils pageUtil = new PageUtils(orderList, orderList.size(), query.getLimit(), query.getPage());
+
+        return R.ok().put("page", pageUtil);
+    }
 }

+ 2 - 0
kmall-admin/src/main/java/com/kmall/admin/controller/ProductController.java

@@ -3,6 +3,7 @@ package com.kmall.admin.controller;
 import com.kmall.admin.entity.ProductEntity;
 import com.kmall.admin.service.GoodsSpecificationService;
 import com.kmall.admin.service.ProductService;
+import com.kmall.admin.utils.ParamUtils;
 import com.kmall.common.utils.PageUtils;
 import com.kmall.common.utils.Query;
 import com.kmall.common.utils.R;
@@ -35,6 +36,7 @@ public class ProductController {
     @RequestMapping("/list")
     @RequiresPermissions("product:list")
     public R list(@RequestParam Map<String, Object> params) {
+        ParamUtils.setName(params, "goodsName");
         //查询列表数据
         Query query = new Query(params);
 

+ 30 - 5
kmall-admin/src/main/java/com/kmall/admin/controller/ProductStoreRelaController.java

@@ -1,17 +1,16 @@
 package com.kmall.admin.controller;
 
 import com.alibaba.fastjson.JSON;
+import com.kmall.admin.dto.StoreGoodsDto;
 import com.kmall.admin.entity.ProductStoreRelaEntity;
-import com.kmall.admin.entity.StoreEntity;
-import com.kmall.admin.entity.ThirdMerchantBizEntity;
 import com.kmall.admin.fromcomm.entity.SysUserEntity;
 import com.kmall.admin.service.ProductStoreRelaService;
-import com.kmall.admin.service.StoreService;
-import com.kmall.admin.service.ThirdMerchantBizService;
 import com.kmall.admin.utils.ParamUtils;
 import com.kmall.admin.utils.ShiroUtils;
 import com.kmall.common.constant.Dict;
+import com.kmall.common.constant.JxlsXmlTemplateName;
 import com.kmall.common.utils.*;
+import com.kmall.common.utils.excel.ExcelUtil;
 import com.kmall.common.utils.file.FileUploadUtil;
 import com.kmall.common.utils.wechat.AccessToken;
 import com.kmall.manager.manager.pay.wxpay.WxPayPropertiesBuilder;
@@ -20,7 +19,9 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -38,7 +39,7 @@ public class ProductStoreRelaController {
     @Autowired
     private ProductStoreRelaService productStoreRelaService;
     @Autowired
-    private StoreService storeService;
+    private ExcelUtil excelUtil;
 
     /**
      * 查看列表
@@ -258,4 +259,28 @@ public class ProductStoreRelaController {
         String url = FileUploadUtil.getUploadUrl(mapToXml, token, id);
         return R.ok().put("url", url);
     }
+
+    /**
+     * 上传文件
+     */
+    @RequestMapping("/productStoreRelaUpload")
+    public R storeUpload(@RequestParam("file") MultipartFile file) {
+        List<StoreGoodsDto> StoreGoodsDtoList = new ArrayList<>();//信息
+        try {
+            StoreGoodsDto storeGoodsDto = new StoreGoodsDto();
+            Map<String, Object> beans = new HashMap<String, Object>();
+            beans.put("StoreGoodsDto", storeGoodsDto);
+            beans.put("StoreGoodsDtoList", StoreGoodsDtoList);
+            if (file.isEmpty()) {
+                return R.error("文件不能为空!");
+            }
+            excelUtil.readExcel(JxlsXmlTemplateName.STORE_GOODS_DTO_LIST, beans, file.getInputStream());
+        } catch (Exception e) {
+            e.printStackTrace();
+            return R.error("导入失败!");
+        }
+        productStoreRelaService.uploadExcel(StoreGoodsDtoList);
+        //上传文件
+        return R.ok("导入成功!");
+    }
 }

+ 69 - 19
kmall-admin/src/main/java/com/kmall/admin/controller/StoreController.java

@@ -1,42 +1,34 @@
 package com.kmall.admin.controller;
 
 import com.google.common.collect.ImmutableBiMap;
+import com.kmall.admin.dto.StoreDto;
 import com.kmall.admin.entity.StoreEntity;
 import com.kmall.admin.service.StoreService;
 import com.kmall.admin.utils.ParamUtils;
 import com.kmall.admin.utils.ShiroUtils;
+import com.kmall.common.constant.Dict;
+import com.kmall.common.constant.JxlsXmlTemplateName;
+import com.kmall.common.utils.excel.ExcelExport;
+import com.kmall.common.utils.excel.ExcelUtil;
 import com.kmall.common.utils.file.FileUploadUtil;
 import com.kmall.manager.manager.pay.wxpay.WxPayPropertiesBuilder;
 import com.kmall.admin.fromcomm.entity.SysUserEntity;
-import com.kmall.common.fileserver.util.FileManager;
 import com.kmall.common.utils.*;
 import com.kmall.common.utils.wechat.AccessToken;
 import com.kmall.manager.manager.wechat.wxtemplate.WxTemplateUtil;
-import org.apache.commons.fileupload.FileItem;
-import org.apache.commons.fileupload.disk.DiskFileItem;
-import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.*;
 
-import java.io.*;
-import java.nio.file.Files;
-import java.util.List;
-import java.util.Map;
-
-import java.util.HashMap;
-
-import org.apache.http.HttpResponse;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClientBuilder;
-import org.apache.http.protocol.HTTP;
+import java.util.*;
 
 import com.alibaba.fastjson.JSON;
 import org.springframework.web.multipart.MultipartFile;
-import org.springframework.web.multipart.commons.CommonsMultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
 /**
  * Controller
@@ -50,6 +42,8 @@ import org.springframework.web.multipart.commons.CommonsMultipartFile;
 public class StoreController {
     @Autowired
     private StoreService storeService;
+    @Autowired
+    private ExcelUtil excelUtil;
 
     /**
      * 查看列表
@@ -218,10 +212,66 @@ public class StoreController {
         Map<Object, Object> params = new HashMap<Object, Object>();
         params.put("scene", store.getId());//参数
         params.put("page", "pages/index/index");//页面
-        params.put("width", 430);
+        params.put("width", 90);
         String mapToXml = JSON.toJSONString(params);
 
         String url = FileUploadUtil.getUploadUrl(mapToXml, token, storeId);
         return R.ok().put("url", url);
     }
+
+    /**
+     * 上传文件
+     */
+    @RequestMapping("/storeUpload")
+    public R storeUpload(@RequestParam("file") MultipartFile file) {
+        List<StoreDto> storeDtoList = new ArrayList<>();//信息
+        try {
+            StoreDto storeDto = new StoreDto();
+            Map<String, Object> beans = new HashMap<String, Object>();
+            beans.put("StoreDto", storeDto);
+            beans.put("StoreDtoList", storeDtoList);
+            if (file.isEmpty()) {
+                return R.error("文件不能为空!");
+            }
+            excelUtil.readExcel(JxlsXmlTemplateName.STORE_DTO_LIST, beans, file.getInputStream());
+        } catch (Exception e) {
+            e.printStackTrace();
+            return R.error("导入失败!");
+        }
+        storeService.uploadExcel(storeDtoList);
+        //上传文件
+        return R.ok("导入成功!");
+    }
+
+    /**
+     * 订单导出请求
+     */
+    @RequestMapping(value = "export")
+    public Object export(@RequestParam Map<String, Object> params, HttpServletResponse response, HttpServletRequest request) {
+        ParamUtils.setQueryPowerByRoleType(params, "id", "merchSn", "thirdPartyMerchCode");
+        ParamUtils.setName(params, "storeName");
+        //查询列表数据
+        List<StoreEntity> storeEntityList = storeService.queryExportList(params);
+
+        ExcelExport ee = new ExcelExport("门店id信息");
+
+        String[] header = new String[]{"门店编号", "门店名称", "oms门店编号"};
+
+        List<Map<String, Object>> list = new ArrayList<>();
+        if (storeEntityList != null && storeEntityList.size() != 0) {
+            for (StoreEntity storeEntity : storeEntityList) {
+                LinkedHashMap<String, Object> map = new LinkedHashMap<>();
+
+                map.put("StoreId", storeEntity.getId());
+                map.put("StoreName", storeEntity.getStoreName());
+                map.put("StoreNumber", storeEntity.getStoreNumber());
+                list.add(map);
+            }
+        }
+
+        ee.addSheetByMap("门店id信息", list, header);
+        ee.export(response);
+        return R.ok();
+    }
+
 }

+ 35 - 0
kmall-admin/src/main/java/com/kmall/admin/controller/SysOssController.java

@@ -18,7 +18,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
+import sun.misc.BASE64Encoder;
 
+import java.io.FileInputStream;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -129,7 +131,40 @@ public class SysOssController {
         r.put("link", url);
         return r;
     }
+    /**
+     * 上传视频文件,返回视频文件base64值
+     */
+    @RequestMapping("/uploadAndBase64")
+    @RequiresPermissions("sys:oss:all")
+    public R uploadAndBase64(@RequestParam("file") MultipartFile file) throws Exception {
+        if (file.isEmpty()) {
+            throw new RRException("上传文件不能为空");
+        }
+        Long size = file.getSize();
+        int ImgFileSize=Math.round(size/1024*100)/100;//取得图片文件的大小
+        if(ImgFileSize > 500){
+            throw new RRException("上传视频,不能超过 500k");
+        }
+
+        BASE64Encoder base64Encoder =new BASE64Encoder();
+        String base64EncoderImg = base64Encoder.encode(file.getBytes());
 
+        //上传文件在前端生成临时文件,此处只返回base64码
+        /*//上传文件
+        String url = FileManager.upload(file);
+
+        //保存文件信息
+        SysOssEntity ossEntity = new SysOssEntity();
+        ossEntity.setUrl(url);
+        ossEntity.setCreateDate(new Date());
+        sysOssService.save(ossEntity);*/
+
+        R r = new R();
+//        r.put("url", url);
+//        r.put("link", url);
+        r.put("base64EncoderImg", base64EncoderImg);
+        return r;
+    }
 
     /**
      * 删除

+ 4 - 1
kmall-admin/src/main/java/com/kmall/admin/controller/ThirdMerchantBizController.java

@@ -98,7 +98,10 @@ public class ThirdMerchantBizController {
         builder.put("thirdPartyMerchCode", "第三方商户代码");
         builder.put("thirdPartyMerchName", "第三方商户名称");
         builder.put("isStockShare", "库存是否共享");
-        builder.put("isStoreUserShare", "门店用户是否共享");
+//        builder.put("isStoreUserShare", "门店用户是否共享");
+        builder.put("isMapShow", "商户地图是否显示");
+        builder.put("isSupplierGoods", "供应商模式商品是否启用");
+        builder.put("isFaceCheck", "是否使用人脸核验");
         R r = ValidatorUtil.isEmpty(builder.build(), valideDate);
         if (Integer.valueOf(r.get("code").toString()) != 0) {
             throw new RRException(r.get("msg").toString());

+ 95 - 0
kmall-admin/src/main/java/com/kmall/admin/controller/faceid/CheckFaceLivenessRecogController.java

@@ -0,0 +1,95 @@
+package com.kmall.admin.controller.faceid;
+
+import com.kmall.admin.dto.FaceByOrderDto;
+import com.kmall.admin.dto.OrderRecognitionDto;
+import com.kmall.admin.entity.FaceLivenessRecognitionReturnDataEntity;
+import com.kmall.admin.entity.OrderEntity;
+import com.kmall.admin.service.OrderService;
+import com.kmall.admin.service.faceid.FaceIdService;
+import com.kmall.admin.utils.ParamUtils;
+import com.kmall.common.constant.Dict;
+import com.kmall.common.utils.PageUtils;
+import com.kmall.common.utils.Query;
+import com.kmall.manager.dto.FaceIdRequestDto;
+import com.kmall.common.utils.R;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author huangyq
+ * @version 1.0
+ * 2019-11-27 14:09
+ */
+@RestController
+public class CheckFaceLivenessRecogController {
+    @Autowired
+    private FaceIdService faceIdService;
+    @Autowired
+    private OrderService orderService;
+
+    /**
+     * 人脸识别
+     * @param faceByOrderDto
+     * @return
+     */
+    @RequestMapping("face/checkLivenessRecognition")
+    @RequiresPermissions("face:checkLivenessRecognition")
+    public R checkLivenessRecognition(@RequestBody FaceByOrderDto faceByOrderDto) {
+        String msg = faceIdService.checkLivenessRecognition(faceByOrderDto);
+        return R.ok(msg);
+    }
+
+    /**
+     * 列表
+     */
+    @RequestMapping("face/orderList")
+    public R list(@RequestParam Map<String, Object> params) {
+        ParamUtils.setQueryPowerByRoleType(params, "storeId", "merchSn", "thirdPartyMerchCode");
+        params = ParamUtils.setTimeMap(params);
+        //查询列表数据
+        Query query = new Query(params);
+        query.put("isOnfiilineOrder", Dict.isOnfflineOrder.item_0.getItem());
+        List<OrderRecognitionDto> orderList = orderService.queryOrderListByRecognition(query);
+        int total = orderService.queryOrderListByRecognitionTotal(query);
+
+        PageUtils pageUtil = new PageUtils(orderList, total, query.getLimit(), query.getPage());
+
+        return R.ok().put("page", pageUtil);
+    }
+
+    /**
+     * 发送模板
+     * @param orderId
+     * @return
+     */
+    @RequestMapping("face/sendWxTemp/{orderId}")
+//    @RequiresPermissions("face:sendWxTemp")
+    public R sendWxTemp(@PathVariable("orderId") long orderId) {
+        faceIdService.sendWxTemp(orderId);
+        return R.ok();
+    }
+
+
+    /**
+     * 手动操作人脸核验成功
+     * @param orderId
+     * @return
+     */
+    @RequestMapping("face/manualCheckFace/{orderId}")
+//    @RequiresPermissions("face:sendWxTemp")
+    public R manualCheckFace(@PathVariable("orderId") long orderId) {
+        faceIdService.manualCheckFace(orderId);
+        return R.ok();
+    }
+
+    @RequestMapping("face/get/{faceLivenessId}")
+//    @RequiresPermissions("face:sendWxTemp")
+    public R get(@PathVariable("faceLivenessId") long faceLivenessId) {
+        FaceLivenessRecognitionReturnDataEntity entity = faceIdService.get(faceLivenessId);
+        return R.ok().put("faceLiveness",entity);
+    }
+}

+ 2 - 3
kmall-admin/src/main/java/com/kmall/admin/controller/mk/dist/MkDistHierController.java

@@ -199,9 +199,6 @@ public class MkDistHierController {
 
         MkDistHierEntity mkDistHierEntity = mkDistHierService.queryObjectByDistMap(params);
         if(mkDistHierEntity != null){
-            String lvl = mkDistHierEntity.getHierLvl();
-            Integer hierLvl = Integer.parseInt(lvl);
-
             Map<String, Object> distMap = new HashMap<>();
             distMap.put("distId", distId);
             List<MkDistHierEntity> list = mkDistHierService.queryListByTree(distMap);
@@ -211,6 +208,8 @@ public class MkDistHierController {
             if(list != null && list.size() > 0){
                 pdistId = list.get(0).getPdistId();
             }
+            String lvl = mkDistHierEntity.getHierLvl();
+            Integer hierLvl = Integer.parseInt(lvl);
             for (int i = 0; i< hierLvl-1; i++){
                 Map<String, Object> lvlMap = new HashMap<>();
                 lvlMap.put("distId", pdistId);

+ 35 - 0
kmall-admin/src/main/java/com/kmall/admin/controller/test.java

@@ -0,0 +1,35 @@
+package com.kmall.admin.controller;
+
+import com.kmall.admin.entity.WxOrderEntity;
+import com.kmall.common.utils.ResponseData;
+import com.kmall.common.utils.JacksonUtils;
+import com.kmall.common.utils.OkHttpUtils;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author zengjunlin
+ * @version 1.0
+ * 2019-11-07 14:37
+ */
+public class test {
+    public static void main(String[] args) {
+
+        Map map = new HashMap();
+//        map.put("data", '1');
+//        String requestData = JacksonUtil.toJson(map);
+        String url = "http://192.168.1.68:8888/wx/wxOrderResendQueryAll ";
+        // 同步访问,返回结果字符串
+        String response = OkHttpUtils.post(map, url, "SSL");
+        ResponseData responseData = JacksonUtils.fromStringJson(response, ResponseData.class);
+        System.out.println(response);
+        System.out.println(responseData.getCode());
+        System.out.println(responseData.getMsg());
+        System.out.println(responseData.getData().getRows().size());
+        if(responseData.getCode().equalsIgnoreCase("0")){
+            List<WxOrderEntity> list = responseData.getData().getRows();
+            System.out.println(list);
+        }
+    }
+}

+ 1 - 0
kmall-admin/src/main/java/com/kmall/admin/dao/BrandDao.java

@@ -16,4 +16,5 @@ import java.util.List;
 public interface BrandDao extends BaseDao<BrandEntity> {
     BrandEntity queryObjectByName(@Param("brandName")String brandName,@Param("merchSn")String merchSn);
     List<BrandEntity> queryObjectByStoreId(@Param("storeId") Long storeId);
+    BrandEntity queryBrandByBrandNameAndStoreId(@Param("brandName")String brandName,@Param("storeId") Long storeId);
 }

+ 22 - 0
kmall-admin/src/main/java/com/kmall/admin/dao/FaceLivenessRecognitionReturnDataDao.java

@@ -0,0 +1,22 @@
+package com.kmall.admin.dao;
+
+import com.kmall.admin.entity.FaceLivenessRecognitionReturnDataEntity;
+import com.kmall.manager.dao.BaseDao;
+
+import java.util.Map;
+
+/**
+ * 验证活体人脸核身接口返回的数据记录Dao
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2019-11-27 13:33:46
+ */
+public interface FaceLivenessRecognitionReturnDataDao extends BaseDao<FaceLivenessRecognitionReturnDataEntity> {
+
+    int updateByMerchOrderSn(FaceLivenessRecognitionReturnDataEntity entity);
+
+    FaceLivenessRecognitionReturnDataEntity getFaceByOrderSn(String merchOrderSn);
+
+    int updateOrderByTempNoti(Map fromObject);
+}

+ 2 - 0
kmall-admin/src/main/java/com/kmall/admin/dao/FreightDao.java

@@ -22,4 +22,6 @@ public interface FreightDao extends BaseDao<FreightEntity> {
 
     FreightEntity queryObjectByName(@Param("defaultFreight")String defaultFreight,@Param("merchSn")String merchSn);
     List<FreightEntity> queryObjectByStoreId(@Param("storeId") Long storeId);
+
+    FreightEntity queryFreightByDefaultFreightAndStoreId(@Param("defaultFreight")String defaultFreight, @Param("storeId") Long storeId);
 }

+ 1 - 0
kmall-admin/src/main/java/com/kmall/admin/dao/FreightItemDao.java

@@ -12,4 +12,5 @@ import com.kmall.manager.dao.BaseDao;
  */
 public interface FreightItemDao extends BaseDao<FreightItemEntity> {
     int deleteByFreId(Integer freId);
+    FreightItemEntity queryObjectByFreightId(Integer freightId);
 }

+ 2 - 0
kmall-admin/src/main/java/com/kmall/admin/dao/GoodsDao.java

@@ -26,4 +26,6 @@ public interface GoodsDao extends BaseDao<GoodsEntity> {
     List<GoodsEntity> queryObjectByProdBarcode(@Param("prodBarcode") String prodBarcode, @Param("merchSn") String merchSn,@Param("goodsId")Long id);
 
     GoodsEntity queryObjectByStoreId(@Param("id") Long id, @Param("storeId") Long storeId);
+
+    GoodsEntity queryGoodsByGoodsSnAndStoreId(@Param("goodsSn") String goodsSn, @Param("storeId") Long storeId);
 }

+ 10 - 0
kmall-admin/src/main/java/com/kmall/admin/dao/OrderDao.java

@@ -1,5 +1,7 @@
 package com.kmall.admin.dao;
 
+import com.kmall.admin.dto.OrderRecognitionDto;
+import com.kmall.admin.dto.SendTempDto;
 import com.kmall.admin.entity.OrderEntity;
 import org.apache.ibatis.annotations.Param;
 import com.kmall.manager.dao.BaseDao;
@@ -91,4 +93,12 @@ public interface OrderDao extends BaseDao<OrderEntity> {
     List<OrderEntity> storeTopicOrderList(Map<String, Object> map);
 
     int queryStoreTopicOrderTotal(Map<String, Object> map);
+
+    //查询与人脸识别认证表相关联的保税展示跨境商品订单
+    List<OrderRecognitionDto> queryOrderListByRecognition(Map<String, Object> map);
+
+    //根据订单id查询发送微信模板需要的订单信息
+    SendTempDto queryOrderByRecogTemp(long orderId);
+
+    int queryOrderListByRecognitionTotal(Map<String, Object> map);
 }

+ 4 - 1
kmall-admin/src/main/java/com/kmall/admin/dao/StoreDao.java

@@ -4,6 +4,9 @@ import com.kmall.admin.entity.StoreEntity;
 import org.apache.ibatis.annotations.Param;
 import com.kmall.manager.dao.BaseDao;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * Dao
  *
@@ -15,6 +18,6 @@ public interface StoreDao extends BaseDao<StoreEntity> {
 
     StoreEntity queryObjectByName(@Param("storeName") String storeName);
 
+    List<StoreEntity> queryExportList(Map<String, Object> map);
 //    StoreEntity queryObjectByDistId(@Param("distId") Integer distId);
-
 }

+ 3 - 0
kmall-admin/src/main/java/com/kmall/admin/dao/ThirdMerchantBizDao.java

@@ -15,5 +15,8 @@ import java.util.List;
  */
 public interface ThirdMerchantBizDao extends BaseDao<ThirdMerchantBizEntity> {
     List<ThirdMerchantBizEntity> findByMerchSn(String merchSn);
+
     ThirdMerchantBizEntity getThirdMerchangByCode(@Param("thirdMerchantCode")String thirdMerchantCode);
+
+    ThirdMerchantBizEntity queryThirdDataByStoreId(@Param("storeId")Integer storeId);
 }

+ 30 - 0
kmall-admin/src/main/java/com/kmall/admin/dto/CateStoreDto.java

@@ -0,0 +1,30 @@
+package com.kmall.admin.dto;
+
+import java.io.Serializable;
+
+
+/**
+ * @author Scott
+ * @email
+ */
+public class CateStoreDto implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private String storeId;
+    private String categoryId;
+
+    public String getStoreId() {
+        return storeId;
+    }
+
+    public void setStoreId(String storeId) {
+        this.storeId = storeId;
+    }
+
+    public String getCategoryId() {
+        return categoryId;
+    }
+
+    public void setCategoryId(String categoryId) {
+        this.categoryId = categoryId;
+    }
+}

+ 30 - 0
kmall-admin/src/main/java/com/kmall/admin/dto/CopyAdDto.java

@@ -0,0 +1,30 @@
+package com.kmall.admin.dto;
+
+import java.io.Serializable;
+
+
+/**
+ * @author Scott
+ * @email
+ */
+public class CopyAdDto implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private String storeList;
+    private Integer adId;
+
+    public String getStoreList() {
+        return storeList;
+    }
+
+    public void setStoreList(String storeList) {
+        this.storeList = storeList;
+    }
+
+    public Integer getAdId() {
+        return adId;
+    }
+
+    public void setAdId(Integer adId) {
+        this.adId = adId;
+    }
+}

+ 39 - 0
kmall-admin/src/main/java/com/kmall/admin/dto/CopyBrandDto.java

@@ -0,0 +1,39 @@
+package com.kmall.admin.dto;
+
+import java.io.Serializable;
+
+
+/**
+ * @author Scott
+ * @email
+ */
+public class CopyBrandDto implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private String storeList;
+    private String categoryList;
+    private Integer brandId;
+
+    public String getStoreList() {
+        return storeList;
+    }
+
+    public void setStoreList(String storeList) {
+        this.storeList = storeList;
+    }
+
+    public String getCategoryList() {
+        return categoryList;
+    }
+
+    public void setCategoryList(String categoryList) {
+        this.categoryList = categoryList;
+    }
+
+    public Integer getBrandId() {
+        return brandId;
+    }
+
+    public void setBrandId(Integer brandId) {
+        this.brandId = brandId;
+    }
+}

+ 39 - 0
kmall-admin/src/main/java/com/kmall/admin/dto/CopyCategoryDto.java

@@ -0,0 +1,39 @@
+package com.kmall.admin.dto;
+
+import java.io.Serializable;
+
+
+/**
+ * @author Scott
+ * @email
+ */
+public class CopyCategoryDto implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private String storeList;
+    private String categoryList;
+    private Integer categoryId;
+
+    public String getStoreList() {
+        return storeList;
+    }
+
+    public void setStoreList(String storeList) {
+        this.storeList = storeList;
+    }
+
+    public String getCategoryList() {
+        return categoryList;
+    }
+
+    public void setCategoryList(String categoryList) {
+        this.categoryList = categoryList;
+    }
+
+    public Integer getCategoryId() {
+        return categoryId;
+    }
+
+    public void setCategoryId(Integer categoryId) {
+        this.categoryId = categoryId;
+    }
+}

+ 30 - 0
kmall-admin/src/main/java/com/kmall/admin/dto/CopyFreightDto.java

@@ -0,0 +1,30 @@
+package com.kmall.admin.dto;
+
+import java.io.Serializable;
+
+
+/**
+ * @author Scott
+ * @email
+ */
+public class CopyFreightDto implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private String storeList;
+    private Integer freightId;
+
+    public String getStoreList() {
+        return storeList;
+    }
+
+    public void setStoreList(String storeList) {
+        this.storeList = storeList;
+    }
+
+    public Integer getFreightId() {
+        return freightId;
+    }
+
+    public void setFreightId(Integer freightId) {
+        this.freightId = freightId;
+    }
+}

+ 54 - 0
kmall-admin/src/main/java/com/kmall/admin/dto/FaceByOrderDto.java

@@ -0,0 +1,54 @@
+package com.kmall.admin.dto;
+
+import java.io.Serializable;
+
+/**
+ * 管理后台活体人脸核身接口请求参数
+ * @author huangyq
+ * @version 1.0
+ * 2019-11-27 14:45
+ */
+public class FaceByOrderDto implements Serializable {
+
+    private static final long serialVersionUID = -4707152622304052229L;
+
+    private String idCard;//身份证号
+
+    private String name;//姓名
+
+    private String videoBase64;//视频的BASE64值
+
+    private long orderId;
+
+    public String getIdCard() {
+        return idCard;
+    }
+
+    public void setIdCard(String idCard) {
+        this.idCard = idCard;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getVideoBase64() {
+        return videoBase64;
+    }
+
+    public void setVideoBase64(String videoBase64) {
+        this.videoBase64 = videoBase64;
+    }
+
+    public long getOrderId() {
+        return orderId;
+    }
+
+    public void setOrderId(long orderId) {
+        this.orderId = orderId;
+    }
+}

+ 1160 - 0
kmall-admin/src/main/java/com/kmall/admin/dto/OrderRecognitionDto.java

@@ -0,0 +1,1160 @@
+package com.kmall.admin.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+
+/**
+ * @author huangyq
+ * @date 2019-11-28 10:41:09
+ */
+public class OrderRecognitionDto implements Serializable {
+  private static final long serialVersionUID = 1L;
+
+  //主键
+  private Long id;
+  //订单序列号
+  private String orderSn;
+  //会员Id
+  private Integer userId;
+  //订单状态
+  //订单相关状态字段设计,采用单个字段表示全部的订单状态
+  //1xx 表示订单取消和删除等状态 0订单创建成功等待付款, 101订单已取消, 102订单已删除
+  //2xx 表示订单支付状态 201订单已付款,等待发货
+  //3xx 表示订单物流相关状态 300订单已发货, 301用户确认收货
+  //4xx 表示订单退换货相关的状态 401 没有发货,退款 402 已收货,退款退货
+  private Integer orderStatus;
+  //发货状态 商品配送情况;0未发货,1已发货,2已收货,4退货
+  private Integer shippingStatus;
+  //付款状态 支付状态;0未付款;1付款中;2已付款
+  private Integer payStatus;
+  //收货人
+  private String consignee;
+  //国家
+  private String country;
+  //省
+  private String province;
+  //地市
+  private String city;
+  //区县
+  private String district;
+  //收货地址
+  private String address;
+  //联系电话
+  private String mobile;
+  //补充说明
+  private String postscript;
+  //快递公司Id
+  private Long shippingId;
+  //快递公司简称(顺丰:SF)
+  private String shippingCode;
+  //快递公司名称
+  private String shippingName;
+  //快递单号
+  private String shippingNo;
+  // 配送员手机
+  private String shippingMobile;
+  //付款
+  private String payId;
+  //
+  private String payName;
+  //快递费用
+  private BigDecimal shippingFee;
+  //实际需要支付的金额
+  private BigDecimal actualPrice;
+  //
+  private Integer integral;
+  //
+  private BigDecimal integralMoney;
+  //订单总价
+  private BigDecimal orderPrice;
+  //商品总价
+  private BigDecimal goodsPrice;
+  //新增时间
+  private Date addTime;
+  //确认时间
+  private Date confirmTime;
+  //付款时间
+  private Date payTime;
+  //重商品额外费用
+  private Integer freightPrice;
+  //使用的优惠券id
+  private Integer couponId;
+  //
+  private Integer parentId;
+  //优惠价格
+  private BigDecimal couponPrice;
+  //
+  private String callbackStatus;
+  // 活动Id 团购
+  private Integer activityId;
+  //订单类型 1:普通订单 2:团购订单
+  private String orderType;
+
+  private Integer storeId;
+  //
+  private String userName;
+  // 送达时间
+  @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+  private Date deliveryDate;
+  // 送到说明
+  private String deliveryRemark;
+  // 预计送达时间
+  private Date predictTime;
+
+  private String merchOrderSn;
+
+  private String orderBizType;
+
+  private String isPaymentSend;
+
+  private String isEleOrderSend;
+
+  private String isCustomsSend;
+
+  private String buyerPayCheck;
+
+  private String merchSn;
+
+  private String sku;
+
+  private Date createTime;
+
+  private Date modTime;
+
+  private String isOnfflineOrder;
+
+  private String payFlag;
+
+  private String orderSnWx;
+
+  private String isMergePay;
+  //商品名称
+  private String goodsName;
+  //商品数量
+  private Integer number;
+  //零售价格
+  private BigDecimal retailPrice;
+
+  private String payTransactionId;
+
+  private String storeName;
+
+  private String moderSn;
+
+  private String createrSn;
+
+  private String idNo;
+  //毛重,kg
+  private BigDecimal grossWeight;
+
+  //净重,kg
+  private BigDecimal netWeight;
+  //品牌
+  private String brand;
+  /**
+   * 国检规格型号
+   */
+  private String ciqProdModel;
+  /**
+   * 原产国代码,海关编码
+   */
+  private String oriCntCode;
+  /**
+   * 计量单位代码,参见海关编码
+   */
+  private String unitCode;
+
+  private Integer orderDetailCount;
+
+  private Integer promId;
+
+  private BigDecimal promActualPrice;
+
+  private Integer goodsId;
+
+  private String storeTopicName;
+
+  private String storeTopicType;
+
+  private Integer storeTopicId;
+
+  private String couponName;
+  //订单满减
+  private BigDecimal fullCutPrice;
+
+  private Integer campMinusId;
+
+  private String campName;
+
+  //供应商第三方商户
+  private String supplierThirdPartyMerchName;
+
+  private String isTempNoti;
+
+  private String isFaceCheck;
+
+  private String tempNotiMsg;
+
+  private String recognitionReturnMsg;
+
+  private String lastFaceTime;
+
+  private String addSecondTime;
+
+  //该订单是否在可验证人脸时间内
+  private String isDateLast;
+
+  private String thirdIsFaceCheck;
+
+  //人脸核验失败次数
+  private Integer failCount;
+
+  /**
+   * 人脸核验id
+   */
+  private Integer faceLivenessId;
+
+  private String checkOperatorType;
+
+  public String getCheckOperatorType() {
+    return checkOperatorType;
+  }
+
+  public void setCheckOperatorType(String checkOperatorType) {
+    this.checkOperatorType = checkOperatorType;
+  }
+
+  public String getThirdIsFaceCheck() {
+    return thirdIsFaceCheck;
+  }
+
+  public void setThirdIsFaceCheck(String thirdIsFaceCheck) {
+    this.thirdIsFaceCheck = thirdIsFaceCheck;
+  }
+
+  public String getAddSecondTime() {
+    return addSecondTime;
+  }
+
+  public void setAddSecondTime(String addSecondTime) {
+    this.addSecondTime = addSecondTime;
+  }
+
+  public String getIsDateLast() {
+    return isDateLast;
+  }
+
+  public void setIsDateLast(String isDateLast) {
+    this.isDateLast = isDateLast;
+  }
+
+  public String getSupplierThirdPartyMerchName() {
+    return supplierThirdPartyMerchName;
+  }
+
+  public void setSupplierThirdPartyMerchName(String supplierThirdPartyMerchName) {
+    this.supplierThirdPartyMerchName = supplierThirdPartyMerchName;
+  }
+
+  public Integer getCampMinusId() {
+    return campMinusId;
+  }
+
+  public void setCampMinusId(Integer campMinusId) {
+    this.campMinusId = campMinusId;
+  }
+
+  public BigDecimal getFullCutPrice() {
+    return fullCutPrice;
+  }
+
+  public void setFullCutPrice(BigDecimal fullCutPrice) {
+    this.fullCutPrice = fullCutPrice;
+  }
+
+  public String getCampName() {
+    return campName;
+  }
+
+  public void setCampName(String campName) {
+    this.campName = campName;
+  }
+
+  public String getCouponName() {
+    return couponName;
+  }
+
+  public void setCouponName(String couponName) {
+    this.couponName = couponName;
+  }
+
+  public String getStoreTopicName() {
+    return storeTopicName;
+  }
+
+  public void setStoreTopicName(String storeTopicName) {
+    this.storeTopicName = storeTopicName;
+  }
+
+  public String getStoreTopicType() {
+    return storeTopicType;
+  }
+
+  public void setStoreTopicType(String storeTopicType) {
+    this.storeTopicType = storeTopicType;
+  }
+
+  public Integer getStoreTopicId() {
+    return storeTopicId;
+  }
+
+  public void setStoreTopicId(Integer storeTopicId) {
+    this.storeTopicId = storeTopicId;
+  }
+
+  public Integer getGoodsId() {
+    return goodsId;
+  }
+
+  public void setGoodsId(Integer goodsId) {
+    this.goodsId = goodsId;
+  }
+
+  public BigDecimal getPromActualPrice() {
+    return promActualPrice;
+  }
+
+  public void setPromActualPrice(BigDecimal promActualPrice) {
+    this.promActualPrice = promActualPrice;
+  }
+
+  public Integer getPromId() {
+    return promId;
+  }
+
+  public void setPromId(Integer promId) {
+    this.promId = promId;
+  }
+
+  public Integer getOrderDetailCount() {
+    return orderDetailCount;
+  }
+
+  public void setOrderDetailCount(Integer orderDetailCount) {
+    this.orderDetailCount = orderDetailCount;
+  }
+
+  public String getBrand() {
+    return brand;
+  }
+
+  public void setBrand(String brand) {
+    this.brand = brand;
+  }
+
+  public String getCiqProdModel() {
+    return ciqProdModel;
+  }
+
+  public void setCiqProdModel(String ciqProdModel) {
+    this.ciqProdModel = ciqProdModel;
+  }
+
+  public String getOriCntCode() {
+    return oriCntCode;
+  }
+
+  public void setOriCntCode(String oriCntCode) {
+    this.oriCntCode = oriCntCode;
+  }
+
+  public String getUnitCode() {
+    return unitCode;
+  }
+
+  public void setUnitCode(String unitCode) {
+    this.unitCode = unitCode;
+  }
+
+  public BigDecimal getGrossWeight() {
+    return grossWeight;
+  }
+
+  public void setGrossWeight(BigDecimal grossWeight) {
+    this.grossWeight = grossWeight;
+  }
+
+  public BigDecimal getNetWeight() {
+    return netWeight;
+  }
+
+  public void setNetWeight(BigDecimal netWeight) {
+    this.netWeight = netWeight;
+  }
+
+  public String getIdNo() {
+    return idNo;
+  }
+
+  public void setIdNo(String idNo) {
+    this.idNo = idNo;
+  }
+
+  public String getModerSn() {
+    return moderSn;
+  }
+
+  public void setModerSn(String moderSn) {
+    this.moderSn = moderSn;
+  }
+
+  public String getCreaterSn() {
+    return createrSn;
+  }
+
+  public void setCreaterSn(String createrSn) {
+    this.createrSn = createrSn;
+  }
+
+  public String getStoreName() {
+    return storeName;
+  }
+
+  public void setStoreName(String storeName) {
+    this.storeName = storeName;
+  }
+
+  public String getPayTransactionId() {
+    return payTransactionId;
+  }
+
+  public void setPayTransactionId(String payTransactionId) {
+    this.payTransactionId = payTransactionId;
+  }
+
+  public String getGoodsName() {
+    return goodsName;
+  }
+
+  public void setGoodsName(String goodsName) {
+    this.goodsName = goodsName;
+  }
+
+  public Integer getNumber() {
+    return number;
+  }
+
+  public void setNumber(Integer number) {
+    this.number = number;
+  }
+
+  public BigDecimal getRetailPrice() {
+    return retailPrice;
+  }
+
+  public void setRetailPrice(BigDecimal retailPrice) {
+    this.retailPrice = retailPrice;
+  }
+
+  public String getIsMergePay() {
+    return isMergePay;
+  }
+
+  public void setIsMergePay(String isMergePay) {
+    this.isMergePay = isMergePay;
+  }
+
+  public String getOrderSnWx() {
+    return orderSnWx;
+  }
+
+  public void setOrderSnWx(String orderSnWx) {
+    this.orderSnWx = orderSnWx;
+  }
+
+  public String getPayFlag() {
+    return payFlag;
+  }
+
+  public void setPayFlag(String payFlag) {
+    this.payFlag = payFlag;
+  }
+
+
+  public String getIsOnfflineOrder() {
+    return isOnfflineOrder;
+  }
+
+  public void setIsOnfflineOrder(String isOnfflineOrder) {
+    this.isOnfflineOrder = isOnfflineOrder;
+  }
+
+  public String getMerchSn() {
+    return merchSn;
+  }
+
+  public void setMerchSn(String merchSn) {
+    this.merchSn = merchSn;
+  }
+
+  public String getSku() {
+    return sku;
+  }
+
+  public void setSku(String sku) {
+    this.sku = sku;
+  }
+
+  public Date getCreateTime() {
+    return createTime;
+  }
+
+  public void setCreateTime(Date createTime) {
+    this.createTime = createTime;
+  }
+
+  public Date getModTime() {
+    return modTime;
+  }
+
+  public void setModTime(Date modTime) {
+    this.modTime = modTime;
+  }
+
+  public String getBuyerPayCheck() {
+    return buyerPayCheck;
+  }
+
+  public void setBuyerPayCheck(String buyerPayCheck) {
+    this.buyerPayCheck = buyerPayCheck;
+  }
+
+  public String getIsPaymentSend() {
+    return isPaymentSend;
+  }
+
+  public void setIsPaymentSend(String isPaymentSend) {
+    this.isPaymentSend = isPaymentSend;
+  }
+
+  public String getIsEleOrderSend() {
+    return isEleOrderSend;
+  }
+
+  public void setIsEleOrderSend(String isEleOrderSend) {
+    this.isEleOrderSend = isEleOrderSend;
+  }
+
+  public String getIsCustomsSend() {
+    return isCustomsSend;
+  }
+
+  public void setIsCustomsSend(String isCustomsSend) {
+    this.isCustomsSend = isCustomsSend;
+  }
+
+  public String getOrderBizType() {
+    return orderBizType;
+  }
+
+  public void setOrderBizType(String orderBizType) {
+    this.orderBizType = orderBizType;
+  }
+
+  public String getMerchOrderSn() {
+    return merchOrderSn;
+  }
+
+  public void setMerchOrderSn(String merchOrderSn) {
+    this.merchOrderSn = merchOrderSn;
+  }
+
+  public String getOrderType() {
+    return orderType;
+  }
+
+  public void setOrderType(String orderType) {
+    this.orderType = orderType;
+  }
+
+  /**
+   * 设置:主键
+   */
+  public void setId(Long id) {
+    this.id = id;
+  }
+
+  /**
+   * 获取:主键
+   */
+  public Long getId() {
+    return id;
+  }
+
+  public String getShippingCode() {
+    return shippingCode;
+  }
+
+  public void setShippingCode(String shippingCode) {
+    this.shippingCode = shippingCode;
+  }
+
+  /**
+   * 设置:订单序列号
+   */
+  public void setOrderSn(String orderSn) {
+    this.orderSn = orderSn;
+  }
+
+  /**
+   * 获取:订单序列号
+   */
+  public String getOrderSn() {
+    return orderSn;
+  }
+
+  /**
+   * 设置:会员Id
+   */
+  public void setUserId(Integer userId) {
+    this.userId = userId;
+  }
+
+  /**
+   * 获取:会员Id
+   */
+  public Integer getUserId() {
+    return userId;
+  }
+
+  /**
+   * 设置:订单状态
+   */
+  public void setOrderStatus(Integer orderStatus) {
+    this.orderStatus = orderStatus;
+  }
+
+  /**
+   * 获取:订单状态
+   */
+  public Integer getOrderStatus() {
+    return orderStatus;
+  }
+
+  /**
+   * 设置:发货状态
+   */
+  public void setShippingStatus(Integer shippingStatus) {
+    this.shippingStatus = shippingStatus;
+  }
+
+  /**
+   * 获取:发货状态
+   */
+  public Integer getShippingStatus() {
+    return shippingStatus;
+  }
+
+  /**
+   * 设置:付款状态
+   */
+  public void setPayStatus(Integer payStatus) {
+    this.payStatus = payStatus;
+  }
+
+  /**
+   * 获取:付款状态
+   */
+  public Integer getPayStatus() {
+    return payStatus;
+  }
+
+  /**
+   * 设置:收货人
+   */
+  public void setConsignee(String consignee) {
+    this.consignee = consignee;
+  }
+
+  /**
+   * 获取:收货人
+   */
+  public String getConsignee() {
+    return consignee;
+  }
+
+  /**
+   * 设置:国家
+   */
+  public void setCountry(String country) {
+    this.country = country;
+  }
+
+  /**
+   * 获取:国家
+   */
+  public String getCountry() {
+    return country;
+  }
+
+  /**
+   * 设置:省
+   */
+  public void setProvince(String province) {
+    this.province = province;
+  }
+
+  /**
+   * 获取:省
+   */
+  public String getProvince() {
+    return province;
+  }
+
+  /**
+   * 设置:地市
+   */
+  public void setCity(String city) {
+    this.city = city;
+  }
+
+  /**
+   * 获取:地市
+   */
+  public String getCity() {
+    return city;
+  }
+
+  /**
+   * 设置:区县
+   */
+  public void setDistrict(String district) {
+    this.district = district;
+  }
+
+  /**
+   * 获取:区县
+   */
+  public String getDistrict() {
+    return district;
+  }
+
+  public String getShippingNo() {
+    return shippingNo;
+  }
+
+  public void setShippingNo(String shippingNo) {
+    this.shippingNo = shippingNo;
+  }
+
+  /**
+   * 设置:收货地址
+   */
+  public void setAddress(String address) {
+    this.address = address;
+  }
+
+  /**
+   * 获取:收货地址
+   */
+  public String getAddress() {
+    return address;
+  }
+
+  /**
+   * 设置:联系电话
+   */
+  public void setMobile(String mobile) {
+    this.mobile = mobile;
+  }
+
+  /**
+   * 获取:联系电话
+   */
+  public String getMobile() {
+    return mobile;
+  }
+
+  /**
+   * 设置:补充说明
+   */
+  public void setPostscript(String postscript) {
+    this.postscript = postscript;
+  }
+
+  /**
+   * 获取:补充说明
+   */
+  public String getPostscript() {
+    return postscript;
+  }
+
+  /**
+   * 设置:快递公司Id
+   */
+  public void setShippingId(Long shippingId) {
+    this.shippingId = shippingId;
+  }
+
+  /**
+   * 获取:快递公司Id
+   */
+  public Long getShippingId() {
+    return shippingId;
+  }
+
+  /**
+   * 设置:快递公司名称
+   */
+  public void setShippingName(String shippingName) {
+    this.shippingName = shippingName;
+  }
+
+  /**
+   * 获取:快递公司名称
+   */
+  public String getShippingName() {
+    return shippingName;
+  }
+
+  /**
+   * 设置:付款
+   */
+  public void setPayId(String payId) {
+    this.payId = payId;
+  }
+
+  /**
+   * 获取:付款
+   */
+  public String getPayId() {
+    return payId;
+  }
+
+  /**
+   * 设置:
+   */
+  public void setPayName(String payName) {
+    this.payName = payName;
+  }
+
+  /**
+   * 获取:
+   */
+  public String getPayName() {
+    return payName;
+  }
+
+  /**
+   * 设置:快递费用
+   */
+  public void setShippingFee(BigDecimal shippingFee) {
+    this.shippingFee = shippingFee;
+  }
+
+  /**
+   * 获取:快递费用
+   */
+  public BigDecimal getShippingFee() {
+    return shippingFee;
+  }
+
+  /**
+   * 设置:实际需要支付的金额
+   */
+  public void setActualPrice(BigDecimal actualPrice) {
+    this.actualPrice = actualPrice;
+  }
+
+  /**
+   * 获取:实际需要支付的金额
+   */
+  public BigDecimal getActualPrice() {
+    return actualPrice;
+  }
+
+  /**
+   * 设置:
+   */
+  public void setIntegral(Integer integral) {
+    this.integral = integral;
+  }
+
+  /**
+   * 获取:
+   */
+  public Integer getIntegral() {
+    return integral;
+  }
+
+  /**
+   * 设置:
+   */
+  public void setIntegralMoney(BigDecimal integralMoney) {
+    this.integralMoney = integralMoney;
+  }
+
+  /**
+   * 获取:
+   */
+  public BigDecimal getIntegralMoney() {
+    return integralMoney;
+  }
+
+  /**
+   * 设置:订单总价
+   */
+  public void setOrderPrice(BigDecimal orderPrice) {
+    this.orderPrice = orderPrice;
+  }
+
+  /**
+   * 获取:订单总价
+   */
+  public BigDecimal getOrderPrice() {
+    return orderPrice;
+  }
+
+  /**
+   * 设置:商品总价
+   */
+  public void setGoodsPrice(BigDecimal goodsPrice) {
+    this.goodsPrice = goodsPrice;
+  }
+
+  /**
+   * 获取:商品总价
+   */
+  public BigDecimal getGoodsPrice() {
+    return goodsPrice;
+  }
+
+  /**
+   * 设置:新增时间
+   */
+  public void setAddTime(Date addTime) {
+    this.addTime = addTime;
+  }
+
+  /**
+   * 获取:新增时间
+   */
+  public Date getAddTime() {
+    return addTime;
+  }
+
+  /**
+   * 设置:确认时间
+   */
+  public void setConfirmTime(Date confirmTime) {
+    this.confirmTime = confirmTime;
+  }
+
+  /**
+   * 获取:确认时间
+   */
+  public Date getConfirmTime() {
+    return confirmTime;
+  }
+
+  /**
+   * 设置:付款时间
+   */
+  public void setPayTime(Date payTime) {
+    this.payTime = payTime;
+  }
+
+  /**
+   * 获取:付款时间
+   */
+  public Date getPayTime() {
+    return payTime;
+  }
+
+  /**
+   * 设置:配送费用
+   */
+  public void setFreightPrice(Integer freightPrice) {
+    this.freightPrice = freightPrice;
+  }
+
+  /**
+   * 获取:配送费用
+   */
+  public Integer getFreightPrice() {
+    return freightPrice;
+  }
+
+  /**
+   * 设置:使用的优惠券id
+   */
+  public void setCouponId(Integer couponId) {
+    this.couponId = couponId;
+  }
+
+  /**
+   * 获取:使用的优惠券id
+   */
+  public Integer getCouponId() {
+    return couponId;
+  }
+
+  /**
+   * 设置:
+   */
+  public void setParentId(Integer parentId) {
+    this.parentId = parentId;
+  }
+
+  /**
+   * 获取:
+   */
+  public Integer getParentId() {
+    return parentId;
+  }
+
+  /**
+   * 设置:优惠价格
+   */
+  public void setCouponPrice(BigDecimal couponPrice) {
+    this.couponPrice = couponPrice;
+  }
+
+  /**
+   * 获取:优惠价格
+   */
+  public BigDecimal getCouponPrice() {
+    return couponPrice;
+  }
+
+  /**
+   * 设置:
+   */
+  public void setCallbackStatus(String callbackStatus) {
+    this.callbackStatus = callbackStatus;
+  }
+
+  /**
+   * 获取:
+   */
+  public String getCallbackStatus() {
+    return callbackStatus;
+  }
+
+  public String getUserName() {
+    return userName;
+  }
+
+  public void setUserName(String userName) {
+    this.userName = userName;
+  }
+
+  public Integer getStoreId() {
+    return storeId;
+  }
+
+  public void setStoreId(Integer storeId) {
+    this.storeId = storeId;
+  }
+
+  public String getShippingMobile() {
+    return shippingMobile;
+  }
+
+  public void setShippingMobile(String shippingMobile) {
+    this.shippingMobile = shippingMobile;
+  }
+
+  public Integer getActivityId() {
+    return activityId;
+  }
+
+  public void setActivityId(Integer activityId) {
+    this.activityId = activityId;
+  }
+
+  public Date getDeliveryDate() {
+    return deliveryDate;
+  }
+
+  public void setDeliveryDate(Date deliveryDate) {
+    this.deliveryDate = deliveryDate;
+  }
+
+  public String getDeliveryRemark() {
+    return deliveryRemark;
+  }
+
+  public void setDeliveryRemark(String deliveryRemark) {
+    this.deliveryRemark = deliveryRemark;
+  }
+
+  public Date getPredictTime() {
+    return predictTime;
+  }
+
+  public void setPredictTime(Date predictTime) {
+    this.predictTime = predictTime;
+  }
+
+  public String getIsTempNoti() {
+    return isTempNoti;
+  }
+
+  public void setIsTempNoti(String isTempNoti) {
+    this.isTempNoti = isTempNoti;
+  }
+
+  public String getIsFaceCheck() {
+    return isFaceCheck;
+  }
+
+  public void setIsFaceCheck(String isFaceCheck) {
+    this.isFaceCheck = isFaceCheck;
+  }
+
+  public String getTempNotiMsg() {
+    return tempNotiMsg;
+  }
+
+  public void setTempNotiMsg(String tempNotiMsg) {
+    this.tempNotiMsg = tempNotiMsg;
+  }
+
+  public String getRecognitionReturnMsg() {
+    return recognitionReturnMsg;
+  }
+
+  public void setRecognitionReturnMsg(String recognitionReturnMsg) {
+    this.recognitionReturnMsg = recognitionReturnMsg;
+  }
+
+  public String getLastFaceTime() {
+    return lastFaceTime;
+  }
+
+  public void setLastFaceTime(String lastFaceTime) {
+    this.lastFaceTime = lastFaceTime;
+  }
+
+  public Integer getFailCount() {
+    return failCount;
+  }
+
+  public void setFailCount(Integer failCount) {
+    this.failCount = failCount;
+  }
+
+  public Integer getFaceLivenessId() {
+    return faceLivenessId;
+  }
+
+  public void setFaceLivenessId(Integer faceLivenessId) {
+    this.faceLivenessId = faceLivenessId;
+  }
+}

+ 73 - 0
kmall-admin/src/main/java/com/kmall/admin/dto/SendTempDto.java

@@ -0,0 +1,73 @@
+package com.kmall.admin.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author huangyq
+ * @version 1.0
+ * 2019-11-28 10:52
+ */
+public class SendTempDto implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    private Date addTime;
+
+    private String openId;
+
+    private String goodsName;
+
+    private String merchOrderSn;
+
+    private long orderId;
+
+    private String orderSn;
+
+    public Date getAddTime() {
+        return addTime;
+    }
+
+    public void setAddTime(Date addTime) {
+        this.addTime = addTime;
+    }
+
+    public String getOpenId() {
+        return openId;
+    }
+
+    public void setOpenId(String openId) {
+        this.openId = openId;
+    }
+
+    public String getGoodsName() {
+        return goodsName;
+    }
+
+    public void setGoodsName(String goodsName) {
+        this.goodsName = goodsName;
+    }
+
+    public String getMerchOrderSn() {
+        return merchOrderSn;
+    }
+
+    public void setMerchOrderSn(String merchOrderSn) {
+        this.merchOrderSn = merchOrderSn;
+    }
+
+    public long getOrderId() {
+        return orderId;
+    }
+
+    public void setOrderId(long orderId) {
+        this.orderId = orderId;
+    }
+
+    public String getOrderSn() {
+        return orderSn;
+    }
+
+    public void setOrderSn(String orderSn) {
+        this.orderSn = orderSn;
+    }
+}

+ 113 - 0
kmall-admin/src/main/java/com/kmall/admin/dto/StoreDto.java

@@ -0,0 +1,113 @@
+package com.kmall.admin.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * @author Scott
+ * @email
+ * @date 2017-08-13 10:41:08
+ */
+public class StoreDto implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private String merchSn;
+    private String storeName;
+    private String storeNumber;
+    private String storeAddress;
+    private String provinceName;
+    private String cityName;
+    private String countyName;
+    private Double latitude;
+    private Double longitude;
+    private String thirdPartyMerchCode;
+    private String exprAgreementType;
+
+    public String getMerchSn() {
+        return merchSn;
+    }
+
+    public void setMerchSn(String merchSn) {
+        this.merchSn = merchSn;
+    }
+
+    public String getStoreName() {
+        return storeName;
+    }
+
+    public void setStoreName(String storeName) {
+        this.storeName = storeName;
+    }
+
+    public String getStoreNumber() {
+        return storeNumber;
+    }
+
+    public void setStoreNumber(String storeNumber) {
+        this.storeNumber = storeNumber;
+    }
+
+    public String getStoreAddress() {
+        return storeAddress;
+    }
+
+    public void setStoreAddress(String storeAddress) {
+        this.storeAddress = storeAddress;
+    }
+
+    public String getProvinceName() {
+        return provinceName;
+    }
+
+    public void setProvinceName(String provinceName) {
+        this.provinceName = provinceName;
+    }
+
+    public String getCityName() {
+        return cityName;
+    }
+
+    public void setCityName(String cityName) {
+        this.cityName = cityName;
+    }
+
+    public String getCountyName() {
+        return countyName;
+    }
+
+    public void setCountyName(String countyName) {
+        this.countyName = countyName;
+    }
+
+    public String getThirdPartyMerchCode() {
+        return thirdPartyMerchCode;
+    }
+
+    public void setThirdPartyMerchCode(String thirdPartyMerchCode) {
+        this.thirdPartyMerchCode = thirdPartyMerchCode;
+    }
+
+    public String getExprAgreementType() {
+        return exprAgreementType;
+    }
+
+    public void setExprAgreementType(String exprAgreementType) {
+        this.exprAgreementType = exprAgreementType;
+    }
+
+    public Double getLatitude() {
+        return latitude;
+    }
+
+    public void setLatitude(Double latitude) {
+        this.latitude = latitude;
+    }
+
+    public Double getLongitude() {
+        return longitude;
+    }
+
+    public void setLongitude(Double longitude) {
+        this.longitude = longitude;
+    }
+}

+ 122 - 0
kmall-admin/src/main/java/com/kmall/admin/dto/StoreGoodsDto.java

@@ -0,0 +1,122 @@
+package com.kmall.admin.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * @author Scott
+ * @email
+ * @date 2019-10-18 10:41:08
+ */
+public class StoreGoodsDto implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private String storeName;
+    private String specification;
+    private String stockNum;
+    private String goodsSn;
+    private String retailPrice;
+    private String marketPrice;
+    private String goodsBizType;
+    private String categoryName;
+    private String attributeCategory;
+    private String brandName;
+    private String freightName;
+    private String supplierThirdCode;
+
+    public String getStoreName() {
+        return storeName;
+    }
+
+    public void setStoreName(String storeName) {
+        this.storeName = storeName;
+    }
+
+    public String getSpecification() {
+        return specification;
+    }
+
+    public void setSpecification(String specification) {
+        this.specification = specification;
+    }
+
+    public String getStockNum() {
+        return stockNum;
+    }
+
+    public void setStockNum(String stockNum) {
+        this.stockNum = stockNum;
+    }
+
+    public String getGoodsSn() {
+        return goodsSn;
+    }
+
+    public void setGoodsSn(String goodsSn) {
+        this.goodsSn = goodsSn;
+    }
+
+    public String getRetailPrice() {
+        return retailPrice;
+    }
+
+    public void setRetailPrice(String retailPrice) {
+        this.retailPrice = retailPrice;
+    }
+
+    public String getMarketPrice() {
+        return marketPrice;
+    }
+
+    public void setMarketPrice(String marketPrice) {
+        this.marketPrice = marketPrice;
+    }
+
+    public String getGoodsBizType() {
+        return goodsBizType;
+    }
+
+    public void setGoodsBizType(String goodsBizType) {
+        this.goodsBizType = goodsBizType;
+    }
+
+    public String getCategoryName() {
+        return categoryName;
+    }
+
+    public void setCategoryName(String categoryName) {
+        this.categoryName = categoryName;
+    }
+
+    public String getAttributeCategory() {
+        return attributeCategory;
+    }
+
+    public void setAttributeCategory(String attributeCategory) {
+        this.attributeCategory = attributeCategory;
+    }
+
+    public String getBrandName() {
+        return brandName;
+    }
+
+    public void setBrandName(String brandName) {
+        this.brandName = brandName;
+    }
+
+    public String getFreightName() {
+        return freightName;
+    }
+
+    public void setFreightName(String freightName) {
+        this.freightName = freightName;
+    }
+
+    public String getSupplierThirdCode() {
+        return supplierThirdCode;
+    }
+
+    public void setSupplierThirdCode(String supplierThirdCode) {
+        this.supplierThirdCode = supplierThirdCode;
+    }
+}

+ 21 - 0
kmall-admin/src/main/java/com/kmall/admin/dto/StoreIdDto.java

@@ -0,0 +1,21 @@
+package com.kmall.admin.dto;
+
+import java.io.Serializable;
+
+
+/**
+ * @author Scott
+ * @email
+ */
+public class StoreIdDto implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private String storeId;
+
+    public String getStoreId() {
+        return storeId;
+    }
+
+    public void setStoreId(String storeId) {
+        this.storeId = storeId;
+    }
+}

+ 83 - 0
kmall-admin/src/main/java/com/kmall/admin/dto/SysUserDto.java

@@ -0,0 +1,83 @@
+package com.kmall.admin.dto;
+
+import java.io.Serializable;
+
+/**
+ * @author Scott
+ * @email
+ */
+public class SysUserDto implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private String userName;
+    private String email;
+    private String mobile;
+    private String storeName;
+    private String roleType;
+    private String roleName;
+    private String merchSn;
+    private String thirdPartyMerchCode;
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public String getMobile() {
+        return mobile;
+    }
+
+    public void setMobile(String mobile) {
+        this.mobile = mobile;
+    }
+
+    public String getStoreName() {
+        return storeName;
+    }
+
+    public void setStoreName(String storeName) {
+        this.storeName = storeName;
+    }
+
+    public String getRoleType() {
+        return roleType;
+    }
+
+    public void setRoleType(String roleType) {
+        this.roleType = roleType;
+    }
+
+    public String getRoleName() {
+        return roleName;
+    }
+
+    public void setRoleName(String roleName) {
+        this.roleName = roleName;
+    }
+
+    public String getMerchSn() {
+        return merchSn;
+    }
+
+    public void setMerchSn(String merchSn) {
+        this.merchSn = merchSn;
+    }
+
+    public String getThirdPartyMerchCode() {
+        return thirdPartyMerchCode;
+    }
+
+    public void setThirdPartyMerchCode(String thirdPartyMerchCode) {
+        this.thirdPartyMerchCode = thirdPartyMerchCode;
+    }
+}

+ 20 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/AdEntity.java

@@ -53,6 +53,26 @@ public class AdEntity implements Serializable {
 
     private Integer storeTopicId;
 
+    private String storeName;
+
+    private String merchName;
+
+    public String getStoreName() {
+        return storeName;
+    }
+
+    public void setStoreName(String storeName) {
+        this.storeName = storeName;
+    }
+
+    public String getMerchName() {
+        return merchName;
+    }
+
+    public void setMerchName(String merchName) {
+        this.merchName = merchName;
+    }
+
     public Integer getStoreTopicId() {
         return storeTopicId;
     }

+ 278 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/FaceLivenessRecognitionReturnDataEntity.java

@@ -0,0 +1,278 @@
+package com.kmall.admin.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 验证活体人脸核身接口返回的数据记录实体
+ * 表名 face_liveness_recognition_return_data
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2019-11-27 13:33:46
+ */
+public class FaceLivenessRecognitionReturnDataEntity implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    private Integer id;
+    /**
+     * 商户订单编号
+     */
+    private String merchOrderSn;
+
+    private String orderSn;
+    /**
+     * 模板是否通知 0:否 1:是;
+     */
+    private String isTempNoti;
+    /**
+     * 人脸核身是否核验成功0:否,1:是
+     */
+    private String isFaceCheck;
+    /**
+     * 用户id
+     */
+    private Integer userId;
+    /**
+     * 模板通知失败原因
+     */
+    private String tempNotiMsg;
+
+    private String recognitionReturnMsg;
+    /**
+     * 创建人编号
+     */
+    private String createrSn;
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+    /**
+     * 修改人编号
+     */
+    private String moderSn;
+    /**
+     * 修改时间
+     */
+    private Date modTime;
+    /**
+     * 时间戳
+     */
+    private Date tstm;
+    /**
+     * 核验失败次数
+     */
+    private Integer failCount;
+
+    /**
+     * 核验操作类型 1:人脸活体识别,2:按钮审核身份
+     */
+    private String checkOperatorType;
+
+    /**
+     * 人脸失败,审核会员身份操作人
+     */
+    private String checkOperatorSn;
+
+    /**
+     * 审核操作时间
+     */
+    private Date checkOperatorTime;
+
+    /**
+     * 设置:主键
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * 获取:主键
+     */
+    public Integer getId() {
+        return id;
+    }
+    /**
+     * 设置:商户订单编号
+     */
+    public void setMerchOrderSn(String merchOrderSn) {
+        this.merchOrderSn = merchOrderSn;
+    }
+
+    /**
+     * 获取:商户订单编号
+     */
+    public String getMerchOrderSn() {
+        return merchOrderSn;
+    }
+
+    public String getOrderSn() {
+        return orderSn;
+    }
+
+    public void setOrderSn(String orderSn) {
+        this.orderSn = orderSn;
+    }
+
+    /**
+     * 设置:模板是否通知 0:否 1:是;
+     */
+    public void setIsTempNoti(String isTempNoti) {
+        this.isTempNoti = isTempNoti;
+    }
+
+    /**
+     * 获取:模板是否通知 0:否 1:是;
+     */
+    public String getIsTempNoti() {
+        return isTempNoti;
+    }
+    /**
+     * 设置:人脸核身是否核验成功0:否,1:是
+     */
+    public void setIsFaceCheck(String isFaceCheck) {
+        this.isFaceCheck = isFaceCheck;
+    }
+
+    /**
+     * 获取:人脸核身是否核验成功0:否,1:是
+     */
+    public String getIsFaceCheck() {
+        return isFaceCheck;
+    }
+    /**
+     * 设置:用户id
+     */
+    public void setUserId(Integer userId) {
+        this.userId = userId;
+    }
+
+    /**
+     * 获取:用户id
+     */
+    public Integer getUserId() {
+        return userId;
+    }
+    /**
+     * 设置:模板通知失败原因
+     */
+    public void setTempNotiMsg(String tempNotiMsg) {
+        this.tempNotiMsg = tempNotiMsg;
+    }
+
+    /**
+     * 获取:模板通知失败原因
+     */
+    public String getTempNotiMsg() {
+        return tempNotiMsg;
+    }
+
+    public String getRecognitionReturnMsg() {
+        return recognitionReturnMsg;
+    }
+
+    public void setRecognitionReturnMsg(String recognitionReturnMsg) {
+        this.recognitionReturnMsg = recognitionReturnMsg;
+    }
+
+    /**
+     * 设置:创建人编号
+     */
+    public void setCreaterSn(String createrSn) {
+        this.createrSn = createrSn;
+    }
+
+    /**
+     * 获取:创建人编号
+     */
+    public String getCreaterSn() {
+        return createrSn;
+    }
+    /**
+     * 设置:创建时间
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 获取:创建时间
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+    /**
+     * 设置:修改人编号
+     */
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn;
+    }
+
+    /**
+     * 获取:修改人编号
+     */
+    public String getModerSn() {
+        return moderSn;
+    }
+    /**
+     * 设置:修改时间
+     */
+    public void setModTime(Date modTime) {
+        this.modTime = modTime;
+    }
+
+    /**
+     * 获取:修改时间
+     */
+    public Date getModTime() {
+        return modTime;
+    }
+    /**
+     * 设置:时间戳
+     */
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+
+    /**
+     * 获取:时间戳
+     */
+    public Date getTstm() {
+        return tstm;
+    }
+
+    public Integer getFailCount() {
+        return failCount;
+    }
+
+    public void setFailCount(Integer failCount) {
+        this.failCount = failCount;
+    }
+
+    public String getCheckOperatorType() {
+        return checkOperatorType;
+    }
+
+    public void setCheckOperatorType(String checkOperatorType) {
+        this.checkOperatorType = checkOperatorType;
+    }
+
+    public String getCheckOperatorSn() {
+        return checkOperatorSn;
+    }
+
+    public void setCheckOperatorSn(String checkOperatorSn) {
+        this.checkOperatorSn = checkOperatorSn;
+    }
+
+    public Date getCheckOperatorTime() {
+        return checkOperatorTime;
+    }
+
+    public void setCheckOperatorTime(Date checkOperatorTime) {
+        this.checkOperatorTime = checkOperatorTime;
+    }
+}

+ 11 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/OrderEntity.java

@@ -195,6 +195,17 @@ public class OrderEntity implements Serializable {
     //供应商第三方商户
     private String supplierThirdPartyMerchName;
 
+    //供应商第三方商户
+    private String supplierThirdPartyMerchCode;
+
+    public String getSupplierThirdPartyMerchCode() {
+        return supplierThirdPartyMerchCode;
+    }
+
+    public void setSupplierThirdPartyMerchCode(String supplierThirdPartyMerchCode) {
+        this.supplierThirdPartyMerchCode = supplierThirdPartyMerchCode;
+    }
+
     public String getSupplierThirdPartyMerchName() {
         return supplierThirdPartyMerchName;
     }

+ 20 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/ProductStoreRelaEntity.java

@@ -124,6 +124,18 @@ public class ProductStoreRelaEntity implements Serializable {
 
     private String isOnSale;
 
+    private Integer hotSortNum;
+
+    private String isHot;
+
+    public String getIsHot() {
+        return isHot;
+    }
+
+    public void setIsHot(String isHot) {
+        this.isHot = isHot;
+    }
+
     public String getIsOnSale() {
         return isOnSale;
     }
@@ -492,6 +504,14 @@ public class ProductStoreRelaEntity implements Serializable {
         this.specification = specification;
     }
 
+    public Integer getHotSortNum() {
+        return hotSortNum;
+    }
+
+    public void setHotSortNum(Integer hotSortNum) {
+        this.hotSortNum = hotSortNum;
+    }
+
     public void addSellVolume() {
         if (null == sellVolume) {
             sellVolume = 1;

+ 11 - 1
kmall-admin/src/main/java/com/kmall/admin/entity/ThirdMerchantBizEntity.java

@@ -33,6 +33,8 @@ public class ThirdMerchantBizEntity implements Serializable {
 
     private String isStoreUserShare;
 
+    private String isFaceCheck;
+
     /**
      * 是否有效,0:有效,1:无效
      */
@@ -46,7 +48,7 @@ public class ThirdMerchantBizEntity implements Serializable {
      */
     private Date createTime;
     /**
-     * 
+     *
      */
     private String moderSn;
     /**
@@ -104,6 +106,14 @@ public class ThirdMerchantBizEntity implements Serializable {
         this.isStockShare = isStockShare;
     }
 
+    public String getIsFaceCheck() {
+        return isFaceCheck;
+    }
+
+    public void setIsFaceCheck(String isFaceCheck) {
+        this.isFaceCheck = isFaceCheck;
+    }
+
     public String getMerchSn() {
         return merchSn;
     }

+ 11 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/UserEntity.java

@@ -51,6 +51,9 @@ public class UserEntity implements Serializable {
 
     private String idNo;
 
+    //最后活体人脸核身时间
+    private String lastFaceTime;
+
     /**
      * 设置:主键
      */
@@ -262,4 +265,12 @@ public class UserEntity implements Serializable {
     public void setLevelName(String levelName) {
         this.levelName = levelName;
     }
+
+    public String getLastFaceTime() {
+        return lastFaceTime;
+    }
+
+    public void setLastFaceTime(String lastFaceTime) {
+        this.lastFaceTime = lastFaceTime;
+    }
 }

+ 735 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/WxOrderEntity.java

@@ -0,0 +1,735 @@
+package com.kmall.admin.entity;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+
+/**
+ * @author huangyq
+ * @email
+ * @date 2019-11-07 16:11:34
+ */
+public class WxOrderEntity implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    private String wxOrderSn;
+
+    private String merchOrderId;
+
+    private String orderSn;
+
+    private String wxOrderId;
+
+    private String merchSn;
+
+    private String merchName;
+
+    private String platSn;
+
+    private String platName;
+
+    private String thirdPartyMerchCode;
+
+    private String thirdPartyMerchName;
+
+    private Date placeOrderlTime;
+
+    private String autoSend;
+
+    private String buyerRegNo;
+
+    private Date buyerBillTime;
+
+    private String buyerIdType;
+
+    private String buyerIdCode;
+
+    private String buyerName;
+
+    private String buyerTel;
+
+    private String consigneeIdType;
+
+    private String consigneeIdCode;
+
+    private String consigneeName;
+
+    private String consigneeMob;
+
+    private String consigneeTel;
+
+    private String consigneeCountryCode;
+
+    private String consigneeProvinceCode;
+
+    private String consigneeProvince;
+
+    private String consigneeCityCode;
+
+    private String consigneeCity;
+
+    private String consigneeDistrictCode;
+
+    private String consigneeDistrict;
+
+    private String consigneeAddress;
+
+    private String consigneeZipCode;
+
+    private String payerName;
+
+    private String payerIdType;
+
+    private String payerIdCode;
+
+    private String payerMob;
+
+    private String payEntCusCode;
+
+    private String payNo;
+
+    private BigDecimal goodsValue;
+
+    private BigDecimal freight;
+
+    private BigDecimal discount;
+
+    private BigDecimal taxTotal;
+
+    private BigDecimal acturalPaid;
+
+    private Date payTime;
+
+    private String exprType;
+
+    private String exprCompId;
+
+    private BigDecimal declExprFee;
+
+    private String batchNumbers;
+
+    private BigDecimal declPostTax;
+
+    private String shopId;
+
+    private String extraTag;
+
+    private String currencyCode;
+
+    private String wsFlag;
+
+    private String buyerPayCheck;
+
+    private String wxOrderDetail;
+
+    private String clecOrderStatus;
+
+    private String wayOrderStatus;
+
+    private String projectCheckStatus;
+
+    private String playOrderStatus;
+
+    private String remark;
+
+    private String createrSn;
+
+    private Date createTime;
+
+    private String moderSn;
+
+    private Date modTime;
+
+    private Date tstm;
+
+    private String exField;
+
+    private String exField2;
+
+    private String exField3;
+
+    private String exField4;
+
+    private String exField5;
+
+    private String exprAgreementType;
+
+    private String placeOrderlTimeStr;
+
+    public String getPlaceOrderlTimeStr() {
+        return placeOrderlTimeStr;
+    }
+
+    public void setPlaceOrderlTimeStr(String placeOrderlTimeStr) {
+        this.placeOrderlTimeStr = placeOrderlTimeStr;
+    }
+
+    public String getExprAgreementType() {
+        return exprAgreementType;
+    }
+
+    public void setExprAgreementType(String exprAgreementType) {
+        this.exprAgreementType = exprAgreementType;
+    }
+
+    public String getWxOrderSn() {
+        return wxOrderSn;
+    }
+
+    public void setWxOrderSn(String wxOrderSn) {
+        this.wxOrderSn = wxOrderSn == null ? null : wxOrderSn.trim();
+    }
+
+    public String getMerchOrderId() {
+        return merchOrderId;
+    }
+
+    public void setMerchOrderId(String merchOrderId) {
+        this.merchOrderId = merchOrderId == null ? null : merchOrderId.trim();
+    }
+
+    public String getOrderSn() {
+        return orderSn;
+    }
+
+    public void setOrderSn(String orderSn) {
+        this.orderSn = orderSn == null ? null : orderSn.trim();
+    }
+
+    public String getWxOrderId() {
+        return wxOrderId;
+    }
+
+    public void setWxOrderId(String wxOrderId) {
+        this.wxOrderId = wxOrderId == null ? null : wxOrderId.trim();
+    }
+
+    public String getMerchSn() {
+        return merchSn;
+    }
+
+    public void setMerchSn(String merchSn) {
+        this.merchSn = merchSn == null ? null : merchSn.trim();
+    }
+
+    public String getMerchName() {
+        return merchName;
+    }
+
+    public void setMerchName(String merchName) {
+        this.merchName = merchName == null ? null : merchName.trim();
+    }
+
+    public String getPlatSn() {
+        return platSn;
+    }
+
+    public void setPlatSn(String platSn) {
+        this.platSn = platSn == null ? null : platSn.trim();
+    }
+
+    public String getPlatName() {
+        return platName;
+    }
+
+    public void setPlatName(String platName) {
+        this.platName = platName == null ? null : platName.trim();
+    }
+
+    public String getThirdPartyMerchCode() {
+        return thirdPartyMerchCode;
+    }
+
+    public void setThirdPartyMerchCode(String thirdPartyMerchCode) {
+        this.thirdPartyMerchCode = thirdPartyMerchCode == null ? null : thirdPartyMerchCode.trim();
+    }
+
+    public String getThirdPartyMerchName() {
+        return thirdPartyMerchName;
+    }
+
+    public void setThirdPartyMerchName(String thirdPartyMerchName) {
+        this.thirdPartyMerchName = thirdPartyMerchName == null ? null : thirdPartyMerchName.trim();
+    }
+
+    public Date getPlaceOrderlTime() {
+        return placeOrderlTime;
+    }
+
+    public void setPlaceOrderlTime(Date placeOrderlTime) {
+        this.placeOrderlTime = placeOrderlTime;
+    }
+
+    public String getAutoSend() {
+        return autoSend;
+    }
+
+    public void setAutoSend(String autoSend) {
+        this.autoSend = autoSend == null ? null : autoSend.trim();
+    }
+
+    public String getBuyerRegNo() {
+        return buyerRegNo;
+    }
+
+    public void setBuyerRegNo(String buyerRegNo) {
+        this.buyerRegNo = buyerRegNo == null ? null : buyerRegNo.trim();
+    }
+
+    public Date getBuyerBillTime() {
+        return buyerBillTime;
+    }
+
+    public void setBuyerBillTime(Date buyerBillTime) {
+        this.buyerBillTime = buyerBillTime;
+    }
+
+    public String getBuyerIdType() {
+        return buyerIdType;
+    }
+
+    public void setBuyerIdType(String buyerIdType) {
+        this.buyerIdType = buyerIdType == null ? null : buyerIdType.trim();
+    }
+
+    public String getBuyerIdCode() {
+        return buyerIdCode;
+    }
+
+    public void setBuyerIdCode(String buyerIdCode) {
+        this.buyerIdCode = buyerIdCode == null ? null : buyerIdCode.trim();
+    }
+
+    public String getBuyerName() {
+        return buyerName;
+    }
+
+    public void setBuyerName(String buyerName) {
+        this.buyerName = buyerName == null ? null : buyerName.trim();
+    }
+
+    public String getBuyerTel() {
+        return buyerTel;
+    }
+
+    public void setBuyerTel(String buyerTel) {
+        this.buyerTel = buyerTel == null ? null : buyerTel.trim();
+    }
+
+    public String getConsigneeIdType() {
+        return consigneeIdType;
+    }
+
+    public void setConsigneeIdType(String consigneeIdType) {
+        this.consigneeIdType = consigneeIdType == null ? null : consigneeIdType.trim();
+    }
+
+    public String getConsigneeIdCode() {
+        return consigneeIdCode;
+    }
+
+    public void setConsigneeIdCode(String consigneeIdCode) {
+        this.consigneeIdCode = consigneeIdCode == null ? null : consigneeIdCode.trim();
+    }
+
+    public String getConsigneeName() {
+        return consigneeName;
+    }
+
+    public void setConsigneeName(String consigneeName) {
+        this.consigneeName = consigneeName == null ? null : consigneeName.trim();
+    }
+
+    public String getConsigneeMob() {
+        return consigneeMob;
+    }
+
+    public void setConsigneeMob(String consigneeMob) {
+        this.consigneeMob = consigneeMob == null ? null : consigneeMob.trim();
+    }
+
+    public String getConsigneeTel() {
+        return consigneeTel;
+    }
+
+    public void setConsigneeTel(String consigneeTel) {
+        this.consigneeTel = consigneeTel == null ? null : consigneeTel.trim();
+    }
+
+    public String getConsigneeCountryCode() {
+        return consigneeCountryCode;
+    }
+
+    public void setConsigneeCountryCode(String consigneeCountryCode) {
+        this.consigneeCountryCode = consigneeCountryCode == null ? null : consigneeCountryCode.trim();
+    }
+
+    public String getConsigneeProvinceCode() {
+        return consigneeProvinceCode;
+    }
+
+    public void setConsigneeProvinceCode(String consigneeProvinceCode) {
+        this.consigneeProvinceCode = consigneeProvinceCode == null ? null : consigneeProvinceCode.trim();
+    }
+
+    public String getConsigneeProvince() {
+        return consigneeProvince;
+    }
+
+    public void setConsigneeProvince(String consigneeProvince) {
+        this.consigneeProvince = consigneeProvince == null ? null : consigneeProvince.trim();
+    }
+
+    public String getConsigneeCityCode() {
+        return consigneeCityCode;
+    }
+
+    public void setConsigneeCityCode(String consigneeCityCode) {
+        this.consigneeCityCode = consigneeCityCode == null ? null : consigneeCityCode.trim();
+    }
+
+    public String getConsigneeCity() {
+        return consigneeCity;
+    }
+
+    public void setConsigneeCity(String consigneeCity) {
+        this.consigneeCity = consigneeCity == null ? null : consigneeCity.trim();
+    }
+
+    public String getConsigneeDistrictCode() {
+        return consigneeDistrictCode;
+    }
+
+    public void setConsigneeDistrictCode(String consigneeDistrictCode) {
+        this.consigneeDistrictCode = consigneeDistrictCode == null ? null : consigneeDistrictCode.trim();
+    }
+
+    public String getConsigneeDistrict() {
+        return consigneeDistrict;
+    }
+
+    public void setConsigneeDistrict(String consigneeDistrict) {
+        this.consigneeDistrict = consigneeDistrict == null ? null : consigneeDistrict.trim();
+    }
+
+    public String getConsigneeAddress() {
+        return consigneeAddress;
+    }
+
+    public void setConsigneeAddress(String consigneeAddress) {
+        this.consigneeAddress = consigneeAddress == null ? null : consigneeAddress.trim();
+    }
+
+    public String getConsigneeZipCode() {
+        return consigneeZipCode;
+    }
+
+    public void setConsigneeZipCode(String consigneeZipCode) {
+        this.consigneeZipCode = consigneeZipCode == null ? null : consigneeZipCode.trim();
+    }
+
+    public String getPayerName() {
+        return payerName;
+    }
+
+    public void setPayerName(String payerName) {
+        this.payerName = payerName == null ? null : payerName.trim();
+    }
+
+    public String getPayerIdType() {
+        return payerIdType;
+    }
+
+    public void setPayerIdType(String payerIdType) {
+        this.payerIdType = payerIdType == null ? null : payerIdType.trim();
+    }
+
+    public String getPayerIdCode() {
+        return payerIdCode;
+    }
+
+    public void setPayerIdCode(String payerIdCode) {
+        this.payerIdCode = payerIdCode == null ? null : payerIdCode.trim();
+    }
+
+    public String getPayerMob() {
+        return payerMob;
+    }
+
+    public void setPayerMob(String payerMob) {
+        this.payerMob = payerMob == null ? null : payerMob.trim();
+    }
+
+    public String getPayEntCusCode() {
+        return payEntCusCode;
+    }
+
+    public void setPayEntCusCode(String payEntCusCode) {
+        this.payEntCusCode = payEntCusCode == null ? null : payEntCusCode.trim();
+    }
+
+    public String getPayNo() {
+        return payNo;
+    }
+
+    public void setPayNo(String payNo) {
+        this.payNo = payNo == null ? null : payNo.trim();
+    }
+
+    public BigDecimal getGoodsValue() {
+        return goodsValue;
+    }
+
+    public void setGoodsValue(BigDecimal goodsValue) {
+        this.goodsValue = goodsValue;
+    }
+
+    public BigDecimal getFreight() {
+        return freight;
+    }
+
+    public void setFreight(BigDecimal freight) {
+        this.freight = freight;
+    }
+
+    public BigDecimal getDiscount() {
+        return discount;
+    }
+
+    public void setDiscount(BigDecimal discount) {
+        this.discount = discount;
+    }
+
+    public BigDecimal getTaxTotal() {
+        return taxTotal;
+    }
+
+    public void setTaxTotal(BigDecimal taxTotal) {
+        this.taxTotal = taxTotal;
+    }
+
+    public BigDecimal getActuralPaid() {
+        return acturalPaid;
+    }
+
+    public void setActuralPaid(BigDecimal acturalPaid) {
+        this.acturalPaid = acturalPaid;
+    }
+
+    public Date getPayTime() {
+        return payTime;
+    }
+
+    public void setPayTime(Date payTime) {
+        this.payTime = payTime;
+    }
+
+    public String getExprType() {
+        return exprType;
+    }
+
+    public void setExprType(String exprType) {
+        this.exprType = exprType == null ? null : exprType.trim();
+    }
+
+    public String getExprCompId() {
+        return exprCompId;
+    }
+
+    public void setExprCompId(String exprCompId) {
+        this.exprCompId = exprCompId == null ? null : exprCompId.trim();
+    }
+
+    public BigDecimal getDeclExprFee() {
+        return declExprFee;
+    }
+
+    public void setDeclExprFee(BigDecimal declExprFee) {
+        this.declExprFee = declExprFee;
+    }
+
+    public String getBatchNumbers() {
+        return batchNumbers;
+    }
+
+    public void setBatchNumbers(String batchNumbers) {
+        this.batchNumbers = batchNumbers == null ? null : batchNumbers.trim();
+    }
+
+    public BigDecimal getDeclPostTax() {
+        return declPostTax;
+    }
+
+    public void setDeclPostTax(BigDecimal declPostTax) {
+        this.declPostTax = declPostTax;
+    }
+
+    public String getShopId() {
+        return shopId;
+    }
+
+    public void setShopId(String shopId) {
+        this.shopId = shopId == null ? null : shopId.trim();
+    }
+
+    public String getExtraTag() {
+        return extraTag;
+    }
+
+    public void setExtraTag(String extraTag) {
+        this.extraTag = extraTag == null ? null : extraTag.trim();
+    }
+
+    public String getCurrencyCode() {
+        return currencyCode;
+    }
+
+    public void setCurrencyCode(String currencyCode) {
+        this.currencyCode = currencyCode == null ? null : currencyCode.trim();
+    }
+
+    public String getWsFlag() {
+        return wsFlag;
+    }
+
+    public void setWsFlag(String wsFlag) {
+        this.wsFlag = wsFlag == null ? null : wsFlag.trim();
+    }
+
+    public String getBuyerPayCheck() {
+        return buyerPayCheck;
+    }
+
+    public void setBuyerPayCheck(String buyerPayCheck) {
+        this.buyerPayCheck = buyerPayCheck;
+    }
+
+    public String getWxOrderDetail() {
+        return wxOrderDetail;
+    }
+
+    public void setWxOrderDetail(String wxOrderDetail) {
+        this.wxOrderDetail = wxOrderDetail;
+    }
+
+    public String getClecOrderStatus() {
+        return clecOrderStatus;
+    }
+
+    public void setClecOrderStatus(String clecOrderStatus) {
+        this.clecOrderStatus = clecOrderStatus == null ? null : clecOrderStatus.trim();
+    }
+
+    public String getWayOrderStatus() {
+        return wayOrderStatus;
+    }
+
+    public void setWayOrderStatus(String wayOrderStatus) {
+        this.wayOrderStatus = wayOrderStatus == null ? null : wayOrderStatus.trim();
+    }
+
+    public String getProjectCheckStatus() {
+        return projectCheckStatus;
+    }
+
+    public void setProjectCheckStatus(String projectCheckStatus) {
+        this.projectCheckStatus = projectCheckStatus == null ? null : projectCheckStatus.trim();
+    }
+
+    public String getPlayOrderStatus() {
+        return playOrderStatus;
+    }
+
+    public void setPlayOrderStatus(String playOrderStatus) {
+        this.playOrderStatus = playOrderStatus == null ? null : playOrderStatus.trim();
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark == null ? null : remark.trim();
+    }
+
+    public String getCreaterSn() {
+        return createrSn;
+    }
+
+    public void setCreaterSn(String createrSn) {
+        this.createrSn = createrSn == null ? null : createrSn.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getModerSn() {
+        return moderSn;
+    }
+
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn == null ? null : moderSn.trim();
+    }
+
+    public Date getModTime() {
+        return modTime;
+    }
+
+    public void setModTime(Date modTime) {
+        this.modTime = modTime;
+    }
+
+    public Date getTstm() {
+        return tstm;
+    }
+
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+
+    public String getExField() {
+        return exField;
+    }
+
+    public void setExField(String exField) {
+        this.exField = exField == null ? null : exField.trim();
+    }
+
+    public String getExField2() {
+        return exField2;
+    }
+
+    public void setExField2(String exField2) {
+        this.exField2 = exField2 == null ? null : exField2.trim();
+    }
+
+    public String getExField3() {
+        return exField3;
+    }
+
+    public void setExField3(String exField3) {
+        this.exField3 = exField3 == null ? null : exField3.trim();
+    }
+
+    public String getExField4() {
+        return exField4;
+    }
+
+    public void setExField4(String exField4) {
+        this.exField4 = exField4 == null ? null : exField4.trim();
+    }
+
+    public String getExField5() {
+        return exField5;
+    }
+
+    public void setExField5(String exField5) {
+        this.exField5 = exField5 == null ? null : exField5.trim();
+    }
+}

+ 30 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/mk/store/StoreTopicEntity.java

@@ -80,6 +80,12 @@ public class StoreTopicEntity implements Serializable {
      */
     private Date tstm;
 
+    private String storeName;
+
+    private String promTypeName;
+
+    private String thirdPartyMerchName;
+
     /**
      * 设置:主键
      */
@@ -284,4 +290,28 @@ public class StoreTopicEntity implements Serializable {
     public Date getTstm() {
         return tstm;
     }
+
+    public String getStoreName() {
+        return storeName;
+    }
+
+    public void setStoreName(String storeName) {
+        this.storeName = storeName;
+    }
+
+    public String getPromTypeName() {
+        return promTypeName;
+    }
+
+    public void setPromTypeName(String promTypeName) {
+        this.promTypeName = promTypeName;
+    }
+
+    public String getThirdPartyMerchName() {
+        return thirdPartyMerchName;
+    }
+
+    public void setThirdPartyMerchName(String thirdPartyMerchName) {
+        this.thirdPartyMerchName = thirdPartyMerchName;
+    }
 }

+ 33 - 0
kmall-admin/src/main/java/com/kmall/admin/fromcomm/controller/SysUserController.java

@@ -1,19 +1,25 @@
 package com.kmall.admin.fromcomm.controller;
 
+import com.kmall.admin.dto.SysUserDto;
 import com.kmall.admin.utils.ShiroUtils;
 import com.kmall.common.annotation.SysLog;
 import com.kmall.common.constant.Dict;
 import com.kmall.admin.fromcomm.entity.SysUserEntity;
 import com.kmall.admin.fromcomm.service.SysUserRoleService;
 import com.kmall.admin.fromcomm.service.SysUserService;
+import com.kmall.common.constant.JxlsXmlTemplateName;
 import com.kmall.common.utils.*;
+import com.kmall.common.utils.excel.ExcelUtil;
 import com.kmall.common.validator.Assert;
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.apache.shiro.crypto.hash.Sha256Hash;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -31,6 +37,8 @@ public class SysUserController extends AbstractController {
     private SysUserService sysUserService;
     @Autowired
     private SysUserRoleService sysUserRoleService;
+    @Autowired
+    private ExcelUtil excelUtil;
 
     /**
      * 所有用户列表
@@ -154,4 +162,29 @@ public class SysUserController extends AbstractController {
 
         return R.ok();
     }
+
+    /**
+     * 上传文件
+     */
+    @RequestMapping("/sysUserUpload")
+    public R storeUpload(@RequestParam("file") MultipartFile file) {
+        List<SysUserDto> sysUserDtoList = new ArrayList<>();//信息
+        try {
+            SysUserDto storeGoodsDto = new SysUserDto();
+            Map<String, Object> beans = new HashMap<String, Object>();
+            beans.put("SysUserDto", storeGoodsDto);
+            beans.put("SysUserDtoList", sysUserDtoList);
+            if (file.isEmpty()) {
+                return R.error("文件不能为空!");
+            }
+            excelUtil.readExcel(JxlsXmlTemplateName.SYS_USER_DTO_LIST, beans, file.getInputStream());
+        } catch (Exception e) {
+            e.printStackTrace();
+            return R.error("导入失败!");
+        }
+        sysUserService.uploadExcel(sysUserDtoList);
+        //上传文件
+        return R.ok("导入成功!");
+    }
+
 }

+ 111 - 0
kmall-admin/src/main/java/com/kmall/admin/fromcomm/controller/UploadStoreIdController.java

@@ -0,0 +1,111 @@
+package com.kmall.admin.fromcomm.controller;
+
+import com.kmall.admin.dto.CateStoreDto;
+import com.kmall.admin.dto.CopyBrandDto;
+import com.kmall.admin.dto.CopyCategoryDto;
+import com.kmall.admin.dto.StoreIdDto;
+import com.kmall.admin.service.BrandService;
+import com.kmall.admin.service.CategoryService;
+import com.kmall.admin.service.StoreService;
+import com.kmall.common.constant.JxlsXmlTemplateName;
+import com.kmall.common.utils.R;
+import com.kmall.common.utils.RRException;
+import com.kmall.common.utils.excel.ExcelUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 批量上传公共类
+ * @author huangyq
+ * @version 1.0
+ * 2019-10-25 10:40
+ */
+@RestController
+@RequestMapping("/uploadCommon")
+public class UploadStoreIdController extends AbstractController {
+    @Autowired
+    private StoreService storeService;
+    @Autowired
+    private CategoryService categoryService;
+    @Autowired
+    private BrandService brandService;
+    @Autowired
+    private ExcelUtil excelUtil;
+
+    /**
+     * 上传文件
+     */
+    @RequestMapping("/storeIdUpload")
+    public R storeIdUpload(@RequestParam("file") MultipartFile file) {
+        List<StoreIdDto> storeIdDtoList = new ArrayList<>();//信息
+        try {
+            Map<String, Object> beans = new HashMap<String, Object>();
+            beans.put("StoreIdDtoList", storeIdDtoList);
+            if (file.isEmpty()) {
+                return R.error("文件不能为空!");
+            }
+            excelUtil.readExcel(JxlsXmlTemplateName.STORE_ID_DTO_LIST, beans, file.getInputStream());
+        } catch (Exception e) {
+            e.printStackTrace();
+            return R.error("导入失败!");
+        }
+//        throw new RRException("导入成功");
+        String storeIds = storeService.checkStoreIdUpload(storeIdDtoList);
+        //上传文件
+        return R.ok("导入成功").put("storeIds", storeIds);
+    }
+
+    /**
+     * 上传文件
+     */
+    @RequestMapping("/cateStoreUpload")
+    public R cateStoreUpload(@RequestParam("file") MultipartFile file) {
+        List<CateStoreDto> cateStoreDtoList = new ArrayList<>();//信息
+        try {
+            Map<String, Object> beans = new HashMap<String, Object>();
+            beans.put("CateStoreDtoList", cateStoreDtoList);
+            if (file.isEmpty()) {
+                return R.error("文件不能为空!");
+            }
+            excelUtil.readExcel(JxlsXmlTemplateName.CATE_STORE_DTO_LIST, beans, file.getInputStream());
+        } catch (Exception e) {
+            e.printStackTrace();
+            return R.error("导入失败!");
+        }
+//        throw new RRException("导入成功");
+        CopyCategoryDto copyCategoryDto = categoryService.checkCateStoreUpload(cateStoreDtoList);
+        //上传文件
+        return R.ok("导入成功").put("copyCategoryDto", copyCategoryDto);
+    }
+
+    /**
+     * 上传文件
+     */
+    @RequestMapping("/brandStoreUpload")
+    public R brandStoreUpload(@RequestParam("file") MultipartFile file) {
+        List<CateStoreDto> cateStoreDtoList = new ArrayList<>();//信息
+        try {
+            Map<String, Object> beans = new HashMap<String, Object>();
+            beans.put("CateStoreDtoList", cateStoreDtoList);
+            if (file.isEmpty()) {
+                return R.error("文件不能为空!");
+            }
+            excelUtil.readExcel(JxlsXmlTemplateName.CATE_STORE_DTO_LIST, beans, file.getInputStream());
+        } catch (Exception e) {
+            e.printStackTrace();
+            return R.error("导入失败!");
+        }
+//        throw new RRException("导入成功");
+        CopyBrandDto copyBrandDto = brandService.checkBrandStoreUpload(cateStoreDtoList);
+        //上传文件
+        return R.ok("导入成功").put("copyBrandDto", copyBrandDto);
+    }
+}

+ 3 - 0
kmall-admin/src/main/java/com/kmall/admin/fromcomm/dao/SysRoleDao.java

@@ -2,6 +2,7 @@ package com.kmall.admin.fromcomm.dao;
 
 import com.kmall.admin.fromcomm.entity.SysRoleEntity;
 import com.kmall.manager.dao.BaseDao;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -18,4 +19,6 @@ public interface SysRoleDao extends BaseDao<SysRoleEntity> {
      * 查询用户创建的角色ID列表
      */
     List<Long> queryRoleIdList(Long createUserId);
+
+    SysRoleEntity queryObjectByName(@Param("roleName") String roleName);
 }

+ 2 - 0
kmall-admin/src/main/java/com/kmall/admin/fromcomm/dao/SysSmsLogDao.java

@@ -14,4 +14,6 @@ import org.springframework.stereotype.Component;
 public interface SysSmsLogDao extends BaseDao<SysSmsLogEntity> {
 
     SysSmsLogEntity querySmsCodeByUserId(Long userId);
+
+    SysSmsLogEntity querySmsCodeByMobile(String mobile);
 }

+ 2 - 0
kmall-admin/src/main/java/com/kmall/admin/fromcomm/service/SysRoleService.java

@@ -33,4 +33,6 @@ public interface SysRoleService {
      * 查询用户创建的角色ID列表
      */
     List<Long> queryRoleIdList(Long createUserId);
+
+    SysRoleEntity queryObjectByName(String roleName);
 }

+ 9 - 0
kmall-admin/src/main/java/com/kmall/admin/fromcomm/service/SysUserService.java

@@ -1,5 +1,6 @@
 package com.kmall.admin.fromcomm.service;
 
+import com.kmall.admin.dto.SysUserDto;
 import com.kmall.admin.fromcomm.entity.SysUserEntity;
 
 import java.util.List;
@@ -73,4 +74,12 @@ public interface SysUserService {
      * @param newPassword 新密码
      */
     int updatePassword(Long userId, String password, String newPassword);
+
+    /**
+     * 批量导入
+     *
+     * @param sysUserDtoList
+     * @return
+     */
+    int uploadExcel(List<SysUserDto> sysUserDtoList);
 }

+ 5 - 0
kmall-admin/src/main/java/com/kmall/admin/fromcomm/service/impl/SysRoleServiceImpl.java

@@ -139,4 +139,9 @@ public class SysRoleServiceImpl implements SysRoleService {
             throw new RRException("新增角色的权限,已超出你的权限范围");
         }
     }
+
+    @Override
+    public SysRoleEntity queryObjectByName(String roleName) {
+        return sysRoleDao.queryObjectByName(roleName);
+    }
 }

+ 5 - 0
kmall-admin/src/main/java/com/kmall/admin/fromcomm/service/impl/SysSmsLogServiceImpl.java

@@ -94,4 +94,9 @@ public class SysSmsLogServiceImpl implements SysSmsLogService {
     public SysSmsLogEntity querySmsCodeByUserId(Long userId) {
         return smsLogDao.querySmsCodeByUserId(userId);
     }
+
+    @Override
+    public SysSmsLogEntity querySmsCodeByMobile(String mobile) {
+        return smsLogDao.querySmsCodeByMobile(mobile);
+    }
 }

+ 183 - 4
kmall-admin/src/main/java/com/kmall/admin/fromcomm/service/impl/SysUserServiceImpl.java

@@ -1,6 +1,16 @@
 package com.kmall.admin.fromcomm.service.impl;
 
 import com.google.common.collect.ImmutableBiMap;
+import com.kmall.admin.dao.ExportExceptionDataDao;
+import com.kmall.admin.dao.MerchDao;
+import com.kmall.admin.dao.StoreDao;
+import com.kmall.admin.dao.ThirdMerchantBizDao;
+import com.kmall.admin.dto.SysUserDto;
+import com.kmall.admin.entity.ExportExceptionDataEntity;
+import com.kmall.admin.entity.MerchEntity;
+import com.kmall.admin.entity.StoreEntity;
+import com.kmall.admin.entity.ThirdMerchantBizEntity;
+import com.kmall.admin.fromcomm.entity.SysRoleEntity;
 import com.kmall.admin.utils.ShiroUtils;
 import com.kmall.common.Global;
 import com.kmall.admin.fromcomm.dao.SysUserDao;
@@ -16,10 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 
 /**
@@ -38,6 +45,14 @@ public class SysUserServiceImpl implements SysUserService {
     private SysUserRoleService sysUserRoleService;
     @Autowired
     private SysRoleService sysRoleService;
+    @Autowired
+    private StoreDao storeDao;
+    @Autowired
+    private MerchDao merchDao;
+    @Autowired
+    private ThirdMerchantBizDao thirdMerchantBizDao;
+    @Autowired
+    private ExportExceptionDataDao exportExceptionDataDao;
 
     @Override
     public List<String> queryAllPerms(Long userId) {
@@ -217,4 +232,168 @@ public class SysUserServiceImpl implements SysUserService {
             throw new RRException("新增用户所选角色,不是本人创建");
         }
     }
+
+    @Override
+    public int uploadExcel(List<SysUserDto> sysUserDtoList){
+        SysUserEntity user = ShiroUtils.getUserEntity();
+        String merchSn = user.getMerchSn();
+        boolean isFail = false;
+        List<String> failThirdMerchSnList = new ArrayList<>(), failMerchSnList = new ArrayList<>(),
+                failStoreNameList = new ArrayList<>(), failRoleTypeList = new ArrayList<>(),
+                failEmailList = new ArrayList<>(), failMobieList = new ArrayList<>(), failRoleList = new ArrayList<>();
+        if (sysUserDtoList != null && sysUserDtoList.size() > 0) {
+            for (int i = 0; i < sysUserDtoList.size(); i++) {
+                SysUserDto sysUserDto = sysUserDtoList.get(i);
+                SysUserEntity sysUserEntity = new SysUserEntity();
+                Map<String, Object> valideDate = MapBeanUtil.fromObject(sysUserDto);
+                ImmutableBiMap.Builder builder = new ImmutableBiMap.Builder();
+                builder.put("userName", "用户名");
+                builder.put("email", "邮箱");
+                builder.put("mobile", "手机");
+                builder.put("roleType", "角色类型");
+                builder.put("roleName", "角色名称");
+
+                R r = ValidatorUtil.isEmpty(builder.build(), valideDate);
+                if (Integer.valueOf(r.get("code").toString()) != 0) {
+                    throw new RRException(r.get("msg").toString());
+                }
+                if (Dict.roleType.item_2.getItem().equalsIgnoreCase(sysUserDto.getRoleType())) {
+                    builder.put("merchSn", "商户编号");
+                    builder.put("thirdPartyMerchCode", "第三方商户代码");
+                    builder.put("storeName", "门店名称");
+                }else if (Dict.roleType.item_3.getItem().equalsIgnoreCase(sysUserDto.getRoleType())) {
+                    builder.put("merchSn", "商户编号");
+                }else if (Dict.roleType.item_4.getItem().equalsIgnoreCase(sysUserDto.getRoleType())) {
+                    builder.put("merchSn", "商户编号");
+                    builder.put("thirdPartyMerchCode", "第三方商户代码");
+                }else if (Dict.roleType.item_1.getItem().equalsIgnoreCase(sysUserDto.getRoleType())) {
+                    sysUserEntity.setMerchSn(null);
+                    sysUserEntity.setThirdPartyMerchCode(null);
+                    sysUserEntity.setStoreId(null);
+                }
+                r = ValidatorUtil.isEmpty(builder.build(), valideDate);
+                if (Integer.valueOf(r.get("code").toString()) != 0) {
+                    throw new RRException(r.get("msg").toString());
+                }
+                if(!sysUserDto.getRoleType().equalsIgnoreCase(Dict.roleType.item_1.getItem()) && !sysUserDto.getRoleType().equalsIgnoreCase(Dict.roleType.item_2.getItem())
+                        && !sysUserDto.getRoleType().equalsIgnoreCase(Dict.roleType.item_3.getItem()) && !sysUserDto.getRoleType().equalsIgnoreCase(Dict.roleType.item_4.getItem())){
+                    isFail = true;
+                    failRoleTypeList.add(sysUserDto.getStoreName());
+                }
+                if (!user.getEmail().matches("^[a-z0-9A-Z]+[- | a-z0-9A-Z . _]+@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-z]{2,}$")) {
+                    isFail = true;
+                    failEmailList.add(sysUserDto.getStoreName());
+                }
+                if (!PhoneFormatCheckUtils.isPhoneLegal(user.getMobile())) {
+                    isFail = true;
+                    failMobieList.add(sysUserDto.getStoreName());
+                }
+                SysRoleEntity sysRoleEntity = sysRoleService.queryObjectByName(sysUserDto.getRoleName());
+                if(sysRoleEntity == null){
+                    isFail = true;
+                    failRoleList.add(sysUserDto.getStoreName());
+                }else {
+                    sysUserEntity.setRoleId(sysRoleEntity.getRoleId());
+                }
+                if(sysUserDto.getRoleType().equalsIgnoreCase(Dict.roleType.item_4.getItem()) ||
+                        sysUserDto.getRoleType().equalsIgnoreCase(Dict.roleType.item_2.getItem()) ||
+                        sysUserDto.getRoleType().equalsIgnoreCase(Dict.roleType.item_3.getItem())){
+                    MerchEntity merchEntity = merchDao.findByMerchSn(sysUserDto.getMerchSn());
+                    if(merchEntity != null){
+                        sysUserEntity.setMerchSn(merchEntity.getMerchSn());
+                    }else{//商户不存在
+                        isFail = true;
+                        failMerchSnList.add(sysUserDto.getStoreName());
+                    }
+                }
+                if(sysUserDto.getRoleType().equalsIgnoreCase(Dict.roleType.item_2.getItem()) ||
+                        sysUserDto.getRoleType().equalsIgnoreCase(Dict.roleType.item_4.getItem())){
+                    ThirdMerchantBizEntity thirdMerchantBizEntity = thirdMerchantBizDao.getThirdMerchangByCode(sysUserDto.getThirdPartyMerchCode());
+                    if(thirdMerchantBizEntity != null){
+                        sysUserEntity.setThirdPartyMerchCode(thirdMerchantBizEntity.getThirdPartyMerchCode());
+                    }else{//第三方商户不存在
+                        isFail = true;
+                        failThirdMerchSnList.add(sysUserDto.getStoreName());
+                    }
+                }
+                if(sysUserDto.getRoleType().equalsIgnoreCase(Dict.roleType.item_2.getItem())){
+                    StoreEntity store = storeDao.queryObjectByName(sysUserDto.getStoreName().trim());
+                    if (store != null) {
+                        sysUserEntity.setStoreId(Integer.parseInt(String.valueOf(store.getId())));
+                        sysUserEntity.setMerchSn(store.getMerchSn());
+                    }else{
+                        isFail = true;
+                        failStoreNameList.add(sysUserDto.getStoreName());
+                    }
+                }
+                sysUserEntity.setUsername(sysUserDto.getUserName());
+                sysUserEntity.setEmail(sysUserDto.getEmail());
+                sysUserEntity.setMobile(sysUserDto.getMobile());
+                sysUserEntity.setRoleType(sysUserDto.getRoleType());
+                sysUserEntity.setCreateUserId(user.getUserId());
+                sysUserEntity.setStatus(Integer.parseInt(Dict.status.item_1.getItem()));
+                sysUserEntity.setCreateTime(new Date());
+                if(!isFail){
+                    //sha256加密
+                    sysUserEntity.setPassword(new Sha256Hash(Global.DEFAULT_PASS_WORD).toHex());
+                    sysUserDao.save(sysUserEntity);
+
+                    //检查角色是否越权
+                    checkRole(sysUserEntity);
+
+                    //保存用户与角色关系
+                    sysUserRoleService.saveOrUpdate(sysUserEntity.getUserId(), sysUserEntity.getRoleId());
+                }
+
+                ExportExceptionDataEntity exportExceptionDataEntity = new ExportExceptionDataEntity();
+                exportExceptionDataEntity.setCreaterSn(user.getUserId().toString());
+                exportExceptionDataEntity.setUserId(user.getUserId().intValue());
+                exportExceptionDataEntity.setCreateTime(new Date());
+                exportExceptionDataEntity.setModTime(new Date());
+                exportExceptionDataEntity.setMerchSn(merchSn);
+                exportExceptionDataEntity.setStoreId(user.getStoreId());
+                exportExceptionDataEntity.setExportDataType(Dict.exportDataType.item_3.getItem());
+
+                if(failEmailList != null && failEmailList.size() > 0){
+                    exportExceptionDataEntity.setExportExceptionData("邮箱格式不正确,请检查管理员excel中门店名称【"+ failEmailList +"】的邮箱列信息!");
+                    exportExceptionDataDao.save(exportExceptionDataEntity);
+                    throw new RRException("导入数据异常【邮箱格式不正确】,异常信息请在商品管理》》导入异常数据中查看检查");
+                }
+                if(failMobieList != null && failMobieList.size() > 0){
+                    exportExceptionDataEntity.setExportExceptionData("手机格式不正确,请检查管理员excel中门店名称【"+ failMobieList +"】的手机列信息!");
+                    exportExceptionDataDao.save(exportExceptionDataEntity);
+                    throw new RRException("导入数据异常【手机格式不正确】,异常信息请在商品管理》》导入异常数据中查看检查");
+                }
+                if(failRoleList != null && failRoleList.size() > 0){
+                    exportExceptionDataEntity.setExportExceptionData("角色信息不存在,请检查管理员excel中门店名称【"+ failRoleList +"】的角色名称列信息!");
+                    exportExceptionDataDao.save(exportExceptionDataEntity);
+                    throw new RRException("导入数据异常【角色信息不存在】,异常信息请在商品管理》》导入异常数据中查看检查");
+                }
+                if(failStoreNameList != null && failStoreNameList.size() > 0){
+                    exportExceptionDataEntity.setExportExceptionData("门店名称不存在,请检查管理员excel中门店名称【"+ failStoreNameList +"】的门店名称信息!");
+                    exportExceptionDataDao.save(exportExceptionDataEntity);
+                    throw new RRException("导入数据异常【门店名称不存在】,异常信息请在商品管理》》导入异常数据中查看检查");
+                }
+                if(failThirdMerchSnList != null && failThirdMerchSnList.size() > 0){
+                    exportExceptionDataEntity.setExportExceptionData("第三方商户代码不存在,请检查管理员excel中门店名称【"+failThirdMerchSnList+"】的第三方商户代码信息!");
+                    exportExceptionDataDao.save(exportExceptionDataEntity);
+                    throw new RRException("导入数据异常【第三方商户代码不存在】,异常信息请在商品管理》》导入异常数据中查看检查");
+                }
+                if(failMerchSnList != null && failMerchSnList.size() > 0){
+                    exportExceptionDataEntity.setExportExceptionData("商户编号不存在!请检查管理员excel中门店名称【" + failMerchSnList + "】的商户列信息!");
+                    exportExceptionDataDao.save(exportExceptionDataEntity);
+                    throw new RRException("导入数据异常【商户编号不存在】,异常信息请在商品管理》》导入异常数据中查看检查");
+                }
+                if(failRoleTypeList != null && failRoleTypeList.size() > 0){
+                    exportExceptionDataEntity.setExportExceptionData("商户编码不存在,请检查管理员excel中门店名称【"+failRoleTypeList+"】的角色类型列信息!");
+                    exportExceptionDataDao.save(exportExceptionDataEntity);
+                    throw new RRException("导入数据异常【商户编码不存在】,异常信息请在商品管理》》导入异常数据中查看检查");
+                }
+            }
+        }else{
+            throw new RRException("导入数据为空,或者检查数据是否为空");
+        }
+        throw new RRException("导入成功!");
+//        return 1;
+    }
 }

+ 3 - 0
kmall-admin/src/main/java/com/kmall/admin/service/AdService.java

@@ -1,5 +1,6 @@
 package com.kmall.admin.service;
 
+import com.kmall.admin.dto.CopyAdDto;
 import com.kmall.admin.entity.AdEntity;
 
 import java.util.List;
@@ -69,4 +70,6 @@ public interface AdService {
      * @return 删除条数
      */
     int deleteBatch(Integer[] ids);
+
+    int saveCopyAd(CopyAdDto copyAdDto);
 }

+ 7 - 0
kmall-admin/src/main/java/com/kmall/admin/service/BrandService.java

@@ -1,5 +1,8 @@
 package com.kmall.admin.service;
 
+import com.kmall.admin.dto.CateStoreDto;
+import com.kmall.admin.dto.CopyBrandDto;
+import com.kmall.admin.dto.CopyCategoryDto;
 import com.kmall.admin.entity.BrandEntity;
 
 import java.util.List;
@@ -69,4 +72,8 @@ public interface BrandService {
      * @return 删除条数
      */
     int deleteBatch(Integer[] ids);
+
+    CopyBrandDto checkBrandStoreUpload(List<CateStoreDto> cateStoreDtoList);
+
+    int saveCopyCategory(CopyBrandDto copyBrandDto);
 }

+ 6 - 0
kmall-admin/src/main/java/com/kmall/admin/service/CategoryService.java

@@ -1,5 +1,7 @@
 package com.kmall.admin.service;
 
+import com.kmall.admin.dto.CateStoreDto;
+import com.kmall.admin.dto.CopyCategoryDto;
 import com.kmall.admin.entity.CategoryEntity;
 
 import java.util.List;
@@ -69,4 +71,8 @@ public interface CategoryService {
      * @return 删除条数
      */
     int deleteBatch(Integer[] ids);
+
+    CopyCategoryDto checkCateStoreUpload(List<CateStoreDto> cateStoreDtoList);
+
+    int saveCopyCategory(CopyCategoryDto copyCategoryDto);
 }

+ 3 - 0
kmall-admin/src/main/java/com/kmall/admin/service/FreightService.java

@@ -1,5 +1,6 @@
 package com.kmall.admin.service;
 
+import com.kmall.admin.dto.CopyFreightDto;
 import com.kmall.admin.entity.FreightEntity;
 
 import java.util.List;
@@ -77,4 +78,6 @@ public interface FreightService {
      * @return 删除条数
      */
     int deleteBatch(Integer[] ids);
+
+    int saveCopyFreight(CopyFreightDto copyFreightDto);
 }

+ 12 - 0
kmall-admin/src/main/java/com/kmall/admin/service/OrderService.java

@@ -1,9 +1,11 @@
 package com.kmall.admin.service;
 
 import com.kmall.admin.dto.OrderExpressDto;
+import com.kmall.admin.dto.OrderRecognitionDto;
 import com.kmall.admin.entity.OfflineCartEntity;
 import com.kmall.admin.entity.OrderEntity;
 import com.kmall.admin.entity.OrderRefundEntity;
+import com.kmall.admin.entity.WxOrderEntity;
 import com.kmall.admin.fromcomm.entity.SysUserEntity;
 import com.kmall.manager.manager.wechat.wxglobal.dto.WechatGlobalRefundApiResult;
 import com.kmall.common.utils.print.ticket.item.Ticket;
@@ -117,4 +119,14 @@ public interface OrderService {
 
     int queryStoreTopicOrderTotal(Map<String, Object> map);
 
+    /**
+     * 获取ccnet需要重发的订单数据
+     * @param map
+     * @return
+     */
+    List<WxOrderEntity> wxOrderResendQueryAllList(Map<String, Object> map);
+
+    List<OrderRecognitionDto> queryOrderListByRecognition(Map<String, Object> map);
+
+    int queryOrderListByRecognitionTotal(Map<String, Object> map);
 }

+ 9 - 0
kmall-admin/src/main/java/com/kmall/admin/service/ProductStoreRelaService.java

@@ -1,5 +1,6 @@
 package com.kmall.admin.service;
 
+import com.kmall.admin.dto.StoreGoodsDto;
 import com.kmall.admin.entity.ProductStoreRelaEntity;
 
 import java.util.List;
@@ -108,4 +109,12 @@ public interface ProductStoreRelaService {
      * @return 总数
      */
     int queryGoodsRealListByTopicIdTotal(Map<String, Object> map);
+
+    /**
+     * 批量导入
+     *
+     * @param storeGoodsDtoList
+     * @return
+     */
+    int uploadExcel(List<StoreGoodsDto> storeGoodsDtoList);
 }

+ 14 - 0
kmall-admin/src/main/java/com/kmall/admin/service/StoreService.java

@@ -1,5 +1,7 @@
 package com.kmall.admin.service;
 
+import com.kmall.admin.dto.StoreDto;
+import com.kmall.admin.dto.StoreIdDto;
 import com.kmall.admin.entity.StoreEntity;
 
 import java.util.List;
@@ -69,4 +71,16 @@ public interface StoreService {
      * @return 删除条数
      */
     int deleteBatch(Integer[] ids);
+
+    /**
+     * 批量导入
+     *
+     * @param storeDtoList
+     * @return
+     */
+    int uploadExcel(List<StoreDto> storeDtoList);
+
+    List<StoreEntity> queryExportList(Map<String, Object> map);
+
+    String checkStoreIdUpload(List<StoreIdDto> storeIdDtoList);
 }

+ 7 - 0
kmall-admin/src/main/java/com/kmall/admin/service/UserService.java

@@ -69,4 +69,11 @@ public interface UserService {
      * @return 删除条数
      */
     int deleteBatch(Integer[] ids);
+
+    /**
+     * 根据用户id判断上次活体人脸核身时间是否在可调用范围内
+     * @param userId
+     * @return
+     */
+    Map checkFaceTimeByUserId(Long userId);
 }

+ 19 - 0
kmall-admin/src/main/java/com/kmall/admin/service/faceid/FaceIdService.java

@@ -0,0 +1,19 @@
+package com.kmall.admin.service.faceid;
+
+import com.kmall.admin.dto.FaceByOrderDto;
+import com.kmall.admin.entity.FaceLivenessRecognitionReturnDataEntity;
+
+/**
+ * @author huangyq
+ * @version 1.0
+ * 2019-11-27 14:13
+ */
+public interface FaceIdService {
+    String checkLivenessRecognition(FaceByOrderDto faceByOrderDto);
+
+    String sendWxTemp(long orderId);
+
+    String manualCheckFace(long orderId);
+
+    FaceLivenessRecognitionReturnDataEntity get(long id);
+}

+ 40 - 0
kmall-admin/src/main/java/com/kmall/admin/service/impl/AdServiceImpl.java

@@ -2,7 +2,10 @@ package com.kmall.admin.service.impl;
 
 import com.google.common.collect.ImmutableBiMap;
 import com.kmall.admin.dao.AdDao;
+import com.kmall.admin.dao.StoreDao;
+import com.kmall.admin.dto.CopyAdDto;
 import com.kmall.admin.entity.AdEntity;
+import com.kmall.admin.entity.StoreEntity;
 import com.kmall.admin.service.AdService;
 import com.kmall.common.utils.MapBeanUtil;
 import com.kmall.common.utils.R;
@@ -11,6 +14,8 @@ import com.kmall.common.utils.ValidatorUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -25,6 +30,8 @@ import java.util.Map;
 public class AdServiceImpl implements AdService {
     @Autowired
     private AdDao adDao;
+    @Autowired
+    private StoreDao storeDao;
 
     @Override
     public AdEntity queryObject(Integer id) {
@@ -82,4 +89,37 @@ public class AdServiceImpl implements AdService {
     public int deleteBatch(Integer[]ids) {
         return adDao.deleteBatch(ids);
     }
+
+    @Override
+    public int saveCopyAd(CopyAdDto copyAdDto){
+        AdEntity adEntity = adDao.queryObject(copyAdDto.getAdId());
+        if(adEntity != null){
+            List<Integer> storeIdList = new ArrayList<>();
+            String[] storeIds = copyAdDto.getStoreList().split(";");
+            for(int i = 0; i < storeIds.length; i++){
+                storeIdList.add(Integer.valueOf(storeIds[i]));
+            }
+            for(int i = 0; i < storeIdList.size(); i++){
+                AdEntity ad = new AdEntity();
+                StoreEntity storeEntity = storeDao.queryObject(storeIdList.get(i));
+                if(storeEntity == null){
+                    throw new RRException("门店不存在");
+                }
+                ad.setName(adEntity.getName());
+                ad.setAdPositionId(adEntity.getAdPositionId());
+                ad.setMediaType(adEntity.getMediaType());
+                ad.setSortOrder(adEntity.getSortOrder());
+                ad.setLink(adEntity.getLink());
+                ad.setImageUrl(adEntity.getImageUrl());
+                ad.setContent(adEntity.getContent());
+                ad.setEndTime(adEntity.getEndTime());
+                ad.setEnabled(adEntity.getEnabled());
+                ad.setMerchSn(storeEntity.getMerchSn());
+                ad.setStoreId(storeIdList.get(i));
+                //复制广告信息不保存其他门店的优惠券、活动
+                adDao.save(ad);
+            }
+        }
+        return 1;
+    }
 }

+ 111 - 7
kmall-admin/src/main/java/com/kmall/admin/service/impl/BrandServiceImpl.java

@@ -1,14 +1,20 @@
 package com.kmall.admin.service.impl;
 
-import com.kmall.admin.dao.BrandDao;
-import com.kmall.admin.dao.GoodsDao;
-import com.kmall.admin.entity.BrandEntity;
-import com.kmall.admin.entity.GoodsEntity;
+import com.google.common.collect.ImmutableBiMap;
+import com.kmall.admin.dao.*;
+import com.kmall.admin.dto.CateStoreDto;
+import com.kmall.admin.dto.CopyBrandDto;
+import com.kmall.admin.entity.*;
 import com.kmall.admin.service.BrandService;
+import com.kmall.common.constant.Dict;
+import com.kmall.common.utils.MapBeanUtil;
+import com.kmall.common.utils.R;
 import com.kmall.common.utils.RRException;
+import com.kmall.common.utils.ValidatorUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -25,7 +31,11 @@ public class BrandServiceImpl implements BrandService {
     @Autowired
     private BrandDao brandDao;
     @Autowired
-    private GoodsDao goodsDao;
+    private ProductStoreRelaDao productStoreRelaDao;
+    @Autowired
+    private StoreDao storeDao;
+    @Autowired
+    private CategoryDao categoryDao;
 
     @Override
     public BrandEntity queryObject(Integer id) {
@@ -63,15 +73,109 @@ public class BrandServiceImpl implements BrandService {
             BrandEntity brand = queryObject(id);
 
             Map<String, Object> map = new HashMap<>();
+            map.put("storeId", brand.getStoreId());
             map.put("brandId", id);
-            List<GoodsEntity> goodsList = goodsDao.queryList(map);
+            List<ProductStoreRelaEntity> goodsList = productStoreRelaDao.queryList(map);
 
             if (goodsList != null && goodsList.size() > 0) {
-                throw new RRException("品牌【" + brand.getName() + "】下还存在【" + goodsList.size() + "】个商品,删除失败!");
+                throw new RRException("门店【"+brand.getStoreId()+"】品牌【" + brand.getName() + "】下还存在【" + goodsList.size() + "】个商品,删除失败!");
             }
             delete(id);
         }
 
         return 1;
     }
+
+    /**
+     * 检查批量导入品牌数据
+     * @param cateStoreDtoList
+     * @return
+     */
+    @Override
+    public CopyBrandDto checkBrandStoreUpload(List<CateStoreDto> cateStoreDtoList){
+        Boolean isFalse = false;
+        List<String> storeIdErrorList = new ArrayList<>();
+        List<String> cateIdErrorList = new ArrayList<>();
+        for(CateStoreDto cateStoreDto : cateStoreDtoList) {
+            Map<String, Object> valideDate = MapBeanUtil.fromObject(cateStoreDto);
+            ImmutableBiMap.Builder builder = new ImmutableBiMap.Builder();
+            builder.put("categoryId", "分类id");
+            builder.put("storeId", "门店id");
+            R r = ValidatorUtil.isEmpty(builder.build(), valideDate);
+            if (Integer.valueOf(r.get("code").toString()) != 0) {
+                throw new RRException(r.get("msg").toString());
+            }
+            StoreEntity storeEntity = storeDao.queryObject(cateStoreDto.getStoreId());
+            if (storeEntity == null) {
+                isFalse = true;
+                storeIdErrorList.add(cateStoreDto.getStoreId());
+            }
+            CategoryEntity categoryEntity = categoryDao.queryObject(cateStoreDto.getCategoryId());
+            if (categoryEntity == null) {
+                isFalse = true;
+                cateIdErrorList.add(cateStoreDto.getCategoryId());
+            }else{
+                if(categoryEntity.getStoreId() != Integer.parseInt(cateStoreDto.getStoreId())){
+                    throw new RRException("分类id【" + cateStoreDto.getCategoryId() + "】不属于门店id【"+cateStoreDto.getStoreId()+"】内,请检查");
+                }
+            }
+        }
+        if(isFalse){
+            if(storeIdErrorList!=null && storeIdErrorList.size()>0){
+                throw new RRException("门店id不存在,不存在id【" + storeIdErrorList + "】");
+            }
+            if(cateIdErrorList!=null && cateIdErrorList.size()>0){
+                throw new RRException("分类id不存在,不存在id【" + cateIdErrorList + "】");
+            }
+        }else{
+            CopyBrandDto copyBrandDto = new CopyBrandDto();
+            StringBuffer storeIds = new StringBuffer();
+            StringBuffer cateIds = new StringBuffer();
+            for(CateStoreDto cateStoreDto : cateStoreDtoList){
+                storeIds.append(cateStoreDto.getStoreId()+";");
+                cateIds.append(cateStoreDto.getCategoryId()+";");
+            }
+            copyBrandDto.setStoreList(storeIds.toString());
+            copyBrandDto.setCategoryList(cateIds.toString());
+            return copyBrandDto;
+        }
+        return null;
+    }
+
+    public int saveCopyCategory(CopyBrandDto copyBrandDto){
+        BrandEntity brandEntity = brandDao.queryObject(copyBrandDto.getBrandId());
+        if(brandEntity != null){
+            List<Integer> storeIdList = new ArrayList<>();
+            List<Integer> cateIdList = new ArrayList<>();
+            String[] storeIds = copyBrandDto.getStoreList().split(";");
+            String[] cateIds = copyBrandDto.getCategoryList().split(";");
+            for(int i = 0; i < storeIds.length; i++){
+                storeIdList.add(Integer.valueOf(storeIds[i]));
+                cateIdList.add(Integer.valueOf(cateIds[i]));
+            }
+            for(int i = 0; i < storeIdList.size(); i++){
+                BrandEntity brand = new BrandEntity();
+                StoreEntity storeEntity = storeDao.queryObject(storeIdList.get(i));
+                if(storeEntity == null){
+                    throw new RRException("门店不存在");
+                }
+                brand.setName(brandEntity.getName());
+                brand.setListPicUrl(brandEntity.getListPicUrl());
+                brand.setSimpleDesc(brandEntity.getSimpleDesc());
+                brand.setPicUrl(brandEntity.getPicUrl());
+                brand.setSortOrder(brandEntity.getSortOrder());
+                brand.setIsShow(brandEntity.getIsShow());
+                brand.setFloorPrice(brandEntity.getFloorPrice());
+                brand.setAppListPicUrl(brandEntity.getAppListPicUrl());
+                brand.setIsNew(brandEntity.getIsNew());
+                brand.setNewPicUrl(brandEntity.getNewPicUrl());
+                brand.setNewSortOrder(brandEntity.getNewSortOrder());
+                brand.setCategoryId(cateIdList.get(i));
+                brand.setMerchSn(storeEntity.getMerchSn());
+                brand.setStoreId(storeIdList.get(i));
+                brandDao.save(brand);
+            }
+        }
+        return 1;
+    }
 }

+ 148 - 1
kmall-admin/src/main/java/com/kmall/admin/service/impl/CategoryServiceImpl.java

@@ -4,9 +4,13 @@ import com.google.common.collect.ImmutableBiMap;
 import com.kmall.admin.dao.CategoryDao;
 import com.kmall.admin.dao.GoodsDao;
 import com.kmall.admin.dao.ProductStoreRelaDao;
+import com.kmall.admin.dao.StoreDao;
+import com.kmall.admin.dto.CateStoreDto;
+import com.kmall.admin.dto.CopyCategoryDto;
 import com.kmall.admin.entity.CategoryEntity;
 import com.kmall.admin.entity.GoodsEntity;
 import com.kmall.admin.entity.ProductStoreRelaEntity;
+import com.kmall.admin.entity.StoreEntity;
 import com.kmall.admin.service.CategoryService;
 import com.kmall.common.constant.Dict;
 import com.kmall.common.utils.MapBeanUtil;
@@ -16,6 +20,7 @@ import com.kmall.common.utils.ValidatorUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -33,6 +38,8 @@ public class CategoryServiceImpl implements CategoryService {
     private CategoryDao categoryDao;
     @Autowired
     private ProductStoreRelaDao productStoreRelaDao;
+    @Autowired
+    private StoreDao storeDao;
 
     @Override
     public CategoryEntity queryObject(Integer id) {
@@ -94,7 +101,21 @@ public class CategoryServiceImpl implements CategoryService {
 
     @Override
     public int delete(Integer id) {
-        return categoryDao.delete(id);
+        CategoryEntity categoryEntity = categoryDao.queryObject(id);
+        if(categoryEntity != null){
+            if(categoryEntity.getLevel().equalsIgnoreCase(Dict.Level.item_L1.getItem())){//一级分类先删除二级分类
+                Map map = new HashMap();
+                map.put("parentId", categoryEntity.getId());
+                List<CategoryEntity> list = categoryDao.queryList(map);
+                for(CategoryEntity category: list){
+                    categoryDao.delete(category.getId());
+                }
+                categoryDao.delete(id);
+            }else{
+                return categoryDao.delete(id);
+            }
+        }
+        return 1;
     }
 
     @Override
@@ -112,6 +133,7 @@ public class CategoryServiceImpl implements CategoryService {
                         map.clear();
                         map.put("categoryId", categoryEntity.getId());
                         map.put("isDelete", Dict.isDelete.item_1.getItem());
+                        map.put("storeId", categoryEntity.getStoreId());
                         List<ProductStoreRelaEntity> storeRelaEntityList = productStoreRelaDao.queryList(map);
                         if (storeRelaEntityList != null) {
                             goodsTotal += storeRelaEntityList.size();
@@ -139,4 +161,129 @@ public class CategoryServiceImpl implements CategoryService {
         }
         return 1;
     }
+
+    @Override
+    public CopyCategoryDto checkCateStoreUpload(List<CateStoreDto> cateStoreDtoList){
+        Boolean isFalse = false;
+        List<String> storeIdErrorList = new ArrayList<>();
+        List<String> cateIdErrorList = new ArrayList<>();
+        for(CateStoreDto cateStoreDto : cateStoreDtoList) {
+            Map<String, Object> valideDate = MapBeanUtil.fromObject(cateStoreDto);
+            ImmutableBiMap.Builder builder = new ImmutableBiMap.Builder();
+            builder.put("categoryId", "分类id");
+            builder.put("storeId", "门店id");
+            R r = ValidatorUtil.isEmpty(builder.build(), valideDate);
+            if (Integer.valueOf(r.get("code").toString()) != 0) {
+                throw new RRException(r.get("msg").toString());
+            }
+            StoreEntity storeEntity = storeDao.queryObject(cateStoreDto.getStoreId());
+            if (storeEntity == null) {
+                isFalse = true;
+                storeIdErrorList.add(cateStoreDto.getStoreId());
+            }
+            CategoryEntity categoryEntity = categoryDao.queryObject(cateStoreDto.getCategoryId());
+            if (categoryEntity == null) {
+                isFalse = true;
+                cateIdErrorList.add(cateStoreDto.getCategoryId());
+            }
+        }
+        if(isFalse){
+            if(storeIdErrorList!=null && storeIdErrorList.size()>0){
+                throw new RRException("门店id不存在,不存在id【" + storeIdErrorList + "】");
+            }
+            if(cateIdErrorList!=null && cateIdErrorList.size()>0){
+                throw new RRException("分类id不存在,不存在id【" + cateIdErrorList + "】");
+            }
+        }else{
+            CopyCategoryDto copyCategoryDto = new CopyCategoryDto();
+            StringBuffer storeIds = new StringBuffer();
+            StringBuffer cateIds = new StringBuffer();
+            for(CateStoreDto cateStoreDto : cateStoreDtoList){
+                storeIds.append(cateStoreDto.getStoreId()+";");
+                cateIds.append(cateStoreDto.getCategoryId()+";");
+            }
+            copyCategoryDto.setStoreList(storeIds.toString());
+            copyCategoryDto.setCategoryList(cateIds.toString());
+            return copyCategoryDto;
+        }
+        return null;
+    }
+
+    public int saveCopyCategory(CopyCategoryDto copyCategoryDto){
+        CategoryEntity categoryEntity = categoryDao.queryObject(copyCategoryDto.getCategoryId());
+        if(categoryEntity != null){
+            if(Dict.Level.item_L1.getItem().equalsIgnoreCase(categoryEntity.getLevel())){
+                List<Integer> storeIdList = new ArrayList<>();
+                String[] storeIds = copyCategoryDto.getStoreList().split(";");
+                for(int i = 0; i < storeIds.length; i++){
+                    storeIdList.add(Integer.valueOf(storeIds[i]));
+                }
+                for(int i = 0; i < storeIdList.size(); i++){
+                    CategoryEntity category = new CategoryEntity();
+                    category.setParentId(categoryEntity.getParentId());
+                    StoreEntity storeEntity = storeDao.queryObject(storeIdList.get(i));
+                    if(storeEntity == null){
+                        throw new RRException("门店不存在");
+                    }
+                    category.setName(categoryEntity.getName());
+                    category.setKeywords(categoryEntity.getKeywords());
+                    category.setFrontDesc(categoryEntity.getFrontDesc());
+                    category.setSortOrder(categoryEntity.getSortOrder());
+
+                    category.setShowIndex(categoryEntity.getShowIndex());
+                    category.setIsShow(categoryEntity.getIsShow());
+                    category.setBannerUrl(categoryEntity.getBannerUrl());
+                    category.setIconUrl(categoryEntity.getIconUrl());
+                    category.setImgUrl(categoryEntity.getImgUrl());
+                    category.setWapBannerUrl(categoryEntity.getWapBannerUrl());
+                    category.setLevel(categoryEntity.getLevel());
+                    category.setType(categoryEntity.getType());
+                    category.setFrontName(categoryEntity.getFrontName());
+                    category.setMerchSn(storeEntity.getMerchSn());
+                    category.setStoreId(storeIdList.get(i));
+                    categoryDao.save(category);
+                }
+            }else {
+                List<Integer> storeIdList = new ArrayList<>();
+                List<Integer> categoryIdList = new ArrayList<>();
+                String[] storeIds = copyCategoryDto.getStoreList().split(";");
+                String[] categoryIds = copyCategoryDto.getCategoryList().split(";");
+                for(int i = 0; i < storeIds.length; i++){
+                    storeIdList.add(Integer.valueOf(storeIds[i]));
+                    categoryIdList.add(Integer.valueOf(categoryIds[i]));
+                }
+                for(int i = 0; i < storeIdList.size(); i++){
+                    CategoryEntity category = new CategoryEntity();
+                    StoreEntity storeEntity = storeDao.queryObject(storeIdList.get(i));
+                    if(storeEntity == null){
+                        throw new RRException("门店不存在");
+                    }
+                    CategoryEntity parentCateEntity = categoryDao.queryObject(categoryIdList.get(i));
+                    if(parentCateEntity == null){
+                        throw new RRException("分类不存在");
+                    }
+                    category.setParentId(categoryIdList.get(i));
+                    category.setName(categoryEntity.getName());
+                    category.setKeywords(categoryEntity.getKeywords());
+                    category.setFrontDesc(categoryEntity.getFrontDesc());
+                    category.setSortOrder(categoryEntity.getSortOrder());
+
+                    category.setShowIndex(categoryEntity.getShowIndex());
+                    category.setIsShow(categoryEntity.getIsShow());
+                    category.setBannerUrl(categoryEntity.getBannerUrl());
+                    category.setIconUrl(categoryEntity.getIconUrl());
+                    category.setImgUrl(categoryEntity.getImgUrl());
+                    category.setWapBannerUrl(categoryEntity.getWapBannerUrl());
+                    category.setLevel(categoryEntity.getLevel());
+                    category.setType(categoryEntity.getType());
+                    category.setFrontName(categoryEntity.getFrontName());
+                    category.setMerchSn(storeEntity.getMerchSn());
+                    category.setStoreId(storeIdList.get(i));
+                    categoryDao.save(category);
+                }
+
+            }
+        }
+        return 1;
+    }
 }

+ 64 - 16
kmall-admin/src/main/java/com/kmall/admin/service/impl/FreightServiceImpl.java

@@ -1,12 +1,9 @@
 package com.kmall.admin.service.impl;
 
 import com.google.common.collect.ImmutableBiMap;
-import com.kmall.admin.dao.FreightDao;
-import com.kmall.admin.dao.FreightItemDao;
-import com.kmall.admin.dao.GoodsDao;
-import com.kmall.admin.entity.FreightEntity;
-import com.kmall.admin.entity.FreightItemEntity;
-import com.kmall.admin.entity.GoodsEntity;
+import com.kmall.admin.dao.*;
+import com.kmall.admin.dto.CopyFreightDto;
+import com.kmall.admin.entity.*;
 import com.kmall.admin.service.FreightService;
 import com.kmall.common.utils.MapBeanUtil;
 import com.kmall.common.utils.R;
@@ -16,6 +13,7 @@ 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.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -35,7 +33,9 @@ public class FreightServiceImpl
     @Autowired
     private FreightItemDao freightItemDao;
     @Autowired
-    private GoodsDao goodsDao;
+    private ProductStoreRelaDao productStoreRelaDao;
+    @Autowired
+    private StoreDao storeDao;
 
     @Override
     public FreightEntity queryObject(Integer id) {
@@ -160,15 +160,15 @@ public class FreightServiceImpl
     @Override
     public int delete(Integer id) {
         Map<String, Object> map = new HashMap<>();
+        map.put("storeId", queryObject(id).getStoreId());
         map.put("freightId", id);
-        List<GoodsEntity> list = goodsDao.queryList(map);
+//        List<GoodsEntity> list = goodsDao.queryList(map);
+        List<ProductStoreRelaEntity> list = productStoreRelaDao.queryList(map);
 
         if (list != null && list.size() > 0) {
             throw new RRException("此运费模版还有【" + list.size() + "】商品正在使用,不能删除!");
         }
-        if (freightItemDao.deleteByFreId(id) <= 0) {
-            throw new RRException("删除此运费模版详情失败!");
-        }
+        freightItemDao.deleteByFreId(id);
 
         return freightDao.delete(id);
     }
@@ -177,17 +177,65 @@ public class FreightServiceImpl
     public int deleteBatch(Integer[] ids) {
         for (int id : ids) {
             Map<String, Object> map = new HashMap<>();
+            Integer storeId = queryObject(id).getStoreId();
+            map.put("storeId", storeId);
             map.put("freightId", id);
             map.put("isDelete", 0);
-            List<GoodsEntity> list = goodsDao.queryList(map);
+            List<ProductStoreRelaEntity> list = productStoreRelaDao.queryList(map);
 
             if (list != null && list.size() > 0) {
-                throw new RRException("【" + id + "】运费模版还有【" + list.size() + "】个商品正在使用,不能删除!");
-            }
-            if (freightItemDao.deleteByFreId(id) <= 0) {
-                throw new RRException("删除【" + id + "】运费模版详情失败!");
+                throw new RRException("门店【"+ storeId +"】运费模版【" + id + "】还有【" + list.size() + "】个商品正在使用,不能删除!");
             }
+            freightItemDao.deleteByFreId(id);
         }
         return freightDao.deleteBatch(ids);
     }
+
+    @Override
+    @Transactional
+    public int saveCopyFreight(CopyFreightDto copyFreightDto){
+        FreightEntity freightEntity = freightDao.queryObject(copyFreightDto.getFreightId());
+        if(freightEntity != null){
+            List<Integer> storeIdList = new ArrayList<>();
+            String[] storeIds = copyFreightDto.getStoreList().split(";");
+            for(int i = 0; i < storeIds.length; i++){
+                storeIdList.add(Integer.valueOf(storeIds[i]));
+            }
+            for(int i = 0; i < storeIdList.size(); i++){
+                FreightEntity freight = new FreightEntity();
+                StoreEntity storeEntity = storeDao.queryObject(storeIdList.get(i));
+                if(storeEntity == null){
+                    throw new RRException("门店不存在");
+                }
+                Map<String, Object> map = new HashMap<>();
+                map.put("storeId", storeEntity.getId());
+                map.put("merchSn", storeEntity.getMerchSn());
+                map.put("name", freightEntity.getName());
+                List<FreightEntity> list = queryList(map);
+                if (list != null && list.size() != 0) {
+                    throw new RRException("excel中的门店id【"+storeIdList.get(i)+"】运费模版名称【"+freightEntity.getName()+"】已存在!请检查!");
+                }
+                freight.setName(freightEntity.getName());
+                freight.setTemplateType(freightEntity.getTemplateType());
+                freight.setPricingManner(freightEntity.getPricingManner());
+                freight.setDefaultFreight(freightEntity.getDefaultFreight());
+                freight.setIsDefault(freightEntity.getIsDefault());
+                freight.setMerchSn(storeEntity.getMerchSn());
+                freight.setStoreId(storeIdList.get(i));
+                freightDao.save(freight);
+                FreightItemEntity itemEntity = freightItemDao.queryObjectByFreightId(freightEntity.getId());
+                if(itemEntity != null){
+                    FreightItemEntity freightItemEntity = new FreightItemEntity();
+                    freightItemEntity.setFreId(freight.getId());//新增的运费id
+                    freightItemEntity.setDeliveryArea(itemEntity.getDeliveryArea());
+                    freightItemEntity.setFirstPiece(itemEntity.getFirstPiece());
+                    freightItemEntity.setFreight(itemEntity.getFreight());
+                    freightItemEntity.setContinuePiece(itemEntity.getContinuePiece());
+                    freightItemEntity.setRenew(itemEntity.getRenew());
+                    freightItemDao.save(freightItemEntity);
+                }
+            }
+        }
+        return 1;
+    }
 }

+ 2 - 2
kmall-admin/src/main/java/com/kmall/admin/service/impl/GoodsServiceImpl.java

@@ -935,9 +935,9 @@ public class GoodsServiceImpl implements GoodsService {
             exportExceptionDataEntity.setMerchSn(merchSn);
             exportExceptionDataEntity.setStoreId(user.getStoreId());
             if(exportDataType == 1) {
-                exportExceptionDataEntity.setExportDataType("1");
+                exportExceptionDataEntity.setExportDataType(Dict.exportDataType.item_1.getItem());
             }else{
-                exportExceptionDataEntity.setExportDataType("2");
+                exportExceptionDataEntity.setExportDataType(Dict.exportDataType.item_2.getItem());
             }
             if(failMerchUserGoodsSnList != null && failMerchUserGoodsSnList.size() > 0){
                 exportExceptionDataEntity.setExportExceptionData("不能操作除了登录用户以外商户的商品,当前商户编号为【"+merchSn+"】,请检查商品编码【"+failMerchUserGoodsSnList+"】的商品信息");

+ 57 - 1
kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderServiceImpl.java

@@ -6,10 +6,13 @@ import com.google.common.collect.Maps;
 import com.kmall.admin.dao.*;
 import com.kmall.admin.dao.mk.store.MkStorePromOrderRealDao;
 import com.kmall.admin.dto.OrderExpressDto;
+import com.kmall.admin.dto.OrderRecognitionDto;
 import com.kmall.admin.entity.*;
 import com.kmall.admin.entity.OrderProcessRecordEntity;
 import com.kmall.admin.entity.mk.store.MkStorePromOrderRealEntity;
-import com.kmall.api.entity.mk.MkStorePromOrderRealVo;
+import com.kmall.admin.fromcomm.dao.SysConfigDao;
+import com.kmall.admin.service.UserService;
+import com.kmall.common.utils.ResponseData;
 import com.kmall.manager.manager.express.sf.properties.SFPropertiesBuilder;
 import com.kmall.manager.manager.express.sf.properties.SFUtil;
 import com.kmall.manager.manager.express.sf.entity.SfRouteServiceResponseEntity;
@@ -75,6 +78,10 @@ public class OrderServiceImpl implements OrderService {
     private MkStorePromOrderRealDao mkStorePromOrderRealDao;
     @Autowired
     private UserCampMinusDao userCampMinusDao;
+    @Autowired
+    private UserService userService;
+    @Autowired
+    private SysConfigDao sysConfigDao;
 
     @Override
     public OrderEntity queryObject(Long id) {
@@ -1189,4 +1196,53 @@ public class OrderServiceImpl implements OrderService {
     public int queryStoreTopicOrderTotal(Map<String, Object> map) {
         return orderDao.queryStoreTopicOrderTotal(map);
     }
+
+    @Override
+    public List<WxOrderEntity> wxOrderResendQueryAllList(Map<String, Object> map){
+//        String requestData = JacksonUtil.toJson(map);
+        String url = OmsMerchPropertiesBuilder.instance().getWxOrderResendUrl();
+        // 同步访问,返回结果字符串
+        String response = OkHttpUtils.post(map, url, "SSL");
+        ResponseData responseData = JacksonUtils.fromStringJson(response, ResponseData.class);
+        if(responseData.getCode().equalsIgnoreCase("0")){
+            List<WxOrderEntity> list = responseData.getData().getRows();
+            return list;
+        }
+        return null;
+    }
+    @Override
+    public List<OrderRecognitionDto> queryOrderListByRecognition(Map<String, Object> map){
+        String value = sysConfigDao.queryByKey("FACE_COLLECT_FREQUENCY_TIME");
+        if(value==null){
+            throw new RRException("请联系管理员配系统参数置FACE_COLLECT_FREQUENCY_TIME信息!");
+        }
+        List<OrderRecognitionDto> list = orderDao.queryOrderListByRecognition(map);
+        for (OrderRecognitionDto orderRecognitionDto: list){
+            Integer frequencySecondTime = Integer.parseInt(value);
+            String lastFaceTime = orderRecognitionDto.getLastFaceTime();
+            if(StringUtils.isNotEmpty(lastFaceTime)) {
+                Date lastFaceDate = DateUtils.convertStringToDate(lastFaceTime, DateUtils.DATE_TIME_PATTERN);
+                Calendar calendar = Calendar.getInstance();
+                calendar.setTime(lastFaceDate);
+                calendar.add(Calendar.SECOND, frequencySecondTime);
+                Date addSecondTime = calendar.getTime();
+                Date nowDate = new Date();
+                if (addSecondTime.getTime() > nowDate.getTime()) {
+                    orderRecognitionDto.setAddSecondTime(DateUtils.format(addSecondTime,DateUtils.DATE_TIME_PATTERN));
+                    orderRecognitionDto.setIsDateLast("false");
+                } else {
+                    //可调用身份验证范围内
+                    orderRecognitionDto.setIsDateLast("true");
+                }
+            }else{//可调用身份验证范围内
+                orderRecognitionDto.setIsDateLast("true");
+            }
+        }
+        return list;
+    }
+
+    @Override
+    public int queryOrderListByRecognitionTotal(Map<String, Object> map){
+        return orderDao.queryOrderListByRecognitionTotal(map);
+    }
 }

+ 303 - 17
kmall-admin/src/main/java/com/kmall/admin/service/impl/ProductStoreRelaServiceImpl.java

@@ -4,6 +4,7 @@ import com.google.common.collect.ImmutableBiMap;
 import com.google.common.collect.Maps;
 import com.kmall.admin.dao.*;
 import com.kmall.admin.dao.mk.dist.MkDistSellAllocationDao;
+import com.kmall.admin.dto.StoreGoodsDto;
 import com.kmall.admin.entity.*;
 import com.kmall.admin.entity.mk.dist.MkDistSellAllocationEntity;
 import com.kmall.admin.service.ProductStoreRelaService;
@@ -17,10 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * Service实现类
@@ -60,7 +58,13 @@ public class ProductStoreRelaServiceImpl implements ProductStoreRelaService {
     @Autowired
     private StoreDao storeDao;
     @Autowired
+    private MerchDao merchDao;
+    @Autowired
+    private ThirdMerchantBizDao thirdMerchantBizDao;
+    @Autowired
     private MerchUserDao merchUserDao;
+    @Autowired
+    private ExportExceptionDataDao exportExceptionDataDao;
 
     @Override
     public ProductStoreRelaEntity queryObject(Integer id) {
@@ -128,7 +132,7 @@ public class ProductStoreRelaServiceImpl implements ProductStoreRelaService {
                 builder.put("specification", "规格");
             }
             builder.put("retailPrice", "零售价");
-            builder.put("marketPrice", "市场价");
+//            builder.put("marketPrice", "市场价");
             r = ValidatorUtil.isEmpty(builder.build(), valideDate);
             if (Integer.valueOf(r.get("code").toString()) != 0) {
                 throw new RRException(r.get("msg").toString());
@@ -171,12 +175,6 @@ public class ProductStoreRelaServiceImpl implements ProductStoreRelaService {
         SysUserEntity user = ShiroUtils.getUserEntity();
         ProductEntity product = productDao.queryObjectByGoodsIdAndStoreId(goodsId, "");
 
-//        GoodsEntity goods = new GoodsEntity();
-//        goods.setRetailPrice(productStoreRela.getRetailPrice());
-//        goods.setMarketPrice(productStoreRela.getMarketPrice());
-//        goods.setId(goodsEntity.getId());
-//        goodsDao.update(goods);
-
         if (Dict.orderBizType.item_11.getItem().equals(goodsEntity.getGoodsBizType())) {
             GoodsSpecificationEntity goodsSpecificationEntity = goodsSpecificationDao.queryByGoodsId(goodsEntity.getId());
             if(goodsSpecificationEntity != null){
@@ -204,10 +202,7 @@ public class ProductStoreRelaServiceImpl implements ProductStoreRelaService {
                 product.setGoodsSpecificationNameValue(goodsSpecification.getValue());
                 productDao.update(product);
             }
-        }/* else {
-            productStoreRela.setRetailPrice(goodsEntity.getRetailPrice());
-            productStoreRela.setMarketPrice(goodsEntity.getMarketPrice());
-        }*/
+        }
 
         // 添加商品参数
         List<GoodsAttributeEntity> attributeEntityList = productStoreRela.getAttributeEntityList();
@@ -245,7 +240,7 @@ public class ProductStoreRelaServiceImpl implements ProductStoreRelaService {
         storeMngChangeEntity.setIsValid(0);
         storeMngChangeDao.save(storeMngChangeEntity);
 
-        //更新门店商品是否有修改字段
+        //更新门店商品是否有修改字段为是
         updateLoadGoodsByStoreId(storeId, user);
 
         productStoreRela.setAttributeCategory(categoryDao.queryObject(productStoreRela.getCategoryId()).getParentId());
@@ -303,7 +298,7 @@ public class ProductStoreRelaServiceImpl implements ProductStoreRelaService {
                 builder.put("specification", "规格");
             }
             builder.put("retailPrice", "零售价");
-            builder.put("marketPrice", "市场价");
+//            builder.put("marketPrice", "市场价");
             r = ValidatorUtil.isEmpty(builder.build(), valideDate);
             if (Integer.valueOf(r.get("code").toString()) != 0) {
                 throw new RRException(r.get("msg").toString());
@@ -401,6 +396,9 @@ public class ProductStoreRelaServiceImpl implements ProductStoreRelaService {
                 }
             }
         }
+        if(productStoreRela.getMarketPrice()==null){
+            productStoreRela.setMarketPrice(Constant.ZERO);
+        }
         Map cartMap = Maps.newHashMap();
         cartMap.put("goodsId",goodsEntity.getId());
         List<CartEntity> cartList = cartDao.queryList(cartMap);
@@ -531,4 +529,292 @@ public class ProductStoreRelaServiceImpl implements ProductStoreRelaService {
         return productStoreRelaDao.queryGoodsRealListByTopicIdTotal(map);
     }
 
+    @Override
+    public int uploadExcel(List<StoreGoodsDto> storeGoodsDtoList){
+        GoodsEntity goodsEntity = null;
+        String isStockShare = "";
+        SysUserEntity user = ShiroUtils.getUserEntity();
+        String merchSn = user.getMerchSn();
+        boolean isFail = false;
+        List<String> failThirdMerchSnList = new ArrayList<>(),
+                failGoodsSnList = new ArrayList<>(), failHaveNameList = new ArrayList<>(), failHaveGoodsSnList = new ArrayList<>()
+                , failParentCateList = new ArrayList<>(), failCateList = new ArrayList<>(), failHaveStoreNameList = new ArrayList<>()
+                , failBrandList = new ArrayList<>(), failFreightList = new ArrayList<>();
+        if (storeGoodsDtoList != null && storeGoodsDtoList.size() > 0) {
+            for (int i = 0; i < storeGoodsDtoList.size(); i++) {
+                StoreGoodsDto storeGoodsDto = storeGoodsDtoList.get(i);
+                ProductStoreRelaEntity storeRelaEntity = new ProductStoreRelaEntity();
+                Map<String, Object> valideDate = MapBeanUtil.fromObject(storeGoodsDto);
+                ImmutableBiMap.Builder builder = new ImmutableBiMap.Builder();
+                builder.put("storeName", "门店名称");
+                builder.put("goodsSn", "商品编码");
+                builder.put("categoryName", "一级分类");
+                builder.put("attributeCategory", "二级分类");
+                builder.put("brandName", "品牌");
+                builder.put("freightName", "运费");
+
+                R r = ValidatorUtil.isEmpty(builder.build(), valideDate);
+                if (Integer.valueOf(r.get("code").toString()) != 0) {
+                    throw new RRException(r.get("msg").toString());
+                }
+                StoreEntity store = storeDao.queryObjectByName(storeGoodsDto.getStoreName().trim());
+                if (store != null) {
+                    storeRelaEntity.setStoreId(store.getId());
+                    storeRelaEntity.setMerchSn(store.getMerchSn());
+                    MerchEntity merchEntity = merchDao.findByMerchSn(store.getMerchSn());
+                    if(merchEntity != null){
+                        storeRelaEntity.setMerchName(merchEntity.getMerchName());
+                    }
+                    goodsEntity = goodsDao.queryGoodsByGoodsSnAndStoreId(storeGoodsDto.getGoodsSn(), store.getId());
+                    if(goodsEntity == null){//商品不存在
+                        isFail = true;
+                        failGoodsSnList.add(storeGoodsDto.getStoreName());
+                    }else {
+                        storeRelaEntity.setSku(goodsEntity.getSku());
+                        storeRelaEntity.setGoodsId(goodsEntity.getId());
+                        storeRelaEntity.setGoodsBizType(goodsEntity.getGoodsBizType());
+                        isStockShare = StockUtil.getIsStockShareByGoodsEntity(goodsEntity.getIsSupplierGoods(),
+                                goodsEntity.getIsStockShare(), goodsEntity.getIsStockShareBySuppler());
+
+                        if(goodsEntity.getIsSupplierGoods().equalsIgnoreCase(Dict.isSupplierGoods.item_1.getItem())) {
+                            builder.put("supplierThirdName", "商品供货商所属第三方商户");
+                        }
+                        if(Dict.orderBizType.item_00.getItem().equalsIgnoreCase(goodsEntity.getGoodsBizType())){
+                            if(Dict.isStockShare.item_0.getItem().equalsIgnoreCase(isStockShare)){
+                                builder.put("stockNum", "库存");
+                            }
+                        }else{
+                            builder.put("stockNum", "库存");
+                        }
+                        if (Dict.orderBizType.item_11.getItem().equals(goodsEntity.getGoodsBizType())) {
+                            // 普通商品校验商品规格
+                            builder.put("specification", "产品规格");
+                        }
+                        builder.put("retailPrice", "零售价");
+                        builder.put("marketPrice", "市场价");
+                        r = ValidatorUtil.isEmpty(builder.build(), valideDate);
+                        if (Integer.valueOf(r.get("code").toString()) != 0) {
+                            throw new RRException(r.get("msg").toString());
+                        }
+                        //商品配置校验
+                        if(!StringUtils.isNotEmpty(goodsEntity.getListPicUrl())){
+                            throw new RRException("该商品列表图不能为空!请先在商品管理》所有商品中维护商品编号为【"+goodsEntity.getGoodsSn()+"】的商品列表图信息,再来操作门店商品数据");
+                        }
+                        if(!StringUtils.isNotEmpty(goodsEntity.getPrimaryPicUrl())){
+                            throw new RRException("该商品主图不能为空!请先在商品管理》所有商品中维护商品编号为【"+goodsEntity.getGoodsSn()+"】的商品主图信息,再来操作门店商品数据");
+                        }
+                        List<GoodsGalleryEntity> galleryEntityList = goodsGalleryDao.queryObjectByGoodId(goodsEntity.getId());
+                        if (galleryEntityList == null || galleryEntityList.size() <= 0) {
+                            throw new RRException("该商品轮播图不能为空!请先在商品管理》所有商品中维护商品编号为【"+goodsEntity.getGoodsSn()+"】的商品详情轮播图信息,再来操作门店商品数据");
+                        }
+
+                        if(goodsEntity.getIsSupplierGoods().equalsIgnoreCase(Dict.isSupplierGoods.item_1.getItem())) {
+                            builder.put("supplierThirdCode", "商品供货商所属第三方商户");
+                            ThirdMerchantBizEntity thirdMerchantBizEntity = thirdMerchantBizDao.getThirdMerchangByCode(storeGoodsDto.getSupplierThirdCode());
+                            if(thirdMerchantBizEntity != null){
+                                storeRelaEntity.setThirdPartyMerchCode(thirdMerchantBizEntity.getThirdPartyMerchCode());
+                                storeRelaEntity.setSupplierThirdId(thirdMerchantBizEntity.getThirdMerchSn());
+                            }else{//第三方商户不存在
+                                isFail = true;
+                                failThirdMerchSnList.add(storeGoodsDto.getStoreName());
+                            }
+                        }
+                        CategoryEntity parentCategoryEntity = categoryDao.queryObjectByName(storeGoodsDto.getAttributeCategory(), store.getMerchSn());
+                        if(parentCategoryEntity == null){
+                            isFail = true;
+                            failParentCateList.add(storeGoodsDto.getStoreName());
+                        }else {
+                            storeRelaEntity.setAttributeCategory(parentCategoryEntity.getParentId());
+                        }
+                        CategoryEntity categoryEntity = categoryDao.queryObjectByName(storeGoodsDto.getCategoryName(), store.getMerchSn());
+                        if(categoryEntity == null){
+                            isFail = true;
+                            failCateList.add(storeGoodsDto.getStoreName());
+                        }else {
+                            storeRelaEntity.setCategoryId(categoryEntity.getId());
+                        }
+                        BrandEntity brandEntity = brandDao.queryBrandByBrandNameAndStoreId(storeGoodsDto.getBrandName(), store.getId());
+                        if(brandEntity == null){
+                            isFail = true;
+                            failBrandList.add(storeGoodsDto.getStoreName());
+                        }else {
+                            storeRelaEntity.setBrandId(brandEntity.getId());
+                        }
+                        FreightEntity freightEntity = freightDao.queryFreightByDefaultFreightAndStoreId(storeGoodsDto.getBrandName(), store.getId());
+                        if(freightEntity == null){
+                            isFail = true;
+                            failFreightList.add(storeGoodsDto.getStoreName());
+                        }else {
+                            storeRelaEntity.setFreightId(freightEntity.getId());
+                        }
+
+                        //校验总库存
+                        if(goodsEntity.getGoodsBizType().equalsIgnoreCase(Dict.orderBizType.item_00.getItem()) && isStockShare.equalsIgnoreCase(Dict.isStockShare.item_1.getItem())){
+                            Integer stockNum = Integer.parseInt(storeGoodsDto.getStockNum());
+                            Integer goodsNumber = goodsEntity.getGoodsNumber();//商品总库存
+                            if (stockNum.intValue() != goodsNumber.intValue()) {
+                                throw new RRException("门店【" + store.getStoreName() + "】商品编码【" + storeGoodsDto.getGoodsSn()
+                                        + "】的门店商品分配库存不等于商品总库存!当前门店属于共享库存,需与总库存一致,该商品总库存【" + goodsNumber + "】");
+                            } else {
+                                storeRelaEntity.setStockNum(goodsEntity.getGoodsNumber());
+                            }
+                        }
+                        if((!goodsEntity.getGoodsBizType().equalsIgnoreCase(Dict.orderBizType.item_00.getItem()) && isStockShare.equalsIgnoreCase(Dict.isStockShare.item_1.getItem())) ||
+                                isStockShare.equalsIgnoreCase(Dict.isStockShare.item_0.getItem())){
+                            Integer stockNum = Integer.parseInt(storeGoodsDto.getStockNum());
+                            Integer goodsNumber = goodsEntity.getGoodsNumber();//商品总库存
+                            Integer storeTotalStockNum = 0;//商品分配库存
+                            List<ProductStoreRelaEntity> proStoreList = productStoreRelaDao.queryByGoodsId(goodsEntity.getId());
+                            for(ProductStoreRelaEntity relaEntity: proStoreList){
+                                if(relaEntity.getStoreId().intValue() != store.getId().intValue()) {
+                                    storeTotalStockNum = storeTotalStockNum + relaEntity.getStockNum();
+                                }
+                            }
+                            Integer totalStockNum = storeTotalStockNum + stockNum;
+                            if(goodsNumber < totalStockNum){
+                                throw new RRException("门店【" + store.getStoreName() + "】商品编码【" + storeGoodsDto.getGoodsSn()
+                                        + "】的门店商品分配库存已超过商品总库存!当前门店商品分配库存【" + stockNum + "】,已在各门店分配库存总额【"+
+                                        storeTotalStockNum + "】,该商品总库存【" + goodsNumber + "】");
+                            }
+                        }
+
+                        String storeId = String.valueOf(store.getId());
+                        String goodsId = String.valueOf(goodsEntity.getId());
+                        Map<String, Object> map = Maps.newHashMap();
+                        map.put("goodsId", goodsId);
+                        map.put("storeId", storeId);
+                        List<ProductStoreRelaEntity> storeRelaList = querySameList(map);
+                        if (storeRelaList != null && storeRelaList.size() > 0) {
+//                        throw new RRException("该门店已存在此商品!");
+                            isFail = true;
+                            failHaveNameList.add(storeGoodsDto.getStoreName());
+                            failHaveGoodsSnList.add(storeGoodsDto.getGoodsSn());
+                        }
+
+                        ProductEntity product = productDao.queryObjectByGoodsIdAndStoreId(goodsId, "");
+                        if (Dict.orderBizType.item_11.getItem().equals(goodsEntity.getGoodsBizType())) {
+                            GoodsSpecificationEntity goodsSpecificationEntity = goodsSpecificationDao.queryByGoodsId(goodsEntity.getId());
+                            if(goodsSpecificationEntity != null){
+                                goodsSpecificationDao.delete(goodsSpecificationEntity.getId());
+                            }
+                            // 添加商品规格
+                            GoodsSpecificationEntity goodsSpecification = new GoodsSpecificationEntity();
+                            goodsSpecification.setGoodsId(goodsEntity.getId());
+                            goodsSpecification.setValue(storeGoodsDto.getSpecification());
+                            goodsSpecification.setSpecificationId(1);
+                            goodsSpecificationDao.save(goodsSpecification);
+
+                            // 修改产品
+                            if(product == null){
+                                product = new ProductEntity();
+                                product.setGoodsSn(goodsEntity.getGoodsSn());
+                                product.setGoodsSpecificationNameValue(goodsSpecification.getValue());
+                                product.setGoodsSpecificationIds(goodsSpecification.getId().toString());
+                                product.setGoodsId(goodsEntity.getId());
+                                product.setGoodsNumber(goodsEntity.getGoodsNumber());
+                                product.setGoodsDefault(0);
+                                productDao.save(product);
+                            }else{
+                                product.setGoodsSpecificationIds(goodsSpecification.getId().toString());
+                                product.setGoodsSpecificationNameValue(goodsSpecification.getValue());
+                                productDao.update(product);
+                            }
+                        }
+
+                        // 批量导入不添加商品参数
+                        //新增库存操作记录
+                        StoreMngChangeEntity storeMngChangeEntity = new StoreMngChangeEntity();
+                        storeMngChangeEntity.setChangeType(Dict.changeType.item_2.getItem());
+                        storeMngChangeEntity.setChangeReason("新增门店商品");
+                        storeMngChangeEntity.setGoodsId(Integer.parseInt(String.valueOf(goodsEntity.getId())));
+                        storeMngChangeEntity.setStoreId(Integer.parseInt(String.valueOf(store.getId())));
+                        storeMngChangeEntity.setMerchSn(store.getMerchSn());
+                        storeMngChangeEntity.setCreateTime(new Date());
+                        storeMngChangeEntity.setModTime(new Date());
+                        storeMngChangeEntity.setStoreChangeNum(Integer.parseInt(storeGoodsDto.getStockNum()));
+                        storeMngChangeEntity.setStoreOriginalNum(0);
+                        storeMngChangeEntity.setStoreValidNum(Integer.parseInt(storeGoodsDto.getStockNum()));
+                        storeMngChangeEntity.setCreaterSn(user.getUsername());
+                        storeMngChangeEntity.setModerSn(user.getUsername());
+                        storeMngChangeEntity.setIsValid(0);
+                        storeMngChangeDao.save(storeMngChangeEntity);
+
+                        //更新门店商品是否有修改字段
+                        updateLoadGoodsByStoreId(storeId, user);
+
+                        storeRelaEntity.setProductId(product.getId());
+//                    storeRelaEntity.setGoodsBizType(goodsEntity.getGoodsBizType());
+//                    storeRelaEntity.setSku(goodsEntity.getSku());
+                        storeRelaEntity.setRetailPrice(BigDecimal.valueOf(Long.valueOf(storeGoodsDto.getRetailPrice())));
+                        storeRelaEntity.setMarketPrice(BigDecimal.valueOf(Long.valueOf(storeGoodsDto.getMarketPrice())));
+                        storeRelaEntity.setCreaterSn(user.getUserId().toString());
+                        storeRelaEntity.setCreateTime(new Date());
+                        storeRelaEntity.setModerSn(user.getUserId().toString());
+                        storeRelaEntity.setModTime(new Date());
+                    }
+                }else{
+                    isFail = true;
+                    failHaveStoreNameList.add(storeGoodsDto.getStoreName());
+                }
+
+                if(!isFail){
+                    productStoreRelaDao.save(storeRelaEntity);
+                }
+
+                ExportExceptionDataEntity exportExceptionDataEntity = new ExportExceptionDataEntity();
+                exportExceptionDataEntity.setCreaterSn(user.getUserId().toString());
+                exportExceptionDataEntity.setUserId(user.getUserId().intValue());
+                exportExceptionDataEntity.setCreateTime(new Date());
+                exportExceptionDataEntity.setModTime(new Date());
+                exportExceptionDataEntity.setMerchSn(merchSn);
+                exportExceptionDataEntity.setStoreId(user.getStoreId());
+                exportExceptionDataEntity.setExportDataType(Dict.exportDataType.item_3.getItem());
+
+                if(failHaveStoreNameList != null && failHaveStoreNameList.size() > 0){
+                    exportExceptionDataEntity.setExportExceptionData("门店名称不存在,请检查门店名称【"+failHaveStoreNameList+"】的门店名称信息!");
+                    exportExceptionDataDao.save(exportExceptionDataEntity);
+                    throw new RRException("导入数据异常,异常信息请在商品管理》》导入异常数据中查看检查");
+                }
+                if(failThirdMerchSnList != null && failThirdMerchSnList.size() > 0){
+                    exportExceptionDataEntity.setExportExceptionData("第三方商户代码不存在,请在商城配置》第三方商户管理中维护,请检查门店名称【"+failThirdMerchSnList+"】的第三方商户代码信息,请先维护再继续操作!");
+                    exportExceptionDataDao.save(exportExceptionDataEntity);
+                    throw new RRException("导入数据异常,异常信息请在商品管理》》导入异常数据中查看检查");
+                }
+                if(failHaveNameList != null && failHaveNameList.size() > 0){
+                    exportExceptionDataEntity.setExportExceptionData("门店商品已存在!请检查门店名称【" + failHaveNameList + "】商品编码【" + failHaveGoodsSnList + "】的门店商品信息");
+                    exportExceptionDataDao.save(exportExceptionDataEntity);
+                    throw new RRException("导入数据异常,异常信息请在商品管理》》导入异常数据中查看检查");
+                }
+                if(failGoodsSnList != null && failGoodsSnList.size() > 0){
+                    exportExceptionDataEntity.setExportExceptionData("商户编码不存在,请检查门店名称【"+failGoodsSnList+"】的商户编码信息,请先维护再继续操作!");
+                    exportExceptionDataDao.save(exportExceptionDataEntity);
+                    throw new RRException("导入数据异常,异常信息请在商品管理》》导入异常数据中查看检查");
+                }
+                if(failParentCateList != null && failParentCateList.size() > 0){
+                    exportExceptionDataEntity.setExportExceptionData("一级分类不存在,请检查门店名称【"+failParentCateList+"】的一级分类信息,请先维护再继续操作!");
+                    exportExceptionDataDao.save(exportExceptionDataEntity);
+                    throw new RRException("导入数据异常,异常信息请在商品管理》》导入异常数据中查看检查");
+                }
+                if(failCateList != null && failCateList.size() > 0){
+                    exportExceptionDataEntity.setExportExceptionData("二级分类不存在,请检查门店名称【"+failCateList+"】的二级分类信息,请先维护再继续操作!");
+                    exportExceptionDataDao.save(exportExceptionDataEntity);
+                    throw new RRException("导入数据异常,异常信息请在商品管理》》导入异常数据中查看检查");
+                }
+                if(failBrandList != null && failBrandList.size() > 0){
+                    exportExceptionDataEntity.setExportExceptionData("品牌不存在,请检查门店名称【"+failBrandList+"】的品牌信息,请先维护再继续操作!");
+                    exportExceptionDataDao.save(exportExceptionDataEntity);
+                    throw new RRException("导入数据异常,异常信息请在商品管理》》导入异常数据中查看检查");
+                }
+                if(failFreightList != null && failFreightList.size() > 0){
+                    exportExceptionDataEntity.setExportExceptionData("运费模板不存在,请检查门店名称【"+failFreightList+"】的运费模板信息,请先维护再继续操作!");
+                    exportExceptionDataDao.save(exportExceptionDataEntity);
+                    throw new RRException("导入数据异常,异常信息请在商品管理》》导入异常数据中查看检查");
+                }
+            }
+        }else{
+            throw new RRException("导入数据为空,或者检查数据是否为空");
+        }
+        throw new RRException("导入成功!");
+//        return 1;
+    }
 }

+ 155 - 5
kmall-admin/src/main/java/com/kmall/admin/service/impl/StoreServiceImpl.java

@@ -1,19 +1,27 @@
 package com.kmall.admin.service.impl;
 
+import com.google.common.collect.ImmutableBiMap;
+import com.kmall.admin.dao.ExportExceptionDataDao;
 import com.kmall.admin.dao.MerchDao;
 import com.kmall.admin.dao.StoreDao;
 import com.kmall.admin.dao.ThirdMerchantBizDao;
-import com.kmall.admin.entity.MerchEntity;
-import com.kmall.admin.entity.StoreEntity;
-import com.kmall.admin.entity.ThirdMerchantBizEntity;
+import com.kmall.admin.dto.StoreDto;
+import com.kmall.admin.dto.StoreIdDto;
+import com.kmall.admin.entity.*;
+import com.kmall.admin.fromcomm.entity.SysUserEntity;
 import com.kmall.admin.service.StoreService;
+import com.kmall.admin.utils.ShiroUtils;
+import com.kmall.common.constant.Dict;
+import com.kmall.common.utils.MapBeanUtil;
+import com.kmall.common.utils.R;
 import com.kmall.common.utils.RRException;
+import com.kmall.common.utils.ValidatorUtil;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.List;
-import java.util.Map;
+import java.math.BigDecimal;
+import java.util.*;
 
 /**
  * Service实现类
@@ -30,6 +38,8 @@ public class StoreServiceImpl implements StoreService {
     private MerchDao merchDao;
     @Autowired
     private ThirdMerchantBizDao thirdMerchantBizDao;
+    @Autowired
+    private ExportExceptionDataDao exportExceptionDataDao;
 
     @Override
     public StoreEntity queryObject(Integer id) {
@@ -48,6 +58,7 @@ public class StoreServiceImpl implements StoreService {
 
     @Override
     public int save(StoreEntity store) {
+        store.setStoreName(store.getStoreName().trim());
         if(StringUtils.isNotEmpty(store.getMerchSn())){
             MerchEntity merchEntity = merchDao.findByMerchSn(store.getMerchSn());
             if(merchEntity != null){
@@ -84,6 +95,7 @@ public class StoreServiceImpl implements StoreService {
 
     @Override
     public int update(StoreEntity store) {
+        store.setStoreName(store.getStoreName().trim());
         if(StringUtils.isEmpty(store.getMerchSn())){
             throw new RRException("商户编号不能为空");
         }else{
@@ -127,4 +139,142 @@ public class StoreServiceImpl implements StoreService {
     public int deleteBatch(Integer[] ids) {
         return storeDao.deleteBatch(ids);
     }
+
+    @Override
+    public int uploadExcel(List<StoreDto> storeDtoList){
+        SysUserEntity user = ShiroUtils.getUserEntity();
+        String merchSn = user.getMerchSn();
+        boolean isFail = false;
+        List<String> failMerchSnList = new ArrayList<>(), failThirdMerchSnList = new ArrayList<>(),
+                failAgreementTypeList = new ArrayList<>(), failHaveNameList = new ArrayList<>();
+        if (storeDtoList != null && storeDtoList.size() > 0) {
+            for (int i = 0; i < storeDtoList.size(); i++) {
+                StoreDto storeDto = storeDtoList.get(i);
+                StoreEntity storeEntity = new StoreEntity();
+                Map<String, Object> valideDate = MapBeanUtil.fromObject(storeDto);
+                ImmutableBiMap.Builder builder = new ImmutableBiMap.Builder();
+                builder.put("merchSn", "商户编码");
+                builder.put("storeName", "门店名称");
+                builder.put("storeNumber", "门店编码");
+                builder.put("storeAddress", "门店地址");
+                builder.put("provinceName", "省");
+                builder.put("cityName", "市");
+                builder.put("countyName", "区");
+                builder.put("latitude", "纬度");
+                builder.put("longitude", "经度");
+                builder.put("thirdPartyMerchCode", "第三方商户代码");
+                builder.put("exprAgreementType", "第三方商户快递协议类型");
+                R r = ValidatorUtil.isEmpty(builder.build(), valideDate);
+                if (Integer.valueOf(r.get("code").toString()) != 0) {
+                    throw new RRException(r.get("msg").toString());
+                }
+                MerchEntity merchEntity = merchDao.findByMerchSn(storeDto.getMerchSn());
+                if(merchEntity != null){
+                    storeEntity.setMerchSn(merchEntity.getMerchSn());
+                    storeEntity.setMerchName(merchEntity.getMerchName());
+                }else{//商户不存在
+                    isFail = true;
+                    failMerchSnList.add(storeDto.getStoreName().trim());
+                }
+                ThirdMerchantBizEntity thirdMerchantBizEntity = thirdMerchantBizDao.getThirdMerchangByCode(storeDto.getThirdPartyMerchCode());
+                if(thirdMerchantBizEntity != null){
+                    storeEntity.setThirdPartyMerchCode(thirdMerchantBizEntity.getThirdPartyMerchCode());
+                    storeEntity.setThirdPartyMerchName(thirdMerchantBizEntity.getThirdPartyMerchName());
+                }else{//第三方商户不存在
+                    isFail = true;
+                    failThirdMerchSnList.add(storeDto.getThirdPartyMerchCode());
+                }
+
+                StoreEntity store = storeDao.queryObjectByName(storeDto.getStoreName().trim());
+                if(store != null){
+                    isFail = true;
+                    failHaveNameList.add(storeDto.getStoreName().trim());
+                }
+                if(!storeDto.getExprAgreementType().equalsIgnoreCase(Dict.exprAgreementType.item_00.getItem()) &&
+                        !storeDto.getExprAgreementType().equalsIgnoreCase(Dict.exprAgreementType.item_11.getItem())){
+                    isFail = true;
+                    failAgreementTypeList.add(storeDto.getStoreName().trim());
+                }
+                storeEntity.setStoreName(storeDto.getStoreName().trim());
+                storeEntity.setStoreNumber(storeDto.getStoreNumber().trim());
+                storeEntity.setStoreAddress(storeDto.getStoreAddress().trim());
+                storeEntity.setCountyName(storeDto.getCountyName().trim());
+                storeEntity.setCityName(storeDto.getCityName().trim());
+                storeEntity.setProvinceName(storeDto.getProvinceName().trim());
+                storeEntity.setLatitude(BigDecimal.valueOf(storeDto.getLatitude()));
+                storeEntity.setLongitude(BigDecimal.valueOf(storeDto.getLatitude()));
+                storeEntity.setExprAgreementType(storeDto.getExprAgreementType().trim());
+                storeEntity.setCreaterSn(user.getUsername());
+                storeEntity.setCreateTime(new Date());
+                storeEntity.setModerSn(user.getUsername());
+                storeEntity.setModTime(new Date());
+                storeEntity.setIsValid(Dict.isValid.item_0.getItem());
+
+                if(!isFail){
+                    storeDao.save(storeEntity);
+                }
+            }
+            ExportExceptionDataEntity exportExceptionDataEntity = new ExportExceptionDataEntity();
+            exportExceptionDataEntity.setCreaterSn(user.getUserId().toString());
+            exportExceptionDataEntity.setUserId(user.getUserId().intValue());
+            exportExceptionDataEntity.setCreateTime(new Date());
+            exportExceptionDataEntity.setModTime(new Date());
+            exportExceptionDataEntity.setMerchSn(merchSn);
+            exportExceptionDataEntity.setStoreId(user.getStoreId());
+            exportExceptionDataEntity.setExportDataType(Dict.exportDataType.item_3.getItem());
+            if(failMerchSnList != null && failMerchSnList.size() > 0){
+                exportExceptionDataEntity.setExportExceptionData("商户编码不存在,请检查门店名称【"+failMerchSnList+"】的商户编码信息,请先维护再继续操作!");
+                exportExceptionDataDao.save(exportExceptionDataEntity);
+                throw new RRException("导入数据异常,异常信息请在商品管理》》导入异常数据中查看检查");
+            }
+            if(failThirdMerchSnList != null && failThirdMerchSnList.size() > 0){
+                exportExceptionDataEntity.setExportExceptionData("第三方商户代码不存在,请在商城配置》第三方商户管理中维护,请检查门店名称【"+failThirdMerchSnList+"】的第三方商户代码信息,请先维护再继续操作!");
+                exportExceptionDataDao.save(exportExceptionDataEntity);
+                throw new RRException("导入数据异常,异常信息请在商品管理》》导入异常数据中查看检查");
+            }
+            if(failHaveNameList != null && failHaveNameList.size() > 0){
+                exportExceptionDataEntity.setExportExceptionData("门店名称已重复!请检查门店名称【" + failHaveNameList + "】的门店名称信息");
+                exportExceptionDataDao.save(exportExceptionDataEntity);
+                throw new RRException("导入数据异常,异常信息请在商品管理》》导入异常数据中查看检查");
+            }
+            if(failAgreementTypeList != null && failAgreementTypeList.size() > 0){
+                exportExceptionDataEntity.setExportExceptionData("第三方商户快递协议类型只能是【00:e码头,01:商户自谈】!请检查门店名称【"+failAgreementTypeList+"】的第三方商户快递协议类型信息");
+                exportExceptionDataDao.save(exportExceptionDataEntity);
+                throw new RRException("导入数据异常,异常信息请在商品管理》》导入异常数据中查看检查");
+            }
+        }else{
+            throw new RRException("导入数据为空,或者检查数据是否为空");
+        }
+        throw new RRException("导入成功!");
+//        return 1;
+    }
+
+
+    @Override
+    public List<StoreEntity> queryExportList(Map<String, Object> map) {
+        List<StoreEntity> list = storeDao.queryExportList(map);
+        return list;
+    }
+
+    @Override
+    public String checkStoreIdUpload(List<StoreIdDto> storeIdDtoList){
+        Boolean isFalse = false;
+        List<String> storeIdErrorList = new ArrayList<>();
+        for(StoreIdDto storeIdDto : storeIdDtoList) {
+            StoreEntity storeEntity = storeDao.queryObject(storeIdDto.getStoreId());
+            if (storeEntity == null) {
+                isFalse = true;
+                storeIdErrorList.add(storeIdDto.getStoreId());
+            }
+        }
+        if(isFalse){
+            throw new RRException("门店不存在,不存在id【" + storeIdErrorList + "】");
+        }else{
+            StringBuffer storeIds = new StringBuffer();
+            for(StoreIdDto storeIdDto : storeIdDtoList){
+                storeIds.append(storeIdDto.getStoreId()+";");
+            }
+            return storeIds.toString();
+        }
+    }
 }

+ 46 - 3
kmall-admin/src/main/java/com/kmall/admin/service/impl/UserServiceImpl.java

@@ -2,13 +2,15 @@ package com.kmall.admin.service.impl;
 
 import com.kmall.admin.dao.UserDao;
 import com.kmall.admin.entity.UserEntity;
+import com.kmall.admin.fromcomm.dao.SysConfigDao;
 import com.kmall.admin.service.UserService;
+import com.kmall.common.utils.DateUtils;
+import com.kmall.common.utils.RRException;
+import com.kmall.common.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * Service实现类
@@ -21,6 +23,8 @@ import java.util.Map;
 public class UserServiceImpl implements UserService {
     @Autowired
     private UserDao userDao;
+    @Autowired
+    private SysConfigDao sysConfigDao;
 
     @Override
     public UserEntity queryObject(Integer id) {
@@ -57,4 +61,43 @@ public class UserServiceImpl implements UserService {
     public int deleteBatch(Integer[] ids) {
         return userDao.deleteBatch(ids);
     }
+
+    /**
+     * 根据用户id判断上次活体人脸核身时间是否在可调用范围内
+     * @param userId
+     * @return
+     */
+    public Map checkFaceTimeByUserId(Long userId){
+        Map map = new HashMap();
+        String value = sysConfigDao.queryByKey("FACE_COLLECT_FREQUENCY_TIME");
+        if(value==null){
+            throw new RRException("请联系管理员配系统参数置FACE_COLLECT_FREQUENCY_TIME信息!");
+        }
+        UserEntity userEntity = userDao.queryObject(userId);
+        if(userEntity != null && StringUtils.isNotEmpty(value)){
+            Integer frequencySecondTime = Integer.parseInt(value);
+            String lastFaceTime = userEntity.getLastFaceTime();
+            if(StringUtils.isNotEmpty(lastFaceTime)) {
+                Date lastFaceDate = DateUtils.convertStringToDate(lastFaceTime, DateUtils.DATE_TIME_PATTERN);
+                Calendar calendar = Calendar.getInstance();
+                calendar.setTime(lastFaceDate);
+                calendar.add(Calendar.SECOND, frequencySecondTime);
+                Date addSecondTime = calendar.getTime();
+                map.put("addSecondTime", addSecondTime);
+                Date nowDate = new Date();
+                if (addSecondTime.getTime() > nowDate.getTime()) {
+                    map.put("isCheck", false);
+                    return map;
+                } else {
+                    //可调用身份验证范围内
+                    map.put("isCheck", true);
+                    return map;
+                }
+            }else{//可调用身份验证范围内
+                map.put("isCheck", true);
+                return map;
+            }
+        }
+        return null;
+    }
 }

+ 246 - 0
kmall-admin/src/main/java/com/kmall/admin/service/impl/faceid/FaceIdServiceImpl.java

@@ -0,0 +1,246 @@
+package com.kmall.admin.service.impl.faceid;
+
+import com.google.common.collect.ImmutableBiMap;
+import com.kmall.admin.dao.*;
+import com.kmall.admin.dto.FaceByOrderDto;
+import com.kmall.admin.dto.SendTempDto;
+import com.kmall.admin.entity.*;
+import com.kmall.admin.fromcomm.dao.SysConfigDao;
+import com.kmall.admin.fromcomm.entity.SysUserEntity;
+import com.kmall.admin.service.UserService;
+import com.kmall.admin.service.faceid.FaceIdService;
+import com.kmall.admin.utils.ShiroUtils;
+import com.kmall.manager.dao.TemplateConfDao;
+import com.kmall.manager.dto.FaceIdRequestDto;
+import com.kmall.common.constant.Dict;
+import com.kmall.common.utils.*;
+import com.kmall.manager.entity.pay.TemplateConfVo;
+import com.kmall.manager.manager.faceid.FaceCheckUtil;
+import com.kmall.manager.manager.wechat.wxtemplate.TemplateData;
+import com.kmall.manager.manager.wechat.wxtemplate.WxTemplate;
+import com.kmall.manager.manager.wechat.wxtemplate.WxTemplateUtil;
+import net.sf.json.JSONObject;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.*;
+
+/**
+ * @author huangyq
+ * @version 1.0
+ * 2019-11-27 14:14
+ */
+@Service("faceIdService")
+public class FaceIdServiceImpl implements FaceIdService {
+    private static Log logger = LogFactory.getLog(FaceIdServiceImpl.class);
+    @Autowired
+    private OrderDao orderDao;
+    @Autowired
+    private OrderGoodsDao orderGoodsDao;
+    @Autowired
+    private MerchDao merchDao;
+    @Autowired
+    private ThirdMerchantBizDao thirdMerchantBizDao;
+    @Autowired
+    private UserDao userDao;
+    @Autowired
+    private TemplateConfDao templateConfDao;
+    @Autowired
+    private FaceLivenessRecognitionReturnDataDao faceLivenessRecognitionReturnDataDao;
+    @Autowired
+    private UserService userService;
+    @Autowired
+    private SysConfigDao sysConfigDao;
+
+    /**
+     * 人脸认证
+     * @param faceByOrderDto
+     * @return
+     */
+    @Override
+    public String checkLivenessRecognition(FaceByOrderDto faceByOrderDto){
+        Map<String, Object> valideDate = MapBeanUtil.fromObject(faceByOrderDto);
+        ImmutableBiMap.Builder builder = new ImmutableBiMap.Builder();
+        builder.put("idCard", "身份证号");
+        builder.put("name", "姓名");
+        builder.put("videoBase64", "视频的BASE64值");
+        builder.put("orderId", "订单id");
+        R r = ValidatorUtil.isEmpty(builder.build(), valideDate);
+        if (Integer.valueOf(r.get("code").toString()) != 0) {
+            throw new RRException(r.get("msg").toString());
+        }
+        OrderEntity orderEntity = orderDao.queryObject(faceByOrderDto.getOrderId());
+        if(orderEntity == null){
+            throw new RRException("订单不存在!");
+        }
+        Map map = userService.checkFaceTimeByUserId(Long.valueOf(String.valueOf(orderEntity.getUserId())));
+        boolean isCheck = (boolean)map.get("isCheck");
+        Date addSecondTime = (Date)map.get("addSecondTime");//人脸识别认证失效时间
+        if(!isCheck){
+            throw new RRException("该订单的用户在"+DateUtils.format(addSecondTime,DateUtils.DATE_TIME_PATTERN)+"时间前可不再进行人脸识别");
+        }
+        MerchEntity merchEntity = merchDao.findByMerchSn(orderEntity.getMerchSn());
+        if(merchEntity == null){
+            throw new RRException("商户不存在");
+        }
+        ThirdMerchantBizEntity thirdMerchantBizEntity = thirdMerchantBizDao.queryThirdDataByStoreId(orderEntity.getStoreId());
+        if(thirdMerchantBizEntity == null){
+            throw new RRException("该订单门店的第三方商户不存在");
+        }
+
+        FaceIdRequestDto faceIdRequestDto = new FaceIdRequestDto();
+        faceIdRequestDto.setLivenessType(Dict.livenessType.item_SILENT.getItem());
+        faceIdRequestDto.setIdCard(faceByOrderDto.getIdCard());
+        faceIdRequestDto.setName(faceByOrderDto.getName());
+        faceIdRequestDto.setVideoBase64(faceByOrderDto.getVideoBase64());
+        faceIdRequestDto.setMerchId(orderEntity.getMerchSn());
+        faceIdRequestDto.setMerchName(merchEntity.getMerchName());
+        faceIdRequestDto.setThirdPartyMerchCode(thirdMerchantBizEntity.getThirdPartyMerchCode());
+        faceIdRequestDto.setThirdPartyMerchName(thirdMerchantBizEntity.getThirdPartyMerchName());
+        ResponseData responseData = FaceCheckUtil.checkLivenessRecognition(faceIdRequestDto);
+        FaceLivenessRecognitionReturnDataEntity returnDataEntity = faceLivenessRecognitionReturnDataDao.getFaceByOrderSn(orderEntity.getOrderSn());
+        if(!responseData.getCode().equalsIgnoreCase("0")){
+            //更新验证活体人脸核身接口返回的数据记录表中的是否验证成功为已验证,通知模板为未通知
+            if(returnDataEntity != null) {
+                int failCount = returnDataEntity.getFailCount()==null?0:returnDataEntity.getFailCount();
+                updateFaceLivenessRecognition(orderEntity.getOrderSn(), "0", failCount, responseData.getMsg());
+            }
+            throw new RRException(responseData.getMsg());
+        }else{//人脸核验成功
+            Map faceIdResponseDto = (Map)responseData.getData().getRows().get(0);
+            //保存用户表中的最后活体人脸核身时间
+            UserEntity user = new UserEntity();
+            user.setId(orderEntity.getUserId());
+            if(StringUtils.isNotEmpty((String)faceIdResponseDto.get("returnTime"))) {
+                user.setLastFaceTime((String)faceIdResponseDto.get("returnTime"));
+            }
+            userDao.update(user);
+            //更新验证活体人脸核身接口返回的数据记录表中的是否验证成功为已验证,通知模板为未通知
+            if(returnDataEntity != null) {
+                updateFaceLivenessRecognition(orderEntity.getOrderSn(), "1", null, responseData.getMsg());
+            }
+            return responseData.getMsg();
+        }
+    }
+
+    @Override
+    public String sendWxTemp(long orderId){
+        TemplateConfVo templateConfVo =
+                templateConfDao.queryByTypeId(10); //  模板类型 10待支付提醒
+        if (null == templateConfVo) {
+            return "";
+        }
+        SendTempDto sendTempDto = orderDao.queryOrderByRecogTemp(orderId);
+        if(sendTempDto != null) {
+            Map map = new HashMap();
+            map.put("orderId", orderId);
+            List<OrderGoodsEntity> orderGoodsEntityList = orderGoodsDao.queryList(map);
+            StringBuffer goodsNames = new StringBuffer();
+            if(orderGoodsEntityList.size()>0){
+                for(OrderGoodsEntity goodsEntity: orderGoodsEntityList){
+                    goodsNames.append(goodsEntity.getGoodsName() + ",");
+                }
+            }
+            Date add_time = sendTempDto.getAddTime();
+            String open_id = sendTempDto.getOpenId();
+            String goods_name = goodsNames.toString().substring(0, goodsNames.length() - 1);
+            String order_sn = sendTempDto.getOrderSn();
+            String addTime = "";
+            if (add_time != null) {
+                addTime = DateUtils.format(add_time, DateUtils.DATE_TIME_PATTERN);
+            }
+            WxTemplate tem = new WxTemplate();
+            tem.setTemplate_id(templateConfVo.getTemplateId());
+            tem.setTouser(open_id);
+            tem.setPage("/pages/ucenter/orderDetail/orderDetail?id=" + orderId);
+
+            List<TemplateData> paras = new ArrayList<TemplateData>();
+            String addTimeAfter = DateUtils.addMin(add_time, 15);
+            String desc = templateConfVo.getDesc().replace("addTimeAfter", addTimeAfter);
+            paras.add(new TemplateData("thing1", goods_name));
+            paras.add(new TemplateData("date2", addTime));
+            paras.add(new TemplateData("thing3", desc));
+            tem.setData(paras);
+            JSONObject jsonObject = WxTemplateUtil.sendMessage(tem);
+            int result = jsonObject.getInt("errcode");
+            String resultmsg = jsonObject.getString("errmsg");
+            if (result != 0) {
+                String error = "";
+                if (result == 43101) {
+                    error = "用户openId【" + open_id + "】待支付提醒模板推送失败,原因:用户拒绝接受消息,如果用户之前曾经订阅过,则表示用户取消了订阅关系";
+                    logger.info(error);
+                } else if (result == 40037) {
+                    error = "用户openId【" + open_id + "】待支付提醒模板推送失败,原因:订阅模板id为空不正确";
+                    logger.info(error);
+                } else if (result == 41030) {
+                    error = "用户openId【" + open_id + "】待支付提醒模板推送失败,原因:page路径不正确,需要保证在现网版本小程序中存在,与app.json保持一致";
+                    logger.info(error);
+                } else {
+                    error = resultmsg;
+                    logger.info(error);
+                }
+                Map param = new HashMap();
+                param.put("orderSn", order_sn);
+                param.put("isTempNoti", 0);
+                param.put("tempNotiMsg", error);
+                faceLivenessRecognitionReturnDataDao.updateOrderByTempNoti(param);
+                return error;
+            } else {
+                Map param = new HashMap();
+                param.put("orderSn", order_sn);
+                param.put("isTempNoti", 1);
+                param.put("tempNotiMsg", "通知成功");
+                faceLivenessRecognitionReturnDataDao.updateOrderByTempNoti(param);
+                return "通知成功";
+            }
+        }
+        return "通知成功";
+    }
+
+    /**
+     * 更新订单人脸认证记录表
+     * @param orderSn
+     * @param isFaceCheck
+     * @param msg
+     */
+    private void updateFaceLivenessRecognition(String orderSn,String isFaceCheck, Integer failCount, String msg){
+        FaceLivenessRecognitionReturnDataEntity entity = new FaceLivenessRecognitionReturnDataEntity();
+        entity.setOrderSn(orderSn);
+        entity.setIsFaceCheck(isFaceCheck);
+        entity.setIsTempNoti("0");//未通知
+        entity.setRecognitionReturnMsg(msg);
+        if(failCount != null) {
+            entity.setFailCount(failCount + 1);
+        }
+        entity.setCheckOperatorType(Dict.checkOperatorType.item_1.getItem());
+        faceLivenessRecognitionReturnDataDao.updateByMerchOrderSn(entity);
+    }
+
+    public String manualCheckFace(long orderId){
+        SysUserEntity user = ShiroUtils.getUserEntity();
+        OrderEntity orderEntity = orderDao.queryObject(orderId);
+        if(orderEntity != null) {
+            FaceLivenessRecognitionReturnDataEntity faceLivenessRecognitionReturnDataEntity = faceLivenessRecognitionReturnDataDao.getFaceByOrderSn(orderEntity.getOrderSn());
+            if(faceLivenessRecognitionReturnDataEntity != null) {
+                FaceLivenessRecognitionReturnDataEntity entity = new FaceLivenessRecognitionReturnDataEntity();
+                entity.setId(faceLivenessRecognitionReturnDataEntity.getId());
+                entity.setCheckOperatorType(Dict.checkOperatorType.item_2.getItem());
+                entity.setCheckOperatorSn(user.getUsername());
+                entity.setCheckOperatorTime(new Date());
+                entity.setIsFaceCheck("1");
+                faceLivenessRecognitionReturnDataDao.update(entity);
+            }else{
+                return "审核失败!订单人脸识别数据不存在";
+            }
+        }else{
+            return "审核失败!订单不存在";
+        }
+        return "审核成功";
+    }
+
+    public FaceLivenessRecognitionReturnDataEntity get(long id){
+        return faceLivenessRecognitionReturnDataDao.queryObject(id);
+    }
+}

+ 18 - 0
kmall-admin/src/main/resources/XmlTemplate/CateStoreDtoList.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<workbook>
+    <worksheet name="Sheet1">
+        <section startRow="0" endRow="1"/>
+        <loop startRow="1" endRow="1" items="CateStoreDtoList" var="CateStoreDto"
+              varType="com.kmall.admin.dto.CateStoreDto">
+            <section startRow="1" endRow="1">
+                <mapping row="1" col="0">CateStoreDto.storeId</mapping>
+                <mapping row="1" col="1">CateStoreDto.categoryId</mapping>
+            </section>
+            <loopbreakcondition>
+                <rowcheck offset="0">
+                    <cellcheck offset="0"></cellcheck>
+                </rowcheck>
+            </loopbreakcondition>
+        </loop>
+    </worksheet>
+</workbook>

+ 27 - 0
kmall-admin/src/main/resources/XmlTemplate/StoreDtoList.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<workbook>
+    <worksheet name="Sheet1">
+        <section startRow="0" endRow="1"/>
+        <loop startRow="1" endRow="1" items="StoreDtoList" var="StoreDto"
+              varType="com.kmall.admin.dto.StoreDto">
+            <section startRow="1" endRow="1">
+                <mapping row="1" col="0">StoreDto.merchSn</mapping>
+                <mapping row="1" col="1">StoreDto.storeName</mapping>
+                <mapping row="1" col="2">StoreDto.storeNumber</mapping>
+                <mapping row="1" col="3">StoreDto.storeAddress</mapping>
+                <mapping row="1" col="4">StoreDto.provinceName</mapping>
+                <mapping row="1" col="5">StoreDto.cityName</mapping>
+                <mapping row="1" col="6">StoreDto.countyName</mapping>
+                <mapping row="1" col="7">StoreDto.latitude</mapping>
+                <mapping row="1" col="8">StoreDto.longitude</mapping>
+                <mapping row="1" col="9">StoreDto.thirdPartyMerchCode</mapping>
+                <mapping row="1" col="10">StoreDto.exprAgreementType</mapping>
+            </section>
+            <loopbreakcondition>
+                <rowcheck offset="0">
+                    <cellcheck offset="0"></cellcheck>
+                </rowcheck>
+            </loopbreakcondition>
+        </loop>
+    </worksheet>
+</workbook>

+ 27 - 0
kmall-admin/src/main/resources/XmlTemplate/StoreGoodsDtoList.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<workbook>
+    <worksheet name="Sheet1">
+        <section startRow="0" endRow="1"/>
+        <loop startRow="1" endRow="1" items="StoreGoodsDtoList" var="StoreGoodsDto"
+              varType="com.kmall.admin.dto.StoreGoodsDto">
+            <section startRow="1" endRow="1">
+                <mapping row="1" col="0">StoreGoodsDto.storeName</mapping>
+                <mapping row="1" col="1">StoreGoodsDto.specification</mapping>
+                <mapping row="1" col="2">StoreGoodsDto.stockNum</mapping>
+                <mapping row="1" col="3">StoreGoodsDto.goodsSn</mapping>
+                <mapping row="1" col="4">StoreGoodsDto.retailPrice</mapping>
+                <mapping row="1" col="5">StoreGoodsDto.marketPrice</mapping>
+                <mapping row="1" col="6">StoreGoodsDto.categoryName</mapping>
+                <mapping row="1" col="7">StoreGoodsDto.attributeCategory</mapping>
+                <mapping row="1" col="8">StoreGoodsDto.brandName</mapping>
+                <mapping row="1" col="9">StoreGoodsDto.freightName</mapping>
+                <mapping row="1" col="10">StoreGoodsDto.supplierThirdCode</mapping>
+            </section>
+            <loopbreakcondition>
+                <rowcheck offset="0">
+                    <cellcheck offset="0"></cellcheck>
+                </rowcheck>
+            </loopbreakcondition>
+        </loop>
+    </worksheet>
+</workbook>

+ 17 - 0
kmall-admin/src/main/resources/XmlTemplate/StoreIdDtoList.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<workbook>
+    <worksheet name="Sheet1">
+        <section startRow="0" endRow="1"/>
+        <loop startRow="1" endRow="1" items="StoreIdDtoList" var="StoreIdDto"
+              varType="com.kmall.admin.dto.StoreIdDto">
+            <section startRow="1" endRow="1">
+                <mapping row="1" col="0">StoreIdDto.storeId</mapping>
+            </section>
+            <loopbreakcondition>
+                <rowcheck offset="0">
+                    <cellcheck offset="0"></cellcheck>
+                </rowcheck>
+            </loopbreakcondition>
+        </loop>
+    </worksheet>
+</workbook>

+ 24 - 0
kmall-admin/src/main/resources/XmlTemplate/SysUserDtoList.xml

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<workbook>
+    <worksheet name="Sheet1">
+        <section startRow="0" endRow="1"/>
+        <loop startRow="1" endRow="1" items="SysUserDtoList" var="SysUserDto"
+              varType="com.kmall.admin.dto.SysUserDto">
+            <section startRow="1" endRow="1">
+                <mapping row="1" col="0">SysUserDto.userName</mapping>
+                <mapping row="1" col="1">SysUserDto.email</mapping>
+                <mapping row="1" col="2">SysUserDto.mobile</mapping>
+                <mapping row="1" col="3">SysUserDto.storeName</mapping>
+                <mapping row="1" col="4">SysUserDto.roleType</mapping>
+                <mapping row="1" col="5">SysUserDto.roleName</mapping>
+                <mapping row="1" col="6">SysUserDto.merchSn</mapping>
+                <mapping row="1" col="7">SysUserDto.thirdPartyMerchCode</mapping>
+            </section>
+            <loopbreakcondition>
+                <rowcheck offset="0">
+                    <cellcheck offset="0"></cellcheck>
+                </rowcheck>
+            </loopbreakcondition>
+        </loop>
+    </worksheet>
+</workbook>

+ 47 - 47
kmall-admin/src/main/resources/conf/fastdfs.properties

@@ -1,15 +1,51 @@
-##连接超时时间
-connect_timeout=30
+###\u8FDE\u63A5\u8D85\u65F6\u65F6\u95F4
+#connect_timeout=30
+#
+##\u7F51\u7EDC\u8D85\u65F6\u65F6\u95F4
+#network_timeout=60
+#
+##\u6587\u4EF6\u8DEF\u5F84
+#base_path=/data/files/
+#
+##tracker server\u662FFastDFS\u6587\u4EF6\u7CFB\u7EDF\u7684\u534F\u8C03\u8005,\u5176\u4E3B\u8981\u4F5C\u7528\u662F\u8D1F\u8F7D\u5747\u8861\u548C\u8C03\u5EA6\u3002
+##Tracker server\u5728\u5185\u5B58\u4E2D\u8BB0\u5F55\u5206\u7EC4\u548CStorage server\u7684\u72B6\u6001\u7B49\u4FE1\u606F\uFF0C\u4E0D\u8BB0\u5F55\u6587\u4EF6\u7D22\u5F15\u4FE1\u606F
+#tracker_server=192.168.1.251:22122
+#
+#log_level=info
+#
+#use_connection_pool = false
+#
+#connection_pool_max_idle_time = 3600
+#
+#load_fdfs_parameters_from_tracker=false
+#
+#use_storage_id = false
+#
+#storage_ids_filename = storage_ids.conf
+#
+##HTTP \u670D\u52A1\u5668\u5730\u5740
+#http.tracket_nginx_addr=192.168.1.251
+#
+##HTTP \u670D\u52A1\u5668\u7AEF\u53E3\u53F7
+#http.tracker_server_port=80
+#
+##\u6587\u4EF6\u4F5C\u8005
+#file.author=kmall-pt
+
 
-#网络超时时间
+#############\u751F\u4EA7\u73AF\u5883################
+##\u8FDE\u63A5\u8D85\u65F6\u65F6\u95F4
+#connect_timeout=30
+#
+##\u7F51\u7EDC\u8D85\u65F6\u65F6\u95F4
 network_timeout=60
 
-#文件路径
+#\u6587\u4EF6\u8DEF\u5F84
 base_path=/data/files/
 
-#tracker server是FastDFS文件系统的协调者,其主要作用是负载均衡和调度。
-#Tracker server在内存中记录分组和Storage server的状态等信息,不记录文件索引信息
-tracker_server=192.168.1.251:22122
+#tracker server\u662FFastDFS\u6587\u4EF6\u7CFB\u7EDF\u7684\u534F\u8C03\u8005,\u5176\u4E3B\u8981\u4F5C\u7528\u662F\u8D1F\u8F7D\u5747\u8861\u548C\u8C03\u5EA6\u3002
+#Tracker server\u5728\u5185\u5B58\u4E2D\u8BB0\u5F55\u5206\u7EC4\u548CStorage server\u7684\u72B6\u6001\u7B49\u4FE1\u606F\uFF0C\u4E0D\u8BB0\u5F55\u6587\u4EF6\u7D22\u5F15\u4FE1\u606F
+tracker_server=120.76.26.84:22122
 
 log_level=info
 
@@ -23,47 +59,11 @@ use_storage_id = false
 
 storage_ids_filename = storage_ids.conf
 
-#HTTP 服务器地址
-http.tracket_nginx_addr=192.168.1.251
+#HTTP \u670D\u52A1\u5668\u5730\u5740
+http.tracket_nginx_addr=120.76.26.84
 
-#HTTP 服务器端口号
+#HTTP \u670D\u52A1\u5668\u7AEF\u53E3\u53F7
 http.tracker_server_port=80
 
-#文件作者
+#\u6587\u4EF6\u4F5C\u8005
 file.author=kmall-pt
-
-##############生产环境################
-
-###连接超时时间
-##connect_timeout=30
-##
-###网络超时时间
-#network_timeout=60
-#
-##文件路径
-#base_path=/data/files/
-#
-##tracker server是FastDFS文件系统的协调者,其主要作用是负载均衡和调度。
-##Tracker server在内存中记录分组和Storage server的状态等信息,不记录文件索引信息
-#tracker_server=120.76.26.84:22122
-#
-#log_level=info
-#
-#use_connection_pool = false
-#
-#connection_pool_max_idle_time = 3600
-#
-#load_fdfs_parameters_from_tracker=false
-#
-#use_storage_id = false
-#
-#storage_ids_filename = storage_ids.conf
-#
-##HTTP 服务器地址
-#http.tracket_nginx_addr=120.76.26.84
-#
-##HTTP 服务器端口号
-#http.tracker_server_port=80
-#
-##文件作者
-#file.author=kmall-pt

+ 1 - 1
kmall-admin/src/main/resources/logback.xml

@@ -225,4 +225,4 @@ debug:当此属性设置为true时,将打印出logback内部日志信息,
         <appender-ref ref="warnAppender" />
         <appender-ref ref="errorAppender" />-->
     </root>
-</configuration>
+</configuration>

+ 4 - 2
kmall-admin/src/main/resources/mybatis/mapper/AdDao.xml

@@ -86,7 +86,9 @@
         mall_ad.content,
         mall_ad.end_time,
         mall_ad.enabled,
-        mall_ad_position.name ad_Position_Name
+        mall_ad_position.name ad_Position_Name,
+        s.store_name 'storeName',
+        s.merch_name 'merchName'
         from mall_ad LEFT JOIN mall_ad_position on mall_ad.ad_position_id = mall_ad_position.id
         left join mall_store s on mall_ad.store_id = s.id
         where 1=1
@@ -195,4 +197,4 @@
         </foreach>
     </delete>
 
-</mapper>
+</mapper>

+ 2 - 2
kmall-admin/src/main/resources/mybatis/mapper/AddressDao.xml

@@ -101,7 +101,7 @@
             AND s.third_party_merch_code = #{thirdPartyMerchCode}
         </if>
         <if test="userId != null">
-            AND mall_address.user_id = #{userId}
+            AND a.user_id = #{userId}
         </if>
         <if test="userName != null and userName != ''">
             AND mall_address.user_name LIKE concat('%', #{userName},'%')
@@ -164,4 +164,4 @@
         </foreach>
     </delete>
 
-</mapper>
+</mapper>

+ 29 - 2
kmall-admin/src/main/resources/mybatis/mapper/BrandDao.xml

@@ -76,6 +76,33 @@
         </if>
     </select>
 
+    <select id="queryBrandByBrandNameAndStoreId" resultType="com.kmall.admin.entity.BrandEntity">
+        select
+        `id`,
+        `name`,
+        `store_id`,
+        `merch_sn`,
+        `list_pic_url`,
+        `simple_desc`,
+        `pic_url`,
+        `sort_order`,
+        `is_show`,
+        `floor_price`,
+        `app_list_pic_url`,
+        `is_new`,
+        `new_pic_url`,
+        `new_sort_order`,
+        b.category_id
+        from mall_brand b
+        where 1=1
+        <if test="storeId != null and storeId != ''">
+            AND b.store_id = #{storeId}
+        </if>
+        <if test="brandName != null">
+            AND b.name = #{brandName}
+        </if>
+    </select>
+
     <select id="queryObjectByStoreId" resultType="com.kmall.admin.entity.BrandEntity">
         select *
         from mall_brand
@@ -120,7 +147,7 @@
             AND s.third_party_merch_code = #{thirdPartyMerchCode}
         </if>
         <if test="name != null and name.trim() != ''">
-            AND name LIKE concat('%',#{name},'%')
+            AND b.name LIKE concat('%',#{name},'%')
         </if>
         <choose>
             <when test="sidx != null and sidx.trim() != ''">
@@ -223,4 +250,4 @@
         </foreach>
     </delete>
 
-</mapper>
+</mapper>

+ 17 - 17
kmall-admin/src/main/resources/mybatis/mapper/CartDao.xml

@@ -88,7 +88,7 @@
             and a.goods_id = #{goodsId}
         </if>
         <if test="userId != null">
-            AND mall_cart.user_id = #{userId}
+            AND d.user_id = #{userId}
         </if>
         <if test="thirdPartyMerchCode != null and thirdPartyMerchCode.trim() != ''">
             AND s.third_party_merch_code = #{thirdPartyMerchCode}
@@ -99,16 +99,16 @@
 		insert into mall_cart
 		(
 			`user_id`,
-			`goods_id`, 
-			`goods_sn`, 
-			`product_id`, 
-			`goods_name`, 
-			`market_price`, 
-			`retail_price`, 
+			`goods_id`,
+			`goods_sn`,
+			`product_id`,
+			`goods_name`,
+			`market_price`,
+			`retail_price`,
 			`number`,
 			`goods_specification_name_value`,
 			`goods_specification_ids`,
-			`checked`, 
+			`checked`,
 			`list_pic_url`,
 			`stock_num`,
 			`store_id`,
@@ -122,16 +122,16 @@
 		values
 		(
 			#{userId},
-			#{goodsId}, 
-			#{goodsSn}, 
-			#{productId}, 
-			#{goodsName}, 
-			#{marketPrice}, 
-			#{retailPrice}, 
-			#{number}, 
+			#{goodsId},
+			#{goodsSn},
+			#{productId},
+			#{goodsName},
+			#{marketPrice},
+			#{retailPrice},
+			#{number},
 			#{goodsSpecificationNameValue},
 			#{goodsSpecificationIds},
-			#{checked}, 
+			#{checked},
 			#{listPicUrl},
 			#{stockNum},
 			#{storeId},
@@ -191,4 +191,4 @@
         </foreach>
     </delete>
 
-</mapper>
+</mapper>

+ 7 - 7
kmall-admin/src/main/resources/mybatis/mapper/CategoryDao.xml

@@ -139,7 +139,7 @@
 			limit #{offset}, #{limit}
 		</if>
 	</select>
-	
+
  	<select id="queryTotal" resultType="int">
 		select count(*) from mall_category b
 		left join mall_store s on b.store_id = s.id
@@ -166,8 +166,8 @@
 			AND b.`parent_id` != #{isL2}
 		</if>
 	</select>
-	 
-	<insert id="save" parameterType="com.kmall.admin.entity.CategoryEntity">
+
+	<insert id="save" parameterType="com.kmall.admin.entity.CategoryEntity" useGeneratedKeys="true" keyProperty="id">
 		insert into mall_category(
 			`id`,
 			`name`,
@@ -205,7 +205,7 @@
 			#{type},
 			#{frontName})
 	</insert>
-	 
+
 	<update id="update" parameterType="com.kmall.admin.entity.CategoryEntity">
 		update mall_category
 		<set>
@@ -228,11 +228,11 @@
 		</set>
 		where id = #{id}
 	</update>
-	
+
 	<delete id="delete">
 		delete from mall_category where id = #{value}
 	</delete>
-	
+
 	<delete id="deleteBatch">
 		delete from mall_category where id in
 		<foreach item="id" collection="array" open="(" separator="," close=")">
@@ -240,4 +240,4 @@
 		</foreach>
 	</delete>
 
-</mapper>
+</mapper>

+ 212 - 0
kmall-admin/src/main/resources/mybatis/mapper/FaceLivenessRecognitionReturnDataDao.xml

@@ -0,0 +1,212 @@
+<?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.kmall.admin.dao.FaceLivenessRecognitionReturnDataDao">
+
+    <resultMap type="com.kmall.admin.entity.FaceLivenessRecognitionReturnDataEntity" id="faceLivenessRecognitionReturnDataMap">
+        <result property="id" column="id"/>
+        <result property="merchOrderSn" column="merch_order_sn"/>
+        <result property="isTempNoti" column="is_temp_noti"/>
+        <result property="isFaceCheck" column="is_face_check"/>
+        <result property="userId" column="user_id"/>
+        <result property="tempNotiMsg" column="temp_noti_msg"/>
+		<result property="recognitionReturnMsg" column="recognition_return_msg"/>
+		<result property="failCount" column="fail_count"/>
+		<result property="checkOperatorType" column="check_operator_type"/>
+		<result property="checkOperatorSn" column="check_operator_sn"/>
+		<result property="checkOperatorTime" column="check_operator_time"/>
+        <result property="createrSn" column="creater_sn"/>
+        <result property="createTime" column="create_time"/>
+        <result property="moderSn" column="moder_sn"/>
+        <result property="modTime" column="mod_time"/>
+        <result property="tstm" column="tstm"/>
+    </resultMap>
+
+	<select id="queryObject" resultType="com.kmall.admin.entity.FaceLivenessRecognitionReturnDataEntity">
+		select
+			`id`,
+			`merch_order_sn`,
+			`order_sn`,
+			`is_temp_noti`,
+			`is_face_check`,
+			`user_id`,
+			`temp_noti_msg`,
+			recognition_return_msg,
+			fail_count,
+			check_operator_type,
+			check_operator_sn,
+			check_operator_time,
+			`creater_sn`,
+			`create_time`,
+			`moder_sn`,
+			`mod_time`,
+			`tstm`
+		from face_liveness_recognition_return_data
+		where id = #{id}
+	</select>
+
+	<select id="queryList" resultType="com.kmall.admin.entity.FaceLivenessRecognitionReturnDataEntity">
+		select
+    		`id`,
+    		`merch_order_sn`,
+			`order_sn`,
+    		`is_temp_noti`,
+    		`is_face_check`,
+    		`user_id`,
+    		`temp_noti_msg`,
+			recognition_return_msg,
+			fail_count,
+			check_operator_type,
+			check_operator_sn,
+			check_operator_time,
+    		`creater_sn`,
+    		`create_time`,
+    		`moder_sn`,
+    		`mod_time`,
+    		`tstm`
+		from face_liveness_recognition_return_data
+		WHERE 1=1
+		<if test="name != null and name.trim() != ''">
+			AND name LIKE concat('%',#{name},'%')
+		</if>
+        <choose>
+            <when test="sidx != null and sidx.trim() != ''">
+                order by ${sidx} ${order}
+            </when>
+			<otherwise>
+                order by id desc
+			</otherwise>
+        </choose>
+		<if test="offset != null and limit != null">
+			limit #{offset}, #{limit}
+		</if>
+	</select>
+
+ 	<select id="queryTotal" resultType="int">
+		select count(*) from face_liveness_recognition_return_data
+		WHERE 1=1
+        <if test="name != null and name.trim() != ''">
+            AND name LIKE concat('%',#{name},'%')
+        </if>
+	</select>
+
+	<insert id="save" parameterType="com.kmall.admin.entity.FaceLivenessRecognitionReturnDataEntity" useGeneratedKeys="true" keyProperty="id">
+		insert into face_liveness_recognition_return_data(
+			`merch_order_sn`,
+			`order_sn`,
+			`is_temp_noti`,
+			`is_face_check`,
+			`user_id`,
+			`temp_noti_msg`,
+			recognition_return_msg,
+			fail_count,
+			check_operator_type,
+			check_operator_sn,
+			check_operator_time,
+			`creater_sn`,
+			`create_time`,
+			`moder_sn`,
+			`mod_time`,
+			`tstm`)
+		values(
+			#{merchOrderSn},
+			#{orderSn},
+			#{isTempNoti},
+			#{isFaceCheck},
+			#{userId},
+			#{tempNotiMsg},
+			#{recognitionReturnMsg},
+			#{failCount},
+			#{checkOperatorType},
+			#{checkOperatorSn},
+			#{checkOperatorTime},
+			#{createrSn},
+			#{createTime},
+			#{moderSn},
+			#{modTime},
+			#{tstm})
+	</insert>
+
+	<update id="update" parameterType="com.kmall.admin.entity.FaceLivenessRecognitionReturnDataEntity">
+		update face_liveness_recognition_return_data
+		<set>
+			<if test="merchOrderSn != null">`merch_order_sn` = #{merchOrderSn}, </if>
+			<if test="orderSn != null">`order_sn` = #{orderSn}, </if>
+			<if test="isTempNoti != null">`is_temp_noti` = #{isTempNoti}, </if>
+			<if test="isFaceCheck != null">`is_face_check` = #{isFaceCheck}, </if>
+			<if test="userId != null">`user_id` = #{userId}, </if>
+			<if test="tempNotiMsg != null">`temp_noti_msg` = #{tempNotiMsg}, </if>
+			<if test="recognitionReturnMsg != null">`recognition_return_msg` = #{recognitionReturnMsg}, </if>
+			<if test="failCount != null">`fail_count` = #{failCount}, </if>
+			<if test="checkOperatorType != null">`check_operator_type` = #{checkOperatorType}, </if>
+			<if test="checkOperatorSn != null">`check_operator_sn` = #{checkOperatorSn}, </if>
+			<if test="checkOperatorTime != null">`check_operator_time` = #{checkOperatorTime}, </if>
+			<if test="createrSn != null">`creater_sn` = #{createrSn}, </if>
+			<if test="createTime != null">`create_time` = #{createTime}, </if>
+			<if test="moderSn != null">`moder_sn` = #{moderSn}, </if>
+			<if test="modTime != null">`mod_time` = #{modTime}, </if>
+			<if test="tstm != null">`tstm` = #{tstm}</if>
+		</set>
+		where id = #{id}
+	</update>
+
+	<delete id="delete">
+		delete from face_liveness_recognition_return_data where id = #{value}
+	</delete>
+
+	<delete id="deleteBatch">
+		delete from face_liveness_recognition_return_data where id in
+		<foreach item="id" collection="array" open="(" separator="," close=")">
+			#{id}
+		</foreach>
+	</delete>
+
+	<update id="updateByMerchOrderSn" parameterType="com.kmall.admin.entity.FaceLivenessRecognitionReturnDataEntity">
+		update face_liveness_recognition_return_data
+		<set>
+			<if test="isTempNoti != null">`is_temp_noti` = #{isTempNoti}, </if>
+			<if test="isFaceCheck != null">`is_face_check` = #{isFaceCheck}, </if>
+			<if test="userId != null">`user_id` = #{userId}, </if>
+			<if test="recognitionReturnMsg != null">`recognition_return_msg` = #{recognitionReturnMsg}, </if>
+			<if test="failCount != null">`fail_count` = #{failCount}, </if>
+			<if test="checkOperatorType != null">`check_operator_type` = #{checkOperatorType}, </if>
+		</set>
+		where order_sn = #{orderSn}
+	</update>
+
+	<update id="updateOrderByTempNoti" parameterType="map">
+		update face_liveness_recognition_return_data
+		<set>
+			<if test="isTempNoti != null and isTempNoti != ''">
+				is_temp_noti = #{isTempNoti},
+			</if>
+			<if test="tempNotiMsg != null and tempNotiMsg != ''">
+				temp_noti_msg = #{tempNotiMsg}
+			</if>
+		</set>
+		where order_sn = #{orderSn}
+	</update>
+
+	<select id="getFaceByOrderSn" resultType="com.kmall.admin.entity.FaceLivenessRecognitionReturnDataEntity">
+		select
+			`id`,
+			`merch_order_sn`,
+			`order_sn`,
+			`is_temp_noti`,
+			`is_face_check`,
+			`user_id`,
+			`temp_noti_msg`,
+			recognition_return_msg,
+			fail_count,
+			check_operator_type,
+			check_operator_sn,
+			check_operator_time,
+			`creater_sn`,
+			`create_time`,
+			`moder_sn`,
+			`mod_time`,
+			`tstm`
+		from face_liveness_recognition_return_data
+		where order_sn = #{orderSn}
+	</select>
+</mapper>

+ 28 - 8
kmall-admin/src/main/resources/mybatis/mapper/FreightDao.xml

@@ -47,6 +47,26 @@
 		</if>
 	</select>
 
+	<select id="queryFreightByDefaultFreightAndStoreId" resultType="com.kmall.admin.entity.FreightEntity">
+		select
+		`id`,
+		`name`,
+		`store_id`,
+		`merch_sn`,
+		`template_type`,
+		`pricing_manner`,
+		`default_freight`,
+		`is_default`
+		from mall_freight
+		where 1=1
+		<if test="defaultFreight != null and defaultFreight != ''">
+			AND default_freight = #{defaultFreight}
+		</if>
+		<if test="storeId != null and storeId != ''">
+			AND store_id = #{storeId}
+		</if>
+	</select>
+
 	<select id="queryObjectByStoreId" resultType="com.kmall.admin.entity.FreightEntity">
 		select
 		`id`,
@@ -141,7 +161,7 @@
 			limit #{offset}, #{limit}
 		</if>
 	</select>
-	
+
  	<select id="queryTotal" resultType="int">
 		select count(*) from mall_freight b
 		left join mall_store s on b.store_id = s.id
@@ -162,7 +182,7 @@
 			AND b.id NOT LIKE concat('%',#{id},'%')
 		</if>
 	</select>
-	 
+
 	<insert id="save" parameterType="com.kmall.admin.entity.FreightEntity" useGeneratedKeys="true" keyProperty="id">
 		insert into mall_freight(
 			`name`,
@@ -181,9 +201,9 @@
 			#{defaultFreight},
 			#{isDefault})
 	</insert>
-	 
+
 	<update id="update" parameterType="com.kmall.admin.entity.FreightEntity">
-		update mall_freight 
+		update mall_freight
 		<set>
 			<if test="name != null">`name` = #{name}, </if>
 			<if test="storeId != null">`store_id` = #{storeId}, </if>
@@ -195,13 +215,13 @@
 		</set>
 		where id = #{id}
 	</update>
-	
+
 	<delete id="delete">
 		delete from mall_freight where id = #{value}
 	</delete>
-	
+
 	<delete id="deleteBatch">
-		delete from mall_freight where id in 
+		delete from mall_freight where id in
 		<foreach item="id" collection="array" open="(" separator="," close=")">
 			#{id}
 		</foreach>
@@ -210,4 +230,4 @@
 	<select id="queryMaxId" resultType="java.lang.Integer" parameterType="map">
 		SELECT MAX(id) FROM mall_freight
 	</select>
-</mapper>
+</mapper>

+ 21 - 8
kmall-admin/src/main/resources/mybatis/mapper/FreightItemDao.xml

@@ -55,7 +55,7 @@
 			limit #{offset}, #{limit}
 		</if>
 	</select>
-	
+
  	<select id="queryTotal" resultType="int">
 		select count(*) from mall_freight_item
 		WHERE 1=1
@@ -66,7 +66,7 @@
 			AND fre_id = #{freId}
 		</if>
 	</select>
-	 
+
 	<insert id="save" parameterType="com.kmall.admin.entity.FreightItemEntity" useGeneratedKeys="true" keyProperty="id">
 		insert into mall_freight_item(
 			`fre_id`,
@@ -83,9 +83,9 @@
 			#{continuePiece},
 			#{renew})
 	</insert>
-	 
+
 	<update id="update" parameterType="com.kmall.admin.entity.FreightItemEntity">
-		update mall_freight_item 
+		update mall_freight_item
 		<set>
 			<if test="freId != null">`fre_id` = #{freId}, </if>
 			<if test="deliveryArea != null">`delivery_area` = #{deliveryArea}, </if>
@@ -96,13 +96,13 @@
 		</set>
 		where id = #{id}
 	</update>
-	
+
 	<delete id="delete">
 		delete from mall_freight_item where id = #{value}
 	</delete>
-	
+
 	<delete id="deleteBatch">
-		delete from mall_freight_item where id in 
+		delete from mall_freight_item where id in
 		<foreach item="id" collection="array" open="(" separator="," close=")">
 			#{id}
 		</foreach>
@@ -111,4 +111,17 @@
 	<delete id="deleteByFreId">
 		delete from mall_freight_item where fre_id = #{freId}
 	</delete>
-</mapper>
+
+	<select id="queryObjectByFreightId" resultType="com.kmall.admin.entity.FreightItemEntity">
+		select
+			`id`,
+			`fre_id`,
+			`delivery_area`,
+			`first_piece`,
+			`freight`,
+			`continue_piece`,
+			`renew`
+		from mall_freight_item
+		where fre_id = #{freightId}
+	</select>
+</mapper>

+ 60 - 8
kmall-admin/src/main/resources/mybatis/mapper/GoodsDao.xml

@@ -136,6 +136,58 @@
         where a.id = #{id} and psr1.store_id = #{storeId}
     </select>
 
+    <select id="queryGoodsByGoodsSnAndStoreId" resultMap="goodsMap">
+        select
+        a.sku,
+        a.id,
+        psr1.category_id,
+        a.goods_sn,
+        a.name,
+        psr1.brand_id,
+        a.goods_number,
+        a.keywords,
+        a.goods_brief,
+        a.is_on_sale,
+        a.add_time,
+        a.sort_order,
+        a.is_delete,
+        psr1.attribute_category,
+        a.counter_price,
+        a.extra_price,
+        a.is_new,
+        a.goods_unit,
+        a.primary_pic_url,
+        a.list_pic_url,
+        psr1.retail_price,
+        psr1.sell_volume,
+        a.primary_product_id,
+        a.unit_price,
+        a.promotion_desc,
+        a.promotion_tag,
+        a.app_exclusive_price,
+        a.is_app_exclusive,
+        a.is_limited,
+        a.is_hot,
+        a.merch_sn,
+        m.merch_name,
+        psr1.store_id,
+        psr1.market_price,
+        psr1.stock_num,
+        a.goods_desc,a.goods_biz_type,a.goods_rate,
+        a.sell_volume goods_sell_volume,
+        mb.third_party_merch_code,
+        mb.is_stock_share isStockShare,
+        mb.is_supplier_goods 'isSupplierGoods',
+        mb2.third_party_merch_code 'supplierThirdMerchCode',
+        mb2.is_stock_share 'isStockShareBySuppler'
+        from mall_goods a left join mall_merch m on a.merch_sn = m.merch_sn
+        LEFT JOIN mall_product_store_rela psr1 ON a.id = psr1.goods_id and a.merch_sn = psr1.merch_sn
+        LEFT JOIN mall_store s ON s.id = psr1.store_id
+        LEFT JOIN third_merchant_biz mb on s.third_party_merch_code = mb.third_party_merch_code
+        LEFT JOIN third_merchant_biz mb2 ON a.third_party_merch_code = mb2.third_party_merch_code
+        where a.goods_sn = #{goodsSn} and psr1.store_id = #{storeId}
+    </select>
+
     <select id="queryObjectByProdBarcodeAndBizType" resultType="com.kmall.admin.entity.GoodsEntity">
         SELECT
             a.id,a.sku,a.goods_sn,a.name,a.list_pic_url,a.prod_barcode,r.market_price storeMarketPrice,r.retail_price storeRetailPrice ,r.stock_num,s.store_name,r.product_id,s.id 'storeId'
@@ -201,24 +253,24 @@
         <if test="name != null and name != ''">
             AND mall_goods.name LIKE concat('%',#{name},'%')
         </if>
-        <!--<if test="freightId != null and freightId != ''">
-            AND mall_goods.freight_id = #{freightId}
-        </if>
-        <if test="brandId != null and brandId != ''">
+        <!--<if test="brandId != null and brandId != ''">
             AND mall_goods.brand_id = #{brandId}
         </if>
+        <if test="freightId != null and freightId != ''">
+            AND mall_goods.freight_id = #{freightId}
+        </if>
         <if test="categoryId != null and categoryId != ''">
             AND mall_goods.category_id = #{categoryId}
-        </if>-->
-        <if test="sku != null and sku != ''">
-            AND mall_goods.sku LIKE concat('%',#{sku},'%')
         </if>
-        <!--<if test="category != null and category != ''">
+        <if test="category != null and category != ''">
             AND mall_goods.category_id IN (select id from mall_category where parent_id = #{category})
         </if>
         <if test="categoryTwo != null and categoryTwo != ''">
             AND mall_goods.category_id = #{categoryTwo}
         </if>-->
+        <if test="sku != null and sku != ''">
+            AND mall_goods.sku LIKE concat('%',#{sku},'%')
+        </if>
         <if test="isDelete != null">
             AND mall_goods.is_Delete = #{isDelete}
         </if>

+ 337 - 53
kmall-admin/src/main/resources/mybatis/mapper/OrderDao.xml

@@ -253,7 +253,8 @@
         uc.NAME unit_code,
         good.gross_weight * g.number gross_weight,
         good.net_weight * g.number net_weight,
-        t2.third_party_merch_name 'supplierThirdPartyMerchName'
+        t2.third_party_merch_name 'supplierThirdPartyMerchName',
+        t2.third_party_merch_code 'supplierThirdPartyMerchCode'
         FROM
         mall_order o
         LEFT JOIN mall_user u ON o.user_id = u.id
@@ -465,35 +466,35 @@
     <insert id="save" parameterType="com.kmall.admin.entity.OrderEntity" useGeneratedKeys="true" keyProperty="id">
 		insert into mall_order
 		(
-			`order_sn`, 
-			`user_id`, 
-			`order_status`, 
-			`shipping_status`, 
-			`pay_status`, 
-			`consignee`, 
-			`country`, 
-			`province`, 
-			`city`, 
+			`order_sn`,
+			`user_id`,
+			`order_status`,
+			`shipping_status`,
+			`pay_status`,
+			`consignee`,
+			`country`,
+			`province`,
+			`city`,
 			`district`,
-			`address`, 
-			`mobile`, 
-			`postscript`, 
-			`shipping_id`, 
+			`address`,
+			`mobile`,
+			`postscript`,
+			`shipping_id`,
 			`shipping_name`,
 			`shipping_code`,
 			`shipping_no`,
-			`pay_id`, 
-			`pay_name`, 
-			`shipping_fee`, 
-			`actual_price`, 
-			`integral`, 
-			`integral_money`, 
-			`order_price`, 
-			`goods_price`, 
-			`add_time`, 
-			`confirm_time`, 
-			`pay_time`, 
-			`freight_price`, 
+			`pay_id`,
+			`pay_name`,
+			`shipping_fee`,
+			`actual_price`,
+			`integral`,
+			`integral_money`,
+			`order_price`,
+			`goods_price`,
+			`add_time`,
+			`confirm_time`,
+			`pay_time`,
+			`freight_price`,
 			`coupon_id`,
 			`coupon_price`,
             full_cut_price,
@@ -512,35 +513,35 @@
 		)
 		values
 		(
-			#{orderSn}, 
-			#{userId}, 
-			#{orderStatus}, 
-			#{shippingStatus}, 
-			#{payStatus}, 
-			#{consignee}, 
-			#{country}, 
-			#{province}, 
-			#{city}, 
-			#{district}, 
-			#{address}, 
-			#{mobile}, 
-			#{postscript}, 
-			#{shippingId}, 
+			#{orderSn},
+			#{userId},
+			#{orderStatus},
+			#{shippingStatus},
+			#{payStatus},
+			#{consignee},
+			#{country},
+			#{province},
+			#{city},
+			#{district},
+			#{address},
+			#{mobile},
+			#{postscript},
+			#{shippingId},
 			#{shippingName},
 			#{shippingCode},
 			#{shippingNo},
-			#{payId}, 
-			#{payName}, 
-			#{shippingFee}, 
-			#{actualPrice}, 
-			#{integral}, 
-			#{integralMoney}, 
-			#{orderPrice}, 
-			#{goodsPrice}, 
-			#{addTime}, 
-			#{confirmTime}, 
-			#{payTime}, 
-			#{freightPrice}, 
+			#{payId},
+			#{payName},
+			#{shippingFee},
+			#{actualPrice},
+			#{integral},
+			#{integralMoney},
+			#{orderPrice},
+			#{goodsPrice},
+			#{addTime},
+			#{confirmTime},
+			#{payTime},
+			#{freightPrice},
 			#{couponId},
 			#{couponPrice},
             #{fullCutPrice},
@@ -1104,4 +1105,287 @@
             AND o.is_onffline_order = #{isOnfiilineOrder}
         </if>
     </select>
-</mapper>
+
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.kmall.admin.dto.OrderRecognitionDto" id="orderRecognitionMap">
+        <result property="id" column="id"/>
+        <result property="merchOrderSn" column="merch_order_sn"/>
+        <result property="orderSn" column="order_sn"/>
+        <result property="userId" column="user_id"/>
+        <result property="orderStatus" column="order_status"/>
+        <result property="shippingStatus" column="shipping_status"/>
+        <result property="payStatus" column="pay_status"/>
+        <result property="consignee" column="consignee"/>
+        <result property="country" column="country"/>
+        <result property="province" column="province"/>
+        <result property="city" column="city"/>
+        <result property="district" column="district"/>
+        <result property="address" column="address"/>
+        <result property="mobile" column="mobile"/>
+        <result property="postscript" column="postscript"/>
+        <result property="shippingId" column="shipping_id"/>
+        <result property="shippingName" column="shipping_name"/>
+        <result property="shippingCode" column="shipping_code"/>
+        <result property="shippingNo" column="shipping_no"/>
+        <result property="payId" column="pay_id"/>
+        <result property="payName" column="pay_name"/>
+        <result property="shippingFee" column="shipping_fee"/>
+        <result property="actualPrice" column="actual_price"/>
+        <result property="integral" column="integral"/>
+        <result property="integralMoney" column="integral_money"/>
+        <result property="orderPrice" column="order_price"/>
+        <result property="goodsPrice" column="goods_price"/>
+        <result property="addTime" column="add_time"/>
+        <result property="confirmTime" column="confirm_time"/>
+        <result property="payTime" column="pay_time"/>
+        <result property="freightPrice" column="freight_price"/>
+        <result property="couponId" column="coupon_id"/>
+        <result property="couponPrice" column="coupon_price"/>
+        <result property="callbackStatus" column="callback_status"/>
+        <result property="orderType" column="order_type"/>
+        <result property="storeId" column="store_id"/>
+        <result property="userName" column="username"/>
+        <result property="orderType" column="order_type"/>
+        <result property="activityId" column="activity_id"/>
+        <result property="deliveryDate" column="delivery_date"/>
+        <result property="deliveryRemark" column="delivery_remark"/>
+        <result property="predictTime" column="predict_time"/>
+        <result property="orderBizType" column="order_biz_type"/>
+        <result property="isPaymentSend" column="is_payment_send"/>
+        <result property="isEleOrderSend" column="is_ele_order_send"/>
+        <result property="isCustomsSend" column="is_customs_send"/>
+        <result property="payFlag" column="pay_flag"/>
+        <result column="buyer_pay_check" property="buyerPayCheck"/>
+        <result property="merchSn" column="merch_sn"/>
+        <result property="sku" column="sku"/>
+        <result property="createTime" column="create_time"/>
+        <result property="modTime" column="mod_time"/>
+        <result property="isOnfflineOrder" column="is_onffline_order"/>
+        <result property="orderSnWx" column="order_sn_wx"/>
+        <result property="isMergePay" column="is_merge_pay"/>
+        <result property="payTransactionId" column="pay_transaction_id"/>
+        <result property="storeName" column="store_name"/>
+        <result property="moderSn" column="moder_sn"/>
+        <result property="unitCode" column="unit_code"/>
+        <result property="ciqProdModel" column="ciq_prod_model"/>
+        <result property="oriCntCode" column="ori_cnt_code"/>
+        <result property="brand" column="brand"/>
+        <result column="gross_weight" property="grossWeight" />
+        <result column="net_weight" property="netWeight" />
+        <result property="fullCutPrice" column="full_cut_price"/>
+        <result property="campMinusId" column="camp_minus_id"/>
+        <result property="campName" column="camp_name"/>
+        <result property="isTempNoti" column="is_temp_noti"/>
+        <result property="isFaceCheck" column="is_face_check"/>
+        <result property="tempNotiMsg" column="temp_noti_msg"/>
+        <result property="recognitionReturnMsg" column="recognition_return_msg"/>
+        <result property="lastFaceTime" column="last_face_time"/>
+        <result property="failCount" column="fail_count"/>
+        <result property="checkOperatorType" column="check_operator_type"/>
+        <result property="faceLivenessId" column="faceLivenessId"/>
+    </resultMap>
+
+    <select id="queryOrderListByRecognition" resultMap="orderRecognitionMap">
+        SELECT DISTINCT
+        o.order_sn,
+        o.merch_order_sn,
+        o.order_status,
+        o.actual_price,
+        o.order_biz_type,
+        o.shipping_no,
+        o.shipping_name,
+        o.shipping_code,
+        o.consignee,
+        o.mobile,
+        o.province,
+        o.city,
+        o.district,
+        o.address,
+        o.add_time,
+        o.pay_id,
+        o.pay_status,
+        o.shipping_status,
+        o.is_merge_pay,
+        o.buyer_pay_check,
+        o.order_price,
+        o.moder_sn,
+        o.id,
+        u.username AS username,
+        o.user_id,
+        p.is_payment_send,
+        p.is_ele_order_send,
+        p.is_customs_send,
+        s.store_name,
+        o.full_cut_price,
+        o.camp_minus_id,
+        o.camp_name,
+        fd.is_temp_noti,
+        fd.is_face_check,
+        fd.temp_noti_msg,
+        fd.recognition_return_msg,
+        fd.fail_count,
+        fd.id 'faceLivenessId',
+        fd.check_operator_type,
+        u.last_face_time,
+        t.is_face_check 'thirdIsFaceCheck'
+        FROM
+        mall_order o
+        LEFT JOIN mall_user u ON o.user_id = u.id
+        LEFT JOIN mall_order_process_record p ON o.order_sn = p.order_sn
+        left join mall_store s on o.store_id = s.id
+        LEFT JOIN third_merchant_biz t ON t.third_party_merch_code = s.third_party_merch_code
+        LEFT JOIN mall_order_goods g ON o.id = g.order_id
+        LEFT JOIN mall_product_store_rela r ON o.store_id = r.store_id
+        AND r.goods_id = g.goods_id
+        LEFT JOIN mall_goods gs ON g.goods_id = gs.id
+        INNER JOIN face_liveness_recognition_return_data fd on fd.order_sn = o.order_sn and fd.user_id = o.user_id
+        WHERE 1=1
+        <if test="startTime != null and startTime != ''">
+            AND o.add_time <![CDATA[ >  ]]> #{startTime}
+        </if>
+        <if test="endTime != null and endTime != ''">
+            AND o.add_time <![CDATA[ <  ]]> #{endTime}
+        </if>
+        <if test="storeId != null and storeId != ''">
+            AND o.store_id = #{storeId}
+        </if>
+        <if test="sku != null and sku.trim() != ''">
+            AND gs.sku = #{sku}
+        </if>
+        <if test="thirdPartyMerchCode != null and thirdPartyMerchCode.trim() != ''">
+            AND s.third_party_merch_code = #{thirdPartyMerchCode}
+        </if>
+        <if test="thirdMerchSn != null and thirdMerchSn != ''">
+            AND t.third_merch_sn = #{thirdMerchSn}
+        </if>
+        <if test="supplierThirdId != null and supplierThirdId != ''">
+            AND r.supplier_third_id = #{supplierThirdId}
+        </if>
+        <if test="orderBizType != null and orderBizType != ''">
+            AND o.order_biz_type = #{orderBizType}
+        </if>
+        <if test="merchOrderSn != null and merchOrderSn.trim() != ''">
+            AND o.merch_order_sn = #{merchOrderSn}
+        </if>
+        <if test="merchSn != null and merchSn.trim() != ''">
+            AND o.merch_sn = #{merchSn}
+        </if>
+        <if test="orderSn != null and orderSn.trim() != ''">
+            AND o.order_sn LIKE concat('%',#{orderSn},'%')
+        </if>
+        <if test="shippingStatus != null and shippingStatus.trim() != ''">
+            AND o.shipping_status = #{shippingStatus}
+        </if>
+        <if test="payStatus != null and payStatus.trim() != ''">
+            AND o.pay_status = #{payStatus}
+        </if>
+        <if test="orderStatus != null and orderStatus.trim() != ''">
+            AND o.order_status = #{orderStatus}
+        </if>
+        <if test="shippingId != null and shippingId != 0">
+            AND o.shipping_id = #{shippingId}
+        </if>
+        <if test="orderType != null and orderType.trim() != ''">
+            AND o.order_type = #{orderType}
+        </if>
+        <if test="isOnfiilineOrder != null">
+            AND o.is_onffline_order = #{isOnfiilineOrder}
+        </if>
+        <if test="ids != null and ids.trim() != ''">
+            AND o.id in (${ids})
+        </if>
+        <choose>
+            <when test="sidx != null and sidx.trim() != ''">
+                order by ${sidx} ${order}
+            </when>
+            <otherwise>
+                order by o.id desc
+            </otherwise>
+        </choose>
+        <if test="offset != null and limit != null">
+            limit #{offset}, #{limit}
+        </if>
+    </select>
+
+    <select id="queryOrderListByRecognitionTotal" resultType="int">
+        SELECT count(1)
+        FROM
+        mall_order o
+        LEFT JOIN mall_user u ON o.user_id = u.id
+        LEFT JOIN mall_order_process_record p ON o.order_sn = p.order_sn
+        left join mall_store s on o.store_id = s.id
+        LEFT JOIN third_merchant_biz t ON t.third_party_merch_code = s.third_party_merch_code
+        LEFT JOIN mall_order_goods g ON o.id = g.order_id
+        LEFT JOIN mall_product_store_rela r ON o.store_id = r.store_id
+        AND r.goods_id = g.goods_id
+        LEFT JOIN mall_goods gs ON g.goods_id = gs.id
+        INNER JOIN face_liveness_recognition_return_data fd on fd.order_sn = o.order_sn and fd.user_id = o.user_id
+        WHERE 1=1
+        <if test="startTime != null and startTime != ''">
+            AND o.add_time <![CDATA[ >  ]]> #{startTime}
+        </if>
+        <if test="endTime != null and endTime != ''">
+            AND o.add_time <![CDATA[ <  ]]> #{endTime}
+        </if>
+        <if test="storeId != null and storeId != ''">
+            AND o.store_id = #{storeId}
+        </if>
+        <if test="sku != null and sku.trim() != ''">
+            AND gs.sku = #{sku}
+        </if>
+        <if test="thirdPartyMerchCode != null and thirdPartyMerchCode.trim() != ''">
+            AND s.third_party_merch_code = #{thirdPartyMerchCode}
+        </if>
+        <if test="thirdMerchSn != null and thirdMerchSn != ''">
+            AND t.third_merch_sn = #{thirdMerchSn}
+        </if>
+        <if test="supplierThirdId != null and supplierThirdId != ''">
+            AND r.supplier_third_id = #{supplierThirdId}
+        </if>
+        <if test="orderBizType != null and orderBizType != ''">
+            AND o.order_biz_type = #{orderBizType}
+        </if>
+        <if test="merchOrderSn != null and merchOrderSn.trim() != ''">
+            AND o.merch_order_sn = #{merchOrderSn}
+        </if>
+        <if test="merchSn != null and merchSn.trim() != ''">
+            AND o.merch_sn = #{merchSn}
+        </if>
+        <if test="orderSn != null and orderSn.trim() != ''">
+            AND o.order_sn LIKE concat('%',#{orderSn},'%')
+        </if>
+        <if test="shippingStatus != null and shippingStatus.trim() != ''">
+            AND o.shipping_status = #{shippingStatus}
+        </if>
+        <if test="payStatus != null and payStatus.trim() != ''">
+            AND o.pay_status = #{payStatus}
+        </if>
+        <if test="orderStatus != null and orderStatus.trim() != ''">
+            AND o.order_status = #{orderStatus}
+        </if>
+        <if test="shippingId != null and shippingId != 0">
+            AND o.shipping_id = #{shippingId}
+        </if>
+        <if test="orderType != null and orderType.trim() != ''">
+            AND o.order_type = #{orderType}
+        </if>
+        <if test="isOnfiilineOrder != null">
+            AND o.is_onffline_order = #{isOnfiilineOrder}
+        </if>
+        <if test="ids != null and ids.trim() != ''">
+            AND o.id in (${ids})
+        </if>
+    </select>
+    <select id="queryOrderByRecogTemp" resultType="com.kmall.admin.dto.SendTempDto">
+		SELECT
+            o.add_time 'addTime',
+            u.weixin_openid 'openId',
+            o.merch_order_sn 'merchOrderSn',
+            o.id 'orderId',
+            o.order_sn 'orderSn'
+        FROM
+            mall_order o
+            INNER JOIN mall_user u ON o.user_id = u.id
+            where o.id = #{value}
+	</select>
+</mapper>

+ 17 - 6
kmall-admin/src/main/resources/mybatis/mapper/ProductStoreRelaDao.xml

@@ -41,6 +41,7 @@
         <result column="thirdPartyMerchCode" property="thirdPartyMerchCode" />
         <result column="isStockShare" property="isStockShare" />
         <result column="goodsSellVolume" property="goodsSellVolume" />
+        <result column="hot_sort_num" property="hotSortNum" />
     </resultMap>
 
     <select id="queryObject" resultType="com.kmall.admin.entity.ProductStoreRelaEntity">
@@ -72,7 +73,7 @@
             a.attribute_category,
             a.brand_id,
             a.freight_id,
-            supplier_third_id
+            supplier_third_id, a.hot_sort_num
         FROM
             mall_product_store_rela a
             LEFT JOIN mall_store s ON a.store_id = s.id
@@ -108,7 +109,7 @@
             b.goods_number goodsNumber,
             mb.is_stock_share isStockShare,
             b.sell_volume goodsSellVolume,
-            supplier_third_id
+            supplier_third_id, a.hot_sort_num
         from mall_product_store_rela a
         left join mall_goods b on a.goods_id = b.id
         left join mall_store s on a.store_id = s.id
@@ -135,7 +136,7 @@
             a.attribute_category,
             a.brand_id,
             a.freight_id,
-            supplier_third_id
+            supplier_third_id, a.hot_sort_num
         from mall_product_store_rela a
         where a.store_id = #{storeId} and a.goods_id = #{goodsId}
     </select>
@@ -152,6 +153,7 @@
         a.`market_price`,
         a.`stock_price`,
         a.`sell_volume`,
+        b.is_hot 'isHot',
         b.is_on_sale 'isOnSale',
         b.sell_volume 'goodsSellVolume',
         b.sku,a.goods_biz_type, a.creater_sn, a.create_time, a.moder_sn, a.mod_time, a.tstm,
@@ -170,7 +172,7 @@
         b.goods_number goodsNumber,
         b.third_party_merch_code thirdPartyMerchCode,
         mb.is_stock_share isStockShare,
-        b.list_pic_url,supplier_third_id
+        b.list_pic_url,supplier_third_id, a.hot_sort_num
         from mall_product_store_rela a
         left join mall_goods b on a.goods_id = b.id
         left join third_merchant_biz mb on mb.third_party_merch_code = b.third_party_merch_code and mb.merch_sn=b.merch_sn
@@ -255,7 +257,7 @@
         a.category_id,
         a.attribute_category,
         a.brand_id,
-        a.freight_id,supplier_third_id
+        a.freight_id,supplier_third_id,a.hot_sort_num
         from mall_product_store_rela a
         left join mall_goods b on a.goods_id = b.id
         left join mall_product c on a.product_id = c.id
@@ -387,6 +389,9 @@
         <if test="freightId != null" >
             freight_id,
         </if>
+        <if test="hotSortNum != null" >
+            hot_sort_num,
+        </if>
         <if test="createrSn != null" >
             creater_sn,
         </if>
@@ -430,6 +435,9 @@
         <if test="freightId != null" >
             #{freightId,jdbcType=CHAR},
         </if>
+        <if test="hotSortNum != null" >
+            #{hotSortNum},
+        </if>
         <if test="createrSn != null" >
             #{createrSn,jdbcType=VARCHAR},
         </if>
@@ -477,6 +485,9 @@
             <if test="freightId != null" >
                 freight_id = #{freightId,jdbcType=CHAR},
             </if>
+            <if test="hotSortNum != null" >
+                hot_sort_num = #{hotSortNum,jdbcType=CHAR},
+            </if>
             <if test="createrSn != null" >
                 creater_sn = #{createrSn,jdbcType=VARCHAR},
             </if>
@@ -679,4 +690,4 @@
         where a.goods_id = #{goodsId}
     </update>
 
-</mapper>
+</mapper>

+ 46 - 6
kmall-admin/src/main/resources/mybatis/mapper/StoreDao.xml

@@ -115,7 +115,7 @@
 			AND s.store_name LIKE concat('%',#{storeName},'%')
 		</if>
 		<if test="storeNumber != null and storeNumber.trim() != ''">
-			AND s.storeNumber LIKE concat('%',#{store_number},'%')
+			AND s.store_number LIKE concat('%',#{storeNumber},'%')
 		</if>
 		<if test="thirdPartyMerchCode != null and thirdPartyMerchCode.trim() != ''">
 			AND s.third_party_merch_code = #{thirdPartyMerchCode}
@@ -141,7 +141,7 @@
 			limit #{offset}, #{limit}
 		</if>
 	</select>
-	
+
  	<select id="queryTotal" resultType="int">
 		select count(*) from mall_store s left join third_merchant_biz t on s.third_party_merch_code = t.third_party_merch_code
 		WHERE 1=1
@@ -152,7 +152,7 @@
 			AND s.store_name LIKE concat('%',#{storeName},'%')
 		</if>
 		<if test="storeNumber != null and storeNumber.trim() != ''">
-			AND s.storeNumber LIKE concat('%',#{store_number},'%')
+			AND s.store_number LIKE concat('%',#{storeNumber},'%')
 		</if>
 		<if test="thirdPartyMerchCode != null and thirdPartyMerchCode.trim() != ''">
 			AND s.third_party_merch_code = #{thirdPartyMerchCode}
@@ -239,11 +239,11 @@
 		</set>
 		where id = #{id}
 	</update>
-	
+
 	<delete id="delete">
 		delete from mall_store where id = #{value}
 	</delete>
-	
+
 	<delete id="deleteBatch">
 		delete from mall_store where id in
 		<foreach item="id" collection="array" open="(" separator="," close=")">
@@ -251,4 +251,44 @@
 		</foreach>
 	</delete>
 
-</mapper>
+	<select id="queryExportList" resultType="com.kmall.admin.entity.StoreEntity">
+		select
+		s.`id`,
+		s.`merch_sn`,
+		s.`merch_name`,
+		s.`store_name`,
+		s.`store_number`,
+		s.`store_address`,
+		s.`province_name`,
+		s.`city_name`,
+		s.`county_name`,
+		s.`latitude`,
+		s.`longitude`,
+		s.`cover_radius`,
+		s.`remark`,s.merch_sn, s.merch_name, s.creater_sn, s.create_time,s.third_party_merch_code,t.third_party_merch_name,s.expr_agreement_type,
+		s.moder_sn, s.mod_time, s.tstm,s.is_valid
+		from mall_store s left join third_merchant_biz t on s.third_party_merch_code = t.third_party_merch_code
+		WHERE 1=1
+		<if test="merchSn != null and merchSn.trim() != ''">
+			AND s.merch_sn = #{merchSn}
+		</if>
+		<if test="storeName != null and storeName.trim() != ''">
+			AND s.store_name LIKE concat('%',#{storeName},'%')
+		</if>
+		<if test="storeNumber != null and storeNumber.trim() != ''">
+			AND s.store_number LIKE concat('%',#{storeNumber},'%')
+		</if>
+		<if test="thirdPartyMerchCode != null and thirdPartyMerchCode.trim() != ''">
+			AND s.third_party_merch_code = #{thirdPartyMerchCode}
+		</if>
+		<if test="thirdMerchSn != null and thirdMerchSn.trim() != ''">
+			AND t.third_merch_sn = #{thirdMerchSn}
+		</if>
+		<if test="isSupplierGoods != null and isSupplierGoods.trim() != ''">
+			AND t.is_supplier_goods = #{isSupplierGoods}
+		</if>
+		<if test="id != null">
+			AND s.id = #{id}
+		</if>
+	</select>
+</mapper>

+ 23 - 19
kmall-admin/src/main/resources/mybatis/mapper/SysRoleDao.xml

@@ -6,7 +6,7 @@
 	<select id="queryObject" resultType="com.kmall.admin.fromcomm.entity.SysRoleEntity">
 		select * from sys_role where role_id = #{value}
 	</select>
-	
+
 	<select id="queryList" resultType="com.kmall.admin.fromcomm.entity.SysRoleEntity">
 		select r.*, (select d.name from sys_dept d where d.dept_id = r.dept_id) deptName from sys_role r
 		<where>
@@ -29,23 +29,23 @@
 			limit #{offset}, #{limit}
 		</if>
 	</select>
-	
+
 	<select id="queryTotal" resultType="int">
-		select count(*) from sys_role 
+		select count(*) from sys_role
 		<where>
 			<if test="roleName != null and roleName.trim() != ''">
-				and `role_name` like concat('%',#{roleName},'%') 
+				and `role_name` like concat('%',#{roleName},'%')
 			</if>
 			<if test="createUserId != null">
-				and create_user_id = #{createUserId} 
+				and create_user_id = #{createUserId}
 			</if>
 		</where>
 	</select>
-	
+
 	<insert id="save" parameterType="com.kmall.admin.fromcomm.entity.SysRoleEntity" useGeneratedKeys="true" keyProperty="roleId">
 		insert into sys_role
 		(
-			`role_id`, 
+			`role_id`,
 			`role_name`,
 			`dept_id`,
 			`remark`,
@@ -54,7 +54,7 @@
 		)
 		values
 		(
-			#{roleId}, 
+			#{roleId},
 			#{roleName},
 			#{deptId},
 			#{remark},
@@ -62,10 +62,10 @@
 			#{createTime}
 		)
 	</insert>
-	 
+
 	<update id="update" parameterType="com.kmall.admin.fromcomm.entity.SysRoleEntity">
-		update sys_role 
-		<set> 
+		update sys_role
+		<set>
 			<if test="roleName != null">`role_name` = #{roleName}, </if>
 			<if test="remark != null">`remark` = #{remark},</if>
 			<if test="deptId != null">`dept_id` = #{deptId}, </if>
@@ -75,14 +75,14 @@
 	<delete id="delete">
 		delete from sys_role where role_id = #{roleId}
 	</delete>
-	
+
 	<delete id="deleteBatch">
-		delete from sys_role where role_id in 
+		delete from sys_role where role_id in
 		<foreach item="roleId" collection="array" open="(" separator="," close=")">
 			#{roleId}
 		</foreach>
 		;
-		delete from sys_role_menu where role_id in 
+		delete from sys_role_menu where role_id in
 		<foreach item="roleId" collection="array" open="(" separator="," close=")">
 			#{roleId}
 		</foreach>
@@ -92,14 +92,18 @@
 			#{roleId}
 		</foreach>
 		;
-		delete from sys_user_role where role_id in 
+		delete from sys_user_role where role_id in
 		<foreach item="roleId" collection="array" open="(" separator="," close=")">
 			#{roleId}
 		</foreach>
 	</delete>
-	
+
 	<!-- 查询用户创建的角色ID列表 -->
 	<select id="queryRoleIdList" resultType="long">
-		select role_id from sys_role where create_user_id = #{createUserId} 
-	</select> 
-</mapper>
+		select role_id from sys_role where create_user_id = #{createUserId}
+	</select>
+
+	<select id="queryObjectByName" resultType="com.kmall.admin.fromcomm.entity.SysRoleEntity">
+		select * from sys_role where role_name = #{roleName}
+	</select>
+</mapper>

+ 26 - 1
kmall-admin/src/main/resources/mybatis/mapper/SysSmsLogDao.xml

@@ -208,4 +208,29 @@
 		left join sys_sms_log b on a.user_id = b.user_id and b.stime > a.stime
 		where a.user_id = #{user_id} and b.id is null
 	</select>
-</mapper>
+
+
+    <select id="querySmsCodeByMobile" resultType="com.kmall.manager.entity.SysSmsLogEntity">
+		select
+		a.id,
+        a.user_id,
+        a.content,
+        a.mobile,
+        a.store_id,
+        a.merch_sn,
+        a.stime,
+        a.sign,
+        a.type,
+        a.extno,
+        a.send_status,
+        a.send_id,
+        a.invalid_num,
+        a.success_num,
+        a.black_num,
+        a.return_msg,
+        a.sms_code
+		from sys_sms_log a
+		left join sys_sms_log b on a.user_id = b.user_id and b.stime > a.stime
+		where a.mobile = #{mobile} and b.id is null  order by stime desc limit 1
+	</select>
+</mapper>

+ 2 - 2
kmall-admin/src/main/resources/mybatis/mapper/TemplateConfDao.xml

@@ -1,7 +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.kmall.api.fromcomm.dao.TemplateConfDao">
+<mapper namespace="com.kmall.manager.dao.TemplateConfDao">
 
     <resultMap type="com.kmall.manager.entity.pay.TemplateConfVo" id="templateConfMap">
         <result property="id" column="id"/>
@@ -51,4 +51,4 @@
             AND name LIKE concat('%',#{name},'%')
         </if>
     </select>
-</mapper>
+</mapper>

+ 33 - 8
kmall-admin/src/main/resources/mybatis/mapper/ThirdMerchantBizDao.xml

@@ -19,6 +19,7 @@
 		<result property="isMapShow" column="is_map_show"/>
 		<result property="isDistSellStart" column="is_dist_sell_start"/>
 		<result property="isSupplierGoods" column="is_supplier_goods"/>
+		<result property="isFaceCheck" column="is_face_check"/>
 
     </resultMap>
 
@@ -32,6 +33,7 @@
 			is_stock_share,
 			is_store_user_share,
 			is_supplier_goods,
+			is_face_check,
 			`creater_sn`,
 			`create_time`,
 			`moder_sn`,
@@ -52,6 +54,7 @@
 		is_stock_share,
 		is_store_user_share,
 		is_supplier_goods,
+		is_face_check,
 		`creater_sn`,
 		`create_time`,
 		`moder_sn`,
@@ -72,12 +75,14 @@
 		is_stock_share,
 		is_store_user_share,
 		is_supplier_goods,
+		is_face_check,
+		is_map_show,
+		is_dist_sell_start,
 		`creater_sn`,
 		`create_time`,
 		`moder_sn`,
 		`mod_time`,
-		`tstm`,
-		is_map_show,is_dist_sell_start
+		`tstm`
 		from third_merchant_biz
 		where third_party_merch_code = #{thirdMerchantCode}
 	</select>
@@ -92,6 +97,7 @@
 			is_stock_share,
 			is_store_user_share,
 			is_supplier_goods,
+			is_face_check,
     		`creater_sn`,
     		`create_time`,
     		`moder_sn`,
@@ -123,7 +129,7 @@
 			limit #{offset}, #{limit}
 		</if>
 	</select>
-	
+
  	<select id="queryTotal" resultType="int">
 		select count(*) from third_merchant_biz
 		WHERE 1=1
@@ -149,6 +155,7 @@
 			is_map_show,
 			is_dist_sell_start,
 			is_supplier_goods,
+			is_face_check,
 			`creater_sn`,
 			`create_time`,
 			`moder_sn`,
@@ -164,6 +171,7 @@
 			#{isMapShow},
 			#{isDistSellStart},
 			#{isSupplierGoods},
+			#{isFaceCheck},
 			#{createrSn},
 			#{createTime},
 			#{moderSn},
@@ -172,7 +180,7 @@
 	</insert>
 
 	<update id="update" parameterType="com.kmall.admin.entity.ThirdMerchantBizEntity">
-		update third_merchant_biz 
+		update third_merchant_biz
 		<set>
 			<if test="merchSn != null">`merch_sn` = #{merchSn},</if>
 			<if test="thirdPartyMerchCode != null">`third_party_merch_code` = #{thirdPartyMerchCode}, </if>
@@ -183,6 +191,7 @@
 			<if test="isSupplierGoods != null">`is_supplier_goods` = #{isSupplierGoods}, </if>
 			<if test="isMapShow != null">`is_map_show` = #{isMapShow}, </if>
 			<if test="isDistSellStart != null">`is_dist_sell_start` = #{isDistSellStart}, </if>
+			<if test="isFaceCheck != null">`is_face_check` = #{isFaceCheck}, </if>
 			<if test="createrSn != null">`creater_sn` = #{createrSn}, </if>
 			<if test="createTime != null">`create_time` = #{createTime}, </if>
 			<if test="moderSn != null">`moder_sn` = #{moderSn}, </if>
@@ -191,16 +200,32 @@
 		</set>
 		where third_merch_sn = #{thirdMerchSn}
 	</update>
-	
+
 	<delete id="delete">
 		delete from third_merchant_biz where third_merch_sn = #{value}
 	</delete>
-	
+
 	<delete id="deleteBatch">
-		delete from third_merchant_biz where third_merch_sn in 
+		delete from third_merchant_biz where third_merch_sn in
 		<foreach item="thirdMerchSn" collection="array" open="(" separator="," close=")">
 			#{thirdMerchSn}
 		</foreach>
 	</delete>
 
-</mapper>
+	<select id="queryThirdDataByStoreId" resultType="com.kmall.admin.entity.ThirdMerchantBizEntity">
+		select
+		b.`third_merch_sn`,
+		b.`merch_sn`,
+		b.`third_party_merch_code`,
+		b.`third_party_merch_name`,
+		b.`is_valid`,
+		b.is_stock_share,
+		b.is_store_user_share,
+		b.is_map_show,
+		b.is_dist_sell_start,
+		b.is_supplier_goods,
+		b.is_face_check
+		from third_merchant_biz b inner join mall_store s on s.third_party_merch_code=b.third_party_merch_code
+		where s.id = #{storeId} and s.is_valid = 0
+	</select>
+</mapper>

+ 2 - 2
kmall-admin/src/main/resources/mybatis/mapper/UserCouponDao.xml

@@ -43,7 +43,7 @@
         mall_coupon.name coupon_name
         from mall_user_coupon
         LEFT JOIN mall_user ON mall_user_coupon.user_id = mall_user.id
-        LEFT JOIN mall_coupon ON mall_user_coupon.coupon_id = mall_coupon.id
+        LEFT JOIN mall_coupon ON mall_user_coupon.store_topic_id = mall_coupon.id
         WHERE 1=1
         <if test="userName != null and userName.trim() != ''">
             AND mall_user.username LIKE concat('%',#{userName},'%')
@@ -186,4 +186,4 @@
             AND c.is_used = #{isUsed}
         </if>
     </select>
-</mapper>
+</mapper>

+ 12 - 8
kmall-admin/src/main/resources/mybatis/mapper/UserDao.xml

@@ -19,6 +19,7 @@
         <result property="avatar" column="avatar"/>
         <result property="weixinOpenid" column="weixin_openid"/>
         <result property="id" column="id_no"/>
+        <result property="lastFaceTime" column="last_face_time"/>
     </resultMap>
 
     <select id="queryObject" resultType="com.kmall.admin.entity.UserEntity">
@@ -29,13 +30,13 @@
 
     <select id="queryList" resultType="com.kmall.admin.entity.UserEntity">
         SELECT DISTINCT
-        mall_user.*,
-        mall_user_level.NAME levelName
+        mall_user.*
+        ,mall_user_level.NAME levelName
         FROM
-        mall_store s
-        LEFT JOIN mall_merch_user mu ON mu.store_id = s.id
-        left join mall_user on mall_user.id = mu.user_id
+        mall_user
         LEFT JOIN mall_user_level ON mall_user.user_level_id = mall_user_level.id
+        LEFT JOIN mall_merch_user mu ON mall_user.id = mu.user_id
+        LEFT JOIN mall_store s on mu.store_id = s.id
         WHERE 1=1
         <if test="storeId != null and storeId != ''">
             and mu.store_id = #{storeId}
@@ -104,7 +105,8 @@
 			`mobile`,
 			`register_ip`,
 			`avatar`,
-			`weixin_openid`)
+			`weixin_openid`,
+			last_face_time)
 		values(
 			#{username},
 			#{password},
@@ -118,7 +120,8 @@
 			#{mobile},
 			#{registerIp},
 			#{avatar},
-			#{weixinOpenid})
+			#{weixinOpenid},
+			#{lastFaceTime})
 	</insert>
 
     <update id="update" parameterType="com.kmall.admin.entity.UserEntity">
@@ -137,6 +140,7 @@
             <if test="registerIp != null">`register_ip` = #{registerIp},</if>
             <if test="avatar != null">`avatar` = #{avatar},</if>
             <if test="weixinOpenid != null">`weixin_openid` = #{weixinOpenid}</if>
+            <if test="lastFaceTime != null">`last_face_time` = #{lastFaceTime}</if>
         </set>
         where id = #{id}
     </update>
@@ -152,4 +156,4 @@
         </foreach>
     </delete>
 
-</mapper>
+</mapper>

+ 17 - 10
kmall-admin/src/main/resources/mybatis/mapper/mk/store/StoreTopicDao.xml

@@ -45,16 +45,19 @@
 	</select>
 
 	<select id="queryList" resultType="com.kmall.admin.entity.mk.store.StoreTopicEntity">
-		select
+		SELECT
 		d.`id`,
 		d.`title`,
 		d.`content`,
 		d.`item_pic_url`,
 		d.`subtitle`,
 		d.`prom_type_id`,
+		pt.prom_type_name 'promTypeName',
 		d.`topic_price`,
 		d.`store_id`,
+		s.store_name 'storeName',
 		d.`third_merch_sn`,
+		t.third_party_merch_name 'thirdPartyMerchName',
 		d.`is_valid`,
 		d.`note`,
 		d.`creater_sn`,
@@ -62,7 +65,11 @@
 		d.`moder_sn`,
 		d.`mod_time`,
 		d.`tstm`
-		from mall_store_topic d left join third_merchant_biz t on d.third_merch_sn = t.third_merch_sn
+		FROM
+		mall_store_topic d
+		LEFT JOIN third_merchant_biz t ON d.third_merch_sn = t.third_merch_sn
+		LEFT JOIN mk_store_prom_type pt ON d.prom_type_id = pt.prom_type_id
+		left join mall_store s on d.store_id = s.id
 		WHERE 1=1
 		<if test="name != null and name.trim() != ''">
 			AND title LIKE concat('%',#{name},'%')
@@ -91,7 +98,7 @@
 			limit #{offset}, #{limit}
 		</if>
 	</select>
-	
+
  	<select id="queryTotal" resultType="int">
 		select count(*)
 		from mall_store_topic d left join third_merchant_biz t on d.third_merch_sn = t.third_merch_sn
@@ -112,7 +119,7 @@
 			AND t.third_party_merch_code = #{thirdPartyMerchCode}
 		</if>
 	</select>
-	 
+
 	<insert id="save" parameterType="com.kmall.admin.entity.mk.store.StoreTopicEntity" useGeneratedKeys="true" keyProperty="id">
 		insert into mall_store_topic(
 			`title`,
@@ -147,9 +154,9 @@
 			#{modTime},
 			#{tstm})
 	</insert>
-	 
+
 	<update id="update" parameterType="com.kmall.admin.entity.mk.store.StoreTopicEntity">
-		update mall_store_topic 
+		update mall_store_topic
 		<set>
 			<if test="title != null">`title` = #{title}, </if>
 			<if test="content != null">`content` = #{content}, </if>
@@ -169,16 +176,16 @@
 		</set>
 		where id = #{id}
 	</update>
-	
+
 	<delete id="delete">
 		delete from mall_store_topic where id = #{value}
 	</delete>
-	
+
 	<delete id="deleteBatch">
-		delete from mall_store_topic where id in 
+		delete from mall_store_topic where id in
 		<foreach item="id" collection="array" open="(" separator="," close=")">
 			#{id}
 		</foreach>
 	</delete>
 
-</mapper>
+</mapper>

+ 79 - 0
kmall-admin/src/main/webapp/WEB-INF/page/faceid/type10ordernopay.html

@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>人脸识别(保税展示跨境商品未支付订单)</title>
+    #parse("sys/header.html")
+</head>
+<body>
+<div id="rrapp" v-cloak>
+	<div v-show="showList == 0">
+        <Row :gutter="16">
+            <div class="search-group">
+                <i-col span="4">
+                    <i-input v-model="q.orderSn" @on-enter="query" placeholder="订单编号"/>
+                </i-col>
+                <i-button @click="query">查询</i-button>
+                <i-button @click="reloadSearch">重置</i-button>
+            </div>
+        </Row>
+	    <table id="jqGrid"></table>
+	    <div id="jqGridPager"></div>
+    </div>
+
+    <Card v-show="showList == 2">
+        <p slot="title">{{title}}</p>
+        <i-form ref="formValidate" :model="faceLivenessRecognition" :rules="ruleValidate" :label-width="80">
+            <Form-item label="身份证" prop="idCard">
+                <i-input type="text" v-model="faceLivenessRecognition.idCard" placeholder="身份证" disabled/>
+            </Form-item>
+            <Form-item label="姓名" prop="name">
+                <i-input type="text" v-model="faceLivenessRecognition.name" placeholder="姓名" disabled/>
+            </Form-item>
+            <Form-item label="录制视频" prop="videoUrl" >
+                <div style="width: 100% !important;">
+                    <video src="" width="480" height="320" style="width: 480px !important;height: 320px !important;float: left" controls id="video"></video>
+                    <p style="float: left;margin-left: 100px">视频录制成功预览:</p>
+                    <div id="outVideo-div" style="border: 1px solid #ccc;width: 480px !important;height: 320px !important;float: left"></div>
+                    <div style="border: 1px solid #ccc;width: 480px !important;height: 320px !important;">.</div>
+                </div>
+                <div style="width: 100% !important;">
+                    <!--                <i-button id="rec">开始录制</i-button>-->
+                    <!--                <i-button id="camera">拍照</i-button>-->
+                    <div id="commentDiv" style="width: 100%;height: 30px;color: red"></div>
+                    <div id="showtimes" style="width: 100%;height: 30px;color: red;font-weight: bolder;"></div>
+                    <div style="width: 100%;height: 30px;color: red;font-weight: bolder;">点击开始或重新开始录像按钮,自动录像3秒视频上传后台服务,点击提交按钮进行活体人脸识别核验,失败了则重新录像</div>
+                    <i-button id="startBtn">开始</i-button>
+<!--                    <i-button id="stopBtn">停止</i-button>-->
+                    <i-button id="ppBtn">重新开始录像</i-button>
+                </div>
+
+                <!--canvs绘制-->
+<!--                <canvas width="480" height="320" id="outrec"></canvas>-->
+                <!--base64绘制-->
+<!--                <img id="imgvideo" style="display:none;" width="640" height="480" src="" />-->
+            </Form-item>
+            <i-button id="sub" type="primary" @click="handleSubmit('formValidate')">提交</i-button>
+            <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
+        </i-form>
+    </Card>
+
+    <Card v-show="showList == 3">
+        <p slot="title">{{title}}</p>
+        <i-form ref="formValidate" :model="checkFaceOperator" :rules="ruleValidate" :label-width="120">
+            <Form-item label="核验操作类型" prop="idCard">
+                {{checkFaceOperator.checkOperatorType==1?'人脸活体识别':'按钮审核身份'}}
+            </Form-item>
+            <Form-item label="审核会员身份操作人" prop="checkOperatorSn">
+                {{checkFaceOperator.checkOperatorSn}}
+            </Form-item>
+            <Form-item label="审核操作时间" prop="checkOperatorTime">
+                {{checkFaceOperator.checkOperatorTime}}
+            </Form-item>
+            <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
+        </i-form>
+    </Card>
+</div>
+<script src="https://cdn.webrtc-experiment.com/MediaStreamRecorder.js"> </script>
+<script src="${rc.contextPath}/js/faceid/type10ordernopay.js?_${date.systemTime}"></script>
+</body>
+</html>

+ 26 - 2
kmall-admin/src/main/webapp/WEB-INF/page/shop/ad.html

@@ -6,7 +6,7 @@
 </head>
 <body>
 <div id="rrapp" v-cloak>
-    <div v-show="showList">
+    <div v-show="!showViewList">
         <Row :gutter="16">
             <div class="search-group">
                 <i-col span="4">
@@ -111,8 +111,32 @@
             </Form-item>
         </i-form>
     </Card>
+
+    <Card v-show="!showCopyList">
+        <p slot="title">{{title}}</p>
+        <i-form>
+            <Form-item label="广告id" prop="id">
+                <i-input v-model="copyAdDto.adId" placeholder="广告id" disabled/>
+            </Form-item>
+            <Form-item>
+                <Upload :show-upload-list="false" :on-success="uploadExcelSuccess" :on-error="uploadExcelError" :on-format-error="uploadExcelFormatError"
+                        :format="['xls','xlsx']"
+                        action="../uploadCommon/storeIdUpload">
+                    <i-button type="ghost" icon="ios-cloud-upload-outline">复制广告(批量上传门店id)</i-button>
+                </Upload>
+                &nbsp;&nbsp;&nbsp;<a href="../statics/file/store_id_export_yyyy_mm_dd_v1.0.0.xls">广告门店id模板下载</a>&nbsp;&nbsp;&nbsp;&nbsp;
+            </Form-item>
+            <Form-item label="上传成功的门店id" prop="storeList">
+                <i-input v-model="copyAdDto.storeList" placeholder="上传成功的门店id" disabled/>
+            </Form-item>
+            <Form-item>
+                <i-button type="primary" @click="handleSubmitCopyAd()">提交</i-button>
+                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
+            </Form-item>
+        </i-form>
+    </Card>
 </div>
 
 <script src="${rc.contextPath}/js/shop/ad.js?_${date.systemTime}"></script>
 </body>
-</html>
+</html>

+ 36 - 2
kmall-admin/src/main/webapp/WEB-INF/page/shop/brand.html

@@ -6,12 +6,19 @@
 </head>
 <body>
 <div id="rrapp" v-cloak>
-    <div v-show="showList">
+    <div v-show="!showViewList">
         <Row :gutter="16">
             <div class="search-group">
                 <i-col span="4">
                     <i-input v-model="q.name" @on-enter="query" placeholder="品牌名称"/>
                 </i-col>
+                <i-col span="3">
+                    <i-select v-model="q.storeId" placeholder="门店" filterable label-in-value>
+                        <i-option v-for="store in stores" :value="store.id"
+                                  :key="store.id">{{store.storeName}}
+                        </i-option>
+                    </i-select>
+                </i-col>
                 <i-button @click="query">查询</i-button>
             </div>
             <div class="buttons-group">
@@ -206,8 +213,35 @@
             </Form-item>
         </i-form>
     </Card>
+
+    <Card v-show="!showCopyList">
+        <p slot="title">{{title}}</p>
+        <i-form>
+            <Form-item label="品牌id" prop="id">
+                <i-input v-model="copyBrandDto.brandId" placeholder="品牌id" disabled/>
+            </Form-item>
+            <Form-item>
+                <Upload :show-upload-list="false" :on-success="uploadExcelSuccess" :on-error="uploadExcelError" :on-format-error="uploadExcelFormatError"
+                        :format="['xls','xlsx']"
+                        action="../uploadCommon/brandStoreUpload">
+                    <i-button type="ghost" icon="ios-cloud-upload-outline">复制品牌(批量上传门店id)</i-button>
+                </Upload>
+                &nbsp;&nbsp;&nbsp;<a href="../statics/file/category_store_export_yyyy_mm_dd_v1.0.0.xls">品牌门店id模板下载</a>&nbsp;&nbsp;&nbsp;&nbsp;
+            </Form-item>
+            <Form-item label="上传成功的门店id" prop="storeList">
+                <i-input v-model="copyBrandDto.storeList" placeholder="上传成功的门店id" disabled/>
+            </Form-item>
+            <Form-item label="上传成功的分类id" prop="categoryList">
+                <i-input v-model="copyBrandDto.categoryList" placeholder="上传成功的分类id" disabled/>
+            </Form-item>
+            <Form-item>
+                <i-button type="primary" @click="handleSubmitCopyBrand()">提交</i-button>
+                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
+            </Form-item>
+        </i-form>
+    </Card>
 </div>
 
 <script src="${rc.contextPath}/js/shop/brand.js?_${date.systemTime}"></script>
 </body>
-</html>
+</html>

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