物流、商品和支付修改

pull/2/head
js199000131 2023-05-15 10:05:36 +08:00
parent 4e350e2767
commit 982bdcd9ad
15 changed files with 712 additions and 3 deletions

View File

@ -0,0 +1,52 @@
package cn.iocoder.yudao.module.product.api.express;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.product.api.express.dto.ShippingTemplatesDO;
import cn.iocoder.yudao.module.product.api.express.vo.ShippingTemplatesReqVO;
import cn.iocoder.yudao.module.product.api.express.vo.ShippingTemplatesSearchReqVO;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
/**
* ShippingTemplatesService
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB ]
* +----------------------------------------------------------------------
* | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEBCRMEB
* +----------------------------------------------------------------------
* | Author: CRMEB Team <admin@crmeb.com>
* +----------------------------------------------------------------------
*/
@Service
@Validated
public interface ShippingTemplatesApi extends IService<ShippingTemplatesDO> {
PageResult<ShippingTemplatesDO> getList(ShippingTemplatesSearchReqVO request);
/**
*
* @param request
* @return
*/
Boolean create(ShippingTemplatesReqVO request);
Boolean update(Integer id, ShippingTemplatesReqVO request);
/**
*
* @param id id
* @return Boolean
*/
Boolean remove(Integer id);
/**
*
* @param id id
* @return ShippingTemplates
*/
ShippingTemplatesDO getInfo(Integer id);
}

View File

@ -0,0 +1,44 @@
package cn.iocoder.yudao.module.product.api.express;
import cn.iocoder.yudao.module.product.api.express.dto.ShippingTemplatesFreeDO;
import cn.iocoder.yudao.module.product.api.express.vo.ShippingTemplatesFreeRespVO;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import java.util.List;
/**
* ShippingTemplatesFreeService
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB ]
* +----------------------------------------------------------------------
* | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEBCRMEB
* +----------------------------------------------------------------------
* | Author: CRMEB Team <admin@crmeb.com>
* +----------------------------------------------------------------------
*/
@Service
@Validated
public interface ShippingTemplatesFreeApi extends IService<ShippingTemplatesFreeDO> {
void saveAll(List<ShippingTemplatesFreeRespVO> shippingTemplatesFreeRespVOList, Integer type, Integer id);
List<ShippingTemplatesFreeRespVO> getListGroup(Integer tempId);
/**
*
* @param tempId id
*/
Boolean delete(Integer tempId);
/**
* ID
* @param tempId
* @param cityId ID
* @return
*/
ShippingTemplatesFreeDO getByTempIdAndCityId(Integer tempId, Integer cityId);
}

View File

@ -0,0 +1,39 @@
package cn.iocoder.yudao.module.product.api.express;
import cn.iocoder.yudao.module.product.api.express.dto.ShippingTemplatesNoDeliveryDO;
import cn.iocoder.yudao.module.product.api.express.vo.ShippingTemplatesNoDeliveryRespVO;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import java.util.List;
/**
* ShippingTemplatesFreeService
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB ]
* +----------------------------------------------------------------------
* | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEBCRMEB
* +----------------------------------------------------------------------
* | Author: CRMEB Team <admin@crmeb.com>
* +----------------------------------------------------------------------
*/
@Service
@Validated
public interface ShippingTemplatesNoDeliveryApi extends IService<ShippingTemplatesNoDeliveryDO> {
void saveAll(List<ShippingTemplatesNoDeliveryRespVO> shippingTemplatesFreeRespVOList, Integer id);
List<ShippingTemplatesNoDeliveryRespVO> getListGroup(Integer tempId);
/**
* ID
* @param tempId
* @param cityId ID
* @return
*/
ShippingTemplatesNoDeliveryDO getByTempIdAndCityId(Integer tempId, Integer cityId);
}

View File

@ -0,0 +1,46 @@
package cn.iocoder.yudao.module.product.api.express;
import cn.iocoder.yudao.module.product.api.express.dto.ShippingTemplatesRegionDO;
import cn.iocoder.yudao.module.product.api.express.vo.ShippingTemplatesRegionRespVO;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import java.util.List;
/**
* ShippingTemplatesRegionService
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB ]
* +----------------------------------------------------------------------
* | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEBCRMEB
* +----------------------------------------------------------------------
* | Author: CRMEB Team <admin@crmeb.com>
* +----------------------------------------------------------------------
*/
@Service
@Validated
public interface ShippingTemplatesRegionApi extends IService<ShippingTemplatesRegionDO> {
void saveAll(List<ShippingTemplatesRegionRespVO> shippingTemplatesRegionRespVOList, Integer type, Integer id);
List<ShippingTemplatesRegionRespVO> getListGroup(Integer tempId);
/**
*
* @param tempId id
* @return Boolean
*/
Boolean delete(Integer tempId);
/**
* ID
* @param tempId
* @param cityId ID
* @return
*/
ShippingTemplatesRegionDO getByTempIdAndCityId(Integer tempId, Integer cityId);
}

View File

@ -0,0 +1,55 @@
package cn.iocoder.yudao.module.product.api.express.dto;
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
*
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB ]
* +----------------------------------------------------------------------
* | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEBCRMEB
* +----------------------------------------------------------------------
* | Author: CRMEB Team <admin@crmeb.com>
* +----------------------------------------------------------------------
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("eb_shipping_templates")
public class ShippingTemplatesDO extends TenantBaseDO {
private static final long serialVersionUID=1L;
@TableId(value = "id", type = IdType.ASSIGN_ID)
private Integer id;
/**
*
*/
private String name;
/**
*
*/
private Integer type;
/**
*
*/
private Boolean appoint;
/**
*
*/
private Integer sort;
}

View File

@ -0,0 +1,75 @@
package cn.iocoder.yudao.module.product.api.express.dto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.math.BigDecimal;
/**
*
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB ]
* +----------------------------------------------------------------------
* | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEBCRMEB
* +----------------------------------------------------------------------
* | Author: CRMEB Team <admin@crmeb.com>
* +----------------------------------------------------------------------
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("eb_shipping_templates_free")
public class ShippingTemplatesFreeDO implements Serializable {
private static final long serialVersionUID=1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* ID
*/
private Integer tempId;
/**
*ID
*/
private Integer cityId;
/**
*
*/
private String title;
/**
*
*/
private BigDecimal number;
/**
*
*/
private BigDecimal price;
/**
*
*/
private Integer type;
/**
*
*/
private String uniqid;
/**
*
*/
private Boolean status;
}

View File

@ -0,0 +1,51 @@
package cn.iocoder.yudao.module.product.api.express.dto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
*
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB ]
* +----------------------------------------------------------------------
* | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEBCRMEB
* +----------------------------------------------------------------------
* | Author: CRMEB Team <admin@crmeb.com>
* +----------------------------------------------------------------------
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("eb_shipping_templates_no_delivery")
public class ShippingTemplatesNoDeliveryDO implements Serializable {
private static final long serialVersionUID=1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* ID
*/
private Integer tempId;
/**
*ID
*/
private Integer cityId;
/**
*ID
*/
private Integer province_id;
}

View File

@ -0,0 +1,87 @@
package cn.iocoder.yudao.module.product.api.express.dto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.math.BigDecimal;
/**
*
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB ]
* +----------------------------------------------------------------------
* | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEBCRMEB
* +----------------------------------------------------------------------
* | Author: CRMEB Team <admin@crmeb.com>
* +----------------------------------------------------------------------
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("eb_shipping_templates_region")
public class ShippingTemplatesRegionDO implements Serializable {
private static final long serialVersionUID=1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* ID
*/
private Integer tempId;
/**
*ID
*/
private Integer cityId;
/**
*
*/
private String title;
/**
*
*/
private BigDecimal first;
/**
*
*/
private BigDecimal firstPrice;
/**
*
*/
private BigDecimal renewal;
/**
*
*/
private BigDecimal renewalPrice;
/**
* 1 2 3
*/
private Integer type;
/**
*
*/
private String uniqid;
/**
*
*/
private Boolean status;
}

View File

@ -0,0 +1,51 @@
package cn.iocoder.yudao.module.product.api.express.vo;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* Request
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB ]
* +----------------------------------------------------------------------
* | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEBCRMEB
* +----------------------------------------------------------------------
* | Author: CRMEB Team <admin@crmeb.com>
* +----------------------------------------------------------------------
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("eb_shipping_templates_free")
@Schema(description="免费")
public class ShippingTemplatesFreeRespVO implements Serializable {
private static final long serialVersionUID=1L;
@Schema(description = "城市ID, 多个逗号分割。 全国 all", required = true, example = "1,2,3,4")
@NotNull(message = "请选择城市")
private String cityId;
@Schema(description = "城市名称描述")
private String title;
@Schema(description = "包邮件数", required = true, example = "1")
// @Min(value = 1, message = "请填写包邮件数")
@DecimalMin(value = "0.1", message = "包邮不能低于0.1")
private BigDecimal number;
@Schema(description = "包邮金额", required = true, example = "0.1")
@NotNull(message = "请填写包邮金额")
@DecimalMin(value = "0", message = "包邮金额不能低于0")
private BigDecimal price;
}

View File

@ -0,0 +1,36 @@
package cn.iocoder.yudao.module.product.api.express.vo;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* Request
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB ]
* +----------------------------------------------------------------------
* | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEBCRMEB
* +----------------------------------------------------------------------
* | Author: CRMEB Team <admin@crmeb.com>
* +----------------------------------------------------------------------
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("eb_shipping_templates_no_delivery")
@Schema(description="指定不送达地区")
public class ShippingTemplatesNoDeliveryRespVO implements Serializable {
private static final long serialVersionUID=1L;
@Schema(description = "城市ID, 多个逗号分割。 全国 all", required = true, example = "1,2,3,4")
@NotNull(message = "请选择城市")
private String cityId;
}

View File

@ -0,0 +1,60 @@
package cn.iocoder.yudao.module.product.api.express.vo;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* Reuqest
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB ]
* +----------------------------------------------------------------------
* | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEBCRMEB
* +----------------------------------------------------------------------
* | Author: CRMEB Team <admin@crmeb.com>
* +----------------------------------------------------------------------
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("eb_shipping_templates_region")
@Schema(description="付费")
public class ShippingTemplatesRegionRespVO implements Serializable {
private static final long serialVersionUID=1L;
@Schema(description = "城市ID, 多个逗号分割。全国 all", required = true, example = "1,2,3,4")
@NotNull(message = "请选择城市")
private String cityId;
@Schema(description = "城市名称描述")
private String title;
@Schema(description = "首件", required = true, example = "0.1")
@DecimalMin(value = "0.1", message = "首件金额不能低于0.1")
private BigDecimal first;
@Schema(description = "首件运费", required = true, example = "0.1")
@DecimalMin(value = "0.1", message = "首件运费金额不能低于0.1")
private BigDecimal firstPrice;
@Schema(description = "续件", required = true, example = "0.1")
@DecimalMin(value = "0.1", message = "续件不能低于0.1")
private BigDecimal renewal;
@Schema(description = "续件运费", required = true, example = "0.1")
@DecimalMin(value = "0.1", message = "续件运费金额不能低于0.1")
private BigDecimal renewalPrice;
@Schema(description = "分组唯一值")
private String uniqid;
}

View File

@ -0,0 +1,66 @@
package cn.iocoder.yudao.module.product.api.express.vo;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
/**
* Request
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB ]
* +----------------------------------------------------------------------
* | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEBCRMEB
* +----------------------------------------------------------------------
* | Author: CRMEB Team <admin@crmeb.com>
* +----------------------------------------------------------------------
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("eb_shipping_templates")
@Schema(description="模板")
public class ShippingTemplatesReqVO implements Serializable {
private static final long serialVersionUID=1L;
@Schema(description = "模板名称", required = true)
@NotBlank(message = "模板名称必须填写")
@Length(max = 200, message = "模板名称不能超过200个字符")
private String name;
@Schema(description = "计费方式 1(按件数), 2(按重量)3(按体积)", example = "1", required = true)
@NotNull(message = "计费方式必须选择")
@Range(min = 1, max = 3, message = "计费方式选择区间 1(按件数), 2(按重量)3(按体积)")
private Integer type;
@Schema(description = "配送区域及运费", required = true)
private List<ShippingTemplatesRegionRespVO> shippingTemplatesRegionRespVOList;
@Schema(description = "指定包邮", example = "1", required = true)
@NotNull(message = "指定包邮必须选择")
private Boolean appoint;
@Schema(description = "指定包邮设置", required = true)
private List<ShippingTemplatesFreeRespVO> shippingTemplatesFreeRespVOList;
@Schema(description = "指定不包邮设置", required = true)
private List<ShippingTemplatesNoDeliveryRespVO> shippingTemplatesNoDeliveryRespVOS;
@Schema(description = "排序", example = "0")
@NotNull(message = "排序数字必须填写")
@Min(value = 0, message = "排序最小为0")
private Integer sort;
}

View File

@ -0,0 +1,33 @@
package cn.iocoder.yudao.module.product.api.express.vo;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* Request
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB ]
* +----------------------------------------------------------------------
* | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEBCRMEB
* +----------------------------------------------------------------------
* | Author: CRMEB Team <admin@crmeb.com>
* +----------------------------------------------------------------------
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("eb_shipping_templates")
@Schema(description="模板搜索")
public class ShippingTemplatesSearchReqVO extends PageParam {
private static final long serialVersionUID=1L;
@Schema(description = "模板名称")
private String keywords;
}

View File

@ -0,0 +1,14 @@
//package cn.iocoder.yudao.module.product.service.express;
//
//import cn.iocoder.yudao.module.product.dal.mysql.express.ShippingTemplatesNoDeliveryMapper;
//import cn.iocoder.yudao.module.product.service.express.impl.ShippingTemplatesNoDeliveryServiceImpl;
//import org.junit.jupiter.api.Test;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Import;
//
//import javax.annotation.Resource;
//
//@Import(ShippingTemplatesNoDeliveryServiceImpl.class)
//public class ShippingTemplatesNoDeliverServiceImplTest {
//
//}

View File

@ -49,21 +49,21 @@ public class StoreOrderRefundServiceImpl extends ServiceImpl<StoreOrderMapper, S
appId = apiConfigApi.getConfigKey(Constants.CONFIG_KEY_PAY_WE_CHAT_APP_ID).toString();
mchId = apiConfigApi.getConfigKey(Constants.CONFIG_KEY_PAY_WE_CHAT_MCH_ID).toString();
signKey = apiConfigApi.getConfigKey(Constants.CONFIG_KEY_PAY_WE_CHAT_APP_KEY).toString();
// path = systemConfigService.getValueByKeyException("pay_routine_client_p12");
// path = apiConfigApi.getConfigKeyException("pay_routine_client_p12");
path = apiConfigApi.getConfigKey("pay_weixin_certificate_path").toString();
}
if (storeOrder.getIsChannel() == 1) {// 小程序
appId = apiConfigApi.getConfigKey(Constants.CONFIG_KEY_PAY_ROUTINE_APP_ID).toString();
mchId = apiConfigApi.getConfigKey(Constants.CONFIG_KEY_PAY_ROUTINE_MCH_ID).toString();
signKey = apiConfigApi.getConfigKey(Constants.CONFIG_KEY_PAY_ROUTINE_APP_KEY).toString();
// path = systemConfigService.getValueByKeyException("pay_mini_client_p12");
// path = apiConfigApi.getConfigKeyException("pay_mini_client_p12");
path = apiConfigApi.getConfigKey("pay_routine_certificate_path").toString();
}
if (storeOrder.getIsChannel() == 2) {// H5, 使用公众号的
appId = apiConfigApi.getConfigKey(Constants.CONFIG_KEY_PAY_WE_CHAT_APP_ID).toString();
mchId = apiConfigApi.getConfigKey(Constants.CONFIG_KEY_PAY_WE_CHAT_MCH_ID).toString();
signKey = apiConfigApi.getConfigKey(Constants.CONFIG_KEY_PAY_WE_CHAT_APP_KEY).toString();
// path = systemConfigService.getValueByKeyException("pay_mini_client_p12");
// path = apiConfigApi.getConfigKeyException("pay_mini_client_p12");
path = apiConfigApi.getConfigKey("pay_weixin_certificate_path").toString();
}