去除final使用@Autowired
This commit is contained in:
@@ -19,13 +19,14 @@ import java.util.List;
|
||||
* @date 2021/2/18 3:45 下午
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class BillExecute implements EveryDayExecute {
|
||||
|
||||
//结算单
|
||||
private final BillService billService;
|
||||
@Autowired
|
||||
private BillService billService;
|
||||
//店铺详情
|
||||
private final StoreDetailMapper storeDetailMapper;
|
||||
@Autowired
|
||||
private StoreDetailMapper storeDetailMapper;
|
||||
|
||||
/**
|
||||
* 1.查询今日待结算的商家
|
||||
|
||||
@@ -7,7 +7,6 @@ import cn.lili.modules.member.entity.dos.MemberEvaluation;
|
||||
import cn.lili.modules.member.mapper.MemberEvaluationMapper;
|
||||
import cn.lili.timetask.handler.EveryDayExecute;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -21,12 +20,13 @@ import java.util.Map;
|
||||
* @date 2021/3/18 3:23 下午
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class GoodsExecute implements EveryDayExecute {
|
||||
//会员评价
|
||||
private final MemberEvaluationMapper memberEvaluationMapper;
|
||||
@Autowired
|
||||
private MemberEvaluationMapper memberEvaluationMapper;
|
||||
//商品
|
||||
private final GoodsMapper goodsMapper;
|
||||
@Autowired
|
||||
private GoodsMapper goodsMapper;
|
||||
|
||||
/**
|
||||
* 查询已上架的商品的评价数量并赋值
|
||||
|
||||
@@ -28,12 +28,14 @@ import java.util.stream.Collectors;
|
||||
**/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
|
||||
public class CancelOrderTaskExecute implements EveryMinuteExecute {
|
||||
//订单
|
||||
private final OrderService orderService;
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
//设置
|
||||
private final SettingService settingService;
|
||||
@Autowired
|
||||
private SettingService settingService;
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,7 +19,6 @@ import cn.lili.modules.system.service.SettingService;
|
||||
import cn.lili.timetask.handler.EveryDayExecute;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -34,17 +33,21 @@ import java.util.stream.Collectors;
|
||||
**/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
|
||||
public class OrderEveryDayTaskExecute implements EveryDayExecute {
|
||||
|
||||
//订单
|
||||
private final OrderService orderService;
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
//订单货物
|
||||
private final OrderItemService orderItemService;
|
||||
@Autowired
|
||||
private OrderItemService orderItemService;
|
||||
//设置
|
||||
private final SettingService settingService;
|
||||
@Autowired
|
||||
private SettingService settingService;
|
||||
//会员评价
|
||||
private final MemberEvaluationService memberEvaluationService;
|
||||
@Autowired
|
||||
private MemberEvaluationService memberEvaluationService;
|
||||
|
||||
/**
|
||||
* 执行每日任务
|
||||
|
||||
@@ -29,21 +29,27 @@ import java.util.List;
|
||||
* @date 2021/3/18 3:23 下午
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
|
||||
public class PromotionEverydayExecute implements EveryDayExecute {
|
||||
|
||||
//Mongo
|
||||
private final MongoTemplate mongoTemplate;
|
||||
@Autowired
|
||||
private MongoTemplate mongoTemplate;
|
||||
//满额活动
|
||||
private final FullDiscountService fullDiscountService;
|
||||
@Autowired
|
||||
private FullDiscountService fullDiscountService;
|
||||
//拼团
|
||||
private final PintuanService pintuanService;
|
||||
@Autowired
|
||||
private PintuanService pintuanService;
|
||||
//优惠券
|
||||
private final CouponService couponService;
|
||||
@Autowired
|
||||
private CouponService couponService;
|
||||
//会员优惠券
|
||||
private final MemberCouponService memberCouponService;
|
||||
@Autowired
|
||||
private MemberCouponService memberCouponService;
|
||||
//促销商品
|
||||
private final PromotionGoodsService promotionGoodsService;
|
||||
@Autowired
|
||||
private PromotionGoodsService promotionGoodsService;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,6 @@ package cn.lili.timetask.handler.impl.statistics;
|
||||
import cn.lili.modules.statistics.model.dos.MemberStatisticsData;
|
||||
import cn.lili.modules.statistics.service.MemberStatisticsDataService;
|
||||
import cn.lili.timetask.handler.EveryDayExecute;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -19,11 +18,11 @@ import java.util.Date;
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class MemberStatisticsExecute implements EveryDayExecute {
|
||||
|
||||
//会员统计
|
||||
private final MemberStatisticsDataService memberStatisticsDataService;
|
||||
@Autowired
|
||||
private MemberStatisticsDataService memberStatisticsDataService;
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
|
||||
@@ -6,7 +6,6 @@ import cn.lili.common.security.enums.UserEnums;
|
||||
import cn.lili.config.properties.StatisticsProperties;
|
||||
import cn.lili.modules.statistics.model.vo.OnlineMemberVO;
|
||||
import cn.lili.timetask.handler.EveryHourExecute;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -23,13 +22,14 @@ import java.util.stream.Collectors;
|
||||
* @date 2021-02-21 09:47
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class OnlineMemberStatistics implements EveryHourExecute {
|
||||
|
||||
//缓存
|
||||
private final Cache cache;
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
//统计小时
|
||||
private final StatisticsProperties statisticsProperties;
|
||||
@Autowired
|
||||
private StatisticsProperties statisticsProperties;
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
@@ -24,12 +24,13 @@ import java.util.List;
|
||||
* @date 2021/3/15 5:30 下午
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class StoreRatingExecute implements EveryDayExecute {
|
||||
//店铺
|
||||
private final StoreService storeService;
|
||||
@Autowired
|
||||
private StoreService storeService;
|
||||
//会员评价
|
||||
private final MemberEvaluationMapper memberEvaluationMapper;
|
||||
@Autowired
|
||||
private MemberEvaluationMapper memberEvaluationMapper;
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,7 +8,6 @@ import cn.lili.modules.statistics.model.dos.PlatformViewData;
|
||||
import cn.lili.modules.statistics.service.PlatformViewDataService;
|
||||
import cn.lili.timetask.handler.EveryDayExecute;
|
||||
import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -28,12 +27,13 @@ import java.util.List;
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class PageViewStatisticsExecute implements EveryDayExecute {
|
||||
//缓存
|
||||
private final Cache cache;
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
//平台PV统计
|
||||
private final PlatformViewDataService platformViewDataService;
|
||||
@Autowired
|
||||
private PlatformViewDataService platformViewDataService;
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
|
||||
Reference in New Issue
Block a user