| | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @Configuration |
| | | //@Configuration |
| | | public class MiniprogramConfigurer extends WebMvcConfigurerAdapter { |
| | | |
| | | @Resource |
| | |
| | | |
| | | UserCouponVo userCouponVo = new UserCouponVo(); |
| | | // 获取用户所有优惠券 |
| | | List<XpAppUserCoupon> couponList = xpAppUserCouponService.list(new LambdaQueryWrapper<XpAppUserCoupon>().eq(dto.getUserCouponId()!=null,XpAppUserCoupon::getId, dto.getUserCouponId()).eq(XpAppUserCoupon::getStatus, 1).eq(XpAppUserCoupon::getAppUserId,dto.getUserId()).apply("(FIND_IN_SET({0}, open_city_id) or open_city_id='0')", dto.getOpenCityId()) ); |
| | | List<XpAppUserCoupon> couponList = xpAppUserCouponService.list(new LambdaQueryWrapper<XpAppUserCoupon>() |
| | | .eq(dto.getUserCouponId()!=null,XpAppUserCoupon::getId, dto.getUserCouponId()).eq(XpAppUserCoupon::getStatus, 1) |
| | | .eq(XpAppUserCoupon::getAppUserId,dto.getUserId())); |
| | | if(couponList.isEmpty()){ |
| | | return R.ok(userCouponVo); |
| | | } |
| | |
| | | // phone = JSONObject.parseObject(data.toString()).getString("mobile"); |
| | | // } |
| | | XpAppUserCoupon coupon = xpAppUserCouponService.getById(couponId); |
| | | if(uid.equals(coupon.getAppUserId().toString())){ |
| | | if(Long.valueOf(uid).equals(coupon.getAppUserId())){ |
| | | XpAppUserCouponListVo vo = new XpAppUserCouponListVo(); |
| | | vo.setCouponId(coupon.getId().toString()); |
| | | vo.setTitle(coupon.getCouponName()); |
| | |
| | | * @return |
| | | */ |
| | | private Boolean isInOperationTime(String timeJson) { |
| | | if(StringUtils.isNotEmpty(timeJson)){ |
| | | return true; |
| | | } |
| | | JSONArray jsonArray = JSONArray.parseArray(timeJson); |
| | | Integer holidayToday = holidayUtil.isHolidayToday(); |
| | | for (Object o : jsonArray) { |
| | |
| | | vo.setEffectAndInvalid("生效失效:领取后立即生效,未使用、" + expireDays + "天后失效。"); |
| | | } |
| | | if(3 == expireRules){ |
| | | String format1 = acticityStrategy.getExpireDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | String format1 = acticityStrategy.getExpireDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); |
| | | vo.setEffectAndInvalid("生效失效:领取后立即生效,未使用、" + format1 + "失效。"); |
| | | } |
| | | } |
| | |
| | | vo.setEffectAndInvalid("生效失效:领取后" + format + "生效,未使用、" + expireDays + "天后失效。"); |
| | | } |
| | | if(3 == expireRules){ |
| | | String format1 = acticityStrategy.getExpireDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | String format1 = acticityStrategy.getExpireDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); |
| | | vo.setEffectAndInvalid("生效失效:领取后" + format + "生效,未使用、" + format1 + "失效。"); |
| | | } |
| | | } |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @Configuration |
| | | //@Configuration |
| | | public class MiniprogramConfigurer extends WebMvcConfigurerAdapter { |
| | | |
| | | @Resource |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @Configuration |
| | | //@Configuration |
| | | public class MiniprogramConfigurer extends WebMvcConfigurerAdapter { |
| | | |
| | | @Resource |
| | |
| | | */ |
| | | private RouteAndFareVo pricingForRoute(RouteAndFareDto routeAndFareDto, RouteVo routeVo, XpPricing xpPricing, String userId) { |
| | | XpPricingCardVo xpPricingCardVo; |
| | | if (xpPricing.getPricingType() == 1) { |
| | | ; if (xpPricing.getPricingType() == 1) { |
| | | xpPricingCardVo = xpPricingUtil.calculationPrice(userId, |
| | | JSON.parseObject(xpPricing.getBasicPricingJson()), |
| | | JSON.parseArray(xpPricing.getStartingFareJson()), |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @Configuration |
| | | //@Configuration |
| | | public class MiniprogramConfigurer extends WebMvcConfigurerAdapter { |
| | | |
| | | @Resource |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @Configuration |
| | | //@Configuration |
| | | public class MiniprogramConfigurer extends WebMvcConfigurerAdapter { |
| | | |
| | | @Resource |
| | |
| | | @Override |
| | | public Integer getTargetedServiceWeight(Long appUserId, String cityCode) { |
| | | List<XpWhitelist> one = xpWhitelistService.list(new QueryWrapper<XpWhitelist>().eq("app_user_id", appUserId).eq("status", 1) |
| | | .eq("is_deleted", 0).last(" and expire_time >= DATE(NOW()) or expire_time is null")); |
| | | .eq("is_deleted", 0).last(" and (expire_time >= DATE(NOW()) or expire_time is null)")); |
| | | if(!one.isEmpty()){ |
| | | List<Long> collect = one.stream().map(XpWhitelist::getId).collect(Collectors.toList()); |
| | | List<XpTargetedServiceWhitelist> xpTargetedServiceWhitelists = xpTargetedServiceWhitelistService.list(new QueryWrapper<XpTargetedServiceWhitelist>().in("whitelist_id", collect)); |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @Configuration |
| | | //@Configuration |
| | | public class MiniprogramConfigurer extends WebMvcConfigurerAdapter { |
| | | |
| | | @Resource |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @Configuration |
| | | //@Configuration |
| | | public class MiniprogramConfigurer extends WebMvcConfigurerAdapter { |
| | | |
| | | @Resource |
| | |
| | | SELECT a.* |
| | | FROM xp_vehicle as a |
| | | <where> a.is_deleted = 0 |
| | | <if test="query.vehicleType != null and query.vehicleType != ''"> |
| | | <if test="query.vehicleType != null"> |
| | | AND a.vehicle_type = #{query.vehicleType} |
| | | </if> |
| | | <if test="query.plateNumber != null and query.plateNumber != ''"> |
| | | AND a.plate_number LIKE CONCAT('%', #{query.plateNumber}, '%') |
| | | </if> |
| | | <!-- 运营状态 1运营中 2维修中 3已收车 4车辆异常 --> |
| | | <if test="query.operatingStatus != null and query.operatingStatus != ''"> |
| | | <if test="query.operatingStatus != null"> |
| | | AND a.operating_status = #{query.operatingStatus} |
| | | </if> |
| | | <!-- 车辆接单状态 1接单中 0空闲 --> |
| | | <if test="query.state != null and query.state != ''"> |
| | | <if test="query.state != null"> |
| | | AND a.state = #{query.state} |
| | | </if> |
| | | <if test="query.statusList != null and query.statusList.size()>0"> |