feat:智能柜商品手动上架
feat:增加搜索条件
This commit is contained in:
1 parent
71d39761d5
commit
37469c9ad4
17 files changed
+356
-60
No files matched your search
+27
@@ -0,0 +1,27 @@
|
||||
package com.bsd.pjcloud.hard.api.constant.spu;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.bsd.pjcloud.hard.api.constant.HardPrintStatusEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 上架类型
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum SpuRepertoryTypeEnum {
|
||||
HANDLER("10", "手动上架"),
|
||||
AUTO("20", "自动上架"),
|
||||
;
|
||||
private final String type;
|
||||
private final String description;
|
||||
|
||||
public static SpuRepertoryTypeEnum valueOfByType(String type) {
|
||||
if (ObjectUtil.isEmpty(type)) return null;
|
||||
return Arrays.stream(values()).filter(v -> ObjectUtil.equals(type, v.getType())).findFirst().get();
|
||||
}
|
||||
|
||||
}
|
||||
+8
-1
@@ -3,7 +3,14 @@ package com.bsd.pjcloud.hard.api.dto.spu;
|
||||
import com.bsd.pjcloud.hard.api.entity.spu.HardSpuRepertoryEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class HardSpuRepertoryDto extends HardSpuRepertoryEntity {
|
||||
|
||||
|
||||
private LocalDateTime[] createTimeList;
|
||||
|
||||
private List<Long> userIds;
|
||||
|
||||
}
|
||||
+6
@@ -105,6 +105,12 @@ public class HardSpuEntity extends Model<HardSpuEntity> {
|
||||
@Schema(description = "设备id")
|
||||
private Long hardId;
|
||||
|
||||
/**
|
||||
* 商品放置层数
|
||||
*/
|
||||
@Schema(description = "商品放置层数")
|
||||
private Long hardDoorNumber;
|
||||
|
||||
/**
|
||||
* 商户id
|
||||
*/
|
||||
|
||||
+62
-49
@@ -3,9 +3,13 @@ package com.bsd.pjcloud.hard.api.entity.spu;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Max;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.bsd.pjcloud.common.core.util.TenantTable;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
@@ -19,76 +23,85 @@ import java.time.LocalDateTime;
|
||||
public class HardSpuRepertoryEntity extends Model<HardSpuRepertoryEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description="编号")
|
||||
@Schema(description = "编号")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@Schema(description="用户id")
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@Schema(description = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
@Schema(description="设备id")
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
@Schema(description = "设备id")
|
||||
private Long hardId;
|
||||
|
||||
/**
|
||||
* 商品id
|
||||
*/
|
||||
@Schema(description="商品id")
|
||||
/**
|
||||
* 商品id
|
||||
*/
|
||||
@Schema(description = "商品id")
|
||||
private Long spuId;
|
||||
|
||||
/**
|
||||
* 更新库存数量
|
||||
*/
|
||||
@Schema(description="更新库存数量")
|
||||
/**
|
||||
* 更新库存数量
|
||||
*/
|
||||
@NotNull(message = "更新库存数量不能为空")
|
||||
@Min(value = 1, message = "更新库存数量不能小于1")
|
||||
@Max(value = 100, message = "更新库存数量不能大于100")
|
||||
@Schema(description = "更新库存数量")
|
||||
private Long count;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建人")
|
||||
/**
|
||||
* 上架类型
|
||||
*/
|
||||
@Schema(description = "上架类型")
|
||||
private String bizType;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建时间")
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="修改人")
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description = "修改人")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="修改时间")
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 删除标记
|
||||
*/
|
||||
/**
|
||||
* 删除标记
|
||||
*/
|
||||
@TableLogic
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="删除标记")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description = "删除标记")
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@Schema(description="租户ID")
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@Schema(description = "租户ID")
|
||||
private Long tenantId;
|
||||
}
|
||||
+47
-1
@@ -1,9 +1,55 @@
|
||||
package com.bsd.pjcloud.hard.api.vo.spu;
|
||||
|
||||
import com.bsd.pjcloud.admin.api.vo.base.BaseUserInterface;
|
||||
import com.bsd.pjcloud.hard.api.entity.spu.HardSpuRepertoryEntity;
|
||||
import com.bsd.pjcloud.hard.api.vo.base.BaseHardInterface;
|
||||
import com.bsd.pjcloud.wallet.api.vo.base.BaseMchInterface;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class HardSpuRepertoryVo extends HardSpuRepertoryEntity {
|
||||
public class HardSpuRepertoryVo extends HardSpuRepertoryEntity implements BaseMchInterface, BaseHardInterface, BaseUserInterface {
|
||||
|
||||
/**
|
||||
* 商品相关
|
||||
*/
|
||||
private String spuName;
|
||||
|
||||
private Long spuCategoryId;
|
||||
|
||||
private Long spuMchId;
|
||||
|
||||
private Long hardDoorNumber;
|
||||
|
||||
/**
|
||||
* 分类相关
|
||||
*/
|
||||
private String spuCategoryName;
|
||||
|
||||
|
||||
/**
|
||||
* 商户相关
|
||||
*/
|
||||
private Long merchantId;
|
||||
|
||||
private String merchantName;
|
||||
|
||||
private String logoPic;
|
||||
|
||||
/**
|
||||
* 设备相关
|
||||
*/
|
||||
private String hardName;
|
||||
|
||||
private String hardType;
|
||||
|
||||
/**
|
||||
* 用户相关
|
||||
*/
|
||||
private String username;
|
||||
|
||||
private String userMobile;
|
||||
|
||||
private String userAvatar;
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user