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