| | |
| | | import java.util.Comparator; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | |
| | | @Autowired |
| | | private TokenUtil tokenUtil; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据门店ids获取课包ids 根据课包ids 获取购课记录的用户ids |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/coursePackage/getCoursePackageByStoreIds") |
| | | public List<Integer> getCoursePackageByStoreIds(@RequestBody List<Integer> storeIds){ |
| | | try { |
| | | // 获取当前课包的ids |
| | | List<Integer> courseIds = coursePackageService.list(new QueryWrapper<TCoursePackage>().in("storeId", storeIds)) |
| | | .stream().map(TCoursePackage::getId).collect(Collectors.toList()); |
| | | |
| | | List<Integer> userIds = tcppmenService.list(new QueryWrapper<TCoursePackagePayment>().in("coursePackageId", courseIds)) |
| | | .stream().map(TCoursePackagePayment::getAppUserId).collect(Collectors.toList()); |
| | | return userIds; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据id获取课包 |
| | |
| | | * 根据课包类型获取课包 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/coursePackage/getCoursePackageByType") |
| | | public List<TCoursePackage> getCoursePackageByType(@RequestBody Integer typeId){ |
| | | return coursePackageService.list(new QueryWrapper<TCoursePackage>().eq("coursePackageTypeId", typeId)); |
| | | @PostMapping("/base/coursePackage/getCoursePackageByType/{typeId}/{storeId}") |
| | | public List<TCoursePackage> getCoursePackageByType(@PathVariable("typeId") Integer typeId,@PathVariable("storeId")Integer storeId){ |
| | | |
| | | return coursePackageService.list(new QueryWrapper<TCoursePackage>().eq("coursePackageTypeId", typeId).eq("storeId",storeId)); |
| | | } |
| | | /** |
| | | * 本周福利列表 |