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

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

 Conflicts:
	kmall-admin/src/main/webapp/statics/file/activities_score_yyyy_mm_dd_v1.0.0.xlsx
lhm 3 роки тому
батько
коміт
ec8c45e919
38 змінених файлів з 689 додано та 388 видалено
  1. 2 2
      kmall-admin/src/main/java/com/kmall/admin/controller/BrandController.java
  2. 9 28
      kmall-admin/src/main/java/com/kmall/admin/controller/OrderController.java
  3. 4 0
      kmall-admin/src/main/java/com/kmall/admin/controller/mk/MkActivitiesController.java
  4. 1 3
      kmall-admin/src/main/java/com/kmall/admin/controller/vip/Mall2PointsRulesController.java
  5. 9 0
      kmall-admin/src/main/java/com/kmall/admin/dao/mk/MkActivitiesAssociationDao.java
  6. 13 0
      kmall-admin/src/main/java/com/kmall/admin/entity/StoreSmsConfigEntity.java
  7. 7 0
      kmall-admin/src/main/java/com/kmall/admin/service/OrderService.java
  8. 88 35
      kmall-admin/src/main/java/com/kmall/admin/service/impl/BrandServiceImpl.java
  9. 62 4
      kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderServiceImpl.java
  10. 52 39
      kmall-admin/src/main/java/com/kmall/admin/service/impl/ProductStoreRelaServiceImpl.java
  11. 16 0
      kmall-admin/src/main/java/com/kmall/admin/service/impl/mk/MkActivitiesScoreServiceImpl.java
  12. 1 1
      kmall-admin/src/main/java/com/kmall/admin/service/impl/mk/MkActivitiesServiceImpl.java
  13. 37 7
      kmall-admin/src/main/java/com/kmall/admin/service/impl/vip/Mall2PointsRulesServiceImpl.java
  14. 1 0
      kmall-admin/src/main/java/com/kmall/admin/service/vip/Mall2PointsRulesService.java
  15. 2 2
      kmall-admin/src/main/resources/mybatis/mapper/GoodsDao.xml
  16. 3 1
      kmall-admin/src/main/resources/mybatis/mapper/OrderDao.xml
  17. 2 1
      kmall-admin/src/main/resources/mybatis/mapper/StoreMngChangeDao.xml
  18. 15 13
      kmall-admin/src/main/resources/mybatis/mapper/StoreSmsConfigDao.xml
  19. 15 0
      kmall-admin/src/main/resources/mybatis/mapper/mk/MkActivitiesAssociationDao.xml
  20. 6 0
      kmall-admin/src/main/resources/mybatis/mapper/mk/MkActivitiesScoreDao.xml
  21. 3 0
      kmall-admin/src/main/resources/mybatis/mapper/vip/Mall2PointsRulesDao.xml
  22. 22 4
      kmall-admin/src/main/webapp/WEB-INF/page/mk/mall2RulesDetil.html
  23. 6 3
      kmall-admin/src/main/webapp/WEB-INF/page/mk/mkactivitiesscore.html
  24. 102 102
      kmall-admin/src/main/webapp/WEB-INF/page/shop/brand.html
  25. 8 8
      kmall-admin/src/main/webapp/WEB-INF/page/shop/storeProductStock.html
  26. 3 0
      kmall-admin/src/main/webapp/WEB-INF/page/shop/storemngchange.html
  27. 2 2
      kmall-admin/src/main/webapp/WEB-INF/page/vip/mall2pointsrules.html
  28. 28 1
      kmall-admin/src/main/webapp/js/mk/mall2RulesDetil.js
  29. 47 18
      kmall-admin/src/main/webapp/js/mk/mkactivitiesscore.js
  30. 29 24
      kmall-admin/src/main/webapp/js/mk/mkactivityform.js
  31. 1 1
      kmall-admin/src/main/webapp/js/receipt/receiptCheck.js
  32. 14 14
      kmall-admin/src/main/webapp/js/sale/sale.js
  33. 68 65
      kmall-admin/src/main/webapp/js/shop/brand.js
  34. 9 9
      kmall-admin/src/main/webapp/js/shop/storeProductStock.js
  35. 2 1
      kmall-admin/src/main/webapp/js/shop/storesmsconfig.js
  36. BIN
      kmall-admin/src/main/webapp/statics/file/activities_score_yyyy_mm_dd_v1.0.0.xlsx
  37. BIN
      kmall-admin/src/main/webapp/statics/file/brand_export_yyyy_mm_dd_v1.0.0.xls
  38. BIN
      kmall-admin/src/main/webapp/statics/file/mall2RulesDetil_1.0.xlsx

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

@@ -250,8 +250,8 @@ public class BrandController {
         }
         try {
             if (brandEntityList == null || brandEntityList.size() == 0) {
-                logger.error("读取数据为空!");
-                return R.error("读取数据为空!");
+                logger.error("品牌名称不能为空!");
+                return R.error("品牌名称不能为空!");
             }
 
             brandService.uploadExcel(brandEntityList);

+ 9 - 28
kmall-admin/src/main/java/com/kmall/admin/controller/OrderController.java

@@ -1099,40 +1099,21 @@ public class OrderController {
         }
     }
 
-    @RequestMapping("/resendOrderToCCNET/{orderSn}/{resendType}")
-    public R resendWayBill(@PathVariable("orderSn") String orderSn, @PathVariable("resendType") String resendType){
+    /**
+     * 海控支付单重推
+     * @param orderSn
+     * @return
+     */
+    @RequestMapping("/resendOrderWayBill/{orderSn}")
+    public R resendWayBill(@PathVariable("orderSn") String orderSn){
 
-        String response = null;
-        Map map = new HashMap();
-        map.put("orderSn",orderSn);
         try {
-            String url = "";
-            if("waybill".equals(resendType)){
-                url = OmsMerchPropertiesBuilder.instance().getWxOrderResendUrl() + "/resendWaybill/"+orderSn;
-
-            }else if("payment".equals(resendType)){
-                url = OmsMerchPropertiesBuilder.instance().getWxOrderResendUrl() + "/resendPayment/"+orderSn;
-            }else if("notice".equals(resendType)){
-                url = OmsMerchPropertiesBuilder.instance().getWxOrderResendUrl() + "/notice/"+orderSn;
-            }else if("clsOrder".equals(resendType)){
-                url = OmsMerchPropertiesBuilder.instance().getWxOrderResendUrl() + "/clsOrder/"+orderSn;
-            }else if("forceSend".equals(resendType)){
-                url = OmsMerchPropertiesBuilder.instance().getWxOrderResendUrl() + "/forceSend/"+orderSn;
-            }else if("resendOrder".equals(resendType)){
-                url = OmsMerchPropertiesBuilder.instance().getWxOrderResendUrl() + "/resendOrder/"+orderSn;
-            }
-            // 同步访问,返回结果字符串
-            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 orderService.resendWayHkBill(orderSn);
         } catch (Exception e) {
             logger.error("查询失败。"+e.getMessage());
+            return R.error("重发支付单失败");
         }
 
-
-        return R.ok(response);
     }
 
 

+ 4 - 0
kmall-admin/src/main/java/com/kmall/admin/controller/mk/MkActivitiesController.java

@@ -108,6 +108,10 @@ public class MkActivitiesController {
             throw new RRException(r.get("msg").toString());
         }
 
+        if("0".equals(mkActivities.getMkaEndEarly())){
+            mkActivities.setMkdEndEarlyTime("");
+        }
+
         mkActivitiesService.update(mkActivities);
         return R.ok();
     }

+ 1 - 3
kmall-admin/src/main/java/com/kmall/admin/controller/vip/Mall2PointsRulesController.java

@@ -92,7 +92,6 @@ public class Mall2PointsRulesController {
      * 删除
      */
     @RequestMapping("/delete")
-//    @RequiresPermissions("mall2pointsrules:delete")
     @ResponseBody
     public R delete(@RequestBody Integer[]mprIds) {
         mall2PointsRulesService.deleteBatch(mprIds);
@@ -120,8 +119,7 @@ public class Mall2PointsRulesController {
             return R.error("导入失败!");
         }
         mall2PointsRulesService.rulesUploadDetil(mall2RulesDtoList,mkaId);
-        //上传文件
-        return R.ok("导入成功!");
+        return R.ok();
     }
 
     /**

+ 9 - 0
kmall-admin/src/main/java/com/kmall/admin/dao/mk/MkActivitiesAssociationDao.java

@@ -13,5 +13,14 @@ import org.apache.ibatis.annotations.Param;
  */
 public interface MkActivitiesAssociationDao extends BaseDao<MkActivitiesAssociationEntity> {
 
+    /**
+     * 根据营销活动id更新营销活动关联表对应数据
+     *
+     * @author zhuhh
+     * @param mkActivitiesAssociationEntity
+     * @return
+     */
+    int updateByMkaId(MkActivitiesAssociationEntity mkActivitiesAssociationEntity);
+
     MkActivitiesAssociationEntity queryByMkCodeAndTopic(@Param("mkCode") String mkCode, @Param("mkaTopic") String mkaTopic, @Param("mkaStoreId") String mkaStoreId);
 }

+ 13 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/StoreSmsConfigEntity.java

@@ -61,6 +61,11 @@ public class StoreSmsConfigEntity implements Serializable {
 
     private String isEnable;
 
+    /**
+     * 门店名称
+     */
+    private String storeName;
+
     public String getIsEnable() {
         return isEnable;
     }
@@ -212,4 +217,12 @@ public class StoreSmsConfigEntity implements Serializable {
     public Date getTstm() {
         return tstm;
     }
+
+    public String getStoreName() {
+        return storeName;
+    }
+
+    public void setStoreName(String storeName) {
+        this.storeName = storeName;
+    }
 }

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

@@ -244,4 +244,11 @@ public interface OrderService {
      * @return      结果
      */
     int updateBuyerPayCheck(Map<String, Object> wxMap);
+
+    /**
+     * 支付单重推
+     * @param orderSn
+     * @return
+     */
+    R resendWayHkBill(String orderSn) throws Exception;
 }

+ 88 - 35
kmall-admin/src/main/java/com/kmall/admin/service/impl/BrandServiceImpl.java

@@ -6,6 +6,7 @@ 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.admin.utils.ValidateUtils;
 import com.kmall.common.utils.MapBeanUtil;
 import com.kmall.common.utils.R;
 import com.kmall.common.utils.RRException;
@@ -59,37 +60,63 @@ public class BrandServiceImpl implements BrandService {
     @Override
     public int save(BrandEntity brand) {
 
-//        // 品牌唯一标识符正则校验
-//        String uniqueIdentifier = brand.getUniqueIdentifier();
-//        String regex = "(^[0-9a-zA-Z_&]{1,10}$)";
-//        if(!Pattern.matches(regex,uniqueIdentifier)){
-//            throw new RuntimeException("请输入正确的品牌唯一简码,有问题的简码:"+uniqueIdentifier);
-//        }
-//
-//        // 如果是正确的,根据唯一简码查询该简码是否存在
-//        BrandEntity brandEntity = brandDao.queryByUniqueIdentifier(uniqueIdentifier);
-//        if(brandEntity != null ){
-//            throw new RuntimeException("该唯一简码已存在,请检查唯一简码,唯一简码:"+uniqueIdentifier);
-//        }
+        // 品牌唯一标识符正则校验
+        String uniqueIdentifier = brand.getUniqueIdentifier();
+        String regex = "(^[0-9a-zA-Z_&]{1,10}$)";
+        if (StringUtils.isNotBlank(uniqueIdentifier)) {
+            if (!Pattern.matches(regex, uniqueIdentifier)) {
+                throw new RuntimeException("请输入正确的品牌唯一简码,有问题的简码:" + uniqueIdentifier);
+            }
+
+            // 如果是正确的,根据唯一简码查询该简码是否存在
+            BrandEntity brandEntity = brandDao.queryByUniqueIdentifier(uniqueIdentifier);
+            if (brandEntity != null) {
+                throw new RuntimeException("该唯一简码已存在,请检查唯一简码,唯一简码:" + uniqueIdentifier);
+            }
+        }
+
+        // 品牌名称正则校验
+        if (!ValidateUtils.validateSpecialAllowChinese(brand.getName())) {
+            throw new RuntimeException("请输入正确的品牌名称,有问题的品牌名称:" + brand.getName());
+        }
+
+        // 根据名称查询该名称是否存在
+        BrandEntity nameEntity = brandDao.queryByName(brand.getName());
+        if (nameEntity != null) {
+            throw new RuntimeException("该品牌名称已存在,请检查品牌名称,品牌名称:" + brand.getName());
+        }
 
         return brandDao.save(brand);
     }
 
     @Override
     public int update(BrandEntity brand) {
-//
-//        // 品牌唯一标识符正则校验
-//        String uniqueIdentifier = brand.getUniqueIdentifier();
-//        String regex = "(^[0-9a-zA-Z_&]{1,10}$)";
-//        if(!Pattern.matches(regex,uniqueIdentifier)){
-//            throw new RuntimeException("请输入正确的品牌唯一简码,有问题的简码:"+uniqueIdentifier);
-//        }
-//
-//        // 如果是正确的,根据唯一简码查询该简码是否存在
-//        BrandEntity brandEntity = brandDao.queryByUniqueIdentifier(uniqueIdentifier);
-//        if(brandEntity != null && brand.getId().compareTo(brandEntity.getId()) != 0){
-//            throw new RuntimeException("该唯一简码已存在,请检查唯一简码,唯一简码:"+uniqueIdentifier);
-//        }
+
+        // 品牌唯一标识符正则校验
+        String uniqueIdentifier = brand.getUniqueIdentifier();
+        String regex = "(^[0-9a-zA-Z_&]{1,10}$)";
+        if (StringUtils.isNotBlank(uniqueIdentifier)) {
+            if (!Pattern.matches(regex, uniqueIdentifier)) {
+                throw new RuntimeException("请输入正确的品牌唯一简码,有问题的简码:" + uniqueIdentifier);
+            }
+
+            // 如果是正确的,根据唯一简码查询该简码是否存在
+            BrandEntity brandEntity = brandDao.queryByUniqueIdentifier(uniqueIdentifier);
+            if (brandEntity != null && brand.getId().compareTo(brandEntity.getId()) != 0) {
+                throw new RuntimeException("该唯一简码已存在,请检查唯一简码,唯一简码:" + uniqueIdentifier);
+            }
+        }
+
+        // 品牌名称正则校验
+        if (!ValidateUtils.validateSpecialAllowChinese(brand.getName())) {
+            throw new RuntimeException("请输入正确的品牌名称,有问题的品牌名称:" + brand.getName());
+        }
+
+        // 根据名称查询该名称是否存在
+        BrandEntity nameEntity = brandDao.queryByName(brand.getName());
+        if (nameEntity != null && !nameEntity.getId().equals(brand.getId())) {
+            throw new RuntimeException("该品牌名称已存在,请检查品牌名称,品牌名称:" + brand.getName());
+        }
 
         return brandDao.update(brand);
     }
@@ -241,19 +268,31 @@ public class BrandServiceImpl implements BrandService {
             String name = brandEntity.getName();
             Integer isShow = brandEntity.getIsShow();
             Integer isNew = brandEntity.getIsNew();
-            // 品牌唯一标识符正则校验
             String uniqueIdentifier = brandEntity.getUniqueIdentifier();
+            String simpleDesc = brandEntity.getSimpleDesc();
 
-            if (isShow.intValue() != 0 && isShow.intValue() != 1 && isNew.intValue() != 0 && isNew != 1) {
-                throw new ServiceException("第" + (i + 1) + "行的是否显示或者是否新品牌只可填(0:否 1:是)");
+            if (isShow != 0 && isShow != 1) {
+                throw new ServiceException("第" + (i + 1) + "行的是否显示只可填(0:否 1:是)");
             }
-
+            if (isNew != 0 && isNew != 1) {
+                throw new ServiceException("第" + (i + 1) + "行的是否新品牌只可填(0:否 1:是)");
+            }
+            // 品牌唯一标识符正则校验
             if (StringUtils.isNotBlank(uniqueIdentifier)) {
                 String regex = "(^[0-9a-zA-Z_&]{1,10}$)";
                 if (!Pattern.matches(regex, uniqueIdentifier)) {
-                    throw new RuntimeException("请输入正确的品牌唯一简码,有问题的简码:" + uniqueIdentifier);
+                    throw new ServiceException("第" + (i + 1) + "行的品牌唯一简码包含特殊字符或长度过长");
                 }
             }
+            if (!ValidateUtils.validateSpecialAllowChinese(name)) {
+                throw new ServiceException("第" + (i + 1) + "行的品牌名称包含特殊字符或长度过长");
+            }
+            if (StringUtils.isBlank(simpleDesc)) {
+                throw new ServiceException("第" + (i + 1) + "行的描述不能为空");
+            }
+            if (!ValidateUtils.validateSpecialAllowChinese(simpleDesc)) {
+                throw new ServiceException("第" + (i + 1) + "行的描述包含特殊字符或长度过长");
+            }
 
             // 数据库查询是否存在对应名字的对象
             BrandEntity isExist = brandDao.queryByName(name);
@@ -261,9 +300,11 @@ public class BrandServiceImpl implements BrandService {
             // 不存在则添加
             if (isExist == null) {
                 // 如果是正确的,根据唯一简码查询该简码是否存在
-                BrandEntity queryBrandEntity = brandDao.queryByUniqueIdentifier(uniqueIdentifier);
-                if (Objects.nonNull(queryBrandEntity)) {
-                    throw new ServiceException("第" + (i + 1) + "行的该品牌:【" + queryBrandEntity.getName() + "】已存在!");
+                if (StringUtils.isNotBlank(uniqueIdentifier)) {
+                    BrandEntity queryBrandEntity = brandDao.queryByUniqueIdentifier(uniqueIdentifier);
+                    if (Objects.nonNull(queryBrandEntity)) {
+                        throw new ServiceException("第" + (i + 1) + "行的品牌唯一简码:【" + queryBrandEntity.getUniqueIdentifier() + "】已存在!");
+                    }
                 }
 
                 BrandEntity insertBrandEntity = new BrandEntity();
@@ -272,12 +313,24 @@ public class BrandServiceImpl implements BrandService {
                 insertBrandEntity.setUniqueIdentifier(uniqueIdentifier);
                 insertBrandEntity.setIsShow(isShow);
                 insertBrandEntity.setIsNew(isNew);
-                this.save(insertBrandEntity);
+                brandDao.save(insertBrandEntity);
 
             } else {
                 // 存在则修改
+
+                // 判断品牌唯一简码是否存在
+                if (StringUtils.isNotBlank(uniqueIdentifier)) {
+                    BrandEntity queryBrandEntity = brandDao.queryByUniqueIdentifier(uniqueIdentifier);
+                    if (Objects.nonNull(queryBrandEntity) && !queryBrandEntity.getName().equals(name)) {
+                        throw new ServiceException("第" + (i + 1) + "行的品牌唯一简码:【" + queryBrandEntity.getUniqueIdentifier() + "】已存在!");
+                    }
+                }
+
+                Integer id = isExist.getId();
                 BeanUtils.copyProperties(brandEntity, isExist);
-                this.update(isExist);
+                isExist.setId(id);
+                isExist.setUniqueIdentifier(uniqueIdentifier == null ? "" : uniqueIdentifier);
+                brandDao.update(isExist);
             }
         }
     }

+ 62 - 4
kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderServiceImpl.java

@@ -2279,6 +2279,9 @@ public class OrderServiceImpl implements OrderService {
 
             // 商品总重量
             BigDecimal weight = new BigDecimal(0);
+            //生成商户订单号
+            SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
+            String orderSn = "ZWCW" + format.format(new Date()) + CommonUtil.generateOrderNumber();
             // 检查库存和更新库存
             for (QueryGoodsVO goodsDto : queryGoodsVOList) {
                 // 要购买的数量
@@ -2306,6 +2309,7 @@ public class OrderServiceImpl implements OrderService {
                     // 门店库存变化记录
                     StoreMngChangeEntity storeMngChangeEntity = new StoreMngChangeEntity();
                     storeMngChangeEntity.setChangeType(Dict.changeType.item_1.getItem());
+                    storeMngChangeEntity.setOrderSn(orderSn);
                     storeMngChangeEntity.setChangeReason("商品销售扣减");
                     storeMngChangeEntity.setGoodsId(goodsDto.getId().intValue());
                     storeMngChangeEntity.setStoreId(Integer.parseInt(String.valueOf(goodsDto.getStoreId())));
@@ -2452,6 +2456,7 @@ public class OrderServiceImpl implements OrderService {
             BigDecimal actualPrice = new BigDecimal((String) param.get("actualPrice"));
             // OrderVo order = setOrderVo(goodsEntities, userEntity, storeId.longValue(), user.getMerchSn(), disCountAmount, totalTax, status, mapAddr);
             OrderVo order = setOrderVo(goodsEntities, userEntity, storeId.longValue(), user.getMerchSn(), totalTax, status, mapAddr, actualPrice);
+            order.setOrder_sn(orderSn);
             order.setStore_id(storeId.longValue());
             String couponSn = (String) userInfo.get("couponSn");
             order.setMerchOrderSn(merchOrderSn);
@@ -4960,10 +4965,10 @@ public class OrderServiceImpl implements OrderService {
         // 加上税额
         goodsTotalPrice = goodsTotalPrice.subtract(totalTax).setScale(2, RoundingMode.HALF_UP);
 
-        SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
-
-        String orderSn = "ZWCW" + format.format(new Date()) + CommonUtil.generateOrderNumber();
-        orderInfo.setOrder_sn(orderSn);
+//        SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
+//
+//        String orderSn = "ZWCW" + format.format(new Date()) + CommonUtil.generateOrderNumber();
+//        orderInfo.setOrder_sn(orderSn);
         orderInfo.setMerchSn(merchSn);
         orderInfo.setUser_id(loginUser.getId().longValue());
         orderInfo.setNumber(number);
@@ -5146,4 +5151,57 @@ public class OrderServiceImpl implements OrderService {
     public int updateBuyerPayCheck(Map<String, Object> wxMap) {
         return orderDao.updateBuyerPayCheck(wxMap);
     }
+
+    /**
+     * 支付单重推
+     * @param orderSn
+     * @return
+     */
+    @Override
+    public R resendWayHkBill(String orderSn) throws Exception {
+
+        OrderEntity orderEntity = orderDao.queryObjectByOrderSn(orderSn);
+        if(null==orderEntity){
+            return R.error("该订单不存在");
+        }
+        StoreEntity store = storeService.queryObject(orderEntity.getStoreId().intValue());
+        if(null==store){
+            return R.error("该订单所属门店不存在:"+orderEntity.getOrderSn());
+        }
+        MerchEntity merchEntity = merchDao.findByMerchSn(orderEntity.getMerchSn());
+        if(null==merchEntity){
+            return R.error("该订单所属商户不存在:"+orderEntity.getOrderSn());
+        }
+        // 组装支付单信息
+        Map<String, Object> orderSendCusParams = new HashMap<>();
+        if(Dict.payFlag.item_weixin.getItem().equals(orderEntity.getPayFlag())){
+            orderSendCusParams.put("merchSn", orderEntity.getMerchSn());
+            orderSendCusParams.put("orderSn", orderEntity.getOrderSn());
+            orderSendCusParams.put("merchName", merchEntity.getMerchName());
+            orderSendCusParams.put("thirdPartyMerchCode", store.getThirdPartyMerchCode());
+            orderSendCusParams.put("thirdPartyMerchName", store.getThirdPartyMerchName());
+            orderSendCusParams.put("outTradeNo", orderEntity.getMerchOrderSn());
+            //微信支付流水号
+            orderSendCusParams.put("transactionId", orderEntity.getPayTransactionId());
+            orderSendCusParams.put("subOrderId", "");   // ccnet原逻辑没有对该字段赋值
+            orderSendCusParams.put("subOrderNo", orderEntity.getOrderSn());
+
+            // 将支付单信息发送到当前项目下的 cuspay
+            wxCusDeclareBiz.biz(orderSendCusParams);
+        }else {
+            // 组装支付单信息
+            orderSendCusParams.put("merchSn", orderEntity.getMerchSn());
+            orderSendCusParams.put("orderSn", orderEntity.getOrderSn());
+            orderSendCusParams.put("merchName", merchEntity.getMerchName());
+            orderSendCusParams.put("thirdPartyMerchCode", store.getThirdPartyMerchCode());
+            orderSendCusParams.put("thirdPartyMerchName", store.getThirdPartyMerchName());
+            //阿里支付流水号
+            orderSendCusParams.put("tradeNo", orderEntity.getAliTradeNo());
+            orderSendCusParams.put("amount", orderEntity.getActualPrice());
+
+            // 将支付单信息发送到当前项目下的 cuspay
+            aliCusDeclareBiz.biz(orderSendCusParams);
+        }
+        return R.ok();
+    }
 }

+ 52 - 39
kmall-admin/src/main/java/com/kmall/admin/service/impl/ProductStoreRelaServiceImpl.java

@@ -959,16 +959,16 @@ public class ProductStoreRelaServiceImpl implements ProductStoreRelaService {
                 storeRelaEntity.setRetailPrice(new BigDecimal(storeGoodsDto.getRetailPrice()));
                 storeRelaEntity.setBottomLinePrice(storeGoodsDto.getBottomLinePrice());
                 storeRelaEntity.setStockNum(Integer.valueOf(storeGoodsDto.getStockNum()));
-                String strCheck = productStoreRelaDao.queryproductStoreByName(storeRelaEntity.getSku(),storeRelaEntity.getStoreId());
-                if(strCheck!=null&&!"".equals(strCheck)){
-                    throw new RuntimeException("该商品在当前账号所属门店已存在,请勿重复导入!"+storeRelaEntity.getGoodsSn());
-                }
+//                String strCheck = productStoreRelaDao.queryproductStoreByName(storeRelaEntity.getSku(),storeRelaEntity.getStoreId());
+//                if(strCheck!=null&&!"".equals(strCheck)){
+//                    throw new RuntimeException("该商品在当前账号所属门店已存在,请勿重复导入!"+storeRelaEntity.getGoodsSn());
+//                }
                 ProductStoreRelaEntity productStoreRelaEntity = productStoreRelaDao.queryByGoodsIdAndStoreId(storeRelaEntity.getStoreId(), storeRelaEntity.getGoodsId());
                 if (Objects.isNull(productStoreRelaEntity)) {
                     ((ProductStoreRelaService) AopContext.currentProxy()).save(storeRelaEntity);
                 }else{
                     storeRelaEntity.setId(productStoreRelaEntity.getId());
-                    storeRelaEntity.setStockNum(productStoreRelaEntity.getStockNum()+Integer.valueOf(storeGoodsDto.getStockNum()));
+                    storeRelaEntity.setStockNum(productStoreRelaEntity.getStockNum());
                     ((ProductStoreRelaService) AopContext.currentProxy()).update(storeRelaEntity);
                 }
 
@@ -1054,17 +1054,37 @@ public class ProductStoreRelaServiceImpl implements ProductStoreRelaService {
     }
 
     /**
-     * 这里调用当前bean的save()和update(),事务会失效
+     * 这里调用当前bean的save()和update(),事务会失效,【修改库存】
      */
     @Override
     @Transactional
     public int uploadExcelByCover(List<StoreGoodsDto> storeGoodsDtoList) {
         if (storeGoodsDtoList != null && storeGoodsDtoList.size() > 0) {
+
             for (int i = 0; i < storeGoodsDtoList.size(); i++) {
                 StoreGoodsDto storeGoodsDto = storeGoodsDtoList.get(i);
+
+                Map<String, Object> valideDate = MapBeanUtil.fromObject(storeGoodsDto);
+                ImmutableBiMap.Builder builder = new ImmutableBiMap.Builder();
+                builder.put("storeName", "门店名称");
+                builder.put("goodsSn", "sku");
+                builder.put("stockNum", "库存");
+                builder.put("categoryName", "一级分类");
+                builder.put("attributeCategory", "二级分类");
+                builder.put("brandName", "品牌");
+                builder.put("uniqueIdentifier", "品牌唯一简码");
+                builder.put("retailPrice", "零售价(税后)");
+                builder.put("marketPrice", "市场价");
+                builder.put("bottomLinePrice", "底线价");
+                builder.put("exitRegionNumber", "出区数");
+                R r = ValidatorUtil.isEmpty(builder.build(), valideDate);
+                if (Integer.valueOf(r.get("code").toString()) != 0) {
+                    throw new RRException(r.get("msg").toString());
+                }
+
                 ProductStoreRelaEntity storeRelaEntity = new ProductStoreRelaEntity();
                 StoreEntity store = storeDao.queryObjectByName(storeGoodsDto.getStoreName().trim());
-
+                storeRelaEntity.setExitRegionNumber(storeGoodsDto.getExitRegionNumber());
                 storeRelaEntity.setStoreId(store.getId());
                 GoodsEntity goodsEntity = goodsDao.queryObjectBySnNew(storeGoodsDto.getGoodsSn());
                 if (goodsEntity != null) {
@@ -1072,52 +1092,45 @@ public class ProductStoreRelaServiceImpl implements ProductStoreRelaService {
                 }else{
                     throw new RRException("商品[" + storeGoodsDto.getGoodsSn() + "]未录入系统");
                 }
-                CategoryEntity parentCategoryEntity = categoryDao.queryObjectByName(storeGoodsDto.getCategoryName(), store.getMerchSn(),0);
-                CategoryEntity categoryEntity;//二级分类
-                if (parentCategoryEntity != null) {
-                    categoryEntity = categoryDao.queryObjectByName(storeGoodsDto.getAttributeCategory(), store.getMerchSn(),parentCategoryEntity.getId());
-                    if (categoryEntity == null) {
-                        categoryEntity = initSaveCategoryEntity(storeGoodsDto.getAttributeCategory(), store.getMerchSn(), parentCategoryEntity.getId());
-                        categoryDao.save(categoryEntity);
-                        categoryEntity = categoryDao.queryObjectByName(storeGoodsDto.getAttributeCategory(), store.getMerchSn(),parentCategoryEntity.getId());
-                    }
-                }else{
-//                    throw new RRException("商品[" + storeGoodsDto.getGoodsSn() + "]的一级类别输入有误");
-                    // 如果没有一级分类就自动创建一二级分类
-                    parentCategoryEntity = initSaveCategoryEntity(storeGoodsDto.getCategoryName(), store.getMerchSn(),0);
-                    categoryDao.save(parentCategoryEntity);
-                    // 保存后再查出来
-                    parentCategoryEntity = categoryDao.queryObjectByName(storeGoodsDto.getCategoryName(), store.getMerchSn(),0);
-                    categoryEntity = initSaveCategoryEntity(storeGoodsDto.getAttributeCategory(),store.getMerchSn(),parentCategoryEntity.getId());
-                    categoryDao.save(categoryEntity);
-                    categoryEntity = categoryDao.queryObjectByName(storeGoodsDto.getAttributeCategory(), store.getMerchSn(),parentCategoryEntity.getId());
-                }
-
-                storeRelaEntity.setCategoryId(parentCategoryEntity.getId());
-                storeRelaEntity.setAttributeCategory(categoryEntity.getId());
 
-                BrandEntity brandEntity = brandDao.queryObjectByName(storeGoodsDto.getBrandName(), store.getMerchSn(),storeRelaEntity.getAttributeCategory());
-                if (brandEntity == null) {
-                    // throw new RRException("商品[" + storeGoodsDto.getGoodsSn() + "]的品牌输入有误");
-                    brandEntity = initSaveBrandEntity(storeGoodsDto.getBrandName(), store.getMerchSn(),storeRelaEntity.getAttributeCategory());
-                    brandDao.save(brandEntity);
-                    brandEntity = brandDao.queryObjectByName(storeGoodsDto.getBrandName(), store.getMerchSn(),storeRelaEntity.getAttributeCategory());
+                // 获取分类id
+                String firstLevelName = storeGoodsDto.getCategoryName().trim();
+                String secondLevelName = storeGoodsDto.getAttributeCategory().trim();
+                CategoryEntity categoryNew = categoryDao.queryByName(secondLevelName);
+                if(categoryNew != null){
+                    String categoryId = categoryNew.getId().toString();
+                    String level = categoryNew.getLevel();
+                    if(categoryId == null){
+                        throw new RuntimeException("该分类不是二级分类,请检查,对应条码是:"+ storeGoodsDto.getGoodsSn()+",分类名称为:"+ storeGoodsDto.getAttributeCategory());
+                    }else if(Dict.Level.item_L2.getItem().equals(level)){
+                        CategoryEntity firstCategory = categoryDao.queryByName(firstLevelName);
+                        if(firstCategory==null) {
+                            throw new RuntimeException("该分类不是一级分类,请检查,对应条码是:" + storeGoodsDto.getGoodsSn() + ",分类名称为:" + firstLevelName);
+                        }
+                        storeRelaEntity.setAttributeCategory(firstCategory.getId());
+                        storeRelaEntity.setCategoryId(Integer.parseInt(categoryId));
+                    }
+                }else {
+                    throw new RuntimeException("该分类不是二级分类,请检查,对应条码是:"+ storeGoodsDto.getGoodsSn()+",分类名称为:"+ storeGoodsDto.getAttributeCategory());
                 }
 
-                storeRelaEntity.setBrandId(brandEntity.getId());
+                checkBrand(storeGoodsDto, storeRelaEntity);
                 storeRelaEntity.setMarketPrice(new BigDecimal(storeGoodsDto.getMarketPrice()));
                 storeRelaEntity.setRetailPrice(new BigDecimal(storeGoodsDto.getRetailPrice()));
                 storeRelaEntity.setBottomLinePrice(storeGoodsDto.getBottomLinePrice());
                 storeRelaEntity.setStockNum(Integer.valueOf(storeGoodsDto.getStockNum()));
                 ProductStoreRelaEntity productStoreRelaEntity = productStoreRelaDao.queryByGoodsIdAndStoreId(storeRelaEntity.getStoreId(), storeRelaEntity.getGoodsId());
                 if (Objects.isNull(productStoreRelaEntity)) {
-                    save(storeRelaEntity);
+                    throw new RuntimeException("该商品不存在无法修改库存:"+ storeRelaEntity.getGoodsSn());
                 }else{
                     storeRelaEntity.setId(productStoreRelaEntity.getId());
                     storeRelaEntity.setStockNum(productStoreRelaEntity.getStockNum()+Integer.valueOf(storeGoodsDto.getStockNum()));
-                    update(storeRelaEntity);
+                    ((ProductStoreRelaService) AopContext.currentProxy()).update(storeRelaEntity);
                 }
+
             }
+
+
         }else{
             throw new RRException("导入数据为空,或者检查数据是否为空");
         }

+ 16 - 0
kmall-admin/src/main/java/com/kmall/admin/service/impl/mk/MkActivitiesScoreServiceImpl.java

@@ -6,7 +6,9 @@ import com.google.common.collect.ImmutableBiMap;
 import com.kmall.admin.dao.mk.MkActivitiesScoreDao;
 import com.kmall.admin.dto.ScoreReductionDTO;
 import com.kmall.admin.entity.mk.MkActivitiesScoreEntity;
+import com.kmall.admin.fromcomm.entity.SysUserEntity;
 import com.kmall.admin.service.mk.MkActivitiesScoreService;
+import com.kmall.admin.utils.ShiroUtils;
 import com.kmall.common.utils.*;
 import org.springframework.aop.framework.AopContext;
 import org.springframework.beans.BeanUtils;
@@ -49,11 +51,25 @@ public class MkActivitiesScoreServiceImpl implements MkActivitiesScoreService {
 
     @Override
     public int save(MkActivitiesScoreEntity mkActivitiesScore) {
+
+        SysUserEntity user = ShiroUtils.getUserEntity();
+
+        mkActivitiesScore.setCreaterSn(user.getUserId() + "");
+        mkActivitiesScore.setCreateTime(new Date());
+        mkActivitiesScore.setModerSn(user.getUserId() + "");
+        mkActivitiesScore.setUpdateTime(mkActivitiesScore.getCreateTime());
+
         return mkActivitiesScoreDao.save(mkActivitiesScore);
     }
 
     @Override
     public int update(MkActivitiesScoreEntity mkActivitiesScore) {
+
+        SysUserEntity user = ShiroUtils.getUserEntity();
+
+        mkActivitiesScore.setModerSn(user.getUserId() + "");
+        mkActivitiesScore.setUpdateTime(new Date());
+
         return mkActivitiesScoreDao.update(mkActivitiesScore);
     }
 

+ 1 - 1
kmall-admin/src/main/java/com/kmall/admin/service/impl/mk/MkActivitiesServiceImpl.java

@@ -84,7 +84,7 @@ public class MkActivitiesServiceImpl implements MkActivitiesService {
 
         MkActivitiesAssociationEntity mkActivitiesAssociation = new MkActivitiesAssociationEntity();
         BeanUtils.copyProperties(mkActivities, mkActivitiesAssociation);
-        mkActivitiesAssociationDao.update(mkActivitiesAssociation);
+        mkActivitiesAssociationDao.updateByMkaId(mkActivitiesAssociation);
 
         return 1;
     }

+ 37 - 7
kmall-admin/src/main/java/com/kmall/admin/service/impl/vip/Mall2PointsRulesServiceImpl.java

@@ -1,12 +1,15 @@
 package com.kmall.admin.service.impl.vip;
 
+import com.google.common.collect.ImmutableBiMap;
 import com.kmall.admin.dao.CategoryDao;
 import com.kmall.admin.dao.ProductStoreRelaDao;
 import com.kmall.admin.dao.StoreDao;
+import com.kmall.admin.dto.GoodsDto;
 import com.kmall.admin.dto.Mall2RulesDto;
+import com.kmall.admin.entity.GoodsEntity;
 import com.kmall.admin.entity.vip.Mall2DetilEntity;
 import com.kmall.admin.haikong.vo.PointsRulesAndDetailVO;
-import com.kmall.common.utils.Query;
+import com.kmall.common.utils.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -83,29 +86,32 @@ public class Mall2PointsRulesServiceImpl implements Mall2PointsRulesService {
     public void rulesUploadDetil(List<Mall2RulesDto> pointsRulesList, Long mkaId) {
         Integer pointsType = mall2PointsRulesDao.queryRulesDetilId(mkaId);
         if(pointsRulesList.size()>0){
-            pointsRulesList.forEach(mall2RulesDto -> {
+            for(Mall2RulesDto mall2RulesDto : pointsRulesList) {
+                //校验参数
+                checkMsg(pointsType,mall2RulesDto);
                 switch (pointsType) {
                     //门店
                     case 0:
-                        mall2RulesDto.setRulesId(storeDao.queryObjectRulesByName(mall2RulesDto.getPointsRulesName().trim())+"");
+                        mall2RulesDto.setRulesId(storeDao.queryObjectRulesByName(mall2RulesDto.getPointsRulesName().trim()) + "");
                         break;
                     //商品类别
                     case 1:
-                        mall2RulesDto.setRulesId(categoryDao.queryObjectCategoryByName(mall2RulesDto.getPointsRulesName().trim())+"");
+                        mall2RulesDto.setRulesId(categoryDao.queryObjectCategoryByName(mall2RulesDto.getPointsRulesName().trim()) + "");
                         break;
                     //商品
                     case 2:
                         //获取门店ID
                         Long id = storeDao.queryObjectRulesByName(mall2RulesDto.getStoreName().trim());
                         mall2RulesDto.setStoreId(id);
-                        mall2RulesDto.setRulesId(productStoreRelaDao.queryproductStoreByName(mall2RulesDto.getPointsRulesName().trim(),id));
+                        mall2RulesDto.setRulesId(productStoreRelaDao.queryproductStoreByName(mall2RulesDto.getPointsRulesName().trim(), id));
                         break;
                     default:
                         break;
                 }
                 mall2RulesDto.setMkaId(mkaId);
                 mall2RulesDto.setPointsRulesType(pointsType);
-            });
+
+            }
             if(pointsRulesList.size()>0){
                 mall2PointsRulesDao.saveMall2PointsRulesDetil(pointsRulesList);
             }
@@ -150,7 +156,31 @@ public class Mall2PointsRulesServiceImpl implements Mall2PointsRulesService {
     @Override
     public int querymall2PointsRulesDetilTotal(Query query) {
         Long id = Long.parseLong(query.get("mkaId")+"");
-        Map<String,Object> map = new HashMap<>();
         return mall2PointsRulesDao.querymall2PointsRulesDetilTotal(id);
     }
+
+    /**
+     * 导入参数校验
+     * @param mall2RulesDto
+     */
+    private void checkMsg(Integer pointsType,Mall2RulesDto mall2RulesDto){
+        Map<String, Object> valideDate = MapBeanUtil.fromObject(mall2RulesDto);
+        ImmutableBiMap.Builder builder = new ImmutableBiMap.Builder();
+        builder.put("rulesType", "积分规则类型");
+        if(pointsType==0){
+            builder.put("pointsRulesName", "门店");
+        }else if(pointsType==1){
+            builder.put("pointsRulesName", "商品分类");
+        }else if(pointsType==2){
+            builder.put("pointsRulesName", "商品");
+            builder.put("storeName", "对应的商品门店");
+        }else{
+            throw new RRException("导入异常,请检查导入数据是否正确");
+        }
+        R r = ValidatorUtil.isEmpty(builder.build(), valideDate);
+        if (Integer.valueOf(r.get("code").toString()) != 0) {
+            throw new RRException(r.get("msg").toString());
+        }
+
+    }
 }

+ 1 - 0
kmall-admin/src/main/java/com/kmall/admin/service/vip/Mall2PointsRulesService.java

@@ -5,6 +5,7 @@ import com.kmall.admin.entity.vip.Mall2DetilEntity;
 import com.kmall.admin.entity.vip.Mall2PointsRulesEntity;
 import com.kmall.admin.haikong.vo.PointsRulesAndDetailVO;
 import com.kmall.common.utils.Query;
+import com.kmall.common.utils.R;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.Date;

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

@@ -254,7 +254,7 @@
 
     <select id="queryGoodsDetailsByProdBarcode" resultType="com.kmall.admin.dto.GoodsDetailsDto">
         SELECT distinct
-        a.goods_sn as GoodsSn, a.goods_sn as sku, m.retail_price as retailPrice,a.prod_barcode as prodBarcode,a.name,a.brand,a.goods_desc as goodsDesc,a.goods_unit as goodsUnit,a.goods_rate as goodsRate,a.primary_pic_url ,m.stock_num as stockNum,r.value as specification
+        a.goods_sn as GoodsSn, a.goods_sn as sku, m.retail_price as retailPrice,a.prod_barcode as prodBarcode,a.name,a.brand,a.goods_desc as goodsDesc,a.goods_unit as goodsUnit,a.goods_rate as goodsRate,a.primary_pic_url ,m.stock_num as stockNum,a.goods_unit as specification
         ,a.hs_code as hsCode , a.legal_unit1_qty as legalUnit1Qty , a.legal_unit2_qty as legalUnit2Qty,a.ciq_prod_model as ciqProdModel,a.to_be_restored, m.exit_region_number as exitRegionNumber,
         a.warehouse_sn as warehouseSn, a.consignor_sn as consignorSn, a.warehous_sys_good_id as warehouseSysGoodId
         FROM
@@ -273,7 +273,7 @@
         SELECT distinct
         a.goods_sn as GoodsSn,m.retail_price as retailPrice,a.prod_barcode as prodBarcode,a.name,
         a.brand,a.goods_desc as goodsDesc,a.goods_unit as goodsUnit,a.goods_rate as goodsRate,a.primary_pic_url ,
-        m.stock_num as stockNum,r.value as specification
+        m.stock_num as stockNum,a.goods_unit as specification
         ,a.hs_code as hsCode , a.legal_unit1_qty as legalUnit1Qty , a.legal_unit2_qty as legalUnit2Qty,
         a.ciq_prod_model as ciqProdModel,a.to_be_restored,a.sku as sku,a.name,a.market_price as marketPrice
         FROM

+ 3 - 1
kmall-admin/src/main/resources/mybatis/mapper/OrderDao.xml

@@ -412,11 +412,13 @@
         o.actual_price,
         o.order_price,
         o.pay_time,
-        o.pay_flag
+        o.pay_flag,
+        c.pick_up_code_sn
         from mall_order o
         LEFT JOIN mall_store s on o.store_id = s.id
         LEFT JOIN mall_order_goods g ON o.id = g.order_id
         LEFT JOIN mall_user u ON o.user_id = u.id
+        LEFT JOIN mall_pick_up_code c on c.order_sn = o.order_sn
         WHERE 1=1
         <if test="storeId != null and storeId != ''">
             AND o.store_id = #{storeId}

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

@@ -81,7 +81,8 @@
     		c.`mod_time`,
 			s.store_name storeName,
 			g.name goodsName,
-			m.merch_name merchName
+			m.merch_name merchName,
+		    c.order_sn as orderSn
 		from mall_store_mng_change c left join mall_merch m on c.merch_sn = m.merch_sn
 		left join mall_store s on s.id = c.store_id
 		left join mall_goods g on c.goods_id = g.id

+ 15 - 13
kmall-admin/src/main/resources/mybatis/mapper/StoreSmsConfigDao.xml

@@ -38,19 +38,21 @@
 
 	<select id="queryList" resultType="com.kmall.admin.entity.StoreSmsConfigEntity">
 		select
-    		`id`,
-    		`store_id`,
-    		`merch_sn`,
-    		`send_start_time`,
-    		`send_end_time`,
-    		`is_valid`,
-		`is_enable`,
-    		`creater_sn`,
-    		`create_time`,
-    		`moder_sn`,
-    		`mod_time`,
-    		`tstm`
-		from mall_store_sms_config
+			config.`id`,
+			config.`store_id`,
+			config.`merch_sn`,
+			config.`send_start_time`,
+			config.`send_end_time`,
+			config.`is_valid`,
+			config.`is_enable`,
+			config.`creater_sn`,
+			config.`create_time`,
+			config.`moder_sn`,
+			config.`mod_time`,
+			config.`tstm`,
+		    store.`store_name`
+		from mall_store_sms_config config
+		left join mall_store store on config.store_id = store.id
 		WHERE 1=1
 		<if test="name != null and name.trim() != ''">
 			AND name LIKE concat('%',#{name},'%')

+ 15 - 0
kmall-admin/src/main/resources/mybatis/mapper/mk/MkActivitiesAssociationDao.xml

@@ -143,6 +143,21 @@
 		</foreach>
 	</delete>
 
+	<update id="updateByMkaId" parameterType="com.kmall.admin.entity.mk.MkActivitiesAssociationEntity">
+		update mk_activities_association
+		<set>
+			<if test="mkCode != null">`mk_code` = #{mkCode}, </if>
+			<if test="merchSn != null">`merch_sn` = #{merchSn}, </if>
+			<if test="thirdMerchSn != null">`third_merch_sn` = #{thirdMerchSn}, </if>
+			<if test="mkaStoreId != null">`mka_store_id` = #{mkaStoreId}, </if>
+			<if test="mkaStatus != null">`mka_status` = #{mkaStatus}, </if>
+			<if test="mkaStartTime != null">`mka_start_time` = #{mkaStartTime}, </if>
+			<if test="mkdEndTime != null">`mkd_end_time` = #{mkdEndTime}, </if>
+			<if test="mkaEndEarly != null">`mka_end_early` = #{mkaEndEarly}, </if>
+			<if test="mkdEndEarlyTime != null">`mkd_end_early_time` = #{mkdEndEarlyTime}</if>
+		</set>
+		where `mka_id` = #{mkaId}
+	</update>
 
 
 </mapper>

+ 6 - 0
kmall-admin/src/main/resources/mybatis/mapper/mk/MkActivitiesScoreDao.xml

@@ -52,6 +52,9 @@
 		<if test="name != null and name.trim() != ''">
 			AND name LIKE concat('%',#{name},'%')
 		</if>
+		<if test="prodBarcode != null and prodBarcode.trim() != ''">
+			AND `prod_barcode` LIKE concat('%',#{prodBarcode},'%')
+		</if>
         <choose>
             <when test="sidx != null and sidx.trim() != ''">
                 order by ${sidx} ${order}
@@ -71,6 +74,9 @@
         <if test="name != null and name.trim() != ''">
             AND name LIKE concat('%',#{name},'%')
         </if>
+		<if test="prodBarcode != null and prodBarcode.trim() != ''">
+			AND `prod_barcode` LIKE concat('%',#{prodBarcode},'%')
+		</if>
 	</select>
 
 	<select id="queryEntityByProdBarcodeAndSkuAndStoreIdAndTime"

+ 3 - 0
kmall-admin/src/main/resources/mybatis/mapper/vip/Mall2PointsRulesDao.xml

@@ -190,6 +190,9 @@
 		from mall2_points_rules_detil
 		WHERE
 		father_id = #{id}
+		<if test="offset != null and limit != null">
+			limit #{offset}, #{limit}
+		</if>
 	</select>
 
 	<select id="querymall2PointsRulesDetilTotal" parameterType="java.lang.Long" resultType="java.lang.Integer">

+ 22 - 4
kmall-admin/src/main/webapp/WEB-INF/page/mk/mall2RulesDetil.html

@@ -41,11 +41,29 @@
     <Card v-show="!showList">
         <p slot="title">{{title}}</p>
 		<i-form ref="formValidate" :model="mkActivitiesHalfPrice" :rules="ruleValidate" :label-width="80">
-            <Form-item label="积分规则类型" prop="productName">
-                <i-input v-model="mkActivitiesHalfPrice.productName" placeholder="产品中文名"/>
+<!--            <Form-item label="积分规则类型" prop="productName">-->
+<!--                <i-input v-model="mkActivitiesHalfPrice.productName" placeholder="产品中文名"/>-->
+<!--            </Form-item>-->
+            <Form-item label="商品条码" prop="goodsSn">
+                <i-select v-model="mall2PointsRules.pointsType" placeholder="商品条码" label-in-value>
+                    <i-option v-for="category in categories" :value="category.value"
+                              :key="category.value">{{category.name}}
+                    </i-option>
+                </i-select>
             </Form-item>
-            <Form-item label="对应的商品/门店/类别" prop="goodsSn">
-                <i-input v-model="mkActivitiesHalfPrice.goodsSn" placeholder="商品编码"/>
+            <Form-item label="门店名称" prop="goodsSn">
+                <i-select v-model="mall2PointsRules.pointsType" placeholder="门店名称" label-in-value>
+                    <i-option v-for="category in categories2" :value="category.value"
+                              :key="category.value">{{category.name}}
+                    </i-option>
+                </i-select>
+            </Form-item>
+            <Form-item label="商品类别" prop="goodsSn">
+                <i-select v-model="mall2PointsRules.pointsType" placeholder="商品类别" label-in-value>
+                    <i-option v-for="category in categories3" :value="category.value"
+                              :key="category.value">{{category.name}}
+                    </i-option>
+                </i-select>
             </Form-item>
             <Form-item>
                 <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>

+ 6 - 3
kmall-admin/src/main/webapp/WEB-INF/page/mk/mkactivitiesscore.html

@@ -12,6 +12,9 @@
                 <i-col span="4">
                     <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
                 </i-col>
+                <i-col span="4">
+                    <i-input v-model="q.prodBarcode" @on-enter="query" placeholder="商品条码"/>
+                </i-col>
                 <i-button @click="query">查询</i-button>
                 <i-button @click="reloadSearch">重置</i-button>
             </div>
@@ -60,9 +63,9 @@
             <Form-item label="营销活动编号" prop="mkaId">
                 <i-input v-model="mkActivitiesScore.mkaId" placeholder="营销活动编号"/>
             </Form-item>
-            <Form-item label="截止日期" prop="deadline">
-                <i-input v-model="mkActivitiesScore.deadline" placeholder="截止日期"/>
-            </Form-item>
+<!--            <Form-item label="截止日期" prop="deadline">-->
+<!--                <Date-picker type="datetime" format="yyyy-MM-dd HH:mm:ss" v-model="mkActivitiesScore.deadline" @on-change="getDeadLine" placeholder="截止日期" style="width: 240px"></Date-picker>-->
+<!--            </Form-item>-->
             <!--<Form-item label="创建时间" prop="createTime">
                 <i-input v-model="mkActivitiesScore.createTime" placeholder="创建时间"/>
             </Form-item>

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

@@ -71,29 +71,29 @@
             <Form-item label="品牌唯一简码" prop="uniqueIdentifier">
                 <i-input v-model="brand.uniqueIdentifier" placeholder="品牌唯一简码,限制只能为字母数字下划线,长度不能超过10位"/>
             </Form-item>
-            <Row>
-                <i-col span="16">
-                    <Form-item label="图片" prop="listPicUrl">
-                        <i-input v-model="brand.listPicUrl" placeholder="图片尺寸建议760*484像素以内,大小100k以下" readonly/>
-                    </Form-item>
-                </i-col>
-                <i-col span="4">
-                    <Form-item :label-width="1">
-                        <Upload style="width: 300px;" action="../sys/oss/upload" :format="['jpg','jpeg','png']"
-                                max-size="100"
-                                :on-success="handleSuccessListPicUrl" :on-format-error="handleFormatError"
-                                :show-upload-list="false"
-                                :on-exceeded-size="handleMaxSize">
-                            <i-button icon="ios-cloud-upload-outline">上传图片</i-button>
-                        </Upload>
-                    </Form-item>
-                </i-col>
-                <i-col span="4">
-                    <Form-item :label-width="1">
-                        <i-button icon="eye" @click="eyeImageListPicUrl">预览图片</i-button>
-                    </Form-item>
-                </i-col>
-            </Row>
+<!--            <Row>-->
+<!--                <i-col span="16">-->
+<!--                    <Form-item label="图片" prop="listPicUrl">-->
+<!--                        <i-input v-model="brand.listPicUrl" placeholder="图片尺寸建议760*484像素以内,大小100k以下" readonly/>-->
+<!--                    </Form-item>-->
+<!--                </i-col>-->
+<!--                <i-col span="4">-->
+<!--                    <Form-item :label-width="1">-->
+<!--                        <Upload style="width: 300px;" action="../sys/oss/upload" :format="['jpg','jpeg','png']"-->
+<!--                                max-size="100"-->
+<!--                                :on-success="handleSuccessListPicUrl" :on-format-error="handleFormatError"-->
+<!--                                :show-upload-list="false"-->
+<!--                                :on-exceeded-size="handleMaxSize">-->
+<!--                            <i-button icon="ios-cloud-upload-outline">上传图片</i-button>-->
+<!--                        </Upload>-->
+<!--                    </Form-item>-->
+<!--                </i-col>-->
+<!--                <i-col span="4">-->
+<!--                    <Form-item :label-width="1">-->
+<!--                        <i-button icon="eye" @click="eyeImageListPicUrl">预览图片</i-button>-->
+<!--                    </Form-item>-->
+<!--                </i-col>-->
+<!--            </Row>-->
             <!--<Row>-->
                 <!--<i-col span="16" style="margin-top: -30px;"  placeholder="图片尺寸建议760*484像素以内,大小100k以下">-->
                     <!--&lt;!&ndash;<span style="margin-left: 100px;color: red;font-size: 12px;">* 图片尺寸建议760*484像素以内,大小100k以下</span>&ndash;&gt;-->
@@ -102,37 +102,37 @@
             <Form-item label="描述" prop="simpleDesc">
                 <i-input type="textarea" v-model="brand.simpleDesc" placeholder="描述"/>
             </Form-item>
-            <Row>
-                <i-col span="16">
-                    <Form-item label="图片" prop="picUrl">
-                        <i-input v-model="brand.picUrl" placeholder="图片尺寸建议760*484像素以内,大小100k以下" readonly/>
-                    </Form-item>
-                </i-col>
-                <i-col span="4">
-                    <Form-item :label-width="1">
-                        <Upload style="width: 300px;" action="../sys/oss/upload" :format="['jpg','jpeg','png']"
-                                max-size="100"
-                                :on-success="handleSuccessPicUrl" :on-format-error="handleFormatError"
-                                :show-upload-list="false"
-                                :on-exceeded-size="handleMaxSize">
-                            <i-button icon="ios-cloud-upload-outline">上传图片</i-button>
-                        </Upload>
-                    </Form-item>
-                </i-col>
-                <i-col span="4">
-                    <Form-item :label-width="1">
-                        <i-button icon="eye" @click="eyeImagePicUrl">预览图片</i-button>
-                    </Form-item>
-                </i-col>
-            </Row>
+<!--            <Row>-->
+<!--                <i-col span="16">-->
+<!--                    <Form-item label="图片" prop="picUrl">-->
+<!--                        <i-input v-model="brand.picUrl" placeholder="图片尺寸建议760*484像素以内,大小100k以下" readonly/>-->
+<!--                    </Form-item>-->
+<!--                </i-col>-->
+<!--                <i-col span="4">-->
+<!--                    <Form-item :label-width="1">-->
+<!--                        <Upload style="width: 300px;" action="../sys/oss/upload" :format="['jpg','jpeg','png']"-->
+<!--                                max-size="100"-->
+<!--                                :on-success="handleSuccessPicUrl" :on-format-error="handleFormatError"-->
+<!--                                :show-upload-list="false"-->
+<!--                                :on-exceeded-size="handleMaxSize">-->
+<!--                            <i-button icon="ios-cloud-upload-outline">上传图片</i-button>-->
+<!--                        </Upload>-->
+<!--                    </Form-item>-->
+<!--                </i-col>-->
+<!--                <i-col span="4">-->
+<!--                    <Form-item :label-width="1">-->
+<!--                        <i-button icon="eye" @click="eyeImagePicUrl">预览图片</i-button>-->
+<!--                    </Form-item>-->
+<!--                </i-col>-->
+<!--            </Row>-->
             <!--<Row>
                 <i-col span="16" style="margin-top: -30px;">
                     <span style="margin-left: 100px;color: red;font-size: 12px;">* 图片尺寸建议760*484像素以内,大小100k以下</span>
                 </i-col>
             </Row>-->
-            <Form-item label="排序" prop="sortOrder">
-                <Input-number :min="0" :step="1" v-model="brand.sortOrder" placeholder="排序" style="width: 188px;"/>
-            </Form-item>
+<!--            <Form-item label="排序" prop="sortOrder">-->
+<!--                <Input-number :min="0" :step="1" v-model="brand.sortOrder" placeholder="排序" style="width: 188px;"/>-->
+<!--            </Form-item>-->
             <Form-item label="显示" prop="isShow">
                 <Radio-group v-model="brand.isShow">
                     <Radio label="1">
@@ -143,32 +143,32 @@
                     </Radio>
                 </Radio-group>
             </Form-item>
-            <Form-item label="展示价格" prop="floorPrice">
-                <Input-number :min="0" v-model="brand.floorPrice" placeholder="展示价格" style="width: 188px;"/>
-            </Form-item>
-            <Row>
-                <i-col span="16">
-                    <Form-item label="app显示图片" prop="appListPicUrl">
-                        <i-input v-model="brand.appListPicUrl" placeholder="图片尺寸建议760*484像素以内,大小100k以下" readonly/>
-                    </Form-item>
-                </i-col>
-                <i-col span="4">
-                    <Form-item :label-width="1">
-                        <Upload style="width: 300px;" action="../sys/oss/upload" :format="['jpg','jpeg','png']"
-                                max-size="100"
-                                :on-success="handleSuccessAppListPicUrl" :on-format-error="handleFormatError"
-                                :show-upload-list="false"
-                                :on-exceeded-size="handleMaxSize">
-                            <i-button icon="ios-cloud-upload-outline">上传图片</i-button>
-                        </Upload>
-                    </Form-item>
-                </i-col>
-                <i-col span="4">
-                    <Form-item :label-width="1">
-                        <i-button icon="eye" @click="eyeImageAppListPicUrl">预览图片</i-button>
-                    </Form-item>
-                </i-col>
-            </Row>
+<!--            <Form-item label="展示价格" prop="floorPrice">-->
+<!--                <Input-number :min="0" v-model="brand.floorPrice" placeholder="展示价格" style="width: 188px;"/>-->
+<!--            </Form-item>-->
+<!--            <Row>-->
+<!--                <i-col span="16">-->
+<!--                    <Form-item label="app显示图片" prop="appListPicUrl">-->
+<!--                        <i-input v-model="brand.appListPicUrl" placeholder="图片尺寸建议760*484像素以内,大小100k以下" readonly/>-->
+<!--                    </Form-item>-->
+<!--                </i-col>-->
+<!--                <i-col span="4">-->
+<!--                    <Form-item :label-width="1">-->
+<!--                        <Upload style="width: 300px;" action="../sys/oss/upload" :format="['jpg','jpeg','png']"-->
+<!--                                max-size="100"-->
+<!--                                :on-success="handleSuccessAppListPicUrl" :on-format-error="handleFormatError"-->
+<!--                                :show-upload-list="false"-->
+<!--                                :on-exceeded-size="handleMaxSize">-->
+<!--                            <i-button icon="ios-cloud-upload-outline">上传图片</i-button>-->
+<!--                        </Upload>-->
+<!--                    </Form-item>-->
+<!--                </i-col>-->
+<!--                <i-col span="4">-->
+<!--                    <Form-item :label-width="1">-->
+<!--                        <i-button icon="eye" @click="eyeImageAppListPicUrl">预览图片</i-button>-->
+<!--                    </Form-item>-->
+<!--                </i-col>-->
+<!--            </Row>-->
             <!--<Row>
                 <i-col span="16" style="margin-top: -30px;">
                     <span style="margin-left: 100px;color: red;font-size: 12px;">* app显示图片尺寸建议760*484像素以内,大小100k以下</span>
@@ -184,38 +184,38 @@
                     </Radio>
                 </Radio-group>
             </Form-item>
-            <Row>
-                <i-col span="16">
-                    <Form-item label="新品牌图片" prop="newPicUrl">
-                        <i-input v-model="brand.newPicUrl" placeholder="图片尺寸建议760*484像素以内,大小100k以下" readonly/>
-                    </Form-item>
-                </i-col>
-                <i-col span="4">
-                    <Form-item :label-width="1">
-                        <Upload style="width: 300px;" action="../sys/oss/upload" :format="['jpg','jpeg','png']"
-                                max-size="100"
-                                :on-success="handleSuccessNewPicUrl" :on-format-error="handleFormatError"
-                                :show-upload-list="false"
-                                :on-exceeded-size="handleMaxSize">
-                            <i-button icon="ios-cloud-upload-outline">上传图片</i-button>
-                        </Upload>
-                    </Form-item>
-                </i-col>
-                <i-col span="4">
-                    <Form-item :label-width="1">
-                        <i-button icon="eye" @click="eyeImageNewPicUrl">预览图片</i-button>
-                    </Form-item>
-                </i-col>
-            </Row>
+<!--            <Row>-->
+<!--                <i-col span="16">-->
+<!--                    <Form-item label="新品牌图片" prop="newPicUrl">-->
+<!--                        <i-input v-model="brand.newPicUrl" placeholder="图片尺寸建议760*484像素以内,大小100k以下" readonly/>-->
+<!--                    </Form-item>-->
+<!--                </i-col>-->
+<!--                <i-col span="4">-->
+<!--                    <Form-item :label-width="1">-->
+<!--                        <Upload style="width: 300px;" action="../sys/oss/upload" :format="['jpg','jpeg','png']"-->
+<!--                                max-size="100"-->
+<!--                                :on-success="handleSuccessNewPicUrl" :on-format-error="handleFormatError"-->
+<!--                                :show-upload-list="false"-->
+<!--                                :on-exceeded-size="handleMaxSize">-->
+<!--                            <i-button icon="ios-cloud-upload-outline">上传图片</i-button>-->
+<!--                        </Upload>-->
+<!--                    </Form-item>-->
+<!--                </i-col>-->
+<!--                <i-col span="4">-->
+<!--                    <Form-item :label-width="1">-->
+<!--                        <i-button icon="eye" @click="eyeImageNewPicUrl">预览图片</i-button>-->
+<!--                    </Form-item>-->
+<!--                </i-col>-->
+<!--            </Row>-->
             <!--<Row>
                 <i-col span="16" style="margin-top: -30px;" placeholder="* 新品牌图片尺寸建议760*484像素以内,大小100k以下">
                     &lt;!&ndash;<span style="margin-left: 100px;color: red;font-size: 12px;"></span>&ndash;&gt;
                 </i-col>
             </Row>-->
-            <Form-item label="新品牌排序" prop="newSortOrder">
-                <Input-number :min="0" :step="1" v-model="brand.newSortOrder" placeholder="新品牌排序"
-                              style="width: 188px;"/>
-            </Form-item>
+<!--            <Form-item label="新品牌排序" prop="newSortOrder">-->
+<!--                <Input-number :min="0" :step="1" v-model="brand.newSortOrder" placeholder="新品牌排序"-->
+<!--                              style="width: 188px;"/>-->
+<!--            </Form-item>-->
             <Form-item>
                 <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                 <i-button type="warning" @click="reload" style="margin-left: 8px"/>

+ 8 - 8
kmall-admin/src/main/webapp/WEB-INF/page/shop/storeProductStock.html

@@ -138,14 +138,14 @@
                     </Upload>
                 </i-col>
                 #end
-<!--                <i-col style="display: inline-grid;">-->
-<!--                    <Upload :show-upload-list="false" :on-success="uploadExcelSuccess" :on-format-error="uploadExcelFormatError"-->
-<!--                            :on-progress="uploadExcelProgress"-->
-<!--                            :format="['xls','xlsx']"-->
-<!--                            action="../productstorerela/productStoreRelaUploadByCover">-->
-<!--                        <i-button type="ghost" icon="ios-cloud-upload-outline">门店商品导入(修改库存)</i-button>-->
-<!--                    </Upload>-->
-<!--                </i-col>-->
+                <i-col style="display: inline-grid;">
+                    <Upload :show-upload-list="false" :on-success="uploadExcelSuccess" :on-format-error="uploadExcelFormatError"
+                            :on-progress="uploadExcelProgress"
+                            :format="['xls','xlsx']"
+                            action="../productstorerela/productStoreRelaUploadByCover">
+                        <i-button type="ghost" icon="ios-cloud-upload-outline">门店商品导入(修改库存)</i-button>
+                    </Upload>
+                </i-col>
                 #if($shiro.hasPermission("productstorerela:down"))
                 &nbsp;&nbsp;&nbsp;<a href="../statics/file/store_goods_export_yyyy_mm_dd_v1.0.0.xlsx">门店商品模板下载</a>&nbsp;&nbsp;&nbsp;&nbsp;
                 #end

+ 3 - 0
kmall-admin/src/main/webapp/WEB-INF/page/shop/storemngchange.html

@@ -48,6 +48,9 @@
     <Card v-show="!showList">
         <p slot="title">{{title}}</p>
 		<i-form ref="formValidate" :model="storeMngChange" :rules="ruleValidate" :label-width="80">
+            <Form-item label="订单编号" prop="orderSn">
+                <i-input v-model="storeMngChange.orderSn" placeholder="订单编号"/>
+            </Form-item>
             <Form-item label="门店库存变化数" prop="storeChangeNum">
                 <i-input v-model="storeMngChange.storeChangeNum" placeholder="门店库存变化数"/>
             </Form-item>

+ 2 - 2
kmall-admin/src/main/webapp/WEB-INF/page/vip/mall2pointsrules.html

@@ -57,8 +57,8 @@
             <Form-item label="适用结束时间" prop="pointsEndTime">
                 <i-input type="date"  v-model="mall2PointsRules.pointsEndTime" placeholder="积分规则适用结束时间"/>
             </Form-item>
-            <Form-item label="积分比例" prop="ratio">
-                <i-input v-model="mall2PointsRules.ratio" placeholder="积分比例" />
+            <Form-item label="积分比例(小数)" prop="ratio">
+                <i-input v-model="mall2PointsRules.ratio" placeholder="积分比例小数,保留两位" />
             </Form-item>
             <Form-item label="是否有效" prop="isValid">
                 <i-select v-model="mall2PointsRules.isValid" placeholder="是否有效"

+ 28 - 1
kmall-admin/src/main/webapp/js/mk/mall2RulesDetil.js

@@ -24,7 +24,7 @@ $(function () {
 
 				}
 			},
-			{label: '商品/门店/类别名称', name: 'pointsRulesName', index: 'points_detil_name', width: 80, align: 'center'},
+			{label: '商品条码/门店/类别名称', name: 'pointsRulesName', index: 'points_detil_name', width: 80, align: 'center'},
 			{label: '对应的商品门店名称', name: 'storeName', index: 'points_store_name', width: 80, align: 'center'},
 			{label: '备注', name: 'remark', index: 'remark', width: 80, align: 'center'},],
 		viewrecords: true,
@@ -61,6 +61,9 @@ let vm = new Vue({
 	data: {
         showList: true,
         title: null,
+		categories: [],//商品条码
+		categories2: [],//门店名称
+		categories3: [],//商品类别
 		mkActivitiesHalfPrice: {},
 		ruleValidate: {
 			name: [
@@ -83,6 +86,9 @@ let vm = new Vue({
 		add: function () {
 			vm.showList = false;
 			vm.title = "新增";
+			vm.getCategories();
+			vm.getCategories2();
+			vm.getCategories3();
 			vm.mkActivitiesHalfPrice = {};
 		},
 		update: function (event) {
@@ -90,6 +96,9 @@ let vm = new Vue({
 			if (mafrId == null) {
 				return;
 			}
+			vm.getCategories();
+			vm.getCategories2();
+			vm.getCategories3();
 			vm.showList = false;
             vm.title = "修改";
 
@@ -168,6 +177,24 @@ let vm = new Vue({
                 vm.saveOrUpdate()
             });
         },
+		//商品条码
+		getCategories: function () {
+			$.get("../sys/macro/queryMacrosByValueRuRules?id=70", function (r) {
+				vm.categories = r.list;
+			});
+		},
+		//门店名称
+		getCategories2: function () {
+			$.get("../sys/macro/queryMacrosByValueRuRules?id=70", function (r) {
+				vm.categories2 = r.list;
+			});
+		},
+		//商品类别
+		getCategories3: function () {
+			$.get("../sys/macro/queryMacrosByValueRuRules?id=70", function (r) {
+				vm.categories3 = r.list;
+			});
+		},
         handleReset: function (name) {
             handleResetForm(this, name);
         },

+ 47 - 18
kmall-admin/src/main/webapp/js/mk/mkactivitiesscore.js

@@ -24,16 +24,26 @@ $(function () {
         datatype: "json",
         colModel: [
 			{label: 'id', name: 'id', index: 'id', key: true, hidden: true},
-			{label: '商品条码', name: 'prodBarcode', index: 'prod_barcode', width: 80},
-			{label: 'sku', name: 'sku', index: 'sku', width: 80},
+			{label: '商品条码', name: 'prodBarcode', index: 'prod_barcode', width: 150},
+			{label: 'sku', name: 'sku', index: 'sku', width: 150},
 			{label: '门店id', name: 'storeId', index: 'store_id', width: 80},
 			{label: '抵扣比例', name: 'scoreLimit', index: 'score_limit', width: 80},
-			{label: '营销活动编号', name: 'mkaId', index: 'mka_id', width: 80},
-			{label: '截止日期', name: 'deadline', index: 'deadline', width: 80},
-			{label: '创建时间', name: 'createTime', index: 'create_time', width: 80},
-			{label: '创建人编号', name: 'createrSn', index: 'creater_sn', width: 80},
-			{label: '修改人编号', name: 'moderSn', index: 'moder_sn', width: 80},
-			{label: '修改时间', name: 'updateTime', index: 'update_time', width: 80}],
+			{label: '营销活动编号', name: 'mkaId', index: 'mka_id', width: 100}
+			// {label: '截止日期', name: 'deadline', index: 'deadline', width: 200,
+			// 	formatter: function (value) {
+			// 		return transDate(value, 'yyyy-MM-dd hh:mm:ss');
+			// 	}}
+			// {label: '创建时间', name: 'createTime', index: 'create_time', width: 200,
+			// 	formatter: function (value) {
+			// 		return transDate(value, 'yyyy-MM-dd hh:mm:ss');
+			// 	}},
+			// {label: '创建人编号', name: 'createrSn', index: 'creater_sn', width: 100},
+			// {label: '修改人编号', name: 'moderSn', index: 'moder_sn', width: 80},
+			// {label: '修改时间', name: 'updateTime', index: 'update_time', width: 200,
+			// 	formatter: function (value) {
+			// 		return transDate(value, 'yyyy-MM-dd hh:mm:ss');
+			// 	}}
+			],
 		viewrecords: true,
 		postData: {'mkaId': vm.mkaId},
         height: 550,
@@ -43,7 +53,9 @@ $(function () {
         rownumWidth: 25,
         autowidth: true,
         multiselect: true,
-        pager: "#jqGridPager",
+		shrinkToFit: true,
+		autoScroll: true,
+		pager: "#jqGridPager",
         jsonReader: {
             root: "page.list",
             page: "page.currPage",
@@ -56,7 +68,8 @@ $(function () {
             order: "order"
         },
         gridComplete: function () {
-            $("#jqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "hidden"});
+            $("#jqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "scroll"});
+			$("#jqGrid").setGridWidth($(window).width());
         }
     });
 });
@@ -68,12 +81,24 @@ let vm = new Vue({
         title: null,
 		mkActivitiesScore: {},
 		ruleValidate: {
-			name: [
-				{required: true, message: '名称不能为空', trigger: 'blur'}
+			sku: [
+				{required: true, message: 'sku不能为空', trigger: 'blur'},
+				{max: 32, message: 'sku长度不能超过32', trigger: 'blur'}
+			],
+			prodBarcode: [
+				{required: true, message: '商品条码不能为空', trigger: 'blur'},
+				{max: 32, message: '商品条码长度不能超过32', trigger: 'blur'}
+			],
+			scoreLimit: [
+				{required: true, message: '抵扣比例不能为空', trigger: 'blur'}
 			]
+			// deadLine: [
+			// 	{required: true, message: '截止日期不能为空', trigger: 'blur'}
+			// ]
 		},
 		q: {
-		    name: ''
+		    name: '',
+			prodBarcode: ''
 		},
 		isMkactivitiesShow: true,
 		mkCode: '',
@@ -104,8 +129,8 @@ let vm = new Vue({
             let url = vm.mkActivitiesScore.id == null ? "../mkactivitiesscore/save" : "../mkactivitiesscore/update";
 
 			//添加上层的门店编号与营销方式编号
-			vm.mkActivitiesHalfPrice.shopSn = vm.storeId;
-			vm.mkActivitiesHalfPrice.mkaId = vm.mkaId;
+			vm.mkActivitiesScore.storeId = vm.storeId;
+			vm.mkActivitiesScore.mkaId = vm.mkaId;
 
             $.ajax({
 				type: "POST",
@@ -154,7 +179,8 @@ let vm = new Vue({
 		},
         reloadSearch: function() {
             vm.q = {
-                name: ''
+                name: '',
+				prodBarcode: ''
             }
             vm.reload();
 		},
@@ -162,7 +188,7 @@ let vm = new Vue({
 			vm.showList = true;
             let page = $("#jqGrid").jqGrid('getGridParam', 'page');
 			$("#jqGrid").jqGrid('setGridParam', {
-                postData: {'name': vm.q.name},
+                postData: {'name': vm.q.name, 'prodBarcode': vm.q.prodBarcode},
                 page: page
             }).trigger("reloadGrid");
             vm.handleReset('formValidate');
@@ -180,7 +206,6 @@ let vm = new Vue({
 			window.location.href = "/mk/mkactivityform.html?mkCode="+vm.mkCode;
 		},
 		uploadExcelSuccess: function (data) {
-			// console.log(data);
 			if(data.code==0){
 				alert('导入成功', function (index) {
 					$("#jqGrid").trigger("reloadGrid");
@@ -209,6 +234,10 @@ let vm = new Vue({
 			});
 			return promise; //通过返回一个promis对象解决
 
+		},
+		// 获取时间
+		getDeadLine: function (e) {
+			vm.mkActivitiesScore.deadLine = e;
 		}
 	}
 });

+ 29 - 24
kmall-admin/src/main/webapp/js/mk/mkactivityform.js

@@ -44,7 +44,7 @@ $(function () {
             order: "order"
         },
         gridComplete: function () {
-            $("#jqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "hidden"});
+            $("#jqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "scroll"});
         }
     });
 
@@ -63,8 +63,16 @@ $(function () {
         url: '../mkactivityform/queryMkactivitiesList',
         datatype: "json",
         colModel: [
+            {label: '操作', width: 100, align: 'center',
+                formatter: function (value, col, row) {
+                    htmlStr = "<button class='btn btn-outline btn-primary' " +
+                        "onclick='vm.showMkactivitiesGoods(\""+row.mkaId+"\",\""+row.mkaStoreId+"\",\""+row.mkaTopic+"\")'>管理商品</button>";
+
+                    return htmlStr;
+                }
+            },
             {label: 'mkaId', name: 'mkaId', index: 'mka_id', key: true, hidden: true},
-            {label: '营销方式', name: 'mkaTopic', index: 'mka_topic', width: 80, align: 'center',
+            {label: '营销方式', name: 'mkaTopic', index: 'mka_topic', width: 100, align: 'center',
                 formatter:function(value){
                     var mkaTopicName ;
                     if(value === 'lscx')
@@ -87,11 +95,11 @@ $(function () {
                         mkaTopicName = marketing.drjbj;
                     return mkaTopicName == null? value : mkaTopicName;
                 }},
-            {label: '商户名称', name: 'merchName', width: 80, align: 'center'},
-            {label: '第三方商户', name: 'thirdMerchName', width: 80, align: 'center'},
-            {label: '门店编号', name: 'mkaStoreId', width: 80, align: 'center',hidden: true},
-            {label: '活动门店', name: 'storeName', width: 80, align: 'center'},
-            {label: '是否启用', name: 'mkaStatus', index: 'mka_status', width: 60, align: 'center',
+            {label: '商户名称', name: 'merchName', width: 200, align: 'center'},
+            {label: '第三方商户', name: 'thirdMerchName', width: 200, align: 'center'},
+            {label: '门店编号', name: 'mkaStoreId', width: 200, align: 'center',hidden: true},
+            {label: '活动门店', name: 'storeName', width: 200, align: 'center'},
+            {label: '是否启用', name: 'mkaStatus', index: 'mka_status', width: 100, align: 'center',
                 formatter: function (value) {
                     if (value == '0') {
                         return '否';
@@ -101,10 +109,10 @@ $(function () {
                     return '';
                 }
             },
-            {label: '活动优先级', name: 'priority', index: 'priority', width: 80, align: 'center'},
-            {label: '开始时间', name: 'mkaStartTime', index: 'mka_start_time', width: 80, align: 'center'},
-            {label: '结束时间', name: 'mkdEndTime', index: 'mkd_end_time', width: 80, align: 'center'},
-            {label: '是否提前结束', name: 'mkaEndEarly', index: 'mka_end_early', width: 60, align: 'center',
+            {label: '活动优先级', name: 'priority', index: 'priority', width: 100, align: 'center'},
+            {label: '开始时间', name: 'mkaStartTime', index: 'mka_start_time', width: 200, align: 'center'},
+            {label: '结束时间', name: 'mkdEndTime', index: 'mkd_end_time', width: 200, align: 'center'},
+            {label: '是否提前结束', name: 'mkaEndEarly', index: 'mka_end_early', width: 200, align: 'center',
                 formatter: function (value) {
                     if (value == '0') {
                         return '否';
@@ -114,25 +122,20 @@ $(function () {
                     return '';
                 }
             },
-            {label: '提前结束时间', name: 'mkdEndEarlyTime', index: 'mkd_end_early_time', width: 80, align: 'center'},
-            {label: '操作', width: 80, align: 'center',
-                formatter: function (value, col, row) {
-                    htmlStr = "<button class='btn btn-outline btn-primary' " +
-                        "onclick='vm.showMkactivitiesGoods(\""+row.mkaId+"\",\""+row.mkaStoreId+"\",\""+row.mkaTopic+"\")'>管理商品</button>";
-
-                    return htmlStr;
-                }
-            }],
+            {label: '提前结束时间', name: 'mkdEndEarlyTime', index: 'mkd_end_early_time', width: 200, align: 'center'}
+            ],
         viewrecords: true,
-        height: 550,
+        height: '100%',
         width:1680,
         postData: {'mkCode': vm.mkCode, 'topic': vm.q.topic},
         rowNum: 10,
         rowList: [10, 30, 50],
         rownumbers: true,
         rownumWidth: 25,
-        autowidth: false,
+        autowidth: true,
         multiselect: true,
+        autoScroll: true,   //开启水平滚动条
+        shrinkToFit: false,
         pager: "#jqGridPagerOrder",
         jsonReader: {
             root: "page.list",
@@ -146,11 +149,13 @@ $(function () {
             order: "order"
         },
         gridComplete: function () {
-            $("#jqGridOrder").closest(".ui-jqgrid-bdiv").css({"overflow-x": "hidden"});
+            $("#jqGridOrder").closest(".ui-jqgrid-bdiv").css({"overflow-x": "scroll"});
+            $("#jqGridOrder").setGridWidth($(window).width());
         }
     });
 
-
+    // 启动冻结列
+    $("#jqGridOrder").jqGrid("setFrozenColumns");
 
 });
 

+ 1 - 1
kmall-admin/src/main/webapp/js/receipt/receiptCheck.js

@@ -21,7 +21,7 @@ $(function () {
         datatype: "json",
         colModel: [
             {label: 'id', name: 'id', index: 'id', key: true, hidden: true},
-            {label: '小票号', name: 'orderSn', index: 'order_sn', align: 'center',width: 120},
+            {label: '小票号', name: 'pickUpCodeSn', index: 'pick_up_code_sn', align: 'center',width: 120},
             {label: '订单号', name: 'orderSn', index: 'order_sn', align: 'center',width: 120},
             {label: '门店地址', name: 'storeName', index: 'storeName', align: 'center',width: 150},
             {label: '操作店员', name: 'userName', index: 'userName', align: 'center',width: 80},

+ 14 - 14
kmall-admin/src/main/webapp/js/sale/sale.js

@@ -1210,7 +1210,7 @@ let vm = new Vue({
         },
         resendPayment:function(){
             confirm('确认重发支付单吗?', function () {
-                $.get("../order/resendOrderToCCNET/"+vm.orderEntity.orderSn+"/payment", function (r) {
+                $.get("../order/resendOrderWayBill/"+vm.orderEntity.orderSn, function (r) {
                     alert(r.msg);
                 });
             })
@@ -1472,19 +1472,19 @@ function openWebSocket() {
         };
         //收到消息事件
         webSocket.onmessage = function (msg) {
-            var data = Object.assign({}, JSON.parse(msg.data));
-            console.log('3.接收到服务端信息......data:'+data);
-            vm.sessionId = data.sessionId;
-            vm.pickUpCodeList = [];
-            if(data.pickUpCodeList.length > 0){
-                for(var i = 0 ; i < data.pickUpCodeList.length ; i++){
-                    // console.log(data.pickUpCodeList[i].storeId);
-                    if(data.pickUpCodeList[i].storeId === storeId){
-                        vm.pickUpCodeList.push(data.pickUpCodeList[i]);
-                    }
-                }
-            }
-            vm.delayResponse = data.delayResponse;
+            // var data = Object.assign({}, JSON.parse(msg.data));
+            // console.log('3.接收到服务端信息......data:'+data);
+            // vm.sessionId = data.sessionId;
+            // vm.pickUpCodeList = [];
+            // if(data.pickUpCodeList.length > 0){
+            //     for(var i = 0 ; i < data.pickUpCodeList.length ; i++){
+            //         // console.log(data.pickUpCodeList[i].storeId);
+            //         if(data.pickUpCodeList[i].storeId === storeId){
+            //             vm.pickUpCodeList.push(data.pickUpCodeList[i]);
+            //         }
+            //     }
+            // }
+            // vm.delayResponse = data.delayResponse;
         };
         //连接关闭事件
         webSocket.onclose = function () {

+ 68 - 65
kmall-admin/src/main/webapp/js/shop/brand.js

@@ -2,39 +2,44 @@ $(function () {
     $("#jqGrid").jqGrid({
         url: '../brand/list',
         datatype: "json",
-        colModel: [{
-            label: 'id', name: 'id', index: 'id', key: true, width: 140, align: 'center'
-        },
+        colModel: [
+            {label: 'id', name: 'id', index: 'id', key: true, width: 140, align: 'center', hidden: true},
             // {label: '所属商户', name: 'merchName', index: 'merchName', width: 180, align: 'center'},
             // {label: '所属门店', name: 'storeName', index: 'storeName', width: 180, align: 'center'},
             // {label: '所属分类', name: 'categoryName', index: 'categoryName', width: 180, align: 'center'},
             {
                 label: '品牌名称', name: 'name', index: 'name', width: 300
-            },{
+            },
+            {
                 label: '品牌唯一简码', name: 'uniqueIdentifier', index: 'name', width: 100
-            }, {
-                label: '图片',
-                name: 'listPicUrl',
-                index: 'list_pic_url',
-                width: 100,
-                align: 'center',
-                formatter: function (value) {
-                    return transImg(value);
-                }
-            }, {
+            },
+            // {
+            //     label: '图片',
+            //     name: 'listPicUrl',
+            //     index: 'list_pic_url',
+            //     width: 100,
+            //     align: 'center',
+            //     formatter: function (value) {
+            //         return transImg(value);
+            //     }
+            // },
+            {
                 label: '描述', name: 'simpleDesc', index: 'simple_desc', width: 250
-            }, {
-                label: '图片',
-                name: 'picUrl',
-                index: 'pic_url',
-                width: 100,
-                align: 'center',
-                formatter: function (value) {
-                    return transImg(value);
-                }
-            }, {
-                label: '排序', name: 'sortOrder', index: 'sort_order', width: 100, align: 'center'
-            }, {
+            },
+            // {
+            //     label: '图片',
+            //     name: 'picUrl',
+            //     index: 'pic_url',
+            //     width: 100,
+            //     align: 'center',
+            //     formatter: function (value) {
+            //         return transImg(value);
+            //     }
+            // },
+            // {
+            //     label: '排序', name: 'sortOrder', index: 'sort_order', width: 100, align: 'center'
+            // },
+            {
                 label: '显示',
                 name: 'isShow',
                 index: 'is_show',
@@ -43,33 +48,36 @@ $(function () {
                 formatter: function (value) {
                     return transIsNot(value)
                 }
-            }, {
-                label: '展示价格', name: 'floorPrice', index: 'floor_Price', width: 100, align: 'right'
-            }, {
-                label: 'app显示图片',
-                name: 'appListPicUrl',
-                index: 'app_list_pic_url',
-                align: 'center',
-                width: 100,
-                formatter: function (value) {
-                    return transImg(value);
-                }
-            }, {
+            },
+            // {
+            //     label: '展示价格', name: 'floorPrice', index: 'floor_Price', width: 100, align: 'right'
+            // }, {
+            //     label: 'app显示图片',
+            //     name: 'appListPicUrl',
+            //     index: 'app_list_pic_url',
+            //     align: 'center',
+            //     width: 100,
+            //     formatter: function (value) {
+            //         return transImg(value);
+            //     }
+            // },
+            {
                 label: '新品牌', name: 'isNew', index: 'is_new', align: 'center', width: 100, formatter: function (value) {
                     return transIsNot(value)
                 }
-            }, {
-                label: '新品牌图片',
-                name: 'newPicUrl',
-                index: 'new_pic_url',
-                align: 'center',
-                width: 100,
-                formatter: function (value) {
-                    return transImg(value);
-                }
-            }, {
-                label: '新品牌排序', name: 'newSortOrder', index: 'new_sort_order', align: 'center', width: 80
             }
+            // {
+            //     label: '新品牌图片',
+            //     name: 'newPicUrl',
+            //     index: 'new_pic_url',
+            //     align: 'center',
+            //     width: 100,
+            //     formatter: function (value) {
+            //         return transImg(value);
+            //     }
+            // }, {
+            //     label: '新品牌排序', name: 'newSortOrder', index: 'new_sort_order', align: 'center', width: 80
+            // }
             // ,
             //     {label: '操作', width: 150, align: 'center', sortable: false,
             //         formatter: function (value, col, row) {
@@ -113,7 +121,7 @@ $(function () {
 
 
 var category_ztree;
-var exportMsg;
+
 var category_setting = {
     data: {
         simpleData: {
@@ -146,16 +154,19 @@ var vm = new Vue({
         brand: {listPicUrl: '', picUrl: '', appListPicUrl: '', newPicUrl: '', isShow: 1, isNew: 0},
         ruleValidate: {
             name: [
-                {required: true, message: '品牌名称不能为空', trigger: 'blur'}
+                {required: true, message: '品牌名称不能为空', trigger: 'blur'},
+                {max: 64, message: '品牌名称长度不能超过64', trigger: 'blur'}
             ],
             uniqueIdentifier: [
-                {required: true, message: '品牌唯一简码不能为空', trigger: 'blur'}
+                // {required: true, message: '品牌唯一简码不能为空', trigger: 'blur'},
+                {max: 10, message: '品牌唯一简码长度不能超过10', trigger: 'blur'}
             ],
             // listPicUrl: [
             //     {required: true, message: '品牌图片不能为空', trigger: 'blur'}
             // ],
             simpleDesc: [
-                {required: true, message: '品牌描述不能为空', trigger: 'blur'}
+                {required: true, message: '品牌描述不能为空', trigger: 'blur'},
+                {max: 200, message: '品牌描述长度不能超过200', trigger: 'blur'}
             ],
             // picUrl: [
             //     {required: true, message: '品牌图片不能为空', trigger: 'blur'}
@@ -289,9 +300,10 @@ var vm = new Vue({
 
             // 校验品牌唯一简码
             var uniqueIdentifier = vm.brand.uniqueIdentifier;
-            var uniqueReg = /^[0-9a-zA-Z_]{1,10}$/;
+            var uniqueReg = /^[0-9a-zA-Z_]{0,10}$/;
             if(!uniqueReg.test(uniqueIdentifier)){
                 alert("请输入正确的唯一简码");
+                return;
             }
 
 
@@ -475,7 +487,6 @@ var vm = new Vue({
             });
         },
         uploadExcelSuccess: function (data) {
-            // console.log(data);
             if (data.code == 0) {
                 alert('导入成功', function (index) {
                     $("#jqGrid").trigger("reloadGrid");
@@ -483,30 +494,22 @@ var vm = new Vue({
             } else {
                 alert(data.msg);
             }
-            setTimeout(exportMsg, 100);
         },
         uploadExcelError: function () {
             alert('上传出现异常,请重试!');
-            setTimeout(exportMsg, 100);
         },
         uploadExcelProgress: function (event, file, fileList) {
-            console.log("上传中")
-            console.log(event)
-            console.log(file)
-            console.log(fileList)
-            console.log("上传中")
-            exportMsg = this.$Message.loading({
+            const msg = this.$Message.loading({
                 content: 'Loading...',
                 duration: 0
             });
-            // setTimeout(msg, 3000);
+            setTimeout(msg, 1000);
         },
         uploadExcelFormatError: function (file) {
             this.$Notice.warning({
                 title: '文件格式不正确',
                 desc: '文件 ' + file.name + ' 格式不正确,请上传 xls 或 xlsx 格式的文件。'
             });
-            setTimeout(exportMsg, 100);
         }
     },
     mounted() {

+ 9 - 9
kmall-admin/src/main/webapp/js/shop/storeProductStock.js

@@ -41,15 +41,15 @@ $(function () {
                     return transIsNot(value);
                 }
             },
-            {label: '库存是否共享', name: 'isStockShare', index: 'isStockShare', width: 100, align: 'center',
-                formatter: function (value) {
-                    if (value == '0') {
-                        return '否';
-                    } else if (value == '1') {
-                        return '是';
-                    }
-                    return '-';
-                }},
+            // {label: '库存是否共享', name: 'isStockShare', index: 'isStockShare', width: 100, align: 'center',
+            //     formatter: function (value) {
+            //         if (value == '0') {
+            //             return '否';
+            //         } else if (value == '1') {
+            //             return '是';
+            //         }
+            //         return '-';
+            //     }},
             {label: '门店库存', name: 'stockNum', index: 'stockNum', width: 80, align: 'center'},
             {label: '园区库存', name: 'parkStock', index: 'parkStock', width: 80, align: 'center'},
             // {label: '待恢复数量', name: 'toBeRestored', index: 'toBeRestored', width: 100, align: 'right',formatter:function(value){

+ 2 - 1
kmall-admin/src/main/webapp/js/shop/storesmsconfig.js

@@ -5,7 +5,8 @@ $(function () {
         colModel: [
 			{label: 'id', name: 'id', index: 'id', key: true, hidden: true},
 			{label: '商户编号', name: 'merchSn', index: 'merch_sn', align: 'center', width: 80},
-			{label: '门店id', name: 'storeId', index: 'store_id',  align: 'center',width: 80},
+			{label: '门店id', name: 'storeId', index: 'store_id',  align: 'center',width: 80, hidden: true},
+			{label: '门店名称', name: 'storeName', index: 'store_name',  align: 'center',width: 80},
 			{label: '发送开始时间', name: 'sendStartTime', index: 'send_start_time',  align: 'center',width: 80,formatter: function (value) {
 					return transDate(value,'yyyy-MM-dd hh:mm:ss');
 				}},

BIN
kmall-admin/src/main/webapp/statics/file/activities_score_yyyy_mm_dd_v1.0.0.xlsx


BIN
kmall-admin/src/main/webapp/statics/file/brand_export_yyyy_mm_dd_v1.0.0.xls


BIN
kmall-admin/src/main/webapp/statics/file/mall2RulesDetil_1.0.xlsx