mall:review + mall:快递公司管理

This commit is contained in:
YunaiV 2023-05-24 23:40:55 +08:00
parent c62da6a056
commit 53e9be733f
6 changed files with 45 additions and 49 deletions

View File

@ -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;
COMMIT;

View File

@ -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

View File

@ -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 = "李四")

View File

@ -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("创建时间")

View File

@ -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 = "李四")

View File

@ -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 = "李四")