修复足迹不能删除的问题
This commit is contained in:
@ -50,7 +50,7 @@ public interface YxStoreProductRelationService extends BaseService<YxStoreProduc
|
||||
* @param productId 商品id
|
||||
* @param uid 用户id
|
||||
*/
|
||||
void delRroductRelation(long productId,long uid);
|
||||
void delRroductRelation(long productId,long uid,String category);
|
||||
|
||||
/**
|
||||
* 获取用户收藏列表
|
||||
|
@ -96,11 +96,11 @@ public class YxStoreProductRelationServiceImpl extends BaseServiceImpl<YxStorePr
|
||||
* @param uid 用户id
|
||||
*/
|
||||
@Override
|
||||
public void delRroductRelation(long productId,long uid) {
|
||||
public void delRroductRelation(long productId,long uid,String category) {
|
||||
YxStoreProductRelation productRelation = this.lambdaQuery()
|
||||
.eq(YxStoreProductRelation::getProductId,productId)
|
||||
.eq(YxStoreProductRelation::getUid,uid)
|
||||
.eq(YxStoreProductRelation::getType,"collect")
|
||||
.eq(YxStoreProductRelation::getType,category)
|
||||
.one();
|
||||
if(productRelation == null) {
|
||||
throw new YshopException("已取消");
|
||||
|
@ -30,7 +30,7 @@ import java.util.List;
|
||||
@Repository
|
||||
public interface YxStoreProductRelationMapper extends CoreMapper<YxStoreProductRelation> {
|
||||
|
||||
@Select("select B.id pid,A.category,B.store_name as storeName,B.price," +
|
||||
@Select("select B.id pid,A.type as category,B.store_name as storeName,B.price," +
|
||||
"B.ot_price as otPrice,B.sales,B.image,B.is_show as isShow" +
|
||||
" from yx_store_product_relation A left join yx_store_product B " +
|
||||
"on A.product_id = B.id where A.type=#{type} and A.uid=#{uid} and A.is_del = 0 and B.is_del = 0 order by A.create_time desc")
|
||||
|
Reference in New Issue
Block a user