修复#1DVV7等
This commit is contained in:
@ -56,6 +56,8 @@ public interface YxStoreProductService extends BaseService<YxStoreProduct> {
|
|||||||
*/
|
*/
|
||||||
YxStoreProductQueryVo getYxStoreProductById(Serializable id);
|
YxStoreProductQueryVo getYxStoreProductById(Serializable id);
|
||||||
|
|
||||||
|
YxStoreProductQueryVo getNewStoreProductById(int id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取分页对象
|
* 获取分页对象
|
||||||
* @param yxStoreProductQueryParam
|
* @param yxStoreProductQueryParam
|
||||||
|
@ -171,7 +171,7 @@ public class YxStoreCartServiceImpl extends BaseServiceImpl<YxStoreCartMapper, Y
|
|||||||
}else{
|
}else{
|
||||||
//必须得重新克隆创建一个新对象
|
//必须得重新克隆创建一个新对象
|
||||||
storeProduct = ObjectUtil.clone(productService
|
storeProduct = ObjectUtil.clone(productService
|
||||||
.getYxStoreProductById(storeCart.getProductId()));
|
.getNewStoreProductById(storeCart.getProductId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
YxStoreCartQueryVo storeCartQueryVo = cartMap.toDto(storeCart);
|
YxStoreCartQueryVo storeCartQueryVo = cartMap.toDto(storeCart);
|
||||||
|
@ -260,6 +260,11 @@ public class YxStoreProductServiceImpl extends BaseServiceImpl<YxStoreProductMap
|
|||||||
return yxStoreProductMapper.getYxStoreProductById(id);
|
return yxStoreProductMapper.getYxStoreProductById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public YxStoreProductQueryVo getNewStoreProductById(int id) {
|
||||||
|
return storeProductMap.toDto(yxStoreProductMapper.selectById(id));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Paging<YxStoreProductQueryVo> getYxStoreProductPageList(YxStoreProductQueryParam yxStoreProductQueryParam) throws Exception{
|
public Paging<YxStoreProductQueryVo> getYxStoreProductPageList(YxStoreProductQueryParam yxStoreProductQueryParam) throws Exception{
|
||||||
Page page = setPageParam(yxStoreProductQueryParam,OrderItem.desc("create_time"));
|
Page page = setPageParam(yxStoreProductQueryParam,OrderItem.desc("create_time"));
|
||||||
|
@ -133,6 +133,7 @@ public class YxSystemUserTaskServiceImpl extends BaseServiceImpl<YxSystemUserTas
|
|||||||
List<YxSystemUserTask> list = yxSystemUserTaskMapper.selectList(wrapper);
|
List<YxSystemUserTask> list = yxSystemUserTaskMapper.selectList(wrapper);
|
||||||
List<Integer> taskIds = list.stream().map(YxSystemUserTask::getId)
|
List<Integer> taskIds = list.stream().map(YxSystemUserTask::getId)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
if(taskIds.isEmpty()) return 0;
|
||||||
|
|
||||||
QueryWrapper<YxUserTaskFinish> wrapperT = new QueryWrapper<>();
|
QueryWrapper<YxUserTaskFinish> wrapperT = new QueryWrapper<>();
|
||||||
wrapperT.in("task_id",taskIds).eq("uid",uid);
|
wrapperT.in("task_id",taskIds).eq("uid",uid);
|
||||||
|
@ -3,6 +3,8 @@ package co.yixiang.modules.shop.domain;
|
|||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.bean.copier.CopyOptions;
|
import cn.hutool.core.bean.copier.CopyOptions;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.hibernate.annotations.NotFound;
|
||||||
|
import org.hibernate.annotations.NotFoundAction;
|
||||||
|
|
||||||
import javax.persistence.*;
|
import javax.persistence.*;
|
||||||
import javax.validation.constraints.Min;
|
import javax.validation.constraints.Min;
|
||||||
@ -63,6 +65,7 @@ public class YxStoreProduct implements Serializable {
|
|||||||
|
|
||||||
@ManyToOne(fetch=FetchType.LAZY,optional = false)
|
@ManyToOne(fetch=FetchType.LAZY,optional = false)
|
||||||
@JoinColumn(name = "cate_id")
|
@JoinColumn(name = "cate_id")
|
||||||
|
@NotFound(action= NotFoundAction.IGNORE)
|
||||||
private YxStoreCategory storeCategory;
|
private YxStoreCategory storeCategory;
|
||||||
|
|
||||||
// 商品价格
|
// 商品价格
|
||||||
|
Reference in New Issue
Block a user