| | |
| | | package com.dsh.account.controller; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.dsh.account.dto.SelectDto; |
| | | import com.dsh.account.dto.UserInfoQueryDTO; |
| | | import com.dsh.account.entity.Coach; |
| | | import com.dsh.account.entity.TAppUser; |
| | | import com.dsh.account.entity.TCourseInfoRecord; |
| | |
| | | import com.dsh.account.util.ResultUtil; |
| | | import com.dsh.account.util.TokenUtil; |
| | | import com.dsh.account.util.ToolUtil; |
| | | import com.dsh.account.vo.GroupCityInfoVO; |
| | | import com.dsh.account.vo.UserInfoQueryVO; |
| | | import com.dsh.account.vo.entity.DayData; |
| | | import com.dsh.account.vo.entity.MonthData; |
| | | import com.dsh.account.vo.entity.WeekData; |
| | | import com.dsh.account.vo.entity.YearData; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.PrintWriter; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalTime; |
| | | import java.util.*; |
| | | import java.util.List; |
| | | |
| | |
| | | public ResultUtil<String> loginWeChat(LoginWeChatVo loginWeChatVo){ |
| | | try { |
| | | return appUserService.loginWechat(loginWeChatVo); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | @ResponseBody |
| | | @PostMapping("/api/appUser/bind") |
| | | @ApiOperation(value = "微信登录--绑定手机号", tags = {"APP-登录注册"}) |
| | | @ApiImplicitParams({ |
| | | }) |
| | | public ResultUtil<String> bind(String phone){ |
| | | try { |
| | | Integer uid = tokenUtil.getUserIdFormRedis(); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | TAppUser byId = appUserService.getById(uid); |
| | | byId.setPhone(phone); |
| | | appUserService.updateById(byId); |
| | | return ResultUtil.success(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | |
| | | System.out.println("=======selectDtos======>"+selectDtos); |
| | | return selectDtos; |
| | | } |
| | | |
| | | |
| | | @PostMapping("/appUser/userInfo") |
| | | public UserInfoQueryVO userInfo(@RequestBody UserInfoQueryDTO dto){ |
| | | |
| | | UserInfoQueryVO userInfoQueryVO = new UserInfoQueryVO(); |
| | | |
| | | LambdaQueryWrapper<TAppUser> wrapper = new LambdaQueryWrapper<>(); |
| | | |
| | | if(StringUtils.hasLength(dto.getCityCode())){ |
| | | wrapper.eq(TAppUser::getCityCode,dto.getCityCode()); |
| | | } |
| | | |
| | | if(Objects.nonNull(dto.getOperatorId())){ |
| | | wrapper.eq(TAppUser::getInsertType,2); |
| | | wrapper.eq(TAppUser::getAddUserId,dto.getOperatorId()); |
| | | } |
| | | |
| | | if(Objects.nonNull(dto.getStoreId())){ |
| | | wrapper.eq(TAppUser::getInsertType,3); |
| | | wrapper.eq(TAppUser::getAddUserId,dto.getStoreId()); |
| | | } |
| | | |
| | | // 查询会员总数,年度会员总数 |
| | | int userCount = appUserService.count(wrapper); |
| | | int userVipCount = appUserService.count(wrapper.eq(TAppUser::getIsVip,1)); |
| | | |
| | | userInfoQueryVO.setUserCount(userCount); |
| | | userInfoQueryVO.setUserVipCount(userVipCount); |
| | | |
| | | if(Objects.nonNull(dto.getIsVip())){ |
| | | wrapper.eq(TAppUser::getIsVip,dto.getIsVip()); |
| | | } |
| | | |
| | | // 年度数据 |
| | | List<YearData> yearData = appUserService.getYearUserCount(dto); |
| | | userInfoQueryVO.setYearData(yearData); |
| | | // 月度数据 |
| | | List<MonthData> monthData = appUserService.getMonthUserCount(dto); |
| | | userInfoQueryVO.setMonthData(monthData); |
| | | |
| | | // 获取最近四周 |
| | | LocalDateTime minNow = LocalDateTime.now().with(LocalTime.MIN); |
| | | LocalDateTime maxNow = LocalDateTime.now().with(LocalTime.MAX); |
| | | // 周度数据 |
| | | dto.setStartTime(minNow.minusDays(6).toString()); |
| | | dto.setEndTime(maxNow.toString()); |
| | | WeekData week4 = appUserService.getWeekUserCount4(dto); |
| | | dto.setStartTime(minNow.minusDays(13).toString()); |
| | | dto.setEndTime(maxNow.minusDays(6).toString()); |
| | | WeekData week3 = appUserService.getWeekUserCount3(dto); |
| | | dto.setStartTime(minNow.minusDays(20).toString()); |
| | | dto.setEndTime(maxNow.minusDays(13).toString()); |
| | | WeekData week2 = appUserService.getWeekUserCount2(dto); |
| | | dto.setStartTime(minNow.minusDays(27).toString()); |
| | | dto.setEndTime(maxNow.minusDays(20).toString()); |
| | | WeekData week1 = appUserService.getWeekUserCount1(dto); |
| | | |
| | | List<WeekData> weekDataList = new ArrayList<>(); |
| | | weekDataList.add(week1); |
| | | weekDataList.add(week2); |
| | | weekDataList.add(week3); |
| | | weekDataList.add(week4); |
| | | userInfoQueryVO.setWeekData(weekDataList); |
| | | |
| | | // 日度数据 |
| | | dto.setStartTime(minNow.minusDays(6).toString()); |
| | | dto.setEndTime(maxNow.toString()); |
| | | List<DayData> dayData = appUserService.getDayUserCount(dto); |
| | | userInfoQueryVO.setDayData(dayData); |
| | | return userInfoQueryVO; |
| | | } |
| | | |
| | | @PostMapping("/appUser/ageInfo") |
| | | public Map<String,Long> ageInfo(@RequestBody UserInfoQueryDTO dto){ |
| | | |
| | | Map<String,Long> map = new HashMap<>(); |
| | | |
| | | LambdaQueryWrapper<TAppUser> wrapper = new LambdaQueryWrapper<>(); |
| | | |
| | | if(StringUtils.hasLength(dto.getCityCode())){ |
| | | wrapper.eq(TAppUser::getCityCode,dto.getCityCode()); |
| | | } |
| | | |
| | | if(Objects.nonNull(dto.getOperatorId())){ |
| | | wrapper.eq(TAppUser::getInsertType,2); |
| | | wrapper.eq(TAppUser::getAddUserId,dto.getOperatorId()); |
| | | } |
| | | |
| | | if(Objects.nonNull(dto.getStoreId())){ |
| | | wrapper.eq(TAppUser::getInsertType,3); |
| | | wrapper.eq(TAppUser::getAddUserId,dto.getStoreId()); |
| | | } |
| | | |
| | | List<TAppUser> list = appUserService.list(wrapper); |
| | | // 查询会员 |
| | | list.forEach(tAppUser->tAppUser.setAge(DateUtil.ageOfNow(tAppUser.getBirthday()))); |
| | | |
| | | map.put("age1", list.stream().filter(e -> e.getAge() > 0 && e.getAge() <= 12).count()); |
| | | map.put("age2",list.stream().filter(e -> e.getAge() >= 13 && e.getAge() <= 18).count()); |
| | | map.put("age3",list.stream().filter(e -> e.getAge() >= 19 && e.getAge() <= 25).count()); |
| | | map.put("age4",list.stream().filter(e -> e.getAge() >= 26 && e.getAge() <= 35).count()); |
| | | map.put("age5",list.stream().filter(e -> e.getAge() >= 36 && e.getAge() <= 50).count()); |
| | | map.put("age6",list.stream().filter(e -> e.getAge() >= 51).count()); |
| | | return map; |
| | | } |
| | | |
| | | @PostMapping("/appUser/sexInfo") |
| | | public Map<String,Integer> sexInfo(@RequestBody UserInfoQueryDTO dto){ |
| | | |
| | | Map<String,Integer> map = new HashMap<>(2); |
| | | LambdaQueryWrapper<TAppUser> wrapper = new LambdaQueryWrapper<>(); |
| | | |
| | | if(StringUtils.hasLength(dto.getCityCode())){ |
| | | wrapper.eq(TAppUser::getCityCode,dto.getCityCode()); |
| | | } |
| | | |
| | | if(Objects.nonNull(dto.getOperatorId())){ |
| | | wrapper.eq(TAppUser::getInsertType,2); |
| | | wrapper.eq(TAppUser::getAddUserId,dto.getOperatorId()); |
| | | } |
| | | |
| | | if(Objects.nonNull(dto.getStoreId())){ |
| | | wrapper.eq(TAppUser::getInsertType,3); |
| | | wrapper.eq(TAppUser::getAddUserId,dto.getStoreId()); |
| | | } |
| | | |
| | | // 查询会员 |
| | | int boyCount = appUserService.count(wrapper.eq(TAppUser::getGender,1)); |
| | | int girlCount = appUserService.count(wrapper.eq(TAppUser::getGender,2)); |
| | | map.put("boyCount",boyCount); |
| | | map.put("girlCount",girlCount); |
| | | return map; |
| | | } |
| | | |
| | | @PostMapping("/appUser/groupCityInfo") |
| | | public List<GroupCityInfoVO> groupCityInfo(@RequestBody UserInfoQueryDTO dto){ |
| | | // 查询地区会员 |
| | | return appUserService.groupCityInfo(dto); |
| | | } |
| | | } |
| | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | if(ids.size()==0){ |
| | | ids.add(-1); |
| | | } |
| | | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().in(TAppUser::getInsertType, 1)); |
| | | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 1)); |
| | | return list.stream().map(TAppUser::getId).collect(Collectors.toList()); |
| | | } |
| | | @PostMapping("/student/getUserYYs") |
| | | @ResponseBody |
| | | public List<Integer> getUserYYs(@RequestBody Integer id){ |
| | | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId,id)); |
| | | return list.stream().map(TAppUser::getId).collect(Collectors.toList()); |
| | | } |
| | | @PostMapping("/student/getUserStore") |
| | | @ResponseBody |
| | | public List<Integer> getUserStore(@RequestBody Integer id){ |
| | | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId,id)); |
| | | return list.stream().map(TAppUser::getId).collect(Collectors.toList()); |
| | | } |
| | | |
| | |
| | | @PostMapping("/student/queryUserAge") |
| | | public HashMap<String, Object> queryUserAge(){ |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().in(TAppUser::getInsertType, 1)); |
| | | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 1)); |
| | | List<Integer> collect = list.stream().map(TAppUser::getId).collect(Collectors.toList()); |
| | | if(collect.size()==0){ |
| | | collect.add(-1); |
| | |
| | | |
| | | |
| | | } |
| | | @PostMapping("/student/queryUserAge1") |
| | | public HashMap<String, Object> queryUserAge1(){ |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 1)); |
| | | List<Integer> collect = list.stream().map(TAppUser::getId).collect(Collectors.toList()); |
| | | if(collect.size()==0){ |
| | | collect.add(-1); |
| | | } |
| | | |
| | | |
| | | Set<String> strings = list.stream().collect(Collectors.groupingBy(TAppUser::getCity)).keySet(); |
| | | ArrayList<String> strings1 = new ArrayList<>(); |
| | | ArrayList<Integer> integers = new ArrayList<>(); |
| | | |
| | | for (String string : strings) { |
| | | int a = 0; |
| | | strings1.add(string); |
| | | for (TAppUser tAppUser : list) { |
| | | if(tAppUser.getCity().equals(string)){ |
| | | a++; |
| | | } |
| | | } |
| | | integers.add(a); |
| | | } |
| | | |
| | | map.put("cityData",strings1); |
| | | map.put("cityNum",integers); |
| | | int age1=0; |
| | | int age2=0; |
| | | int age3=0; |
| | | int age4=0; |
| | | int age5=0; |
| | | int age6=0; |
| | | int boy=0; |
| | | int girl=0; |
| | | for (TAppUser tStudent : list) { |
| | | Date birthday = tStudent.getBirthday(); |
| | | long l =0; |
| | | if(birthday!=null){ |
| | | |
| | | l = DateUtil.betweenYear(birthday, new Date(), true); |
| | | } |
| | | if(l<=12){ |
| | | age1++; |
| | | }else if(l>12 && l<18){ |
| | | age2++; |
| | | }else if(l>=19 && l<=25){ |
| | | age3++; |
| | | }else if(l>=26 && l<=35){ |
| | | age4++; |
| | | }else if(l>=36 && l<=50){ |
| | | age5++; |
| | | }else { |
| | | age6++; |
| | | } |
| | | if(tStudent.getGender()!=null &&tStudent.getGender()==1){ |
| | | boy++; |
| | | }else { |
| | | girl++; |
| | | } |
| | | } |
| | | map.put("age1",age1); |
| | | map.put("age2",age2); |
| | | map.put("age3",age3); |
| | | map.put("age4",age4); |
| | | map.put("age5",age5); |
| | | map.put("age6",age6); |
| | | map.put("boy",boy); |
| | | map.put("girl",girl); |
| | | return map; |
| | | |
| | | |
| | | |
| | | } |
| | | @PostMapping("/student/queryUserAgeYys") |
| | | public HashMap<String, Object> queryUserAgeYys(Integer id){ |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId,id)); |
| | | List<Integer> collect = list.stream().map(TAppUser::getId).collect(Collectors.toList()); |
| | | if(collect.size()==0){ |
| | | collect.add(-1); |
| | | } |
| | | |
| | | |
| | | Set<String> strings = list.stream().collect(Collectors.groupingBy(TAppUser::getCity)).keySet(); |
| | | ArrayList<String> strings1 = new ArrayList<>(); |
| | | ArrayList<Integer> integers = new ArrayList<>(); |
| | | |
| | | for (String string : strings) { |
| | | int a = 0; |
| | | strings1.add(string); |
| | | for (TAppUser tAppUser : list) { |
| | | if(tAppUser.getCity().equals(string)){ |
| | | a++; |
| | | } |
| | | } |
| | | integers.add(a); |
| | | } |
| | | |
| | | map.put("cityData",strings1); |
| | | map.put("cityNum",integers); |
| | | int age1=0; |
| | | int age2=0; |
| | | int age3=0; |
| | | int age4=0; |
| | | int age5=0; |
| | | int age6=0; |
| | | int boy=0; |
| | | int girl=0; |
| | | for (TAppUser tStudent : list) { |
| | | Date birthday = tStudent.getBirthday(); |
| | | long l =0; |
| | | if(birthday!=null){ |
| | | |
| | | l = DateUtil.betweenYear(birthday, new Date(), true); |
| | | } |
| | | if(l<=12){ |
| | | age1++; |
| | | }else if(l>12 && l<18){ |
| | | age2++; |
| | | }else if(l>=19 && l<=25){ |
| | | age3++; |
| | | }else if(l>=26 && l<=35){ |
| | | age4++; |
| | | }else if(l>=36 && l<=50){ |
| | | age5++; |
| | | }else { |
| | | age6++; |
| | | } |
| | | if(tStudent.getGender()!=null &&tStudent.getGender()==1){ |
| | | boy++; |
| | | }else { |
| | | girl++; |
| | | } |
| | | } |
| | | map.put("age1",age1); |
| | | map.put("age2",age2); |
| | | map.put("age3",age3); |
| | | map.put("age4",age4); |
| | | map.put("age5",age5); |
| | | map.put("age6",age6); |
| | | map.put("boy",boy); |
| | | map.put("girl",girl); |
| | | return map; |
| | | |
| | | } |
| | | @PostMapping("/student/queryUserAgeStore") |
| | | public HashMap<String, Object> queryUserAgeStore(Integer id){ |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId,id)); |
| | | List<Integer> collect = list.stream().map(TAppUser::getId).collect(Collectors.toList()); |
| | | if(collect.size()==0){ |
| | | collect.add(-1); |
| | | } |
| | | |
| | | |
| | | Set<String> strings = list.stream().collect(Collectors.groupingBy(TAppUser::getCity)).keySet(); |
| | | ArrayList<String> strings1 = new ArrayList<>(); |
| | | ArrayList<Integer> integers = new ArrayList<>(); |
| | | |
| | | for (String string : strings) { |
| | | int a = 0; |
| | | strings1.add(string); |
| | | for (TAppUser tAppUser : list) { |
| | | if(tAppUser.getCity().equals(string)){ |
| | | a++; |
| | | } |
| | | } |
| | | integers.add(a); |
| | | } |
| | | |
| | | map.put("cityData",strings1); |
| | | map.put("cityNum",integers); |
| | | int age1=0; |
| | | int age2=0; |
| | | int age3=0; |
| | | int age4=0; |
| | | int age5=0; |
| | | int age6=0; |
| | | int boy=0; |
| | | int girl=0; |
| | | for (TAppUser tStudent : list) { |
| | | Date birthday = tStudent.getBirthday(); |
| | | long l =0; |
| | | if(birthday!=null){ |
| | | |
| | | l = DateUtil.betweenYear(birthday, new Date(), true); |
| | | } |
| | | if(l<=12){ |
| | | age1++; |
| | | }else if(l>12 && l<18){ |
| | | age2++; |
| | | }else if(l>=19 && l<=25){ |
| | | age3++; |
| | | }else if(l>=26 && l<=35){ |
| | | age4++; |
| | | }else if(l>=36 && l<=50){ |
| | | age5++; |
| | | }else { |
| | | age6++; |
| | | } |
| | | if(tStudent.getGender()!=null &&tStudent.getGender()==1){ |
| | | boy++; |
| | | }else { |
| | | girl++; |
| | | } |
| | | } |
| | | map.put("age1",age1); |
| | | map.put("age2",age2); |
| | | map.put("age3",age3); |
| | | map.put("age4",age4); |
| | | map.put("age5",age5); |
| | | map.put("age6",age6); |
| | | map.put("boy",boy); |
| | | map.put("girl",girl); |
| | | return map; |
| | | |
| | | } |
| | | @PostMapping("/student/queryUserAgeYys1") |
| | | public HashMap<String, Object> queryUserAgeYys1(@RequestBody Integer id){ |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId,id)); |
| | | List<Integer> collect = list.stream().map(TAppUser::getId).collect(Collectors.toList()); |
| | | if(collect.size()==0){ |
| | | collect.add(-1); |
| | | } |
| | | List<TStudent> list1 = studentService.list(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect)); |
| | | int age1=0; |
| | | int age2=0; |
| | | int age3=0; |
| | | int age4=0; |
| | | int boy=0; |
| | | int girl=0; |
| | | for (TStudent tStudent : list1) { |
| | | Date birthday = tStudent.getBirthday(); |
| | | long l = DateUtil.betweenYear(birthday, new Date(), true); |
| | | if(l<7){ |
| | | age1++; |
| | | }else if(l>=8 && l<11){ |
| | | age2++; |
| | | }else if(l>=11 && l<=12){ |
| | | age3++; |
| | | }else { |
| | | age4++; |
| | | } |
| | | if(tStudent.getSex()==1){ |
| | | boy++; |
| | | }else { |
| | | girl++; |
| | | } |
| | | } |
| | | map.put("age1",age1); |
| | | map.put("age2",age2); |
| | | map.put("age3",age3); |
| | | map.put("age4",age4); |
| | | map.put("boy",boy); |
| | | map.put("girl",girl); |
| | | return map; |
| | | |
| | | |
| | | } |
| | | @PostMapping("/student/queryUserAgeStore1") |
| | | public HashMap<String, Object> queryUserAgeStore1(@RequestBody Integer id){ |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId,id)); |
| | | List<Integer> collect = list.stream().map(TAppUser::getId).collect(Collectors.toList()); |
| | | if(collect.size()==0){ |
| | | collect.add(-1); |
| | | } |
| | | List<TStudent> list1 = studentService.list(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect)); |
| | | int age1=0; |
| | | int age2=0; |
| | | int age3=0; |
| | | int age4=0; |
| | | int boy=0; |
| | | int girl=0; |
| | | for (TStudent tStudent : list1) { |
| | | Date birthday = tStudent.getBirthday(); |
| | | long l = DateUtil.betweenYear(birthday, new Date(), true); |
| | | if(l<7){ |
| | | age1++; |
| | | }else if(l>=8 && l<11){ |
| | | age2++; |
| | | }else if(l>=11 && l<=12){ |
| | | age3++; |
| | | }else { |
| | | age4++; |
| | | } |
| | | if(tStudent.getSex()==1){ |
| | | boy++; |
| | | }else { |
| | | girl++; |
| | | } |
| | | } |
| | | map.put("age1",age1); |
| | | map.put("age2",age2); |
| | | map.put("age3",age3); |
| | | map.put("age4",age4); |
| | | map.put("boy",boy); |
| | | map.put("girl",girl); |
| | | return map; |
| | | |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.dsh.account.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @ApiModel(value = "运营统计查询DTO") |
| | | public class UserInfoQueryDTO implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "选择城市") |
| | | private String cityCode; |
| | | |
| | | @ApiModelProperty(value = "分类 1平台 2运营商 3门店") |
| | | private Integer insertType; |
| | | |
| | | @ApiModelProperty(value = "运营商id") |
| | | private Integer operatorId; |
| | | |
| | | @ApiModelProperty(value = "门店id") |
| | | private Integer storeId; |
| | | |
| | | @ApiModelProperty(value = "是否年费会员 0=否,1=是") |
| | | private Integer isVip; |
| | | |
| | | @ApiModelProperty(value = "开始时间,前端忽略") |
| | | private String startTime; |
| | | |
| | | @ApiModelProperty(value = "结束时间,前端忽略") |
| | | private String endTime; |
| | | |
| | | } |
| | |
| | | */ |
| | | @TableField("addUserId") |
| | | private Integer addUserId; |
| | | @TableField(exist = false) |
| | | private Integer age; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.account.dto.SelectDto; |
| | | import com.dsh.account.dto.UserInfoQueryDTO; |
| | | import com.dsh.account.entity.TAppUser; |
| | | import com.dsh.account.model.AppUserByNameAndPhoneDTO; |
| | | import com.dsh.account.model.query.appUserQuery.QueryAppUser; |
| | | import com.dsh.account.model.vo.QueryAppUserVO; |
| | | import com.dsh.account.vo.GroupCityInfoVO; |
| | | import com.dsh.account.vo.entity.DayData; |
| | | import com.dsh.account.vo.entity.MonthData; |
| | | import com.dsh.account.vo.entity.WeekData; |
| | | import com.dsh.account.vo.entity.YearData; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | |
| | | int changeState(@Param("ids") List<Integer> ids,@Param("state") Integer state); |
| | | |
| | | List<TAppUser> queryAPPUserByNameAndPhone(@Param("query") AppUserByNameAndPhoneDTO dto); |
| | | |
| | | List<YearData> getYearUserCount(@Param("dto") UserInfoQueryDTO dto); |
| | | |
| | | List<MonthData> getMonthUserCount(@Param("dto")UserInfoQueryDTO dto); |
| | | |
| | | WeekData getWeekUserCount4(@Param("dto")UserInfoQueryDTO dto); |
| | | WeekData getWeekUserCount3(@Param("dto")UserInfoQueryDTO dto); |
| | | WeekData getWeekUserCount2(@Param("dto")UserInfoQueryDTO dto); |
| | | WeekData getWeekUserCount1(@Param("dto")UserInfoQueryDTO dto); |
| | | |
| | | List<DayData> getDayUserCount(@Param("dto")UserInfoQueryDTO dto); |
| | | |
| | | List<GroupCityInfoVO> groupCityInfo(@Param("dto")UserInfoQueryDTO dto); |
| | | } |
| | |
| | | public class LoginWeChatVo { |
| | | @ApiModelProperty(value = "微信openId", dataType = "string", required = true) |
| | | private String openId; |
| | | @ApiModelProperty(value = "手机号", dataType = "string", required = true) |
| | | @ApiModelProperty(value = "手机号", dataType = "string", required = false) |
| | | private String phone; |
| | | private String nickname; |
| | | private String headimgurl; |
| | | private Integer sex; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.account.dto.SelectDto; |
| | | import com.dsh.account.dto.UserInfoQueryDTO; |
| | | import com.dsh.account.entity.TAppUser; |
| | | import com.dsh.account.model.*; |
| | | import com.dsh.account.model.query.appUserQuery.QueryAppUser; |
| | |
| | | import com.dsh.account.model.vo.classDetails.classInsVo.ClassInfoVo; |
| | | import com.dsh.account.model.vo.userBenefitDetail.*; |
| | | import com.dsh.account.util.ResultUtil; |
| | | import com.dsh.account.vo.GroupCityInfoVO; |
| | | import com.dsh.account.vo.entity.DayData; |
| | | import com.dsh.account.vo.entity.MonthData; |
| | | import com.dsh.account.vo.entity.WeekData; |
| | | import com.dsh.account.vo.entity.YearData; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | |
| | | Object changeState(AdvertisementChangeStateDTO dto); |
| | | |
| | | List<TAppUser> queryAPPUserByNameAndPhone(AppUserByNameAndPhoneDTO dto); |
| | | |
| | | |
| | | List<YearData> getYearUserCount(UserInfoQueryDTO dto); |
| | | |
| | | List<MonthData> getMonthUserCount(UserInfoQueryDTO dto); |
| | | |
| | | WeekData getWeekUserCount4(UserInfoQueryDTO dto); |
| | | WeekData getWeekUserCount3(UserInfoQueryDTO dto); |
| | | WeekData getWeekUserCount2(UserInfoQueryDTO dto); |
| | | WeekData getWeekUserCount1(UserInfoQueryDTO dto); |
| | | |
| | | List<DayData> getDayUserCount(UserInfoQueryDTO dto); |
| | | |
| | | List<GroupCityInfoVO> groupCityInfo(UserInfoQueryDTO dto); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.account.dto.SelectDto; |
| | | import com.dsh.account.dto.UserInfoQueryDTO; |
| | | import com.dsh.account.entity.*; |
| | | import com.dsh.account.enums.RechargeRecordEnum; |
| | | import com.dsh.account.feignclient.activity.IntroduceRewardsClient; |
| | |
| | | import com.dsh.account.service.TAppUserService; |
| | | import com.dsh.account.util.*; |
| | | import com.dsh.account.util.akeylogin.Md5Util; |
| | | import com.dsh.account.vo.GroupCityInfoVO; |
| | | import com.dsh.account.vo.entity.DayData; |
| | | import com.dsh.account.vo.entity.MonthData; |
| | | import com.dsh.account.vo.entity.WeekData; |
| | | import com.dsh.account.vo.entity.YearData; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Page; |
| | | import org.springframework.data.domain.PageImpl; |
| | |
| | | import java.math.BigDecimal; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | public List<TAppUser> queryAPPUserByNameAndPhone(AppUserByNameAndPhoneDTO dto) { |
| | | return appUserMapper.queryAPPUserByNameAndPhone(dto); |
| | | } |
| | | @Override |
| | | public List<YearData> getYearUserCount(UserInfoQueryDTO dto) { |
| | | return appUserMapper.getYearUserCount(dto); |
| | | } |
| | | |
| | | @Override |
| | | public List<MonthData> getMonthUserCount(UserInfoQueryDTO dto) { |
| | | List<MonthData> monthUserCount = appUserMapper.getMonthUserCount(dto); |
| | | for (int i = 1; i <= 12; i++) { |
| | | String time = String.valueOf(i); |
| | | if (i < 10) { |
| | | time = "0" + time; |
| | | } |
| | | monthUserCount.add(Optional.ofNullable(monthUserCount.get(i)).orElse(new MonthData(time, 0))); |
| | | } |
| | | return monthUserCount.stream().sorted(Comparator.comparing(MonthData::getMonth)).collect(Collectors.toList()); |
| | | } |
| | | |
| | | @Override |
| | | public WeekData getWeekUserCount4(UserInfoQueryDTO dto) { |
| | | return appUserMapper.getWeekUserCount4(dto); |
| | | } |
| | | @Override |
| | | public WeekData getWeekUserCount3(UserInfoQueryDTO dto) { |
| | | return appUserMapper.getWeekUserCount3(dto); |
| | | } |
| | | @Override |
| | | public WeekData getWeekUserCount2(UserInfoQueryDTO dto) { |
| | | return appUserMapper.getWeekUserCount2(dto); |
| | | } |
| | | @Override |
| | | public WeekData getWeekUserCount1(UserInfoQueryDTO dto) { |
| | | return appUserMapper.getWeekUserCount1(dto); |
| | | } |
| | | |
| | | @Override |
| | | public List<DayData> getDayUserCount(UserInfoQueryDTO dto) { |
| | | List<DayData> dayUserCount = appUserMapper.getDayUserCount(dto); |
| | | if(dayUserCount.size()<7){ |
| | | for (int i = 1; i <= 6; i++) { |
| | | String time = LocalDate.now().minusDays(i).toString(); |
| | | for (DayData dayData : dayUserCount) { |
| | | if(!time.equals(dayData.getDay())){ |
| | | dayUserCount.add(new DayData(time,0)); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | dayUserCount.forEach(dayData->dayData.setDay(dayData.getDay().split("-")[2])); |
| | | return dayUserCount.stream().sorted(Comparator.comparing(DayData::getDay)).collect(Collectors.toList()); |
| | | } |
| | | |
| | | @Override |
| | | public List<GroupCityInfoVO> groupCityInfo(UserInfoQueryDTO dto) { |
| | | return appUserMapper.groupCityInfo(dto); |
| | | } |
| | | @Override |
| | | public ClassInfoVo queryUserOfStus(Integer id) { |
| | | TAppUser tAppUser = this.baseMapper.selectById(id); |
| | |
| | | @Override |
| | | public ResultUtil loginWechat(LoginWeChatVo loginWechatVo) throws Exception { |
| | | TAppUser tAppUser = this.baseMapper.selectOne(new QueryWrapper<TAppUser>().eq("openid", loginWechatVo.getOpenId()).ne("state", 3)); |
| | | |
| | | if(null == tAppUser){ |
| | | tAppUser = this.baseMapper.selectOne(new QueryWrapper<TAppUser>().eq("phone", loginWechatVo.getPhone()).ne("state", 3)); |
| | | if(null == tAppUser){ |
| | |
| | | tAppUser.setPhone(loginWechatVo.getPhone()); |
| | | tAppUser.setPassword(Md5Util.MD5Encode("111111", null)); |
| | | tAppUser.setIsVip(0); |
| | | tAppUser.setName(loginWechatVo.getNickname()); |
| | | tAppUser.setHeadImg(loginWechatVo.getHeadimgurl()); |
| | | tAppUser.setGender(loginWechatVo.getSex()); |
| | | tAppUser.setState(1); |
| | | tAppUser.setInsertTime(new Date()); |
| | | this.baseMapper.insert(tAppUser); |
| | |
| | | this.updateById(tAppUser); |
| | | |
| | | String token = getToken(tAppUser); |
| | | return ResultUtil.success(token); |
| | | |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | map.put("token",token); |
| | | if(ToolUtil.isEmpty(tAppUser.getPhone())){ |
| | | map.put("isBind","0"); |
| | | }else { |
| | | map.put("isBind","1"); |
| | | } |
| | | return ResultUtil.success(map); |
| | | } |
| | | |
| | | |
New file |
| | |
| | | package com.dsh.account.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | public class GroupCityInfoVO implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "市code") |
| | | private String cityCode; |
| | | @ApiModelProperty(value = "市区") |
| | | private String city; |
| | | @ApiModelProperty(value = "数量") |
| | | private Integer userCount; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.account.vo; |
| | | |
| | | import com.dsh.account.vo.entity.DayData; |
| | | import com.dsh.account.vo.entity.MonthData; |
| | | import com.dsh.account.vo.entity.WeekData; |
| | | import com.dsh.account.vo.entity.YearData; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Data |
| | | public class UserInfoQueryVO implements Serializable { |
| | | |
| | | |
| | | @ApiModelProperty(value = "用户总数") |
| | | private Integer userCount; |
| | | @ApiModelProperty(value = "年费会员总数") |
| | | private Integer userVipCount; |
| | | |
| | | @ApiModelProperty(value = "年度数据") |
| | | private List<YearData> yearData; |
| | | @ApiModelProperty(value = "月度数据") |
| | | private List<MonthData> monthData; |
| | | @ApiModelProperty(value = "周度数据") |
| | | private List<WeekData> weekData; |
| | | @ApiModelProperty(value = "日度数据") |
| | | private List<DayData> dayData; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.account.vo.entity; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import lombok.ToString; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ToString |
| | | public class DayData implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "日") |
| | | private String day; |
| | | |
| | | @ApiModelProperty(value = "数量") |
| | | private Integer dayCount; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.account.vo.entity; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class MonthData implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "月份") |
| | | private String month; |
| | | |
| | | @ApiModelProperty(value = "数量") |
| | | private Integer monthCount; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.account.vo.entity; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | public class WeekData implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "周") |
| | | private String week; |
| | | |
| | | @ApiModelProperty(value = "数量") |
| | | private Integer weekCount; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.account.vo.entity; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | public class YearData implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "年份") |
| | | private String year; |
| | | |
| | | @ApiModelProperty(value = "数量") |
| | | private Integer yearCount; |
| | | |
| | | } |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <select id="getYearUserCount" resultType="com.dsh.account.vo.entity.YearData"> |
| | | select IFNULL(count(*),0) AS yearCount,DATE_FORMAT(insertTime,'%Y') AS `year` from t_app_user |
| | | <where> |
| | | <if test="dto.cityCode != null and dto.cityCode != ''"> |
| | | AND cityCode = #{dto.cityCode} |
| | | </if> |
| | | <if test="dto.isVip != null"> |
| | | AND isVip = #{dto.isVip} |
| | | </if> |
| | | <if test="dto.insertType != null and dto.insertType == 2 and dto.operatorId != null"> |
| | | AND insertType = 2 |
| | | AND addUserId = #{dto.operatorId} |
| | | </if> |
| | | <if test="dto.insertType != null and dto.insertType == 3 and dto.storeId != null"> |
| | | AND insertType = 3 |
| | | AND addUserId = #{dto.storeId} |
| | | </if> |
| | | </where> |
| | | GROUP BY DATE_FORMAT(insertTime,'%Y') |
| | | </select> |
| | | <select id="getMonthUserCount" resultType="com.dsh.account.vo.entity.MonthData"> |
| | | select IFNULL(count(*),0) AS monthCount,DATE_FORMAT(insertTime,'%Y%m') AS `month` from t_app_user |
| | | <where> |
| | | <if test="dto.cityCode != null and dto.cityCode != ''"> |
| | | AND cityCode = #{dto.cityCode} |
| | | </if> |
| | | <if test="dto.isVip != null"> |
| | | AND isVip = #{dto.isVip} |
| | | </if> |
| | | <if test="dto.insertType != null and dto.insertType == 2 and dto.operatorId != null"> |
| | | AND insertType = 2 |
| | | AND addUserId = #{dto.operatorId} |
| | | </if> |
| | | <if test="dto.insertType != null and dto.insertType == 3 and dto.storeId != null"> |
| | | AND insertType = 3 |
| | | AND addUserId = #{dto.storeId} |
| | | </if> |
| | | </where> |
| | | GROUP BY DATE_FORMAT(insertTime,'%Y%m') |
| | | </select> |
| | | <select id="getWeekUserCount4" resultType="com.dsh.account.vo.entity.WeekData"> |
| | | select IFNULL(count(*),0) AS weekCount,4 AS `week` from t_app_user |
| | | <where> |
| | | <if test="dto.startTime != null and dto.startTime != '' and dto.endTime != null and dto.endTime != ''"> |
| | | AND insertTime between #{dto.startTime} and #{dto.endTime} |
| | | </if> |
| | | <if test="dto.cityCode != null and dto.cityCode != ''"> |
| | | AND cityCode = #{dto.cityCode} |
| | | </if> |
| | | <if test="dto.isVip != null"> |
| | | AND isVip = #{dto.isVip} |
| | | </if> |
| | | <if test="dto.insertType != null and dto.insertType == 2 and dto.operatorId != null"> |
| | | AND insertType = 2 |
| | | AND addUserId = #{dto.operatorId} |
| | | </if> |
| | | <if test="dto.insertType != null and dto.insertType == 3 and dto.storeId != null"> |
| | | AND insertType = 3 |
| | | AND addUserId = #{dto.storeId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="getWeekUserCount3" resultType="com.dsh.account.vo.entity.WeekData"> |
| | | select IFNULL(count(*),0) AS weekCount,3 AS `week` from t_app_user |
| | | <where> |
| | | <if test="dto.startTime != null and dto.startTime != '' and dto.endTime != null and dto.endTime != ''"> |
| | | AND insertTime between #{dto.startTime} and #{dto.endTime} |
| | | </if> |
| | | <if test="dto.cityCode != null and dto.cityCode != ''"> |
| | | AND cityCode = #{dto.cityCode} |
| | | </if> |
| | | <if test="dto.isVip != null"> |
| | | AND isVip = #{dto.isVip} |
| | | </if> |
| | | <if test="dto.insertType != null and dto.insertType == 2 and dto.operatorId != null"> |
| | | AND insertType = 2 |
| | | AND addUserId = #{dto.operatorId} |
| | | </if> |
| | | <if test="dto.insertType != null and dto.insertType == 3 and dto.storeId != null"> |
| | | AND insertType = 3 |
| | | AND addUserId = #{dto.storeId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="getWeekUserCount2" resultType="com.dsh.account.vo.entity.WeekData"> |
| | | select IFNULL(count(*),0) AS weekCount,2 AS `week` from t_app_user |
| | | <where> |
| | | <if test="dto.startTime != null and dto.startTime != '' and dto.endTime != null and dto.endTime != ''"> |
| | | AND insertTime between #{dto.startTime} and #{dto.endTime} |
| | | </if> |
| | | <if test="dto.cityCode != null and dto.cityCode != ''"> |
| | | AND cityCode = #{dto.cityCode} |
| | | </if> |
| | | <if test="dto.isVip != null"> |
| | | AND isVip = #{dto.isVip} |
| | | </if> |
| | | <if test="dto.insertType != null and dto.insertType == 2 and dto.operatorId != null"> |
| | | AND insertType = 2 |
| | | AND addUserId = #{dto.operatorId} |
| | | </if> |
| | | <if test="dto.insertType != null and dto.insertType == 3 and dto.storeId != null"> |
| | | AND insertType = 3 |
| | | AND addUserId = #{dto.storeId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="getWeekUserCount1" resultType="com.dsh.account.vo.entity.WeekData"> |
| | | select IFNULL(count(*),0) AS weekCount,1 AS `week` from t_app_user |
| | | <where> |
| | | <if test="dto.startTime != null and dto.startTime != '' and dto.endTime != null and dto.endTime != ''"> |
| | | AND insertTime between #{dto.startTime} and #{dto.endTime} |
| | | </if> |
| | | <if test="dto.cityCode != null and dto.cityCode != ''"> |
| | | AND cityCode = #{dto.cityCode} |
| | | </if> |
| | | <if test="dto.isVip != null"> |
| | | AND isVip = #{dto.isVip} |
| | | </if> |
| | | <if test="dto.insertType != null and dto.insertType == 2 and dto.operatorId != null"> |
| | | AND insertType = 2 |
| | | AND addUserId = #{dto.operatorId} |
| | | </if> |
| | | <if test="dto.insertType != null and dto.insertType == 3 and dto.storeId != null"> |
| | | AND insertType = 3 |
| | | AND addUserId = #{dto.storeId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="getDayUserCount" resultType="com.dsh.account.vo.entity.DayData"> |
| | | select IFNULL(count(*),0) AS dayCount,DATE_FORMAT(insertTime,'%Y-%m-%d') AS `day` from t_app_user |
| | | <where> |
| | | <if test="dto.startTime != null and dto.startTime != '' and dto.endTime != null and dto.endTime != ''"> |
| | | AND insertTime between #{dto.startTime} and #{dto.endTime} |
| | | </if> |
| | | <if test="dto.cityCode != null and dto.cityCode != ''"> |
| | | AND cityCode = #{dto.cityCode} |
| | | </if> |
| | | <if test="dto.isVip != null"> |
| | | AND isVip = #{dto.isVip} |
| | | </if> |
| | | <if test="dto.insertType != null and dto.insertType == 2 and dto.operatorId != null"> |
| | | AND insertType = 2 |
| | | AND addUserId = #{dto.operatorId} |
| | | </if> |
| | | <if test="dto.insertType != null and dto.insertType == 3 and dto.storeId != null"> |
| | | AND insertType = 3 |
| | | AND addUserId = #{dto.storeId} |
| | | </if> |
| | | </where> |
| | | GROUP BY DATE_FORMAT(insertTime,'%Y-%m-%d') |
| | | </select> |
| | | <select id="groupCityInfo" resultType="com.dsh.account.vo.GroupCityInfoVO"> |
| | | select IFNULL(count(*),0) AS userCount,cityCode,city from t_app_user |
| | | <where> |
| | | <if test="dto.startTime != null and dto.startTime != '' and dto.endTime != null and dto.endTime != ''"> |
| | | AND insertTime between #{dto.startTime} and #{dto.endTime} |
| | | </if> |
| | | <if test="dto.cityCode != null and dto.cityCode != ''"> |
| | | AND cityCode = #{dto.cityCode} |
| | | </if> |
| | | <if test="dto.isVip != null"> |
| | | AND isVip = #{dto.isVip} |
| | | </if> |
| | | <if test="dto.insertType != null and dto.insertType == 2 and dto.operatorId != null"> |
| | | AND insertType = 2 |
| | | AND addUserId = #{dto.operatorId} |
| | | </if> |
| | | <if test="dto.insertType != null and dto.insertType == 3 and dto.storeId != null"> |
| | | AND insertType = 3 |
| | | AND addUserId = #{dto.storeId} |
| | | </if> |
| | | </where> |
| | | GROUP BY cityCode |
| | | </select> |
| | | </mapper> |
| | |
| | | #¿ª·¢»·¾³ |
| | | datasource.master0.type=com.alibaba.druid.pool.DruidDataSource |
| | | datasource.master0.driverClassName=com.mysql.cj.jdbc.Driver |
| | | datasource.master0.url=jdbc:mysql://8.137.22.229:3306/playpai_account?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai |
| | | datasource.master0.url=jdbc:mysql://192.168.110.80:3306/playpai_account?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai |
| | | datasource.master0.username=root |
| | | datasource.master0.password=playpai2023! |
| | | datasource.master0.password=123456 |
| | | datasource.master0.maxActive=20 |
| | | datasource.master0.maxWait=60000 |
| | | datasource.master0.minIdle=5 |
| | |
| | | #¿ª·¢»·¾³ |
| | | datasource.master0.type=com.alibaba.druid.pool.DruidDataSource |
| | | datasource.master0.driverClassName=com.mysql.cj.jdbc.Driver |
| | | datasource.master0.url=jdbc:mysql://8.137.22.229:3306/playpai_activity?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai |
| | | datasource.master0.url=jdbc:mysql://192.168.110.80:3306/playpai_activity?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai |
| | | datasource.master0.username=root |
| | | datasource.master0.password=playpai2023! |
| | | datasource.master0.password=123456 |
| | | datasource.master0.maxActive=20 |
| | | datasource.master0.maxWait=60000 |
| | | datasource.master0.minIdle=5 |
| | |
| | | */ |
| | | @PostMapping("/store/queryStoreById") |
| | | Store queryStoreById(Integer id); |
| | | |
| | | @PostMapping("/store/addBackRecord") |
| | | void addBackRecord(String s); |
| | | |
| | | |
| | | } |
| | |
| | | String refund_id = map.get("refund_id"); |
| | | paymentCompetition.setRefundOrderNo(refund_id); |
| | | this.updateById(paymentCompetition); |
| | | |
| | | storeClient.addBackRecord(paymentCompetition.getAmount()+"_"+paymentCompetition.getAppUserId()); |
| | | |
| | | |
| | | } |
| | | if(paymentCompetition.getPayType() == 2){//支付宝支付 |
| | | Map<String, String> map = payMoneyUtil.aliRefund(payOrderNo, amount.toString()); |
| | |
| | | #¿ª·¢»·¾³ |
| | | datasource.master0.type=com.alibaba.druid.pool.DruidDataSource |
| | | datasource.master0.driverClassName=com.mysql.cj.jdbc.Driver |
| | | datasource.master0.url=jdbc:mysql://8.137.22.229:3306/playpai_competition?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai |
| | | datasource.master0.url=jdbc:mysql://192.168.110.80:3306/playpai_competition?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai |
| | | datasource.master0.username=root |
| | | datasource.master0.password=playpai2023! |
| | | datasource.master0.password=123456 |
| | | datasource.master0.maxActive=20 |
| | | datasource.master0.maxWait=60000 |
| | | datasource.master0.minIdle=5 |
| | |
| | | |
| | | @PostMapping("/student/queryUserAge") |
| | | HashMap<String, Object> queryUserAge(); |
| | | @PostMapping("/student/queryUserAge1") |
| | | HashMap<String, Object> queryUserAge1(); |
| | | @PostMapping("/student/getUserYYs") |
| | | List<Integer> getUserYYs(Integer id); |
| | | |
| | | @PostMapping("/student/queryUserAgeYys") |
| | | HashMap<String, Object> queryUserAgeYys(Integer id); |
| | | @PostMapping("/student/queryUserAgeStore") |
| | | HashMap<String, Object> queryUserAgeStore(Integer id); |
| | | |
| | | @PostMapping("/student/queryUserAgeYys1") |
| | | HashMap<String, Object> queryUserAgeYys1(Integer id); |
| | | @PostMapping("/student/queryUserAgeStore1") |
| | | HashMap<String, Object> queryUserAgeStore1(Integer id); |
| | | |
| | | @PostMapping("/student/getUserStore") |
| | | List<Integer> getUserStore(Integer id); |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.mapper; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.guns.modular.system.model.TBackRecord; |
| | | |
| | | /** |
| | | * <p> |
| | | * 退费记录 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2023-10-09 |
| | | */ |
| | | public interface TBackRecordMapper extends BaseMapper<TBackRecord> { |
| | | |
| | | } |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.dsh.course.feignClient.account.*; |
| | | import com.dsh.course.feignClient.account.model.CityManager; |
| | |
| | | |
| | | @Autowired |
| | | private CourseClient courseClient; |
| | | |
| | | @Autowired |
| | | private IStoreService storeService; |
| | | @Autowired |
| | | private VipPaymentClient vipPaymentClient; |
| | | @Autowired |
| | |
| | | private CourseStuddentClient courseStuddentClient; |
| | | @Autowired |
| | | private CoursePackageClient coursePackageClient; |
| | | @Autowired |
| | | private TOperatorService operatorService; |
| | | /** |
| | | * 跳转到平台统计数据页面 |
| | | */ |
| | |
| | | // 最后put |
| | | monthlyData.put("yearMount",objects); |
| | | |
| | | ArrayList<Object> integers = new ArrayList<>(); |
| | | int year = DateUtil.year(new Date()); |
| | | for (int i = 0; i < 10; i++) { |
| | | integers.add(year-i); |
| | | } |
| | | List<Object> collect = integers.stream().sorted().collect(Collectors.toList()); |
| | | monthlyData.put("year",collect); |
| | | return monthlyData; |
| | | } |
| | | |
| | |
| | | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | private TBackRecordService backRecordService; |
| | | |
| | | @RequestMapping(value = "/backPt") |
| | | @ResponseBody |
| | | public Object backPt(Integer type) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | List<Integer> userPt = appUserClient.getUserPt(Arrays.asList(1)); |
| | | if(userPt.size()==0){ |
| | | userPt.add(-1); |
| | | } |
| | | ArrayList<Object> integers = new ArrayList<>(); |
| | | int year = DateUtil.year(new Date()); |
| | | List<TBackRecord> thisYear = backRecordService.list(new LambdaQueryWrapper<TBackRecord>().like(TBackRecord::getTime, year).in(TBackRecord::getUserId,userPt)); |
| | | double sum5 = thisYear.stream().mapToDouble(TBackRecord::getMoney).sum(); |
| | | map.put("thisYear",sum5); |
| | | |
| | | List<TBackRecord> thisMonth = backRecordService.list(new LambdaQueryWrapper<TBackRecord>().like(TBackRecord::getTime, new SimpleDateFormat("yyyy-MM").format(new Date())).in(TBackRecord::getUserId,userPt)); |
| | | double sum6= thisMonth.stream().mapToDouble(TBackRecord::getMoney).sum(); |
| | | map.put("thisMonth",sum6); |
| | | |
| | | |
| | | |
| | | for (int i = 0; i < 10; i++) { |
| | | integers.add(year-i); |
| | | } |
| | | List<Object> collect = integers.stream().sorted().collect(Collectors.toList()); |
| | | // 年 |
| | | ArrayList<Double> years = new ArrayList<>(); |
| | | for (Object o : collect) { |
| | | double sum=0.0; |
| | | String s = o.toString(); |
| | | List<TBackRecord> list = backRecordService.list(new LambdaQueryWrapper<TBackRecord>().like(TBackRecord::getTime, s).in(TBackRecord::getUserId,userPt)); |
| | | sum = list.stream().mapToDouble(TBackRecord::getMoney).sum(); |
| | | years.add(sum); |
| | | } |
| | | ArrayList<Double> months = new ArrayList<>(); |
| | | // 月 |
| | | for (int i = 1; i <= 12; i++) { |
| | | double sum=0.0; |
| | | String m=i+""; |
| | | if(i<10){ |
| | | m="0"+i; |
| | | } |
| | | String s = year + "-" + m; |
| | | List<TBackRecord> list = backRecordService.list(new LambdaQueryWrapper<TBackRecord>().like(TBackRecord::getTime, s).in(TBackRecord::getUserId,userPt)); |
| | | sum = list.stream().mapToDouble(TBackRecord::getMoney).sum(); |
| | | months.add(sum); |
| | | } |
| | | |
| | | // 获取最近四周 |
| | | LocalDateTime minNow = LocalDateTime.now().with(LocalTime.MIN); |
| | | LocalDateTime maxNow = LocalDateTime.now().with(LocalTime.MAX); |
| | | // 周度数据 |
| | | String s1 = minNow.minusDays(6).toString(); |
| | | String s2 = maxNow.toString(); |
| | | |
| | | String s3 = minNow.minusDays(13).toString(); |
| | | String s4 = maxNow.minusDays(6).toString(); |
| | | |
| | | |
| | | String s5 = minNow.minusDays(20).toString(); |
| | | String s6 = maxNow.minusDays(13).toString(); |
| | | |
| | | String s7 = minNow.minusDays(27).toString(); |
| | | String s8 = maxNow.minusDays(20).toString(); |
| | | |
| | | List<TBackRecord> list = backRecordService.list(new LambdaQueryWrapper<TBackRecord>().between(TBackRecord::getTime, s7,s8).in(TBackRecord::getUserId,userPt)); |
| | | double sum = list.stream().mapToDouble(TBackRecord::getMoney).sum(); |
| | | |
| | | List<TBackRecord> list1 = backRecordService.list(new LambdaQueryWrapper<TBackRecord>().between(TBackRecord::getTime, s5,s6).in(TBackRecord::getUserId,userPt)); |
| | | double sum1 = list1.stream().mapToDouble(TBackRecord::getMoney).sum(); |
| | | List<TBackRecord> list2 = backRecordService.list(new LambdaQueryWrapper<TBackRecord>().between(TBackRecord::getTime, s3,s4).in(TBackRecord::getUserId,userPt)); |
| | | double sum2 = list2.stream().mapToDouble(TBackRecord::getMoney).sum(); |
| | | List<TBackRecord> list3 = backRecordService.list(new LambdaQueryWrapper<TBackRecord>().between(TBackRecord::getTime, s1,s2).in(TBackRecord::getUserId,userPt)); |
| | | double sum3 = list3.stream().mapToDouble(TBackRecord::getMoney).sum(); |
| | | |
| | | map.put("thisWeek",sum3); |
| | | |
| | | ArrayList<Double> week = new ArrayList<>(); |
| | | week.add(sum); |
| | | week.add(sum1); |
| | | week.add(sum2); |
| | | week.add(sum3); |
| | | |
| | | // 日 |
| | | ArrayList<Double> days = new ArrayList<>(); |
| | | Double thisDay=0.0; |
| | | for (int i = 6; i >= 0; i--) { |
| | | String s = minNow.minusDays(i).toString(); |
| | | String s9 = maxNow.minusDays(i).toString(); |
| | | List<TBackRecord> day = backRecordService.list(new LambdaQueryWrapper<TBackRecord>().between(TBackRecord::getTime, s,s9).in(TBackRecord::getUserId,userPt)); |
| | | double sum4 = day.stream().mapToDouble(TBackRecord::getMoney).sum(); |
| | | days.add(sum4); |
| | | if(i==0){ |
| | | thisDay=sum4; |
| | | } |
| | | } |
| | | |
| | | map.put("thisDay",thisDay); |
| | | map.put("yearData",years); |
| | | map.put("monthData",months); |
| | | map.put("weekData",week); |
| | | map.put("dayData",days); |
| | | |
| | | return map; |
| | | } |
| | | /** |
| | | * 跳转到运营商统计数据页面 |
| | | */ |
| | | @RequestMapping("/operator") |
| | | public String operator(Model model) { |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | List<CityManager> cityManagers = cityManagerClient.listAll(); |
| | | HashSet<String> city = new HashSet<>(); |
| | | List<CityManager> list = new ArrayList<>(); |
| | | for (CityManager cityManager : cityManagers) { |
| | | if (!city.contains(cityManager.getCity())){ |
| | | city.add(cityManager.getCity()); |
| | | list.add(cityManager); |
| | | } |
| | | } |
| | | List<TOperator> list = operatorService.list(new LambdaQueryWrapper<TOperator>().ne(TOperator::getState, 3)); |
| | | model.addAttribute("list",list); |
| | | model.addAttribute("objectType",objectType); |
| | | return PREFIX + "operatorIncome.html"; |
| | | } |
| | | |
| | | /** |
| | | * 运营商 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("/selectYys") |
| | | public Object selectYys(Integer id,String time) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | // 找出平台的用户 |
| | | List<User> list = sysUserService.list(new LambdaQueryWrapper<User>().eq(User::getObjectType, 2)); |
| | | List<Integer> ids = list.stream().map(User::getId).collect(Collectors.toList()); |
| | | List<Integer> userIds = appUserClient.getUserYYs(id); |
| | | QueryDataFee queryDataFee = new QueryDataFee(time, userIds); |
| | | // 会员费 |
| | | HashMap<String, Object> map1 = appUserClient.queryFee(queryDataFee); |
| | | Object fee1 = map1.get("fee1"); |
| | | |
| | | map.put("fee1",fee1); |
| | | //玩湃比 |
| | | Object fee2 = map1.get("fee2"); |
| | | map.put("fee2",fee2); |
| | | // 课程收入 |
| | | HashMap<String, Object> map3 = courseClient.queryFee(queryDataFee); |
| | | map.put("fee3",map3.get("fee")); |
| | | Object data = map3.get("data"); |
| | | map.put("courseData",data); |
| | | |
| | | |
| | | // 赛事收入 |
| | | Double aDouble1 = competitionClient.queryFee(queryDataFee); |
| | | map.put("fee4",aDouble1); |
| | | |
| | | // 订场 |
| | | if(ids.size()==0){ |
| | | ids.add(-1); |
| | | } |
| | | LambdaQueryWrapper<SiteBooking> vipPaymentLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | if(ToolUtil.isNotEmpty(time)){ |
| | | String stime = time.split(" - ")[0]+" 00:00:00"; |
| | | String etime = time.split(" - ")[1]+" 23:59:59"; |
| | | vipPaymentLambdaQueryWrapper.between(SiteBooking::getInsertTime,stime,etime); |
| | | } |
| | | if(userIds.size()==0){ |
| | | userIds.add(-1); |
| | | } |
| | | vipPaymentLambdaQueryWrapper.in(SiteBooking::getAppUserId,userIds); |
| | | vipPaymentLambdaQueryWrapper.ne(SiteBooking::getStatus,0); |
| | | ArrayList<Integer> objects = new ArrayList<>(); |
| | | objects.add(1); |
| | | objects.add(2); |
| | | vipPaymentLambdaQueryWrapper.in(SiteBooking::getPayType,objects); |
| | | List<SiteBooking> list1 = siteBookingService.list(vipPaymentLambdaQueryWrapper); |
| | | double sum = list1.stream().mapToDouble(SiteBooking::getPayMoney).sum(); |
| | | map.put("fee5",sum); |
| | | |
| | | |
| | | List<Integer> collect = list1.stream().map(SiteBooking::getSiteId).collect(Collectors.toList()); |
| | | if(collect.size()==0){ |
| | | collect.add(-1); |
| | | } |
| | | List<TSite> list3 = siteService.list(new LambdaQueryWrapper<TSite>().in(TSite::getId, collect)); |
| | | for (SiteBooking siteBooking : list1) { |
| | | for (TSite tSite : list3) { |
| | | if(siteBooking.getSiteId().equals(tSite.getId())){ |
| | | siteBooking.setType(tSite.getSiteTypeId()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | List<TSiteType> list2 = siteTypeService.list(); |
| | | |
| | | List<Map<String,Object>> mapList = new ArrayList<>(); |
| | | |
| | | for (TSiteType tSiteType : list2) { |
| | | HashMap<String, Object> map2 = new HashMap<>(); |
| | | map2.put("name",tSiteType.getName()); |
| | | double a =0; |
| | | for (SiteBooking siteBooking : list1) { |
| | | if(tSiteType.getId().equals(siteBooking.getType())){ |
| | | a += siteBooking.getPayMoney(); |
| | | } |
| | | } |
| | | map2.put("value",a); |
| | | mapList.add(map2); |
| | | } |
| | | map.put("siteData",mapList); |
| | | |
| | | |
| | | // 商品 门票 |
| | | HashMap<String, Object> map2 = pointMercharsClient.queryFee(queryDataFee); |
| | | Object all = map2.get("all"); |
| | | Object day = map2.get("day"); |
| | | Object month = map2.get("month"); |
| | | Object quarter = map2.get("quarter"); |
| | | Object year = map2.get("year"); |
| | | map.put("fee7",all); |
| | | map.put("dayone",day); |
| | | map.put("monthone",month); |
| | | map.put("quarterone",quarter); |
| | | map.put("yearone",year); |
| | | |
| | | return map; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 运营商 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("/selectStore") |
| | | public Object selectStore(Integer id,String time) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | // 找出平台的用户 |
| | | List<User> list = sysUserService.list(new LambdaQueryWrapper<User>().eq(User::getObjectType, 2)); |
| | | List<Integer> ids = list.stream().map(User::getId).collect(Collectors.toList()); |
| | | List<Integer> userIds = appUserClient.getUserStore(id); |
| | | QueryDataFee queryDataFee = new QueryDataFee(time, userIds); |
| | | // 会员费 |
| | | HashMap<String, Object> map1 = appUserClient.queryFee(queryDataFee); |
| | | Object fee1 = map1.get("fee1"); |
| | | |
| | | map.put("fee1",fee1); |
| | | //玩湃比 |
| | | Object fee2 = map1.get("fee2"); |
| | | map.put("fee2",fee2); |
| | | // 课程收入 |
| | | HashMap<String, Object> map3 = courseClient.queryFee(queryDataFee); |
| | | map.put("fee3",map3.get("fee")); |
| | | Object data = map3.get("data"); |
| | | map.put("courseData",data); |
| | | |
| | | |
| | | // 赛事收入 |
| | | Double aDouble1 = competitionClient.queryFee(queryDataFee); |
| | | map.put("fee4",aDouble1); |
| | | |
| | | // 订场 |
| | | if(ids.size()==0){ |
| | | ids.add(-1); |
| | | } |
| | | LambdaQueryWrapper<SiteBooking> vipPaymentLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | if(ToolUtil.isNotEmpty(time)){ |
| | | String stime = time.split(" - ")[0]+" 00:00:00"; |
| | | String etime = time.split(" - ")[1]+" 23:59:59"; |
| | | vipPaymentLambdaQueryWrapper.between(SiteBooking::getInsertTime,stime,etime); |
| | | } |
| | | if(userIds.size()==0){ |
| | | userIds.add(-1); |
| | | } |
| | | vipPaymentLambdaQueryWrapper.in(SiteBooking::getAppUserId,userIds); |
| | | vipPaymentLambdaQueryWrapper.ne(SiteBooking::getStatus,0); |
| | | ArrayList<Integer> objects = new ArrayList<>(); |
| | | objects.add(1); |
| | | objects.add(2); |
| | | vipPaymentLambdaQueryWrapper.in(SiteBooking::getPayType,objects); |
| | | List<SiteBooking> list1 = siteBookingService.list(vipPaymentLambdaQueryWrapper); |
| | | double sum = list1.stream().mapToDouble(SiteBooking::getPayMoney).sum(); |
| | | map.put("fee5",sum); |
| | | |
| | | |
| | | List<Integer> collect = list1.stream().map(SiteBooking::getSiteId).collect(Collectors.toList()); |
| | | if(collect.size()==0){ |
| | | collect.add(-1); |
| | | } |
| | | List<TSite> list3 = siteService.list(new LambdaQueryWrapper<TSite>().in(TSite::getId, collect)); |
| | | for (SiteBooking siteBooking : list1) { |
| | | for (TSite tSite : list3) { |
| | | if(siteBooking.getSiteId().equals(tSite.getId())){ |
| | | siteBooking.setType(tSite.getSiteTypeId()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | List<TSiteType> list2 = siteTypeService.list(); |
| | | |
| | | List<Map<String,Object>> mapList = new ArrayList<>(); |
| | | |
| | | for (TSiteType tSiteType : list2) { |
| | | HashMap<String, Object> map2 = new HashMap<>(); |
| | | map2.put("name",tSiteType.getName()); |
| | | double a =0; |
| | | for (SiteBooking siteBooking : list1) { |
| | | if(tSiteType.getId().equals(siteBooking.getType())){ |
| | | a += siteBooking.getPayMoney(); |
| | | } |
| | | } |
| | | map2.put("value",a); |
| | | mapList.add(map2); |
| | | } |
| | | map.put("siteData",mapList); |
| | | |
| | | |
| | | // 商品 门票 |
| | | HashMap<String, Object> map2 = pointMercharsClient.queryFee(queryDataFee); |
| | | Object all = map2.get("all"); |
| | | Object day = map2.get("day"); |
| | | Object month = map2.get("month"); |
| | | Object quarter = map2.get("quarter"); |
| | | Object year = map2.get("year"); |
| | | map.put("fee7",all); |
| | | map.put("dayone",day); |
| | | map.put("monthone",month); |
| | | map.put("quarterone",quarter); |
| | | map.put("yearone",year); |
| | | |
| | | return map; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到门店统计数据页面 |
| | | */ |
| | | @RequestMapping("/store") |
| | | public String store(Model model) { |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | List<CityManager> cityManagers = cityManagerClient.listAll(); |
| | | HashSet<String> city = new HashSet<>(); |
| | | List<CityManager> list = new ArrayList<>(); |
| | | for (CityManager cityManager : cityManagers) { |
| | | if (!city.contains(cityManager.getCity())){ |
| | | city.add(cityManager.getCity()); |
| | | list.add(cityManager); |
| | | } |
| | | } |
| | | List<TStore> list = storeService.list(new LambdaQueryWrapper<TStore>().eq(TStore::getState, 1)); |
| | | model.addAttribute("list",list); |
| | | model.addAttribute("objectType",objectType); |
| | | return PREFIX + "storeIncome.html"; |
| | |
| | | map.put("data2",objects3); |
| | | return map; |
| | | } |
| | | @RequestMapping("/stuUserData") |
| | | @ResponseBody |
| | | public Object stuUserData() { |
| | | ArrayList<Integer> objects = new ArrayList<>(); |
| | | objects.add(1); |
| | | HashMap<String, Object> map = appUserClient.queryUserAge1(); |
| | | |
| | | return map; |
| | | } |
| | | @RequestMapping("/stuUserDataYys") |
| | | @ResponseBody |
| | | public Object stuUserDataYys(Integer id) { |
| | | ArrayList<Integer> objects = new ArrayList<>(); |
| | | objects.add(1); |
| | | HashMap<String, Object> map = appUserClient.queryUserAgeYys(id); |
| | | |
| | | return map; |
| | | } |
| | | @RequestMapping("/stuUserDataStore") |
| | | @ResponseBody |
| | | public Object stuUserDataStore(Integer id) { |
| | | ArrayList<Integer> objects = new ArrayList<>(); |
| | | objects.add(1); |
| | | HashMap<String, Object> map = appUserClient.queryUserAgeStore(id); |
| | | |
| | | return map; |
| | | } |
| | | @RequestMapping("/selectYysJx") |
| | | @ResponseBody |
| | | public Object selectYysJx(Integer id) { |
| | | ArrayList<Integer> objects = new ArrayList<>(); |
| | | objects.add(1); |
| | | HashMap<String, Object> map1 = appUserClient.queryUserAgeYys1(id); |
| | | // 找出运营商的用户 |
| | | List<Integer> userYYs = appUserClient.getUserYYs(id); |
| | | |
| | | |
| | | List<Map<String, Object>> mapList = coursePackagePaymentClient.queryCourseData(userYYs); |
| | | ArrayList<Object> objects2 = new ArrayList<>(); |
| | | ArrayList<Object> objects3 = new ArrayList<>(); |
| | | for (Map<String, Object> map : mapList) { |
| | | Object name = map.get("name"); |
| | | Object value = map.get("value"); |
| | | objects2.add(name); |
| | | objects3.add(value); |
| | | } |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map1.put("data1",objects2); |
| | | map1.put("data2",objects3); |
| | | |
| | | |
| | | return map1; |
| | | } |
| | | @RequestMapping("/selectStoreJx") |
| | | @ResponseBody |
| | | public Object selectStoreJx(Integer id) { |
| | | ArrayList<Integer> objects = new ArrayList<>(); |
| | | objects.add(1); |
| | | HashMap<String, Object> map1 = appUserClient.queryUserAgeStore1(id); |
| | | // 找出运营商的用户 |
| | | List<Integer> userYYs = appUserClient.getUserYYs(id); |
| | | |
| | | |
| | | List<Map<String, Object>> mapList = coursePackagePaymentClient.queryCourseData(userYYs); |
| | | ArrayList<Object> objects2 = new ArrayList<>(); |
| | | ArrayList<Object> objects3 = new ArrayList<>(); |
| | | for (Map<String, Object> map : mapList) { |
| | | Object name = map.get("name"); |
| | | Object value = map.get("value"); |
| | | objects2.add(name); |
| | | objects3.add(value); |
| | | } |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map1.put("data1",objects2); |
| | | map1.put("data2",objects3); |
| | | |
| | | |
| | | return map1; |
| | | } |
| | | } |
| | | |
| | | |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * <p> |
| | | * 退费记录 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2023-10-09 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_back_record") |
| | | public class TBackRecord extends Model<TBackRecord> { |
| | | |
| | | private static final long serialVersionUID=1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @TableField("userId") |
| | | private Integer userId; |
| | | |
| | | private Double money=0.0; |
| | | |
| | | private LocalDateTime time; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.service; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.guns.modular.system.model.TBackRecord; |
| | | |
| | | /** |
| | | * <p> |
| | | * 退费记录 服务类 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2023-10-09 |
| | | */ |
| | | public interface TBackRecordService extends IService<TBackRecord> { |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.service.impl; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.course.mapper.TBackRecordMapper; |
| | | import com.dsh.guns.modular.system.model.TBackRecord; |
| | | import com.dsh.guns.modular.system.service.TBackRecordService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 退费记录 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2023-10-09 |
| | | */ |
| | | @Service |
| | | public class TBackRecordServiceImpl extends ServiceImpl<TBackRecordMapper, TBackRecord> implements TBackRecordService { |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dsh.course.mapper.TBackRecordMapper"> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <br class="col-sm-10"> |
| | | @if(objectType==1){ |
| | |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> |
| | | 选择城市 |
| | | 选择运营商 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="cCode" onchange="TSite.oneChangeNext(1)"> |
| | | <select class="form-control" id="cCode" > |
| | | <option value="">请选择</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.cityCode}">${obj.city}</option> |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(objectType==1){ |
| | | <div class="col-sm-3"> |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> |
| | | 选择账号 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="account" > |
| | | <option value="">请选择账号</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCompetition.search()"/> |
| | | <#button name="搜索" icon="fa-search" clickFun="search()"/> |
| | | @} |
| | | </br> |
| | | </br> |
| | |
| | | </br> |
| | | <div class="col-sm-3" style="width: 400px;display: flex"> |
| | | <#TimeCon id="beginTime" name="时间段:" isTime="false"/> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCompetition.search()"/> |
| | | <#button name="搜索" icon="fa-search" clickFun="search()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="col-sm-10" style="width: 1500px" > |
| | | </br> |
| | | </br> |
| | | <span>会员费收入:</span> |
| | | <span>玩湃币充值收入:</span> |
| | | <span>课程收入:</span> |
| | | <span>活动收入:</span> |
| | | <span>订场收入:</span> |
| | | <span>赛事收入:</span> |
| | | <span>商品收入:</span> |
| | | <span>其他收入:</span> |
| | | <span>会员费收入:<label id="fee1">0.0</label></span> |
| | | <span>玩湃币充值收入:<label id="fee2">0.0</label></span> |
| | | <span>课程收入:<label id="fee3">0.0</label></span> |
| | | <span>活动/赛事收入:<label id="fee4">0.0</label></span> |
| | | <span>订场收入:<label id="fee5">0.0</label></span> |
| | | <span>商品收入:<label id="fee7">0.0</label></span> |
| | | </br> |
| | | </br> |
| | | </br> |
| | |
| | | <script src="${ctxPath}/modular/system/dataStatistics/tSite.js"></script> |
| | | <script src="${ctxPath}/static/js/plugins/switchery/switchery.js"></script> |
| | | <script> |
| | | |
| | | |
| | | function oneChangeNext(e){ |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/onChange", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | |
| | | |
| | | function search(){ |
| | | |
| | | if(cutType==1){ |
| | | srtj() |
| | | } |
| | | |
| | | if(cutType==2){ |
| | | yytj() |
| | | } |
| | | if(cutType==3){ |
| | | jxtj() |
| | | } |
| | | } |
| | | |
| | | |
| | | let cutType=1; |
| | | |
| | | |
| | | laydate.render({ |
| | | elem: '#beginTime' |
| | | , trigger: 'click' |
| | |
| | | myChart7.setOption(option7); |
| | | }); |
| | | function getContent(type){ |
| | | cutType=type |
| | | //设置点击字体颜色效果 |
| | | for(var i=1;i<4;i++){ |
| | | document.getElementById("div"+i).style.color="#888888";// |
| | |
| | | $("#ensure").show(); |
| | | $("#nextB").hide(); |
| | | } |
| | | |
| | | |
| | | if(type==1){ |
| | | srtj() |
| | | } |
| | | |
| | | |
| | | |
| | | if(type==2){ |
| | | yytj() |
| | | } |
| | | |
| | | if(type==3){ |
| | | jxtj() |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | function srtj() { |
| | | var id = $("#cCode").val() |
| | | var beginTime = $("#beginTime").val() |
| | | console.log(id) |
| | | if(id==""){ |
| | | Feng.info("请先选择运营商"); |
| | | return; |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/data/selectYys", function (data) { |
| | | |
| | | $("#fee1").text(data.fee1) |
| | | $("#fee2").text(data.fee2) |
| | | $("#fee3").text(data.fee3) |
| | | $("#fee4").text(data.fee4) |
| | | $("#fee5").text(data.fee5) |
| | | $("#fee7").text(data.fee7) |
| | | $("#day").val(data.dayone) |
| | | $("#month").val(data.monthone) |
| | | $("#quarter").val(data.quarterone) |
| | | $("#year").val(data.yearone) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | var chartDom = document.getElementById('cookieTicket'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | option = { |
| | | title: { |
| | | text: '门票收入', |
| | | subtext: '', |
| | | left: 'center' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | |
| | | series: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: data.dayone, name: '日卡' }, |
| | | { value: data.monthone, name: '月卡' }, |
| | | { value: data.quarterone, name: '季卡' }, |
| | | { value: data.yearone, name: '年卡' }, |
| | | |
| | | ], |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | |
| | | var chartDom = document.getElementById('cookieCourse'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | option = { |
| | | title: { |
| | | text: '课程收入', |
| | | subtext: '', |
| | | left: 'center' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | |
| | | series: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: data.courseData, |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | |
| | | |
| | | var chartDom = document.getElementById('cookieBooking'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | option = { |
| | | title: { |
| | | text: '订场收入', |
| | | subtext: '', |
| | | left: 'center' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | |
| | | series: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: data.siteData, |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | }, function (data) { |
| | | |
| | | }); |
| | | ajax.set("id",id); |
| | | ajax.set("time",beginTime); |
| | | ajax.start(); |
| | | |
| | | } |
| | | |
| | | function jxtj() { |
| | | var id = $("#cCode").val() |
| | | console.log(id,333) |
| | | if(id==""){ |
| | | Feng.info("请先选择运营商"); |
| | | return; |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/data/selectYysJx", function (data) { |
| | | console.log(data) |
| | | |
| | | var chartDom = document.getElementById('cookieTeachAge'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | option = { |
| | | title: { |
| | | text: '年龄分布', |
| | | subtext: '', |
| | | left: 'center' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | |
| | | series: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: data.age1, name: '0-7岁' }, |
| | | { value: data.age2, name: '8-10岁' }, |
| | | { value:data.age3, name: '11-12岁' }, |
| | | { value: data.age4, name: '13岁以上' }, |
| | | ], |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | |
| | | |
| | | |
| | | var chartDom = document.getElementById('cookieTeachGender'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | option = { |
| | | title: { |
| | | text: '性别分布', |
| | | subtext: '', |
| | | left: 'center' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | |
| | | series: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: data.boy, name: '男' }, |
| | | { value: data.girl, name: '女' }, |
| | | |
| | | ], |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | |
| | | |
| | | |
| | | var chartDom = document.getElementById('cookieTeachCourse'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | |
| | | option = { |
| | | xAxis: { |
| | | type: 'category', |
| | | data: data.data1 |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | data: data.data2, |
| | | type: 'bar' |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | }, function (data) { |
| | | |
| | | }); |
| | | ajax.set("id",id); |
| | | ajax.start(); |
| | | |
| | | } |
| | | |
| | | function yytj() { |
| | | let id = $("#cCode").val() |
| | | console.log(id) |
| | | if(id==''){ |
| | | Feng.info("请先选择运营商"); |
| | | return; |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/data/stuUserDataYys", function (data) { |
| | | console.log(data,323232) |
| | | var chartDom = document.getElementById('cookieAge'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | option = { |
| | | title: { |
| | | text: '年龄分布', |
| | | subtext: '', |
| | | left: 'center' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | |
| | | series: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: data.age1, name: '0-12岁' }, |
| | | { value: data.age2, name: '13-18岁' }, |
| | | { value: data.age3, name: '19-25岁' }, |
| | | { value: data.age4, name: '12-35岁' }, |
| | | { value: data.age5, name: '36-50岁' }, |
| | | { value: data.age6, name: '51岁以上' }, |
| | | |
| | | ], |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | |
| | | |
| | | |
| | | var chartDom = document.getElementById('cookieGender'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | option = { |
| | | title: { |
| | | text: '性别分布', |
| | | subtext: '', |
| | | left: 'center' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | |
| | | series: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: data.boy, name: '男' }, |
| | | { value: data.girl, name: '女' }, |
| | | |
| | | ], |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | |
| | | |
| | | |
| | | |
| | | var chartDom = document.getElementById('city'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | |
| | | option = { |
| | | xAxis: { |
| | | type: 'category', |
| | | data: data.cityData |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | data: data.cityNum, |
| | | type: 'bar' |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | |
| | | |
| | | |
| | | }, function (data) { |
| | | |
| | | }); |
| | | ajax.set("id",id); |
| | | ajax.start(); |
| | | } |
| | | |
| | | function getContent1(type){ |
| | | //设置点击字体颜色效果 |
| | | for(var i=1;i<3;i++){ |
| | |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: 1048, name: '年票' }, |
| | | { value: 735, name: '亲子票' }, |
| | | { value: 1048, name: '日卡' }, |
| | | { value: 735, name: '月卡' }, |
| | | { value: 735, name: '季卡' }, |
| | | { value: 735, name: '年卡' }, |
| | | |
| | | ], |
| | | emphasis: { |
| | |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: 1048, name: '30-35' }, |
| | | { value: 735, name: '12-18' }, |
| | | |
| | | ], |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | }); |
| | | $(function(){ |
| | | var chartDom = document.getElementById('cookieTeachAge'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | option = { |
| | | title: { |
| | | text: '年龄分布', |
| | | subtext: '', |
| | | left: 'center' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | |
| | | series: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: 1048, name: '30-35' }, |
| | | { value: 1048, name: '30-351' }, |
| | | { value: 735, name: '12-18' }, |
| | | |
| | | ], |
| | |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | }); |
| | | $(function(){ |
| | | var chartDom = document.getElementById('cookieTeachGender'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | option = { |
| | | title: { |
| | | text: '性别分布', |
| | | subtext: '', |
| | | left: 'center' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | |
| | | series: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: 1048, name: '男' }, |
| | | { value: 735, name: '女' }, |
| | | |
| | | ], |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | }); |
| | | $(function(){ |
| | | var chartDom = document.getElementById('city'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | |
| | | option = { |
| | | xAxis: { |
| | | type: 'category', |
| | | data: ['北京', '上海', '广东', '深圳', '成都', '曹县', '奥里给'] |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | data: [120, 200, 150, 80, 70, 110, 130], |
| | | type: 'bar' |
| | | } |
| | | ] |
| | | }; |
| | |
| | | <div class="col-sm-10" style="width: 1500px" > |
| | | </br> |
| | | </br> |
| | | <span id="yearRefund">本年退费额度:</span> |
| | | <span id="monthRefund">本月退费额度:</span> |
| | | <span id="weekRefund">本周退费额度:</span> |
| | | <span id="todayRefund">本日退费额度:</span> |
| | | <span id="yearRefund">本年退费额度:<span id="back1"></span></span> |
| | | <span id="monthRefund">本月退费额度:<span id="back2"></span></span> |
| | | <span id="weekRefund">本周退费额度:<span id="back3"></span></span> |
| | | <span id="todayRefund">本日退费额度:<span id="back4"></span></span> |
| | | </br> |
| | | </br> |
| | | <div id="refund" style="width: 1280px;height:500px;"></div> |
| | |
| | | ajax.start(); |
| | | } |
| | | var ans = []; |
| | | var weekX = []; |
| | | var weekX = ["1","2","上周","本周"]; |
| | | var monthX = ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]; |
| | | var yearX = ["2023年","2024年","2025年","2026年","2027年","2028年"]; |
| | | var yearX = []; |
| | | var timeX = []; |
| | | var dataX = []; |
| | | // 创建一个日期对象 |
| | |
| | | getContent1(1); |
| | | getContent2(1); |
| | | var ajax = new $ax(Feng.ctxPath + "/data/getIncomeData", function(resp){ |
| | | yearX=resp.year |
| | | |
| | | |
| | | var list = resp.yearMount; |
| | | console.log(list); |
| | | var t1 = document.getElementById("totalIncome"); |
| | |
| | | var myChart6 = echarts.init(document.getElementById('teach')); |
| | | var myChart7 = echarts.init(document.getElementById('courseData')); |
| | | |
| | | option1 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | data: ['年度退费', '月度退费', '周度退费', '日度退费'] |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度退费', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [120, 132, 101, 134, 90, 230, 160, 190, 410, 330, 210, 330] |
| | | |
| | | var ajax3 = new $ax(Feng.ctxPath + "/data/backPt", function(data){ |
| | | $("#back1").text(data.thisYear); |
| | | $("#back2").text(data.thisMonth); |
| | | $("#back3").text(data.thisWeek); |
| | | $("#back4").text(data.thisDay); |
| | | option1 = { |
| | | |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | { |
| | | name: '月度退费', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [220, 182, 191, 234, 290, 330, 310, 190, 210, 330, 410, 160] |
| | | legend: { |
| | | |
| | | data: ['年度退费', '月度退费','周度退费','日度退费'], |
| | | icon: 'stack', |
| | | selectedMode: 'single', // 单选 |
| | | selected: { |
| | | 年度会员数: true, |
| | | 月度会员数: false, |
| | | 周度会员数: false, |
| | | 日度会员数: false |
| | | } |
| | | }, |
| | | { |
| | | name: '周度退费', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [150, 232, 201, 154, 190, 330, 410, 160, 210, 195, 210, 188] |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | { |
| | | name: '日度退费', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [320, 332, 301, 334, 390, 330, 320, 10, 195, 145, 188, 160] |
| | | } |
| | | ] |
| | | }; |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: yearX |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度退费', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.yearData |
| | | }, |
| | | { |
| | | name: '月度退费', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.monthData |
| | | }, |
| | | { |
| | | name: '周度退费', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.weekData |
| | | }, |
| | | { |
| | | name: '日度退费', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.dayData |
| | | } |
| | | ] |
| | | |
| | | }; |
| | | }); |
| | | ajax3.start(); |
| | | |
| | | |
| | | option4 = { |
| | |
| | | } |
| | | myChart.setOption(options, true) |
| | | }) |
| | | |
| | | |
| | | myChart1.on('legendselectchanged', obj => { |
| | | var options = myChart1.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | if (obj.name == '年度退费') { |
| | | options.xAxis[0].data = yearX |
| | | } else if (obj.name == '月度退费') { |
| | | options.xAxis[0].data = monthX |
| | | } else if (obj.name == '周度退费') { |
| | | options.xAxis[0].data = ["1","2","上周","本周"] |
| | | } else if (obj.name == '日度退费') { |
| | | options.xAxis[0].data = dataX |
| | | } |
| | | myChart1.setOption(options, true) |
| | | }) |
| | | myChart2.on('legendselectchanged', obj => { |
| | | var options = myChart2.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | |
| | | } |
| | | myChart2.setOption(options, true) |
| | | }); |
| | | |
| | | myChart3.on('legendselectchanged', obj => { |
| | | var options = myChart3.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | |
| | | }else{ |
| | | $("#ensure").show(); |
| | | $("#nextB").hide(); |
| | | } |
| | | |
| | | if(type==2){ |
| | | var ajax = new $ax(Feng.ctxPath + "/data/stuUserData", function (data) { |
| | | console.log(data,323232) |
| | | var chartDom = document.getElementById('cookieAge'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | option = { |
| | | title: { |
| | | text: '年龄分布', |
| | | subtext: '', |
| | | left: 'center' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | |
| | | series: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: data.age1, name: '0-12岁' }, |
| | | { value: data.age2, name: '13-18岁' }, |
| | | { value: data.age3, name: '19-25岁' }, |
| | | { value: data.age4, name: '12-35岁' }, |
| | | { value: data.age5, name: '36-50岁' }, |
| | | { value: data.age6, name: '51岁以上' }, |
| | | |
| | | ], |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | |
| | | |
| | | |
| | | var chartDom = document.getElementById('cookieGender'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | option = { |
| | | title: { |
| | | text: '性别分布', |
| | | subtext: '', |
| | | left: 'center' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | |
| | | series: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: data.boy, name: '男' }, |
| | | { value: data.girl, name: '女' }, |
| | | |
| | | ], |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | |
| | | |
| | | |
| | | |
| | | var chartDom = document.getElementById('city'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | |
| | | option = { |
| | | xAxis: { |
| | | type: 'category', |
| | | data: data.cityData |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | data: data.cityNum, |
| | | type: 'bar' |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | |
| | | |
| | | |
| | | }, function (data) { |
| | | |
| | | }); |
| | | ajax.start(); |
| | | } |
| | | |
| | | |
| | |
| | | myChart.setOption(option); |
| | | }); |
| | | $(function(){ |
| | | var chartDom = document.getElementById('cookieAge'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | option = { |
| | | title: { |
| | | text: '年龄分布', |
| | | subtext: '', |
| | | left: 'center' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | |
| | | series: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: 1048, name: '0-7岁' }, |
| | | { value: 735, name: '8-10岁' }, |
| | | { value: 735, name: '11-12岁' }, |
| | | { value: 735, name: '13岁以上' }, |
| | | |
| | | ], |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | }); |
| | | $(function(){ |
| | | var chartDom = document.getElementById('cookieTeachAge'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | |
| | | { value: $("#age2").val(), name: '8-10岁' }, |
| | | { value:$("#age3").val(), name: '11-12岁' }, |
| | | { value: $("#age4").val(), name: '13岁以上' }, |
| | | |
| | | ], |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | }); |
| | | $(function(){ |
| | | var chartDom = document.getElementById('cookieGender'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | option = { |
| | | title: { |
| | | text: '性别分布', |
| | | subtext: '', |
| | | left: 'center' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | |
| | | series: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: 1048, name: '男' }, |
| | | { value: 735, name: '女' }, |
| | | |
| | | ], |
| | | emphasis: { |
| | |
| | | }; |
| | | myChart.setOption(option); |
| | | }); |
| | | $(function(){ |
| | | var chartDom = document.getElementById('city'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | |
| | | option = { |
| | | xAxis: { |
| | | type: 'category', |
| | | data: ['北京', '上海', '广东', '深圳', '成都', '曹县', '奥里给'] |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | data: [120, 200, 150, 80, 70, 110, 130], |
| | | type: 'bar' |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | }); |
| | | |
| | | function stuCourseData(){ |
| | | |
| | | } |
| | | $(function(){ |
| | | |
| | | }); |
| | | </script> |
| | | @} |
| | |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> |
| | | 选择城市 |
| | | 选择门店 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="cCode" onchange="TSite.oneChangeNext(1)"> |
| | | <select class="form-control" id="cCode" > |
| | | <option value="">请选择</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.cityCode}">${obj.city}</option> |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(objectType==1){ |
| | | <div class="col-sm-3"> |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> |
| | | 选择账号 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="account" onchange="TSite.getStore()"> |
| | | <option value="">请先选择城市</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | |
| | | @if(objectType!=3){ |
| | | <div class="col-sm-3"> |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> |
| | | 选择门店 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="store"> |
| | | <option value="">请先选择城市</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCompetition.search()"/> |
| | | <#button name="搜索" icon="fa-search" clickFun="search()"/> |
| | | @} |
| | | </br> |
| | | </br> |
| | |
| | | </br> |
| | | <div class="col-sm-3" style="width: 400px;display: flex"> |
| | | <#TimeCon id="beginTime" name="时间段:" isTime="false"/> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCompetition.search()"/> |
| | | <#button name="搜索" icon="fa-search" clickFun="search()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="col-sm-10" style="width: 1500px" > |
| | | </br> |
| | | </br> |
| | | <span>会员费收入:</span> |
| | | <span>玩湃币充值收入:</span> |
| | | <span>课程收入:</span> |
| | | <span>活动收入:</span> |
| | | <span>订场收入:</span> |
| | | <span>赛事收入:</span> |
| | | <span>商品收入:</span> |
| | | <span>其他收入:</span> |
| | | <span>会员费收入:<label id="fee1">0.0</label></span> |
| | | <span>玩湃币充值收入:<label id="fee2">0.0</label></span> |
| | | <span>课程收入:<label id="fee3">0.0</label></span> |
| | | <span>活动/赛事收入:<label id="fee4">0.0</label></span> |
| | | <span>订场收入:<label id="fee5">0.0</label></span> |
| | | <span>商品收入:<label id="fee7">0.0</label></span> |
| | | </br> |
| | | </br> |
| | | </br> |
| | |
| | | <script src="${ctxPath}/modular/system/dataStatistics/tSite.js"></script> |
| | | <script src="${ctxPath}/static/js/plugins/switchery/switchery.js"></script> |
| | | <script> |
| | | |
| | | |
| | | function search(){ |
| | | |
| | | if(cutType==1){ |
| | | srtj() |
| | | } |
| | | |
| | | if(cutType==2){ |
| | | yytj() |
| | | } |
| | | if(cutType==3){ |
| | | jxtj() |
| | | } |
| | | } |
| | | |
| | | |
| | | let cutType=1; |
| | | |
| | | |
| | | function srtj() { |
| | | var id = $("#cCode").val() |
| | | var beginTime = $("#beginTime").val() |
| | | console.log(id) |
| | | if(id==""){ |
| | | Feng.info("请先选择门店"); |
| | | return; |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/data/selectStore", function (data) { |
| | | |
| | | $("#fee1").text(data.fee1) |
| | | $("#fee2").text(data.fee2) |
| | | $("#fee3").text(data.fee3) |
| | | $("#fee4").text(data.fee4) |
| | | $("#fee5").text(data.fee5) |
| | | $("#fee7").text(data.fee7) |
| | | $("#day").val(data.dayone) |
| | | $("#month").val(data.monthone) |
| | | $("#quarter").val(data.quarterone) |
| | | $("#year").val(data.yearone) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | var chartDom = document.getElementById('cookieTicket'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | option = { |
| | | title: { |
| | | text: '门票收入', |
| | | subtext: '', |
| | | left: 'center' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | |
| | | series: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: data.dayone, name: '日卡' }, |
| | | { value: data.monthone, name: '月卡' }, |
| | | { value: data.quarterone, name: '季卡' }, |
| | | { value: data.yearone, name: '年卡' }, |
| | | |
| | | ], |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | |
| | | var chartDom = document.getElementById('cookieCourse'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | option = { |
| | | title: { |
| | | text: '课程收入', |
| | | subtext: '', |
| | | left: 'center' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | |
| | | series: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: data.courseData, |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | |
| | | |
| | | var chartDom = document.getElementById('cookieBooking'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | option = { |
| | | title: { |
| | | text: '订场收入', |
| | | subtext: '', |
| | | left: 'center' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | |
| | | series: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: data.siteData, |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | }, function (data) { |
| | | |
| | | }); |
| | | ajax.set("id",id); |
| | | ajax.set("time",beginTime); |
| | | ajax.start(); |
| | | |
| | | } |
| | | |
| | | |
| | | function yytj() { |
| | | let id = $("#cCode").val() |
| | | console.log(id) |
| | | if(id==''){ |
| | | Feng.info("请先选择门店"); |
| | | return; |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/data/stuUserDataStore", function (data) { |
| | | console.log(data,323232) |
| | | var chartDom = document.getElementById('cookieAge'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | option = { |
| | | title: { |
| | | text: '年龄分布', |
| | | subtext: '', |
| | | left: 'center' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | |
| | | series: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: data.age1, name: '0-12岁' }, |
| | | { value: data.age2, name: '13-18岁' }, |
| | | { value: data.age3, name: '19-25岁' }, |
| | | { value: data.age4, name: '12-35岁' }, |
| | | { value: data.age5, name: '36-50岁' }, |
| | | { value: data.age6, name: '51岁以上' }, |
| | | |
| | | ], |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | |
| | | |
| | | |
| | | var chartDom = document.getElementById('cookieGender'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | option = { |
| | | title: { |
| | | text: '性别分布', |
| | | subtext: '', |
| | | left: 'center' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | |
| | | series: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: data.boy, name: '男' }, |
| | | { value: data.girl, name: '女' }, |
| | | |
| | | ], |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | |
| | | |
| | | |
| | | |
| | | var chartDom = document.getElementById('city'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | |
| | | option = { |
| | | xAxis: { |
| | | type: 'category', |
| | | data: data.cityData |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | data: data.cityNum, |
| | | type: 'bar' |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | |
| | | |
| | | |
| | | }, function (data) { |
| | | |
| | | }); |
| | | ajax.set("id",id); |
| | | ajax.start(); |
| | | } |
| | | |
| | | function jxtj() { |
| | | var id = $("#cCode").val() |
| | | console.log(id,333) |
| | | if(id==""){ |
| | | Feng.info("请先选择门店"); |
| | | return; |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/data/selectStoreJx", function (data) { |
| | | console.log(data) |
| | | |
| | | var chartDom = document.getElementById('cookieTeachAge'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | option = { |
| | | title: { |
| | | text: '年龄分布', |
| | | subtext: '', |
| | | left: 'center' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | |
| | | series: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: data.age1, name: '0-7岁' }, |
| | | { value: data.age2, name: '8-10岁' }, |
| | | { value:data.age3, name: '11-12岁' }, |
| | | { value: data.age4, name: '13岁以上' }, |
| | | ], |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | |
| | | |
| | | |
| | | var chartDom = document.getElementById('cookieTeachGender'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | option = { |
| | | title: { |
| | | text: '性别分布', |
| | | subtext: '', |
| | | left: 'center' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | |
| | | series: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: data.boy, name: '男' }, |
| | | { value: data.girl, name: '女' }, |
| | | |
| | | ], |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | |
| | | |
| | | |
| | | var chartDom = document.getElementById('cookieTeachCourse'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | |
| | | option = { |
| | | xAxis: { |
| | | type: 'category', |
| | | data: data.data1 |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | data: data.data2, |
| | | type: 'bar' |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | }, function (data) { |
| | | |
| | | }); |
| | | ajax.set("id",id); |
| | | ajax.start(); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | laydate.render({ |
| | | elem: '#beginTime' |
| | | , trigger: 'click' |
| | |
| | | myChart7.setOption(option7); |
| | | }); |
| | | function getContent(type){ |
| | | |
| | | cutType=type; |
| | | //设置点击字体颜色效果 |
| | | for(var i=1;i<4;i++){ |
| | | document.getElementById("div"+i).style.color="#888888";// |
| | |
| | | $("#ensure").show(); |
| | | $("#nextB").hide(); |
| | | } |
| | | |
| | | if(type==1){ |
| | | srtj() |
| | | } |
| | | |
| | | if(type==2){ |
| | | yytj() |
| | | } |
| | | |
| | | if(type==3){ |
| | | jxtj() |
| | | } |
| | | |
| | | } |
| | | function getContent1(type){ |
| | | //设置点击字体颜色效果 |
| | |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: 1048, name: '年票' }, |
| | | { value: 735, name: '亲子票' }, |
| | | { value: 0, name: '日卡' }, |
| | | { value: 0, name: '月卡' }, |
| | | { value: 0, name: '季卡' }, |
| | | { value: 0, name: '年卡' }, |
| | | |
| | | ], |
| | | emphasis: { |
| | |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: 1048, name: '篮球课' }, |
| | | { value: 735, name: '羽毛课' }, |
| | | { value: 735, name: '足球课' }, |
| | | { value: 0, name: '篮球课' }, |
| | | { value: 0, name: '羽毛课' }, |
| | | { value: 0, name: '足球课' }, |
| | | |
| | | ], |
| | | emphasis: { |
| | |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: 1048, name: '激战' }, |
| | | { value: 735, name: '篮球场' }, |
| | | { value: 735, name: '足球场' }, |
| | | { value: 0, name: '激战' }, |
| | | { value: 0, name: '篮球场' }, |
| | | { value: 0, name: '足球场' }, |
| | | |
| | | ], |
| | | emphasis: { |
| | |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: 1048, name: '30-35' }, |
| | | { value: 735, name: '12-18' }, |
| | | { value: 0, name: '0-7岁' }, |
| | | { value: 0, name: '8-10岁' }, |
| | | { value:0, name: '11-12岁' }, |
| | | { value: 0, name: '13岁以上' }, |
| | | |
| | | ], |
| | | emphasis: { |
| | |
| | | var carPhoto = new $WebUpload("img"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("welfarePicture"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var drivingLicensePhoto = new $WebUpload("drivingLicensePhoto"); |
| | | drivingLicensePhoto.setUploadBarId("progressBar"); |
| | | drivingLicensePhoto.init(); |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.other.entity.Store; |
| | | import com.dsh.other.entity.TBackRecord; |
| | | import com.dsh.other.entity.TStoreOther; |
| | | import com.dsh.other.entity.TStoreOtherConfigTrue; |
| | | import com.dsh.other.feignclient.model.*; |
| | | import com.dsh.other.model.*; |
| | | import com.dsh.other.service.StoreService; |
| | | import com.dsh.other.service.TStoreOtherConfigTrueService; |
| | | import com.dsh.other.service.TStoreOtherService; |
| | | import com.dsh.other.service.*; |
| | | import com.dsh.other.util.GDMapGeocodingUtil; |
| | | import com.dsh.other.util.ResultUtil; |
| | | import com.dsh.other.util.ToolUtil; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @RestController |
| | | @RequestMapping("") |
| | |
| | | |
| | | @Autowired |
| | | private TStoreOtherService tStoreOtherService; |
| | | |
| | | @Autowired |
| | | private TBackRecordService backRecordService; |
| | | |
| | | /** |
| | | * 根据城市管理员id获取门店 |
| | |
| | | } |
| | | |
| | | |
| | | @PostMapping("/store/addBackRecord") |
| | | public void addBackRecord(@RequestBody String s){ |
| | | TBackRecord tBackRecord = new TBackRecord(); |
| | | String[] split = s.split("_"); |
| | | tBackRecord.setMoney(Double.valueOf(split[0])); |
| | | tBackRecord.setUserId(Integer.valueOf(split[1])); |
| | | tBackRecord.setTime(new Date()); |
| | | backRecordService.save(tBackRecord); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | |
| | | try { |
| | | List<TStoreOtherConfigTrue> tStoreOtherConfigTrues = new ArrayList<>(); |
| | | |
| | | List<TStoreOther> list = tStoreOtherService.list(new LambdaQueryWrapper<TStoreOther>().eq(TStoreOther::getStoreId, id)); |
| | | List<TStoreOther> list = tStoreOtherService.list(new LambdaQueryWrapper<TStoreOther>().eq(TStoreOther::getStoreId, id).eq(TStoreOther::getState,1)); |
| | | if(list.size()>0){ |
| | | tStoreOtherConfigTrues= tStoreOtherConfigTrueService.list(new LambdaQueryWrapper<TStoreOtherConfigTrue>().eq(TStoreOtherConfigTrue::getPid, list.get(0).getId())); |
| | | tStoreOtherConfigTrues= tStoreOtherConfigTrueService.list(new LambdaQueryWrapper<TStoreOtherConfigTrue>().in(TStoreOtherConfigTrue::getPid, list.stream().map(TStoreOther::getId).collect(Collectors.toList())).eq(TStoreOtherConfigTrue::getState,1)); |
| | | } |
| | | return ResultUtil.success(tStoreOtherConfigTrues); |
| | | }catch (Exception e){ |
New file |
| | |
| | | package com.dsh.other.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * <p> |
| | | * 退费记录 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2023-10-09 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_back_record") |
| | | public class TBackRecord extends Model<TBackRecord> { |
| | | |
| | | private static final long serialVersionUID=1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @TableField("userId") |
| | | private Integer userId; |
| | | |
| | | private Double money; |
| | | |
| | | private Date time; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.other.mapper; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.other.entity.TBackRecord; |
| | | |
| | | /** |
| | | * <p> |
| | | * 退费记录 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2023-10-09 |
| | | */ |
| | | public interface TBackRecordMapper extends BaseMapper<TBackRecord> { |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.other.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.other.entity.TBackRecord; |
| | | |
| | | /** |
| | | * <p> |
| | | * 退费记录 服务类 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2023-10-09 |
| | | */ |
| | | public interface TBackRecordService extends IService<TBackRecord> { |
| | | |
| | | } |
| | |
| | | @Autowired |
| | | private SiteMapper siteMapper; |
| | | |
| | | @Autowired |
| | | private TBackRecordService backRecordService; |
| | | |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | siteBooking.setCancelUserId(uid); |
| | | siteBookingService.updateById(siteBooking); |
| | | |
| | | TBackRecord tBackRecord = new TBackRecord(); |
| | | tBackRecord.setMoney(siteBooking.getPayMoney()); |
| | | tBackRecord.setUserId(siteBooking.getAppUserId()); |
| | | tBackRecord.setTime(new Date()); |
| | | backRecordService.save(tBackRecord); |
| | | |
| | | } |
| | | if(siteBooking.getPayType() == 2){//支付宝 |
| | | Map<String, String> map = payMoneyUtil.aliRefund(siteBooking.getPayOrderNo(), siteBooking.getPayMoney().toString()); |
| | |
| | | userCoupon.setStatus(1); |
| | | userCouponClient.updateUserCoupon(userCoupon); |
| | | } |
| | | |
| | | |
| | | TBackRecord tBackRecord = new TBackRecord(); |
| | | tBackRecord.setMoney(siteBooking.getPayMoney()); |
| | | tBackRecord.setUserId(siteBooking.getAppUserId()); |
| | | tBackRecord.setTime(new Date()); |
| | | backRecordService.save(tBackRecord); |
| | | } |
| | | |
| | | if(siteBooking.getPayType() == 3){//玩湃币 |
New file |
| | |
| | | package com.dsh.other.service.impl; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.other.entity.TBackRecord; |
| | | import com.dsh.other.mapper.TBackRecordMapper; |
| | | import com.dsh.other.service.TBackRecordService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 退费记录 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2023-10-09 |
| | | */ |
| | | @Service |
| | | public class TBackRecordServiceImpl extends ServiceImpl<TBackRecordMapper, TBackRecord> implements TBackRecordService { |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dsh.other.mapper.TBackRecordMapper"> |
| | | |
| | | |
| | | </mapper> |