|
@@ -1,79 +1,52 @@
|
|
|
package com.fs.task;
|
|
|
|
|
|
-
|
|
|
-import cn.hutool.core.util.IdUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.json.JSONArray;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
-import com.alibaba.fastjson.JSON;
|
|
|
-import com.fs.common.core.domain.R;
|
|
|
import com.fs.common.core.redis.RedisCache;
|
|
|
-import com.fs.common.event.TemplateBean;
|
|
|
-import com.fs.common.event.TemplateEvent;
|
|
|
-import com.fs.common.event.TemplateListenEnum;
|
|
|
import com.fs.company.domain.CompanyUser;
|
|
|
import com.fs.company.mapper.CompanyUserMapper;
|
|
|
-import com.fs.company.domain.CompanyUser;
|
|
|
import com.fs.company.service.ICompanyService;
|
|
|
import com.fs.core.security.SecurityUtils;
|
|
|
-import com.fs.crm.mapper.CrmCustomerMapper;
|
|
|
import com.fs.erp.domain.ErpDeliverys;
|
|
|
import com.fs.erp.domain.ErpGoods;
|
|
|
-import com.fs.erp.domain.ErpOrderItem;
|
|
|
import com.fs.erp.domain.ErpOrderQuery;
|
|
|
import com.fs.erp.dto.*;
|
|
|
import com.fs.erp.service.IErpGoodsService;
|
|
|
import com.fs.erp.service.IErpOrderService;
|
|
|
-import com.fs.huifuPay.domain.HuiFuCreateOrder;
|
|
|
-import com.fs.huifuPay.domain.HuifuCreateOrderResult;
|
|
|
-import com.fs.huifuPay.service.HuiFuService;
|
|
|
-import com.fs.pay.pay.domain.CreateWxOrderResult;
|
|
|
import com.fs.pay.pay.domain.OrderResult;
|
|
|
import com.fs.pay.pay.dto.OrderQueryDTO;
|
|
|
-import com.fs.pay.pay.dto.WxJspayDTO;
|
|
|
import com.fs.pay.pay.service.PayService;
|
|
|
-import com.fs.pay.pay.service.impl.PayApiServiceImpl;
|
|
|
import com.fs.store.config.StoreConfig;
|
|
|
import com.fs.store.domain.*;
|
|
|
import com.fs.store.dto.ExpressInfoDTO;
|
|
|
-import com.fs.store.dto.FsStoreCartDTO;
|
|
|
import com.fs.store.dto.StoreProductGroupDTO;
|
|
|
-import com.fs.store.enums.OrderInfoEnum;
|
|
|
import com.fs.store.enums.OrderLogEnum;
|
|
|
import com.fs.store.enums.ShipperCodeEnum;
|
|
|
import com.fs.store.mapper.*;
|
|
|
import com.fs.store.param.*;
|
|
|
import com.fs.store.service.*;
|
|
|
-import com.fs.store.vo.FsStoreOrderItemVO;
|
|
|
-import com.fs.store.vo.FsStoreOrderTuiVO;
|
|
|
-import com.fs.store.vo.FsStoreOrderVO;
|
|
|
import com.fs.store.vo.FsUserShareVO;
|
|
|
import com.fs.system.service.ISysConfigService;
|
|
|
-import com.sun.media.sound.SF2GlobalRegion;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.apache.commons.lang.ObjectUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.apache.ibatis.annotations.Param;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.context.ApplicationEventPublisher;
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.text.ParseException;
|
|
|
import java.util.ArrayList;
|
|
|
-import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.Set;
|
|
|
-import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
import static com.fs.store.constants.StoreConstants.DELIVERY;
|
|
|
|
|
|
/**
|
|
|
- * 定时任务调度测试
|
|
|
- *
|
|
|
+ * 定时任务调度
|
|
|
* @author fs
|
|
|
*/
|
|
|
@Component("storeTask")
|
|
@@ -84,19 +57,19 @@ public class StoreTask {
|
|
|
@Autowired
|
|
|
private RedisCache redisCache;
|
|
|
@Autowired
|
|
|
- IFsStoreOrderService orderService;
|
|
|
+ private IFsStoreOrderService orderService;
|
|
|
@Autowired
|
|
|
private IFsStoreCouponUserService couponUserService;
|
|
|
@Autowired
|
|
|
- IFsStoreAfterSalesService afterSalesService;
|
|
|
+ private IFsStoreAfterSalesService afterSalesService;
|
|
|
@Autowired
|
|
|
- IFsUserService userService;
|
|
|
+ private IFsUserService userService;
|
|
|
|
|
|
@Autowired
|
|
|
- IErpOrderService erpOrderService;
|
|
|
+ private IErpOrderService erpOrderService;
|
|
|
|
|
|
@Autowired
|
|
|
- PayService ybPayService;
|
|
|
+ private PayService ybPayService;
|
|
|
@Autowired
|
|
|
private FsStoreOrderMapper fsStoreOrderMapper;
|
|
|
|
|
@@ -109,12 +82,45 @@ public class StoreTask {
|
|
|
@Autowired
|
|
|
private FsStorePaymentMapper fsStorePaymentMapper;
|
|
|
|
|
|
- @Autowired
|
|
|
- private CrmCustomerMapper crmCustomerMapper;
|
|
|
@Autowired
|
|
|
private IErpGoodsService goodsService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private FsUserTuiMoneyRankMapper fsUserTuiMoneyRankMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IErpGoodsService erpGoodsService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ISysConfigService configService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private FsStoreProductAttrValueMapper fsStoreProductAttrValueMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IFsStoreProductGroupService storeProductGroupService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IFsExpressService expressService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private FsStorePaymentMapper paymentMapper;
|
|
|
+ @Autowired
|
|
|
+ private IFsStorePaymentService fsStorePaymentService;
|
|
|
+ @Autowired
|
|
|
+ private ICompanyService companyService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IFsStoreAfterSalesService fsStoreAfterSalesService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private FsStoreOrderItemMapper itemMapper;
|
|
|
+
|
|
|
@Autowired
|
|
|
- private ApplicationEventPublisher publisher;
|
|
|
+ private CompanyUserMapper companyUserMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IFsStoreOrderStatusService orderStatusService;
|
|
|
|
|
|
public void tt() {
|
|
|
ErpGoodsStockQueryRequert request = new ErpGoodsStockQueryRequert();
|
|
@@ -163,10 +169,6 @@ public class StoreTask {
|
|
|
|
|
|
}
|
|
|
|
|
|
- @Autowired
|
|
|
- FsUserTuiMoneyRankMapper fsUserTuiMoneyRankMapper;
|
|
|
-
|
|
|
- private FsUserAddressMapper addressMapper;
|
|
|
|
|
|
public void addUserTuiMoneyRank() {
|
|
|
List<FsUserShareVO> fsUserShareVOS1 = fsUserTuiMoneyRankMapper.selectFsUserTuiMoneyRankByType(1);
|
|
@@ -225,15 +227,6 @@ public class StoreTask {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @Autowired
|
|
|
- IErpGoodsService erpGoodsService;
|
|
|
- @Autowired
|
|
|
- ISysConfigService configService;
|
|
|
- @Autowired
|
|
|
- private FsStoreProductAttrValueMapper fsStoreProductAttrValueMapper;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private IFsStoreProductGroupService storeProductGroupService;
|
|
|
|
|
|
public void storeProdUpdateCostPrice() {
|
|
|
String json = configService.selectConfigByKey("store.config");
|
|
@@ -384,9 +377,6 @@ public class StoreTask {
|
|
|
|
|
|
}
|
|
|
|
|
|
- @Autowired
|
|
|
- private IFsExpressService expressService;
|
|
|
-
|
|
|
@Deprecated
|
|
|
public void changeStatus() {
|
|
|
List<Long> list = fsStoreOrderMapper.selectOrderId();
|
|
@@ -408,12 +398,6 @@ public class StoreTask {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @Autowired
|
|
|
- private FsStorePaymentMapper paymentMapper;
|
|
|
- @Autowired
|
|
|
- private IFsStorePaymentService fsStorePaymentService;
|
|
|
- @Autowired
|
|
|
- private ICompanyService companyService;
|
|
|
|
|
|
public void subCompanyMoney() {
|
|
|
List<Long> list = paymentMapper.selectPaymentIds();
|
|
@@ -425,8 +409,6 @@ public class StoreTask {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @Autowired
|
|
|
- private FsStoreOrderItemMapper itemMapper;
|
|
|
|
|
|
public void updateOrderItem() throws ParseException {
|
|
|
List<Long> ids = itemMapper.selectOrderIdByNoErp();
|
|
@@ -483,8 +465,6 @@ public class StoreTask {
|
|
|
|
|
|
}
|
|
|
|
|
|
- @Autowired
|
|
|
- private IFsStoreAfterSalesService fsStoreAfterSalesService;
|
|
|
|
|
|
public void selectPayMoneyLessOne() {
|
|
|
List<FsStoreOrder> list = fsStoreOrderMapper.selectPayMoneyLessOne();
|
|
@@ -507,10 +487,6 @@ public class StoreTask {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private CompanyUserMapper companyUserMapper;
|
|
|
-
|
|
|
public void updateCompanyUserStatus() {
|
|
|
CompanyUser user = new CompanyUser();
|
|
|
user.setStatus("0");
|
|
@@ -525,13 +501,6 @@ public class StoreTask {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public void deleteCustomer() {
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private IFsStoreOrderStatusService orderStatusService;
|
|
|
-
|
|
|
public void updateExpress() {
|
|
|
List<FsStoreOrder> list = fsStoreOrderMapper.selectUpdateExpress();
|
|
|
for (FsStoreOrder order : list) {
|
|
@@ -546,7 +515,7 @@ public class StoreTask {
|
|
|
orderStatusService.create(order.getId(), OrderLogEnum.DELIVERY_GOODS.getValue(),
|
|
|
OrderLogEnum.DELIVERY_GOODS.getDesc());
|
|
|
|
|
|
- redisCache.deleteObject(DELIVERY+":"+order.getExtendOrderId());
|
|
|
+ redisCache.deleteObject(DELIVERY + ":" + order.getExtendOrderId());
|
|
|
|
|
|
for (ErpDeliverys delivery : orderQuery.getDeliverys()) {
|
|
|
if (delivery.getDelivery()) {
|
|
@@ -561,8 +530,4 @@ public class StoreTask {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|