|
@@ -45,8 +45,8 @@ public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> i
|
|
|
|
|
|
@Override
|
|
|
public Long addCategory(@NonNull CategoryModifyParam param) {
|
|
|
- Integer count = this.lambdaQuery().eq(Category::getName, param.getName()).count();
|
|
|
- AssertUtils.available(count <= 0, "分类名称已存在");
|
|
|
+// Integer count = this.lambdaQuery().eq(Category::getName, param.getName()).count();
|
|
|
+// AssertUtils.available(count <= 0, "分类名称已存在");
|
|
|
Category category = CategoryCopier.INSTANCE.copying(param);
|
|
|
Long userId = SessionContextHolder.getId();
|
|
|
Scope scope = StringUtils.ifEmpty(SessionContextHolder.getScope(), Scope::parse);
|
|
@@ -175,8 +175,9 @@ public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> i
|
|
|
List<Long> merchants = this.merchantService.getMerchantIdsByUserId(userId);
|
|
|
if (ObjectUtils.isEmpty(merchants)) {
|
|
|
return null;
|
|
|
+ }if ("1".equals(param.getType())){
|
|
|
+ param.setMerchantId(merchants.get(0));
|
|
|
}
|
|
|
- param.setMerchantId(merchants.get(0));
|
|
|
}
|
|
|
List<Category> categories = this.lambdaQuery()
|
|
|
.eq(Category::getEnabled, true)
|