feat:更改外卖订单状态

This commit is contained in:
dzc committed 2026-04-08 16:48:20 +08:00
1 parent c439bf4c4c
commit a0cca668d9
6 files changed
+89 -4

No files matched your search

@@ -9,6 +9,7 @@ import java.util.List;
/**
* 订单状态
* 外卖状态 100(待接单(外卖))->110(配送中(外卖))-> 200(已核销(已完成))
*/
@AllArgsConstructor
@Getter
@@ -18,8 +19,12 @@ public enum HardOrderStatusEnum {
PAY("5", "已经支付"),
OFFLINE_PAY("6", "没有网络本地支付"),
REFUND("10", "退款"),
CANCEL("20", "已核销"),
CANCEL("20", "已核销(已完成)"),
UNFOLLOW("30", "已取消(智能柜)"),
TAKE_OUT_AWAIT("100", "待接单(外卖)"),
TAKE_OUT_ING("110", "配送中(外卖)"),
;
private final String type;
private final String description;
@@ -0,0 +1,24 @@
package com.bsd.pjcloud.hard.api.dto.order.remote;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
@Data
public class HardUpdateTakeOutStatusDto {
@NotNull(message = "订单id不能为空")
private Long orderId;
@NotNull(message = "订单id不能为空")
private HardUpdateTakeOutStatusDto.TakeOutStatus status;
public enum TakeOutStatus {
// 配送中
TAKE_OUT_ING,
// 已完成
DONE,
// 退款
REFUND, CANCEL,
}
}
@@ -5,6 +5,7 @@ import com.bsd.pjcloud.common.core.constant.ServiceNameConstants;
import com.bsd.pjcloud.common.core.util.R;
import com.bsd.pjcloud.common.feign.annotation.NoToken;
import com.bsd.pjcloud.hard.api.dto.order.HardOrderPreferencesDto;
import com.bsd.pjcloud.hard.api.dto.order.remote.HardUpdateTakeOutStatusDto;
import com.bsd.pjcloud.hard.api.entity.order.HardOrderEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
@@ -27,4 +28,8 @@ public interface RemoteHardOrderService {
@NoToken
@GetMapping("/hard-order/mch-count-by-id")
R<Long> getMchCountById(@RequestParam Long id);
@NoToken
@PostMapping("/hard-order/update-take-out-status")
R<Boolean> updateTakeOutStatus(@RequestBody HardUpdateTakeOutStatusDto dto);
}