Merge remote-tracking branch 'origin/master'
| | |
| | | //添加快递号和修改订单状态 |
| | | order.setExpressJson(code); |
| | | order.setOrderStatus(2); |
| | | //添加查询快递信息队列 |
| | | //一小时后定时查询快递信息 |
| | | SystemConfig systemConfig = systemConfigClient.getSystemConfig(3).getData(); |
| | | JSONObject jsonObject = JSON.parseObject(systemConfig.getContent()); |
| | | Integer waitTime = jsonObject.getInteger("waitTime"); |
| | | redisTemplate.opsForZSet().add("order_express", order.getId(), LocalDateTime.now().plusHours(waitTime).toEpochSecond(ZoneOffset.UTC)); |
| | | |
| | | JSONObject jsonObject1 = JSON.parseObject(code); |
| | | String com = jsonObject1.getString("com"); |
| | | String num = jsonObject1.getString("num"); |
| | | UserAddress userAddress = JSON.parseObject(order.getAddressJson(), UserAddress.class); |
| | | MapTrackKD100Vo mapTrackKD100Vo = ExpressDeliveryUtil.kd100MapTrack(com, num, order.getDeliverProvince() + order.getDeliverCity(), |
| | | userAddress.getProvince() + userAddress.getCity()); |
| | | order.setExpressResult(JSON.toJSONString(mapTrackKD100Vo)); |
| | | this.updateById(order); |
| | | return R.ok(); |
| | | } |
| | |
| | | BigDecimal bigDecimal = BigDecimal.ZERO; |
| | | for (MyShoppingCartVo myShoppingCartVo : goodsList) { |
| | | bigDecimal = bigDecimal.add(myShoppingCartVo.getCash().multiply(new BigDecimal(myShoppingCartVo.getNumber()))); |
| | | myShoppingCartVo.setEarnSpendingPoints(myShoppingCartVo.getEarnSpendingPoints() * myShoppingCartVo.getNumber()); |
| | | } |
| | | confirmOrderVo.setOrderMoney(bigDecimal); |
| | | }else{ |
| | | int sum = 0; |
| | | for (MyShoppingCartVo myShoppingCartVo : goodsList) { |
| | | sum += (myShoppingCartVo.getPoint() * myShoppingCartVo.getNumber()); |
| | | myShoppingCartVo.setEarnSpendingPoints(myShoppingCartVo.getEarnSpendingPoints() * myShoppingCartVo.getNumber()); |
| | | } |
| | | confirmOrderVo.setOrderPoint(sum); |
| | | } |
| | |
| | | userCouponClient.editUserCoupon(userCoupon); |
| | | } |
| | | } |
| | | //添加查询快递信息队列 |
| | | if(StringUtils.isNotEmpty(order.getExpressJson())){ |
| | | //一小时后定时查询快递信息 |
| | | redisTemplate.opsForZSet().add("order_express", order.getId(), LocalDateTime.now().plusHours(1).toEpochSecond(ZoneOffset.UTC)); |
| | | } |
| | | |
| | | |
| | | //删除购物车数据 |
| | | userid = tokenService.getLoginUserApplet().getUserid(); |
| | |
| | | userCouponClient.editUserCoupon(userCoupon); |
| | | } |
| | | } |
| | | //添加查询快递信息队列 |
| | | if(StringUtils.isNotEmpty(order.getExpressJson())){ |
| | | //一小时后定时查询快递信息 |
| | | redisTemplate.opsForZSet().add("order_express", order.getId(), LocalDateTime.now().plusHours(1).toEpochSecond(ZoneOffset.UTC)); |
| | | } |
| | | |
| | | } |
| | | //积分支付 |
| | | if(3 == shoppingCartPayment.getPaymentType()){ |
| | |
| | | //删除购物车数据 |
| | | this.removeBatchByIds(ids); |
| | | } |
| | | //添加查询快递信息队列 |
| | | if(StringUtils.isNotEmpty(order.getExpressJson())){ |
| | | //一小时后定时查询快递信息 |
| | | SystemConfig systemConfig = systemConfigClient.getSystemConfig(3).getData(); |
| | | JSONObject jsonObject = JSON.parseObject(systemConfig.getContent()); |
| | | Integer waitTime = jsonObject.getInteger("waitTime"); |
| | | redisTemplate.opsForZSet().add("order_express", order.getId(), LocalDateTime.now().plusHours(waitTime).toEpochSecond(ZoneOffset.UTC)); |
| | | } |
| | | |
| | | } |
| | | |
| | | //添加账户余额支付明细 |
| | |
| | | userCoupon.setUseTime(LocalDateTime.now()); |
| | | userCouponClient.editUserCoupon(userCoupon); |
| | | } |
| | | } |
| | | //添加查询快递信息队列 |
| | | if(StringUtils.isNotEmpty(order.getExpressJson())){ |
| | | //一小时后定时查询快递信息 |
| | | redisTemplate.opsForZSet().add("order_express", order.getId(), LocalDateTime.now().plusHours(1).toEpochSecond(ZoneOffset.UTC)); |
| | | } |
| | | |
| | | //删除购物车数据 |
| | |
| | | package com.ruoyi.order.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | @ApiModelProperty("联系电话") |
| | | private String phone; |
| | | @ApiModelProperty("申请时间") |
| | | private String createTime; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime createTime; |
| | | @ApiModelProperty("售后类型(1退货退款2仅退款)") |
| | | private Integer refundMethod; |
| | | @ApiModelProperty("申请原因") |
| | |
| | | a.id, |
| | | b.order_number as orderNumber, |
| | | b.app_user_id as appUserId, |
| | | DATE_FORMAT(a.create_time, '%Y-%m-%d %H:%m:%s') as createTime, |
| | | a.create_time as createTime, |
| | | a.refund_method as refundMethod, |
| | | a.refund_reason as refundReason, |
| | | a.pass_status as passStatus, |
| | |
| | | List<Region> list = regionService.list(); |
| | | List<Region> collect = list.stream().filter(s -> s.getParentId() == 0).collect(Collectors.toList()); |
| | | for (Region region : collect) { |
| | | List<Region> collect1 = list.stream().filter(s -> s.getParentId() == region.getId()).collect(Collectors.toList()); |
| | | List<Region> collect1 = list.stream().filter(s -> s.getParentId().equals(region.getId())).collect(Collectors.toList()); |
| | | for (Region region1 : collect1) { |
| | | List<Region> collect2 = list.stream().filter(s -> s.getParentId() == region1.getId()).collect(Collectors.toList()); |
| | | List<Region> collect2 = list.stream().filter(s -> s.getParentId().equals(region1.getId())).collect(Collectors.toList()); |
| | | region1.setChilds(collect2); |
| | | } |
| | | region.setChilds(collect1); |
| | |
| | | shop.setCustomOrderNumber(0); |
| | | shop.setAppUserId(appUser.getId()); |
| | | String city = TencentMapUtil.inverseGeographicalAnalysis(shop.getLongitude(), shop.getLatitude(), false); |
| | | if(!StringUtils.hasLength(city)){ |
| | | city = "510100"; |
| | | } |
| | | shop.setProvinceCode(city.substring(0, 2) + "0000"); |
| | | shop.setCityCode(city.substring(0, 4) + "00"); |
| | | shop.setDistrictCode(city); |
| | |
| | | // 查询有没有门店绑定这个被删除的门店 |
| | | List<Shop> shops = shopService.lambdaQuery().eq(Shop::getPid, shop.getId()).list(); |
| | | for (Shop shop1 : shops) { |
| | | shop1.setPid(0); |
| | | LambdaUpdateWrapper<Shop> set = new LambdaUpdateWrapper<Shop>().set(Shop::getPid, null) |
| | | .eq(Shop::getId,shop1.getId()); |
| | | shopService.update(set); |
| | | } |
| | | shopService.updateBatchById(shops); |
| | | appUserClient.clearBindShop(shop.getId()); |
| | | UserShop userShop = new UserShop(); |
| | | userShop.setShopId(shop.getId()); |
| | |
| | | if(first.isPresent()){ |
| | | AppUserShop appUserShop = first.get(); |
| | | Technician technician = technicianService.getOne(new LambdaQueryWrapper<Technician>().eq(Technician::getAppUserId, appUserShop.getAppUserId()) |
| | | .eq(Technician::getShopId, appUserShop.getShopId()).eq(Technician::getDelFlag, 0).eq(Technician::getStatus, 1)); |
| | | .eq(Technician::getShopId, appUserShop.getShopId()).eq(Technician::getDelFlag, 0).eq(Technician::getStatus, 2)); |
| | | if(null != technician){ |
| | | technicianId = technician.getId(); |
| | | } |
| | | } |
| | | List<TechnicianSubscribeVO> list = technicianSubscribeMapper.getTechnicianSubscribeByUserAndShop(pageInfo, shopId, status, technicianId); |
| | | for (TechnicianSubscribeVO technicianSubscribeVO : list) { |
| | | String id = technicianSubscribeVO.getId(); |