‘linchangsheng’ 1 هفته پیش
والد
کامیت
dbf3c986c0
19فایلهای تغییر یافته به همراه58 افزوده شده و 63 حذف شده
  1. 1 1
      src/main/java/com/gree/mall/miniapp/controller/goods/GoodsController.java
  2. 1 1
      src/main/java/com/gree/mall/miniapp/logic/acitivy/PromotionLuckDrawLogic.java
  3. 1 1
      src/main/java/com/gree/mall/miniapp/logic/common/FucaiLogic.java
  4. 2 2
      src/main/java/com/gree/mall/miniapp/logic/common/GongdanLogic.java
  5. 6 6
      src/main/java/com/gree/mall/miniapp/logic/coupon/CouponLogic.java
  6. 0 1
      src/main/java/com/gree/mall/miniapp/logic/goods/CategoryLogic.java
  7. 1 1
      src/main/java/com/gree/mall/miniapp/logic/goods/GoodsFavoriteLogic.java
  8. 4 4
      src/main/java/com/gree/mall/miniapp/logic/goods/GoodsLogic.java
  9. 4 4
      src/main/java/com/gree/mall/miniapp/logic/order/OrderCommentLogic.java
  10. 9 13
      src/main/java/com/gree/mall/miniapp/logic/order/OrderLogic.java
  11. 1 1
      src/main/java/com/gree/mall/miniapp/logic/order/OrderTaxLogic.java
  12. 3 3
      src/main/java/com/gree/mall/miniapp/logic/order/ShoppingCartLogic.java
  13. 2 2
      src/main/java/com/gree/mall/miniapp/logic/renovation/RenovationLogic.java
  14. 1 1
      src/main/java/com/gree/mall/miniapp/logic/seckill/SecKillLogic.java
  15. 3 3
      src/main/java/com/gree/mall/miniapp/logic/user/AddressLogic.java
  16. 1 1
      src/main/java/com/gree/mall/miniapp/logic/user/ExchangeCodeLogic.java
  17. 2 2
      src/main/java/com/gree/mall/miniapp/logic/user/PayLogic.java
  18. 13 13
      src/main/java/com/gree/mall/miniapp/logic/user/UserLogic.java
  19. 3 3
      src/main/java/com/gree/mall/miniapp/logic/user/WorkerLogic.java

+ 1 - 1
src/main/java/com/gree/mall/miniapp/controller/goods/GoodsController.java

@@ -142,7 +142,7 @@ public class GoodsController {
             HttpServletRequest request
     ) throws IOException, RemoteServiceException {
         UserWxBean userWxBean = userLogic.userDetail(userId,request,null,null);
-        String qrcode = wechatLogic.getQrcode(QrCodeEnum.GOODS.toString().toLowerCase(),goodsId,userId,userWxBean.getCompanyWechatId());
+        String qrcode = wechatLogic.getQrcode(QrCodeEnum.GOODS.toString().toLowerCase(),goodsId,userId,userWxBean.getCompanyId());
         return ResponseHelper.success(qrcode);
     }
 

+ 1 - 1
src/main/java/com/gree/mall/miniapp/logic/acitivy/PromotionLuckDrawLogic.java

@@ -97,7 +97,7 @@ public class PromotionLuckDrawLogic {
         userCoupon.setReceivePlatform("抽奖活动兑换");
         userCoupon.setTransferType(false);
         userCoupon.setLeftShareTimes(0);
-        userCoupon.setCompanyWechatId(currentCompanyWechat.getCompanyWechatId());
+        userCoupon.setCompanyId(currentCompanyWechat.getCompanyWechatId());
         userCoupon.setCompanyName(currentCompanyWechat.getCompanyName());
         userCoupon.insert();
 

+ 1 - 1
src/main/java/com/gree/mall/miniapp/logic/common/FucaiLogic.java

@@ -61,7 +61,7 @@ public class FucaiLogic {
      */
    /* public Boolean sendSaleOrder(List<OrderDetail> orderDetailList, OrderInfo orderInfo, String websitNumber){
         try {
-            AdminCompanyWechat adminCompanyWechat = commonLogic.getAdminCompanyWechat(orderInfo.getCompanyWechatId());
+            AdminCompanyWechat adminCompanyWechat = commonLogic.getAdminCompanyWechat(orderInfo.getCompanyId());
             if (org.apache.commons.lang3.StringUtils.isBlank(adminCompanyWechat.getJindCustomerNumber())) {
                 // 金蝶客户编号为空不执行
                 return true;

+ 2 - 2
src/main/java/com/gree/mall/miniapp/logic/common/GongdanLogic.java

@@ -128,7 +128,7 @@ public class GongdanLogic {
             map.put("request_no", IdWorker.getIdStr());
             map.put("dispatch_type",orderInfo.getDispatchType());
             String remark = "";
-            if(StringUtils.isNotEmpty(orderInfo.getWorkerPhone()) && orderInfo.getCompanyWechatId().equals(Constant.GD_COMPANY_WECHAT_ID)){
+            if(StringUtils.isNotEmpty(orderInfo.getWorkerPhone()) && orderInfo.getCompanyId().equals(Constant.GD_COMPANY_WECHAT_ID)){
                 remark += "师傅名称:"+orderInfo.getWorkerName() + "(" + orderInfo.getWorkerPhone() + ")";
             }
             if(StringUtils.isNotEmpty(orderInfo.getBuyerMsg())){
@@ -167,7 +167,7 @@ public class GongdanLogic {
                 return null;
             }
             map.put("product_list", productList);
-            if(orderInfo.getCompanyWechatId().equals("1")) {
+            if(orderInfo.getCompanyId().equals("1")) {
                 map.put("order_source", 7);//3=分销商城
             }else{
                 map.put("order_source",8);

+ 6 - 6
src/main/java/com/gree/mall/miniapp/logic/coupon/CouponLogic.java

@@ -194,7 +194,7 @@ public class CouponLogic {
 //            if (StringUtils.isNotEmpty(serviceId)) {
 //                User service = userService.getById(serviceId);
 //                if (service != null && service.getCustomerServiceFlag()) {
-//                    distributeCoupon(obtainUserId, serviceId , obtainUser.getCompanyWechatId() ,obtainUser.getCompanyName());
+//                    distributeCoupon(obtainUserId, serviceId , obtainUser.getCompanyId() ,obtainUser.getCompanyName());
 //                }
 //            }
 //            return;
@@ -255,7 +255,7 @@ public class CouponLogic {
                     userCoupon.setActiveEndTime(DateUtils.getStartTimeByDay(coupon.getActiveDay() + 1));
                 }
                 userCoupon.setState(now.before(coupon.getActiveEndTime()) && now.after(coupon.getActiveStartTime()));
-                userCoupon.setCompanyWechatId(user.getCompanyWechatId());
+                userCoupon.setCompanyId(user.getCompanyId());
                 userCoupon.setCompanyName(user.getCompanyName());
                 list.add(userCoupon);
             }
@@ -293,7 +293,7 @@ public class CouponLogic {
         }
         String qrcode = userCoupon.getTransferQrcode();
         if (StringUtils.isEmpty(qrcode)) {
-            qrcode = wechatLogic.getQrcode(QrCodeEnum.COUPON.toString().toLowerCase(Locale.ROOT), userCoupon.getId(), userCoupon.getUserId(),userCoupon.getCompanyWechatId());
+            qrcode = wechatLogic.getQrcode(QrCodeEnum.COUPON.toString().toLowerCase(Locale.ROOT), userCoupon.getId(), userCoupon.getUserId(),userCoupon.getCompanyId());
             if (StringUtils.isNotEmpty(qrcode)) {
                 userCoupon.setTransferQrcode(qrcode);
                 userCouponService.updateById(userCoupon);
@@ -353,7 +353,7 @@ public class CouponLogic {
                 throw new RemoteServiceException("优惠已被用户使用");
             }
 
-            transferCouponId = transfer(user.getUserId(), userCouponId , user.getCompanyWechatId(), user.getCompanyName());
+            transferCouponId = transfer(user.getUserId(), userCouponId , user.getCompanyId(), user.getCompanyName());
         } catch (InterruptedException e) {
             log.error("", e);
             throw new RemoteServiceException("系统繁忙,请稍后再试");
@@ -384,7 +384,7 @@ public class CouponLogic {
             transferUserCoupon.setTransferor(userCoupon.getId());
             transferUserCoupon.setLeftShareTimes(0);
             transferUserCoupon.setUserId(userId);
-            transferUserCoupon.setCompanyWechatId(companyWechatId);
+            transferUserCoupon.setCompanyId(companyWechatId);
             transferUserCoupon.setCompanyName(companyName);
             userCouponService.save(transferUserCoupon);
             transferCouponId = transferUserCoupon.getId();
@@ -426,7 +426,7 @@ public class CouponLogic {
 //        transferUserCoupon.setTransferor(userCoupon.getId());
 //        transferUserCoupon.setLeftShareTimes(0);
 //        transferUserCoupon.setUserId(userId);
-//        transferUserCoupon.setCompanyWechatId(companyWechatId);
+//        transferUserCoupon.setCompanyId(companyWechatId);
 //        transferUserCoupon.setCompanyName(companyName);
 //        userCouponService.save(transferUserCoupon);
 //    }

+ 0 - 1
src/main/java/com/gree/mall/miniapp/logic/goods/CategoryLogic.java

@@ -131,7 +131,6 @@ public class CategoryLogic {
         CurrentCompanyWechat currentCompanyWechat = commonLogic.getCurrentCompanyWechat(request);
 
         List<GoodsCategory> goodsCategories = goodsCategoryService.lambdaQuery()
-                .eq(GoodsCategory::getCompanyWechatId , currentCompanyWechat.getCurrentCompanyWechatId())
                 .eq(GoodsCategory::getParentId, categoryId)
                 .list();
         List<String> categoryIds = goodsCategories.stream().map(GoodsCategory::getCategoryId).collect(Collectors.toList());

+ 1 - 1
src/main/java/com/gree/mall/miniapp/logic/goods/GoodsFavoriteLogic.java

@@ -46,7 +46,7 @@ public class GoodsFavoriteLogic {
         goodsFavorite.setUserId(userId);
         goodsFavorite.setGoodsSpecId(goodsSpecId);
         goodsFavorite.setCreateTime(new Date());
-        goodsFavorite.setCompanyWechatId(companyWechat.getCurrentCompanyWechatId());
+        goodsFavorite.setCompanyId(companyWechat.getCurrentCompanyWechatId());
         goodsFavorite.setCompanyName(companyWechat.getCurrentCompanyName());
         goodsFavoriteService.save(goodsFavorite);
         return goodsFavorite;

+ 4 - 4
src/main/java/com/gree/mall/miniapp/logic/goods/GoodsLogic.java

@@ -154,7 +154,7 @@ public class GoodsLogic {
         goodsVisit.setPromotionGroupId(goodsBean.getPromotionGroupId());
         goodsVisit.setGoodsPrice(goodsBean.getGoodsPrice());
         goodsVisit.setShareUserId(goodsBean.getGroupUserId());
-        goodsVisit.setCompanyWechatId(currentCompanyWechat.getCurrentCompanyWechatId());
+        goodsVisit.setCompanyId(currentCompanyWechat.getCurrentCompanyWechatId());
         goodsVisit.setCompanyName(currentCompanyWechat.getCurrentCompanyName());
         goodsVisit.setCreateTime(new Date());
         goodsVisit.insert();
@@ -276,7 +276,7 @@ public class GoodsLogic {
         goodsBean.setFavorite(goodsFavoritesCount > 0);
         goodsBean.setStock(goodsStock);
         goodsBean.setCommonTemplate(goodsSpecDetailMapper.queryCommonTemplate(goodsId));
-        goodsBean.setPubCommonTemplate(pubTemplateService.getById(goods.getCompanyWechatId()));
+        goodsBean.setPubCommonTemplate(pubTemplateService.getById(goods.getFreightTemplateId()));
 
         return goodsBean;
     }
@@ -397,14 +397,14 @@ public class GoodsLogic {
                 .le(PromotionGroup::getStartTime, new Date())
                 .ge(PromotionGroup::getEndTime, new Date())
                 .eq(PromotionGroup::getStatus, true)
-                .eq(PromotionGroup::getCompanyWechatId,user.getCompanyWechatId())
+                .eq(PromotionGroup::getCompanyId,user.getCompanyId())
                 .orderByDesc(PromotionGroup::getCreateTime)
                 .list();
         if(list.size() == 0){
             return null;
         }
         PromotionGroup promotionGroup = list.get(0);
-        String qrcode = wechatLogic.getQrcode(QrCodeEnum.PROMOTION_GROUP.toString().toLowerCase(),promotionGroup.getPromotionGroupId(),userId,user.getCompanyWechatId());
+        String qrcode = wechatLogic.getQrcode(QrCodeEnum.PROMOTION_GROUP.toString().toLowerCase(),promotionGroup.getPromotionGroupId(),userId,user.getCompanyId());
         PromotionShareQrCode promotionShareQrCode = new PromotionShareQrCode();
         promotionShareQrCode.setPromotionImgUrl(qrcode);
         promotionShareQrCode.setQrcode(qrcode);

+ 4 - 4
src/main/java/com/gree/mall/miniapp/logic/order/OrderCommentLogic.java

@@ -51,7 +51,7 @@ public class OrderCommentLogic {
         CurrentCompanyWechat currentCompanyWechat = commonLogic.getCurrentCompanyWechat(request);
         String companyWechatId = currentCompanyWechat.getCurrentCompanyWechatId();
 
-        List<CommentTag> list = commentTagService.lambdaQuery().eq(CommentTag::getCompanyWechatId,companyWechatId).list();
+        List<CommentTag> list = commentTagService.lambdaQuery().eq(CommentTag::getCompanyId,companyWechatId).list();
         return list;
     }
 
@@ -85,7 +85,7 @@ public class OrderCommentLogic {
             //标签
             List<OrderCommentTag> tagList = orderCommentTagService.lambdaQuery()
                     .eq(OrderCommentTag::getOrderId, goodsComment.getOrderId())
-                    .eq(OrderCommentTag::getCompanyWechatId, currentCompanyWechat.getCurrentCompanyWechatId())
+                    .eq(OrderCommentTag::getCompanyId, currentCompanyWechat.getCurrentCompanyWechatId())
                     .list();
             if(tagList.size() > 0) {
                 goodsComment.setTags(tagList.stream().map(OrderCommentTag::getTag).collect(Collectors.toList()));
@@ -110,7 +110,7 @@ public class OrderCommentLogic {
             orderCommentBean.setIsShow(true);
         }
         orderCommentBean.setCreateTime(new Date());
-        orderCommentBean.setCompanyWechatId(currentCompanyWechat.getCurrentCompanyWechatId());
+        orderCommentBean.setCompanyId(currentCompanyWechat.getCurrentCompanyWechatId());
         orderCommentBean.setCompanyName(currentCompanyWechat.getCurrentCompanyName());
         orderCommentService.save(orderCommentBean);
         //保存标签
@@ -120,7 +120,7 @@ public class OrderCommentLogic {
             orderCommentTag.setOrderCommentId(orderCommentBean.getOrderCommentId());
             orderCommentTag.setOrderId(orderCommentBean.getOrderId());
             orderCommentTag.setTag(tag);
-            orderCommentTag.setCompanyWechatId(currentCompanyWechat.getCurrentCompanyWechatId());
+            orderCommentTag.setCompanyId(currentCompanyWechat.getCurrentCompanyWechatId());
             orderCommentTag.setCompanyName(currentCompanyWechat.getCurrentCompanyName());
             orderCommentTag.insert();
         }

+ 9 - 13
src/main/java/com/gree/mall/miniapp/logic/order/OrderLogic.java

@@ -338,15 +338,11 @@ public class OrderLogic {
             if (StringUtils.isNotEmpty(catagoryId)) {
                 GoodsCategory goodsCategory = goodsCategoryLogic.queryById(catagoryId);
                 if (goodsCategory != null) {
-                    orderDetail.setMainNumber(goodsCategory.getMainNumber());
-                    orderDetail.setMainName(goodsCategory.getMainName());
-                    orderDetail.setSmallNumber(goodsCategory.getSmallNumber());
-                    orderDetail.setSmallName(goodsCategory.getSmallName());
+
                     orderDetail.setGoodsCategoryId(goodsCategory.getCategoryId());
                     orderDetail.setGoodsCategoryName(goodsCategory.getName());
                 }
 
-                orderDetail.setWorkOrderType(goodsCategory.getWorkOrderType());
             }
             orderDetail.setPrice(goodsSecPrice);
             orderDetail.setNeedPayAmount(goodsSecPrice);
@@ -443,7 +439,7 @@ public class OrderLogic {
         orderInfo.setWebsitId(user.getWebsitId());
         orderInfo.setWebsitName(user.getWebsitName());
         orderInfo.setWebsitNumber(user.getWebsitId());
-        orderInfo.setCompanyWechatId(user.getCompanyWechatId());
+        orderInfo.setCompanyId(user.getCompanyId());
         orderInfo.setCompanyWechatName(user.getCompanyName());
         //检查优惠券的使用合法性
 
@@ -503,7 +499,7 @@ public class OrderLogic {
             payDetail.setIsPay(false);
             payDetail.setId(orderInfo.getOrderId());
             payDetail.setCodeUrl(wechatLogic.getQrcode(QrCodeEnum.ORDER.toString().toLowerCase(Locale.ROOT),
-                    orderInfo.getOrderId(), orderInfo.getUserId(), user.getCompanyWechatId()));
+                    orderInfo.getOrderId(), orderInfo.getUserId(), user.getCompanyId()));
             return payDetail;
         }
         //调起支付
@@ -519,7 +515,7 @@ public class OrderLogic {
         if (!orderBuyBean.getWechatPay() && (Objects.isNull(orderBuyBean.getApplyAmount()) || orderBuyBean.getApplyAmount().compareTo(BigDecimal.ZERO) <= 0)) {
             log.info("订单明细 {}, {}", JSONUtil.toJsonStr(orderDetails), isExistCode);
             OrderDetail orderDetail = isExistCode ? orderDetails.get(0) : null;
-            payDetail = umsLogic.payment(orderInfo, orderInfo.getPayAmount(), user.getOpenId(), user.getCompanyWechatId(), orderDetail, ip);
+            payDetail = umsLogic.payment(orderInfo, orderInfo.getPayAmount(), user.getOpenId(), user.getCompanyId(), orderDetail, ip);
         } else {
             payDetail = wechatLogic.payment(orderInfo.getOrderId(), orderInfo.getPayAmount(), user.getOpenId(),
                     profitSharingFlag, ip, currentCompanyWechat.getAdminWebsit().getPayWorkerCodeId());
@@ -649,7 +645,7 @@ public class OrderLogic {
         }
         if (payType.equals("微信支付")) {
             return wechatLogic.payment(newOrderId, orderInfo.getPayAmount(), user.getOpenId(),
-                    profitSharingFlag, ip, user.getCompanyWechatId());
+                    profitSharingFlag, ip, user.getCompanyId());
         } else {
             final List<OrderDetail> orderDetailList = orderDetailService.lambdaQuery()
                     .eq(OrderDetail::getOrderId, newOrderId)
@@ -659,7 +655,7 @@ public class OrderLogic {
             orderInfo.setOrderId(newOrderId);
             orderInfo.setBuyerName(buyerName);
             orderInfo.setBuyerIdCard(buyerIdCard);
-            return umsLogic.payment(orderInfo, orderInfo.getPayAmount(), user.getOpenId(), user.getCompanyWechatId(), orderDetail, ip);
+            return umsLogic.payment(orderInfo, orderInfo.getPayAmount(), user.getOpenId(), user.getCompanyId(), orderDetail, ip);
         }
     }
 
@@ -893,7 +889,7 @@ public class OrderLogic {
                     .set(OrderShare::getOrderFinishTime, new Date())
                     .update();
 
-            final AdminCompanyWechat companyWechat = adminCompanyWechatService.getById(orderInfo.getCompanyWechatId());
+            final AdminCompanyWechat companyWechat = adminCompanyWechatService.getById(orderInfo.getCompanyId());
 
         } finally {
             obtain.unlock();
@@ -1755,7 +1751,7 @@ public class OrderLogic {
             giftExchangeCode.setUseNickName(user.getNickName());
             giftExchangeCode.setUseTime(new Date());
             giftExchangeCode.setUseAvatar(user.getAvatar());
-            giftExchangeCode.setCompanyWechatId(user.getCompanyWechatId());
+            giftExchangeCode.setCompanyId(user.getCompanyId());
             giftExchangeCode.setCompanyName(user.getCompanyName());
 
             giftExchangeCode.setStatus(1);
@@ -1798,7 +1794,7 @@ public class OrderLogic {
             giftExchangeCode.setUseAvatar(user.getAvatar());
 
             giftExchangeCode.setOrderId(orderId);
-            giftExchangeCode.setCompanyWechatId(user.getCompanyWechatId());
+            giftExchangeCode.setCompanyId(user.getCompanyId());
             giftExchangeCode.setCompanyName(user.getCompanyName());
             giftExchangeCode.setStatus(1);
             giftExchangeCode.updateById();

+ 1 - 1
src/main/java/com/gree/mall/miniapp/logic/order/OrderTaxLogic.java

@@ -74,7 +74,7 @@ public class OrderTaxLogic {
         }
         String orderId = orderTaxBean.getOrderId();
         OrderDetailBean detail = orderLogic.detail(orderId);
-        orderTaxBean.setCompanyWechatId(detail.getCompanyWechatId());
+        orderTaxBean.setCompanyWechatId(detail.getCompanyId());
         orderTaxBean.setCompanyWechatName(detail.getCompanyWechatName());
         orderTaxBean.setWebsitId(detail.getWebsitId());
         orderTaxBean.setWebsitName(detail.getWebsitName());

+ 3 - 3
src/main/java/com/gree/mall/miniapp/logic/order/ShoppingCartLogic.java

@@ -144,7 +144,7 @@ public class ShoppingCartLogic {
             if(user.getType().equals(UserTypeEnum.GENERAL.toString())) {
                 shoppingCart.setWxSceneId(buyGood.getWxSceneId());
             }
-            shoppingCart.setCompanyWechatId(currentCompanyWechat.getCurrentCompanyWechatId());
+            shoppingCart.setCompanyId(currentCompanyWechat.getCurrentCompanyWechatId());
             shoppingCart.setCompanyName(currentCompanyWechat.getCurrentCompanyName());
             shoppingCarts.add(shoppingCart);
         }
@@ -193,7 +193,7 @@ public class ShoppingCartLogic {
             if(user.getType().equals(UserTypeEnum.GENERAL.toString())) {
                 bean.setWxSceneId(buyGood.getWxSceneId());
             }
-            bean.setCompanyWechatId(currentCompanyWechat.getCurrentCompanyWechatId());
+            bean.setCompanyId(currentCompanyWechat.getCurrentCompanyWechatId());
             bean.setCompanyName(currentCompanyWechat.getCurrentCompanyName());
             bean.insert();
         }else{
@@ -241,7 +241,7 @@ public class ShoppingCartLogic {
 
         List<MiniNotice> list = miniNoticeService.lambdaQuery()
                 .eq(MiniNotice::getStatus, true)
-                .eq(MiniNotice::getCompanyWechatId , currentCompanyWechat.getCurrentCompanyWechatId())
+                .eq(MiniNotice::getCompanyId , currentCompanyWechat.getCurrentCompanyWechatId())
                 .list();
         if(list.size() > 0){
             return list.get(0).getNoticeContent();

+ 2 - 2
src/main/java/com/gree/mall/miniapp/logic/renovation/RenovationLogic.java

@@ -57,7 +57,7 @@ public class RenovationLogic {
 
         AdminCompanyWechatTemplate adminCompanyWechatTemplate = adminCompanyWechatTemplateService.lambdaQuery()
                 .eq(AdminCompanyWechatTemplate::getTemplateType,1)
-                .eq(AdminCompanyWechatTemplate::getCompanyWechatId, currentCompanyWechat.getCompanyWechatId()).one();
+                .eq(AdminCompanyWechatTemplate::getCompanyId, currentCompanyWechat.getCompanyWechatId()).one();
         return adminCompanyWechatTemplate;
     }
 
@@ -68,7 +68,7 @@ public class RenovationLogic {
         CurrentCompanyWechat currentCompanyWechat = commonLogic.getCurrentCompanyWechat(request);
         IPage<GoodsNewsCategory> page = goodsNewsCategoryService.lambdaQuery()
                 .eq(GoodsNewsCategory::getStatus, 1)
-                .eq(GoodsNewsCategory::getCompanyWechatId, currentCompanyWechat.getCompanyWechatId())
+                .eq(GoodsNewsCategory::getCompanyId, currentCompanyWechat.getCompanyWechatId())
                 .orderByAsc(GoodsNewsCategory::getSortNum)
                 .page(new Page<>(pageNo, pageSize));
         return page;

+ 1 - 1
src/main/java/com/gree/mall/miniapp/logic/seckill/SecKillLogic.java

@@ -112,7 +112,7 @@ public class SecKillLogic {
 //            secKillToken.setSecKillId(secKillId);
 //            secKillToken.setSecStageId(secKillStage.getSecKillStageId());
 //            secKillToken.setCreateTime(new Date());
-//            secKillToken.setCompanyWechatId(secKillStage.getCompanyWechatId());
+//            secKillToken.setCompanyId(secKillStage.getCompanyId());
 //            secKillToken.setCompanyName(secKillStage.getCompanyName());
 //            secKillTokenService.save(secKillToken);
 //        } else {

+ 3 - 3
src/main/java/com/gree/mall/miniapp/logic/user/AddressLogic.java

@@ -50,7 +50,7 @@ public class AddressLogic {
         Integer count = freightTemplateDetailService.lambdaQuery()
                 .eq(StringUtils.isNotBlank(userAddressBean.getProvince()), FreightTemplateDetail::getProvince, userAddressBean.getProvince())
                 .eq(StringUtils.isNotBlank(userAddressBean.getCity()), FreightTemplateDetail::getCity, userAddressBean.getCity())
-                .eq(FreightTemplateDetail::getCompanyWechatId , currentCompanyWechat.getCurrentCompanyWechatId())
+                .eq(FreightTemplateDetail::getCompanyId , currentCompanyWechat.getCurrentCompanyWechatId())
                 .count();
         userAddress.setStatus(count > 0);
         userAddress.setCreateTime(new Date());
@@ -64,7 +64,7 @@ public class AddressLogic {
         userAddress.setLng(locationByAddress.split(",")[0]);
         userAddress.setLat(locationByAddress.split(",")[1]);
 
-        userAddress.setCompanyWechatId(currentCompanyWechat.getCurrentCompanyWechatId());
+        userAddress.setCompanyId(currentCompanyWechat.getCurrentCompanyWechatId());
         userAddress.setCompanyName(currentCompanyWechat.getCurrentCompanyName());
         userAddressService.save(userAddress);
         return userAddress;
@@ -77,7 +77,7 @@ public class AddressLogic {
         Integer count = freightTemplateDetailService.lambdaQuery()
                 .eq(StringUtils.isNotBlank(userAddressBean.getProvince()), FreightTemplateDetail::getProvince, userAddressBean.getProvince())
                 .eq(StringUtils.isNotBlank(userAddressBean.getCity()), FreightTemplateDetail::getCity, userAddressBean.getCity())
-                .eq(FreightTemplateDetail::getCompanyWechatId , currentCompanyWechat.getCurrentCompanyWechatId())
+                .eq(FreightTemplateDetail::getCompanyId , currentCompanyWechat.getCurrentCompanyWechatId())
                 .count();
         boolean status = count > 0;
         if (userAddressBean.getDefaultAddr() != null && userAddressBean.getDefaultAddr()) {

+ 1 - 1
src/main/java/com/gree/mall/miniapp/logic/user/ExchangeCodeLogic.java

@@ -95,7 +95,7 @@ public class ExchangeCodeLogic {
             giftExchangeCode.setBindTime(new Date());
             giftExchangeCode.setStartTime(new Date());
             giftExchangeCode.setEndTime(endTime);
-            giftExchangeCode.setCompanyWechatId(currentCompanyWechat.getCompanyWechatId());
+            giftExchangeCode.setCompanyId(currentCompanyWechat.getCompanyWechatId());
             giftExchangeCode.setCompanyName(currentCompanyWechat.getCompanyName());
             if (serviceWorkerBean != null) {
                 giftExchangeCode.setAdminWebsitId(serviceWorkerBean.getAdminWebsitId());

+ 2 - 2
src/main/java/com/gree/mall/miniapp/logic/user/PayLogic.java

@@ -280,7 +280,7 @@ public class PayLogic {
                 }
                 List<User> workUserList = userService.lambdaQuery()
                         .eq(User::getWorkUserId, workUserId)
-                        .eq(User::getCompanyWechatId,orderInfo.getCompanyWechatId())
+                        .eq(User::getCompanyId,orderInfo.getCompanyId())
                         .list();
                 if(workUserList.size() == 0){
                     log.info("【结算团购】未找到分销员,分销员id:{}",workUserId);
@@ -334,7 +334,7 @@ public class PayLogic {
             orderShare.setRemark(remark);
 
             orderShare.setCreateTime(new Date());
-            orderShare.setCompanyWechatId(orderInfo.getCompanyWechatId());
+            orderShare.setCompanyWechatId(orderInfo.getCompanyId());
             orderShare.setCompanyWechatName(orderInfo.getCompanyWechatName());
             orderShare.insert();
 

+ 13 - 13
src/main/java/com/gree/mall/miniapp/logic/user/UserLogic.java

@@ -133,7 +133,7 @@ public class UserLogic {
                 user.setServiceTime(new Date());
                 user.setLastLoginTime(new Date());
                 user.setCreateTime(new Date());
-                user.setCompanyWechatId(currentCompanyWechat.getCompanyWechatId());
+                user.setCompanyId(currentCompanyWechat.getCurrentCompanyWechatId());
                 user.setCompanyName(currentCompanyWechat.getCompanyName());
                 userService.save(user);
                 log.info("【注册成为会员】:{}", user);
@@ -172,7 +172,7 @@ public class UserLogic {
 //                    .list();
             UserServiceWait waitUser = userServiceWaitService.lambdaQuery()
                     .eq(UserServiceWait::getMobile, user.getMobile())
-                    .eq(UserServiceWait::getCompanyWechatId, user.getCompanyWechatId())
+                    .eq(UserServiceWait::getCompanyId, user.getCompanyId())
                     .one();
 
             if (Objects.nonNull(waitUser)) {
@@ -180,7 +180,7 @@ public class UserLogic {
                 Integer count = userService.lambdaQuery()
                         .eq(User::getMobile, user.getMobile())
                         .eq(User::getType, UserTypeEnum.SERVICE.toString())
-                        .eq(User::getCompanyWechatId, user.getCompanyWechatId())
+                        .eq(User::getCompanyId, user.getCompanyId())
                         .count();
                 if (count < 1) {
                     user.setType(UserTypeEnum.SERVICE.toString());
@@ -191,7 +191,7 @@ public class UserLogic {
 //                    user.setWorkQrcode(list.get(0).getQrCode());
                     user.setWebsitId(waitUser.getWebsitId());
                     user.setWebsitName(waitUser.getWebsitName());
-                    user.setCompanyWechatId(currentCompanyWechat.getCompanyWechatId());
+                    user.setCompanyId(currentCompanyWechat.getCurrentCompanyWechatId());
                     user.setCompanyName(currentCompanyWechat.getCompanyName());
 
                     waitUser.setUserId(user.getUserId())
@@ -233,7 +233,7 @@ public class UserLogic {
             user.setServiceTime(new Date());
             user.setWebsitId(service.getWebsitId());
             user.setWebsitName(service.getWebsitName());
-            user.setCompanyWechatId(service.getCompanyWechatId());
+            user.setCompanyId(service.getCompanyId());
             user.setCompanyName(service.getCompanyName());
         }
 
@@ -255,7 +255,7 @@ public class UserLogic {
         return userService.lambdaQuery()
                 .eq(User::getMobile,mobile)
                 .eq(User::getStatus,true)
-                .eq(User::getCompanyWechatId,companyWechatId).one();
+                .eq(User::getCompanyId,companyWechatId).one();
     }
 
     /**
@@ -387,7 +387,7 @@ public class UserLogic {
 //                .eq(EnterpriseWechatWorker::getCorpId,currentCompanyWechat.getCorpId())
 //                .list();
         List<UserServiceWait> waitList = userServiceWaitService.lambdaQuery()
-                .eq(UserServiceWait::getCompanyWechatId, currentCompanyWechat.getCompanyWechatId())
+                .eq(UserServiceWait::getCompanyId, currentCompanyWechat.getCompanyWechatId())
                 .eq(UserServiceWait::getMobile, mobile)
                 .list();
 
@@ -402,7 +402,7 @@ public class UserLogic {
                 Integer count = userService.lambdaQuery()
                         .eq(User::getWorkUserId, workUserId)
                         .eq(User::getType, UserTypeEnum.SERVICE.toString())
-                        .eq(User::getCompanyWechatId,currentCompanyWechat.getCompanyWechatId())
+                        .eq(User::getCompanyId,currentCompanyWechat.getCompanyWechatId())
                         .count();
                 if (count < 1) {
                     user.setType(UserTypeEnum.SERVICE.toString());
@@ -533,7 +533,7 @@ public class UserLogic {
                 .eq(OrderShare::getOpenId,user.getOpenId())
                 .ne(OrderShare::getWorkUserId,"")
                 .eq(StringUtils.isNotEmpty(status),OrderShare::getStatus,status)
-                .eq(OrderShare::getCompanyWechatId,user.getCompanyWechatId())
+                .eq(OrderShare::getCompanyWechatId,user.getCompanyId())
                 .orderByDesc(OrderShare::getCreateTime)
                 .page(new Page<>(pageNum, pageSize));
     }
@@ -548,7 +548,7 @@ public class UserLogic {
         }
         List<OrderShare> list = orderShareService.lambdaQuery()
                 .eq(OrderShare::getOpenId,user.getOpenId())
-                .eq(OrderShare::getCompanyWechatId,user.getCompanyWechatId())
+                .eq(OrderShare::getCompanyWechatId,user.getCompanyId())
                 .and(v -> v.like(OrderShare::getWorkUserId,user.getWorkUserId()).or().like(OrderShare::getWorkUserId,user.getUserId()))
                 .eq(OrderShare::getStatus, OrderShareStatusEnum.OVER.toString())
                 .list();
@@ -588,7 +588,7 @@ public class UserLogic {
             UserVisit userVisit = new UserVisit();
             userVisit.setUserId(userId);
             userVisit.setVisitTime(new Date());
-            userVisit.setCompanyWechatId(currentCompanyWechat.getCurrentCompanyWechatId());
+            userVisit.setCompanyId(currentCompanyWechat.getCurrentCompanyWechatId());
             userVisit.setCompanyName(currentCompanyWechat.getCurrentCompanyName());
             userVisit.setWebsitId("");
             userVisit.insert();
@@ -614,7 +614,7 @@ public class UserLogic {
         user.setWebsitId(adminWebsit.getWebsitId());
         user.setWebsitName(adminWebsit.getName());
         user.setCompanyName(adminWebsit.getCompanyName());
-        user.setCompanyWechatId(adminWebsit.getCompanyWechatId());
+        user.setCompanyId(adminWebsit.getCompanyId());
         user.updateById();
         return adminWebsit;
     }
@@ -678,7 +678,7 @@ public class UserLogic {
         user.setWebsitId(adminWebsit.getWebsitId());
         user.setWebsitName(adminWebsit.getName());
         user.setCompanyName(adminWebsit.getCompanyName());
-        user.setCompanyWechatId(adminWebsit.getCompanyWechatId());
+        user.setCompanyId(adminWebsit.getCompanyId());
         user.updateById();
         return ;
 

+ 3 - 3
src/main/java/com/gree/mall/miniapp/logic/user/WorkerLogic.java

@@ -51,7 +51,7 @@ public class WorkerLogic {
 //        }
 
         final Integer count = userService.lambdaQuery()
-                .eq(User::getCompanyWechatId, currentCompanyWechat.getCompanyWechatId())
+                .eq(User::getCompanyId, currentCompanyWechat.getCompanyWechatId())
                 .eq(User::getType, UserTypeEnum.SERVICE.toString())
                 .eq(User::getMobile, phone)
                 .count();
@@ -105,7 +105,7 @@ public class WorkerLogic {
 //        }
 
         final Integer count = userService.lambdaQuery()
-                .eq(User::getCompanyWechatId, currentCompanyWechat.getCompanyWechatId())
+                .eq(User::getCompanyId, currentCompanyWechat.getCompanyWechatId())
                 .eq(User::getType, UserTypeEnum.SERVICE.toString())
                 .eq(User::getMobile, phone)
                 .count();
@@ -124,7 +124,7 @@ public class WorkerLogic {
         apply.setUserId(user.getUserId())
                 .setMobile(phone)
                 .setCreateTime(DateUtil.date())
-                .setCompanyWechatId(user.getCompanyWechatId())
+                .setCompanyId(user.getCompanyId())
                 .setCompanyName(user.getCompanyName())
                 .insert();