no message
This commit is contained in:
parent
c726bf91d4
commit
a82b513755
|
|
@ -48,7 +48,8 @@
|
|||
<label class="col-sm-3 control-label">类目类别:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('goods_category_type')}">
|
||||
<input type="radio" th:id="${dict.dictCode}" name="type" th:value="${dict.dictValue}" th:checked="${dict.default}">
|
||||
<input type="radio" th:id="${dict.dictCode}" name="type" th:value="${dict.dictValue}"
|
||||
th:checked="${goodsCategory.type != null ? goodsCategory.type.toString() == dict.dictValue : dict.default}">
|
||||
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -159,8 +159,11 @@ public class DeptGoodsCategoryServiceImpl implements DeptGoodsCategoryService {
|
|||
GoodsCategory goodsCategory = goodsCategoryService.selectById(checked[0]);
|
||||
Assert.notNull(goodsCategory, "不存在该类目: " + checked[0]);
|
||||
List<DeptGoodsCategory> oldList = deptGoodsCategoryMapper.selectByDeptId(parentId);
|
||||
Map<Long, Long> oldMap = oldList.stream().filter(x -> x.getType().equals(goodsCategory.getType()))
|
||||
.collect(Collectors.toMap(GoodsCategory::getGoodsCategoryId, DeptGoodsCategory::getDeptGoodsCategoryId));
|
||||
|
||||
Map<Long, Long> oldMap = oldList.stream()
|
||||
.filter(x -> x.getType() != null && goodsCategory.getType() != null && x.getType().equals(goodsCategory.getType()))
|
||||
.collect(Collectors.toMap(DeptGoodsCategory::getGoodsCategoryId, DeptGoodsCategory::getDeptGoodsCategoryId));
|
||||
|
||||
HashSet<Long> newSet = new HashSet<>(Arrays.asList(checked));
|
||||
Set<Long> intersection = oldList.stream().map(DeptGoodsCategory::getGoodsCategoryId).collect(Collectors.toSet());
|
||||
intersection.addAll(Arrays.asList(checked));
|
||||
|
|
|
|||
Loading…
Reference in New Issue