feat(sip): 更新订单和发货单状态时间
- 在 DeliveryListMapper 中添加 updateTimeByOrderId 方法,用于更新发货单状态时间 - 在 OrderInfoMapper 中添加 updateTimeByDeliveryId 方法,用于更新订单状态时间 - 在 DeliveryListServiceImpl 和 OrderInfoServiceImpl 中调用新增的方法,以更新相关记录的时间戳master
parent
7b7da68519
commit
ef534b6069
|
@ -70,4 +70,6 @@ public interface DeliveryListMapper
|
||||||
void deleteDeliveryListByDeliveryId(Long deliveryId);
|
void deleteDeliveryListByDeliveryId(Long deliveryId);
|
||||||
|
|
||||||
void deleteDeliveryListByDeliveryIds(String[] strArray);
|
void deleteDeliveryListByDeliveryIds(String[] strArray);
|
||||||
|
|
||||||
|
void updateTimeByOrderId(List<Long> longs);
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,4 +115,6 @@ public interface OrderInfoMapper
|
||||||
Integer selectUniqueCount(OrderInfo orderInfo);
|
Integer selectUniqueCount(OrderInfo orderInfo);
|
||||||
|
|
||||||
List<StatisticsDetailDto> homePageData(HomepageQueryDto dto);
|
List<StatisticsDetailDto> homePageData(HomepageQueryDto dto);
|
||||||
|
|
||||||
|
void updateTimeByDeliveryId(List<Long> deliveryId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,6 +141,8 @@ public class DeliveryListServiceImpl implements IDeliveryListService {
|
||||||
return AjaxResult.error(errMsg.toString());
|
return AjaxResult.error(errMsg.toString());
|
||||||
}
|
}
|
||||||
deliveryListMapper.insertBatch(deliveryList);
|
deliveryListMapper.insertBatch(deliveryList);
|
||||||
|
infoMapper.updateTimeByDeliveryId(Collections.singletonList(deliveryId));
|
||||||
|
|
||||||
return AjaxResult.success("导入成功");
|
return AjaxResult.success("导入成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ import com.ruoyi.sip.dto.ApiDataQueryDto;
|
||||||
import com.ruoyi.sip.dto.HomepageQueryDto;
|
import com.ruoyi.sip.dto.HomepageQueryDto;
|
||||||
import com.ruoyi.sip.dto.StatisticsDetailDto;
|
import com.ruoyi.sip.dto.StatisticsDetailDto;
|
||||||
import com.ruoyi.sip.dto.StatisticsDto;
|
import com.ruoyi.sip.dto.StatisticsDto;
|
||||||
|
import com.ruoyi.sip.mapper.DeliveryListMapper;
|
||||||
import com.ruoyi.sip.service.IAgentInfoService;
|
import com.ruoyi.sip.service.IAgentInfoService;
|
||||||
import com.ruoyi.sip.service.ICustomerInfoService;
|
import com.ruoyi.sip.service.ICustomerInfoService;
|
||||||
import com.ruoyi.sip.service.IProductInfoService;
|
import com.ruoyi.sip.service.IProductInfoService;
|
||||||
|
@ -38,6 +39,8 @@ import com.ruoyi.sip.service.IOrderInfoService;
|
||||||
import com.ruoyi.common.core.text.Convert;
|
import com.ruoyi.common.core.text.Convert;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 合同档案Service业务层处理
|
* 合同档案Service业务层处理
|
||||||
*
|
*
|
||||||
|
@ -55,6 +58,8 @@ public class OrderInfoServiceImpl implements IOrderInfoService
|
||||||
private ICustomerInfoService customerInfoService;
|
private ICustomerInfoService customerInfoService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IProductInfoService productInfoService;
|
private IProductInfoService productInfoService;
|
||||||
|
@Resource
|
||||||
|
private DeliveryListMapper deliveryListMapper;
|
||||||
/**
|
/**
|
||||||
* 查询合同档案
|
* 查询合同档案
|
||||||
*
|
*
|
||||||
|
@ -149,6 +154,7 @@ public class OrderInfoServiceImpl implements IOrderInfoService
|
||||||
// }
|
// }
|
||||||
// orderInfoMapper.updateListBatch(orderListList);
|
// orderInfoMapper.updateListBatch(orderListList);
|
||||||
// }
|
// }
|
||||||
|
deliveryListMapper.updateTimeByOrderId(Collections.singletonList(orderInfo.getId()));
|
||||||
return orderInfoMapper.updateOrderInfo(orderInfo);
|
return orderInfoMapper.updateOrderInfo(orderInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -135,6 +135,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateTimeByOrderId">
|
||||||
|
update delivery_list set updated_at = now()
|
||||||
|
where delivery_id in (select id from order_delivery where order_id in
|
||||||
|
<foreach item="item" collection="list" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>)
|
||||||
|
</update>
|
||||||
|
|
||||||
<delete id="deleteDeliveryListById" parameterType="Long">
|
<delete id="deleteDeliveryListById" parameterType="Long">
|
||||||
delete from delivery_list where id = #{id}
|
delete from delivery_list where id = #{id}
|
||||||
|
|
|
@ -378,6 +378,14 @@
|
||||||
where id = #{item.id}
|
where id = #{item.id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateTimeByDeliveryId">
|
||||||
|
update order_info
|
||||||
|
set
|
||||||
|
updated_at=now()
|
||||||
|
where id in (select order_id from order_delivery where id in
|
||||||
|
<foreach collection="list" item="item" open="(" close=")" separator=",">#{item}</foreach>
|
||||||
|
)
|
||||||
|
</update>
|
||||||
|
|
||||||
<delete id="deleteOrderInfoById" parameterType="Long">
|
<delete id="deleteOrderInfoById" parameterType="Long">
|
||||||
update order_info
|
update order_info
|
||||||
|
|
Loading…
Reference in New Issue