Explorar o código

fix 非账号类型平台数据统计

zoujiajian %!s(int64=3) %!d(string=hai) anos
pai
achega
9c3303a048

+ 0 - 2
netflix-dao/src/main/java/com/cyksj/mapper/AccountMapper.java

@@ -21,8 +21,6 @@ public interface AccountMapper extends BaseMapper<Account> {
 
 	IPage<ExpiredAccountDataView> getExpiredAccountView(@Param("isCorpWx") Boolean isCorpWx, @Param("customerService") String customerService, @Param("goodsId") Long goodsId, @Param("skuId") Long skuId, @Param("account") String account, @Param("renewStatus") Boolean renewStatus, @Param("handleStatus") Boolean handleStatus, @Param("cnAccount") String cnAccount, @Param("usAccount") String usAccount, @Param("userId") Integer userId, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("now") String now, @Param("page") Page page);
 
-	List<Account> getNoAppleOneAccount(Long appleOneGoodsId);
-
 	List<OrderDon> getNoAppleOneOrderDon(@Param("skuIds") List<Long> skuIds, @Param("yesZeroDate") Date yesZeroDate, @Param("thisZeroDate") Date thisZeroDate, @Param("noOrderStatus") List<String> noOrderStatus);
 
 	List<ExcelAccountData> getExpiredAccountViewNoPage(@Param("isCorpWx") Boolean isCorpWx, @Param("customerService") String customerService, @Param("goodsId") Long goodsId, @Param("skuId") Long skuId, @Param("account") String account, @Param("renewStatus") Boolean renewStatus, @Param("handleStatus") Boolean handleStatus, @Param("cnAccount") String cnAccount, @Param("usAccount") String usAccount, @Param("userId") Integer userId, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("now") String now);

+ 3 - 0
netflix-dao/src/main/java/com/cyksj/model/views/GoodsHomePageView.java

@@ -93,6 +93,9 @@ public class GoodsHomePageView {
 	@DbField("g.special_type")
 	private GoodsDon.SpecialType specialType;
 
+	@DbField("g.pay_desc")
+	private String payDesc;
+
 	/**
 	 * 购买通知信息
 	 */

+ 0 - 8
netflix-dao/src/main/resources/mapper/AccountMapper.xml

@@ -75,14 +75,6 @@
         </where>
     </select>
 
-    <select id="getNoAppleOneAccount" resultType="com.cyksj.model.entity.Account">
-        select a.id,
-               g.title,
-               g.id as goodsId
-        from `account` a inner join `goods_don` g on g.id = a.goods_id
-        where g.type = 1 and g.id != #{appleOneGoodsId}
-    </select>
-
     <select id="getNoAppleOneOrderDon" resultType="com.cyksj.model.entity.OrderDon">
         select distinct od.* from `order_don` od
         where od.sku_id in

+ 0 - 2
netflix-service/src/main/java/com/cyksj/service/mange/CmsAccountService.java

@@ -19,8 +19,6 @@ import java.util.List;
 public interface CmsAccountService extends IService<Account> {
 	IPage<ExpiredAccountDataView> getExpiredAccountView(Boolean isCorpWx, String customerService, Long goodsId, Long skuId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer userId, String startTime, String endTime, String now, Long offset, Long limit);
 
-	List<Account> getNoAppleOneAccount(Long appleOneGoodsId);
-
 	List<OrderDon> getNoAppleOneOrderDon(List<Long> skuIds, Date yesZeroDate, Date thisZeroDate, List<String> noOrderStatus);
 
 	List<ExcelAccountData> getExpiredAccountViewNoPage(Boolean isCorpWx, String customerService, Long goodsId, Long skuId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer userId, String startDate, String endDate, String toString);

+ 0 - 5
netflix-service/src/main/java/com/cyksj/service/mange/account/CmsAccountServiceImpl.java

@@ -68,11 +68,6 @@ public class CmsAccountServiceImpl extends ServiceImpl<AccountMapper, Account> i
 		return accountMapper.getExpiredAccountViewNoPage(isCorpWx, customerService, goodsId, skuId, account, renewStatus, handleStatus, cnAccount, usAccount, userId, startTime, endTime, now);
 	}
 
-	@Override
-	public List<Account> getNoAppleOneAccount(Long appleOneGoodsId) {
-		return accountMapper.getNoAppleOneAccount(appleOneGoodsId);
-	}
-
 	@Override
 	public List<OrderDon> getNoAppleOneOrderDon(List<Long> skuIds, Date yesZeroDate, Date thisZeroDate, List<String> noOrderStatus) {
 		return accountMapper.getNoAppleOneOrderDon(skuIds, yesZeroDate, thisZeroDate, noOrderStatus);

+ 9 - 5
netflix-service/src/main/java/com/cyksj/service/mange/statistics/impl/StatisticsDataDayServiceImpl.java

@@ -220,12 +220,16 @@ public class StatisticsDataDayServiceImpl implements StatisticsDataDayService {
 	 * 统计流媒体账号数据
 	 */
 	public List<StreamingAccountData> statisticsStreamingAccountData(Date yesZeroDate, Date thisZeroDate, Boolean today) {
-		List<Account> accounts = accountService.getNoAppleOneAccount(2l);
-		Map<Long, List<Account>> accountMaps = accounts.stream().collect(Collectors.groupingBy(Account::getGoodsId));
-		List<StreamingAccountData> streamingAccountDataSave = new ArrayList<>(accounts.size());
-		accountMaps.forEach((goodsId, accountList) -> {
+		Long appleOndGoodsId = 2l;
+		List<GoodsDon> goodsDons = goodsDonMapper.selectList(Wrappers.lambdaQuery(GoodsDon.class)
+				.ne(GoodsDon::getId, appleOndGoodsId)
+				.eq(GoodsDon::getType, 1)
+				.eq(GoodsDon::getDeleted, 1));
+		List<StreamingAccountData> streamingAccountDataSave = new ArrayList<>(goodsDons.size());
+		goodsDons.forEach(goods->{
 			StreamingAccountData streamingAccount = new StreamingAccountData();
-			streamingAccount.setAccountName(accountList.get(0).getTitle());
+			Long goodsId = goods.getId();
+			streamingAccount.setAccountName(goods.getTitle());
 			streamingAccount.setGoodsId(goodsId);
 			streamingAccountDataStatistics(goodsId, streamingAccount, streamingAccountDataSave, yesZeroDate, thisZeroDate);
 		});

+ 7 - 3
netflix-service/src/main/java/com/cyksj/service/mange/statistics/impl/StatisticsDataServiceImpl.java

@@ -545,10 +545,14 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
 	}
 
 	private void exportStreamingAccountData(List<ExcelSheetAndData> excelSheetDataList, String startDate, String endDate) {
-		List<Account> accounts = accountService.getNoAppleOneAccount(2l);
-		Map<Long, List<Account>> accountMaps = accounts.stream().collect(Collectors.groupingBy(Account::getGoodsId));
+		Long appleOndGoodsId = 2l;
+		List<GoodsDon> goodsDons = goodsDonMapper.selectList(Wrappers.lambdaQuery(GoodsDon.class)
+				.ne(GoodsDon::getId, appleOndGoodsId)
+				.eq(GoodsDon::getType, 1)
+				.eq(GoodsDon::getDeleted, 1));
 		List<ExcelStreamingAccountData> streamingAccountData = new ArrayList<>();
-		accountMaps.forEach((goodsId, accountList) -> {
+		goodsDons.forEach((goods) -> {
+			Long goodsId = goods.getId();
 			//订单数据
 			ExcelStreamingAccountData exportData = statisticsUserDataMapper.getExportStreamingAccountData(goodsId, null, null, startDate, endDate);
 			if (exportData == null || exportData.getNumOfUser() == 0) {