mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-08-15 02:31:53 +08:00
mall + trade:
1、增加配送信息
This commit is contained in:
@@ -4,6 +4,7 @@ import cn.hutool.core.util.RandomUtil;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.trade.controller.app.delivery.vo.pickup.AppDeliveryPickUpStoreRespVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -17,7 +18,7 @@ import java.util.Random;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "用户 App - 门店自提")
|
||||
@Tag(name = "用户 App - 自提门店")
|
||||
@RestController
|
||||
@RequestMapping("/trade/delivery/pick-up-store")
|
||||
@Validated
|
||||
@@ -37,8 +38,8 @@ public class AppDeliverPickUpStoreController {
|
||||
store.setLogo("https://www.iocoder.cn/" + (i + 1) + ".png");
|
||||
store.setPhone("15601691300");
|
||||
store.setAreaId(random.nextInt(100000));
|
||||
store.setAreaName(RandomUtil.randomString(10));
|
||||
store.setDetailAddress(RandomUtil.randomString(10));
|
||||
store.setAreaName("上海-" + RandomUtil.randomString(10));
|
||||
store.setDetailAddress("普陀区-" + RandomUtil.randomString(10));
|
||||
store.setLatitude(random.nextDouble() * 10);
|
||||
store.setLongitude(random.nextDouble() * 10);
|
||||
store.setDistance(random.nextInt(1000));
|
||||
@@ -49,4 +50,23 @@ public class AppDeliverPickUpStoreController {
|
||||
return success(list);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得自提门店")
|
||||
@Parameter(name = "id", description = "门店编号")
|
||||
public CommonResult<AppDeliveryPickUpStoreRespVO> getOrder(@RequestParam("id") Long id) {
|
||||
AppDeliveryPickUpStoreRespVO store = new AppDeliveryPickUpStoreRespVO();
|
||||
Random random = new Random();
|
||||
store.setId(random.nextLong());
|
||||
store.setName(RandomUtil.randomString(10));
|
||||
store.setLogo("https://www.iocoder.cn/" + (1) + ".png");
|
||||
store.setPhone("15601691300");
|
||||
store.setAreaId(random.nextInt(100000));
|
||||
store.setAreaName("上海-" + RandomUtil.randomString(10));
|
||||
store.setDetailAddress("普陀区-" + RandomUtil.randomString(10));
|
||||
store.setLatitude(random.nextDouble() * 10);
|
||||
store.setLongitude(random.nextDouble() * 10);
|
||||
store.setDistance(random.nextInt(1000));
|
||||
return success(store);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -127,6 +127,14 @@ public class AppTradeOrderController {
|
||||
return success(orderCount);
|
||||
}
|
||||
|
||||
@PutMapping("/take")
|
||||
@Operation(summary = "确认交易订单收货")
|
||||
@Parameter(name = "id", description = "交易订单编号")
|
||||
public CommonResult<Boolean> takeOrder(@RequestParam("id") Long id) {
|
||||
// TODO @芋艿:未实现,mock 用
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/cancel")
|
||||
@Operation(summary = "取消交易订单")
|
||||
@Parameter(name = "id", description = "交易订单编号")
|
||||
|
@@ -102,6 +102,9 @@ public class AppTradeOrderDetailRespVO {
|
||||
@Schema(description = "收件人详细地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "中关村大街 1 号")
|
||||
private String receiverDetailAddress;
|
||||
|
||||
@Schema(description = "自提门店编号", example = "1088")
|
||||
private Long pickUpStoreId;
|
||||
|
||||
// ========== 售后基本信息 ==========
|
||||
|
||||
// ========== 营销基本信息 ==========
|
||||
|
@@ -44,7 +44,7 @@ public class AppTradeOrderSettlementReqVO {
|
||||
private Long addressId;
|
||||
|
||||
@Schema(description = "自提门店编号", example = "1088")
|
||||
private Long pickupStoreId;
|
||||
private Long pickUpStoreId;
|
||||
@Schema(description = "收件人名称", example = "芋艿") // 选择门店自提时,该字段为联系人名
|
||||
private String receiverName;
|
||||
@Schema(description = "收件人手机", example = "15601691300") // 选择门店自提时,该字段为联系人手机
|
||||
|
@@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.trade.dal.dataobject.order;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.enums.TerminalEnum;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.iocoder.yudao.module.trade.dal.dataobject.delivery.DeliveryPickUpStoreDO;
|
||||
import cn.iocoder.yudao.module.trade.enums.delivery.DeliveryTypeEnum;
|
||||
import cn.iocoder.yudao.module.trade.enums.order.*;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
@@ -171,13 +172,6 @@ public class TradeOrderDO extends BaseDO {
|
||||
* 枚举 {@link DeliveryTypeEnum}
|
||||
*/
|
||||
private Integer deliveryType;
|
||||
/**
|
||||
* 配置模板的编号
|
||||
*
|
||||
* 关联 DeliveryTemplateDO 的 id 编号
|
||||
*/
|
||||
// TODO 芋艿:需要删除
|
||||
private Long deliveryTemplateId;
|
||||
/**
|
||||
* 发货物流公司编号
|
||||
*/
|
||||
@@ -197,7 +191,6 @@ public class TradeOrderDO extends BaseDO {
|
||||
*/
|
||||
private LocalDateTime deliveryTime;
|
||||
|
||||
// TODO @芋艿:pickUpStoreId;
|
||||
/**
|
||||
* 收货时间
|
||||
*/
|
||||
@@ -219,6 +212,13 @@ public class TradeOrderDO extends BaseDO {
|
||||
*/
|
||||
private String receiverDetailAddress;
|
||||
|
||||
/**
|
||||
* 自提门店编号
|
||||
*
|
||||
* 关联 {@link DeliveryPickUpStoreDO#getId()}
|
||||
*/
|
||||
private Long pickUpStoreId;
|
||||
|
||||
// ========== 售后基本信息 ==========
|
||||
/**
|
||||
* 售后状态
|
||||
|
Reference in New Issue
Block a user