订单状态流转代码提交
This commit is contained in:
parent
e16dcb5eaa
commit
d23d2c74e7
|
|
@ -65,7 +65,7 @@ public class OrderController extends BaseController {
|
|||
if (dto.getId() != null) {
|
||||
OrderInfoDto orderInfoDto = orderService.getOrderDetailsById(dto);
|
||||
return success(orderInfoDto);
|
||||
}else {
|
||||
} else {
|
||||
return error("参数错误");
|
||||
}
|
||||
}
|
||||
|
|
@ -76,8 +76,8 @@ public class OrderController extends BaseController {
|
|||
@ApiOperation(value = "订单状态流转修改")
|
||||
@PostMapping("/updateOrderStatus")
|
||||
public AjaxResult updateOrderStatus(@RequestBody OrderDetailDto orderInfoDto) {
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
Integer i = orderMapper.updateOrderStatus(orderInfoDto.getIds(), orderInfoDto.getOrderStatus(),userId);
|
||||
String userName = SecurityUtils.getLoginUser().getUsername();
|
||||
Integer i = orderMapper.updateOrderStatus(orderInfoDto.getIds(), orderInfoDto.getOrderStatus(), userName);
|
||||
if (i > 0) {
|
||||
return success();
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public class OrderDetailDto {
|
|||
@ApiModelProperty(value = "日租金")
|
||||
private BigDecimal dayLeasePrice;
|
||||
|
||||
@ApiModelProperty(value = "订单状态(0未下单 1已下单 2待出库 3待收货 4租赁中 5已退租 6已完成)")
|
||||
@ApiModelProperty(value = "订单状态(0未下单 1已下单 2待出库 3待收货 4租赁中 5已退租 6已完成 7已驳回)")
|
||||
private String orderStatus;
|
||||
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
|
|
|
|||
|
|
@ -27,5 +27,5 @@ public interface OrderMapper {
|
|||
|
||||
void updateMaStatus(OrderDetailDto orderDetailDto);
|
||||
|
||||
Integer updateOrderStatus(@Param("ids") List<Integer> ids, @Param("orderStatus") String orderStatus,@Param("userId") Long userId);
|
||||
Integer updateOrderStatus(@Param("ids") List<Integer> ids, @Param("orderStatus") String orderStatus,@Param("userName") String userName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,15 +42,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<update id="updateOrderStatus">
|
||||
update ma_order_details set order_status = #{orderStatus}
|
||||
<if test="orderStatus == 3">
|
||||
,pre_outbound_user = #{userId},
|
||||
,pre_outbound_user = #{userName},
|
||||
,pre_outbound_time = now()
|
||||
</if>
|
||||
<if test="orderStatus == 4">
|
||||
,take_over_user = #{userId},
|
||||
,take_over_user = #{userName},
|
||||
,take_over_time = now()
|
||||
</if>
|
||||
<if test="orderStatus == 5">
|
||||
,rent_over_user = #{userId},
|
||||
,rent_over_user = #{userName},
|
||||
,rent_over_time = now()
|
||||
</if>
|
||||
where id in
|
||||
|
|
|
|||
Loading…
Reference in New Issue