| | |
| | | import com.github.binarywang.wxpay.exception.WxPayException; |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import okhttp3.Address; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.checkerframework.checker.units.qual.C; |
| | |
| | | private ShopMapper shopMapper; |
| | | |
| | | @Autowired |
| | | private LabelsMapper labelsMapper; |
| | | |
| | | @Autowired |
| | | private ShopGoodsRelationMapper relationMapper; |
| | | |
| | | @Autowired |
| | |
| | | |
| | | @Autowired |
| | | private AreasService areasService; |
| | | |
| | | @Autowired |
| | | private AreasMapper areasMapper; |
| | | |
| | | @Autowired |
| | | private GoodsorderDetailJoinMapper goodsorderDetailJoinMapper; |
| | |
| | | member.setImgFullUrl(memberfullUrl + member.getImgurl()); |
| | | memberOrderResponse.setMember(member); |
| | | } |
| | | |
| | | return memberOrderResponse; |
| | | } |
| | | |
| | |
| | | //邮费金额 |
| | | if(Objects.nonNull(request.getReceiveType())){ |
| | | if(Constants.equalsInteger(request.getReceiveType(),Constants.ZERO)){ |
| | | if(Objects.nonNull(request.getAddressId())){ |
| | | Addr addr = addrMapper.selectById(request.getAddressId()); |
| | | if(Objects.isNull(addr)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到收货地址信息"); |
| | | } |
| | | Areas areas = areasMapper.selectOne(new QueryWrapper<Areas>().lambda() |
| | | .eq(Areas::getIsdeleted,Constants.ZERO) |
| | | .eq(Areas::getId,StringUtils.leftPad(addr.getAreaId().toString().substring(0,2),6,"0")) |
| | | .isNotNull(Areas::getYunFeeId) |
| | | .last(" limit 1 ") |
| | | ); |
| | | if(Objects.nonNull(areas)){ |
| | | Labels labels = labelsMapper.selectById(areas.getYunFeeId()); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | //TODO 根据收货地址 查询运费配置 |
| | | |
| | | |
| | | |
| | | //计算商品信息总重量 |
| | | BigDecimal totalWeight = goodsCalculateList.stream().map(i-> |
| | | i.getWeight().multiply(new BigDecimal(i.getGoodsNum().toString())) |