|
|
@@ -7,10 +7,7 @@ import com.sqx.modules.app.annotation.Login;
|
|
|
import com.sqx.modules.app.entity.UserEntity;
|
|
|
import com.sqx.modules.app.service.UserService;
|
|
|
import com.sqx.modules.common.service.CommonInfoService;
|
|
|
-import com.sqx.modules.errand.dto.OrderRiderDeliveryDTO;
|
|
|
-import com.sqx.modules.errand.dto.RiderDeliveryDTO;
|
|
|
-import com.sqx.modules.errand.dto.RiderTransferOrderDTO;
|
|
|
-import com.sqx.modules.errand.dto.WaitForAcceptOrderQueryDTO;
|
|
|
+import com.sqx.modules.errand.dto.*;
|
|
|
import com.sqx.modules.errand.entity.ErrandAddress;
|
|
|
import com.sqx.modules.errand.entity.ErrandComplaint;
|
|
|
import com.sqx.modules.errand.entity.ErrandEvaluate;
|
|
|
@@ -389,7 +386,7 @@ public class AppTbIndentController {
|
|
|
@ApiOperation("扫码或收单码查询跑腿订单列表(带分页")
|
|
|
public Result selectMemberPage(@RequestAttribute Long userId, Integer page, Integer limit, String acquireCode) {
|
|
|
//如果只有一条数据就看看数据是否能被当前骑手接
|
|
|
- PageUtils datas = tbIndentService.selectIndentPage(page, limit, acquireCode);
|
|
|
+ PageUtils datas = tbIndentService.selectIndentPage(page, limit, acquireCode, userId);
|
|
|
if (datas.getTotalCount() == 1) {
|
|
|
//校验当前骑手是否能接单
|
|
|
Result checkData = tbIndentService.checkIndent(userId, acquireCode);
|
|
|
@@ -402,7 +399,7 @@ public class AppTbIndentController {
|
|
|
}
|
|
|
//endregion
|
|
|
|
|
|
- //region 2、根据订单id抢单(跑腿订单);
|
|
|
+ //region 2、根据订单id抢单(跑腿订单) 以及取货按钮功能;
|
|
|
@Login
|
|
|
@PostMapping(value = "orderIndentReceiving")
|
|
|
@ApiOperation("骑手根据扫码或收单码接单")
|
|
|
@@ -422,11 +419,24 @@ public class AppTbIndentController {
|
|
|
}
|
|
|
//endregion
|
|
|
|
|
|
- //region 取货
|
|
|
+ //region 转单
|
|
|
+ @Login
|
|
|
+ @ApiOperation("根据订单ID进行转单操作")
|
|
|
+ @PostMapping("transferByOrderId")
|
|
|
+ public Result transferByOrderId(@RequestAttribute Long userId, @Valid RiderTransferByOrderIdDTO transferByOrderIdDTO) {
|
|
|
+ // 检查入参
|
|
|
+ checkTransferByOrderIdParam(transferByOrderIdDTO);
|
|
|
|
|
|
- //endregion
|
|
|
+ tbIndentService.transferByOrderId(userId, transferByOrderIdDTO);
|
|
|
|
|
|
- //region 转单
|
|
|
+ return Result.success();
|
|
|
+ }
|
|
|
+
|
|
|
+ private void checkTransferByOrderIdParam(RiderTransferByOrderIdDTO transferOrderDTO) {
|
|
|
+ if (StringUtils.isBlank(transferOrderDTO.getPhone()) && StringUtils.isBlank(transferOrderDTO.getRealName())) {
|
|
|
+ throw new SqxException("待分配骑手手机号和待分配骑手真实姓名不能同时为空");
|
|
|
+ }
|
|
|
+ }
|
|
|
//endregion
|
|
|
//endregion
|
|
|
|