商品模块代码提交
This commit is contained in:
@@ -39,26 +39,26 @@ public class ShopProdCategoryServiceImpl extends ServiceImpl<ShopProdCategoryMap
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<ShopProdCategoryDTO> page(ShopProdCategoryDTO param) {
|
||||
public Page<ShopProdCategoryDTO> getShopProdCategoryPage(ShopProdCategoryDTO param) {
|
||||
QueryWrapper queryWrapper = buildQueryWrapper(param);
|
||||
return super.pageAs(PageUtil.buildPage(), queryWrapper, ShopProdCategoryDTO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ShopProdCategoryDTO> list(ShopProdCategoryDTO param) {
|
||||
public List<ShopProdCategoryDTO> getShopProdCategoryList(ShopProdCategoryDTO param) {
|
||||
QueryWrapper queryWrapper = buildQueryWrapper(param);
|
||||
queryWrapper.eq(ShopProdCategory::getStatus, StatusEnum.ENABLED.value());
|
||||
return super.listAs(queryWrapper, ShopProdCategoryDTO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShopProdCategoryDTO get(Long id) {
|
||||
public ShopProdCategoryDTO getShopProdCategoryById(Long id) {
|
||||
Long shopId = StpKit.USER.getLoginIdAsLong();
|
||||
return super.getOneAs(query().eq(ShopProdCategory::getId, id).eq(ShopProdCategory::getShopId, shopId), ShopProdCategoryDTO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean save(ShopProdCategoryDTO dto) {
|
||||
public boolean addShopProdCategory(ShopProdCategoryDTO dto) {
|
||||
Long shopId = StpKit.USER.getLoginIdAsLong();
|
||||
boolean exists = super.exists(query().eq(ShopProdCategory::getName, dto.getName()).eq(ShopProdCategory::getShopId, shopId));
|
||||
if (exists) {
|
||||
@@ -76,7 +76,7 @@ public class ShopProdCategoryServiceImpl extends ServiceImpl<ShopProdCategoryMap
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean update(ShopProdCategoryDTO dto) {
|
||||
public boolean updateShopProdCategory(ShopProdCategoryDTO dto) {
|
||||
Long shopId = StpKit.USER.getLoginIdAsLong();
|
||||
boolean exists = super.exists(query().eq(ShopProdCategory::getName, dto.getName()).eq(ShopProdCategory::getShopId, shopId).ne(ShopProdCategory::getId, dto.getId()));
|
||||
if (exists) {
|
||||
@@ -87,13 +87,13 @@ public class ShopProdCategoryServiceImpl extends ServiceImpl<ShopProdCategoryMap
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean delete(Long id) {
|
||||
public boolean deleteShopProdCategory(Long id) {
|
||||
Long shopId = StpKit.USER.getLoginIdAsLong();
|
||||
return super.remove(query().eq(ShopProdCategory::getId, id).eq(ShopProdCategory::getShopId, shopId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean disable(Long id) {
|
||||
public boolean disableShopProdCategory(Long id) {
|
||||
Long shopId = StpKit.USER.getLoginIdAsLong();
|
||||
return UpdateChain.of(ShopProdCategory.class)
|
||||
.set(ShopProdCategory::getStatus, StatusEnum.DISABLE.value())
|
||||
@@ -103,7 +103,7 @@ public class ShopProdCategoryServiceImpl extends ServiceImpl<ShopProdCategoryMap
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean enable(Long id) {
|
||||
public boolean enableShopProdCategory(Long id) {
|
||||
Long shopId = StpKit.USER.getLoginIdAsLong();
|
||||
return UpdateChain.of(ShopProdCategory.class)
|
||||
.set(ShopProdCategory::getStatus, StatusEnum.ENABLED.value())
|
||||
|
||||
Reference in New Issue
Block a user