feat:
1. add accept function
This commit is contained in:
@@ -37,6 +37,7 @@ import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.modules.kiosk.pojo.dto.OrderApiRequest;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.modules.kiosk.pojo.entity.OrderEntity;
|
||||
@@ -132,4 +133,14 @@ public class OrderController extends BladeController {
|
||||
return R.status(orderService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单确认支付
|
||||
*/
|
||||
@PostMapping("/accept")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Operation(summary = "订单确认支付", description = "传入order")
|
||||
public R accept(@Valid @RequestBody OrderEntity order) {
|
||||
return R.status(orderService.accept(order));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -46,4 +46,6 @@ public interface IOrderService extends BaseService<OrderEntity> {
|
||||
*/
|
||||
IPage<OrderVO> selectOrderPage(IPage<OrderVO> page, OrderVO order);
|
||||
|
||||
boolean accept(OrderEntity order);
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
*/
|
||||
package org.springblade.modules.kiosk.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import org.springblade.modules.kiosk.pojo.entity.OrderEntity;
|
||||
import org.springblade.modules.kiosk.pojo.vo.OrderVO;
|
||||
import org.springblade.modules.kiosk.mapper.OrderMapper;
|
||||
@@ -47,4 +48,9 @@ public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, OrderEntity>
|
||||
return page.setRecords(baseMapper.selectOrderPage(page, order));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean accept(OrderEntity order) {
|
||||
return update(Wrappers.<OrderEntity>lambdaUpdate().eq(OrderEntity::getId, order.getId()).set(OrderEntity::getStatus, 2));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user