Commit 3ab6e756 authored by shengnan hu's avatar shengnan hu
Browse files

init

parents
Pipeline #294 passed with stage
in 2 minutes and 13 seconds
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>mall4cloud-api</artifactId>
<groupId>com.mall4j.cloud</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>mall4cloud-api-multishop</artifactId>
<packaging>jar</packaging>
<description>店铺对内接口</description>
<dependencies>
<dependency>
<groupId>com.mall4j.cloud</groupId>
<artifactId>mall4cloud-common-core</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
package com.mall4j.cloud.api.multishop.bo;
import com.mall4j.cloud.common.vo.BaseVO;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* 店铺详情VO
*
* @author FrozenWatermelon
* @date 2020-11-23 16:24:29
*/
public class EsShopDetailBO extends BaseVO{
private static final long serialVersionUID = 1L;
@Schema(description = "店铺id" )
private Long shopId;
@Schema(description = "店铺类型1自营店 2普通店" )
private Integer type;
@Schema(description = "店铺名称" )
private String shopName;
@Schema(description = "店铺logo" )
private String shopLogo;
@Schema(description = "店铺状态(-1:未开通 0: 停业中 1:营业中)" )
private Integer shopStatus;
public Long getShopId() {
return shopId;
}
public void setShopId(Long shopId) {
this.shopId = shopId;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public String getShopName() {
return shopName;
}
public void setShopName(String shopName) {
this.shopName = shopName;
}
public String getShopLogo() {
return shopLogo;
}
public void setShopLogo(String shopLogo) {
this.shopLogo = shopLogo;
}
public Integer getShopStatus() {
return shopStatus;
}
public void setShopStatus(Integer shopStatus) {
this.shopStatus = shopStatus;
}
@Override
public String toString() {
return "EsShopDetailBO{" +
"shopId=" + shopId +
", type=" + type +
", shopName='" + shopName + '\'' +
", shopLogo='" + shopLogo + '\'' +
", shopStatus=" + shopStatus +
'}';
}
}
package com.mall4j.cloud.api.multishop.feign;
import com.mall4j.cloud.common.feign.FeignInsideAuthConfig;
import com.mall4j.cloud.common.response.ServerResponseEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
* @Author lth
* @Date 2021/7/8 11:10
*/
@FeignClient(value = "mall4cloud-multishop",contextId = "indexImg")
public interface IndexImgFeignClient {
/**
* 根据商品d删除轮播图信息
* @param spuId 商品id
* @param shopId 店鋪id
* @return void
*/
@GetMapping(value = FeignInsideAuthConfig.FEIGN_INSIDE_URL_PREFIX + "/insider/indexImg/deleteBySpuId")
ServerResponseEntity<Void> deleteBySpuId(@RequestParam("spuId") Long spuId, @RequestParam("shopId") Long shopId);
}
package com.mall4j.cloud.api.multishop.feign;
import com.mall4j.cloud.api.multishop.bo.EsShopDetailBO;
import com.mall4j.cloud.api.multishop.vo.ShopDetailVO;
import com.mall4j.cloud.common.feign.FeignInsideAuthConfig;
import com.mall4j.cloud.common.response.ServerResponseEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
* @author FrozenWatermelon
* @date 2020/11/23
*/
@FeignClient(value = "mall4cloud-multishop",contextId = "shopDetail")
public interface ShopDetailFeignClient {
/**
* 根据店铺id获取店铺名称
* @param shopId 店铺id
* @return 店铺名称
*/
@GetMapping(value = FeignInsideAuthConfig.FEIGN_INSIDE_URL_PREFIX + "/insider/shopDetail/getShopNameByShopId")
ServerResponseEntity<String> getShopNameByShopId(@RequestParam("shopId") Long shopId);
/**
* 根据店铺id获取店铺信息
* @param shopId 店铺id
* @return 店铺信息
*/
@GetMapping(value = FeignInsideAuthConfig.FEIGN_INSIDE_URL_PREFIX + "/insider/shopDetail/getShopByShopId")
ServerResponseEntity<EsShopDetailBO> getShopByShopId(@RequestParam("shopId") Long shopId);
/**
* 根据店铺id列表, 获取店铺列表信息
* @param shopIds 店铺id列表
* @return 店铺列表信息
*/
@GetMapping(value = FeignInsideAuthConfig.FEIGN_INSIDE_URL_PREFIX + "/insider/shopDetail/listByShopIds")
ServerResponseEntity<List<ShopDetailVO>> listByShopIds(@RequestParam("shopIds") List<Long> shopIds);
/**
* 获取店铺信息及扩展信息
* @param shopId 店铺id
* @return 店铺信息及扩展信息
*/
@GetMapping(value = FeignInsideAuthConfig.FEIGN_INSIDE_URL_PREFIX + "/insider/shopDetail/getShopExtension")
ServerResponseEntity<EsShopDetailBO> shopExtensionData(@RequestParam("shopId") Long shopId);
/**
* 获取店铺信息及扩展信息
* @param shopIds 店铺ids
* @param shopName 店铺名称
* @return 店铺信息列表
*/
@GetMapping(value = FeignInsideAuthConfig.FEIGN_INSIDE_URL_PREFIX + "/insider/shopDetail/getShopDetailByShopIdAndShopName")
ServerResponseEntity<List<ShopDetailVO>> getShopDetailByShopIdAndShopName(@RequestParam("shopIds") List<Long> shopIds,
@RequestParam(value = "shopName",defaultValue = "") String shopName);
}
package com.mall4j.cloud.api.multishop.vo;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.mall4j.cloud.common.serializer.ImgJsonSerializer;
import com.mall4j.cloud.common.vo.BaseVO;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* 店铺详情VO
*
* @author FrozenWatermelon
* @date 2020-12-05 15:50:25
*/
public class ShopDetailVO extends BaseVO{
private static final long serialVersionUID = 1L;
@Schema(description = "店铺id" )
private Long shopId;
@Schema(description = "店铺类型1自营店 2普通店" )
private Integer type;
@Schema(description = "店铺名称" )
private String shopName;
@Schema(description = "店铺简介" )
private String intro;
@Schema(description = "店铺logo(可修改)" )
@JsonSerialize(using = ImgJsonSerializer.class)
private String shopLogo;
@Schema(description = "店铺状态(-1:已删除 0: 停业中 1:营业中)" )
private Integer shopStatus;
@Schema(description = "营业执照" )
@JsonSerialize(using = ImgJsonSerializer.class)
private String businessLicense;
@Schema(description = "身份证正面" )
@JsonSerialize(using = ImgJsonSerializer.class)
private String identityCardFront;
@Schema(description = "身份证反面" )
@JsonSerialize(using = ImgJsonSerializer.class)
private String identityCardLater;
@Schema(description = "移动端背景图" )
@JsonSerialize(using = ImgJsonSerializer.class)
private String mobileBackgroundPic;
@Schema(description = "用户名" ,requiredMode = Schema.RequiredMode.REQUIRED)
private String username;
@Schema(description = "密码" ,requiredMode = Schema.RequiredMode.REQUIRED)
private String password;
public String getMobileBackgroundPic() {
return mobileBackgroundPic;
}
public void setMobileBackgroundPic(String mobileBackgroundPic) {
this.mobileBackgroundPic = mobileBackgroundPic;
}
public Long getShopId() {
return shopId;
}
public void setShopId(Long shopId) {
this.shopId = shopId;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public String getShopName() {
return shopName;
}
public void setShopName(String shopName) {
this.shopName = shopName;
}
public String getIntro() {
return intro;
}
public void setIntro(String intro) {
this.intro = intro;
}
public String getShopLogo() {
return shopLogo;
}
public void setShopLogo(String shopLogo) {
this.shopLogo = shopLogo;
}
public Integer getShopStatus() {
return shopStatus;
}
public void setShopStatus(Integer shopStatus) {
this.shopStatus = shopStatus;
}
public String getBusinessLicense() {
return businessLicense;
}
public void setBusinessLicense(String businessLicense) {
this.businessLicense = businessLicense;
}
public String getIdentityCardFront() {
return identityCardFront;
}
public void setIdentityCardFront(String identityCardFront) {
this.identityCardFront = identityCardFront;
}
public String getIdentityCardLater() {
return identityCardLater;
}
public void setIdentityCardLater(String identityCardLater) {
this.identityCardLater = identityCardLater;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
@Override
public String toString() {
return "ShopDetailVO{" +
"shopId=" + shopId +
", type=" + type +
", shopName='" + shopName + '\'' +
", intro='" + intro + '\'' +
", shopLogo='" + shopLogo + '\'' +
", shopStatus=" + shopStatus +
", businessLicense='" + businessLicense + '\'' +
", identityCardFront='" + identityCardFront + '\'' +
", identityCardLater='" + identityCardLater + '\'' +
", mobileBackgroundPic='" + mobileBackgroundPic + '\'' +
", username='" + username + '\'' +
", password='" + password + '\'' +
'}';
}
}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>mall4cloud-api</artifactId>
<groupId>com.mall4j.cloud</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>mall4cloud-api-order</artifactId>
<packaging>jar</packaging>
<description>订单对内接口</description>
<dependencies>
<dependency>
<groupId>com.mall4j.cloud</groupId>
<artifactId>mall4cloud-common-order</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
package com.mall4j.cloud.api.order.bo;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Date;
import java.util.List;
/**
* @author FrozenWatermelon
* @date 2021/2/5
*/
public class EsOrderBO {
@Schema(description = "订单项" ,requiredMode = Schema.RequiredMode.REQUIRED)
private List<EsOrderItemBO> orderItems;
@Schema(description = "用户id" ,requiredMode = Schema.RequiredMode.REQUIRED)
private Long userId;
@Schema(description = "订单号" ,requiredMode = Schema.RequiredMode.REQUIRED)
private Long orderId;
@Schema(description = "总价" ,requiredMode = Schema.RequiredMode.REQUIRED)
private Long actualTotal;
@Schema(description = "订单状态" ,requiredMode = Schema.RequiredMode.REQUIRED)
private Integer status;
@Schema(description = "配送类型 :无需快递" ,requiredMode = Schema.RequiredMode.REQUIRED)
private Integer deliveryType;
@Schema(description = "店铺名称" ,requiredMode = Schema.RequiredMode.REQUIRED)
private String shopName;
@Schema(description = "店铺id" ,requiredMode = Schema.RequiredMode.REQUIRED)
private Long shopId;
@Schema(description = "订单创建时间" ,requiredMode = Schema.RequiredMode.REQUIRED)
private Date createTime;
@Schema(description = "商品总数" ,requiredMode = Schema.RequiredMode.REQUIRED)
private Integer allCount;
@Schema(description = "收货人姓名" )
private String consignee;
@Schema(description = "收货人手机号" )
private String mobile;
/**
* 用户订单地址Id
*/
private Long orderAddrId;
/**
* 总值
*/
private Long total;
/**
* 支付方式 请参考枚举PayType
*/
private Integer payType;
/**
* 订单关闭原因 1-超时未支付 4-买家取消 15-已通过货到付款交易
*/
private Integer closeType;
/**
* 发货时间
*/
private Date updateTime;
/**
* 付款时间
*/
private Date payTime;
/**
* 发货时间
*/
private Date deliveryTime;
/**
* 完成时间
*/
private Date finallyTime;
/**
* 取消时间
*/
private Date cancelTime;
/**
* 是否已支付,1.已支付0.未支付
*/
private Integer isPayed;
/**
* 用户订单删除状态,0:没有删除, 1:回收站, 2:永久删除
*/
private Integer deleteStatus;
public Long getOrderAddrId() {
return orderAddrId;
}
public void setOrderAddrId(Long orderAddrId) {
this.orderAddrId = orderAddrId;
}
public List<EsOrderItemBO> getOrderItems() {
return orderItems;
}
public void setOrderItems(List<EsOrderItemBO> orderItems) {
this.orderItems = orderItems;
}
public Long getOrderId() {
return orderId;
}
public void setOrderId(Long orderId) {
this.orderId = orderId;
}
public Long getActualTotal() {
return actualTotal;
}
public void setActualTotal(Long actualTotal) {
this.actualTotal = actualTotal;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getDeliveryType() {
return deliveryType;
}
public void setDeliveryType(Integer deliveryType) {
this.deliveryType = deliveryType;
}
public String getShopName() {
return shopName;
}
public void setShopName(String shopName) {
this.shopName = shopName;
}
public Long getShopId() {
return shopId;
}
public void setShopId(Long shopId) {
this.shopId = shopId;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Integer getAllCount() {
return allCount;
}
public void setAllCount(Integer allCount) {
this.allCount = allCount;
}
public String getConsignee() {
return consignee;
}
public void setConsignee(String consignee) {
this.consignee = consignee;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Long getTotal() {
return total;
}
public void setTotal(Long total) {
this.total = total;
}
public Integer getPayType() {
return payType;
}
public void setPayType(Integer payType) {
this.payType = payType;
}
public Integer getCloseType() {
return closeType;
}
public void setCloseType(Integer closeType) {
this.closeType = closeType;
}
public Date getPayTime() {
return payTime;
}
public void setPayTime(Date payTime) {
this.payTime = payTime;
}
public Date getDeliveryTime() {
return deliveryTime;
}
public void setDeliveryTime(Date deliveryTime) {
this.deliveryTime = deliveryTime;
}
public Date getFinallyTime() {
return finallyTime;
}
public void setFinallyTime(Date finallyTime) {
this.finallyTime = finallyTime;
}
public Date getCancelTime() {
return cancelTime;
}
public void setCancelTime(Date cancelTime) {
this.cancelTime = cancelTime;
}
public Integer getIsPayed() {
return isPayed;
}
public void setIsPayed(Integer isPayed) {
this.isPayed = isPayed;
}
public Integer getDeleteStatus() {
return deleteStatus;
}
public void setDeleteStatus(Integer deleteStatus) {
this.deleteStatus = deleteStatus;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
@Override
public String toString() {
return "EsOrderBO{" +
"orderItems=" + orderItems +
", userId=" + userId +
", orderId=" + orderId +
", actualTotal=" + actualTotal +
", status=" + status +
", deliveryType=" + deliveryType +
", shopName='" + shopName + '\'' +
", shopId=" + shopId +
", createTime=" + createTime +
", allCount=" + allCount +
", consignee='" + consignee + '\'' +
", mobile='" + mobile + '\'' +
", orderAddrId=" + orderAddrId +
", total=" + total +
", payType=" + payType +
", closeType=" + closeType +
", updateTime=" + updateTime +
", payTime=" + payTime +
", deliveryTime=" + deliveryTime +
", finallyTime=" + finallyTime +
", cancelTime=" + cancelTime +
", isPayed=" + isPayed +
", deleteStatus=" + deleteStatus +
'}';
}
}
package com.mall4j.cloud.api.order.bo;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Date;
/**
* @author FrozenWatermelon
* @date 2021/2/5
*/
public class EsOrderItemBO {
@Schema(description = "商品图片" , requiredMode = Schema.RequiredMode.REQUIRED)
private String pic;
@Schema(description = "商品名称" , requiredMode = Schema.RequiredMode.REQUIRED)
private String spuName;
@Schema(description = "商品数量" , requiredMode = Schema.RequiredMode.REQUIRED)
private Integer count;
@Schema(description = "商品价格" , requiredMode = Schema.RequiredMode.REQUIRED)
private Long price;
@Schema(description = "skuId" , requiredMode = Schema.RequiredMode.REQUIRED)
private Long skuId;
@Schema(description = "skuName" , requiredMode = Schema.RequiredMode.REQUIRED)
private String skuName;
@Schema(description = "订单项id" , requiredMode = Schema.RequiredMode.REQUIRED)
private Long orderItemId;
@Schema(description = "商品id" , requiredMode = Schema.RequiredMode.REQUIRED)
private Long spuId;
/**
* 店铺id
*/
private Long shopId;
/**
* 用户Id
*/
private Long userId;
/**
* 单个orderItem的配送类型 :无需快递
*/
private Integer deliveryType;
/**
* 加入购物车时间
*/
private Date shopCartTime;
/**
* 商品总金额
*/
private Long spuTotalAmount;
public String getPic() {
return pic;
}
public void setPic(String pic) {
this.pic = pic;
}
public String getSpuName() {
return spuName;
}
public void setSpuName(String spuName) {
this.spuName = spuName;
}
public Integer getCount() {
return count;
}
public void setCount(Integer count) {
this.count = count;
}
public Long getPrice() {
return price;
}
public void setPrice(Long price) {
this.price = price;
}
public Long getSkuId() {
return skuId;
}
public void setSkuId(Long skuId) {
this.skuId = skuId;
}
public String getSkuName() {
return skuName;
}
public void setSkuName(String skuName) {
this.skuName = skuName;
}
public Long getOrderItemId() {
return orderItemId;
}
public void setOrderItemId(Long orderItemId) {
this.orderItemId = orderItemId;
}
public Long getSpuId() {
return spuId;
}
public void setSpuId(Long spuId) {
this.spuId = spuId;
}
public Long getShopId() {
return shopId;
}
public void setShopId(Long shopId) {
this.shopId = shopId;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Integer getDeliveryType() {
return deliveryType;
}
public void setDeliveryType(Integer deliveryType) {
this.deliveryType = deliveryType;
}
public Date getShopCartTime() {
return shopCartTime;
}
public void setShopCartTime(Date shopCartTime) {
this.shopCartTime = shopCartTime;
}
public Long getSpuTotalAmount() {
return spuTotalAmount;
}
public void setSpuTotalAmount(Long spuTotalAmount) {
this.spuTotalAmount = spuTotalAmount;
}
@Override
public String toString() {
return "EsOrderItemBO{" +
"pic='" + pic + '\'' +
", spuName='" + spuName + '\'' +
", count=" + count +
", price=" + price +
", skuId=" + skuId +
", skuName='" + skuName + '\'' +
", orderItemId=" + orderItemId +
", spuId=" + spuId +
", shopId=" + shopId +
", userId=" + userId +
", deliveryType=" + deliveryType +
", shopCartTime=" + shopCartTime +
", spuTotalAmount=" + spuTotalAmount +
'}';
}
}
package com.mall4j.cloud.api.order.bo;
/**
* @author FrozenWatermelon
* @date 2020/12/30
*/
public class OrderSimpleAmountInfoBO {
private Long orderId;
private Long shopId;
/**
* 实际总值
*/
private Long actualTotal;
/**
* 订单状态
*/
private Integer status;
/**
* 订单关闭原因
*/
private Integer closeType;
public Long getOrderId() {
return orderId;
}
public void setOrderId(Long orderId) {
this.orderId = orderId;
}
public Long getShopId() {
return shopId;
}
public void setShopId(Long shopId) {
this.shopId = shopId;
}
public Long getActualTotal() {
return actualTotal;
}
public void setActualTotal(Long actualTotal) {
this.actualTotal = actualTotal;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getCloseType() {
return closeType;
}
public void setCloseType(Integer closeType) {
this.closeType = closeType;
}
@Override
public String toString() {
return "OrderSimpleAmountInfoBO{" +
"orderId=" + orderId +
", shopId=" + shopId +
", actualTotal=" + actualTotal +
", status=" + status +
", closeType=" + closeType +
'}';
}
}
package com.mall4j.cloud.api.order.bo;
/**
* @author FrozenWatermelon
* @date 2020/12/30
*/
public class OrderStatusBO {
private Long orderId;
private Integer status;
public Long getOrderId() {
return orderId;
}
public void setOrderId(Long orderId) {
this.orderId = orderId;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
@Override
public String toString() {
return "OrderStatusBO{" +
"orderId=" + orderId +
", status=" + status +
'}';
}
}
package com.mall4j.cloud.api.order.constant;
/**
* 配送类型
* @author FrozenWatermelon
*/
public enum DeliveryType {
/**
* 无需快递
*/
NOT_DELIVERY(3);
private final Integer num;
public Integer value() {
return num;
}
DeliveryType(Integer num) {
this.num = num;
}
public static DeliveryType instance(Integer value) {
DeliveryType[] enums = values();
for (DeliveryType statusEnum : enums) {
if (statusEnum.value().equals(value)) {
return statusEnum;
}
}
return null;
}
}
package com.mall4j.cloud.api.order.constant;
/**
* 订单状态
* @author FrozenWatermelon
* @date 2020/12/18
*/
public enum OrderStatus {
/**
* 没有付款.待付款
*/
UNPAY(1),
/**
* 已经付款,但卖家没有发货.待发货
*/
PADYED(2),
/**
* 发货,导致实际库存减少,没有确认收货.待收货
*/
CONSIGNMENT(3),
/**
* 订单确认收货成功,购买数增加1.
*/
SUCCESS(5),
/**
* 交易失败,还原库存
*/
CLOSE(6);
private final Integer num;
public Integer value() {
return num;
}
OrderStatus(Integer num) {
this.num = num;
}
public static OrderStatus instance(Integer value) {
OrderStatus[] enums = values();
for (OrderStatus statusEnum : enums) {
if (statusEnum.value().equals(value)) {
return statusEnum;
}
}
return null;
}
}
package com.mall4j.cloud.api.order.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import java.util.List;
/**
* 订单快递信息DTO
*
* @author FrozenWatermelon
* @date 2020-12-07 15:10:00
*/
public class DeliveryOrderDTO{
@Schema(description = "deliveryOrderId" )
private Long deliveryOrderId;
@NotNull(message="订单号不能为空")
@Schema(description = "订单号" ,requiredMode = Schema.RequiredMode.REQUIRED)
private Long orderId;
@NotNull(message="发货方式不能为空")
@Schema(description = "发货方式" ,requiredMode = Schema.RequiredMode.REQUIRED)
private Integer deliveryType;
private List<DeliveryOrderItemDTO> selectOrderItems;
public Long getOrderId() {
return orderId;
}
public void setOrderId(Long orderId) {
this.orderId = orderId;
}
public Integer getDeliveryType() {
return deliveryType;
}
public void setDeliveryType(Integer deliveryType) {
this.deliveryType = deliveryType;
}
public List<DeliveryOrderItemDTO> getSelectOrderItems() {
return selectOrderItems;
}
public void setSelectOrderItems(List<DeliveryOrderItemDTO> selectOrderItems) {
this.selectOrderItems = selectOrderItems;
}
public Long getDeliveryOrderId() {
return deliveryOrderId;
}
public void setDeliveryOrderId(Long deliveryOrderId) {
this.deliveryOrderId = deliveryOrderId;
}
@Override
public String toString() {
return "DeliveryOrderDTO{" +
"deliveryOrderId='" + deliveryOrderId + '\'' +
"orderNumber='" + orderId + '\'' +
", deliveryType=" + deliveryType +
", selectOrderItems=" + selectOrderItems +
'}';
}
}
package com.mall4j.cloud.api.order.dto;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* 物流订单项信息DTO
*
* @author FrozenWatermelon
* @date 2020-12-07 15:10:00
*/
public class DeliveryOrderItemDTO{
@Schema(description = "id" )
private Long orderItemId;
@Schema(description = "商品图片" )
private String pic;
@Schema(description = "商品名称" )
private String spuName;
@Schema(description = "发货改变的数量" )
private Integer changeNum;
public Long getOrderItemId() {
return orderItemId;
}
public void setOrderItemId(Long orderItemId) {
this.orderItemId = orderItemId;
}
public String getPic() {
return pic;
}
public void setPic(String pic) {
this.pic = pic;
}
public String getSpuName() {
return spuName;
}
public void setSpuName(String spuName) {
this.spuName = spuName;
}
public Integer getChangeNum() {
return changeNum;
}
public void setChangeNum(Integer changeNum) {
this.changeNum = changeNum;
}
@Override
public String toString() {
return "DeliveryOrderItemDTO{" +
"orderItemId=" + orderItemId +
", pic='" + pic + '\'' +
", spuName='" + spuName + '\'' +
", changeNum=" + changeNum +
'}';
}
}
package com.mall4j.cloud.api.order.feign;
import com.mall4j.cloud.api.order.bo.EsOrderBO;
import com.mall4j.cloud.api.order.bo.OrderStatusBO;
import com.mall4j.cloud.api.order.bo.OrderSimpleAmountInfoBO;
import com.mall4j.cloud.api.order.vo.OrderAmountVO;
import com.mall4j.cloud.common.feign.FeignInsideAuthConfig;
import com.mall4j.cloud.common.response.ServerResponseEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
* @author FrozenWatermelon
* @date 2020/11/23
*/
@FeignClient(value = "mall4cloud-order",contextId = "order")
public interface OrderFeignClient {
/**
* 如果订单没有被取消的话,获取订单金额,否之会获取失败
*
* @param orderIds 订单id列表
* @return 订单金额
*/
@GetMapping(value = FeignInsideAuthConfig.FEIGN_INSIDE_URL_PREFIX + "/insider/ordgetOrdersAmountAndIfNoCanceler")
ServerResponseEntity<OrderAmountVO> getOrdersAmountAndIfNoCancel(@RequestParam("orderIds") List<Long> orderIds);
/**
* 获取订单状态,如果订单状态不存在,则说明订单没有创建
*
* @param orderIds 订单id列表
* @return 订单状态
*/
@GetMapping(value = FeignInsideAuthConfig.FEIGN_INSIDE_URL_PREFIX + "/insider/getOrdersStatus")
ServerResponseEntity<List<OrderStatusBO>> getOrdersStatus(@RequestParam("orderIds") List<Long> orderIds);
/**
* 获取订单中的金额信息
*
* @param orderIds 订单id列表
* @return 订单中的金额信息
*/
@GetMapping(value = FeignInsideAuthConfig.FEIGN_INSIDE_URL_PREFIX + "/insider/getOrdersSimpleAmountInfo")
ServerResponseEntity<List<OrderSimpleAmountInfoBO>> getOrdersSimpleAmountInfo(@RequestParam("orderIds") List<Long> orderIds);
/**
* 获取订单需要保存到es中的数据
*
* @param orderId 订单id
* @return es中的数据
*/
@GetMapping(value = FeignInsideAuthConfig.FEIGN_INSIDE_URL_PREFIX + "/insider/getEsOrder")
ServerResponseEntity<EsOrderBO> getEsOrder(@RequestParam("orderId")Long orderId);
/**
* 支付时更新订单状态
* @param orderIds 订单id列表
* @return null
*/
@GetMapping(value = FeignInsideAuthConfig.FEIGN_INSIDE_URL_PREFIX + "/insider/updateOrderState")
ServerResponseEntity<Void> updateOrderState(@RequestParam("orderIds") List<Long> orderIds);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment