优化BUG
This commit is contained in:
@@ -8,6 +8,7 @@ import com.tashow.cloud.mybatis.mybatis.core.dataobject.BaseDO;
|
|||||||
import com.tashow.cloud.productapi.general.StringListTypeHandler;
|
import com.tashow.cloud.productapi.general.StringListTypeHandler;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -111,9 +112,15 @@ public class ProdDO extends BaseDO {
|
|||||||
*/
|
*/
|
||||||
private Integer status;
|
private Integer status;
|
||||||
/**
|
/**
|
||||||
* 商品分类
|
* 商品分类id
|
||||||
*/
|
*/
|
||||||
private Long categoryId;
|
private Long categoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品分类名称
|
||||||
|
*/
|
||||||
|
private String categoryName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 销量
|
* 销量
|
||||||
*/
|
*/
|
||||||
@@ -163,4 +170,9 @@ public class ProdDO extends BaseDO {
|
|||||||
*/
|
*/
|
||||||
private Integer top;
|
private Integer top;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除时间
|
||||||
|
*/
|
||||||
|
private Date deleteTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -5,6 +5,9 @@ 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.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 属性规则 DO
|
* 属性规则 DO
|
||||||
*
|
*
|
||||||
@@ -59,4 +62,8 @@ public class ProdPropValueDO {
|
|||||||
@TableField(exist=false)
|
@TableField(exist=false)
|
||||||
private Integer isExist;
|
private Integer isExist;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除时间
|
||||||
|
*/
|
||||||
|
private Date deleteTime;
|
||||||
}
|
}
|
||||||
@@ -87,9 +87,21 @@ public class SkuDO extends BaseDO {
|
|||||||
*/
|
*/
|
||||||
private String overview;
|
private String overview;
|
||||||
/**
|
/**
|
||||||
* 库存(-1代表无限库存)
|
* 库存
|
||||||
*/
|
*/
|
||||||
private Integer stocks;
|
private Integer stocks;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总库存是0 无线库存是1
|
||||||
|
*/
|
||||||
|
private Integer stocksFlg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 锁定库存数
|
||||||
|
*/
|
||||||
|
@TableField(exist=false)
|
||||||
|
private Integer stocksLockNum;
|
||||||
/**
|
/**
|
||||||
* 预警库存
|
* 预警库存
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package com.tashow.cloud.productapi.api.product.vo.prod;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.tashow.cloud.productapi.api.product.dto.*;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse.ProdEmergencyInfoVO;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.prodserviceareas.ProdServiceAreasInfoVO;
|
||||||
|
import com.tashow.cloud.productapi.general.StringListTypeHandler;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Schema(description = "商品服务配置 VO")
|
||||||
|
@Data
|
||||||
|
public class ProdListVO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品ID
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Long prodId;
|
||||||
|
/**
|
||||||
|
* 商品名称
|
||||||
|
*/
|
||||||
|
private String prodName;
|
||||||
|
/**
|
||||||
|
* 商品简称
|
||||||
|
*/
|
||||||
|
private String abbreviation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺id
|
||||||
|
*/
|
||||||
|
private Long shopId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否置灰0否1是
|
||||||
|
*/
|
||||||
|
private Integer isProhibit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核备注
|
||||||
|
*/
|
||||||
|
private String processNotes;
|
||||||
|
/**
|
||||||
|
* 详细描述
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
/**
|
||||||
|
* 商品编号
|
||||||
|
*/
|
||||||
|
private String prodNumber;
|
||||||
|
/**
|
||||||
|
* 商品主图
|
||||||
|
*/
|
||||||
|
private String pic;
|
||||||
|
/**
|
||||||
|
* 商品轮播图片,以,分割
|
||||||
|
*/
|
||||||
|
private String imgs;
|
||||||
|
/**
|
||||||
|
* 商品轮播图片,以,分割
|
||||||
|
*/
|
||||||
|
private String whiteImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 默认是1,正常状态(出售中), 0:下架(仓库中) 2:待审核
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -21,110 +21,22 @@ public class ProdPageReqVO extends PageParam {
|
|||||||
@Schema(description = "商品名称", example = "赵六")
|
@Schema(description = "商品名称", example = "赵六")
|
||||||
private String prodName;
|
private String prodName;
|
||||||
|
|
||||||
@Schema(description = "商品简称")
|
|
||||||
private String abbreviation;
|
|
||||||
|
|
||||||
@Schema(description = "seo标题", example = "李四")
|
|
||||||
private String seoShortName;
|
|
||||||
|
|
||||||
@Schema(description = "seo搜索")
|
|
||||||
private String seoSearch;
|
|
||||||
|
|
||||||
@Schema(description = "关键词")
|
|
||||||
private String keyword;
|
|
||||||
|
|
||||||
@Schema(description = "店铺id", example = "10843")
|
@Schema(description = "店铺id", example = "10843")
|
||||||
private Long shopId;
|
private Long shopId;
|
||||||
|
|
||||||
@Schema(description = "简要描述,卖点等")
|
|
||||||
private String brief;
|
|
||||||
|
|
||||||
@Schema(description = "品牌")
|
|
||||||
private String brand;
|
|
||||||
|
|
||||||
@Schema(description = "详细描述")
|
|
||||||
private String content;
|
|
||||||
|
|
||||||
|
|
||||||
@Schema(description = "'是否置灰0否1是'")
|
|
||||||
private Integer isProhibit;
|
|
||||||
|
|
||||||
@Schema(description = "审核备注")
|
|
||||||
private String processNotes;
|
|
||||||
/**
|
|
||||||
* 标签
|
|
||||||
*/
|
|
||||||
public List<String> tag;
|
|
||||||
|
|
||||||
@Schema(description = "商品编号")
|
|
||||||
private String prodNumber;
|
|
||||||
|
|
||||||
@Schema(description = "商品主图")
|
|
||||||
private String pic;
|
|
||||||
|
|
||||||
@Schema(description = "商品轮播图片,以,分割")
|
|
||||||
private String imgs;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 视频
|
|
||||||
*/
|
|
||||||
private String video;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品轮播图片,以,分割
|
|
||||||
*/
|
|
||||||
private String whiteImg;
|
|
||||||
|
|
||||||
@Schema(description = "默认是1,正常状态(出售中), 0:下架(仓库中) 2:待审核", example = "2")
|
@Schema(description = "默认是1,正常状态(出售中), 0:下架(仓库中) 2:待审核", example = "2")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
@Schema(description = "商品分类", example = "14895")
|
@Schema(description = "商品分类", example = "14895")
|
||||||
private Long categoryId;
|
private Long categoryId;
|
||||||
|
|
||||||
@Schema(description = "销量")
|
/**
|
||||||
private Integer soldNum;
|
* 商品分类名称
|
||||||
|
*/
|
||||||
@Schema(description = "分享图")
|
private String categoryName;
|
||||||
private String shareImage;
|
|
||||||
|
|
||||||
@Schema(description = "分享话术")
|
|
||||||
private String shareContent;
|
|
||||||
|
|
||||||
@Schema(description = "是否开启区域0关1开")
|
|
||||||
private Integer regionSwitch;
|
|
||||||
|
|
||||||
@Schema(description = "是否特殊时段0关1开")
|
|
||||||
private Integer additionalSwitch;
|
|
||||||
|
|
||||||
@Schema(description = "是否特殊日期(节假日周末什么的)0关1开")
|
|
||||||
private Integer additionalFeeSwitch;
|
|
||||||
|
|
||||||
@Schema(description = "是否紧急响应服务0关1开")
|
|
||||||
private Integer emergencySwitch;
|
|
||||||
|
|
||||||
@Schema(description = "是否预约0关1开")
|
|
||||||
private Integer reservationSwitch;
|
|
||||||
|
|
||||||
@Schema(description = "是否接单上线0关1开")
|
|
||||||
private Integer orderLimitSwitch;
|
|
||||||
|
|
||||||
@Schema(description = "是否开启体重配置0关1开")
|
|
||||||
private Integer weightSwitch;
|
|
||||||
|
|
||||||
@Schema(description = "创建时间")
|
@Schema(description = "创建时间")
|
||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
//@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
private LocalDateTime[] createTime;
|
private String[] createTime;
|
||||||
|
|
||||||
@Schema(description = "创建人")
|
|
||||||
private String createBy;
|
|
||||||
|
|
||||||
@Schema(description = "修改人")
|
|
||||||
private String updateBy;
|
|
||||||
|
|
||||||
@Schema(description = "版本 乐观锁")
|
|
||||||
private Integer version;
|
|
||||||
|
|
||||||
@Schema(description = "展示的权重")
|
|
||||||
private Integer top;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.tashow.cloud.productapi.api.product.vo.prod;
|
||||||
|
|
||||||
|
import com.tashow.cloud.common.pojo.PageParam;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
@Schema(description = "商品回收站分页查询")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class ProdRecycleBinVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "商品名称", example = "18784")
|
||||||
|
private String prodName;
|
||||||
|
|
||||||
|
@Schema(description = "删除时间")
|
||||||
|
//@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private String[] deleteTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -84,6 +84,11 @@ public class ProdRespVO {
|
|||||||
@ExcelProperty("商品分类")
|
@ExcelProperty("商品分类")
|
||||||
private Long categoryId;
|
private Long categoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品分类名称
|
||||||
|
*/
|
||||||
|
private String categoryName;
|
||||||
|
|
||||||
@Schema(description = "销量")
|
@Schema(description = "销量")
|
||||||
@ExcelProperty("销量")
|
@ExcelProperty("销量")
|
||||||
private Integer soldNum;
|
private Integer soldNum;
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ public class ProdSaveReqVO {
|
|||||||
@Schema(description = "产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6943")
|
@Schema(description = "产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6943")
|
||||||
private Long prodId;
|
private Long prodId;
|
||||||
|
|
||||||
@Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
//@Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||||
@NotEmpty(message = "商品名称不能为空")
|
//@NotEmpty(message = "商品名称不能为空")
|
||||||
private String prodName;
|
private String prodName;
|
||||||
|
|
||||||
@Schema(description = "商品简称")
|
@Schema(description = "商品简称")
|
||||||
@@ -31,6 +31,11 @@ public class ProdSaveReqVO {
|
|||||||
@Schema(description = "关键词")
|
@Schema(description = "关键词")
|
||||||
private String keyword;
|
private String keyword;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品分类名称
|
||||||
|
*/
|
||||||
|
private String categoryName;
|
||||||
|
|
||||||
@Schema(description = "店铺id", example = "10843")
|
@Schema(description = "店铺id", example = "10843")
|
||||||
private Long shopId;
|
private Long shopId;
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import java.util.List;
|
|||||||
@Schema(description = "管理后台 - 商品属性新增/修改 Request VO")
|
@Schema(description = "管理后台 - 商品属性新增/修改 Request VO")
|
||||||
@Data
|
@Data
|
||||||
public class ProdPropSaveReqVO {
|
public class ProdPropSaveReqVO {
|
||||||
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "属性id", requiredMode = Schema.RequiredMode.REQUIRED, example = "14271")
|
@Schema(description = "属性id", requiredMode = Schema.RequiredMode.REQUIRED, example = "14271")
|
||||||
private Long propId;
|
private Long propId;
|
||||||
|
|||||||
@@ -18,4 +18,7 @@ public class SkuPageReqVO extends PageParam {
|
|||||||
@Schema(description = "销售属性组合字符串")
|
@Schema(description = "销售属性组合字符串")
|
||||||
private String properties;
|
private String properties;
|
||||||
|
|
||||||
|
@Schema(description = "skuID", example = "18784")
|
||||||
|
private Long skuId;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,7 @@ package com.tashow.cloud.productapi.api.product.vo.sku;
|
|||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -70,6 +71,18 @@ public class SkuRespVO {
|
|||||||
@ExcelProperty("库存")
|
@ExcelProperty("库存")
|
||||||
private Integer stocks;
|
private Integer stocks;
|
||||||
|
|
||||||
|
|
||||||
|
@Schema(description = "总库存是0 无线库存是1")
|
||||||
|
@ExcelProperty("总库存是0 无线库存是1")
|
||||||
|
private Integer stocksFlg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 锁定库存数
|
||||||
|
*/
|
||||||
|
@Schema(description = "锁定库存数")
|
||||||
|
@ExcelProperty("锁定库存数")
|
||||||
|
private Integer stocksLockNum;
|
||||||
|
|
||||||
@Schema(description = "预警库存")
|
@Schema(description = "预警库存")
|
||||||
@ExcelProperty("预警库存")
|
@ExcelProperty("预警库存")
|
||||||
private Integer warnStocks;
|
private Integer warnStocks;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.tashow.cloud.productapi.api.product.vo.sku;
|
package com.tashow.cloud.productapi.api.product.vo.sku;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -55,6 +56,14 @@ public class SkuSaveReqVO {
|
|||||||
@Schema(description = "库存")
|
@Schema(description = "库存")
|
||||||
private Integer stocks;
|
private Integer stocks;
|
||||||
|
|
||||||
|
@Schema(description = "总库存是0 无线库存是1")
|
||||||
|
private Integer stocksFlg;
|
||||||
|
/**
|
||||||
|
* 锁定库存数
|
||||||
|
*/
|
||||||
|
@Schema(description = "锁定库存数")
|
||||||
|
private Integer stocksLockNum;
|
||||||
|
|
||||||
@Schema(description = "预警库存")
|
@Schema(description = "预警库存")
|
||||||
private Integer warnStocks;
|
private Integer warnStocks;
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,17 @@ package com.tashow.cloud.product.controller.admin;
|
|||||||
|
|
||||||
import com.tashow.cloud.common.pojo.CommonResult;
|
import com.tashow.cloud.common.pojo.CommonResult;
|
||||||
import com.tashow.cloud.common.pojo.PageResult;
|
import com.tashow.cloud.common.pojo.PageResult;
|
||||||
|
import com.tashow.cloud.product.mapper.ProdMapper;
|
||||||
import com.tashow.cloud.productapi.api.product.dto.ProdDO;
|
import com.tashow.cloud.productapi.api.product.dto.ProdDO;
|
||||||
import com.tashow.cloud.product.service.ProdService;
|
import com.tashow.cloud.product.service.ProdService;
|
||||||
|
import com.tashow.cloud.productapi.api.product.dto.SkuDO;
|
||||||
import com.tashow.cloud.productapi.api.product.vo.prod.ProdPageReqVO;
|
import com.tashow.cloud.productapi.api.product.vo.prod.ProdPageReqVO;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.prod.ProdRecycleBinVO;
|
||||||
import com.tashow.cloud.productapi.api.product.vo.prod.ProdSaveReqVO;
|
import com.tashow.cloud.productapi.api.product.vo.prod.ProdSaveReqVO;
|
||||||
import com.tashow.cloud.productapi.api.product.vo.prod.ProdServiceVO;
|
import com.tashow.cloud.productapi.api.product.vo.prod.ProdServiceVO;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.sku.SkuPageReqVO;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.sku.SkuRecycleBinVO;
|
||||||
|
import com.tashow.cloud.productapi.enums.BaseEnum;
|
||||||
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;
|
||||||
@@ -16,6 +22,9 @@ import jakarta.validation.Valid;
|
|||||||
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.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import static com.tashow.cloud.common.pojo.CommonResult.success;
|
import static com.tashow.cloud.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
@Tag(name = "管理后台 - 商品")
|
@Tag(name = "管理后台 - 商品")
|
||||||
@@ -26,7 +35,8 @@ public class ProdController {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ProdService prodService;
|
private ProdService prodService;
|
||||||
|
@Resource
|
||||||
|
private ProdMapper prodMapper;
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建商品")
|
@Operation(summary = "创建商品")
|
||||||
@PermitAll
|
@PermitAll
|
||||||
@@ -62,23 +72,59 @@ public class ProdController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* @PutMapping("/update")
|
@PutMapping("/update")
|
||||||
@Operation(summary = "更新商品")
|
@Operation(summary = "更新商品")
|
||||||
@PreAuthorize("@ss.hasPermission('tashow-module-product:prod:update')")
|
@PermitAll
|
||||||
public CommonResult<Boolean> updateProd(@Valid @RequestBody ProdSaveReqVO updateReqVO) {
|
public CommonResult<Boolean> updateProd(@RequestBody ProdSaveReqVO updateReqVO) {
|
||||||
prodService.updateProd(updateReqVO);
|
prodService.updateProd(updateReqVO);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@Operation(summary = "删除商品")
|
@Operation(summary = "删除商品")
|
||||||
|
@PermitAll
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
@PreAuthorize("@ss.hasPermission('tashow-module-product:prod:delete')")
|
|
||||||
public CommonResult<Boolean> deleteProd(@RequestParam("id") Long id) {
|
public CommonResult<Boolean> deleteProd(@RequestParam("id") Long id) {
|
||||||
prodService.deleteProd(id);
|
prodService.deleteProd(id);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@DeleteMapping("/deleteSkuList")
|
||||||
|
@Operation(summary = "批量删除商品")
|
||||||
|
@Parameter(name = "ids", description = "商品id", required = true)
|
||||||
|
@PermitAll
|
||||||
|
public CommonResult<Boolean> deleteSkuList(@RequestParam("ids") List<Long> ids) {
|
||||||
|
for(Long id:ids){
|
||||||
|
ProdDO prod = new ProdDO();
|
||||||
|
prod.setProdId(id);
|
||||||
|
prod.setDeleted(BaseEnum.YES_ONE.getKey());
|
||||||
|
prod.setDeleteTime(new Date());
|
||||||
|
// 删除
|
||||||
|
prodMapper.deleteById(prod);
|
||||||
|
}
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/updateSkuShelfList")
|
||||||
|
@Operation(summary = "批量上下架")
|
||||||
|
@Parameter(name = "status", description = "默认是1,正常状态(出售中), 0:下架(仓库中) 2:待审核", required = true)
|
||||||
|
@PermitAll
|
||||||
|
public CommonResult<Boolean> updateSkuShelfList(@RequestParam("ids") List<Long> ids,@RequestParam("status") Integer status) {
|
||||||
|
for(Long id:ids){
|
||||||
|
ProdDO prod = new ProdDO();
|
||||||
|
prod.setProdId(id);
|
||||||
|
prod.setStatus(status);
|
||||||
|
prodMapper.updateBatch(prod);
|
||||||
|
}
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
@GetMapping("/get")
|
@GetMapping("/get")
|
||||||
@Operation(summary = "获得商品")
|
@Operation(summary = "获得商品")
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
@@ -91,8 +137,16 @@ public class ProdController {
|
|||||||
@PermitAll
|
@PermitAll
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
@Operation(summary = "获得商品分页")
|
@Operation(summary = "获得商品分页")
|
||||||
public CommonResult<PageResult<ProdDO>> getProdPage(@Valid ProdPageReqVO pageReqVO) {
|
public CommonResult<PageResult<ProdDO>> getProdPage(ProdPageReqVO pageReqVO) {
|
||||||
PageResult<ProdDO> pageResult = prodService.getProdPage(pageReqVO);
|
PageResult<ProdDO> pageResult = prodService.getProdPage(pageReqVO);
|
||||||
return success(pageResult);
|
return success(pageResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PermitAll
|
||||||
|
@GetMapping("/getProdRecycleBinPageList")
|
||||||
|
@Operation(summary = "获得商品回收站分页列表")
|
||||||
|
public CommonResult<PageResult<SkuRecycleBinVO>> getProdRecycleBinPageList(ProdRecycleBinVO prodRecycleBinVO) {
|
||||||
|
PageResult<SkuRecycleBinVO> pageResult = prodService.getProdRecycleBinPageList(prodRecycleBinVO);
|
||||||
|
return success(pageResult);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -26,7 +26,7 @@ import static com.tashow.cloud.common.pojo.CommonResult.success;
|
|||||||
|
|
||||||
@Tag(name = "管理后台 - 单品SKU")
|
@Tag(name = "管理后台 - 单品SKU")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/tz/sku")
|
@RequestMapping("/product/sku")
|
||||||
@Validated
|
@Validated
|
||||||
public class SkuController {
|
public class SkuController {
|
||||||
|
|
||||||
@@ -84,6 +84,16 @@ public class SkuController {
|
|||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PutMapping("/disableProp")
|
||||||
|
@Operation(summary = "禁用规格值")
|
||||||
|
@PermitAll
|
||||||
|
public CommonResult<Boolean> disableProp(@RequestParam("id") Long id) {
|
||||||
|
skuService.disableProp(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@Operation(summary = "删除单品SKU")
|
@Operation(summary = "删除单品SKU")
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
@@ -98,13 +108,14 @@ public class SkuController {
|
|||||||
@Parameter(name = "ids", description = "编号", required = true)
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
@PermitAll
|
@PermitAll
|
||||||
public CommonResult<Boolean> deleteSkuList(@RequestParam("id") List<Long> ids) {
|
public CommonResult<Boolean> deleteSkuList(@RequestParam("id") List<Long> ids) {
|
||||||
for(Long id:ids){
|
/*for(Long id:ids){
|
||||||
SkuDO sku = new SkuDO();
|
SkuDO sku = new SkuDO();
|
||||||
sku.setSkuId(id);
|
sku.setSkuId(id);
|
||||||
sku.setDeleteTime(new Date());
|
sku.setDeleteTime(new Date());
|
||||||
// 删除
|
// 删除
|
||||||
skuMapper.deleteById(sku);
|
skuMapper.deleteById(sku);
|
||||||
}
|
}*/
|
||||||
|
skuService.deleteSkus(ids);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,10 +126,7 @@ public class SkuController {
|
|||||||
@Parameter(name = "isShelf", description = "是否上下架(0下架 1上架)", required = true)
|
@Parameter(name = "isShelf", description = "是否上下架(0下架 1上架)", required = true)
|
||||||
@PermitAll
|
@PermitAll
|
||||||
public CommonResult<Boolean> updateSkuShelf(@RequestParam("id") Long id,@RequestParam("isShelf") Integer isShelf) {
|
public CommonResult<Boolean> updateSkuShelf(@RequestParam("id") Long id,@RequestParam("isShelf") Integer isShelf) {
|
||||||
SkuDO sku = new SkuDO();
|
skuService.updatSkuIsShelf(id,isShelf);
|
||||||
sku.setSkuId(id);
|
|
||||||
sku.setIsShelf(isShelf);
|
|
||||||
skuMapper.updateBatch(sku);
|
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,6 +142,7 @@ public class SkuController {
|
|||||||
sku.setIsShelf(isShelf);
|
sku.setIsShelf(isShelf);
|
||||||
skuMapper.updateBatch(sku);
|
skuMapper.updateBatch(sku);
|
||||||
}
|
}
|
||||||
|
skuService.updatSkuIsShelfs(ids,isShelf);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,6 +164,15 @@ public class SkuController {
|
|||||||
return success(pageResult);
|
return success(pageResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PermitAll
|
||||||
|
@GetMapping("/getSkuPageList")
|
||||||
|
@Operation(summary = "获得SKU分页列表")
|
||||||
|
public CommonResult<PageResult<SkuDO>> getSkuPageList(@Valid SkuPageReqVO pageReqVO) {
|
||||||
|
PageResult<SkuDO> pageResult = skuService.getSkuPageList(pageReqVO);
|
||||||
|
return success(pageResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* @PermitAll
|
/* @PermitAll
|
||||||
@GetMapping("/getSkuRecycleBinPageList")
|
@GetMapping("/getSkuRecycleBinPageList")
|
||||||
@Operation(summary = "获得SKU回收站分页列表")
|
@Operation(summary = "获得SKU回收站分页列表")
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX;
|
|||||||
import com.tashow.cloud.productapi.api.product.dto.*;
|
import com.tashow.cloud.productapi.api.product.dto.*;
|
||||||
import com.tashow.cloud.productapi.api.product.vo.prod.ProdPageReqVO;
|
import com.tashow.cloud.productapi.api.product.vo.prod.ProdPageReqVO;
|
||||||
import com.tashow.cloud.productapi.api.product.vo.prod.ProdServiceVO;
|
import com.tashow.cloud.productapi.api.product.vo.prod.ProdServiceVO;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.sku.SkuRecycleBinVO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
@@ -21,7 +22,11 @@ import org.apache.ibatis.annotations.Param;
|
|||||||
@Mapper
|
@Mapper
|
||||||
public interface ProdMapper extends BaseMapperX<ProdDO> {
|
public interface ProdMapper extends BaseMapperX<ProdDO> {
|
||||||
|
|
||||||
IPage<ProdDO> getProdPageList(Page<?> page, ProdPageReqVO reqVO);
|
IPage<ProdDO> getProdPageList(Page<?> page,@Param("createTime") String[] createTime
|
||||||
|
, @Param("prodName") String prodName
|
||||||
|
, @Param("shopId") Long shopId
|
||||||
|
, @Param("status") Integer status
|
||||||
|
, @Param("categoryId") Long categoryId);
|
||||||
|
|
||||||
ProdServiceVO selectProdService(@Param("prodId") Long prodId
|
ProdServiceVO selectProdService(@Param("prodId") Long prodId
|
||||||
, @Param("regionSwitch") Integer regionSwitch
|
, @Param("regionSwitch") Integer regionSwitch
|
||||||
@@ -41,4 +46,8 @@ public interface ProdMapper extends BaseMapperX<ProdDO> {
|
|||||||
, @Param("additionalFeeSwitch") Integer additionalFeeSwitch
|
, @Param("additionalFeeSwitch") Integer additionalFeeSwitch
|
||||||
, @Param("weightSwitch") Integer weightSwitch
|
, @Param("weightSwitch") Integer weightSwitch
|
||||||
);
|
);
|
||||||
|
|
||||||
|
IPage<SkuRecycleBinVO> getProdRecycleBinPageList(Page<?> page,@Param("createTime") String[] createTime
|
||||||
|
, @Param("prodName") String prodName);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -24,4 +24,9 @@ public interface ProdPropValueMapper extends BaseMapperX<ProdPropValueDO> {
|
|||||||
*/
|
*/
|
||||||
void insertPropValues(@Param("propId") Long propId, @Param("prodPropValues") List<ProdPropValueDO> prodPropValues);
|
void insertPropValues(@Param("propId") Long propId, @Param("prodPropValues") List<ProdPropValueDO> prodPropValues);
|
||||||
|
|
||||||
|
List<ProdPropValueDO> selectSalesValuesByProdId(@Param("prodId") Long prodId);
|
||||||
|
|
||||||
|
List<ProdPropValueDO> selectSalesValuesByState(@Param("prodId") Long prodId);
|
||||||
|
|
||||||
|
void batchMarkDeleted(@Param("ids") List<Long> ids);
|
||||||
}
|
}
|
||||||
@@ -20,6 +20,11 @@ public interface SkuMapper extends BaseMapperX<SkuDO> {
|
|||||||
|
|
||||||
IPage<SkuRecycleBinVO> getSkuRecycleBinPageList(Page<?> page, @Param("prodId") Long prodId, @Param("properties")String properties);
|
IPage<SkuRecycleBinVO> getSkuRecycleBinPageList(Page<?> page, @Param("prodId") Long prodId, @Param("properties")String properties);
|
||||||
|
|
||||||
List<SkuDO> getSkuListByName( @Param("propertiesName")String propertiesName);
|
IPage<SkuDO> getSkuPageList(Page<?> page, @Param("prodId") Long prodId,@Param("skuId") Long skuId, @Param("properties")String properties);
|
||||||
|
|
||||||
|
|
||||||
|
List<SkuDO> getSkuListByName( @Param("propertiesName")String propertiesName);
|
||||||
|
List<String> selectPropertiesByProdIdAndNotDeleted( @Param("prodId")Long prodId);
|
||||||
|
|
||||||
|
List<String> selectPropertiesByProdIdShelf( @Param("prodId")Long prodId);
|
||||||
}
|
}
|
||||||
@@ -4,8 +4,10 @@ import java.util.*;
|
|||||||
|
|
||||||
import com.tashow.cloud.productapi.api.product.dto.ProdDO;
|
import com.tashow.cloud.productapi.api.product.dto.ProdDO;
|
||||||
import com.tashow.cloud.productapi.api.product.vo.prod.ProdPageReqVO;
|
import com.tashow.cloud.productapi.api.product.vo.prod.ProdPageReqVO;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.prod.ProdRecycleBinVO;
|
||||||
import com.tashow.cloud.productapi.api.product.vo.prod.ProdSaveReqVO;
|
import com.tashow.cloud.productapi.api.product.vo.prod.ProdSaveReqVO;
|
||||||
import com.tashow.cloud.productapi.api.product.vo.prod.ProdServiceVO;
|
import com.tashow.cloud.productapi.api.product.vo.prod.ProdServiceVO;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.sku.SkuRecycleBinVO;
|
||||||
import jakarta.validation.*;
|
import jakarta.validation.*;
|
||||||
import com.tashow.cloud.common.pojo.PageResult;
|
import com.tashow.cloud.common.pojo.PageResult;
|
||||||
import com.tashow.cloud.common.pojo.PageParam;
|
import com.tashow.cloud.common.pojo.PageParam;
|
||||||
@@ -82,4 +84,5 @@ public interface ProdService {
|
|||||||
*/
|
*/
|
||||||
PageResult<ProdDO> getProdPage(ProdPageReqVO pageReqVO);
|
PageResult<ProdDO> getProdPage(ProdPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
PageResult<SkuRecycleBinVO> getProdRecycleBinPageList(ProdRecycleBinVO prodRecycleBinVO);
|
||||||
}
|
}
|
||||||
@@ -63,6 +63,13 @@ public interface SkuService {
|
|||||||
*/
|
*/
|
||||||
void deleteProp(Long id);
|
void deleteProp(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 禁用规格值
|
||||||
|
*
|
||||||
|
* @param id 删除规格值
|
||||||
|
*/
|
||||||
|
void disableProp(Long id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SkuPropInfoVO getSKuPropList(Long prodId);
|
SkuPropInfoVO getSKuPropList(Long prodId);
|
||||||
@@ -74,6 +81,29 @@ public interface SkuService {
|
|||||||
*/
|
*/
|
||||||
void deleteSku(Long id);
|
void deleteSku(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除删SKU
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
*/
|
||||||
|
void deleteSkus(List<Long> ids);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除单品SKU
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
*/
|
||||||
|
void updatSkuIsShelf(Long id,Integer isShelf);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除删SKU
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
*/
|
||||||
|
void updatSkuIsShelfs(List<Long> ids,Integer isShelf);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得单品SKU
|
* 获得单品SKU
|
||||||
*
|
*
|
||||||
@@ -86,6 +116,8 @@ public interface SkuService {
|
|||||||
|
|
||||||
PageResult<SkuRecycleBinVO> getSkuRecycleBinPageList(SkuPageReqVO pageReqVO);
|
PageResult<SkuRecycleBinVO> getSkuRecycleBinPageList(SkuPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
|
||||||
|
PageResult<SkuDO> getSkuPageList(SkuPageReqVO pageReqVO);
|
||||||
/**
|
/**
|
||||||
* 获得单品SKU分页
|
* 获得单品SKU分页
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ public class ProdPropServiceImpl extends ServiceImpl<ProdPropMapper, ProdPropDO>
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (ProdPropValueDO prodPropValueDO : createReqVO.getProdPropValues()){
|
for (ProdPropValueDO prodPropValueDO : createReqVO.getProdPropValues()){
|
||||||
prodPropValueDO.setPropId(prodProp.getPropId());
|
prodPropValueDO.setPropId(prodProp.getId());
|
||||||
prodPropValueMapper.insert(prodPropValueDO);
|
prodPropValueMapper.insert(prodPropValueDO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -90,7 +90,7 @@ public class ProdPropServiceImpl extends ServiceImpl<ProdPropMapper, ProdPropDO>
|
|||||||
}
|
}
|
||||||
for (ProdPropValueDO prodPropValueDO : createReqVO.getProdPropValues()){
|
for (ProdPropValueDO prodPropValueDO : createReqVO.getProdPropValues()){
|
||||||
if(Objects.equals(BaseEnum.YES_ONE.getKey(),prodPropValueDO.getIsExist())){
|
if(Objects.equals(BaseEnum.YES_ONE.getKey(),prodPropValueDO.getIsExist())){
|
||||||
prodPropValueDO.setPropId(prodProp.getPropId());
|
prodPropValueDO.setPropId(prodProp.getId());
|
||||||
prodPropValueMapper.insert(prodPropValueDO);
|
prodPropValueMapper.insert(prodPropValueDO);
|
||||||
}else {
|
}else {
|
||||||
prodPropValueMapper.updateById(prodPropValueDO);
|
prodPropValueMapper.updateById(prodPropValueDO);
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.tashow.cloud.common.util.date.DateUtils;
|
||||||
import com.tashow.cloud.mybatis.mybatis.core.util.MyBatisUtils;
|
import com.tashow.cloud.mybatis.mybatis.core.util.MyBatisUtils;
|
||||||
import com.tashow.cloud.productapi.api.product.dto.*;
|
import com.tashow.cloud.productapi.api.product.dto.*;
|
||||||
import com.tashow.cloud.product.mapper.*;
|
import com.tashow.cloud.product.mapper.*;
|
||||||
@@ -11,8 +12,11 @@ import com.tashow.cloud.product.service.ProdPropService;
|
|||||||
import com.tashow.cloud.product.service.ProdService;
|
import com.tashow.cloud.product.service.ProdService;
|
||||||
|
|
||||||
import com.tashow.cloud.productapi.api.product.vo.prod.ProdPageReqVO;
|
import com.tashow.cloud.productapi.api.product.vo.prod.ProdPageReqVO;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.prod.ProdRecycleBinVO;
|
||||||
import com.tashow.cloud.productapi.api.product.vo.prod.ProdSaveReqVO;
|
import com.tashow.cloud.productapi.api.product.vo.prod.ProdSaveReqVO;
|
||||||
import com.tashow.cloud.productapi.api.product.vo.prod.ProdServiceVO;
|
import com.tashow.cloud.productapi.api.product.vo.prod.ProdServiceVO;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.sku.SkuPageReqVO;
|
||||||
|
import com.tashow.cloud.productapi.api.product.vo.sku.SkuRecycleBinVO;
|
||||||
import com.tashow.cloud.productapi.enums.BaseEnum;
|
import com.tashow.cloud.productapi.enums.BaseEnum;
|
||||||
import lombok.val;
|
import lombok.val;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -271,8 +275,12 @@ public class ProdServiceImpl implements ProdService {
|
|||||||
public void deleteProd(Long id) {
|
public void deleteProd(Long id) {
|
||||||
// 校验存在
|
// 校验存在
|
||||||
validateProdExists(id);
|
validateProdExists(id);
|
||||||
|
ProdDO prod = new ProdDO();
|
||||||
|
prod.setProdId(id);
|
||||||
|
prod.setDeleted(BaseEnum.YES_ONE.getKey());
|
||||||
|
prod.setDeleteTime(new Date());
|
||||||
// 删除
|
// 删除
|
||||||
prodMapper.deleteById(id);
|
prodMapper.deleteById(prod);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void validateProdExists(Long id) {
|
private void validateProdExists(Long id) {
|
||||||
@@ -288,7 +296,17 @@ public class ProdServiceImpl implements ProdService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<ProdDO> getProdPage(ProdPageReqVO pageReqVO) {
|
public PageResult<ProdDO> getProdPage(ProdPageReqVO pageReqVO) {
|
||||||
IPage<ProdDO> prodPageList = prodMapper.getProdPageList(MyBatisUtils.buildPage(pageReqVO), pageReqVO);
|
IPage<ProdDO> prodPageList = prodMapper.getProdPageList(MyBatisUtils.buildPage(pageReqVO),
|
||||||
|
pageReqVO.getCreateTime(), pageReqVO.getProdName(), pageReqVO.getShopId(), pageReqVO.getStatus(), pageReqVO.getCategoryId());
|
||||||
|
return new PageResult<>(prodPageList.getRecords(),prodPageList.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<SkuRecycleBinVO> getProdRecycleBinPageList(ProdRecycleBinVO prodRecycleBinVO){
|
||||||
|
IPage<SkuRecycleBinVO> prodPageList = prodMapper.getProdRecycleBinPageList(MyBatisUtils.buildPage(prodRecycleBinVO), prodRecycleBinVO.getDeleteTime(), prodRecycleBinVO.getProdName());
|
||||||
|
for(SkuRecycleBinVO prodPage : prodPageList.getRecords()){
|
||||||
|
prodPage.setRemainingDays(DateUtils.getRemainingDays(prodPage.getDeleteTime()));
|
||||||
|
}
|
||||||
return new PageResult<>(prodPageList.getRecords(),prodPageList.getTotal());
|
return new PageResult<>(prodPageList.getRecords(),prodPageList.getTotal());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -59,6 +59,9 @@ public class SkuServiceImpl implements SkuService {
|
|||||||
private ProdPropValueService prodPropValueService;
|
private ProdPropValueService prodPropValueService;
|
||||||
@Resource
|
@Resource
|
||||||
private ProdExtendService prodExtendService;
|
private ProdExtendService prodExtendService;
|
||||||
|
@Resource
|
||||||
|
private ProdPropValueMapper prodPropValueMapper;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Long createSku(SkuSaveReqVO createReqVO) {
|
public Long createSku(SkuSaveReqVO createReqVO) {
|
||||||
@@ -413,11 +416,39 @@ public class SkuServiceImpl implements SkuService {
|
|||||||
ProdPropValueDO prodPropValueDO =prodPropValueService.getById(id);
|
ProdPropValueDO prodPropValueDO =prodPropValueService.getById(id);
|
||||||
prodPropValueService.deleteProdPropValue(id);
|
prodPropValueService.deleteProdPropValue(id);
|
||||||
List<SkuDO> skuDOList = skuMapper.getSkuListByName(prodPropValueDO.getPropValue());
|
List<SkuDO> skuDOList = skuMapper.getSkuListByName(prodPropValueDO.getPropValue());
|
||||||
|
List<SkuDO> skuDOList1 = new ArrayList<>();
|
||||||
for(SkuDO skuDO : skuDOList){
|
for(SkuDO skuDO : skuDOList){
|
||||||
if(skuDO.getProperties()!=null){
|
if(skuDO.getProperties()!=null){
|
||||||
String[] split = skuDO.getProperties().split(",");
|
String[] split = skuDO.getProperties().split(",");
|
||||||
|
for (String s : split){
|
||||||
|
if(s.equals(prodPropValueDO.getPropValue())){
|
||||||
|
skuDOList1.add(skuDO);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
skuMapper.deleteByIds(skuDOList1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void disableProp(Long id) {
|
||||||
|
ProdPropValueDO prodPropValueDO =prodPropValueService.getById(id);
|
||||||
|
prodPropValueDO.setState(BaseEnum.YES_ONE.getKey());
|
||||||
|
prodPropValueService.updateById(prodPropValueDO);
|
||||||
|
List<SkuDO> skuDOList = skuMapper.getSkuListByName(prodPropValueDO.getPropValue());
|
||||||
|
List<SkuDO> skuDOList1 = new ArrayList<>();
|
||||||
|
for(SkuDO skuDO : skuDOList){
|
||||||
|
if(skuDO.getProperties()!=null){
|
||||||
|
String[] split = skuDO.getProperties().split(",");
|
||||||
|
for (String s : split){
|
||||||
|
if(s.equals(prodPropValueDO.getPropValue())){
|
||||||
|
skuDO.setIsShelf(BaseEnum.NO_ZERO.getKey());
|
||||||
|
skuDOList1.add(skuDO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
skuMapper.updateBatch(skuDOList1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -425,14 +456,14 @@ public class SkuServiceImpl implements SkuService {
|
|||||||
LambdaQueryWrapper<ProdPropDO> wrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ProdPropDO> wrapper = new LambdaQueryWrapper<>();
|
||||||
wrapper.eq(ProdPropDO::getProdId,prodId);
|
wrapper.eq(ProdPropDO::getProdId,prodId);
|
||||||
wrapper.eq(ProdPropDO::getState, BaseEnum.YES_ONE.getKey())
|
wrapper.eq(ProdPropDO::getState, BaseEnum.YES_ONE.getKey())
|
||||||
.orderByDesc(ProdPropDO::getSort);
|
.orderByAsc(ProdPropDO::getSort);
|
||||||
|
|
||||||
List<ProdPropDO> list = prodPropService.list(wrapper);
|
List<ProdPropDO> list = prodPropService.list(wrapper);
|
||||||
list.forEach(prop -> {
|
list.forEach(prop -> {
|
||||||
List<ProdPropValueDO> values = prodPropValueService.list(
|
List<ProdPropValueDO> values = prodPropValueService.list(
|
||||||
new LambdaQueryWrapper<ProdPropValueDO>()
|
new LambdaQueryWrapper<ProdPropValueDO>()
|
||||||
.eq(ProdPropValueDO::getPropId, prop.getId())
|
.eq(ProdPropValueDO::getPropId, prop.getId())
|
||||||
.orderByDesc(ProdPropValueDO::getSort)
|
.orderByAsc(ProdPropValueDO::getSort)
|
||||||
);
|
);
|
||||||
/* LambdaQueryWrapper<ProdPropValueDO> wrapper1 = new LambdaQueryWrapper<>();
|
/* LambdaQueryWrapper<ProdPropValueDO> wrapper1 = new LambdaQueryWrapper<>();
|
||||||
wrapper1.eq(ProdPropValueDO::getPropId,prop.getPropId());
|
wrapper1.eq(ProdPropValueDO::getPropId,prop.getPropId());
|
||||||
@@ -454,16 +485,203 @@ public class SkuServiceImpl implements SkuService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void deleteSku(Long id) {
|
public void deleteSku(Long id) {
|
||||||
// 校验存在
|
// 校验存在
|
||||||
validateSkuExists(id);
|
validateSkuExists(id);
|
||||||
SkuDO sku = new SkuDO();
|
SkuDO sku = new SkuDO();
|
||||||
sku.setSkuId(id);
|
sku.setSkuId(id);
|
||||||
sku.setDeleteTime(new Date());
|
sku.setDeleteTime(new Date());
|
||||||
|
|
||||||
|
SkuDO prodSku = skuMapper.selectById( id);
|
||||||
|
// Step 1: 获取该商品下所有未删除的 SKU 的 properties
|
||||||
|
List<String> activeProperties = skuMapper.selectPropertiesByProdIdAndNotDeleted(prodSku.getProdId());
|
||||||
|
|
||||||
|
// Step 2: 提取所有正在被使用的属性值(去重)
|
||||||
|
Set<String> currentlyUsedValues = new HashSet<>();
|
||||||
|
for (String props : activeProperties) {
|
||||||
|
if (props != null && !props.trim().isEmpty()) {
|
||||||
|
String[] values = props.split(",");
|
||||||
|
for (String v : values) {
|
||||||
|
currentlyUsedValues.add(v.trim());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// 删除
|
// 删除
|
||||||
skuMapper.deleteById(sku);
|
skuMapper.deleteById(sku);
|
||||||
|
// Step 3: 查询该商品下所有 rule=1 的属性值(销售属性)
|
||||||
|
List<ProdPropValueDO> allPropValues = prodPropValueMapper.selectSalesValuesByProdId(prodSku.getProdId());
|
||||||
|
// Step 4: 遍历每个属性值,检查是否还在被使用
|
||||||
|
for (ProdPropValueDO pv : allPropValues) {
|
||||||
|
String value = pv.getPropValue().trim();
|
||||||
|
// 如果当前属性值不在“活跃使用”列表中,说明没有未删除的 SKU 使用它
|
||||||
|
if (!currentlyUsedValues.contains(value)) {
|
||||||
|
// 可以安全删除该属性值
|
||||||
|
// 可以安全禁用该属性值
|
||||||
|
ProdPropValueDO prodPropValueDO = new ProdPropValueDO();
|
||||||
|
prodPropValueDO.setId(pv.getId());
|
||||||
|
prodPropValueDO.setIsExpire(BaseEnum.YES_ONE.getKey());
|
||||||
|
prodPropValueDO.setDeleteTime(new Date());
|
||||||
|
prodPropValueMapper.updateById(prodPropValueDO);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void deleteSkus(List<Long> ids) {
|
||||||
|
if (ids == null || ids.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 1: 查询这些 SKU 的基本信息(主要是 prod_id)
|
||||||
|
List<SkuDO> skuList = skuMapper.selectByIds(ids);
|
||||||
|
if (skuList.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Long prodId = skuList.get(0).getProdId();
|
||||||
|
// 校验是否属于同一个商品(可选)
|
||||||
|
boolean allSameProd = skuList.stream().allMatch(s -> s.getProdId().equals(prodId));
|
||||||
|
if (!allSameProd) {
|
||||||
|
throw new IllegalArgumentException("批量删除的 SKU 必须属于同一个商品");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Step 3: 获取该商品下【当前仍然未删除】的 SKU 的 properties
|
||||||
|
List<String> activeProperties = skuMapper.selectPropertiesByProdIdAndNotDeleted(prodId);
|
||||||
|
|
||||||
|
for(Long id:ids){
|
||||||
|
SkuDO sku = new SkuDO();
|
||||||
|
sku.setSkuId(id);
|
||||||
|
sku.setDeleteTime(new Date());
|
||||||
|
// 删除
|
||||||
|
skuMapper.deleteById(sku);
|
||||||
|
}
|
||||||
|
// Step 4: 提取所有仍在使用的属性值(去重 + trim)
|
||||||
|
Set<String> currentlyUsedValues = new HashSet<>();
|
||||||
|
for (String props : activeProperties) {
|
||||||
|
if (props != null && !props.trim().isEmpty()) {
|
||||||
|
String[] values = props.split(",");
|
||||||
|
for (String v : values) {
|
||||||
|
currentlyUsedValues.add(v.trim());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 5: 查询该商品下所有 rule=1 的销售属性值(未删除的)
|
||||||
|
List<ProdPropValueDO> allPropValues = prodPropValueMapper.selectSalesValuesByProdId(prodId);
|
||||||
|
|
||||||
|
// Step 6: 收集需要删除的属性值 ID
|
||||||
|
List<Long> valueIdsToDelete = new ArrayList<>();
|
||||||
|
for (ProdPropValueDO pv : allPropValues) {
|
||||||
|
String value = pv.getPropValue().trim();
|
||||||
|
if (!currentlyUsedValues.contains(value)) {
|
||||||
|
valueIdsToDelete.add(pv.getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Step 7: 批量删除无用的属性值
|
||||||
|
if (!valueIdsToDelete.isEmpty()) {
|
||||||
|
prodPropValueMapper.batchMarkDeleted(valueIdsToDelete);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updatSkuIsShelf(Long id, Integer isShelf) {
|
||||||
|
// 校验存在
|
||||||
|
validateSkuExists(id);
|
||||||
|
|
||||||
|
SkuDO prodSku = skuMapper.selectById( id);
|
||||||
|
// Step 1: 获取该商品下所有未禁用的 SKU 的 properties
|
||||||
|
List<String> activeProperties = skuMapper.selectPropertiesByProdIdShelf(prodSku.getProdId());
|
||||||
|
SkuDO sku = new SkuDO();
|
||||||
|
sku.setSkuId(id);
|
||||||
|
sku.setIsShelf(isShelf);
|
||||||
|
skuMapper.updateById(sku);
|
||||||
|
// Step 2: 提取所有正在被使用的属性值(去重)
|
||||||
|
Set<String> currentlyUsedValues = new HashSet<>();
|
||||||
|
for (String props : activeProperties) {
|
||||||
|
if (props != null && !props.trim().isEmpty()) {
|
||||||
|
String[] values = props.split(",");
|
||||||
|
for (String v : values) {
|
||||||
|
currentlyUsedValues.add(v.trim());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Step 3: 查询该商品下所有 rule=1 的属性值(销售属性)
|
||||||
|
List<ProdPropValueDO> allPropValues = prodPropValueMapper.selectSalesValuesByState(prodSku.getProdId());
|
||||||
|
// Step 4: 遍历每个属性值,检查是否还在被使用
|
||||||
|
for (ProdPropValueDO pv : allPropValues) {
|
||||||
|
String value = pv.getPropValue().trim();
|
||||||
|
// 如果当前属性值不在“活跃使用”列表中,说明没有未删除的 SKU 使用它
|
||||||
|
if (!currentlyUsedValues.contains(value)) {
|
||||||
|
// 可以安全禁用该属性值
|
||||||
|
ProdPropValueDO prodPropValueDO = new ProdPropValueDO();
|
||||||
|
prodPropValueDO.setId(pv.getId());
|
||||||
|
prodPropValueDO.setState(BaseEnum.NO_ZERO.getKey());
|
||||||
|
prodPropValueMapper.updateById(prodPropValueDO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updatSkuIsShelfs(List<Long> ids, Integer isShelf) {
|
||||||
|
if (ids == null || ids.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 1: 查询这些 SKU 的基本信息(主要是 prod_id)
|
||||||
|
List<SkuDO> skuList = skuMapper.selectByIds(ids);
|
||||||
|
if (skuList.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Long prodId = skuList.get(0).getProdId();
|
||||||
|
// 校验是否属于同一个商品(可选)
|
||||||
|
boolean allSameProd = skuList.stream().allMatch(s -> s.getProdId().equals(prodId));
|
||||||
|
if (!allSameProd) {
|
||||||
|
throw new IllegalArgumentException("批量删除的 SKU 必须属于同一个商品");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Step 3: 获取该商品下【当前仍然未禁用】的 SKU 的 properties
|
||||||
|
List<String> activeProperties = skuMapper.selectPropertiesByProdIdShelf(prodId);
|
||||||
|
|
||||||
|
for(Long id:ids){
|
||||||
|
SkuDO sku = new SkuDO();
|
||||||
|
sku.setSkuId(id);
|
||||||
|
sku.setIsShelf(isShelf);
|
||||||
|
skuMapper.updateBatch(sku);
|
||||||
|
}
|
||||||
|
// Step 4: 提取所有仍在使用的属性值(去重 + trim)
|
||||||
|
Set<String> currentlyUsedValues = new HashSet<>();
|
||||||
|
for (String props : activeProperties) {
|
||||||
|
if (props != null && !props.trim().isEmpty()) {
|
||||||
|
String[] values = props.split(",");
|
||||||
|
for (String v : values) {
|
||||||
|
currentlyUsedValues.add(v.trim());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 5: 查询该商品下所有 rule=1 的销售属性值(未删除的)
|
||||||
|
List<ProdPropValueDO> allPropValues = prodPropValueMapper.selectSalesValuesByState(prodId);
|
||||||
|
|
||||||
|
// Step 6: 收集需要删除的属性值 ID
|
||||||
|
List<Long> valueIdsToDelete = new ArrayList<>();
|
||||||
|
for (ProdPropValueDO pv : allPropValues) {
|
||||||
|
String value = pv.getPropValue().trim();
|
||||||
|
if (!currentlyUsedValues.contains(value)) {
|
||||||
|
valueIdsToDelete.add(pv.getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Step 7: 批量删除无用的属性值
|
||||||
|
if (!valueIdsToDelete.isEmpty()) {
|
||||||
|
prodPropValueMapper.batchMarkDeleted(valueIdsToDelete);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void validateSkuExists(Long id) {
|
private void validateSkuExists(Long id) {
|
||||||
if (skuMapper.selectById(id) == null) {
|
if (skuMapper.selectById(id) == null) {
|
||||||
throw exception(ErrorCodeConstants.SKU_NOT_EXISTS);
|
throw exception(ErrorCodeConstants.SKU_NOT_EXISTS);
|
||||||
@@ -484,6 +702,14 @@ public class SkuServiceImpl implements SkuService {
|
|||||||
return new PageResult<>(prodPageList.getRecords(),prodPageList.getTotal());
|
return new PageResult<>(prodPageList.getRecords(),prodPageList.getTotal());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<SkuDO> getSkuPageList(SkuPageReqVO pageReqVO){
|
||||||
|
IPage<SkuDO> prodPageList = skuMapper.getSkuPageList(MyBatisUtils.buildPage(pageReqVO), pageReqVO.getProdId(), pageReqVO.getSkuId(),pageReqVO.getProperties());
|
||||||
|
|
||||||
|
return new PageResult<>(prodPageList.getRecords(),prodPageList.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<SkuDO> getSkuPage(SkuPageReqVO pageReqVO) {
|
public PageResult<SkuDO> getSkuPage(SkuPageReqVO pageReqVO) {
|
||||||
|
|||||||
@@ -233,8 +233,25 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<select id="getProdPageList" resultType="com.tashow.cloud.productapi.api.product.dto.ProdDO" >
|
<select id="getProdPageList" resultType="com.tashow.cloud.productapi.api.product.dto.ProdDO">
|
||||||
select * from tz_prod
|
SELECT * FROM tz_prod
|
||||||
|
where deleted = 0
|
||||||
|
<if test="createTime != null and createTime.length == 2">
|
||||||
|
AND create_time BETWEEN #{createTime[0]} AND #{createTime[1]}
|
||||||
|
</if>
|
||||||
|
<if test="prodName != null">
|
||||||
|
AND prod_name = #{prodName}
|
||||||
|
</if>
|
||||||
|
<if test="shopId != null">
|
||||||
|
AND shop_id = #{shopId}
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
AND status = #{status}
|
||||||
|
</if>
|
||||||
|
<if test="categoryId != null">
|
||||||
|
AND category_id = #{categoryId}
|
||||||
|
</if>
|
||||||
|
ORDER by create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
@@ -502,4 +519,15 @@
|
|||||||
ORDER BY p.prod_id
|
ORDER BY p.prod_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getProdRecycleBinPageList" resultType="com.tashow.cloud.productapi.api.product.vo.sku.SkuRecycleBinVO" >
|
||||||
|
select * from tz_prod where deleted = 1
|
||||||
|
<if test="properties != null and properties != ''">
|
||||||
|
and properties like concat('%', #{prodName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="deleteTime != null and deleteTime.length == 2">
|
||||||
|
AND delete_time BETWEEN #{deleteTime[0]} AND #{deleteTime[1]}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -14,4 +14,47 @@
|
|||||||
(#{propId},#{prodPropValue.propValue})
|
(#{propId},#{prodPropValue.propValue})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ProdPropValueMapper.xml -->
|
||||||
|
<select id="selectSalesValuesByProdId" resultType="com.tashow.cloud.productapi.api.product.dto.ProdPropValueDO">
|
||||||
|
SELECT
|
||||||
|
pp.id AS propId,
|
||||||
|
pp.prop_name,
|
||||||
|
ppv.id AS valueId,
|
||||||
|
ppv.prop_value
|
||||||
|
FROM tz_prod_prop pp
|
||||||
|
JOIN tz_prod_prop_value ppv ON pp.id = ppv.prop_id
|
||||||
|
WHERE pp.prod_id = #{prodId}
|
||||||
|
AND pp.rule = 1
|
||||||
|
AND ppv.is_expire = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSalesValuesByState" resultType="com.tashow.cloud.productapi.api.product.dto.ProdPropValueDO">
|
||||||
|
SELECT
|
||||||
|
pp.id AS propId,
|
||||||
|
pp.prop_name,
|
||||||
|
ppv.id AS valueId,
|
||||||
|
ppv.prop_value
|
||||||
|
FROM tz_prod_prop pp
|
||||||
|
JOIN tz_prod_prop_value ppv ON pp.id = ppv.prop_id
|
||||||
|
WHERE pp.prod_id = #{prodId}
|
||||||
|
AND pp.rule = 1
|
||||||
|
AND ppv.state = 1
|
||||||
|
AND ppv.is_expire = 0
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<update id="batchMarkDeleted">
|
||||||
|
UPDATE tz_prod_prop_value
|
||||||
|
SET is_expire = 1, delete_time = NOW()
|
||||||
|
WHERE id IN
|
||||||
|
<foreach item="id" collection="ids" open="(" separator="," close=")">
|
||||||
|
#{ids}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -17,6 +17,20 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getSkuPageList" resultType="com.tashow.cloud.productapi.api.product.dto.SkuDO">
|
||||||
|
Select * from tz_sku where deleted = 0
|
||||||
|
<if test="prodId != null and prodId != ''">
|
||||||
|
and prod_id = #{prodId}
|
||||||
|
</if>
|
||||||
|
<if test="skuId != null and skuId != ''">
|
||||||
|
and sku_id = #{skuId}
|
||||||
|
</if>
|
||||||
|
<if test="properties != null and properties != ''">
|
||||||
|
and properties like concat('%', #{propertiesName}, '%')
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="getSkuListByName" resultType="com.tashow.cloud.productapi.api.product.dto.SkuDO" >
|
<select id="getSkuListByName" resultType="com.tashow.cloud.productapi.api.product.dto.SkuDO" >
|
||||||
select sku_id, properties, delete_time,deleted from tz_sku
|
select sku_id, properties, delete_time,deleted from tz_sku
|
||||||
<if test="properties != null and properties != ''">
|
<if test="properties != null and properties != ''">
|
||||||
@@ -24,4 +38,22 @@
|
|||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- SkuMapper.xml -->
|
||||||
|
<select id="selectPropertiesByProdIdAndNotDeleted" resultType="string">
|
||||||
|
SELECT properties
|
||||||
|
FROM tz_sku
|
||||||
|
WHERE prod_id = #{prodId}
|
||||||
|
AND deleted = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- SkuMapper.xml -->
|
||||||
|
<select id="selectPropertiesByProdIdShelf" resultType="string">
|
||||||
|
SELECT properties
|
||||||
|
FROM tz_sku
|
||||||
|
WHERE prod_id = #{prodId}
|
||||||
|
AND deleted = 0
|
||||||
|
and is_shelf =0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user