|
@@ -7,22 +7,23 @@ import org.springframework.stereotype.Service;
|
|
|
import com.fs.hisStore.mapper.FsStoreProductCategoryScrmMapper;
|
|
|
import com.fs.hisStore.domain.FsStoreProductCategoryScrm;
|
|
|
import com.fs.hisStore.service.IFsStoreProductCategoryScrmService;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
/**
|
|
|
* 商品分类Service业务层处理
|
|
|
- *
|
|
|
+ *
|
|
|
* @author fs
|
|
|
* @date 2022-03-15
|
|
|
*/
|
|
|
@Service
|
|
|
-public class FsStoreProductCategoryScrmServiceImpl implements IFsStoreProductCategoryScrmService
|
|
|
+public class FsStoreProductCategoryScrmServiceImpl implements IFsStoreProductCategoryScrmService
|
|
|
{
|
|
|
@Autowired
|
|
|
private FsStoreProductCategoryScrmMapper fsStoreProductCategoryMapper;
|
|
|
|
|
|
/**
|
|
|
* 查询商品分类
|
|
|
- *
|
|
|
+ *
|
|
|
* @param cateId 商品分类ID
|
|
|
* @return 商品分类
|
|
|
*/
|
|
@@ -34,7 +35,7 @@ public class FsStoreProductCategoryScrmServiceImpl implements IFsStoreProductCat
|
|
|
|
|
|
/**
|
|
|
* 查询商品分类列表
|
|
|
- *
|
|
|
+ *
|
|
|
* @param fsStoreProductCategory 商品分类
|
|
|
* @return 商品分类
|
|
|
*/
|
|
@@ -46,7 +47,7 @@ public class FsStoreProductCategoryScrmServiceImpl implements IFsStoreProductCat
|
|
|
|
|
|
/**
|
|
|
* 新增商品分类
|
|
|
- *
|
|
|
+ *
|
|
|
* @param fsStoreProductCategory 商品分类
|
|
|
* @return 结果
|
|
|
*/
|
|
@@ -59,20 +60,28 @@ public class FsStoreProductCategoryScrmServiceImpl implements IFsStoreProductCat
|
|
|
|
|
|
/**
|
|
|
* 修改商品分类
|
|
|
- *
|
|
|
+ *
|
|
|
* @param fsStoreProductCategory 商品分类
|
|
|
* @return 结果
|
|
|
*/
|
|
|
@Override
|
|
|
+ @Transactional
|
|
|
public int updateFsStoreProductCategory(FsStoreProductCategoryScrm fsStoreProductCategory)
|
|
|
{
|
|
|
fsStoreProductCategory.setUpdateTime(DateUtils.getNowDate());
|
|
|
+ if(fsStoreProductCategory.getPid() == 0){
|
|
|
+ FsStoreProductCategoryScrm child = new FsStoreProductCategoryScrm();
|
|
|
+ child.setPid(fsStoreProductCategory.getCateId());
|
|
|
+ child.setIsShow(fsStoreProductCategory.getIsShow());
|
|
|
+ fsStoreProductCategoryMapper.updateFsStoreProductCategory(child);
|
|
|
+ }
|
|
|
return fsStoreProductCategoryMapper.updateFsStoreProductCategory(fsStoreProductCategory);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 批量删除商品分类
|
|
|
- *
|
|
|
+ *
|
|
|
* @param cateIds 需要删除的商品分类ID
|
|
|
* @return 结果
|
|
|
*/
|
|
@@ -84,7 +93,7 @@ public class FsStoreProductCategoryScrmServiceImpl implements IFsStoreProductCat
|
|
|
|
|
|
/**
|
|
|
* 删除商品分类信息
|
|
|
- *
|
|
|
+ *
|
|
|
* @param cateId 商品分类ID
|
|
|
* @return 结果
|
|
|
*/
|