|
|
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.alipay.api.domain.PriceInfo;
|
|
|
import com.github.kevinsawicki.http.HttpRequest;
|
|
|
+import com.izouma.nineth.config.GeneralProperties;
|
|
|
import com.izouma.nineth.domain.*;
|
|
|
import com.izouma.nineth.domain.Collection;
|
|
|
import com.izouma.nineth.dto.PageQuery;
|
|
|
@@ -18,8 +19,11 @@ import com.izouma.nineth.repo.*;
|
|
|
import com.izouma.nineth.utils.netease.CheckSumBuilder;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import org.apache.commons.lang.RandomStringUtils;
|
|
|
+import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
|
|
+import org.springframework.core.env.Environment;
|
|
|
import org.springframework.data.domain.Page;
|
|
|
import org.springframework.data.domain.PageRequest;
|
|
|
+import org.springframework.data.redis.core.RedisTemplate;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.xml.stream.events.EndDocument;
|
|
|
@@ -35,17 +39,21 @@ import java.util.stream.Collectors;
|
|
|
@AllArgsConstructor
|
|
|
public class StatisticService {
|
|
|
|
|
|
- private UserRepo userRepo;
|
|
|
- private OrderRepo orderRepo;
|
|
|
- private TokenHistoryRepo tokenHistoryRepo;
|
|
|
- private BalanceRecordRepo balanceRecordRepo;
|
|
|
- private PhotoAssetRepo photoAssetRepo;
|
|
|
- private DomainOrderRepo domainOrderRepo;
|
|
|
- private CollectionService collectionService;
|
|
|
- private NewsRepo newsRepo;
|
|
|
- private MintActivityService mintActivityService;
|
|
|
- private UserService userService;
|
|
|
- private CollectionPrivilegeRepo collectionPrivilegeRepo;
|
|
|
+ private UserRepo userRepo;
|
|
|
+ private OrderRepo orderRepo;
|
|
|
+ private TokenHistoryRepo tokenHistoryRepo;
|
|
|
+ private BalanceRecordRepo balanceRecordRepo;
|
|
|
+ private PhotoAssetRepo photoAssetRepo;
|
|
|
+ private DomainOrderRepo domainOrderRepo;
|
|
|
+ private CollectionService collectionService;
|
|
|
+ private NewsRepo newsRepo;
|
|
|
+ private MintActivityService mintActivityService;
|
|
|
+ private UserService userService;
|
|
|
+ private CollectionPrivilegeRepo collectionPrivilegeRepo;
|
|
|
+ private RedisTemplate<String, Object> redisTemplate;
|
|
|
+ private RocketMQTemplate rocketMQTemplate;
|
|
|
+ private GeneralProperties generalProperties;
|
|
|
+ private Environment env;
|
|
|
|
|
|
public Map<String, Object> total(Long userId, Long companyId) {
|
|
|
User user1 = userRepo.findByIdAndDelFalse(userId).orElseThrow(new BusinessException("无用户"));
|