KKSU
2023-12-25 80dafbb830ed4f5bc38037fc4c4e574eb5f55629
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallAppServiceImpl.java
@@ -82,7 +82,7 @@
    @Override
    public FebsResponse appMemberInfo(ApiMallAppMemberInfoDto apiMallAppMemberInfoDto) {
        Long memberId = LoginUserUtil.getLoginUser().getId();
//        Long memberId = LoginUserUtil.getLoginUser().getId();
        List<ApiMallAppMemberInfoVo> mallMembers = this.baseMapper.selectMemberInfoLikePhone(apiMallAppMemberInfoDto.getPhone());
        return new FebsResponse().success().data(mallMembers);
    }
@@ -123,6 +123,7 @@
        orderInfo.setIsApp(AppContants.IS_APP_ORDER);
        orderInfo.setOrderTime(new Date());
        orderInfo.setMemberId(addOrderDto.getMemberId());
        orderInfo.setPayResult(2);
        //会员结算
        orderInfo.setStatus(OrderStatusEnum.WAIT_PAY.getValue());
        mallOrderInfoMapper.insert(orderInfo);
@@ -212,6 +213,7 @@
        orderInfo.setIsApp(AppContants.IS_APP_ORDER);
        orderInfo.setOrderTime(new Date());
        orderInfo.setStatus(OrderStatusEnum.WAIT_PAY.getValue());
        orderInfo.setPayResult(2);
        if (CollUtil.isEmpty(addOrderDto.getItems())) {
            throw new FebsException("商品明细不能为空。");
        }
@@ -256,6 +258,7 @@
        orderInfo.setIsApp(AppContants.IS_APP_ORDER);
        orderInfo.setOrderTime(new Date());
        orderInfo.setStatus(OrderStatusEnum.WAIT_PAY.getValue());
        orderInfo.setPayResult(2);
        if (CollUtil.isEmpty(addOrderDto.getItems())) {
            throw new FebsException("商品明细不能为空。");
        }
@@ -333,8 +336,10 @@
        if(!flag){
            throw new FebsException("请打开微信付款码!");
        }
        MallOrderInfo mallOrderInfo = mallOrderInfoMapper.selectById(orderId);
        if(OrderStatusEnum.FINISH.getValue() == (mallOrderInfo.getStatus())){
            throw new FebsException("已支付");
        }
        mallOrderInfo.setTakeCode(wxPayCode);
        List<ApiGetOrderOrderItemVo> appOrderItemByOrderId = mallOrderItemMapper.getAppOrderItemByOrderId(orderId);
        if(CollUtil.isEmpty(appOrderItemByOrderId)){
@@ -342,7 +347,7 @@
        }else{
            mallOrderInfo.setName(appOrderItemByOrderId.get(0).getGoodsName());
        }
        mallOrderInfo.setPayResult("2");
//        mallOrderInfo.setPayResult(2);
        mallOrderInfoMapper.updateById(mallOrderInfo);
        // 发起付款码支付请求
        String payResult = xcxCodePayService.pay(mallOrderInfo);