Commit 74889956 authored by shiyu's avatar shiyu

用户商品关联表删除,直接用商品表记录用户id

parent b6e3ab8f
......@@ -437,6 +437,9 @@ public class ItemDaoImpl implements ItemDao {
private List<UserItemsRelation> convertList(List<Item> items) {
List<UserItemsRelation> list = new ArrayList<>();
if (CollectionUtils.isEmpty(items)) {
return list;
}
items.forEach(item -> {
UserItemsRelation userItemsRelation = new UserItemsRelation();
userItemsRelation.setItemId(item.getId());
......@@ -447,6 +450,9 @@ public class ItemDaoImpl implements ItemDao {
}
private UserItemsRelation convert(Item item) {
if (ObjectUtils.isEmpty(item)) {
return null;
}
UserItemsRelation userItemsRelation = new UserItemsRelation();
userItemsRelation.setItemId(item.getId());
userItemsRelation.setUserId(item.getUserId());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment