1
This commit is contained in:
@@ -94,6 +94,14 @@ public class FavoriteProduct extends BaseEntity
|
|||||||
@Excel(name = "使用次数")
|
@Excel(name = "使用次数")
|
||||||
private Integer useCount;
|
private Integer useCount;
|
||||||
|
|
||||||
|
/** 发品后的商品ID */
|
||||||
|
@Excel(name = "发品商品ID")
|
||||||
|
private String productId;
|
||||||
|
|
||||||
|
/** 发品状态 */
|
||||||
|
@Excel(name = "发品状态")
|
||||||
|
private Integer productStatus;
|
||||||
|
|
||||||
public void setId(Long id)
|
public void setId(Long id)
|
||||||
{
|
{
|
||||||
this.id = id;
|
this.id = id;
|
||||||
@@ -294,6 +302,26 @@ public class FavoriteProduct extends BaseEntity
|
|||||||
return useCount;
|
return useCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setProductId(String productId)
|
||||||
|
{
|
||||||
|
this.productId = productId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductId()
|
||||||
|
{
|
||||||
|
return productId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductStatus(Integer productStatus)
|
||||||
|
{
|
||||||
|
this.productStatus = productStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getProductStatus()
|
||||||
|
{
|
||||||
|
return productStatus;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
@@ -312,6 +340,8 @@ public class FavoriteProduct extends BaseEntity
|
|||||||
.append("createUserId", getCreateUserId())
|
.append("createUserId", getCreateUserId())
|
||||||
.append("createUserName", getCreateUserName())
|
.append("createUserName", getCreateUserName())
|
||||||
.append("erpProductIds", getErpProductIds())
|
.append("erpProductIds", getErpProductIds())
|
||||||
|
.append("productId", getProductId())
|
||||||
|
.append("productStatus", getProductStatus())
|
||||||
.append("category", getCategory())
|
.append("category", getCategory())
|
||||||
.append("brand", getBrand())
|
.append("brand", getBrand())
|
||||||
.append("lastUsedTime", getLastUsedTime())
|
.append("lastUsedTime", getLastUsedTime())
|
||||||
|
|||||||
@@ -83,6 +83,14 @@ public interface FavoriteProductMapper
|
|||||||
*/
|
*/
|
||||||
public int updateTopStatus(FavoriteProduct favoriteProduct);
|
public int updateTopStatus(FavoriteProduct favoriteProduct);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新发品信息
|
||||||
|
*
|
||||||
|
* @param favoriteProduct 常用商品
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateProductInfo(FavoriteProduct favoriteProduct);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询用户的常用商品列表(按置顶和排序权重排序)
|
* 查询用户的常用商品列表(按置顶和排序权重排序)
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -133,4 +133,12 @@ public interface IFavoriteProductService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public Object quickPublishFromFavorite(Long id, String appid);
|
public Object quickPublishFromFavorite(Long id, String appid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新发品信息
|
||||||
|
*
|
||||||
|
* @param favoriteProduct 常用商品信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateProductInfo(FavoriteProduct favoriteProduct);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -275,4 +275,16 @@ public class FavoriteProductServiceImpl implements IFavoriteProductService
|
|||||||
// 暂时返回成功信息
|
// 暂时返回成功信息
|
||||||
return "发品请求已提交,应用ID: " + appid;
|
return "发品请求已提交,应用ID: " + appid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新发品信息
|
||||||
|
*
|
||||||
|
* @param favoriteProduct 常用商品信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateProductInfo(FavoriteProduct favoriteProduct)
|
||||||
|
{
|
||||||
|
return favoriteProductMapper.updateProductInfo(favoriteProduct);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="brand" column="brand" />
|
<result property="brand" column="brand" />
|
||||||
<result property="lastUsedTime" column="last_used_time"/>
|
<result property="lastUsedTime" column="last_used_time"/>
|
||||||
<result property="useCount" column="use_count" />
|
<result property="useCount" column="use_count" />
|
||||||
|
<result property="productId" column="product_id" />
|
||||||
|
<result property="productStatus" column="product_status"/>
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
@@ -32,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
select id, skuid, product_name, shop_name, shop_id, product_url, product_image,
|
select id, skuid, product_name, shop_name, shop_id, product_url, product_image,
|
||||||
price, commission_info, is_top, sort_weight, remark, create_user_id,
|
price, commission_info, is_top, sort_weight, remark, create_user_id,
|
||||||
create_user_name, erp_product_ids, category, brand, last_used_time,
|
create_user_name, erp_product_ids, category, brand, last_used_time,
|
||||||
use_count, create_time, update_time
|
use_count, product_id, product_status, create_time, update_time
|
||||||
from favorite_product
|
from favorite_product
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
@@ -94,6 +96,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="brand != null and brand != ''">brand,</if>
|
<if test="brand != null and brand != ''">brand,</if>
|
||||||
<if test="lastUsedTime != null and lastUsedTime != ''">last_used_time,</if>
|
<if test="lastUsedTime != null and lastUsedTime != ''">last_used_time,</if>
|
||||||
<if test="useCount != null">use_count,</if>
|
<if test="useCount != null">use_count,</if>
|
||||||
|
<if test="productId != null and productId != ''">product_id,</if>
|
||||||
|
<if test="productStatus != null">product_status,</if>
|
||||||
create_time,
|
create_time,
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
@@ -115,6 +119,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="brand != null and brand != ''">#{brand},</if>
|
<if test="brand != null and brand != ''">#{brand},</if>
|
||||||
<if test="lastUsedTime != null and lastUsedTime != ''">#{lastUsedTime},</if>
|
<if test="lastUsedTime != null and lastUsedTime != ''">#{lastUsedTime},</if>
|
||||||
<if test="useCount != null">#{useCount},</if>
|
<if test="useCount != null">#{useCount},</if>
|
||||||
|
<if test="productId != null and productId != ''">#{productId},</if>
|
||||||
|
<if test="productStatus != null">#{productStatus},</if>
|
||||||
sysdate(),
|
sysdate(),
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
@@ -140,6 +146,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="brand != null and brand != ''">brand = #{brand},</if>
|
<if test="brand != null and brand != ''">brand = #{brand},</if>
|
||||||
<if test="lastUsedTime != null and lastUsedTime != ''">last_used_time = #{lastUsedTime},</if>
|
<if test="lastUsedTime != null and lastUsedTime != ''">last_used_time = #{lastUsedTime},</if>
|
||||||
<if test="useCount != null">use_count = #{useCount},</if>
|
<if test="useCount != null">use_count = #{useCount},</if>
|
||||||
|
<if test="productId != null and productId != ''">product_id = #{productId},</if>
|
||||||
|
<if test="productStatus != null">product_status = #{productStatus},</if>
|
||||||
update_time = sysdate(),
|
update_time = sysdate(),
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
@@ -172,4 +180,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="updateProductInfo" parameterType="FavoriteProduct">
|
||||||
|
update favorite_product
|
||||||
|
set product_id = #{productId},
|
||||||
|
product_status = #{productStatus},
|
||||||
|
update_time = sysdate()
|
||||||
|
where skuid = #{skuid}
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user