44323
2023-10-13 a7900eee85457c085a97427b4932537dcdd6a343
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/DataStatisticsController.java
@@ -7,6 +7,7 @@
import com.dsh.course.feignClient.account.model.*;
import com.dsh.course.feignClient.activity.PointMercharsClient;
import com.dsh.course.feignClient.competition.CompetitionClient;
import com.dsh.course.feignClient.competition.model.CompetionVO;
import com.dsh.course.feignClient.competition.model.Competition;
import com.dsh.course.feignClient.competition.model.CompetitionQuery;
import com.dsh.course.feignClient.competition.model.PaymentCompetition;
@@ -831,11 +832,40 @@
        HashMap<String, Object> map = appUserClient.stuPt();
        return map;
    }
    @RequestMapping(value = "/stuYys")
    @ResponseBody
    public Object stuYys(Integer id) {
        HashMap<String, Object> map = appUserClient.stuYys(id);
        return map;
    }
    @RequestMapping(value = "/stuStores")
    @ResponseBody
    public Object stuStores(Integer id) {
        HashMap<String, Object> map = appUserClient.stuStores(id);
        return map;
    }
    // 消耗课时数据-平台
    @RequestMapping(value = "/coursePt")
    @ResponseBody
    public Object coursePt() {
        List<Integer> userPt = appUserClient.getUserPt(Arrays.asList(1));
        HashMap<String, Object> map = coursePackagePaymentClient.coursePt(userPt);
        return map;
    }
    // 消耗课时数据-运营商
    @RequestMapping(value = "/courseYys")
    @ResponseBody
    public Object courseYys(Integer id) {
        List<Integer> userPt = appUserClient.getUserPt(Arrays.asList(id));
        HashMap<String, Object> map = coursePackagePaymentClient.coursePt(userPt);
        return map;
    }
    // 消耗课时数据-运营商
    @RequestMapping(value = "/courseStore")
    @ResponseBody
    public Object courseStore(Integer id) {
        List<Integer> userPt = appUserClient.getUserPt(Arrays.asList(id));
        HashMap<String, Object> map = coursePackagePaymentClient.coursePt(userPt);
        return map;
    }
@@ -882,10 +912,14 @@
    @RequestMapping(value = "/actYys")
    @ResponseBody
    public Object actYys(Integer id) {
        List<Integer> userPt = appUserClient.getUserYYs(id);
        HashMap<String, Object> map = competitionClient.actPt(userPt);
        CompetionVO competionVO = new CompetionVO();
        List<TStore> list = storeService.list(new LambdaQueryWrapper<TStore>().eq(TStore::getOperatorId, 0));
        List<Integer> userPt = appUserClient.getUserYYs(id);
        competionVO.setIds(userPt);
        competionVO.setOperatorId(id);
        HashMap<String, Object> map = competitionClient.actYys(competionVO);
        List<TStore> list = storeService.list(new LambdaQueryWrapper<TStore>().eq(TStore::getOperatorId, id));
        long l1=0;
        for (TStore tStore : list) {
            long l = DateUtil.betweenDay(tStore.getCreateTime(), new Date(), true);
@@ -899,7 +933,7 @@
            if(integer==0 && integer1==0){
                a=24;
            }else {
                a= integer1-integer;
                a= integer-integer1;
            }
            l1 += l * a;
        }
@@ -942,9 +976,12 @@
    @RequestMapping("/operator")
    public String operator(Model model) {
        Integer objectType = UserExt.getUser().getObjectType();
        List<TOperator> list = operatorService.list(new LambdaQueryWrapper<TOperator>().ne(TOperator::getState, 3));
        Integer objectId = UserExt.getUser().getObjectId();
        List<TOperator> list = operatorService.list(new LambdaQueryWrapper<TOperator>().ne(TOperator::getState, 3).ne(TOperator::getId,0));
        model.addAttribute("list",list);
        model.addAttribute("objectType",objectType);
        model.addAttribute("objectId",objectId);
        return PREFIX + "operatorIncome.html";
    }
@@ -1172,6 +1209,7 @@
        List<TStore> list = storeService.list(new LambdaQueryWrapper<TStore>().eq(TStore::getState, 1));
        model.addAttribute("list",list);
        model.addAttribute("objectType",objectType);
        model.addAttribute("objectId",UserExt.getUser().getObjectId());
        return PREFIX + "storeIncome.html";
    }
@@ -1316,8 +1354,9 @@
    @ResponseBody
    public Object stuUserDataYys(Integer id) {
        ArrayList<Integer> objects = new ArrayList<>();
        objects.add(1);
        HashMap<String, Object> map = appUserClient.queryUserAgeYys(id);
        HashMap<String, Object> map = appUserClient.queryUserAgeYys(operatorService.getById(id).getId());
        return map;
    }