|
@@ -13,12 +13,13 @@ import org.dromara.common.core.utils.MapstructUtils;
|
|
|
import org.dromara.common.core.utils.StringUtils;
|
|
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
-import org.dromara.common.satoken.utils.LoginHelper;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
|
|
|
+import static org.dromara.commodityManagement.emum.ItemType.BRAND_TYPE;
|
|
|
+
|
|
|
/**
|
|
|
* 品牌服务实现
|
|
|
*/
|
|
@@ -28,11 +29,6 @@ public class BrandServiceImpl implements BrandService {
|
|
|
|
|
|
private final BrandMapper brandMapper;
|
|
|
|
|
|
- /**
|
|
|
- * 品牌类型
|
|
|
- */
|
|
|
- private static final String BRAND_TYPE = "2";
|
|
|
-
|
|
|
/**
|
|
|
* 根据Brand对象分页查询品牌数据
|
|
|
* @param brandBo BrandBo对象
|
|
@@ -69,9 +65,7 @@ public class BrandServiceImpl implements BrandService {
|
|
|
public int updateBrand(BrandBo brandBo) {
|
|
|
Brand brand = MapstructUtils.convert(brandBo, Brand.class);
|
|
|
validEntityBeforeSave(brand);
|
|
|
- QueryWrapper<Brand> qw = new QueryWrapper<>();
|
|
|
- qw.eq("id", brand.getId());
|
|
|
- return brandMapper.update(brand,qw);
|
|
|
+ return brandMapper.updateById(brand);
|
|
|
}
|
|
|
|
|
|
/**
|