订单状态流转代码提交
This commit is contained in:
parent
e16dcb5eaa
commit
d23d2c74e7
|
|
@ -76,8 +76,8 @@ public class OrderController extends BaseController {
|
||||||
@ApiOperation(value = "订单状态流转修改")
|
@ApiOperation(value = "订单状态流转修改")
|
||||||
@PostMapping("/updateOrderStatus")
|
@PostMapping("/updateOrderStatus")
|
||||||
public AjaxResult updateOrderStatus(@RequestBody OrderDetailDto orderInfoDto) {
|
public AjaxResult updateOrderStatus(@RequestBody OrderDetailDto orderInfoDto) {
|
||||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
String userName = SecurityUtils.getLoginUser().getUsername();
|
||||||
Integer i = orderMapper.updateOrderStatus(orderInfoDto.getIds(), orderInfoDto.getOrderStatus(),userId);
|
Integer i = orderMapper.updateOrderStatus(orderInfoDto.getIds(), orderInfoDto.getOrderStatus(), userName);
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
return success();
|
return success();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ public class OrderDetailDto {
|
||||||
@ApiModelProperty(value = "日租金")
|
@ApiModelProperty(value = "日租金")
|
||||||
private BigDecimal dayLeasePrice;
|
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;
|
private String orderStatus;
|
||||||
|
|
||||||
@ApiModelProperty(value = "创建日期")
|
@ApiModelProperty(value = "创建日期")
|
||||||
|
|
|
||||||
|
|
@ -27,5 +27,5 @@ public interface OrderMapper {
|
||||||
|
|
||||||
void updateMaStatus(OrderDetailDto orderDetailDto);
|
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 id="updateOrderStatus">
|
||||||
update ma_order_details set order_status = #{orderStatus}
|
update ma_order_details set order_status = #{orderStatus}
|
||||||
<if test="orderStatus == 3">
|
<if test="orderStatus == 3">
|
||||||
,pre_outbound_user = #{userId},
|
,pre_outbound_user = #{userName},
|
||||||
,pre_outbound_time = now()
|
,pre_outbound_time = now()
|
||||||
</if>
|
</if>
|
||||||
<if test="orderStatus == 4">
|
<if test="orderStatus == 4">
|
||||||
,take_over_user = #{userId},
|
,take_over_user = #{userName},
|
||||||
,take_over_time = now()
|
,take_over_time = now()
|
||||||
</if>
|
</if>
|
||||||
<if test="orderStatus == 5">
|
<if test="orderStatus == 5">
|
||||||
,rent_over_user = #{userId},
|
,rent_over_user = #{userName},
|
||||||
,rent_over_time = now()
|
,rent_over_time = now()
|
||||||
</if>
|
</if>
|
||||||
where id in
|
where id in
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue