| New file |
| | |
| | | package com.oying.modules.fee.domain; |
| | | |
| | | import com.oying.modules.fee.utils.enums.CategoryTypeEnum; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import cn.hutool.core.bean.copier.CopyOptions; |
| | | import java.sql.Timestamp; |
| | | import java.math.BigDecimal; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.io.Serializable; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | /** |
| | | * @description / |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Getter |
| | | @Setter |
| | | @TableName("fee_base_fees") |
| | | public class BaseFees implements Serializable { |
| | | |
| | | @TableId(value = "fee_id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "运费ID") |
| | | private Long feeId; |
| | | |
| | | @NotBlank |
| | | @ApiModelProperty(value = "城市等级") |
| | | private String level; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "品类类型 (普通、特殊)") |
| | | private CategoryTypeEnum categoryType; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "基础运费金额") |
| | | private BigDecimal feeAmount; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "生效日期") |
| | | private Timestamp effectiveDate; |
| | | |
| | | @ApiModelProperty(value = "创建者") |
| | | private String createBy; |
| | | |
| | | @ApiModelProperty(value = "更新者") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "创建日期") |
| | | private Timestamp createTime; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "更新时间") |
| | | private Timestamp updateTime; |
| | | |
| | | public void copy(BaseFees source){ |
| | | BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.domain; |
| | | |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import cn.hutool.core.bean.copier.CopyOptions; |
| | | import java.sql.Timestamp; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.io.Serializable; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | /** |
| | | * @description / |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Getter |
| | | @Setter |
| | | @TableName("fee_city_levels") |
| | | public class CityLevels implements Serializable { |
| | | |
| | | @TableId(value = "city_id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "城市ID") |
| | | private Long cityId; |
| | | |
| | | @NotBlank |
| | | @ApiModelProperty(value = "城市名称 (唯一)") |
| | | private String cityName; |
| | | |
| | | @NotBlank |
| | | @ApiModelProperty(value = "城市等级 (C/D/E)") |
| | | private String level; |
| | | |
| | | @ApiModelProperty(value = "创建者") |
| | | private String createBy; |
| | | |
| | | @ApiModelProperty(value = "更新者") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "创建日期") |
| | | private Timestamp createTime; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "更新时间") |
| | | private Timestamp updateTime; |
| | | |
| | | public void copy(CityLevels source){ |
| | | BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.domain; |
| | | |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import cn.hutool.core.bean.copier.CopyOptions; |
| | | import java.sql.Timestamp; |
| | | import java.math.BigDecimal; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.io.Serializable; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | /** |
| | | * @description / |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Getter |
| | | @Setter |
| | | @TableName("fee_distance_surcharge_rules") |
| | | public class DistanceSurchargeRules implements Serializable { |
| | | |
| | | @TableId(value = "rule_id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "规则ID") |
| | | private Long ruleId; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "最小距离 (公里)") |
| | | private BigDecimal minDistance; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "最大距离 (公里)") |
| | | private BigDecimal maxDistance; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "每公里加价金额") |
| | | private BigDecimal feePerKm; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "生效日期") |
| | | private Timestamp effectiveDate; |
| | | |
| | | @ApiModelProperty(value = "创建者") |
| | | private String createBy; |
| | | |
| | | @ApiModelProperty(value = "更新者") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "创建日期") |
| | | private Timestamp createTime; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "更新时间") |
| | | private Timestamp updateTime; |
| | | |
| | | public void copy(DistanceSurchargeRules source){ |
| | | BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.domain; |
| | | |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import cn.hutool.core.bean.copier.CopyOptions; |
| | | import java.sql.Timestamp; |
| | | import java.math.BigDecimal; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.io.Serializable; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | /** |
| | | * @description / |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Getter |
| | | @Setter |
| | | @TableName("fee_order_shipping_fees") |
| | | public class OrderShippingFees implements Serializable { |
| | | |
| | | @TableId(value = "order_id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "订单ID") |
| | | private Long orderId; |
| | | |
| | | @ApiModelProperty(value = "订单编号") |
| | | private String orderNum; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "城市ID") |
| | | private Long cityId; |
| | | |
| | | @ApiModelProperty(value = "城市名称") |
| | | private String cityName; |
| | | |
| | | @ApiModelProperty(value = "品类ID ") |
| | | private Long categoryId; |
| | | |
| | | @ApiModelProperty(value = "特殊品类名称") |
| | | private String categoryName; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "重量 (公斤)") |
| | | private BigDecimal weight; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "距离 (公里)") |
| | | private BigDecimal distance; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "下单时间") |
| | | private Timestamp orderTime; |
| | | |
| | | @ApiModelProperty(value = "是否特殊条件") |
| | | private Integer isSpecialConditions; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "基础运费") |
| | | private BigDecimal baseFee; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "重量加价") |
| | | private BigDecimal weightSurcharge; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "距离加价") |
| | | private BigDecimal distanceSurcharge; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "时段加价") |
| | | private BigDecimal timeSurcharge; |
| | | |
| | | @ApiModelProperty(value = "特殊条件加价") |
| | | private BigDecimal specialConditionSurcharge; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "总运费") |
| | | private BigDecimal totalFee; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Timestamp createdAt; |
| | | |
| | | public void copy(OrderShippingFees source){ |
| | | BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.domain; |
| | | |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import cn.hutool.core.bean.copier.CopyOptions; |
| | | import java.sql.Timestamp; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.io.Serializable; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | /** |
| | | * @description / |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Getter |
| | | @Setter |
| | | @TableName("fee_special_categories") |
| | | public class SpecialCategories implements Serializable { |
| | | |
| | | @TableId(value = "category_id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "品类ID") |
| | | private Long categoryId; |
| | | |
| | | @NotBlank |
| | | @ApiModelProperty(value = "特殊品类名称(唯一)") |
| | | private String categoryName; |
| | | |
| | | @ApiModelProperty(value = "创建者") |
| | | private String createBy; |
| | | |
| | | @ApiModelProperty(value = "更新者") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "创建日期") |
| | | private Timestamp createTime; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "更新时间") |
| | | private Timestamp updateTime; |
| | | |
| | | public void copy(SpecialCategories source){ |
| | | BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.domain; |
| | | |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import cn.hutool.core.bean.copier.CopyOptions; |
| | | |
| | | import java.sql.Time; |
| | | import java.sql.Timestamp; |
| | | import java.math.BigDecimal; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.io.Serializable; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | /** |
| | | * @description / |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Getter |
| | | @Setter |
| | | @TableName("fee_time_surcharge_rules") |
| | | public class TimeSurchargeRules implements Serializable { |
| | | |
| | | @TableId(value = "time_rule_id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "时段规则ID") |
| | | private Long timeRuleId; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "时段开始时间") |
| | | private Time startTime; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "时段结束时间") |
| | | private Time endTime; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "加价金额") |
| | | private BigDecimal surchargeAmount; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "生效日期") |
| | | private Timestamp effectiveDate; |
| | | |
| | | @ApiModelProperty(value = "创建者") |
| | | private String createBy; |
| | | |
| | | @ApiModelProperty(value = "更新者") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "创建日期") |
| | | private Timestamp createTime; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "更新时间") |
| | | private Timestamp updateTime; |
| | | |
| | | public void copy(TimeSurchargeRules source){ |
| | | BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.domain; |
| | | |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import cn.hutool.core.bean.copier.CopyOptions; |
| | | import java.sql.Timestamp; |
| | | import java.math.BigDecimal; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.io.Serializable; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | /** |
| | | * @description / |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Getter |
| | | @Setter |
| | | @TableName("fee_weight_surcharge_rules") |
| | | public class WeightSurchargeRules implements Serializable { |
| | | |
| | | @TableId(value = "weight_rule_id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "重量规则ID") |
| | | private Long weightRuleId; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "基础重量 (公斤)") |
| | | private BigDecimal baseWeight; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "每公斤加价金额") |
| | | private BigDecimal feePerKg; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "生效日期") |
| | | private Timestamp effectiveDate; |
| | | |
| | | @ApiModelProperty(value = "创建者") |
| | | private String createBy; |
| | | |
| | | @ApiModelProperty(value = "更新者") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "创建日期") |
| | | private Timestamp createTime; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "更新时间") |
| | | private Timestamp updateTime; |
| | | |
| | | public void copy(WeightSurchargeRules source){ |
| | | BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.domain.dto; |
| | | |
| | | import com.oying.modules.fee.utils.enums.CategoryTypeEnum; |
| | | import lombok.Data; |
| | | import java.sql.Timestamp; |
| | | import java.util.List; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Data |
| | | public class BaseFeesQueryCriteria{ |
| | | |
| | | @ApiModelProperty(value = "页码", example = "1") |
| | | private Integer page = 1; |
| | | |
| | | @ApiModelProperty(value = "每页数据量", example = "10") |
| | | private Integer size = 10; |
| | | |
| | | @ApiModelProperty(value = "城市等级") |
| | | private String level; |
| | | |
| | | @ApiModelProperty(value = "品类类型 (普通、特殊)") |
| | | private CategoryTypeEnum categoryType; |
| | | private List<Timestamp> createTime; |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.domain.dto; |
| | | |
| | | import lombok.Data; |
| | | import java.sql.Timestamp; |
| | | import java.util.List; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Data |
| | | public class CityLevelsQueryCriteria{ |
| | | |
| | | @ApiModelProperty(value = "页码", example = "1") |
| | | private Integer page = 1; |
| | | |
| | | @ApiModelProperty(value = "每页数据量", example = "10") |
| | | private Integer size = 10; |
| | | |
| | | @ApiModelProperty(value = "城市名称 (唯一)") |
| | | private String cityName; |
| | | |
| | | @ApiModelProperty(value = "城市等级 (C/D/E)") |
| | | private String level; |
| | | private List<Timestamp> createTime; |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.domain.dto; |
| | | |
| | | import lombok.Data; |
| | | import java.sql.Timestamp; |
| | | import java.util.List; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Data |
| | | public class DistanceSurchargeRulesQueryCriteria{ |
| | | |
| | | @ApiModelProperty(value = "页码", example = "1") |
| | | private Integer page = 1; |
| | | |
| | | @ApiModelProperty(value = "每页数据量", example = "10") |
| | | private Integer size = 10; |
| | | private List<Timestamp> createTime; |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.domain.dto; |
| | | |
| | | import lombok.Data; |
| | | import java.sql.Timestamp; |
| | | import java.util.List; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Data |
| | | public class OrderShippingFeesQueryCriteria{ |
| | | |
| | | @ApiModelProperty(value = "页码", example = "1") |
| | | private Integer page = 1; |
| | | |
| | | @ApiModelProperty(value = "每页数据量", example = "10") |
| | | private Integer size = 10; |
| | | |
| | | @ApiModelProperty(value = "订单编号") |
| | | private String orderNum; |
| | | |
| | | @ApiModelProperty(value = "城市ID") |
| | | private Long cityId; |
| | | |
| | | @ApiModelProperty(value = "城市名称") |
| | | private String cityName; |
| | | |
| | | @ApiModelProperty(value = "品类ID ") |
| | | private Long categoryId; |
| | | |
| | | @ApiModelProperty(value = "特殊品类名称") |
| | | private String categoryName; |
| | | |
| | | @ApiModelProperty(value = "是否特殊条件") |
| | | private Integer isSpecialConditions; |
| | | private List<Timestamp> orderTime; |
| | | private List<Timestamp> createdAt; |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.domain.dto; |
| | | |
| | | import lombok.Data; |
| | | import java.sql.Timestamp; |
| | | import java.util.List; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Data |
| | | public class SpecialCategoriesQueryCriteria{ |
| | | |
| | | @ApiModelProperty(value = "页码", example = "1") |
| | | private Integer page = 1; |
| | | |
| | | @ApiModelProperty(value = "每页数据量", example = "10") |
| | | private Integer size = 10; |
| | | |
| | | @ApiModelProperty(value = "特殊品类名称(唯一)") |
| | | private String categoryName; |
| | | private List<Timestamp> createTime; |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.domain.dto; |
| | | |
| | | import lombok.Data; |
| | | import java.sql.Timestamp; |
| | | import java.util.List; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Data |
| | | public class TimeSurchargeRulesQueryCriteria{ |
| | | |
| | | @ApiModelProperty(value = "页码", example = "1") |
| | | private Integer page = 1; |
| | | |
| | | @ApiModelProperty(value = "每页数据量", example = "10") |
| | | private Integer size = 10; |
| | | private List<Timestamp> createTime; |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.domain.dto; |
| | | |
| | | import lombok.Data; |
| | | import java.sql.Timestamp; |
| | | import java.util.List; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Data |
| | | public class WeightSurchargeRulesQueryCriteria{ |
| | | |
| | | @ApiModelProperty(value = "页码", example = "1") |
| | | private Integer page = 1; |
| | | |
| | | @ApiModelProperty(value = "每页数据量", example = "10") |
| | | private Integer size = 10; |
| | | private List<Timestamp> createTime; |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.mapper; |
| | | |
| | | import com.oying.modules.fee.domain.BaseFees; |
| | | import com.oying.modules.fee.domain.dto.BaseFeesQueryCriteria; |
| | | import java.util.List; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | |
| | | /** |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Mapper |
| | | public interface BaseFeesMapper extends BaseMapper<BaseFees> { |
| | | |
| | | IPage<BaseFees> findAll(@Param("criteria") BaseFeesQueryCriteria criteria, Page<Object> page); |
| | | |
| | | List<BaseFees> findAll(@Param("criteria") BaseFeesQueryCriteria criteria); |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.mapper; |
| | | |
| | | import com.oying.modules.fee.domain.CityLevels; |
| | | import com.oying.modules.fee.domain.dto.CityLevelsQueryCriteria; |
| | | import java.util.List; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | |
| | | /** |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Mapper |
| | | public interface CityLevelsMapper extends BaseMapper<CityLevels> { |
| | | |
| | | IPage<CityLevels> findAll(@Param("criteria") CityLevelsQueryCriteria criteria, Page<Object> page); |
| | | |
| | | List<CityLevels> findAll(@Param("criteria") CityLevelsQueryCriteria criteria); |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.mapper; |
| | | |
| | | import com.oying.modules.fee.domain.DistanceSurchargeRules; |
| | | import com.oying.modules.fee.domain.dto.DistanceSurchargeRulesQueryCriteria; |
| | | import java.util.List; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | |
| | | /** |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Mapper |
| | | public interface DistanceSurchargeRulesMapper extends BaseMapper<DistanceSurchargeRules> { |
| | | |
| | | IPage<DistanceSurchargeRules> findAll(@Param("criteria") DistanceSurchargeRulesQueryCriteria criteria, Page<Object> page); |
| | | |
| | | List<DistanceSurchargeRules> findAll(@Param("criteria") DistanceSurchargeRulesQueryCriteria criteria); |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.mapper; |
| | | |
| | | import com.oying.modules.fee.domain.OrderShippingFees; |
| | | import com.oying.modules.fee.domain.dto.OrderShippingFeesQueryCriteria; |
| | | import java.util.List; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | |
| | | /** |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Mapper |
| | | public interface OrderShippingFeesMapper extends BaseMapper<OrderShippingFees> { |
| | | |
| | | IPage<OrderShippingFees> findAll(@Param("criteria") OrderShippingFeesQueryCriteria criteria, Page<Object> page); |
| | | |
| | | List<OrderShippingFees> findAll(@Param("criteria") OrderShippingFeesQueryCriteria criteria); |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.mapper; |
| | | |
| | | import com.oying.modules.fee.domain.SpecialCategories; |
| | | import com.oying.modules.fee.domain.dto.SpecialCategoriesQueryCriteria; |
| | | import java.util.List; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | |
| | | /** |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Mapper |
| | | public interface SpecialCategoriesMapper extends BaseMapper<SpecialCategories> { |
| | | |
| | | IPage<SpecialCategories> findAll(@Param("criteria") SpecialCategoriesQueryCriteria criteria, Page<Object> page); |
| | | |
| | | List<SpecialCategories> findAll(@Param("criteria") SpecialCategoriesQueryCriteria criteria); |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.mapper; |
| | | |
| | | import com.oying.modules.fee.domain.TimeSurchargeRules; |
| | | import com.oying.modules.fee.domain.dto.TimeSurchargeRulesQueryCriteria; |
| | | import java.util.List; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | |
| | | /** |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Mapper |
| | | public interface TimeSurchargeRulesMapper extends BaseMapper<TimeSurchargeRules> { |
| | | |
| | | IPage<TimeSurchargeRules> findAll(@Param("criteria") TimeSurchargeRulesQueryCriteria criteria, Page<Object> page); |
| | | |
| | | List<TimeSurchargeRules> findAll(@Param("criteria") TimeSurchargeRulesQueryCriteria criteria); |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.mapper; |
| | | |
| | | import com.oying.modules.fee.domain.WeightSurchargeRules; |
| | | import com.oying.modules.fee.domain.dto.WeightSurchargeRulesQueryCriteria; |
| | | import java.util.List; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | |
| | | /** |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Mapper |
| | | public interface WeightSurchargeRulesMapper extends BaseMapper<WeightSurchargeRules> { |
| | | |
| | | IPage<WeightSurchargeRules> findAll(@Param("criteria") WeightSurchargeRulesQueryCriteria criteria, Page<Object> page); |
| | | |
| | | List<WeightSurchargeRules> findAll(@Param("criteria") WeightSurchargeRulesQueryCriteria criteria); |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.rest; |
| | | |
| | | import com.oying.annotation.Log; |
| | | import com.oying.modules.fee.domain.BaseFees; |
| | | import com.oying.modules.fee.service.BaseFeesService; |
| | | import com.oying.modules.fee.domain.dto.BaseFeesQueryCriteria; |
| | | import lombok.RequiredArgsConstructor; |
| | | import java.util.List; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import io.swagger.annotations.*; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @Api(tags = "基础运费") |
| | | @RequestMapping("/api/baseFees") |
| | | public class BaseFeesController { |
| | | |
| | | private final BaseFeesService baseFeesService; |
| | | |
| | | @ApiOperation("导出数据") |
| | | @GetMapping(value = "/download") |
| | | @PreAuthorize("@el.check('baseFees:list')") |
| | | public void exportBaseFees(HttpServletResponse response, BaseFeesQueryCriteria criteria) throws IOException { |
| | | baseFeesService.download(baseFeesService.queryAll(criteria), response); |
| | | } |
| | | |
| | | @GetMapping |
| | | @ApiOperation("查询基础运费") |
| | | @PreAuthorize("@el.check('baseFees:list')") |
| | | public ResponseEntity<PageResult<BaseFees>> queryBaseFees(BaseFeesQueryCriteria criteria){ |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | return new ResponseEntity<>(baseFeesService.queryAll(criteria,page),HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping |
| | | @Log("新增基础运费") |
| | | @ApiOperation("新增基础运费") |
| | | @PreAuthorize("@el.check('baseFees:add')") |
| | | public ResponseEntity<Object> createBaseFees(@Validated @RequestBody BaseFees resources){ |
| | | baseFeesService.create(resources); |
| | | return new ResponseEntity<>(HttpStatus.CREATED); |
| | | } |
| | | |
| | | @PutMapping |
| | | @Log("修改基础运费") |
| | | @ApiOperation("修改基础运费") |
| | | @PreAuthorize("@el.check('baseFees:edit')") |
| | | public ResponseEntity<Object> updateBaseFees(@Validated @RequestBody BaseFees resources){ |
| | | baseFeesService.update(resources); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | @DeleteMapping |
| | | @Log("删除基础运费") |
| | | @ApiOperation("删除基础运费") |
| | | @PreAuthorize("@el.check('baseFees:del')") |
| | | public ResponseEntity<Object> deleteBaseFees(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) { |
| | | baseFeesService.deleteAll(ids); |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.rest; |
| | | |
| | | import com.oying.annotation.Log; |
| | | import com.oying.modules.fee.domain.CityLevels; |
| | | import com.oying.modules.fee.service.CityLevelsService; |
| | | import com.oying.modules.fee.domain.dto.CityLevelsQueryCriteria; |
| | | import lombok.RequiredArgsConstructor; |
| | | import java.util.List; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import io.swagger.annotations.*; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @Api(tags = "城市等级") |
| | | @RequestMapping("/api/cityLevels") |
| | | public class CityLevelsController { |
| | | |
| | | private final CityLevelsService cityLevelsService; |
| | | |
| | | @ApiOperation("导出数据") |
| | | @GetMapping(value = "/download") |
| | | @PreAuthorize("@el.check('cityLevels:list')") |
| | | public void exportCityLevels(HttpServletResponse response, CityLevelsQueryCriteria criteria) throws IOException { |
| | | cityLevelsService.download(cityLevelsService.queryAll(criteria), response); |
| | | } |
| | | |
| | | @GetMapping |
| | | @ApiOperation("查询城市等级") |
| | | @PreAuthorize("@el.check('cityLevels:list')") |
| | | public ResponseEntity<PageResult<CityLevels>> queryCityLevels(CityLevelsQueryCriteria criteria){ |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | return new ResponseEntity<>(cityLevelsService.queryAll(criteria,page),HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping |
| | | @Log("新增城市等级") |
| | | @ApiOperation("新增城市等级") |
| | | @PreAuthorize("@el.check('cityLevels:add')") |
| | | public ResponseEntity<Object> createCityLevels(@Validated @RequestBody CityLevels resources){ |
| | | cityLevelsService.create(resources); |
| | | return new ResponseEntity<>(HttpStatus.CREATED); |
| | | } |
| | | |
| | | @PutMapping |
| | | @Log("修改城市等级") |
| | | @ApiOperation("修改城市等级") |
| | | @PreAuthorize("@el.check('cityLevels:edit')") |
| | | public ResponseEntity<Object> updateCityLevels(@Validated @RequestBody CityLevels resources){ |
| | | cityLevelsService.update(resources); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | @DeleteMapping |
| | | @Log("删除城市等级") |
| | | @ApiOperation("删除城市等级") |
| | | @PreAuthorize("@el.check('cityLevels:del')") |
| | | public ResponseEntity<Object> deleteCityLevels(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) { |
| | | cityLevelsService.deleteAll(ids); |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.rest; |
| | | |
| | | import com.oying.annotation.Log; |
| | | import com.oying.modules.fee.domain.DistanceSurchargeRules; |
| | | import com.oying.modules.fee.service.DistanceSurchargeRulesService; |
| | | import com.oying.modules.fee.domain.dto.DistanceSurchargeRulesQueryCriteria; |
| | | import lombok.RequiredArgsConstructor; |
| | | import java.util.List; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import io.swagger.annotations.*; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @Api(tags = "距离加价规则") |
| | | @RequestMapping("/api/distanceSurchargeRules") |
| | | public class DistanceSurchargeRulesController { |
| | | |
| | | private final DistanceSurchargeRulesService distanceSurchargeRulesService; |
| | | |
| | | @ApiOperation("导出数据") |
| | | @GetMapping(value = "/download") |
| | | @PreAuthorize("@el.check('distanceSurchargeRules:list')") |
| | | public void exportDistanceSurchargeRules(HttpServletResponse response, DistanceSurchargeRulesQueryCriteria criteria) throws IOException { |
| | | distanceSurchargeRulesService.download(distanceSurchargeRulesService.queryAll(criteria), response); |
| | | } |
| | | |
| | | @GetMapping |
| | | @ApiOperation("查询距离加价规则") |
| | | @PreAuthorize("@el.check('distanceSurchargeRules:list')") |
| | | public ResponseEntity<PageResult<DistanceSurchargeRules>> queryDistanceSurchargeRules(DistanceSurchargeRulesQueryCriteria criteria){ |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | return new ResponseEntity<>(distanceSurchargeRulesService.queryAll(criteria,page),HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping |
| | | @Log("新增距离加价规则") |
| | | @ApiOperation("新增距离加价规则") |
| | | @PreAuthorize("@el.check('distanceSurchargeRules:add')") |
| | | public ResponseEntity<Object> createDistanceSurchargeRules(@Validated @RequestBody DistanceSurchargeRules resources){ |
| | | distanceSurchargeRulesService.create(resources); |
| | | return new ResponseEntity<>(HttpStatus.CREATED); |
| | | } |
| | | |
| | | @PutMapping |
| | | @Log("修改距离加价规则") |
| | | @ApiOperation("修改距离加价规则") |
| | | @PreAuthorize("@el.check('distanceSurchargeRules:edit')") |
| | | public ResponseEntity<Object> updateDistanceSurchargeRules(@Validated @RequestBody DistanceSurchargeRules resources){ |
| | | distanceSurchargeRulesService.update(resources); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | @DeleteMapping |
| | | @Log("删除距离加价规则") |
| | | @ApiOperation("删除距离加价规则") |
| | | @PreAuthorize("@el.check('distanceSurchargeRules:del')") |
| | | public ResponseEntity<Object> deleteDistanceSurchargeRules(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) { |
| | | distanceSurchargeRulesService.deleteAll(ids); |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.rest; |
| | | |
| | | import com.oying.annotation.Log; |
| | | import com.oying.modules.fee.domain.OrderShippingFees; |
| | | import com.oying.modules.fee.service.OrderShippingFeesService; |
| | | import com.oying.modules.fee.domain.dto.OrderShippingFeesQueryCriteria; |
| | | import lombok.RequiredArgsConstructor; |
| | | import java.util.List; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import io.swagger.annotations.*; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @Api(tags = "运费订单") |
| | | @RequestMapping("/api/orderShippingFees") |
| | | public class OrderShippingFeesController { |
| | | |
| | | private final OrderShippingFeesService orderShippingFeesService; |
| | | |
| | | @ApiOperation("导出数据") |
| | | @GetMapping(value = "/download") |
| | | @PreAuthorize("@el.check('orderShippingFees:list')") |
| | | public void exportOrderShippingFees(HttpServletResponse response, OrderShippingFeesQueryCriteria criteria) throws IOException { |
| | | orderShippingFeesService.download(orderShippingFeesService.queryAll(criteria), response); |
| | | } |
| | | |
| | | @GetMapping |
| | | @ApiOperation("查询运费订单") |
| | | @PreAuthorize("@el.check('orderShippingFees:list')") |
| | | public ResponseEntity<PageResult<OrderShippingFees>> queryOrderShippingFees(OrderShippingFeesQueryCriteria criteria){ |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | return new ResponseEntity<>(orderShippingFeesService.queryAll(criteria,page),HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping |
| | | @Log("新增运费订单") |
| | | @ApiOperation("新增运费订单") |
| | | @PreAuthorize("@el.check('orderShippingFees:add')") |
| | | public ResponseEntity<Object> createOrderShippingFees(@Validated @RequestBody OrderShippingFees resources){ |
| | | orderShippingFeesService.create(resources); |
| | | return new ResponseEntity<>(HttpStatus.CREATED); |
| | | } |
| | | |
| | | @PutMapping |
| | | @Log("修改运费订单") |
| | | @ApiOperation("修改运费订单") |
| | | @PreAuthorize("@el.check('orderShippingFees:edit')") |
| | | public ResponseEntity<Object> updateOrderShippingFees(@Validated @RequestBody OrderShippingFees resources){ |
| | | orderShippingFeesService.update(resources); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | @DeleteMapping |
| | | @Log("删除运费订单") |
| | | @ApiOperation("删除运费订单") |
| | | @PreAuthorize("@el.check('orderShippingFees:del')") |
| | | public ResponseEntity<Object> deleteOrderShippingFees(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) { |
| | | orderShippingFeesService.deleteAll(ids); |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.rest; |
| | | |
| | | import com.oying.annotation.Log; |
| | | import com.oying.modules.fee.domain.SpecialCategories; |
| | | import com.oying.modules.fee.service.SpecialCategoriesService; |
| | | import com.oying.modules.fee.domain.dto.SpecialCategoriesQueryCriteria; |
| | | import lombok.RequiredArgsConstructor; |
| | | import java.util.List; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import io.swagger.annotations.*; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @Api(tags = "特殊品类") |
| | | @RequestMapping("/api/specialCategories") |
| | | public class SpecialCategoriesController { |
| | | |
| | | private final SpecialCategoriesService specialCategoriesService; |
| | | |
| | | @ApiOperation("导出数据") |
| | | @GetMapping(value = "/download") |
| | | @PreAuthorize("@el.check('specialCategories:list')") |
| | | public void exportSpecialCategories(HttpServletResponse response, SpecialCategoriesQueryCriteria criteria) throws IOException { |
| | | specialCategoriesService.download(specialCategoriesService.queryAll(criteria), response); |
| | | } |
| | | |
| | | @GetMapping |
| | | @ApiOperation("查询特殊品类") |
| | | @PreAuthorize("@el.check('specialCategories:list')") |
| | | public ResponseEntity<PageResult<SpecialCategories>> querySpecialCategories(SpecialCategoriesQueryCriteria criteria){ |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | return new ResponseEntity<>(specialCategoriesService.queryAll(criteria,page),HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping |
| | | @Log("新增特殊品类") |
| | | @ApiOperation("新增特殊品类") |
| | | @PreAuthorize("@el.check('specialCategories:add')") |
| | | public ResponseEntity<Object> createSpecialCategories(@Validated @RequestBody SpecialCategories resources){ |
| | | specialCategoriesService.create(resources); |
| | | return new ResponseEntity<>(HttpStatus.CREATED); |
| | | } |
| | | |
| | | @PutMapping |
| | | @Log("修改特殊品类") |
| | | @ApiOperation("修改特殊品类") |
| | | @PreAuthorize("@el.check('specialCategories:edit')") |
| | | public ResponseEntity<Object> updateSpecialCategories(@Validated @RequestBody SpecialCategories resources){ |
| | | specialCategoriesService.update(resources); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | @DeleteMapping |
| | | @Log("删除特殊品类") |
| | | @ApiOperation("删除特殊品类") |
| | | @PreAuthorize("@el.check('specialCategories:del')") |
| | | public ResponseEntity<Object> deleteSpecialCategories(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) { |
| | | specialCategoriesService.deleteAll(ids); |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.rest; |
| | | |
| | | import com.oying.annotation.Log; |
| | | import com.oying.modules.fee.domain.TimeSurchargeRules; |
| | | import com.oying.modules.fee.service.TimeSurchargeRulesService; |
| | | import com.oying.modules.fee.domain.dto.TimeSurchargeRulesQueryCriteria; |
| | | import lombok.RequiredArgsConstructor; |
| | | import java.util.List; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import io.swagger.annotations.*; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @Api(tags = "时段加价规则") |
| | | @RequestMapping("/api/timeSurchargeRules") |
| | | public class TimeSurchargeRulesController { |
| | | |
| | | private final TimeSurchargeRulesService timeSurchargeRulesService; |
| | | |
| | | @ApiOperation("导出数据") |
| | | @GetMapping(value = "/download") |
| | | @PreAuthorize("@el.check('timeSurchargeRules:list')") |
| | | public void exportTimeSurchargeRules(HttpServletResponse response, TimeSurchargeRulesQueryCriteria criteria) throws IOException { |
| | | timeSurchargeRulesService.download(timeSurchargeRulesService.queryAll(criteria), response); |
| | | } |
| | | |
| | | @GetMapping |
| | | @ApiOperation("查询时段加价规则") |
| | | @PreAuthorize("@el.check('timeSurchargeRules:list')") |
| | | public ResponseEntity<PageResult<TimeSurchargeRules>> queryTimeSurchargeRules(TimeSurchargeRulesQueryCriteria criteria){ |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | return new ResponseEntity<>(timeSurchargeRulesService.queryAll(criteria,page),HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping |
| | | @Log("新增时段加价规则") |
| | | @ApiOperation("新增时段加价规则") |
| | | @PreAuthorize("@el.check('timeSurchargeRules:add')") |
| | | public ResponseEntity<Object> createTimeSurchargeRules(@Validated @RequestBody TimeSurchargeRules resources){ |
| | | timeSurchargeRulesService.create(resources); |
| | | return new ResponseEntity<>(HttpStatus.CREATED); |
| | | } |
| | | |
| | | @PutMapping |
| | | @Log("修改时段加价规则") |
| | | @ApiOperation("修改时段加价规则") |
| | | @PreAuthorize("@el.check('timeSurchargeRules:edit')") |
| | | public ResponseEntity<Object> updateTimeSurchargeRules(@Validated @RequestBody TimeSurchargeRules resources){ |
| | | timeSurchargeRulesService.update(resources); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | @DeleteMapping |
| | | @Log("删除时段加价规则") |
| | | @ApiOperation("删除时段加价规则") |
| | | @PreAuthorize("@el.check('timeSurchargeRules:del')") |
| | | public ResponseEntity<Object> deleteTimeSurchargeRules(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) { |
| | | timeSurchargeRulesService.deleteAll(ids); |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.rest; |
| | | |
| | | import com.oying.annotation.Log; |
| | | import com.oying.modules.fee.domain.WeightSurchargeRules; |
| | | import com.oying.modules.fee.service.WeightSurchargeRulesService; |
| | | import com.oying.modules.fee.domain.dto.WeightSurchargeRulesQueryCriteria; |
| | | import lombok.RequiredArgsConstructor; |
| | | import java.util.List; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import io.swagger.annotations.*; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @Api(tags = "重量加价规则") |
| | | @RequestMapping("/api/weightSurchargeRules") |
| | | public class WeightSurchargeRulesController { |
| | | |
| | | private final WeightSurchargeRulesService weightSurchargeRulesService; |
| | | |
| | | @ApiOperation("导出数据") |
| | | @GetMapping(value = "/download") |
| | | @PreAuthorize("@el.check('weightSurchargeRules:list')") |
| | | public void exportWeightSurchargeRules(HttpServletResponse response, WeightSurchargeRulesQueryCriteria criteria) throws IOException { |
| | | weightSurchargeRulesService.download(weightSurchargeRulesService.queryAll(criteria), response); |
| | | } |
| | | |
| | | @GetMapping |
| | | @ApiOperation("查询重量加价规则") |
| | | @PreAuthorize("@el.check('weightSurchargeRules:list')") |
| | | public ResponseEntity<PageResult<WeightSurchargeRules>> queryWeightSurchargeRules(WeightSurchargeRulesQueryCriteria criteria){ |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | return new ResponseEntity<>(weightSurchargeRulesService.queryAll(criteria,page),HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping |
| | | @Log("新增重量加价规则") |
| | | @ApiOperation("新增重量加价规则") |
| | | @PreAuthorize("@el.check('weightSurchargeRules:add')") |
| | | public ResponseEntity<Object> createWeightSurchargeRules(@Validated @RequestBody WeightSurchargeRules resources){ |
| | | weightSurchargeRulesService.create(resources); |
| | | return new ResponseEntity<>(HttpStatus.CREATED); |
| | | } |
| | | |
| | | @PutMapping |
| | | @Log("修改重量加价规则") |
| | | @ApiOperation("修改重量加价规则") |
| | | @PreAuthorize("@el.check('weightSurchargeRules:edit')") |
| | | public ResponseEntity<Object> updateWeightSurchargeRules(@Validated @RequestBody WeightSurchargeRules resources){ |
| | | weightSurchargeRulesService.update(resources); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | @DeleteMapping |
| | | @Log("删除重量加价规则") |
| | | @ApiOperation("删除重量加价规则") |
| | | @PreAuthorize("@el.check('weightSurchargeRules:del')") |
| | | public ResponseEntity<Object> deleteWeightSurchargeRules(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) { |
| | | weightSurchargeRulesService.deleteAll(ids); |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.service; |
| | | |
| | | import com.oying.modules.fee.domain.BaseFees; |
| | | import com.oying.modules.fee.domain.dto.BaseFeesQueryCriteria; |
| | | import java.util.List; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @description 服务接口 |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | public interface BaseFeesService extends IService<BaseFees> { |
| | | |
| | | /** |
| | | * 查询数据分页 |
| | | * @param criteria 条件 |
| | | * @param page 分页参数 |
| | | * @return PageResult |
| | | */ |
| | | PageResult<BaseFees> queryAll(BaseFeesQueryCriteria criteria, Page<Object> page); |
| | | |
| | | /** |
| | | * 查询所有数据不分页 |
| | | * @param criteria 条件参数 |
| | | * @return List<BaseFeesDto> |
| | | */ |
| | | List<BaseFees> queryAll(BaseFeesQueryCriteria criteria); |
| | | |
| | | /** |
| | | * 创建 |
| | | * @param resources / |
| | | */ |
| | | void create(BaseFees resources); |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param resources / |
| | | */ |
| | | void update(BaseFees resources); |
| | | |
| | | /** |
| | | * 多选删除 |
| | | * @param ids / |
| | | */ |
| | | void deleteAll(List<Long> ids); |
| | | |
| | | /** |
| | | * 导出数据 |
| | | * @param all 待导出的数据 |
| | | * @param response / |
| | | * @throws IOException / |
| | | */ |
| | | void download(List<BaseFees> all, HttpServletResponse response) throws IOException; |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.service; |
| | | |
| | | import com.oying.modules.fee.domain.CityLevels; |
| | | import com.oying.modules.fee.domain.dto.CityLevelsQueryCriteria; |
| | | import java.util.List; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @description 服务接口 |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | public interface CityLevelsService extends IService<CityLevels> { |
| | | |
| | | /** |
| | | * 查询数据分页 |
| | | * @param criteria 条件 |
| | | * @param page 分页参数 |
| | | * @return PageResult |
| | | */ |
| | | PageResult<CityLevels> queryAll(CityLevelsQueryCriteria criteria, Page<Object> page); |
| | | |
| | | /** |
| | | * 查询所有数据不分页 |
| | | * @param criteria 条件参数 |
| | | * @return List<CityLevelsDto> |
| | | */ |
| | | List<CityLevels> queryAll(CityLevelsQueryCriteria criteria); |
| | | |
| | | /** |
| | | * 创建 |
| | | * @param resources / |
| | | */ |
| | | void create(CityLevels resources); |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param resources / |
| | | */ |
| | | void update(CityLevels resources); |
| | | |
| | | /** |
| | | * 多选删除 |
| | | * @param ids / |
| | | */ |
| | | void deleteAll(List<Long> ids); |
| | | |
| | | /** |
| | | * 导出数据 |
| | | * @param all 待导出的数据 |
| | | * @param response / |
| | | * @throws IOException / |
| | | */ |
| | | void download(List<CityLevels> all, HttpServletResponse response) throws IOException; |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.service; |
| | | |
| | | import com.oying.modules.fee.domain.DistanceSurchargeRules; |
| | | import com.oying.modules.fee.domain.dto.DistanceSurchargeRulesQueryCriteria; |
| | | import java.util.List; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @description 服务接口 |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | public interface DistanceSurchargeRulesService extends IService<DistanceSurchargeRules> { |
| | | |
| | | /** |
| | | * 查询数据分页 |
| | | * @param criteria 条件 |
| | | * @param page 分页参数 |
| | | * @return PageResult |
| | | */ |
| | | PageResult<DistanceSurchargeRules> queryAll(DistanceSurchargeRulesQueryCriteria criteria, Page<Object> page); |
| | | |
| | | /** |
| | | * 查询所有数据不分页 |
| | | * @param criteria 条件参数 |
| | | * @return List<DistanceSurchargeRulesDto> |
| | | */ |
| | | List<DistanceSurchargeRules> queryAll(DistanceSurchargeRulesQueryCriteria criteria); |
| | | |
| | | /** |
| | | * 创建 |
| | | * @param resources / |
| | | */ |
| | | void create(DistanceSurchargeRules resources); |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param resources / |
| | | */ |
| | | void update(DistanceSurchargeRules resources); |
| | | |
| | | /** |
| | | * 多选删除 |
| | | * @param ids / |
| | | */ |
| | | void deleteAll(List<Long> ids); |
| | | |
| | | /** |
| | | * 导出数据 |
| | | * @param all 待导出的数据 |
| | | * @param response / |
| | | * @throws IOException / |
| | | */ |
| | | void download(List<DistanceSurchargeRules> all, HttpServletResponse response) throws IOException; |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.service; |
| | | |
| | | import com.oying.modules.fee.domain.OrderShippingFees; |
| | | import com.oying.modules.fee.domain.dto.OrderShippingFeesQueryCriteria; |
| | | import java.util.List; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @description 服务接口 |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | public interface OrderShippingFeesService extends IService<OrderShippingFees> { |
| | | |
| | | /** |
| | | * 查询数据分页 |
| | | * @param criteria 条件 |
| | | * @param page 分页参数 |
| | | * @return PageResult |
| | | */ |
| | | PageResult<OrderShippingFees> queryAll(OrderShippingFeesQueryCriteria criteria, Page<Object> page); |
| | | |
| | | /** |
| | | * 查询所有数据不分页 |
| | | * @param criteria 条件参数 |
| | | * @return List<OrderShippingFeesDto> |
| | | */ |
| | | List<OrderShippingFees> queryAll(OrderShippingFeesQueryCriteria criteria); |
| | | |
| | | /** |
| | | * 创建 |
| | | * @param resources / |
| | | */ |
| | | void create(OrderShippingFees resources); |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param resources / |
| | | */ |
| | | void update(OrderShippingFees resources); |
| | | |
| | | /** |
| | | * 多选删除 |
| | | * @param ids / |
| | | */ |
| | | void deleteAll(List<Long> ids); |
| | | |
| | | /** |
| | | * 导出数据 |
| | | * @param all 待导出的数据 |
| | | * @param response / |
| | | * @throws IOException / |
| | | */ |
| | | void download(List<OrderShippingFees> all, HttpServletResponse response) throws IOException; |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.service; |
| | | |
| | | import com.oying.modules.fee.domain.SpecialCategories; |
| | | import com.oying.modules.fee.domain.dto.SpecialCategoriesQueryCriteria; |
| | | import java.util.List; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @description 服务接口 |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | public interface SpecialCategoriesService extends IService<SpecialCategories> { |
| | | |
| | | /** |
| | | * 查询数据分页 |
| | | * @param criteria 条件 |
| | | * @param page 分页参数 |
| | | * @return PageResult |
| | | */ |
| | | PageResult<SpecialCategories> queryAll(SpecialCategoriesQueryCriteria criteria, Page<Object> page); |
| | | |
| | | /** |
| | | * 查询所有数据不分页 |
| | | * @param criteria 条件参数 |
| | | * @return List<SpecialCategoriesDto> |
| | | */ |
| | | List<SpecialCategories> queryAll(SpecialCategoriesQueryCriteria criteria); |
| | | |
| | | /** |
| | | * 创建 |
| | | * @param resources / |
| | | */ |
| | | void create(SpecialCategories resources); |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param resources / |
| | | */ |
| | | void update(SpecialCategories resources); |
| | | |
| | | /** |
| | | * 多选删除 |
| | | * @param ids / |
| | | */ |
| | | void deleteAll(List<Long> ids); |
| | | |
| | | /** |
| | | * 导出数据 |
| | | * @param all 待导出的数据 |
| | | * @param response / |
| | | * @throws IOException / |
| | | */ |
| | | void download(List<SpecialCategories> all, HttpServletResponse response) throws IOException; |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.service; |
| | | |
| | | import com.oying.modules.fee.domain.TimeSurchargeRules; |
| | | import com.oying.modules.fee.domain.dto.TimeSurchargeRulesQueryCriteria; |
| | | import java.util.List; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @description 服务接口 |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | public interface TimeSurchargeRulesService extends IService<TimeSurchargeRules> { |
| | | |
| | | /** |
| | | * 查询数据分页 |
| | | * @param criteria 条件 |
| | | * @param page 分页参数 |
| | | * @return PageResult |
| | | */ |
| | | PageResult<TimeSurchargeRules> queryAll(TimeSurchargeRulesQueryCriteria criteria, Page<Object> page); |
| | | |
| | | /** |
| | | * 查询所有数据不分页 |
| | | * @param criteria 条件参数 |
| | | * @return List<TimeSurchargeRulesDto> |
| | | */ |
| | | List<TimeSurchargeRules> queryAll(TimeSurchargeRulesQueryCriteria criteria); |
| | | |
| | | /** |
| | | * 创建 |
| | | * @param resources / |
| | | */ |
| | | void create(TimeSurchargeRules resources); |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param resources / |
| | | */ |
| | | void update(TimeSurchargeRules resources); |
| | | |
| | | /** |
| | | * 多选删除 |
| | | * @param ids / |
| | | */ |
| | | void deleteAll(List<Long> ids); |
| | | |
| | | /** |
| | | * 导出数据 |
| | | * @param all 待导出的数据 |
| | | * @param response / |
| | | * @throws IOException / |
| | | */ |
| | | void download(List<TimeSurchargeRules> all, HttpServletResponse response) throws IOException; |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.service; |
| | | |
| | | import com.oying.modules.fee.domain.WeightSurchargeRules; |
| | | import com.oying.modules.fee.domain.dto.WeightSurchargeRulesQueryCriteria; |
| | | import java.util.List; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @description 服务接口 |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | public interface WeightSurchargeRulesService extends IService<WeightSurchargeRules> { |
| | | |
| | | /** |
| | | * 查询数据分页 |
| | | * @param criteria 条件 |
| | | * @param page 分页参数 |
| | | * @return PageResult |
| | | */ |
| | | PageResult<WeightSurchargeRules> queryAll(WeightSurchargeRulesQueryCriteria criteria, Page<Object> page); |
| | | |
| | | /** |
| | | * 查询所有数据不分页 |
| | | * @param criteria 条件参数 |
| | | * @return List<WeightSurchargeRulesDto> |
| | | */ |
| | | List<WeightSurchargeRules> queryAll(WeightSurchargeRulesQueryCriteria criteria); |
| | | |
| | | /** |
| | | * 创建 |
| | | * @param resources / |
| | | */ |
| | | void create(WeightSurchargeRules resources); |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param resources / |
| | | */ |
| | | void update(WeightSurchargeRules resources); |
| | | |
| | | /** |
| | | * 多选删除 |
| | | * @param ids / |
| | | */ |
| | | void deleteAll(List<Long> ids); |
| | | |
| | | /** |
| | | * 导出数据 |
| | | * @param all 待导出的数据 |
| | | * @param response / |
| | | * @throws IOException / |
| | | */ |
| | | void download(List<WeightSurchargeRules> all, HttpServletResponse response) throws IOException; |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.service.impl; |
| | | |
| | | import com.oying.modules.fee.domain.BaseFees; |
| | | import com.oying.utils.FileUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.oying.modules.fee.service.BaseFeesService; |
| | | import com.oying.modules.fee.domain.dto.BaseFeesQueryCriteria; |
| | | import com.oying.modules.fee.mapper.BaseFeesMapper; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import com.oying.utils.PageUtil; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedHashMap; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @description 服务实现 |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class BaseFeesServiceImpl extends ServiceImpl<BaseFeesMapper, BaseFees> implements BaseFeesService { |
| | | |
| | | private final BaseFeesMapper baseFeesMapper; |
| | | |
| | | @Override |
| | | public PageResult<BaseFees> queryAll(BaseFeesQueryCriteria criteria, Page<Object> page){ |
| | | return PageUtil.toPage(baseFeesMapper.findAll(criteria, page)); |
| | | } |
| | | |
| | | @Override |
| | | public List<BaseFees> queryAll(BaseFeesQueryCriteria criteria){ |
| | | return baseFeesMapper.findAll(criteria); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void create(BaseFees resources) { |
| | | baseFeesMapper.insert(resources); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void update(BaseFees resources) { |
| | | BaseFees baseFees = getById(resources.getFeeId()); |
| | | baseFees.copy(resources); |
| | | baseFeesMapper.updateById(baseFees); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void deleteAll(List<Long> ids) { |
| | | baseFeesMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void download(List<BaseFees> all, HttpServletResponse response) throws IOException { |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | for (BaseFees baseFees : all) { |
| | | Map<String, Object> map = new LinkedHashMap<>(); |
| | | map.put("城市等级", baseFees.getLevel()); |
| | | map.put("品类类型 (普通、特殊)", baseFees.getCategoryType()); |
| | | map.put("基础运费金额", baseFees.getFeeAmount()); |
| | | map.put("生效日期", baseFees.getEffectiveDate()); |
| | | map.put("创建者", baseFees.getCreateBy()); |
| | | map.put("更新者", baseFees.getUpdateBy()); |
| | | map.put("创建日期", baseFees.getCreateTime()); |
| | | map.put("更新时间", baseFees.getUpdateTime()); |
| | | list.add(map); |
| | | } |
| | | FileUtil.downloadExcel(list, response); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.service.impl; |
| | | |
| | | import com.oying.modules.fee.domain.CityLevels; |
| | | import com.oying.utils.FileUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.oying.modules.fee.service.CityLevelsService; |
| | | import com.oying.modules.fee.domain.dto.CityLevelsQueryCriteria; |
| | | import com.oying.modules.fee.mapper.CityLevelsMapper; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import com.oying.utils.PageUtil; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedHashMap; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @description 服务实现 |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class CityLevelsServiceImpl extends ServiceImpl<CityLevelsMapper, CityLevels> implements CityLevelsService { |
| | | |
| | | private final CityLevelsMapper cityLevelsMapper; |
| | | |
| | | @Override |
| | | public PageResult<CityLevels> queryAll(CityLevelsQueryCriteria criteria, Page<Object> page){ |
| | | return PageUtil.toPage(cityLevelsMapper.findAll(criteria, page)); |
| | | } |
| | | |
| | | @Override |
| | | public List<CityLevels> queryAll(CityLevelsQueryCriteria criteria){ |
| | | return cityLevelsMapper.findAll(criteria); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void create(CityLevels resources) { |
| | | cityLevelsMapper.insert(resources); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void update(CityLevels resources) { |
| | | CityLevels cityLevels = getById(resources.getCityId()); |
| | | cityLevels.copy(resources); |
| | | cityLevelsMapper.updateById(cityLevels); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void deleteAll(List<Long> ids) { |
| | | cityLevelsMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void download(List<CityLevels> all, HttpServletResponse response) throws IOException { |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | for (CityLevels cityLevels : all) { |
| | | Map<String, Object> map = new LinkedHashMap<>(); |
| | | map.put("城市名称 (唯一)", cityLevels.getCityName()); |
| | | map.put("城市等级 (C/D/E)", cityLevels.getLevel()); |
| | | map.put("创建者", cityLevels.getCreateBy()); |
| | | map.put("更新者", cityLevels.getUpdateBy()); |
| | | map.put("创建日期", cityLevels.getCreateTime()); |
| | | map.put("更新时间", cityLevels.getUpdateTime()); |
| | | list.add(map); |
| | | } |
| | | FileUtil.downloadExcel(list, response); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.service.impl; |
| | | |
| | | import com.oying.modules.fee.domain.DistanceSurchargeRules; |
| | | import com.oying.utils.FileUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.oying.modules.fee.service.DistanceSurchargeRulesService; |
| | | import com.oying.modules.fee.domain.dto.DistanceSurchargeRulesQueryCriteria; |
| | | import com.oying.modules.fee.mapper.DistanceSurchargeRulesMapper; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import com.oying.utils.PageUtil; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedHashMap; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @description 服务实现 |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class DistanceSurchargeRulesServiceImpl extends ServiceImpl<DistanceSurchargeRulesMapper, DistanceSurchargeRules> implements DistanceSurchargeRulesService { |
| | | |
| | | private final DistanceSurchargeRulesMapper distanceSurchargeRulesMapper; |
| | | |
| | | @Override |
| | | public PageResult<DistanceSurchargeRules> queryAll(DistanceSurchargeRulesQueryCriteria criteria, Page<Object> page){ |
| | | return PageUtil.toPage(distanceSurchargeRulesMapper.findAll(criteria, page)); |
| | | } |
| | | |
| | | @Override |
| | | public List<DistanceSurchargeRules> queryAll(DistanceSurchargeRulesQueryCriteria criteria){ |
| | | return distanceSurchargeRulesMapper.findAll(criteria); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void create(DistanceSurchargeRules resources) { |
| | | distanceSurchargeRulesMapper.insert(resources); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void update(DistanceSurchargeRules resources) { |
| | | DistanceSurchargeRules distanceSurchargeRules = getById(resources.getRuleId()); |
| | | distanceSurchargeRules.copy(resources); |
| | | distanceSurchargeRulesMapper.updateById(distanceSurchargeRules); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void deleteAll(List<Long> ids) { |
| | | distanceSurchargeRulesMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void download(List<DistanceSurchargeRules> all, HttpServletResponse response) throws IOException { |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | for (DistanceSurchargeRules distanceSurchargeRules : all) { |
| | | Map<String, Object> map = new LinkedHashMap<>(); |
| | | map.put("最小距离 (公里)", distanceSurchargeRules.getMinDistance()); |
| | | map.put("最大距离 (公里)", distanceSurchargeRules.getMaxDistance()); |
| | | map.put("每公里加价金额", distanceSurchargeRules.getFeePerKm()); |
| | | map.put("生效日期", distanceSurchargeRules.getEffectiveDate()); |
| | | map.put("创建者", distanceSurchargeRules.getCreateBy()); |
| | | map.put("更新者", distanceSurchargeRules.getUpdateBy()); |
| | | map.put("创建日期", distanceSurchargeRules.getCreateTime()); |
| | | map.put("更新时间", distanceSurchargeRules.getUpdateTime()); |
| | | list.add(map); |
| | | } |
| | | FileUtil.downloadExcel(list, response); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.service.impl; |
| | | |
| | | import com.oying.modules.fee.domain.OrderShippingFees; |
| | | import com.oying.utils.FileUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.oying.modules.fee.service.OrderShippingFeesService; |
| | | import com.oying.modules.fee.domain.dto.OrderShippingFeesQueryCriteria; |
| | | import com.oying.modules.fee.mapper.OrderShippingFeesMapper; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import com.oying.utils.PageUtil; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedHashMap; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @description 服务实现 |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class OrderShippingFeesServiceImpl extends ServiceImpl<OrderShippingFeesMapper, OrderShippingFees> implements OrderShippingFeesService { |
| | | |
| | | private final OrderShippingFeesMapper orderShippingFeesMapper; |
| | | |
| | | @Override |
| | | public PageResult<OrderShippingFees> queryAll(OrderShippingFeesQueryCriteria criteria, Page<Object> page){ |
| | | return PageUtil.toPage(orderShippingFeesMapper.findAll(criteria, page)); |
| | | } |
| | | |
| | | @Override |
| | | public List<OrderShippingFees> queryAll(OrderShippingFeesQueryCriteria criteria){ |
| | | return orderShippingFeesMapper.findAll(criteria); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void create(OrderShippingFees resources) { |
| | | orderShippingFeesMapper.insert(resources); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void update(OrderShippingFees resources) { |
| | | OrderShippingFees orderShippingFees = getById(resources.getOrderId()); |
| | | orderShippingFees.copy(resources); |
| | | orderShippingFeesMapper.updateById(orderShippingFees); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void deleteAll(List<Long> ids) { |
| | | orderShippingFeesMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void download(List<OrderShippingFees> all, HttpServletResponse response) throws IOException { |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | for (OrderShippingFees orderShippingFees : all) { |
| | | Map<String, Object> map = new LinkedHashMap<>(); |
| | | map.put("订单编号", orderShippingFees.getOrderNum()); |
| | | map.put("城市ID", orderShippingFees.getCityId()); |
| | | map.put("城市名称", orderShippingFees.getCityName()); |
| | | map.put("品类ID ", orderShippingFees.getCategoryId()); |
| | | map.put("特殊品类名称", orderShippingFees.getCategoryName()); |
| | | map.put("重量 (公斤)", orderShippingFees.getWeight()); |
| | | map.put("距离 (公里)", orderShippingFees.getDistance()); |
| | | map.put("下单时间", orderShippingFees.getOrderTime()); |
| | | map.put("是否特殊条件", orderShippingFees.getIsSpecialConditions()); |
| | | map.put("基础运费", orderShippingFees.getBaseFee()); |
| | | map.put("重量加价", orderShippingFees.getWeightSurcharge()); |
| | | map.put("距离加价", orderShippingFees.getDistanceSurcharge()); |
| | | map.put("时段加价", orderShippingFees.getTimeSurcharge()); |
| | | map.put("特殊条件加价", orderShippingFees.getSpecialConditionSurcharge()); |
| | | map.put("总运费", orderShippingFees.getTotalFee()); |
| | | map.put("创建时间", orderShippingFees.getCreatedAt()); |
| | | list.add(map); |
| | | } |
| | | FileUtil.downloadExcel(list, response); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.service.impl; |
| | | |
| | | import com.oying.modules.fee.domain.SpecialCategories; |
| | | import com.oying.utils.FileUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.oying.modules.fee.service.SpecialCategoriesService; |
| | | import com.oying.modules.fee.domain.dto.SpecialCategoriesQueryCriteria; |
| | | import com.oying.modules.fee.mapper.SpecialCategoriesMapper; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import com.oying.utils.PageUtil; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedHashMap; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @description 服务实现 |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class SpecialCategoriesServiceImpl extends ServiceImpl<SpecialCategoriesMapper, SpecialCategories> implements SpecialCategoriesService { |
| | | |
| | | private final SpecialCategoriesMapper specialCategoriesMapper; |
| | | |
| | | @Override |
| | | public PageResult<SpecialCategories> queryAll(SpecialCategoriesQueryCriteria criteria, Page<Object> page){ |
| | | return PageUtil.toPage(specialCategoriesMapper.findAll(criteria, page)); |
| | | } |
| | | |
| | | @Override |
| | | public List<SpecialCategories> queryAll(SpecialCategoriesQueryCriteria criteria){ |
| | | return specialCategoriesMapper.findAll(criteria); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void create(SpecialCategories resources) { |
| | | specialCategoriesMapper.insert(resources); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void update(SpecialCategories resources) { |
| | | SpecialCategories specialCategories = getById(resources.getCategoryId()); |
| | | specialCategories.copy(resources); |
| | | specialCategoriesMapper.updateById(specialCategories); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void deleteAll(List<Long> ids) { |
| | | specialCategoriesMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void download(List<SpecialCategories> all, HttpServletResponse response) throws IOException { |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | for (SpecialCategories specialCategories : all) { |
| | | Map<String, Object> map = new LinkedHashMap<>(); |
| | | map.put("特殊品类名称(唯一)", specialCategories.getCategoryName()); |
| | | map.put("创建者", specialCategories.getCreateBy()); |
| | | map.put("更新者", specialCategories.getUpdateBy()); |
| | | map.put("创建日期", specialCategories.getCreateTime()); |
| | | map.put("更新时间", specialCategories.getUpdateTime()); |
| | | list.add(map); |
| | | } |
| | | FileUtil.downloadExcel(list, response); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.service.impl; |
| | | |
| | | import com.oying.modules.fee.domain.TimeSurchargeRules; |
| | | import com.oying.utils.FileUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.oying.modules.fee.service.TimeSurchargeRulesService; |
| | | import com.oying.modules.fee.domain.dto.TimeSurchargeRulesQueryCriteria; |
| | | import com.oying.modules.fee.mapper.TimeSurchargeRulesMapper; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import com.oying.utils.PageUtil; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedHashMap; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @description 服务实现 |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class TimeSurchargeRulesServiceImpl extends ServiceImpl<TimeSurchargeRulesMapper, TimeSurchargeRules> implements TimeSurchargeRulesService { |
| | | |
| | | private final TimeSurchargeRulesMapper timeSurchargeRulesMapper; |
| | | |
| | | @Override |
| | | public PageResult<TimeSurchargeRules> queryAll(TimeSurchargeRulesQueryCriteria criteria, Page<Object> page){ |
| | | return PageUtil.toPage(timeSurchargeRulesMapper.findAll(criteria, page)); |
| | | } |
| | | |
| | | @Override |
| | | public List<TimeSurchargeRules> queryAll(TimeSurchargeRulesQueryCriteria criteria){ |
| | | return timeSurchargeRulesMapper.findAll(criteria); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void create(TimeSurchargeRules resources) { |
| | | timeSurchargeRulesMapper.insert(resources); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void update(TimeSurchargeRules resources) { |
| | | TimeSurchargeRules timeSurchargeRules = getById(resources.getTimeRuleId()); |
| | | timeSurchargeRules.copy(resources); |
| | | timeSurchargeRulesMapper.updateById(timeSurchargeRules); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void deleteAll(List<Long> ids) { |
| | | timeSurchargeRulesMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void download(List<TimeSurchargeRules> all, HttpServletResponse response) throws IOException { |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | for (TimeSurchargeRules timeSurchargeRules : all) { |
| | | Map<String, Object> map = new LinkedHashMap<>(); |
| | | map.put("时段开始时间", timeSurchargeRules.getStartTime()); |
| | | map.put("时段结束时间", timeSurchargeRules.getEndTime()); |
| | | map.put("加价金额", timeSurchargeRules.getSurchargeAmount()); |
| | | map.put("生效日期", timeSurchargeRules.getEffectiveDate()); |
| | | map.put("创建者", timeSurchargeRules.getCreateBy()); |
| | | map.put("更新者", timeSurchargeRules.getUpdateBy()); |
| | | map.put("创建日期", timeSurchargeRules.getCreateTime()); |
| | | map.put("更新时间", timeSurchargeRules.getUpdateTime()); |
| | | list.add(map); |
| | | } |
| | | FileUtil.downloadExcel(list, response); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.service.impl; |
| | | |
| | | import com.oying.modules.fee.domain.WeightSurchargeRules; |
| | | import com.oying.utils.FileUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.oying.modules.fee.service.WeightSurchargeRulesService; |
| | | import com.oying.modules.fee.domain.dto.WeightSurchargeRulesQueryCriteria; |
| | | import com.oying.modules.fee.mapper.WeightSurchargeRulesMapper; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import com.oying.utils.PageUtil; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedHashMap; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @description 服务实现 |
| | | * @author lixin |
| | | * @date 2025-10-07 |
| | | **/ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class WeightSurchargeRulesServiceImpl extends ServiceImpl<WeightSurchargeRulesMapper, WeightSurchargeRules> implements WeightSurchargeRulesService { |
| | | |
| | | private final WeightSurchargeRulesMapper weightSurchargeRulesMapper; |
| | | |
| | | @Override |
| | | public PageResult<WeightSurchargeRules> queryAll(WeightSurchargeRulesQueryCriteria criteria, Page<Object> page){ |
| | | return PageUtil.toPage(weightSurchargeRulesMapper.findAll(criteria, page)); |
| | | } |
| | | |
| | | @Override |
| | | public List<WeightSurchargeRules> queryAll(WeightSurchargeRulesQueryCriteria criteria){ |
| | | return weightSurchargeRulesMapper.findAll(criteria); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void create(WeightSurchargeRules resources) { |
| | | weightSurchargeRulesMapper.insert(resources); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void update(WeightSurchargeRules resources) { |
| | | WeightSurchargeRules weightSurchargeRules = getById(resources.getWeightRuleId()); |
| | | weightSurchargeRules.copy(resources); |
| | | weightSurchargeRulesMapper.updateById(weightSurchargeRules); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void deleteAll(List<Long> ids) { |
| | | weightSurchargeRulesMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void download(List<WeightSurchargeRules> all, HttpServletResponse response) throws IOException { |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | for (WeightSurchargeRules weightSurchargeRules : all) { |
| | | Map<String, Object> map = new LinkedHashMap<>(); |
| | | map.put("基础重量 (公斤)", weightSurchargeRules.getBaseWeight()); |
| | | map.put("每公斤加价金额", weightSurchargeRules.getFeePerKg()); |
| | | map.put("生效日期", weightSurchargeRules.getEffectiveDate()); |
| | | map.put("创建者", weightSurchargeRules.getCreateBy()); |
| | | map.put("更新者", weightSurchargeRules.getUpdateBy()); |
| | | map.put("创建日期", weightSurchargeRules.getCreateTime()); |
| | | map.put("更新时间", weightSurchargeRules.getUpdateTime()); |
| | | list.add(map); |
| | | } |
| | | FileUtil.downloadExcel(list, response); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.utils.enums; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * @author xin |
| | | * @description |
| | | * @date 2025/10/7 22:59 |
| | | */ |
| | | @Getter |
| | | @AllArgsConstructor |
| | | public enum CategoryTypeEnum { |
| | | |
| | | NORMAL("normal", "普通品类"), |
| | | SPECIAL("special", "特殊品类"), |
| | | |
| | | UNKNOWN("UNKNOWN", "未知枚举"); |
| | | |
| | | private final String key; |
| | | |
| | | private final String value; |
| | | |
| | | public static CategoryTypeEnum find(String val) { |
| | | for (CategoryTypeEnum value : CategoryTypeEnum.values()) { |
| | | if (val.equals(value.getKey())) { |
| | | return value; |
| | | } |
| | | } |
| | | return UNKNOWN; |
| | | } |
| | | |
| | | public static String getValue(String val) { |
| | | for (CategoryTypeEnum value : CategoryTypeEnum.values()) { |
| | | if (val.equals(value.getKey())) { |
| | | return value.getValue(); |
| | | } |
| | | } |
| | | return UNKNOWN.getValue(); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.oying.modules.fee.utils.enums; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Getter; |
| | | |
| | | @Getter |
| | | @AllArgsConstructor |
| | | public enum CityLevelEnum { |
| | | |
| | | C("C", "C等级"), |
| | | D("D", "D等级"), |
| | | E("E", "E等级"); |
| | | |
| | | private final String key; |
| | | |
| | | private final String value; |
| | | |
| | | public static CityLevelEnum find(String val) { |
| | | for (CityLevelEnum value : CityLevelEnum.values()) { |
| | | if (val.equals(value.getKey())) { |
| | | return value; |
| | | } |
| | | } |
| | | return E; |
| | | } |
| | | |
| | | public static String getValue(String val) { |
| | | for (CityLevelEnum value : CityLevelEnum.values()) { |
| | | if (val.equals(value.getKey())) { |
| | | return value.getValue(); |
| | | } |
| | | } |
| | | return E.getValue(); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.oying.modules.fee.mapper.BaseFeesMapper"> |
| | | <resultMap id="BaseResultMap" type="com.oying.modules.fee.domain.BaseFees"> |
| | | <id column="fee_id" property="feeId"/> |
| | | <result column="level" property="level"/> |
| | | <result column="category_type" property="categoryType"/> |
| | | <result column="fee_amount" property="feeAmount"/> |
| | | <result column="effective_date" property="effectiveDate"/> |
| | | <result column="create_by" property="createBy"/> |
| | | <result column="update_by" property="updateBy"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | fee_id, level, category_type, fee_amount, effective_date, create_by, update_by, create_time, update_time |
| | | </sql> |
| | | |
| | | <select id="findAll" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from fee_base_fees |
| | | <where> |
| | | <if test="criteria.level != null"> |
| | | and level = #{criteria.level} |
| | | </if> |
| | | <if test="criteria.categoryType != null"> |
| | | and category_type = #{criteria.categoryType} |
| | | </if> |
| | | <if test="criteria.createTime != null and criteria.createTime.size() > 0"> |
| | | AND create_time BETWEEN #{criteria.createTime[0]} AND #{criteria.createTime[1]} |
| | | </if> |
| | | </where> |
| | | order by fee_id desc |
| | | </select> |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.oying.modules.fee.mapper.CityLevelsMapper"> |
| | | <resultMap id="BaseResultMap" type="com.oying.modules.fee.domain.CityLevels"> |
| | | <id column="city_id" property="cityId"/> |
| | | <result column="city_name" property="cityName"/> |
| | | <result column="level" property="level"/> |
| | | <result column="create_by" property="createBy"/> |
| | | <result column="update_by" property="updateBy"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | city_id, city_name, level, create_by, update_by, create_time, update_time |
| | | </sql> |
| | | |
| | | <select id="findAll" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from fee_city_levels |
| | | <where> |
| | | <if test="criteria.cityName != null"> |
| | | and city_name like concat('%',#{criteria.cityName},'%') |
| | | </if> |
| | | <if test="criteria.level != null"> |
| | | and level = #{criteria.level} |
| | | </if> |
| | | <if test="criteria.createTime != null and criteria.createTime.size() > 0"> |
| | | AND create_time BETWEEN #{criteria.createTime[0]} AND #{criteria.createTime[1]} |
| | | </if> |
| | | </where> |
| | | order by city_id desc |
| | | </select> |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.oying.modules.fee.mapper.DistanceSurchargeRulesMapper"> |
| | | <resultMap id="BaseResultMap" type="com.oying.modules.fee.domain.DistanceSurchargeRules"> |
| | | <id column="rule_id" property="ruleId"/> |
| | | <result column="min_distance" property="minDistance"/> |
| | | <result column="max_distance" property="maxDistance"/> |
| | | <result column="fee_per_km" property="feePerKm"/> |
| | | <result column="effective_date" property="effectiveDate"/> |
| | | <result column="create_by" property="createBy"/> |
| | | <result column="update_by" property="updateBy"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | rule_id, min_distance, max_distance, fee_per_km, effective_date, create_by, update_by, create_time, update_time |
| | | </sql> |
| | | |
| | | <select id="findAll" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from fee_distance_surcharge_rules |
| | | <where> |
| | | <if test="criteria.createTime != null and criteria.createTime.size() > 0"> |
| | | AND create_time BETWEEN #{criteria.createTime[0]} AND #{criteria.createTime[1]} |
| | | </if> |
| | | </where> |
| | | order by rule_id desc |
| | | </select> |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.oying.modules.fee.mapper.OrderShippingFeesMapper"> |
| | | <resultMap id="BaseResultMap" type="com.oying.modules.fee.domain.OrderShippingFees"> |
| | | <id column="order_id" property="orderId"/> |
| | | <result column="order_num" property="orderNum"/> |
| | | <result column="city_id" property="cityId"/> |
| | | <result column="city_name" property="cityName"/> |
| | | <result column="category_id" property="categoryId"/> |
| | | <result column="category_name" property="categoryName"/> |
| | | <result column="weight" property="weight"/> |
| | | <result column="distance" property="distance"/> |
| | | <result column="order_time" property="orderTime"/> |
| | | <result column="is_special_conditions" property="isSpecialConditions"/> |
| | | <result column="base_fee" property="baseFee"/> |
| | | <result column="weight_surcharge" property="weightSurcharge"/> |
| | | <result column="distance_surcharge" property="distanceSurcharge"/> |
| | | <result column="time_surcharge" property="timeSurcharge"/> |
| | | <result column="special_condition_surcharge" property="specialConditionSurcharge"/> |
| | | <result column="total_fee" property="totalFee"/> |
| | | <result column="created_at" property="createdAt"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | order_id, order_num, city_id, city_name, category_id, category_name, weight, distance, order_time, is_special_conditions, base_fee, weight_surcharge, distance_surcharge, time_surcharge, special_condition_surcharge, total_fee, created_at |
| | | </sql> |
| | | |
| | | <select id="findAll" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from fee_order_shipping_fees |
| | | <where> |
| | | <if test="criteria.orderNum != null"> |
| | | and order_num like concat('%',#{criteria.orderNum},'%') |
| | | </if> |
| | | <if test="criteria.cityId != null"> |
| | | and city_id = #{criteria.cityId} |
| | | </if> |
| | | <if test="criteria.cityName != null"> |
| | | and city_name like concat('%',#{criteria.cityName},'%') |
| | | </if> |
| | | <if test="criteria.categoryId != null"> |
| | | and category_id = #{criteria.categoryId} |
| | | </if> |
| | | <if test="criteria.categoryName != null"> |
| | | and category_name like concat('%',#{criteria.categoryName},'%') |
| | | </if> |
| | | <if test="criteria.isSpecialConditions != null"> |
| | | and is_special_conditions = #{criteria.isSpecialConditions} |
| | | </if> |
| | | <if test="criteria.orderTime != null and criteria.orderTime.size() > 0"> |
| | | AND order_time BETWEEN #{criteria.orderTime[0]} AND #{criteria.orderTime[1]} |
| | | </if> |
| | | <if test="criteria.createdAt != null and criteria.createdAt.size() > 0"> |
| | | AND created_at BETWEEN #{criteria.createdAt[0]} AND #{criteria.createdAt[1]} |
| | | </if> |
| | | </where> |
| | | order by order_id desc |
| | | </select> |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.oying.modules.fee.mapper.SpecialCategoriesMapper"> |
| | | <resultMap id="BaseResultMap" type="com.oying.modules.fee.domain.SpecialCategories"> |
| | | <id column="category_id" property="categoryId"/> |
| | | <result column="category_name" property="categoryName"/> |
| | | <result column="create_by" property="createBy"/> |
| | | <result column="update_by" property="updateBy"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | category_id, category_name, create_by, update_by, create_time, update_time |
| | | </sql> |
| | | |
| | | <select id="findAll" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from fee_special_categories |
| | | <where> |
| | | <if test="criteria.categoryName != null"> |
| | | and category_name like concat('%',#{criteria.categoryName},'%') |
| | | </if> |
| | | <if test="criteria.createTime != null and criteria.createTime.size() > 0"> |
| | | AND create_time BETWEEN #{criteria.createTime[0]} AND #{criteria.createTime[1]} |
| | | </if> |
| | | </where> |
| | | order by category_id desc |
| | | </select> |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.oying.modules.fee.mapper.TimeSurchargeRulesMapper"> |
| | | <resultMap id="BaseResultMap" type="com.oying.modules.fee.domain.TimeSurchargeRules"> |
| | | <id column="time_rule_id" property="timeRuleId"/> |
| | | <result column="start_time" property="startTime"/> |
| | | <result column="end_time" property="endTime"/> |
| | | <result column="surcharge_amount" property="surchargeAmount"/> |
| | | <result column="effective_date" property="effectiveDate"/> |
| | | <result column="create_by" property="createBy"/> |
| | | <result column="update_by" property="updateBy"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | time_rule_id, start_time, end_time, surcharge_amount, effective_date, create_by, update_by, create_time, update_time |
| | | </sql> |
| | | |
| | | <select id="findAll" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from fee_time_surcharge_rules |
| | | <where> |
| | | <if test="criteria.createTime != null and criteria.createTime.size() > 0"> |
| | | AND create_time BETWEEN #{criteria.createTime[0]} AND #{criteria.createTime[1]} |
| | | </if> |
| | | </where> |
| | | order by time_rule_id desc |
| | | </select> |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.oying.modules.fee.mapper.WeightSurchargeRulesMapper"> |
| | | <resultMap id="BaseResultMap" type="com.oying.modules.fee.domain.WeightSurchargeRules"> |
| | | <id column="weight_rule_id" property="weightRuleId"/> |
| | | <result column="base_weight" property="baseWeight"/> |
| | | <result column="fee_per_kg" property="feePerKg"/> |
| | | <result column="effective_date" property="effectiveDate"/> |
| | | <result column="create_by" property="createBy"/> |
| | | <result column="update_by" property="updateBy"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | weight_rule_id, base_weight, fee_per_kg, effective_date, create_by, update_by, create_time, update_time |
| | | </sql> |
| | | |
| | | <select id="findAll" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from fee_weight_surcharge_rules |
| | | <where> |
| | | <if test="criteria.createTime != null and criteria.createTime.size() > 0"> |
| | | AND create_time BETWEEN #{criteria.createTime[0]} AND #{criteria.createTime[1]} |
| | | </if> |
| | | </where> |
| | | order by weight_rule_id desc |
| | | </select> |
| | | </mapper> |