diff --git a/sql/mysql/optional/mall.sql b/sql/mysql/optional/mall.sql index 83853b22b..ca9f584b2 100644 --- a/sql/mysql/optional/mall.sql +++ b/sql/mysql/optional/mall.sql @@ -330,9 +330,9 @@ CREATE TABLE `product_favorite` ( -- ---------------------------- DROP TABLE IF EXISTS `trade_delivery_express_template`; CREATE TABLE `trade_delivery_express_template` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号,自增', + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号', `name` varchar(64) NOT NULL COMMENT '模板名称', - `charge_mode` tinyint NOT NULL DEFAULT 1 COMMENT '配送计费方式 1:按件 2:按重量 3:按体积', + `charge_mode` tinyint NOT NULL COMMENT '配送计费方式', `sort` int NOT NULL DEFAULT 0 COMMENT '排序', `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', @@ -348,11 +348,11 @@ CREATE TABLE `trade_delivery_express_template` ( -- ---------------------------- DROP TABLE IF EXISTS `trade_delivery_express_template_free`; CREATE TABLE `trade_delivery_express_template_free` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号,自增', - `template_id` bigint NOT NULL COMMENT '配送模板编号, 对应delivery_template表id', - `area_id` int NOT NULL COMMENT '包邮区域id', - `free_price` int NOT NULL COMMENT '包邮金额(单位分) 订单总金额>包邮金额才免运费', - `free_count` int NOT NULL DEFAULT 0 COMMENT '包邮件数,订单总件数>包邮件数才免运费', + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号', + `template_id` bigint NOT NULL COMMENT '快递运费模板编号', + `area_id` int NOT NULL COMMENT '包邮区域 id', + `free_price` int NOT NULL COMMENT '包邮金额,单位:分', + `free_count` int NOT NULL DEFAULT 0 COMMENT '包邮件数,', `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', @@ -368,13 +368,13 @@ CREATE TABLE `trade_delivery_express_template_free` ( DROP TABLE IF EXISTS `trade_delivery_express_template_charge`; CREATE TABLE `trade_delivery_express_template_charge` ( `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号,自增', - `template_id` bigint NOT NULL COMMENT '配送模板编号, 对应delivery_template表id', - `area_id` int NOT NULL COMMENT '配送区域id 1:适用于全国', - `charge_mode` tinyint NOT NULL COMMENT '配送计费方式 1:按件 2:按重量 3:按体积', - `start_count` double NOT NULL COMMENT '首件数量(件数,重量,或体积)', - `start_price` int NOT NULL COMMENT '起步价(单位分)', - `extra_count` double NOT NULL COMMENT '续件数量(件,重量,或体积)', - `extra_price` int NOT NULL COMMENT '额外价(单位分)', + `template_id` bigint NOT NULL COMMENT '快递运费模板编号', + `area_id` int NOT NULL COMMENT '配送区域 id', + `charge_mode` tinyint NOT NULL COMMENT '配送计费方式', + `start_count` double NOT NULL COMMENT '首件数量', + `start_price` int NOT NULL COMMENT '起步价,单位:分', + `extra_count` double NOT NULL COMMENT '续件数量', + `extra_price` int NOT NULL COMMENT '额外价,单位:分', `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', @@ -417,7 +417,7 @@ DROP TABLE IF EXISTS `trade_delivery_pick_up_store_staff`; CREATE TABLE `trade_delivery_pick_up_store_staff` ( `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号,自增', store_id bigint NOT NULL COMMENT '自提门店编号', - `status` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0正常 1停用)', + `status` tinyint NOT NULL DEFAULT 0 COMMENT '状态', `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', @@ -451,12 +451,12 @@ CREATE TABLE `trade_delivery_pick_up_store_staff` ( -- ---------------------------- DROP TABLE IF EXISTS `trade_delivery_express`; CREATE TABLE `trade_delivery_express` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号,自增', - `code` varchar(64) NOT NULL COMMENT '快递公司编号', + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号', + `code` varchar(64) NOT NULL COMMENT '快递公司编码', `name` varchar(64) NOT NULL COMMENT '快递公司名称', - `logo` varchar(256) COMMENT '快递公司logo', + `logo` varchar(256) COMMENT '快递公司 logo', `sort` int NOT NULL DEFAULT 0 COMMENT '排序', - `status` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0正常 1停用)', + `status` tinyint NOT NULL DEFAULT 0 COMMENT '状态', `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', @@ -540,4 +540,4 @@ INSERT INTO `ruoyi-vue-pro`.`system_dict_type` (`id`, `name`, `type`, `status`, INSERT INTO `ruoyi-vue-pro`.`system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1237, 2, '按体积', '3', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', '2023-05-21 22:47:18', '1', '2023-05-21 22:47:18', b'0'); INSERT INTO `ruoyi-vue-pro`.`system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1236, 1, '按重量', '2', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', '2023-05-21 22:46:58', '1', '2023-05-21 22:46:58', b'0'); INSERT INTO `ruoyi-vue-pro`.`system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1235, 0, '按件', '1', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', '2023-05-21 22:46:40', '1', '2023-05-21 22:46:40', b'0'); -COMMIT; \ No newline at end of file +COMMIT; diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/DeliveryExpressController.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/DeliveryExpressController.java index 98515935b..fde0b5d79 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/DeliveryExpressController.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/DeliveryExpressController.java @@ -1,31 +1,28 @@ package cn.iocoder.yudao.module.trade.controller.admin.delivery; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.*; import cn.iocoder.yudao.module.trade.convert.delivery.DeliveryExpressConvert; import cn.iocoder.yudao.module.trade.dal.dataobject.delivery.DeliveryExpressDO; import cn.iocoder.yudao.module.trade.service.delivery.DeliveryExpressService; -import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import org.springframework.validation.annotation.Validated; -import org.springframework.security.access.prepost.PreAuthorize; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.Parameter; 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.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; -import javax.validation.constraints.*; -import javax.validation.*; -import javax.servlet.http.*; -import java.util.*; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.io.IOException; +import java.util.List; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; - -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; - -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 快递公司") @RestController diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/DeliveryExpressBaseVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/DeliveryExpressBaseVO.java index ea1a10461..538027c81 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/DeliveryExpressBaseVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/DeliveryExpressBaseVO.java @@ -1,11 +1,9 @@ package cn.iocoder.yudao.module.trade.controller.admin.delivery.vo; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; -import java.util.*; -import java.time.LocalDateTime; -import java.time.LocalDateTime; -import javax.validation.constraints.*; +import lombok.Data; + +import javax.validation.constraints.NotNull; /** * 快递公司 Base VO,提供给添加、修改、详细的子 VO 使用 @@ -14,8 +12,8 @@ import javax.validation.constraints.*; @Data public class DeliveryExpressBaseVO { - @Schema(description = "快递公司编号", required = true) - @NotNull(message = "快递公司编号不能为空") + @Schema(description = "快递公司编码", required = true) + @NotNull(message = "快递公司编码不能为空") private String code; @Schema(description = "快递公司名称", required = true, example = "李四") diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/DeliveryExpressExcelVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/DeliveryExpressExcelVO.java index ba7e646d5..45d92aa43 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/DeliveryExpressExcelVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/DeliveryExpressExcelVO.java @@ -16,19 +16,20 @@ public class DeliveryExpressExcelVO { @ExcelProperty("编号") private Long id; - @ExcelProperty("快递公司编号") + @ExcelProperty("快递公司编码") private String code; @ExcelProperty("快递公司名称") private String name; - @ExcelProperty("快递公司logo") + @ExcelProperty("快递公司 logo") private String logo; @ExcelProperty("排序") private Integer sort; - @ExcelProperty("状态(0正常 1停用)") + @ExcelProperty("状态") + // TODO @jason:可以使用 @DictFormat(DictTypeConstants.COMMON_STATUS) private Byte status; @ExcelProperty("创建时间") diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/DeliveryExpressExportReqVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/DeliveryExpressExportReqVO.java index cb738a6db..6e44cc45f 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/DeliveryExpressExportReqVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/DeliveryExpressExportReqVO.java @@ -12,7 +12,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Data public class DeliveryExpressExportReqVO { - @Schema(description = "快递公司编号") + @Schema(description = "快递公司编码") private String code; @Schema(description = "快递公司名称", example = "李四") diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/DeliveryExpressPageReqVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/DeliveryExpressPageReqVO.java index 5425bf42a..50826ea36 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/DeliveryExpressPageReqVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/DeliveryExpressPageReqVO.java @@ -15,7 +15,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @ToString(callSuper = true) public class DeliveryExpressPageReqVO extends PageParam { - @Schema(description = "快递公司编号") + @Schema(description = "快递公司编码") private String code; @Schema(description = "快递公司名称", example = "李四")