Commit 002475f33afc797e9286700c8c6f52d22ae752b7
1 parent
d2c135ed
订单管理:完善订单管理 补全相关接口
Showing
14 changed files
with
111 additions
and
147 deletions
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/DeliveryExpressController.java
| ... | ... | @@ -69,7 +69,7 @@ public class DeliveryExpressController { |
| 69 | 69 | |
| 70 | 70 | @GetMapping("/list-all-simple") |
| 71 | 71 | @Operation(summary = "获取快递公司精简信息列表", description = "主要用于前端的下拉选项") |
| 72 | - public CommonResult<List<DeliveryExpressSimpleRespVO>> getSimpleBrandList() { | |
| 72 | + public CommonResult<List<DeliveryExpressSimpleRespVO>> getSimpleDeliveryExpressList() { | |
| 73 | 73 | // 获取品牌列表,只要开启状态的 |
| 74 | 74 | List<DeliveryExpressDO> list = deliveryExpressService.getDeliveryExpressListByStatus(CommonStatusEnum.ENABLE.getStatus()); |
| 75 | 75 | // 排序后,返回给前端 | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/DeliveryPickUpStoreController.java
| 1 | 1 | package cn.iocoder.yudao.module.trade.controller.admin.delivery; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 5 | -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; | |
| 6 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 7 | 6 | import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup.*; |
| 8 | 7 | import cn.iocoder.yudao.module.trade.convert.delivery.DeliveryPickUpStoreConvert; |
| 9 | 8 | import cn.iocoder.yudao.module.trade.dal.dataobject.delivery.DeliveryPickUpStoreDO; |
| ... | ... | @@ -16,14 +15,11 @@ import org.springframework.validation.annotation.Validated; |
| 16 | 15 | import org.springframework.web.bind.annotation.*; |
| 17 | 16 | |
| 18 | 17 | import javax.annotation.Resource; |
| 19 | -import javax.servlet.http.HttpServletResponse; | |
| 20 | 18 | import javax.validation.Valid; |
| 21 | -import java.io.IOException; | |
| 22 | 19 | import java.util.Collection; |
| 23 | 20 | import java.util.List; |
| 24 | 21 | |
| 25 | 22 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 26 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 27 | 23 | |
| 28 | 24 | @Tag(name = "管理后台 - 自提门店") |
| 29 | 25 | @RestController |
| ... | ... | @@ -67,6 +63,15 @@ public class DeliveryPickUpStoreController { |
| 67 | 63 | return success(DeliveryPickUpStoreConvert.INSTANCE.convert(deliveryPickUpStore)); |
| 68 | 64 | } |
| 69 | 65 | |
| 66 | + @GetMapping("/list-all-simple") | |
| 67 | + @Operation(summary = "获取快递公司精简信息列表") | |
| 68 | + public CommonResult<List<DeliveryPickUpStoreSimpleRespVO>> getSimpleDeliveryPickUpStoreList() { | |
| 69 | + // 获取品牌列表,只要开启状态的 | |
| 70 | + List<DeliveryPickUpStoreDO> list = deliveryPickUpStoreService.getDeliveryPickUpStoreListByStatus(CommonStatusEnum.ENABLE.getStatus()); | |
| 71 | + // 排序后,返回给前端 | |
| 72 | + return success(DeliveryPickUpStoreConvert.INSTANCE.convertList1(list)); | |
| 73 | + } | |
| 74 | + | |
| 70 | 75 | @GetMapping("/list") |
| 71 | 76 | @Operation(summary = "获得自提门店列表") |
| 72 | 77 | @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") |
| ... | ... | @@ -84,16 +89,4 @@ public class DeliveryPickUpStoreController { |
| 84 | 89 | return success(DeliveryPickUpStoreConvert.INSTANCE.convertPage(pageResult)); |
| 85 | 90 | } |
| 86 | 91 | |
| 87 | - // TODO @jason:导出去掉好列;简化下,一般用不到哈。 | |
| 88 | - @GetMapping("/export-excel") | |
| 89 | - @Operation(summary = "导出自提门店 Excel") | |
| 90 | - @PreAuthorize("@ss.hasPermission('trade:delivery:pick-up-store:export')") | |
| 91 | - @OperateLog(type = EXPORT) | |
| 92 | - public void exportDeliveryPickUpStoreExcel(@Valid DeliveryPickUpStoreExportReqVO exportReqVO, | |
| 93 | - HttpServletResponse response) throws IOException { | |
| 94 | - List<DeliveryPickUpStoreDO> list = deliveryPickUpStoreService.getDeliveryPickUpStoreList(exportReqVO); | |
| 95 | - // 导出 Excel | |
| 96 | - List<DeliveryPickUpStoreExcelVO> datas = DeliveryPickUpStoreConvert.INSTANCE.convertList02(list); | |
| 97 | - ExcelUtils.write(response, "自提门店.xls", "数据", DeliveryPickUpStoreExcelVO.class, datas); | |
| 98 | - } | |
| 99 | 92 | } | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/pickup/DeliveryPickUpStoreExcelVO.java deleted
| 1 | -package cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; | |
| 4 | -import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; | |
| 5 | -import cn.iocoder.yudao.module.system.enums.DictTypeConstants; | |
| 6 | -import com.alibaba.excel.annotation.ExcelProperty; | |
| 7 | -import lombok.Data; | |
| 8 | - | |
| 9 | -import java.time.LocalDateTime; | |
| 10 | - | |
| 11 | -@Data | |
| 12 | -public class DeliveryPickUpStoreExcelVO { | |
| 13 | - | |
| 14 | - @ExcelProperty("编号") | |
| 15 | - private Long id; | |
| 16 | - | |
| 17 | - @ExcelProperty("门店名称") | |
| 18 | - private String name; | |
| 19 | - | |
| 20 | - @ExcelProperty("门店简介") | |
| 21 | - private String introduction; | |
| 22 | - | |
| 23 | - @ExcelProperty("门店手机") | |
| 24 | - private String phone; | |
| 25 | - | |
| 26 | - @ExcelProperty("门店所在区域") | |
| 27 | - private String areaName; | |
| 28 | - | |
| 29 | - @ExcelProperty("门店详细地址") | |
| 30 | - private String detailAddress; | |
| 31 | - | |
| 32 | - @ExcelProperty("门店logo") | |
| 33 | - private String logo; | |
| 34 | - | |
| 35 | - // TODO @jason:是不是可以加个 convert? | |
| 36 | - /** | |
| 37 | - * easy-excel 好像暂时不支持 LocalTime. 转成string | |
| 38 | - */ | |
| 39 | - @ExcelProperty("营业开始时间") | |
| 40 | - private String openingTime; | |
| 41 | - | |
| 42 | - @ExcelProperty("营业结束时间") | |
| 43 | - private String closingTime; | |
| 44 | - | |
| 45 | - @ExcelProperty("纬度") | |
| 46 | - private String latitude; | |
| 47 | - | |
| 48 | - @ExcelProperty("经度") | |
| 49 | - private String longitude; | |
| 50 | - | |
| 51 | - @ExcelProperty(value = "状态", converter = DictConvert.class) | |
| 52 | - @DictFormat(DictTypeConstants.COMMON_STATUS) | |
| 53 | - private Integer status; | |
| 54 | - | |
| 55 | - @ExcelProperty("创建时间") | |
| 56 | - private LocalDateTime createTime; | |
| 57 | - | |
| 58 | -} |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/pickup/DeliveryPickUpStoreExportReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | |
| 4 | -import cn.iocoder.yudao.framework.common.validation.InEnum; | |
| 5 | -import io.swagger.v3.oas.annotations.media.Schema; | |
| 6 | -import lombok.Data; | |
| 7 | -import org.springframework.format.annotation.DateTimeFormat; | |
| 8 | - | |
| 9 | -import java.time.LocalDateTime; | |
| 10 | - | |
| 11 | -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | |
| 12 | - | |
| 13 | -@Schema(description = "管理后台 - 自提门店 Excel 导出 Request VO,参数和 DeliveryPickUpStorePageReqVO 是一致的") | |
| 14 | -@Data | |
| 15 | -public class DeliveryPickUpStoreExportReqVO { | |
| 16 | - | |
| 17 | - @Schema(description = "门店名称", example = "李四") | |
| 18 | - private String name; | |
| 19 | - | |
| 20 | - @Schema(description = "门店手机") | |
| 21 | - private String phone; | |
| 22 | - | |
| 23 | - @Schema(description = "区域id", example = "18733") | |
| 24 | - private Integer areaId; | |
| 25 | - | |
| 26 | - @Schema(description = "门店状态", example = "1") | |
| 27 | - @InEnum(CommonStatusEnum.class) | |
| 28 | - private Integer status; | |
| 29 | - | |
| 30 | - @Schema(description = "创建时间") | |
| 31 | - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 32 | - private LocalDateTime[] createTime; | |
| 33 | - | |
| 34 | -} |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/pickup/DeliveryPickUpStoreSimpleRespVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.validation.Mobile; | |
| 4 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
| 5 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 6 | +import lombok.AllArgsConstructor; | |
| 7 | +import lombok.Data; | |
| 8 | +import lombok.NoArgsConstructor; | |
| 9 | + | |
| 10 | +import javax.validation.constraints.NotBlank; | |
| 11 | +import javax.validation.constraints.NotNull; | |
| 12 | +import java.time.LocalTime; | |
| 13 | + | |
| 14 | +@Schema(description = "管理后台 - 自提门店精简信息 Response VO") | |
| 15 | +@Data | |
| 16 | +@NoArgsConstructor | |
| 17 | +@AllArgsConstructor | |
| 18 | +public class DeliveryPickUpStoreSimpleRespVO { | |
| 19 | + | |
| 20 | + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "23128") | |
| 21 | + @NotNull(message = "编号不能为空") | |
| 22 | + private Long id; | |
| 23 | + | |
| 24 | + @Schema(description = "门店名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") | |
| 25 | + @NotBlank(message = "门店名称不能为空") | |
| 26 | + private String name; | |
| 27 | + | |
| 28 | + @Schema(description = "门店手机", requiredMode = Schema.RequiredMode.REQUIRED, example = "15601892312") | |
| 29 | + @NotBlank(message = "门店手机不能为空") | |
| 30 | + @Mobile | |
| 31 | + private String phone; | |
| 32 | + | |
| 33 | + @Schema(description = "区域编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "18733") | |
| 34 | + @NotNull(message = "区域编号不能为空") | |
| 35 | + private Integer areaId; | |
| 36 | + | |
| 37 | + @Schema(description = "门店详细地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "复旦大学路 188 号") | |
| 38 | + @NotBlank(message = "门店详细地址不能为空") | |
| 39 | + private String detailAddress; | |
| 40 | + | |
| 41 | + @Schema(description = "营业开始时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 42 | + @NotNull(message = "营业开始时间不能为空") | |
| 43 | + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm") | |
| 44 | + private LocalTime openingTime; | |
| 45 | + | |
| 46 | + @Schema(description = "营业结束时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 47 | + @NotNull(message = "营业结束时间不能为空") | |
| 48 | + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm") | |
| 49 | + private LocalTime closingTime; | |
| 50 | + | |
| 51 | +} | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/order/TradeOrderController.java
| ... | ... | @@ -25,6 +25,7 @@ import java.util.Map; |
| 25 | 25 | |
| 26 | 26 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 27 | 27 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; |
| 28 | +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; | |
| 28 | 29 | |
| 29 | 30 | @Tag(name = "管理后台 - 交易订单") |
| 30 | 31 | @RestController |
| ... | ... | @@ -75,6 +76,15 @@ public class TradeOrderController { |
| 75 | 76 | return success(TradeOrderConvert.INSTANCE.convert(order, orderItems, user)); |
| 76 | 77 | } |
| 77 | 78 | |
| 79 | + @GetMapping("/get-express-track-list") | |
| 80 | + @Operation(summary = "获得交易订单的物流轨迹") | |
| 81 | + @Parameter(name = "id", description = "交易订单编号") | |
| 82 | + @PreAuthorize("@ss.hasPermission('trade:order:query')") | |
| 83 | + public CommonResult<List<?>> getOrderExpressTrackList(@RequestParam("id") Long id) { | |
| 84 | + return success(TradeOrderConvert.INSTANCE.convertList02( | |
| 85 | + tradeOrderQueryService.getExpressTrackList(id, getLoginUserId()))); | |
| 86 | + } | |
| 87 | + | |
| 78 | 88 | @PostMapping("/delivery") |
| 79 | 89 | @Operation(summary = "订单发货") |
| 80 | 90 | @PreAuthorize("@ss.hasPermission('trade:order:update')") | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/order/vo/TradeOrderBaseVO.java
| ... | ... | @@ -6,9 +6,9 @@ import lombok.Data; |
| 6 | 6 | import java.time.LocalDateTime; |
| 7 | 7 | |
| 8 | 8 | /** |
| 9 | -* 交易订单 Base VO,提供给添加、修改、详细的子 VO 使用 | |
| 10 | -* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 | |
| 11 | -*/ | |
| 9 | + * 交易订单 Base VO,提供给添加、修改、详细的子 VO 使用 | |
| 10 | + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 | |
| 11 | + */ | |
| 12 | 12 | @Data |
| 13 | 13 | public class TradeOrderBaseVO { |
| 14 | 14 | |
| ... | ... | @@ -87,6 +87,12 @@ public class TradeOrderBaseVO { |
| 87 | 87 | |
| 88 | 88 | // ========== 收件 + 物流基本信息 ========== |
| 89 | 89 | |
| 90 | + @Schema(description = "配送方式", example = "10") | |
| 91 | + private Integer deliveryType; | |
| 92 | + | |
| 93 | + @Schema(description = "自提门店", example = "10") | |
| 94 | + private Long pickUpStoreId; | |
| 95 | + | |
| 90 | 96 | @Schema(description = "配送模板编号", example = "1024") |
| 91 | 97 | private Long deliveryTemplateId; |
| 92 | 98 | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/order/vo/TradeOrderDeliveryReqVO.java
| ... | ... | @@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.trade.controller.admin.order.vo; |
| 3 | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | 4 | import lombok.Data; |
| 5 | 5 | |
| 6 | -import javax.validation.constraints.NotEmpty; | |
| 7 | 6 | import javax.validation.constraints.NotNull; |
| 8 | 7 | |
| 9 | 8 | @Schema(description = "管理后台 - 订单发货 Request VO") |
| ... | ... | @@ -19,7 +18,6 @@ public class TradeOrderDeliveryReqVO { |
| 19 | 18 | private Long logisticsId; |
| 20 | 19 | |
| 21 | 20 | @Schema(description = "发货物流单号", example = "SF123456789") |
| 22 | - @NotEmpty(message = "发货物流单号不能为空") | |
| 23 | 21 | private String logisticsNo; |
| 24 | 22 | |
| 25 | 23 | } | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/order/vo/TradeOrderPageReqVO.java
| ... | ... | @@ -10,6 +10,7 @@ import lombok.Data; |
| 10 | 10 | import org.springframework.format.annotation.DateTimeFormat; |
| 11 | 11 | |
| 12 | 12 | import java.time.LocalDateTime; |
| 13 | +import java.util.List; | |
| 13 | 14 | |
| 14 | 15 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| 15 | 16 | |
| ... | ... | @@ -30,6 +31,12 @@ public class TradeOrderPageReqVO extends PageParam { |
| 30 | 31 | @Mobile |
| 31 | 32 | private String userMobile; |
| 32 | 33 | |
| 34 | + @Schema(description = "发货物流公司编号", example = "1") | |
| 35 | + private Long logisticsId; | |
| 36 | + | |
| 37 | + @Schema(description = "自提门店编号", example = "[1,2]") | |
| 38 | + private List<Long> pickUpStoreIds; | |
| 39 | + | |
| 33 | 40 | @Schema(description = "收件人名称", example = "小红") |
| 34 | 41 | private String receiverName; |
| 35 | 42 | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/convert/delivery/DeliveryPickUpStoreConvert.java
| 1 | 1 | package cn.iocoder.yudao.module.trade.convert.delivery; |
| 2 | 2 | |
| 3 | -import java.util.*; | |
| 4 | - | |
| 5 | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | - | |
| 7 | 4 | import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; |
| 8 | 5 | import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup.DeliveryPickUpStoreCreateReqVO; |
| 9 | -import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup.DeliveryPickUpStoreExcelVO; | |
| 10 | 6 | import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup.DeliveryPickUpStoreRespVO; |
| 7 | +import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup.DeliveryPickUpStoreSimpleRespVO; | |
| 11 | 8 | import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup.DeliveryPickUpStoreUpdateReqVO; |
| 12 | 9 | import cn.iocoder.yudao.module.trade.dal.dataobject.delivery.DeliveryPickUpStoreDO; |
| 13 | 10 | import org.mapstruct.Mapper; |
| 14 | -import org.mapstruct.Mapping; | |
| 15 | 11 | import org.mapstruct.Named; |
| 16 | 12 | import org.mapstruct.factory.Mappers; |
| 17 | 13 | |
| 14 | +import java.util.List; | |
| 15 | + | |
| 18 | 16 | @Mapper |
| 19 | 17 | public interface DeliveryPickUpStoreConvert { |
| 20 | 18 | |
| ... | ... | @@ -30,14 +28,10 @@ public interface DeliveryPickUpStoreConvert { |
| 30 | 28 | |
| 31 | 29 | PageResult<DeliveryPickUpStoreRespVO> convertPage(PageResult<DeliveryPickUpStoreDO> page); |
| 32 | 30 | |
| 33 | - List<DeliveryPickUpStoreExcelVO> convertList02(List<DeliveryPickUpStoreDO> list); | |
| 34 | - | |
| 35 | - @Mapping(source = "areaId", target = "areaName", qualifiedByName = "convertAreaIdToName") | |
| 36 | - DeliveryPickUpStoreExcelVO convert2(DeliveryPickUpStoreDO bean); | |
| 37 | - | |
| 38 | 31 | @Named("convertAreaIdToName") |
| 39 | 32 | default String convertAreaIdToName(Integer areaId) { |
| 40 | 33 | return AreaUtils.format(areaId); |
| 41 | 34 | } |
| 42 | 35 | |
| 36 | + List<DeliveryPickUpStoreSimpleRespVO> convertList1(List<DeliveryPickUpStoreDO> list); | |
| 43 | 37 | } | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/delivery/DeliveryPickUpStoreMapper.java
| ... | ... | @@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.trade.dal.mysql.delivery; |
| 3 | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 4 | 4 | import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; |
| 5 | 5 | import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; |
| 6 | -import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup.DeliveryPickUpStoreExportReqVO; | |
| 7 | 6 | import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup.DeliveryPickUpStorePageReqVO; |
| 8 | 7 | import cn.iocoder.yudao.module.trade.dal.dataobject.delivery.DeliveryPickUpStoreDO; |
| 9 | 8 | import org.apache.ibatis.annotations.Mapper; |
| ... | ... | @@ -23,15 +22,10 @@ public interface DeliveryPickUpStoreMapper extends BaseMapperX<DeliveryPickUpSto |
| 23 | 22 | .orderByDesc(DeliveryPickUpStoreDO::getId)); |
| 24 | 23 | } |
| 25 | 24 | |
| 26 | - default List<DeliveryPickUpStoreDO> selectList(DeliveryPickUpStoreExportReqVO reqVO) { | |
| 27 | - return selectList(new LambdaQueryWrapperX<DeliveryPickUpStoreDO>() | |
| 28 | - .likeIfPresent(DeliveryPickUpStoreDO::getName, reqVO.getName()) | |
| 29 | - .eqIfPresent(DeliveryPickUpStoreDO::getPhone, reqVO.getPhone()) | |
| 30 | - .eqIfPresent(DeliveryPickUpStoreDO::getAreaId, reqVO.getAreaId()) | |
| 31 | - .eqIfPresent(DeliveryPickUpStoreDO::getStatus, reqVO.getStatus()) | |
| 32 | - .betweenIfPresent(DeliveryPickUpStoreDO::getCreateTime, reqVO.getCreateTime()) | |
| 33 | - .orderByDesc(DeliveryPickUpStoreDO::getId)); | |
| 25 | + default List<DeliveryPickUpStoreDO> selectListByStatus(Integer status) { | |
| 26 | + return selectList(DeliveryPickUpStoreDO::getStatus, status); | |
| 34 | 27 | } |
| 28 | + | |
| 35 | 29 | } |
| 36 | 30 | |
| 37 | 31 | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/order/TradeOrderMapper.java
| ... | ... | @@ -34,6 +34,8 @@ public interface TradeOrderMapper extends BaseMapperX<TradeOrderDO> { |
| 34 | 34 | .eqIfPresent(TradeOrderDO::getStatus, reqVO.getStatus()) |
| 35 | 35 | .eqIfPresent(TradeOrderDO::getPayChannelCode, reqVO.getPayChannelCode()) |
| 36 | 36 | .eqIfPresent(TradeOrderDO::getTerminal,reqVO.getTerminal()) |
| 37 | + .eqIfPresent(TradeOrderDO::getLogisticsId, reqVO.getLogisticsId()) | |
| 38 | + .inIfPresent(TradeOrderDO::getPickUpStoreId, reqVO.getPickUpStoreIds()) | |
| 37 | 39 | .betweenIfPresent(TradeOrderDO::getCreateTime, reqVO.getCreateTime())); |
| 38 | 40 | } |
| 39 | 41 | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/delivery/DeliveryPickUpStoreService.java
| 1 | 1 | package cn.iocoder.yudao.module.trade.service.delivery; |
| 2 | 2 | |
| 3 | -import java.util.*; | |
| 4 | -import javax.validation.*; | |
| 5 | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 4 | import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup.DeliveryPickUpStoreCreateReqVO; |
| 7 | -import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup.DeliveryPickUpStoreExportReqVO; | |
| 8 | 5 | import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup.DeliveryPickUpStorePageReqVO; |
| 9 | 6 | import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup.DeliveryPickUpStoreUpdateReqVO; |
| 10 | 7 | import cn.iocoder.yudao.module.trade.dal.dataobject.delivery.DeliveryPickUpStoreDO; |
| 11 | 8 | |
| 9 | +import javax.validation.Valid; | |
| 10 | +import java.util.Collection; | |
| 11 | +import java.util.List; | |
| 12 | + | |
| 12 | 13 | /** |
| 13 | 14 | * 自提门店 Service 接口 |
| 14 | 15 | * |
| ... | ... | @@ -63,10 +64,10 @@ public interface DeliveryPickUpStoreService { |
| 63 | 64 | PageResult<DeliveryPickUpStoreDO> getDeliveryPickUpStorePage(DeliveryPickUpStorePageReqVO pageReqVO); |
| 64 | 65 | |
| 65 | 66 | /** |
| 66 | - * 获得自提门店列表, 用于 Excel 导出 | |
| 67 | + * 获得指定状态的自提门店列表 | |
| 67 | 68 | * |
| 68 | - * @param exportReqVO 查询条件 | |
| 69 | + * @param status 状态 | |
| 69 | 70 | * @return 自提门店列表 |
| 70 | 71 | */ |
| 71 | - List<DeliveryPickUpStoreDO> getDeliveryPickUpStoreList(DeliveryPickUpStoreExportReqVO exportReqVO); | |
| 72 | + List<DeliveryPickUpStoreDO> getDeliveryPickUpStoreListByStatus(Integer status); | |
| 72 | 73 | } | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/delivery/DeliveryPickUpStoreServiceImpl.java
| ... | ... | @@ -2,21 +2,20 @@ package cn.iocoder.yudao.module.trade.service.delivery; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 4 | 4 | import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup.DeliveryPickUpStoreCreateReqVO; |
| 5 | -import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup.DeliveryPickUpStoreExportReqVO; | |
| 6 | 5 | import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup.DeliveryPickUpStorePageReqVO; |
| 7 | 6 | import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup.DeliveryPickUpStoreUpdateReqVO; |
| 8 | 7 | import cn.iocoder.yudao.module.trade.convert.delivery.DeliveryPickUpStoreConvert; |
| 9 | 8 | import cn.iocoder.yudao.module.trade.dal.dataobject.delivery.DeliveryPickUpStoreDO; |
| 10 | 9 | import cn.iocoder.yudao.module.trade.dal.mysql.delivery.DeliveryPickUpStoreMapper; |
| 11 | 10 | import org.springframework.stereotype.Service; |
| 12 | -import javax.annotation.Resource; | |
| 13 | 11 | import org.springframework.validation.annotation.Validated; |
| 14 | 12 | |
| 15 | -import java.util.*; | |
| 16 | - | |
| 13 | +import javax.annotation.Resource; | |
| 14 | +import java.util.Collection; | |
| 15 | +import java.util.List; | |
| 17 | 16 | |
| 18 | 17 | import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; |
| 19 | -import static cn.iocoder.yudao.module.trade.enums.ErrorCodeConstants.*; | |
| 18 | +import static cn.iocoder.yudao.module.trade.enums.ErrorCodeConstants.PICK_UP_STORE_NOT_EXISTS; | |
| 20 | 19 | |
| 21 | 20 | /** |
| 22 | 21 | * 自提门店 Service 实现类 |
| ... | ... | @@ -78,7 +77,8 @@ public class DeliveryPickUpStoreServiceImpl implements DeliveryPickUpStoreServic |
| 78 | 77 | } |
| 79 | 78 | |
| 80 | 79 | @Override |
| 81 | - public List<DeliveryPickUpStoreDO> getDeliveryPickUpStoreList(DeliveryPickUpStoreExportReqVO exportReqVO) { | |
| 82 | - return deliveryPickUpStoreMapper.selectList(exportReqVO); | |
| 80 | + public List<DeliveryPickUpStoreDO> getDeliveryPickUpStoreListByStatus(Integer status) { | |
| 81 | + return deliveryPickUpStoreMapper.selectListByStatus(status); | |
| 83 | 82 | } |
| 83 | + | |
| 84 | 84 | } | ... | ... |