✨ MALL-TRADE:同步 jdk21 boot 最新代码
This commit is contained in:
parent
b71180ef47
commit
aab2375ff2
@ -30,7 +30,7 @@ public class DiscountActivityRespVO extends DiscountActivityBaseVO {
|
|||||||
private Long spuId;
|
private Long spuId;
|
||||||
|
|
||||||
@Schema(description = "限时折扣商品", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "限时折扣商品", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
private List<Product> products;
|
private List<DiscountActivityBaseVO.Product> products;
|
||||||
|
|
||||||
// ========== 商品字段 ==========
|
// ========== 商品字段 ==========
|
||||||
|
|
||||||
|
@ -25,6 +25,6 @@ public class DiscountActivityUpdateReqVO extends DiscountActivityBaseVO {
|
|||||||
*/
|
*/
|
||||||
@NotEmpty(message = "商品列表不能为空")
|
@NotEmpty(message = "商品列表不能为空")
|
||||||
@Valid
|
@Valid
|
||||||
private List<Product> products;
|
private List<DiscountActivityCreateReqVO.Product> products;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ DELETE FROM "promotion_discount_activity";
|
|||||||
DELETE FROM "promotion_discount_product";
|
DELETE FROM "promotion_discount_product";
|
||||||
DELETE FROM "promotion_seckill_config";
|
DELETE FROM "promotion_seckill_config";
|
||||||
DELETE FROM "promotion_combination_activity";
|
DELETE FROM "promotion_combination_activity";
|
||||||
DELETE
|
DELETE FROM "promotion_article_category";
|
||||||
FROM "promotion_article_category";
|
DELETE FROM "promotion_article";
|
||||||
DELETE
|
DELETE FROM "promotion_diy_template";
|
||||||
FROM "promotion_article";
|
DELETE FROM "promotion_diy_page";
|
@ -112,7 +112,6 @@ CREATE TABLE IF NOT EXISTS "promotion_discount_activity"
|
|||||||
PRIMARY KEY ("id")
|
PRIMARY KEY ("id")
|
||||||
) COMMENT '限时折扣活动';
|
) COMMENT '限时折扣活动';
|
||||||
|
|
||||||
-- 将该建表 SQL 语句,添加到 yudao-module-promotion-biz 模块的 test/resources/sql/create_tables.sql 文件里
|
|
||||||
CREATE TABLE IF NOT EXISTS "promotion_seckill_activity"
|
CREATE TABLE IF NOT EXISTS "promotion_seckill_activity"
|
||||||
(
|
(
|
||||||
"id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
|
"id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
|
||||||
@ -220,4 +219,38 @@ CREATE TABLE IF NOT EXISTS "promotion_article"
|
|||||||
"deleted" bit NOT NULL DEFAULT FALSE,
|
"deleted" bit NOT NULL DEFAULT FALSE,
|
||||||
"tenant_id" bigint NOT NULL,
|
"tenant_id" bigint NOT NULL,
|
||||||
PRIMARY KEY ("id")
|
PRIMARY KEY ("id")
|
||||||
) COMMENT '文章管理表';
|
) COMMENT '文章管理表';
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS "promotion_diy_template"
|
||||||
|
(
|
||||||
|
"id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
|
||||||
|
"name" varchar NOT NULL,
|
||||||
|
"used" bit NOT NULL,
|
||||||
|
"used_time" varchar,
|
||||||
|
"remark" varchar,
|
||||||
|
"preview_pic_urls" varchar,
|
||||||
|
"property" varchar NOT NULL,
|
||||||
|
"creator" varchar DEFAULT '',
|
||||||
|
"create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
"updater" varchar DEFAULT '',
|
||||||
|
"update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
"deleted" bit NOT NULL DEFAULT FALSE,
|
||||||
|
"tenant_id" bigint NOT NULL DEFAULT 0,
|
||||||
|
PRIMARY KEY ("id")
|
||||||
|
) COMMENT '装修模板';
|
||||||
|
CREATE TABLE IF NOT EXISTS "promotion_diy_page"
|
||||||
|
(
|
||||||
|
"id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
|
||||||
|
"template_id" bigint NOT NULL,
|
||||||
|
"name" varchar NOT NULL,
|
||||||
|
"remark" varchar,
|
||||||
|
"preview_pic_urls" varchar,
|
||||||
|
"property" varchar,
|
||||||
|
"creator" varchar DEFAULT '',
|
||||||
|
"create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
"updater" varchar DEFAULT '',
|
||||||
|
"update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
"deleted" bit NOT NULL DEFAULT FALSE,
|
||||||
|
"tenant_id" bigint NOT NULL,
|
||||||
|
PRIMARY KEY ("id")
|
||||||
|
) COMMENT '装修页面';
|
@ -14,26 +14,21 @@ public class AfterSaleLogRespVO {
|
|||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "22634")
|
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "22634")
|
||||||
@NotNull(message = "用户编号不能为空")
|
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
@Schema(description = "用户类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
@Schema(description = "用户类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||||
@NotNull(message = "用户类型不能为空")
|
|
||||||
private Integer userType;
|
private Integer userType;
|
||||||
|
|
||||||
@Schema(description = "售后编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3023")
|
@Schema(description = "售后编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3023")
|
||||||
@NotNull(message = "售后编号不能为空")
|
|
||||||
private Long afterSaleId;
|
private Long afterSaleId;
|
||||||
|
|
||||||
@Schema(description = "售后状态(之前)", example = "2")
|
@Schema(description = "售后状态(之前)", example = "2")
|
||||||
private Integer beforeStatus;
|
private Integer beforeStatus;
|
||||||
|
|
||||||
@Schema(description = "售后状态(之后)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@Schema(description = "售后状态(之后)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
@NotNull(message = "售后状态(之后)不能为空")
|
|
||||||
private Integer afterStatus;
|
private Integer afterStatus;
|
||||||
|
|
||||||
@Schema(description = "操作明细", requiredMode = Schema.RequiredMode.REQUIRED, example = "维权完成,退款金额:¥37776.00")
|
@Schema(description = "操作明细", requiredMode = Schema.RequiredMode.REQUIRED, example = "维权完成,退款金额:¥37776.00")
|
||||||
@NotNull(message = "操作明细不能为空")
|
|
||||||
private String content;
|
private String content;
|
||||||
|
|
||||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ -87,10 +87,6 @@ public class TradeConfigBaseVO {
|
|||||||
@PositiveOrZero(message = "用户提现手续费百分比不能是负数")
|
@PositiveOrZero(message = "用户提现手续费百分比不能是负数")
|
||||||
private Integer brokerageWithdrawFeePercent;
|
private Integer brokerageWithdrawFeePercent;
|
||||||
|
|
||||||
@Schema(description = "提现银行", requiredMode = Schema.RequiredMode.REQUIRED, example = "[0, 1]")
|
|
||||||
@NotEmpty(message = "提现银行不能为空")
|
|
||||||
private List<Integer> brokerageBankNames;
|
|
||||||
|
|
||||||
@Schema(description = "佣金冻结时间(天)", requiredMode = Schema.RequiredMode.REQUIRED, example = "7")
|
@Schema(description = "佣金冻结时间(天)", requiredMode = Schema.RequiredMode.REQUIRED, example = "7")
|
||||||
@NotNull(message = "佣金冻结时间(天)不能为空")
|
@NotNull(message = "佣金冻结时间(天)不能为空")
|
||||||
@PositiveOrZero(message = "佣金冻结时间不能是负数")
|
@PositiveOrZero(message = "佣金冻结时间不能是负数")
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
package cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup;
|
package cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup;
|
||||||
|
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 自提门店创建 Request VO")
|
@Schema(description = "管理后台 - 自提门店创建 Request VO")
|
||||||
@Data
|
@Data
|
||||||
|
@ -10,6 +10,7 @@ import cn.iocoder.yudao.module.trade.convert.order.TradeOrderConvert;
|
|||||||
import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderDO;
|
import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderDO;
|
||||||
import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderItemDO;
|
import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderItemDO;
|
||||||
import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderLogDO;
|
import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderLogDO;
|
||||||
|
import cn.iocoder.yudao.module.trade.service.aftersale.AfterSaleService;
|
||||||
import cn.iocoder.yudao.module.trade.service.order.TradeOrderLogService;
|
import cn.iocoder.yudao.module.trade.service.order.TradeOrderLogService;
|
||||||
import cn.iocoder.yudao.module.trade.service.order.TradeOrderQueryService;
|
import cn.iocoder.yudao.module.trade.service.order.TradeOrderQueryService;
|
||||||
import cn.iocoder.yudao.module.trade.service.order.TradeOrderUpdateService;
|
import cn.iocoder.yudao.module.trade.service.order.TradeOrderUpdateService;
|
||||||
|
@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.trade.controller.app.aftersale;
|
|||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.module.trade.controller.admin.aftersale.vo.log.AfterSaleLogRespVO;
|
||||||
import cn.iocoder.yudao.module.trade.controller.app.aftersale.vo.AppAfterSaleCreateReqVO;
|
import cn.iocoder.yudao.module.trade.controller.app.aftersale.vo.AppAfterSaleCreateReqVO;
|
||||||
import cn.iocoder.yudao.module.trade.controller.app.aftersale.vo.AppAfterSaleDeliveryReqVO;
|
import cn.iocoder.yudao.module.trade.controller.app.aftersale.vo.AppAfterSaleDeliveryReqVO;
|
||||||
import cn.iocoder.yudao.module.trade.controller.app.aftersale.vo.AppAfterSaleRespVO;
|
import cn.iocoder.yudao.module.trade.controller.app.aftersale.vo.AppAfterSaleRespVO;
|
||||||
@ -17,6 +18,8 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
|
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||||
|
|
||||||
@ -44,12 +47,6 @@ public class AppAfterSaleController {
|
|||||||
return success(AfterSaleConvert.INSTANCE.convert(afterSaleService.getAfterSale(getLoginUserId(), id)));
|
return success(AfterSaleConvert.INSTANCE.convert(afterSaleService.getAfterSale(getLoginUserId(), id)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(value = "/get-applying-count")
|
|
||||||
@Operation(summary = "获得进行中的售后订单数量")
|
|
||||||
public CommonResult<Long> getApplyingAfterSaleCount() {
|
|
||||||
return success(afterSaleService.getApplyingAfterSaleCount(getLoginUserId()));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping(value = "/create")
|
@PostMapping(value = "/create")
|
||||||
@Operation(summary = "申请售后")
|
@Operation(summary = "申请售后")
|
||||||
public CommonResult<Long> createAfterSale(@RequestBody AppAfterSaleCreateReqVO createReqVO) {
|
public CommonResult<Long> createAfterSale(@RequestBody AppAfterSaleCreateReqVO createReqVO) {
|
||||||
|
@ -0,0 +1,42 @@
|
|||||||
|
package cn.iocoder.yudao.module.trade.controller.app.aftersale;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
|
import cn.iocoder.yudao.module.trade.controller.app.aftersale.vo.log.AppAfterSaleLogRespVO;
|
||||||
|
import cn.iocoder.yudao.module.trade.dal.dataobject.aftersale.AfterSaleLogDO;
|
||||||
|
import cn.iocoder.yudao.module.trade.service.aftersale.AfterSaleLogService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
@Tag(name = "管理后台 - 售后日志")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/trade/after-sale-log")
|
||||||
|
@Validated
|
||||||
|
@Slf4j
|
||||||
|
public class AppAfterSaleLogController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private AfterSaleLogService afterSaleLogService;
|
||||||
|
|
||||||
|
@GetMapping("/list")
|
||||||
|
@Operation(summary = "获得售后日志列表")
|
||||||
|
@Parameter(name = "afterSaleId", description = "售后编号", required = true, example = "1")
|
||||||
|
public CommonResult<List<AppAfterSaleLogRespVO>> getAfterSaleLogList(
|
||||||
|
@RequestParam("afterSaleId") Long afterSaleId) {
|
||||||
|
List<AfterSaleLogDO> logs = afterSaleLogService.getAfterSaleLogList(afterSaleId);
|
||||||
|
return success(BeanUtils.toBean(logs, AppAfterSaleLogRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -35,6 +35,12 @@ public class AppAfterSaleRespVO {
|
|||||||
@Schema(description = "补充凭证图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@Schema(description = "补充凭证图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
private List<String> applyPicUrls;
|
private List<String> applyPicUrls;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
// ========== 交易订单相关 ==========
|
// ========== 交易订单相关 ==========
|
||||||
|
|
||||||
@Schema(description = "交易订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@Schema(description = "交易订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
@ -0,0 +1,21 @@
|
|||||||
|
package cn.iocoder.yudao.module.trade.controller.app.aftersale.vo.log;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - App 交易售后日志 Response VO")
|
||||||
|
@Data
|
||||||
|
public class AppAfterSaleLogRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "20669")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "操作明细", requiredMode = Schema.RequiredMode.REQUIRED, example = "维权完成,退款金额:¥37776.00")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
}
|
@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.trade.controller.app.brokerage;
|
|||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated;
|
import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated;
|
||||||
import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.record.AppBrokerageProductPriceRespVO;
|
import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.record.AppBrokerageProductPriceRespVO;
|
||||||
import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.record.AppBrokerageRecordPageReqVO;
|
import cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.record.AppBrokerageRecordPageReqVO;
|
||||||
@ -39,7 +40,7 @@ public class AppBrokerageRecordController {
|
|||||||
public CommonResult<PageResult<AppBrokerageRecordRespVO>> getBrokerageRecordPage(@Valid AppBrokerageRecordPageReqVO pageReqVO) {
|
public CommonResult<PageResult<AppBrokerageRecordRespVO>> getBrokerageRecordPage(@Valid AppBrokerageRecordPageReqVO pageReqVO) {
|
||||||
PageResult<BrokerageRecordDO> pageResult = brokerageRecordService.getBrokerageRecordPage(
|
PageResult<BrokerageRecordDO> pageResult = brokerageRecordService.getBrokerageRecordPage(
|
||||||
BrokerageRecordConvert.INSTANCE.convert(pageReqVO, getLoginUserId()));
|
BrokerageRecordConvert.INSTANCE.convert(pageReqVO, getLoginUserId()));
|
||||||
return success(BrokerageRecordConvert.INSTANCE.convertPage02(pageResult));
|
return success(BeanUtils.toBean(pageResult, AppBrokerageRecordRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/get-product-brokerage-price")
|
@GetMapping("/get-product-brokerage-price")
|
||||||
|
@ -6,11 +6,20 @@ import cn.iocoder.yudao.module.trade.enums.brokerage.BrokerageRecordBizTypeEnum;
|
|||||||
import cn.iocoder.yudao.module.trade.enums.brokerage.BrokerageRecordStatusEnum;
|
import cn.iocoder.yudao.module.trade.enums.brokerage.BrokerageRecordStatusEnum;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
@Schema(description = "应用 App - 分销记录分页 Request VO")
|
@Schema(description = "应用 App - 分销记录分页 Request VO")
|
||||||
@Data
|
@Data
|
||||||
public class AppBrokerageRecordPageReqVO extends PageParam {
|
public class AppBrokerageRecordPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
@Schema(description = "业务类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@Schema(description = "业务类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
@InEnum(value = BrokerageRecordBizTypeEnum.class, message = "业务类型必须是 {value}")
|
@InEnum(value = BrokerageRecordBizTypeEnum.class, message = "业务类型必须是 {value}")
|
||||||
private Integer bizType;
|
private Integer bizType;
|
||||||
|
@ -12,12 +12,18 @@ public class AppBrokerageRecordRespVO {
|
|||||||
@Schema(description = "记录编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
@Schema(description = "记录编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "业务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||||
|
private String bizId;
|
||||||
|
|
||||||
@Schema(description = "分销标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "用户下单")
|
@Schema(description = "分销标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "用户下单")
|
||||||
private String title;
|
private String title;
|
||||||
|
|
||||||
@Schema(description = "分销金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000")
|
@Schema(description = "分销金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000")
|
||||||
private Integer price;
|
private Integer price;
|
||||||
|
|
||||||
|
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderDO;
|
|||||||
import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderItemDO;
|
import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderItemDO;
|
||||||
import cn.iocoder.yudao.module.trade.enums.order.TradeOrderStatusEnum;
|
import cn.iocoder.yudao.module.trade.enums.order.TradeOrderStatusEnum;
|
||||||
import cn.iocoder.yudao.module.trade.framework.order.config.TradeOrderProperties;
|
import cn.iocoder.yudao.module.trade.framework.order.config.TradeOrderProperties;
|
||||||
|
import cn.iocoder.yudao.module.trade.service.aftersale.AfterSaleService;
|
||||||
import cn.iocoder.yudao.module.trade.service.delivery.DeliveryExpressService;
|
import cn.iocoder.yudao.module.trade.service.delivery.DeliveryExpressService;
|
||||||
import cn.iocoder.yudao.module.trade.service.order.TradeOrderQueryService;
|
import cn.iocoder.yudao.module.trade.service.order.TradeOrderQueryService;
|
||||||
import cn.iocoder.yudao.module.trade.service.order.TradeOrderUpdateService;
|
import cn.iocoder.yudao.module.trade.service.order.TradeOrderUpdateService;
|
||||||
@ -20,18 +21,17 @@ import com.google.common.collect.Maps;
|
|||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import jakarta.validation.Valid;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;
|
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;
|
||||||
import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP;
|
|
||||||
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||||
|
|
||||||
@Tag(name = "用户 App - 交易订单")
|
@Tag(name = "用户 App - 交易订单")
|
||||||
@ -48,6 +48,9 @@ public class AppTradeOrderController {
|
|||||||
@Resource
|
@Resource
|
||||||
private DeliveryExpressService deliveryExpressService;
|
private DeliveryExpressService deliveryExpressService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private AfterSaleService afterSaleService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private TradeOrderProperties tradeOrderProperties;
|
private TradeOrderProperties tradeOrderProperties;
|
||||||
|
|
||||||
@ -61,9 +64,8 @@ public class AppTradeOrderController {
|
|||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建订单")
|
@Operation(summary = "创建订单")
|
||||||
@PreAuthenticated
|
@PreAuthenticated
|
||||||
public CommonResult<AppTradeOrderCreateRespVO> createOrder(@Valid @RequestBody AppTradeOrderCreateReqVO createReqVO,
|
public CommonResult<AppTradeOrderCreateRespVO> createOrder(@Valid @RequestBody AppTradeOrderCreateReqVO createReqVO) {
|
||||||
@RequestHeader Integer terminal) {
|
TradeOrderDO order = tradeOrderUpdateService.createOrder(getLoginUserId(), createReqVO);
|
||||||
TradeOrderDO order = tradeOrderUpdateService.createOrder(getLoginUserId(), getClientIP(), createReqVO, terminal);
|
|
||||||
return success(new AppTradeOrderCreateRespVO().setId(order.getId()).setPayOrderId(order.getPayOrderId()));
|
return success(new AppTradeOrderCreateRespVO().setId(order.getId()).setPayOrderId(order.getPayOrderId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,7 +99,7 @@ public class AppTradeOrderController {
|
|||||||
@GetMapping("/get-express-track-list")
|
@GetMapping("/get-express-track-list")
|
||||||
@Operation(summary = "获得交易订单的物流轨迹")
|
@Operation(summary = "获得交易订单的物流轨迹")
|
||||||
@Parameter(name = "id", description = "交易订单编号")
|
@Parameter(name = "id", description = "交易订单编号")
|
||||||
public CommonResult<List<?>> getOrderExpressTrackList(@RequestParam("id") Long id) {
|
public CommonResult<List<AppOrderExpressTrackRespDTO>> getOrderExpressTrackList(@RequestParam("id") Long id) {
|
||||||
return success(TradeOrderConvert.INSTANCE.convertList02(
|
return success(TradeOrderConvert.INSTANCE.convertList02(
|
||||||
tradeOrderQueryService.getExpressTrackList(id, getLoginUserId())));
|
tradeOrderQueryService.getExpressTrackList(id, getLoginUserId())));
|
||||||
}
|
}
|
||||||
@ -132,6 +134,8 @@ public class AppTradeOrderController {
|
|||||||
// 待评价
|
// 待评价
|
||||||
orderCount.put("uncommentedCount", tradeOrderQueryService.getOrderCount(getLoginUserId(),
|
orderCount.put("uncommentedCount", tradeOrderQueryService.getOrderCount(getLoginUserId(),
|
||||||
TradeOrderStatusEnum.COMPLETED.getStatus(), false));
|
TradeOrderStatusEnum.COMPLETED.getStatus(), false));
|
||||||
|
// 售后数量
|
||||||
|
orderCount.put("afterSaleCount", afterSaleService.getApplyingAfterSaleCount(getLoginUserId()));
|
||||||
return success(orderCount);
|
return success(orderCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package cn.iocoder.yudao.module.trade.controller.app.order.vo;
|
package cn.iocoder.yudao.module.trade.controller.app.order.vo;
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.trade.controller.app.order.vo.item.AppTradeOrderItemRespVO;
|
import cn.iocoder.yudao.module.trade.controller.app.order.vo.item.AppTradeOrderItemRespVO;
|
||||||
|
import cn.iocoder.yudao.module.trade.enums.order.TradeOrderRefundStatusEnum;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@ -20,6 +21,9 @@ public class AppTradeOrderDetailRespVO {
|
|||||||
@Schema(description = "订单流水号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1146347329394184195")
|
@Schema(description = "订单流水号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1146347329394184195")
|
||||||
private String no;
|
private String no;
|
||||||
|
|
||||||
|
@Schema(description = "订单类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
@Schema(description = "下单时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "下单时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
@ -118,6 +122,12 @@ public class AppTradeOrderDetailRespVO {
|
|||||||
|
|
||||||
// ========== 售后基本信息 ==========
|
// ========== 售后基本信息 ==========
|
||||||
|
|
||||||
|
@Schema(description = "售后状态", example = "0")
|
||||||
|
private Integer refundStatus;
|
||||||
|
|
||||||
|
@Schema(description = "退款金额,单位:分", example = "100")
|
||||||
|
private Integer refundPrice;
|
||||||
|
|
||||||
// ========== 营销基本信息 ==========
|
// ========== 营销基本信息 ==========
|
||||||
|
|
||||||
@Schema(description = "优惠劵编号", example = "1024")
|
@Schema(description = "优惠劵编号", example = "1024")
|
||||||
|
@ -70,8 +70,6 @@ public interface BrokerageRecordConvert {
|
|||||||
|
|
||||||
BrokerageRecordPageReqVO convert(AppBrokerageRecordPageReqVO pageReqVO, Long userId);
|
BrokerageRecordPageReqVO convert(AppBrokerageRecordPageReqVO pageReqVO, Long userId);
|
||||||
|
|
||||||
PageResult<AppBrokerageRecordRespVO> convertPage02(PageResult<BrokerageRecordDO> pageResult);
|
|
||||||
|
|
||||||
default PageResult<AppBrokerageUserRankByPriceRespVO> convertPage03(PageResult<AppBrokerageUserRankByPriceRespVO> pageResult, Map<Long, MemberUserRespDTO> userMap) {
|
default PageResult<AppBrokerageUserRankByPriceRespVO> convertPage03(PageResult<AppBrokerageUserRankByPriceRespVO> pageResult, Map<Long, MemberUserRespDTO> userMap) {
|
||||||
for (AppBrokerageUserRankByPriceRespVO vo : pageResult.getList()) {
|
for (AppBrokerageUserRankByPriceRespVO vo : pageResult.getList()) {
|
||||||
copyTo(userMap.get(vo.getId()), vo);
|
copyTo(userMap.get(vo.getId()), vo);
|
||||||
|
@ -69,8 +69,7 @@ public interface TradeOrderConvert {
|
|||||||
@Mapping(source = "calculateRespBO.price.vipPrice", target = "vipPrice"),
|
@Mapping(source = "calculateRespBO.price.vipPrice", target = "vipPrice"),
|
||||||
@Mapping(source = "calculateRespBO.price.payPrice", target = "payPrice")
|
@Mapping(source = "calculateRespBO.price.payPrice", target = "payPrice")
|
||||||
})
|
})
|
||||||
TradeOrderDO convert(Long userId, String userIp, AppTradeOrderCreateReqVO createReqVO,
|
TradeOrderDO convert(Long userId, AppTradeOrderCreateReqVO createReqVO, TradePriceCalculateRespBO calculateRespBO);
|
||||||
TradePriceCalculateRespBO calculateRespBO);
|
|
||||||
|
|
||||||
TradeOrderRespDTO convert(TradeOrderDO orderDO);
|
TradeOrderRespDTO convert(TradeOrderDO orderDO);
|
||||||
|
|
||||||
|
@ -103,11 +103,6 @@ public class TradeConfigDO extends BaseDO {
|
|||||||
* 用户提现手续费百分比
|
* 用户提现手续费百分比
|
||||||
*/
|
*/
|
||||||
private Integer brokerageWithdrawFeePercent;
|
private Integer brokerageWithdrawFeePercent;
|
||||||
/**
|
|
||||||
* 提现银行
|
|
||||||
*/
|
|
||||||
@TableField(typeHandler = IntegerListTypeHandler.class)
|
|
||||||
private List<Integer> brokerageBankNames;
|
|
||||||
/**
|
/**
|
||||||
* 佣金冻结时间(天)
|
* 佣金冻结时间(天)
|
||||||
*/
|
*/
|
||||||
|
@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.trade.service.aftersale;
|
|||||||
|
|
||||||
import cn.hutool.core.map.MapUtil;
|
import cn.hutool.core.map.MapUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.framework.common.util.object.ObjectUtils;
|
import cn.iocoder.yudao.framework.common.util.object.ObjectUtils;
|
||||||
@ -262,7 +263,7 @@ public class AfterSaleServiceImpl implements AfterSaleService {
|
|||||||
// 记录售后日志
|
// 记录售后日志
|
||||||
AfterSaleLogUtils.setAfterSaleInfo(afterSale.getId(), afterSale.getStatus(),
|
AfterSaleLogUtils.setAfterSaleInfo(afterSale.getId(), afterSale.getStatus(),
|
||||||
AfterSaleStatusEnum.BUYER_DELIVERY.getStatus(),
|
AfterSaleStatusEnum.BUYER_DELIVERY.getStatus(),
|
||||||
MapUtil.<String, Object>builder().put("expressName", express.getName())
|
MapUtil.<String, Object>builder().put("deliveryName", express.getName())
|
||||||
.put("logisticsNo", deliveryReqVO.getLogisticsNo()).build());
|
.put("logisticsNo", deliveryReqVO.getLogisticsNo()).build());
|
||||||
|
|
||||||
// TODO 发送售后消息
|
// TODO 发送售后消息
|
||||||
@ -368,7 +369,8 @@ public class AfterSaleServiceImpl implements AfterSaleService {
|
|||||||
@Override
|
@Override
|
||||||
public void afterCommit() {
|
public void afterCommit() {
|
||||||
// 创建退款单
|
// 创建退款单
|
||||||
PayRefundCreateReqDTO createReqDTO = AfterSaleConvert.INSTANCE.convert(userIp, afterSale, tradeOrderProperties);
|
PayRefundCreateReqDTO createReqDTO = AfterSaleConvert.INSTANCE.convert(userIp, afterSale, tradeOrderProperties)
|
||||||
|
.setReason(StrUtil.format("退款【{}】", afterSale.getSpuName()));
|
||||||
Long payRefundId = payRefundApi.createRefund(createReqDTO).getCheckedData();
|
Long payRefundId = payRefundApi.createRefund(createReqDTO).getCheckedData();
|
||||||
// 更新售后单的退款单号
|
// 更新售后单的退款单号
|
||||||
tradeAfterSaleMapper.updateById(new AfterSaleDO().setId(afterSale.getId()).setPayRefundId(payRefundId));
|
tradeAfterSaleMapper.updateById(new AfterSaleDO().setId(afterSale.getId()).setPayRefundId(payRefundId));
|
||||||
|
@ -206,7 +206,8 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询物流轨迹
|
* 查询物流轨迹
|
||||||
* 加个 spring 缓存,30 分钟;主要考虑及时性要求不高,但是每次调用需要钱;TODO @艿艿:这个时间不会搞了。。。交给你了哈哈哈
|
*
|
||||||
|
* 缓存的目的:考虑及时性要求不高,但是每次调用需要钱
|
||||||
*
|
*
|
||||||
* @param code 快递公司编码
|
* @param code 快递公司编码
|
||||||
* @param logisticsNo 发货快递单号
|
* @param logisticsNo 发货快递单号
|
||||||
@ -216,7 +217,6 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService {
|
|||||||
@Cacheable(cacheNames = RedisKeyConstants.EXPRESS_TRACK, key = "#code + '-' + #logisticsNo + '-' + #receiverMobile",
|
@Cacheable(cacheNames = RedisKeyConstants.EXPRESS_TRACK, key = "#code + '-' + #logisticsNo + '-' + #receiverMobile",
|
||||||
condition = "#result != null")
|
condition = "#result != null")
|
||||||
public List<ExpressTrackRespDTO> getExpressTrackList(String code, String logisticsNo, String receiverMobile) {
|
public List<ExpressTrackRespDTO> getExpressTrackList(String code, String logisticsNo, String receiverMobile) {
|
||||||
// 查询物流轨迹
|
|
||||||
return expressClientFactory.getDefaultExpressClient().getExpressTrackList(
|
return expressClientFactory.getDefaultExpressClient().getExpressTrackList(
|
||||||
new ExpressTrackQueryReqDTO().setExpressCode(code).setLogisticsNo(logisticsNo)
|
new ExpressTrackQueryReqDTO().setExpressCode(code).setLogisticsNo(logisticsNo)
|
||||||
.setPhone(receiverMobile));
|
.setPhone(receiverMobile));
|
||||||
|
@ -36,12 +36,10 @@ public interface TradeOrderUpdateService {
|
|||||||
* 【会员】创建交易订单
|
* 【会员】创建交易订单
|
||||||
*
|
*
|
||||||
* @param userId 登录用户
|
* @param userId 登录用户
|
||||||
* @param userIp 用户 IP 地址
|
|
||||||
* @param createReqVO 创建交易订单请求模型
|
* @param createReqVO 创建交易订单请求模型
|
||||||
* @param terminal 终端 {@link TerminalEnum}
|
|
||||||
* @return 交易订单的
|
* @return 交易订单的
|
||||||
*/
|
*/
|
||||||
TradeOrderDO createOrder(Long userId, String userIp, AppTradeOrderCreateReqVO createReqVO, Integer terminal);
|
TradeOrderDO createOrder(Long userId, AppTradeOrderCreateReqVO createReqVO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新交易订单已支付
|
* 更新交易订单已支付
|
||||||
|
@ -64,6 +64,8 @@ import java.util.Set;
|
|||||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*;
|
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*;
|
||||||
import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.minusTime;
|
import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.minusTime;
|
||||||
|
import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP;
|
||||||
|
import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getTerminal;
|
||||||
import static cn.iocoder.yudao.module.trade.enums.ErrorCodeConstants.*;
|
import static cn.iocoder.yudao.module.trade.enums.ErrorCodeConstants.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -158,11 +160,11 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@TradeOrderLog(operateType = TradeOrderOperateTypeEnum.MEMBER_CREATE)
|
@TradeOrderLog(operateType = TradeOrderOperateTypeEnum.MEMBER_CREATE)
|
||||||
public TradeOrderDO createOrder(Long userId, String userIp, AppTradeOrderCreateReqVO createReqVO, Integer terminal) {
|
public TradeOrderDO createOrder(Long userId, AppTradeOrderCreateReqVO createReqVO) {
|
||||||
// 1.1 价格计算
|
// 1.1 价格计算
|
||||||
TradePriceCalculateRespBO calculateRespBO = calculatePrice(userId, createReqVO);
|
TradePriceCalculateRespBO calculateRespBO = calculatePrice(userId, createReqVO);
|
||||||
// 1.2 构建订单
|
// 1.2 构建订单
|
||||||
TradeOrderDO order = buildTradeOrder(userId, userIp, createReqVO, calculateRespBO, terminal);
|
TradeOrderDO order = buildTradeOrder(userId, createReqVO, calculateRespBO);
|
||||||
List<TradeOrderItemDO> orderItems = buildTradeOrderItems(order, calculateRespBO);
|
List<TradeOrderItemDO> orderItems = buildTradeOrderItems(order, calculateRespBO);
|
||||||
|
|
||||||
// 2. 订单创建前的逻辑
|
// 2. 订单创建前的逻辑
|
||||||
@ -178,15 +180,15 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
|
|||||||
return order;
|
return order;
|
||||||
}
|
}
|
||||||
|
|
||||||
private TradeOrderDO buildTradeOrder(Long userId, String clientIp, AppTradeOrderCreateReqVO createReqVO,
|
private TradeOrderDO buildTradeOrder(Long userId, AppTradeOrderCreateReqVO createReqVO,
|
||||||
TradePriceCalculateRespBO calculateRespBO, Integer terminal) {
|
TradePriceCalculateRespBO calculateRespBO) {
|
||||||
TradeOrderDO order = TradeOrderConvert.INSTANCE.convert(userId, clientIp, createReqVO, calculateRespBO);
|
TradeOrderDO order = TradeOrderConvert.INSTANCE.convert(userId, createReqVO, calculateRespBO);
|
||||||
order.setType(calculateRespBO.getType());
|
order.setType(calculateRespBO.getType());
|
||||||
order.setNo(tradeNoRedisDAO.generate(TradeNoRedisDAO.TRADE_ORDER_NO_PREFIX));
|
order.setNo(tradeNoRedisDAO.generate(TradeNoRedisDAO.TRADE_ORDER_NO_PREFIX));
|
||||||
order.setStatus(TradeOrderStatusEnum.UNPAID.getStatus());
|
order.setStatus(TradeOrderStatusEnum.UNPAID.getStatus());
|
||||||
order.setRefundStatus(TradeOrderRefundStatusEnum.NONE.getStatus());
|
order.setRefundStatus(TradeOrderRefundStatusEnum.NONE.getStatus());
|
||||||
order.setProductCount(getSumValue(calculateRespBO.getItems(), TradePriceCalculateRespBO.OrderItem::getCount, Integer::sum));
|
order.setProductCount(getSumValue(calculateRespBO.getItems(), TradePriceCalculateRespBO.OrderItem::getCount, Integer::sum));
|
||||||
order.setTerminal(terminal);
|
order.setUserIp(getClientIP()).setTerminal(getTerminal());
|
||||||
// 支付 + 退款信息
|
// 支付 + 退款信息
|
||||||
order.setAdjustPrice(0).setPayStatus(false);
|
order.setAdjustPrice(0).setPayStatus(false);
|
||||||
order.setRefundStatus(TradeOrderRefundStatusEnum.NONE.getStatus()).setRefundPrice(0);
|
order.setRefundStatus(TradeOrderRefundStatusEnum.NONE.getStatus()).setRefundPrice(0);
|
||||||
|
@ -83,7 +83,7 @@ public class TradeBrokerageOrderHandler implements TradeOrderHandler {
|
|||||||
if (order.getBrokerageUserId() == null) {
|
if (order.getBrokerageUserId() == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cancelBrokerage(order.getId(), orderItem.getOrderId());
|
cancelBrokerage(order.getBrokerageUserId(), orderItem.getOrderId());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -10,7 +10,7 @@ import java.time.LocalDateTime;
|
|||||||
public class AppMemberPointRecordRespVO {
|
public class AppMemberPointRecordRespVO {
|
||||||
|
|
||||||
@Schema(description = "自增主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31457")
|
@Schema(description = "自增主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31457")
|
||||||
private Long id;;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "积分标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
|
@Schema(description = "积分标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
|
||||||
private String title;
|
private String title;
|
||||||
|
@ -197,7 +197,7 @@ public class PayChannelServiceTest extends BaseDbUnitTest {
|
|||||||
channelMapper.insert(dbChannel);// @Sql: 先插入出一条存在的数据
|
channelMapper.insert(dbChannel);// @Sql: 先插入出一条存在的数据
|
||||||
// 准备参数
|
// 准备参数
|
||||||
Long appId = dbChannel.getAppId();
|
Long appId = dbChannel.getAppId();
|
||||||
String code = dbChannel.getCode();;
|
String code = dbChannel.getCode();
|
||||||
|
|
||||||
// 调用
|
// 调用
|
||||||
PayChannelDO channel = channelService.getChannelByAppIdAndCode(appId, code);
|
PayChannelDO channel = channelService.getChannelByAppIdAndCode(appId, code);
|
||||||
|
Loading…
Reference in New Issue
Block a user