无关风月
2025-05-06 6f19ee6018f82cf981135fd81b1608faea53ce7e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package com.ruoyi.account.controller;
 
 
import com.ruoyi.account.api.model.*;
import com.ruoyi.account.api.vo.GovernmentCloudAccountVO;
import com.ruoyi.account.service.*;
import com.ruoyi.common.core.domain.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import java.time.LocalDateTime;
import java.util.List;
 
/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author luodangjia
 * @since 2024-08-06
 */
@RestController
@RequestMapping("/governmentCloudAccount")
public class GovernmentCloudAccountController {
    @Autowired
    private TAppCouponService tAppCouponService;
    @Autowired
    private TAppUserCarService appUserCarService;
    @Autowired
    private TAppUserTagService appUserTagService;
    @Autowired
    private TAppUserService appUserService;
    @Autowired
    private TAppUserAddressService appUserAddressService;
    @Autowired
    private TAppUserIntegralChangeService appUserIntegralChangeService;
    @Autowired
    private TAppUserSignService appUserSignService;
    @Autowired
    private TAppUserVipDetailService appUserVipDetailService;
    @Autowired
    private TInviteUserService inviteUserService;
    @Autowired
    private TInvoiceInformationService invoiceInformationService;
 
    /**
     * 政务云查询数据接口
     * @return
     */
    @PostMapping("/listAll")
    R<GovernmentCloudAccountVO> listAll() {
        LocalDateTime end = LocalDateTime.now();
        LocalDateTime start = LocalDateTime.now().minusDays(1);
        GovernmentCloudAccountVO governmentCloudAccountVO = new GovernmentCloudAccountVO();
        List<TAppCoupon> list1 = tAppCouponService.lambdaQuery().between(TAppCoupon::getCreateTime, start, end).list();
        List<TAppUser> list2 = appUserService.lambdaQuery().between(TAppUser::getCreateTime, start, end).list();
        List<TAppUserAddress> list3 = appUserAddressService.lambdaQuery().between(TAppUserAddress::getCreateTime, start, end).list();
        List<TAppUserCar> list4 = appUserCarService.lambdaQuery().between(TAppUserCar::getCreateTime, start, end).list();
        List<TAppUserIntegralChange> list5 = appUserIntegralChangeService.lambdaQuery().between(TAppUserIntegralChange::getCreateTime, start, end).list();
        List<TAppUserSign> list6 = appUserSignService.lambdaQuery().between(TAppUserSign::getCreateTime, start, end).list();
        List<TAppUserTag> list7 = appUserTagService.lambdaQuery().between(TAppUserTag::getCreateTime, start, end).list();
        List<TAppUserVipDetail> list8 = appUserVipDetailService.lambdaQuery().between(TAppUserVipDetail::getCreateTime, start, end).list();
        List<TInviteUser> list9 = inviteUserService.lambdaQuery().between(TInviteUser::getCreateTime, start, end).list();
        List<TInvoiceInformation> list10 = invoiceInformationService.lambdaQuery().between(TInvoiceInformation::getCreateTime, start, end).list();
        governmentCloudAccountVO.setAppCoupons(list1);
        governmentCloudAccountVO.setAppUsers(list2);
        governmentCloudAccountVO.setAppUserAddresses(list3);
        governmentCloudAccountVO.setAppUserCars(list4);
        governmentCloudAccountVO.setAppUserIntegralChanges(list5);
        governmentCloudAccountVO.setAppUserSigns(list6);
        governmentCloudAccountVO.setAppUserTags(list7);
        governmentCloudAccountVO.setAppUserVipDetails(list8);
        governmentCloudAccountVO.setInviteUsers(list9);
        governmentCloudAccountVO.setInvoiceInformations(list10);
        return R.ok(governmentCloudAccountVO);
    }
 
 
}