欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 新闻 > 资讯 > 商家接单业务

商家接单业务

2024/10/24 17:30:48 来源:https://blog.csdn.net/Very_a/article/details/140895841  浏览:    关键词:商家接单业务

文章目录

    • 概要
    • 整体架构流程
    • 技术细节
    • 小结

概要

商家接单是电子商务、外卖平台、在线零售等多个行业中的一项核心业务流程。这项功能允许商家接收来自客户的订单,并对其进行处理。

需求分析以及接口设计

技术细节

1.Controller层:

/*** 接单* @param orderConfirmDTO* @return*/@ApiOperation("接单")@PutMapping("/confirm")public Result confirm(@RequestBody OrdersConfirmDTO orderConfirmDTO){log.info("接单,{}",orderConfirmDTO);orderService.confirm(orderConfirmDTO);return Result.success();}

2.Service层:

public void confirm(OrdersConfirmDTO orderConfirmDTO) {Orders orders = new Orders();orders.setId(orderConfirmDTO.getId());orders.setStatus(Orders.CONFIRMED);//更新此订单orderMapper.update(orders);}

3.Mapper层:

<update id="update" parameterType="com.sky.entity.Orders">update orders<set><if test="cancelReason != null and cancelReason!='' ">cancel_reason=#{cancelReason},</if><if test="rejectionReason != null and rejectionReason!='' ">rejection_reason=#{rejectionReason},</if><if test="cancelTime != null">cancel_time=#{cancelTime},</if><if test="payStatus != null">pay_status=#{payStatus},</if><if test="payMethod != null">pay_method=#{payMethod},</if><if test="checkoutTime != null">checkout_time=#{checkoutTime},</if><if test="status != null">status = #{status},</if><if test="deliveryTime != null">delivery_time = #{deliveryTime}</if></set>where id = #{id}</update>

效果展示

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com