Commit 7ef7a979 authored by 33's avatar 33

优化注入

parent 6c97ece9
......@@ -28,12 +28,10 @@ import com.fzm.common.utils.CopyrightSignUtil;
import com.fzm.common.utils.ObsUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.redisson.Redisson;
import org.redisson.api.RLock;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DuplicateKeyException;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Service;
......@@ -56,24 +54,37 @@ import java.util.concurrent.TimeUnit;
@Slf4j
@Service
@Transactional(rollbackFor = RuntimeException.class)
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class CopyrightApplyServiceImpl extends ServiceImpl<CopyrightApplyMapper, CopyrightApply> implements CopyrightApplyService {
private final CopyrightApplyMapper copyrightApplyMapper;
private final CopyrightFileService copyrightFileService;
private final CopyrightApplyOwnerRelationService copyrightApplyOwnerRelationService;
private final CopyrightAuthorService copyrightAuthorService;
private final CopyrightAuthorityRelationService copyrightAuthorityRelationService;
private final AuthorityService authorityService;
private final CopyrightOwnerService copyrightOwnerService;
private final UserService userService;
private final AuthPersonService authPersonService;
private final ObsUtil obsUtil;
private final ThreadPoolTaskExecutor threadPoolTaskExecutor;
private final OpusCategoryService opusCategoryService;
private final CopyrightProperties copyrightProperties;
private final DraftService draftService;
private final NotifyPublisher notifyPublisher;
@Resource
private CopyrightApplyMapper copyrightApplyMapper;
@Resource
private CopyrightFileService copyrightFileService;
@Resource
private CopyrightApplyOwnerRelationService copyrightApplyOwnerRelationService;
@Resource
private CopyrightAuthorService copyrightAuthorService;
@Resource
private CopyrightAuthorityRelationService copyrightAuthorityRelationService;
@Resource
private AuthorityService authorityService;
@Resource
private CopyrightOwnerService copyrightOwnerService;
@Resource
private UserService userService;
@Resource
private AuthPersonService authPersonService;
@Resource
private ObsUtil obsUtil;
@Resource
private ThreadPoolTaskExecutor threadPoolTaskExecutor;
@Resource
private OpusCategoryService opusCategoryService;
@Resource
private CopyrightProperties copyrightProperties;
@Resource
private DraftService draftService;
@Resource
private NotifyPublisher notifyPublisher;
@Resource
private NftService nftService;
@Resource
......
......@@ -34,11 +34,9 @@ import com.fzm.common.utils.RedisUtil;
import com.fzm.common.utils.SmsUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.dao.DuplicateKeyException;
import org.springframework.stereotype.Service;
......@@ -56,21 +54,31 @@ import java.util.stream.Collectors;
*/
@Slf4j
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftService {
private final ParaChainClient paraChainClient;
private final RedisUtil redisUtil;
private final UserService userService;
private final NftMapper nftMapper;
private final CategoryService categoryService;
private final CollectionService collectionService;
private final NftTransferRecordService nftTransferRecordService;
private final SmsUtil smsUtil;
private final SmsProperties smsProperties;
private final RabbitTemplate rabbitTemplate;
private final ObsUtil obsUtil;
private final NotifyPublisher notifyPublisher;
@Resource
private ParaChainClient paraChainClient;
@Resource
private RedisUtil redisUtil;
@Resource
private UserService userService;
@Resource
private NftMapper nftMapper;
@Resource
private CategoryService categoryService;
@Resource
private CollectionService collectionService;
@Resource
private NftTransferRecordService nftTransferRecordService;
@Resource
private SmsUtil smsUtil;
@Resource
private SmsProperties smsProperties;
@Resource
private RabbitTemplate rabbitTemplate;
@Resource
private ObsUtil obsUtil;
@Resource
private NotifyPublisher notifyPublisher;
@Resource
private CopyrightApplyService copyrightApplyService;
......
......@@ -16,9 +16,7 @@ import com.fzm.common.interceptor.LoginUserInfo;
import com.fzm.common.mapper.OrderMapper;
import com.fzm.common.service.*;
import com.fzm.common.utils.SnowflakeUtil;
import lombok.RequiredArgsConstructor;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -35,15 +33,19 @@ import java.util.List;
*/
@Service
@Transactional(rollbackFor = RuntimeException.class)
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService {
private final NftService nftService;
private final CopyrightApplyService copyrightApplyService;
private final SnowflakeUtil snowflakeUtil;
private final RabbitTemplate rabbitTemplate;
private final OrderMapper orderMapper;
private final ChargeService chargeService;
@Resource
private NftService nftService;
@Resource
private CopyrightApplyService copyrightApplyService;
@Resource
private SnowflakeUtil snowflakeUtil;
@Resource
private RabbitTemplate rabbitTemplate;
@Resource
private OrderMapper orderMapper;
@Resource
private ChargeService chargeService;
@Resource
private WxPayService wxPayService;
......
......@@ -17,7 +17,6 @@ import com.fzm.common.properties.WxPayProperties;
import com.fzm.common.service.*;
import com.fzm.common.utils.SnowflakeUtil;
import com.wechat.pay.contrib.apache.httpclient.util.AesUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.client.methods.CloseableHttpResponse;
......@@ -29,7 +28,6 @@ import org.apache.http.util.EntityUtils;
import org.redisson.Redisson;
import org.redisson.api.RLock;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Base64Utils;
......@@ -55,17 +53,23 @@ import java.util.concurrent.TimeUnit;
@Slf4j
@Service
@Transactional(rollbackFor = RuntimeException.class)
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class WxPayServiceImpl implements WxPayService {
private final CloseableHttpClient httpClient;
private final WxPayProperties wxPayProperties;
private final PrivateKey wxPrivateKey;
private final OrderService orderService;
private final PaymentService paymentService;
private final RabbitTemplate rabbitTemplate;
private final SnowflakeUtil snowflakeUtil;
private final SmsService smsService;
@Resource
private CloseableHttpClient httpClient;
@Resource
private WxPayProperties wxPayProperties;
@Resource
private PrivateKey wxPrivateKey;
@Resource
private OrderService orderService;
@Resource
private PaymentService paymentService;
@Resource
private RabbitTemplate rabbitTemplate;
@Resource
private SnowflakeUtil snowflakeUtil;
@Resource
private SmsService smsService;
@Resource
private Redisson redisson;
@Resource
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment