| | |
| | | import com.ruoyi.other.api.domain.Shop; |
| | | import com.ruoyi.other.api.factory.StoreFallbackFactory; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | |
| | | */ |
| | | @FeignClient(contextId = "StoreClient", value = ServiceNameConstants.OTHER_SERVICE, fallbackFactory = StoreFallbackFactory.class) |
| | | public interface StoreClient { |
| | | @PostMapping(value = "/shop/getDetailById") |
| | | @GetMapping(value = "/shop/getDetailById") |
| | | R<Shop> getStoreById(@RequestParam("id") Integer id); |
| | | |
| | | |
| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 个人信息 业务处理 |
| | |
| | | System.err.println(newPassword); |
| | | // String username = SecurityUtils.getUsername(); |
| | | SysUser user = userService.selectUserByUserName(username); |
| | | if (Objects.isNull(user)) |
| | | { |
| | | return error("未查询到该账号"); |
| | | } |
| | | String password = user.getPassword(); |
| | | if (!SecurityUtils.matchesPassword(oldPassword, password)) |
| | | { |
| | |
| | | orderList.stream().filter(o -> o.getId().equals(bc.getOrderId())).findFirst().ifPresent(o -> { |
| | | Long appUserId = o.getAppUserId(); |
| | | AppUser appUser = appUserService.getById(appUserId); |
| | | bc.setUserName(appUser.getName()); |
| | | bc.setAmount(o.getPaymentAmount()); |
| | | if(null != appUser){ |
| | | bc.setUserName(appUser.getName()); |
| | | bc.setAmount(o.getPaymentAmount()); |
| | | } |
| | | }); |
| | | |
| | | BigDecimal beforeAmount = bc.getBeforeAmount(); |
| | |
| | | out.flush(); |
| | | out.close(); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | // 获取用户直推代理用户数量 |
| | | List<AppUser> userAgentList = appUserService.list(new LambdaQueryWrapper<AppUser>() |
| | | .in(AppUser::getId, userShopList) |
| | | .eq(AppUser::getVipId, 5)); |
| | | .gt(AppUser::getVipId, 4)); |
| | | |
| | | // 代理下的准代理数量 |
| | | List<Long> userQuasiAgent = userAgentList.stream().map(AppUser::getId).collect(Collectors.toList()); |
| | |
| | | info.setVip(appUser.getVipId()); |
| | | GoodsSeckill goodsSeckill = seckillActivityInfoClient.getSeckillActivityInfo(info).getData(); |
| | | //没有秒杀活动或者添加的普通商品则不使用秒杀活动价格 |
| | | if((null == goodsSeckill || (null != goodsSeckill.getCashPayment() && null != goodsSeckill.getPointPayment())) || type == 1){ |
| | | if((null == goodsSeckill || (null == goodsSeckill.getCashPayment() && null == goodsSeckill.getPointPayment())) || type == 1){ |
| | | //没有秒杀价,则判断门店特价 |
| | | GetGoodsBargainPrice goodsBargainPrice = new GetGoodsBargainPrice(); |
| | | goodsBargainPrice.setGoodsId(goodsId); |
| | |
| | | IPage<TechnicianSubscribeVO> technicianSubscribeByUser = technicianSubscribeMapper.getTechnicianSubscribeByUser(page, userId, status); |
| | | technicianSubscribeByUser.getRecords().forEach(technicianSubscribeVO -> { |
| | | UserAddress userAddress = JSON.parseObject(technicianSubscribeVO.getUserAddress(), UserAddress.class); |
| | | technicianSubscribeVO.setUserAddress(userAddress.getProvince() + userAddress.getCity() + userAddress.getDistrict() + userAddress.getRecieveAddress()); |
| | | if (userAddress != null){ |
| | | technicianSubscribeVO.setUserAddress(userAddress.getProvince() + userAddress.getCity() + userAddress.getDistrict() + userAddress.getRecieveAddress()); |
| | | } |
| | | }); |
| | | return technicianSubscribeByUser; |
| | | } |