新增:erp、erp-spi
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
package com.zsw.pos.authority.dto.auth;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 登录参数
|
||||
*
|
||||
* @author 云久
|
||||
* @date 2020年01月05日22:18:12
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Builder
|
||||
@ApiModel(value = "LoginParamDTO", description = "登录参数")
|
||||
public class LoginParamDTO implements Serializable {
|
||||
@ApiModelProperty(value = "验证码KEY")
|
||||
private String key;
|
||||
@ApiModelProperty(value = "验证码")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "账号")
|
||||
private String account;
|
||||
@ApiModelProperty(value = "密码")
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* password: 账号密码
|
||||
* refresh_token: 刷新token
|
||||
* captcha: 验证码
|
||||
*/
|
||||
@ApiModelProperty(value = "授权类型", example = "captcha", allowableValues = "captcha,refresh_token,password")
|
||||
@NotEmpty(message = "授权类型不能为空")
|
||||
private String grantType;
|
||||
|
||||
/**
|
||||
* 前端界面点击清空缓存时调用
|
||||
*/
|
||||
@ApiModelProperty(value = "刷新token")
|
||||
private String refreshToken;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.zsw.pos.oauth.service;
|
||||
|
||||
import com.zsw.base.R;
|
||||
import com.zsw.model.TenantAuthInfo;
|
||||
import com.zsw.pos.authority.dto.auth.LoginParamDTO;
|
||||
|
||||
public interface LoginService {
|
||||
|
||||
R<TenantAuthInfo> grant(LoginParamDTO loginParam);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.zsw.pos.product.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@ApiModel("查询店铺商品使用")
|
||||
@Data
|
||||
public class AdminStoreProductDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("是否查询新品")
|
||||
private Integer newItem;
|
||||
|
||||
@ApiModelProperty("价格排序 -1-从小到大 0-不排序 1-从大到小")
|
||||
private Integer price;
|
||||
|
||||
@ApiModelProperty("销量排序 -1-从小到大 0-不排序 1-从大到小")
|
||||
private Integer sellCount;
|
||||
|
||||
@ApiModelProperty("页码 从1开始")
|
||||
private Integer pageIndex;
|
||||
|
||||
@ApiModelProperty("每页大小")
|
||||
private Integer pageSize;
|
||||
|
||||
@ApiModelProperty(value = "起始行; 内部使用", hidden = true)
|
||||
private Integer start;
|
||||
|
||||
@ApiModelProperty(value = "排序条件; 内部使用", hidden = true)
|
||||
private String orderBy;
|
||||
|
||||
@ApiModelProperty("店铺id, 小程序查询需要传这个参数, 管理后台不用")
|
||||
private Long storeId;
|
||||
|
||||
@ApiModelProperty("分组id")
|
||||
private Long groupId;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.zsw.pos.product.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@ApiModel("只需要根据id查询的接口参数对象")
|
||||
public class IdQueryDTO implements Serializable {
|
||||
|
||||
@ApiModelProperty("主键id")
|
||||
private Long id;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.zsw.pos.product.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@ApiModel("商详店铺信息")
|
||||
public class StoreDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("店铺id")
|
||||
private Long id;
|
||||
|
||||
private String storeName;
|
||||
|
||||
@ApiModelProperty("别名")
|
||||
private String nickName;
|
||||
|
||||
@ApiModelProperty("店铺图像")
|
||||
private String logo;
|
||||
|
||||
@ApiModelProperty("商品总类")
|
||||
private Integer productCount;
|
||||
|
||||
@ApiModelProperty("已售数量")
|
||||
private Integer soldNum;
|
||||
}
|
||||
@@ -0,0 +1,213 @@
|
||||
package com.zsw.pos.product.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.zsw.base.entity.Entity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 实体类
|
||||
* 商品表
|
||||
* </p>
|
||||
*
|
||||
* @author JustArgo
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@TableName("ceres_product")
|
||||
@ApiModel(value = "Product", description = "商品表")
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class Product extends Entity<Long> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 供应商
|
||||
*/
|
||||
@ApiModelProperty(value = "供应商")
|
||||
@NotEmpty(message = "供应商不能为空")
|
||||
@TableField(value = "supplier_name", condition = LIKE)
|
||||
private String supplierName;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
@ApiModelProperty(value = "店铺id")
|
||||
@NotNull(message = "店铺id不能为空")
|
||||
@TableField("store_id")
|
||||
private Long storeId;
|
||||
|
||||
/**
|
||||
* 商品类目ID.必须是叶子类目ID
|
||||
*/
|
||||
@ApiModelProperty(value = "商品类目ID.必须是叶子类目ID")
|
||||
@TableField("category_id")
|
||||
private Long categoryId;
|
||||
|
||||
/**
|
||||
* 分组id
|
||||
*/
|
||||
@ApiModelProperty(value = "分组id")
|
||||
@TableField("group_id")
|
||||
private Long groupId;
|
||||
|
||||
/**
|
||||
* 商品简称
|
||||
*/
|
||||
@ApiModelProperty(value = "商品简称")
|
||||
@TableField(value = "short_name", condition = LIKE)
|
||||
private String shortName;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
@ApiModelProperty(value = "商品名称")
|
||||
@TableField(value = "product_name", condition = LIKE)
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 商品卖点说明文字 例如:全网最便宜
|
||||
*/
|
||||
@ApiModelProperty(value = "商品卖点说明文字 例如:全网最便宜")
|
||||
@TableField(value = "sell_desc", condition = LIKE)
|
||||
private String sellDesc;
|
||||
|
||||
/**
|
||||
* 商品自编号
|
||||
*/
|
||||
@ApiModelProperty(value = "商品自编号")
|
||||
@TableField(value = "product_code", condition = LIKE)
|
||||
private String productCode;
|
||||
|
||||
/**
|
||||
* 重量,单位:克
|
||||
*/
|
||||
@ApiModelProperty(value = "重量,单位:克")
|
||||
@TableField("weight")
|
||||
private Long weight;
|
||||
|
||||
/**
|
||||
* 采购价,单位:分
|
||||
*/
|
||||
@ApiModelProperty(value = "采购价,单位:分")
|
||||
@TableField("apply_price")
|
||||
private BigDecimal applyPrice;
|
||||
|
||||
/**
|
||||
* 商品列表时显示的价格
|
||||
*/
|
||||
@ApiModelProperty(value = "商品列表时显示的价格")
|
||||
@TableField("price")
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 总库存
|
||||
*/
|
||||
@ApiModelProperty(value = "总库存")
|
||||
@NotNull(message = "总库存不能为空")
|
||||
@TableField("stock")
|
||||
private Integer stock;
|
||||
|
||||
/**
|
||||
* 总销量
|
||||
*/
|
||||
@ApiModelProperty(value = "总销量")
|
||||
@TableField("sell_count")
|
||||
private Integer sellCount;
|
||||
|
||||
/**
|
||||
* 需要物流:1-需要 0-不需要
|
||||
*/
|
||||
@ApiModelProperty(value = "需要物流:1-需要 0-不需要")
|
||||
@TableField("need_logistics")
|
||||
private Integer needLogistics;
|
||||
|
||||
/**
|
||||
* 允许超卖:1-允许 0-不允许
|
||||
*/
|
||||
@ApiModelProperty(value = "允许超卖:1-允许 0-不允许")
|
||||
@TableField("oversold")
|
||||
private Integer oversold;
|
||||
|
||||
/**
|
||||
* 有机值
|
||||
*/
|
||||
@ApiModelProperty(value = "有机值")
|
||||
@TableField("organic")
|
||||
private Integer organic;
|
||||
|
||||
/**
|
||||
* 状态:1-上架 0-下架
|
||||
*/
|
||||
@ApiModelProperty(value = "状态:1-上架 0-下架")
|
||||
@TableField("status")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否在小程序显示(0:否 1:是)")
|
||||
@TableField("pos_show")
|
||||
private Boolean posShow;
|
||||
|
||||
@ApiModelProperty(value = "商品类型(0:普通类型;1:拼盘类型)")
|
||||
@TableField("product_type")
|
||||
private Integer productType;
|
||||
|
||||
@ApiModelProperty("套餐购买数量 5选2")
|
||||
@TableField("product_number")
|
||||
private Integer productNumber;
|
||||
|
||||
/**
|
||||
* 套餐专属商品 0是 1不是
|
||||
*/
|
||||
@ApiModelProperty(value = "套餐专属商品 0是 1不是")
|
||||
@TableField("set_meal")
|
||||
private Integer setMeal;
|
||||
|
||||
/**
|
||||
* 款式类型:1-多款式 0-单款式
|
||||
*/
|
||||
@ApiModelProperty(value = "款式类型:1-多款式 0-单款式")
|
||||
@TableField("attr_style")
|
||||
private Integer attrStyle;
|
||||
|
||||
/**
|
||||
* 逻辑删除 1-删除 0-未删除
|
||||
*/
|
||||
@ApiModelProperty(value = "逻辑删除 1-删除 0-未删除")
|
||||
@NotNull(message = "逻辑删除 1-删除 0-未删除不能为空")
|
||||
@TableField("is_delete")
|
||||
private Integer isDelete;
|
||||
|
||||
@ApiModelProperty("打印分组标签")
|
||||
@TableField("printer_flag")
|
||||
private String printerFlag;
|
||||
|
||||
@ApiModelProperty("仓库成品物料id")
|
||||
@TableField("material_id")
|
||||
private Long materialId;
|
||||
|
||||
public String getPrinterFlag() {
|
||||
if (ObjectUtils.isEmpty(printerFlag)){
|
||||
return "DEFAULT";
|
||||
}
|
||||
return printerFlag;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
package com.zsw.pos.product.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import com.zsw.base.entity.Entity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 实体类
|
||||
* 商品的sku
|
||||
* </p>
|
||||
*
|
||||
* @author JustArgo
|
||||
* @since 2020-05-18
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@TableName(value = "ceres_product_sku",autoResultMap = true)
|
||||
@ApiModel(value = "ProductSku", description = "商品的sku")
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class ProductSku extends Entity<Long> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
@ApiModelProperty(value = "店铺id")
|
||||
@NotNull(message = "店铺id不能为空")
|
||||
@TableField("store_id")
|
||||
private Long storeId;
|
||||
|
||||
/**
|
||||
* sku编码
|
||||
*/
|
||||
@ApiModelProperty(value = "sku编码")
|
||||
@Length(max = 255, message = "sku编码长度不能超过255")
|
||||
@TableField(value = "sku_code", condition = LIKE)
|
||||
private String skuCode;
|
||||
|
||||
/**
|
||||
* sku的规格值组合,例如:红色 43码
|
||||
*/
|
||||
@ApiModelProperty(value = "sku的规格值组合,例如:红色 43码")
|
||||
@Length(max = 255, message = "sku的规格值组合,例如:红色 43码长度不能超过255")
|
||||
@TableField(value = "sku_name_str", condition = LIKE)
|
||||
private String skuNameStr;
|
||||
|
||||
/**
|
||||
* 商品id
|
||||
*/
|
||||
@ApiModelProperty(value = "商品id")
|
||||
@TableField("product_id")
|
||||
private Long productId;
|
||||
|
||||
/**
|
||||
* 销售价
|
||||
*/
|
||||
@ApiModelProperty(value = "销售价")
|
||||
@TableField("sku_price")
|
||||
private BigDecimal skuPrice;
|
||||
|
||||
/**
|
||||
* 采购价
|
||||
*/
|
||||
@ApiModelProperty(value = "采购价")
|
||||
@TableField("apply_price")
|
||||
private BigDecimal applyPrice;
|
||||
|
||||
@ApiModelProperty("会员价格")
|
||||
@TableField("vip_price")
|
||||
private BigDecimal vipPrice;
|
||||
|
||||
|
||||
/**
|
||||
* sku的图片
|
||||
*/
|
||||
@ApiModelProperty(value = "sku的图片")
|
||||
@Length(max = 200, message = "sku的图片长度不能超过200")
|
||||
@TableField(value = "sku_img", condition = LIKE)
|
||||
private String skuImg;
|
||||
|
||||
/**
|
||||
* sku的库存
|
||||
*/
|
||||
@ApiModelProperty(value = "sku的库存 只用于不启用进销存")
|
||||
@TableField("sku_stock")
|
||||
private Integer skuStock;
|
||||
|
||||
/**
|
||||
* 自动恢复库存(如果大于0,则每天凌晨恢复到设置的库存)
|
||||
*/
|
||||
@ApiModelProperty(value = "自动恢复库存")
|
||||
@TableField("auto_renew_sku_stock")
|
||||
private Integer autoRenewSkuStock;
|
||||
|
||||
@ApiModelProperty(value = "sku的排序")
|
||||
@TableField("sort")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* sku套餐
|
||||
*/
|
||||
@ApiModelProperty(value = "sku套餐")
|
||||
@TableField("set_meal")
|
||||
private String setMeal;
|
||||
|
||||
|
||||
/**
|
||||
* 重量,单位(千克)
|
||||
*/
|
||||
@ApiModelProperty(value = "重量,单位(千克)")
|
||||
@TableField("weight")
|
||||
private Double weight;
|
||||
|
||||
@ApiModelProperty(value = "体积,单位(平方米)")
|
||||
@TableField("volume")
|
||||
private Double volume;
|
||||
|
||||
/**
|
||||
* 逻辑删除 1-删除 0-未删除
|
||||
*/
|
||||
@ApiModelProperty(value = "逻辑删除 1-删除 0-未删除")
|
||||
@NotNull(message = "逻辑删除 1-删除 0-未删除不能为空")
|
||||
@TableField("is_delete")
|
||||
private Integer isDelete;
|
||||
|
||||
@ApiModelProperty("SKU的原材料信息")
|
||||
@TableField(value = "material",typeHandler = JacksonTypeHandler.class)
|
||||
private SkuMaterial material;
|
||||
|
||||
private Integer version;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.zsw.pos.product.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@ApiModel("sku的物料设置")
|
||||
public class SkuMaterial {
|
||||
|
||||
@ApiModelProperty("成品id")
|
||||
@NotNull(message = "物料id不能为空")
|
||||
private Long materialId;
|
||||
|
||||
@ApiModelProperty("标准量")
|
||||
@NotNull(message = "标准数量不能为空")
|
||||
private BigDecimal num;
|
||||
|
||||
@ApiModelProperty("成品名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("单位")
|
||||
private String unit;
|
||||
|
||||
@ApiModelProperty("是否可用")
|
||||
private Boolean enable;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.zsw.pos.product.service;
|
||||
|
||||
|
||||
import com.zsw.base.R;
|
||||
import com.zsw.base.service.SuperService;
|
||||
import com.zsw.pos.product.dto.AdminStoreProductDTO;
|
||||
import com.zsw.pos.product.entity.Product;
|
||||
import com.zsw.pos.product.vo.ProductPageVO;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 业务接口
|
||||
* 商品表
|
||||
* </p>
|
||||
*
|
||||
* @author JustArgo
|
||||
* @date 2020-05-03
|
||||
*/
|
||||
public interface ProductService extends SuperService<Product> {
|
||||
|
||||
R<ProductPageVO> findAdminStoreProductList(AdminStoreProductDTO adminStoreProductDTO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.zsw.pos.product.service;
|
||||
|
||||
import com.zsw.base.service.SuperService;
|
||||
import com.zsw.pos.product.entity.ProductSku;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 业务接口
|
||||
* 商品的sku
|
||||
* </p>
|
||||
*
|
||||
* @author JustArgo
|
||||
* @date 2020-05-07
|
||||
*/
|
||||
public interface ProductSkuService extends SuperService<ProductSku> {
|
||||
|
||||
List<ProductSku> getProductSkuByMaterial(@Param("ids") List<Long> ids);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.zsw.pos.product.vo;
|
||||
|
||||
import com.zsw.pos.promotion.vo.web.PromotionShowVO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel("商品列表对象")
|
||||
@Data
|
||||
public class ProductPageVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("商品列表")
|
||||
private List<ProductVO> productVOList;
|
||||
|
||||
@ApiModelProperty("商品符合的营销活动的列表")
|
||||
private List<PromotionShowVO> promotionShowVOList;
|
||||
|
||||
@ApiModelProperty("总数")
|
||||
private Integer total;
|
||||
|
||||
public ProductPageVO(){
|
||||
this.total = 0;
|
||||
this.productVOList = Collections.emptyList();
|
||||
}
|
||||
|
||||
public ProductPageVO(Integer total, List<ProductVO> productVOList){
|
||||
this.total = total;
|
||||
this.productVOList = productVOList;
|
||||
}
|
||||
|
||||
public ProductPageVO(Integer total, List<ProductVO> productVOList, List<PromotionShowVO> promotionShowVOList){
|
||||
this.total = total;
|
||||
this.productVOList = productVOList;
|
||||
this.promotionShowVOList = promotionShowVOList;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.zsw.pos.product.vo;
|
||||
|
||||
import cn.hutool.json.JSONArray;
|
||||
import com.zsw.pos.product.dto.StoreDTO;
|
||||
import com.zsw.pos.product.entity.Product;
|
||||
import com.zsw.pos.promotion.dto.ProductSkuVO;
|
||||
import com.zsw.pos.promotion.vo.web.PromotionShowVO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel("商详对象")
|
||||
@Data
|
||||
public class ProductVO extends Product {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("商品图片列表")
|
||||
private List<String> imgs;
|
||||
|
||||
@ApiModelProperty("门店信息")
|
||||
private StoreDTO storeDTO;
|
||||
|
||||
@ApiModelProperty("规格列表")
|
||||
private JSONArray attrList;
|
||||
|
||||
@ApiModelProperty("商品sku列表")
|
||||
private List<ProductSkuVO> productSkuVOList;
|
||||
|
||||
@ApiModelProperty("发货地址")
|
||||
private String shipAddress;
|
||||
|
||||
@ApiModelProperty("付款人数")
|
||||
private Integer buyCount;
|
||||
|
||||
@ApiModelProperty("参加的活动列表")
|
||||
private List<PromotionShowVO> promotionShowVOList;
|
||||
|
||||
@ApiModelProperty("默认购买数量。。。")
|
||||
private Integer buyNum;
|
||||
|
||||
@ApiModelProperty("商品拼盘数据")
|
||||
JSONArray productPlatterInfos;
|
||||
|
||||
@ApiModelProperty("该商品被手动标记售罄")
|
||||
private Boolean markProductNone;
|
||||
|
||||
@ApiModelProperty("名称拼音")
|
||||
private String namePinyin;
|
||||
|
||||
@ApiModelProperty("首字母缩写")
|
||||
private String nameInitials;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.zsw.pos.promotion.dto;
|
||||
|
||||
import cn.hutool.json.JSONArray;
|
||||
import com.zsw.pos.product.entity.ProductSku;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 实体类
|
||||
* 商品的sku
|
||||
* </p>
|
||||
*
|
||||
* @author JustArgo
|
||||
* @since 2020-05-16
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "ProductSkuSaveDTO", description = "商品的sku")
|
||||
public class ProductSkuSaveDTO extends ProductSku {
|
||||
|
||||
@ApiModelProperty(value = "sku对应的规格编码")
|
||||
private JSONArray skuAttrCodeDTOList;
|
||||
|
||||
@ApiModelProperty(value = "sku对应的规格列表,编辑商品时使用")
|
||||
private JSONArray skuAttrList;
|
||||
|
||||
@ApiModelProperty(value = "sku里的setMeal详情,点套餐时使用")
|
||||
private JSONArray setMealDTOList;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.zsw.pos.promotion.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
|
||||
@ApiModel("商品sku的前端返回对象")
|
||||
@Data
|
||||
public class ProductSkuVO extends ProductSkuSaveDTO {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.zsw.pos.promotion.vo.web;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 营销活动列表展示对象
|
||||
*/
|
||||
@ApiModel("营销活动列表展示对象")
|
||||
@Data
|
||||
public class PromotionShowVO {
|
||||
|
||||
@ApiModelProperty("营销活动的id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("营销活动的标签")
|
||||
private String tag;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.zsw.pos.store;
|
||||
|
||||
import com.zsw.base.service.SuperService;
|
||||
import com.zsw.pos.store.entity.Store;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 业务接口 店铺表
|
||||
* </p>
|
||||
*
|
||||
* @author kellen
|
||||
* @date 2020-05-14
|
||||
*/
|
||||
|
||||
public interface StoreService extends SuperService<Store> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,276 @@
|
||||
package com.zsw.pos.store.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.zsw.base.entity.Entity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
|
||||
import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 实体类 店铺表
|
||||
* </p>
|
||||
*
|
||||
* @author kellen
|
||||
* @since 2020-05-14
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@TableName(value = "ceres_store", autoResultMap = true)
|
||||
@ApiModel(value = "Store", description = "店铺表")
|
||||
@AllArgsConstructor
|
||||
public class Store extends Entity<Long> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "租户编号")
|
||||
private String tenantCode;
|
||||
|
||||
@ApiModelProperty(value = "是否用进销存管理库存(0:否;1:是)")
|
||||
@TableField(value = "use_erp")
|
||||
private Boolean useErp;
|
||||
|
||||
/**
|
||||
* 营业开始时间
|
||||
*/
|
||||
@ApiModelProperty(value = "营业开始时间")
|
||||
@TableField(value = "open_start_time")
|
||||
@JsonFormat(pattern = "HH:mm:ss")
|
||||
private LocalTime openStartTime;
|
||||
|
||||
/**
|
||||
* 营业结束时间
|
||||
*/
|
||||
@ApiModelProperty(value = "营业结束时间")
|
||||
@TableField(value = "open_end_time")
|
||||
@JsonFormat(pattern = "HH:mm:ss")
|
||||
private LocalTime openEndTime;
|
||||
|
||||
/**
|
||||
* 店铺名称
|
||||
*/
|
||||
@ApiModelProperty(value = "店铺名称")
|
||||
@Length(max = 200, message = "店铺名称长度不能超过200")
|
||||
@TableField(value = "store_name", condition = LIKE)
|
||||
private String storeName;
|
||||
|
||||
@ApiModelProperty(value = "店铺别名")
|
||||
@TableField("nick_name")
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
* logo
|
||||
*/
|
||||
@ApiModelProperty(value = "logo")
|
||||
@Length(max = 500, message = "logo长度不能超过500")
|
||||
@TableField(value = "logo", condition = LIKE)
|
||||
private String logo;
|
||||
|
||||
/**
|
||||
* facade
|
||||
*/
|
||||
@ApiModelProperty(value = "facade")
|
||||
@Length(max = 500, message = "facade长度不能超过500")
|
||||
@TableField(value = "facade", condition = LIKE)
|
||||
private String facade;
|
||||
|
||||
/**
|
||||
* 发货地址
|
||||
*/
|
||||
@ApiModelProperty(value = "发货地址")
|
||||
@Length(max = 500, message = "发货地址长度不能超过500")
|
||||
@TableField(value = "ship_address", condition = LIKE)
|
||||
private String shipAddress;
|
||||
|
||||
/**
|
||||
* 店铺简介
|
||||
*/
|
||||
@ApiModelProperty(value = "店铺简介")
|
||||
@Length(max = 500, message = "店铺简介长度不能超过500")
|
||||
@TableField(value = "remark", condition = LIKE)
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 注册手机号
|
||||
*/
|
||||
@ApiModelProperty(value = "注册手机号")
|
||||
@NotEmpty(message = "注册手机号不能为空")
|
||||
@Length(max = 32, message = "注册手机号长度不能超过32")
|
||||
@TableField(value = "mobile", condition = LIKE)
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty("经度")
|
||||
private BigDecimal longitude;
|
||||
|
||||
@ApiModelProperty("纬度")
|
||||
private BigDecimal latitude;
|
||||
|
||||
/**
|
||||
* 退货地址
|
||||
*/
|
||||
@ApiModelProperty(value = "退货地址")
|
||||
@Length(max = 500, message = "退货地址长度不能超过500")
|
||||
@TableField(value = "refund_address", condition = LIKE)
|
||||
private String refundAddress;
|
||||
|
||||
/**
|
||||
* 退货联系电话
|
||||
*/
|
||||
@ApiModelProperty(value = "退货联系电话")
|
||||
@Length(max = 32, message = "退货联系电话长度不能超过32")
|
||||
@TableField(value = "refund_tel", condition = LIKE)
|
||||
private String refundTel;
|
||||
|
||||
/**
|
||||
* 退货联系人
|
||||
*/
|
||||
@ApiModelProperty(value = "退货联系人")
|
||||
@Length(max = 32, message = "退货联系人长度不能超过32")
|
||||
@TableField(value = "refund_contact", condition = LIKE)
|
||||
private String refundContact;
|
||||
|
||||
/**
|
||||
* 是否自动发送退货地址给买家 0否 1是
|
||||
*/
|
||||
@ApiModelProperty(value = "是否自动发送退货地址给买家 0否 1是")
|
||||
@NotNull(message = "是否自动发送退货地址给买家 0否 1是不能为空")
|
||||
@TableField("is_auto_send_refund_address")
|
||||
private Integer isAutoSendRefundAddress;
|
||||
|
||||
/**
|
||||
* 省份
|
||||
*/
|
||||
@ApiModelProperty(value = "省份")
|
||||
@NotEmpty(message = "省份不能为空")
|
||||
@Length(max = 20, message = "省份长度不能超过20")
|
||||
@TableField(value = "province", condition = LIKE)
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 城市
|
||||
*/
|
||||
@ApiModelProperty(value = "城市")
|
||||
@NotEmpty(message = "城市不能为空")
|
||||
@Length(max = 20, message = "城市长度不能超过20")
|
||||
@TableField(value = "city", condition = LIKE)
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 地区
|
||||
*/
|
||||
@ApiModelProperty(value = "地区")
|
||||
@NotEmpty(message = "地区不能为空")
|
||||
@Length(max = 20, message = "地区长度不能超过20")
|
||||
@TableField(value = "district", condition = LIKE)
|
||||
private String district;
|
||||
|
||||
/**
|
||||
* 详细地址
|
||||
*/
|
||||
@ApiModelProperty(value = "详细地址")
|
||||
@NotEmpty(message = "详细地址不能为空")
|
||||
@Length(max = 250, message = "详细地址长度不能超过250")
|
||||
@TableField(value = "address", condition = LIKE)
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 负责人名称
|
||||
*/
|
||||
@ApiModelProperty(value = "负责人名称")
|
||||
@Length(max = 50, message = "负责人名称长度不能超过50")
|
||||
@TableField(value = "head_name", condition = LIKE)
|
||||
private String headName;
|
||||
|
||||
/**
|
||||
* 收货人电话
|
||||
*/
|
||||
@ApiModelProperty(value = "负责人电话")
|
||||
@NotEmpty(message = "负责人电话不能为空")
|
||||
@Length(max = 30, message = "负责人电话长度不能超过30")
|
||||
@TableField(value = "head_mobile", condition = LIKE)
|
||||
private String headMobile;
|
||||
|
||||
@ApiModelProperty(value = "联系电话")
|
||||
@TableField(value = "tel")
|
||||
private String tel;
|
||||
|
||||
@ApiModelProperty("提供服务")
|
||||
@TableField("business_service")
|
||||
private String businessService;
|
||||
|
||||
@ApiModelProperty("业务类型")
|
||||
@TableField("business_type")
|
||||
private String businessType;
|
||||
|
||||
/**
|
||||
* 收单类型
|
||||
* #{NORMAL:普通收单;FAST:快消收单
|
||||
*/
|
||||
// @ApiModelProperty(value = "收单类型")
|
||||
// @TableField("pos_type")
|
||||
// @JsonProperty(value = "posType")
|
||||
// private TenantPosTypeEnum posType;
|
||||
//
|
||||
// @ApiModelProperty("第三方配送设置")
|
||||
// @TableField(value = "delivery_info", typeHandler = JacksonTypeHandler.class)
|
||||
// private DeliveryInfo deliveryInfo;
|
||||
//
|
||||
// @ApiModelProperty("小程序配置")
|
||||
// @TableField(value = "mini_param", typeHandler = JacksonTypeHandler.class)
|
||||
// private MiniParam miniParam;
|
||||
|
||||
@ApiModelProperty("店铺余额")
|
||||
private BigDecimal money;
|
||||
|
||||
@ApiModelProperty("平台是否显示")
|
||||
@TableField("platform_show")
|
||||
private Boolean platformShow;
|
||||
|
||||
@TableLogic
|
||||
@TableField("is_delete")
|
||||
private Integer is_delete;
|
||||
|
||||
@Builder
|
||||
public Store(Long id, LocalDateTime createTime, Long createUser, LocalDateTime updateTime, Long updateUser, String tenantCode, Boolean useErp, LocalTime openStartTime, LocalTime openEndTime, String storeName, String nickName, String logo, String shipAddress, String remark, String mobile, BigDecimal longitude, BigDecimal latitude, String refundAddress, String refundTel, String refundContact, Integer isAutoSendRefundAddress, String province, String city, String district, String address, String headName, String headMobile, Boolean platformShow) {
|
||||
super(id, createTime, createUser, updateTime, updateUser);
|
||||
this.tenantCode = tenantCode;
|
||||
this.useErp = useErp;
|
||||
this.openStartTime = openStartTime;
|
||||
this.openEndTime = openEndTime;
|
||||
this.storeName = storeName;
|
||||
this.nickName = nickName;
|
||||
this.logo = logo;
|
||||
this.shipAddress = shipAddress;
|
||||
this.remark = remark;
|
||||
this.mobile = mobile;
|
||||
this.longitude = longitude;
|
||||
this.latitude = latitude;
|
||||
this.refundAddress = refundAddress;
|
||||
this.refundTel = refundTel;
|
||||
this.refundContact = refundContact;
|
||||
this.isAutoSendRefundAddress = isAutoSendRefundAddress;
|
||||
this.province = province;
|
||||
this.city = city;
|
||||
this.district = district;
|
||||
this.address = address;
|
||||
this.headName = headName;
|
||||
this.headMobile = headMobile;
|
||||
this.platformShow = platformShow;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user