Przeglądaj źródła

Merge branch 'master' of lhm/kmall-haikong into master

lhm 3 lat temu
rodzic
commit
2a4bf510a6
22 zmienionych plików z 224 dodań i 400 usunięć
  1. 4 3
      kmall-admin/src/main/java/com/kmall/admin/dao/haikong/HaiKongSendOrderInfoDetailRecordDao.java
  2. 3 3
      kmall-admin/src/main/java/com/kmall/admin/dao/haikong/HaiKongSendOrderInfoRecordDao.java
  3. 3 3
      kmall-admin/src/main/java/com/kmall/admin/entity/haikong/HaiKongMemberOrderSyncResendEntity.java
  4. 2 0
      kmall-admin/src/main/java/com/kmall/admin/haikong/constant/Constants.java
  5. 3 3
      kmall-admin/src/main/java/com/kmall/admin/haikong/dto/OrderInfoItemDTO.java
  6. 2 3
      kmall-admin/src/main/java/com/kmall/admin/haikong/task/MemberOrderSyncResendTask.java
  7. 1 2
      kmall-admin/src/main/java/com/kmall/admin/haikong/task/MemberScoreChangeResendTask.java
  8. 3 4
      kmall-admin/src/main/java/com/kmall/admin/haikong/task/MemberSysAccessTokenRefreshTask.java
  9. 8 7
      kmall-admin/src/main/java/com/kmall/admin/haikong/task/SendOrderInfoTask.java
  10. 47 1
      kmall-admin/src/main/java/com/kmall/admin/haikong/utils/Response.java
  11. 0 248
      kmall-admin/src/main/java/com/kmall/admin/service/impl/GoodsServiceImpl.java
  12. 49 28
      kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderServiceImpl.java
  13. 25 13
      kmall-admin/src/main/resources/conf/cuspay/cuspay-wx.properties
  14. 46 46
      kmall-admin/src/main/resources/conf/fastdfs.properties
  15. 2 1
      kmall-admin/src/main/resources/logback.xml
  16. 0 4
      kmall-admin/src/main/resources/mybatis/mapper/haikong/HaikongSendOrderInfoRecordDao.xml
  17. 0 6
      kmall-admin/src/main/webapp/WEB-INF/page/mk/mkactivitiesscore.html
  18. 3 3
      kmall-admin/src/main/webapp/js/sale/sale.js
  19. 6 7
      kmall-manager/src/main/resources/conf/db.properties
  20. 1 1
      kmall-manager/src/main/resources/conf/haikong.properties
  21. 8 6
      kmall-manager/src/main/resources/conf/redis.properties
  22. 8 8
      kmall-manager/src/main/resources/conf/wx-mp.properties

+ 4 - 3
kmall-admin/src/main/java/com/kmall/admin/dao/haikong/HaiKongSendOrderInfoDetailRecordDao.java

@@ -2,6 +2,7 @@ package com.kmall.admin.dao.haikong;
 
 
 import com.kmall.admin.entity.haikong.HaiKongSendOrderInfoDetailRecordEntity;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 import java.util.Map;
@@ -15,9 +16,9 @@ import java.util.Map;
  */
 public interface HaiKongSendOrderInfoDetailRecordDao {
 
-    HaiKongSendOrderInfoDetailRecordEntity queryObject(Integer id);
+    HaiKongSendOrderInfoDetailRecordEntity queryObject(@Param("id") Integer id);
 
-    List<HaiKongSendOrderInfoDetailRecordEntity> queryListByOrderId(String orderId);
+    List<HaiKongSendOrderInfoDetailRecordEntity> queryListByOrderId(@Param("orderId") String orderId);
 
     List<HaiKongSendOrderInfoDetailRecordEntity> queryList(Map<String, Object> params);
 
@@ -27,7 +28,7 @@ public interface HaiKongSendOrderInfoDetailRecordDao {
 
     int update(HaiKongSendOrderInfoDetailRecordEntity entity);
 
-    int delete(Integer id);
+    int delete(@Param("id") Integer id);
 
     int deleteBatch(List<Integer> idList);
 

+ 3 - 3
kmall-admin/src/main/java/com/kmall/admin/dao/haikong/HaiKongSendOrderInfoRecordDao.java

@@ -16,9 +16,9 @@ import java.util.Map;
  */
 public interface HaiKongSendOrderInfoRecordDao {
 
-    HaiKongSendOrderInfoRecordEntity queryObjectByOuterOrderNo(String outerOrderNo);
+    HaiKongSendOrderInfoRecordEntity queryObjectByOuterOrderNo(@Param("outerOrderNo") String outerOrderNo);
 
-    HaiKongSendOrderInfoRecordEntity queryObject(Integer id);
+    HaiKongSendOrderInfoRecordEntity queryObject(@Param("id") Integer id);
 
     List<HaiKongSendOrderInfoRecordEntity> queryListByResendStatus();
 
@@ -30,7 +30,7 @@ public interface HaiKongSendOrderInfoRecordDao {
 
     int update(HaiKongSendOrderInfoRecordEntity entity);
 
-    int delete(Integer id);
+    int delete(@Param("id") Integer id);
 
     int deleteBatch(List<Integer> idList);
 

+ 3 - 3
kmall-admin/src/main/java/com/kmall/admin/entity/haikong/HaiKongMemberOrderSyncResendEntity.java

@@ -44,7 +44,7 @@ public class HaiKongMemberOrderSyncResendEntity {
     /**
      * 会员系统订单id,请求成功后返回
      */
-    private Long memberSysOrderId;
+    private String memberSysOrderId;
 
     /**
      * 重发状态,0:等待重发 1:重发成功 2:重发失败 3:无需重发
@@ -138,11 +138,11 @@ public class HaiKongMemberOrderSyncResendEntity {
         this.createTime = createTime;
     }
 
-    public Long getMemberSysOrderId() {
+    public String getMemberSysOrderId() {
         return memberSysOrderId;
     }
 
-    public void setMemberSysOrderId(Long memberSysOrderId) {
+    public void setMemberSysOrderId(String memberSysOrderId) {
         this.memberSysOrderId = memberSysOrderId;
     }
 

+ 2 - 0
kmall-admin/src/main/java/com/kmall/admin/haikong/constant/Constants.java

@@ -25,6 +25,8 @@ public class Constants {
 
     public static final String HAIKONG_MEMBER_MAX_SCORE_RATIO = "HAIKONG_MEMBER_MAX_SCORE_RATIO";
 
+    public static final String CUSTOMS_PORT_CODE = "CUSTOMS_PORT_CODE";
+
     /* --------------------------------------------------系统常量----------------------------------------------- */
 
     /* --------------------------------------------------环境常量----------------------------------------------- */

+ 3 - 3
kmall-admin/src/main/java/com/kmall/admin/haikong/dto/OrderInfoItemDTO.java

@@ -37,7 +37,7 @@ public class OrderInfoItemDTO implements Serializable {
     private Integer nums;
 
     @JsonProperty("is_tax")
-    private Boolean tax;
+    private String tax;
 
     @JsonProperty("tax_price")
     private BigDecimal taxPrice;
@@ -122,11 +122,11 @@ public class OrderInfoItemDTO implements Serializable {
         this.nums = nums;
     }
 
-    public Boolean getTax() {
+    public String getTax() {
         return tax;
     }
 
-    public void setTax(Boolean tax) {
+    public void setTax(String tax) {
         this.tax = tax;
     }
 

+ 2 - 3
kmall-admin/src/main/java/com/kmall/admin/haikong/task/MemberOrderSyncResendTask.java

@@ -40,8 +40,7 @@ public class MemberOrderSyncResendTask {
     @Autowired
     private HaiKongMemberOrderSyncResendService haiKongMemberOrderSyncResendService;
 
-    //    @Scheduled(cron = "0 55 0/2 * * ?")
-//    @Scheduled(cron = "0/20 0/2 * * * ?")
+//    @Scheduled(cron = "0 0/2 * * * ?")
     public void resend() {
         // 查询等待发送和发送失败的记录
         List<HaiKongMemberOrderSyncResendEntity> haiKongMemberOrderSyncResendEntities = haiKongMemberOrderSyncResendService.queryListByResendStatus();
@@ -58,7 +57,7 @@ public class MemberOrderSyncResendTask {
             log.info("【重发】请求会员消费订单同步接口!请求体:{}", body);
             try {
                 String responseJson = haiKongMemberTemplate.changeMemberScore(body);
-                Response<Long> response = JacksonUtil.fromListJson(responseJson, new TypeReference<Response<Long>>() {});
+                Response<String> response = JacksonUtil.fromListJson(responseJson, new TypeReference<Response<String>>() {});
                 if (Objects.nonNull(response) && response.getSuccess()) {
                     haiKongMemberOrderSyncResendEntity.setMemberSysOrderId(response.getData());
                     haiKongMemberOrderSyncResendEntity.setResendStatus(HaiKongMemberOrderResendStatusEnum.RESEND_SUCCESS.getStatus());

+ 1 - 2
kmall-admin/src/main/java/com/kmall/admin/haikong/task/MemberScoreChangeResendTask.java

@@ -39,8 +39,7 @@ public class MemberScoreChangeResendTask {
     @Autowired
     private HaiKongMemberScoreChangeRecordService haiKongMemberScoreChangeRecordService;
 
-    //    @Scheduled(cron = "0 55 0/2 * * ?")
-    //@Scheduled(cron = "0/20 0/2 * * * ?")
+//    @Scheduled(cron = "0 0/2 * * * ?")
     public void resend() {
         // 查询等待发送和发送失败的记录
         List<HaiKongMemberScoreChangeRecordEntity> haiKongMemberScoreChangeRecordEntities = haiKongMemberScoreChangeRecordService.queryListByResendStatus();

+ 3 - 4
kmall-admin/src/main/java/com/kmall/admin/haikong/task/MemberSysAccessTokenRefreshTask.java

@@ -32,8 +32,7 @@ public class MemberSysAccessTokenRefreshTask {
     private HaiKongMemberTemplate haiKongMemberTemplate;
 
 
-//    @Scheduled(cron = "0 55 0/2 * * ?")
-    @Scheduled(cron = "0 0/2 * * * ?")
+//    @Scheduled(cron = "0/30 * * * * ?")
     public void refresh() {
         String refreshToken = JedisUtil.get(Constants.MEMBER_SYS_REFRESH_TOKEN_REDIS_KEY);
         String accessToken = JedisUtil.get(Constants.MEMBER_SYS_ACCESS_TOKEN_REDIS_KEY);
@@ -51,7 +50,7 @@ public class MemberSysAccessTokenRefreshTask {
             } catch (Exception e) {
                 log.error(e.getMessage() + "====>", e);
             }
-        } else {
+        } else if (StringUtils.isEmpty(accessToken) && !StringUtils.isEmpty(refreshToken)) {
             try {
                 String refreshAccessTokenJson = haiKongMemberTemplate.refreshAccessToken(refreshToken);
                 handleResponse(refreshAccessTokenJson, a);
@@ -74,7 +73,7 @@ public class MemberSysAccessTokenRefreshTask {
         if (Objects.nonNull(response) && response.getSuccess()) {
             AccessTokenDTO accessTokenDTO = response.getData();
             JedisUtil.del(Constants.MEMBER_SYS_ACCESS_TOKEN_REDIS_KEY);
-            JedisUtil.set(Constants.MEMBER_SYS_ACCESS_TOKEN_REDIS_KEY, JacksonUtil.toJson(accessTokenDTO), (60 * 60 * 2) - (60 * 2));
+            JedisUtil.set(Constants.MEMBER_SYS_ACCESS_TOKEN_REDIS_KEY, JacksonUtil.toJson(accessTokenDTO), (60 * 60 * 2) - (60 * 10));
             if (a) {
                 JedisUtil.del(Constants.MEMBER_SYS_REFRESH_TOKEN_REDIS_KEY);
                 JedisUtil.set(Constants.MEMBER_SYS_REFRESH_TOKEN_REDIS_KEY, Optional.ofNullable(accessTokenDTO.getRefreshToken()).orElse(""), (60 * 60 * 24 * 7));

+ 8 - 7
kmall-admin/src/main/java/com/kmall/admin/haikong/task/SendOrderInfoTask.java

@@ -15,6 +15,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 import org.springframework.util.CollectionUtils;
 
@@ -43,7 +44,7 @@ public class SendOrderInfoTask {
     @Autowired
     private VmcShopTemplate vmcShopTemplate;
 
-    //    @Scheduled(cron = "0/20 0/2 * * * ?")
+//    @Scheduled(cron = "0 0/1 * * * ?")
     public void resend() {
         // 查询等待发送和发送失败的记录
         List<HaiKongSendOrderInfoRecordEntity> haiKongSendOrderInfoRecordEntities = haiKongSendOrderInfoRecordService.queryListByResendStatus();
@@ -81,23 +82,23 @@ public class SendOrderInfoTask {
             sendOrderToVmcShopDTO.setOrderInfo(orderInfoDTO);
 
             String body = JacksonUtil.toJson(sendOrderToVmcShopDTO);
-            log.info("【重发】请求会员消费订单同步接口!请求体:{}", body);
+            log.info("【重发】请求免税mall创建订单接口!请求体:{}", body);
             try {
                 String responseJson = vmcShopTemplate.sendOrder(body);
-                Response<Long> response = JacksonUtil.fromListJson(responseJson, new TypeReference<Response<Long>>() {});
-                if (Objects.nonNull(response) && response.getSuccess()) {
+                Response<String> response = JacksonUtil.fromListJson(responseJson, new TypeReference<Response<String>>() {});
+                if (Objects.nonNull(response) && !"failure".equals(response.getResult())) {
                     haiKongSendOrderInfoRecordEntity.setResendStatus(HaiKongMemberOrderResendStatusEnum.RESEND_SUCCESS.getStatus());
                     successList.add(haiKongSendOrderInfoRecordEntity);
-                    log.info("【重发】请求会员消费订单同步接口成功!响应数据:{}", responseJson);
+                    log.info("【重发】请求免税mall创建订单接口成功!响应数据:{}", responseJson);
                 } else {
                     haiKongSendOrderInfoRecordEntity.setResendStatus(HaiKongMemberOrderResendStatusEnum.RESEND_FAILED.getStatus());
                     failedList.add(haiKongSendOrderInfoRecordEntity);
-                    log.error("【重发】请求会员消费订单同步接口失败!响应:{}", responseJson);
+                    log.error("【重发】请求免税mall创建订单接口失败!响应:{}", responseJson);
                 }
             } catch (Exception e) {
                 haiKongSendOrderInfoRecordEntity.setResendStatus(HaiKongMemberOrderResendStatusEnum.RESEND_FAILED.getStatus());
                 failedList.add(haiKongSendOrderInfoRecordEntity);
-                log.error("【重发】请求会员消费订单同步接口失败!异常:", e);
+                log.error("【重发】请求免税mall创建订单接口失败!异常:", e);
             }
         });
 

+ 47 - 1
kmall-admin/src/main/java/com/kmall/admin/haikong/utils/Response.java

@@ -25,6 +25,14 @@ public class Response<T> {
 
     private Integer totalCount;
 
+    private Integer code;
+
+    private String result;
+
+    private String message;
+
+    private String ext;
+
     public Boolean getSuccess() {
         return success;
     }
@@ -81,6 +89,38 @@ public class Response<T> {
         this.totalCount = totalCount;
     }
 
+    public Integer getCode() {
+        return code;
+    }
+
+    public void setCode(Integer code) {
+        this.code = code;
+    }
+
+    public String getResult() {
+        return result;
+    }
+
+    public void setResult(String result) {
+        this.result = result;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    public String getExt() {
+        return ext;
+    }
+
+    public void setExt(String ext) {
+        this.ext = ext;
+    }
+
     @Override
     public String toString() {
         return "Response{" +
@@ -91,6 +131,10 @@ public class Response<T> {
                 ", pageSize=" + pageSize +
                 ", pageNo=" + pageNo +
                 ", totalCount=" + totalCount +
+                ", code=" + code +
+                ", result='" + result + '\'' +
+                ", message='" + message + '\'' +
+                ", ext='" + ext + '\'' +
                 '}';
     }
 
@@ -101,7 +145,9 @@ public class Response<T> {
         /**
          * 无效的refresh_token
          */
-        INVALID_REFRESH(1005, "无效的refresh_token");
+        INVALID_REFRESH(1005, "无效的refresh_token"),
+        PRODUCT_NON_EXISTS(10500, "商品不存在"),
+        ;
 
         /**
          * 错误码

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

@@ -1672,260 +1672,12 @@ public class GoodsServiceImpl implements GoodsService {
         /**
          * 1.首先根据商品条码跟门店id查询是否有库存,没库存直接返回
          */
-
         goods.setDiscountedPrice(new BigDecimal(0));
         BigDecimal retailPrice = goods.getRetailPrice();
 
-
         goods.setActualPaymentAmount(retailPrice.setScale(2,RoundingMode.HALF_UP));
 
         Map<String,Object> skuActivitiesMap = new HashMap<>();
-
-        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-
-        /**
-         * 2.查询当前时间,该门店是否有活动,如果有活动,查询开启了哪些营销方式
-         * 参数: 当前时间  门店id
-         */
-        List<MkActivitiesEntity> mkActivitiesEntityList = mkActivitiesService.queryByNow(storeId,format.format(new Date()));
-
-        if(mkActivitiesEntityList == null || mkActivitiesEntityList.size() == 0){
-            // 计算税费
-            GoodsEntity goodsEntity = goodsDao.queryByBarcodeAndSku(prodBarcode, goods.getGoodsSn());
-            BigDecimal tax = CalculateTax.calculateFinalTax(goodsEntity,goods.getActualPaymentAmount(),this).setScale(3,RoundingMode.HALF_UP);
-            goods.setGoodstaxes(tax.toString());
-            skuActivitiesMap.put("goods",goods);
-            return skuActivitiesMap;
-        }
-
-
-
-        // 遍历活动集合,查询有哪些活动是开启的
-        boolean daily = false,coupon = false,combinationPrice = false
-                ,discount = false,fullGift = false,fullReduction = false
-                ,getOneFree = false,promotion = false,halfPrice = false;
-
-        List<String> topicList = new ArrayList<>(); // 记录有哪些营销活动的topic
-        Map<String,String> mkaIdMap = new HashMap<>(); // 记录topic跟mkaId的关系
-        // 将所有的营销活动新增到list中
-        for(MkActivitiesEntity mkActivitiesEntity : mkActivitiesEntityList){
-            topicList.add(mkActivitiesEntity.getMkaTopic());
-            String mkaId = mkaIdMap.putIfAbsent(mkActivitiesEntity.getMkaTopic(), mkActivitiesEntity.getMkaId()+"");
-            if(StringUtils.isNotEmpty(mkaId)){
-//                mkaId = "'"+mkaId + "','" + mkActivitiesEntity.getMkaId()+"'";
-                mkaId += String.format(",%s",mkActivitiesEntity.getMkaId());
-                mkaIdMap.put(mkActivitiesEntity.getMkaTopic(),mkaId);
-            }
-        }
-        // 判断有哪些营销活动
-        if(topicList.contains("zhjsp")) // 组合价
-            combinationPrice = true;
-        if(topicList.contains("dz")) // 打折
-            discount = true;
-        if(topicList.contains("mz")) //满赠
-            fullGift = true;
-        if(topicList.contains("mj"))  // 满减
-            fullReduction = true;
-        if(topicList.contains("mysy")) // 买一送一
-            getOneFree = true;
-        if(topicList.contains("rchd")) // 日常活动
-            daily = true;
-        if(topicList.contains("yhq")) // 优惠券
-            coupon = true;
-        if(topicList.contains("lscx")) // 临时促销
-            promotion = true;
-        if(topicList.contains("drjbj"))
-            halfPrice = true;
-
-
-        // 获取未优惠前的商品价格
-        retailPrice = goods.getRetailPrice();
-
-
-        // 根据条码查询商品品牌名称 mall_brand  mall_product_store_rela  mall_goods
-        String brandName = goods.getBrand();
-
-        /**
-         * 优先级:临时促销 》买一送一=满赠 》 组合价=日常活动 》 打折=满减 》 优惠券
-         */
-
-        /**
-         * 组合价的做法就是将参与组合的条码带到收银端
-         * 现根据营销活动id跟条形码,查询有哪些参与该条码组合的商品
-         *
-         *
-         * TODO
-         */
-        if(combinationPrice){
-            String mkaId = mkaIdMap.get("zhjsp");
-            Map<String,Object> param = new HashMap<>();
-            param.put("mkaId",mkaId);
-            param.put("prodBarcode",prodBarcode);
-            List<MkActivitiesCombinationPriceEntity> combinationPriceList = combinationPriceService.queryList(param);
-            if(combinationPriceList != null && combinationPriceList.size() > 0) {
-                Map<String, List<MkActivitiesCombinationPriceEntity>> collect =
-                        combinationPriceList.stream().collect(Collectors.groupingBy(MkActivitiesCombinationPriceEntity::getCombinationType));
-
-                skuActivitiesMap.put("zhjsp",collect);
-            }
-        }
-
-
-
-        format = new SimpleDateFormat("yyyy-MM-dd");
-        String nowTime = format.format(new Date());
-        /**
-         * 满减可能是跟着条码,也可能跟着品牌
-         * 根据商品品牌跟商品条码去查询是否有优惠金额
-         *
-         * 满足金额   购买商品条码   赠品条码
-         *
-         */
-        Map<String,Object> fullReductionMap = new HashMap<>();
-        if(fullReduction){
-            String mkaId = mkaIdMap.get("mj");
-            MkActivitiesFullReductionEntity fullReductionEntity = fullReductionService.queryByCodeOrBrand(mkaId,prodBarcode,brandName,nowTime);
-            if(fullReductionEntity != null) {
-                if(!StringUtils.isNullOrEmpty(fullReductionEntity.getProductBrand())){
-                    // 跟着品牌走
-                    fullReductionMap.put(brandName,fullReductionEntity);
-                }else{
-                    // 跟着条码走
-                    fullReductionMap.put(fullReductionEntity.getBarcode(), fullReductionEntity);
-                }
-                skuActivitiesMap.put("mj",fullReductionMap);
-            }
-        }
-
-        /**
-         * 满赠可能是跟着条码,也可能跟着品牌
-         * 根据商品品牌跟商品条码去查询是否有满赠
-         * 1.先扫买的商品,然后查询出赠送的商品条码
-         * 2.先扫赠的商品,然后查询出符合条件的商品条码或者品牌
-         * 满足的金额   购买的商品条码或者品牌   赠送的商品条码
-         * TODO
-         */
-        Map<String,Object> fullGiftMap = new HashMap<>();
-        if(fullGift){
-            String mkaId = mkaIdMap.get("mz");
-            MkActivitiesFullGiftEntity giftEntity = fullGiftService.queryByCodeOrBrand(mkaId,prodBarcode,brandName,nowTime);
-            if(giftEntity != null) {
-                if(giftEntity.getProductBrand() != null){
-                    // 跟着品牌走
-                    fullGiftMap.put(brandName,giftEntity);
-                }else{
-                    // 跟着条码走
-                    fullGiftMap.put(giftEntity.getBarcode(), giftEntity);
-                }
-                skuActivitiesMap.put("mz",fullGiftMap);
-            }
-        }
-
-        /**
-         * 买一送一可能是跟着条码,也可能跟着品牌
-         * 根据商品品牌跟商品条码去查询是否有送的商品
-         * 有两个场景
-         * 1.先扫买的商品,然后查询出赠送的商品条码
-         * 2.先扫赠的商品,然后查询出符合条件的商品条码或者品牌
-         * 所以就需要一个map
-         * key为购买的商品条码或者商品品牌  value为赠送的商品条码
-         * 但是品牌是根据条码查询的,所以最终map里面的结构是
-         * key 商品条码 value 赠品条码
-         */
-        if(getOneFree){
-            String mkaId = mkaIdMap.get("mysy");
-            MkActivitiesGetOneFreeGoodsEntity getOneFreeGoodsEntity = getOneFreeGoodsService.queryByCodeOrBrand(mkaId,prodBarcode,brandName);
-            if(getOneFreeGoodsEntity != null){
-                if("无".equals(getOneFreeGoodsEntity.getProductBrand())){
-                    getOneFreeGoodsEntity.setBrand(false);
-                    skuActivitiesMap.put("mysy",getOneFreeGoodsEntity);
-                }else{
-                    getOneFreeGoodsEntity.setBrand(true);
-                    skuActivitiesMap.put("mysy",getOneFreeGoodsEntity);
-                }
-
-            }
-        }
-
-
-        // 第二份半价
-        if(halfPrice){
-            String mkaId = mkaIdMap.get("drjbj");
-            MkActivitiesHalfPriceEntity activitiesHalfPriceEntity = halfPriceService.queryByCodeOrBrand(mkaId,prodBarcode);
-            if(activitiesHalfPriceEntity != null){
-                skuActivitiesMap.put("drjbj",activitiesHalfPriceEntity);
-
-            }
-
-        }
-
-
-        // --------------------------------------------------------------------------------------
-
-        /**
-         * 优惠券跟着条形码走,一般是设置一个标识,然后最后输入优惠券码后,减扣对应的标识,所以返回一个map数组
-         */
-
-        if(coupon){
-            String mkaId = mkaIdMap.get("yhq");
-            MkActivitiesCouponEntity couponEntity =  couponService.queryByBarCode(mkaId,prodBarcode,nowTime);
-            if(couponEntity != null){ // 优惠券码,优惠金额
-                Map<String,Object> returnMap = new HashMap<>();
-                returnMap.put(couponEntity.getCouponSn() , couponEntity.getCouponPrice());
-                skuActivitiesMap.put("yhq",returnMap);
-            }
-        }
-
-
-        /**
-         * 打折的价格是与条形码对应的,所以需要根据条形码和营销方式id去查询活动价格
-         */
-
-        if(discount){
-            String mkaId = mkaIdMap.get("dz");
-            MkActivitiesDiscountEntity discountEntity =  discountService.queryByBarCode(mkaId,prodBarcode);
-            // TODO 可能会直接替代产品价格
-            if (discountEntity != null) {
-                goods.setActualPaymentAmount(discountEntity.getActivityPrice());
-                goods.setRetailPrice(discountEntity.getActivityPrice());
-
-                goods.setActivity("打折");
-            }
-        }
-
-
-        /**
-         * 日常活动跟着条形码走,优先级比临时促销低,但是高于正常价格
-         */
-        if(daily){
-            String mkaId = mkaIdMap.get("rchd");
-            MkDailyActivitiesEntity dailyActivitiesEntity = dailyActivitiesService.queryByBarCode(mkaId,prodBarcode);
-            if(dailyActivitiesEntity != null){
-                goods.setActualPaymentAmount(dailyActivitiesEntity.getActivityPrice());
-                goods.setRetailPrice(dailyActivitiesEntity.getActivityPrice());
-
-                goods.setActivity("日常活动");
-
-            }
-        }
-
-
-        /**
-         * 临时促销跟着条形码走,优先级应该最高,所以排到了最下面
-         */
-        if(promotion){
-            String mkaId = mkaIdMap.get("lscx");
-            MkActivitiesPromotionEntity promotionEntity = promotionService.queryByBarCode(mkaId,prodBarcode);
-            // 如果该商品存在临时促销,直接替换活动价格
-            if(promotionEntity != null){
-                goods.setActualPaymentAmount(promotionEntity.getActivityPrice());
-                goods.setRetailPrice(promotionEntity.getActivityPrice());
-
-                goods.setActivity("临时促销");
-
-            }
-        }
-
         // 计算税费
         GoodsEntity goodsEntity = goodsDao.queryByBarcodeAndSku(prodBarcode, goods.getGoodsSn());
         BigDecimal tax = CalculateTax.calculateFinalTax(goodsEntity,goods.getActualPaymentAmount(),this).setScale(3,RoundingMode.HALF_UP);

+ 49 - 28
kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderServiceImpl.java

@@ -642,6 +642,9 @@ public class OrderServiceImpl implements OrderService {
         mailInfo.setShopTel(storeEntity.getTelephoneNumber());
         AddressEntity addressEntity = addressDao.queryStoreAddress(storeEntity.getId(),Dict.addressStatus.item_1.getItem());
         // 发货人
+        if (Objects.isNull(addressEntity)) {
+            throw new ServiceException("请先配置发货地址!");
+        }
         mailInfo.setSenderTel(addressEntity.getTelNumber());
         mailInfo.setSenderName(addressEntity.getSenderName());
         mailInfo.setSenderProvince(addressEntity.getProvinceName());
@@ -2175,10 +2178,20 @@ public class OrderServiceImpl implements OrderService {
                 queryGoodsVo.setSellVolume((Integer) map.get("sellVolume"));
                 queryGoodsVo.setRetailPrice(new BigDecimal(String.valueOf(map.get("retailPrice"))));
                 queryGoodsVo.setGoodsTaxes(new BigDecimal(String.valueOf(map.get("goodstaxes"))));
-                queryGoodsVo.setDisCountedPrice(new BigDecimal(String.valueOf(map.get("discountedPrice"))));
+                Object discountedPriceObj = map.get("discountedPrice");
+                BigDecimal discountedPrice = BigDecimal.ZERO;
+                if (Objects.nonNull(discountedPriceObj)) {
+                    discountedPrice = new BigDecimal(String.valueOf(discountedPriceObj));
+                }
+                queryGoodsVo.setDisCountedPrice(discountedPrice);
                 queryGoodsVo.setTotalPrice(new BigDecimal(String.valueOf(map.get("actualPaymentAmount"))));
                 queryGoodsVo.setActivity((String) map.get("activity"));
-                queryGoodsVo.setDeductionScore((Integer) map.get("deductionScore"));
+                Object deductionScoreObj = map.get("deductionScore");
+                Integer deductionScore = 0;
+                if (Objects.nonNull(deductionScoreObj)) {
+                    deductionScore = (Integer) deductionScoreObj;
+                }
+                queryGoodsVo.setDeductionScore(deductionScore);
                 Object deductionPriceObj = map.get("deductionPrice");
                 BigDecimal deductionPrice = BigDecimal.ZERO;
                 if (Objects.nonNull(deductionPriceObj)) {
@@ -2282,11 +2295,9 @@ public class OrderServiceImpl implements OrderService {
             ListUtils listUtils = BeanUtils.instantiate(ListUtils.class);
             listUtils.copyList(goodsEntityList, queryGoodsVOList);
 
-            // 商品总重量
-            BigDecimal weight = new BigDecimal(0);
             //生成商户订单号
             SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
-            String orderSn = "ZWCW" + format.format(new Date()) + CommonUtil.generateOrderNumber();
+            String orderSn = "ZMHK" + format.format(new Date()) + CommonUtil.generateOrderNumber();
             // 检查库存和更新库存
             for (QueryGoodsVO goodsDto : queryGoodsVOList) {
                 // 要购买的数量
@@ -2507,15 +2518,17 @@ public class OrderServiceImpl implements OrderService {
 
             String env = environment.getProperty("haikong.env");
             // 判断是微信的支付码还是支付宝的支付码
+            env = "prod";
             if (!org.springframework.util.StringUtils.isEmpty(env) && Constants.PROD.equals(env)) {
                 if (parCode.startsWith("28")) {
                     // 支付宝支付
-                    try {
+                    throw new ServiceException("目前暂不支持支付宝付款!请使用微信进行支付!");
+                    /*try {
                         AliPay(user, parCode, order, processRecordEntity, orderWXPayRecordCurrent, store);
                     } catch (Exception e) {
                         LOGGER.error("支付宝支付出现异常!订单号:【{}】", order.getOrder_sn(), e);
                         throw e;
-                    }
+                    }*/
                 } else {
                     // 微信支付
                     try {
@@ -2808,9 +2821,9 @@ public class OrderServiceImpl implements OrderService {
 
             String response = vmcShopTemplate.sendOrder(body);
 
-            com.kmall.admin.haikong.utils.R<String> r = JacksonUtil.fromListJson(response, new TypeReference<com.kmall.admin.haikong.utils.R<String>>() {});
+            Response<String> r = JacksonUtil.fromListJson(response, new TypeReference<Response<String>>() {});
 
-            if (Objects.nonNull(r) && r.getCode() == 0) {
+            if (Objects.nonNull(r) && !"failure".equals(r.getResult())) {
                 pickUpCodeService.updatePickUpCodeStatusByOrderSn(orderSn, Dict.PickUpCodeStatusEnum.item_0.getStatus());
                 haiKongSendOrderInfoRecordEntity.setResendStatus(HaiKongMemberOrderResendStatusEnum.NON_RESEND.getStatus());
                 LOGGER.info("推送订单到免税mall成功!响应结果:{}", response);
@@ -2864,7 +2877,11 @@ public class OrderServiceImpl implements OrderService {
      */
     private SeaportInfoDTO wrapSeaportInfo(OrderVo order) {
         SeaportInfoDTO seaportInfoDTO = new SeaportInfoDTO();
-        seaportInfoDTO.setSeaportCode("4600");
+        String value = sysConfigDao.queryByKey(Constants.CUSTOMS_PORT_CODE);
+        if (org.springframework.util.StringUtils.isEmpty(value)) {
+            throw new ServiceException("未配置海关口岸代码!配置方式:【系统管理】->【系统参数】");
+        }
+        seaportInfoDTO.setSeaportCode(value);
         seaportInfoDTO.setPlatform("1");
         seaportInfoDTO.setIdentityCard(order.getIdCard());
         seaportInfoDTO.setIdentityName(order.getPay_name());
@@ -2904,7 +2921,7 @@ public class OrderServiceImpl implements OrderService {
         orderInfoItemDTO.setItemcode(orderGoodsVo.getSku());
         orderInfoItemDTO.setAmount(orderGoodsVo.getActualPaymentAmount());
         orderInfoItemDTO.setNums(orderGoodsVo.getNumber());
-        orderInfoItemDTO.setTax(true);
+        orderInfoItemDTO.setTax("true");
         orderInfoItemDTO.setTaxPrice(orderGoodsVo.getTaxPrice());
         return orderInfoItemDTO;
     }
@@ -3232,7 +3249,7 @@ public class OrderServiceImpl implements OrderService {
             // 发送请求
             String memberOrderSyncResponseJson = haiKongMemberTemplate.memberOrderSync(body);
             LOGGER.info("请求会员系统同步消费订单接口!响应:{}", memberOrderSyncResponseJson);
-            Response<Long> response = JacksonUtil.fromListJson(memberOrderSyncResponseJson, new TypeReference<Response<Long>>() {});
+            Response<String> response = JacksonUtil.fromListJson(memberOrderSyncResponseJson, new TypeReference<Response<String>>() {});
             if (Objects.nonNull(response) && response.getSuccess()) {
                 haiKongMemberOrderSyncResendEntity.setMemberSysOrderId(response.getData());
                 haiKongMemberOrderSyncResendEntity.setResendStatus(HaiKongMemberOrderResendStatusEnum.NON_RESEND.getStatus());
@@ -4676,11 +4693,13 @@ public class OrderServiceImpl implements OrderService {
                 .filter(m -> Constants.RejectStatus.ALLOW.getCode().equals(m.getReject()))
                 .map(MkActivitiesScoreEntity::getSku)
                 .collect(Collectors.toList());
+        LOGGER.info("参与积分抵扣的sku集合:{}", scoreDeductionAllowSkuList);
         // 不参与积分抵扣的sku集合,如果该list不为空,则默认其余的sku参与积分抵扣
         List<String> scoreDeductionRejectSkuList = mkActivitiesScoreEntities.stream()
                 .filter(m -> Constants.RejectStatus.REJECT.getCode().equals(m.getReject()))
                 .map(MkActivitiesScoreEntity::getSku)
                 .collect(Collectors.toList());
+        LOGGER.info("不参与积分抵扣的sku集合:{}", scoreDeductionRejectSkuList);
 
         if (!CollectionUtils.isEmpty(scoreDeductionAllowSkuList) && !CollectionUtils.isEmpty(scoreDeductionRejectSkuList)) {
             LOGGER.error("积分抵扣表中既有参与又有不参与!与需求不符!");
@@ -4696,12 +4715,7 @@ public class OrderServiceImpl implements OrderService {
         for (GoodsDetailsDto goodsDetailsDto : goodsDetailsDtos) {
             String sku = goodsDetailsDto.getGoodsSn();
             if (!promotionSkuList.contains(sku)) {
-                if (CollectionUtils.isEmpty(scoreDeductionAllowSkuList) && !CollectionUtils.isEmpty(scoreDeductionRejectSkuList)) {
-                    if (!scoreDeductionRejectSkuList.contains(sku)) {
-                        BigDecimal skuActualPaymentAmount = goodsDetailsDto.getActualPaymentAmount();
-                        skuTotalPrice = skuTotalPrice.add(skuActualPaymentAmount);
-                    }
-                } else if (!CollectionUtils.isEmpty(scoreDeductionAllowSkuList) && CollectionUtils.isEmpty(scoreDeductionRejectSkuList)) {
+                if (!CollectionUtils.isEmpty(scoreDeductionAllowSkuList) && CollectionUtils.isEmpty(scoreDeductionRejectSkuList)) {
                     if (scoreDeductionAllowSkuList.contains(sku)) {
                         BigDecimal skuActualPaymentAmount = goodsDetailsDto.getActualPaymentAmount();
                         skuTotalPrice = skuTotalPrice.add(skuActualPaymentAmount);
@@ -4728,21 +4742,28 @@ public class OrderServiceImpl implements OrderService {
                 // 过滤掉参与过限时特价并且与积分抵扣互斥的sku,以及未参加积分抵扣活动的sku
                 goodsDetailsDtos = goodsDetailsDtos.stream().filter(goodsDetailsDto -> {
                     String sku = goodsDetailsDto.getSku();
+
+                    // 满赠商品不参与积分分摊计算
+                    if (Constants.ActivityTopicEnum.MZ.getTopicName().equals(goodsDetailsDto.getActivity())) {
+                        return false;
+                    }
+                    // 如果临时促销中定义了该sku不参与,那么根据优先级不管该商品在积分抵扣中如何设置,都认定为不参与
                     if (!promotionSkuList.contains(sku)) {
                         // 如果导入的商品都为不参与,则其余的商品都默认参与积分抵扣活动
-                        if (CollectionUtils.isEmpty(scoreDeductionAllowSkuList) && !CollectionUtils.isEmpty(scoreDeductionRejectSkuList)) {
-                            if (!scoreDeductionRejectSkuList.contains(sku)) {
-                                return true;
-                            }
+                        if (CollectionUtils.isEmpty(scoreDeductionAllowSkuList) &&
+                                !CollectionUtils.isEmpty(scoreDeductionRejectSkuList) &&
+                                !scoreDeductionRejectSkuList.contains(sku)) {
+                            return true;
+                        }
                         // 如果导入的商品都为参与,则默认其余商品不参与
-                        } else if (!CollectionUtils.isEmpty(scoreDeductionAllowSkuList) && CollectionUtils.isEmpty(scoreDeductionRejectSkuList)) {
-                            if (scoreDeductionAllowSkuList.contains(sku)) {
-                                return true;
-                            }
+                        if (!CollectionUtils.isEmpty(scoreDeductionAllowSkuList) &&
+                                CollectionUtils.isEmpty(scoreDeductionRejectSkuList) &&
+                                scoreDeductionAllowSkuList.contains(sku)) {
+                            return true;
                         }
                     }
-                    // 满赠商品不参与积分分摊计算
-                    return !Constants.ActivityTopicEnum.MZ.getTopicName().equals(goodsDetailsDto.getActivity());
+                    // 临时促销中有这个sku,说明不参与积分抵扣
+                    return false;
                 }).collect(Collectors.toList());
                 // 系统设置的最大抵扣比例(最多能抵扣订单金额的比例),在系统管理的系统参数中设置,KEY为 HAIKONG_MEMBER_MAX_SCORE_RATIO
                 String scoreRatioStr = sysConfigDao.queryByKey(Constants.HAIKONG_MEMBER_MAX_SCORE_RATIO);

+ 25 - 13
kmall-admin/src/main/resources/conf/cuspay/cuspay-wx.properties

@@ -5,28 +5,40 @@
 wx.payment.declare.url=https://api.mch.weixin.qq.com/cgi-bin/mch/customs/customdeclareorder
 wx.payment.query.url=https://api.mch.weixin.qq.com/cgi-bin/mch/customs/customdeclarequery
 
-# \u5546\u6237\u4FE1\u606F
+# \u6D77\u63A7\u5546\u6237\u4FE1\u606F   \u751F\u4EA7\u914D\u7F6E
 # \u5E73\u53F0\u7F16\u53F7
-merchant.plat-sn=44048600Y8
-# \u5E73\u53F0\u4E2D\u6587\u540D
-merchant.plat-name=\u73E0\u6D77\u6D77\u63A7\u79D1\u6280\u6709\u9650\u516C\u53F8
-# \u5546\u6237\u6D77\u5173\u5907\u6848\u7F16\u53F7
-merchant.customs-code=44048600Y8
-# \u5546\u6237\u6D77\u5173\u5907\u6848\u540D\u79F0
-merchant.customs-name=\u73E0\u6D77\u6D77\u63A7\u79D1\u6280\u6709\u9650\u516C\u53F8
+#merchant.plat-sn=44048600Y8
+## \u5E73\u53F0\u4E2D\u6587\u540D
+#merchant.plat-name=\u73E0\u6D77\u6D77\u63A7\u79D1\u6280\u6709\u9650\u516C\u53F8
+## \u5546\u6237\u6D77\u5173\u5907\u6848\u7F16\u53F7
+#merchant.customs-code=44048600Y8
+## \u5546\u6237\u6D77\u5173\u5907\u6848\u540D\u79F0
+#merchant.customs-name=\u73E0\u6D77\u6D77\u63A7\u79D1\u6280\u6709\u9650\u516C\u53F8
+## appid
+#cus.play.wx.app-id=wxd3e627dd62d6ff32
+## \u5FAE\u4FE1\u652F\u4ED8\u5546\u6237\u53F7
+#cus.play.wx.mch-id=1574349031
+## \u6D77\u5173\uFF0C\u5E7F\u5DDE\uFF08\u603B\u7F72\uFF09
+#cus.play.wx.customs=GUANGZHOU_ZS
 
 
 # \u5B9A\u65F6\u5668\u62A5\u5173\u4E00\u6B21\u533A\u7684\u6570\u636E
 db.wx.declare.limit=20
 db.wx.declare.count=2
 
-# ccnet\u9ED8\u8BA4\u914D\u7F6E\u6587\u4EF6\u7684\u503C
+
+
+# \u4E2D\u7F51\u751F\u4EA7
 # \u4E2D\u7F51\u5FAE\u4FE1\u516C\u4F17ID
-cus.play.wx.app-id=wxd3e627dd62d6ff32
+cus.play.wx.app-id=wxb6b30b1b14ee502a
 # \u5FAE\u4FE1\u652F\u4ED8\u5546\u6237\u53F7
-cus.play.wx.mch-id=1574349031
-# \u6D77\u5173\uFF0C\u5E7F\u5DDE\uFF08\u603B\u7F72\u7248\uFF09
-cus.play.wx.customs=GUANGZHOU_ZS
+cus.play.wx.mch-id=1501125641
+# \u6D77\u5173\uFF0C\u6DF1\u5733
+cus.play.wx.customs=SHENZHEN
+merchant.plat-sn=146001
+merchant.customs-code=4403160Z3Y
+merchant.plat-name=\u4E2D\u7F51\u5546\u57CE
+merchant.customs-name=\u4E2D\u7F51\u79D1\u6280\uFF08\u6DF1\u5733\uFF09\u6709\u9650\u516C\u53F8
 
 # ccnet dev\u914D\u7F6E\u6587\u4EF6\u7684\u503C
 #cus.play.wx.app-id=wx24013b34e349db3c

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

@@ -33,6 +33,44 @@
 #file.author=kmall-pt
 
 #
+##############\u6D4B\u8BD5\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\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
+
+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=120.76.26.84
+
+#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
@@ -41,67 +79,29 @@
 #network_timeout=60
 #
 ##\u6587\u4EF6\u8DEF\u5F84
-#base_path=/data/files/
+#base_path=/home/logs/fastdfs
 #
 ##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
+#tracker_server=172.18.246.243:22122
 #
 #log_level=info
 #
-#use_connection_pool = false
+#use_connection_pool=false
 #
-#connection_pool_max_idle_time = 3600
+#connection_pool_max_idle_time=3600
 #
 #load_fdfs_parameters_from_tracker=false
 #
-#use_storage_id = false
+#use_storage_id=false
 #
-#storage_ids_filename = storage_ids.conf
+#storage_ids_filename=storage_ids.conf
 #
 ##HTTP \u670D\u52A1\u5668\u5730\u5740
-#http.tracket_nginx_addr=120.76.26.84
+#http.tracket_nginx_addr=172.18.246.243
 #
 ##HTTP \u670D\u52A1\u5668\u7AEF\u53E3\u53F7
 #http.tracker_server_port=80
 #
 ##\u6587\u4EF6\u4F5C\u8005
-#file.author=kmall-pt
-
-
-
-
-##############\u9884\u53D1\u5E03\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=/home/logs/
-
-#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=14.29.226.8: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=14.29.226.8
-
-#HTTP \u670D\u52A1\u5668\u7AEF\u53E3\u53F7
-http.tracker_server_port=88
-
-#\u6587\u4EF6\u4F5C\u8005
-file.author=kmall-haikong
+#file.author=kmall-haikong

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

@@ -6,7 +6,8 @@ debug:当此属性设置为true时,将打印出logback内部日志信息,
 -->
 <configuration scan="false" scanPeriod="60 seconds" debug="false">
 
-    <property name="LOG_HOME" value="/data/project/logs/kmall-haikong/kmall-admin/"/>
+<!--    <property name="LOG_HOME" value="/data/project/logs/kmall-haikong/kmall-admin/"/>-->
+    <property name="LOG_HOME" value="/app/project/logs/kmall-haikong/kmall-admin/"/>
     <!-- 定义日志的根目录 -->
     <property name="TRACE_DIR" value="trace" />
     <property name="DEBUG_DIR" value="debug" />

+ 0 - 4
kmall-admin/src/main/resources/mybatis/mapper/haikong/HaikongSendOrderInfoRecordDao.xml

@@ -367,10 +367,6 @@
 			<foreach collection="list" item="item" open="case " close=" end,">
 				when id = #{item.id} then #{item.resendStatus}
 			</foreach>
-			member_sys_order_id =
-			<foreach collection="list" item="item" open="case " close=" end,">
-				when id = #{item.id} then #{item.memberSysOrderId}
-			</foreach>
 		</trim>
 		where id in
 		<foreach collection="list" item="item" open="(" separator="," close=")">

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

@@ -29,15 +29,9 @@
                 <a href="../statics/file/activities_score.xlsx">积分抵扣模板下载</a>
             </div>
             <div class="buttons-group">
-<!--                #if($shiro.hasPermission("mkactivitiesscore:save"))-->
                 <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
-<!--                #end-->
-<!--                #if($shiro.hasPermission("mkactivitiesscore:update"))-->
                 <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
-<!--                #end-->
-<!--                #if($shiro.hasPermission("mkactivitiesscore:delete"))-->
                 <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
-<!--                #end-->
                 <i-button type="warning" @click="reloadMkactivities" v-show="!isMkactivitiesShow">返回营销方式页</i-button>
             </div>
         </Row>

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

@@ -681,7 +681,7 @@ let vm = new Vue({
             vm.storeId = sessionStorage.getItem("storeId");
             var thisGoods = {};
             var overflowLi = this.$refs.overflowLi;
-            $.get("../goods/selectSkuDetails/"+vm.prodBarcode+"/"+vm.storeId, function (r) {
+            $.get("../goods/details/"+vm.prodBarcode+"/"+vm.storeId+"/"+vm.prodBarcode, function (r) {
                 if (r.code == 0) {
                     if(r.goodsDetails.length>1) {
                         r.goodsDetails.sellVolume = 1;
@@ -1452,11 +1452,11 @@ function openWebSocket() {
         //kmall测试环境
         // webSocket = new WebSocket("ws://183.62.225.124:3080/ws/server/"+storeId);
         // 预发布环境
-        webSocket = new WebSocket("ws://14.29.226.8:8080/ws/server/"+storeId);
+        // webSocket = new WebSocket("ws://14.29.226.8:8080/ws/server/"+storeId);
         //kmall正式环境
         // webSocket = new WebSocket("ws://8.135.102.238:8080/ws/server/"+storeId);
         //kmall本地环境
-        // webSocket = new WebSocket("ws://127.0.0.1:8089/ws/server/"+storeId);
+        webSocket = new WebSocket("ws://127.0.0.1:8089/ws/server/"+storeId);
         // webSocket = new WebSocket("wss://cb.k1net.cn/ws/server/"+storeId);
         if (webSocket.readyState === webSocket.CONNECTING) {
             console.log('1.连接正在打开......');

+ 6 - 7
kmall-manager/src/main/resources/conf/db.properties

@@ -1,6 +1,6 @@
 ########## \u6570\u636E\u5E93\u914D\u7F6E ##########
 # \u73AF\u5883\u914D\u7F6E\uFF1A[dev, prod, pre, test]
-jdbc.env=dev
+jdbc.env=test
 ####========== \u6D4B\u8BD5\u73AF\u5883 ==========
 jdbc.test.url=jdbc:mysql://14.29.226.8:3306/kmall-haikong?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
 jdbc.test.username=root
@@ -10,14 +10,13 @@ jdbc.dev.url=jdbc:mysql://192.168.1.202:3306/kmall-haikong?allowMultiQueries=tru
 jdbc.dev.username=root
 jdbc.dev.password=t2GlpD6z
 ####========== \u751F\u4EA7\u73AF\u5883 ==========
-# \u5F85\u5B9A
-jdbc.prod.url=jdbc:mysql://:3306/kmall-haikong?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
-jdbc.prod.username=kmall_cw
-jdbc.prod.password=eb6zHJg%x3
+jdbc.prod.url=jdbc:mysql://rm-wz942te7t69x262100o.mysql.rds.aliyuncs.com:3306/kmall-haikong?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
+jdbc.prod.username=zhdf
+jdbc.prod.password=Greereal@600185
 # \u9884\u53D1\u5E03\u5E93
-jdbc.pre.url=jdbc:mysql://120.76.84.45:3306/kmall-haikong?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
+jdbc.pre.url=jdbc:mysql://127.0.0.1:3306/kmall_haikong?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
 jdbc.pre.username=root
-jdbc.pre.password=Qq123!..
+jdbc.pre.password=G$Debpk^pn
 
 
 # \u901A\u7528\u914D\u7F6E

+ 1 - 1
kmall-manager/src/main/resources/conf/haikong.properties

@@ -31,7 +31,7 @@ haikong.test.vmcconnect.secretKey=GXfc6ZtDlnxHxmmAHvfRfqvrqgfwRiJX
 haikong.test.vmcconnect.requestRetry=2
 
 #### \u514D\u7A0Emall\u751F\u4EA7\u73AF\u5883
-haikong.prod.vmcconnect.url=https://mall.greedc.com/openapi/vmcconnect/json
+haikong.prod.vmcconnect.url=https://testmall.greedc.com/openapi/vmcconnect/json
 haikong.prod.vmcconnect.appId=5
 haikong.prod.vmcconnect.secretKey=GXfc6ZtDlnxHxmmAHvfRfqvrqgfwRiJX
 haikong.prod.vmcconnect.requestRetry=2

+ 8 - 6
kmall-manager/src/main/resources/conf/redis.properties

@@ -1,17 +1,19 @@
 ########## redis \u914D\u7F6E ##########1
 
-# [dev, prod]
+# [dev, test, prod]
 redis.env=dev
 
 # \u5F00\u53D1\u73AF\u5883
 redis.dev.keyPrefix=platform
 # \u6D4B\u8BD5redis\uFF0C\u6709\u5BC6\u7801
-#redis.dev.host=183.62.225.124
+redis.dev.host=183.62.225.124
 # \u9884\u53D1\u5E03\u73AF\u5883
-redis.dev.host=14.29.226.8
+#redis.dev.host=14.29.226.8
 #redis.dev.host=127.0.0.1
 redis.dev.port=6379
-redis.dev.password=fdsjk337sdb
+#redis.dev.password=fdsjk337sdb
+# \u6D4B\u8BD5\u73AF\u5883\u5BC6\u7801
+redis.dev.password=Abc-123#*.-
 redis.dev.pool.maxIdle=200
 redis.dev.pool.maxWait=1000
 redis.dev.pool.maxTotal=10000
@@ -29,9 +31,9 @@ redis.dev.pool.testOnBorrow=true
 
 # \u751F\u4EA7\u73AF\u5883
 redis.prod.keyPrefix=platform
-redis.prod.host=120.78.152.8
+redis.prod.host=127.0.0.1
 redis.prod.port=6379
-redis.prod.password=Abc-123#*.-
+redis.prod.password=e415MBsvV7
 redis.prod.pool.maxIdle=200
 redis.prod.pool.maxWait=1000
 redis.prod.pool.maxTotal=10000

+ 8 - 8
kmall-manager/src/main/resources/conf/wx-mp.properties

@@ -1,10 +1,10 @@
-########## \u5FAE\u4FE1\u5C0F\u7A0B\u5E8F\u914D\u7F6E ##########
+########## \u5FAE\u4FE1\u5C0F\u7A0B\u5E8F\u652F\u4ED8\u914D\u7F6E ##########
 
 # [dev, prod]
 pay.wx.env=dev
 
 
-#========== \u5F00\u53D1\u73AF\u5883 ==========
+#========== \u5F00\u53D1\u73AF\u5883 \u4E2D\u7F51\u7684\u914D\u7F6E ==========
 #\u5C0F\u7A0B\u5E8FID
 wx.dev.appId=wxb6b30b1b14ee502a
 #\u5C0F\u7A0B\u5E8F\u5BC6\u94A5
@@ -48,20 +48,20 @@ wx.dev.templateSendUrl=https://api.weixin.qq.com/cgi-bin/message/subscribe/send?
 
 
 
-#========== \u751F\u4EA7\u73AF\u5883 ==========
+#========== \u751F\u4EA7\u73AF\u5883 \u6D77\u63A7\u7684\u914D\u7F6E ==========
 
 #\u5C0F\u7A0B\u5E8FID
-wx.prod.appId=wxb6b30b1b14ee502a
+wx.prod.appId=wxd3e627dd62d6ff32
 #\u5C0F\u7A0B\u5E8F\u5BC6\u94A5
-wx.prod.secret=be0234dbbbde4ce68df43dd2b5e4c7b1
+wx.prod.secret=hkkjkjweixinzhifupassword2020017
 #\u5546\u6237\u53F7
-wx.prod.mchId=1501125641
+wx.prod.mchId=1574349031
 #\u652F\u4ED8\u7B7E\u540D
-wx.prod.paySignKey=Zx1245uytDLliom12345622222222222
+wx.prod.paySignKey=Zx1245uytDLliom123456248798416846
 #\u4EA4\u6613\u7C7B\u578B
 wx.prod.tradeType=JSAPI
 #\u8BC1\u4E66\u540D\u79F0\uFF0C\u5BF9\u5E94\u4E0D\u540C\u7684\u5546\u6237\u53F7
-wx.prod.certName=/app/project/kmall_pt/cert/apiclient_cert.p12
+wx.prod.certName=/app/project/kmall_haikong/cert/apiclient_cert.p12
 #\u652F\u4ED8\u56DE\u8C03\u5730\u5740
 wx.prod.notifyUrl=https://mp.k1net.cn/api/pay/notify
 #\u83B7\u53D6code\u7684\u8BF7\u6C42\u5730\u5740