| | |
| | | private MemberRidesJoinMapper memberRidesJoinMapper; |
| | | |
| | | @Autowired |
| | | private AdMapper adMapper; |
| | | |
| | | @Autowired |
| | | private TransactionsMapper transactionsMapper; |
| | | |
| | | @Autowired |
| | | PricingRuleService pricingRuleService; |
| | | |
| | | @Override |
| | |
| | | homeResponse.setTips(systemDictDataBiz.queryByCode(Constants.MINI_PROGRAMME,Constants.TIPS).getCode()); |
| | | homeResponse.setLeaseVideoUrl(systemDictDataBiz.queryByCode(Constants.MINI_PROGRAMME,Constants.RENT_TIPS_VIDEO).getCode()); |
| | | homeResponse.setPricingRules(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.PRICING_RULE).getCode()); |
| | | homeResponse.setStopServeTips(systemDictDataBiz.queryByCode(Constants.MINI_PROGRAMME,Constants.STOP_SERVE_TIPS).getCode()); |
| | | homeResponse.setIsStopServe(Constants.ZERO); |
| | | homeResponse.setAdList(adMapper.selectList(new QueryWrapper<Ad>() |
| | | .eq("isdeleted",Constants.ZERO) |
| | | .eq("status",Constants.ZERO) |
| | | .orderByDesc("create_date") |
| | | )); |
| | | if(systemDictDataBiz.queryByCode(Constants.MINI_PROGRAMME,Constants.IS_STOP_SERVE).getCode().equals(Constants.ONE)){ |
| | | String stopServeStartTime = systemDictDataBiz.queryByCode(Constants.MINI_PROGRAMME,Constants.STOP_SERVE_STARTTIME).getCode(); |
| | | String stopServeEndTime = systemDictDataBiz.queryByCode(Constants.MINI_PROGRAMME,Constants.STOP_SERVE_ENDTIME).getCode(); |
| | | //查询当前时间是否在停止中 |
| | | long s = DateUtil.StringToDate(stopServeStartTime).getTime(); |
| | | long e = DateUtil.StringToDate(stopServeEndTime).getTime(); |
| | | if(e>System.currentTimeMillis()&&s<=System.currentTimeMillis()){ |
| | | homeResponse.setIsStopServe(Constants.ONE); |
| | | } |
| | | } |
| | | //查询是否存在 已支付的 押金订单 |
| | | Integer status = this.goodsorderMapper.selectCount(new QueryWrapper<Goodsorder>() |
| | | .eq("member_id",memberId) |
| | |
| | | } |
| | | return homeResponse; |
| | | } |
| | | @Autowired |
| | | private TransactionsMapper transactionsMapper; |
| | | |
| | | |
| | | @Override |
| | |
| | | } |
| | | @Override |
| | | public RidesDetailResponse getRidesDetailResponse(String id) { |
| | | |
| | | QueryWrapper<MemberRides> wrapper = new QueryWrapper<>(); |
| | | wrapper.lambda() |
| | | .eq(MemberRides::getOrdreId,id); |
| | |
| | | if(goodsorderMapper.selectCount(new QueryWrapper<>(qry))>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"已支付过定金,无法重复该操作"); |
| | | } |
| | | //是否处于小程序停止服务时间内 |
| | | if(systemDictDataBiz.queryByCode(Constants.MINI_PROGRAMME,Constants.IS_STOP_SERVE).getCode().equals(Constants.ONE)){ |
| | | String stopServeStartTime = systemDictDataBiz.queryByCode(Constants.MINI_PROGRAMME,Constants.STOP_SERVE_STARTTIME).getCode(); |
| | | String stopServeEndTime = systemDictDataBiz.queryByCode(Constants.MINI_PROGRAMME,Constants.STOP_SERVE_ENDTIME).getCode(); |
| | | //查询当前时间是否在停止中 |
| | | long s = DateUtil.StringToDate(stopServeStartTime).getTime(); |
| | | long e = DateUtil.StringToDate(stopServeEndTime).getTime(); |
| | | if(e>System.currentTimeMillis()&&s<=System.currentTimeMillis()){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"当前小程序停止服务,请注意查看公告"); |
| | | } |
| | | } |
| | | //是否处于营业时间 |
| | | String businessStartTime = systemDictDataBiz.queryByCode(Constants.MINI_PROGRAMME,Constants.BUSINESS_STARTTIME).getCode(); |
| | | String businessEndTime = systemDictDataBiz.queryByCode(Constants.MINI_PROGRAMME,Constants.BUSINESS_ENDTIME).getCode(); |
| | | String nowTime = DateUtil.getDate(new Date(),"HH:mm"); |
| | | if(Integer.valueOf(nowTime.replace(":",""))<= Integer.valueOf(businessStartTime.replace(":","")) |
| | | ||Integer.valueOf(nowTime.replace(":","")) > Integer.valueOf(businessEndTime.replace(":",""))){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"当前时间暂未营业服务,请注意查看营业时间"); |
| | | } |
| | | Goodsorder goodsorder = new Goodsorder(); |
| | | goodsorder.setId(Constants.getUUID()); |
| | | goodsorder.setCreateDate(new Date()); |