mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 15:21:53 +08:00
Merge branch 'master-jdk17' of https://gitee.com/zhijiantianya/ruoyi-vue-pro into develop
This commit is contained in:
commit
6a80d7c75f
@ -1961,7 +1961,7 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i
|
|||||||
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2793, '写作管理', '', 2, 13, 2760, 'write', 'fa:bookmark-o', 'ai/write/manager/index.vue', 'AiWriteManager', 0, b'1', b'1', b'1', '', '2024-07-10 13:24:34', '1', '2024-07-10 21:31:59', b'0');
|
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2793, '写作管理', '', 2, 13, 2760, 'write', 'fa:bookmark-o', 'ai/write/manager/index.vue', 'AiWriteManager', 0, b'1', b'1', b'1', '', '2024-07-10 13:24:34', '1', '2024-07-10 21:31:59', b'0');
|
||||||
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2794, 'AI 写作查询', 'ai:write:query', 3, 1, 2793, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2024-07-10 13:24:34', '', '2024-07-10 13:24:34', b'0');
|
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2794, 'AI 写作查询', 'ai:write:query', 3, 1, 2793, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2024-07-10 13:24:34', '', '2024-07-10 13:24:34', b'0');
|
||||||
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2795, 'AI 写作删除', 'ai:write:delete', 3, 4, 2793, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2024-07-10 13:24:34', '', '2024-07-10 13:24:34', b'0');
|
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2795, 'AI 写作删除', 'ai:write:delete', 3, 4, 2793, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2024-07-10 13:24:34', '', '2024-07-10 13:24:34', b'0');
|
||||||
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2796, 'AI 音乐', '', 2, 4, 2758, 'music', 'fa:music', 'ai/music/index/index.vue', 'AiWrite', 0, b'1', b'1', b'1', '1', '2024-07-17 09:21:12', '1', '2024-07-17 09:36:12', b'0');
|
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2796, 'AI 音乐', '', 2, 4, 2758, 'music', 'fa:music', 'ai/music/index/index.vue', 'AiMusic', 0, b'1', b'1', b'1', '1', '2024-07-17 09:21:12', '1', '2024-07-17 09:36:12', b'0');
|
||||||
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2797, '客服中心', '', 2, 100, 2362, 'kefu', 'fa-solid:user-alt', 'mall/promotion/kefu/index', 'KeFu', 0, b'1', b'1', b'1', '1', '2024-07-17 23:49:05', '1', '2024-07-17 23:49:16', b'0');
|
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2797, '客服中心', '', 2, 100, 2362, 'kefu', 'fa-solid:user-alt', 'mall/promotion/kefu/index', 'KeFu', 0, b'1', b'1', b'1', '1', '2024-07-17 23:49:05', '1', '2024-07-17 23:49:16', b'0');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
|
@ -17,7 +17,10 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
|||||||
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 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.common.util.collection.CollectionUtils.convertList;
|
||||||
|
|
||||||
@Tag(name = "管理后台 - 商品属性项")
|
@Tag(name = "管理后台 - 商品属性项")
|
||||||
@RestController
|
@RestController
|
||||||
@ -69,4 +72,12 @@ public class ProductPropertyController {
|
|||||||
return success(BeanUtils.toBean(pageResult, ProductPropertyRespVO.class));
|
return success(BeanUtils.toBean(pageResult, ProductPropertyRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/simple-list")
|
||||||
|
@Operation(summary = "获得属性项精简列表")
|
||||||
|
public CommonResult<List<ProductPropertyRespVO>> getPropertySimpleList() {
|
||||||
|
List<ProductPropertyDO> list = productPropertyService.getPropertyList();
|
||||||
|
return success(convertList(list, property -> new ProductPropertyRespVO() // 只返回 id、name 属性
|
||||||
|
.setId(property.getId()).setName(property.getName())));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,11 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
|||||||
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 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.common.util.collection.CollectionUtils.convertList;
|
||||||
|
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.singleton;
|
||||||
|
|
||||||
@Tag(name = "管理后台 - 商品属性值")
|
@Tag(name = "管理后台 - 商品属性值")
|
||||||
@RestController
|
@RestController
|
||||||
@ -69,4 +73,13 @@ public class ProductPropertyValueController {
|
|||||||
return success(BeanUtils.toBean(pageResult, ProductPropertyValueRespVO.class));
|
return success(BeanUtils.toBean(pageResult, ProductPropertyValueRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/simple-list")
|
||||||
|
@Operation(summary = "获得属性值精简列表")
|
||||||
|
@Parameter(name = "propertyId", description = "属性项编号", required = true, example = "1024")
|
||||||
|
public CommonResult<List<ProductPropertyValueRespVO>> getPropertyValueSimpleList(@RequestParam("propertyId") Long propertyId) {
|
||||||
|
List<ProductPropertyValueDO> list = productPropertyValueService.getPropertyValueListByPropertyId(singleton(propertyId));
|
||||||
|
return success(convertList(list, value -> new ProductPropertyValueRespVO() // 只返回 id、name 属性
|
||||||
|
.setId(value.getId()).setName(value.getName())));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -39,10 +39,6 @@ public class ProductPropertyDO extends BaseDO {
|
|||||||
* 名称
|
* 名称
|
||||||
*/
|
*/
|
||||||
private String name;
|
private String name;
|
||||||
/**
|
|
||||||
* 状态
|
|
||||||
*/
|
|
||||||
private Integer status;
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
|
@ -62,4 +62,11 @@ public interface ProductPropertyService {
|
|||||||
*/
|
*/
|
||||||
List<ProductPropertyDO> getPropertyList(Collection<Long> ids);
|
List<ProductPropertyDO> getPropertyList(Collection<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得指定状态的属性项列表
|
||||||
|
*
|
||||||
|
* @return 属性项列表
|
||||||
|
*/
|
||||||
|
List<ProductPropertyDO> getPropertyList();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -109,4 +109,9 @@ public class ProductPropertyServiceImpl implements ProductPropertyService {
|
|||||||
return productPropertyMapper.selectBatchIds(ids);
|
return productPropertyMapper.selectBatchIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ProductPropertyDO> getPropertyList() {
|
||||||
|
return productPropertyMapper.selectList();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import cn.iocoder.yudao.module.promotion.enums.coupon.CouponStatusEnum;
|
|||||||
import cn.iocoder.yudao.module.promotion.enums.coupon.CouponTakeTypeEnum;
|
import cn.iocoder.yudao.module.promotion.enums.coupon.CouponTakeTypeEnum;
|
||||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
@ -30,6 +31,7 @@ public class CouponDO extends BaseDO {
|
|||||||
/**
|
/**
|
||||||
* 优惠劵编号
|
* 优惠劵编号
|
||||||
*/
|
*/
|
||||||
|
@TableId
|
||||||
private Long id;
|
private Long id;
|
||||||
/**
|
/**
|
||||||
* 优惠劵模板编号
|
* 优惠劵模板编号
|
||||||
|
@ -25,6 +25,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@ -132,7 +133,7 @@ public class CouponServiceImpl implements CouponService {
|
|||||||
@Transactional
|
@Transactional
|
||||||
public void deleteCoupon(Long id) {
|
public void deleteCoupon(Long id) {
|
||||||
// 校验存在
|
// 校验存在
|
||||||
validateCouponExists(id);
|
CouponDO coupon = validateCouponExists(id);
|
||||||
|
|
||||||
// 更新优惠劵
|
// 更新优惠劵
|
||||||
int deleteCount = couponMapper.delete(id,
|
int deleteCount = couponMapper.delete(id,
|
||||||
@ -140,8 +141,9 @@ public class CouponServiceImpl implements CouponService {
|
|||||||
if (deleteCount == 0) {
|
if (deleteCount == 0) {
|
||||||
throw exception(COUPON_DELETE_FAIL_USED);
|
throw exception(COUPON_DELETE_FAIL_USED);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 减少优惠劵模板的领取数量 -1
|
// 减少优惠劵模板的领取数量 -1
|
||||||
couponTemplateService.updateCouponTemplateTakeCount(id, -1);
|
couponTemplateService.updateCouponTemplateTakeCount(coupon.getTemplateId(), -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -149,10 +151,12 @@ public class CouponServiceImpl implements CouponService {
|
|||||||
return couponMapper.selectListByUserIdAndStatus(userId, status);
|
return couponMapper.selectListByUserIdAndStatus(userId, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void validateCouponExists(Long id) {
|
private CouponDO validateCouponExists(Long id) {
|
||||||
if (couponMapper.selectById(id) == null) {
|
CouponDO coupon = couponMapper.selectById(id);
|
||||||
|
if (coupon == null) {
|
||||||
throw exception(COUPON_NOT_EXISTS);
|
throw exception(COUPON_NOT_EXISTS);
|
||||||
}
|
}
|
||||||
|
return coupon;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -21,6 +21,9 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
|||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
public class AfterSalePageReqVO extends PageParam {
|
public class AfterSalePageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "用户编号", example = "1024")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
@Schema(description = "售后流水号", example = "202211190847450020500077")
|
@Schema(description = "售后流水号", example = "202211190847450020500077")
|
||||||
private String no;
|
private String no;
|
||||||
|
|
||||||
|
@ -22,4 +22,7 @@ public class AppProductSpuBaseRespVO {
|
|||||||
@Schema(description = "商品主图地址", example = "https://www.iocoder.cn/xx.png")
|
@Schema(description = "商品主图地址", example = "https://www.iocoder.cn/xx.png")
|
||||||
private String picUrl;
|
private String picUrl;
|
||||||
|
|
||||||
|
@Schema(description = "商品分类编号", example = "1")
|
||||||
|
private Long categoryId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@ public interface AfterSaleMapper extends BaseMapperX<AfterSaleDO> {
|
|||||||
|
|
||||||
default PageResult<AfterSaleDO> selectPage(AfterSalePageReqVO reqVO) {
|
default PageResult<AfterSaleDO> selectPage(AfterSalePageReqVO reqVO) {
|
||||||
return selectPage(reqVO, new LambdaQueryWrapperX<AfterSaleDO>()
|
return selectPage(reqVO, new LambdaQueryWrapperX<AfterSaleDO>()
|
||||||
|
.eqIfPresent(AfterSaleDO::getUserId, reqVO.getUserId())
|
||||||
.likeIfPresent(AfterSaleDO::getNo, reqVO.getNo())
|
.likeIfPresent(AfterSaleDO::getNo, reqVO.getNo())
|
||||||
.eqIfPresent(AfterSaleDO::getStatus, reqVO.getStatus())
|
.eqIfPresent(AfterSaleDO::getStatus, reqVO.getStatus())
|
||||||
.eqIfPresent(AfterSaleDO::getType, reqVO.getType())
|
.eqIfPresent(AfterSaleDO::getType, reqVO.getType())
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package cn.iocoder.yudao.module.trade.service.price.calculator;
|
package cn.iocoder.yudao.module.trade.service.price.calculator;
|
||||||
|
|
||||||
import cn.hutool.core.lang.Assert;
|
import cn.hutool.core.lang.Assert;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
|
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
|
||||||
import cn.iocoder.yudao.module.product.api.sku.dto.ProductSkuRespDTO;
|
import cn.iocoder.yudao.module.product.api.sku.dto.ProductSkuRespDTO;
|
||||||
import cn.iocoder.yudao.module.product.api.spu.dto.ProductSpuRespDTO;
|
import cn.iocoder.yudao.module.product.api.spu.dto.ProductSpuRespDTO;
|
||||||
@ -61,7 +62,7 @@ public class TradePriceCalculatorHelper {
|
|||||||
orderItem.setSpuName(spu.getName()).setCategoryId(spu.getCategoryId())
|
orderItem.setSpuName(spu.getName()).setCategoryId(spu.getCategoryId())
|
||||||
.setDeliveryTemplateId(spu.getDeliveryTemplateId())
|
.setDeliveryTemplateId(spu.getDeliveryTemplateId())
|
||||||
.setGivePoint(spu.getGiveIntegral()).setUsePoint(0);
|
.setGivePoint(spu.getGiveIntegral()).setUsePoint(0);
|
||||||
if (orderItem.getPicUrl() == null) {
|
if (StrUtil.isBlank(orderItem.getPicUrl())) {
|
||||||
orderItem.setPicUrl(spu.getPicUrl());
|
orderItem.setPicUrl(spu.getPicUrl());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -240,7 +241,7 @@ public class TradePriceCalculatorHelper {
|
|||||||
*
|
*
|
||||||
* 和 {@link #dividePrice(List, Integer)} 逻辑一致,只是传入的是 TradeOrderItemDO 对象
|
* 和 {@link #dividePrice(List, Integer)} 逻辑一致,只是传入的是 TradeOrderItemDO 对象
|
||||||
*
|
*
|
||||||
* @param items 订单项
|
* @param items 订单项
|
||||||
* @param price 订单支付金额
|
* @param price 订单支付金额
|
||||||
* @return 分摊金额数组,和传入的 orderItems 一一对应
|
* @return 分摊金额数组,和传入的 orderItems 一一对应
|
||||||
*/
|
*/
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.transaction;
|
package cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.transaction;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
|
import cn.iocoder.yudao.framework.common.validation.InEnum;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@ -8,7 +10,14 @@ import lombok.Data;
|
|||||||
@Data
|
@Data
|
||||||
public class PayWalletTransactionPageReqVO extends PageParam {
|
public class PayWalletTransactionPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "钱包编号", example = "1")
|
@Schema(description = "钱包编号", example = "888")
|
||||||
private Long walletId;
|
private Long walletId;
|
||||||
|
|
||||||
|
@Schema(description = "用户编号", example = "1024")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
@Schema(description = "用户类型", example = "1")
|
||||||
|
@InEnum(UserTypeEnum.class)
|
||||||
|
private Integer userType;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package cn.iocoder.yudao.module.pay.service.wallet;
|
package cn.iocoder.yudao.module.pay.service.wallet;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.transaction.PayWalletTransactionPageReqVO;
|
import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.transaction.PayWalletTransactionPageReqVO;
|
||||||
import cn.iocoder.yudao.module.pay.controller.app.wallet.vo.transaction.AppPayWalletTransactionPageReqVO;
|
import cn.iocoder.yudao.module.pay.controller.app.wallet.vo.transaction.AppPayWalletTransactionPageReqVO;
|
||||||
@ -11,12 +12,11 @@ import cn.iocoder.yudao.module.pay.dal.mysql.wallet.PayWalletTransactionMapper;
|
|||||||
import cn.iocoder.yudao.module.pay.dal.redis.no.PayNoRedisDAO;
|
import cn.iocoder.yudao.module.pay.dal.redis.no.PayNoRedisDAO;
|
||||||
import cn.iocoder.yudao.module.pay.enums.wallet.PayWalletBizTypeEnum;
|
import cn.iocoder.yudao.module.pay.enums.wallet.PayWalletBizTypeEnum;
|
||||||
import cn.iocoder.yudao.module.pay.service.wallet.bo.WalletTransactionCreateReqBO;
|
import cn.iocoder.yudao.module.pay.service.wallet.bo.WalletTransactionCreateReqBO;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.module.pay.controller.app.wallet.vo.transaction.AppPayWalletTransactionPageReqVO.TYPE_EXPENSE;
|
import static cn.iocoder.yudao.module.pay.controller.app.wallet.vo.transaction.AppPayWalletTransactionPageReqVO.TYPE_EXPENSE;
|
||||||
@ -53,6 +53,16 @@ public class PayWalletTransactionServiceImpl implements PayWalletTransactionServ
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<PayWalletTransactionDO> getWalletTransactionPage(PayWalletTransactionPageReqVO pageVO) {
|
public PageResult<PayWalletTransactionDO> getWalletTransactionPage(PayWalletTransactionPageReqVO pageVO) {
|
||||||
|
// 基于 userId + userType 查询钱包
|
||||||
|
if (pageVO.getWalletId() == null
|
||||||
|
&& ObjectUtil.isAllNotEmpty(pageVO.getUserId(), pageVO.getUserType())) {
|
||||||
|
PayWalletDO wallet = payWalletService.getOrCreateWallet(pageVO.getUserId(), pageVO.getUserType());
|
||||||
|
if (wallet != null) {
|
||||||
|
pageVO.setWalletId(wallet.getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询分页
|
||||||
return payWalletTransactionMapper.selectPage(pageVO.getWalletId(), null, pageVO, null);
|
return payWalletTransactionMapper.selectPage(pageVO.getWalletId(), null, pageVO, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user