批量修改订单状态

master
luojian 2025-02-12 14:39:13 +08:00
parent 11f69ca5f0
commit 6df5c5d556
3 changed files with 25 additions and 1 deletions

View File

@ -409,6 +409,15 @@ public class BizOrderController extends BaseController {
return toAjax(bizOrderService.deleteBizOrderByIds(ids));
}
/**
*
*/
@Log(title = "订单", businessType = BusinessType.DELETE)
@PostMapping("/orderStatus/update/{ids}")
public AjaxResult updateOrderStatus(@PathVariable Long[] ids) {
return toAjax(bizOrderService.updateOrderStatus(ids));
}
/**
*

View File

@ -78,4 +78,6 @@ public interface IBizOrderService
public int arrived(Map map);
Map<String,Long> getOrderStaticsByDriver();
public int updateOrderStatus(Long[] ids);
}

View File

@ -486,6 +486,20 @@ public class BizOrderServiceImpl implements IBizOrderService {
return bizOrderMapper.update(null, updateWrapper);
}
/**
*
* @param ids id
* @return
*/
@Override
public int updateOrderStatus(Long[] ids) {
UpdateWrapper<BizOrder> updateWrapper = new UpdateWrapper<>();
updateWrapper.in("id", (Object[]) ids);
updateWrapper.set("order_status", "3"); //状态改为已完成
return bizOrderMapper.update(null, updateWrapper);
}
/**
*
*
@ -758,7 +772,6 @@ public class BizOrderServiceImpl implements IBizOrderService {
bizOrder.setOrderSn(orderSn);
}
@Override
public int goDelivery(Map map){
BizDriver bizDriver = bizDriverMapper.selectByUserId(SecurityUtils.getUserId());