Compare commits
No commits in common. "eb477862fcee04560e962222472f443abac83bd7" and "8cc065e5983db6656d665b7cdac0874a2287c6cc" have entirely different histories.
eb477862fc
...
8cc065e598
@ -1,7 +1,6 @@
|
||||
package cn.iocoder.yudao.module.product.controller.app.spu;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
@ -17,7 +16,6 @@ import cn.iocoder.yudao.module.product.dal.dataobject.sku.ProductSkuDO;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSpuDO;
|
||||
import cn.iocoder.yudao.module.product.enums.ErrorCodeConstants;
|
||||
import cn.iocoder.yudao.module.product.enums.spu.ProductSpuStatusEnum;
|
||||
import cn.iocoder.yudao.module.product.service.brand.ProductBrandService;
|
||||
import cn.iocoder.yudao.module.product.service.history.ProductBrowseHistoryService;
|
||||
import cn.iocoder.yudao.module.product.service.sku.ProductSkuService;
|
||||
import cn.iocoder.yudao.module.product.service.spu.ProductSpuService;
|
||||
@ -63,8 +61,6 @@ public class AppProductSpuController {
|
||||
private MemberLevelApi memberLevelApi;
|
||||
@Resource
|
||||
private MemberUserApi memberUserApi;
|
||||
@Resource
|
||||
private ProductBrandService productBrandService;
|
||||
|
||||
@GetMapping("/list-by-ids")
|
||||
@Operation(summary = "获得商品 SPU 列表")
|
||||
@ -142,8 +138,6 @@ public class AppProductSpuController {
|
||||
spu.setBrowseCount(spu.getBrowseCount() + spu.getVirtualSalesCount());
|
||||
AppProductSpuDetailRespVO spuVO = BeanUtils.toBean(spu, AppProductSpuDetailRespVO.class)
|
||||
.setSkus(BeanUtils.toBean(skus, AppProductSpuDetailRespVO.Sku.class));
|
||||
// 添加品牌详细信息
|
||||
spuVO.setProductBrand(productBrandService.getBrandByIdStatus(spu.getBrandId(), CommonStatusEnum.ENABLE.getStatus()));
|
||||
// 处理 vip 价格
|
||||
MemberLevelRespDTO memberLevel = getMemberLevel();
|
||||
spuVO.setVipPrice(calculateVipPrice(spuVO.getPrice(), memberLevel));
|
||||
|
@ -1,7 +1,6 @@
|
||||
package cn.iocoder.yudao.module.product.controller.app.spu.vo;
|
||||
|
||||
import cn.iocoder.yudao.module.product.controller.app.property.vo.value.AppProductPropertyValueDetailRespVO;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.brand.ProductBrandDO;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@ -36,7 +35,7 @@ public class AppProductSpuDetailRespVO {
|
||||
private List<String> sliderPicUrls;
|
||||
|
||||
@Schema(description = "商品品牌编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private ProductBrandDO productBrand;
|
||||
private Long brandId;
|
||||
// ========== 营销相关字段 =========
|
||||
|
||||
// ========== SKU 相关字段 =========
|
||||
|
@ -45,13 +45,6 @@ public interface ProductBrandService {
|
||||
*/
|
||||
ProductBrandDO getBrand(Long id);
|
||||
|
||||
/**
|
||||
* 根据编号和状态获取品牌
|
||||
* @param id 编号
|
||||
* @param status 状态
|
||||
* @return cn.iocoder.yudao.module.product.dal.dataobject.brand.ProductBrandDO
|
||||
*/
|
||||
ProductBrandDO getBrandByIdStatus(Long id, Integer status);
|
||||
/**
|
||||
* 获得品牌列表
|
||||
*
|
||||
|
@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.product.service.brand;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.brand.vo.ProductBrandCreateReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.brand.vo.ProductBrandListReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.brand.vo.ProductBrandPageReqVO;
|
||||
@ -89,13 +88,6 @@ public class ProductBrandServiceImpl implements ProductBrandService {
|
||||
return brandMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductBrandDO getBrandByIdStatus(Long id, Integer status) {
|
||||
LambdaQueryWrapperX<ProductBrandDO> wrapperX = new LambdaQueryWrapperX<>();
|
||||
wrapperX.eq(ProductBrandDO::getId, id).eq(ProductBrandDO::getStatus, status);
|
||||
return brandMapper.selectOne(wrapperX);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductBrandDO> getBrandList(Collection<Long> ids) {
|
||||
return brandMapper.selectBatchIds(ids);
|
||||
|
@ -906,9 +906,6 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
|
||||
|
||||
// 2.1 更新订单的退款金额、积分
|
||||
Integer orderRefundPrice = order.getRefundPrice() + refundPrice;
|
||||
if (order.getRefundPoint() == null){
|
||||
order.setRefundPoint(0);
|
||||
}
|
||||
Integer orderRefundPoint = order.getRefundPoint() + orderItem.getUsePoint();
|
||||
Integer refundStatus = isAllOrderItemAfterSaleSuccess(order.getId()) ?
|
||||
TradeOrderRefundStatusEnum.ALL.getStatus() // 如果都售后成功,则需要取消订单
|
||||
|
@ -4,7 +4,6 @@ import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO;
|
||||
import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO;
|
||||
import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@ -23,7 +22,7 @@ public class PayWalletRechargeDO extends BaseDO {
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
@ -14,7 +14,6 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.cache.CacheUtils;
|
||||
import cn.iocoder.yudao.framework.common.util.http.HttpUtils;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.system.api.social.dto.SocialWxQrcodeReqDTO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.socail.vo.client.SocialClientPageReqVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.socail.vo.client.SocialClientSaveReqVO;
|
||||
|
Loading…
x
Reference in New Issue
Block a user