| | |
| | | package com.dsh.guns.modular.system.controller.system; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.course.dto.*; |
| | | import com.dsh.course.entity.EvaluateStudent; |
| | | import com.dsh.course.feignClient.account.AppUserClient; |
| | | import com.dsh.course.feignClient.account.StudentClient; |
| | | import com.dsh.course.feignClient.account.model.TAppUser; |
| | | import com.dsh.course.feignClient.competition.CompetitionClient; |
| | | import com.dsh.course.feignClient.competition.model.ListQuery; |
| | | import com.dsh.course.feignClient.course.CoursePackageClient; |
| | | import com.dsh.course.feignClient.course.CourseStuddentClient; |
| | | import com.dsh.course.feignClient.course.model.TCoursePackage; |
| | | import com.dsh.course.feignClient.course.model.TCoursePackagePayment; |
| | | import com.dsh.course.feignClient.other.BallClient; |
| | | import com.dsh.course.feignClient.other.HistoryClient; |
| | | import com.dsh.course.model.MoneyBack; |
| | | import com.dsh.course.model.dto.InsertBackDto; |
| | |
| | | import com.dsh.course.util.HtmlToPdfUtils; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import com.dsh.guns.modular.system.model.CourseCounsum; |
| | | import com.dsh.guns.modular.system.model.TStudent; |
| | | import com.dsh.guns.modular.system.model.User; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.model.dto.*; |
| | | import com.dsh.guns.modular.system.service.EvaluateStudentService; |
| | | import com.dsh.guns.modular.system.service.ISiteBookingService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.ITStudentService; |
| | | import com.dsh.guns.modular.system.util.BigDecimalToChineseAmountUtil; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | @Resource |
| | | private HistoryClient historyClient; |
| | | |
| | | |
| | | @Autowired |
| | | private IStoreService storeService; |
| | | @Autowired |
| | | private CompetitionClient competitionClient; |
| | | |
| | | @RequestMapping("download") |
| | | public void down(HttpServletRequest request, HttpServletResponse response) throws IOException { |
| | |
| | | return new ResultUtil<>(0,0,null,map,null); |
| | | } |
| | | |
| | | @Autowired |
| | | private ISiteBookingService siteBookingService; |
| | | @Autowired |
| | | private BallClient ballClient; |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | |
| | | search.setIds(ids); |
| | | } |
| | | if(UserExt.getUser().getObjectType()==2){ |
| | | // 获取运营商下的所有门店id集合 |
| | | List<Integer> storeIds = storeService.list(new QueryWrapper<TStore>() |
| | | .eq("operatorId", UserExt.getUser().getObjectId())) |
| | | .stream().map(TStore::getId).collect(Collectors.toList()); |
| | | // 根据门店id集合查询 属于该运营商下的门店举办的赛事 |
| | | ListQuery listQuery = new ListQuery(); |
| | | listQuery.setIds(storeIds); |
| | | // 通过门店ids 获取赛事的支付记录 获取到用户的ids |
| | | List<Integer> list = competitionClient.getUserIds(listQuery); |
| | | |
| | | // 获取场地预约记录 拿到用户ids |
| | | List<Integer> siteUsers = siteBookingService.list(new QueryWrapper<SiteBooking>().in("storeId", storeIds)) |
| | | .stream().map(SiteBooking::getAppUserId).collect(Collectors.toList()); |
| | | // 获取课程购买记录 拿到用户ids |
| | | List<Integer> cpUsers = coursePackageClient.getCoursePackageByStoreIds(storeIds); |
| | | // 获取游戏记录 拿到用户ids |
| | | List<Integer> gameUsers = ballClient.getGameByStoreIds(storeIds); |
| | | // 用户ids |
| | | List<Integer> users = new ArrayList<>(); |
| | | users.addAll(list); |
| | | users.addAll(siteUsers); |
| | | users.addAll(cpUsers); |
| | | users.addAll(gameUsers); |
| | | // 去重后的用户id |
| | | List<Integer> collect = users.stream().distinct().collect(Collectors.toList()); |
| | | ids = appUserClient.getUserYYs(UserExt.getUser().getObjectId()); |
| | | ids.addAll(collect); |
| | | List<Integer> collect1 = ids.stream().distinct().collect(Collectors.toList()); |
| | | if(ids.size()==0){ |
| | | ids.add(-1); |
| | | } |
| | | search.setIds(ids); |
| | | search.setIds(collect1); |
| | | } |
| | | System.out.println("============学员查询接口========="); |
| | | return itStudentService.listAll(search); |
| | |
| | | |
| | | @RequestMapping("/updatecom") |
| | | @ResponseBody |
| | | public ResultUtil updatecom(Integer id,String content,String images) { |
| | | public ResultUtil updatecom(@RequestBody StudentPingYuDTO dto) { |
| | | |
| | | EvaluateStudent evaluateStudent = new EvaluateStudent(); |
| | | evaluateStudent.setId(id); |
| | | evaluateStudent.setContent(content); |
| | | evaluateStudent.setImgs(images); |
| | | evaluateStudent.setId(dto.getId()); |
| | | evaluateStudent.setContent(dto.getContent()); |
| | | evaluateStudent.setImgs(dto.getImages()); |
| | | appUserClient.save(evaluateStudent); |
| | | |
| | | // evaluateStudentService.updateById(evaluateStudent); |