1
This commit is contained in:
@@ -0,0 +1,144 @@
|
||||
package com.ruoyi.jarvis.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* ERP商品关联对象 erp_product_relation
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-01-01
|
||||
*/
|
||||
public class ErpProductRelation extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 常用商品ID */
|
||||
@Excel(name = "常用商品ID")
|
||||
private Long favoriteProductId;
|
||||
|
||||
/** ERP应用ID */
|
||||
@Excel(name = "ERP应用ID")
|
||||
private String appid;
|
||||
|
||||
/** ERP商品ID */
|
||||
@Excel(name = "ERP商品ID")
|
||||
private String erpProductId;
|
||||
|
||||
/** ERP商品标题 */
|
||||
@Excel(name = "ERP商品标题")
|
||||
private String erpProductTitle;
|
||||
|
||||
/** ERP商品链接 */
|
||||
@Excel(name = "ERP商品链接")
|
||||
private String erpProductUrl;
|
||||
|
||||
/** ERP商品状态 */
|
||||
@Excel(name = "ERP商品状态")
|
||||
private String erpProductStatus;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setFavoriteProductId(Long favoriteProductId)
|
||||
{
|
||||
this.favoriteProductId = favoriteProductId;
|
||||
}
|
||||
|
||||
public Long getFavoriteProductId()
|
||||
{
|
||||
return favoriteProductId;
|
||||
}
|
||||
|
||||
public void setAppid(String appid)
|
||||
{
|
||||
this.appid = appid;
|
||||
}
|
||||
|
||||
public String getAppid()
|
||||
{
|
||||
return appid;
|
||||
}
|
||||
|
||||
public void setErpProductId(String erpProductId)
|
||||
{
|
||||
this.erpProductId = erpProductId;
|
||||
}
|
||||
|
||||
public String getErpProductId()
|
||||
{
|
||||
return erpProductId;
|
||||
}
|
||||
|
||||
public void setErpProductTitle(String erpProductTitle)
|
||||
{
|
||||
this.erpProductTitle = erpProductTitle;
|
||||
}
|
||||
|
||||
public String getErpProductTitle()
|
||||
{
|
||||
return erpProductTitle;
|
||||
}
|
||||
|
||||
public void setErpProductUrl(String erpProductUrl)
|
||||
{
|
||||
this.erpProductUrl = erpProductUrl;
|
||||
}
|
||||
|
||||
public String getErpProductUrl()
|
||||
{
|
||||
return erpProductUrl;
|
||||
}
|
||||
|
||||
public void setErpProductStatus(String erpProductStatus)
|
||||
{
|
||||
this.erpProductStatus = erpProductStatus;
|
||||
}
|
||||
|
||||
public String getErpProductStatus()
|
||||
{
|
||||
return erpProductStatus;
|
||||
}
|
||||
|
||||
public void setRemark(String remark)
|
||||
{
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getRemark()
|
||||
{
|
||||
return remark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("favoriteProductId", getFavoriteProductId())
|
||||
.append("appid", getAppid())
|
||||
.append("erpProductId", getErpProductId())
|
||||
.append("erpProductTitle", getErpProductTitle())
|
||||
.append("erpProductUrl", getErpProductUrl())
|
||||
.append("erpProductStatus", getErpProductStatus())
|
||||
.append("remark", getRemark())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,323 @@
|
||||
package com.ruoyi.jarvis.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 常用商品对象 favorite_product
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-01-01
|
||||
*/
|
||||
public class FavoriteProduct extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** SKUID */
|
||||
@Excel(name = "SKUID")
|
||||
private String skuid;
|
||||
|
||||
/** 商品名称 */
|
||||
@Excel(name = "商品名称")
|
||||
private String productName;
|
||||
|
||||
/** 店铺名称 */
|
||||
@Excel(name = "店铺名称")
|
||||
private String shopName;
|
||||
|
||||
/** 店铺ID */
|
||||
@Excel(name = "店铺ID")
|
||||
private String shopId;
|
||||
|
||||
/** 商品链接 */
|
||||
@Excel(name = "商品链接")
|
||||
private String productUrl;
|
||||
|
||||
/** 商品图片 */
|
||||
@Excel(name = "商品图片")
|
||||
private String productImage;
|
||||
|
||||
/** 商品价格 */
|
||||
@Excel(name = "商品价格")
|
||||
private String price;
|
||||
|
||||
/** 佣金信息 */
|
||||
@Excel(name = "佣金信息")
|
||||
private String commissionInfo;
|
||||
|
||||
/** 是否置顶 */
|
||||
@Excel(name = "是否置顶", readConverterExp = "0=否,1=是")
|
||||
private Integer isTop;
|
||||
|
||||
/** 排序权重 */
|
||||
@Excel(name = "排序权重")
|
||||
private Integer sortWeight;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
/** 创建用户ID */
|
||||
@Excel(name = "创建用户ID")
|
||||
private Long createUserId;
|
||||
|
||||
/** 创建用户名 */
|
||||
@Excel(name = "创建用户名")
|
||||
private String createUserName;
|
||||
|
||||
/** ERP商品ID列表(JSON格式) */
|
||||
private String erpProductIds;
|
||||
|
||||
/** ERP商品ID列表(对象形式) */
|
||||
private List<ErpProductRelation> erpProducts;
|
||||
|
||||
/** 商品分类 */
|
||||
@Excel(name = "商品分类")
|
||||
private String category;
|
||||
|
||||
/** 商品品牌 */
|
||||
@Excel(name = "商品品牌")
|
||||
private String brand;
|
||||
|
||||
/** 最后使用时间 */
|
||||
@Excel(name = "最后使用时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private String lastUsedTime;
|
||||
|
||||
/** 使用次数 */
|
||||
@Excel(name = "使用次数")
|
||||
private Integer useCount;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setSkuid(String skuid)
|
||||
{
|
||||
this.skuid = skuid;
|
||||
}
|
||||
|
||||
public String getSkuid()
|
||||
{
|
||||
return skuid;
|
||||
}
|
||||
|
||||
public void setProductName(String productName)
|
||||
{
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getProductName()
|
||||
{
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setShopName(String shopName)
|
||||
{
|
||||
this.shopName = shopName;
|
||||
}
|
||||
|
||||
public String getShopName()
|
||||
{
|
||||
return shopName;
|
||||
}
|
||||
|
||||
public void setShopId(String shopId)
|
||||
{
|
||||
this.shopId = shopId;
|
||||
}
|
||||
|
||||
public String getShopId()
|
||||
{
|
||||
return shopId;
|
||||
}
|
||||
|
||||
public void setProductUrl(String productUrl)
|
||||
{
|
||||
this.productUrl = productUrl;
|
||||
}
|
||||
|
||||
public String getProductUrl()
|
||||
{
|
||||
return productUrl;
|
||||
}
|
||||
|
||||
public void setProductImage(String productImage)
|
||||
{
|
||||
this.productImage = productImage;
|
||||
}
|
||||
|
||||
public String getProductImage()
|
||||
{
|
||||
return productImage;
|
||||
}
|
||||
|
||||
public void setPrice(String price)
|
||||
{
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getPrice()
|
||||
{
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setCommissionInfo(String commissionInfo)
|
||||
{
|
||||
this.commissionInfo = commissionInfo;
|
||||
}
|
||||
|
||||
public String getCommissionInfo()
|
||||
{
|
||||
return commissionInfo;
|
||||
}
|
||||
|
||||
public void setIsTop(Integer isTop)
|
||||
{
|
||||
this.isTop = isTop;
|
||||
}
|
||||
|
||||
public Integer getIsTop()
|
||||
{
|
||||
return isTop;
|
||||
}
|
||||
|
||||
public void setSortWeight(Integer sortWeight)
|
||||
{
|
||||
this.sortWeight = sortWeight;
|
||||
}
|
||||
|
||||
public Integer getSortWeight()
|
||||
{
|
||||
return sortWeight;
|
||||
}
|
||||
|
||||
public void setRemark(String remark)
|
||||
{
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getRemark()
|
||||
{
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setCreateUserId(Long createUserId)
|
||||
{
|
||||
this.createUserId = createUserId;
|
||||
}
|
||||
|
||||
public Long getCreateUserId()
|
||||
{
|
||||
return createUserId;
|
||||
}
|
||||
|
||||
public void setCreateUserName(String createUserName)
|
||||
{
|
||||
this.createUserName = createUserName;
|
||||
}
|
||||
|
||||
public String getCreateUserName()
|
||||
{
|
||||
return createUserName;
|
||||
}
|
||||
|
||||
public void setErpProductIds(String erpProductIds)
|
||||
{
|
||||
this.erpProductIds = erpProductIds;
|
||||
}
|
||||
|
||||
public String getErpProductIds()
|
||||
{
|
||||
return erpProductIds;
|
||||
}
|
||||
|
||||
public List<ErpProductRelation> getErpProducts()
|
||||
{
|
||||
return erpProducts;
|
||||
}
|
||||
|
||||
public void setErpProducts(List<ErpProductRelation> erpProducts)
|
||||
{
|
||||
this.erpProducts = erpProducts;
|
||||
}
|
||||
|
||||
public void setCategory(String category)
|
||||
{
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public String getCategory()
|
||||
{
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setBrand(String brand)
|
||||
{
|
||||
this.brand = brand;
|
||||
}
|
||||
|
||||
public String getBrand()
|
||||
{
|
||||
return brand;
|
||||
}
|
||||
|
||||
public void setLastUsedTime(String lastUsedTime)
|
||||
{
|
||||
this.lastUsedTime = lastUsedTime;
|
||||
}
|
||||
|
||||
public String getLastUsedTime()
|
||||
{
|
||||
return lastUsedTime;
|
||||
}
|
||||
|
||||
public void setUseCount(Integer useCount)
|
||||
{
|
||||
this.useCount = useCount;
|
||||
}
|
||||
|
||||
public Integer getUseCount()
|
||||
{
|
||||
return useCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("skuid", getSkuid())
|
||||
.append("productName", getProductName())
|
||||
.append("shopName", getShopName())
|
||||
.append("shopId", getShopId())
|
||||
.append("productUrl", getProductUrl())
|
||||
.append("productImage", getProductImage())
|
||||
.append("price", getPrice())
|
||||
.append("commissionInfo", getCommissionInfo())
|
||||
.append("isTop", getIsTop())
|
||||
.append("sortWeight", getSortWeight())
|
||||
.append("remark", getRemark())
|
||||
.append("createUserId", getCreateUserId())
|
||||
.append("createUserName", getCreateUserName())
|
||||
.append("erpProductIds", getErpProductIds())
|
||||
.append("category", getCategory())
|
||||
.append("brand", getBrand())
|
||||
.append("lastUsedTime", getLastUsedTime())
|
||||
.append("useCount", getUseCount())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.ruoyi.jarvis.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.jarvis.domain.FavoriteProduct;
|
||||
|
||||
/**
|
||||
* 常用商品Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-01-01
|
||||
*/
|
||||
public interface FavoriteProductMapper
|
||||
{
|
||||
/**
|
||||
* 查询常用商品
|
||||
*
|
||||
* @param id 常用商品主键
|
||||
* @return 常用商品
|
||||
*/
|
||||
public FavoriteProduct selectFavoriteProductById(Long id);
|
||||
|
||||
/**
|
||||
* 查询常用商品列表
|
||||
*
|
||||
* @param favoriteProduct 常用商品
|
||||
* @return 常用商品集合
|
||||
*/
|
||||
public List<FavoriteProduct> selectFavoriteProductList(FavoriteProduct favoriteProduct);
|
||||
|
||||
/**
|
||||
* 新增常用商品
|
||||
*
|
||||
* @param favoriteProduct 常用商品
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertFavoriteProduct(FavoriteProduct favoriteProduct);
|
||||
|
||||
/**
|
||||
* 修改常用商品
|
||||
*
|
||||
* @param favoriteProduct 常用商品
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateFavoriteProduct(FavoriteProduct favoriteProduct);
|
||||
|
||||
/**
|
||||
* 删除常用商品
|
||||
*
|
||||
* @param id 常用商品主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFavoriteProductById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除常用商品
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFavoriteProductByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据SKUID查询常用商品
|
||||
*
|
||||
* @param skuid SKUID
|
||||
* @return 常用商品
|
||||
*/
|
||||
public FavoriteProduct selectFavoriteProductBySkuid(String skuid);
|
||||
|
||||
/**
|
||||
* 更新使用次数和最后使用时间
|
||||
*
|
||||
* @param id 常用商品ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUseCountAndTime(Long id);
|
||||
|
||||
/**
|
||||
* 更新置顶状态和排序权重
|
||||
*
|
||||
* @param favoriteProduct 常用商品
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTopStatus(FavoriteProduct favoriteProduct);
|
||||
|
||||
/**
|
||||
* 查询用户的常用商品列表(按置顶和排序权重排序)
|
||||
*
|
||||
* @param createUserId 创建用户ID
|
||||
* @return 常用商品集合
|
||||
*/
|
||||
public List<FavoriteProduct> selectUserFavoriteProducts(Long createUserId);
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
package com.ruoyi.jarvis.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.jarvis.domain.FavoriteProduct;
|
||||
|
||||
/**
|
||||
* 常用商品Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-01-01
|
||||
*/
|
||||
public interface IFavoriteProductService
|
||||
{
|
||||
/**
|
||||
* 查询常用商品
|
||||
*
|
||||
* @param id 常用商品主键
|
||||
* @return 常用商品
|
||||
*/
|
||||
public FavoriteProduct selectFavoriteProductById(Long id);
|
||||
|
||||
/**
|
||||
* 查询常用商品列表
|
||||
*
|
||||
* @param favoriteProduct 常用商品
|
||||
* @return 常用商品集合
|
||||
*/
|
||||
public List<FavoriteProduct> selectFavoriteProductList(FavoriteProduct favoriteProduct);
|
||||
|
||||
/**
|
||||
* 新增常用商品
|
||||
*
|
||||
* @param favoriteProduct 常用商品
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertFavoriteProduct(FavoriteProduct favoriteProduct);
|
||||
|
||||
/**
|
||||
* 修改常用商品
|
||||
*
|
||||
* @param favoriteProduct 常用商品
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateFavoriteProduct(FavoriteProduct favoriteProduct);
|
||||
|
||||
/**
|
||||
* 批量删除常用商品
|
||||
*
|
||||
* @param ids 需要删除的常用商品主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFavoriteProductByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除常用商品信息
|
||||
*
|
||||
* @param id 常用商品主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFavoriteProductById(Long id);
|
||||
|
||||
/**
|
||||
* 根据SKUID查询常用商品
|
||||
*
|
||||
* @param skuid SKUID
|
||||
* @return 常用商品
|
||||
*/
|
||||
public FavoriteProduct selectFavoriteProductBySkuid(String skuid);
|
||||
|
||||
/**
|
||||
* 添加商品到常用列表
|
||||
*
|
||||
* @param favoriteProduct 常用商品信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int addToFavorites(FavoriteProduct favoriteProduct);
|
||||
|
||||
/**
|
||||
* 从常用列表移除商品
|
||||
*
|
||||
* @param skuid SKUID
|
||||
* @return 结果
|
||||
*/
|
||||
public int removeFromFavorites(String skuid);
|
||||
|
||||
/**
|
||||
* 更新使用次数和最后使用时间
|
||||
*
|
||||
* @param id 常用商品ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUseCountAndTime(Long id);
|
||||
|
||||
/**
|
||||
* 更新置顶状态
|
||||
*
|
||||
* @param id 常用商品ID
|
||||
* @param isTop 是否置顶
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTopStatus(Long id, Integer isTop);
|
||||
|
||||
/**
|
||||
* 批量置顶/取消置顶
|
||||
*
|
||||
* @param ids 常用商品ID数组
|
||||
* @param isTop 是否置顶
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchUpdateTopStatus(Long[] ids, Integer isTop);
|
||||
|
||||
/**
|
||||
* 查询用户的常用商品列表(按置顶和排序权重排序)
|
||||
*
|
||||
* @param createUserId 创建用户ID
|
||||
* @return 常用商品集合
|
||||
*/
|
||||
public List<FavoriteProduct> selectUserFavoriteProducts(Long createUserId);
|
||||
|
||||
/**
|
||||
* 根据线报消息创建常用商品
|
||||
*
|
||||
* @param xbMessageItem 线报消息项
|
||||
* @return 结果
|
||||
*/
|
||||
public int createFromXbMessage(Object xbMessageItem);
|
||||
|
||||
/**
|
||||
* 快速发品(从常用商品)
|
||||
*
|
||||
* @param id 常用商品ID
|
||||
* @param appid ERP应用ID
|
||||
* @return 结果
|
||||
*/
|
||||
public Object quickPublishFromFavorite(Long id, String appid);
|
||||
}
|
||||
Reference in New Issue
Block a user