Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/PlayPai
| | |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | |
| | | private String city;String name; |
| | | private String userName; |
| | | private String phone; |
| | | private List<Integer> ids; |
| | | } |
| | |
| | | <if test="item.phone != null and item.phone != ''"> |
| | | and o.phone LIKE CONCAT('%',#{item.phone},'%') |
| | | </if> |
| | | <if test="item.ids != null and item.ids.size >0 "> |
| | | and o.appUserId in <foreach collection="item.ids" separator="," open="(" item="id" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | |
| | | </select> |
| | |
| | | @ResponseBody |
| | | @PostMapping("/base/pointMerchars/getCommoditys") |
| | | public PointMerchandiseVo getVicinityGoods(@RequestBody CommodityRequest request){ |
| | | if (request.getShopId()!=null){ |
| | | List<CoursePackage> coursePackages = coursePackageClient.queryByStoreId(request.getShopId()); |
| | | List<Integer> coursIds = new ArrayList<>(); |
| | | for (CoursePackage coursePackage : coursePackages) { |
| | | coursIds.add(coursePackage.getId()); |
| | | } |
| | | List<PointsMerchandise> points = pointsMerchandiseService.list(new QueryWrapper<PointsMerchandise>().eq("state",1).eq("shelves",1).in("coursePackageId", coursIds)); |
| | | PointMerchandiseVo pointMerchandiseVo = new PointMerchandiseVo(); |
| | | pointMerchandiseVo.setMerchandises(points); |
| | | return pointMerchandiseVo; |
| | | |
| | | } |
| | | // if (request.getShopId()!=null){ |
| | | // List<CoursePackage> coursePackages = coursePackageClient.queryByStoreId(request.getShopId()); |
| | | // List<Integer> coursIds = new ArrayList<>(); |
| | | // for (CoursePackage coursePackage : coursePackages) { |
| | | // coursIds.add(coursePackage.getId()); |
| | | // } |
| | | // List<PointsMerchandise> points = pointsMerchandiseService.list(new QueryWrapper<PointsMerchandise>().eq("state",1).eq("shelves",1).in("coursePackageId", coursIds)); |
| | | // PointMerchandiseVo pointMerchandiseVo = new PointMerchandiseVo(); |
| | | // pointMerchandiseVo.setMerchandises(points); |
| | | // return pointMerchandiseVo; |
| | | // |
| | | // } |
| | | |
| | | |
| | | |
| | |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | }) |
| | | public ResultUtil<List<AppUserVideoResponse>> queryAfterSourceList( CourseOfAfterRequest search){ |
| | | try { |
| | | Integer appUserId = tokenUtil.getUserIdFormRedis(); |
| | | |
| | | if(null == appUserId){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | // try { |
| | | // Integer appUserId = tokenUtil.getUserIdFormRedis(); |
| | | // |
| | | // if(null == appUserId){ |
| | | // return ResultUtil.tokenErr(); |
| | | // } |
| | | // |
| | | // List<Integer> courseIds = new ArrayList<>(); |
| | | // QueryWrapper<TCoursePackagePayment> queryWrapper = new QueryWrapper<TCoursePackagePayment>().eq("appUserId", appUserId) |
| | |
| | | // } |
| | | |
| | | |
| | | QueryWrapper<CoursePackageStudent> queryWrapper1 = new QueryWrapper<CoursePackageStudent>().eq("appUserId", appUserId); |
| | | QueryWrapper<CoursePackageStudent> queryWrapper1 = new QueryWrapper<CoursePackageStudent>().eq("appUserId", 19); |
| | | if (ToolUtil.isNotEmpty(search.getCourseTypeId())){ |
| | | queryWrapper1.eq("coursePackageId",search.getCourseTypeId()); |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | }catch (Exception e){ |
| | | return ResultUtil.runErr(); |
| | | } |
| | | // }catch (Exception e){ |
| | | // return ResultUtil.runErr(); |
| | | // } |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.dsh.course.entity.*; |
| | |
| | | |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/queryIdsByStore") |
| | | public List<Integer> queryIdsByStore(@RequestBody Integer objectId){ |
| | | List<TCoursePackage> list = packageService.list(new LambdaQueryWrapper<TCoursePackage>().eq(TCoursePackage::getStoreId, objectId)); |
| | | List<Integer> collect = list.stream().map(TCoursePackage::getId).collect(Collectors.toList()); |
| | | if(collect.size()==0){ |
| | | collect.add(-1); |
| | | } |
| | | return collect; |
| | | } |
| | | |
| | | |
| | | //获取学员课时数信息 |
| | |
| | | */ |
| | | List<Map<String, Object>> queryCoursePackageSchedulingList(Page<Map<String, Object>> page, @Param("item") QueryCoursePackageSchedulingList queryCoursePackageSchedulingList); |
| | | |
| | | List<AppUserVideoResponse> queryAll(List<Long> longs); |
| | | List<AppUserVideoResponse> queryAll(@Param("longs") List<Long> longs); |
| | | |
| | | Integer isHave(Integer videoId); |
| | | } |
| | |
| | | private String payUser; |
| | | // 购买学员 |
| | | private String payStudent; |
| | | |
| | | private List<Integer> ids; |
| | | } |
| | |
| | | <if test="query.payStatus!=null and query.payStatus!= ''"> |
| | | and t1.payStatus = #{query.payStatus} |
| | | </if> |
| | | <if test="query.ids !=null and query.ids.size >0"> |
| | | and t2.storeId in <foreach collection="query.ids" close=")" item="id" open="(" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="listAllRegister" resultType="com.dsh.course.model.RegisterOrderVO"> |
| | |
| | | <select id="queryAll" resultType="com.dsh.course.model.vo.response.AppUserVideoResponse"> |
| | | |
| | | SELECT cs.courseId as videoId,cs.coursePackageId as coursePackageId,tc.coverDrawing,tc.name as videoName,tc.introduce as synopsis,cs.integral |
| | | FROM t_course_package_scheduling4 cs |
| | | FROM t_course_package_scheduling cs |
| | | LEFT JOIN t_course tc ON cs.courseId = tc.id |
| | | WHERE cs.courseId IS NOT NULL and cs.id in #{longs} |
| | | WHERE cs.courseId IS NOT NULL and cs.id in |
| | | <foreach collection="longs" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | |
| | | </select> |
| | | <select id="isHave" resultType="int"> |
| | | SELECT COUNT(1) FROM t_user_video_details WHERE courseId = #{videoId} |
| | |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | |
| | | @AllArgsConstructor |
| | |
| | | private String name; |
| | | private String userName; |
| | | private String phone; |
| | | |
| | | private List<Integer> ids; |
| | | } |
| | |
| | | |
| | | @PostMapping("/courdent/bypac") |
| | | List<Map<String, Object>> bypac(PacQueryDto pacQueryDto); |
| | | |
| | | |
| | | @PostMapping("/courdent/queryIdsByStore") |
| | | List<Integer> queryIdsByStore(Integer objectId); |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 购课记录控制器 |
| | | * 广告管理控制器 |
| | | * |
| | | */ |
| | | @Controller |
| | |
| | | @ResponseBody |
| | | public List<CoursePackagePaymentVO> listAll(CoursePackagePaymentQuery query) { |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | List<Integer> ids =new ArrayList<>(); |
| | | if(objectType==3){ |
| | | // 找出当前门店的课包 |
| | | ids = coursePackageClient.queryIdsByStore(UserExt.getUser().getObjectId()); |
| | | query.setIds(ids); |
| | | } |
| | | if (objectType == 2){ |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | List<Integer> operatorId = storeService.list(new QueryWrapper<TStore>().eq("operatorId", objectId)) |
| | | .stream().map(TStore::getId).collect(Collectors.toList()); |
| | | query.setStoreIds(operatorId); |
| | | } |
| | | if (objectType == 3){ |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | List<Integer> list = new ArrayList<>(); |
| | | list.add(objectId); |
| | | query.setStoreIds(list); |
| | | } |
| | | return coursePackagePaymentClient.listAll(query); |
| | | } |
| | |
| | | @RequestMapping(value = "/backStore") |
| | | @ResponseBody |
| | | public Object backStore(Integer id) { |
| | | if(UserExt.getUser().getObjectType()==3){ |
| | | id = UserExt.getUser().getObjectId(); |
| | | } |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | List<Integer> userPt = appUserClient.getUserStore(id); |
| | | if(userPt.size()==0){ |
| | |
| | | @RequestMapping(value = "/userAndVipStore") |
| | | @ResponseBody |
| | | public Object userAndVipStore(Integer id) { |
| | | if(UserExt.getUser().getObjectType()==3){ |
| | | id = UserExt.getUser().getObjectId(); |
| | | } |
| | | HashMap<String, Object> map = appUserClient.userAndVipStore(id); |
| | | return map; |
| | | } |
| | |
| | | @RequestMapping(value = "/actStore") |
| | | @ResponseBody |
| | | public Object actStore(Integer id) { |
| | | |
| | | |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | if(objectType==3){ |
| | | id = UserExt.getUser().getObjectId(); |
| | | } |
| | | List<Integer> userPt = appUserClient.getUserStore(id); |
| | | HashMap<String, Object> map = competitionClient.actPt(userPt); |
| | | |
| | |
| | | // 找出平台的用户 |
| | | List<User> list = sysUserService.list(new LambdaQueryWrapper<User>().eq(User::getObjectType, 2)); |
| | | List<Integer> ids = list.stream().map(User::getId).collect(Collectors.toList()); |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | if(objectType==3){ |
| | | id = UserExt.getUser().getObjectId(); |
| | | } |
| | | List<Integer> userIds = appUserClient.getUserStore(id); |
| | | QueryDataFee queryDataFee = new QueryDataFee(time, userIds); |
| | | // 会员费 |
| | |
| | | @RequestMapping("/stuUserDataStore") |
| | | @ResponseBody |
| | | public Object stuUserDataStore(Integer id) { |
| | | if(UserExt.getUser().getObjectType()==3){ |
| | | id = UserExt.getUser().getObjectId(); |
| | | } |
| | | ArrayList<Integer> objects = new ArrayList<>(); |
| | | objects.add(1); |
| | | HashMap<String, Object> map = appUserClient.queryUserAgeStore(id); |
| | |
| | | @RequestMapping("/selectStoreJx") |
| | | @ResponseBody |
| | | public Object selectStoreJx(Integer id) { |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | if(objectType==3){ |
| | | id = UserExt.getUser().getObjectId(); |
| | | } |
| | | ArrayList<Integer> objects = new ArrayList<>(); |
| | | objects.add(1); |
| | | HashMap<String, Object> map1 = appUserClient.queryUserAgeStore1(id); |
| | |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/queryWalkInStudentList") |
| | | @PostMapping("/queryWalkInStudentListqueryCoursePackageLists") |
| | | public Object queryWalkInStudentList(Long coursePackageSchedulingId, String userName, String studentName){ |
| | | Page<Map<String, Object>> page = coursePackageService.queryWalkInStudentList(coursePackageSchedulingId, userName, studentName); |
| | | return super.packForBT(page); |
| | |
| | | @RequestMapping("/yuyuelist") |
| | | @ResponseBody |
| | | public List<Map<String,Object>> yuyuelist(BookingQuery bookingQuery) { |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | if(objectType==3){ |
| | | bookingQuery.setStoreId(UserExt.getUser().getObjectId()); |
| | | } |
| | | List<Map<String,Object>> orders = ballClient.listorder(bookingQuery); |
| | | System.out.println("=======ballQueryDto=========="+bookingQuery); |
| | | |
| | |
| | | import java.math.RoundingMode; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | @RequestMapping("/list") |
| | | @ResponseBody |
| | | public List<TStudentDto> list(StudentSearch search) { |
| | | List<Integer> ids = new ArrayList<>(); |
| | | |
| | | if(UserExt.getUser().getObjectType()==3){ |
| | | ids = appUserClient.getUserStore(UserExt.getUser().getObjectId()); |
| | | if(ids.size()==0){ |
| | | ids.add(-1); |
| | | } |
| | | search.setIds(ids); |
| | | } |
| | | System.out.println("============学员查询接口========="); |
| | | return itStudentService.listAll(search); |
| | | } |
| | |
| | | // 购买学员 |
| | | private String payStudent; |
| | | |
| | | |
| | | private List<Integer> ids; |
| | | |
| | | } |
| | |
| | | Integer state; |
| | | Integer payMethod; |
| | | |
| | | |
| | | Integer storeId; |
| | | } |
| | |
| | | if(type==1){ |
| | | srtj() |
| | | tuifei() |
| | | income() |
| | | } |
| | | |
| | | if(type==2){ |
| | |
| | | Integer state; |
| | | Integer payMethod; |
| | | |
| | | |
| | | Integer storeId; |
| | | } |
| | |
| | | <if test ="query.type==3"> |
| | | and st.id =#{query.id} |
| | | </if> |
| | | <if test ="query.type==2"> |
| | | and ga.operationId =#{query.id} |
| | | </if> |
| | | <if test="query.provinceCode!=null and query.provinceCode!=''"> |
| | | and ga.provinceCode = #{query.provinceCode} |
| | | |
| | |
| | | <if test="state!=null "> |
| | | and bk.status=#{state} |
| | | </if> |
| | | <if test="storeId!=null "> |
| | | and st.id=#{storeId} |
| | | </if> |
| | | |
| | | |
| | | </where> |