xin
2025-09-05 6f3c170403f34d452b5dc733043145d8d760fe41
Merge branch 'pxb' into xin
7 files modified
47 ■■■■■ changed files
oying-system/src/main/java/com/oying/modules/rider/domain/dto/RiderIncomeDetailQueryCriteria.java 2 ●●● patch | view | raw | blame | history
oying-system/src/main/java/com/oying/modules/rider/rest/WxRiderController.java 16 ●●●● patch | view | raw | blame | history
oying-system/src/main/java/com/oying/modules/rider/service/RiderInfoService.java 3 ●●●● patch | view | raw | blame | history
oying-system/src/main/java/com/oying/modules/rider/service/RiderWalletInfoService.java 2 ●●● patch | view | raw | blame | history
oying-system/src/main/java/com/oying/modules/rider/service/impl/RiderInfoServiceImpl.java 18 ●●●●● patch | view | raw | blame | history
oying-system/src/main/java/com/oying/modules/rider/service/impl/RiderOrderRecordServiceImpl.java 4 ●●●● patch | view | raw | blame | history
oying-system/src/main/java/com/oying/modules/rider/service/impl/RiderWalletInfoServiceImpl.java 2 ●●● patch | view | raw | blame | history
oying-system/src/main/java/com/oying/modules/rider/domain/dto/RiderIncomeDetailQueryCriteria.java
@@ -22,7 +22,7 @@
    private String riderName;
    @ApiModelProperty(value = "骑手ID")
    private String riderId;
    private Long riderId;
    @ApiModelProperty(value = "骑手手机号")
    private String riderPhone;
oying-system/src/main/java/com/oying/modules/rider/rest/WxRiderController.java
@@ -12,10 +12,7 @@
import com.oying.modules.rider.service.*;
import com.oying.modules.rider.utils.Constants;
import com.oying.service.BucketStorageService;
import com.oying.utils.FileUtil;
import com.oying.utils.PageResult;
import com.oying.utils.R;
import com.oying.utils.StringUtils;
import com.oying.utils.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
@@ -52,7 +49,7 @@
    @ApiOperation("查询第三方数据骑手信息")
    // @PreAuthorize("@el.check('riderInfo:list')")
    public ResponseEntity<?> getRiderSourceInfo(@PathVariable Long riderId) {
        RiderInfo riderInfo = riderInfoService.getRiderSourceInfo(riderId);
        RiderInfo riderInfo = riderInfoService.getRiderSourceInfo(SecurityUtils.getCurrentUserId());
        return ResponseEntity.ok(R.success(riderInfo));
    }
@@ -60,15 +57,15 @@
    @ApiOperation("同步查询第三方骑手信息 LY")
    // @PreAuthorize("@el.check('riderInfo:edit')")
    public ResponseEntity<?> syncRiderSourceInfo(@PathVariable String sourcePlatform) {
        riderInfoService.syncRiderSourceInfo(sourcePlatform);
        return ResponseEntity.ok(R.success("操作成功"));
        R result = riderInfoService.syncRiderSourceInfo(sourcePlatform);
        return ResponseEntity.ok(result);
    }
    @GetMapping("getRiderWalletInfo/{riderId}")
    @ApiOperation("查询骑手钱包信息")
    // @PreAuthorize("@el.check('riderWalletInfo:list')")
    public ResponseEntity<?> getRiderWalletInfo(@PathVariable String riderId) {
        RiderWalletInfo riderWalletInfo = riderWalletInfoService.getRiderWalletInfo(riderId);
        RiderWalletInfo riderWalletInfo = riderWalletInfoService.getRiderWalletInfo(SecurityUtils.getCurrentUserId());
        return ResponseEntity.ok(R.success(riderWalletInfo));
    }
@@ -76,6 +73,7 @@
    @ApiOperation("查询骑手订单收入明细分页")
    // @PreAuthorize("@el.check('riderIncomeDetail:list')")
    public ResponseEntity<?> getRiderIncomeDetail(RiderIncomeDetailQueryCriteria criteria) {
        criteria.setRiderId(SecurityUtils.getCurrentUserId());
        Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize());
        PageResult<RiderIncomeDetail> riderIncomeDetails = riderIncomeDetailService.queryAll(criteria, page);
        return ResponseEntity.ok(R.success(riderIncomeDetails));
@@ -85,6 +83,7 @@
    @ApiOperation("查询骑手提现记录分页")
    // @PreAuthorize("@el.check('riderWithdrawalRecord:list')")
    public ResponseEntity<?> getRiderWithdrawalRecord(RiderWithdrawalRecordQueryCriteria criteria) {
        criteria.setRiderId(SecurityUtils.getCurrentUserId());
        Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize());
        PageResult<RiderWithdrawalRecord> riderIncomeDetails = riderWithdrawalRecordService.queryAll(criteria, page);
        return ResponseEntity.ok(R.success(riderIncomeDetails));
@@ -94,6 +93,7 @@
    @ApiOperation("查询骑手订单记录分页")
    // @PreAuthorize("@el.check('riderOrderRecord:list')")
    public ResponseEntity<?> getRiderOrderRecord(RiderOrderRecordQueryCriteria criteria) {
        criteria.setRiderId(SecurityUtils.getCurrentUserId());
        Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize());
        PageResult<RiderOrderRecord> riderOrderRecordPageResult = riderOrderRecordService.queryAll(criteria, page);
        return ResponseEntity.ok(R.success(riderOrderRecordPageResult));
oying-system/src/main/java/com/oying/modules/rider/service/RiderInfoService.java
@@ -8,6 +8,7 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.oying.utils.PageResult;
import com.oying.utils.R;
/**
* @description 服务接口
@@ -61,7 +62,7 @@
     * 同步其他平台的骑手信息
     * @param sourcePlatform /
     */
    void syncRiderSourceInfo(String sourcePlatform);
    R syncRiderSourceInfo(String sourcePlatform);
    /**
     * 查询其他平台的骑手信息
oying-system/src/main/java/com/oying/modules/rider/service/RiderWalletInfoService.java
@@ -62,5 +62,5 @@
     * @param riderId 条件
     * @return RiderWalletInfo
     */
    RiderWalletInfo getRiderWalletInfo(String riderId);
    RiderWalletInfo getRiderWalletInfo(Long riderId);
}
oying-system/src/main/java/com/oying/modules/rider/service/impl/RiderInfoServiceImpl.java
@@ -12,8 +12,7 @@
import com.oying.modules.rider.utils.RiderSourceHttpUtils;
import com.oying.modules.system.domain.User;
import com.oying.modules.system.service.UserService;
import com.oying.utils.FileUtil;
import com.oying.utils.SecurityUtils;
import com.oying.utils.*;
import lombok.RequiredArgsConstructor;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -22,14 +21,11 @@
import com.oying.modules.rider.mapper.RiderInfoMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.oying.utils.PageUtil;
import java.math.BigDecimal;
import java.util.*;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.oying.utils.PageResult;
/**
 * @author pxb
@@ -99,7 +95,7 @@
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void syncRiderSourceInfo(String sourcePlatform) {
    public R syncRiderSourceInfo(String sourcePlatform) {
        Long riderId = SecurityUtils.getCurrentUserId();
        // 添加请求参数
        List<String> phoneList = new ArrayList<>();
@@ -165,9 +161,17 @@
                        // 添加变更记录...
                    }
                }
                return R.success(riderInfo, "获取骑手三方数据");
            } else {
                // 修改骑手信息为信息失效
                if(riderInfo != null) {
                    RiderInfo newRiderInfo = new RiderInfo();
                    newRiderInfo.setRiderId(riderId);
                    newRiderInfo.setEnabled(Constants.SOURCE_ENABLED_DFF);
                    updateById(newRiderInfo);
                }
                // 获取骑手三方数据为空,抛出异常
                throw new BadRequestException("获取骑手三方数据为空");
                return R.fail(null, "获取骑手三方数据为空");
            }
        } else {
            // 获取骑手三方数据失败,抛出异常
oying-system/src/main/java/com/oying/modules/rider/service/impl/RiderOrderRecordServiceImpl.java
@@ -136,7 +136,7 @@
        LocalDateTime orderLocalTime = LocalDateTime.parse(riderOrderRecord.getOrderTime(), formatter);
        Timestamp orderTime = Timestamp.valueOf(orderLocalTime);
        // 判断是否超时
        String isOvertime = Constants.IS_OVERTIME_YES;
        String isOvertime = Constants.IS_OVERTIME_NO;
        if (now.after(orderTime)) {
            isOvertime = Constants.IS_OVERTIME_YES;
        }
@@ -302,7 +302,7 @@
        // 返回参数
        orderResponse.getOrder().setOrderStatus(OrderStatusEnum.SEVEN.getKey());
        // 查询骑手钱包信息
        RiderWalletInfo riderWalletInfo = riderWalletInfoService.getRiderWalletInfo(String.valueOf(order.getRiderId()));
        RiderWalletInfo riderWalletInfo = riderWalletInfoService.getRiderWalletInfo(order.getRiderId());
        // 修改骑手钱包信息  // 骑手总金额添加配送费
        riderWalletInfo.setAmount(riderWalletInfo.getAmount().add(order.getSendPrice()));
        // 骑手可用余额添加配送费
oying-system/src/main/java/com/oying/modules/rider/service/impl/RiderWalletInfoServiceImpl.java
@@ -89,7 +89,7 @@
    }
    @Override
    public RiderWalletInfo getRiderWalletInfo(String riderId) {
    public RiderWalletInfo getRiderWalletInfo(Long riderId) {
        QueryWrapper<RiderWalletInfo> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq(RiderWalletInfo.COL_RIDER_ID, riderId);
        return riderWalletInfoMapper.selectOne(queryWrapper);