Commit d878d909 by Jony.L

Merge remote-tracking branch 'origin/develop' into trade

parents d149b710 e5c7911d
...@@ -27,6 +27,17 @@ public class ProductSkuRespVO { ...@@ -27,6 +27,17 @@ public class ProductSkuRespVO {
@Schema(description = "图片地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/xx.png") @Schema(description = "图片地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/xx.png")
private String picUrl; private String picUrl;
@Schema(description = "费用描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "元/年")
private String feeInfo;
@Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED, example = "365")
private Integer expDuration;
@Schema(description = "库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "365")
private Integer stock;
@Schema(description = "属性数组") @Schema(description = "属性数组")
private List<ProductSkuSaveReqVO.Property> properties; private List<ProductSkuSaveReqVO.Property> properties;
......
...@@ -82,10 +82,10 @@ public class ProductSpuRespVO { ...@@ -82,10 +82,10 @@ public class ProductSpuRespVO {
@Schema(description = "成本价,单位使用:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "19") @Schema(description = "成本价,单位使用:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "19")
@ExcelProperty(value = "成本价", converter = MoneyConvert.class) @ExcelProperty(value = "成本价", converter = MoneyConvert.class)
private Integer costPrice; private Integer costPrice;
/*
@Schema(description = "商品库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "10000") @Schema(description = "商品库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "10000")
@ExcelProperty("库存") @ExcelProperty("库存")
private Integer stock; private Integer stock;*/
@Schema(description = "SKU 数组") @Schema(description = "SKU 数组")
private List<ProductSkuRespVO> skus; private List<ProductSkuRespVO> skus;
......
...@@ -60,7 +60,7 @@ public class ProductSpuSaveReqVO { ...@@ -60,7 +60,7 @@ public class ProductSpuSaveReqVO {
// ========== 物流相关字段 ========= // ========== 物流相关字段 =========
@Schema(description = "配送方式数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @Schema(description = "配送方式数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotEmpty(message = "配送方式不能为空") //@NotEmpty(message = "配送方式不能为空")
private List<Integer> deliveryTypes; private List<Integer> deliveryTypes;
@Schema(description = "物流配置模板编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "111") @Schema(description = "物流配置模板编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "111")
......
...@@ -61,6 +61,7 @@ public class AppCategoryController { ...@@ -61,6 +61,7 @@ public class AppCategoryController {
@GetMapping("/list-computility") @GetMapping("/list-computility")
@Operation(summary = "获取计算资源分类列表") @Operation(summary = "获取计算资源分类列表")
@PermitAll
public CommonResult<List<AppCategoryRespVO>> getComputilityCategoryList() { public CommonResult<List<AppCategoryRespVO>> getComputilityCategoryList() {
Long parentId = Long.parseLong(configApi.getConfigValueByKey(COMPUTILITY_CATEGORY)); Long parentId = Long.parseLong(configApi.getConfigValueByKey(COMPUTILITY_CATEGORY));
List<ProductCategoryDO> list = categoryService.getProductCategoryListByParentId(parentId); List<ProductCategoryDO> list = categoryService.getProductCategoryListByParentId(parentId);
......
...@@ -95,6 +95,22 @@ public class ProductSkuDO extends BaseDO { ...@@ -95,6 +95,22 @@ public class ProductSkuDO extends BaseDO {
private Integer salesCount; private Integer salesCount;
/** /**
* 费用描述 如 元/年、/卡时
*/
private String feeInfo;
/**
* 有效时长 单位:天
*/
private Integer expDuration;
/**
* 鉴权信息
*/
private String auth;
/**
* 商品属性 * 商品属性
*/ */
@Data @Data
......
...@@ -5,6 +5,7 @@ import com.luhu.computility.framework.common.pojo.CommonResult; ...@@ -5,6 +5,7 @@ import com.luhu.computility.framework.common.pojo.CommonResult;
import com.luhu.computility.framework.common.pojo.PageResult; import com.luhu.computility.framework.common.pojo.PageResult;
import com.luhu.computility.module.member.api.user.MemberUserApi; import com.luhu.computility.module.member.api.user.MemberUserApi;
import com.luhu.computility.module.member.api.user.dto.MemberUserRespDTO; import com.luhu.computility.module.member.api.user.dto.MemberUserRespDTO;
import com.luhu.computility.module.pay.api.notify.dto.PayOrderNotifyReqDTO;
import com.luhu.computility.module.trade.controller.admin.order.vo.*; import com.luhu.computility.module.trade.controller.admin.order.vo.*;
import com.luhu.computility.module.trade.convert.order.TradeOrderConvert; import com.luhu.computility.module.trade.convert.order.TradeOrderConvert;
import com.luhu.computility.module.trade.dal.dataobject.order.TradeOrderDO; import com.luhu.computility.module.trade.dal.dataobject.order.TradeOrderDO;
...@@ -22,6 +23,7 @@ import org.springframework.validation.annotation.Validated; ...@@ -22,6 +23,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.annotation.security.PermitAll;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
...@@ -166,4 +168,16 @@ public class TradeOrderController { ...@@ -166,4 +168,16 @@ public class TradeOrderController {
return success(TradeOrderConvert.INSTANCE.convert2(tradeOrder, null)); return success(TradeOrderConvert.INSTANCE.convert2(tradeOrder, null));
} }
/**
* 内部支付任务回调
*/
@PostMapping("/update-paid")
@PermitAll
public CommonResult<Boolean> updateOrderPaid(@RequestBody PayOrderNotifyReqDTO notifyReqDTO) {
tradeOrderUpdateService.updateOrderPaid(Long.valueOf(notifyReqDTO.getMerchantOrderId()),
notifyReqDTO.getPayOrderId());
log.error("内部支付任务回调 ");
return success(true);
}
} }
...@@ -13,7 +13,7 @@ public class AppTradeOrderCreateReqVO extends AppTradeOrderSettlementReqVO { ...@@ -13,7 +13,7 @@ public class AppTradeOrderCreateReqVO extends AppTradeOrderSettlementReqVO {
@Schema(description = "备注", example = "这个是我的订单哟") @Schema(description = "备注", example = "这个是我的订单哟")
private String remark; private String remark;
@AssertTrue(message = "配送方式不能为空") //@AssertTrue(message = "配送方式不能为空")
@JsonIgnore @JsonIgnore
public boolean isDeliveryTypeNotNull() { public boolean isDeliveryTypeNotNull() {
return getDeliveryType() != null; return getDeliveryType() != null;
......
...@@ -28,7 +28,7 @@ public class AppTradeOrderSettlementReqVO { ...@@ -28,7 +28,7 @@ public class AppTradeOrderSettlementReqVO {
private Long couponId; private Long couponId;
@Schema(description = "是否使用积分", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") @Schema(description = "是否使用积分", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
@NotNull(message = "是否使用积分不能为空") //@NotNull(message = "是否使用积分不能为空")
private Boolean pointStatus; private Boolean pointStatus;
// ========== 配送相关相关字段 ========== // ========== 配送相关相关字段 ==========
......
...@@ -4,6 +4,7 @@ import com.luhu.computility.module.trade.controller.app.base.property.AppProduct ...@@ -4,6 +4,7 @@ import com.luhu.computility.module.trade.controller.app.base.property.AppProduct
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.time.LocalDateTime;
import java.util.List; import java.util.List;
@Schema(description = "用户 App - 订单交易项 Response VO") @Schema(description = "用户 App - 订单交易项 Response VO")
...@@ -48,7 +49,6 @@ public class AppTradeOrderItemRespVO { ...@@ -48,7 +49,6 @@ public class AppTradeOrderItemRespVO {
// ========== 营销基本信息 ========== // ========== 营销基本信息 ==========
// TODO 芋艿:在捉摸一下
// ========== 售后基本信息 ========== // ========== 售后基本信息 ==========
...@@ -58,4 +58,8 @@ public class AppTradeOrderItemRespVO { ...@@ -58,4 +58,8 @@ public class AppTradeOrderItemRespVO {
@Schema(description = "售后状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @Schema(description = "售后状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer afterSaleStatus; private Integer afterSaleStatus;
@Schema(description = "到期时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
private LocalDateTime expTime;
} }
package com.luhu.computility.module.trade.dal.dataobject.order; package com.luhu.computility.module.trade.dal.dataobject.order;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.luhu.computility.framework.mybatis.core.dataobject.BaseDO; import com.luhu.computility.framework.mybatis.core.dataobject.BaseDO;
import com.luhu.computility.module.trade.dal.dataobject.aftersale.AfterSaleDO; import com.luhu.computility.module.trade.dal.dataobject.aftersale.AfterSaleDO;
import com.luhu.computility.module.trade.dal.dataobject.cart.CartDO; import com.luhu.computility.module.trade.dal.dataobject.cart.CartDO;
...@@ -13,6 +14,7 @@ import lombok.EqualsAndHashCode; ...@@ -13,6 +14,7 @@ import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List; import java.util.List;
/** /**
...@@ -131,6 +133,12 @@ public class TradeOrderItemDO extends BaseDO { ...@@ -131,6 +133,12 @@ public class TradeOrderItemDO extends BaseDO {
*/ */
private Integer payPrice; private Integer payPrice;
/**
* 有效时间
*/
@TableField(fill = FieldFill.INSERT)
private LocalDateTime expTime;
// ========== 营销基本信息 ========== // ========== 营销基本信息 ==========
/** /**
......
...@@ -33,7 +33,7 @@ public class TradePriceCalculateReqBO { ...@@ -33,7 +33,7 @@ public class TradePriceCalculateReqBO {
/** /**
* 是否使用积分 * 是否使用积分
*/ */
@NotNull(message = "是否使用积分不能为空") //@NotNull(message = "是否使用积分不能为空")
private Boolean pointStatus; private Boolean pointStatus;
/** /**
......
...@@ -248,12 +248,15 @@ public class PayNotifyServiceImpl implements PayNotifyService { ...@@ -248,12 +248,15 @@ public class PayNotifyServiceImpl implements PayNotifyService {
// 拼接 header 参数 // 拼接 header 参数
Map<String, String> headers = new HashMap<>(); Map<String, String> headers = new HashMap<>();
TenantUtils.addTenantHeader(headers, task.getTenantId()); TenantUtils.addTenantHeader(headers, task.getTenantId());
log.error("请求参数--------------------------------------------" + JsonUtils.toJsonString(request));
// 发起请求 // 发起请求
log.error("发起请求--------------------------------------------");
try (HttpResponse response = HttpUtil.createPost(task.getNotifyUrl()) try (HttpResponse response = HttpUtil.createPost(task.getNotifyUrl())
.body(JsonUtils.toJsonString(request)).addHeaders(headers) .body(JsonUtils.toJsonString(request)).addHeaders(headers)
.timeout((int) NOTIFY_TIMEOUT_MILLIS).execute()) { .timeout((int) NOTIFY_TIMEOUT_MILLIS).execute()) {
// 解析结果 // 解析结果
log.error("解析结果--------------------------------------------" +response.body());
return JsonUtils.parseObject(response.body(), CommonResult.class); return JsonUtils.parseObject(response.body(), CommonResult.class);
} }
} }
......
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 sign in to comment