订单外层状态修改
This commit is contained in:
parent
f981612884
commit
0cbe4c46ba
|
|
@ -3,6 +3,7 @@ package com.bonus.material.order.controller;
|
|||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.material.book.domain.BookCarInfoDto;
|
||||
import com.bonus.material.order.domain.OrderDetailDto;
|
||||
import com.bonus.material.order.domain.OrderInfoDto;
|
||||
|
|
@ -75,7 +76,8 @@ public class OrderController extends BaseController {
|
|||
@ApiOperation(value = "订单状态流转修改")
|
||||
@PostMapping("/updateOrderStatus")
|
||||
public AjaxResult updateOrderStatus(@RequestBody OrderDetailDto orderInfoDto) {
|
||||
Integer i = orderMapper.updateOrderStatus(orderInfoDto.getIds(), orderInfoDto.getOrderStatus());
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
Integer i = orderMapper.updateOrderStatus(orderInfoDto.getIds(), orderInfoDto.getOrderStatus(),userId);
|
||||
if (i > 0) {
|
||||
return success();
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -27,5 +27,5 @@ public interface OrderMapper {
|
|||
|
||||
void updateMaStatus(OrderDetailDto orderDetailDto);
|
||||
|
||||
Integer updateOrderStatus(@Param("ids") List<Integer> ids, @Param("orderStatus") String orderStatus);
|
||||
Integer updateOrderStatus(@Param("ids") List<Integer> ids, @Param("orderStatus") String orderStatus,@Param("userId") Long userId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,6 +68,9 @@ public class OrderServiceImpl implements OrderService {
|
|||
String ids = dto.getIds();
|
||||
for (String id : ids.split(",")) {
|
||||
OrderDetailDto orderDetailDto = orderMapper.selectOrderDetailsById(id);
|
||||
if ("2".equals(orderDetailDto.getOrderStatus())){
|
||||
dto.setOrderStatus("2");
|
||||
}
|
||||
list.add(orderDetailDto);
|
||||
}
|
||||
dto.setDetailsList(list);
|
||||
|
|
|
|||
|
|
@ -40,7 +40,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
update book_car_detail set order_status = 1 where id = #{id}
|
||||
</update>
|
||||
<update id="updateOrderStatus">
|
||||
update ma_order_details set order_status = #{orderStatus} where id in
|
||||
update ma_order_details set order_status = #{orderStatus}
|
||||
<if test="orderStatus == 3">
|
||||
,pre_outbound_user = #{userId},
|
||||
,pre_outbound_time = now()
|
||||
</if>
|
||||
<if test="orderStatus == 4">
|
||||
,take_over_user = #{userId},
|
||||
,pre_outbound_time = now()
|
||||
</if>
|
||||
<if test="orderStatus == 3">
|
||||
,pre_outbound_user = #{phoneNumber},
|
||||
,pre_outbound_time = now()
|
||||
</if>
|
||||
where id in
|
||||
<foreach item="id" collection="ids" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
|
|
|||
Loading…
Reference in New Issue