去除final使用@Autowired

This commit is contained in:
lifenlong
2021-05-13 15:07:03 +08:00
parent 3785bdb3bb
commit a10c38f3c1
350 changed files with 1325 additions and 1659 deletions

View File

@@ -12,7 +12,6 @@ import cn.lili.modules.order.order.entity.dto.OrderMessage;
import cn.lili.modules.order.trade.entity.enums.AfterSaleStatusEnum;
import cn.lili.timetask.handler.EveryDayExecute;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -23,13 +22,14 @@ import org.springframework.stereotype.Service;
* @date 2020-07-03 11:20
*/
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class DistributionOrderExecute implements OrderStatusChangeEvent, EveryDayExecute, AfterSaleStatusChangeEvent {
//分销订单
private final DistributionOrderService distributionOrderService;
@Autowired
private DistributionOrderService distributionOrderService;
//分销订单持久层
private final DistributionOrderMapper distributionOrderMapper;
@Autowired
private DistributionOrderMapper distributionOrderMapper;
@Override

View File

@@ -4,8 +4,6 @@ package cn.lili.event.impl;
import cn.lili.event.GoodsCommentCompleteEvent;
import cn.lili.modules.goods.service.GoodsSkuService;
import cn.lili.modules.member.entity.dos.MemberEvaluation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -16,11 +14,11 @@ import org.springframework.stereotype.Service;
* @date 2020-07-03 11:20
*/
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class GoodsSkuExecute implements GoodsCommentCompleteEvent {
//商品
private final GoodsSkuService goodsSkuService;
@Autowired
private GoodsSkuService goodsSkuService;
@Override

View File

@@ -23,13 +23,15 @@ import org.springframework.stereotype.Service;
* @date 2020-07-03 11:20
*/
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class MemberPointExecute implements MemberRegisterEvent, GoodsCommentCompleteEvent {
//配置
private final SettingService settingService;
@Autowired
private SettingService settingService;
//会员
private final MemberService memberService;
@Autowired
private MemberService memberService;
@Override
public void memberRegister(Member member) {

View File

@@ -15,10 +15,10 @@ import org.springframework.stereotype.Service;
* @date 2020-07-03 11:20
*/
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class MemberWalletExecute implements MemberRegisterEvent {
private final MemberWalletService memberWalletService;
@Autowired
private MemberWalletService memberWalletService;
@Override
public void memberRegister(Member member) {

View File

@@ -31,12 +31,12 @@ import java.util.Map;
* @date 2020-07-03 11:20
**/
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class NoticeMessageExecute implements TradeEvent, OrderStatusChangeEvent, AfterSaleStatusChangeEvent, MemberPointChangeEvent, MemberWithdrawalEvent {
private final NoticeMessageService noticeMessageService;
private final OrderService orderService;
@Autowired
private NoticeMessageService noticeMessageService;
@Autowired
private OrderService orderService;
@Override

View File

@@ -22,10 +22,10 @@ import java.util.List;
* @date 2020-07-03 11:20
**/
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class OrderCreateReceiptExecute implements TradeEvent {
private final ReceiptService receiptService;
@Autowired
private ReceiptService receiptService;
@Override
public void orderCreate(TradeDTO tradeDTO) {

View File

@@ -22,13 +22,14 @@ import org.springframework.stereotype.Service;
* @date 2021-03-13 16:58
*/
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class PaymentExecute implements OrderStatusChangeEvent {
//支付日志
private final PaymentService paymentService;
@Autowired
private PaymentService paymentService;
//订单
private final OrderService orderService;
@Autowired
private OrderService orderService;
@Override
public void orderChange(OrderMessage orderMessage) {

View File

@@ -12,7 +12,6 @@ import cn.lili.modules.order.order.service.OrderService;
import cn.lili.modules.promotion.entity.dos.PromotionGoods;
import cn.lili.modules.promotion.entity.enums.PromotionTypeEnum;
import cn.lili.modules.promotion.service.PromotionGoodsService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.core.script.DefaultRedisScript;
@@ -28,20 +27,25 @@ import java.util.List;
* @date 2020-07-03 11:20
*/
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class StockUpdateExecute implements OrderStatusChangeEvent {
//Redis
private final StringRedisTemplate stringRedisTemplate;
private final DefaultRedisScript<Boolean> quantityScript;
@Autowired
private StringRedisTemplate stringRedisTemplate;
@Autowired
private DefaultRedisScript<Boolean> quantityScript;
//订单
private final OrderService orderService;
@Autowired
private OrderService orderService;
//规格商品
private final GoodsSkuService goodsSkuService;
@Autowired
private GoodsSkuService goodsSkuService;
//促销商品
private final PromotionGoodsService promotionGoodsService;
@Autowired
private PromotionGoodsService promotionGoodsService;
//缓存
private final Cache cache;
@Autowired
private Cache cache;
@Override
public void orderChange(OrderMessage orderMessage) {

View File

@@ -6,7 +6,6 @@ import cn.lili.modules.message.util.WechatMessageUtil;
import cn.lili.modules.order.cart.entity.dto.TradeDTO;
import cn.lili.modules.order.order.entity.dto.OrderMessage;
import cn.lili.modules.order.order.entity.vo.OrderVO;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -20,7 +19,6 @@ import org.springframework.stereotype.Service;
*/
@Slf4j
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class WechatMessageExecute implements OrderStatusChangeEvent, TradeEvent {
@Autowired