修复#1DVV7等

This commit is contained in:
hupeng
2020-04-09 11:12:25 +08:00
parent e8cde022a3
commit c83aabad50
5 changed files with 12 additions and 1 deletions

View File

@ -56,6 +56,8 @@ public interface YxStoreProductService extends BaseService<YxStoreProduct> {
*/
YxStoreProductQueryVo getYxStoreProductById(Serializable id);
YxStoreProductQueryVo getNewStoreProductById(int id);
/**
* 获取分页对象
* @param yxStoreProductQueryParam

View File

@ -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);

View File

@ -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"));

View File

@ -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);

View File

@ -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;
// 商品价格