| | |
| | | |
| | | @RequestMapping(value = "/order/delete/auth") |
| | | @ManagerAuth(memo = "手动删除订单") |
| | | @Transactional |
| | | public R delete(@RequestParam Long orderId){ |
| | | Order order = orderService.selectById(orderId); |
| | | if (order != null) { |
| | |
| | | if (!orderService.updateById(order)) { |
| | | throw new CoolException("删除订单失败"); |
| | | } |
| | | orderDetlService.modifyStatus(orderId, 0); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} else { |
| | | wrapper.orderBy("create_time", false); |
| | | } |
| | | wrapper.eq("status", 0); |
| | | return R.ok(orderDetlService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | |
| | | |
| | | int decrease(@Param("orderNo")String orderNo, @Param("matnr")String matnr, @Param("batch")String batch, @Param("qty")Double qty); |
| | | |
| | | int modifyStatus(@Param("orderId") Long orderId, @Param("status")Integer status); |
| | | |
| | | } |
| | |
| | | |
| | | boolean decrease(String orderNo, String matnr, String batch, Double qty); |
| | | |
| | | boolean modifyStatus(Long orderId, Integer status); |
| | | |
| | | } |
| | |
| | | return this.baseMapper.decrease(orderNo, matnr, batch, qty) > 0; |
| | | } |
| | | |
| | | @Override |
| | | public boolean modifyStatus(Long orderId, Integer status) { |
| | | return this.baseMapper.modifyStatus(orderId, status) > 0; |
| | | } |
| | | |
| | | } |
| | |
| | | </choose> |
| | | </update> |
| | | |
| | | <update id="modifyStatus"> |
| | | update man_order_detl |
| | | set status = #{status} |
| | | where 1=1 |
| | | and order_id = #{orderId} |
| | | </update> |
| | | |
| | | </mapper> |